Equality Relation is Primitive Recursive

Theorem
The relation $$\operatorname{eq} \subseteq \N^2$$, defined as:
 * $$\operatorname{eq} \left({n, m}\right) \iff n = m$$

is primitive recursive.

Proof
We note that:
 * $$n = m \iff \left|{n - m}\right) = 0$$;
 * $$n \ne m \iff \left|{n - m}\right) > 0$$.

So it can be seen that the characteristic function of $$\operatorname{eq}$$ is given by:
 * $$\chi_{\operatorname{eq}} \left({n, m}\right) = \overline{\sgn} \left({\operatorname{adf}\left({n, m}\right)}\right)$$.

So $$\chi_{\operatorname{eq}} \left({n, m}\right)$$ is defined by substitution from:
 * the primitive recursive function $\overline{\sgn}$;
 * the primitive recursive function $\operatorname{adf}$.

Thus $$\chi_{\operatorname{eq}}$$ is primitive recursive.

Hence the result.