f: N^n \to N is a total functions if it is defined for all elements of N^n.
If a function is not total it is a partial function.
Let N = \mathbb N
\begin{aligned} f(x_1, \cdots, x_n, 0) &= g(x_1, \cdots, x_n) \\ f(x_1, \cdots, x_n, y+1) &= h(x_1, \cdots, x_n, y, f(x_1, \cdots, x_n, y)) \\ \end{aligned}
where g: N^n \to N, h: N^{n+2} \to N, f: N^{n+1} \to N
A function f is a primitive recursive function if:
Every recursive function is a total function.
For some p: N^{n+1} \to N primitive recursive function we define \mu[p(x_1, \cdots, x_n, y) = 0]: N^{n+1} \to N where
\mu[p(x_1, \cdots, x_n, y) = 0](x_1, \cdots, x_n, j) = \begin{cases} \text{the smallest } y \le j \text{ such that } p(x_1, \cdots, x_n, y) = 0 &\text{if such } y \text{ exists} \\ 0 &\text{otherwise} \end{cases}
For some \omega: N^n \to N primitive recursive function we define \mu_{y \le \omega(x_1, \cdots, x_n)}[p(x_1, \cdots, x_n, y) = 0]: N^n \to N where
\mu_{y \le \omega(x_1, \cdots, x_n)}[p(x_1, \cdots, x_n, y) = 0](x_1, \cdots, x_n) = \mu[p(x_1, \cdots, x_n, y) = 0](x_1, \cdots, x_n, \omega(x_1, \cdots, x_n))
Returns the index of a pair in the Cantor enumeration.
\Pi : N^2 \to N,\ \Pi(x,y) = \frac{(x+y)(x+y+1)}{2} + x
let \sigma_1, \sigma_2: N \to N where \Pi(\sigma_1(z), \sigma_2(z)) = z
\Pi^2 \stackrel{\text{def}}{=} \Pi, \sigma_i^2 \stackrel{\text{def}}{=} \sigma_i
\Pi^{n+1}(x_1, \cdots, x_n, x_{n+1}) = \Pi^2(\Pi^n(x_1, \cdots, x_n), x_{n+1})
\sigma_k^{n+1}(z) = \sigma_k^n(\sigma_1^2(z))
(x_0, \cdots, x_n) \mapsto p_0^{x_0}p_1^{x_1}\cdots p_n^{x_n}
where p_i is the i-th prime number, p_i = pn(i)
It is not a primitive recursive function.
\begin{cases} A(0, y) = y + 1 \\ A(x+1, 0) = A(x, 1) \\ A(x+1, y+1) = A(x, A(x+1, y)) \\ \end{cases}
\forall_{x, y \in \mathbb N}
For every primitive recursive function f: N^n \to N there exists a constant k \in N such that \forall_{x_1, \cdots, x_n \in N} A(k, \max(x_1, \cdots, x_n)) > f(x_1, \cdots, x_n)
For some p: N^{n+1} \to N we define \mu_y[p(x_1, \cdots, x_n, y) = 0]: N^{n+1} \to N where
\mu_y[p(x_1, \cdots, x_n, y) = 0](x_1, \cdots, x_n) = \begin{cases} \text{the smallest } y \le j \text{ such that } p(x_1, \cdots, x_n, y) = 0 &\text{if such } y \text{ exists} \\ 0 &\text{otherwise} \end{cases}
\mu_y is a partial function called unbounded minimum.
A function f: N^{n+1} \to N is called regular if \forall_{x_1, \cdots, x_n \in N}\exists_{y \in N} f(x_1, \cdots, x_n, y) = 0
A function f is a recursive function if:
Every recursive function is a total function
A function f is a partial recursive function if:
A function f: N^n \to N is computable by a TM if there exists a TM M such that for the input arguments x_1, \cdots, x_n written on the tape:
Every partial recursive function is computable by a TM. Every recursive function is computable by a TM with stop property.
For every TM M there exists a partial recursive function f_M such that:
If M is a TM with stop property then f_M is a recursive function.
\text{the set of primitive recursive functions} \subsetneq \text{the set of recursive functions} \subsetneq \text{the set of partial recursive functions}