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
Let be a theory extending Robinson arithmetic in the language . For any -formula with one free variable, there exists a sentence such that .
Proof
Step 1: Substitution function. Define the computable function that takes a Gödel number of a formula with one free variable and a number , and returns the Gödel number of (where is the numeral for ). Since is computable and , it is representable by a formula :
Step 2: Construct the diagonal formula. Define . This formula says: "the result of substituting the Gödel number of into the formula with Gödel number satisfies ."
Step 3: Self-application. Let be the Gödel number of . Define , i.e., the sentence .
Step 4: Verify the fixed point. We have . In : Since proves , we get:
Applications
Applying the diagonal lemma to : there exists with . This is the Gödel sentence asserting its own unprovability.
Applying the diagonal lemma to (if existed): there would be with . This is the formalization of the liar paradox, yielding a contradiction and proving Tarski's theorem.
The diagonal lemma works for any formula with one free variable, not just . 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 .