ProofComplete

Proof of the Recursion Theorem

The recursion theorem guarantees that recursive definitions produce well-defined functions on the natural numbers. This fundamental result justifies the definition of addition, multiplication, exponentiation, and sequences by recursion.


Theorem Statement

Theorem3.2Recursion theorem (Dedekind)

Let AA be a set, aAa \in A, and g:AAg: A \to A a function. Then there exists a unique function f:NAf: \mathbb{N} \to A such that:

  1. f(0)=af(0) = a,
  2. f(n+1)=g(f(n))f(n+1) = g(f(n)) for all nNn \in \mathbb{N}.

More generally, given h:N×AAh: \mathbb{N} \times A \to A, there exists a unique f:NAf: \mathbb{N} \to A with f(0)=af(0) = a and f(n+1)=h(n,f(n))f(n+1) = h(n, f(n)).


Proof

Proof

Existence. We construct ff as the union of "partial recursive functions."

Call a set FN×AF \subseteq \mathbb{N} \times A an nn-approximation if:

  • FF is a function (i.e., each natural number maps to at most one value),
  • dom(F)={0,1,,n}\mathrm{dom}(F) = \{0, 1, \ldots, n\},
  • F(0)=aF(0) = a,
  • F(k+1)=g(F(k))F(k+1) = g(F(k)) for all k<nk < n.

Claim 1: For each nNn \in \mathbb{N}, there exists a unique nn-approximation FnF_n.

Proof by induction: The 00-approximation is {(0,a)}\{(0, a)\}. Given the nn-approximation FnF_n, define Fn+1=Fn{(n+1,g(Fn(n)))}F_{n+1} = F_n \cup \{(n+1, g(F_n(n)))\}, which is the unique (n+1)(n+1)-approximation.

Claim 2: If mnm \leq n, then FnF_n and FmF_m agree on {0,,m}\{0, \ldots, m\}.

Proof by induction on mm: for m=0m = 0, both give F(0)=aF(0) = a. If FnF_n and FmF_m agree on {0,,m1}\{0, \ldots, m-1\}, then Fn(m)=g(Fn(m1))=g(Fm(m1))=Fm(m)F_n(m) = g(F_n(m-1)) = g(F_m(m-1)) = F_m(m).

Definition of ff: Set f=nNFnf = \bigcup_{n \in \mathbb{N}} F_n. By Claim 2, this is a well-defined function with domain N\mathbb{N}.

Verification: f(0)=F0(0)=af(0) = F_0(0) = a. For any nn: f(n+1)=Fn+1(n+1)=g(Fn+1(n))=g(Fn(n))=g(f(n))f(n+1) = F_{n+1}(n+1) = g(F_{n+1}(n)) = g(F_n(n)) = g(f(n)).

Uniqueness. Suppose f,f:NAf, f': \mathbb{N} \to A both satisfy the conditions. By induction:

  • f(0)=a=f(0)f(0) = a = f'(0).
  • If f(n)=f(n)f(n) = f'(n), then f(n+1)=g(f(n))=g(f(n))=f(n+1)f(n+1) = g(f(n)) = g(f'(n)) = f'(n+1).

So f=ff = f'. \blacksquare


Applications

ExampleDefining arithmetic via recursion

Using the recursion theorem, we define:

Addition: For each mm, define fm:NNf_m: \mathbb{N} \to \mathbb{N} by fm(0)=mf_m(0) = m and fm(n+1)=S(fm(n))f_m(n+1) = S(f_m(n)), where SS is the successor. Then m+n:=fm(n)m + n := f_m(n).

Multiplication: gm(0)=0g_m(0) = 0, gm(n+1)=gm(n)+mg_m(n+1) = g_m(n) + m. Then mn:=gm(n)m \cdot n := g_m(n).

Exponentiation: hm(0)=1h_m(0) = 1, hm(n+1)=hm(n)mh_m(n+1) = h_m(n) \cdot m. Then mn:=hm(n)m^n := h_m(n).

Each definition is justified by the recursion theorem with appropriate choices of aa and gg.

RemarkSet-theoretic subtlety

The recursion theorem requires the axiom of replacement (or at least the axiom of union) to form f=Fnf = \bigcup F_n. In ZFC, replacement guarantees that {Fn:nN}\{F_n : n \in \mathbb{N}\} is a set, so its union exists. Without replacement, the recursion theorem can fail in certain models.