Unit-1 Methods of Proof
Unit-1 Methods of Proof
1. Direct proofs
2. Indirect proofs
3. Vacuous proofs
4. Trivial proofs
5. Proof by contradiction
6. Proof by cases
7. Proofs of equivalence
8. Existence proofs
9. Uniqueness proofs
10. Counterexamples
1
Direct proofs
Consider an implication: p→q
◼ If p is false, then the implication is always true
◼ Thus, show that if p is true, then q is true
2
Direct proof example
Rosen, section 1.5, question 20
◼ Show that the square of an even number is an
even number
◼ Rephrased: if n is even, then n2 is even
Assume n is even
◼ Thus, n = 2k, for some k (definition of even
numbers)
◼ n2 = (2k)2 = 4k2 = 2(2k2)
◼ As n2 is 2 times an integer, n2 is thus even
3
Indirect proofs
Consider an implication: p→q
◼ It’s contrapositive is ¬q→¬p
Is logically equivalent to the original implication!
◼ If the antecedent (¬q) is false, then the
contrapositive is always true
◼ Thus, show that if ¬q is true, then ¬p is true
4
Indirect proof example
If n2 is an odd integer then n is an odd integer
5
Which to use
When do you use a direct proof versus an
indirect proof?
6
Example of which to use
Rosen, section 1.5, question 21
◼ Prove that if n is an integer and n3+5 is odd, then n is
even
9
Proof by contradiction example 1
Theorem (by Euclid): There are infinitely many
prime numbers.
14
Vacuous proofs
Consider an implication: p→q
16
Trivial proofs
Consider an implication: p→q
17
Trivial proof example
Consider the statement:
◼ If you are tall and are in CS 202 then you are
a student
18
Proof by cases
Show a statement is true by showing all
possible cases are true
21
Proofs of equivalences
This is showing the definition of a bi-
conditional
22
Proofs of equivalence example
Rosen, section 1.5, question 40
◼ Show that m2=n2 if and only if m=n or m=-n
◼ Rephrased: (m2=n2) ↔ [(m=n)(m=-n)]
Need to prove two parts:
◼ [(m=n)(m=-n)] → (m2=n2)
Proof by cases!
Case 1: (m=n) → (m2=n2)
◼ (m)2 = m2, and (n)2 = n2, so this case is proven
Case 2: (m=-n) → (m2=n2)
◼ (m)2 = m2, and (-n)2 = n2, so this case is proven
◼ (m2=n2) → [(m=n)(m=-n)]
Subtract n2 from both sides to get m2-n2=0
Factor to get (m+n)(m-n) = 0
Since that equals zero, one of the factors must be zero
Thus, either m+n=0 (which means m=n)
Or m-n=0 (which means m=-n) 23
Existence proofs
Given a statement: x P(x)
We only have to show that a P(c) exists for
some value of c
Two types:
◼ Constructive: Find a specific value of c for
which P(c) exists
◼ Nonconstructive: Show that such a c exists,
but don’t actually find it
Assume it does not exist, and show a contradiction
24
Constructive existence proof
example
Show that a square exists that is the sum
of two other squares
◼ Proof: 32 + 42 = 52
25
Non-constructive existence proof
example
Rosen, section 1.5, question 50
Prove that either 2*10500+15 or 2*10500+16 is not a
perfect square
◼ A perfect square is a square of an integer
◼ Rephrased: Show that a non-perfect square exists in the set
{2*10500+15, 2*10500+16}
Existence
◼ We can manipulate 5x+3=a to yield x=(a-3)/5
◼ Is this constructive or non-constructive?
Uniqueness
◼ If there are two such numbers, then they would fulfill
the following: a = 5x+3 = 5y+3
◼ We can manipulate this to yield that x = y
Thus, the one solution is unique! 28
Counterexamples
Given a universally quantified statement, find a single
example which it is not true
29
Mistakes in proofs
Modus Badus
◼ Fallacy of denying the hypothesis
◼ Fallacy of affirming the conclusion
Proving a universal by example
◼ You can only prove an existential by example!
30