# Difference between revisions of "User:IssaRice/Computability and logic/Diagonalization lemma"

(→Diagonalization lemma) |
(→Diagonalization lemma) |
||

Line 25: | Line 25: | ||

Then <math>G</math> is <math>A(\mathrm{diag}(\ulcorner B\urcorner))</math>, by substituting <math>x = \ulcorner B\urcorner</math> in the definition of <math>B</math>. | Then <math>G</math> is <math>A(\mathrm{diag}(\ulcorner B\urcorner))</math>, by substituting <math>x = \ulcorner B\urcorner</math> in the definition of <math>B</math>. | ||

− | We also have <math>\mathrm{diag}(\ulcorner B\urcorner) = \ulcorner B(\ulcorner B\urcorner)\urcorner</math> by definition of <math>\mathrm{diag}</math>. By definition of <math>G</math>, this is <math>\ulcorner G\urcorner</math>. | + | We also have <math>\mathrm{diag}(\ulcorner B\urcorner) = \ulcorner B(\ulcorner B\urcorner)\urcorner</math> by definition of <math>\mathrm{diag}</math>. By definition of <math>G</math>, this is <math>\ulcorner G\urcorner</math>, so we have <math>\mathrm{diag}(\ulcorner B\urcorner) = \ulcorner G\urcorner</math>. |

− | + | To complete the proof, apply <math>A</math> to both sides of the final equality to obtain <math>A(\mathrm{diag}(\ulcorner B\urcorner))</math> iff <math>A(\ulcorner G\urcorner)</math>; this simplifies to <math>G</math> iff <math>A(\ulcorner G\urcorner)</math>. |

## Revision as of 03:03, 8 February 2019

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

## Rogers's fixed point theorem

Let be a total computable function. Then there exists an index such that .

(simplified)

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

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

Now since . This is equivalent to by definition of . Thus, we may take to complete the proof.

## Diagonalization lemma

(semantic version)

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

Define to be where . In other words, given a number , the function 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 be , and let be .

Then is , by substituting in the definition of .

We also have by definition of . By definition of , this is , so we have .

To complete the proof, apply to both sides of the final equality to obtain iff ; this simplifies to iff .