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 | import TauCeti.Topology.Algebra.Group.Units |
| 4 | import TauCeti.Topology.Instances.Matrix |
| 5 | public import Lib.Weil.Periods.Grading |
| 6 | public import Lib.DiscreteSeries.Bessel.Basic |
| 7 | import Lib.DiscreteSeries.Bessel.UnipotentHaarMeasure |
| 8 | import Lib.DiscreteSeries.Bruhat.FloorMeasures |
| 9 | import Lib.DiscreteSeries.FlenstedJensen.PsiKTypes |
| 10 | import Lib.DiscreteSeries.Haar.GramPolar |
| 11 | |
| 12 | /-! |
| 13 | # The group of the Bessel period at a real place |
| 14 | |
| 15 | The group `R = U ⋊ H` at one real place, its Haar measure `du dh`, and the integral over `R` that |
| 16 | defines the Bessel function. |
| 17 | |
| 18 | Here a shape `𝔰` gives the number of hyperbolic planes and the index set `κ` of the middle block, |
| 19 | `𝔰.G₁` is the unitary group of the hermitian space of that shape, `besselU` (the `U` of |
| 20 | `R = U ⋊ H`) is its block upper unitriangular subgroup, `H` is the image of the unitary group |
| 21 | `U(κ)` under `embedH`, and `besselS` is the Bessel subgroup generated by `besselU` and `H`. |
| 22 | |
| 23 | ## Relation to the literature |
| 24 | |
| 25 | Known; see `Lib.DiscreteSeries.Bessel.UnipotentHaarMeasure` for sources. |
| 26 | -/ |
| 27 | |
| 28 | @[expose] public section |
| 29 | |
| 30 | open Matrix MeasureTheory Subgroup |
| 31 | |
| 32 | noncomputable section |
| 33 | |
| 34 | namespace New |
| 35 | |
| 36 | open RealPlace Filling |
| 37 | |
| 38 | variable (𝔰 : Shape) |
| 39 | |
| 40 | /-- For `h` in `U(κ)` and `g` in `G₁`, conjugation by `embedH h`, the image of `h` in `G₁`, |
| 41 | preserves the unipotent group `besselU`: `embedH h * g * (embedH h)⁻¹ ∈ besselU` if and only if |
| 42 | `g ∈ besselU`. -/ |
| 43 | lemma Shape.embedH_conj_mem_besselU_iff (h : U (1 : Matrix 𝔰.κ 𝔰.κ ℂ)) (g : 𝔰.G₁) : |
| 44 | embedH h * g * (embedH h)⁻¹ ∈ besselU ↔ g ∈ besselU := |
| 45 | (mem_normalizer_iff.1 (besselS_le_normalizer_besselU (𝔰.embedH_mem_besselS h)) g).symm |
| 46 | |
| 47 | /-- The group `R = U ⋊ H`, as the subgroup of `G₁ × U(κ)` of pairs `(g, h)` with |
| 48 | `(embedH h)⁻¹ g` in the unipotent group `besselU`. -/ |
| 49 | def Shape.besselGraph : Subgroup (𝔰.G₁ × U (1 : Matrix 𝔰.κ 𝔰.κ ℂ)) := |
| 50 | .ofDiv {s : 𝔰.G₁ × U (1 : Matrix 𝔰.κ 𝔰.κ ℂ) | (embedH s.2)⁻¹ * s.1 ∈ besselU} ⟨1, by simp⟩ |
| 51 | fun s hs t ht ↦ by |
| 52 | -- For `s = h u` and `t = h' u'`, the unipotent part of `s t⁻¹` is `h' u u'⁻¹ h'⁻¹`. |
| 53 | simpa [mul_assoc] using (𝔰.embedH_conj_mem_besselU_iff t.2 _).2 (mul_mem hs (inv_mem ht)) |
| 54 | |
| 55 | /-- A pair `s = (g, h)` lies in `R = besselGraph` if and only if `(embedH h)⁻¹ g` lies in the |
| 56 | unipotent group `besselU`. -/ |
| 57 | lemma Shape.mem_besselGraph {𝔰 : Shape} {s : 𝔰.G₁ × U (1 : Matrix 𝔰.κ 𝔰.κ ℂ)} : |
| 58 | s ∈ 𝔰.besselGraph ↔ (embedH s.2)⁻¹ * s.1 ∈ besselU := Iff.rfl |
| 59 | |
| 60 | /-- A pair `s = (g, h)` lies in `R = besselGraph` if and only if `g (embedH h)⁻¹` lies in the |
| 61 | unipotent group `besselU`: as the image `H` of `U(κ)` under `embedH` normalizes this group, the |
| 62 | factor in `H` may be taken on either side. -/ |
| 63 | lemma Shape.mem_besselGraph_iff_mul_inv_mem {𝔰 : Shape} {s : 𝔰.G₁ × U (1 : Matrix 𝔰.κ 𝔰.κ ℂ)} : |
| 64 | s ∈ 𝔰.besselGraph ↔ s.1 * (embedH s.2)⁻¹ ∈ besselU := by |
| 65 | rw [Shape.mem_besselGraph, ← 𝔰.embedH_conj_mem_besselU_iff s.2, mul_inv_cancel_left] |
| 66 | |
| 67 | /-- The group `R = besselGraph` is a closed subset of `G₁ × U(κ)`. -/ |
| 68 | instance : IsClosed (SetLike.coe 𝔰.besselGraph) := |
| 69 | (isClosed_of_entries_eq_one mem_besselU).preimage (by fun_prop) |
| 70 | |
| 71 | /-- The group `R = besselGraph` is second countable. -/ |
| 72 | instance : SecondCountableTopology 𝔰.besselGraph := |
| 73 | TopologicalSpace.Subtype.secondCountableTopology (SetLike.coe 𝔰.besselGraph) |
| 74 | |
| 75 | /-- The coordinates `(u, h) ↦ (h u, h)` on `R`, with inverse `(g, h) ↦ (h⁻¹ g, h)`. -/ |
| 76 | @[simps!] |
| 77 | def Shape.besselGraphChart : |
| 78 | (𝔰.middleGram (1 : ℂ)).besselU × U (1 : Matrix 𝔰.κ 𝔰.κ ℂ) ≃ₜ 𝔰.besselGraph where |
| 79 | toFun q := ⟨(embedH q.2 * q.1.val, q.2), by simp [Shape.mem_besselGraph]⟩ |
| 80 | invFun s := (⟨(embedH s.val.2)⁻¹ * s.val.1, s.property⟩, s.val.2) |
| 81 | left_inv q := by simp |
| 82 | right_inv s := by simp |
| 83 | |
| 84 | /-- The measure `du dh` on `R`. -/ |
| 85 | def Shape.besselGraphMeasure : Measure 𝔰.besselGraph := |
| 86 | (𝔰.besselHaar.prod volume).map 𝔰.besselGraphChart |
| 87 | |
| 88 | /-- The measure `du dh` on `R` (`besselGraphMeasure`) is positive on nonempty open sets. -/ |
| 89 | instance : 𝔰.besselGraphMeasure.IsOpenPosMeasure := |
| 90 | 𝔰.besselGraphChart.continuous.isOpenPosMeasure_map 𝔰.besselGraphChart.surjective |
| 91 | |
| 92 | /-- The measure `du dh` on `R` is finite on compact sets. -/ |
| 93 | instance Shape.besselGraphMeasure_finiteOnCompacts : |
| 94 | IsFiniteMeasureOnCompacts 𝔰.besselGraphMeasure := |
| 95 | Measure.IsFiniteMeasureOnCompacts.map _ 𝔰.besselGraphChart |
| 96 | |
| 97 | /-- The measure `du dh` on `R` (`besselGraphMeasure`) is s-finite. -/ |
| 98 | instance Shape.besselGraphMeasure_sFinite : SFinite 𝔰.besselGraphMeasure := by |
| 99 | unfold Shape.besselGraphMeasure |
| 100 | infer_instance |
| 101 | |
| 102 | /-- The measure `du dh` on `R` (`besselGraphMeasure`) is invariant under right multiplication. -/ |
| 103 | instance Shape.besselGraphMeasure_isMulRightInvariant : |
| 104 | 𝔰.besselGraphMeasure.IsMulRightInvariant := by |
| 105 | -- Right multiplication by `h' u'` sends `(u, h)` to `(h'⁻¹ u h' u', h h')`, and conjugation by |
| 106 | -- `h'⁻¹` preserves `du`. |
| 107 | refine ⟨𝔰.besselGraphChart.surjective.forall.2 fun (u', h') ↦ ?_⟩ |
| 108 | let conj (u : (𝔰.middleGram (1 : ℂ)).besselU) : (𝔰.middleGram (1 : ℂ)).besselU := |
| 109 | ⟨embedH h'⁻¹ * u * (embedH h'⁻¹)⁻¹, (𝔰.embedH_conj_mem_besselU_iff h'⁻¹ _).2 u.property⟩ |
| 110 | have h_conj : MeasurePreserving conj 𝔰.besselHaar 𝔰.besselHaar := |
| 111 | measurePreserving_conj_bessel mem_besselU besselS_le_normalizer_besselU |
| 112 | (𝔰.embedH_mem_besselS h'⁻¹) |
| 113 | have h_semiconj : Function.Semiconj 𝔰.besselGraphChart (Prod.map (conj · * u') (· * h')) |
| 114 | (· * 𝔰.besselGraphChart (u', h')) := |
| 115 | fun q ↦ Subtype.ext (by simp [conj, mul_assoc]) |
| 116 | exact ((𝔰.besselGraphChart.measurable.measurePreserving _).of_semiconj |
| 117 | ((h_conj.mul_right _ u').prod (measurePreserving_mul_right volume h')) h_semiconj |
| 118 | (by fun_prop)).map_eq |
| 119 | |
| 120 | /-- The measure `du dh` on `R` (`besselGraphMeasure`) is invariant under left multiplication. -/ |
| 121 | instance Shape.besselGraphMeasure_isMulLeftInvariant : |
| 122 | 𝔰.besselGraphMeasure.IsMulLeftInvariant := by |
| 123 | -- Left multiplication by `h' u'` sends `(u, h)` to `(c h * u, h' h)` with `c h = h⁻¹ u' h`: over |
| 124 | -- each `h` this is a left translation of `U`. |
| 125 | refine ⟨𝔰.besselGraphChart.surjective.forall.2 fun (u', h') ↦ ?_⟩ |
| 126 | let c (k : U (1 : Matrix 𝔰.κ 𝔰.κ ℂ)) : (𝔰.middleGram (1 : ℂ)).besselU := |
| 127 | ⟨embedH k⁻¹ * u' * (embedH k⁻¹)⁻¹, (𝔰.embedH_conj_mem_besselU_iff k⁻¹ _).2 u'.property⟩ |
| 128 | have h_skew : MeasurePreserving (fun q ↦ (h' * q.1, c q.1 * q.2)) |
| 129 | (volume.prod 𝔰.besselHaar) (volume.prod 𝔰.besselHaar) := |
| 130 | (measurePreserving_mul_left volume h').skew_product (by fun_prop) |
| 131 | (.of_forall fun k ↦ map_mul_left_eq_self _ (c k)) |
| 132 | have h_semiconj : Function.Semiconj 𝔰.besselGraphChart (fun q ↦ (c q.2 * q.1, h' * q.2)) |
| 133 | (𝔰.besselGraphChart (u', h') * ·) := |
| 134 | fun q ↦ Subtype.ext (by simp [c, mul_assoc]) |
| 135 | exact ((𝔰.besselGraphChart.measurable.measurePreserving _).of_semiconj |
| 136 | (Measure.measurePreserving_swap.comp (h_skew.comp Measure.measurePreserving_swap)) h_semiconj |
| 137 | (by fun_prop)).map_eq |
| 138 | |
| 139 | /-- The measure `du dh` on `R` (`besselGraphMeasure`) is a Haar measure. -/ |
| 140 | instance : 𝔰.besselGraphMeasure.IsHaarMeasure where |
| 141 | |
| 142 | namespace DiscreteSeries |
| 143 | |
| 144 | variable {𝔰} |
| 145 | |
| 146 | /-- For `s = (g, h)` in `R = besselGraph`, the element `g` lies in the Bessel subgroup |
| 147 | `besselS`. -/ |
| 148 | @[simp] |
| 149 | lemma besselGraph_fst_mem_besselS (s : 𝔰.besselGraph) : |
| 150 | (s : 𝔰.G₁ × U (1 : Matrix 𝔰.κ 𝔰.κ ℂ)).1 ∈ besselS := by |
| 151 | obtain ⟨⟨g, h⟩, h_mem⟩ := s |
| 152 | have h_unipotent : g * (embedH h)⁻¹ ∈ besselU := |
| 153 | -- `(… :)`: matching this against `∈ besselU` would unfold `Finset.sum` |
| 154 | (Shape.mem_besselGraph_iff_mul_inv_mem.1 h_mem :) |
| 155 | exact mem_besselS.2 ⟨g * (embedH h)⁻¹, h_unipotent, embedH h, toBesselH_mem h, by simp⟩ |
| 156 | |
| 157 | variable {ε : 𝔰.BesselIndex → ℤˣ} [SignFrame 𝔰.J₁ ε] {I : Type*} [Fintype I] [DecidableEq I] |
| 158 | (l : HCParam ε) (rep : U (1 : Matrix 𝔰.κ 𝔰.κ ℂ) →* unitaryGroup I ℂ) (x : 𝔰.G₁) |
| 159 | (v : EuclideanSpace ℂ I) |
| 160 | |
| 161 | /-- For a Harish-Chandra parameter `l`, with `c_λ = l.dsCoeffInFrame` its discrete-series |
| 162 | coefficient read in the frame of `SignFrame`, a unitary representation `rep` of `U(κ)` and a vector |
| 163 | `v`, the integrand `c_λ(x⁻¹ s y) π(s)⁻¹ v` at `s` in `R`. For `s = (g, h)` the operator `π(s)⁻¹` is |
| 164 | the scalar `wave (-simpleRootSum g)` times `rep h⁻¹` (through `besselValueRep`), where |
| 165 | `wave c = exp (c - conj c)` and `simpleRootSum` is the sum of the superdiagonal frame entries. -/ |
| 166 | def besselIntegrand (y : 𝔰.G₁) (s : 𝔰.besselGraph) : EuclideanSpace ℂ I := |
| 167 | l.dsCoeffInFrame (x⁻¹ * (s.val.1 * y)) • wave (-simpleRootSum s.val.1) • |
| 168 | (besselValueRep rep s.val.2⁻¹).val v |
| 169 | |
| 170 | /-- The integral `∫_R c_λ(x⁻¹ s y) π(s)⁻¹ v ds` over `R` with the measure `du dh`, which defines |
| 171 | the Bessel function. -/ |
| 172 | def besselAverage (y : 𝔰.G₁) : EuclideanSpace ℂ I := |
| 173 | ∫ s : 𝔰.besselGraph, besselIntegrand l rep x v y s ∂𝔰.besselGraphMeasure |
| 174 | |
| 175 | end DiscreteSeries |
| 176 | |
| 177 | end New |
| 178 | |
| 179 | end |