Proof Terminology Proof Techniques (Rosen, Sections 1.7 1.8) TOPICS Direct Proofs Proof by Contrapositive Proof by Contradiction Proof by Cases Theorem: statement that can be shown to be true Proof: a valid argument that establishes the truth of a theorem Axioms: statements we assume to be true Lemma: a less important theorem that is helpful in the proof of other results Corollary: theorem that can be established directly from a theorem that has been proved Conjecture: statement that is being proposed to be a true statement 2 Learning objectives Technique #1: Direct Proof Direct proofs Proof by contrapositive Proof by contradiction Proof by cases Direct Proof: First step is to clearly state the premise Subsequent steps use rules of inference or other premises Last step proves the conclusion 3 4
Direct Proof Example More formal version Prove If n is an odd integer, then n 2 is odd. If n is odd, then n = 2k+1 for some integer k. n 2 = (2k+1) 2 = 4k 2 + 4k +1 Therefore, n 2 = 2(2k 2 + 2k) + 1, which is odd. 2 * any # even Add 1 to any even # odd # 5 6 Class Exercise Prove: If n is an even integer, then n 2 is even. Tips: If n is even, then n = 2k for some integer k. If n is odd, then n = 2k+1 for some integer k. To use substitution: n 2 = (2k) 2 We prove this by using algebra to either simplify the expression back down to an even or odd definition, in this case n = 2(2k 2 ), which is even. 1. E(n) E(n 2 ) Premise 2. n = 2k Even definition 3. n 2 = (2k) 2 Substitution 4. = 4k 2 Algebra 5. = 2(2k 2 ) Algebra 6. E( 2(2k 2 ) ) = true Even definition 7. n 2 is even Proves Hypothesis 7 8
Class Exercise Prove: If x is even and y is odd, then x * y is even Tips: When doing substitution, you have to use different variables for x and y to show that they can be different numbers. 1. E(x) ^ O(y) E(x*y) Premise 2. x = 2k, y = 2j + 1 Even definition and Odd Definition 3. 2k * (2j + 1) Substitution 4. 4kj + 2k Algebra 5. E ( (2(2kj + k) ) = true Even Definition 6. E(x*y) Proves Hypothesis 9 10 Technique #2: Proof by Contrapositive Proof by Contrapositive A direct proof, but starting with the contrapositive equivalence: p q q p If you are asked to prove p q,, you instead prove q p! Why? Sometimes, it may be easier to directly prove q p then p q p q p q p q q p T T F F T T T F F T F F F T T F T T F F T T T T 11 Logically Equivalent! So if we prove the contradiction, we have proven the hypothesis too! 12
Proof by Contrapositive Example More formal version Prove: If n 2 is an even integer, then n is even. (n 2 even) (n even) By the contrapositive: This is the same as showing that (n even) (n 2 even) If n is odd, then n 2 is odd. (proved on slides 5 and 6) Since we have proved the contrapositive: (n even) (n 2 even) We have also proved the original hypothesis: (n 2 even) (n even) 13 14 Class Exercise Prove: if x multiplied by y is an even, then x is even or y is even Tips: You will need to use DeMorgan s Law for this Will need 10 steps for this problem so add a few more to the bottom. 1. E(x * y) E(x) v E(y) Premise 2. (E(x) v E(y)) E(x * y) Contrapositive Proof 3. E(x) ^ E(y) E(x * y) DeMorgan s Law 4. O(x) ^ O(y) O(x * y) Even == Odd 5. x = 2k+1, y = 2j + 1 Odd Definition 6. (2k + 1) * (2j + 1) Substitution 7. 4kj + 2k + 2j + 1 Algebra 8. 2(2kj + k + j) + 1 Algebra 9. O(2(2kj + k + j) + 1 ) = true Odd Definition 15 10. 2(k+j) +1 is odd Proves Contrapositive 16
Class Exercise Prove: If 5x-7 is even, then x is odd Tips: You NEED to simplify to the odd or even definition. So your last expression should always be either: 2(something) for even 2(something) + 1 for odd Think about how the following algebraic transformation will help you achieve that: 7 == 6 + 1 or -7 == -8 + 1 1. E(5x-7) O(x) Premise 2. O(x) E(5x - 7) Contrapositive Proof 3. E(x) O(5x - 7) Even == Odd, Odd == Even 4. x = 2k Even definition 5. 5(2k) -7 Substitution 6. 10k - 8 + 1 Algebra 7. 2(5k - 4) + 1 Algebra 8. odd(2(5k - 4) + 1) = true Odd Definition 9. odd(5x - 7) = true Proves Contrapositive 17 18 Technique #3: Proof by Contradiction Proof by Contradiction: The Mechanics Prove: If p then q. Proof strategy: -Assume p and the negation of q. -In other words, assume that p q is true. -Then arrive at a contradiction p p (or something that contradicts a known fact). -Since this cannot happen, our assumption must be wrong, thus, q is false. q is true. 19 20
Proof by Contradiction Example More Formal Version Prove: If (3n+2) is odd, then n is odd. Proof: -Given: (3n+2) is odd. -Assume that n is not odd, that is n is even. -If n is even, there is some integer k such that n=2k. -(3n+2) = (3(2k)+2)=6k+2 = 2(3k+1), which is 2 times a number. -Thus 3n+2 turned out to be even, but we know it s odd. -This is a contradiction. Our assumption was wrong. -Thus, n must be odd. 21 22 Class Exercise Work on the following exercise: if n 3 + 5 is odd, then n is even Tips: - For the algebraic portion of the proof - I need enough detail that I know that you know how to simplify the expression down to the even or odd definition. 23 1. O(n 3 + 5) E(n) Premise 2. O(n 3 + 5) ^ E(n) Contradiction 3. 4. 5. 6. 7. 8. 9. 10. O(n 3 + 5) ^ O(n) n = 2k + 1 Even == Odd Odd definition (2k + 1) 3 + 5 Substitution (4k 2 +4k + 1)(2k+1) + 5 Algebra 8k 3 + 8k 2 + 6k + 1 + 5 8k 3 + 8k 2 + 6k + 6 Even ( 2(4k 3 + 4k 2 + 3k + 3)) = true O(n 3 + 5) = false Algebra Algebra Even Definition Disproves Contradiction and therefore proves Hypothesis 24
Technique #4: Proof by Cases Proof by Cases Example Given a problem of the form: (p 1 p 2 p n ) q where p 1, p 2, p n are the cases p q This is equivalent to the following: [(p 1 q) (p 2 q) (p n q)] So prove all the clauses are true. Prove: If n is an integer, then n 2 n (n = 0 n 1 n -1) n 2 n Show for all the three cases, i.e., (n = 0 n 2 n) p (n q 1 n 2 n) (n -1 n 2 n) 25 26 Proof by Cases (cont d) Proof by Cases (cont d) Case 1: Show that n = 0 n 2 n - When n=0, n 2 = 0. - 0 0 p q Case 2: Show that n 1 n 2 n - Multiply both sides of the inequality by n - We get n 2 n Case 3: Show that n -1 n 2 n Given n -1, We know that n 2 cannot be negative, i.e., n 2 > 0 We know that 0 > -1p q Thus, n 2 > -1. We also know that -1 n (given) Therefore, n 2 n 27 28