Bounded minimization 2026-10-06
Search over the finite interval for the least witness to a primitive recursive predicate, with an explicitly chosen default if there is none. The result is a primitive recursive function, by scanning this finite interval using primitive recursion. This differs from unbounded minimization, which may fail to terminate.
Lambda definition of unbounded minimization Created 2026-09-28 Updated 2026-10-05
For a lambda-definable partial , a fixed-point search term tests and returns the first for which . If no such value is reached, reduction produces no Church numeral. This realizes unbounded minimization and therefore makes every partial recursive function lambda-definable.
Represent a nonnegative integer by the Church numeral
A closed lambda term represents a partial computable function if, on inputs in its domain, reduces to the Church numeral of the value, and on other inputs it produces no Church numeral. We use untyped lambda calculus and normal-order beta reduction.
First every primitive recursive function has such a representation on all inputs. The zero function is represented by a constant , the projection functions by , and the successor function by
For function composition in recursion theory, substitute the represented inner functions into the represented outer function:
These constituent functions are total, so there is no undefined argument to be discarded.
For primitive recursion, use Church Booleans and Church pairs:
If represent the total functions defining a recursion, put
and
After iterations the Church pair contains the counter and the recursively computed value at , by mathematical induction. Thus this lambda definition of primitive recursion by pair iteration represents the recursion. A structural induction for primitive recursive functions now represents every primitive recursive function.
To pass to arbitrary partial computable functions, use the Kleene normal form theorem in the following form: for every , there are total primitive recursive functions such that
with undefined precisely when no such exists. The predicate checks codes of valid finite halting histories for the chosen program; extracts their common output. This expresses unbounded minimization of a total predicate, so no earlier undefined test can interfere with the search.
Let be the represented total functions. The Church numeral zero test and a fixed-point combinator are
Define the search lambda term
All displayed abbreviations expand to finite closed lambda terms; stands for the fixed finite tuple of input variables. Because , normal-order beta reduction tests . At the first successful test the Church Boolean selects , which reduces to the correct Church numeral. The unused recursive branch is discarded.
If no test succeeds, every finite search step returns to another head search, never exposing a numeral. The term has no head normal form and hence cannot be beta equivalent to a Church numeral. This last point is why the output operation occurs inside the successful branch: simply applying a possibly argument-discarding outer function to a divergent search would not justify undefinedness. Therefore every computable function is representable, including partial computable functions with their correct undefined inputs:
The machine characterization is computation by a Turing machine: the machine halts with exactly on inputs in the domain of a partial function and does not halt elsewhere. The syntactic characterization is the least class containing the initial functions of recursion theory and closed under composition of partial functions, primitive recursion and unbounded minimization. Such functions are the partial recursive functions, equivalently the partial computable functions.
For clarity, composition here is strict: is defined only when every inner value is defined and is defined on the resulting tuple. Likewise primitive recursion requires all preceding recursive values. The partial minimization is defined when such a exists and all earlier values are defined and nonzero; an undefined earlier value blocks the search.
A lambda-definable partial function is represented by a closed untyped lambda calculus term satisfying
On an input outside its domain there must be no Church numeral beta-equivalent to the result. A stronger representation can be arranged: undefined inputs have no head normal form.
Here are the components for proving that every partial recursive function is lambda-definable. Zero and projections are immediate; lambda definition of the successor function uses . Church Booleans encode a conditional by , with and . Put
Iteration takes to for , proving that encodes the predecessor function and that correctly tests zero.
Use a fixed-point combinator and the strict sequencing operation
For any numeral , reduces to . If the first argument has no head normal form, neither does the whole expression. Thus composition is implemented by nesting on every inner result before applying the outer representing term. This guard is important: an unguarded projection could discard an undefined inner computation.
For lambda definition of primitive recursion, with already represented by , take
The tuple notation abbreviates successive abstractions and applications. On numeral inputs, induction on proves the required recursion equations, including strict propagation of undefined preceding values. The beta reduction follows the selected conditional branch only.
For lambda definition of unbounded minimization, use
This searches in increasing order. An undefined value blocks the zero test; an infinite sequence of nonzero values continues forever; the first zero returns its numeral. Under normal-order beta reduction, both failure cases have no head normal form. Structural induction on partial-recursive declarations now supplies the stronger representation claimed above.
Conversely, beta reduction is an effective operation on finitely encoded lambda terms. Enumerate all finite reduction sequences from , stopping when a result is a Church numeral in beta-normal form. If , the Church-Rosser theorem gives a reduction to that numeral. It also makes the output unique. The enumeration therefore computes exactly the represented partial function; by the equivalence of the first two characterizations it is partial recursive. Hence
Fix a register machine with inputs. By the permitted result, its complete configuration after steps,
is a recursive function of the inputs and time. The predicate saying that this configuration is halted is therefore recursive. Its halting time is the partial recursive function
where unbounded minimization is undefined when no halting time exists. Extracting the output register from a configuration is recursive, so
is partial recursive. Hence every partial computable function is partial recursive.
A partial function is lambda-definable when a lambda term sends the corresponding Church numerals to the numeral for whenever the value is defined and produces no numeral otherwise; in other words, it is a lambda-definable partial function. The initial functions are represented by
and the appropriate variable in . If represent , then
represents their composition.
Church Booleans supply a lazy conditional, and
tests whether a Church numeral is zero. A standard predecessor term is
Let and represent the base and step functions of a primitive recursion. With a fixed-point combinator , define
Normal-order beta reduction evaluates only the selected branch. Induction on the input numeral gives the two recursion equations, so this is the lambda definition of primitive recursion.
For unbounded minimization, let represent and define
Then tests in order and returns the least zero of . If no zero is reached, or a required earlier computation is undefined, reduction never produces a Church numeral. This is the lambda definition of unbounded minimization. Since the partial recursive functions are generated from the initial functions by composition, primitive recursion, and minimization, every partial computable function is represented by a lambda term on Church numerals.
Let , where is the total primitive-recursive parity function from part (ii), and apply unbounded minimization in :
If is even, then and . If is odd, then for every , so the search never terminates and is undefined. Hence is partial recursive. Because every function built without minimization is total, cannot be defined without minimization; the functions and can.
It remains to characterize the functions built using only the initial functions and composition. They are exactly the functions
for some and some input coordinate .
Indeed, the zero function is the first form, the successor function and each projection function have the second form, and composing functions of these forms preserves the classification: a constant outer function remains constant, while an outer function selects one inner function and adds . This proves necessity by structural induction. Conversely, applying the successor function times to zero produces the constant , and applying it times to produces .
Every function in this class is directly computable: an algorithm either writes the fixed constant , or copies the th input and performs successor steps.
A partial recursive function is obtained from the three kinds of initial function of recursion theory—
the zero function, successor function, and projection function—by finitely many applications of function composition in recursion theory, primitive recursion, and unbounded minimization. Explicitly, primitive recursion has the form
while minimization takes the least for which and is undefined if no such is found.
For the function in part (i), define
The initial value and the identically zero recursion step are primitive recursive, so this is a primitive-recursive definition of the required zero test. It uses no minimization.