Notation
The statement of the theorems refers to an admissible numbering of the partial recursive functions, such that the function corresponding to index is . If and are partial functions on the natural numbers, the notation indicates that, for each ''n'', either and are both defined and are equal, or else and are both undefined.Rogers's fixed-point theorem
Given a function , a fixed point of is an index such that . Rogers describes the following result as "a simpler version" of Kleene's (second) recursion theorem.Proof of the fixed-point theorem
The proof uses a particular total computable function , defined as follows. Given a natural number , the function outputs the index of the partial computable function that performs the following computation: :Given an input , first attempt to compute . If that computation returns an output , then compute and return its value, if any. Thus, for all indices of partial computable functions, if is defined, then . If is not defined, then is a function that is nowhere defined. The function can be constructed from the partial computable function described above and theFixed-point-free functions
A function such that for all is called fixed-point free. The fixed-point theorem shows that no total computable function is fixed-point free, but there are many non-computable fixed-point-free functions. Arslanov's completeness criterion states that the only recursively enumerable Turing degree that computes a fixed-point-free function is 0′, the degree of the halting problem.Kleene's second recursion theorem
The second recursion theorem is a generalization of Rogers's theorem with a second input in the function. One informal interpretation of the second recursion theorem is that it is possible to construct self-referential programs; see "Application to quines" below. :The second recursion theorem. For any partial recursive function there is an index such that . The theorem can be proved from Rogers's theorem by letting be a function such that (a construction described by theComparison to Rogers's theorem
Kleene's second recursion theorem and Rogers's theorem can both be proved, rather simply, from each other. However, a direct proof of Kleene's theorem does not make use of a universal program, which means that the theorem holds for certain subrecursive programming systems that do not have a universal program.Application to quines
A classic example using the second recursion theorem is the function . The corresponding index in this case yields a computable function that outputs its own index when applied to any value. When expressed as computer programs, such indices are known ass11
in the code is the function of that name produced by the Q
can be changed to any two-argument function.
p(nil)
Q(p, nil)
Application to elimination of recursion
Suppose that and are total computable functions that are used in a recursive definition for a function : : : The second recursion theorem can be used to show that such equations define a computable function, where the notion of computability does not have to allow, prima facie, for recursive definitions (for example, it may be defined by μ-recursion, or byReflexive programming
Reflexive, or reflective, programming refers to the usage of self-reference in programs. Jones presents a view of the second recursion theorem based on a reflexive language. It is shown that the reflexive language defined is not stronger than a language without reflection (because an interpreter for the reflexive language can be implemented without using reflection); then, it is shown that the recursion theorem is almost trivial in the reflexive language.The first recursion theorem
While the second recursion theorem is about fixed points of computable functions, the first recursion theorem is related to fixed points determined by enumeration operators, which are a computable analogue of inductive definitions. An enumeration operator is a set of pairs (''A'',''n'') where ''A'' is a ( code for a) finite set of numbers and ''n'' is a single natural number. Often, ''n'' will be viewed as a code for an ordered pair of natural numbers, particularly when functions are defined via enumeration operators. Enumeration operators are of central importance in the study of enumeration reducibility. Each enumeration operator Φ determines a function from sets of naturals to sets of naturals given by : A recursive operator is an enumeration operator that, when given the graph of a partial recursive function, always returns the graph of a partial recursive function. A fixed point of an enumeration operator Φ is a set ''F'' such that Φ(''F'') = ''F''. The first enumeration theorem shows that fixed points can be effectively obtained if the enumeration operator itself is computable. :First recursion theorem. The following statements hold. :# For any computable enumeration operator Φ there is a recursively enumerable set ''F'' such that Φ(''F'') = ''F'' and ''F'' is the smallest set with this property. :# For any recursive operator Ψ there is a partial computable function φ such that Ψ(φ) = φ and φ is the smallest partial computable function with this property.Example
Like the second recursion theorem, the first recursion theorem can be used to obtain functions satisfying systems of recursion equations. To apply the first recursion theorem, the recursion equations must first be recast as a recursive operator. Consider the recursion equations for theProof sketch for the first recursion theorem
The proof of part 1 of the first recursion theorem is obtained by iterating the enumeration operator Φ beginning with the empty set. First, a sequence ''F''''k'' is constructed, for . Let ''F''0 be the empty set. Proceeding inductively, for each ''k'', let ''F''''k'' + 1 be . Finally, ''F'' is taken to be . The remainder of the proof consists of a verification that ''F'' is recursively enumerable and is the least fixed point of Φ. The sequence ''F''''k'' used in this proof corresponds to the Kleene chain in the proof of the Kleene fixed-point theorem. The second part of the first recursion theorem follows from the first part. The assumption that Φ is a recursive operator is used to show that the fixed point of Φ is the graph of a partial function. The key point is that if the fixed point ''F'' is not the graph of a function, then there is some ''k'' such that ''F''''k'' is not the graph of a function.Comparison to the second recursion theorem
Compared to the second recursion theorem, the first recursion theorem produces a stronger conclusion but only when narrower hypotheses are satisfied. Rogers uses the term weak recursion theorem for the first recursion theorem and strong recursion theorem for the second recursion theorem. One difference between the first and second recursion theorems is that the fixed points obtained by the first recursion theorem are guaranteed to be least fixed points, while those obtained from the second recursion theorem may not be least fixed points. A second difference is that the first recursion theorem only applies to systems of equations that can be recast as recursive operators. This restriction is similar to the restriction to continuous operators in the Kleene fixed-point theorem of order theory. The second recursion theorem can be applied to any total recursive function.Generalized theorem
In the context of his theory of numberings, Ershov showed that Kleene's recursion theorem holds for any precomplete numbering. A Gödel numbering is a precomplete numbering on the set of computable functions so the generalized theorem yields the Kleene recursion theorem as a special case.See for a survey in English. Given a precomplete numbering , then for any partial computable function with two parameters there exists a total computable function with one parameter such that :See also
* Denotational semantics, where another least fixed point theorem is used for the same purpose as the first recursion theorem. * Fixed-point combinators, which are used in lambda calculus for the same purpose as the first recursion theorem. * Diagonal lemma a closely related result in mathematical logicReferences
* * * * FootnotesFurther reading
*External links
* {{SEP, recursive-functions, Recursive Functions,