348 Gödel’s Theorems as Corollaries from the Diagonal

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.

348.1 Encoding

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

\begin{equation} \ulcorner 0=0\urcorner =2^{6}\cdot 3^{5}\cdot 5^{6}=243{,}000{,}000 . \tag{21410}\end{equation}
By unique factorisation — \(\mathbb N_{\ge 1}\) is the free commutative monoid on the primes — the map is injective, and the string is recovered from its code. The encoding is a homomorphism from the free monoid of strings into \((\mathbb N_{\ge 1},\cdot )\), made injective by the position-indexing of the primes.

348.2 Faithfulness: representability

The relation

\begin{equation} \mathrm {Proof}_T(x,y):\ \ x\ \text {codes a derivation in }T\text { of the formula coded by }y \tag{21411}\end{equation}
is primitive recursive for an effectively axiomatised theory \(T\), and every primitive recursive relation is representable in \(T\supseteq Q\): if \(\mathrm {Proof}_T(p,n)\) holds then \(T\vdash \mathrm {Proof}_T(\bar p,\bar n)\), and if it fails then \(T\vdash \neg \mathrm {Proof}_T(\bar p,\bar n)\). The correspondence between derivations in \(T\) and arithmetic facts about their codes is therefore not a declaration but a theorem, provable in primitive recursive arithmetic (Subsection 328). Provability is
\begin{equation} \mathrm {Prov}_T(y):=\exists x\ \mathrm {Proof}_T(x,y). \tag{21412}\end{equation}

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.

348.3 The fixed point from the diagonal

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

\begin{equation} T\vdash \theta \leftrightarrow \psi (\ulcorner \theta \urcorner ). \tag{21413}\end{equation}
Every formula \(\psi \) of one free variable has a fixed point.

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:

\begin{equation} T\vdash G\leftrightarrow \neg \mathrm {Prov}_T(\ulcorner G\urcorner ). \tag{21414}\end{equation}
\(G\) is not equivalent to \(G\leftrightarrow G\); it is the specific sentence that \(\neg \mathrm {Prov}_T\) fixes.

348.4 The first theorem

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.

348.5 The second theorem

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

\begin{equation} \mathrm {Con}(T)\ \Longrightarrow \ T\nvdash \mathrm {Con}(T). \tag{21415}\end{equation}

348.6 Completeness and incompleteness as a partition of models

Completeness (1929). A sentence valid in every model of \(T\) is provable in \(T\):

\begin{equation} \mathrm {Mod}(T)\models \varphi \ \Longrightarrow \ T\vdash \varphi . \tag{21416}\end{equation}

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

\begin{equation} \mathrm {Mod}(T)=\mathrm {Mod}(T+G)\ \sqcup \ \mathrm {Mod}(T+\neg G), \tag{21417}\end{equation}
both classes non-empty. The standard model lies in the first, since \(G\) asserts its own unprovability and is unprovable; non-standard models, containing a non-standard “proof” of \(G\), lie in the second. The two theorems do not conflict: completeness speaks of validity in all models, incompleteness of a sentence true in some and false in others.

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

\begin{equation} 0<[G]<1\quad \text {in }B_T , \tag{21418}\end{equation}
so \(B_T\) is not the two-element algebra. Its ultrafilters are the complete consistent extensions of \(T\), each two-valued. Independence is an element of the algebra strictly between \(0\) and \(1\); truth in each completion remains \(0\) or \(1\).

348.7 The tower of consistency statements

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).

348.8 Self-reference as fixed points

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.

348.9 Summary

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
\begin{equation} \Delta \ \Longrightarrow \ G\leftrightarrow \neg \mathrm {Prov}_T(\ulcorner G\urcorner ) \ \Longrightarrow \ \mathrm {Mod}(T)=\mathrm {Mod}(T+G)\sqcup \mathrm {Mod}(T+\neg G), \qquad 0<[G]<1 . \tag{21419}\end{equation}