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.Adelic.TraceFormula.TestFunction |
| 4 | public import Lib.Shimura.HeckeTower.HeckeData |
| 5 | public import Lib.Weil.Unramified.SplitHecke |
| 6 | |
| 7 | /-! |
| 8 | # Test functions with a deeper level at an auxiliary place |
| 9 | |
| 10 | Let `v` be a split place at which the level `K` is maximal, and let `K'` be the part of `K` whose |
| 11 | component at `v` lies in a subgroup `J` of `GL_n(E_v)`. For a group algebra element `a` that is |
| 12 | integral at `v`, removing the components at `v` and its conjugate gives an element whose function |
| 13 | of level `K'` is the function of `a` of level `K`, cut off to the points with component at `v` in |
| 14 | `J`. So it is cuspidal at a place `w` other than `v` and its conjugate if the function of `a` is. |
| 15 | The function of a product with a factor at `v` in a set `S` is supported at `v` in `S J`. |
| 16 | |
| 17 | Notions from other files: |
| 18 | |
| 19 | * `Gf E n` is the finite adelic unitary group, and `g.atPlace v` is the component of `g` at `v`. |
| 20 | * For a split place `v` (one that differs from its conjugate), `ofSplitPlace hv k` is the element |
| 21 | with component `k` at `v`, the inverse conjugate transpose of `k` at the conjugate of `v`, and `1` |
| 22 | at all other places. |
| 23 | * `spanOn ℂ S` is the space of the group algebra elements that are combinations of the elements |
| 24 | of the set `S`. |
| 25 | * `convIndicator` sends a group algebra element `a` to the test function `a ⋆ 1_K` of level `K`. |
| 26 | * `maxCompactAt n v` is the group of integral elements supported at `v` and its conjugate, and |
| 27 | `localIntGL n v` is `GL_n(O_v)`. |
| 28 | |
| 29 | ## Relation to the literature |
| 30 | |
| 31 | Known result: Test functions with a deeper level at an auxiliary split place, by removing the |
| 32 | components there. It serves `Lib.Adelic.TraceFormula.CuspidalComparison`. |
| 33 | -/ |
| 34 | |
| 35 | @[expose] public section |
| 36 | |
| 37 | open NumberField MonoidAlgebra |
| 38 | |
| 39 | namespace New |
| 40 | |
| 41 | open Variety |
| 42 | |
| 43 | variable {E n : Type} [Field E] [NumberField E] [IsCMField E] [Fintype n] [DecidableEq n] |
| 44 | {v w : FinPlace E} |
| 45 | |
| 46 | /-- If `K` contains the maximal compact subgroup at the split place `w`, it contains the image of |
| 47 | `GL_n(𝒪_w)` under `ofSplitPlace`. -/ |
| 48 | lemma ofSplitPlace_mem_of_maxCompactAt_le (hw : w.IsSplit) {K : Subgroup (Gf E n)} |
| 49 | (hK : maxCompactAt n w ≤ K) {x : GL n (LocField w)} (hx : x ∈ localIntGL n w) : |
| 50 | ofSplitPlace hw x ∈ K := |
| 51 | hK ((map_localIntGL_ofSplitPlace hw).le ⟨x, hx, rfl⟩) |
| 52 | |
| 53 | /-- The homomorphism that removes from an element its components at the split place `v` and at |
| 54 | the conjugate of `v`. -/ |
| 55 | noncomputable def offPlace (hv : v.IsSplit) : Gf E n →* Gf E n := |
| 56 | MonoidHom.mk' (fun g ↦ g * (ofSplitPlace hv (g.atPlace v))⁻¹) fun g h ↦ by |
| 57 | have h_comm : Commute (ofSplitPlace hv (g.atPlace v)) (h * (ofSplitPlace hv (h.atPlace v))⁻¹) := |
| 58 | Gf.commute_supportedOn_trivialOn (ofSplitPlace_mem_supportedOn hv _) (by simp) |
| 59 | simp only [map_mul, mul_inv_rev, mul_assoc, h_comm.inv_left.eq] |
| 60 | |
| 61 | /-- Removing the components of `g` at `v` and its conjugate is dividing `g` by the element |
| 62 | `ofSplitPlace hv (g.atPlace v)`, which has these components and is `1` at all other places. -/ |
| 63 | lemma offPlace_apply (hv : v.IsSplit) (g : Gf E n) : |
| 64 | offPlace hv g = g * (ofSplitPlace hv (g.atPlace v))⁻¹ := rfl |
| 65 | |
| 66 | @[simp] lemma atPlace_offPlace (hv : v.IsSplit) (g : Gf E n) : (offPlace hv g).atPlace v = 1 := by |
| 67 | simp [offPlace_apply] |
| 68 | |
| 69 | variable {K : Subgroup (Gf E n)} {J : Subgroup (GL n (LocField v))} |
| 70 | |
| 71 | open scoped Classical in |
| 72 | /-- Let `v` be a split place, let `K` be a compact open subgroup of the adelic unitary group |
| 73 | `Gf E n` that contains the maximal compact group at `v`, let `J` be a subgroup of `GL_n(E_v)` |
| 74 | such that `K ⊓ J.comap (Gf.atPlace v)` is compact open, and let `a` be a combination (`spanOn`) |
| 75 | of elements with component at `v` in `localIntGL n v = GL_n(O_v)`. Removing (`offPlace`) |
| 76 | the components of `a` at `v` and its conjugate and deepening the level to |
| 77 | `K ⊓ J.comap (Gf.atPlace v)` gives the function of `a` of level `K`, cut off outside the points |
| 78 | with component at `v` in `J`. Here `convIndicator` sends a group algebra element to its |
| 79 | convolution with the characteristic function of the level. -/ |
| 80 | lemma convIndicator_mapDomain_offPlace {hK_open : IsOpen (K : Set (Gf E n))} |
| 81 | {hK_compact : IsCompact (K : Set (Gf E n))} |
| 82 | {hK'_open : IsOpen (↑(K ⊓ J.comap (Gf.atPlace v)) : Set (Gf E n))} |
| 83 | {hK'_compact : IsCompact (↑(K ⊓ J.comap (Gf.atPlace v)) : Set (Gf E n))} |
| 84 | (hv : v.IsSplit) (hK_max : maxCompactAt n v ≤ K) {a : ℂ[Gf E n]} |
| 85 | (ha : a ∈ spanOn ℂ {x : Gf E n | x.atPlace v ∈ localIntGL n v}) (g : Gf E n) : |
| 86 | (convIndicator hK'_open hK'_compact (mapDomain (offPlace hv) a)).val g = |
| 87 | if g.atPlace v ∈ J then (convIndicator hK_open hK_compact a).val g else 0 := by |
| 88 | -- By linearity we may take `a` to be a single element `x` that is integral at `v`. Its part at |
| 89 | -- `v` then lies in `K`, so removing that part changes only the condition at `v`. |
| 90 | induction ha using Submodule.span_induction with |
| 91 | | mem a ha => |
| 92 | obtain ⟨x, hx, rfl⟩ : ∃ x : Gf E n, x.atPlace v ∈ localIntGL n v ∧ of ℂ (Gf E n) x = a := ha |
| 93 | have h_mem : ofSplitPlace hv (x.atPlace v) ∈ K := |
| 94 | ofSplitPlace_mem_of_maxCompactAt_le hv hK_max hx |
| 95 | have h_coset : (offPlace hv x)⁻¹ * g ∈ K ⊓ J.comap (Gf.atPlace v) ↔ |
| 96 | g.atPlace v ∈ J ∧ x⁻¹ * g ∈ K := by |
| 97 | simp [offPlace_apply, mul_assoc, K.mul_mem_cancel_left h_mem, and_comm] |
| 98 | simp [convIndicator_single, h_coset, ← ite_and] |
| 99 | | zero => simp |
| 100 | | add a b _ _ ha hb => simp [mapDomain_add, ha, hb, ite_add_zero] |
| 101 | | smul c a _ ha => simp [mapDomain_smul, ha] |
| 102 | |
| 103 | /-- Let `v` be a split place, let `K` be a compact open subgroup of the adelic unitary group |
| 104 | `Gf E n` that contains the maximal compact group at `v`, let `J` be a subgroup of `GL_n(E_v)`, |
| 105 | let `a` be a combination (`spanOn`) of elements that are integral at `v` (component in |
| 106 | `localIntGL n v`), and let `w` be a split place other than `v` and its conjugate. If the function |
| 107 | `a ⋆ 1_K` (`convIndicator`) is cuspidal at `w` (its sums of translates over the cosets of each |
| 108 | unipotent radical at `w` vanish), then so is the function of level `K ⊓ J.comap (Gf.atPlace v)` |
| 109 | of `a` with the components at `v` and its conjugate removed (`offPlace`). -/ |
| 110 | lemma IsCuspidalAt.convIndicator_offPlace {hK_open : IsOpen (K : Set (Gf E n))} |
| 111 | {hK_compact : IsCompact (K : Set (Gf E n))} |
| 112 | {hK'_open : IsOpen (↑(K ⊓ J.comap (Gf.atPlace v)) : Set (Gf E n))} |
| 113 | {hK'_compact : IsCompact (↑(K ⊓ J.comap (Gf.atPlace v)) : Set (Gf E n))} |
| 114 | {hw : w.IsSplit} (hv : v.IsSplit) (h_ne : v ≠ w) (h_star_ne : star v ≠ w) |
| 115 | (hK_max : maxCompactAt n v ≤ K) {a : ℂ[Gf E n]} |
| 116 | (ha : a ∈ spanOn ℂ {x : Gf E n | x.atPlace v ∈ localIntGL n v}) |
| 117 | (h_cusp : IsCuspidalAt hw (convIndicator hK_open hK_compact a)) : |
| 118 | IsCuspidalAt hw (convIndicator hK'_open hK'_compact (mapDomain (offPlace hv) a)) := by |
| 119 | classical |
| 120 | intro T hT_empty hT_univ t lift h_lift g |
| 121 | -- A translation at `w` does not change the component at `v`. |
| 122 | have h_place (k : GL n (LocField w)) : (g * ofSplitPlace hw k).atPlace v = g.atPlace v := by |
| 123 | rw [map_mul, atPlace_ofSplitPlace_of_ne hw k h_ne h_star_ne, mul_one] |
| 124 | simp only [convIndicator_mapDomain_offPlace (hK_open := hK_open) (hK_compact := hK_compact) |
| 125 | hv hK_max ha, h_place] |
| 126 | split_ifs |
| 127 | exacts [h_cusp T hT_empty hT_univ t lift h_lift g, finsum_zero] |
| 128 | |
| 129 | /-- Let `u` be a combination (`spanOn`) of elements of a set `S` of `GL_n(E_v)`, let `J` be a |
| 130 | subgroup of `GL_n(E_v)`, and let `b` be any element of the group algebra of the adelic unitary |
| 131 | group `Gf E n`. Form the product of `u`, placed at `v` by `ofSplitPlace`, with `b` after removing |
| 132 | (`offPlace`) its components at `v` and its conjugate, and take the function (`convIndicator`) of |
| 133 | level `K ⊓ J.comap (Gf.atPlace v)` of this product. Where it is not zero, the component at `v` |
| 134 | lies in `S J`. -/ |
| 135 | lemma exists_atPlace_eq_of_convIndicator_ne_zero |
| 136 | {hK'_open : IsOpen (↑(K ⊓ J.comap (Gf.atPlace v)) : Set (Gf E n))} |
| 137 | {hK'_compact : IsCompact (↑(K ⊓ J.comap (Gf.atPlace v)) : Set (Gf E n))} |
| 138 | (hv : v.IsSplit) {S : Set (GL n (LocField v))} |
| 139 | {u : ℂ[GL n (LocField v)]} (hu : u ∈ spanOn ℂ S) (b : ℂ[Gf E n]) {g : Gf E n} |
| 140 | (hg : (convIndicator hK'_open hK'_compact |
| 141 | (mapDomain (ofSplitPlace hv) u * mapDomain (offPlace hv) b)).val g ≠ 0) : |
| 142 | ∃ x ∈ S, ∃ k ∈ J, g.atPlace v = x * k := by |
| 143 | contrapose! hg |
| 144 | induction hu using Submodule.span_induction with |
| 145 | | mem u hu => |
| 146 | obtain ⟨x, hx, rfl⟩ := hu |
| 147 | have h_notMem : x⁻¹ * g.atPlace v ∉ J := fun h_mem ↦ |
| 148 | hg x hx _ h_mem (mul_inv_cancel_left x _).symm |
| 149 | simp only [of_apply, mapDomain_single, convIndicator_single_mul, one_mul] |
| 150 | refine convIndicator_mapDomain_eq_zero hK'_open hK'_compact b fun y _ h_mem ↦ ?_ |
| 151 | exact h_notMem (by simpa using h_mem.2) |
| 152 | | zero => simp |
| 153 | | add u u' _ _ hu hu' => simp [mapDomain_add, add_mul, hu, hu'] |
| 154 | | smul c u _ hu => simp [mapDomain_smul, hu] |
| 155 | |
| 156 | end New |