Proof methods
We will discuss six proof methods:
1. Direct proofs
2. Proof by cases
3. Indirect proofs
4. The Bi-conditional
5. Proof by contradiction
6. Counterexamples
111
Definition even and odd numbers
We call n is even if n is divisible by 2
i.e., n = 2*m for some integer m
n= 2 n = 2.1
n = 4 n = 2.2
….
….
N is odd if n is not divisible by 2
i.e., n = 2*m +1 for some integer m
n = 3 n = 2.1 + 1
n = 5 n = 2.2 + 1
….
….
112
Proving Theorems
Direct proof:
An implication p q can be proved by showing that
if p is true, then q is also true.
Example: Give a direct proof of the theorem
“If n is odd, then n2 is odd.”
Idea: Assume that the hypothesis of this implication
is true (n is odd). Then use rules of inference and
known theorems of math to show that q must also be
true (n2 is odd).
Fall 2020 CSE 173 - Discrete Mathematics 113
Proving Theorems
n is odd.
Then n = 2k + 1, where k is an integer.
Consequently, n2 = (2k + 1)2.
= 4k2 + 4k + 1
= 2(2k2 + 2k) + 1
= 2m + 1
Since n2 can be written in this form, it is odd.
Fall 2020 CSE 173 - Discrete Mathematics 114
Proving Theorems
Direct proof:
An implication p q can be proved by showing that if
p is true, then q is also true.
Example: Give a direct proof of the theorem
Show that the square of an even number is an
even number
Rephrased: if n is even, then n2 is even
Idea: Assume that the hypothesis of this implication is
true (n is even). Then use rules of inference and
known theorems of math to show that q must also be
true (n2 is even).
Fall 2020 CSE 173 - Discrete Mathematics 115
Proving Theorems
n is even.
Then n = 2k, where k is an integer.
Consequently, n2 = (2k)2.
= 4k2
= 2(2k2)
= 2m
Since n2 can be written in this form, it is even.
Fall 2020 CSE 173 - Discrete Mathematics 116
Proving Theorems
Direct proof:
An implication p q can be proved by showing that if
p is true, then q is also true.
Example: Give a direct proof of the theorem
For all integers x and y, if x, y are both odd, then x
+ y is even
Idea: Assume that the hypothesis of this implication is
true (x, y are both odd). Then use rules of inference
and known theorems of math to show that q must also
be true (x + y is even).
Fall 2020 CSE 173 - Discrete Mathematics 117
Proving Theorems
x and y are odd.
Then x = 2k+1, and y = 2m +1 where k, m integers.
Consequently, x + y = 2k+1 + 2m +1.
= 2k + 2m + 2
= 2(k+m+1)
= 2p
Since x + y can be written in this form, it is even.
Fall 2020 CSE 173 - Discrete Mathematics 118
Proving Theorems
Direct proof:
An implication p q can be proved by showing that if
p is true, then q is also true.
Example: Give a direct proof of the theorem
For all integers x and y, if x, y are both odd, then
x.y is also odd
Idea: Assume that the hypothesis of this implication is
true (x, y are both odd). Then use rules of inference
and known theorems of math to show that q must also
be true (x.y is odd).
Fall 2020 CSE 173 - Discrete Mathematics 119
Proving Theorems
x and y are odd.
Then x = 2k+1, and y = 2m +1 where k, m integers.
Consequently, x.y = (2k+1).(2m +1)
= 2km + 2k + 2m + 1
= 2(km+k+m) +1
= 2p + 1
Since x.y can be written in this form, it is odd.
Fall 2020 CSE 173 - Discrete Mathematics 120
Proof methods
We will discuss six proof methods:
1. Direct proofs
2. Proof by cases
3. Indirect proofs
4. The Bi-conditional
5. Proof by contradiction
6. Counterexamples
121
Proving Theorems
Direct proof using cases:
Example: If q is not divisible by 3 then q2 mod 3 = 1
Idea: Assume that the hypothesis of this implication is
true (q is not divisible by 3). Then you will see there
could be 2 cases. Use rules of inference and known
theorems of math to show that q2 mod 3 = 1 in both
the cases.
Fall 2020 CSE 173 - Discrete Mathematics 122
Proving Theorems
q is not divisible by 3. Then either q mode 3 = 1 or q
mod 3 = 2 (for example 7 mod 3 = 1 and 8 mod 3 = 2)
Case 1: Suppose q mod 3 = 1. Then q = 3k+1, where
k is an integer.
Consequently, q2 = (3k+1).(3k +1)
= 9k2 + 6k + 1
= 3(3k2+2k) +1
= 3p + 1
Since q2 can be written in this form, q2 mode 3 = 1 .
Fall 2020 CSE 173 - Discrete Mathematics 123
Proving Theorems
q is not divisible by 3. Then either q mode 3 = 1 or q
mod 3 = 2 (for example 7 mod 3 = 1 and 8 mod 3 = 2)
Case 2: Suppose q mod 3 = 2. Then q = 3k+2, where
k is an integer.
Consequently, q2 = (3k+2).(3k +2)
= 9k2 + 12k + 4
= 9k2 + 12k + 3 + 1
= 3(3k2+4k + 1) +1
= 3p + 1
Since q2 can be written in this form, q2 mode 3 = 1 .
Fall 2020 CSE 173 - Discrete Mathematics 124
Proof methods
We will discuss six proof methods:
1. Direct proofs
2. Proof by cases
3. Indirect proofs
4. The Bi-conditional
5. Proof by contradiction
6. Counterexamples
125
Proving Theorems
Indirect proof:
An implication p q is equivalent to its contra-
positive q p. Therefore, we can prove p q
by showing that whenever q is false, then p is also
false.
Example: Give an indirect proof of the theorem
“If 3n + 2 is odd, then n is odd.”
Idea: Assume that the conclusion of this implication
is false (n is even). Then use rules of inference and
known theorems to show that p must also be false
(3n + 2 is even).
Fall 2020 CSE 173 - Discrete Mathematics 126
Proving Theorems
n is even.
Then n = 2k, where k is an integer.
It follows that 3n + 2 = 3(2k) + 2
= 6k + 2
= 2(3k + 1)
Therefore, 3n + 2 is even.
We have shown that the contrapositive of the
implication is true, so the implication itself is also true
(If 3n + 2 is odd, then n is odd).
Fall 2020 CSE 173 - Discrete Mathematics 127
Which to use
When do you use a direct proof versus
an indirect proof?
If it’s not clear from the problem, try
direct first, then indirect second
If indirect fails, try the other proofs
128
Example of which to use
Prove that if n is an integer and n3+5 is odd,
then n is even
Via direct proof
n3+5 = 2k+1 for some integer k (definition of odd
numbers)
n3 = 2k-4
n = (2k-4)^(1/3)
Umm…
So direct proof didn’t work out. Next up: indirect
proof
129
Example of which to use
Prove that if n is an integer and n3+5 is odd, then
n is even
Via indirect proof
Contra-positive: If n is odd, then n3+5 is even
Assume n is odd, and show that n3+5 is even
n=2k+1 for some integer k (definition of odd numbers)
n3+5 = (2k+1)3+5 = 8k3+12k2+6k+6 = 2(4k3+6k2+3k+3)
As 2(4k3+6k2+3k+3) is 2 times an integer, it is even
130
Proof methods
We will discuss six proof methods:
1. Direct proofs
2. Proof by cases
3. Indirect proofs
4. The Bi-conditional
5. Proof by contradiction
6. Counterexamples
131
Proving Theorems
The Bi-conditional proof:
If a theorem is of the form p q is equivalent to p
q and q p. You have to prove both
Example: Give a proof of the theorem
“An integer x is even if and only if x2 is even.”
Idea: Prove two things:-- (1) If x is even then x2 is
even , and (2) if x2 is even then x is even. We have
already proved both in previous slides.
Fall 2020 CSE 173 - Discrete Mathematics 132
Proof methods
We will discuss six proof methods:
1. Direct proofs
2. Proof by cases
3. Indirect proofs
4. The Bi-conditional
5. Proof by contradiction
6. Counterexamples
133
Proof by contradiction
Given a statement p, assume it is false
Assume ¬p
Prove that ¬p cannot occur
A contradiction exists
Given a statement of the form p→q
To assume it’s false, you only have to consider
the case where p is true and q is false
134
Proof by contradiction example 1
Theorem (by Euclid): There are infinitely many
prime numbers.
Proof. Assume there are a finite number of
primes
List them as follows: p1, p2 …, pn.
Consider the number q = p1p2 … pn + 1
This number is not divisible by any of the listed primes
○ If we divided pi into q, there would result a remainder of 1
We must conclude that q is a prime number, not among
the primes listed above
○ This contradicts our assumption that all primes are in the list
135 p1, p2 …, pn.
Proof by contradiction example 2
Prove that if n is an integer and n3+5 is odd, then n is
even
Rephrased: If n3+5 is odd, then n is even
Assume False: If n3+5 is odd, then n is even
Assume p is true and q is false
Assume that n3+5 is odd, and n is odd
n=2k+1 for some integer k (definition of odd numbers)
n3+5 = (2k+1)3+5 = 8k3+12k2+6k+6 = 2(4k3+6k2+3k+3)
As 2(4k3+6k2+3k+3) is 2 times an integer, it must be
even
Contradiction!
136
Proof by contradiction example 3
If 3n + 2 is odd, then n is odd
Suppose n is even (negation of the conclusion).
Then n = 2k, where k is an integer.
It follows that 3n + 2 = 3(2k) + 2
= 6k + 2
= 2(3k + 1)
Therefore, 3n + 2 is even.
However, this is a contradiction since 3n + 2 is given to
be odd, so the conclusion (n is odd) holds.
Fall 2020 CSE 173 - Discrete Mathematics 137
Proof by contradiction example 3
√ 2 is irrational
Suppose it is rational. Then s/t = √2. where s and t has
no common factor.
Then (s/t)2 = 2 or s2 = 2t2
s2 is even
Then s is also even
Let, s = 2k, where k is an integer.
It follows that s2 = 4k2 = 2t2
t2 = 2k2
So t is also even
That means s and t has common factor 2
Fall 2020 CSE 173 - Discrete Mathematics 138
Proof methods
We will discuss six proof methods:
1. Direct proofs
2. Proof by cases
3. Indirect proofs
4. The Bi-conditional
5. Proof by contradiction
6. Counterexamples
139
The counter example
Sometimes we wish to show that a
proposition x (P(x) is false
Prove that for a single example x = x0 the
proposition cannot occur, i.e., P(x0) is false
140
Another Example on Proof
STATEMENT: All multiples of 3 are odd.
COUNTER EXAMPLE: The number 6 is multiple of 3
but it is not odd.
STATEMENT: All triangles are equilateral.
COUNTER EXAMPLE: The 3-4-5 is not equilateral.
STATEMENT: The product of any two irrational numbers is
irrational.
COUNTER EXAMPLE: Let x = √12 AND y = √3. Both x and y
are irrational. But √12. √3 = √36 = 6
Fall 2020 CSE 173 - Discrete Mathematics 141
Another Example on Proof
Hypotheses:
1. Anyone performs well is either intelligent or a good actor.
x (P(x) I(x) A(x))
2. If someone is intelligent, then he/she can count
from 1 to 10.
x (I(x) C(x) )
3. Gary performs well.
P(G)
4. Gary can only count from 1 to 3.
C(G)
Conclusion: not everyone is both intelligent and a good actor
x(I(x) A(x))
Fall 2020 CSE 173 - Discrete Mathematics 142
Another Example on Proof
Direct proof:
Step 1: x (P(x) I(x) A(x)) Hypothesis
Step 2: P(G) I(G) A(G) Univ. Inst. Step 1
Step 3: P(G) Hypothesis
Step 4: I(G) A(G) Modus ponens Steps 2 & 3
Step 5: x (I(x) C(x)) Hypothesis
Step 6: I(G) C(G) Univ. inst. Step5
Step 7: C(G) Hypothesis
Step 8: I(G) Modus tollens Steps 6 & 7
Step 9: I(G) A(G) Addition Step 8
Step 10: (I(G) A(G)) Equivalence Step 9
Step 11: x(I(x) A(x)) Exist. general. Step 10
Step 12: x (I(x) A(x)) Equivalence Step 11
Conclusion: x (I(x) A(x)), not everyone is both intelligent
and a good actor.
Fall 2020 CSE 173 - Discrete Mathematics 143
Summary, Section 1.5
Terminology (axiom, theorem, conjecture,
argument, etc.)
Rules of inference (Tables 1 and 2)
Valid argument (hypotheses and conclusion)
Construction of valid argument using rules of
inference
For each rule used, write down and the statements
involved in the proof
Direct and indirect proofs
Other proof methods (e.g., induction, pigeon hole)
will be introduced in later chapters
Fall 2020 CSE 173 - Discrete Mathematics 144