Definition 2.1.1 (Partial recursive function). The class of recursive functions is the smallest class of partial functions of the form k that contains the basic functions:

  • Projections: Πim:(n1,,nm)ni;

  • Successor: S+:nn+1;

  • Zero: z:n0

and is closed under:

  • Compositions: if g:k is partial recursive and so are h1,,hk:m, then the function f:m given by f(n¯)=g(h1(n¯),,hk(n¯)) is partial recursive.

  • Primitive recursion: Given partial recursive functions g:m and h:m+2, the function f:m+1 defined by

    {f(0,n¯):=g(n¯)f(k+1,n¯):=h(f(k,n¯),k,n¯)

  • Minimisation: Suppose g:m+1 is partial recursive. Then the function f:m that maps n¯ to the least n such that g(n,n¯)=0 (if it exists) is partial recursive.

    Notation: f(n¯)=μn.g(n,n¯)=0.

The class of functions produced by the same conditions but excluding minimisation is called the class of primitive recursive functions.

A partial recursive function that is defined everywhere is called a total recursive function.