1 / 21

CS 103 Discrete Structures Lecture 03 Logic and Proofs (3)

CS 103 Discrete Structures Lecture 03 Logic and Proofs (3). Chapter 1 The Foundations: Logic and Proofs 1.3 Propositional Equivalences. Propositional Equivalences. Compound propositions can be classified according to their possible truth values into three types:

lore
Télécharger la présentation

CS 103 Discrete Structures Lecture 03 Logic and Proofs (3)

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. CS 103Discrete StructuresLecture 03 Logic and Proofs (3)

  2. Chapter 1 The Foundations:Logic and Proofs1.3 Propositional Equivalences

  3. Propositional Equivalences Compound propositions can be classified according to their possible truth values into three types: Tautologyis a compound proposition that is always true, no matter what the truth values of the propositions that occur in it Contradictionis a compound proposition that is always false Contingencyis a compound proposition that is neither a tautology nor a contradiction Tautologies and contradictions are often important in mathematical reasoning.

  4. Tautology and Contradiction: Example We can construct examples of tautologies and contradictions using just one propositional variable. • p  ¬p is a tautology. • p ¬p is a contradiction

  5. Logical Equivalence: p  q Compound propositions that have the same truth values in all possible cases are called logically equivalent. Definition: The compound propositions p and q are called logically equivalent if p  q is a tautology. The notation p  q denotes that p and q are logically equivalent. • The symbol  is not a logical connective and p  q is not a compound proposition but rather is the statement that p  q is a tautology

  6. Logical Equivalence: Example 1 Show that ¬(p  q) and ¬p  ¬q are logically equivalent. Note that ¬(p  q)  (¬p  ¬q) is a tautology

  7. Logical Equivalence: Example 2 Show that ¬p  qand p → qare logically equivalent. Note that (¬p  q)  (p → q) is a tautology

  8. Logical Equivalence: Example 3 Show that p  (q  r)and (p q)  (p  r)are logically equivalent This is the distributive law of disjunction over conjunction

  9. LogicalEquivalence This table shows some important equivalences. T denotes the compound proposition that is always true F denotes the compound proposition that is always false

  10. LogicalEquivalence This table contains some important equivalences involving conditional and bi-conditional statements

  11. Logical Equivalence: De Morgan's Laws De Morgan’s laws tell us how to negate conjunctions and disjunctions • ¬(p  q)  ¬p  ¬q • ¬(p  q)  ¬p  ¬q

  12. CS 103Discrete StructuresLecture 04 Logic and Proofs (4)

  13. De Morgan’s Laws: Example 1 Determine the negation of Ahmed has a cellphone and he has a laptop computer Let p: Ahmed has a cellphone q: Ahmed has a laptop computer Then Ahmad has a cellphone and he has a laptop computer can be represented by p  q By the first De Morgan's laws, ¬(p  q)  ¬p  ¬q Therefore, the negation of our original statement is Ahmed does not have a cellphone or he does not have a laptop computer

  14. De Morgan’s Laws: Example 2 Determine the negation of Ali will go to the university or Mohammad will go to the university Let p: Ali will go to the university q: Mohammad will go to the university Then Ali will go to the university or Mohammad will go to the university can be represented by p  q By the first De Morgan's laws, ¬(p  q)  ¬p  ¬q The negation of our original statement is Ali will not go to the university and Mohammad will not go to the university

  15. Constructing New Logical Equivalences We can prove that some compound propositions are logically equivalent by developing a series of logical equivalences Example 1: Show that ¬(p → q) and p  ¬q are logically equivalent ¬(p → q)  ¬(¬ p  q) Definition of implication  ¬(¬ p)  ¬q De Morgan’s law  p  ¬q Double-negation

  16. Constructing Equivalences: Example 2 Show that (p  r)  (q  r) and (p  q)  r are logically equivalent (p  r)  (q  r)  (p  r)  (q  r) Definition of implication  p  r q  r Associative  p q  r  r Commutative  (p q)  (r  r) Associative  (p  q)  r De Morgan, Idempotent  (p  q)  r Definition of implication

  17. Constructing Equivalences: Example 2 Prove that (p  q)  (p  q) is a Tautology (p  q)  (p  q)  (p  q)  (p  q) Implication  (p q)  (p  q) De Morgan’s  (p  p)  (q  q)Commutative, Associative  T  T Identity T

  18. Propositional Equivalences: Exercises • Use truth tables to verify these equivalences: • Use De Morgan's laws to find the negation of each of the following statements: • Ahmad is rich and happy. • Ali will bicycle or run tomorrow. • Mohammad walks or takes the bus to class. • Ibrahim is smart and hard working.

  19. Propositional Equivalences: Exercises • Show that each of these conditional statements is a tautology by using truth tables

  20. Propositional Equivalences: Exercises • Show that each of the following compound propositions are logically equivalent: • p  q and (p  q)  (¬p  ¬q) • ¬(p  q) and p  ¬q • ¬(p  q) and p  q • (p → q)  (p → r) and p → (q  r) • ¬p → (q → r) and q → (p  r) • (p → q) → r and p → (q → r) • (p  q) → r and (p → r)  (q → r) • (p → q) → (r → s)and(p → r) → (q → s)

  21. Exercise 4.a: Solution p  q and (p  q)  (¬p  ¬q) p q  (p → q)(q → p) Definition of bi-implication  (¬p q) (¬q p) Definition of implication  [(¬p  q) ¬q] [(¬p  q) p] Distributive  [(¬p  ¬q) (q  ¬q)]  [(¬p p) (q p)] Distributive  [(¬p  ¬q) F] [F (q  p)] Negation  (¬p  ¬q) (q  p) Identity  (¬p  ¬q) (p q) Commutative  (p  q) (¬p  ¬q) Commutative

More Related