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 last step, as mathematics — T-4 (#28)
This note states Theorem A, Theorem B, Theorem C, the main inequality star_inequality and
grh, in the order in which the proof uses them. It changes no proof: the Lean declarations are
the authority; the file and line numbers below say where each statement lives.
1. The parameters P
P : New.Parameters is the structure at src/New/Reduction/Data/FieldsAndPlaces.lean:74-84. Its
fields are:
| Field | Meaning |
|---|---|
P.q₀ |
the modulus q₀, a multiple of 18480 = 16 · 3 · 5 · 7 · 11 |
P.d |
a prime, the discriminant of K = ℚ(√-d) |
P.dvd_q₀ |
the proof that 18480 ∣ q₀ |
P.d_prime |
the proof that P.d is prime |
P.q₀_dvd_and_not_dvd |
q₀ ∣ 2 (d + 1) and ¬ q₀ ∣ d + 1, i.e. d ≡ q₀/2 - 1 (mod q₀) |
From these the file defines q₁ = q₀ · towerDeg s, q₂, the CM field E = K(ζ), its type P.Φ s
of infinite places, and the constant P.bigOmega s; none of them is an additional hypothesis.
2. The data D
D : New.Data P is the structure at src/New/Reduction/Data/AdmissibleData.lean:88-174. It
bundles the following fields; they are the hypotheses on D.
Scales and their logarithms.
D.natX, D.natX₁, D.natB : ℕ, D.logX, D.logX₁, D.logB : ℝ, with
exp D.logX = D.natX, exp D.logX₁ = D.natX₁, exp D.logB = D.natB, and the four size
conditions
[ 10^{12},P.\mathrm{constantBound} \le \log\log b,\qquad 100\log\log b \le \log x,\qquad 10^6\log x \le \log x_1,\qquad 10^6\log x_1 \le \log b, ]
together with 6 log log x₁ ≤ log log b. Here (x = D.x = e^{D.\mathrm{logX}}),
(x_1 = D.x_1 = e^{D.\mathrm{logX_1}}), (b = D.b = e^{D.\mathrm{logB}}).
Lifts, rank and tower.
D.m, D.r, D.towerExp : ℕ, with
[ m \in [\sqrt{x}, 2\sqrt{x}],\qquad r \in [x^5, 3x^5], ]
m = 2^{e+1} and towerExp = (e+1) · 22 for some e, r = 3^{e+1} for some e,
towerExp ≤ 32 log x, and P.q₁ towerExp · x₁ ∣ b.
The b-places.
D.bPlaces : Finset (P.Φ D.towerExp), with:
every σ ∈ D.bPlaces satisfies placeClass σ = -1 modulo q₀;
towerDeg D.towerExp ≤ #D.bPlaces · log b;
and D.bPlaces is sparse for the primes up to (r + 1 - m) · (5 r) in the sense of
P.IsSparse.
The level primes.
D.levelPrime : Fin 2 → ℕ, with D.levelPrime 0 and D.levelPrime 1 prime, both ≡ 1 modulo
q₂², distinct, and both in [b^{10}, b^{11}].
The level and its integers.
D.N : ℕ, prime, ≡ 1 modulo q₂², with
log N in
([;P.\mathrm{logLevelMin};\dots,;P.\mathrm{logLevelMin} + \sqrt{\log b};])
where logLevelMin is evaluated at D.towerExp, D.m, the weight
P.placeWeight D.bPlaces D.natX D.natX₁ D.natB and the product D.levelPrime 0 · D.levelPrime 1;
D.piMBar : 𝓞 P.K with D.piMBar * star D.piMBar = D.levelPrime 0 · D.levelPrime 1;
D.piN : 𝓞 (P.E D.towerExp) with D.piN * star D.piN = D.N.
These fields are all the data hypotheses; the theorems below add only the explicit hypotheses written in their statements.
3. Derived quantities used in the statements
Write (d_T = D.\mathrm{targetDim}) for the dimension of the target space (V = D.\mathrm{targetForms}), and (S = D.\mathrm{ramifiedSourceForms}\subseteq D.\mathrm{SourceForm}) for the ramified source. Let
[ a = D.a = D.\mathrm{natX}\cdot D.\mathrm{natB},\qquad f = D.f = #{\text{infinite places of }E},\qquad k = D.k = r + 1 - m, ]
[ D.\mathrm{errorUnit} = f,a,(\log b)^3. ]
The main amount is
[ D.\mathrm{mainAmount} = m,k \sum_{\sigma : D.\Phi} \bigl(D.\mathrm{jetSize}(D.\mathrm{weight},\sigma) - D.\mathrm{primeSum}(D.\mathrm{weight},\sigma,\sigma)\bigr), ]
and the total remainder is
[ D.\mathrm{totalRemainder} = \sum_{\tau \in D.\mathrm{aPlaces}} \bigl(D.\mathrm{primeSum}(a,\tau) - D.\mathrm{mainPrimeSum}\bigr). ]
D.normalizedPoincare s : S → V is the translate (s\mathfrak{p}) of the fixed Poincaré map
(\mathfrak{p}), for (s) in the finite group (D.\mathrm{chosenGL}). D.integralRamified
is the set of (\varphi \in S) integral at every prime place. D.Θ 1 is the chain of lifts for
the trivial twist; D.normSqAt σ is the squared norm at the embedding (\sigma).
Finally, D.targetLattice is the lattice of target forms integral at every prime place.
D.targetLattice.IndexLe y δ means: there are (\delta_l \ge 0) with
(\sum_l \delta_l \log l \le \delta) such that, for every prime place (\iota), an
(\iota)-integral matrix of determinant valuation at most (\delta_l) takes (y) to forms
integral at (\iota). D.targetLattice.CovolumeLe y c means: the Gram determinant of every
conjugate of the untwisted lift (D.\Theta_1 y) has absolute value at most (e^c).
4. Theorem A
(a) Short integral forms span the source
New.Data.span_short_integralRamified_eq_top
(src/New/Reduction/ShortAndEnough.lean:209-212). For D : Data P,
[
\operatorname{span}{\mathbb C}
\Bigl{\varphi \in D.\mathrm{integralRamified}
;\Big|;
\forall s : D.\mathrm{chosenGL},\ \forall \sigma \in \operatorname{Aut}{\mathrm{ring}}(\mathbb C),
\bigl|D.\Theta_1(D.\mathrm{normalizedPoincare},s,\varphi)\bigr|_{\sigma}^2
\le
\exp\bigl(D.\mathrm{mainAmount}
- D.m,D.\mathrm{totalRemainder}
- D.f,D.a,(\log b)^4\bigr) \Bigr} = \top, ]
where the span is taken in the ambient space (S = D.\mathrm{ramifiedSourceForms}).
In words: the integral ramified forms whose every translate has a short lift already span the
whole source over (\mathbb C). The size bound is exactly
mainAmount - m * totalRemainder + f * a * logB ^ 4.
(b) A family of translates has small index
New.Data.indexLe_normalizedPoincare
(src/New/Reduction/ShortAndEnough.lean:331-334). For a finite set
(t \subseteq D.\mathrm{chosenGL}), a natural number (n), and
(y : \mathrm{Fin},n \to V), if
[
\forall i,\ \exists s \in t,\ \exists \varphi \in D.\mathrm{integralRamified},
y_i = D.\mathrm{normalizedPoincare},s,\varphi,
]
then
[ D.\mathrm{targetLattice.IndexLe}\Bigl(y,\ #t \cdot \dim_{\mathbb C} S \cdot 2,D.\mathrm{errorUnit}\Bigr). ]
The index loss is (#t \cdot \dim_{\mathbb C} S \cdot 2 f a (\log b)^3).
5. Theorem B
New.Data.enough_forms (src/New/Reduction/ShortAndEnough.lean:405-409). For D : Data P,
[ 0 < d_T ]
and there is a finite set (t \subseteq D.\mathrm{chosenGL}) such that
[ #t \cdot \dim_{\mathbb C} S \le 5,d_T,\log(1 + 2b^2), ]
and
[ \Bigl(1 - \frac{4}{b^2}\Bigr)d_T \le \dim_{\mathbb C}\Bigl(\operatorname{span}\bigcup_{s \in t} \operatorname{ran} D.\mathrm{normalizedPoincare},s\Bigr). ]
In words: few translates of the source already span almost all of the target; the deficit is at most ((4/b^2)d_T).
6. Theorem C
New.Data.integral_forms_long
(src/New/Determinant/Twist/LongForms.lean:277-280). For
(y : \mathrm{Fin},n \to V), (\delta, c : \mathbb R), suppose
[ y \text{ is linearly independent over } \mathbb C,\qquad \Bigl(1 - \frac{4}{b^2}\Bigr)d_T \le n, ]
[ D.\mathrm{targetLattice.IndexLe},y,\delta,\qquad D.\mathrm{targetLattice.CovolumeLe},y,c. ]
Then
[ d_T\Bigl(D.\mathrm{mainAmount} - 3,D.f,D.a,(\log b)^4\Bigr) \le c + 2\delta. ]
This is the lower bound: covolume plus twice the index is at least the main amount, up to the size error (3 f a (\log b)^4).
7. The main inequality
New.star_inequality (src/New/Reduction/MainInequality.lean:93-95). For
P : Parameters and D : Data P,
[ D.m,D.\mathrm{totalRemainder} \le D.f,D.a,(\log b)^5. ]
How it follows from A, B and C
Theorem B gives (t) with (#t\cdot\dim S\le 5d_T\log(1+2b^2)) and ((1-4/b^2)d_T\le\dim\sum_{s\in t}\operatorname{ran}(s\mathfrak p)). From the images of a basis of the short forms one chooses (n) independent target forms (y_1,\dots,y_n) with (n\ge(1-4/b^2)d_T) and (n\le d_T). Theorem A(a) makes their preimages short, so their covolume is at most
[ c = n\bigl(D.\mathrm{mainAmount} - D.m,D.\mathrm{totalRemainder} + D.f,D.a,(\log b)^4\bigr), ]
and Theorem A(b), summed over the translates, gives an index at most
[ \delta = d_T \cdot 10\log(1+2b^2)\cdot D.\mathrm{errorUnit}. ]
Theorem C then says
[ d_T\bigl(D.\mathrm{mainAmount} - 3D.f,D.a,(\log b)^4\bigr) \le c + 2\delta. ]
The main amount cancels because (n\le d_T); what remains is
[ n,D.m,D.\mathrm{totalRemainder} \le d_T\bigl(4D.f,D.a,(\log b)^4
- 20\log(1+2b^2),D.\mathrm{errorUnit}\bigr). ]
Since (d_T\le 2n) and (b) is large (D.le_of_hasLogBound absorbs the logarithmic factor
into ((\log b)^5)), dividing by (n>0) gives star_inequality. This is the comparison step in
the proof of star_inequality; no new analytic input enters.
8. grh
New.grh (src/New/Reduction/OneSidedBound.lean:245-277) has the type
DirichletLNonvanishingRightOfHalf (src/Statements.lean:10-12), i.e.
[
\forall N\ (h_N : \mathrm{NeZero},N)\ \forall \chi : \mathrm{DirichletCharacter}\ \mathbb C\ N
\forall s : \mathbb C,\quad
\frac12 < \Re s \ \to\ (\chi \ne 1 \lor s \ne 1)\ \to\ L(s,\chi) \ne 0.
]
In words: no Dirichlet L-function vanishes in (\Re s > 1/2); at (s = 1) only the principal character is excepted, and that is its pole, not a zero.
How grh follows from the inequality
star_inequality is used in New.Data.primeRemainder_le
(src/New/Reduction/OneSidedBound.lean:50-52): after dividing by (m a #\Phi_b), it bounds
the prime remainder (R_{q_0}(x)) by
[ \varphi(q_0)\frac{(\log b)^6}{m} + |R_{q_0}(x_1)| + \log b,|R_1(x_1)|. ]
The prime number theorem for the remainder
(New.eventually_abs_primeRemainder_exp_le_inv_pow) and the scales then give
New.eventually_primeRemainder_le_mul_rpow: for every (\varepsilon>0), eventually
[ R_{q_0}(x) \le (128\varphi(q_0)+32),x^{-1/2+\varepsilon}. ]
The one-sided criterion LFunction_ne_zero_of_primeRemainder_le turns that bound, for the prime
(d_0 = 9240q-1) in the class (d_0 \bmod 18480q), into non-vanishing for the induced character
mod (18480q); LFunction_changeLevel removes the Euler factors of the induction, and the
result is grh. The passage from the half-plane to the critical line is separate:
New.zeros_on_line and New.zeta_zeros_on_line in src/New/Main.lean.
9. Checked
Every declaration named above was checked with git grep in src/; the theorem statements were
read at the line numbers given. The Data field names are those of
src/New/Reduction/Data/AdmissibleData.lean:88-174, and the Parameters field names those of
FieldsAndPlaces.lean:74-84.
What this note does not show: why A, B and C hold. That is the content of their chapters; this file only states what a reader has to believe for the last step.