Induction$\rule{P(0); \forall k. P(k)\rightarrow P(k+1)}{\forall n. P(n)}$
Domain: natural numbers ($\N$).
How do we get $P(5)$ from $P(0)$ and $\forall k. P(k)\rightarrow P(k+1)$?
1. |
First, we have $P(0)$. |
$P(0)$ |
2. |
Since $P(k)\rightarrow P(k+1)$ for all $k$, we have $P(0)\rightarrow P(1)$. |
$\ \Downarrow_{\ P(0)\rightarrow P(1)}$ |
3. |
Applying Modus Ponens to 1 and 2, we get $P(1)$. |
$P(1)$ |
4. |
Since $P(k)\rightarrow P(k+1)$ for all $k$, we have $P(1)\rightarrow P(2)$. |
$\ \Downarrow_{\ P(1)\rightarrow P(2)}$ |
5. |
Applying Modus Ponens to 3 and 4, we get $P(2)$. |
$P(2)$ |
$\vdots$ |
|
$\ \Downarrow_{\ P(k)\rightarrow P(k+1)}$ |
11. |
Applying Modus Ponens to 9 and 10, we get $P(5)$. |
$P(5)$ |
Induction$\rule{P(0); \forall k. P(k)\rightarrow P(k+1)}{\forall n. P(n)}$
2. |
Let $k\geq0$ be an arbitrary integer |
|
3.1. |
Assume that $P(k)$ is true |
|
Inductive
hypothesis
3.2. |
$\ldots$ |
|
3.3. |
Prove $P(k+1)$ is true |
|
Inductive
step
4. |
$P(k) \rightarrow P(k+1)$ |
Direct Proof Rule |
5. |
$\forall k. P(k) \rightarrow P(k+1)$ |
Intro $\forall$: 2, 4 |
6. |
$\forall n. P(n)$ |
Induction: 1, 5 |
Conclusion
Translating to an English proof: the template
- ① Let $P(n)$ be [ definition of $P(n)$ ].
- We will show that $P(n)$ is true for every integer $n\geq 0$ by induction.
- ② Base case ($n=0$):
- [ Proof of $P(0)$. ]
- ③ Inductive hypothesis:
- Suppose that $P(k)$ is true for an arbitrary integer $k\geq 0$.
- ④ Inductive step:
- We want to prove that $P(k+1)$ is true.
- [ Proof of $P(k+1)$. This proof must invoke the inductive hypothesis somewhere. ]
- ⑤ The result follows for all $n\geq 0$ by induction.
-
2. |
Let $k\geq0$ be an arbitrary integer |
|
3.1. |
Assume that $P(k)$ is true |
|
Inductive
hypothesis
3.2. |
$\ldots$ |
|
3.3. |
Prove $P(k+1)$ is true |
|
Inductive
step
4. |
$P(k) \rightarrow P(k+1)$ |
Direct Proof Rule |
5. |
$\forall k. P(k) \rightarrow P(k+1)$ |
Intro $\forall$: 2, 4 |
6. |
$\forall n. P(n)$ |
Induction: 1, 5 |
Conclusion
Example proofs by induction
Example proofs about sums and divisibility.
Prove $\sum_{i=0}^{n}i = n(n+1)/2$ for all $n\in\N$
- ① Let $P(n)$ be $\sum_{i=0}^{n}i = 0 + 1 + \ldots + n = n(n+1)/2$.
- We will show that $P(n)$ is true for every integer $n\geq 0$ by induction.
- ② Base case ($n = 0$):
- $\sum_{i=0}^{n}i = 0 = 0(0+1)/2$ so $P(0)$ is true.
- ③ Inductive hypothesis:
- Suppose that $P(k)$ is true for an arbitrary integer $k\geq 0$.
- ④ Inductive step:
- We want to prove that $P(k+1)$ is true, i.e., $\sum_{i=0}^{k+1}i = (k+1)(k+2)/2$.
Note that $\sum_{i=0}^{k+1}i = ($$\sum_{i=0}^{k}i$$) + (k + 1) = ($$k(k+1)/2$$) + (k+1)$ by the inductive hypothesis.
From this, we have that $(k(k+1)/2) + (k+1) =$ $(k+1)(k/2 + 1) =$ $(k+1)(k+2)/2$, which is exactly $P(k+1)$.
- ⑤ The result follows for all $n\geq 0$ by induction.
-
What number divides $2^{2n}-1$ for every $n\in\N$?
- Let’s look at a few examples:
- $2^{2*0} - 1 = 1 - 1 = 0 = 3 * 0$
- $2^{2*1} - 1 = 4 - 1 = 3 = 3 * 1$
- $2^{2*2} - 1 = 16 - 1 = 15 = 3 * 5$
- $2^{2*3} - 1 = 64 - 1 = 63 = 3 * 21$
- $2^{2*4} - 1 = 256 - 1 = 255 = 3 * 85$
- It looks like $3 \vert (2^{2n}-1)$.
- Let’s use induction to prove it!
Prove $3 \vert (2^{2n}-1)$ for all $n\in\N$
- ① Let $P(n)$ be $3 \vert (2^{2n}-1)$.
- We will show that $P(n)$ is true for every integer $n\geq 0$ by induction.
- ② Base case ($n = 0$):
- $2^{2 * 0} - 1 = 1 - 1 = 0 = 3*0$ so $P(0)$ is true.
- ③ Inductive hypothesis:
- Suppose that $P(k)$ is true for an arbitrary integer $k\geq 0$.
- ④ Inductive step:
- We want to prove that $P(k+1)$ is true, i.e., $3 \vert (2^{2(k+1)}-1)$.
By inductive hypothesis, $3 \vert (2^{2k}-1)$ so $2^{2k}-1 = 3j$ for some integer $j$. We therefore have that $2^{2(k+1)} - 1 $ $=$ $2^{2k+2} - 1$ $=$ $4($$2^{2k}$$) - 1$ $=$ $4($$3j+1$$) - 1$ $=$ $12j + 3 = 3(4j + 1)$. So $3 \vert (2^{2(k+1)}-1)$, which is exactly $P(k+1)$.
- ⑤ The result follows for all $n\geq 0$ by induction.
-
Induction starting at any integer
Proving theorems about all integers $n\geq b$ for some $b\in\mathbb{Z}$.
Changing the start line
How can we prove $P(n)$ for all integers $n\geq b$ for some integer $b$?
- Define a predicate $Q(n) = P(n+b)$ for all $n\geq0$.
- Then $(\forall n. Q(n))\equiv(\forall n \geq b. P(n))$
- Use ordinary induction to prove $Q$:
- Prove $Q(0) \equiv P(b)$.
- Prove $(\forall k. Q(k)\rightarrow Q(k+1)) \equiv (\forall k\geq b. P(k)\rightarrow P(k+1))$.
By convention, we don’t define $Q$ explicitly.
Instead, we modify our proof template to account for the non-zero base case $b$.
Inductive proofs for any base case $b\in\Z$
- ① Let $P(n)$ be [ definition of $P(n)$ ].
- We will show that $P(n)$ is true for every integer $n\geq b$ by induction.
- ② Base case ($n = b$):
- [ Proof of $P(b)$. ]
- ③ Inductive hypothesis:
- Suppose that $P(k)$ is true for an arbitrary integer $k\geq b$.
- ④ Inductive step:
- We want to prove that $P(k+1)$ is true.
- [ Proof of $P(k+1)$. This proof must invoke the inductive hypothesis. ]
- ⑤ The result follows for all $n\geq b$ by induction.
-
Example: prove $3^n \geq n^2 + 3$ for all $n\geq 2$
- ① Let $P(n)$ be $3^n \geq n^2 + 3$.
- We will show that $P(n)$ is true for every integer $n\geq 2$ by induction.
- ② Base case ($n = 2$):
- $3^2 = 9 \geq 7 = 4 + 3 = 2^2 + 3$ so $P(2)$ is true.
- ③ Inductive hypothesis:
- Suppose that $P(k)$ is true for an arbitrary integer $k\geq 2$.
- ④ Inductive step:
- We want to prove that $P(k+1)$ is true, i.e., $3^{(k+1)} \geq (k+1)^2 + 3$ $=$ $k^2 + 2k + 4$.
Note that $3^{(k+1)} = 3($$3^k$$)$ $\geq$ $3($$k^2+3$$)$ by the inductive hypothesis.
From this we have $3(k^2+3) = 2k^2 + k^2 + 9$ $\geq$ $k^2 + 2k + 4$ $=$ $(k+1)^2 + 3$ since $k\geq 2$.
Therefore $P(k+1)$ is true.
- ⑤ The result follows for all $n\geq 2$ by induction.
-
Induction with a stricter hypothesis
Proving theorems by induction on a stricter hypothesis.
Changing the hypothesis
- Can we use induction to prove $P(n)$ if we can’t show that $P(k) \to P(k+1)$ in the inductive step?
- Usually, but it requires a creative leap!
- Find a predicate $Q(n)$ such that
- $Q(n) \to P(n)$, $Q(0)$, and $Q(k) \to Q(k+1)$.
- Then, we can prove $Q(n)$ by induction and get $P(n)$ by MP.
- We call this using a stricter (or stronger) hypothesis.
Example: prove $\sum_{i=1}^{n}1/i^2 < 2$ for all $n\geq 1$
- ① Let $P(n)$ be $\sum_{i=1}^{n}1/i^2 < 2$.
- We will try to show that $P(n)$ is true for every integer $n\geq 1$ by induction.
- ② Base case ($n = 1$):
- $\sum_{i=1}^{1}1/i^2 = 1/1^2 = 1 < 2$ so $P(1)$ is true.
- ③ Inductive hypothesis:
- Suppose that $P(k)$ is true for an arbitrary integer $k\geq 1$.
- ④ Inductive step:
- We want to prove that $P(k+1)$ is true, i.e, $\sum_{i=1}^{k+1}1/i^2 < 2$.
Note that $\sum_{i=1}^{k+1}1/i^2 = $$\sum_{i=1}^{k}1/i^2$$ + 1/(k+1)^2$.
By the inductive hypothesis, we know that $\sum_{i=1}^{k}1/i^2 < 2$, and
from this we can conclude that $\sum_{i=1}^{k}1/i^2 + 1/(k+1)^2 < 2 + 1/(k+1)^2$. But this is not $P(k+1)$!
We need a stricter hypothesis!
Let’s try $Q(n) := \sum_{i=1}^{n}1/i^2 \leq 2 - 1/n$, noting
that $Q(n) \to P(n)$ for all $n >= 1$.
Prove instead $\sum_{i=1}^{n}1/i^2 \leq 2 - 1/n$ for all $n\geq 1$
- ① Let $Q(n)$ be $\sum_{i=1}^{n}1/i^2 \leq 2 - 1/n$.
- We will show that $Q(n)$ is true for every integer $n\geq 1$ by induction.
- ② Base case ($n = 1$):
- $\sum_{i=1}^{1}1/i^2 = 1/1^2 = 1 \leq 2 - 1/1 = 1$ so $Q(1)$ is true.
- ③ Inductive hypothesis:
- Suppose that $Q(k)$ is true for an arbitrary integer $k\geq 1$.
- ④ Inductive step:
- We want to prove that $Q(k+1)$ is true, i.e, $\sum_{i=1}^{k+1}1/i^2 \leq 2 - 1/(k+1)$. Note that $\sum_{i=1}^{k+1}1/i^2 = $$\sum_{i=1}^{k}1/i^2$$ + 1/(k+1)^2$. By the inductive hypothesis, we know that $\sum_{i=1}^{k}1/i^2 \leq 2 - 1/k$. Adding $ 1/(k+1)^2$ to both sides, we get $\sum_{i=1}^{k}\frac{1}{i^2} + \frac{1}{(k+1)^2} \leq 2 - \frac{1}{k} + \frac{1}{(k+1)^2} = 2 - \frac{(k+1)^2-k}{k(k+1)^2} = 2 - \frac{k^2 + k + 1}{k(k+1)^2} = 2 - \frac{k(k + 1) + 1}{k(k+1)^2}$. Note that $\frac{k(k + 1)}{k(k+1)^2} < \frac{k(k + 1)+1}{k(k+1)^2}$ when $k\geq1$, so $\sum_{i=1}^{k}\frac{1}{i^2} + \frac{1}{(k+1)^2} \leq 2 - \frac{k(k + 1) + 1}{k(k+1)^2} < 2 - \frac{k(k + 1)}{k(k+1)^2}$ $= 2 - \frac{k+1}{(k+1)^2} = 2 - \frac{1}{k+1}$. This shows that $Q(k+1)$ holds.
- ⑤ The result follows for all $n\geq 1$ by induction.
-
Summary
- Induction lets us prove statements about all natural numbers.
- A proof by induction must show that $P(0)$ is true (base case).
- And it must use the inductive hypothesis $P(k)$ to show that $P(k+1)$ is true (inductive step).
- Induction also lets us prove theorems about integers $n\geq b$ for $b\in\Z$.
- Adjust all parts of the proof to use $n\geq b$ instead of $n\geq 0$.
- Induction proofs can use a hypothesis that implies $P(k)$.
- It is not always possible to use $P(k)$ as the induction hypothesis.
- In those cases, we use induction to prove $Q(n)$, where $Q(n) \to P(n)$.