Evanalysis
3.2Estimated reading time: 17 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

The recursive rules tell us how to calculate addition and multiplication. The question in this note is why those rules imply the familiar algebraic laws. The order of proof matters: first establish identities for addition, then use them in multiplication proofs, and only then use cancellation to construct larger number systems.

Recursive addition

Definition

Recursive definition of addition

For natural numbers aa and bb, 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 00, 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 55.

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 aa and bb, multiplication is defined by:

  • a⋅0=0a \cdot 0 = 0
  • a⋅S(b)=(a⋅b)+aa \cdot S(b) = (a \cdot b) + a

The base case says that adding aa zero times gives 00. The step says that if you already know a⋅ba \cdot b, then multiplying by the successor S(b)S(b) adds one more copy of aa.

Worked example

Compute 3⋅23 \cdot 2 from the definition

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

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

and

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

Therefore

3⋅2=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)P(n) be a statement about a natural number nn. If:

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

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

The base case attaches the statement to the starting point 00. 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.

Follow an induction argument

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

Follow the proof of 0 + n = n: verify the base case, state the induction hypothesis, and use the recursive rule to reach the successor.

Claim

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

Establish the successor identity

Proof: S(a)+b=S(a+b)S(a) + b = S(a + b) by induction on bb

We prove the statement for all b∈Nb\in N.

Base case: when b=0b = 0,

S(a)+0=S(a)=S(a+0)S(a) + 0 = S(a) = S(a + 0).

Induction step: assume S(a)+b=S(a+b)S(a) + b = S(a + b). Then

S(a)+S(b)=S(S(a)+b)S(a) + S(b) = S(S(a) + b) by the recursive rule,

=S(S(a+b))= S(S(a + b)) by the induction hypothesis,

=S(a+S(b))= S(a + S(b)) by the recursive rule again.

So the statement holds for S(b)S(b) whenever it holds for bb.

Why a⋅S(b)=a⋅b+aa \cdot S(b) = a \cdot b + a is a definition

For multiplication, the formula

a⋅S(b)=(a⋅b)+aa\cdot S(b)=(a\cdot b)+a

is not something proved after multiplication is already known. It is the recursive step that defines multiplication. Later algebraic laws, such as distributivity, are the statements that require induction.

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 aa, bb, and cc, one proves:

a+b=b+a,a+b=b+a,a⋅(b+c)=a⋅b+a⋅c,a\cdot(b+c)=a\cdot b+a\cdot c,

and

a⋅b=b⋅a.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: associativity of addition

Fix aa and bb, and induct on cc for

(a+b)+c=a+(b+c).(a+b)+c=a+(b+c).

When c=0c=0, both sides equal a+ba+b by b+0=bb+0=b and the defining rule. If the identity holds for cc, then

(a+b)+S(c)=S((a+b)+c)=S(a+(b+c))=a+S(b+c)=a+(b+S(c)).\begin{aligned} (a+b)+S(c)&=S((a+b)+c)\\ &=S(a+(b+c))\\ &=a+S(b+c)\\ &=a+(b+S(c)). \end{aligned}

The second line is the induction hypothesis and the first and last rewrites use the recursive addition rule. Thus addition is associative before it is used to rearrange terms in later proofs.

Proof: 0⋅a=00 \cdot a = 0

Induct on aa. The base case is the defining equation 0⋅0=00\cdot 0=0. If 0⋅a=00\cdot a=0, then

0⋅S(a)=0⋅a+0=0+0=0.0\cdot S(a)=0\cdot a+0=0+0=0.

Hence 0⋅a=00\cdot a=0 for every natural number aa.

From a recursive rule to a proof

There are two related but different uses of the successor pattern. A recursive definition tells us how to calculate a new value from an earlier value. An induction proof tells us how to establish a statement for every natural input. The calculation can suggest a theorem, but it does not replace the proof.

Worked example

Compute 2⋅32 \cdot 3 one successor at a time

Using 3=S(S(S(0)))3=S(S(S(0))) and the multiplication rule,

2⋅3=2⋅S(S(S(0)))=(2⋅S(S(0)))+2=((2⋅S(0))+2)+2=(((2⋅0)+2)+2)+2=((0+2)+2)+2=2+2+2=6.\begin{aligned} 2\cdot3 &=2\cdot S(S(S(0)))\\ &=(2\cdot S(S(0)))+2\\ &=((2\cdot S(0))+2)+2\\ &=(((2\cdot0)+2)+2)+2\\ &=((0+2)+2)+2\\ &=2+2+2=6. \end{aligned}

Each line reduces the second input until the base case 2⋅0=02\cdot0=0 is reached. Only then do we simplify the resulting additions.

A complete proof that 0+n=n0+n=n

Define P(n)P(n) to be the statement 0+n=n0+n=n.

For the base case, the recursive addition rule gives 0+0=00+0=0.

For the step, assume P(n)P(n), so 0+n=n0+n=n. Then

0+S(n)=S(0+n)=S(n).0+S(n)=S(0+n)=S(n).

The first equality is the recursive definition, and the second uses the induction hypothesis. Therefore P(S(n))P(S(n)) follows from P(n)P(n). Induction concludes that 0+n=n0+n=n for every n∈Nn\in N.

This proof is small, but it supplies a fact needed by later algebra. It also shows why the induction hypothesis should be written explicitly instead of replaced by an informal phrase such as “the pattern continues.”

Theorem

Addition is commutative after the induction lemmas

For all a,b∈Na,b\in N, a+b=b+aa+b=b+a.

Proof of commutativity of addition

Fix aa and induct on bb.

When b=0b=0,

a+0=a=0+a,a+0=a=0+a,

where the first equality is the definition and the second is the lemma 0+a=a0+a=a.

Now assume a+b=b+aa+b=b+a. Then

a+S(b)=S(a+b)=S(b+a)=S(b)+a.\begin{aligned} a+S(b)&=S(a+b)\\ &=S(b+a)\\ &=S(b)+a. \end{aligned}

The middle equality is the induction hypothesis, and the last equality is the successor-on-the-left identity. Thus the claim holds for S(b)S(b), completing the induction. The proof is a model for later algebra: first prove the identities forced by the recursive orientation, then use them to establish familiar symmetric laws.

Proof: cancellation in NN

We prove the left-cancellation law

a+b=a+c⟹b=ca+b=a+c\quad\Longrightarrow\quad b=c

by induction on aa. When a=0a=0, the identity 0+b=0+c0+b=0+c reduces to b=cb=c by 0+n=n0+n=n. For the step, suppose the result is known for aa, and assume S(a)+b=S(a)+cS(a)+b=S(a)+c. The successor-on-the-left lemma and injectivity of SS give a+b=a+ca+b=a+c; the induction hypothesis then gives b=cb=c. This cancellation theorem is the natural-number fact used when proving transitivity of the integer equivalence relation.

Common mistake

A calculation of several cases is not induction

Computing 2+02+0, 2+12+1, and 2+22+2 checks only three inputs. An induction proof must name an arbitrary nn, prove the base case, and show how the statement passes from nn to S(n)S(n).

Checkpoint

What is the difference between a recursive definition and an induction hypothesis?

Mention what each one is allowed to do.

Solution · Answer

A recursive definition gives the value of an operation by reducing an input to a base case. An induction hypothesis is a temporary assumption that a particular statement holds at an arbitrary nn, used to prove the statement at S(n)S(n).

A full induction proof of distributivity

Fix aa and bb, and let

P(c):a⋅(b+c)=a⋅b+a⋅c.P(c):\quad a\cdot(b+c)=a\cdot b+a\cdot c.

For c=0c=0,

a⋅(b+0)=a⋅b=a⋅b+0=a⋅b+a⋅0.a\cdot(b+0)=a\cdot b=a\cdot b+0=a\cdot b+a\cdot0.

Assume P(c)P(c). Since b+S(c)=S(b+c)b+S(c)=S(b+c), the recursive multiplication rule and the induction hypothesis give

a⋅(b+S(c))=a⋅S(b+c)=a⋅(b+c)+a=(a⋅b+a⋅c)+a=a⋅b+(a⋅c+a)=a⋅b+a⋅S(c).\begin{aligned} a\cdot(b+S(c)) &=a\cdot S(b+c)\\ &=a\cdot(b+c)+a\\ &=(a\cdot b+a\cdot c)+a\\ &=a\cdot b+(a\cdot c+a)\\ &=a\cdot b+a\cdot S(c). \end{aligned}

The penultimate equality uses associativity of addition, itself proved by an earlier induction. Thus P(S(c))P(S(c)) follows, and distributivity holds for every natural cc.

Proof: associativity of multiplication

We prove (a⋅b)⋅c=a⋅(b⋅c)(a\cdot b)\cdot c=a\cdot(b\cdot c) by induction on cc, using the already established distributivity and addition laws. The base case is

(a⋅b)⋅0=0=a⋅0=a⋅(b⋅0)(a\cdot b)\cdot0=0=a\cdot0=a\cdot(b\cdot0)

For the step, the induction hypothesis and distributivity give

(a⋅b)⋅S(c)=(a⋅b)⋅c+a⋅b=a⋅(b⋅c)+a⋅b=a⋅(b⋅c+b)=a⋅(b⋅S(c))\begin{aligned} (a\cdot b)\cdot S(c) &=(a\cdot b)\cdot c+a\cdot b\\ &=a\cdot(b\cdot c)+a\cdot b\\ &=a\cdot(b\cdot c+b)\\ &=a\cdot(b\cdot S(c)) \end{aligned}

The last equality uses the recursive multiplication rule, completing the induction. Positive factors also have positive product: write r=S(r′)r=S(r') and s=S(s′)s=S(s'). Then

r⋅s=r⋅S(s′)=r⋅s′+S(r′)=S(r⋅s′+r′)≠0.r\cdot s=r\cdot S(s')=r\cdot s'+S(r')=S(r\cdot s'+r')\ne0.

The last step uses recursive addition and the axiom that zero is not a successor. This will justify the signed-representative argument in ZZ.

How commutativity of multiplication is organized

The recursive definition expands the second input, so the identity a⋅b=b⋅aa\cdot b=b\cdot a cannot be justified by simply swapping symbols in the definition. A useful auxiliary lemma is proved first by induction on aa:

S(b)⋅a=b⋅a+a.S(b)\cdot a=b\cdot a+a.

For a=0a=0, both sides are 00. If the identity holds for aa, the successor rule for the second input and the induction hypothesis give

S(b)⋅S(a)=S(b)⋅a+S(b)=(b⋅a+a)+S(b).S(b)\cdot S(a)=S(b)\cdot a+S(b) =(b\cdot a+a)+S(b).

Associativity and commutativity of addition, already established from the recursive addition rules, rearrange this to the expression required in the next induction step: using S(x)=x+1S(x)=x+1 and the recursive expansion b⋅S(a)=b⋅a+bb\cdot S(a)=b\cdot a+b, the target is b⋅S(a)+S(a)=b⋅a+b+a+1=b⋅a+a+S(b)b\cdot S(a)+S(a)=b\cdot a+b+a+1=b\cdot a+a+S(b). The lemma therefore supplies the missing orientation. Now induction on bb proves commutativity: the base case is a⋅0=0=0⋅aa\cdot 0=0=0\cdot a; for the successor case,

a⋅S(b)=a⋅b+a=b⋅a+a=S(b)⋅a.a\cdot S(b)=a\cdot b+a=b\cdot a+a=S(b)\cdot a.

This proof architecture matters: each rearrangement cites a previously proved addition fact, while each recursive expansion follows the stated definition. It prevents the circular argument that treats multiplication as commutative merely because its notation looks symmetric.

Worked example

Proving n+1=1+nn+1=1+n without assuming commutativity

Write 1=S(0)1=S(0). First, the recursive rule gives

n+1=n+S(0)=S(n+0)=S(n).n+1=n+S(0)=S(n+0)=S(n).

Now prove S(n)=1+nS(n)=1+n by induction. At n=0n=0, both sides are S(0)S(0). If S(n)=1+nS(n)=1+n, then

S(S(n))=S(1+n)=1+S(n),S(S(n))=S(1+n)=1+S(n),

where the last equality is the recursive rule. Hence S(n)=1+nS(n)=1+n for every nn, and combining the two identities yields n+1=1+nn+1=1+n.

Quick checks

Checkpoint

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

Think about which input is fixed first.

Solution · Answer

The base case is a+0=aa + 0 = a.

Checkpoint

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

Look at the second input.

Solution · Answer

The base case is a⋅0=0a \cdot 0 = 0.

Checkpoint

Using the recursive rule, what is a⋅S(b)a \cdot S(b)?

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

Solution · Answer

It is (a⋅b)+a(a \cdot b) + a.

Checkpoint

In an induction proof, what is the induction hypothesis?

Use one short sentence.

Solution · Answer

It is the assumption that the claim holds for a fixed natural number nn, before proving it for S(n)S(n).

Read this first

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

Practice

Work out your answer, then check it. You can revise and try again.

Loading…

Key terms in this unit