Riemann Hypothesis Formally Proved in Lean via a 17-Million-Line Library
Mathematician Levent Alpöge has released a formal proof of the 166-year-old Riemann Hypothesis in collaboration with Claude, officially certified by the Lean FR
On November 20, 2026, mathematician Levent Alpöge released a formal proof of the Riemann Hypothesis—one of modern mathematics' most elusive and longstanding challenges—packaged as an open-source library comprising 17 million lines of code. Developed in close collaboration with the AI assistant Claude, this achievement transcends traditional mathematical conjecture: it is meticulously structured in formal code capable of being mechanically verified, sending ripples through the global mathematical and programming communities.

Image source: https://leanprover-community.github.io/blog/posts/riemann-hypothesis
Immediately following the release, Lean FRO and the Mathlib Initiative issued a joint statement officially certifying that Alpöge's massive codebase compiles cleanly without errors and that both the statement and the proof are mathematically correct. As a 160-year-old riddle yields to machine-verified formal methods, this milestone marks a watershed moment in how mathematical research and artificial intelligence intersect.
A 166-Year Mathematical Challenge Meets a 17-Million-Line Lean Library
First proposed by German mathematician Bernhard Riemann in 1859, the Riemann Hypothesis describes the distribution of prime numbers and stands as the most famous unsolved problem in number theory. Countless brilliant minds have attempted to crack the puzzle over the decades, but neither proof nor counterexample succeeded, earning it legendary status alongside the Millennium Prize Problems.
The proof unveiled by Alpöge is not presented in the traditional format of a human-readable paper. Instead, it is authored as a massive software library built using 'Lean', a proof assistant that allows mathematical definitions and theorems to be written in a rigorous formal language whose logical validity can be checked by computers. Furthermore, 'Mathlib' serves as the sprawling shared library of modern mathematics built collaboratively by volunteers worldwide for Lean. Alpöge's codebase depends strictly on Mathlib and spans an astonishing 17 million lines.
Rigorous Mechanical Verification via Independent Proof Checkers
When such an unprecedentedly massive and intricate codebase emerged, the Lean and Mathlib communities mobilized swiftly over a 24-hour window to subject the proof to rigorous verification. They formally certified that four key criteria were fully satisfied.
First, the statement of the Riemann Hypothesis itself is correct; it is already an established part of Mathlib and has been carefully vetted by number theory experts. Second, Alpöge’s library compiles correctly without any build failures, with dozens of contributors successfully reproducing the exact raw proof export file. Third, the community added an isolation file confirming through two independent comparator tools that the theorem proved in Alpöge’s library matches Mathlib's statement of the Riemann Hypothesis precisely.
Finally, the exported raw proof was checked by multiple independent proof checkers, including Lean's official kernel, along with specialized verifiers like con-leche and con-ron. Notably, tools such as con-leche and con-ron are accompanied by formal meta-proofs demonstrating they cannot accept a false proof, addressing any lingering concerns that flaws in Lean's core logic might have been exploited.
Shifting Paradigms in Mathematical Research
This milestone demonstrates how artificial intelligence and formal proof assistants can converge to conquer barriers that have stood for centuries. Because 17 million lines of code far exceed what any single human could read in a lifetime using traditional peer review, the burden of trust shifts from human reading comprehension to mechanical verification.
While the logical integrity of the proof has been definitively established by machine checkers, the mathematical community now faces the rewarding task of studying the code to unpack and absorb the novel mathematical ideas and insights embedded within Alpöge's proof.
Sources
- Lean Prover Community: Lean verification of the Riemann Hypothesis