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 Dirichlet L-function statements — V-2(b), #21
Unit (b) of #21: the three statements about Dirichlet L-functions in src/Statements.lean and
src/Main.lean, read against the usual statement of the Generalized Riemann Hypothesis (GRH).
The Clay page states only the Riemann hypothesis and does not state GRH, so this unit is not
compared with a Clay sentence. Unit (a) is in riemann-hypothesis.md.
What the three theorems state
| Theorem | Declaration | In ordinary notation |
|---|---|---|
| half-plane form | LFunction_ne_zero_of_half_lt_re : DirichletLNonvanishingRightOfHalf (src/Main.lean:17, def src/Statements.lean:10) |
For every modulus N ≥ 1 and every Dirichlet character χ mod N, L(s, χ) ≠ 0 whenever re s > ½, except possibly at s = 1 when χ is the principal character. |
| all characters, strip | LFunction_eq_zero_re : DirichletLZerosOnLine (src/Main.lean:21, def src/Statements.lean:14) |
For every N and χ, every zero of L(s, χ) with 0 < re s < 1 has re s = ½. |
| primitive characters, strip | LFunction_eq_zero_re_of_isPrimitive : PrimitiveDirichletLZerosOnLine (src/Main.lean:25, def src/Statements.lean:18) |
The same, restricted to primitive χ. |
The third is proved from the second (src/Main.lean:25-26), so it is a special case, not a
separate assertion.
What they rest on
-
DirichletCharacter.LFunction χ s(Mathlib/NumberTheory/LSeries/DirichletContinuation.lean:60) isZMod.LFunction χ s, andZMod.LFunction Φ s(Mathlib/NumberTheory/LSeries/ZMod.lean:85) isN ^ (-s) * ∑ j : ZMod N, Φ j * hurwitzZeta (toAddCircle j) sIt is the meromorphic continuation, built as a linear combination of Hurwitz zeta functions; it agrees with the Dirichlet series for
1 < re s(LFunction_eq_LSeries), and it is total as a Lean function. -
It is deliberately not
LSeries: the docstring atDirichletContinuation.lean:52-58says thatLSeries χ sis defined to be0whenre s ≤ 1, so that object is a junk value outside its convergence range. -
1 : DirichletCharacter ℂ Nis the principal character.χ.IsPrimitivemeansconductor χ = N(Mathlib/NumberTheory/DirichletCharacter/Basic.lean:291). -
For the principal character mod N,
LFunctionTrivChar_eq_mul_riemannZeta(DirichletContinuation.lean:173) givesLFunctionTrivChar N s = (∏ p ∈ N.primeFactors, (1 - (p : ℂ) ^ (-s))) * riemannZeta sfor
s ≠ 1, andLFunctionTrivChar_residue_one(line 181) gives a simple pole ats = 1with residue∏ p ∈ N.primeFactors, (1 - (p : ℂ)⁻¹). -
Trivial zeros of the L-functions:
Even.LFunction_neg_two_mul_nat_add_one(line 103) puts zeros of an even χ at the strictly negative even integers, andOdd.LFunction_neg_two_mul_nat_sub_one(line 115) puts zeros of an odd χ at the negative odd integers.
Against GRH
The usual statement: every nontrivial zero of L(s, χ), for a primitive Dirichlet character χ,
has real part ½; equivalently L(s, χ) ≠ 0 for re s > ½, with the pole of the principal
character at s = 1 set aside.
-
PrimitiveDirichletLZerosOnLineis this statement for primitive χ, with "nontrivial" made explicit as0 < re s < 1. No difference. -
DirichletLZerosOnLinequantifies over imprimitive χ as well, so on its face it is stronger than GRH. The standard reduction: writeχ = changeLevel χ.conductor_dvd_level χ.primitiveCharacterwithχ.primitiveCharacterprimitive (changeLevel_primitiveCharacter,DirichletCharacter/Basic.lean:309-311); then fors ≠ 1,LFunction_changeLevel(DirichletContinuation.lean:149-152) givesLFunction χ s = LFunction χ.primitiveCharacter s * ∏ p ∈ N.primeFactors, (1 - χ.primitiveCharacter p * p ^ (-s))Each factor vanishes only when
χ.primitiveCharacter p * p ^ (-s) = 1; ifχ.primitiveCharacter p ≠ 0, this says|p ^ (-s)| = 1, i.e.re s = 0. So inside0 < re s < 1the product contributes no zeros, and the zeros ofL(χ, ·)are exactly those of its primitive character. Hence the all-χ statement is equivalent to the primitive one. The reduction is standard; it is not formalized in this note. -
DirichletLNonvanishingRightOfHalfis the half-plane form. For nonprincipal χ,differentiable_LFunction(DirichletContinuation.lean:97) says L is differentiable everywhere, and GRH says it has no zeros withre s > ½. For the principal χ ands ≠ 1, the factorization above writes L as ζ times Euler factors which are nonzero forre s > ½; its zeros there are ζ's zeros, so the statement is the right-half-plane part of unit (a). Ats = 1the theorem excludes the principal character only; this is exactly the pole, anddifferentiableAt_LFunction(DirichletContinuation.lean:91) carries the same side conditions ≠ 1 ∨ χ ≠ 1. For a nonprincipal χ ats = 1the statement assertsL(1, χ) ≠ 0; this is Dirichlet's nonvanishing, a classical theorem independent of GRH, and it is what the half-plane form needs at that point.
The pole and junk values
At the pole s = 1 the principal L-function has the simple pole recorded above. Mathlib's total
LFunction returns some finite value there, produced by the Hurwitz-zeta construction; no lemma
identifies that value with the residue, and the theorems make no zero claim at that point. The
exclusion (χ ≠ 1 ∨ s ≠ 1) is the correct handling of the pole, not an omission of a zero.
The trivial zeros listed above lie at negative integers, outside the strip 0 < re s < 1, so
GRH's "nontrivial zeros" and Lean's strip condition discard the same points. Zeros at re s = 0
that an imprimitive Euler factor can produce are also outside the open strip; a primitive
character has no such factor.
At N = 1 there is only the principal character and LFunction_modOne_eq
(DirichletContinuation.lean:66) says LFunction χ = riemannZeta; the all-χ strip statement then
reads as unit (a) restricted to the strip, and the half-plane form as its right-half part. This
is a consistency check across the two units, not a new statement.
Verdict
I find no difference from GRH. The one formal strength is that DirichletLZerosOnLine covers
imprimitive characters too; the Euler-factor reduction makes it equivalent to the primitive
statement, but that reduction is an argument in the note, not a Lean theorem proved here. The
pole at s = 1 is excluded exactly where the total function stops being differentiable, and the
trivial zeros are outside the strip.
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.
What this note does not show: that the proofs are right, and that the imprimitive-to-primitive reduction has been formalized. This is a reading of the statements only.