Evanalysis
3.2Embedded interactionEstimated reading time: 6 min

3.2 Induction and recursive arithmetic

Use induction as a proof pattern and read recursive formulas for + and · without losing the base case.

Course contents

MATH1090: Set theory

Rigorous course notes on logic, sets, number construction, the real numbers, limits, cardinality, and the first algebraic structures, written in linked sections with careful proofs and examples.

Chapter 7Sets with structure1 sections

Induction is not a magic trick. It is a proof pattern for statements that are meant to hold for every natural number.

The same chapter also uses recursive definitions for addition and multiplication, so it helps to keep the base case and the step visible all the time.

Recursive addition

Definition

Recursive definition of addition

For natural numbers a and b, addition is defined by:

  • a+0=aa + 0 = a
  • a+S(b)=S(a+b)a + S(b) = S(a + b)

This is a recursive definition. You know the result when the second input is 0, and every later value is built from an earlier one.

Worked example

Compute 2+32 + 3 from the definition

Write 2=S(S(0))2 = S(S(0)) and 3=S(S(S(0)))3 = S(S(S(0))).

Then:

2+3=2+S(S(S(0)))2 + 3 = 2 + S(S(S(0)))

=S(2+S(S(0)))= S(2 + S(S(0)))

=S(S(2+S(0)))= S(S(2 + S(0)))

=S(S(S(2+0)))= S(S(S(2 + 0)))

=S(S(S(2)))= S(S(S(2))).

That is the number usually called 5.

Common mistake

A recursive formula is not yet a proof

The formulas tell you how the operation is defined. They do not automatically prove a claim about all natural numbers. For that, you still need induction.

Recursive multiplication

Multiplication is introduced in the same recursive style. Once addition is available, multiplication can be read as repeated addition controlled by the second input.

Definition

Recursive definition of multiplication

For natural numbers a and b, multiplication is defined by:

  • a0=0a · 0 = 0
  • aS(b)=(ab)+aa · S(b) = (a · b) + a

The base case says that adding a zero times gives 0. The step says that if you already know a · b, then multiplying by the successor S(b) adds one more copy of a.

Worked example

Compute 3 · 2 from the definition

Write 2=S(S(0))2 = S(S(0)). Then

32=3S(S(0))=(3S(0))+33\cdot 2 =3\cdot S(S(0)) =(3\cdot S(0))+3

and

3S(0)=(30)+3=0+3=3.3\cdot S(0)=(3\cdot 0)+3=0+3=3.

Therefore

32=3+3=6.3\cdot 2=3+3=6.

The familiar interpretation “three, taken two times” is recovered from the recursive rule.

What induction proves

The induction principle is the reason recursive definitions can support ordinary algebraic laws. A typical proof has the following shape.

Theorem

Induction principle

Let P(n) be a statement about a natural number n. If:

  1. P(0) is true, and
  2. whenever P(n) is true, P(S(n)) is also true,

then P(n) is true for every nNn\in N.

The base case attaches the statement to the starting point 0. The induction step proves that truth is preserved when we move one successor forward. The two parts together rule out the possibility that the statement holds at first but then fails later.

Watch the proof pattern

The stepper below separates one induction proof into the base case, the induction hypothesis, the induction step, and the conclusion.

Read and try

Trace one induction proof

The live stepper separates a proof by induction into its three moving parts.

Claim

Claim: for every natural number n, 0 + n = n.

A proof sketch

Proof

Why S(a)+b=S(a+b)S(a) + b = S(a + b) follows by induction on b

Proof

Why aS(b)=ab+aa · S(b) = a · b + a is not a theorem but a definition

Algebraic laws come after the definitions

Once addition and multiplication have been defined recursively, the familiar laws of arithmetic become theorems.

Theorem

Examples of arithmetic laws proved by induction

For natural numbers a, b, and c, one proves:

a+b=b+a,a+b=b+a,a(b+c)=ab+ac,a\cdot(b+c)=a\cdot b+a\cdot c,

and

ab=ba.a\cdot b=b\cdot a.

The important point is the order of logic: we first define the operations, then prove that they behave like the operations we already know.

Proof

Proof structure for distributivity

Quick checks

Quick check

What is the base case in the recursive definition of addition?

Think about which input is fixed first.

Solution

Answer

Quick check

What is the base case in the recursive definition of multiplication?

Look at the second input.

Solution

Answer

Quick check

Using the recursive rule, what is a · S(b)?

State the next multiplication value in terms of the previous one.

Solution

Answer

Quick check

In an induction proof, what is the induction hypothesis?

Use one short sentence.

Solution

Answer

Read this first

If you want the formal setup for the natural numbers, review 3.1 Natural numbers and Peano's axioms.

Key terms in this unit