Multiplication is Primitive Recursive

Theorem
The function $$\operatorname{mult}: \N^2 \to \N$$, defined as:
 * $$\operatorname{mult} \left({n, m}\right) = n \times m$$

is primitive recursive‎.

Proof
We observe that:
 * $$\operatorname{mult} \left({n, 0}\right) = n \times 0 = 0$$

and that
 * $$\operatorname{mult} \left({n, m + 1}\right) = n \times \left({m + 1}\right) = \left({n \times m}\right) + n = \operatorname{add} \left({\operatorname{mult} \left({n, m}\right), n}\right)$$.

We are to show that $$\operatorname{mult}$$ is obtained by primitive recursion from known primitive recursive‎ functions.

First we note that:
 * $$\operatorname{mult} \left({n, 0}\right) = 0 = \operatorname{zero} \left({n}\right)$$

where $$\operatorname{zero} \left({n}\right)$$ is a basic primitive recursive‎ function.

Next we need to find a primitive recursive‎ function $$g: \N^3 \to \N$$ such that:
 * $$\operatorname{mult} \left({n, m}\right) = g \left({n, m, \operatorname{mult} \left({n, m}\right)}\right)$$.

Since $$\operatorname{mult} \left({n, m}\right) = \operatorname{add} \left({\operatorname{mult} \left({n, m}\right), n}\right)$$, we see that a suitable function for $$g$$ is:
 * $$g \left({n_1, n_2, n_3}\right) = \operatorname{add} \left({n_3, n_1}\right)$$.

Using projection functions, we can write this as:
 * $$g \left({n_1, n_2, n_3}\right) = \operatorname{add} \left({\operatorname{pr}^3_3 \left({n_1, n_2, n_3}\right), \operatorname{pr}^3_1 \left({n_1, n_2, n_3}\right)}\right)$$.

This shows that $$g$$ is obtained by substitution from $\operatorname{add}$, which is primitive recursive, and the basic primitive recursive‎ functions $$\operatorname{pr}^3_3$$ and $$\operatorname{pr}^3_1$$.

So $$g$$ is primitive recursive‎.

So $$\operatorname{mult}$$ is obtained by primitive recursion from the primitive recursive functions‎ $$g$$ and $$\operatorname{zero}$$, and so is primitive recursive‎.