1 / 37

Logical Form and Logical Equivalence

Logical Form and Logical Equivalence. M260 2.1. Logical Form Example 1. If the syntax is faulty or execution results in division by zero, then the program will generate an error message.

nizana
Download Presentation

Logical Form and Logical Equivalence

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. Logical Form and Logical Equivalence M260 2.1

  2. Logical Form Example 1 • If the syntax is faultyor execution results in division by zero,then the program will generate an error message. • Thereforeif the computer does not generate an error messagethen the syntax is correctand the execution does not result in division by zero.

  3. Logical Form Example 2 • If x is a Real number such that x<-2 or x>2,then x2>4. • Thereforeif x24,then x-2 and x2.

  4. Logical Form Example 1 • If (the syntax is faulty)or (execution results in division by zero),then (the program will generate an error message). • Thereforeif (the computer does not generate an error message)then (the syntax is correct)and (the execution does not result in division by zero).

  5. Logical Form Example 1 • If (p)or (q),then (r). • Thereforeif (not r)then (not p)and (not q).

  6. Logical Form Example 2 • If (x<-2) or (x>2),then (x2>4). • Thereforeif (x24),then (x-2) and (x2).

  7. Logical Form Example 2 • If (p) or (q),then (r). • Thereforeif (not r),then (not p) and (not q).

  8. Logical Form vs Content • Examples 1 and 2 have the same form:If p or q, then r.therefore if not r, then not p and not q. • These examples have different values for the propositional variables p and q.

  9. Formal Logic Goals • Avoid Ambiguity • Obtain Consistency • Elucidate Proof Mechanisms

  10. Mathematical Vocabulary • New terms are defined using previously defined terms. • Initial terms remain undefined. • Undefined terms in logic: sentence, true, false.

  11. Logic Symbols ~   • ~ denotes “not” • Negation of p is ~p.

  12. Logic Symbols ~   •  denotes “and” • Conjunction of p and q is p  q. •  denotes “or” • Disjunction of p and q is p  q. • Precedence: first ~ then  and  (unordered)

  13. Truth Values • True • False

  14. Precedence Examples • ~p  q • ~p  ~q • ~ (p  q)

  15. Let p, q and r be 0<x, x<3, and x=3 • Rewrite x 3 • q  r • Rewrite 0<x<3 • pq • Rewrite 0<x3 • p(q  r)

  16. Negation Truth Table

  17. Conjunction Truth Table

  18. Disjunction Truth Table

  19. Statement Form • Statement variables • Logical connectives • Truth table

  20. Exclusive Or • p or q but not both • (p  q)  ~(p  q) • Do a truth table

  21. Exclusive Or Truth Table

  22. Exclusive Or Truth Table

  23. Exclusive Or Truth Table

  24. Exclusive Or Truth Table

  25. Logical Equivalence • Statement Forms are logically equivalent if, and only if, they have the same truth tables. • P  Q

  26. Logical Equivalence Examples • 6>2 2<6 • p  q q  p • p ~(~p)

  27. De Morgan’s Laws • ~(p  q)  ~p  ~ q • ~(p  q)  ~p  ~ q • Do truth tables

  28. ~(p  q)  ~p  ~ q

  29. ~(p  q)  ~p  ~ q

  30. ~(p  q)  ~p  ~ q

  31. Practice Negations • John is six feet tall and weighs at least 200 pounds. • John is not six feet tall or he weighs less than 200 pounds.

  32. Practice Negations • The bus was late or Tom’s watch was slow. • The bus was not late and Tom’s watch was not slow.

  33. Jim is tall and thin. Logical And and Or are only allowed between statements.

  34. Tautologies and Contradictions • A tautology is a statement form that is always true regardless of the values of the statement variables. • A contradiction is a statement form that is always false regardless of the values of the statement variables

  35. Commutative laws Associative laws Distributive laws Identity laws Negation laws Double negative law Idempotent laws De Morgan’s laws Universal bound laws Absorption laws Negations of tautologies and contradictions Logically Equivalent Forms

  36. Logical Equivalences • pq _________ pq  ________ • (pq)r _______ (pq)r _______  • p(qr)  ______ p(qr)  _______ • pt __________ pc  __________ • p~p  _________ p~p  _________ • ~(~p)  ________ • pp  __________ pp  __________ • ~(pq )  _______ ~(pq )  _______ • pt  __________ pc  __________ • p(pq)  ______ p(pq)  ______ • ~t  ___________ ~c  ___________

  37. Logical Equivalences • 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t p pc  p • p~p  t p~p  c • ~(~p)  p • pp  p pp  p • ~(pq )  ~p~q ~(pq )  ~p~q • pt  t pc  c • p(pq)  p p(pq)  p • ~t  c ~c  t

More Related