520 likes | 1.41k Views
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:
E N D
CS 103Discrete StructuresLecture 03 Logic and Proofs (3)
Chapter 1 The Foundations:Logic and Proofs1.3 Propositional Equivalences
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.
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
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
Logical Equivalence: Example 1 Show that ¬(p q) and ¬p ¬q are logically equivalent. Note that ¬(p q) (¬p ¬q) is a tautology
Logical Equivalence: Example 2 Show that ¬p qand p → qare logically equivalent. Note that (¬p q) (p → q) is a tautology
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
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
LogicalEquivalence This table contains some important equivalences involving conditional and bi-conditional statements
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
CS 103Discrete StructuresLecture 04 Logic and Proofs (4)
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
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
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
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
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
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.
Propositional Equivalences: Exercises • Show that each of these conditional statements is a tautology by using truth tables
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)
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