JupiteX Get the app
Science & Technology26 Nov 2026 · about 7 min

Generalized Riemann Hypothesis proof in Lean 4, in 76k lines (down from 17M)

The brief

The surprising point is that the compact edition is not presented as a different mathematical result. The source says it proves the same five theorems as the readable edition. Those theorems form part of Alpöge’s Lean proof of the Riemann Hypothesis and its Generalized version for Dirichlet L-functions. The editions differ greatly in size: the readable version is about 300,000 lines, while the compact one is about 76,000. The source directs readers to the readable edition’s guide at grh/GUIDE.md. It also identifies a much larger version, about 17 million lines, as the work from which this shortened version comes. The article does not explain which specific writing or proof choices account for the line-count differences. It does establish that both editions prove the same five theorems, so line count alone does not indicate a change in the claimed results. The repository is available on GitHub, and the readable edition offers an entry point for exploring the proof.

01

What does the 76,000-line version claim to prove, and how does it compare with the other editions?

The surprising point is that the compact edition is not presented as a different mathematical result. The source says it proves the same five theorems as the readable edition. Those theorems form part of Alpöge’s Lean proof of the Riemann Hypothesis and its Generalized version for Dirichlet L-functions.

The editions differ greatly in size: the readable version is about 300,000 lines, while the compact one is about 76,000. The source directs readers to the readable edition’s guide at grh/GUIDE.md. It also identifies a much larger version, about 17 million lines, as the work from which this shortened version comes.

The article does not explain which specific writing or proof choices account for the line-count differences. It does establish that both editions prove the same five theorems, so line count alone does not indicate a change in the claimed results. The repository is available on GitHub, and the readable edition offers an entry point for exploring the proof.

02

How large is the reduction from about 17 million lines to 76,000, and how does the 300,000-line edition fit in?

The striking change is from about 17 million lines to about 76,000. Using those approximate figures, the compact version is roughly 224 times shorter, or about a 99.6% reduction in line count. These are comparisons of code length, not measures of how much mathematics the proof establishes.

The 300,000-line edition is the readable version, while the 76,000-line edition is described as compact. The readable version is roughly four times as long as the compact one. Both editions prove the same five theorems, according to the source. So the shortest edition is not described as proving fewer results.

The source calls the roughly 17-million-line work a Lean proof and presents the other two as editions of that proof. It does not detail how the lines were removed or reorganized. The figures show a wide range of formats: a very large full proof, a more readable edition, and a more compact edition for the same stated theorems.

03

What is Lean 4, and what does it mean to write a mathematical proof in it?

Lean 4 is a programming language and interactive theorem prover used to express mathematical definitions and proofs in a precise form. Unlike a proof written only in prose, a Lean proof is structured so that Lean’s kernel can check whether each step follows under the stated definitions and assumptions. The source identifies the work as a Lean proof, but does not specify Lean 4.

For example, a mathematician can define a function, state a theorem about it, and provide a sequence of formal steps. Lean checks that those steps fit the rules of its logic. Tactics can help construct the proof, but the resulting proof must still pass the checker. This lets software verify a very large proof consistently.

Formal checking can catch invalid steps and makes proof details inspectable, but it does not make the underlying assumptions true or guarantee that the formal statement matches the mathematician’s intended claim. The source reports editions of different sizes, but gives no details about Lean’s version or the proof’s formal structure. Those details would require information beyond the provided text.

04

What do the Riemann Hypothesis and its Generalized version say about the zeros of zeta and Dirichlet L-functions?

The Riemann Hypothesis, or RH, says that every nontrivial zero of the Riemann zeta function has real part one-half. Zeros are inputs where a function’s value is zero. The hypothesis singles out a precise vertical line in the complex plane, making it a sharply stated claim about the zeta function.

The Generalized Riemann Hypothesis, or GRH, extends the same kind of claim to a family of Dirichlet L-functions: their nontrivial zeros are expected to have real part one-half as well. The source refers to a Lean proof of RH and GRH for Dirichlet L-functions, but does not spell out the zero statements or technical qualifications such as trivial zeros.

These conjectures matter because the locations of zeros are connected to patterns in prime numbers and other number-theoretic questions. The source gives no account of those consequences or of the proof’s mathematical argument. It does report that the readable and compact editions prove the same five theorems, and identifies the work as a proof of these hypotheses.

05

What does Lean's checking add to confidence in a proof, and what does it not establish on its own?

A checked Lean proof has passed a precise, repeatable test: the system verifies that its formal steps follow from the definitions and assumptions it was given. This is valuable for a proof as large as the one in the source, which is described as about 17 million lines in its full form. Checking is different from trusting a human reader to spot every gap.

The key mechanism is formalization. Definitions, claims, and reasoning are encoded in a language with strict rules, and the proof checker verifies the resulting derivation. If a step is invalid under those rules, the proof does not check. The article identifies the work as a Lean proof but does not describe its checking process or software setup.

A successful check does not by itself prove that the assumptions are true, that the formal statement captures the intended informal theorem, or that the chosen foundations are beyond question. Those are separate matters for mathematicians to assess. The source reports two editions proving the same five theorems, but gives no further account of what Lean’s check establishes.

06

How can different editions prove the same theorems while using vastly different numbers of lines?

A line count measures how a proof is written and organized, not simply which theorems it establishes. The source makes this concrete: its readable edition is about 300,000 lines, its compact edition about 76,000, and both prove the same five theorems. The versions can differ in presentation while preserving the claims they formally establish.

In formal mathematics, different encodings can express the same result. For example, one version might spell out more intermediate steps, while another uses shorter definitions or proof tools. Such choices can change the number of lines without changing the theorem. These are general possibilities, not details supplied about Alpöge’s editions; the source does not say exactly what accounts for their sizes.

The article also describes a roughly 17-million-line version and presents the shorter editions as versions of that Lean proof. It calls the 300,000-line edition readable and points to a guide, while calling the 76,000-line one compact. The shared five theorems are the specific comparison the source provides; line counts alone do not explain the proof’s internal design.

07

What are L-functions, and how do their zeros help describe the distribution of prime numbers?

An L-function is a kind of complex-valued function built from number-theoretic data. The Riemann zeta function is a central example, and Dirichlet L-functions form a family related to characters that distinguish classes of integers. The source refers to Dirichlet L-functions in naming the generalized hypothesis, but does not define these functions.

Their zeros matter because analytic formulas connect where an L-function vanishes with how primes are distributed. For example, the zeta function is linked to the overall count of primes, while Dirichlet L-functions help study primes in residue classes. The Riemann Hypothesis and its generalized form assert that the relevant nontrivial zeros lie on a particular line, real part one-half.

If these hypotheses hold, they provide strong control over errors in estimates of prime patterns. That is why zero locations are important in number theory. The source itself focuses on the Lean proof and its editions, not on these consequences: it states that the work concerns RH and GRH for Dirichlet L-functions and that two editions prove the same five theorems.

This brief was written by AI from the original reporting and checked by other models. Names, figures and quotes come from the source; read it for full context.

Read more in the JupiteX app

Pulse is free. New stories every 4 hours, each one broken into the questions that explain it.

Or read more news on the web