Yes, 17M lines of Lean is a lot
A recent proof of the Riemann hypothesis clocks in at a staggering 17 million lines of Lean code, raising questions about the scale of AI-generated mathematics. The author investigates by comparing this monumental effort to known human-written and other AI-assisted proofs, confirming its immense size. Hacker News dives into the philosophical implications of such proofs, the nature of AI's verbosity, and what it means for the future of mathematical understanding and human labor.
The Lowdown
The mathematical world is abuzz with the recent proof of the Riemann hypothesis, but not just for its breakthrough; it's the sheer scale of the proof—17 million lines of Lean code—that has captivated attention. The author embarks on an investigation to contextualize this number, asking if 17 million lines is truly as voluminous as it sounds.
- Human Benchmarks Fall Short: A survey of over 250 famous theorems within Mathlib, all human-generated, reveals that even the largest of these proofs are typically below 1.2 million lines, with the entire Mathlib repository standing at 2.4 million lines. This clearly indicates that human-scale proofs are orders of magnitude smaller.
- AI-Assisted Proofs Reach Extreme Lengths: Delving into Reservoir, an index of Lean packages, the author finds a few exceptions that rival or exceed the Riemann proof's length, often with AI assistance:
- Qiuzhen-CFSG/CFSG (88M lines): An AI-built proof still under development.
- CBirkbeck/LeanBridge (36M lines): Primarily script-generated code for checking a number theory database, with only about 500k lines of human-written code.
- Anthropic's Fermat's Last Theorem (27M lines): An AI-generated proof that is roughly 450 times longer than its human-led counterpart (around 60k lines).
In conclusion, the article firmly establishes that 17 million lines of Lean is indeed an exceptionally large quantity, placing the Riemann hypothesis proof firmly in the realm of unprecedented scale, particularly when compared to traditional human mathematical proofs.
The Gossip
AI's Verbose Verifications
The leading discussion revolves around why AI, particularly LLMs, generates proofs and code that are so lengthy and often lack human readability or 'elegance.' Commenters cite Terence Tao's observation that LLMs struggle to distinguish trivial steps from novel insights, giving everything equal weight. Theories suggest this verbosity stems from LLMs being trained in environments where all output is read by other LLMs with vast context windows, or from deterministic scripts rewarding longer outputs. The idea that AI lacks the capacity for 'information compression' or 'elegance' is a recurring theme, often comparing AI's brute-force methods to human-conceived beauty in mathematics.
Proof, Perception, and Philosophy
A significant thread debates the fundamental nature of mathematical proof in an age of machine verification. Some argue that human 'understanding' or comprehension of a proof might become secondary to its machine-verified correctness, suggesting we may need to 'let go of understanding' if the proof holds. Others delve into how Lean confirms proof, explaining it compiles down to basic primitives, making the length irrelevant to its logical soundness. The deeper philosophical question emerges: what does it mean for mathematics when a proof is unreadable by any human, and does it still provide 'insight'?
Shrinking Statements and Proof Progress
Several commenters noted the dynamic nature of these AI-generated proofs, with some pointing out that the Riemann hypothesis proof had already 'shrunk' to 13 million lines, while others observed it temporarily increased due to import changes. This highlights the ongoing, iterative effort to refine and optimize these proofs, often by human intervention. The discussion touches on whether the sheer length is inherent to the problem or a current limitation of AI, and if shorter, more elegant proofs might eventually emerge.
AI's Impact on Intellectual Industry
The implications of AI on fields like mathematics sparked a debate about job displacement versus augmentation. Some expressed concern that the initial 'promise of AI was to fire all mathematicians,' contrasting it with the reality that these complex proofs might require more highly trained experts for verification and understanding. Conversely, others argued that AI serves as a 'power tool' to elevate human potential, leading to new forms of labor rather than outright replacement. The conversation reflects broader anxieties and hopes about AI's role in the future of work.
Beauty, Brevity, and Brilliance
Commenters reflect on the aesthetic value of mathematical proofs, contrasting the 17-million-line brute-force approach with notions of 'beauty' and 'elegance' often associated with human mathematical genius. References to Paul Erdos's 'God's Book' of short, perfect proofs and Bertrand Russell's view of mathematics' supreme beauty underscore the perceived lack of artistry in AI-generated verbosity. The discussion considers whether machine-generated correctness can ever truly replace the human pursuit of elegant, insightful solutions.