Lambda quotation 2026-10-14
For an effective Gödel numbering , the quotation is a Church numeral coding the syntax of . It is not a code of a beta equivalence class. The operations taking syntax codes to the code of an application, or to the code of the numeral itself, are total computable functions and hence lambda-definable functions.
Use Church numerals
Explicit lambda terms for the successor and zero test are
Direct beta reduction gives , and the Church numeral zero test returns exactly at zero. For the predecessor, use the Church pair operations
and set
After iterations this pair holds : the initial pair gives the case , and one step moves the old first coordinate into the second and increments the first. This proves the predecessor equation, including .
A total function is a lambda-definable function when a closed lambda term sends each tuple of numerals to the numeral of its value. Suppose represent total , and
For lambda definition of primitive recursion by pair iteration, put
On numeral inputs, induction gives the pair after iterations. The base case is the equation for , and the induction step is exactly the equation for . Hence represents , proving closure of total lambda-definable functions under primitive recursion.
For unbounded minimization, the careful closure statement is partial: if total is lambda-definable, then
is a lambda-definable partial function, defined when a zero exists and otherwise undefined. It need not be total. With representing , use a fixed-point combinator to define
Each test terminates because is total. Normal-order beta reduction chooses the return branch at the first zero and does not evaluate the discarded branch. If there is no zero, the required head computation passes through tests for all , never exposing a numeral; standardization theorem for beta reduction rules out a hidden numeral reduct. For partial , the usual mu operator is defined only if all earlier tests terminate and the successful test is zero. This stronger partial closure requires representatives that diverge on undefined inputs, or an explicit strict evaluator; the weaker condition of producing no numeral on undefined inputs alone must not be used as a test for convergence.
The zero function, successor, and projections have immediate numeral representations; function composition in recursion theory is implemented by substitution on total inputs. Thus every primitive recursive function is lambda-definable. The Kleene normal form theorem writes every partial recursive function as a total primitive-recursive decoding after a single minimization of a total primitive-recursive computation-history predicate. The search above consequently represents every partial recursive function, diverging when no successful history exists. Conversely a machine can effectively enumerate the beta reductions of a fixed representing lambda term on numeral inputs until it finds a Church numeral; distinct numerals cannot be beta-equivalent by the Church-Rosser theorem. It computes exactly the represented partial function. Therefore lambda-definable partial functions are precisely partial computable functions, and the total ones are precisely total computable functions.
This also gives the full partial minimization closure without assuming that an arbitrary weak representative diverges on every undefined input. Run its effective numeral evaluator successively at ; stop at the first zero, and run forever if an earlier evaluation fails to terminate or no zero is found. This is exactly the sequential-domain convention for the mu operator. The resulting partial computable function has a lambda representation by the construction just proved. Thus partial lambda-definable functions are closed under partial minimization; a minimized function belongs to the total family only when the required successful search exists for every input.
The syntax operation , where , is a total computable function on valid codes: decode the finite syntax trees, form their application, and encode it again. Extend it arbitrarily on invalid codes if necessary. Similarly is total computable because the finite numeral syntax can be generated effectively from . The preceding characterization of lambda-definable functions supplies closed representatives with
Here is lambda quotation, not a code of a beta equivalence class. In particular quotes the syntax of the numeral itself; it is not simply successor or an identity operation.
The Church numeral corresponding to the natural number is
A function is a lambda-definable function if some closed lambda term satisfies
for all natural numbers .
Define
Then beta reduction gives
Therefore the successor function is lambda-definable; this is the lambda definition of the successor function.
A combinator is a lambda term without free variables. It is a fixed-point combinator when
for every lambda term .
The fixed-point theorem for the untyped lambda calculus states that every untyped lambda term has a fixed point up to beta equivalence. Put
One beta reduction gives
which proves the theorem. Equivalently,
is a fixed-point combinator.
Apply the theorem to the lambda term . Its fixed point is a nonnormalizing lambda term satisfying ; it is not a Church numeral. The definition of a lambda-definable function describes the representing term only on Church-numeral inputs, so it does not turn this syntactic fixed point into a natural number satisfying .