1 / 64

Chapter 2 Fundamentals of Logic

Chapter 2 Fundamentals of Logic. Dept of Information management National Central University Yen-Liang Chen. 2.1 Basic connectives and truth table. Assertions, called statements or propositions, are declarative sentences that are either true or false

katima
Télécharger la présentation

Chapter 2 Fundamentals of Logic

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Chapter 2 Fundamentals of Logic Dept of Information management National Central University Yen-Liang Chen

  2. 2.1 Basic connectives and truth table • Assertions, called statements or propositions, are declarative sentences that are either true or false • New statements can be obtained from existing ones in two ways. • Transform a given statement p into the statement p • Combine two or more statements into a compound statement

  3. Forming a compound statement

  4. Ex 2.1 • s: Phyllis goes out for a walk • t: The moon is out • u: It is snowing • (tu)s • t(us) • (s(ut))

  5. Ex 2.2 • “If I weigh more than 120 pounds, then I shall enroll in an exercise class” • p: I weigh more than 120 pounds • q: I shall enroll in an exercise class • the four cases of pq

  6. A word of caution • In our everyday language, we often find situations where an implications is used when the intention actually calls for a biconditional. • If you do your homework, then you will get to watch the baseball game.

  7. p(qr)(pq)r

  8. p(pq), p(pq)

  9. Key ideas • A compound statement is a tautology if it is true for all truth value assignments and a contradiction if it is false for all truth value assignments • To show (p1p2…pn)q a valid argument, we need to show this statement is a tautology. If any pi is not true, then no matter what q is the statement is true. Thus, we only need to show that q follows from (p1p2…pn), when all of them are true. • Premises and conclusion

  10. 2.2 Logic equivalence: the laws of logic • Ex 2.7, pq is equivalent to pq • Definition 2.2.Two statements are said to be logically equivalent, s1s2, when the statement s1 is true if and only if the statement s2 is true

  11. (pq)(pq)(qp)

  12. (pq)(pq) (pq)

  13. DeMorgan’s law •  (pq) pq; (pq)pq

  14. The distributive law • p(qr) (pq)  (pr) • p (qr) (pq)  (pr)

  15. Observations • When s1s2, then s1s2 is a tautology; when s1s2; then s1s2 is a tautology • When s1s2 and s2s3, then s1s3

  16. pp (pq)pq (pq)pq pqqp; pqqp p(qr)  (pq)r p(qr)  (pq) r p(qr)  (pq) (pr) p(qr)  (pq)  (pr) ppp ppp pFp pTp ppT ppF pTT pFF p(pq)  p p(pq)  p The laws of logic

  17. Observation • Definition 2.3, sd, the dual of s, is obtained by replacing  with ,  with , T with F and F with T. • Theorem 2.1. The principle of duality. Let s and t be statements that contain no logical connectives other than  and . If st, then sdtd.

  18. Two substitution rules • Suppose that the compound statement P is a tautology. If p is a primitive statement that appears in P and we replace each occurrence of p by the same statement q, then the resulting compound statement P1 is also a tautology. • Let P be a compound statement where p is an arbitrary statement that appears in P, and let q be such a statement such that pq. Suppose that in P we replace one or more occurrences of p by q. Then this replacement yields the compound statement P1. Under these circumstances PP1.

  19. Ex 2.10 • P: (pq)(pq) is a tautology • P1: ((rs)q)( (rs)q) • P2: ((rs) (tu))( (rs) (tu))

  20. Ex 2.11 • Let P: (pq)r be a compound statement. • Because (pq)pq, if P1: (pq)r, then P1P. • Let P: p(pq) be a compound statement. • Because pp, if P1: p (p q), then P1P.

  21. [(pq)r] [(pq) r] (pq) r (pq) r (pq) (pq) pq pq Ex 2.12, Ex 2.13

  22. Definitions • Implication pq • contrapositive, qp • converse, qp • inverse  p q

  23. (pq)(pq) (pq)(pq) (pq)(pq) p(qq) pFp [[(pq)r]q]  [(pq)r]q  [(pq)r]q  (pq)(qr)  [(pq)q]r  qr Ex 2.16, Ex 2.17

  24. Simplifying the switch network • (pqr)(ptq)(ptr)p[r(tq)]

  25. 2.3 Logic implication: rules of inference • (p1p2…pn)q is a valid argument, if the premises are true, then the conclusion is also true. • If any one of p1, p2,…, pn is false, the implication is automatically true. • To establish the validity of a given argument is to show that the statement (p1p2…pn)q is a tautology. • The conclusion is deduced or inferred from the truth of premises.

  26. Ex 2.19 • [(pr)(qp)r]q

  27. Ex 2.20 • [p((pr)s)](rs)

  28. Key concepts • Definition 2.4. If p and q are arbitrary statements such that pq is a tautology, then we say that p is logically implies q and we write pq to denote this situation. • When pq, we refer to pq as a logical implication. • If pq, then pq is a tautology, and we have pq and q p. Conversely, suppose that pq and q p, then we have pq.

  29. The rule of inferences • The rule of Modus Ponens • (method of affirming), the rule of detachment • [p( pq)]q • [(rs)[(rs)(tu)] (tu) • The rule of syllogism • [( pq)( qr)] ( pr)

  30. Ex 2.24 • [ (p) (pq)  (qr) ]  r

  31. the rule of Modus Tollens • (method of denying), [q( pq)]p • Ex 2.25 • [(pr) (rs) (ts) (tu) (u)]  p

  32. Some notes • Some arguments look similar in appearance but are indeed invalid. • [q( pq)]p • [p( pq)]q • the rule of conjunction, [(p)(q)](pq) • the rule of disjunctive syllogism, [( pq)(p)] q

  33. the rule of contradiction • [(p)(F)](p)

  34. The rule of contradiction • When we want to establish the validity of the argument (p1p2…pn)q, we can establish the validity of the logically equivalent argument (p1p2…pnq)F

  35. Ex 2.30

  36. Ex 2.31

  37. Ex 2.32 • [(pq)(qr)rp]F

  38. Another inference rule • [( p)(qr)] [( pq) r] • [((p1p2…pn)(qr)) [(p1p2…pnq) r] • This result tells us that if we want to establish the validity of the first argument, we may be able to do so by establishing the validity of the corresponding argument.

  39. Ex 2.33

  40. 2.4 The use of Quantifiers • Definition 2.5. A declarative sentence is an open statement if • (1) it contains one or more variables, and • (2) it is not a statement, but • (3) it becomes a statement when the variables in it are replaced by certain allowable choices. • These allowable choices constitute what is called the universe or universe of discourse. The universe comprises the choices we wish to consider or allow for the variables in the open statement.

  41. definitions • Existential quantifier () and universal quantifier () are used to quantify the open statements. • In an open statement p(x) the variable x is called a free variable. In the statement xp(x) the variable x is called a bound variable—it is bound by the existential quantifier . Similarly, in the statement xp(x) the variable x is bound by the universal quantifier .

  42. p(x): x0 r(x): x2-3x-4=0 q(x): x2 0 s(x): x2-3>0 x [p(x)r(x)] x [p(x)q(x)] x [q(x)s(x)] x [r(x)s(x)] x [r(x)p(x)] Ex 2.36

  43. Ex 2.37 • p(x): x is a rational number, q(x): x is a real number • x [p(x)q(x)] • e(t): triangle t is equilateral, a(t): triangle t has three angles of 60 • t [e(t)a(t)] • x [sin2x+cos2x=1] • mn [41=m2+n2]

  44. Ex 2.39 • For n:=1 to 20 do A[n]:=nn-n • n (A[n]0) • n (A[n+1]=2A[n]) • n [(1n19)(A[n]<A[n+1]) • m n [(mn)(A[m]A[n])]

  45. Definitions • p(x) and q(x) are called logically equivalent, written as x [p(x)q(x)], when p(a) q(a) is true for each replacement a from the universe. We say that p(x) logically implies q(x), written as x [p(x)q(x)], when p(a)q(a) is true for each replacement a from the universe. • x [p(x)q(x)] if and only if x [p(x)q(x)] and x [q(x)p(x)] • x pq; contrapositive, x [qp]; converse, x [qp]; inverse x [ p q];

  46. Examples • Ex 2.40. • s(x): x is a square; e(x): x is a equilateral; • x [s(x)e(x)]; contrapositive, converse, inverse • Ex 2.41. • p(x): x>3; q(x) x>3; • x [p(x)q(x)]; contrapositive, converse, inverse • Ex 2.42. r(x): 2x+1=5; s(x): x2=9 • x [r(x)s(x)] x [r(x)]  x [s(x)]; • but we have x [r(x)s(x)]  x [r(x)]  x [s(x)]

  47. Table 2.22 • x [r(x)s(x)] x [r(x)] x [s(x)] • x [r(x) s(x)] x [r(x)] x [s(x)] • x [r(x)s(x)] x [r(x)] x [s(x)] • x [r(x)s(x)] x [r(x)] x [s(x)]

  48. Ex 2.43 • x [p(x)(q(x)r(x))] x [(p(x)q(x))r(x)] • x [p(x)q(x)]x(p(x)q(x)) • x p(x)x p(x) • x [p(x)q(x)]x [p(x)q(x)] • x [p(x)q(x)]x [p(x)q(x)]

More Related