Presentation is loading. Please wait.

Presentation is loading. Please wait.

Methods of proof Section 1.6 & 1.7 Wednesday, June 20, 2018

Similar presentations


Presentation on theme: "Methods of proof Section 1.6 & 1.7 Wednesday, June 20, 2018"— Presentation transcript:

1 Methods of proof Section 1.6 & 1.7 Wednesday, June 20, 2018
MSU/CSE 260 Fall 2009 1 © by A-H. Esfahanian. All Rights Reserved.

2 Proof Methods ¬ p  c T F p c p  c ¬ c  ¬ p p  ¬ c Direct
Wednesday, June 20, 2018 Proof Methods Direct Contrapositive Contradiction p c p  c ¬ p  c ¬ c  ¬ p p  ¬ c T F MSU/CSE 260 Fall 2009 2 © by A-H. Esfahanian. All Rights Reserved.

3 How are these questions related?
Wednesday, June 20, 2018 How are these questions related? Does p logically imply c ? Is the proposition (p  c) a tautology? Is the proposition (¬ p  c) is a tautology? Is the proposition (¬ c  ¬ p) is a tautology? Is the proposition (p  ¬ c) is a contradiction? MSU/CSE 260 Fall 2009 3 © by A-H. Esfahanian. All Rights Reserved.

4 Proof Methods h1  h2  …  hn  c ?
Wednesday, June 20, 2018 Proof Methods h1  h2  …  hn  c ? Let p = h1  h2  …  hn . The following propositions are equivalent: p  c (p  c) is a tautology. Direct (¬ p  c) is a tautology. Direct (¬ c  ¬ p) is a tautology Contrapositive (p  ¬ c) is a contradiction. Contradiction MSU/CSE 260 Fall 2009 4 © by A-H. Esfahanian. All Rights Reserved.

5 Wednesday, June 20, 2018 Formal Proofs A proof is equivalent to establishing a logical implication chain Given premises (hypotheses) h1 , h2 , … , hn and conclusion c, to give a formal proof that the hypotheses imply the conclusion, entails establishing h1  h2  …  hn  c We’ll refer to it as the chain method MSU/CSE 260 Fall 2009 © by A-H. Esfahanian. All Rights Reserved.

6 Formal Proof To prove: h1  h2  …  hn  c
Wednesday, June 20, 2018 Formal Proof To prove: h1  h2  …  hn  c Produce a series of wffs, p1 , p2 , … pn, c such that each wff pr is: one of the premises or a tautology, or an axiom/law of the domain (e.g., 1+3=4 or x > x+1 ) justified by definition, or logically equivalent to or implied by one or more propositions pk where 1 ≤ k < r. p Premise p Tautology . pr k, k’, Inf. Rule pn _____  c MSU/CSE 260 Fall 2009 6 © by A-H. Esfahanian. All Rights Reserved.

7 “If integer n is odd, then n2 is odd.”
Wednesday, June 20, 2018 Example Prove the theorem: “If integer n is odd, then n2 is odd.” Informal proof: It is given that n is an odd integer. Thus n = 2k + 1, for some integer k. Thus n2 = (2k + 1)2 = 4k2 + 4k = 2(2k2 + 2k) + 1 Therefore, n2 is odd. MSU/CSE 260 Fall 2009 7 © by A-H. Esfahanian. All Rights Reserved.

8 “If integer n is odd, then n2 is odd.”
Wednesday, June 20, 2018 Example h c Prove the theorem: “If integer n is odd, then n2 is odd.” Formal Proof: 1. n is odd Premise (h) 2.  k (n = 2k + 1) Definition of “odd” (Universe is Integers) 3. n = 2c + 1, for some integer c Step 2, specialization 4. (n = 2c + 1)  (n2 = (2c + 1)2) Laws of arithmetic 5. n2 = (2c + 1) Steps 3 & 4, modus ponens = 4c2 + 4c Laws of arithmetic = 2(2c2 + 2c) Laws of arithmetic 6.  k (n2 = 2k + 1) Step 5, generalization 7. n2 is odd Definition of “odd” MSU/CSE 260 Fall 2009 8 © by A-H. Esfahanian. All Rights Reserved. 8

9 Formal Proofs….. Example: Given: p  q, q  r, p.
Wednesday, June 20, 2018 Formal Proofs….. Example: Given: p  q, q  r, p. Prove: r We want to establish the logical implication: (p  q)  (q  r)  p  r. We can use either of the following approaches Truth Table A chain of logical implications Note that if A  B and B  C then A  C MSU/CSE 260 Fall 2009 9 © by A-H. Esfahanian. All Rights Reserved.

10 Does (p  q)  (q  r)  p  r ? Truth Table Method
Wednesday, June 20, 2018 Does (p  q)  (q  r)  p  r ? Truth Table Method p q r p  q q  r T F MSU/CSE 260 Fall 2009 10 © by A-H. Esfahanian. All Rights Reserved.

11 Does (p  q)  (q  r)  p  r ? Chain Method
Wednesday, June 20, 2018 Does (p  q)  (q  r)  p  r ? Chain Method h1 = p  q, h2 = q  r, h3 = p, c = r We want to prove that h1  h2  h3  c p Premise p  q Premise q Steps 1 & 2, modus ponens* q  r Premise r Steps 3&4, modus ponens *See Table 1, page 66 MSU/CSE 260 Fall 2009 11 © by A-H. Esfahanian. All Rights Reserved.

12 Wednesday, June 20, 2018 Example Prove: If 2 is even and if 3 is even and if the sum of any two even integers is even, then all integers greater than 1 and less than 6 are even. 2 is even Premise is even Premise 3. n m ((n is even)  (n is even)  (n+m is even)) Premise 4. (2 is even)  (2 is even)  (4 is even) Specialization (twice), step 3, math 5. (3 is even)  (2 is even)  (5 is even) Specialization (twice), step 3, math is even Conj. & modus ponens, steps 1&4 is even Conj. & modus ponens, steps 1,2,&5 8. (2 is even)  (3 is even)  (4 is even)  (5 is even) Conj.(many times), steps 1,2,6&7 So this is a bona fide theorem – the statement is true! MSU/CSE 260 Fall 2009 12 © by A-H. Esfahanian. All Rights Reserved.

13 Proving conclusions of the form p  q
Direct: Assume p, in addition to the given hypotheses, and conclude q. Contrapositive: Assume  q, in addition to the given hypotheses, and conclude  p. Contradiction: Assume both p and  q, in addition to the given hypotheses, and conclude False. Vacuous: Assume the given hypotheses, and conclude  p. Trivial: Assume the given hypotheses, and conclude q. MSU/CSE 260 Fall 2009

14 Example: Direct proof Prove hypothetical syllogism.
Wednesday, June 20, 2018 Example: Direct proof Prove hypothetical syllogism. Prove: (p  q)  (q  s)  (p  s) p Assumption p  q Premise q , 2, modus ponens q  s Premise s , 4, modus ponens p  s , 5, direct method of proof MSU/CSE 260 Fall 2009 © by A-H. Esfahanian. All Rights Reserved.

15 Example: Contrapositive proof
Wednesday, June 20, 2018 Example: Contrapositive proof Prove hypothetical syllogism. Prove: (p  q)  (q  s)  (p  s)  s Assumption q  s Premise  q , 2, modus tollens p  q Premise  p , 4, modus tollens p  s , 5, contrapositive method MSU/CSE 260 Fall 2009 © by A-H. Esfahanian. All Rights Reserved. 15

16 Example: Contradiction proof
Wednesday, June 20, 2018 Example: Contradiction proof Prove hypothetical syllogism. Prove: (p  q)  (q  s)  (p  s) p Assumption  s Assumption q  s Premise  q , 3, modus tollens p  q Premise  p , 5, modus tollens p   p , 6, conjunction False , logical equivalence p  s , 2, 8, contradiction method MSU/CSE 260 Fall 2009 © by A-H. Esfahanian. All Rights Reserved. 16

17 Example: Vacuous proof
Prove: If p  r and q   r, then p  q  s Equivalently, prove: (p  r )  (q   r )  (p  q  s) p  r Premise  p  r , Implication q   r Premise  q   r , Implication  p   q , 4, Resolution  (p  q ) , DeMorgan p  q  s , Vacuously MSU/CSE 260 Fall 2009

18 Example: Trivial proof
Prove: If p  r and  r, then q   p Equivalently, prove: (p  r )  (  r )  ( q   p) p  r Premise  r Premise  p , 2, modus tollens q   p , Trivially MSU/CSE 260 Fall 2009

19 Non-examples: Vacuous, trivial proofs
Wednesday, June 20, 2018 Non-examples: Vacuous, trivial proofs Recall hypothetical syllogism. Prove: (p  q)  (q  s)  (p  s) Why didn’t we give example vacuous or trivial proofs of hypothetical syllogism? MSU/CSE 260 Fall 2009 © by A-H. Esfahanian. All Rights Reserved. 19

20 Wednesday, June 20, 2018 Example Let h1 = q  d h2 = (q  d )  ¬ p h3 = ¬ p  (a  ¬ b) h4 = (a  ¬ b)  (r  s) c = r  s we want to establish h1  h2  h3  h4  c. MSU/CSE 260 Fall 2009 20 © by A-H. Esfahanian. All Rights Reserved.

21 Wednesday, June 20, 2018 Solution 1 Let h1 = q  d h2 = (q  d )  ¬ p h3 = ¬ p  (a  ¬ b) h4 = (a  ¬ b)  (r  s) c = r  s we want to establish h1  h2  h3  h4  c. (q  d )  ¬ p Premise ¬ p  (a  ¬ b) Premise (q  d )  (a  ¬ b) &2, Hypothetical Syllogism (a  ¬ b)  (r  s) Premise (q  d )  (r  s) 3&4, HS q  d Premise r  s 5&6, Modus Ponens MSU/CSE 260 Fall 2009 © by A-H. Esfahanian. All Rights Reserved.

22 Wednesday, June 20, 2018 Solution 2 Let h1 = q  d h2 = (q  d )  ¬ p h3 = ¬ p  (a  ¬ b) h4 = (a  ¬ b)  (r  s) c = r  s, we want to establish h1  h2  h3  h4  c. q  d Premise (q  d )  ¬ p Premise ¬ p 1&2, and modus ponens ¬ p  (a  ¬ b) Premise (a  ¬ b) 3&4, modus ponens (a  ¬ b)  (r  s) Premise r  s 5&6, modus ponens MSU/CSE 260 Fall 2009 © by A-H. Esfahanian. All Rights Reserved.

23 Example Question: Is [(¬ (p  q))  (¬ p  q)] ≡ (¬ p  q) ?
Wednesday, June 20, 2018 Example Question: Is [(¬ (p  q))  (¬ p  q)] ≡ (¬ p  q) ? Different ways to answer the above question By means of the Truth Table. By means of derivation. By formulating it as logical equivalence, that is, as a “proof”. MSU/CSE 260 Fall 2009 23 © by A-H. Esfahanian. All Rights Reserved.

24 Is [(¬ (p  q))  (¬ p  q)] ≡ (¬ p  q) ? Truth Table Method
Wednesday, June 20, 2018 Is [(¬ (p  q))  (¬ p  q)] ≡ (¬ p  q) ? Truth Table Method p q ¬ (p  q) (¬ p  q) LHS RHS Answer T F YES MSU/CSE 260 Fall 2009 24 © by A-H. Esfahanian. All Rights Reserved.

25 Is [(¬ (p  q))  (¬ p  q)] ≡ (¬ p  q) ? Derivation Method
Wednesday, June 20, 2018 Is [(¬ (p  q))  (¬ p  q)] ≡ (¬ p  q) ? Derivation Method (¬ (p  q))  (¬ p  q) ≡ ¬ (¬ (p  q))  (¬ p  q) ≡ (p  q)  (¬ p  q) ≡ ((p  q)  ¬ p)  q ) ≡ (¬ p  (p  q))  q ≡ ((¬ p  p)  (¬ p  q))  q ≡ ((T)  (¬ p  q)) q ≡ (¬ p  q) q ≡ (¬ p)  (q q ) ≡ (¬ p)  (q) ≡ (¬ p  q) MSU/CSE 260 Fall 2009 25 © by A-H. Esfahanian. All Rights Reserved.

26 Is [ (¬ (p  q))  (¬ p  q)] ≡ (¬ p  q) ? Logical Equivalence Method
Wednesday, June 20, 2018 Is [ (¬ (p  q))  (¬ p  q)] ≡ (¬ p  q) ? Logical Equivalence Method To show S ≡ R: show that S  R and R  S In this case, we have S = [¬ (p  q))  (¬ p  q)] and R = (¬ p  q) MSU/CSE 260 Fall 2009 26 © by A-H. Esfahanian. All Rights Reserved.

27 Prove [(¬ (p  q))  (¬ p  q)]  (¬ p  q)
Wednesday, June 20, 2018 Prove [(¬ (p  q))  (¬ p  q)]  (¬ p  q) (¬ (p  q))  (¬ p  q) Premise (p  q)  (¬ p  q) 1, Implication & double neg. (p  (¬ p  q))  (q  (¬ p  q)) 2, Distribution (T  q)  (q  ¬ p) , Comm., Assoc, Taut. & Idem. T  (q  ¬ p) , Domination ¬ p  q , Identity, Commutative Prove (¬ p  q)  [(¬ (p  q))  (¬ p  q)] ¬ p  q Premise (¬ (p  q))  (¬ p  q) Trivially, from 1 MSU/CSE 260 Fall 2009 27 © by A-H. Esfahanian. All Rights Reserved.

28 Example Is the following reasoning logical?
Wednesday, June 20, 2018 Example Is the following reasoning logical? If you are poor then you have no money. If you have money then you are not poor. Therefore, being poor is the same as having no money! Define the following propositions: p = “you are poor” q = “you have no money” Can we conclude that p ≡ q given that p  q and ¬q  ¬p. In other words, can we prove that: [(p  q)  (¬ q  ¬ p) ]  (p  q) . MSU/CSE 260 Fall 2009 © by A-H. Esfahanian. All Rights Reserved.

29 Solution: Does [(p  q)  (¬ q  ¬ p) ] ≡ (p  q) ?
Wednesday, June 20, 2018 Solution: Does [(p  q)  (¬ q  ¬ p) ] ≡ (p  q) ? p q p  q ¬ q ¬ p ¬ q  ¬ p LSH p  q T F There is a possibility of not being poor while having no money! MSU/CSE 260 Fall 2009 © by A-H. Esfahanian. All Rights Reserved.

30 Wednesday, June 20, 2018 More Example Let h1 = p  (q  s) h2 = ¬ r  p h3 = q c = r  s we want to establish h1  h2  h3  c MSU/CSE 260 Fall 2009 30 © by A-H. Esfahanian. All Rights Reserved.

31 Does ( p  (q  s) )  (¬ r  p)  q  (r  s) ?
Wednesday, June 20, 2018 Does ( p  (q  s) )  (¬ r  p)  q  (r  s) ? ¬ r  p Premise r Assumption ¬ (¬ r ) Double negation, 2 p Disj. syllogism, 1&3 p  (q  s) Premise q  s Modus ponens, 4&5 q Premise s Modus ponens, 6&7 r  s Direct proof, 2&8 MSU/CSE 260 Fall 2009 31 © by A-H. Esfahanian. All Rights Reserved.

32 General Proof by Contradiction
Proof by contradiction is a general proof method (conclusion can be of any form) Method: To prove that h1  h2  …  hn  c: Assume  c, in addition to the hypotheses, and conclude False. When c has the form p  q, we get the “specialized” version presented earlier. MSU/CSE 260 Fall 2009

33 Example: General Proof by Contradiction
Wednesday, June 20, 2018 Example: General Proof by Contradiction Let h1 = q  d h2 = (q  d )  ¬ p h3 = ¬ p  (a  ¬ b) h4 = (a  ¬ b)  (r  s) c = r  s, Prove by contradiction that h1  h2  h3  h4  c. MSU/CSE 260 Fall 2009 33 © by A-H. Esfahanian. All Rights Reserved.

34 ¬ (r  s) Contrary Assumption F
Wednesday, June 20, 2018 h1  h  h  h  ¬ c  F (q  d)  ( (q  d )  ¬ p )  (¬ p  (a  ¬ b))  ((a  ¬ b)  (r  s))  ¬ ( r  s)  F q  d Premise (q  d )  ¬ p Premise ¬ p 1&2, and modus ponens ¬ p  (a  ¬ b) Premise (a  ¬ b) 3&4, modus ponens (a  ¬ b)  (r  s) Premise r  s 5&6, modus ponens ¬ (r  s) Contrary Assumption F MSU/CSE 260 Fall 2009 34 © by A-H. Esfahanian. All Rights Reserved.

35 Rules of Inference for Predicates
Wednesday, June 20, 2018 Rules of Inference for Predicates All the Propositional logic rules. The Universal Specification (US) rule: x P(x)  P(y) for any y in the domain. The rule is also know as Instantiation rule The Existential Specification (ES) x P(x)  P(y) for some y in the domain. The Existential Generalization (EG) P(y)  x P(x) MSU/CSE 260 Fall 2009 35 © by A-H. Esfahanian. All Rights Reserved.

36 x (A(x) → B(x)) ≡ x A(x) → x B(x)
Wednesday, June 20, 2018 Other Facts x (A(x) → B(x)) ≡ x A(x) → x B(x) x A(x) → x B(x) ≡ x (A(x) → B(x)) x (A(x)  B(x)) ≡ x A(x)  x B(x) x (A(x)  B(x)) ≡ x A(x)  x B(x) MSU/CSE 260 Fall 2009 36 © by A-H. Esfahanian. All Rights Reserved.

37 Prove that x (H(x) → M(x))  H(s) ⇒ M(s)
Wednesday, June 20, 2018 Prove that x (H(x) → M(x))  H(s) ⇒ M(s) This is the famous Socrates’s argument All men are mortal Socrates is a man Therefore, Socrates is a mortal Let H(x) be “x is a man”, Let M(x) be “x is a mortal” and Let s be “Socrates”. MSU/CSE 260 Fall 2009 37 © by A-H. Esfahanian. All Rights Reserved.

38 Prove that x (H(x) → M(x))  H(s) ⇒ M(s)
Wednesday, June 20, 2018 Prove that x (H(x) → M(x))  H(s) ⇒ M(s) x (H(x) → M(x)) Premise H(s) → M(s) , Universal Specification H(s) Premise M(s) &3 and MP You get to choose s in step 2. MSU/CSE 260 Fall 2009 38 © by A-H. Esfahanian. All Rights Reserved.

39 Prove that x (H(x) → M(x))  x H(x)  x M(x)
Wednesday, June 20, 2018 Prove that x (H(x) → M(x))  x H(x)  x M(x) x H(x) Premise H(y) Existential Specification, for some y x (H(x) → M(x)) Premise H(y) → M(y) & Universal Specification M(y) &4, Modus Ponens x M(x) , Existential Generalization MSU/CSE 260 Fall 2009 39 © by A-H. Esfahanian. All Rights Reserved.

40 Prove that x (A(x)  B(x))  x A(x)  x B(x)
Wednesday, June 20, 2018 Prove that x (A(x)  B(x))  x A(x)  x B(x) x (A(x)  B(x)) Premise A(y)  B(y) 1, ES, y is fixed now. A(y) , Simplification B(y) , Simplification x A(x) 3, EG x B(x) 4, EG x A(x)  x B(x) 5&6, Conjunction Question: Is the converse true? MSU/CSE 260 Fall 2009 © by A-H. Esfahanian. All Rights Reserved.

41 Does x A(x)  x B(x)  x (A(x)  B(x)) ?
Wednesday, June 20, 2018 Does x A(x)  x B(x)  x (A(x)  B(x)) ? x A(x) Premise A(y) 1, ES, where y is fixed x B(x) Premise, ES B(y) 3, ES, where y is fixed A(y)  B(y) 2 and 4 x (A(x)  B(x)) 5, EG This proof is invalid. The “y” in step 2 and 4 cannot be assumed to be the same! A new name must be used to denote a (fixed) y’ such that B(y’) in step 4. MSU/CSE 260 Fall 2009 41 © by A-H. Esfahanian. All Rights Reserved.

42 Prove that x (A(x)  B(x))  x A(x)  x B(x)
Wednesday, June 20, 2018 Prove that x (A(x)  B(x))  x A(x)  x B(x) ¬ (x A(x)  x B(x)) Contrary Assumption ¬ x A(x)  ¬ x B(x) 1 & De Morgan’s ¬ x A(x) 2 x ¬ A(x) 3 & De Morgan’s ¬ x B(x) 2 x ¬B(x) 5 & De Morgan’s ¬A(y) 4, ES, fixed y ¬B(y) , US, free to choose y as in 7 ¬A(y)  ¬B(y) 7 & 8 ¬ (A(y)  B(y)) 9, De Morgan’s x (A(x)  B(x)) Premise A(y)  B(y) , US, any y, same as in 9 Contradiction 10 & 12 MSU/CSE 260 Fall 2009 42 © by A-H. Esfahanian. All Rights Reserved.

43 Proofs, and Proof Methods, Summary & Recap
Wednesday, June 20, 2018 Proofs, and Proof Methods, Summary & Recap What is a logical argument? Logical Implication (⇒) When is a mathematical argument correct? Need rules of inference MSU/CSE 260 Fall 2009 43 © by A-H. Esfahanian. All Rights Reserved.

44 Proof Methods Direct Contrapositive Contradiction Vacuous Trivial
Wednesday, June 20, 2018 Proof Methods Direct Contrapositive Contradiction Vacuous Trivial To disprove, just need a “counterexample” MSU/CSE 260 Fall 2009 44 © by A-H. Esfahanian. All Rights Reserved.

45 Applications of Logic Day-to-day conversation
Wednesday, June 20, 2018 Applications of Logic Day-to-day conversation The equivalent Algebra (Boolean) for circuit design Program Correctness Complexity Theory MSU/CSE 260 Fall 2009 45 © by A-H. Esfahanian. All Rights Reserved.


Download ppt "Methods of proof Section 1.6 & 1.7 Wednesday, June 20, 2018"

Similar presentations


Ads by Google