[Math] Are there proofs of Rice Theorem without using the undecidability of some problem

computability-theory

Most proofs of Rice theorem seem to be based on the undecidability of
the halting problem. They are "reduction-based".

Are there "direct" elementary proofs, perhaps based on diagonalization?

I think that the answer is "YES there are".

However most textbooks I know (such as [Odifreddi, Moret, Jones, Phillips] present reduction-based proofs.

Best Answer

Here is a proof based on the recursion theorem, rather than a reduction of an undecidable problem.

Rice's Theorem. Suppose that $P$ is any set of computable functions, which is not empty and not all computable functions. Then the set $\{ e\mid \varphi_e\in P\}$ is not decidable, where $\varphi_e$ is the function computed by program $e$.

In other words, there is no general procedure to determine from a program whether the function it computes has property $P$ or not.

Proof. Suppose that the set were decidable. Fix a computable function $f$ that is in $P$, and another computable function $g$ that is not in $P$. Now, for any program $e$, let $h(e)$ be the program that on input $n$ first determines whether $\varphi_e\in P$; if so, it outputs $g(n)$, and otherwise $f(n)$. So $\varphi_{h(e)}$ is either $g$ or $f$, depending on whether $\varphi_e\in P$ or not, respectively (but note that we are using the opposite function). In particular, we'll have $$\varphi_e\in P\quad\iff\quad\varphi_{h(e)}\notin P.$$ Meanwhile, by the recursion theorem, there is a program $e$ such that $\varphi_e=\varphi_{h(e)}$, which now gives an immediate contradiction, since $\varphi_e$ and $\varphi_{h(e)}$ are supposed to be opposite with respect to $P$. QED