BasicLogic2 Part2
BasicLogic2 Part2
Luca Incurvati
L.Incurvati@uva.nl
3 Strong Induction
Suppose you have proved P(0) and that for all n, if n has P, then so
does n + 1.
Then, pick a natural number m. You’d be justified in writing down:
0 has P
if 0 has P then 1 has P
...
if m − 1 has P, then m has P.
By m-many applications of modus ponens, you can conclude that m
has P.
Since m was arbitrary, the point generalizes: every number has P.
(Will this convince the sceptic?)
Mathematical Induction
Goal: Something of the form ∀n ∈ NP(n).
Strategy:
1 Prove P(0). [This is called the base case or base clause.]
2 Prove ∀n ∈ N(P(n) → P(n + 1)). [This is called the induction step or
inductive clause.]
Scratch work
Before using strategy:
Givens Goal
— ∀n ∈ NP(n)
—
After using strategy:
Givens Goal
— P(0)
— ∀n ∈ N(P(n) → P(n + 1))
Proof.
Base case: Proof of P(0).
Induction step: Proof of ∀n ∈ N(P(n) → P(n + 1)).
Scratch work
One of the goals in the Scratch work above is a universally quantified
statement. To prove it, we typically let n be an arbitrary number and
suppose that P(n) holds. Doing this we go from:
Givens Goal
— ∀n ∈ N(P(n) → P(n + 1))
—
to:
Givens Goal
n ∈ N P(n + 1)
P(n)
Theorem
Every natural number is either even or odd.
Theorem
Every natural number is either even or odd.
Scratch work
Our induction property is, of course, x is either even or odd.
To say that a natural number n is even is to say that there is a k such
that n = 2k.
And to say that n is odd is to say that there is a k such that
n = 2k + 1.
The base case is obvious; to prove the induction step, we let n be an
arbitrary number and suppose that it has the induction property. We
then show on this basis that n + 1 also has the induction property.
And, in this case, that’s easy!
Proof.
By mathematical induction.
Base case: Clearly, 0 = 2 · 0, so 0 has the induction property.
Induction step: Let n be an arbitrary natural number and suppose that n
has the induction property. There are two cases to consider.
Suppose n is even, i.e. n = 2k for some k. Then n + 1 = 2k + 1, i.e.
n + 1 is odd.
Suppose n is odd, i.e. n = 2k + 1 for some k. Then
n + 1 = 2k + 2 = 2(k + 1). i.e. n + 1 is even.
Either way, n + 1 has the induction property, as required.
Theorem
n2 +n
For all n ∈ N, 0 + 1 + 2 + · · · + n = 2 .
Theorem
n2 +n
For all n ∈ N, 0 + 1 + 2 + · · · + n = 2 .
Scratch work
The base case is easy. To prove the induction step, we consider that
we have the following givens and goal:
Givens Goal
n∈N 0 + 1 + 2 + · · · + n + (n + 1) =
n2 +n (n+1)2 +(n+1)
0 + 1 + 2 + ··· + n = 2 2
Proof.
By mathematical induction.
2
Base case: Clearly, 0 = 0 2+0 , so 0 has the induction property.
Induction step: Let n be an arbitrary natural number and suppose that n
has the induction property, that is
n2 + n
0 + 1 + 2 + ··· + n =
2
Then, we have
n2 +n
0 + 1 + 2 + · · · + n + (n + 1) = 2 + (n + 1)
n2 +n+2(n+1)
= 2
(n2 +2n+1)+(n+1)
= 2
(n+1)2 +(n+1)
= 2 .
Example
n(n+1)(n+2)
Prove that for all n ∈ N, 0 · 1 + 1 · 2 + 2 · 3 + · · · + n(n + 1) = 3 .
Example
n(n+1)(n+2)
Prove that for all n ∈ N, 0 · 1 + 1 · 2 + 2 · 3 + · · · + n(n + 1) = 3 .
Scratch work
We proceed as before. The base case is easy. To prove the induction
step, we consider that we have
n(n + 1)(n + 2)
0 · 1 + 1 · 2 + 2 · 3 + · · · + n(n + 1) =
3
as the induction hypothesis and
(n + 1)(n + 2)(n + 3)
0·1+1·2+2·3+· · ·+n(n+1)+(n+1)(n+2) =
3
as our goal.
Luca Incurvati (L.Incurvati@uva.nl) Basic Logic 2 14 / 36
Proof by mathematical induction
Proof.
By mathematical induction.
Base case: Clearly, 0 · (0 + 1) = 0(0+1)(0+2)
3 .
Induction step: Let n be an arbitrary natural number and suppose
n(n + 1)(n + 2)
0 · 1 + 1 · 2 + 2 · 3 + · · · + n(n + 1) =
3
Then, we have
0 · 1 + 1 · 2 + 2 · 3 + ···+
n(n+1)(n+2)
+n(n + 1) + (n + 1)(n + 2) = 3 + (n + 1)(n + 2)
n(n+1)(n+2)+3(n+1)(n+2)
= 3
(n+1)(n+2)(n+3)
= 3 .
3 Strong Induction
Theorem
For every set A, if A has n elements, then P(A) has 2n elements.
Theorem
For every set A, if A has n elements, then P(A) has 2n elements.
Scratch work
Our induction property is for every set A, if A has x elements, then
P(A) has 2x elements.
The base case is easy. To prove the induction step, we consider that
our induction hypothesis is: for every set A, if A has n elements, then
P(A) has 2n elements; and our goal is: for every set A, if A has
(n + 1) elements, then P(A) has 2(n+1) elements.
Proof.
By mathematical induction.
Base case: If A has 0 elements, then A = ∅, and P(∅) = {∅}, which has
1 = 20 elements.
Induction step: Let n be an arbitrary natural number and suppose that n
has the induction property, that is suppose that for every set A with n
elements, P(A) has 2n elements. Now suppose that A has n + 1 elements.
Let a be any element of A and let B = A \ {a}. Since B has n elements,
P(B) has, by the induction hypothesis, 2n elements. Now there are two
kinds of subsets of A: those that contain a as an element and those that
do not. The latter are just the subsets of B, and so there are 2n of these,
since P(B) has 2n elements. The former are sets of the form X ∪ {a},
where X ∈ P(B), and there are 2n of these as well, since P(B) has 2n
elements. So P(A) has 2n + 2n = 2n+1 elements.
3 Strong Induction
The idea is the following. Suppose you have proved the supposition.
Then, if you instantiate the supposition with 0, you get that if all
numbers less than 0 have P, then 0 itself has P.
But (trivially) all numbers less than 0 have P (for there are none), so
P(0).
Now instantiate the supposition with 1. Then you get that if all
numbers less than 1 have P, then 1 itself has P.
There is only one number less than 1, namely 0, and we know that 0
has P. So P(1).
And you know how this continues. . .
But we can in fact prove the Principle of Strong Induction from the
Principle of Mathematical Induction (and the converse can also be
done):
Theorem
The Principle of Mathematical Induction implies the Principle of Strong
Induction.
Proof.
Suppose that for every n, if all the numbers less than n have P, then n
itself has P. We want to show that every number has P. To this end, we
let Q be the property every number less than x has P. We can now
establish the claim by mathematical induction.
Base case: 0 has Q vacuously, since 0 is the smallest number.
Induction step: Let n be an arbitrary number and suppose that n has Q.
That is, suppose that every number less than n has P. But our initial
supposition was that for every n, if all numbers less than n have P, then n
itself has P. So we can conclude that n has P. Hence, every number less
than n + 1 has P, that is to say n + 1 has Q.
Strong Induction
Goal: Something of the form ∀n ∈ NP(n).
Strategy:
1 Prove ∀n((∀k < nP(k)) → P(n)), where n and k range over natural
numbers.
Scratch work
Thus, typically we go from:
Givens Goal
— ∀n ∈ NP(n)
—
to:
Givens Goal
— P(n)
—
n∈N
∀k < nP(k)
Theorem
Every number greater than 1 is either prime or a product of primes.
Theorem
Every number greater than 1 is either prime or a product of primes.
Proof.
We use strong induction. Let n be an arbitrary number greater than 1 and
suppose that for every k, if 1 < k < n, then k is either prime or a product
of primes. If n is prime, then we are done. If n is not prime, then n = ab
with both n > a and n > b. Since n = ab > a, it must be the case that
b > 1, and similarly for b. Thus, by the induction hypothesis, each of a
and b is either prime or a product of primes. But then n = ab is also a
product of primes.
3 Strong Induction
Proof by induction
Complexity
Proposition
(i) is the base clause of the induction. Typically, we show that (ii)
holds by supposing that ϕ has P (induction hypothesis) and showing
that ¬ϕ has P under this supposition. Similarly for cases (iii)–(v).
Induction on the complexity of sentences of LPL can be proved by
using ordinary induction.
Luca Incurvati (L.Incurvati@uva.nl) Basic Logic 2 33 / 36
Induction on complexity of sentences
Example