Yes, 17M lines of Lean is a lot
- Source
- micjm.com
- Author
- seizethecheese
- Date
Context
The claimed proof of the Riemann hypothesis that Levent Alpöge of Anthropic released with Lean code rather than a full paper (earlier coverage) has been described as 17 million lines of Lean, a language in which proofs are written so a computer can check every step. A blog post at micjm.com tests whether that is as large as it sounds by measuring the Lean proofs the author could find online, and concludes that it is. The author says they wrote the text themselves but used an system to research the sources and draw the charts. The charts use a logarithmic scale, which the author notes makes 17 million lines look closer to 1 million and 100,000 than it really is.
No human-written proof in the survey comes near that size. The Mathlib project keeps a list of more than 1,000 famous theorems, 259 of which have Lean proofs; the author says all of those were written by people and none comes close to 17 million lines. Reservoir, which indexes published Lean packages, yielded 938 packages with code on GitHub, including AI-assisted work. The author lists three above 16 million lines, and none is an ordinary hand-written proof. The largest, CFSG at 88 million lines, appears to be an AI-built proof that is still unfinished. The second, LeanBridge at 36 million, links a database of number theory objects to Mathlib, and about 98% of it is script-generated files that check the database's numbers one by one; the author puts the hand-written part closer to 500,000 lines.
The third, at 27 million lines, is Anthropic's complete Lean proof of Fermat's Last Theorem, published on GitHub in September (earlier coverage). Its README says AI agents produced the Lean by building on human-written open-source Lean; the author notes this includes the human formalization project led by Kevin Buzzard, which is about 60,000 lines and still in progress. The author calculates the AI version as roughly 450 times longer, but because the human project is unfinished, that ratio compares a complete proof with a partial one. What the survey does establish is narrower: in the two collections the author searched, the projects at the scale of 17 million lines were AI-built or mostly generated by scripts, and the hand-written famous proofs are far smaller.
- Agent — A system in which a model repeatedly chooses operations, a harness carries them out, and the results return to the model to inform its next choice.
Checking sign-in…
Loading comments…
