Gödel’s incompleteness theorems are obtained from the same ingredients as the rest of this work: an injective encoding of syntax into the free monoid \(\mathbb N\), a diagonal construction, and the two-valuedness of truth in each model. The encoding is shown to be faithful by a representability theorem and to be independent of the choice of numbering; the self-referential sentence is a fixed point supplied by the diagonal; and the completeness theorem of 1929 and the incompleteness theorem of 1931 are reconciled as a partition of the models of a theory into two non-empty classes.
Assign to each symbol a number, for instance
| symbol | \(0\) | \(=\) | \(s\) | \(\neg \) | \(\vee \) | \(\forall \) | \((\) |
| number | \(6\) | \(5\) | \(7\) | \(1\) | \(3\) | \(9\) | \(11\) |
and encode a string \(\sigma _1\cdots \sigma _m\) by \(\ulcorner \sigma _1\cdots \sigma _m\urcorner =\prod _{i}p_i^{\,c(\sigma _i)}\), with \(p_i\) the \(i\)-th prime. For example
The relation
Independence of the numbering. Different encodings assign different numbers to the same formula. Any two acceptable numberings are related by a recursive bijection commuting with the syntactic operations, so the sets of codes of theorems, of sentences, and of independent sentences correspond under it. Incompleteness is invariant under the choice of encoding.
Diagonal lemma. Let \(\mathrm {diag}(n)\) be the primitive recursive function sending the code of a formula \(\varphi (x)\) to the code of \(\varphi (\ulcorner \varphi \urcorner )\) — the formula evaluated on its own code, the diagonal \(\Delta \) of Subsection 194. For any formula \(\psi (y)\) put \(\varphi (x):=\psi (\mathrm {diag}(x))\) and \(\theta :=\varphi (\ulcorner \varphi \urcorner )\). Then \(\mathrm {diag}(\ulcorner \varphi \urcorner )=\ulcorner \theta \urcorner \), and
Truth has no such fixed point. If truth were definable by a formula \(\mathrm {Tr}\), the diagonal lemma applied to \(\neg \mathrm {Tr}\) would give \(\theta \leftrightarrow \neg \mathrm {Tr}(\ulcorner \theta \urcorner )\), a fixed point of \(\neg \) on \(\{0,1\}\), which does not exist. Hence truth is not definable in arithmetic (Tarski). Provability is definable, so \(\neg \mathrm {Prov}_T\) does have a fixed point:
Let \(T\supseteq Q\) be consistent and effectively axiomatised.
\(T\nvdash G\). If \(T\vdash G\), a derivation with code \(p\) exists, so \(T\vdash \mathrm {Proof}_T(\bar p,\ulcorner G\urcorner )\) by representability, hence \(T\vdash \mathrm {Prov}_T(\ulcorner G\urcorner )\), hence \(T\vdash \neg G\) by the fixed point, and \(T\) is inconsistent.
\(T\nvdash \neg G\). With Rosser’s modification — replacing \(\mathrm {Prov}_T(y)\) by “there is a proof of \(y\) with no shorter proof of its negation” — consistency alone suffices for the second half [602]. The Rosser sentence \(R\) satisfies \(T\nvdash R\) and \(T\nvdash \neg R\).
Consistency is used: an inconsistent \(T\) proves every sentence and has no independent sentence.
Write \(\mathrm {Con}(T):=\neg \mathrm {Prov}_T(\ulcorner 0=1\urcorner )\). The argument of the first half of the first theorem is formalisable in \(T\), giving \(T\vdash \mathrm {Con}(T)\to G\). If \(T\vdash \mathrm {Con}(T)\), then \(T\vdash G\), which is excluded. Hence
Completeness (1929). A sentence valid in every model of \(T\) is provable in \(T\):
The partition. In each model \(\mathcal M\models T\), every sentence is true or false: truth in a model is two-valued, excluded middle and non-contradiction. Since \(T\nvdash G\) and \(T\nvdash \neg G\), completeness gives models of both kinds, and
Strictly between \(0\) and \(1\). In the Lindenbaum algebra \(B_T\) of sentences modulo provable equivalence, the class of a theorem is \(1\) and of a refutable sentence \(0\). An independent sentence satisfies
Set \(T_0=T\) and \(T_{n+1}=T_n+\mathrm {Con}(T_n)\). Each \(T_{n+1}\) proves \(\mathrm {Con}(T_n)\) and, by the second theorem, not \(\mathrm {Con}(T_{n+1})\). The union \(T_\omega =\bigcup _nT_n\) is again effectively axiomatised and again incomplete, and the progression continues through constructive ordinals [604, 605]. At every stage the same diagonal applies: no stage contains the whole tower, as no ordinal is the class of all ordinals (Section 114).
| Form | Equation | Content |
| fixed point | \(x=F(x)\) | existence of a solution |
| recursion | \(a_n=f(a_{n-1})\) | unique by induction (minimality) |
| diagonal | \(d(x)=f(\phi (x)(x))\) | \(\Delta \) then \(f\) |
| diagonal lemma | \(T\vdash \theta \leftrightarrow \psi (\ulcorner \theta \urcorner )\) | every \(\psi \) has a fixed point |
| Gödel | \(G\leftrightarrow \neg \mathrm {Prov}_T(\ulcorner G\urcorner )\) | fixed point of \(\neg \mathrm {Prov}_T\) |
| Tarski | no \(\theta \leftrightarrow \neg \mathrm {Tr}(\ulcorner \theta \urcorner )\) | \(\neg \) has no fixed point |
A fixed-point equation is not the identity \(x=x\); its content is that a solution exists. The identity \(x=x\) holds of every object and is provable in every first-order theory, \(T\vdash G=G\) for any term, whereas \(T\vdash G\leftrightarrow \neg \mathrm {Prov}_T(\ulcorner G\urcorner )\) holds of one sentence and carries the incompleteness.
| Step | Statement | Source |
| encoding | injective, \(\ulcorner 0=0\urcorner =243{,}000{,}000\) | unique factorisation |
| faithfulness | \(\mathrm {Proof}_T\) representable | primitive recursion |
| encoding choice | incompleteness invariant | recursive isomorphism |
| self-reference | diagonal lemma | \(\Delta \) |
| Tarski | truth undefinable | \(\neg \) has no fixed point |
| first theorem | \(T\nvdash R\), \(T\nvdash \neg R\) | consistency, Rosser |
| second theorem | \(T\nvdash \mathrm {Con}(T)\) | formalised first theorem |
| completeness | valid \(\Rightarrow \) provable | Gödel 1929 |
| partition | \(\mathrm {Mod}(T+G)\sqcup \mathrm {Mod}(T+\neg G)\) | two-valued truth per model |
| independence | \(0<[G]<1\) in \(B_T\) | Lindenbaum algebra |
| tower | \(T_{n+1}=T_n+\mathrm {Con}(T_n)\) | no stage contains the whole |