Lean community verifies proof of the Riemann Hypothesis
Levent Alpöge has released a 17-million-line Lean library proving the Riemann Hypothesis, a milestone now certified by the Lean and Mathlib communities.
Source: Hacker News — front pageThe mathematical community has reached a historic milestone with the formal verification of the Riemann Hypothesis. On November 20, 2026, researcher Levent Alpöge released a proof of the hypothesis as a Lean library consisting of 17 million lines of code, according to a joint statement from the Lean and Mathlib communities.
This achievement is significant because the Riemann Hypothesis is one of the most famous unsolved problems in mathematics. By translating the proof into the Lean theorem prover, Alpöge has provided a way to check the logical validity of the argument through computer code rather than relying solely on traditional peer review of written text.
How was the proof verified?
To ensure the validity of the massive codebase, the Lean and Mathlib communities conducted a rapid verification process. According to the community statement, the verification relied on several layers of checks. First, the statement of the Riemann Hypothesis itself was vetted by experts in both number theory and Lean to ensure it was correctly formulated within the Mathlib library.
Second, the community confirmed that the 17-million-line library compiles without errors. Dozens of individuals reported successful compilation, producing identical raw proof export files. Finally, the community used independent tools, specifically "comparator" and "con-leche --compare," to verify that the theorem proved by Alpöge matched the existing statement of the Riemann Hypothesis in Mathlib.
What role did the Lean kernel play?
The verification process went beyond simple compilation. The community checked the exported raw proof using Lean's official kernel, as well as several third-party checkers such as "con-leche" and "con-ron." These checkers were implemented in various programming languages to provide independent oversight.
Crucially, the "con-leche" and "con-ron" checkers include formal proofs, relative to set theory, which assert that they are incapable of accepting a false proof. This mechanism is designed to protect against the possibility that flaws in Lean's own logic could be exploited to validate an incorrect mathematical claim. To prevent any potential malicious code within the source files from interfering with this process, the checks were performed on an inert export of the proof, according to the Lean community blog.
Why is a 17-million-line codebase necessary?
While a mathematical proof in a journal might only span dozens of pages, a formal proof in a system like Lean requires every single logical step, definition, and axiom to be explicitly stated and checked. This results in a massive expansion of the material. The 17 million lines of code in Alpöge's library represent the exhaustive formalization required to bridge the gap between high-level mathematical intuition and the rigorous, step-by-step requirements of a computer-verifiable kernel.
What does this mean for the future of mathematics?
The successful verification of such a complex and foundational hypothesis suggests a growing shift toward formal methods in mathematics. The Lean and Mathlib communities noted that they look forward to seeing how the broader mathematical community utilizes this proof to explain the new mathematical ideas it contains. This development demonstrates that formal verification can handle proofs of unprecedented scale and complexity, potentially setting a new standard for how major conjectures are settled.
How can researchers explore this topic?
For researchers and students looking to dive into the complexities of this proof or the underlying number theory, the sheer volume of data and the specialized nature of the documentation make it a perfect candidate for deep analysis.
While Grafy does not offer a specialized theorem prover, you can use Reader to upload technical papers or documentation regarding the Riemann Hypothesis or the Lean verification process. This allows you to perform targeted research, ask specific questions about the mathematical logic, and summarize complex sections of the 17-million-line context through AI-driven analysis.
Frequently asked questions
What is the Riemann Hypothesis?
The Riemann Hypothesis is a famous unsolved problem in mathematics concerning the distribution of prime numbers. It involves the zeros of the Riemann zeta function, and its proof or disproof has profound implications for number theory and many other fields of mathematics.
How many lines of code are in the proof?
Levent Alpöge's proof of the Riemann Hypothesis, released as a Lean library, comprises 17 million lines of code. This large scale is due to the necessity of formally defining every logical step required for computer verification.
Who certified the correctness of the proof?
The Lean and Mathlib communities, endorsed by the Lean FRO and the Mathlib Initiative, certified the correctness of the proof. They verified the statement, the compilation of the library, and the validity of the proof using multiple independent checkers.
Source: Hacker News — front page — Lean verification of the Riemann Hypothesis


