← Latest papers
💻 computer science

Auto formalisation of Chaitin and of the surprise incompleteness Theorem

This paper presents a case study using an LLM (Claude) to autoformalize Chaitin's proof of the first incompleteness theorem and the Kritchman-Raz surprise examination paradox version of the second incompleteness theorem in Agda, demonstrating the model's ability to construct complex computational simulations and produce machine-checked proofs while highlighting current strengths and limitations in mathematical reasoning.

Original authors: Thierry Coquand

Published 2026-06-12
📖 6 min read🧠 Deep dive

Original authors: Thierry Coquand

Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer

The Big Picture: Teaching a Robot to Do Math

Imagine you have a very smart robot (an AI named Claude) and a very strict, rule-bound math textbook called "Basic Recursive Arithmetic." This textbook is like a game with very specific rules: you can only use basic counting and simple logic, no fancy shortcuts or "magic" tricks.

The goal of this paper is to see if the robot can read a complex, famous mathematical proof (about why math has limits) and rewrite it entirely in the strict language of that textbook, without a human writing a single line of code.

The answer is yes. The robot successfully translated two deep mathematical ideas into this strict language, creating a proof that a computer can check to be 100% correct.

The Two Main Ideas

The paper focuses on two famous concepts: Chaitin's Proof (related to the first incompleteness theorem) and the Surprise Examination Paradox (a version of the second incompleteness theorem).

1. The "Short Description" Game (Chaitin's Proof)

Imagine you have a library of every possible story you could write using a limited set of letters.

  • The Rule: Some stories are very short and easy to describe. Others are so complex that the shortest way to describe them is to just write the whole story down.
  • The Problem: Chaitin's proof tries to find a story that is so complex that it cannot be described by a short program.
  • The Robot's Challenge: To prove this, the robot had to build a "machine" inside the math textbook that could read a story, run it, and see what it does.
  • The Hurdle: The math textbook is too simple to naturally handle "running a program" because that usually requires a complex function (like the Ackermann function) that the textbook doesn't allow.
  • The Solution: The human author suggested a trick called "Gandy/Howard majorisation." Think of this as giving the robot a fuel tank. Instead of asking the machine to run forever, the robot calculates exactly how much "fuel" (steps) a program needs to finish. It builds a special "fuel gauge" that guarantees the program will stop before the tank runs out.
  • The Result: The robot built this fuel gauge on its own. It proved that if you try to describe a number that is "too complex to be described simply," you end up creating a logical contradiction (like proving that 0 equals 1).

2. The "Surprise Exam" and the Heap of Sand

The second part of the paper deals with a famous paradox: A teacher announces there will be a surprise exam next week. The students reason it can't be Friday (because if they haven't had it by Thursday, they'd know it's Friday), so it can't be Thursday, and so on... until they conclude there can be no exam at all. But then the teacher gives it on Wednesday, and it is a surprise.

The paper uses a version of this logic (by Kritchman and Raz) to prove that a math system cannot prove its own consistency (that it doesn't contain contradictions).

  • The Old Way: Previous proofs counted the number of days or numbers to find a contradiction.
  • The New Way (The Sorites/Heap of Sand): The authors compare this to the Heap of Sand Paradox.
    • If you have a heap of sand and remove one grain, it's still a heap.
    • If you remove another, it's still a heap.
    • If you keep removing grains one by one, eventually you have zero grains left. But at what exact point did it stop being a "heap"?
  • The Application:
    • Imagine a list of numbers from 0 to a huge number NN.
    • The logic tries to prove: "It is impossible for all these numbers to have a short description."
    • The robot proves this step-by-step. It says, "If we assume numbers 0 through NN all have short descriptions, we get a contradiction."
    • Then it removes 0. "Okay, if 1 through NN have short descriptions, we still get a contradiction."
    • It keeps removing one number at a time (like removing grains of sand).
    • Eventually, it reaches a point where the list is empty, but the logic forces a contradiction anyway.
  • The Twist: The paper argues this isn't a "vicious circle" of self-reference; it's more like the sand heap. You can take away one grain (one number) safely, but if you keep doing it, the whole structure collapses. This collapse proves that the math system cannot prove it is safe (consistent) without breaking itself.

Why This Matters (According to the Paper)

  1. AI as a Math Assistant: The paper shows that current AI (like Claude) is now good enough to handle the tiny, tedious details of complex math proofs. It can build parsers, evaluate machines, and handle logic steps that humans usually have to do manually.
  2. Constructive Math: The paper highlights that in "constructive mathematics" (where you must actually build the thing you are talking about), the idea of a "partial function" (a program that might run forever) is tricky. The robot had to use a "looping" program that might run forever, but the proof guarantees it stops. This is a subtle but crucial distinction that the AI handled correctly.
  3. No Magic Tricks: The robot didn't use any "tactics" (shortcuts) or fancy libraries. It built everything from scratch using only the basic rules of the math system. This makes the proof very robust and easy for a computer to verify.

The Conclusion

The paper is a case study showing that AI can now act as a powerful partner in formal mathematics. It can take a high-level idea (like "math has limits") and translate it into a rigid, machine-checkable format.

The authors note that while the AI needs a human to guide it (like suggesting the "fuel tank" trick), the AI can then autonomously write the code, build the logic, and document the entire process. The result is a fully verified proof that clarifies exactly how these deep logical paradoxes work, stripping away ambiguity and leaving only the hard, logical facts.

Drowning in papers in your field?

Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.

Try Digest →