Diagonal lemma


In mathematical logic, the diagonal lemma establishes the existence of self-referential sentences in certain formal theories of the natural numbers—specifically those theories that are strong enough to represent all computable functions. The sentences whose existence is secured by the diagonal lemma can then, in turn, be used to prove fundamental limitative results such as Gödel's incompleteness theorems and Tarski's undefinability theorem.

Background

Let be the set of natural numbers. A theory T represents the computable function if there exists a "graph" predicate in the language of T such that for each, T proves
Here is the numeral corresponding to the natural number, which is defined to be the closed term 1+ ··· +1, and is the numeral corresponding to.
The diagonal lemma also requires that there be a systematic way of assigning to every formula θ a natural number # called its Gödel number. Formulas can then be represented within the theory by the numerals corresponding to their Gödel numbers. For example, θ is represented by °#
The diagonal lemma applies to theories capable of representing all primitive recursive functions. Such theories include Peano arithmetic and the weaker Robinson arithmetic. A common statement of the lemma makes the stronger assumption that the theory can represent all computable functions.

Statement of the lemma

Let T be a first-order theory in the language of arithmetic and capable of representing all computable functions. Let F be a formula in the language with one free variable, then:
Intuitively, ψ is a self-referential sentence saying that ψ has the property F. The sentence ψ can also be viewed as a fixed point of the operation assigning to each formula θ the sentence F. The sentence ψ constructed in the proof is not literally the same as F, but is provably equivalent to it in the theory T.

Proof

Let f: NN be the function defined by:
for each T-formula θ in one free variable, and f = 0 otherwise. The function f is computable, so there is a formula Γf representing f in T. Thus for each formula θ, T proves
which is to say
Now define the formula β as:
Then T proves
which is to say
Now take θ = β and ψ = β, and the previous sentence rewrites to ψ ↔ F, which is the desired result.

History

The lemma is called "diagonal" because it bears some resemblance to Cantor's diagonal argument. The terms "diagonal lemma" or "fixed point" do not appear in Kurt Gödel's 1931 article or in Alfred Tarski's 1936 article.
Rudolf Carnap was the first to prove the general self-referential lemma which says that for any formula F in a theory T satisfying certain conditions, there exists a formula ψ such that ψ ↔ F is provable in T. Carnap's work was phrased in alternate language, as the concept of computable functions was not yet developed in 1934. Mendelson believes that Carnap was the first to state that something like the diagonal lemma was implicit in Gödel's reasoning. Gödel was aware of Carnap's work by 1937.
The diagonal lemma is closely related to Kleene's recursion theorem in computability theory, and their respective proofs are similar.