IUM lectures on Numbers

2.6. Recursion

I have told you one aspect of "that's it" -- it encodes the principle of mathematical induction. But in fact the full formal definition of "that's it" is both the principle of induction and the principle of recursion, which we now state in its most general form. This definition is non-examinable.

Axiom 12 (Principle of mathematical recursion)

Say we have a set X. You can make a function F which sends a natural number n to an element of the set X by doing the following two things:

  • Define the element F(0)\in X;

  • Define a function p_n from X to X, and define F(S(n)) to be p_n(F(n)).

In many applications, all the p_n are equal. For example, when we defined F(x)=a+x above, we let the set X be \N, we let all the p_n be S:\N\to\N, and we defined F(0)=a. Informally, adding x to a number a is defined by "start at a, and then repeatedly take the successor x times". But don't write this in an exam, because x is a formal term in a formal system, and "doing something x times" makes no sense in this formal system. In particular, trying to define a+x as \underbrace{S(S(S(\ldots S}_{x\ \text{times}}(a)))\ldots) is not allowed, because it is not at all clear what \ldots means; it is attempting to attach an intuitive semantic meaning to a formal term in a formal language. But intuition is exactly what is not allowed here: if you want to do something x times, you must use induction or recursion.