Math 2.0

Mathematical logic and foundations Computability theory Theorem

Rice's theorem

Builds on Computable functionComputable setGödel numbering

Statement

Fix a standard Gödel numbering of programs, and let φe\varphi_e be the partial computable function of one argument computed by program ee. Let 𝒫\mathcal P be a set of partial computable functions ℕ⇀ℕ\N \rightharpoonup \N that is neither empty nor the set of all partial computable functions. Then the index set {e∈ℕ:φe∈𝒫}\set{e \in \N : \varphi_e \in \mathcal P} is not a computable set.

Remarks

Replacing 𝒫\mathcal P by its complement if needed, assume the empty function is not in 𝒫\mathcal P, and pick ψ∈𝒫\psi \in \mathcal P. For each ee, let g(e)g(e) be a program that on input yy first runs program ee on input ee, and then, if that halts, computes ψ(y)\psi(y). By the smn theorem, gg is total computable. Then φg(e)=ψ\varphi_{g(e)} = \psi if program ee halts on ee, and φg(e)\varphi_{g(e)} is the empty function otherwise. So a decision procedure for the index set would decide the halting problem.

Example: the set of programs that compute a total function, and the set of programs that output 00 on input 00, are not computable.

Both conditions on 𝒫\mathcal P are needed: if 𝒫\mathcal P is empty or contains all partial computable functions, the index set is ∅\emptyset or ℕ\N, which are computable. The theorem concerns properties of the computed function, not of the program text. A property such as "the program has fewer than 1010 instructions" is decidable.

Going deeper

For a student

The theorem generalises the undecidability of the halting problem to all non-trivial semantic properties. Its proof is a many-one reduction from the halting set, built with the smn theorem. The Rice–Shapiro theorem goes further and describes which index sets are computably enumerable. In practice, program analysis tools work around the theorem by giving approximate answers.

Reading path

To understand this page from the ground up, read these 4 pages in order. The foundations come first.

Show the path as a graph
Each page uses the pages above it. The colour of the bar on a box shows how strong the evidence is, and the box also gives it as text. The list has the same pages.
  • no evidence level
  1. Computable function concept
  2. Computable set concept
  3. Gödel numbering concept
  4. Rice's theorem statement

Further reading

  1. Web https://en.wikipedia.org/wiki/Rice's_theorem
About this page
TagAKDR5YBBE2
URIm2://AKDR5YBBE2
Kindstatement, theorem
WritingW0 stub
MSC03D25, 03D20
StatusThis copy of the site has no build data. Run m2 status AKDR5YBBE2.
AboutComputable function, Computable set
UsesComputable function, Computable set, Gödel numbering
Same as
Changed2 November 2026

Markdown · JSON · Edit on GitHub

What this page needs for W1

  • a source with a locator (0 of 1)

The writing levels say how complete the text of a page is. They do not measure its truth.

What links here

No page links to this page yet.