Primitive recursive functions are generated by zero, successor, and projections under composition and primitive recursion.
For a decidable coding of finite construction trees, the codes of arity- primitive recursive functions in intension are decidable. Check initial-function tags, then verify the child arities at each composition and recursion node. This is a terminating finite syntax check, distinct from asking whether an arbitrary program's extension happens to be primitive recursive.
Enumerate all valid unary primitive recursive functions in intension by their decidable codes , and interpret each extension . The function is a total computable function, since each finite construction terminates. If it were primitive recursive, some would equal , giving . Repeated extensions in the syntax enumeration do not affect this argument.
A valid finite construction expression from the initial functions of recursion theory by function composition in recursion theory and primitive recursion. Its extension is a primitive recursive function. The construction grammar supplies both a decidable syntax and a total computable interpreter, but no uniformly primitive recursive interpreter for all valid codes.
For a fixed effective machine coding, the predicate that program on input halts within steps is primitive recursive. Code finite configurations, iterate a total single-step function by primitive recursion, and test for the halt state. This supplies a bounded simulation even though the unrestricted halting problem is undecidable.
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.
The predecessor function on the nonnegative integers is and . This is a primitive recursive function by primitive recursion from the zero and projection functions.
The zero function has the constant value
Dummy variables give a zero function of any finite arity.
The successor function is
The th -ary projection returns its th input:
Given a -ary function and -ary functions , composition forms
From and , primitive recursion defines
The functions generated from the initial functions using composition alone are exactly
for a constant . Structural induction proves necessity, and iterating the successor function on zero or a projection proves sufficiency.
To prove a property of every primitive recursive function, prove it for the zero, successor, and projection functions, then prove that it is preserved by composition and by primitive recursion. This is structural induction on the finite construction of the function.
The initial functions are total, composition preserves totality, and ordinary induction on the recursion argument shows that primitive recursion applied to total functions is total. Structural induction therefore proves that every primitive recursive function is total.
The graph of every primitive recursive has a formula
in the language of ordered rings, where every quantifier inside is bounded. Composition uses existentially quantified intermediate values, while primitive recursion uses a boundedly checked code for the finite sequence of intermediate values.
The Gödel beta function codes finite sequences by remainders:
Choosing sufficiently large and divisible by the relevant small integers makes the moduli pairwise coprime, so the Chinese remainder theorem codes any prescribed finite sequence.
The graph of the factorial function has a fixed-length first-order formula in the language of ordered rings interpreted on the natural numbers. A remainder code records , , and for every . Uniqueness of remainders proves ; sufficiently large pairwise-coprime moduli and the Chinese remainder theorem supply a code for every input. Formula length is independent of the input variable's value, although substituting a numeral adds its encoding length.
In a primitive recursion, an existential representation of the step function may need a different witness tuple at every time. Code each coordinate of the finite witness array by a separate beta-function code pair. All row witnesses then have bounded remainder quantifiers under the bounded time quantifier, while the finitely many code pairs remain in the outer unrestricted existential block.

Ancestors (5)

  1. Computability theory
  2. Foundations of mathematics
  3. Area of mathematics
  4. Mathematics
  5. Home

Synonyms (1)

Discussion (0)

New discussion

There are no discussions about this article yet.

Articles by others on the same topic (2)

A **primitive recursive function** is a type of function defined using a limited set of basic functions and a specific set of operations. Primitive recursive functions are important in mathematical logic and computability theory, as they represent a class of functions that can be computed effectively. The core concepts regarding primitive recursive functions include: 1. **Basic Functions**: The basic primitive recursive functions include: - **Zero Function**: \( Z(n) = 0 \) for all \( n \).
In intuitive terms it consists of all integer functions, possibly with multiple input arguments, that can be written only with a sequence of:
for (i = 0; i < n; i++)
and such that n does not change inside the loop body, i.e. no while loops with arbitrary conditions.
n does not have to be a constant, it may come from previous calculations. But it must not change inside the loop body.
Primitive recursive functions basically include every integer function that comes up in practice. Primitive recursive functions can have huge complexity, and it strictly contains EXPTIME. As such, they mostly only come up in foundation of mathematics contexts.
The cool thing about primitive recursive functions is that the number of iterations is always bound, so we are certain that they terminate and are therefore computable.
This also means that there are necessarily functions which are not primitive recursive, as we know that there must exist uncomputable functions, e.g. the busy beaver function.
Adding unbounded while loops of course enables us to simulate arbitrary Turing machines, and therefore increases the complexity class.
More finely, there are non-primitive total recursive functions, e.g. most famously the Ackermann function.