Math 2.0

Mathematical logic and foundations Definition

Primitive recursive function

Builds on Natural numbersFunction

Definition

The class of primitive recursive functions is the smallest class of functions f ⁣:ℕk→ℕf \colon \N^k \to \N, for k≥0k \ge 0, with the following properties.

  1. It contains the constant function 00 of arity 00, and the successor function S(x)=x+1S(x) = x + 1.
  2. It contains the projections Pik(x1,…,xk)=xiP^k_i(x_1, \ldots, x_k) = x_i for 1≤i≤k1 \le i \le k.
  3. It is closed under composition: if g ⁣:ℕm→ℕg \colon \N^m \to \N and h1,…,hm ⁣:ℕk→ℕh_1, \ldots, h_m \colon \N^k \to \N are in the class, so is xˉ↦g(h1(xˉ),…,hm(xˉ))\bar x \mapsto g(h_1(\bar x), \ldots, h_m(\bar x)).
  4. It is closed under primitive recursion: if g ⁣:ℕk→ℕg \colon \N^k \to \N and h ⁣:ℕk+2→ℕh \colon \N^{k+2} \to \N are in the class, so is the function f ⁣:ℕk+1→ℕf \colon \N^{k+1} \to \N given below.

f(0,xˉ)=g(xˉ),f(y+1,xˉ)=h(y,f(y,xˉ),xˉ).f(0, \bar x) = g(\bar x), \qquad f(y + 1, \bar x) = h(y, f(y, \bar x), \bar x).

Here ℕ={0,1,2,…}\N = \set{0, 1, 2, \ldots} is the set of natural numbers.

Remarks

Example: addition is primitive recursive. Take g=P11g = P^1_1 and h(y,z,x)=S(P23(y,z,x))h(y, z, x) = S(P^3_2(y, z, x)), which are in the class by clauses 1, 2 and 3. Clause 4 gives f(0,x)=xf(0, x) = x and f(y+1,x)=f(y,x)+1f(y + 1, x) = f(y, x) + 1, so f(y,x)=x+yf(y, x) = x + y. In the same way, multiplication, exponentiation, the factorial and truncated subtraction are primitive recursive.

Non-example: the Ackermann function is total and computable but not primitive recursive. Its diagonal n↦A(n,n)n \mapsto A(n, n) eventually exceeds every unary function in the class.

A set or relation is primitive recursive when its characteristic function is.

Reading path

To understand this page from the ground up, read these 3 pages in order. The foundations come first.

Show the path as a graph
Each page uses the pages above it. The colour of the bar on a box shows how strong the evidence is, and the box also gives it as text. The list has the same pages.
  • no evidence level
  1. Function concept
  2. Natural numbers object
  3. Primitive recursive function definition

Further reading

  1. Web https://en.wikipedia.org/wiki/Primitive_recursive_function
About this page
TagXZV7BD3D66
URIm2://XZV7BD3D66
Kinddefinition
WritingW0 stub
MSC03D20
DefinesPrimitive recursive function
UsesNatural numbers, Function
Changed2 November 2026

Markdown · JSON · Edit on GitHub

What this page needs for W1

  • an inventory row: the row of the inventory that the node accounts for (0 of 1)
  • a source with a locator (0 of 1)

The writing levels say how complete the text of a page is. They do not measure its truth.

What links here

No page links to this page yet.