Skip to content
Field Atlas

Atlas / Mathematics / The Foundations Thread

Field · Emerged 1900 – 1936

Metamathematics

What can mathematics prove about itself, about its own consistency, completeness and limits?

4 chapters4 min read6 turning points0 open problems

Branched from
Mathematical Logic + Set Theory
Branched into
Computability Theory
Figures
David Hilbert, L. E. J. Brouwer, Kurt Gödel, Gerhard Gentzen, Jeff Paris, Leo Harrington, Georges Gonthier

In brief

Metamathematics turns mathematics on itself. It treats proofs as mathematical objects, finite strings of symbols built by fixed rules, and proves theorems about what those rules can and cannot establish. Can every true statement about numbers be proved? Can mathematics prove that it will never contradict itself?

Hilbert hoped the answers would be yes, and that a formal foundation could be proved safe once and for all. In 1931 Gödel showed that for any consistent system strong enough to do arithmetic, the answers are no. That result is the best-known limit on reasoning, and the methods behind it led straight to the theory of computation.

Key ideas

ConsistencyEnters 1900 – 1928

A system is consistent if it never proves both a statement and its negation. An inconsistent system proves everything, so consistency is the minimum requirement for a foundation.

Gödel numberingEnters 1931

Encoding formulas and proofs as whole numbers, so that statements about proofs become statements about numbers, and arithmetic can talk about itself.

First incompleteness theoremEnters 1931

Any consistent formal system that can express basic arithmetic contains true statements it cannot prove, for example one that in effect says "I am not provable in this system".

Second incompleteness theoremEnters 1931

Such a system cannot prove its own consistency. The safety of mathematics cannot be certified from inside mathematics.

Proof assistantEnters 2005 – 2022

Software in which proofs are written formally and checked step by step by a small, trusted program, which makes Hilbert's idea of mechanically checkable proof practical.

Chapter I

Hilbert's Programme

The paradoxes of set theory raised a frightening possibility: that mathematics itself might be inconsistent, a contradiction waiting to be derived. David Hilbert proposed a way to settle the matter for good. Write all of mathematics in a formal system, as Principia Mathematica had begun to do. Then treat that system as a mathematical object, a game with finitely many rules on strings of symbols, and prove with the simplest, most indubitable reasoning that the game can never produce a contradiction. He also wanted a mechanical procedure to decide the truth of any mathematical statement, the Entscheidungsproblem.

Not everyone accepted the premise. L. E. J. Brouwer, whose fixed-point theorem helped found algebraic topology, had turned against classical mathematics. His intuitionism accepted only what could be constructed, and denied that every statement about an infinite collection must be either true or false. The dispute turned personal. In 1928 Hilbert, gravely ill and fearing for the future of mathematics, had Brouwer removed from the editorial board of the leading journal.

Chapter II

Gödel

The answer came from a quiet 25-year-old in Vienna. In 1931 Kurt Gödel showed how to encode formulas and proofs as numbers, so that statements about provability become statements of arithmetic. Then he built a statement that says, in effect, "this statement is not provable". If the system is consistent, the statement is true and unprovable. Any consistent formal system rich enough for arithmetic is therefore incomplete. A second theorem followed: such a system cannot prove its own consistency. Hilbert's central goal, a finitary proof that mathematics is safe, was impossible.

It was not the end of the programme but a change of question. In 1936 Gerhard Gentzen proved arithmetic consistent after all, by assuming a principle of transfinite induction arithmetic cannot prove. Four decades later, Jeff Paris and Leo Harrington found a natural statement about colouring finite sets that is true but unprovable in ordinary arithmetic. Incompleteness reached everyday mathematics.

Chapter III

A Closer Look: How a Sentence Can Talk About Itself

Gödel's first incompleteness theorem rests on building an arithmetic statement that says "I am not provable". Here is the idea in four steps.

Numbering. Give every symbol a code number, and encode any string of symbols as a single number, for example as a product of primes 2a13a25a3⋯2^{a_1} 3^{a_2} 5^{a_3} \cdots with the codes as exponents. Formulas, and whole proofs, become numbers.

Proof as arithmetic. Checking whether a sequence of formulas is a valid proof is mechanical: each line must be an axiom or follow from earlier lines by a rule. So "xx is the code of a proof of the formula with code yy" can be expressed as an ordinary, if enormous, arithmetic relation between xx and yy. Then "the formula with code yy is provable", written Prov(y)\mathrm{Prov}(y), is a formula of arithmetic.

Self-reference. A diagonal construction, like Cantor's, produces a sentence GG with

G  ⟷  ¬ Prov(⌜G⌝),G \;\longleftrightarrow\; \neg\,\mathrm{Prov}(\ulcorner G \urcorner),

where ⌜G⌝\ulcorner G \urcorner is GG's own code number. GG asserts its own unprovability. (The philosopher W. V. O. Quine gave an everyday analogue: "yields falsehood when preceded by its quotation" yields falsehood when preceded by its quotation.)

The trap. If the system proved GG, it would prove a statement asserting that GG is unprovable, which is false. A consistent system cannot do that. So if the system is consistent, GG is unprovable, and since that is exactly what GG says, GG is true. A true, unprovable sentence.

The second theorem follows by formalising this very argument inside the system: "if I am consistent, then GG" is provable. If the system could also prove its own consistency, it would prove GG, which is impossible. Adding GG as a new axiom does not help, because the stronger system has its own Gödel sentence. Incompleteness cannot be patched.

Chapter IV

Proofs by Machine

Gödel's encoding of proofs as numbers had a second consequence: checking a proof is a mechanical operation. Within five years that insight became the theory of computation. About seventy years later it became practical. Proof assistants now check proofs down to the axioms. Georges Gonthier formalised the four colour theorem in 2005, and in 2022 a Lean collaboration verified a new theorem that Peter Scholze himself had doubts about. Hilbert's hope of certainty from inside failed, but his idea of mechanically checkable proof has become everyday practice.

Applications

Where it is used

  • Software engineering

    Verified software

    The techniques of formal proof now certify critical software. The CompCert C compiler and the seL4 operating-system kernel come with machine-checked proofs that they behave as specified, so whole classes of bugs are ruled out mathematically.

    › Sources (2)
    • Leroy, X. (2009). Formal verification of a realistic compiler. Communications of the ACM 52(7): 107–115.
    • Klein, G. et al. (2009). seL4: formal verification of an OS kernel. In Proceedings of the 22nd ACM Symposium on Operating Systems Principles: 207–220.

Open problems

Where the map runs out

No open problems are recorded here. This field's unanswered questions moved into its successors: Computability Theory.

Further reading

  1. Nagel, E. & Newman, J. R. (1958). Gödel's Proof. New York University Press.

    A short, lucid account of the incompleteness theorems for non-specialists.

  2. Hofstadter, D. R. (1979). Gödel, Escher, Bach: An Eternal Golden Braid. Basic Books.

    A playful, sprawling meditation on self-reference built around Gödel's theorem.

  3. Smith, P. (2013). An Introduction to Gödel's Theorems (2nd ed.). Cambridge University Press.

    A careful textbook treatment for readers who want the proofs.