Halting Problem is Not Algorithmically Decidable

Theorem
Let $H: \N^2 \to \N$ be the function given by:
 * $H \left({m, n}\right) = 1$ if $m$ codes a URM program which halts with input $n$;
 * $H \left({m, n}\right) = 0$ otherwise.

Then $H$ is not recursive.

Proof
We perform a proof by Cantor's Diagonal Argument.

Suppose the contrary, that $H$ is recursive.

Consider the universal URM computable function $\Phi_1: \N^2 \to \N$.

Let $f: \N \to \N$ be the function given by:
 * $f \left({n}\right) = \begin{cases}

\Phi_1 \left({n, n}\right) & : H \left({n, n}\right) = 1 \\ 0 & : \text{otherwise} \end{cases}$

As $H$ is recursive, the relation $H \left({n, n}\right) = 1$ is also recursive.

The universal function is recursive as all URM computable functions are recursive.

Also, $\Phi_1 \left({n, n}\right)$ is defined when $H \left({n, n}\right) = 1$.

The constant $0$ is (primitive) recursive and always defined.

So $f$ is total, and by Combination of Recursive Functions it is also recursive.

It follows immediately that the function $g: \N \to \N$ given by:
 * $g \left({n}\right) = f \left({n}\right) + 1$

is also recursive.

So by Universal URM Computable Functions there exists some $e \in \N$ such that:
 * $\forall n: g \left({n}\right) = \Phi_1 \left({e, n}\right)$

that is, the URM program coded by $e$ computes $g$.

Hence:
 * $g \left({e}\right) = \Phi_1 \left({e, e}\right)$

But since $e$ codes a URM program which halts with input $e$, we have:
 * $H \left({e, e}\right) = 1$

and so:
 * $f \left({e}\right) = \Phi_1 \left({e, e}\right)$

Therefore, by definition of $g$, we have:
 * $g \left({e}\right) = \Phi_1 \left({e, e}\right) + 1$

This contradiction arose because we assumed that $H$ is recursive.

Hence the result.