
AI agents wrote 17 million lines of code to prove a math mystery
- AI writes massive math proof
- Comparing human and AI output
- Fermat’s proof hits 27 million
The story
AI writes massive math proof
A computer-verified proof of the Riemann hypothesis spans 17 million lines of code, a scale impossible for any human to write or read.
Comparing human and AI output
Typical human-generated math proofs in the Mathlib library are tiny compared to the new 17 million line version. Most human proofs for famous theorems take up only a few thousand lines. The new AI-assisted project is hundreds of times larger than the work of leading mathematicians.
Fermat’s proof hits 27 million
AI agents recently generated a 27 million line proof for Fermat's Last Theorem by expanding on human work.
The 36 million line project
The largest Lean codebases often rely on scripts rather than manual typing. One project linking number theory databases reached 36 million lines. However, 98% of that code was automatically generated to check specific numbers one by one, showing that sheer size usually indicates machine automation.
Records reach 88 million lines
A project attempting to prove the Classification of Finite Simple Groups has reached 88 million lines of code.
A recent computer-verified proof of the Riemann hypothesis has stunned the math world, not just for its logic but for its sheer scale: it contains 17 million lines of Lean code. To put this in perspective, most famous theorems proven by humans in the Mathlib library rarely exceed a few thousand lines. This massive gap marks a shift toward AI-driven mathematics.
Anthropic AI agents have been particularly active in this space. They produced a 27 million line proof of Fermat's Last Theorem by building on a human-led project. While the human version is roughly 60,000 lines and remains unfinished, the AI version is 450 times longer and complete. The machines achieve this by generating vast amounts of verified code that humans could never write by hand.
Other projects are even larger. One number theory database link reached 36 million lines, though 98% of that was generated by scripts to verify specific digits. Currently, the largest known project is an AI-assisted attempt at the Classification of Finite Simple Groups, which has ballooned to 88 million lines.

These developments raise philosophical questions about mathematical understanding. When a proof is millions of lines long, no human can verify it without the help of another computer. The era of the short, elegant proof may be giving way to a period of massive, machine-generated certainty.
Source: micjm ↗

Illustration: AI-generated
Photo: Guilhem Vellut, CC BY 2.0
Photo: DCary, CC BY-SA 4.0





Comments