Lecture 3 Proofs
Lecture 3 Proofs
Mathematical Proofs
1.7 Introduction to Proofs
1.8 Proof Methods and Strategy
109/08/17 1
Example vs. Proof
• Prove that an odd number + an odd number =
an even number.
• Think for a moment how you would proceed?
• “Proof”
Since 3 + 5 = 8,
and 3, 5 are odd and 8 even,
So, odd + odd = even
109/08/17 2
Prove that n2 – n + 41 is a prime number, for
all positive integers n.
Examples: n = 1, true
n = 2, true
n = 3, true
…
n = 40 true
what about n = 41?
109/08/17 3
Example vs. Proof
• In general, providing an example (or examples) is
not giving a proof; we should use general
properties instead
• E.g., Prove that “an odd number + an odd
number = an even number”
• Let m, n be any two odd numbers
Since 3 + 5 = 8, Then, m = 2k+1, n = 2j+1
3, 5 are odd and 8 even, Then, m + n = (2k+1) + (2j+1)
So, odd + odd = even = 2k + 2j +2
= 2(k+j+1)
(Wrong !) = 2p where p = k+j+1
= even
(Correct )
109/08/17 4
How would you prove that your program is
correct (that is, it works correctly for all
inputs) ?
109/08/17 6
Undefined Terms
Undefined terms are the basic building
blocks of a mathematical system. These
are words that are accepted as starting
concepts of a mathematical system.
Example: in Euclidean geometry we have
undefined terms such as
Point
Line
Example: in set theory, a set is an undefined
term
109/08/17 7
Definitions
A definition is a proposition constructed from
undefined terms and previously accepted concepts
in order to create a new concept.
Example. In Euclidean geometry the following is
definition:
Two angles are supplementary if the sum of their
measures is 180 degrees.
109/08/17 8
Axioms
An axiom is a proposition accepted as
true without proof within the
mathematical system.
Example: In Euclidean geometry the
following is axiom
Given two distinct points, there is exactly
one line that contains them.
109/08/17 9
Theorems
A theorem is a proposition of the form p
q which must be shown to be true by a
sequence of logical steps that assume
that p is true, and use definitions, axioms
and previously proven theorems.
Example: In Euclidean geometry the
following is a theorem
If two sides of a triangle are equal, then
the angles opposite them are equal. …(*)
109/08/17 10
Lemmas and Corollaries
A lemma is a small theorem which is
used to prove a bigger theorem.
A corollary is a theorem that can be
proven to be a logical consequence of
another theorem.
Example from Euclidean geometry
If a triangle is equilateral, then it is
equiangular
(follows immediately from the theorem (*))
109/08/17 11
Types of Proof
109/08/17 12
Direct proof
109/08/17 13
Class Exercise 1
Give a direct proof of the theorem
“If n is an even integer, then n2 is
even.”
109/08/17 14
Indirect Proof –
Proof by contraposition
109/08/17 15
Class Exercise 2
Give a proof by contraposition of the
theorem “if n is an integer and 3n + 2 is
odd, then n is odd.” (Try a direct proof
first.)
109/08/17 16
Indirect Proof –
Proof by contradiction
109/08/17 17
Give a proof by contradiction for “division of
nonzero numbers by 0 is undefined.”
109/08/17 18
Class Exercise 3
Give a proof by contradiction of the
theorem “if 3n+2 is odd, then n is odd.”
109/08/17 19
Class Exercise 4
Give a proof by contradiction for “there is no
greatest number”.
Proof:
1. Assume there is greatest number, say m
2. Since to any number we can add 1, we
have number m + 1
3. m + 1 > m
4. m is not greatest number
5. Statements 1 and 4 contradict
109/08/17 20
How would you prove that the angle sum
of any triangle is 180o ?
109/08/17 21
Class Exercise 5 -
pigeonholes
Given that there are 3 pigeonholes and 4
pigeons. Prove by contradiction that when all 4
pigeons are put into the pigeon-holes, there is
at least one pigeon which has at least 2
pigeons.
Proof:
Assume that all 4 pigeons are put into the
pigeonholes, and that no pigeonhole has more
than 1 pigeon. Since there are 3 pigeonholes
and no pigeonhole has more than 1 pigeon,
there are at most 3 pigeons, contradicting that
all 4 pigeons are put into the pigeonholes.
109/08/17 22
Class Exercise 6
Give a proof by contradiction for the
theorem “2 is an irrational number”.
109/08/17 23
Class Exercise 6
Give another proof by contradiction for the
theorem “2 is an irrational number”.
A picture proof (Tennenbaum):
Assume 2 is rational and a is
the smallest possible integer
2 = a/b
a2 = 2b2
From the picture,
we have (2b-a)2 = 2(a-b)2
But, 2b-a < a
(a is not the smallest - Contradiction)
109/08/17 24
Tutorial 3
Give a proof by contradiction for the
theorem “3 is an irrational number”.
109/08/17 25
Class Exercise 7
109/08/17 26
Rules of Inference (1)
1. Law of detachment or 3. Rule of Addition
modus ponens (MP) (Add)
pq p
p pq
q
2. Modus tollens (MT) 4. Rule of simplification
pq (Simp)
q pq
p p
109/08/17 27
Rules of Inference (2)
5. Rule of conjunction (Conj) 7. Rule of disjunctive
p syllogism (Disj)
q pq
pq p
q
6. Rule of hypothetical
syllogism (HS)
pq
qr
pr
109/08/17 28
Tutorial 3
Give a proof by contradiction for the
theorem “there is no greatest prime
number”.
http://primes.utm.edu/notes/proofs/infinite/euclids.html
109/08/17 29
1.8 Proof Methods and
Strategy
109/08/17 30
Exhaustive Proofs
Prove by exhaustion that (n+1)3 3n if
n is a positive integer with n 4.
109/08/17 31
Proofs by Cases
Prove by cases that if n is an integer, then n2
n.
109/08/17 32
Existence Proofs
(Constructive existence proof)
Show that there exists an even prime
number.
109/08/17 33
Existence Proofs
109/08/17 34
Existence Proofs
109/08/17 35
Uniqueness Proofs
Show that if a and b are real numbers and a
0, then there is a unique real number r such that
ar + b = 0.
109/08/17 36
Note:
109/08/17 37
Class Exercise 8 – Very
hard!
Prove:
Every even number greater than two can be
expressed as the sum of two prime
numbers.
任何一個大於 2 的偶數,均可表示成兩個質數之和。
http://zh.wikipedia.org/wiki/%e5%93%a5%e5%be%b7%e5%b7%b4%e8%b
5%ab%e7%8c%9c%e6%83%b3
109/08/17 38