0% found this document useful (0 votes)
87 views83 pages

Part 2

The document discusses the logic of proofs and is divided into two parts. Part 1 covers logic, including statements, logical operators like negation and equivalence, and quantifiers. It provides definitions and truth tables for these logical concepts. Part 2 will cover techniques of proof, though its content is not shown in the given document.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
87 views83 pages

Part 2

The document discusses the logic of proofs and is divided into two parts. Part 1 covers logic, including statements, logical operators like negation and equivalence, and quantifiers. It provides definitions and truth tables for these logical concepts. Part 2 will cover techniques of proof, though its content is not shown in the given document.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 83

Part II

The logic of proofs

Evelina Erlacher Think Maths! 37 / 288


Part II: The logic of proofs
4 Logic

5 Techniques of proof

Evelina Erlacher Think Maths! 38 / 288


Logic

Part II: The logic of proofs


4 Logic

5 Techniques of proof

Evelina Erlacher Think Maths! 39 / 288


Logic

4 Logic
Statements and basic logical operators
Equivalence (1)
Quantifiers
Implications
Equivalence (2)

Evelina Erlacher Think Maths! 40 / 288


Logic Statements and basic logical operators

4 Logic
Statements and basic logical operators
Equivalence (1)
Quantifiers
Implications
Equivalence (2)

Evelina Erlacher Think Maths! 41 / 288


Logic Statements and basic logical operators

Definition 4.1 (Statement)


A statement is a sentence that is either true or false – but not both
(‘tertium non datur’).

Example 4.2
1 ‘1 + 1 = 2’ is a true statement.
2 ‘If x is odd then x 2 is odd’ is a true statement.
3 ‘Earth has four moons’ is a statement that is false.
4 ‘How are you?’ is not a statement.
5 ‘Close the window!’ is not a statement.
6 ‘42’ is not a statement.
7 ‘Sundays are great’ is not a statement.
8 ‘x > 2’ is a statement. However, we cannot determine the truth value
without further information.

Evelina Erlacher Think Maths! 42 / 288


Logic Statements and basic logical operators

Definition 4.3 (Negation)


The negation of a statement P is the statement that is false when P is
true and vice versa. For the negation of statement P we write ¬P.

A truth table summarizes all possibilities for the truth or otherwise of a


statement:
P ¬P
1 0
0 1
The number 1 stands for ‘true’, the number 0 stands for ‘false’.

Evelina Erlacher Think Maths! 43 / 288


Logic Statements and basic logical operators

Definition 4.4 (Logical ‘and’ and ‘or’)


Let P and Q be statements.
The statement P ∧ Q (read ‘P and Q’) is true if both P and Q are
true. It is false in all other cases.
The statement P ∨ Q (read ‘P or Q’) is true if P is true or Q is true
or both are true. It is false only if both P and Q are false.

Truth tables for ‘∧’ and ‘∨’:


P Q P ∧Q P Q P ∨Q
1 1 1 1 1 1
1 0 0 1 0 1
0 1 0 0 1 1
0 0 0 0 0 0

Evelina Erlacher Think Maths! 44 / 288


Logic Equivalence (1)

4 Logic
Statements and basic logical operators
Equivalence (1)
Quantifiers
Implications
Equivalence (2)

Evelina Erlacher Think Maths! 45 / 288


Logic Equivalence (1)

Definition 4.5 (Equivalence)


Two statements P and Q are equivalent if the truth tables made from
their inputs and outputs are the same. In this case we write: P ⇔ Q.
The sign ‘⇔’ is read as ‘if and only if’.

Truth table for ‘⇔’:


P Q P ⇔Q
1 1 1
1 0 0
0 1 0
0 0 1

A mathematical theorem of the type ‘P


P ⇔ Q ’ is an equivalence that
has been proved always to be true.
In other words: the truth values of P and Q are always the same.

Evelina Erlacher Think Maths! 46 / 288


Logic Equivalence (1)

Example 4.6
The statement ¬(P ∧ Q) is equivalent to the statement (¬P) ∨ (¬Q):

P Q P ∧Q ¬(P ∧ Q) ¬P ¬Q (¬P) ∨ (¬Q)


1 1 1 0 0 0 0
1 0 0 1 0 1 1
0 1 0 1 1 0 1
0 0 0 1 1 1 1
The two blue columns are the same, therefore the two statements are
equivalent, i.e. ¬(P ∧ Q) ⇔ (¬P) ∨ (¬Q).

Similarly, we can prove the following:


¬(P ∨ Q) ⇔ (¬P) ∧ (¬Q),
¬(¬P) ⇔ P,
P ∧ (Q ∨ R) ⇔ (P ∧ Q) ∨ (P ∧ R),
P ∨ (Q ∧ R) ⇔ (P ∨ Q) ∧ (P ∨ R).
Evelina Erlacher Think Maths! 47 / 288
Logic Equivalence (1)

Example 4.7
We can use the above equivalences to show that
A ∩ (B ∪ C ) = (A ∩ B) ∪ (A ∩ C )
for arbitrary sets A, B and C :
per def.
x ∈ A ∩ (B ∪ C ) ⇐⇒ x ∈A ∧ x ∈B ∪C
per def.
⇐⇒ x ∈ A ∧ (x ∈ B ∨ x ∈ C )
distr. law
⇐⇒ (x ∈ A ∧ x ∈ B) ∨ (x ∈ A ∧ x ∈ C )
per def.
⇐⇒ x ∈A∩B ∨ x ∈A∩C
per def.
⇐⇒ x ∈ (A ∩ B) ∪ (A ∩ C )

Evelina Erlacher Think Maths! 48 / 288


Logic Quantifiers

4 Logic
Statements and basic logical operators
Equivalence (1)
Quantifiers
Implications
Equivalence (2)

Evelina Erlacher Think Maths! 49 / 288


Logic Quantifiers

Many mathematical statements contain so-called quantifiers.


Definition 4.8 (Universal quantifier)
The phrase ‘for all’ is the universal quantifier.
It is denoted ∀.

Example 4.9
1 ‘x 2 ≥ 0 for all x ∈ R’ is a true statement containing the universal
quantifier. Written in symbols:
∀x ∈ R : x 2 ≥ 0.

2 The statement ‘For all x ∈ Z and for all y ∈ Z the sum x + y and the
product xy are integers.’ can be written as

∀x ∈ Z ∀y ∈ Z : (x + y ∈ Z ∧ xy ∈ Z)
or
∀x, y ∈ Z : (x + y ∈ Z ∧ xy ∈ Z).

Evelina Erlacher Think Maths! 50 / 288


Logic Quantifiers

Definition 4.10 (Existential quantifier)


The phrase ‘there exists’ is the existential quantifier.
It is denoted ∃.

Example 4.11
1 ‘There exists an integer x such that x 2 = 2’ is a false statement
containing the existential quantifier. Written in symbols:
∃x ∈ Z : x 2 = 2.

2 The statement ‘There exist integers x and y such that x + y = 1’ can


be written as
∃x ∈ Z ∃y ∈ Z : x + y = 1
or
∃x, y ∈ Z : x + y = 1.

Evelina Erlacher Think Maths! 51 / 288


Logic Quantifiers

Quantifiers can be combined:


Example 4.12
The statement ‘For all x ∈ Z there exists y ∈ Z such that y > x’ can be
written as
∀x ∈ Z ∃y ∈ Z : y > x.

Warning!
The order of quantifiers is important.

Example 4.13
Compare the following two statements:
(i) ∀♂ ∃ ♀ : ♂ ♥ ♀
(ii) ∃ ♀ ∀♂ : ♂ ♥ ♀

Evelina Erlacher Think Maths! 52 / 288


Logic Quantifiers

Negation of quantifiers:
Suppose that the statement ∀x ∈ S : P(x) is true, where P(x) is a
statement involving x. The negation of this is that P(x) does not hold for
all x ∈ S. So there must exist at least one x ∈ S such that P(x) is false,
i.e. such that ¬P(x) is true. Therefore:

¬(∀x ∈ S : P(x)) ⇔ ∃x ∈ S : ¬P(x).

Similarly,
¬(∃x ∈ S : P(x)) ⇔ ∀x ∈ S : ¬P(x).

Example 4.14
The negation of the statement ‘All dogs are black’ is not ‘All dogs are not
black’ ! Rather, if the statement ‘All dogs are black’ is false, then that
means that there is at least one dog that is not black.

Evelina Erlacher Think Maths! 53 / 288


Logic Quantifiers

For the negation of statements with multiple quantifiers the following rule
applies:
Negation of quantifiers
To negate a statement of the form

Q1 x1 ∈ S1 Q2 x2 ∈ S2 . . . Qn xn ∈ Sn : P(x1 , x2 , . . . , xn ),

where Qi is ∀ or ∃ and Si are sets for 1 ≤ i ≤ n, we do the following:


(i) Change every ∀ to ∃ and every ∃ to ∀.
(ii) Replace P(x1 , x2 , . . . , xn ) by its negation.

Example 4.15
The negation of
∃a ∈ R ∀ε > 0 ∀N ∈ N ∃n ≥ N : |an − a| < ε
is
∀a ∈ R ∃ε > 0 ∃N ∈ N ∀n ≥ N : |an − a| ≥ ε.

Evelina Erlacher Think Maths! 54 / 288


Logic Implications

4 Logic
Statements and basic logical operators
Equivalence (1)
Quantifiers
Implications
Equivalence (2)

Evelina Erlacher Think Maths! 55 / 288


Logic Implications

Most mathematical statements are of the form


‘If P is true, then Q is true.’.
Written in symbols:
P ⇒ Q.
A statement of this type is called an implication.

Truth table for ‘⇒’: P Q P ⇒Q


1 1 1
1 0 0
0 1 1
0 0 1
If statement P is true and statement Q is true (row 1), then also the
implication is true.
If P is true and Q is false (row 2), the implication cannot be true.
If statement P is false (rows 3 and 4), the implication does not claim
anything, so it cannot be false. Hence, the implication is true.
Evelina Erlacher Think Maths! 56 / 288
Logic Implications

Definition 4.16 (Premise and conclusion)


In an implication P ⇒ Q there are two parts:
P is called the premise, assumption or hypothesis, and
Q is called the conclusion.

A mathematical theorem of the type ‘P P ⇒ Q ’ is an implication that


has been proved always to be true,
i.e. the proof of the theorem shows that if P is true, then Q always is true
as well.
In other words: the combination ‘P is true’ and ‘Q is false’ is impossible.

Evelina Erlacher Think Maths! 57 / 288


Logic Implications

Example 4.17
Consider the implication
x > 2 ⇒ x 2 > 4.
This implication is always true, no matter what value x is.
Note: If the premise x > 2 is false, i.e. if x ≤ 2, the implication is still
true, since it does not claim anything in the case x ≤ 2. And indeed, in
this example anything can happen for x ≤ 2:
For x = 1 we have x 2 = 1, that is the conclusion x 2 > 4 is false.
But for x = −3 we have x 2 = 9, which means that in this instance
the conclusion x 2 > 4 is true.

Also note: The implication P ⇒ Q says nothing about the truth or


otherwise of P or Q!

Evelina Erlacher Think Maths! 58 / 288


Logic Implications

Language: Ways of expressing ‘P ⇒ Q’ are


If P, then Q.
If P, Q.
P implies Q.
Q, if P.
P only if Q.
Q follows from P.
P is a sufficient condition for Q.
Q is a necessary condition for P.

Evelina Erlacher Think Maths! 59 / 288


Logic Implications

Definition 4.18 (Contrapositive)


The contrapositive of the implication ‘P ⇒ Q’ is ‘¬Q ⇒ ¬P’.

Example 4.19
The implication ‘If I am Austrian, then I am European’ is true. The
contrapositive ‘If I am not European, then I am not Austrian’ is also true.
This is not a coincidence, as the following truth table shows:
P Q P ⇒Q ¬Q ¬P ¬Q ⇒ ¬P
1 1 1 0 0 1
1 0 0 1 0 0
0 1 1 0 1 1
0 0 1 1 1 1

Theorem 4.20
The implication ‘P ⇒ Q’ and its contrapositive ‘¬Q ⇒ ¬P’ are equivalent.
Evelina Erlacher Think Maths! 60 / 288
Logic Implications

Definition 4.21 (Converse)


The converse of the implication ‘P ⇒ Q’ is ‘Q ⇒ P’.

Example 4.22
1 The implication ‘If I am Austrian, then I am European’ is true.
However, the converse ‘If I am European, then I am Austrian’ is false.
2 The implication ‘If x is positive, then −x is negative’ is true. The
converse ‘If −x is negative, then x is positive’ is also true.

Warning!
In general, the truth of ‘P ⇒ Q’ says nothing about the truth of its
converse ‘Q ⇒ P’.

Evelina Erlacher Think Maths! 61 / 288


Logic Implications

Definition 4.23 (Inverse)


The inverse of the implication ‘P ⇒ Q’ is ‘¬P ⇒ ¬Q’.

Example 4.24
1 ‘If I am Austrian, then I am European’ is true. However, the inverse
‘If I am not Austrian, then I am not European’ is false.
2 ‘If x is positive, then −x is negative’ is true. The inverse ‘If x is not
positive, then −x is not negative’ is also true.

Warning!
In general, the truth of ‘P ⇒ Q’ says nothing about the truth of its
inverse ‘¬P ⇒ ¬Q’.
However, in everyday speech an implication and its inverse are often
treated as if they were equivalent.

Evelina Erlacher Think Maths! 62 / 288


Logic Implications

Example 4.25
1 ‘If you don’t tidy your room, then you won’t get ice-cream’ will be
interpreted as the contract: ‘If you tidy your room, then you will get
ice-cream’, even though the original implication says nothing about
what will happen if the room is tidied.
2 Consider the statement ‘If you are a mathematician, then you are
intelligent’, and assume that it is true. This implication says nothing
about the intelligence of non-mathematicians. Yet people may get
offended as they will believe that it insults non-mathematicians: ‘Hey,
I’m a cook. Are you saying I’m stupid?’
Note: Let ‘P ⇒ Q’ be an implication. Then the converse ‘Q ⇒ P’ is
equivalent to the inverse ‘¬P ⇒ ¬Q’.

Evelina Erlacher Think Maths! 63 / 288


Logic Implications

Negation of implications:
Looking at the truth table for ‘⇒’, we see that the implication ‘P ⇒ Q’ is
false only in the case where P is true and Q is false. Therefore, we create
a truth table for ‘¬(P ⇒ Q)’ and compare it with ‘P ∧ ¬Q’:

P Q P ⇒Q ¬(P ⇒ Q) ¬Q P ∧ ¬Q
1 1 1 0 0 0
1 0 0 1 1 1
0 1 1 0 0 0
0 0 1 0 1 0

Theorem 4.26
The statements ‘¬(P ⇒ Q)’ and ‘P ∧ ¬Q’ are equivalent.
Note: Since ‘¬(¬(P ⇒ Q))’ is equivalent to ‘P ⇒ Q’, also the
statements ‘P ⇒ Q’ and ‘¬(P ∧ ¬Q)’ are equivalent.

Evelina Erlacher Think Maths! 64 / 288


Logic Implications

Applying implications
Let A, B, C and D be statements. Assume that the following implications
are true:
(I) B ∧ C ⇒ ¬A ∧ D (II) ¬D ⇒ ¬A ∨ C

Furthermore, we assume that A and C are both true.


Question: What are the truth values of B and D? Is there a unique
solution?
Answer: If an implication is true, then so is its contrapositive. Hence, we
can also use the following rules:
(c-I) A ∨ ¬D ⇒ ¬B ∨ ¬C (c-II) A ∧ ¬C ⇒ D

Since we know A and C to be true, we have the following argumentation:


(c-I) C is true
A ⇒ A ∨ ¬D ⇒ ¬B ∨ ¬C ⇒ ¬B

Thus, ¬B must be true, and B is therefore false.


Evelina Erlacher Think Maths! 65 / 288
Logic Implications

(I) B ∧ C ⇒ ¬A ∧ D (II) ¬D ⇒ ¬A ∨ C

(c-I) A ∨ ¬D ⇒ ¬B ∨ ¬C (c-II) A ∧ ¬C ⇒ D

Answer (continuation): So far we determined, that the following


statements are true: A, ¬B, C .
How about D? We check both possibilities:
We assume D to be true. Then, (I) and (II) remain true, and there is
no contradiction. Thus, D can be true.
Now assume D to be false. Then ¬D is true. Also in this case, (I) and
(II) remain true, and there is no contradiction. Thus, D can be false.
Therefore, there are two solutions:

A, ¬B, C , D are all true or A, ¬B, C , ¬D are all true

Evelina Erlacher Think Maths! 66 / 288


Logic Equivalence (2)

4 Logic
Statements and basic logical operators
Equivalence (1)
Quantifiers
Implications
Equivalence (2)

Evelina Erlacher Think Maths! 67 / 288


Logic Equivalence (2)

Theorem 4.27
The statements P and Q are equivalent if and only if P implies Q and
Q implies P.
The statement in logical symbols:
 
(P ⇔ Q) ⇔ (P ⇒ Q) ∧ (Q ⇒ P)

Proof.
P Q P ⇔Q P ⇒Q Q⇒P (P ⇒ Q) ∧ (Q ⇒ P)
1 1 1 1 1 1
1 0 0 0 1 0
0 1 0 1 0 0
0 0 1 1 1 1

Evelina Erlacher Think Maths! 68 / 288


Logic Equivalence (2)

Example 4.28
The statement

x2 − x − 2 = 0 ⇔ x = −1 or x = 2

is true:
Solving the equation yields the solutions −1 and 2. Hence, the ‘⇒’
direction is true.
Conversely, plugging −1 and 2 into the left hand side of the equation
gives 0. Thus, also the ‘⇐’ direction is true.

Evelina Erlacher Think Maths! 69 / 288


Logic Equivalence (2)

Example 4.29
The statement

x2 − x − 2 = 0 ⇔ x = −1 or x = 2 or x = 5

is not true:
The ‘⇒’ direction ‘If x solves the equation, then x is −1, 2 or 5’ is
true since all solutions of the equation are listed on the right hand
side. For the ‘⇒’ direction it does not matter that 5 is not a solution
of the equation.
The ‘⇐’ direction ‘If x equals −1, 2 or 5, then x 2 − x − 2 = 0’ is
false. To check this we plug −1, 2 and 5 into the left hand side of the
equation. For x = 5 we get 18, not 0. Therefore, the ‘⇐’ direction is
false.

Evelina Erlacher Think Maths! 70 / 288


Logic Equivalence (2)

Warning!
When solving equations we pass from one line to the next by showing that
the first implies the second. However, it is important to check if also the
second line implies the first!

Example 4.30

x −1 = x +5
2
(x − 1) = x +5
2
x − 2x + 1 = x + 5
x 2 − 3x − 4 = 0
(x − 4)(x + 1) = 0

The last equation has the solutions x = 4 and x = −1. Substituting x = 4


into the original equation shows that we have a correct solution. But if we
substitute x = −1 we obtain −2 = 2. Hence, x = −1 is not a solution of
the original equation. What happened?
Evelina Erlacher Think Maths! 71 / 288
Logic Equivalence (2)

The problem in the above example arises because squaring both sides of
an equation f (x) = g (x) and then solving it gives solutions to
−f (x) = g (x) as well.

We again look at the equation, this time also writing out all implications:

x −1= x +5
⇒ (x − 1)2 = x + 5
⇔ x 2 − 2x + 1 = x + 5
⇔ x 2 − 3x − 4 = 0
⇔ (x − 4)(x + 1) = 0

The first ⇒ cannot be reversed (because a2 = b 2 does not imply a = b


but that a = ±b). Thus, we know that we might have too many solutions
at the end.

Evelina Erlacher Think Maths! 72 / 288


Techniques of proof

Part II: The logic of proofs


4 Logic

5 Techniques of proof

Evelina Erlacher Think Maths! 73 / 288


Techniques of proof

5 Techniques of proof
Direct proof
Proof by contrapositive
Proof by contradiction
Without loss of generality
Common methods for proving . . .
Counterexamples
Induction
Common mistakes
Further examples

Evelina Erlacher Think Maths! 74 / 288


Techniques of proof Direct proof

5 Techniques of proof
Direct proof
Proof by contrapositive
Proof by contradiction
Without loss of generality
Common methods for proving . . .
Counterexamples
Induction
Common mistakes
Further examples

Evelina Erlacher Think Maths! 75 / 288


Techniques of proof Direct proof

Consider the following implication:


Theorem 5.1
Let n be an integer. If n is even, then n2 is even.
Given: n is an integer.
Hypothesis: n is even.
Conclusion: n2 is even.

We will prove this theorem directly.


Direct proof
A direct proof of an implication consists of assuming the givens and
hypothesis, and then using small logical steps and applying definitions,
axioms and previously established statements until the conclusion results.

Evelina Erlacher Think Maths! 76 / 288


Techniques of proof Direct proof

Theorem 5.2
Let n be an integer. If n is even, then n2 is even.

Proof (direct).
Let n be an even integer. Then n = 2k for some integer k. Hence,

n2 = (2k)2 = 4k 2 = 2(2k 2 ).

That is, n2 can be written as 2r , where r is the integer 2k 2 . Therefore, n2


is even.

Evelina Erlacher Think Maths! 77 / 288


Techniques of proof Direct proof

Theorem 5.3 (De Morgan’s law)


 c
T S c
Ai = Ai
i∈I i∈I

Proof.
\ c \
per def.
x∈ Ai ⇐⇒ x∈
/ Ai
rewrite
\
⇐⇒ ¬(x ∈ Ai )
per def.
⇐⇒ ¬(∀i : x ∈ Ai )
negation
⇐⇒ ∃i : x ∈
/ Ai
per def.
⇐⇒ ∃i : x ∈ Aci
per def.
[
⇐⇒ x∈ Aci

Evelina Erlacher Think Maths! 78 / 288


Techniques of proof Proof by contrapositive

5 Techniques of proof
Direct proof
Proof by contrapositive
Proof by contradiction
Without loss of generality
Common methods for proving . . .
Counterexamples
Induction
Common mistakes
Further examples

Evelina Erlacher Think Maths! 79 / 288


Techniques of proof Proof by contrapositive

We showed earlier, that an implication is equivalent to its contrapositive,


i.e. P ⇒ Q is equivalent to ¬Q ⇒ ¬P. Therefore, a proof of the
contrapositive also proves the original implication.
Proof by contrapositive
A proof by contrapositive of an implication consists of assuming the
givens and the negation of the conclusion, and then using small logical
steps and applying definitions, axioms and previously established
statements until the negation of the hypothesis results.
Proof by contrapositive is an indirect proof.

Evelina Erlacher Think Maths! 80 / 288


Techniques of proof Proof by contrapositive

We want to prove the converse of the previous theorem by the


contrapositive method:
Theorem 5.4
Let n be an integer. If n2 is even, then n is even.
Given: n is an integer.
Hypothesis: n2 is even. ⇒ Negation of hypothesis: n2 is odd.
Conclusion: n is even. ⇒ Negation of conclusion: n is odd.
Proof (by contrapositive).
Let n be an odd integer. Then n = 2k + 1 for some integer k. Hence,

n2 = (2k + 1)2 = 4k 2 + 4k + 1 = 2(2k 2 + 2k) + 1.

That is, n2 can be written as 2r + 1, where r is the integer 2k 2 + 2k.


Therefore, n2 is odd.

Evelina Erlacher Think Maths! 81 / 288


Techniques of proof Proof by contradiction

5 Techniques of proof
Direct proof
Proof by contrapositive
Proof by contradiction
Without loss of generality
Common methods for proving . . .
Counterexamples
Induction
Common mistakes
Further examples

Evelina Erlacher Think Maths! 82 / 288


Techniques of proof Proof by contradiction

Another technique of proof uses the fact that a statement P is either true
or false, without a third possibility. Therefore, if we proof that ¬P is false
the statement P must be true.

Proof by contradiction
A proof by contradiction of a statement P consists of assuming that the
negation of P is true, and then using small logical steps and applying
definitions, axioms and previously established statements until a
contradiction results.

Proof by contradiction is also called reductio ad absurdum. Proof by


contradiction is an indirect proof.

Evelina Erlacher Think Maths! 83 / 288


Techniques of proof Proof by contradiction

Theorem 5.5

The number 2 is irrational.

Statement: 2 is irrational.

Negation of statement: 2 is rational.

We will now prove the theorem by contradiction.

Evelina Erlacher Think Maths! 84 / 288


Techniques of proof Proof by contradiction

Proof (by contradiction).



Suppose to the contrary that 2 is rational. In other words, there exist
integers m and n with gcd(m,
√ n) = 1 (‘gcd’ is shorthand for ‘greatest
common divisor’) such that 2 = m n . Then we have

√ m m2
2= ⇒ 2= ⇒ 2n2 = m2 .
n n2
This implies that m2 is even, since it is the product of 2 and n2 . By
Theorem 5.4, it follows that also m is even. So, m = 2k for some integer
k. Using the equation 2n2 = m2 , we get

2n2 = (2k)2 ⇒ 2n2 = 4k 2 ⇒ n2 = 2k 2 .

Reasoning similarly to above we conclude that n is even as well, i.e. n = 2j


for some integer j. Therefore, both m and n are divisible by 2. However,
this a contradiction
√ to our assumption that gcd(m, n) = 1. Thus we
conclude that 2 cannot be written as a quotient of integers.
Evelina Erlacher Think Maths! 85 / 288
Techniques of proof Proof by contradiction

Special case: Proof by contradiction of an implication

We know: ¬(P ⇒ Q) is equivalent to P ∧ ¬Q. Therefore,

Proof by contradiction of an implication


A proof by contradiction of an implication consists of assuming the
givens, the hypothesis and the negation of the conclusion, and then using
small logical steps and applying definitions, axioms and previously
established statements until a contradiction results.

Evelina Erlacher Think Maths! 86 / 288


Techniques of proof Proof by contradiction

Theorem 5.6
Let x be a rational number. If y is an irrational number, then x + y is also
an irrational number.
Givens: x ∈ Q
Hypothesis: y ∈ R\Q
Conclusion: x + y ∈ R\Q ⇒ Negation of conclusion: x + y ∈ Q
Proof (by contradiction).
Suppose to the contrary that x ∈ Q, y ∈ R\Q and x + y ∈ Q. Then there
exist integers a, b, c and d such that
a c
x= and x +y = .
b d
It follows that c a bc − ad
y =x +y −x = − = .
d b bd
Since bc − ad ∈ Z and bd ∈ Z, this means that y ∈ Q. However, this is a
contradiction to the assumption that y is irrational. Therefore, the
theorem must be true.
Evelina Erlacher Think Maths! 87 / 288
Techniques of proof Without loss of generality

5 Techniques of proof
Direct proof
Proof by contrapositive
Proof by contradiction
Without loss of generality
Common methods for proving . . .
Counterexamples
Induction
Common mistakes
Further examples

Evelina Erlacher Think Maths! 88 / 288


Techniques of proof Without loss of generality

Without loss of generality

The term ‘without loss of generality’ is used before an assumption in a


proof which narrows the premise to some special case; it is implied that
the proof for that case can be easily applied to all others, or that all other
cases are equivalent. Thus, given a proof of the conclusion in the special
case, it is trivial to adapt it to prove the conclusion in all other cases.

This often requires the presence of symmetry. For example, in proving


P(x, y ) (i.e., that some property P holds for any two real numbers x and
y ), if we wish to assume ‘without loss of generality’ that x ≤ y , then it is
required that P be symmetrical in x and y , namely that P(x, y ) is
equivalent to P(y , x). There is then no loss of generality in assuming
x ≤ y , since a proof for that case can trivially be adapted for the other
case (y ≤ x) by interchanging x and y (leading to the conclusion P(y , x),
which is known to be equivalent to P(x, y ), the desired conclusion.)

Evelina Erlacher Think Maths! 89 / 288


Techniques of proof Without loss of generality

Theorem 5.7
Let n, m ∈ Z. If nm is odd, then also n and m are odd.

Note: We will prove this theorem by contrapositive, i.e. we will prove


n even or m even ⇒ nm even.
Strictly speaking, we have to distinguish two cases: (1) n even, (2) m even.
(The case ‘n even, m even’ is covered by both (1) and (2).)
However, the conclusion (‘nm even’) is symmetric in n and m. Therefore,
we may assume without loss of generality that n is even.

Proof (by contrapositive).


Without loss of generality, we assume that n is even. Then n = 2k for
some integer k. Hence,
nm = (2k)m = 2(km)
where km is an integer. Thus, nm is even.
Evelina Erlacher Think Maths! 90 / 288
Techniques of proof Common methods for proving . . .

5 Techniques of proof
Direct proof
Proof by contrapositive
Proof by contradiction
Without loss of generality
Common methods for proving . . .
Counterexamples
Induction
Common mistakes
Further examples

Evelina Erlacher Think Maths! 91 / 288


Techniques of proof Common methods for proving . . .

Common methods for proving . . .

. . . eqivalences: To prove P ⇔ Q, break the proof into an ‘if’ part and


an ‘only if’ part, i.e. prove Q ⇒ P and P ⇒ Q separately.

. . . that one set is a subset of another: To prove A ⊆ B use the


definition, i.e. prove the implication ‘If x ∈ A, then x ∈ B’.

. . . that two sets are equal: If you cannot show A = B directly, prove
that A ⊆ B and B ⊆ A.

. . . equations: To show that an equation holds it is generally better to


choose the more complicated side of the equation and make substitutions
to reduce that expression to the other side.
If you cannot show a = b by a direct calculation, prove that a ≤ b and
b ≤ a.

Evelina Erlacher Think Maths! 92 / 288


Techniques of proof Common methods for proving . . .

Common methods for proving . . .


. . . a statement of the form ‘∀xx ∈ S : P (xx )’: Start with ‘Let x be
an (arbitrary) element of S.’ Then prove that P(x) holds for this arbitrary
x. Since x was arbitrary in S, we can conclude that ∀x ∈ S : P(x).
Theorem 5.8
∀x, y ∈ Q : x + y ∈ Q.

Proof.
Let x, y ∈ Q. Then, by definition, there exist a, b, c, d ∈ Z such that
x = ba and y = dc . Hence,
a c ad + bc
x +y = + = .
b d bd
Since ad + bc ∈ Z and bd ∈ Z, we conclude that x + y ∈ Q.
Note: Every statement of the form ‘∀x ∈ S : P(x)’ can be rewritten as
the implication ‘x ∈ S ⇒ P(x)’.
Evelina Erlacher Think Maths! 93 / 288
Techniques of proof Common methods for proving . . .

Common methods for proving . . .


. . . a statement of the form ‘∃xx ∈ S : P (xx )’: You only have to find
one particular value of x ∈ S for which P(x) is true. Start the proof with
‘Choose x = (the value you decided on)’ and proceed to prove P(x) for
this value of x.

Theorem 5.9
∃x, y ∈ Z : 168x + 238y = 126.

Proof.
Choose x = −63 and y = 45. Then

168x + 238y = 168 · (−63) + 238 · 45 = −10584 + 10710 = 126.

Note: In general, such a proof does not show how the proof finder came
up with the particular value of x (and y ) at the start of the proof.

Evelina Erlacher Think Maths! 94 / 288


Techniques of proof Common methods for proving . . .

Theorem 5.10
For every odd integer a there exist integers b and c such that a = b 2 − c 2 .

Note: The Theorem can be rewritten as


∀a ∈ Zodd ∃b, c ∈ Z : a = b 2 − c 2
where Zodd denotes the set of odd integers.

Proof.
Let a be an odd integer. Then, by definition, there exists k ∈ Z such that
a = 2k + 1. Choose b = k + 1 and c = k. Then

b 2 − c 2 = (k + 1)2 − k 2 = k 2 + 2k + 1 − k 2 = 2k + 1 = a.

Evelina Erlacher Think Maths! 95 / 288


Techniques of proof Common methods for proving . . .

Proof by cases
One can sometimes prove a statement by:
1 dividing the situation into cases which exhaust all the possibilities,

and then
2 showing that the statement follows in all cases.

It’s important to cover all the possibilities.


Theorem 5.11
Let x, y ∈ R. Then |x · y | = |x| · |y |.
Proof.
Case 1: x ≥ 0, y ≥ 0: Then xy ≥ 0, and hence, |xy | = xy = |x||y |.
Case 2: x < 0, y < 0: Then xy > 0, and hence,
|xy | = xy = (−x)(−y ) = |x||y |.
Case 3: x ≥ 0, y < 0: Then xy ≤ 0, and hence,
|xy | = −(xy ) = x(−y ) = |x||y |.
Case 4: x < 0, y ≥ 0: analogous to case 3.
Evelina Erlacher Think Maths! 96 / 288
Techniques of proof Counterexamples

5 Techniques of proof
Direct proof
Proof by contrapositive
Proof by contradiction
Without loss of generality
Common methods for proving . . .
Counterexamples
Induction
Common mistakes
Further examples

Evelina Erlacher Think Maths! 97 / 288


Techniques of proof Counterexamples

Theorem 5.12
Let n and m be integers. If both n and m are even, then nm is even.
To prove this implication we have to show that the product of two
arbitrary even integers is even (this is left as an exercise). An implication
is true if and only if it is true for all instances.
We can now ask, if also the converse is true:
Incorrect Theorem
Let n and m be integers. If nm is even, then both n and m are even.
This implication is generally false. To prove that an implication is generally
false it suffices to give one example that contradicts the implication. One
and only one is needed. Such an example is called a counterexample.
Counterexample
Let n = 2 and m = 3.
Then: LHS: ‘nm = 2 · 3 = 6 is even’ is true
RHS: ‘n = 2 is even and m = 3 is even’ is false
Evelina Erlacher Think Maths! 98 / 288
Techniques of proof Counterexamples

Such a situation is often summarized as

n, m integers and nm even ; n even and m even.

Note: The notation P ; Q only says, that at least one example exists
such that P ⇒ Q is false, i.e. that P ∧ ¬Q is true. However, P ; Q does
not mean that P ⇒ Q is always false!

Example 5.13
Again, consider the generally false implication

n, m integers and nm even ⇒ n even and m even.

For n = 2 and m = 3 the implication is false (that was our


counterexample). However, for n = 2 and m = 6 the implication is true.

Evelina Erlacher Think Maths! 99 / 288


Techniques of proof Counterexamples

Example 5.14
Are the following implications true? Prove your answer!
Note: To prove that an implication is generally false give a
counterexample.
1 x2 = y2 ⇒ x = y (x, y ∈ R)
Answer: In general, the statement is false.
Counterexample: x = 1, y = −1.
Then: LHS: 12 = (−1)2 is true
RHS: 1 = −1 is false.
2 5|(a2 − 1) ⇒ 5|(a + 1) (a ∈ Z)
Answer: In general, the statement is false.
Counterexample: a = 6.
Then: LHS: 5|(62 − 1) = 35 is true
RHS: 5|(6 + 1) = 7 is false.
Evelina Erlacher Think Maths! 100 / 288
Techniques of proof Induction

5 Techniques of proof
Direct proof
Proof by contrapositive
Proof by contradiction
Without loss of generality
Common methods for proving . . .
Counterexamples
Induction
Common mistakes
Further examples

Evelina Erlacher Think Maths! 101 / 288


Techniques of proof Induction

Induction is applied when we have an infinite number of statements


indexed by the natural numbers such as
n
X 1
i = n(n + 1) for all n ∈ N.
2
i=1

Theorem 5.15 (Principle of mathematical induction)


Let P(n) be an infinite collection of statements with n ∈ N. Suppose that
(i) P(1) is true, and
(ii) ∀k ∈ N : P(k) ⇒ P(k + 1).
Then P(n) is true for all n ∈ N.

Checking condition (i) is called the initial step.


Checking condition (ii) is called the inductive step.
Assuming that P(k) is true for some k in (ii) is called the inductive
hypothesis.

Evelina Erlacher Think Maths! 102 / 288


Techniques of proof Induction

Pn
We will prove that i=1 i = 21 n(n + 1) for all n ∈ N.

The statement
n
X 1
i = n(n + 1)
2
i=1

is indexed by n, so we call it P(n).

Initial step: We have to show that P(1) is true. For n = 1, the left-hand
side is
Xn X1
i= i =1
i=1 i=1

and on the right-hand side we have


1 1
n(n + 1) = · 1 · (1 + 1) = 1.
2 2
Hence, P(1) is true.

Evelina Erlacher Think Maths! 103 / 288


Techniques of proof Induction

Inductive step: We have to prove that if the statement P(k) is true, then
P(k + 1) is true as well. Let us assume that P(k) is true for some
arbitrary k (inductive hypothesis). That is,
k
X 1
i = k(k + 1).
2
i=1

We want to show the truth of P(k + 1) which has the form


k+1
X 1
i = (k + 1)((k + 1) + 1).
2
i=1

Evelina Erlacher Think Maths! 104 / 288


Techniques of proof Induction

We have
k+1 k
!
X X
i = i + (k + 1)
i=1 i=1
 
ind. hyp. 1
= k(k + 1) + (k + 1)
2
 
1
= (k + 1) k +1
2
1
= (k + 1) (k + 2)
2
1
= (k + 1)((k + 1) + 1).
2
Thus, P(k + 1) is true if P(k) is true.

Therefore, by the principle of mathematical induction the statement P(n)


is true for all n ∈ N.
Evelina Erlacher Think Maths! 105 / 288
Techniques of proof Induction

The shorter clean copy of the theorem and its proof:


Theorem 5.16
n
P
∀n ∈ N : i = 12 n(n + 1)
i=1

Proof (by induction).


Initial step: The claim holds for n = 1: 
P1 
LHS : i=1 i = 1 ⇒ LHS = RHS
RHS : 21 n(n + 1) = 21 · 1 · (1 + 1) = 1 
P
Inductive step: Suppose the claim is true for n, i.e. ni=1 i = 21 n(n + 1)
(=inductive hypothesis (IH)). Then the claim is true for n + 1:
n+1
 n 
P P (IH)
LHS: i = i + (n + 1) = 21 n(n + 1) + (n + 1) = 12 n2 + 32 n + 1
i=1 i=1
1 1 2 1 2
RHS: 2 (n + 1)((n + 1) + 1) = 2 (n + 2n + n + 2) = 2n + 23 n + 1
n+1
P
⇒ i = 21 (n + 1)((n + 1) + 1).
i=1
Evelina Erlacher Think Maths! 106 / 288
Techniques of proof Common mistakes

5 Techniques of proof
Direct proof
Proof by contrapositive
Proof by contradiction
Without loss of generality
Common methods for proving . . .
Counterexamples
Induction
Common mistakes
Further examples

Evelina Erlacher Think Maths! 107 / 288


Techniques of proof Common mistakes

Don’t assume what has to be proved


Theorem 5.17
If a and b are real numbers, then a2 + b 2 ≥ 2ab.

Fallacious proof.
We have

a2 + b 2 ≥ 2ab ⇒ a2 − 2ab + b 2 ≥ 0 ⇒ (a − b)2 ≥ 0.

The last inequality is true as the square of a number is always


non-negative, so a2 + b 2 ≥ 2ab.
The error here is that the conclusion (that is the statement to be proved)
has been assumed and has led to something we know is true. However, we
cannot conclude that a statement is true just because it implies a known
truth.

Evelina Erlacher Think Maths! 108 / 288


Techniques of proof Common mistakes

In this case the real proof is just a reverse of the argument:


Correct proof.
Let a and b be real numbers. Then (a − b)2 ≥ 0 since the square of a
number is always non-negative. Hence, we have

(a − b)2 ≥ 0 ⇒ a2 − 2ab + b 2 ≥ 0 ⇒ a2 + b 2 ≥ 2ab,

thereby concluding the proof.

Evelina Erlacher Think Maths! 109 / 288


Techniques of proof Common mistakes

Don’t divide by zero


Incorrect Theorem
1 = 2.

Fallacious proof.
We start with a = b. Then
a = b |·b
ab = b2 | + b2
b 2 + ab = 2b 2 | − 2ab
b 2 + ab − 2ab = 2b 2 − 2ab
1(b 2 − ab) = 2(b 2 − ab) | : (b 2 − ab)
1 = 2,

thereby concluding the proof.

Evelina Erlacher Think Maths! 110 / 288


Techniques of proof Common mistakes

Obviously, the proof must contain a mistake. Where?

Answer: When we divide by b 2 − ab we divide by zero. The term b 2 − ab


is zero since we assumed that a = b.

Evelina Erlacher Think Maths! 111 / 288


Techniques of proof Further examples

5 Techniques of proof
Direct proof
Proof by contrapositive
Proof by contradiction
Without loss of generality
Common methods for proving . . .
Counterexamples
Induction
Common mistakes
Further examples

Evelina Erlacher Think Maths! 112 / 288


Techniques of proof Further examples

Theorem 5.18
∀a ∈ R\{1} ∃x ∈ R : ax + 1 = x.
Finding the proof: Solve the equation for x:

ax + 1 = x |−1−x
⇔ x(a − 1) = −1 | : (a − 1)
| {z }
1 6=0
⇔ x=
1−a
Hence, given some a ∈ R\{1}, we have found a solution x of the equation.
However, we still have to write up the proof in a formally correct way:
Proof (direct).
1
Let a ∈ R\{1}. Set x = 1−a , which is defined since a 6= 1. Then

1 a+1−a 1
ax + 1 = a +1= = = x.
1−a 1−a 1−a
Evelina Erlacher Think Maths! 113 / 288
Techniques of proof Further examples

Theorem 5.19
For odd integers n and m the product nm is odd.
Note: We could rewrite the Theorem as
∀n, m ∈ Zodd : nm ∈ Zodd .
or as
n, m ∈ Zodd ⇒ nm ∈ Zodd
In any case, a direct proof will always start with ‘let n, m ∈ Zodd ’ or ‘let n
and m be odd integers’.
Proof (direct).
Let n and m be odd integers. Then, by definition, n = 2k + 1 and
m = 2j + 1 for integers k and j. Hence,

nm = (2k + 1)(2j + 1) = 4kj + 2k + 2j + 1 = 2(2kj + k + j) + 1.

That is, nm can be written as 2r + 1, where r is the integer 2kj + k + j.


Therefore, nm is odd.
Evelina Erlacher Think Maths! 114 / 288
Techniques of proof Further examples

Theorem 5.20
Qn Pn
Let ai > 0 for i = 1, . . . , n. Then i=1 (1 + ai ) > 1+ i=1 ai for all n ≥ 2.

Proof (by induction).


Initial step: The inequality holds for n = 2:
Q2
LHS: i=1 (1 + ai ) = (1 + a1 )(1 + a2 ) = 1 + a1 + a2 + a1 a2
P2
RHS: 1 + i=1 ai = 1 + a1 + a2
Since a1 , a2 > 0 also a1 a2 > 0, and hence, LHS > RHS.
Inductive step: Suppose the inequality is true for n (=inductive
hypothesis (IH)). Then the inequality is true for n + 1:
n+1 n
! n
!
Y Y (IH) X
(1 + ai ) = (1 + ai ) · (1 + an+1 ) > 1 + ai · (1 + an+1 )
i=1 i=1 i=1
n
! n n+1
X X X
= 1+ ai + an+1 + an+1 ai > 1 + ai .
i=1 i=1 i=1
| {z }
>0
Evelina Erlacher Think Maths! 115 / 288
Techniques of proof Further examples

Theorem 5.21
There are infinitely many prime numbers.

Proof (by contradiction).


Assume to the contrary that there are only finitely many prime numbers,
and all of them are listed as follows:
p1 , p2 , . . . , pn .
Consider the number
q = p1 p2 . . . pn + 1.
Since q is different from all n prime numbers, q cannot be prime
(otherwise it would be on the list). Hence, q has to be divisible by at least
one prime number on the list. However, dividing q by any of the listed
primes pi always results in a remainder of 1 for each i = 1, 2, . . . , n. Thus,
q has to be prime, which is a contradiction to our assumption that all
primes are in the list p1 , p2 , . . . , pn .

Evelina Erlacher Think Maths! 116 / 288


Techniques of proof Further examples

Theorem 5.22
Let n ∈ Z. If (n − 3)2 is not divisible by 9, then n is not divisible by 6.

Proof (by contrapositive).


Suppose that 6|n. Then n = 6k for some integer k. Hence,

(n − 3)2 = (6k − 3)2 = 36k 2 − 36k + 9 = 9 · (4k 2 − 4k + 1).

Since 4k 2 − 4k + 1 ∈ Z, we conclude that 9|(n − 3)2 .

Evelina Erlacher Think Maths! 117 / 288


Techniques of proof Further examples

Example 5.23
True or false? Prove your answer!
Note: To prove a statement starting with a chain of quantifiers is false
show that its negation is true. (In the case of a statement starting with
the universal quantifier this means one has to find a counterexample.)
1 ∀x ≥ 0 ∃y ∈ R : xy < 0
Answer: The statement is false. We prove that its negation is true.
Claim: ∃x ≥ 0 ∀y ∈ R : xy ≥ 0
Proof: Choose x = 0. Let y ∈ R. Then xy = 0 · y = 0 ≥ 0. 2
2 ∃x ∈ N ∀y ∈ Q : xy ∈ Z
Answer: The statement is false. We prove that its negation is true.
Claim: ∀x ∈ N ∃y ∈ Q : xy ∈ /Z
1
Proof: Let x ∈ N. Choose y = x+1 . Then y ∈ Q, but
x
xy = x+1 ∈ (0, 1). Hence, xy ∈
/ Z. 2

Evelina Erlacher Think Maths! 118 / 288


Techniques of proof Further examples

Example 5.24
True or false? Prove your answer!

1 ∀A ⊆ Z, A 6= ∅ ∃B ( Z : A ∪ B = Z
Answer: The statement is true.
Proof: Let A ⊆ Z with A 6= ∅. Choose B = Z\A. From A 6= ∅ it
follows that B ( Z. Finally, A ∪ B = A ∪ (Z\A) = Z. 2
2 A\B ⊆ C ⇒ A ⊆ C (A, B, C sets)
Answer: In general, the statement is false.
Counterexample: A = {1, 2}, B = {2}, C = {1}.
Then: LHS: A\B = {1} ⊆ C is true
RHS: A = {1, 2} ⊆ {1} = C is false.

Evelina Erlacher Think Maths! 119 / 288

You might also like