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 | module |
| 2 | |
| 3 | public import Lib.Weil.DualPair.Defs |
| 4 | import Lib.ClassField.HeckeCharacter.SplitTameCharacters |
| 5 | |
| 6 | /-! |
| 7 | # Splitting characters |
| 8 | |
| 9 | Here a pair of spaces is indexed by two characters `ν_S`, `ν_T` of `[U(1)]` instead of by |
| 10 | splitting characters `χ_S`, `χ_T`. The splitting character of rank `k` attached to `ν` is the Hecke |
| 11 | character `ν.spaceChar k`, `y ↦ ν(y / ȳ) υ(y)⁻ᵏ`, with `υ` the splitting character from `WeilData`. |
| 12 | The file gives its rules for products and hyperbolic planes, and its value at `rankTwist ν n`. |
| 13 | |
| 14 | ## Relation to the literature |
| 15 | |
| 16 | Known result: splitting characters of a CM extension. |
| 17 | Source: Harris–Kudla–Sweet (1996), §1. |
| 18 | -/ |
| 19 | |
| 20 | @[expose] public section |
| 21 | |
| 22 | noncomputable section |
| 23 | |
| 24 | namespace New |
| 25 | |
| 26 | open WeilData Fintype |
| 27 | |
| 28 | variable {E : Type} [Field E] [CMType E] [WeilData E] |
| 29 | |
| 30 | namespace AutChar |
| 31 | |
| 32 | variable {ν ν' : AutChar E} {k l : ℕ} |
| 33 | |
| 34 | /-- The splitting character of `ν * ν'` at rank `k + l` is the product of those of `ν` at rank `k` |
| 35 | and of `ν'` at rank `l`, as for an orthogonal sum of spaces. -/ |
| 36 | lemma spaceChar_mul : (ν * ν').spaceChar (k + l) = ν.spaceChar k * ν'.spaceChar l := by |
| 37 | rw [spaceChar, map_mul, pow_add, mul_mul_mul_comm, spaceChar, spaceChar] |
| 38 | |
| 39 | /-- Adding `l` hyperbolic planes, that is, raising the rank by `2 * l`, keeps the splitting |
| 40 | character if `ν` is multiplied by `upsilonU1 ^ l`. Here `ν.spaceChar k` is the Hecke character |
| 41 | `x ↦ ν (x / x̄) * υ x ^ (-k)` of `E`, where `υ` is the splitting character of the Weil data. |
| 42 | `upsilonU1` is the restriction of `υ` to the norm-one ideles. -/ |
| 43 | lemma spaceChar_add_two_mul : (ν * upsilonU1 ^ l).spaceChar (k + 2 * l) = ν.spaceChar k := by |
| 44 | simp only [spaceChar, map_mul, map_pow, baseChange_upsilonU1] |
| 45 | group |
| 46 | |
| 47 | /-- Let `E` be a CM field with Weil data, whose splitting character is `υ`. For a character `ν` of |
| 48 | `[U(1)]` and a finite type `n`, let `rankTwist ν n = ν · υ^⌊card n / 2⌋` (with `υ` restricted to |
| 49 | norm-one ideles). Its space character at rank `card n`, the Hecke character |
| 50 | `x ↦ (rankTwist ν n)(x / x̄) · υ(x)^(-card n)`, equals `ν.baseChange` if `card n` is even and |
| 51 | `ν.baseChange * υ⁻¹` if `card n` is odd. -/ |
| 52 | theorem spaceChar_rankTwist_eq_ite (ν : AutChar E) (n : Type*) [Fintype n] : |
| 53 | (rankTwist ν n).spaceChar (card n) = |
| 54 | if Even (card n) then ν.baseChange else ν.baseChange * υ⁻¹ := by |
| 55 | -- `rankTwist` adds `card n / 2` hyperbolic planes to a space of rank `card n % 2`. |
| 56 | have h_mod_two : (rankTwist ν n).spaceChar (card n) = ν.spaceChar (card n % 2) := by |
| 57 | rw [rankTwist, ← spaceChar_add_two_mul (ν := ν), Nat.mod_add_div] |
| 58 | split_ifs with hn |
| 59 | · rw [h_mod_two, Nat.even_iff.mp hn, spaceChar, pow_zero, mul_one] |
| 60 | · rw [h_mod_two, Nat.not_even_iff.mp hn, spaceChar, pow_one] |
| 61 | |
| 62 | end AutChar |
| 63 | |
| 64 | end New |
| 65 | |
| 66 | end |