ProofComplete

Proof of the Diagonal Lemma

The diagonal lemma (or fixed-point lemma) is the technical engine behind both Gödel's incompleteness theorems and Tarski's undefinability theorem. We give a detailed proof showing how self-reference is achieved through Gödel numbering.


Statement

Theorem6.3Diagonal Lemma

Let TT be a theory extending Robinson arithmetic QQ in the language L\mathcal{L}. For any L\mathcal{L}-formula ψ(x)\psi(x) with one free variable, there exists a sentence σ\sigma such that T⊢σ↔ψ(⌜σ⌝)T \vdash \sigma \leftrightarrow \psi(\ulcorner \sigma \urcorner).


Proof

Proof

Step 1: Substitution function. Define the computable function sub(m,n)\mathrm{sub}(m, n) that takes a Gödel number mm of a formula φ(x)\varphi(x) with one free variable and a number nn, and returns the Gödel number of φ(n‾)\varphi(\underline{n}) (where n‾\underline{n} is the numeral for nn). Since sub\mathrm{sub} is computable and T⊇QT \supseteq Q, it is representable by a formula Sub(x,y,z)\mathrm{Sub}(x, y, z): T⊢Sub(m‾,n‾,sub(m,n)‾)andT⊢∀z (Sub(m‾,n‾,z)→z=sub(m,n)‾).T \vdash \mathrm{Sub}(\underline{m}, \underline{n}, \underline{\mathrm{sub}(m,n)}) \quad \text{and} \quad T \vdash \forall z \, (\mathrm{Sub}(\underline{m}, \underline{n}, z) \to z = \underline{\mathrm{sub}(m,n)}).

Step 2: Construct the diagonal formula. Define θ(x)≡∀z (Sub(x,x,z)→ψ(z))\theta(x) \equiv \forall z \, (\mathrm{Sub}(x, x, z) \to \psi(z)). This formula says: "the result of substituting the Gödel number of xx into the formula with Gödel number xx satisfies ψ\psi."

Step 3: Self-application. Let m=⌜θ(x)⌝m = \ulcorner \theta(x) \urcorner be the Gödel number of θ\theta. Define σ≡θ(m‾)\sigma \equiv \theta(\underline{m}), i.e., the sentence ∀z (Sub(m‾,m‾,z)→ψ(z))\forall z \, (\mathrm{Sub}(\underline{m}, \underline{m}, z) \to \psi(z)).

Step 4: Verify the fixed point. We have sub(m,m)=⌜θ(m‾)⌝=⌜σ⌝\mathrm{sub}(m, m) = \ulcorner \theta(\underline{m}) \urcorner = \ulcorner \sigma \urcorner. In TT: T⊢σ↔∀z (Sub(m‾,m‾,z)→ψ(z)).T \vdash \sigma \leftrightarrow \forall z \, (\mathrm{Sub}(\underline{m}, \underline{m}, z) \to \psi(z)). Since TT proves Sub(m‾,m‾,z)→z=⌜σ⌝\mathrm{Sub}(\underline{m}, \underline{m}, z) \to z = \ulcorner \sigma \urcorner, we get: T⊢σ↔ψ(⌜σ⌝).□T \vdash \sigma \leftrightarrow \psi(\ulcorner \sigma \urcorner). \quad \square

■

Applications

ExampleDeriving the Gödel Sentence

Applying the diagonal lemma to ψ(x)=¬ProvT(x)\psi(x) = \neg \mathrm{Prov}_T(x): there exists GG with T⊢G↔¬ProvT(⌜G⌝)T \vdash G \leftrightarrow \neg \mathrm{Prov}_T(\ulcorner G \urcorner). This is the Gödel sentence asserting its own unprovability.

ExampleDeriving the Liar Sentence

Applying the diagonal lemma to ψ(x)=¬True(x)\psi(x) = \neg \mathrm{True}(x) (if True\mathrm{True} existed): there would be λ\lambda with N⊨λ↔¬True(⌜λ⌝)\mathbb{N} \models \lambda \leftrightarrow \neg \mathrm{True}(\ulcorner \lambda \urcorner). This is the formalization of the liar paradox, yielding a contradiction and proving Tarski's theorem.

RemarkGenerality of the Construction

The diagonal lemma works for any formula with one free variable, not just ¬ProvT(x)\neg \mathrm{Prov}_T(x). This generality is exploited in many results: the Gödel sentence, the Rosser sentence, Löb's theorem, and constructions in provability logic all start from the diagonal lemma with different choices of ψ\psi.