01 logo

Riemann Hypothesis Proof Verified: 166 Years, 17 Million Lines of Code, and a Result Mathematics Can Finally Check

Dozens of independent verifiers checked 17 million lines of Lean code — and the most famous problem in mathematics may finally be settled.

By June HartPublished 5 days ago • 6 min read
Riemann Hypothesis Proof Verified: 166 Years, 17 Million Lines of Code, and a Result Mathematics Can Finally Check
Photo by Thomas T on Unsplash

For 166 years, the Riemann Hypothesis sat in the particular category of problems that mathematics could describe beautifully, use constantly, and not actually settle. This week that changed in a way few people predicted: the Riemann Hypothesis proof verified in Lean, the formal proof system built on the Mathlib library, after dozens of independent verifiers checked a formalization running to roughly 17 million lines of code. The proof is credited to mathematician Levent Alpöge, with the Lean formalization assisted by Claude, and the story has not been a one-day wonder. It has trended at number one across seven sources — Wikipedia, Hacker News, GitHub, Lobsters, Techmeme, the science press and Lemmy — for three mornings running, since November 21. In mathematics, that kind of sustained attention usually means one of two things: either something enormous has happened, or something enormous has gone wrong. So far, the verifiers keep saying it is the first one.

Start with the hypothesis itself, because the plain-English version is more interesting than its fearsome reputation suggests. Prime numbers — 2, 3, 5, 7, 11 and onward — do not arrive on a schedule. They thin out as numbers grow, but they never stop, and their pattern has teased mathematicians since Euclid. In 1859, Bernhard Riemann published a short, dense paper that connected those primes to a single object called the zeta function. Feed the zeta function a number and it returns a value built, in one formulation, from adding up the reciprocals of every counting number raised to a power. That sounds like bookkeeping. What Riemann found, exploring the function in the complex plane — where numbers have both a real part and an imaginary part — was a landscape of points where the function equals zero. Some of those zeros are boring and fully understood. The interesting ones, the so-called nontrivial zeros, Riemann conjectured all lie on a single vertical line, the critical line, where the real part is exactly one-half. That conjecture is the Riemann Hypothesis. If every nontrivial zero sits on that line, then the primes, for all their apparent randomness, are distributed about as regularly as they could possibly be. Hundreds of published results in number theory begin, in effect, with the words "assuming the Riemann Hypothesis" — which is another way of saying that a large building has been standing for a century and a half on a foundation everyone believed in and nobody had inspected all the way down.

What the Riemann Hypothesis proof verified actually means

That history is why the phrase "proof verified" needs unpacking, because in this case the verification is not a panel of experts nodding over a manuscript. The Levent Alpöge Riemann proof was translated into Lean, a proof assistant in which every logical step has to be stated in a form a computer can check, and the resulting formalization — built with Mathlib, the community's vast shared library of already-proven mathematics — ran to some 17 million lines. Dozens of independent verifiers then ran that code themselves and confirmed that Lean accepts it: that each step follows from the steps before it, with no gaps a human reader might have waved through out of politeness, fatigue or shared assumption. It is worth remembering how recently this was supposed to be impossible on any useful timescale. Terence Tao, arguably the most respected living mathematician, had predicted that formal verification of a result at this level might not arrive until around 2050. Instead it arrived on a November weekend, trending on Hacker News, with an AI assistant in the credits — a detail that matters, because the same profession that spent the week celebrating the result also spent it arguing about what the AI's presence in the pipeline means for who, or what, gets to do mathematics now.

The honest way to describe the division of labour is that it resembles what happened with the Anthropic IPO story I covered earlier this month, where the interesting question was never whether AI was present — it plainly was — but whether the human claims built on top of it could survive checking. Here, the checking is the entire point. A traditional proof is a persuasive document: an expert writes an argument, referees read it, the community pokes at it for years, and confidence accumulates socially. That system works, but it works slowly and it has failed before, sometimes for a decade at a time, when a subtle error hid inside a step everyone trusted. A Lean formalization is a different species of object. It is not persuasive; it is executable. Either the kernel of the system accepts every inference or it does not, and anyone with a computer can rerun the acceptance for themselves rather than taking a referee's word for it. That is the real novelty this week — not simply that a famous problem fell, but that it fell in a form designed to be re-checked by strangers.

The skepticism, stated fairly

Skepticism is still warranted, and the mathematicians raising questions this week are not cranks or sore losers. Formal verification proves exactly what was formalized — no more, no less. If the statement encoded in Lean subtly differs from the statement Riemann made — a definition shifted, an edge case quietly excluded, a hypothesis about the zeta function smuggled into a Mathlib definition — then Lean will faithfully verify the wrong theorem, and it will do so with total confidence. That is why the remaining work is human work: experts in analytic number theory still need to audit the formal statement itself, line by line, and confirm that the thing proved is the thing the Clay Mathematics Institute put a million-dollar prize on when it listed the hypothesis among its Millennium Problems. The 17 million lines also deserve a raised eyebrow of their own. A proof no human can read end to end trades one kind of trust for another: trust in Lean's kernel, in Mathlib's foundations, and in the hardware that ran the checks. Most mathematicians would call that a good trade — kernels are small and heavily scrutinized — but it is a trade, and pretending otherwise would be exactly the kind of hype this story does not need.

There is also the question of understanding, which is different from the question of correctness. Mathematics does not only want to know that a statement is true; it wants to know why, in a form that teaches the next generation where to dig. A formalized proof can be correct and still be, in human terms, nearly mute — a mountain of verified steps that yields few portable ideas. Whether Alpöge's argument, as distinct from its formalization, contains an insight other mathematicians can carry into neighbouring problems is something the field will take months or years to judge, and that judgment, not the trending rank, will decide how this week is remembered in fifty years. None of that diminishes the verification. It simply places it correctly: this is the end of the argument about whether the proof holds together, and the beginning of the argument about what the proof means.

Why this matters beyond mathematics

For everyone outside number theory, the practical stakes are real but easy to exaggerate, so let us not. Your bank encryption does not change tomorrow; the security of modern cryptography rests on the difficulty of factoring large numbers, and knowing the primes are distributed as regularly as Riemann predicted does not hand anyone a factoring shortcut. What changes first is the status of those hundreds of conditional results — theorems published as true-if-Riemann-is-true can now be cited without the conditional, which tidies a large corner of mathematics at a stroke. What changes second is the method. If a Millennium Problem can be formalized and machine-checked within years rather than the decades Tao expected, then every major proof announced from now on will face a new question at its press conference: when will the Lean version be ready? That is a healthy pressure. It moves mathematics, slowly, from a culture of trust-me toward a culture of check-it-yourself, and it does so without discarding the human refereeing that catches the errors a kernel cannot — wrong statements, misread problems, proofs of things nobody actually asked.

So the fairest summary of this strange, exhilarating week is a two-part one. The Riemann Hypothesis proof verified in Lean is, by the standards formal verification itself sets, about as solid as a mathematical result can get: dozens of independent checks, an open codebase anyone can rerun, and a community that has spent three days actively hunting for the flaw and not finding it. And the work that remains — auditing the statement, extracting the insight, absorbing the consequences for prime numbers and the zeta function — is the ordinary, unglamorous, essential labour by which mathematics turns a verified proof into understood knowledge. Riemann waited 166 years for the first part. He can wait a little longer for the second. When a proof no human can fully read settles the most famous question in mathematics, has mathematics gained certainty — or quietly changed what certainty means?

tech news

About the Creator

June Hart

Independent journalist. Curious, skeptical, allergic to hype. I cover whatever the day brings — and what it means for us, with humor.

Enjoyed the story? Support the Creator.

Subscribe for free to receive all their stories in your feed. You could also give them a one-off tip, letting them know you appreciate their work.

Subscribe For Free

Reader insights

Share your insights about this piece.

How does it work?

Add your insights

Comments

There are no comments for this story

Be the first to respond and start the conversation.

Sign in to comment
    Written by June Hart