MATH 401: LOGIC & PROOF TECHNIQUES 
Dr. Nahid Sultana Email: nszakir@ud.edu.sa 
Chapter-3: DIRECT PROOF AND PROOF BY 
CONTRAPOSITIVE 
9/19/2014 
Copyright © Nahid Sultana, 2014-2015. 1
Topics 9/19/2014 
2 
 
Introduction 
 
Writing a Proof 
 
Trivial and Vacuous Proofs 
 
Direct Proofs 
 
Proof by Contrapositive 
 
Proof by Cases 
 
Proof Evaluations 
Copyright © Nahid Sultana, 2014-2015.
Introduction 9/19/2014 
3 
 
Lemma: is a mathematical result that is useful in verifying the truth of another result. 
 
Theorem/ Proposition: a true mathematical statement (that are especially significant) (Propositions are usually more important, and harder to prove than theorems.) 
 
Corollary: is a mathematical result that is a consequence of an earlier result. 
Note: Most lemmas, theorems, propositions and corollaries are stated as an implication. Copyright © Nahid Sultana, 2014-2015.
Writing a proof 9/19/2014 
4 
 
Write a proof so that somebody else can read it. 
 
Write complete sentences, starting with “Proof” and ending with 
“ ” to determine the length of the proof. 
 When introducing a new variable/symbol explain what the symbol is, and what set the variable belongs to. Copyright © Nahid Sultana, 2014-2015.
Writing a proof (Cont…) 9/19/2014 
5 
 
If your equation wraps around, then the equal sign goes at the end of the line, and not before the new line nor both within the text. For example, within the text use it like this ab = 4kl + 2k+2l+1= 
2(2kl + 2k +2l )+1. 
Or you may choose to center it: 
ab = 4kl + 2k+2l+1 
= 2(2kl + 2k +2l )+1. 
Copyright © Nahid Sultana, 2014-2015.
1. Trivial and Vacuous Proofs 9/19/2014 
6 
Most mathematical results are stated as an implication: P ⇒ Q. 
 
Consider P(x) and Q(x) be two open sentences. 
 
Then ∀x∈D, P(x) ⇒Q(x) can be expressed as a result or theorem: For x ∈ D, if P(x) then Q(x) or Let x ∈ D, if P(x) then Q(x) 
 
This result is true if P(x) ⇒ Q(x) is a true for all x ∈ D, 
 
and false if P(x) ⇒ Q(x) is false for at least one x ∈ D. 
 
Now if Q(x) is true for all x ∈ D or P(x) is false for all x ∈ D, then determining the truth of this theorem becomes easier. Copyright © Nahid Sultana, 2014-2015.
1. Trivial and Vacuous Proofs (Cont…) 9/19/2014 
7 
Definition: If Q(x) is true for all x ∈ D (regardless the truth value of P(x)). Then ∀x ∈ D, P(x) ⇒ Q(x) is a true statement. Such a proof is called a trivial proof. 
Definition: If P(x) is false for all x ∈ D (regardless the truth value of Q(x)). Then ∀x ∈ D, P(x) ⇒ Q(x) is a true statement. Such a proof is called a vacuous proof. Copyright © Nahid Sultana, 2014-2015.
1. Trivial and Vacuous Proofs (Cont…) 9/19/2014 
8 
Result 1.1: Let x ∈ ℝ. If x > 0, then x2 + 5 > 0. 
Proof: Here p(x): x > 0 and q(x): x2 + 5 > 0. Note that x2 + 5 > x2 ≥ 0 for all x ∈ ℝ. i.e. q(x) is true for all x ∈ ℝ regardless the truth value of P(x). Hence x2 + 5 > 0 is true trivially. 
Result 1.2: Let x ∈ℝ. If x2 + 1 < 0, then x5 ≥ 4. 
Proof: Here p(x): x2 + 1 < 0 and q(x): x5 ≥ 4. Note that x2 + 1 < x2 ≥ 0 for all x ∈ R. i.e. p(x): x2 + 1 < 0 is false for all x∈ R regardless the truth value of Q(x) . Hence the statement is true vacuously. Copyright © Nahid Sultana, 2014-2015.
1. Trivial and Vacuous Proofs (Cont…) 9/19/2014 
9 
Result 1.3: Let x ∈ ℝ. Prove that if 0 < x < 1, then x2 - 2x + 2 ≠ 0. 
Proof: Observe that x2 - 2x + 2 = (x2 - 2x + 1) + 1 = (x - 1)2 + 1 ≥ 1 for all x ∈ ℝ. Hence the statement is true trivially. 
Result 1.4: Let x ∈ ℝ, prove that if x3 - 5x -1≥ 0 then (x -1)(x -3) ≥ -2. 
Proof: Observe that (x - 1)(x - 3) ≥ -2 ⇒ x2 - 4x + 5 ≥ 0 ⇒ (x - 2)2 + 1 ≥ 0 This is true for all x ∈ ℝ, i.e. (x -1)(x -3) ≥ -2 is true for all x ∈ ℝ. Hence the statement is true trivially. Copyright © Nahid Sultana, 2014-2015.
1. Trivial and Vacuous Proofs (Cont…) 9/19/2014 
10 
Result 1.5: Let n ∈ ℕ, prove that if n + 1/n <2 then n2 + 1/ n2 <4. 
Proof: Observe that, 
n + 1/n < 2 
⇒(n2+1)/n <2 
⇒n2+1 < 2n 
⇒n2-2n+1 <0 
⇒(n-1)2<0 
This is false for all n ∈ℕ as (n-1)2 ≥0 for all n ∈ℕ. Thus the 
statement is true vacuously. Copyright © Nahid Sultana, 2014-2015.
2. Direct Proof 9/19/2014 
11 
Direct proof of P(x) ⇒ Q(x) for all x ∈ D: 
 
Assume that P(x) is true for an arbitrary x ∈ D, 
 
and show that Q(x) is true for this x. 
Properties of integers: In order to illustrate this type of proof we need to know the followings: 
 
The negative of an integer is an integer. 
 
The sum (and difference) of two integers is an integer. 
 
The product of two integers is an integer. 
 
An integer n is even if n = 2k for some integer k. 
 
An integer n is odd if n = 2k + 1 for some integer k. Copyright © Nahid Sultana, 2014-2015.
2. Direct Proof (Cont…) 9/19/2014 
12 
Result 2.1: If n is an odd integer, then 5n + 3 is an even integer. 
Proof: Assume that n is an odd integer. Then n = 2k + 1 for some k ∈ℤ. Thus, 5n + 3 = 5(2k+1)+3 = 10k+8 = 2(5k+4) = 2 l, where l=(5k+4) ∈ℤ It follows that 5n+3 is an even integer when n is an odd integer. Copyright © Nahid Sultana, 2014-2015.
2. Direct Proof (Cont…) 9/19/2014 
13 
Result 2.2: If n is an even integer, then (-5n-3) is odd. 
Proof: Assume that n is an even integer. Then n = 2k, for some k ∈ℤ. Thus, -5n-3 =-5(2k)-3 =-10k-3 =2(-5k-2)+1 = 2 l+1, where l=(-5k-2) ∈ℤ It follows that (-5n-3) is an odd integer when n is an even integers. Copyright © Nahid Sultana, 2014-2015.
2. Direct Proof (Cont…) 9/19/2014 
14 
Result 2.3: If n is an odd integer, then 4n3 + 2n − 1 is odd. 
Proof: Assume that n is odd. So n = 2k + 1, for some integer k. Thus 4n3 + 2n − 1 = 4(2k + 1)3 + 2(2k + 1) − 1 = 4(4k3 + 12k2 + 6k + 1) + 4k + 2 − 1 = 16k3 + 48k2 + 28k + 5 = 2(8k3 + 24k2 + 14k + 2) + 1 = 2 l+1, where l=8k3 + 24k2 + 14k + 2 ∈ℤ It follows that 4n3 + 2n − 1 is odd when n is an odd integer. Copyright © Nahid Sultana, 2014-2015.
2. Direct Proof (Cont…) 9/19/2014 
15 
Result 2.4: If a and c are odd integers then ab+bc is even 
Proof: Assume that a and c are odd integers. Then a= 2k+1 and c= 2l+1 for some k, l ∈ℤ. Now ab+bc = b(a+c) = b(2 k+1+ 2 l+1) = b(2 k+2 l +2) = 2 b (k+l+1) = 2 b m, where m=k+l+1∈ℤ It follows that ab+bc is an even integer when a and c are odd integers. Copyright © Nahid Sultana, 2014-2015.
2. Direct Proof (Cont…) 9/19/2014 
16 
Result 2.5: Let S={1,2,3} and let n ∈ S. If (n(n+3))/2 is even, then ((n+2)(n-5))/2 is even 
Proof: let n∈S such that (n(n+3))/2 is even. When n=1, (n(n+3))/2= 2 n=2, (n(n+3))/2= 5 n=3, (n(n+3))/2= 9 i.e. (n(n+3))/2 is even only when n=1. Now when n=1, then ((n+2)(n-5))/2=(3(-4))/2=-6, which is even. Therefore, the implication is true. Copyright © Nahid Sultana, 2014-2015.
3. Proof by Contrapositive 9/19/2014 
17 
 
A proof by contrapositive of P ⇒ Q is a direct proof of ~ Q ⇒ ~ P 
 
The contrapositive of P ⇒ Q is the implication ~ Q ⇒ ~ P. 
 
The implication P ⇒ Q and ~ Q ⇒ ~ P are logically equivalent: 
p 
q 
p →q 
~ q 
~ p 
~q → ~p 
T 
T 
T 
F 
F 
T 
T 
F 
F 
T 
F 
F 
F 
T 
T 
F 
T 
T 
F 
F 
T 
T 
T 
T Copyright © Nahid Sultana, 2014-2015.
3. Proof by Contrapositive (Cont…) 9/19/2014 
18 
Result 3.1: Let x ∈ ℤ. If 5x-7 is even, then x is odd. 
Proof: Assume that x is even. i.e. x = 2k , for some integer k. Now, 5x-7= 5(2 k) -7 = 10 k -7 = 2 (5 k - 4)+1 = 2 l+1, where l=5 k - 4 ∈ ℤ Hence 5x-7 is odd. Therefore the statement is true using the technique of proof by contrapositive. 
Note: We can also prove it using a direct proof as follows: Copyright © Nahid Sultana, 2014-2015.
3. Proof by Contrapositive (Cont…) 9/19/2014 
19 
Result 3.1: Let x ∈ ℤ. If 5x-7 is even, then x is odd. 
Proof: (Direct proof) Assume that 5x-7 is even. Then 5x-7 = 2k , for some integer k. Now, x = 5x-7-4x+7 = 2k-4x+7 = 2 (k-2x+3)+1 = 2 l+1, where l= k-2x+3 ∈ ℤ Hence x is odd. Therefore the statement is true using the technique of direct proof Copyright © Nahid Sultana, 2014-2015.
3. Proof by Contrapositive (Cont…) 9/19/2014 
20 
Result 3.2: Let x ∈ ℤ. Then 11x-7 is even iff x is odd. 
Proof: Assume that x is even. Then x = 2k for some k ∈ ℤ Now, 11 x-7 = 11(2k) -7 = 22 k-7 = 2 (11 k -4) +1 = 2 l+1, where l=11 k -4 ∈ ℤ Hence 11x-7 is odd. Therefore if 11x-7 is even then x is odd is true by the technique of proof by contraposiive. Continue on next slide ⇒ 
Proof strategy : There are two implications to prove here: 
1) 
If 11x -7 is even, then x is odd. 
2) 
If x is odd, then 11x-7 is even. Copyright © Nahid Sultana, 2014-2015.
3. Proof by Contrapositive (Cont…) 9/19/2014 
21 
For the converse, assume that x is odd. Then x = 2m+1 for some m ∈ ℤ . Now, 11 x-7 = 11(2m+1) -7 = 22 m+11-7 = 22 m+4 = 2(11m+2) = 2 n, where n=11m+2 ∈ ℤ Hence 11x-7 is even. Therefore if x is odd then 11x-7 is even is true by the technique of direct proof. Copyright © Nahid Sultana, 2014-2015.
3. Proof by Contrapositive (Cont…) 9/19/2014 
22 
Result 3.3: Let x ∈ ℤ. Then x2 is even iff x is even. 
Proof: Assume that x is odd. Then x = 2k+1 for some k ∈ ℤ . Now, x2 = (2k+1)2 = 4 k2 +4 k+1 = 2 (2 k2 +2 k) +1 = 2 l+1, where l= 2 k2 +2 k ∈ ℤ Hence x2 is odd. Therefore if x2 is even then x is even is true by the technique of proof by contraposiive. For the converse, assume that x is even. Then x=2m for some m∈ ℤ . Now, x2 = (2m)2 = 4 m2 = 2 (2 m2) = 2 n, where n= 2 m2∈ ℤ Hence x2 is even. Therefore if x is even then x2 is even is true by the technique of direct proof. Copyright © Nahid Sultana, 2014-2015.
3. Proof by Contrapositive (Cont…) 9/19/2014 
23 
Problem 3.4: Let x ∈ ℤ . Use a lemma to prove that if 5x-7 is odd then 9x+2 is even. 
Proof strategy: Here the hypothesis is 5x-7 is odd, i.e 5x-7 = 2k+1 for some k ∈ ℤ . Now, x = 5x-7-4x+7 = 2k+1-4x+7 = 2 (k -2x+4) = 2 l, where l= k -2x+4 ∈ ℤ Hence x is even. Therefore we have the following lemma: Lemma: Let x ∈ ℤ. If 5x-7 is odd then x is even. Proof: Assume that 5x-7 is odd. Then using the above lemma x is even. i.e. x=2l for some l∈ ℤ . Now, 9x+2 = 9(2l)+2 = 2(9l+1)=2m, where m= 9l+1∈ ℤ . Hence 9x+2 is even. Copyright © Nahid Sultana, 2014-2015.
4. Proof by Cases 9/19/2014 
24 
Result 4.1: Let n ∈ ℤ . Then n2+3n+5 is an odd integer. 
Proof strategy: Here we have two possible case: 1) n is even ; 2) n is odd Proof: 
Case 1: n is even 
i.e. n=2k for some k∈ ℤ . 
Then n2+3n+5= (2k)2+3(2k)+5 
= 4k2+6k+5 
= 2(2k2+3k+2)+1 
= 2m+1, 
where m= 2k2+3k+2∈ ℤ . 
Hence n2+3n+5 is odd. 
Case 2: n is odd 
i.e. n=2k+1 for some k∈ ℤ . 
Then, n2+3n+5= (2k+1)2+3(2k+1)+5 
= 4k2+4k+1+6k+3+5 
= 4k2+10k+9 
= 2(2k2+5k+4)+1 
= 2n+1 
where n= 2k2+5k+4∈ ℤ . 
Hence n2+3n+5 is odd. Copyright © Nahid Sultana, 2014-2015.
4. Proof by Cases (Cont…) 9/19/2014 
25 
Note: The result must be true for all the possible cases. If it fails for one case, then the result is false. 
 
Ex1: Case 1. n is even Case 2. n is odd 
 
Ex2: Case 1. n > 0 Case 2. n = 0 Case 3. n < 0 
 
Ex3: We can have a combination of x and y Case 1. xy < 0 Subcase 1.1. x > 0 and y < 0 Subcase 1.2. x < 0 and y > 0 Case 2. xy = 0 Then x = 0 or y = 0. Case 3. xy > 0 Subcase 3.1. x > 0 and y > 0 Subcase 3.2. x < 0 and y < 0 Copyright © Nahid Sultana, 2014-2015. 
What are the typical cases?
4. Proof by Cases (Cont…) 9/19/2014 
26 
Definition: Two integers x and y are of the same parity if x and y are both even or both odd. 
Definition: Two integers x and y are of opposite parity if x is even and y is odd, or x is odd and y is even. Copyright © Nahid Sultana, 2014-2015.
4. Proof by Cases (Cont…) 9/19/2014 
27 
Proof: Assume that x and y are of the same parity. Consider two cases. Case 1- x and y both even. Then x = 2k, y = 2l for some k, l ∈ Z. So, x +y = 2k+2l = 2(k+l) = 2a, where a=k + l ∈ Z Therefore, x + y is even. Case 2- x and y both odd. Then x = 2k + 1, y = 2l + 1, for some k, l ∈ Z. So, x + y = 2k + 1 + 2l + 1 = 2(k +l + 1) = 2b, where b=k + l+1 ∈ Z. Therefore, 3x + 3y is even. Continue on next slide ⇒ 
Result 4.1: Let x, y ∈ Z. Then x and y are of the same parity iff 
x + y is an even. 
Proof strategy: There are two implications to prove here: 
1) 
If x and y are of the same parity then x + y is an even. 
2) 
If x + y is an even then x and y are of the same parity. Copyright © Nahid Sultana, 2014-2015.
4. Proof by Cases (Cont…) 9/19/2014 
28 
Case 1- x is even and y is odd. Then x = 2k, y = 2l + 1, for some k, l ∈ Z. 
So, x + y = 2k + 2l + 1 = 2(k +l ) + 1= 2 a + 1, where a = k + l ∈ Z 
Hence x + y is odd. 
Case 2- x is odd and y is even. 
Then x = 2k + 1, y = 2l, for some k, l ∈ Z. 
So, x + y = 2k + 1 + 2l = 2(k + l) + 1= 2 b+1, where b=k + l+1 ∈ Z. 
Hence x + y is odd. Therefore, x + y is an odd integer. 
We use the phrase without loss of generality (WLOG) to indicate that the 
proofs of the two situations are similar, so the proof of only one of these is needed. For example the converse of the above proof can be done as follows: 
For the converse, assume that x and y are of opposite parity. Without loss of generality (WLOG), assume that x is even and y is odd, then 
x = 2k and y = 2l + 1, for some k, l ∈ Z. 
So, x + y = 2k + 2l + 1 = 2(k +l ) + 1= 2 a + 1, where a = k + l ∈ Z 
Hence x + y is odd. 
Copyright © Nahid Sultana, 2014-2015. 
For the converse, assume that x and y are of opposite parity. Consider two cases.

Chapter-3: DIRECT PROOF AND PROOF BY CONTRAPOSITIVE

  • 1.
    MATH 401: LOGIC& PROOF TECHNIQUES Dr. Nahid Sultana Email: nszakir@ud.edu.sa Chapter-3: DIRECT PROOF AND PROOF BY CONTRAPOSITIVE 9/19/2014 Copyright © Nahid Sultana, 2014-2015. 1
  • 2.
    Topics 9/19/2014 2  Introduction  Writing a Proof  Trivial and Vacuous Proofs  Direct Proofs  Proof by Contrapositive  Proof by Cases  Proof Evaluations Copyright © Nahid Sultana, 2014-2015.
  • 3.
    Introduction 9/19/2014 3  Lemma: is a mathematical result that is useful in verifying the truth of another result.  Theorem/ Proposition: a true mathematical statement (that are especially significant) (Propositions are usually more important, and harder to prove than theorems.)  Corollary: is a mathematical result that is a consequence of an earlier result. Note: Most lemmas, theorems, propositions and corollaries are stated as an implication. Copyright © Nahid Sultana, 2014-2015.
  • 4.
    Writing a proof9/19/2014 4  Write a proof so that somebody else can read it.  Write complete sentences, starting with “Proof” and ending with “ ” to determine the length of the proof.  When introducing a new variable/symbol explain what the symbol is, and what set the variable belongs to. Copyright © Nahid Sultana, 2014-2015.
  • 5.
    Writing a proof(Cont…) 9/19/2014 5  If your equation wraps around, then the equal sign goes at the end of the line, and not before the new line nor both within the text. For example, within the text use it like this ab = 4kl + 2k+2l+1= 2(2kl + 2k +2l )+1. Or you may choose to center it: ab = 4kl + 2k+2l+1 = 2(2kl + 2k +2l )+1. Copyright © Nahid Sultana, 2014-2015.
  • 6.
    1. Trivial andVacuous Proofs 9/19/2014 6 Most mathematical results are stated as an implication: P ⇒ Q.  Consider P(x) and Q(x) be two open sentences.  Then ∀x∈D, P(x) ⇒Q(x) can be expressed as a result or theorem: For x ∈ D, if P(x) then Q(x) or Let x ∈ D, if P(x) then Q(x)  This result is true if P(x) ⇒ Q(x) is a true for all x ∈ D,  and false if P(x) ⇒ Q(x) is false for at least one x ∈ D.  Now if Q(x) is true for all x ∈ D or P(x) is false for all x ∈ D, then determining the truth of this theorem becomes easier. Copyright © Nahid Sultana, 2014-2015.
  • 7.
    1. Trivial andVacuous Proofs (Cont…) 9/19/2014 7 Definition: If Q(x) is true for all x ∈ D (regardless the truth value of P(x)). Then ∀x ∈ D, P(x) ⇒ Q(x) is a true statement. Such a proof is called a trivial proof. Definition: If P(x) is false for all x ∈ D (regardless the truth value of Q(x)). Then ∀x ∈ D, P(x) ⇒ Q(x) is a true statement. Such a proof is called a vacuous proof. Copyright © Nahid Sultana, 2014-2015.
  • 8.
    1. Trivial andVacuous Proofs (Cont…) 9/19/2014 8 Result 1.1: Let x ∈ ℝ. If x > 0, then x2 + 5 > 0. Proof: Here p(x): x > 0 and q(x): x2 + 5 > 0. Note that x2 + 5 > x2 ≥ 0 for all x ∈ ℝ. i.e. q(x) is true for all x ∈ ℝ regardless the truth value of P(x). Hence x2 + 5 > 0 is true trivially. Result 1.2: Let x ∈ℝ. If x2 + 1 < 0, then x5 ≥ 4. Proof: Here p(x): x2 + 1 < 0 and q(x): x5 ≥ 4. Note that x2 + 1 < x2 ≥ 0 for all x ∈ R. i.e. p(x): x2 + 1 < 0 is false for all x∈ R regardless the truth value of Q(x) . Hence the statement is true vacuously. Copyright © Nahid Sultana, 2014-2015.
  • 9.
    1. Trivial andVacuous Proofs (Cont…) 9/19/2014 9 Result 1.3: Let x ∈ ℝ. Prove that if 0 < x < 1, then x2 - 2x + 2 ≠ 0. Proof: Observe that x2 - 2x + 2 = (x2 - 2x + 1) + 1 = (x - 1)2 + 1 ≥ 1 for all x ∈ ℝ. Hence the statement is true trivially. Result 1.4: Let x ∈ ℝ, prove that if x3 - 5x -1≥ 0 then (x -1)(x -3) ≥ -2. Proof: Observe that (x - 1)(x - 3) ≥ -2 ⇒ x2 - 4x + 5 ≥ 0 ⇒ (x - 2)2 + 1 ≥ 0 This is true for all x ∈ ℝ, i.e. (x -1)(x -3) ≥ -2 is true for all x ∈ ℝ. Hence the statement is true trivially. Copyright © Nahid Sultana, 2014-2015.
  • 10.
    1. Trivial andVacuous Proofs (Cont…) 9/19/2014 10 Result 1.5: Let n ∈ ℕ, prove that if n + 1/n <2 then n2 + 1/ n2 <4. Proof: Observe that, n + 1/n < 2 ⇒(n2+1)/n <2 ⇒n2+1 < 2n ⇒n2-2n+1 <0 ⇒(n-1)2<0 This is false for all n ∈ℕ as (n-1)2 ≥0 for all n ∈ℕ. Thus the statement is true vacuously. Copyright © Nahid Sultana, 2014-2015.
  • 11.
    2. Direct Proof9/19/2014 11 Direct proof of P(x) ⇒ Q(x) for all x ∈ D:  Assume that P(x) is true for an arbitrary x ∈ D,  and show that Q(x) is true for this x. Properties of integers: In order to illustrate this type of proof we need to know the followings:  The negative of an integer is an integer.  The sum (and difference) of two integers is an integer.  The product of two integers is an integer.  An integer n is even if n = 2k for some integer k.  An integer n is odd if n = 2k + 1 for some integer k. Copyright © Nahid Sultana, 2014-2015.
  • 12.
    2. Direct Proof(Cont…) 9/19/2014 12 Result 2.1: If n is an odd integer, then 5n + 3 is an even integer. Proof: Assume that n is an odd integer. Then n = 2k + 1 for some k ∈ℤ. Thus, 5n + 3 = 5(2k+1)+3 = 10k+8 = 2(5k+4) = 2 l, where l=(5k+4) ∈ℤ It follows that 5n+3 is an even integer when n is an odd integer. Copyright © Nahid Sultana, 2014-2015.
  • 13.
    2. Direct Proof(Cont…) 9/19/2014 13 Result 2.2: If n is an even integer, then (-5n-3) is odd. Proof: Assume that n is an even integer. Then n = 2k, for some k ∈ℤ. Thus, -5n-3 =-5(2k)-3 =-10k-3 =2(-5k-2)+1 = 2 l+1, where l=(-5k-2) ∈ℤ It follows that (-5n-3) is an odd integer when n is an even integers. Copyright © Nahid Sultana, 2014-2015.
  • 14.
    2. Direct Proof(Cont…) 9/19/2014 14 Result 2.3: If n is an odd integer, then 4n3 + 2n − 1 is odd. Proof: Assume that n is odd. So n = 2k + 1, for some integer k. Thus 4n3 + 2n − 1 = 4(2k + 1)3 + 2(2k + 1) − 1 = 4(4k3 + 12k2 + 6k + 1) + 4k + 2 − 1 = 16k3 + 48k2 + 28k + 5 = 2(8k3 + 24k2 + 14k + 2) + 1 = 2 l+1, where l=8k3 + 24k2 + 14k + 2 ∈ℤ It follows that 4n3 + 2n − 1 is odd when n is an odd integer. Copyright © Nahid Sultana, 2014-2015.
  • 15.
    2. Direct Proof(Cont…) 9/19/2014 15 Result 2.4: If a and c are odd integers then ab+bc is even Proof: Assume that a and c are odd integers. Then a= 2k+1 and c= 2l+1 for some k, l ∈ℤ. Now ab+bc = b(a+c) = b(2 k+1+ 2 l+1) = b(2 k+2 l +2) = 2 b (k+l+1) = 2 b m, where m=k+l+1∈ℤ It follows that ab+bc is an even integer when a and c are odd integers. Copyright © Nahid Sultana, 2014-2015.
  • 16.
    2. Direct Proof(Cont…) 9/19/2014 16 Result 2.5: Let S={1,2,3} and let n ∈ S. If (n(n+3))/2 is even, then ((n+2)(n-5))/2 is even Proof: let n∈S such that (n(n+3))/2 is even. When n=1, (n(n+3))/2= 2 n=2, (n(n+3))/2= 5 n=3, (n(n+3))/2= 9 i.e. (n(n+3))/2 is even only when n=1. Now when n=1, then ((n+2)(n-5))/2=(3(-4))/2=-6, which is even. Therefore, the implication is true. Copyright © Nahid Sultana, 2014-2015.
  • 17.
    3. Proof byContrapositive 9/19/2014 17  A proof by contrapositive of P ⇒ Q is a direct proof of ~ Q ⇒ ~ P  The contrapositive of P ⇒ Q is the implication ~ Q ⇒ ~ P.  The implication P ⇒ Q and ~ Q ⇒ ~ P are logically equivalent: p q p →q ~ q ~ p ~q → ~p T T T F F T T F F T F F F T T F T T F F T T T T Copyright © Nahid Sultana, 2014-2015.
  • 18.
    3. Proof byContrapositive (Cont…) 9/19/2014 18 Result 3.1: Let x ∈ ℤ. If 5x-7 is even, then x is odd. Proof: Assume that x is even. i.e. x = 2k , for some integer k. Now, 5x-7= 5(2 k) -7 = 10 k -7 = 2 (5 k - 4)+1 = 2 l+1, where l=5 k - 4 ∈ ℤ Hence 5x-7 is odd. Therefore the statement is true using the technique of proof by contrapositive. Note: We can also prove it using a direct proof as follows: Copyright © Nahid Sultana, 2014-2015.
  • 19.
    3. Proof byContrapositive (Cont…) 9/19/2014 19 Result 3.1: Let x ∈ ℤ. If 5x-7 is even, then x is odd. Proof: (Direct proof) Assume that 5x-7 is even. Then 5x-7 = 2k , for some integer k. Now, x = 5x-7-4x+7 = 2k-4x+7 = 2 (k-2x+3)+1 = 2 l+1, where l= k-2x+3 ∈ ℤ Hence x is odd. Therefore the statement is true using the technique of direct proof Copyright © Nahid Sultana, 2014-2015.
  • 20.
    3. Proof byContrapositive (Cont…) 9/19/2014 20 Result 3.2: Let x ∈ ℤ. Then 11x-7 is even iff x is odd. Proof: Assume that x is even. Then x = 2k for some k ∈ ℤ Now, 11 x-7 = 11(2k) -7 = 22 k-7 = 2 (11 k -4) +1 = 2 l+1, where l=11 k -4 ∈ ℤ Hence 11x-7 is odd. Therefore if 11x-7 is even then x is odd is true by the technique of proof by contraposiive. Continue on next slide ⇒ Proof strategy : There are two implications to prove here: 1) If 11x -7 is even, then x is odd. 2) If x is odd, then 11x-7 is even. Copyright © Nahid Sultana, 2014-2015.
  • 21.
    3. Proof byContrapositive (Cont…) 9/19/2014 21 For the converse, assume that x is odd. Then x = 2m+1 for some m ∈ ℤ . Now, 11 x-7 = 11(2m+1) -7 = 22 m+11-7 = 22 m+4 = 2(11m+2) = 2 n, where n=11m+2 ∈ ℤ Hence 11x-7 is even. Therefore if x is odd then 11x-7 is even is true by the technique of direct proof. Copyright © Nahid Sultana, 2014-2015.
  • 22.
    3. Proof byContrapositive (Cont…) 9/19/2014 22 Result 3.3: Let x ∈ ℤ. Then x2 is even iff x is even. Proof: Assume that x is odd. Then x = 2k+1 for some k ∈ ℤ . Now, x2 = (2k+1)2 = 4 k2 +4 k+1 = 2 (2 k2 +2 k) +1 = 2 l+1, where l= 2 k2 +2 k ∈ ℤ Hence x2 is odd. Therefore if x2 is even then x is even is true by the technique of proof by contraposiive. For the converse, assume that x is even. Then x=2m for some m∈ ℤ . Now, x2 = (2m)2 = 4 m2 = 2 (2 m2) = 2 n, where n= 2 m2∈ ℤ Hence x2 is even. Therefore if x is even then x2 is even is true by the technique of direct proof. Copyright © Nahid Sultana, 2014-2015.
  • 23.
    3. Proof byContrapositive (Cont…) 9/19/2014 23 Problem 3.4: Let x ∈ ℤ . Use a lemma to prove that if 5x-7 is odd then 9x+2 is even. Proof strategy: Here the hypothesis is 5x-7 is odd, i.e 5x-7 = 2k+1 for some k ∈ ℤ . Now, x = 5x-7-4x+7 = 2k+1-4x+7 = 2 (k -2x+4) = 2 l, where l= k -2x+4 ∈ ℤ Hence x is even. Therefore we have the following lemma: Lemma: Let x ∈ ℤ. If 5x-7 is odd then x is even. Proof: Assume that 5x-7 is odd. Then using the above lemma x is even. i.e. x=2l for some l∈ ℤ . Now, 9x+2 = 9(2l)+2 = 2(9l+1)=2m, where m= 9l+1∈ ℤ . Hence 9x+2 is even. Copyright © Nahid Sultana, 2014-2015.
  • 24.
    4. Proof byCases 9/19/2014 24 Result 4.1: Let n ∈ ℤ . Then n2+3n+5 is an odd integer. Proof strategy: Here we have two possible case: 1) n is even ; 2) n is odd Proof: Case 1: n is even i.e. n=2k for some k∈ ℤ . Then n2+3n+5= (2k)2+3(2k)+5 = 4k2+6k+5 = 2(2k2+3k+2)+1 = 2m+1, where m= 2k2+3k+2∈ ℤ . Hence n2+3n+5 is odd. Case 2: n is odd i.e. n=2k+1 for some k∈ ℤ . Then, n2+3n+5= (2k+1)2+3(2k+1)+5 = 4k2+4k+1+6k+3+5 = 4k2+10k+9 = 2(2k2+5k+4)+1 = 2n+1 where n= 2k2+5k+4∈ ℤ . Hence n2+3n+5 is odd. Copyright © Nahid Sultana, 2014-2015.
  • 25.
    4. Proof byCases (Cont…) 9/19/2014 25 Note: The result must be true for all the possible cases. If it fails for one case, then the result is false.  Ex1: Case 1. n is even Case 2. n is odd  Ex2: Case 1. n > 0 Case 2. n = 0 Case 3. n < 0  Ex3: We can have a combination of x and y Case 1. xy < 0 Subcase 1.1. x > 0 and y < 0 Subcase 1.2. x < 0 and y > 0 Case 2. xy = 0 Then x = 0 or y = 0. Case 3. xy > 0 Subcase 3.1. x > 0 and y > 0 Subcase 3.2. x < 0 and y < 0 Copyright © Nahid Sultana, 2014-2015. What are the typical cases?
  • 26.
    4. Proof byCases (Cont…) 9/19/2014 26 Definition: Two integers x and y are of the same parity if x and y are both even or both odd. Definition: Two integers x and y are of opposite parity if x is even and y is odd, or x is odd and y is even. Copyright © Nahid Sultana, 2014-2015.
  • 27.
    4. Proof byCases (Cont…) 9/19/2014 27 Proof: Assume that x and y are of the same parity. Consider two cases. Case 1- x and y both even. Then x = 2k, y = 2l for some k, l ∈ Z. So, x +y = 2k+2l = 2(k+l) = 2a, where a=k + l ∈ Z Therefore, x + y is even. Case 2- x and y both odd. Then x = 2k + 1, y = 2l + 1, for some k, l ∈ Z. So, x + y = 2k + 1 + 2l + 1 = 2(k +l + 1) = 2b, where b=k + l+1 ∈ Z. Therefore, 3x + 3y is even. Continue on next slide ⇒ Result 4.1: Let x, y ∈ Z. Then x and y are of the same parity iff x + y is an even. Proof strategy: There are two implications to prove here: 1) If x and y are of the same parity then x + y is an even. 2) If x + y is an even then x and y are of the same parity. Copyright © Nahid Sultana, 2014-2015.
  • 28.
    4. Proof byCases (Cont…) 9/19/2014 28 Case 1- x is even and y is odd. Then x = 2k, y = 2l + 1, for some k, l ∈ Z. So, x + y = 2k + 2l + 1 = 2(k +l ) + 1= 2 a + 1, where a = k + l ∈ Z Hence x + y is odd. Case 2- x is odd and y is even. Then x = 2k + 1, y = 2l, for some k, l ∈ Z. So, x + y = 2k + 1 + 2l = 2(k + l) + 1= 2 b+1, where b=k + l+1 ∈ Z. Hence x + y is odd. Therefore, x + y is an odd integer. We use the phrase without loss of generality (WLOG) to indicate that the proofs of the two situations are similar, so the proof of only one of these is needed. For example the converse of the above proof can be done as follows: For the converse, assume that x and y are of opposite parity. Without loss of generality (WLOG), assume that x is even and y is odd, then x = 2k and y = 2l + 1, for some k, l ∈ Z. So, x + y = 2k + 2l + 1 = 2(k +l ) + 1= 2 a + 1, where a = k + l ∈ Z Hence x + y is odd. Copyright © Nahid Sultana, 2014-2015. For the converse, assume that x and y are of opposite parity. Consider two cases.