Chapter 2Mathematical Reasoning

Induction (Simple & Structural)

Base + step = everything

Concept

Induction is the workhorse proof technique for nN.P(n)\forall n \in \mathbb{N}. P(n).

Simple induction:
1. Base case: prove P(0)P(0).
2. Inductive step: prove n.P(n)P(s(n))\forall n. P(n) \Rightarrow P(s(n)).

Strong (complete) induction: instead of assuming P(n)P(n), assume P(k)P(k) for
all k<nk < n (or knk \leq n).

Structural induction: for inductively defined sets (lists, trees), induct
on the structure:
1. Base: prove PP for the constructors (e.g. empty list).
2. Step: assuming PP for the components, prove PP for the constructed value.

All three are reducible to P5 (Peano's induction axiom).

Animation — domino
Transcript — click a line to jump7 cues
  1. 0.0sTheorem 2.11: Domino Induction
  2. 1.0sIf S1 falls and each falling domino knocks down the next, all Sn fall.
  3. 2.5sEight dominos S1 through S8 stand in a row.
  4. 3.7sNow we knock the first one over.
  5. 4.5sEach falling domino topples the next one in sequence.
  6. 6.5sCascade: the rule S_k falls implies S_{k+1} falls.
  7. 9.5sAll dominos fall. By induction, every Sn falls.
Theorem 3.2: Addition is associative

For all unary naturals a,b,ca, b, c, (ab)c=a(bc)(a \oplus b) \oplus c = a \oplus (b \oplus c).

Proof sketch. By induction on cc. Base c=oc = o: (ab)o=ab(a \oplus b) \oplus o = a \oplus b (by first eq.) =a(bo)= a \oplus (b \oplus o) (same eq.). Step: assume (ab)c=a(bc)(a \oplus b) \oplus c = a \oplus (b \oplus c). Then (ab)s(c)=s((ab)c)=s(a(bc))=as(bc)=a(bs(c))(a \oplus b) \oplus s(c) = s((a \oplus b) \oplus c) = s(a \oplus (b \oplus c)) = a \oplus s(b \oplus c) = a \oplus (b \oplus s(c)). \square

Sums and products

Definition 3.5 (Summation). i=mnf(i):={0n<mf(m)+i=m+1nf(i)otherwise\sum_{i=m}^{n} f(i) := \begin{cases} 0 & n < m \\ f(m) + \sum_{i=m+1}^{n} f(i) & \text{otherwise} \end{cases}

Definition 3.6 (Product). i=mnf(i):={1n<mf(m)i=m+1nf(i)otherwise\prod_{i=m}^{n} f(i) := \begin{cases} 1 & n < m \\ f(m) \cdot \prod_{i=m+1}^{n} f(i) & \text{otherwise} \end{cases}

These are 'higher-order' operations: they take a function ff and a range, and reduce. Note the empty cases: an empty sum is 0 (the additive identity) and an empty product is 1 (the multiplicative identity). This is essential for induction.

Nested induction

Some theorems require induction over two variables. The technique:

Theorem. a,bN.a+b=b+a\forall a, b \in \mathbb{N}.\, a + b = b + a (addition is commutative).

Proof by nested induction. We prove it by induction on aa, then within each step, by induction on bb.

Outer induction on aa:
- Base a=oa = o: We need b.o+b=b+o\forall b.\, o + b = b + o. Inner induction on bb:
- Base b=ob = o: o+o=oo + o = o (first axiom) =o+o= o + o (trivially). ✓
- Step b=s(b)b = s(b'): o+s(b)=s(o+b)=s(b)o + s(b') = s(o + b') = s(b') (second axiom). And s(b)+o=s(b+o)=s(b)s(b') + o = s(b' + o) = s(b') (first axiom on the right). ✓
- Step a=s(a)a = s(a'): Assume b.a+b=b+a\forall b.\, a' + b = b + a' (outer IH). We need b.s(a)+b=b+s(a)\forall b.\, s(a') + b = b + s(a'). Inner induction on bb:
- Base b=ob = o: s(a)+o=s(a)s(a') + o = s(a') (first axiom). And o+s(a)=s(o+a)=s(a+o)o + s(a') = s(o + a') = s(a' + o) (second axiom) =s(a)= s(a') (outer IH with b=ob = o). ✓
- Step b=s(b)b = s(b'): s(a)+s(b)=s(s(a)+b)=s(s(b+a))s(a') + s(b') = s(s(a') + b') = s(s(b' + a')) (outer IH) =s(s(b)+a)= s(s(b') + a') (outer IH again) =s(b)+s(a)= s(b') + s(a') (second axiom). ✓

So a+b=b+aa + b = b + a for all a,ba, b. \square

Reading. Note that the inner induction re-uses the outer IH each time. The two levels of induction can swap roles (do inner on outer and vice versa) depending on the theorem.

Worked example
Step 0 of 2
Practice — score 100% to advance
Multiple choice
Q1
Strong induction assumes…
Q2
Structural induction is used for…
Q3
Which is the base case for induction on lists?
Q4
What does simple induction NOT require?
Q5
Prove 0s(n)0 \neq s(n) for all nn by induction. The base case requires…
Q6
Which proof is suitable: 'every natural number has a binary representation'?
Q7
All three forms of induction are derivable from…
Q8
An empty sum equals:
Q9
Nested induction means:
Fill in the blank
Q1
In simple induction over N\mathbb{N}, we prove the ___ case P(0)P(0), and the ___ step P(n)P(s(n))P(n) \Rightarrow P(s(n)).
Q2
Strong induction assumes P(k)P(k) for all kk ___ nn, while simple induction assumes only P(\text{}).
Q3
Structural induction on lists has two cases: the ___ list, and a list with a ___ element prepended via ::.
Q4
An empty product equals ___ (the multiplicative identity).
Q5
Applying the second Peano equation ms(n)=s(mn)m \oplus s(n) = s(m \oplus n) to s(s(o))s(s(s(o)))s(s(o)) \oplus s(s(s(o))) gives s(  s(s(o)))s(\underline{\ \ } \oplus s(s(o))) in the first step.
Q6
To prove a+b=b+aa + b = b + a, we induct on aa, then on ___.
Loading…