Lean and Claude collaborate to formally verify the Riemann Hypothesis
The mathematical community reached a milestone by using AI to generate and a formal proof system to verify a 17-million-line proof of a 167-year-old puzzle.
The short version
- The proof contains 1,751,875 Lean modules and approximately 17 million lines of code.
- Independent checkers, including nanoda, accepted the complete proof in 27 minutes and 42 seconds.
- The Riemann Hypothesis is one of the seven Millennium Prize Problems with a $1 million reward.
- The verification process confirms the logic is sound, but human experts must still review the underlying ideas.
Why it matters
This event demonstrates that AI can handle the massive scale of modern mathematical proofs that are too large for humans to check manually. It establishes a new framework for 'verifiable' science where computers provide the rigorous proof while humans define the goals.
A milestone in formal verification
The Lean and Mathlib communities recently announced the successful formal proof verification of the Riemann Hypothesis. This 167-year-old puzzle is one of the seven Millennium Prize Problems, which carries a $1 million reward. The proof was completed by mathematician Levent Alpöge in collaboration with the AI model Claude.
The scale of this achievement is unprecedented in traditional mathematics. The proof contains 1,751,875 Lean modules and roughly 17 million lines of code. Because the proof is so massive, it is impossible for human mathematicians to review every single line of the derivation manually.
To ensure the result was accurate, the community performed independent verifications. Records from MIT mathematician Andrew Sutherland show that all modules compiled successfully, and an independent checker named nanoda accepted the complete proof in 27 minutes and 42 seconds. Other independent checkers also reached the same conclusion.
Understanding the Riemann Hypothesis
The Riemann Hypothesis is a central mystery in number theory. It posits that every non-trivial zero of the Riemann zeta function is located on a specific critical line where the real component equals 1/2. This is a specific geometric property of the function's zeros.
While mathematicians have observed many zeros that follow this rule, observing a finite number of them is not enough to prove the rule for all of them. Proving it for every single zero requires a rigorous logical argument that covers all possibilities, which is why it has remained unsolved for so long.
By using Lean, researchers can convert this complex derivation into a verification task. This allows a computer to check the entire logical chain of the proof, ensuring that the conclusion follows necessarily from the starting premises without any gaps in reasoning.
How Lean and Claude work together
The project highlights a distinct division of labor between generative AI and formal proof systems. Claude acted as the creative engine, exploring different proof paths and reorganizing complex mathematical arguments to find a solution. In contrast, Lean is not an intelligent agent but an open-source programming language and formal proof system.
Lean operates on dependent type theory, where mathematical propositions are represented as types and proofs are objects belonging to those types. The system uses a kernel to check if the final proof object conforms to the established rules of logic. This allows Lean to handle the repetitive task of checking huge proofs that are too large for human eyes.
While Claude can generate the vast amount of code required for a proof, Lean ensures that the code is logically sound. This combination allows researchers to bridge the gap between high-level mathematical intuition and rigorous, machine-checkable certainty. The computer handles the heavy lifting of verification, while humans provide the initial direction.
The risks of automated logic
The reliability of these systems is still being tested. On July 25 this year, researcher Ramana Kumar released a so-called "disproof" of the Collatz conjecture using AI. This code succeeded by finding a flaw in how the kernel processed nested inductive types, showing that software defects can still lead to incorrect results.
Because AI can actively search for bugs, the dependability of the checkers themselves is under scrutiny. OpenAI researcher Daniel Selsam discovered multiple logical kernel and runtime vulnerabilities between July and August that might let the system validate proofs for the logical proposition False.
To combat this, the Lean community is developing new mechanisms, including independent checkers and a kernel version with a formal proof of its own reliability. The November verification of the Riemann Hypothesis was completed under this continuously improving mechanism to avoid the impact of a single software defect on the final conclusion.
Scaling verification for the future
Formal verification is becoming more accessible as AI reduces the labor-intensive parts of the process. For example, Google DeepMind announced the AlphaProof Code research on November 10, using AI agents to formally verify security properties of the Signal communication protocol. The AI generated approximately 6.3 million lines of Lean proof code, which were then checked by the Lean kernel.
However, the success of these proofs depends heavily on the human-approved specifications. If a formal specification only requires that an account balance cannot be negative, the proof cannot rule out duplicate deductions, unauthorized transfers, or user information leaks. The difficulty is shifting from generating the proof to defining exactly what needs to be proved.
DeepMind's research highlights that when proof becomes cheap, the challenge is ensuring the Trusted Computing Base is correct. This includes the definitions, cryptographic assumptions, and the reliability of the compilation products. Researchers must ensure that AI agents do not arbitrarily modify approved specifications or narrow the scope of the problem to make it easier to solve.
What to watch
- How the community will reach a consensus on the human-understandable parts of the proof.
- Whether this method will be used to solve other Millennium Prize Problems.
- How the reliability of the Lean kernel will be maintained as AI begins to find more vulnerabilities.
Try it
Look up the Clay Mathematics Institute's Millennium Prize Problems to see the other six unsolved puzzles alongside the Riemann Hypothesis.
Sources and links
- Reporting36Kr: the article we sourced
Written by the SI Agent News Desk from the reporting above.Written with AI from the source above. Every number is checked against the source. Spot a mistake? Corrections.
Liked it? Say why
Add a line for other readers.
No account needed. We never show your email. Comments with links, ads or abuse are held and not shown. Your comment shows after a quick check.