AI · Opinion
Nobody will read 17m lines of Lean, so read the ten lines that matter
A 17-million-line Lean proof of the Riemann hypothesis is huge by human standards and ordinary by machine ones. Its size hides the only part a person can check: the statement and the definitions.
The reported 17 million lines of Lean behind the Riemann hypothesis proof have drawn two reactions: awe at the size, and relief that a proof checker has accepted it. I think both look at the wrong place.
Start with size. The micjm post went hunting for comparisons and found that 17m is not exceptional any more. Among the 938 packages on Reservoir with Lean code on GitHub there are projects at 88m lines (Qiuzhen-CFSG/CFSG, which appears to be an AI-built proof still in progress), 36m (LeanBridge) and 27m (anthropics/fermats-last-theorem). The human side is much smaller. Mathlib lists 259 famous theorems with Lean proofs, and none comes near 17m. The human-led Fermat project under Kevin Buzzard is about 60k lines and unfinished, while the AI version is roughly 450 times longer.
So line count measures how much a machine was allowed to emit. LeanBridge makes the point. Its 36m lines are about 98% files generated by scripts that check a database’s numbers one at a time, and the hand-written part is closer to 500k. Strip the generated files and a 36m project becomes a 500k one. Before anyone quotes 17m as evidence of depth, I want that same split for the Riemann proof.
The best objection is that none of this matters. The Lean kernel checks every inference, so nobody needs to read the proof, which is the whole purpose of formalising it. I accept most of that. I expected to spend this column on kernel bugs, and I no longer think that is the interesting line of attack. If the kernel accepts the file, then the theorem as typed follows from the axioms in use.
But the clause “as typed” carries the whole claim. The kernel does not check that the statement means the Riemann hypothesis. It does not check that every definition the statement unfolds means what its name says. A proof that uses a subtly wrong zeta function is a valid proof, of something else. Across 17m lines, new definitions can be introduced anywhere, and each one is a place where a human intention can quietly diverge from what was written. A reviewer who cannot read the proof can still read the statement, but only if the statement is built from definitions someone has already scrutinised.
That is why the Fermat README matters more than its line count. It says the Lean sources were produced by AI agents “building on human-written open-source Lean”. That sentence splits the repository into a part with human review behind it and a part with none. For a result as heavily scrutinised as Riemann, the useful question is how big the unreviewed part of the definitions is, and nobody has yet published that number.
Mathematicians accept a proof once someone understands why it works and can explain it to others. Buzzard’s 60k lines are slow because people are building that understanding as they go. A 17m-line file that no person can hold in their head transfers none of it. What it offers is a binary stamp, and a stamp invites the reply “it’s been verified” to anyone who asks a question. In a field where questions are the work, I think that reply should be treated as the start of the argument.
The check takes an afternoon once the repository is public. Run Lean’s #print axioms on the main theorem and confirm the list contains only the standard axioms. Then read the theorem statement and list every definition in its dependency chain that is not imported from Mathlib. If the authors have not published that list, build it yourself. I would bet that it runs to thousands of lines, and that nobody has yet read all of them.
Prompted by Yes, 17m lines of Lean is a lot, micjm.