Download presentation
Presentation is loading. Please wait.
1
Discussion #12 1/22 Discussion #12 Deduction, Proofs and Proof Techniques
2
Discussion #12 2/22 Topics Proofs = Sound Arguments, Derivations, Deduction Proof Techniques 1.Exhaustive 2.Equivalence to Truth 3.If and only if (iff) 4.Contrapositive Proof 5.Contradiction (or Indirect) 6.Conditional 7.Case Analysis 8.Induction 9.Direct
3
Discussion #12 3/22 1. Exhaustive Truth Proof Show true for all cases. –e.g.Prove x 2 + 5 < 20 for integers 0 x 3 0 2 + 5 = 5< 20T 1 2 + 5 = 6< 20T 2 2 + 5 = 9< 20T 3 2 + 5 = 14< 20T –Thus, all cases are exhausted and true. –Same as using truth tables when all combinations yield a tautology.
4
Discussion #12 4/22 2. Equivalence to Truth 2a.Transform logical expression to T. Prove: R S ( R S) R S ( R S) R S R S de Morgan’s law R S R S double negation (R S) (R S) implication (P Q P Q) T law of excl. middle (P P) T
5
Discussion #12 5/22 2. Equivalence to Truth (continued…) 2b.Or, transform lhs to rhs or vice versa. Prove: P Q P Q Q P Q P Q (P P) Q distributive law (factoring) T Q law of excluded middle Q identity
6
Discussion #12 6/22 3. If and only if Proof Also called necessary and sufficient If we have P Q, then we can create two standard deductive proofs, namely, (P Q) and (Q P). i.e. P Q (P Q) (Q P) Transforms proof to a standard deductive proof actually two of them
7
Discussion #12 7/22 3. If and only if Proof: Example Prove: 2x – 4 > 0 iff x > 2. Thus, we can do two proofs: (1) If 2x – 4 > 0 then x > 2. (2) If x > 2 then 2x – 4 > 0. Proof: (1) Suppose 2x – 4 > 0. Then 2x > 4 and thus x > 2. (2) Suppose x > 2. Then 2x > 4 and thus 2x – 4 > 0. Note that we could have also simply converted the lhs to the rhs. Proof: 2x – 4 > 0 2x > 4 x > 2. 1. 2x – 4 > 0premise 2. 2x > 4algebraic equiv. 3. x > 2algebraic equiv.
8
Discussion #12 8/22 4. Contrapositive Proof Remember: T T F F T T F T T F T F T T T T T T F T FF TF FT TT P) (Q(Q (P Q) QP
9
Discussion #12 9/22 4. Contrapositive Proof (continued…) Prove: if s is not a multiple of 3, then s is not a solution of x 2 + 3x – 18 = 0. P = s is a multiple of 3 Q = s is a solution of x 2 + 3x – 18 = 0. Instead of proving P Q, we can prove Q P (because of the contrapositive equivalence) Thus, we prove: if s is a solution of x 2 + 3x – 18 = 0, then s is a multiple of 3.
10
Discussion #12 10/22 4. Contrapositive Proof: Example Prove: if s is a solution of x 2 + 3x – 18 = 0, then s is a multiple of 3. Proof: The solutions of x 2 + 3x – 18 = 0 are 3 and – 6. Both 3 and – 6 are multiples of 3. Thus, every solution s is a multiple of 3. Note: Using a contrapositive proof helps get rid of the not’s and makes the problem easier to understand indeed, the contrapositive turns this into a simple proof we can do exhaustively. Note: In the proof we make true statements. Recall: we can always make any true statement we wish in a proof.
11
Discussion #12 11/22 5. Proof by Contradiction Note: P P P F TT F T FT T F Thus, P F P. By substituting R S for P, we can prove R S by proving (R S) F. (R S) F ( R S) F implication R S F de Morgan’s law R S F double negation
12
Discussion #12 12/22 5. Proof by Contradiction (continued…) Thus, since R S F R S, from R S, we negate the conclusion, add it as a premise, and derive a contradiction, i.e. derive F. Any contradiction (e.g. P P) is equivalent to F, so deriving any contradiction is enough. BTW, in our project we will implement the semantics of Datalog by programming the computer to do a proof by contradiction.
13
Discussion #12 13/22 5. Proof by Contradiction: Example Prove: the empty set is unique. Since P ( P F), we can prove P F instead. i.e. We can prove: if the empty set is not unique, then there is a contradiction, or, in other words, assuming the empty set is not unique leads (deductively) to a contradiction. Proof: –Assume the empty set is not unique. –Then there are at least two empty sets 1 and 2 such that 1 2. –Since an empty set is a set and an empty set is a subset of every set, 1 2 and 2 1 and thus 1 = 2. –But now we now have 1 2 and 1 = 2 a contradiction.
14
Discussion #12 14/22 Informal Proofs in English vs. Formal Proofs Compare vs. 1.Empty set not uniqueassumed premise 2.Empty set not unique 1 and 2 exist 1 2 uniqueness definition 3. 1 and 2 exist 1 2 1&2, modus ponens 4. 1 2 3 simplification 5. 1 2 2 1 property of empty sets 6. 1 2 2 1 1 = 2 set equality definition 7. 1 = 2 5&6, modus ponens 8. 1 2 1 = 2 4&7 combination 9.F8 contradiction law (P P F) Assume the empty set is not unique. Then there are at least two empty sets 1 and 2 such that 1 2. Since an empty set is set and an empty set is a subset of every set, 1 2 and 2 1 and thus 1 = 2. But now we now have 1 2 and 1 = 2 a contradiction.
15
Discussion #12 15/22 6. Conditional Proof P (Q R) (P Q) R Much simpler form Simple implication extra premise Easy to remember: make lhs of conclusion a premise. PQR P (Q R) (P Q) R TTTTTTTT TTFFFTTF TFTTTTFT TFFTTTFT FTTTTTFT FTFTFTFT FFTTTTFT FFFTTTFT
16
Discussion #12 16/22 6. Conditional Proof: Example Prove: If A B and B C, then A C. If (x A) (x B) and (x B) (x C) then (x A) (x C) ((P Q) (Q R)) (P R) (P Q) (Q R) P R Proof: 1.Ppremise (assumed) 2.P Qpremise 3.Q1&2, modus ponens 4.Q Rpremise 5.R3&4, modus ponens
17
Discussion #12 17/22 6. Conditional Proof: Example Prove: If A B and B C, then A C. If (x A) (x B) and (x B) (x C) then (x A) (x C) ((P Q) (Q R)) (P R) (P Q) (Q R) P R Proof: 1.x A premise (assumed) 2.(x A) (x B) premise 3.x B 1&2, modus ponens 4.(x B) (x C) premise 5.x C 3&4, modus ponens Let x A. Then since (x A) (x B), x B. Thus, since x B and (x B) (x C), x C.
18
Discussion #12 18/22 6. Conditional Proof: Example Prove: If A B and B C, then A C. If (x A) (x B) and (x B) (x C) then (x A) (x C) ((P Q) (Q R)) (P R) (P Q) (Q R) P R Proof: 1.x A premise (assumed) 2.(x A) (x B) premise 3.x B 1&2, modus ponens 4.(x B) (x C) premise 5.x C 3&4, modus ponens Let x A. Then since A B, x B. Thus, since x B and B C, x C.
19
Discussion #12 19/22 7. Case Analysis P (Q P) ( Q P) PQ P (Q P) (Q(Q P) TTTTT FT TFTTT TT FTTFF FT FFTTF TF We can prove P by doing two proofs: (Q P) and ( Q P). And, we can choose any Q presumably one that’s helpful.
20
Discussion #12 20/22 7. Case Analysis: Example Prove: There are no even primes except 2. If n is a prime, then n=2 or n is odd. Now add cases: u (x y z)where u is n=2 u (x y z)where u is n 2 Now observe that we can use a conditional proof: u x y z if n=2 and n is prime, then n=2 or n is odd u x y z if n 2 and n is prime, then n=2 or n is odd x y z
21
Discussion #12 21/22 7. Case Analysis: Example Prove: If n is a prime, then n=2 or n is odd. Proof: Case 1: n=2: Since n=2, n=2 or n is odd holds. Case 2: n 2: Since n 2 and n is prime, n>2. Now n must be odd, for suppose that n is even, then n = 2k for some integer k>1. But then n is composite (not prime) a contradiction. Thus, n is odd and hence n=2 or n is odd holds. Subproof
22
Discussion #12 22/22 8. Proof by Induction To be continued….
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.