Mathematical Concepts (G6012)
Lecture 2
Proofs: direct, contrapositive, and
contradiction
(ft. the irrationality of 𝟐)
Niel de Beaudrap
[email protected]
[email protected]
Content and learning outcomes
• In this lecture I will discuss:
– Proving statements by chains of implications
– The contrapositive of an implication
– Proof by contrapositive
– Proof by contradiction
• Learning outcomes:
– You will understand different ways that
‘implication’ is used in mathematics
– You will know various proof techniques
Direct proof and implication
There are several approaches to proving a proposition
— and some are important enough, to have names.
e.g. ‘Direct’ proof:
Proving that 𝐴 ⇒ 𝑋 by a chain of implications,
𝐴 ⇒ 𝐵 ⇒ 𝐶 ⇒ ⋯ ⇒ 𝑋. (𝐴 ⇒ 𝐵, and 𝐵 ⇒ 𝐶, and…)
• This is common enough that we often use the symbol ‘⇒’
to mean not just “if — then —”, but also ‘implies’
– ‘𝐴 ⇒ 𝐵’ = ‘if 𝐴 then 𝐵’ = ‘𝐴 implies 𝐵’
– But also: ‘𝐴 ⇒ 𝐵 ⇒ 𝐶 ⇒ ⋯’ could mean:
‘we know that 𝐴,
which implies 𝐵, which implies 𝐶, …
Recall ℚ : the rational numbers
𝑛
• ℚ={ ∶ 𝑛, 𝑑 ∈ ℤ , 𝑑 ≠ 0}.
𝑑
𝑛
For ∈ ℚ we call 𝑛 the ‘numerator’, and 𝑑 the ‘denominator’
𝑑
• If 𝑛 = 𝑘𝑎 and 𝑑 = 𝑘𝑏 for some integers 𝑎, 𝑏 ∈ ℤ ,
𝑛 𝑘𝑎 𝑎
then we may ‘simplify’: 𝑥 = = =
𝑑 𝑘𝑏 𝑏
• If 𝑛 and 𝑑 have no factors in common, we say
𝑛
that is in reduced form
𝑑
• Unlike ℕ and ℤ , there is never a ‘next’ element of ℚ :
Between any two rational numbers there is another.
Proof that between any two
rational numbers lies another
Let 𝑥 ∈ ℚ, and let 𝑦 ∈ ℚ be such that 𝑦 > 𝑥.
Strategy: consider 𝑦−𝑥
(𝑦 − 𝑥)/2
𝑥 𝑦−𝑥 𝑦
𝑥+
2
𝑦−𝑥 2𝑥 + 𝑦 − 𝑥 𝑥+𝑦
• Simplify: 𝑥 + = =
2 2 2
𝑥+𝑦
• It is rational: 𝑥, 𝑦 ∈ ℚ ⇒ 𝑥 + 𝑦 ∈ ℚ ⇒ ∈ℚ
2
Proof (cont’d) that between any
two rational numbers lies another
• Note that:
𝑥 𝑦 𝑥 𝑥 𝑦 𝑥 𝑥+𝑦
𝑥<𝑦 ⇒ < ⇒ 2
+2 < 2
+2 ⇒ 𝑥 <
2 2 2
• Similarly:
𝑥 𝑦 𝑥 𝑦 𝑦 𝑦 𝑥+𝑦
𝑥<𝑦 ⇒ < ⇒ +2 < +2 ⇒ < 𝑦
2 2 2 2 2
𝑥+𝑦
So: 𝑥 < < 𝑦 , which means that
2
there is an element of ℚ between 𝑥 and 𝑦 . q.e.d
(We say: ℚ is dense.)
Logical symbols again
• ¬𝐴 means “not 𝐴”
• 𝐴 & 𝐵 (or “𝐴 ∧ 𝐵”) means “𝐴 and 𝐵 ”
• “𝐴 ∨ 𝐵” means “𝐴 or 𝐵 ”
— i.e., inclusive or, which allows for both 𝐴 and 𝐵 to be true
• “𝐴 ⇒ 𝐵” means “ if 𝐴, then 𝐵 ”
— not cause-and-effect !
Just that: you never have 𝐴, without also having 𝐵.
Reasoning about implication
There is a specific name for this kind of “if — then —”
relation: material implication
• “You never get 𝐴, without also having 𝐵” :
– In symbols: 𝐴 ⇒ 𝐵 is equivalent to ¬(𝐴 & ¬𝐵)
• De Morgan’s Law: ¬(𝐴 & 𝐵) ⟺ ¬𝐴 ∨ ¬𝐵
¬ 𝐴∨𝐵 ⟺ ¬𝐴 & ¬𝐵
• So that means:
𝐴 ⇒ 𝐵 is equivalent to ¬𝐴 ∨ 𝐵
Turning around an implication
If 𝐴 ⇒ 𝐵, it is not necessarily true that 𝐵 ⇒ 𝐴
(the “converse” of 𝐴 ⇒ 𝐵)
• 𝑎 < 3 ⇒ 𝑎 < 5, but: 𝑎 < 5 does not imply 𝑎 < 3
— as we could have 𝑎 = 4 instead
But if 𝐴 ⇒ 𝐵, it does follow that ¬𝐵 ⇒ ¬𝐴
(the contrapositive of 𝐴 ⇒ 𝐵)
¬𝐵 ⇒ ¬𝐴 ⟺ ¬¬𝐵 ∨ ¬𝐴 ⟺ ¬𝐴 ∨ 𝐵 ⟺ 𝐴⇒𝐵
Proof by contrapositive
Idea: prove a statement of the form 𝐴 ⇒ 𝐵,
by proving that ¬𝐵 ⇒ ¬𝐴 .
• Example. Recall ℤ = {… , −2, −1, 0, +1, +2, … }
Define the even integers 𝐸 = 2𝑧 ∶ 𝑧 ∈ ℤ
and the odd integers 𝐴 = 2𝑧 + 1 ∶ 𝑧 ∈ ℤ .
– Prove that for any 𝑎 ∈ ℤ : 𝑎 2 ∈ 𝐸 ⇒ 𝑎 ∈ 𝐸.
– Strategy: prove that 𝑎 ∈ 𝐴 ⇒ 𝑎 2 ∈ 𝐴.
Proof:
Use the fact that for 𝑧 ∈ ℤ, we have 𝑧 ∈ 𝐴 ⟺ 𝑧 ∉ 𝐸
• The contrapositive of 𝑎 2 ∈ 𝐸 ⇒ 𝑎 ∈ 𝐸
is 𝑎 ∉ 𝐸 ⇒ 𝑎 2 ∉ 𝐸
which is equivalent to 𝑎 ∈ 𝐴 ⇒ 𝑎 2 ∈ 𝐴
• Suppose 𝑎 is odd, i.e., 𝑎 = 2𝑧 + 1 for some 𝑧 ∈ ℤ.
• Then 𝑎 2 = 2𝑧 + 1 2
= 4𝑧 2 + 4𝑧 + 1
= 2 ⋅ 2𝑧 2 + 2𝑧 + 1 ∈ 𝐴.
• So 𝑎 ∈ 𝐴 ⇒ 𝑎 2 ∈ 𝐴; then 𝑎 2 ∈ 𝐸 ⇒ 𝑎 ∈ 𝐸. q.e.d
Proof techniques
• Direct proof:
Proving that 𝐴 ⇒ 𝑋 by a chain of implications,
𝐴 ⇒𝐵⇒⋯⇒𝑋
• Proof by contraposition:
Proving that 𝐴 ⇒ 𝑋, by showing that ¬𝑋 ⇒ ¬𝐴
— the contraposition of 𝐴 ⇒ 𝑋
• Proof by contradiction:
Proving ¬𝐴, by proving that 𝐴 ⇒ 𝑋
for some statement 𝑋 which is known to be false
(i.e., a logical contradition)
The square root of 2
Pythagoras’ theorem:
For a right-angle triangle with hypothenuse length 𝑐
and other side-lengths 𝑎 and 𝑏,
𝑎2 + 𝑏2 = 𝑐 2 .
• For a right-angle triangle 𝑐2 = 2
with 𝑎 = 1 and 𝑏 = 1,
this would imply 𝑐 = 2. 𝑎2 = 1 𝑎 𝑐
𝑏
We can show: 2 ∉ ℚ . 𝑏2 = 1
Proof of 𝟐 ∉ ℚ: by contradiction
We start by supposing that 2 ∈ ℚ
(and then finding out the consequences)
• Suppose 2 = 𝑎/𝑏 for some integers 𝑎, 𝑏 ∈ ℤ
▪ and suppose also that 𝑎/𝑏 is the reduced form,
so that 𝑎 and 𝑏 have no common integer divisors
𝑎2
• Then 2 = ⇒ 𝑎 2 = 2𝑏 2 .
𝑏2
• As 𝑏 2 is an integer, 𝑎 2 is an even integer: 𝑎 2 ∈ 𝐸.
▪ As we’ve already seen, that means 𝑎 ∈ 𝐸 as well:
so 𝑎 = 2𝑧, for some 𝑧 ∈ ℤ .
𝟐 ∉ ℚ (proof by contradiction)
• As 𝑎 = 2𝑧 for some 𝑧 ∈ ℤ, we have
2𝑏 2 = 𝑎 2 = 2𝑧 2 = 4𝑧 2
so that 𝑏 2 = 2𝑧 2 .
• That means 𝑏 2 is even too! Then 𝑏 is even as well,
so that 𝑏 = 2𝑦 for some 𝑦 ∈ ℤ .
• Wait: both 𝑎 and 𝑏 are multiples of 2?
But they’re not supposed to have divisors in common!
Contradiction!
⇒ 𝟐 is not rational. q.e.d
What just happened?
A demonstration of the ancient art of
Fooling* around and finding out
• We made a bold assumption: “ 2 ∈ ℚ ” (call this “ 𝐴 ”).
• The assumption 𝐴 implies a proposition 𝑋, which
cannot be true: that there are 𝑎, 𝑏 ∈ ℤ which
▪ have no common integer factors
▪ also, are somehow both multiples of 2
• As 𝑋, is false, it follows that
our assumption 𝐴 is also false.
Proof techniques
• Direct proof: prove 𝐴 ⇒ 𝑋 by a chain of implications
• Proof by contraposition:
Prove 𝐴 ⇒ 𝑋, by showing that ¬𝑋 ⇒ ¬𝐴
• Proof by contradiction:
Prove ¬𝐴, by proving that 𝐴 ⇒ 𝑋 where 𝑋 is false
• One more technique to come —
proof by induction:
prove 𝑃 𝑛 for all 𝑛 ∈ ℕ
… as if by a domino effect