# Principle of Recursive Definition

## Contents

## Theorem

Let $\N$ be the natural numbers.

Let $T$ be a set.

Let $a \in T$.

Let $g: T \to T$ be a mapping.

Then there exists exactly one mapping $f: \N \to T$ such that:

- $\forall x \in \N: f \left({x}\right) = \begin{cases} a & : x = 0 \\ g \left({f \left({n}\right)}\right) & : x = n + 1 \end{cases}$

### General Result

Let $p \in \N$.

Let $p^\geq$ be the upper closure of $p$ in $\N$.

Then there exists exactly one mapping $f: p^\geq \to T$ such that:

- $\forall x \in p^\geq: f \left({x}\right) = \begin{cases} a & : x = p \\ g \left({f \left({n}\right)}\right) & : x = n + 1 \end{cases}$

## Proof 1

Consider $\N$ defined as a Peano structure $\struct {P, 0, s}$.

The result follows from Principle of Recursive Definition for Peano Structure.

$\blacksquare$

## Proof 2

Consider $\N$ defined as the von Neumann construction of the natural numbers.

The result follows from Principle of Recursive Definition for Minimal Infinite Successor Set.

$\blacksquare$

## Fallacious Proof

The proofs given (hidden behind the links) are necessarily long, precise and detailed.

There is a temptation to take short cuts and gloss over the important details.

The following argument, for example, though considerably shorter, is incorrect.

Consider $\N$, defined as a naturally ordered semigroup $\left({S, \circ, \preceq}\right)$.

Let the mapping $f$ be defined as:

- $f \left({x}\right) = \begin{cases} a & : x = 0 \\ s \left({f \left({n}\right)}\right) & : x = n \circ 1 \end{cases}$

if $f \left({n}\right)$ is defined.

Let $S' = \left\{ {n \in S: f \left({n}\right) \text{ is defined} }\right\}$.

Then:

- $0 \in S'$

and:

- $n + 1 \in S'$

so by the Principle of Mathematical Induction for a Naturally Ordered Semigroup:

- $S' = S$

Thus the domain of $f$ is $S$.

Consequently, $f$ is a mapping from $S$ into $T$ which satisfies:

- $f \left({0}\right) = a$

and:

- $f \left({n \circ 1}\right) = s \left({f \left({n}\right)}\right)$

for all $n \in S$.

$\blacksquare$

### Objections

$(1):$

In the above argument, $S'$ is not precisely defined.

In order for a set to be defined, that definition should be able to be expressed solely in terms of logic and definitions from set theory.

In this case, the expression "is defined" does not meet that criterion.

$(2):$

The mapping $f$ is not defined properly.

A mapping needs to be defined as a set of ordered pairs which needs to satisfy a condition.

In the above, it is indeed specified that

- $\left({0, a}\right) \in f$

and:

- $\left({n \circ 1, s \left({x}\right)}\right) \in f$ whenever $\left({n, x}\right) \in f$

Thus it appears either that:

- $f$ itself is used to define $f$

or else that:

- $f$ itself changes during the process in which it is being defined.

Neither of these possibilities can be accepted.

$(3):$

The only property of $\left({S, \circ, \preceq}\right)$ used in the argument is that it satisfies the Principle of Mathematical Induction for a Naturally Ordered Semigroup.

However, consider the commutative semigroup $\left({D, +}\right)$ which has elements $0$ and $1$, such that:

- $D$ is the only subset of $D$:
- containing $0$

- and
- containing $x + 1$ whenever it contains $x$.

Then:

there exists a mapping $f: D \to T$ such that:

- $f \left({y}\right) = \begin{cases} a & : y = 0 \\ s \left({f \left({x}\right)}\right) & : y = x + 1 \end{cases}$

But consider the additive group of integers modulo $2$:

- $\left({\Z_2, +_2}\right)$

which is indeed a commutative semigroup containing $0$ and $1$ which satisfies the hypothesis.

But if $g: \N \to \N$ is the mapping defined as:

- $g \left({n}\right) = n + 1$

there is no mapping $f: \Z_2 \to \N$ which satisfies:

- $f \left({y}\right) = \begin{cases} 0 & : y = 0 \\ s \left({f \left({x}\right)}\right) & : y = x +_2 1 \end{cases}$

for all $x \in \Z_2$.

Hence the argument is invalid.

## Also known as

This result is often referred to as the **Recursion Theorem**.

Some sources only cover the general result.