User:IssaRice/Computability and logic/Diagonalization lemma

From Machinelearning

The diagonalization lemma, also called the Godel-Carnap fixed point theorem, is a fixed point theorem in logic.

Rogers's fixed point theorem

Let f be a total computable function. Then there exists an index e such that φeφf(e).

(simplified)

Define d(x)=φx(x) (this is actually slightly wrong, but it brings out the analogy better).

Consider the function fd. This is partial recursive, so fdφi for some index i.

Now φf(d(i))φφi(i) since fdφi. This is equivalent to φd(i) by definition of d. Thus, we may take e=d(i) to complete the proof.

Diagonalization lemma

(semantic version)

Let A be a formula with one free variable. Then there exists a sentence G such that G iff A(G).

Define diag(x) to be C(C) where x=C. In other words, given a number x, the function diag finds the formula with that Godel number, then diagonalizes it (i.e. substitutes the Godel number of the formula into the formula itself), then returns the Godel number of the resulting sentence.

Let B be A(diag(x)), and let G be B(B).

Then G is A(diag(B)), by substituting x=B in the definition of B.

We also have diag(B)=B(B) by definition of diag. By definition of G, this is G, so we have diag(B)=G.

To complete the proof, apply A to both sides of the final equality to obtain A(diag(B)) iff A(G); this simplifies to G iff A(G).

Comparison table

Step Rogers's fixed point theorem Diagonalization lemma
Result φeφf(e) GA(G)
Definition of diagonal function d(x)=φx(x) diag(C)=C(C)
Composition of given mapping with diagonal function (givendiagonal) fd A(diag(x)
Index of composition i B
Composition applied to own index (i.e. diagonalization of the composition) fd(i) B(B)
Explicitly showing previous composition f(d(i)) diag(B)
Renaming index e=d(i) G=diag(B)