## 4.7. More recursion tools

### Rebuilding recursion

Let us work in a first-order theory just assumed to have 3 types ℕ, *E* and
*H*⊂*E*^{ℕ},
the language and axioms of arithmetic for ℕ with the schema of induction over expressible
subsets of ℕ, and the axiom that *H* provides "all finite sequences"
∀*n*∈ℕ, ∀*u*∈*H*, ∀*y*∈*E*, ∃*v*∈*H*,
*v*_{n}=*y* ∧ ∀*k*<*n*, *v*_{k} =
*u*_{k}

The following existential result has a simple proof by induction making no use of uniqueness:
∀*R*⊂ℕ×*E*^{2}, ∀*n*∈ℕ,
(∀*i*<*n*, ∀*x*∈*E*, ∃*y*∈*E*, *R*(*i*,*x*,*y*))
⇒ ∀*a*∈*E*,
∃*u*∈*H*, *u*_{0}=*a* ∧ ∀*i*<*n*,
*R*(*i*,*u*_{i},*u*_{i+1}).

Its simplicity only goes for this case, only generalizable to conditions of the form
*R*(*n*,(*u*_{k})_{k<n},*u*_{n}), while the case of algebraic terms is also true but more difficult to prove.

As a particular case, comes the finite choice theorem written as
∀*R*⊂ℕ×*E*, ∀*n*∈ℕ,
(∀*i*<*n*, ∃*y*∈*E*, *R*(*i*,*y*))
⇒ ∃*u*∈*H*, ∀*i*<*n*,
*R*(*i*,*u*_{i}).

With *f*∈*E*^{ℕ×E} the restriction of such *u* to
numbers ≤ *n* is also unique by
induction, from which the *x*∈*E*^{ℕ} such that
*x*_{0}=*a* ∧ ∀*n*∈ℕ, *x*_{n+1} =
*f*(*n*,*x*_{n}), can be defined by its graph
{(*n*,*u*_{n}) | (*n*,*u*)∈ℕ×*H*,
*u*_{0}=*a* ∧ ∀*i*<*n*,
*u*_{i+1} = *f*(*i*,*u*_{i})}

As *H* contains any finite sequence expressible in the theory, this definition
of recursion turns out to be "the recursion which the theory can express"
independently of the particular choice of *H*.

The construction of ℕ^{(ℕ)} from the last section, and similarly
simple candidate expressions of *H* as a countable set, assumes recursion, thus
cannot be used to define recursion by the above method. To actually provide a definition of
recursion that does not assume it, requires an independent expression of an enumerated
*H*, which is harder but finally possible. Such a construction was achieved by Godel
as part of his work to prove the incompleteness theorem.
### Another proof of recursion

By seeing morphisms as subalgebras, we can write another
construction of recursive sequences* u*∈Mor_{(0,S)}(ℕ,(*E*,*a*,*f*)),
as follows.

Let *M* be the minimal subalgebra of ℕ×*E*_{a,f},
and let *A*={*n*∈ℕ | ∃!*x*∈*E*, (*n*,*x*)∈*M*}.

As *M* is a minimal (0,*S*)-algebra, *M* = {(0,*a*)}∪
Im *S*_{M}.

Substituting this into the definition of *A* we get

∀*p*∈ℕ, *p*∈*A* ⇔ (∃!*y*∈*E*,
(*p*=0 ∧ *y*=*a*)∨∃(*n*,*x*)∈*M*,
(*p*=*Sn* ∧ *y*=*f*(*x*))).

From 0 ∉ Im *S* we get 0∈*A*, and

∀*n*∈ℕ, *Sn*∈*A* ⇔ ∃!*y*∈*E*,
∃(*n'*,*x*)∈*M*, (*Sn*=*Sn'* ∧ *y*=*f*(*x*)).

From the injectivity of *S* we get

∀*n*∈ℕ, *Sn*∈*A* ⇔ ∃!*y*∈*E*,
∃*x*∈*E*, (*n*,*x*)∈*M*∧ *y*=*f*(*x*).

Thus (∀*n*∈*A*, *Sn*∈*A*), so that *A*
= ℕ, i.e. *M* is the graph of a function *u* ∈ *E*^{ℕ}.
As *M* ∈ Sub(ℕ×*E*_{a,f}), we
conclude *u* ∈ Mor_{(0,S)}(ℕ,*E*_{a,f}).

### A more general form of recursion

Some useful sequences need recursive definitions where the term defining
*u*_{Sn} uses not only *u*_{n} but also *n*
itself. Somehow it would work all the same, but trying to directly adapt to this case
the proof we gave would require to define some special generalizations of previous
concepts, and specify their resulting properties. To simplify, let us proceed another
way, similar to the
argument in Halmos's Naive Set Theory, but generalized.

For any algebraic language *L*, let us introduce a general concept of "recursive condition"
for functions *u* : *E* → *F*, where, instead of a draft, *E* is first
assumed to be an *L*-algebra (then a ground term algebra to conclude).

The version we saw was formalized by giving the term in the recursive definition as an
*L*-algebra structure on *F*, φ_{F}: *L*⋆*F* → *F*,
then expressing the request for *u* to satisfy this condition as *u*∈Mor(*E*,*F*),
namely ∀(*s*,*x*)∈*L*⋆*E*,
*u*(*s*_{E}(*x*)) = φ_{F}(*s*,*u*০*x*).

Let us generalize this as *u*(*s*_{E}(*x*))
= φ(*s*,*x*,*u*০*x*) which by the canonical bijection
Dom φ ≡ ∐_{s∈L} *E*^{ns
}×*F*^{ns} ≡ ∐_{s∈L}
(*E*×*F*)^{ns} =
*L*⋆(*E*×*F*) can be written using *h* : *L*⋆(*E*×*F*)
→ *F* such that ∀(*s*,*x*,*y*)∈ Dom φ,
φ(*s*,*x*,*y*) = *h*(*s*,*x*×*y*), as*u*(*s*_{E}(*x*))
= *h*(*s*,*x*×(*u*০*x*)).

As ∀*u*∈*F*^{E}, *x*×(*u*০*x*)
= (Id_{E}×*u*)০*x*, this becomes
the second component of the formula Id_{E}×*u* ∈ Mor(*E*, *E*×*F*)
when giving *E*×*F* the structure φ_{E×F} =
(φ_{E}০π_{L})×*h*.

The first component (φ_{E}০π_{L}) we give to φ_{E×F},
makes π∈ Mor(*E*×*F*, *E*) and makes tautological the first component
of the formula Id_{E}×*u*
∈ Mor(*E*, *E*×*F*), namely

Id_{E}(*s*_{E}(*x*)) = φ_{E}(*s*,*x*)
= (φ_{E}০π_{L})(*s*,*x*×(*u*০*x*)).

It is then possible to conclude by re-using the previous result of existence of interpretations:
If *E* is a closed term *L*-algebra then
∃!*f* ∈ Mor(*E*, *E*×*F*), which is
of the form Id_{E}×*u* because
π০*f* ∈ Mor(*E*, *E*) ∴ π০*f* = Id_{E}.

But one can do without it, based on the following property of this *L*-algebra *E*×*F*:
∀*u*∈*F*^{E}, Id_{E}×*u*
∈ Mor_{L}(*E*, *E*×*F*) ⇔ Gr *u*
∈ Sub_{L}(*E*×*F*)

Indeed the defining formulas of both sides coincide. To see it otherwise,
- ⇒ is a case of image of an algebra by a
morphism, Gr
*u* = Im (Id_{E}×*u*). -
For the converse, the inverse of the bijective morphism π
_{|Gr u}
∈ Mor_{L}(Gr *u*, *E*)
is a morphism Id_{E}×*u* ∈ Mor_{L}(*E*, Gr *u*)
⊂ Mor_{L}(*E*, *E*×*F*).

This reduces the issue to the search of subalgebras of
*E*×*F* which are graphs of functions from *E* to *F*.

Now if *E* is a ground term *L*-algebra then *M* =
Min_{L}(*E*×*F*) is one of them because
π_{|M}∈ Mor_{L}(*M*, *E*)
from a surjective algebra to a ground term algebra
must be bijective.

Any other subalgebra of *E*×*F* must include *M*, thus to stay functional it must equal *M*. ∎

Next : Varieties

More texts on algebra

Back to Set theory and foundations
homepage