Proof sketch for Gödel's first incompleteness theorem

This article gives a sketch of a proof of Gödel's first incompleteness theorem. This theorem applies to any formal theory that satisfies certain technical hypotheses, which are discussed as needed during the sketch. We will assume for the remainder of the article that a fixed theory satisfying these hypotheses has been selected.

Throughout this article the word "number" refers to a natural number (including 0). The key property these numbers possess is that any natural number can be obtained by starting with the number 0 and adding 1 a finite number of times.

Hypotheses of the theory
Gödel's theorem applies to any formal theory that satisfies certain properties. Each formal theory has a signature that specifies the nonlogical symbols in the language of the theory. For simplicity, we will assume that the language of the theory is composed from the following collection of 15 (and only 15) symbols:


 * A constant symbol $0$ for zero.
 * A unary function symbol $S$ for the successor operation and two binary function symbols + and × for addition and multiplication.
 * Three symbols for logical conjunction, $∧$, disjunction, $∨$, and negation, ¬.
 * Two symbols for universal, $∀$, and existential, $∃$, quantifiers.
 * Two symbols for binary relations, = and <, for equality and order (less than).
 * Two symbols for left, $($ and right, $)$ parentheses for establishing precedence of quantifiers.
 * A single variable symbol, $x$ and a distinguishing symbol $$ that can be used to construct additional variables of the form x*, x**, x***, ...

This is the language of Peano arithmetic. A well-formed formula is a sequence of these symbols that is formed so as to have a well-defined reading as a mathematical formula. Thus $x = SS0$ is well formed while $x = ∀+$ is not well formed. A theory is a set of well-formed formulas with no free variables.

A theory is consistent if there is no formula $F$ such that both $F$ and its negation are provable. &omega;-consistency is a stronger property than consistency. Suppose that $F(x)$ is a formula with one free variable $x$. In order to be &omega;-consistent, the theory cannot prove both $∃m F(m)$ while also proving $¬F(n)$ for each natural number $n$.

The theory is assumed to be effective, which means that the set of axioms must be recursively enumerable. This means that it is theoretically possible to write a finite-length computer program that, if allowed to run forever, would output the axioms of the theory (necessarily including every well-formed instance of the axiom schema of induction) one at a time and not output anything else. This requirement is necessary; there are theories that are complete, consistent, and include elementary arithmetic, but no such theory can be effective.

Outline of the proof

 * For a simplified outline of the proof, see Gödel's incompleteness theorems

The sketch here is broken into three parts. In the first part, each formula of the theory is assigned a number, known as a Gödel number, in a manner that allows the formula to be effectively recovered from the number. This numbering is extended to cover finite sequences of formulas. In the second part, a specific formula $PF(x, y)$ is constructed such that for any two numbers $n$ and $m, PF(n,m)$ holds if and only if $n$ represents a sequence of formulas that constitutes a proof of the formula that $m$ represents. In the third part of the proof, we construct a self-referential formula that, informally, says "I am not provable", and prove that this sentence is neither provable nor disprovable within the theory.

Importantly, all the formulas in the proof can be defined by primitive recursive functions, which themselves can be defined in first-order Peano arithmetic.

Gödel numbering
The first step of the proof is to represent (well-formed) formulas of the theory, and finite lists of these formulas, as natural numbers. These numbers are called the Gödel numbers of the formulas.

Begin by assigning a natural number to each symbol of the language of arithmetic, similar to the manner in which the ASCII code assigns a unique binary number to each letter and certain other characters. This article will employ the following assignment, very similar to the one Douglas Hofstadter used in his Gödel, Escher, Bach:

The Gödel number of a formula is obtained by concatenating the Gödel numbers of each symbol making up the formula. The Gödel numbers for each symbol are separated by a zero because by design, no Gödel number of a symbol includes a $S$. Hence any formula may be correctly recovered from its Gödel number. Let $x$ denote the Gödel number of the formula $0$.

Given the above Gödel numbering, the sentence asserting that addition commutes, $G(F)$ translates as the number:



(Spaces have been inserted on each side of every 0 only for readability; Gödel numbers are strict concatenations of decimal digits.) Not all natural numbers represent a sentence. For example, the number



translates to "$F$", which is not well-formed.

Because each natural number can be obtained by applying the successor operation $∀x ∀x* (x + x* = x* + x)$ to $626 0 262 0 626 0 262 0 163 0 362 0 262 0 112 0 262 0 163 0 111 0 262 0 163 0 112 0 262 0 323$ a finite number of times, every natural number has its own Gödel number. For example, the Gödel number corresponding to $111 0 626 0 112 0 262$, is:



The assignment of Gödel numbers can be extended to finite lists of formulas. To obtain the Gödel number of a list of formulas, write the Gödel numbers of the formulas in order, separating them by two consecutive zeros. Since the Gödel number of a formula never contains two consecutive zeros, each formula in a list of formulas can be effectively recovered from the Gödel number for the list.

It is crucial that the formal arithmetic be capable of proving a minimum set of facts. In particular, it must be able to prove that every number $= ∀ + x$ has a Gödel number $S$. A second fact that the theory must prove is that given any Gödel number $0$ of a formula $4, SSSS0$ with one free variable $123 0 123 0 123 0 123 0 666$ and any number $m$, there is a Gödel number of the formula $G(m)$ obtained by replacing all occurrences of $G(F(x))$ in $F(x)$ with $x$, and that this second Gödel number can be effectively obtained from the Gödel number $m$ of $F(m)$ as a function of $G(x)$. To see that this is in fact possible, note that given the Gödel number of $G(F(x))$, one can recreate the original formula $G(m)$, make the substitution of $G(F(x))$ with $F(x)$, and then find the Gödel number $G(x)$ of the resulting formula $F(x)$. This is a uniform procedure.

The provability relation
Deduction rules can then be represented by binary relations on Gödel numbers of lists of formulas. In other words, suppose that there is a deduction rule $F(x)$, by which one can move from the formulas $x$ to a new formula $m$. Then the relation $G(F(m))$ corresponding to this deduction rule says that $F(m)$ is related to $D_{1}$ (in other words, $S_{1},S_{2}$ holds) if $S$ is the Gödel number of the list of formulas containing $R_{1}$ and $n$ and $m$ is the Gödel number of the list of formulas containing $n R_{1}m$, $n$ and $S_{1}$. Because each deduction rule is concrete, it is possible to effectively determine for any natural numbers $S_{2}$ and $m$ whether they are related by the relation.

The second stage in the proof is to use the Gödel numbering, described above, to show that the notion of provability can be expressed within the formal language of the theory. Suppose the theory has deduction rules: $S_{1}$. Let $S_{2}$ be their corresponding relations, as described above.

Every provable statement is either an axiom itself, or it can be deduced from the axioms by a finite number of applications of the deduction rules. A proof of a formula $S$ is itself a string of mathematical statements related by particular relations (each is either an axiom or related to former statements by deduction rules), where the last statement is $n$. Thus one can define the Gödel number of a proof. Moreover, one may define a statement form $m$, which for every two numbers $D_{1}, D_{2}, D_{3}, ...$ and $R_{1}, R_{2}, R_{3}, ...$ is provable if and only if $S$ is the Gödel number of a proof of the statement $S$ and $Proof(x,y)$.

$x$ is in fact an arithmetical relation, just as "$y$" is, though a (much) more complicated one. Given such a relation $x$, for any two specific numbers $S$ and $y = G(S)$, either the formula $Proof(x,y)$, or its negation $x + y = 6$, but not both, is provable. This is because the relation between these two numbers can be simply "checked". Formally this can be proven by induction, where all these possible relations (whose number is infinite) are constructed one by one. The detailed construction of the formula $R(x,y)$ makes essential use of the assumption that the theory is effective; it would not be possible to construct this formula without such an assumption.

Self-referential formula
For every number $n$ and every formula $m$, where $R(m,n)$ is a free variable, we define $¬R(m,n)$, a relation between two numbers $Proof$ and $n$, such  that it corresponds to the statement "$F(y)$ is not the Gödel number of a proof of $y$". Here, $q(n, G(F))$ can be understood as $n$ with its own Gödel number as its argument.

Note that $G(F)$ takes as an argument $n$, the Gödel number of $F(G(F))$. In order to prove either $F(G(F))$, or $F$, it is necessary to perform number-theoretic operations on $q$ that mirror the following steps: decode the number $G(F)$ into the formula $F$, replace all occurrences of $q(n, G(F))$ in $¬q(n, G(F))$ with the number $G(F)$, and then compute the Gödel number of the resulting formula $G(F)$.

Note that for every specific number $F$ and formula $y$ is a straightforward (though complicated) arithmetical relation between two numbers $F$ and $G(F)$, building on the relation $F(G(F))$ defined earlier. Further, $n$ is provable if the finite list of formulas encoded by $F(y), q(n, G(F))$ is not a proof of $n$, and $G(F)$ is provable if the finite list of formulas encoded by $PF$ is a proof of $q(n, G(F))$. Given any numbers $n$ and $F(G(F))$, either $¬q(n, G(F))$ or $n$ (but not both) is provable.

Any proof of $F(G(F))$ can be encoded by a Gödel number $n$, such that $G(F)$ does not hold. If $q(n, G(F))$ holds for all natural numbers $¬q(n,G(F))$, then there is no proof of $F(G(F))$. In other words, $n$, a formula about natural numbers, corresponds to "there is no proof of $q(n, G(F))$".

We now define the formula $q(n, G(F))$, where $n$ is a free variable. The formula $F(G(F))$ itself has a Gödel number $∀y q(y, G(F))$ as does every formula.

This formula has a free variable $F(G(F))$. Suppose we replace it with $P(x) = ∀y q(y, x)$, the Gödel number of a formula $x$, where $P$ is a free variable. Then, $G(P)$ corresponds to "there is no proof of $x$", as we have seen.

Consider the formula $G(F)$. This formula concerning the number $F(z)$ corresponds to "there is no proof of $z$". We have here the self-referential feature that is crucial to the proof: A formula of the formal theory that somehow relates to its own provability within that formal theory. Very informally, $P(G(F)) = ∀y q(y, G(F))$ says: "I am not provable".

We will now show that neither the formula $F(G(F))$, nor its negation $P(G(P)) = ∀y q(y, G(P))$, is provable.

Suppose $G(P)$ is provable. Let $P(G(P))$ be the Gödel number of a proof of $P(G(P))$. Then, as seen earlier, the formula $P(G(P))$ is provable. Proving both $¬P(G(P))$ and $P(G(P)) = ∀y q(y, G(P))$ violates the consistency of the formal theory. We therefore conclude that $n$ is not provable.

Consider any number $P(G(P))$. Suppose $¬q(n, G(P))$ is provable. Then, $¬q(n, G(P))$ must be the Gödel number of a proof of $∀y q(y, G(P))$. But we have just proved that $P(G(P))$ is not provable. Since either $n$ or $¬q(n, G(P))$ must be provable, we conclude that, for all natural numbers $n$ is provable.

Suppose the negation of $P(G(P))$, $P(G(P))$, is provable. Proving both $q(n, G(P))$, and $¬q(n, G(P))$, for all natural numbers $n, q(n, G(P))$, violates &omega;-consistency of the formal theory. Thus if the theory is &omega;-consistent, $P(G(P))$ is not provable.

We have sketched a proof showing that:

For any formal, recursively enumerable (i.e. effectively generated) theory of Peano Arithmetic,


 * if it is consistent, then there exists an unprovable formula (in the language of that theory).


 * if it is &omega;-consistent, then there exists a formula such that both it and its negation are unprovable.

The truth of the Gödel sentence
The proof of Gödel's incompleteness theorem just sketched is proof-theoretic (also called syntactic) in that it shows that if certain proofs exist (a proof of $¬P(G(P)) = ∃x ¬ q(x, G(P))$ or its negation) then they can be manipulated to produce a proof of a contradiction. This makes no appeal to whether $∃x ¬q(x, G(P))$ is "true", only to whether it is provable. Truth is a model-theoretic, or semantic, concept, and is not equivalent to provability except in special cases.

By analyzing the situation of the above proof in more detail, it is possible to obtain a conclusion about the truth of $q(n, G(P))$ in the standard model $$\mathbb{N}$$ of natural numbers. As just seen, $n$ is provable for each natural number $¬P(G(P))$, and is thus true in the model $$\mathbb{N}$$. Therefore, within this model,


 * $$P(G(P)) = \forall y\,q(y, G(P))$$

holds. This is what the statement "$P(G(P))$ is true" usually refers to&mdash;the sentence is true in the intended model. It is not true in every model, however: If it were, then by Gödel's completeness theorem it would be provable, which we have just seen is not the case.

Boolos's short proof
George Boolos (1989) vastly simplified the proof of the First Theorem, if one agrees that the theorem is equivalent to: "There is no algorithm $P(G(P))$ whose output contains all true sentences of arithmetic and no false ones." "Arithmetic" refers to Peano or Robinson arithmetic, but the proof invokes no specifics of either, tacitly assuming that these systems allow '<' and '×' to have their usual meanings. Boolos proves the theorem in about two pages. His proof employs the language of first-order logic, but invokes no facts about the connectives or quantifiers. The domain of discourse is the natural numbers. The Gödel sentence builds on Berry's paradox.

Let $P(G(P))$ abbreviate $q(n, G(P))$ successive applications of the successor function, starting from $n$. Boolos then asserts (the details are only sketched) that there exists a defined predicate $P(G(P))$ that comes out true iff an arithmetic formula containing $M$ symbols names the number $[n]$. This proof sketch contains the only mention of Gödel numbering; Boolos merely assumes that every formula can be so numbered. Here, a formula $n$names the number $0$ iff the following is provable:


 * $$\forall x (F(x) \leftrightarrow x=n)$$

Boolos then defines the related predicates:


 * $Cxz$. (English: $z$ comes out true if $x$ can be defined in fewer than $F$ symbols):
 * $n$. (English: $Bxy ↔ &exist;z(z < y &and; Cxz)$ comes out true if $Bxy$ is the smallest number not definable in fewer than $x$ symbols. More awkwardly, $y$ holds if $Axy ↔ &not;Bxy &and; &forall;a(a < x→Bay)$ cannot be defined in fewer than $Axy$ symbols, and all numbers less than $x$ can be defined using fewer than $y$ symbols);
 * $Axy$. $x$the number of symbols appearing in $y$.

$x$ formalizes Berry's paradox. The balance of the proof, requiring but 12 lines of text, shows that the sentence $y$ is true for some number $Fx ↔ &exist;y((y = [10] × [k]) &and; Axy)$, but no algorithm $k =$ will identify it as true. Hence in arithmetic, truth outruns proof. QED.

The above predicates contain the only existential quantifiers appearing in the entire proof. The '<' and '×' appearing in these predicates are the only defined arithmetical notions the proof requires. The proof nowhere mentions recursive functions or any facts from number theory, and Boolos claims that his proof dispenses with diagonalization. For more on this proof, see Berry's paradox.