All Posts
Mathematics

Gödel's Incompleteness Theorems: The Limits of Formal Systems

We explain Gödel's two incompleteness theorems — why any consistent formal system strong enough to express arithmetic contains true statements it cannot prove, and why it cannot prove its own consistency.

The Theorems

First Incompleteness Theorem (Gödel, 1931)

Any consistent formal system F\mathcal{F} that is capable of expressing basic arithmetic contains a sentence GG such that neither GG nor ¬G\neg G is provable in F\mathcal{F}.

Second Incompleteness Theorem (Gödel, 1931)

Any consistent formal system F\mathcal{F} that is capable of expressing basic arithmetic cannot prove its own consistency. That is, if Con(F)\operatorname{Con}(\mathcal{F}) denotes the statement "F\mathcal{F} is consistent," then:

FCon(F)\mathcal{F} \nvdash \operatorname{Con}(\mathcal{F})


What the Theorems Actually Say

A formal system consists of:

  1. A language — symbols and rules for forming well-formed formulas.
  2. Axioms — a recursively enumerable set of starting truths.
  3. Rules of inference — mechanical procedures for deriving new theorems from old ones.

The system is consistent if it does not prove both ϕ\phi and ¬ϕ\neg \phi for any sentence ϕ\phi. It is complete if for every sentence ϕ\phi, either ϕ\phi or ¬ϕ\neg \phi is provable.

Gödel's First Theorem says: no consistent system capable of basic arithmetic can be complete. There will always be true-but-unprovable statements.

The theorem applies to any system at least as strong as Peano Arithmetic (PA), including ZFC set theory, type theory, and any reasonable foundation for mathematics. You cannot escape incompleteness by choosing a cleverer axiom system — any consistent extension still has its own Gödel sentence.


Gödel Numbering

The key technical innovation is Gödel numbering: encoding every symbol, formula, and proof as a natural number.

Assign a unique number to each symbol:

0=1,S=2,+=3,×=4,==5,(=6,\ulcorner 0 \urcorner = 1, \quad \ulcorner S \urcorner = 2, \quad \ulcorner + \urcorner = 3, \quad \ulcorner \times \urcorner = 4, \quad \ulcorner = \urcorner = 5, \quad \ulcorner ( \urcorner = 6, \quad \ldots

A formula ϕ=s1s2sk\phi = s_1 s_2 \cdots s_k gets the Gödel number:

ϕ=2s13s25s3pksk\ulcorner \phi \urcorner = 2^{\ulcorner s_1 \urcorner} \cdot 3^{\ulcorner s_2 \urcorner} \cdot 5^{\ulcorner s_3 \urcorner} \cdots p_k^{\ulcorner s_k \urcorner}

where pkp_k is the kk-th prime. This encoding is injective (by the fundamental theorem of arithmetic) and allows the system to talk about its own formulas and proofs.


The Diagonal Lemma

The heart of the proof is the diagonal lemma (also called the fixed-point lemma):

Diagonal Lemma. For every formula ϕ(x)\phi(x) with one free variable in system F\mathcal{F}, there exists a sentence GG such that:

FGϕ(G)\mathcal{F} \vdash G \leftrightarrow \phi(\ulcorner G \urcorner)

The sentence GG "says of itself" that it has the property ϕ\phi.

This is the formal version of self-reference — the sentence GG contains its own Gödel number as a parameter.


Proof Sketch of the First Theorem

Proof sketch.

Step 1 — Define the provability predicate.

Since proofs are finite sequences of formulas, there is an arithmetic formula Prov(x)\operatorname{Prov}(x) that holds if and only if xx is the Gödel number of a provable sentence.

Step 2 — Apply the diagonal lemma.

Apply the diagonal lemma with ϕ(x)=¬Prov(x)\phi(x) = \neg \operatorname{Prov}(x) to obtain a sentence GG such that:

FG¬Prov(G)\mathcal{F} \vdash G \leftrightarrow \neg \operatorname{Prov}(\ulcorner G \urcorner)

In plain language, GG says: "I am not provable in F\mathcal{F}."

Step 3 — GG is not provable.

If FG\mathcal{F} \vdash G, then Prov(G)\operatorname{Prov}(\ulcorner G \urcorner) holds. But GG says ¬Prov(G)\neg \operatorname{Prov}(\ulcorner G \urcorner), so F¬G\mathcal{F} \vdash \neg G. This makes F\mathcal{F} inconsistent — contradicting our assumption.

Step 4 — ¬G\neg G is not provable.

If F¬G\mathcal{F} \vdash \neg G, then FProv(G)\mathcal{F} \vdash \operatorname{Prov}(\ulcorner G \urcorner). But GG is not actually provable (from Step 3), so Prov(G)\operatorname{Prov}(\ulcorner G \urcorner) is false. Since F\mathcal{F} proves a false statement, F\mathcal{F} is ω\omega-inconsistent — contradicting our assumption.

Conclusion. Neither GG nor ¬G\neg G is provable. The system is incomplete. \square


Proof Sketch of the Second Theorem

The second theorem follows from a careful internalization of the first theorem's proof.

Proof sketch.

The consistency statement Con(F)\operatorname{Con}(\mathcal{F}) can be expressed as:

Con(F)¬Prov(0=1)\operatorname{Con}(\mathcal{F}) \equiv \neg \operatorname{Prov}(\ulcorner 0 = 1 \urcorner)

The proof of the first theorem showed: if F\mathcal{F} is consistent, then GG is not provable, i.e., ¬Prov(G)\neg \operatorname{Prov}(\ulcorner G \urcorner), i.e., GG is true.

This argument can be formalized within F\mathcal{F}:

FCon(F)G\mathcal{F} \vdash \operatorname{Con}(\mathcal{F}) \to G

If FCon(F)\mathcal{F} \vdash \operatorname{Con}(\mathcal{F}), then FG\mathcal{F} \vdash G by modus ponens. But we proved GG is not provable. Contradiction.

Therefore FCon(F)\mathcal{F} \nvdash \operatorname{Con}(\mathcal{F}). \square


The Liar Paradox Connection

Gödel's construction is reminiscent of the Liar Paradox:

"This sentence is false."

The Liar leads to paradox. Gödel's sentence GG, which says "This sentence is not provable," avoids paradox because there is a crucial difference between truth and provability. The sentence GG is true but unprovable — no contradiction arises.


What the Theorems Do NOT Say

Common misinterpretations:

  1. "Mathematics is broken." No. The theorems say there are limits to formal systems, not to mathematical truth.

  2. "We can never know if mathematics is consistent." Not exactly. We cannot prove consistency within the system itself. We can (and do) prove consistency of PA using stronger systems like ZFC.

  3. "Gödel proved that AI can't think." This is a philosophical leap that the theorems do not support. Gödel himself was cautious about such claims.

  4. "Every true statement is undecidable." Only very specific self-referential statements are undecidable. The vast majority of mathematical theorems are perfectly provable.


Examples of Unprovable Statements

Beyond Gödel's self-referential sentence, there are natural mathematical statements independent of standard axioms:

  • The Continuum Hypothesis is independent of ZFC (Gödel 1940, Cohen 1963).
  • The Paris-Harrington Theorem (1977): a combinatorial statement about Ramsey theory that is true but unprovable in Peano Arithmetic.
  • Goodstein's Theorem (1944): every Goodstein sequence eventually reaches zero — provable in ZFC but not in PA.
  • The Consistency of PA (Con(PA)\operatorname{Con}(\text{PA})) is itself unprovable in PA (by the Second Theorem).

Historical Context

Kurt Gödel proved the incompleteness theorems in 1931, when he was only 25 years old. The paper, "Über formal unentscheidbare Sätze der Principia Mathematica und verwandter Systeme I," shattered Hilbert's program — the ambitious goal of finding a complete, consistent, decidable foundation for all of mathematics.

Hilbert had proclaimed in 1930: "Wir müssen wissen. Wir werden wissen." ("We must know. We shall know.") Gödel showed that this dream, in its strongest form, was impossible.

The results had immediate impact:

  • Alonzo Church and Alan Turing (1936) proved that the Entscheidungsproblem (decision problem) is unsolvable.
  • Alfred Tarski (1933) proved the undefinability of truth.
  • Paul Cohen (1963) developed forcing, extending Gödel's methods to prove the independence of the Continuum Hypothesis.

The Incompleteness Theorems at a Glance

First Theorem:Consistent + expresses arithmetic    incompleteSecond Theorem:Consistent + expresses arithmetic    cannot prove own consistencyGo¨del sentence G:G¬Prov(G)"I am not provable"    true but unprovable\begin{aligned} &\textbf{First Theorem:} \\[4pt] &\text{Consistent } + \text{ expresses arithmetic} \implies \text{incomplete} \\[12pt] &\textbf{Second Theorem:} \\[4pt] &\text{Consistent } + \text{ expresses arithmetic} \implies \text{cannot prove own consistency} \\[12pt] &\textbf{Gödel sentence } G: \\[4pt] &G \leftrightarrow \neg\operatorname{Prov}(\ulcorner G \urcorner) \\[4pt] &\text{"I am not provable"} \implies \text{true but unprovable} \end{aligned}

References