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

| 1 | -- The proof is Levent Alpöge's, with Claude. |
| 2 | module |
| 3 | |
| 4 | public import New.Main |
| 5 | |
| 6 | @[expose] public section |
| 7 | |
| 8 | /-- **The Riemann Hypothesis**, as stated in Mathlib. -/ |
| 9 | theorem riemannHypothesis : RiemannHypothesis := New.zeta_zeros_on_line New.grh |
| 10 | |
| 11 | /-- Every zero of ζ other than the trivial zeros −2, −4, … (and the point 1) has real part 1/2. -/ |
| 12 | theorem riemannZeta_eq_zero_re : RiemannZetaZerosOnLine := riemannHypothesis |
| 13 | |
| 14 | /-- **The Generalized Riemann Hypothesis, half-plane form.** For every Dirichlet character χ, |
| 15 | L(s, χ) ≠ 0 when re s > 1/2, except at s = 1 for the trivial character, where nothing |
| 16 | is stated. -/ |
| 17 | theorem LFunction_ne_zero_of_half_lt_re : DirichletLNonvanishingRightOfHalf := New.grh |
| 18 | |
| 19 | /-- **The Generalized Riemann Hypothesis.** For every Dirichlet character χ, every zero of L(s, χ) |
| 20 | with 0 < re s < 1 has real part 1/2. -/ |
| 21 | theorem LFunction_eq_zero_re : DirichletLZerosOnLine := New.zeros_on_line New.grh |
| 22 | |
| 23 | /-- The Generalized Riemann Hypothesis for primitive Dirichlet characters, a special case of |
| 24 | `LFunction_eq_zero_re`. -/ |
| 25 | theorem LFunction_eq_zero_re_of_isPrimitive : PrimitiveDirichletLZerosOnLine := |
| 26 | fun N _ χ _ ↦ LFunction_eq_zero_re N χ |