Divisor Relation is Primitive Recursive

Theorem
The divisor relation $$m \backslash n$$ in $$\N^2$$ is primitive recursive.

Proof
We note that $$m \backslash n \iff n = q m$$ where $$q \in \Z$$.

So we see that $$m \backslash n \iff \operatorname{rem} \left({n, m}\right) = 0$$ (see Quotient and Remainder are Primitive Recursive).

Thus we define the function $$\operatorname{div}: \N^2 \to \N$$ as:
 * $$\operatorname{div} \left({n, m}\right) = \chi_{\operatorname{eq}} \left({\operatorname{rem} \left({n, m}\right), 0}\right)$$

where $$\chi_{\operatorname{eq}} \left({n, m}\right)$$ is the chartacteristic function of the equality relation.

So we have:
 * $$\operatorname{div} \left({n, y}\right) = \begin{cases}

1 & : y \backslash n \\ 0 & : y \nmid n \end{cases}$$

So $$\operatorname{div} \left({n, m}\right)$$ is defined by substitution from:
 * the primitive recursive function $\operatorname{rem}$;
 * the primitive recursive relation $\operatorname{eq}$;
 * the constants $$1$$ and $$0$$.

Thus $$\operatorname{div}$$ is primitive recursive.

Hence the result.