Math 2.0

Mathematical logic and foundations Arithmetic and incompleteness Lemma

Diagonal lemma

Builds on Robinson arithmeticGödel numberingWell-formed formulaSentenceTheory

Statement

Let TT be a theory in the language of arithmetic that contains Robinson arithmetic 𝖰\mathsf{Q}. Fix a Gödel numbering, and let ⌜ψ⌝\ulcorner \psi \urcorner be the numeral of the code of ψ\psi. For every formula φ(x)\varphi(x) with exactly one free variable xx, there is a sentence ψ\psi such that T⊢ψ↔φ(⌜ψ⌝).T \vdash \psi \leftrightarrow \varphi(\ulcorner \psi \urcorner).

Remarks

Proof idea: the diagonal function dd, which sends the code of a formula θ(x)\theta(x) to the code of θ(⌜θ⌝)\theta(\ulcorner \theta \urcorner), is computable. So it is represented in 𝖰\mathsf{Q} by a formula D(x,y)D(x, y). Let θ(x)\theta(x) be ∃y (D(x,y)∧φ(y))\exists y\, (D(x, y) \wedge \varphi(y)) and let ψ\psi be θ(⌜θ⌝)\theta(\ulcorner \theta \urcorner). Then ψ\psi says that φ\varphi holds of d(⌜θ⌝)d(\ulcorner \theta \urcorner), which is the code of ψ\psi, and 𝖰\mathsf{Q} proves this equivalence.

Example: with φ(x)=¬ProvT(x)\varphi(x) = \neg \mathrm{Prov}_T(x), the lemma gives a sentence that says of itself "I am not provable in TT", the Gödel sentence of Gödel's incompleteness theorems. No consistency assumption on TT is needed.

Going deeper

For a student

The diagonal lemma is the common core of Gödel's incompleteness theorems, Tarski's undefinability theorem and Löb's theorem. Each of them applies the lemma to a well-chosen formula: unprovability, falsity, or a provability implication. It is an arithmetic version of Kleene's recursion theorem, which lets a program refer to its own code.

Reading path

To understand this page from the ground up, read these 6 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. Gödel numbering concept
  2. Robinson arithmetic concept
  3. Sentence concept
  4. Theory concept
  5. Well-formed formula concept
  6. Diagonal lemma statement

Further reading

  1. Web https://en.wikipedia.org/wiki/Diagonal_lemma
About this page
Tag3PRW76471J
URIm2://3PRW76471J
Kindstatement, lemma
WritingW0 stub
MSC03F40
StatusThis copy of the site has no build data. Run m2 status 3PRW76471J.
AboutGödel numbering
UsesRobinson arithmetic, Gödel numbering, Well-formed formula, Sentence, Theory
Same as
Changed2 November 2026

Markdown · JSON · Edit on GitHub

What this page needs for W1

  • an inventory row: the row of the inventory that the node accounts for (0 of 1)
  • 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.