> ## Content Index
> Fetch the complete content index at: https://globalfeed.ai/llms.txt
> Use this file to discover other available public pages before exploring further.

# 17 million lines of Lean: how computers checked a proof of the Riemann Hypothesis
- URL: https://globalfeed.ai/en/17-million-lines-of-lean-how-computers-checked-a-proof-of-the-riemann-hypothesis/
- Published: 2026-11-23T12:06:22.000Z
- Updated: 2026-11-23T12:06:22.000Z
- Description: The Lean FRO and the Mathlib Initiative certified the Riemann Hypothesis proof Levent Alpöge says he found with Claude. Here is how formal proof checking works.
- Author: GlobalFeed Editor
- Tags: Riemann Hypothesis, Lean, Claude, Mathematics, dil-en, elle

No human has yet read, from start to finish, the new proof of mathematics' most famous open question of the last 167 years. Even so, computers around the world have checked it line by line and found no error. In a [joint statement](https://leanprover-community.github.io/blog/posts/riemann-hypothesis/?ref=globalfeed.ai) on November 21, the Lean FRO and the Mathlib Initiative said they have "full confidence" that the proof of the Riemann Hypothesis released by Levent Alpöge on November 20 is correct. The proof is a Lean library of 17 million lines. In his published [note](https://alpo.ge/remark.pdf?ref=globalfeed.ai), Alpöge says he found it working with Claude.

This article first explains what the question is, then how a computer "certifies" a proof. That second part is the most instructive side of the story: why a proof this large can be trusted at all.

## What the Riemann Hypothesis asks

Prime numbers (2, 3, 5, 7 and the rest, divisible only by 1 and themselves) look scattered at random along the number line. In 1859 Bernhard Riemann showed that this irregularity is tied to the zeros of the so-called zeta function. The hypothesis says that all of these zeros, apart from some well-known simple ones, sit on a single straight line, the line with real part 1/2\. If true, it guarantees the best estimate we have of how regularly the primes are spread. Alpöge's note describes the question as asking for "optimal control on the count of prime numbers."

## What Alpöge describes

According to his four-page note, the work began in early October. His timeline puts the first step on October 6 and the Generalized Riemann Hypothesis (GRH) on November 16\. Alpöge writes that he set the direction, that they combined two different ideas from a toy setting, and that near the finish line Claude outpaced him. His example is aimed at mathematicians: for a sum of length X, the chain of "theta lifts" Claude suggested had length square root of X.

Alpöge says the argument is currently "incredibly long" and that his intuition tells him it will be simplified quickly. Instead of posting an unreadable document, he chose to present only the Lean code, and he plans to understand, explain and properly write up the proof. The note also praises the taste of the OpenAI team behind several mathematical results.

## How a computer certifies a proof

Lean is a program for writing mathematical statements and proofs in a language a computer can check. Mathlib is the shared Lean library curated and checked by human mathematicians. The logic is simple: every step of a proof either rests on an accepted rule or Lean rejects it. If the code compiles, every step has passed.

For huge AI-generated codebases that alone is not enough. A [post](https://xenaproject.wordpress.com/2026/11/12/and-the-proof-is-checked-in-lean/?ref=globalfeed.ai) on the Lean community's Xena blog on November 12 lists four questions to ask. First, does the statement in the code say what the theorem is supposed to say. Second, does the code compile. Third, could some definition have been quietly changed, or a new axiom slipped in, somewhere in millions of lines. Fourth, could the proof be exploiting a bug in Lean's own checker.

The joint statement says all four were met. The statement of the hypothesis is Mathlib's own, vetted by Lean and number theory experts. Dozens of people compiled the code and got the same result. The community wrote a separate "challenge" file that imports only Mathlib, and two independent tools confirmed that the theorem Alpöge proved is exactly the statement in that file. Finally, the proof went through several independent checkers written in different programming languages. Two of them, con-leche and con-ron, come with a formal proof, relative to set theory, that they cannot accept a false proof. The checks ran on an inert export of the proof, out of reach of any malicious code that might hide in the sources.

## The checks in numbers

Andrew Sutherland of MIT, who ran the checks with Claude Code, shares the details on his [verification page](https://math.mit.edu/~drew/grh/?ref=globalfeed.ai). According to the page as of 16:20 UTC on November 22, all 175,187 modules compile without errors; the proof uses only Lean's three standard axioms; and the exported proof file is 61.5 GB. The independent Rust kernel nanoda accepted the full proof in 27 minutes 42 seconds on 80 threads, and con-leche accepted 1,468,418 declarations. Lean's own kernel, running single-threaded on the whole export, had not finished at that time; it had already accepted every module separately.

The scope is spelled out as well. The five verified theorems cover the Riemann Hypothesis and GRH for all Dirichlet L-functions. According to the page, Dedekind zeta functions, Hecke L-functions and automorphic L-functions in general are not among the checked statements. Alpöge writes in his note that he expects the method to reach further. As an extra cross-check, the proof was combined with an independent formalization of the Robin and Lagarias criteria, yielding two inequalities about the divisor sum that never mention the zeta function.

## What comes next

The community is working on [GitHub](https://github.com/leanprover-community/riemann-hypothesis?ref=globalfeed.ai) to make the proof more readable and faster to build. According to the repository, a full build takes hours, and the original submission was published without a license. The computers say the proof is correct; the task for mathematicians now is to understand the new ideas inside it. The Lean FRO and the Mathlib Initiative close their statement by saying they look forward to the work that will explain those ideas.

Sources: [Lean FRO and Mathlib joint statement](https://leanprover-community.github.io/blog/posts/riemann-hypothesis/?ref=globalfeed.ai), [Alpöge note](https://alpo.ge/remark.pdf?ref=globalfeed.ai), [Sutherland verification page](https://math.mit.edu/~drew/grh/?ref=globalfeed.ai), [GitHub repository](https://github.com/leanprover-community/riemann-hypothesis?ref=globalfeed.ai), [Xena blog](https://xenaproject.wordpress.com/2026/11/12/and-the-proof-is-checked-in-lean/?ref=globalfeed.ai)