4 Proof
4 Proof
●
Proof : An argument that establishes the
truth of a theorem.
●
Logic : tool for the analysis of proofs.
●
Rules of inference - formal proof
●
Besides, there are many ways to proof a
theorem.
2 / 30
L I m CK (2019)
Direct Proofs
●
Theorems to proof are often in the form:
P → Q is true, or
if P, then Q is true
●
Direct proofs start with assume P is true.
●
What we need to do is to directly proof that Q
is true (to keep P → Q true)
●
If Q is false, P → Q is false.
3 / 30
L I m CK (2019)
Example
Q : m+n is odd
4 / 30
L I m CK (2019)
Example (cont’)
8 / 30
L I m CK (2019)
Example
Proof that for all integers n, 4(n2 + n + 1) − 3n2 is a
perfect square.
●
If n is an integer,
4(n2 + n + 1) − 3n2 = 4n2 + 4n + 4 − 3n2
= n2 + 4n + 4
= (n+2)2
since n is an integer, n+2 is also an integer,
therefore, (n+2)2 is a perfect square. Proved.
9 / 30
L I m CK (2019)
Example
Disproving with counterexample
Disprove: if ∀n ∈ Z+ , 2n + 1 is a prime
number.
●
For n=1, 2, 4 and etc, we find:
► 21 + 1 = 3 is prime
► 22 + 1 = 5 is prime
► 24 + 1 = 17 is prime
► However, a counterexample, n=3
❒
23 + 1 = 9 is not prime
●
With this counterexample, we disprove the
L I m CKtheorem.
12 / 30
(2019)
Exercise
13 / 30
L I m CK (2019)
Proof by Contradiction
●
We want to proof that P→Q is true.
●
Idea:
► Start with P is true.
► If P→Q is true, P→~Q is false
► If we prove that P→~Q is true, we can
reject the theorem P→Q is true
► But if we prove that P→~Q is false, we
accept that P→Q is true, by contradiction.
14 / 30
L I m CK (2019)
Example
By Contradiction, prove that for every n ∈ Z, if n2 is
even, then n is even.
15 / 30
L I m CK (2019)
Example
By Contradiction, prove that for every n ∈ Z, if n2 is
even, then n is even.
●
P : n2 is even Q : n is even ~Q : n is odd
●
Because of P, we can write n2 = 2k , k∈ Z
Because of ~Q, we can write n=2m+1, m∈Z
●
If P→~Q is true,
n2 = 2k = (2m+1)2
= 4m2 + 4m +1
= 2(2m2 + 2m) + 1 (n2 = 2k is not even!)
●
The result shows that P→~Q cannot be true
●
Thus, by contradiction, we proved that P→Q is true.
16 / 30
L I m CK (2019)
Exercise
17 / 30
L I m CK (2019)
Proof by Contrapositive
●
Recall that P→Q is equivalent to ~Q→~P
●
Instead of showing P→Q directly, we do an
indirect way, show ~Q→~P.
●
If ~Q→~P is true, P→Q is also true.
19 / 30
L I m CK (2019)
Example
20 / 30
L I m CK (2019)
Example
21 / 30
L I m CK (2019)
Example
23 / 30
L I m CK (2019)
Proof by cases
●
When the original hypothesis naturally
divides itself into various cases.
●
For example, when the hypothesis include “x
is a real number”, we can divide into cases:
► x is positive real number
► x is negative real number
► x is 0
●
Sometimes the number of cases to prove is
finite and not too large, so we can check
them all one by one. We call this type of
proof exhaustive proof.
L I m CK (2019)
24 / 30
Example
25 / 30
L I m CK (2019)
Example
●
For x is positive real number, x = |x|
●
For x is 0, 0 = |0|
●
For x is negative real number, x < |x|
●
Combining all the cases, we can conclude
that for every real number x, x ≤ |x|.
26 / 30
L I m CK (2019)
Example
27 / 30
L I m CK (2019)
Example
28 / 30
L I m CK (2019)
Proofs of Equivalence
●
Some theorems are of the form p if and only
if q. Such theorems are proved by using the
equivalence:
p ↔ q ≡ (p → q) ∧ (q → p)
●
that is, to prove “p if and only if q,” prove “if
p then q” AND “if q then p.”
29 / 30
L I m CK (2019)
Example
By equivalence, prove that “for every integer n, n is odd if
and only if n−1 is even”.
30 / 30
L I m CK (2019)
Example
By equivalence, prove that “for every integer n, n is odd if
and only if n−1 is even”.
●
We need to prove that:
► if n is odd then n − 1 is even (1)
► if n − 1 is even then n is odd (2)
31 / 30
L I m CK (2019)
Example
By equivalence, prove that “for every integer n, n is odd if
and only if n−1 is even”.
●
We need to prove that:
► if n is odd then n − 1 is even (1)
► if n − 1 is even then n is odd (2)
●
First, we prove (1)
► If n is odd, then n = 2k + 1
► n-1 = (2k+1) - 1 = 2k is even
32 / 30
L I m CK (2019)
Example
By equivalence, prove that “for every integer n, n is odd if
and only if n−1 is even”.
●
We need to prove that:
► if n is odd then n − 1 is even (1)
► if n − 1 is even then n is odd (2)
●
First, we prove (1)
► If n is odd, then n = 2k + 1
► n-1 = (2k+1) - 1 = 2k is even
●
Next, we prove (2)
► If n − 1 is even, then n − 1 = 2k
► n = n-1 + 1 = 2k + 1 is odd
●
We have proved P→Q and Q→P, so P↔Q is true.
33 / 30
L I m CK (2019)