Mathematical Logic
Mathematical Logic
Mathematical Logic
I Induction 1
I.A The Planet X Rule . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
I.B Induction Principle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
I.C Examples for Induction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
I Induction I.1
I Induction
Induction is a mathematical technique for proving an infinite sequence of statements S(n) indexed by integers.
To explain it informally first, we begin with an excursion.
Assume there is some planet X out there, similar to our planet but with one significant difference. The
weather on planet X is determined by the following rule:
Please think about each statement and find all those statements that are warranted by the rule.
Mathematically, the weather rule for planet X can be stated as follows: For every day n, we have a statement
— that may be true or false:
S(n): It rains on the day numbered n.
We also have a rule:
S(n) =⇒ S(n + 1), (read: S(n) implies S(n + 1)).
In plain English, if it rains one day (with number n), it will rain the next day (with number n + 1).
Assume you arrive on day 10. Alternative (A) says that S(10) is false, as it does not rain on that day. From
a false hypothesis, everything can happen! Thus we do not know whether it will rain on day 11, day 110, day
110000. . .
But we can conclude that it didn’t rain yesterday! Had it rained on day 9, S(9) were true and then also
S(10) must be true, as S(9) entrains S(10) by the rule given. Going back in time, we obtain that it has
never rained before you arrived.
I.2 I.B Induction Principle
Alternative (B) says that S(10) is true — it rains the day you arrive. Thus, for n = 10, the hypothesis is
true and so must be S(11) — it will rain tomorrow. Going forward, we see that S(10 + n) must be true for
every n ≥ 0, i.e. it will rain every day to come! As to yesterday or any other day in the past, we cannot
conclude anything!
In conclusion, (b), (c), (f), (h) are true statements that can be inferred from the given rule, but we have no
way of knowing whether (a), (d), (e) or (g) are true, they cannot be concluded or validated from the rule.
If we can show that the induction step holds, “if S(n) is true then S(n + 1) must be true”, but S(10) is
false, we can at least conclude that S(n) is false for every n ≤ 10 — but we cannot conclude anything about
S(11) or S(n) for n > 10.
Example 1. The statement S(n) is: 2n > n. We claim it holds true for every integer n ≥ 1.
Proof:
(∗) (∗∗)
Induction Step: 2n+1 = 2(2n ) > 2n = n + n ≥ n + 1.
I.C Examples for Induction I.3
(∗) Aside from the Induction Hypothesis (I.H.), that 2n > n, we need here that, for arbitrary real numbers a, b, c, whenever a < b
and 0 < c, then ac < bc.
(∗∗) Here we use that for an arbitrary number c, we have (a ≥ b =⇒ c + a ≥ c + b), and we apply it to a = n, b = 1, c = n. Note
that a ≥ b, i.e. n ≥ 1, by hypothesis.
Therefore by the Induction principle, we have proved that 2n > n for every n ≥ 1.
This shows that S(n) is certainly not generally true for n < 5 ! But with the
Basis of Induction: S(5) is true, (as just seen),
Hypothesis of Induction: S(n) is true for some n ≥ 5,
we will now perform the
Induction Step: S(n) =⇒ S(n + 1), provided n ≥ 5.
Proof: Here the proof of the induction step (or rule) is more complicated. First we spell out S(n + 1). It
asserts: 2n+1 > (n + 1)2 = n2 + 2n + 1.
The hypothesis yields: 2n > n2 and thus also 2n+1 = 2 · 2n > 2n2 , as again (a > b, c > 0 =⇒ ca > cb).
If we can show that 2n2 ≥ n2 + 2n + 1 for n ≥ 5, we win. Now
2n2 ≥ n2 + 2n + 1
⇐⇒ n2 − 2n − 1 ≥ 0 (=⇒: subtract n2 + 2n + 1 from both sides
⇐=: add n2 + 2n + 1 to both sides,
using (a ≥ b, c arbitrary =⇒ a + c ≥ b + c).)
=⇒ n2 − 2n − 1 ≥ 0 =⇒ 2n2 ≥ n2 + 2n + 1,
so finally we have
2n+1 > 2n2 by induction hypothesis.
2n2 ≥ n2 + 2n + 1 = (n + 1)2 for n ≥ 5 as just seen,
hence, as a > b, b ≥ c =⇒ a > c,
2n+1 > (n + 1)2 ,
which is the desired claim S(n + 1). 2
2 2
√ that 2n ≥ n + 2n + 1 for n ≥ 5 —√and indeed we saw that
The most laborious part was to establish
this inequality holds for all n ≥ 1 + 2, that is, for all integers n ≥ 3 > 1 + 2 ! So why couldn’t we
conclude S(n + 1) for n = 3? The reason is that the above proof still shows S(3) =⇒ S(4), so that S(4)
I.C Examples for Induction I.5
were true if S(3) were true — but unfortunately S(3) does not hold and so it is of no use here to know that
18 = 2 · 32 ≥ 32 + 2 · 3 + 1 = 16 ! This emphasizes the crucial role of the induction hypothesis and the care
that has to be exercised formulating it.
The following examples employ two useful notations, Σ–notation for sums and ! for factorials. If you don’t
know these yet, look at . . .
Example 4. We claim that the following equality holds for every integer n = 0, 1, 2, . . . :
n
X n(n + 1)
S(n) : i= .
i=0
2
0(0+1)
Proof: When n = 0 the statement S(n) reads S(0) : 0 = 2 and this is obviously true.
Suppose S(n) is true for some n. Then we verify that S(n + 1) must be true. Indeed S(n + 1) reads
n+1
X (n + 1)(n + 2)
S(n + 1) : i= .
i=0
2
Now
n+1 n
!
X X
i = i + (n + 1)
i=0 i=0
n(n + 1)
= +n+1 because we assumed S(n) was true
2
n
= (n + 1) +1
2
(n + 1)(n + 2)
= .
2
i.e., we have verified S(n + 1).
We have now checked that
• S(0) is true
• If S(n) is true then S(n + 1) must be true.
The principle of induction asserts that then S(n) is true for every n ≥ 0.
n
n(n+1)(2n+1)
i2 =
P
Example 5. 6 .
i=0
Proof:
n(n + 1)(2n + 1)
= + (n + 1)2
6
n+1 2
= 2n + n + 6n + 6
6
(n + 1)(n + 2)(2n + 3)
=
6
(n + 1)[(n + 1) + 1][2(n + 1) + 1]
= .
6
Thus if S(n) is true, so is S(n + 1).
n h i2
n(n+1)
i3 =
P
Example 6. (Nicomachus’ Theorem, 100AD). For every n ≥ 0, 2 .
i=0
4 h i2
4(4+1)
i3 = 1 + 8 + 27 + 64 = 100 and = 102 = 100, thus the statement above is true for
P
Illustration: 2
i=1
n = 4.
Proof by induction:
0 h i2
0(0+1)
i3 = 03 = 0 =
P
Basis: 2
i=0
3
n h i2
n(n+1)
i3 =
P
Induction Hypothesis: 2 is true for some n ≥ 0.
i=0
n+1 n h i2
n(n+1)
i3 = i3 + (n + 1)3 + (n + 1)3
P P
Induction Step: = 2
i=0 i=0 Induction Hypothesis
h i h 2 i h 2
i h i2
n 2 2 (n+2) (n+1)(n+2)
+ (n + 1) = (n + 1)2 n +4n+4
= (n + 1)2 2 4 = (n + 1) 4 = 2 .
n
r n+1 −1
ri =
P
Example 7. r−1 if r 6= 1.
i=0
(Remark that the LHS makes sense also for r = 1, but the RHS doesn’t!)
Proof:
1
Example 8. What is the value of the 37th derivative of f (x) = 1+x at x = 0?
Solution: It seems pointless to differentiate 37 times! Instead, we calculate the first few derivatives, try to
discover a pattern and then establish the pattern by induction. (We use the following notation: f 0 (x) denotes
0
the derivative of a function f (x); f (n) (x) denotes the nth derivative of f (x), so that f (n+1) (x) = f (n) (x) .)
Lets check the first few derivatives:
1
f (x) = 1+x thus f (0) = 1
−1
f 0 (x) = (1+x)2 thus f 0 (0) = −1
(−1)(−2)
f (2) (x) = (1+x)3 thus f (2) (0) = (−1)(−2) = 2
(−1)(−2)(−3)
f (3) (x) = (1+x)4 thus f (3) (0) = (−1)(−2)(−3) = −6
1 (−1)(−2)···(−n) (−1)n n!
S(n) : The nth derivative of f (x) = 1+x is f (n) (x) = (1+x)n+1 = (1+x)n+1 for n ≥ 1.
(−1)···(−n)
Induction Step: If S(n) : f (n) (x) = (1+x)n+1 holds, then
0 0 0
(n+1)
(n) (−1) · · · (−n) 1
f (x) = f (x) = = (−1) · · · (−n) ·
I.H. (1 + x)n+1 (1 + x)n+1
−n − 1 (−1) · · · (−n)(−(n + 1))
= (−1) · · · (−n) · n+2
=
(1 + x) (1 + x)(n+1)+1
and thus S(n + 1) follows from S(n).
We have now established our guess and can easily answer the original question:
I.8 I.C Examples for Induction
1
The value at x = 0 of the 37th derivative of f (x) = 1+x is:
−(37!)
f (37) (0) = = −(37!)
(1 + 0)38
= −13763753091226345046315979581580902400000000 ≈ −1.37638 · 1043 .
Example 9. We claim:
All students are the same age. We prove this by induction on the number of students:
S(1): If there is just one student then he/she is clearly of the same age as him-/herself.
S(n) ⇒ S(n + 1): Assume n + 1 students are numbered 1 through n + 1. The students 1 through n are of
the same age by induction hypothesis and so are the students 2 through n + 1. But then clearly student 1
is of the same age as the students 2 through n and student n + 1 is of that age too. Hence student 1 and
n + 1 are of the same age as the others, so they are all of the same age.
What, if anything, is wrong?
Solution: Look at the first case that is clearly nonsense. This happens here for S(2): Not any two students
are of the same age. As S(1) is true, the mistake lies thus in the proof of the implication S(1) ⇒ S(2).
Indeed, how many students labelled 2 through 1 (= n) are there? None. Hence student 1 is of the same
age as “no” student and nothing can be concluded! Observe however, that if S(2) were true, ie. any two
students were of same age, then clearly S(n) were true for all n ≥ 1 and all students were of the same age.
Example 10. (from D. Knuth, “The Art of Computer Programming”, Vol. 1, 1.2.1, Exercise 2. This book
is a gold mine — not only for mathematical induction!)
What is wrong with the following proof?
“Theorem”: Let x be any positive number. For all positive integers we have xn−1 = 1.
“Proof”: Let S(n) be the statement: xn−1 = 1.
Statement S(1) is true: If n = 1, xn−1 = x1−1 = x0 = 1.
By induction, assuming the theorem is true for 1, 2, . . . , n, we have
Solution: Again, look for the first case that is obviously wrong: It happens for n = 2 as x2−1 = x1 = x 6= 1
for most positive numbers.
As S(1) is true, the mistake is with the implication S(1) ⇒ S(2). Indeed, the “proof” invokes S(0) which
was not proven — and is wrong: x0−1 = x−1 = x1 is usually not equal to 1. Again, if S(0) and S(1) were
true, S(n) were true for all n ≥ 0 and we would not need to worry about exponentiation!