Riemann hypothesis: the Lean proof, cleaned up together
The 2026 Lean proof of the Riemann hypothesis and GRH, machine-checked by others, not refereed, no word from Clay; cleaned up together: more readable, faster to build, the theorems unchanged

The Riemann hypothesis statements — V-2(a), #21
Unit (a) of #21: riemannHypothesis and riemannZeta_eq_zero_re, both in src/Main.lean, read
against the Clay Institute's page. Unit (b), the Dirichlet L-function statements, is in
generalized-riemann-hypothesis.md.
What the two theorems state
riemannHypothesis : RiemannHypothesis (src/Main.lean:9) is Mathlib's RiemannHypothesis
(Mathlib/NumberTheory/LSeries/RiemannZeta.lean:185), whose body is
∀ (s : ℂ) (_ : riemannZeta s = 0) (_ : ¬∃ n : ℕ, s = -2 * (n + 1)) (_ : s ≠ 1),
s.re = 1 / 2
In ordinary notation: every zero of ζ other than −2, −4, −6, … and other than s = 1 has real part ½.
riemannZeta_eq_zero_re : RiemannZetaZerosOnLine (src/Main.lean:12) is the project's own
definition of the same statement (src/Statements.lean:7), with the same body. Its proof is
riemannHypothesis itself (src/Main.lean:12), so the two are one statement written twice,
not two independent claims.
What it rests on
riemannZetais the total complex function defined by analytic continuation, not the Dirichlet series (the series converges only for1 < re s).- At the pole, Mathlib assigns a value:
riemannZeta_one(Mathlib/NumberTheory/Harmonic/ZetaAsymp.lean:420) provesriemannZeta 1 = (γ - log (4 * π)) / 2; its docstring says that mathematicallyζ 1is undefined and that the construction ascribes this value.riemannZeta_one_ne_zero(same file, line 443) proves that this value is nonzero. riemannZeta_neg_two_mul_nat_add_one(Mathlib/NumberTheory/LSeries/RiemannZeta.lean:173) proves that each-2 * (n + 1)is a zero ofriemannZeta.
Against the Clay statement
The Clay Mathematics Institute's page ("Riemann Hypothesis", accessed 2026-12-02) says:
all the ‘non-obvious’ zeros of the zeta function are complex numbers with real part 1/2
and, in the overview, "all interesting solutions of the equation ζ(s) = 0 lie on a certain
vertical straight line". The page does not define "non-obvious" or "interesting"; the conventional
reading is the nontrivial zeros, the zeros in the critical strip 0 < re s < 1.
| Point | Lean | Difference |
|---|---|---|
| trivial zeros | excludes exactly s = -2 * (n + 1), n : ℕ |
matches −2, −4, −6, …; the lemma above proves these are zeros |
| the pole | excludes s = 1 |
ζ has a pole there, not a zero; Mathlib's value at 1 is finite and nonzero, so this exclusion removes nothing, but it records the pole correctly |
| the strip | no hypothesis 0 < s.re or s.re < 1 |
a formal slack, discussed below |
There is no formal difference on the nontrivial zeros. The only difference in form is that the
Lean statement does not restrict to the strip: a zero with re s ≥ 1 or re s ≤ 0, other than
−2, −4, …, would also be forced onto the line. Classical theory excludes those cases: the Euler
product gives no zeros for re s > 1, and the functional equation gives only the trivial zeros
for re s < 0. That argument is standard but is not formalized in the statement or in this note.
On the Clay reading, only the nontrivial zeros are at issue, and there the two statements agree.
Verdict
I find no difference in what is claimed about the nontrivial zeros. The missing strip hypothesis
is a slack in form: the extra zeros it quantifies over are excluded by standard facts, not by the
statement itself. The pole at s = 1 is a junk value of the total function, and the statement
correctly refuses to call it a zero.
Checked
Every declaration named above was checked with git grep in src/ and in the pinned Mathlib
tree; none is missing. Mathlib is at commit 31ce06eaadf4a200c0e1407c5f10953cf606b8f8.
Source for the quotation: Clay Mathematics Institute, "Riemann Hypothesis", https://www.claymath.org/millennium/riemann-hypothesis/, accessed 2026-12-02.
What this note does not show: that the proof of riemannHypothesis is right. This is a reading
of the statements only.