Gödel Numbering and Representability
Gödel's incompleteness theorems rely on encoding syntactic objects (formulas, proofs) as natural numbers, enabling a formal system to "talk about itself." This self-reference is achieved through Gödel numbering and the representability of computable functions in arithmetic.
Gödel Numbering
A Gödel numbering is an effective injective map from the set of expressions (terms, formulas, proofs) of a formal system to the natural numbers. Each expression is assigned a unique Gödel number , and the map is chosen so that basic syntactic operations (substitution, checking well-formedness) correspond to computable functions on Gödel numbers.
A function is representable in a theory if there exists a formula such that for all : and , where denotes the numeral for .
In Peano Arithmetic, addition is represented by the formula . For any : PA and PA .
The Diagonal Lemma
For any formula with one free variable, there exists a sentence such that . Here is any theory extending Robinson arithmetic . The sentence effectively "says of itself" that holds of its Gödel number.
The diagonal lemma is the formal counterpart of self-referential statements like "this sentence is not provable." It is the technical engine behind both incompleteness theorems and Tarski's undefinability theorem. The construction uses Gödel numbering and the representability of substitution.