An arithmetic bounded formula uses only quantifiers bounded by arithmetic terms, such as and , with the bound not containing the quantified variable. Existential bounded representation of a primitive recursive function places all unrestricted existential variables in a single outer block.
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.
Hyperoperation 2026-10-06
The hyperoperation hierarchy successively iterates basic arithmetic operations. In the usual indexing, successor is followed by addition, multiplication, exponentiation and their higher iterates. A sequence beginning with addition shifts this index by one. Each fixed rank is a primitive recursive function; this does not imply that the evaluator taking the rank as an additional variable is primitive recursive.
For every partial computable function , there are total primitive recursive functions such that
Here is zero exactly on codes of valid halting computation histories for the chosen program and input, and extracts the final output. Coding finite configurations and finite histories makes checking every local step a bounded primitive recursive operation. If a computation halts, some history code passes and every passing code has the same output; if it does not halt, none passes. This is the usual normal-form version with the program index fixed; a universal predicate can also retain that index as an input.
If total functions and are represented by lambda terms , define
and
After iterations the Church pair holds , proved by mathematical induction using the defining recursion equations. Consequently represents the total primitive recursive function . This statement concerns total inputs and total recursion constituents; it is not an unguarded composition theorem for arbitrary partial functions.
Every partial computable function is represented on Church numerals by a closed untyped lambda calculus term. First represent all primitive recursive functions using zero, successor, projections, composition and lambda definition of primitive recursion by pair iteration. Apply the Kleene normal form theorem and search successive history codes with a fixed-point combinator. Test the represented total predicate using a Church numeral zero test; return the decoded output only on the true branch. If no history passes, normal-order head reduction continues the search indefinitely and the term has no head normal form, so cannot be in beta equivalence with a Church numeral. This avoids the incorrect assumption that a lazy outer function must evaluate a divergent argument in an unguarded composition.
Every nonempty computably enumerable set is the range of a primitive recursive function . Choose , decode using a primitive recursive pairing function, and output if the recognizing machine halts within steps, or otherwise. The bounded halting predicate makes this function primitive recursive, and every member of occurs for a sufficiently large bound. The empty set is excluded because such a function is total.
A function in intension is a finite description of a computation, such as a program or a formal construction expression. A function in extension is the resulting input-output map, including its domain if it is partial. Different descriptions may have the same extension: the programs that return directly and that compute describe the same function. Finite descriptions have Gödel numbers; equality of the resulting partial computable functions is a separate semantic question.
The primitive recursive functions are the smallest class of numerical functions containing the zero functions, the successor function and all projection functions, and closed under function composition in recursion theory and primitive recursion. More explicitly, from and the latter operation forms
For function composition in recursion theory, an -ary and -ary give . Zero functions of all allowed arities can be included, with nullary zero included if arity is part of the coding convention. Every resulting function is total: the initial functions are total, function composition in recursion theory preserves totality, and mathematical induction on verifies totality of primitive recursion. Applying structural induction for primitive recursive functions then covers all construction expressions.
Use a fixed effective Gödel numbering of finite tagged construction trees with decidable decoding. A node is tagged as zero, successor, projection, composition, or recursion. The primitive recursive syntax and arity checking algorithm first checks that the input decodes as a finite tree, then works upwards from its leaves. A projection tag is legal exactly when , with output arity . A composition node declares its output arity and is legal when its outer child has arity , there are exactly inner children, and each has arity ; its arity is . The declared arity also handles the case . A recursion node is legal when its base child has arity and its step child has arity ; its arity is . Zero and successor tags have their declared arities. Ill-formed nodes are rejected. The process terminates because there are only finitely many nodes. Thus, for each fixed ,
This is a syntactic assertion about functions in intension. It does not assert that arbitrary machine indices computing primitive recursive functions form a decidable set. That extensional property is nontrivial, hence undecidable by Rice theorem. For an explicit reduction, given a program construct a program that, on every input, waits for to halt and then returns . Its extension is a primitive recursive function if , and otherwise is nowhere defined and so is not a primitive recursive function. A decision procedure for this latter semantic set would decide the diagonal halting set.
Enumerate the decidable syntax set in increasing code order as . There are infinitely many such descriptions; iterating successor after a unary zero expression already supplies infinitely many. Let be the extension of a valid construction and define
To compute , find by the syntax test and interpret its finite construction tree. Evaluate function composition in recursion theory by evaluating the children, and evaluate primitive recursion by the prescribed finite loop of length equal to its final input. Termination follows from the totality argument above, so and are total computable functions.
If were a unary primitive recursive function, some construction would have extension . Then the diagonal argument gives
which is impossible. The displayed is total and computable but not primitive recursive. Repetitions of extensions in the enumeration cause no problem: every possible extension is represented, which is all the diagonal argument needs. The same argument shows that the two-variable interpreter cannot itself be primitive recursive.
In the simply typed lambda calculus, types are generated from atomic types by the arrow constructor . A typed lambda term is a lambda term equipped with a derivation of a judgement , where the context assigns types to its free variables. The basic typing rules are
The Implicational Curry-Howard correspondence reads atomic types as propositions and as logical implication. A typed variable is an assumption, abstraction is the implication introduction rule discharging that assumption, and application is the implication elimination rule. Consequently a typed lambda term is a proof in implicational Intuitionistic propositional logic, and a natural deduction proof recursively supplies such a term. For example, expresses implication reflexivity. Products, sums, and the empty type extend the correspondence to conjunction, disjunction, and falsity; pure arrow types give precisely the implicational fragment. Beta reduction removes an introduction followed immediately by its elimination, matching proof simplification.
A Church numeral is
where means repetitions of application. At base type , it has type . The following Church numeral arithmetic terms use left-associated application:
Their concise conclusions are
For successor, the initial adds one application. For addition, the inner supplies applications and supplies more. For multiplication, the repeated operation applies times, and repetitions give . For exponentiation, iterates the operation on : each iteration replaces a function by its -fold iterate, yielding . Zero iterations give , so this encoding takes , including . The explicit outer abstractions make the result the standard Church numeral even at exponent zero, without needing eta equivalence.
Successor, addition, and multiplication operate on the same . The displayed exponentiation term has type : its exponent iterates an operation on functions. Thus the numeral syntax admits several type instances; one should not force every occurrence into one fixed monomorphic Church type.
The Y combinator is the fixed-point combinator
For , beta reduction gives . Since , we obtain . This allows a recursive program body to receive a representation of itself.
Here the computation is in the untyped lambda calculus. The self-application would require a simple type satisfying , impossible for finite simple types. Accordingly is not a typed lambda term of the simply typed system. The Strong normalization theorem for simply typed lambda calculus also rules out a universal divergent fixed-point operator there.
To obtain a lambda representation of partial computable functions, encode machine configurations as finite data using Church numerals, Church pairs, and Church Booleans. Initial configuration, one transition, the halting test, and output extraction are primitive recursive functions, represented by lambda terms through the initial functions, composition, and lambda definition of primitive recursion by pair iteration. If these representations are , , , and , define
Use normal-order beta reduction so the Church Boolean halting test selects one branch without evaluating the unused recursive branch. A halting computation follows finitely many transitions and returns the Church numeral of the output. A nonhalting computation forces successive tests forever and has no head normal form; by normal-order normalization theorem, it cannot be beta equivalent to a Church numeral. Thus every partial computable function is represented, with divergence preserved; every total computable function is the halting special case. This explains the role of in computational universality while keeping the typed proof interpretation precise.