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 Mathlib.Dynamics.Ergodic.Action.Regular |
| 4 | import Mathlib.Topology.Algebra.ProperConstSMul |
| 5 | import TauCeti.Topology.Algebra.Group.Units |
| 6 | import TauCeti.Topology.Instances.Matrix |
| 7 | public import Lib.Adelic.Reduction.FiniteVolume |
| 8 | public import Lib.Adelic.Reduction.FirstMinimumShortBases |
| 9 | public import Lib.Adelic.Hecke.ClassSums |
| 10 | import Lib.Adelic.Adeles.StrongApproximation |
| 11 | import Lib.Adelic.Unitary.WeakApproximation |
| 12 | import Lib.DiscreteSeries.Haar.GramPolar |
| 13 | import Lib.DiscreteSeries.Haar.TotalMass |
| 14 | import Lib.General.Measure.IdempotentKernel |
| 15 | |
| 16 | /-! |
| 17 | # Mahler's criterion for hermitian spaces and class sums for definite spaces |
| 18 | |
| 19 | For a hermitian space `V : New.Space E n s`, the rational unitary group embeds in the adelic unitary |
| 20 | group `New.G E s` with image `V.Γ`, and in its finite part with image `V.Γf`. Mahler's criterion |
| 21 | follows from short bases, whose Gram matrices take finitely many values. It gives compactness modulo |
| 22 | the rational points when all signs agree. For the signs `1`, it also gives finiteness of classes. |
| 23 | For such a space, the integral over `Γ \ G` of a suitable invariant function is then a class |
| 24 | sum. Here `K₀` is `New.stdLevel`, and `New.classSum` sums over the double cosets `Γf \ G_f / K` with |
| 25 | weights `1 / #(Γf ∩ g K g⁻¹)`. |
| 26 | |
| 27 | ## Main definitions and results |
| 28 | |
| 29 | * `New.Space.mahler_criterion`: Mahler's criterion; the `g` of bounded height lie in `V.Γ * C` for |
| 30 | one compact set `C`. |
| 31 | * `New.Space.isCocompact_of_definite`: if all signs agree, the adelic group is compact modulo |
| 32 | `V.Γ`. `New.Space.isCocompact_Gamma` is the case of the signs `1`. |
| 33 | * `New.Space.isCocompact_finitePart`: for the signs `1`, the finite part of the group is |
| 34 | compact modulo `V.Γf`. |
| 35 | * `New.Space.hasFiniteType_of_isLevel`: for the signs `1`, finitely many classes with finite |
| 36 | stabilisers. |
| 37 | * `New.Space.integral_quotMeasure_eq_classSum`: take a space with signs `1` and a continuous, left |
| 38 | `Γ`-invariant function on `G`. Suppose that its average over the infinite places is fixed under |
| 39 | right translation by an open `K ≤ K₀`. Then its integral over `Γ \ G` is `[K₀ : K]⁻¹` times the |
| 40 | class sum of this average. `New.Space.classIntegral_eq_integral` is the case of functions of the |
| 41 | finite part. |
| 42 | |
| 43 | Notions from other files: |
| 44 | * `New.Space`: a hermitian space with a point, given by a matrix J over E and x in GL_n(𝔸) with xᴴJx |
| 45 | equal to diag(s), with s the signs, at the infinite places and 1 at the finite places. |
| 46 | * `New.Space.move`: the space `V.move g` is the space with the same J and the point x g; its lattice |
| 47 | `baseLattice` is the lattice at `g`, and the norm of `archCoords u` is the length of u at `g`. |
| 48 | * `New.Space.height`: the height ht(g) = 1/λ, with λ the first minimum cut off at 1 |
| 49 | (`New.Space.firstMinimum`) of the moved space `V.move g`. |
| 50 | * `New.IsLevel`: an open subgroup of `K₀`, with index `New.stdLevelIndex` in `K₀`. |
| 51 | |
| 52 | ## Relation to the literature |
| 53 | |
| 54 | Known; see `Lib.Adelic.Reduction.FiniteVolume` and `Lib.Adelic.QuotientMeasure.Basic` for sources. |
| 55 | -/ |
| 56 | |
| 57 | @[expose] public section |
| 58 | |
| 59 | /-! |
| 60 | ## Mahler compactness, and finiteness of classes in the definite case |
| 61 | |
| 62 | `V` is a matrix `J` over `E` with an adelic point `x`. `New.G E s` is the unitary group of the |
| 63 | standard form. `V.ratEmbed γ = x⁻¹ γ x` embeds `U(J)(E)` in it with image `V.Γ` (finite parts: |
| 64 | `V.Γf`), and `V.toRatCoords g = x g x⁻¹`. |
| 65 | -/ |
| 66 | |
| 67 | section MahlerSpace |
| 68 | |
| 69 | open Matrix NumberField QuotientGroup PiLp ConjAct |
| 70 | open scoped Pointwise |
| 71 | |
| 72 | namespace New.Space |
| 73 | |
| 74 | variable {E : Type*} [Field E] [CMType E] |
| 75 | {n : Type*} [Fintype n] [DecidableEq n] {s : n → ℤˣ} (V : Space E n s) |
| 76 | |
| 77 | /-- For a hermitian space `V` with a point, there is a constant `c` such that for every `g` in |
| 78 | `G E s` some basis of `Eⁿ`, the columns of `Y`, lies in `(V.move g).latticeBall (c * V.height g)`. |
| 79 | That is, each column is a vector of the base lattice of the moved space `V.move g` (the same form |
| 80 | with the point `V.x * g`) whose length `‖archCoords y‖` in that space is at most `c * V.height g`. |
| 81 | Here `V.height g = 1 / λ`, where `λ` is the first minimum of `V.move g` cut off at `1`. -/ |
| 82 | lemma exists_short_basis_matrix : |
| 83 | ∃ c : ℕ, ∀ g : G E s, ∃ Y : GL n E, ∀ j : n, |
| 84 | Y.val.col j ∈ (V.move g).latticeBall (c * V.height g) := |
| 85 | ⟨shortBasisConst E n (Ideal.absNorm (differentIdeal ℤ (𝓞 E))), |
| 86 | fun g ↦ (V.move g).exists_short_basis (Ideal.absNorm_mem (differentIdeal ℤ (𝓞 E)))⟩ |
| 87 | |
| 88 | /-- Points with a bounded rational frame from `H` are compact modulo the rational isometries in `H`: |
| 89 | for a compact set `C` of adelic matrices and a subgroup `H` of `GL n E` there is a compact |
| 90 | `K ⊆ G E s` such that, whenever `x g⁻¹ x⁻¹ r ∈ C` for some `r ∈ H` (`x` the point of `V`, |
| 91 | `V.toRatCoords g = x g x⁻¹`, `toAdele` embeds `E` in its adeles), some element `γ` of the group |
| 92 | `U V.J` of rational isometries lies in `H` and has `V.ratEmbed γ * g ∈ K`. -/ |
| 93 | lemma exists_isCompact_of_bounded_frame {C : Set (Matrix n n (𝔸 E))} (hC : IsCompact C) |
| 94 | (H : Subgroup (GL n E)) : |
| 95 | ∃ K : Set (G E s), IsCompact K ∧ |
| 96 | ∀ (g : G E s) (r : H), |
| 97 | (V.toRatCoords g⁻¹ : GL n (𝔸 E)).val * (r : GL n E).val.map toAdele ∈ C → |
| 98 | ∃ γ : U V.J, V.ratEmbed γ * g ∈ K ∧ γ.val ∈ H := by |
| 99 | -- The Gram matrix `gram r` takes finitely many values on the `r` with `x g⁻¹ x⁻¹ r ∈ C`. For |
| 100 | -- each value `T` fix one `rep T ∈ H`; then `γ = rep (gram r) r⁻¹` is a rational isometry and |
| 101 | -- `(γ g)⁻¹` lies in `x⁻¹ C (rep T)⁻¹ x`. |
| 102 | let gram (r : H) : Matrix n n E := r.val.valᴴ * V.J * r.val |
| 103 | let rep : Matrix n n E → H := gram.invFun |
| 104 | let gramValues : Set (Matrix n n E) := |
| 105 | {T | T.map toAdele ∈ (fun c ↦ cᴴ * V.J.map toAdele * c) '' C} |
| 106 | -- a compact set of adelic matrices contains finitely many rational ones |
| 107 | have h_finite : gramValues.Finite := |
| 108 | finite_setOf_map_toAdele_mem (hC.image_of_continuous fun c ↦ cᴴ * V.J.map toAdele * c) |
| 109 | let rightFactor (T : Matrix n n E) : Matrix n n (𝔸 E) := |
| 110 | ((rep T : GL n E).val.map toAdele)⁻¹ * V.x.val |
| 111 | refine ⟨(G.adeleMatrix ⁻¹' ((V.x⁻¹.val • C) * rightFactor '' gramValues))⁻¹, |
| 112 | (G.isClosedEmbedding_adeleMatrix.isCompact_preimage |
| 113 | ((hC.smul V.x⁻¹.val).mul (h_finite.image rightFactor).isCompact)).inv, fun g r hr ↦ ?_⟩ |
| 114 | let c : Matrix n n (𝔸 E) := (V.toRatCoords g⁻¹ : GL n (𝔸 E)).val * r.val.val.map toAdele |
| 115 | -- `x g⁻¹ x⁻¹` is an isometry of the adelic form, so `c` and `r` have one Gram matrix |
| 116 | have h_gram_map : cᴴ * V.J.map toAdele * c = (gram r).map toAdele := by |
| 117 | unfold c |
| 118 | rw [U.gram_invariant] |
| 119 | simp [gram] |
| 120 | let γ : U V.J := ⟨(rep (gram r)).val * r.val⁻¹, mem_unitaryGroupOf_iff.2 <| |
| 121 | gram_mul_of_gram_eq (gram.invFun_eq ⟨r, rfl⟩) (gram_inv_of_gram_eq rfl)⟩ |
| 122 | refine ⟨γ, ?_, (rep (gram r) * r⁻¹).prop⟩ |
| 123 | have h_mat : (V.x⁻¹.val • c) * rightFactor (gram r) = (V.ratEmbed γ * g)⁻¹.adeleMatrix := by |
| 124 | simp [c, γ, rep, rightFactor, ratEmbed, toRatCoords, G.adeleMatrix, mul_assoc, U.map] |
| 125 | change (V.ratEmbed γ * g)⁻¹.adeleMatrix ∈ (V.x⁻¹.val • C) * rightFactor '' gramValues |
| 126 | rw [← h_mat] |
| 127 | exact Set.mul_mem_mul (Set.smul_mem_smul_set hr) (Set.mem_image_of_mem _ ⟨c, hr, h_gram_map⟩) |
| 128 | |
| 129 | /-- One half of the Mahler–Godement compactness criterion, for the unitary group of a hermitian |
| 130 | space: for each real `R` there is a compact subset `C` of the adelic unitary group `G E s` such that |
| 131 | every `g` with `V.height g ≤ R` has `γ * g ∈ C` for some `γ` in the group `V.Γ` of rational points |
| 132 | (the elements `x⁻¹γx`, with `x` the point of `V` and `γ` in the rational unitary group of `V.J`). |
| 133 | Here `V.height g = 1/λ`, where `λ` is the first minimum of the moved space `V.move g` cut off at `1` |
| 134 | (`firstMinimum`). -/ |
| 135 | lemma mahler_criterion (R : ℝ) : |
| 136 | ∃ C : Set (G E s), IsCompact C ∧ ∀ g : G E s, V.height g ≤ R → ∃ γ ∈ V.Γ, γ * g ∈ C := by |
| 137 | -- At a point `g` of height at most `R` the lattice holds a basis `Y` of length at most `c * R`. |
| 138 | -- So `(x g)⁻¹ Y`, with `x` the point of `V`, lies in a compact box, and `Y` is a bounded rational |
| 139 | -- frame in the sense of `exists_isCompact_of_bounded_frame`. |
| 140 | obtain ⟨c, h_short⟩ := V.exists_short_basis_matrix |
| 141 | let box : Set (Matrix n n (𝔸 E)) := Set.matrix (Metric.closedBall 0 (c * R) ×ˢ Ô E) |
| 142 | obtain ⟨K, hK, h_frame⟩ := V.exists_isCompact_of_bounded_frame |
| 143 | ((Core.isCompact_closedBall_prod_integral (c * R)).matrix.smul V.x) ⊤ |
| 144 | refine ⟨K, hK, fun g hg ↦ ?_⟩ |
| 145 | obtain ⟨Y, hY⟩ := h_short g |
| 146 | have h_box : (V.move g).x⁻¹.val * Y.val.map toAdele ∈ box := fun i j ↦ by |
| 147 | -- the finite part is integral as the column lies in the lattice; `w` is an infinite place |
| 148 | refine ⟨?_, (hY j).1 i⟩ |
| 149 | rw [mem_closedBall_zero_iff, pi_norm_le_iff_of_nonempty] |
| 150 | exact fun w ↦ (norm_apply_le ((V.move g).archCoords (Y.val.col j)) (w, i)).trans |
| 151 | (by grw [(hY j).2, hg]) |
| 152 | have h_frame_eq : V.x • ((V.move g).x⁻¹.val * Y.val.map toAdele) = |
| 153 | (V.toRatCoords g⁻¹).val.val * Y.val.map toAdele := by |
| 154 | simp [move, toRatCoords, mul_assoc, Units.smul_def] |
| 155 | obtain ⟨γ, hγ, -⟩ := h_frame g ⟨Y, Subgroup.mem_top Y⟩ ⟨_, h_box, h_frame_eq⟩ |
| 156 | exact ⟨V.ratEmbed γ, ⟨γ, rfl⟩, hγ⟩ |
| 157 | |
| 158 | /-- If all signs `s i` are equal (the space is definite), then the adelic unitary group `G E s` is |
| 159 | compact modulo the group `V.Γ` of rational points: there is a compact `C` such that every `g` has |
| 160 | `γ * g ∈ C` for some `γ ∈ V.Γ`. The hypothesis `h_definite` may be omitted when `simp` proves it, |
| 161 | as for constant `s`. |
| 162 | |
| 163 | A special case of the compactness theorem for anisotropic groups (Borel–Harish-Chandra, |
| 164 | Mostow–Tamagawa), part of the reduction theory. -/ |
| 165 | lemma isCocompact_of_definite (h_definite : ∀ i j : n, s i = s j := by simp) : |
| 166 | V.Γ.IsCocompact := by |
| 167 | obtain ⟨C, hC, h_cover⟩ := V.mahler_criterion 1 |
| 168 | -- In a definite space all heights are `1`. |
| 169 | exact ⟨C, hC, fun g ↦ h_cover g (V.height_eq_one_of_definite h_definite g).le⟩ |
| 170 | |
| 171 | /-- If all the signs of `V` are `1`, then `G E 1` is compact modulo the group `V.Γ` of rational |
| 172 | points: some compact set meets every coset `V.Γ g`. -/ |
| 173 | lemma isCocompact_Gamma (V : Space E n 1) : V.Γ.IsCocompact := |
| 174 | V.isCocompact_of_definite fun _ _ ↦ rfl |
| 175 | |
| 176 | variable (V : Space E n 1) |
| 177 | |
| 178 | /-- For a space with all signs `1`, the subgroup `V.Γf` of finite parts of the rational points is |
| 179 | cocompact in the finite adelic unitary group: some compact set meets every coset `V.Γf g`. -/ |
| 180 | lemma isCocompact_finitePart : V.Γf.IsCocompact := by |
| 181 | -- Project the compact set of `isCocompact_Gamma` to the finite places. |
| 182 | obtain ⟨C, hC, h_cover⟩ := V.isCocompact_Gamma |
| 183 | refine ⟨Prod.snd '' C, hC.image continuous_snd, fun g ↦ ?_⟩ |
| 184 | obtain ⟨-, ⟨(γ : U V.J), rfl⟩, hγ⟩ := h_cover (1, g) |
| 185 | exact ⟨V.embFin γ, ⟨γ, rfl⟩, V.ratEmbed γ * (1, g), hγ, rfl⟩ |
| 186 | |
| 187 | /-- For a space with all signs `1` and a level `K` (an open subgroup of `stdLevel E n`), the pair |
| 188 | `(Γf, K)` has finite type (`HasFiniteType`): there are finitely many double cosets `Γf \ Gf / K`, |
| 189 | the stabilisers `Γf ∩ g K g⁻¹` are finite, and `K` is open and compact. |
| 190 | |
| 191 | A special case of Borel's finiteness of class numbers. Only forms with an adelic orthonormal frame |
| 192 | are covered, at open subgroups of the standard level. -/ |
| 193 | instance hasFiniteType_of_isLevel {K : Subgroup (Gf E n)} [hK : IsLevel K] : |
| 194 | HasFiniteType V.Γf K := by |
| 195 | refine ⟨?_, fun g ↦ ?_, hK.isOpen, hK.isCompact⟩ |
| 196 | · -- A compact set `C` with `Γf C = Gf` meets finitely many cosets of the open group `K`. |
| 197 | obtain ⟨C, hC, hcover⟩ := V.isCocompact_finitePart |
| 198 | refine (finite_quotient_image_of_isCompact hK.isOpen hC).of_surjective |
| 199 | (fun c ↦ ⟦c.val.out⟧) (Quot.ind fun g ↦ ?_) |
| 200 | -- the class of `g` comes from the coset of `γ * g ∈ C` |
| 201 | obtain ⟨γ, hγ, (hγg : γ * g ∈ C)⟩ := hcover g |
| 202 | obtain ⟨k, hk⟩ := mk_out_eq_mul K (γ * g) |
| 203 | have h_class : DoubleCoset.mk V.Γf K g = DoubleCoset.mk V.Γf K (⟦γ * g⟧ : Gf E n ⧸ K).out := |
| 204 | (DoubleCoset.eq ..).mpr ⟨γ, hγ, k, k.prop, hk⟩ |
| 205 | exact ⟨⟨γ * g, γ * g, hγg, rfl⟩, h_class.symm⟩ |
| 206 | · -- The discrete closed group `Γf` meets the compact set `g K g⁻¹` in a finite set. |
| 207 | exact ((hK.isCompact.preimage_smul (toConjAct g⁻¹)).inter_left |
| 208 | V.Γf.isClosed_of_discreteTopology).finite (IsDiscrete.mono ⟨mod_cast inferInstance⟩ |
| 209 | inf_le_left) |
| 210 | |
| 211 | end New.Space |
| 212 | |
| 213 | end MahlerSpace |
| 214 | |
| 215 | /-! |
| 216 | ## Unimodularity and the integral over [G] as a class sum |
| 217 | |
| 218 | The Haar measures of `New.Gf` (finite points) and `New.G` (all adelic points) are right invariant. |
| 219 | -/ |
| 220 | |
| 221 | namespace New |
| 222 | |
| 223 | open MeasureTheory Measure Set DoubleCoset Subgroup HasFiniteType |
| 224 | |
| 225 | section StandardClasses |
| 226 | |
| 227 | variable {E n : Type} [Field E] [CMType E] [Fintype n] [DecidableEq n] |
| 228 | |
| 229 | /-- The set of classes of the standard space I_n for a subgroup K: double cosets of the finite |
| 230 | adelic unitary group by its rational points on the left and K on the right. -/ |
| 231 | abbrev StdClasses (K : Subgroup (Gf E n)) : Type := DoubleCosets (stdSpace E n).Γf K |
| 232 | |
| 233 | noncomputable instance {K : Subgroup (Gf E n)} [HasFiniteType stdRatPoints K] : |
| 234 | Fintype (StdClasses K) := @.ofFinite _ HasFiniteType.finite_classes |
| 235 | |
| 236 | end StandardClasses |
| 237 | |
| 238 | section FinitePart |
| 239 | |
| 240 | variable {E n : Type*} [Field E] [CMType E] [Fintype n] [DecidableEq n] |
| 241 | |
| 242 | /-- `Gf E n` is unimodular: the rational points of the standard space are a lattice in it. -/ |
| 243 | instance : (volume : Measure (Gf E n)).IsMulRightInvariant := |
| 244 | isMulRightInvariant_of_finite_covolume |
| 245 | (isFiniteMeasure_quotMeasure_of_cocompact _ (stdSpace E n).isCocompact_finitePart) |
| 246 | |
| 247 | /-- A level `K` (an open subgroup of `stdLevel E n`) has volume `1 / [stdLevel E n : K]`, as |
| 248 | `vol (stdLevel E n) = 1`. -/ |
| 249 | lemma measureReal_eq_inv_stdLevelIndex (K : Subgroup (Gf E n)) [hK : IsLevel K] : |
| 250 | volume.real (K : Set (Gf E n)) = (stdLevelIndex K : ℝ)⁻¹ := by |
| 251 | rw [measureReal_def, ← inter_eq_left.2 (SetLike.coe_subset_coe.2 hK.le), |
| 252 | measure_inter_eq_inv_relIndex isCompact_stdLevel hK.isOpen volume volume_stdLevel, |
| 253 | ENNReal.toReal_inv, ENNReal.toReal_natCast] |
| 254 | |
| 255 | lemma measureReal_pos_of_isLevel (K : Subgroup (Gf E n)) [hK : IsLevel K] : |
| 256 | 0 < volume.real (K : Set (Gf E n)) := |
| 257 | ENNReal.toReal_pos (hK.isOpen.measure_ne_zero _ ⟨1, K.one_mem⟩) hK.isCompact.measure_ne_top |
| 258 | |
| 259 | /-- The group `Gf E Unit` of `1 × 1` matrices is commutative. -/ |
| 260 | instance : IsMulCommutative (Gf E Unit) where |
| 261 | -- `1 × 1` matrices over a commutative ring commute |
| 262 | is_comm := ⟨by aesop (add simp [Matrix.mul_apply, mul_comm])⟩ |
| 263 | |
| 264 | end FinitePart |
| 265 | |
| 266 | variable {E n : Type} [Field E] [CMType E] [Fintype n] [DecidableEq n] {s : n → ℤˣ} |
| 267 | {W : Type*} [RCLike W] |
| 268 | |
| 269 | /-- `G` is unimodular, as a product of unimodular groups. -/ |
| 270 | instance : (volume : Measure (G E s)).IsMulRightInvariant := by |
| 271 | apply_rules [prod.instIsMulRightInvariant, pi.isMulRightInvariant] |
| 272 | |
| 273 | namespace Space |
| 274 | |
| 275 | /-- Unfolding on a space with all signs `1`: for `Φ` integrable on `G`, the sum |
| 276 | `g ↦ ∑ γ ∈ Γ, Φ (γ g)` over the rational points `Γ = V.Γ`, written as an integral for the counting |
| 277 | measure, is integrable on `[G]`, with the same integral as `Φ`. Integration on `[G] = Γ \ G` is by |
| 278 | `V.quotMeasure`. -/ |
| 279 | lemma integral_quotMeasure_integral {V : Space E n 1} {Φ : G E (1 : n → ℤˣ) → W} |
| 280 | (hΦ : Integrable Φ) : |
| 281 | Integrable (fun g : G E (1 : n → ℤˣ) ↦ ∫ γ : V.Γ, Φ (γ • g) ∂count) V.quotMeasure ∧ |
| 282 | ∫ g : G E (1 : n → ℤˣ), ∫ γ : V.Γ, Φ (γ • g) ∂count ∂V.quotMeasure = |
| 283 | ∫ g : G E (1 : n → ℤˣ), Φ g := by |
| 284 | obtain ⟨h_prod, h_eq⟩ := (measurePreserving_orbitMeasure (ν := count (α := V.Γ))).fubini hΦ |
| 285 | exact ⟨h_prod.integral_prod_left, h_eq⟩ |
| 286 | |
| 287 | /-- Let `f g` be the integral of `F` over `G_∞ × {g}` (`G_∞ = GInf E 1` is the group at the |
| 288 | infinite places), let the level `K` fix `f` under right translation (`rightStabilizer f`), and let |
| 289 | `u` be a finite point such that the indicator of `G_∞ × u K` times `F` is integrable. Then the |
| 290 | integral of `F` over `G_∞ × u K` is `[stdLevel E n : K]⁻¹ * f u`. -/ |
| 291 | lemma integral_indicator_univ_prod_coset {F : G E (1 : n → ℤˣ) → W} {f : Gf E n → W} |
| 292 | (hF_avg : ∀ g : Gf E n, ∫ x : GInf E (1 : n → ℤˣ), F (x, g) = f g) |
| 293 | (K : Subgroup (Gf E n)) [hK : IsLevel K] (hf_stab : K ≤ rightStabilizer f) (u : Gf E n) |
| 294 | (h_int : Integrable ((univ ×ˢ ((u * ·) '' (K : Set (Gf E n)))).indicator F)) : |
| 295 | ∫ g : GInf E (1 : n → ℤˣ) × Gf E n, (univ ×ˢ ((u * ·) '' (K : Set (Gf E n)))).indicator F g = |
| 296 | (stdLevelIndex K : W)⁻¹ * f u := by |
| 297 | classical |
| 298 | let Φ : G E (1 : n → ℤˣ) → W := (univ ×ˢ ((u * ·) '' K)).indicator F |
| 299 | -- As `f` is constant on `u K`, the integral is `vol K * f u`. |
| 300 | have h_slice (k : Gf E n) : |
| 301 | ∫ x, Φ (x, u * k) = (K : Set (Gf E n)).indicator (fun _ ↦ f u) k := by |
| 302 | by_cases hk : k ∈ K |
| 303 | · simp [Φ, hk, hF_avg, hf_stab hk u] |
| 304 | · simp [Φ, hk] |
| 305 | calc ∫ g, Φ g = ∫ k, ∫ x, Φ (x, k) := integral_prod_symm _ h_int |
| 306 | _ = ∫ k, ∫ x, Φ (x, u * k) := (integral_mul_left_eq_self _ u).symm |
| 307 | _ = (stdLevelIndex K : W)⁻¹ * f u := by |
| 308 | simp [h_slice, integral_indicator_const _ hK.isOpen.measurableSet, |
| 309 | measureReal_eq_inv_stdLevelIndex, RCLike.real_smul_eq_coe_mul] |
| 310 | |
| 311 | /-- Let `V` be a space with all signs `1`: a hermitian matrix `J` over `E` and a point `x`. Write |
| 312 | `V.Γ` for its rational points `x⁻¹γx` (`γ ∈ U(J)(E)`) in `G = G_∞ × G_f`, and `V.Γf` for their |
| 313 | finite parts in `Gf E n`. Let `F` be a continuous left `V.Γ`-invariant function on `G` whose |
| 314 | integral over `G_∞` at `(·, g)` is `f g`, and let `K` be a level (an open subgroup of |
| 315 | `K₀ = stdLevel E n = G_f ∩ GL_n(Ô)`) that fixes `f` under right translation. Then the integral of |
| 316 | `F` over `V.Γ \ G` against `V.quotMeasure` (with `vol G_∞ = vol K₀ = 1`) is `[K₀ : K]⁻¹` times the |
| 317 | class sum of `f`, which is the sum over the double cosets `V.Γf g K` of |
| 318 | `f g / #(V.Γf ∩ g K g⁻¹)`. -/ |
| 319 | lemma integral_quotMeasure_eq_classSum {V : Space E n 1} {F : G E (1 : n → ℤˣ) → W} |
| 320 | {f : Gf E n → W} (hF_left : V.Γ.FixesLeft F) |
| 321 | (hF_avg : ∀ g : Gf E n, ∫ x : GInf E (1 : n → ℤˣ), F (x, g) = f g) |
| 322 | (K : Subgroup (Gf E n)) [hK : IsLevel K] (hf_stab : K ≤ rightStabilizer f) |
| 323 | (hF_cont : Continuous F) : |
| 324 | ∫ g : G E (1 : n → ℤˣ), F g ∂V.quotMeasure = (stdLevelIndex K : W)⁻¹ * classSum V.Γf K f := by |
| 325 | classical |
| 326 | -- Cut `F` into the pieces `Φ u` on the cosets `G_∞ × u K`, `u` a class representative, and unfold |
| 327 | -- each piece. The projection to `Gf E n` maps `V.Γ` bijectively onto `V.Γf`. |
| 328 | let finPart (γ : V.Γ) : Gf E n := (γ : G E (1 : n → ℤˣ)).2 |
| 329 | have h_inj : Function.Injective finPart := |
| 330 | (V.fact_embFin_injective.out.injOn_range (g := Prod.snd)).injective |
| 331 | have h_surj : ∀ a ∈ V.Γf, ∃ γ : V.Γ, finPart γ = a := |
| 332 | forall_mem_range.2 fun γ ↦ ⟨⟨V.ratEmbed γ, γ, rfl⟩, rfl⟩ |
| 333 | -- `T g h : Finset V.Γ` is the set of `γ` with `g⁻¹ * finPart γ * h ∈ K`; it has |
| 334 | -- `#(classAut V.Γf K g)` elements if `g` and `h` lie in one class, and none otherwise. |
| 335 | choose T hT card_T using exists_transporter V.Γf h_inj h_surj K |
| 336 | let Φ (u : Gf E n) : G E (1 : n → ℤˣ) → W := (univ ×ˢ ((u * ·) '' K)).indicator F |
| 337 | have h_int (u : Gf E n) : Integrable (Φ u) := by |
| 338 | have h_compact : |
| 339 | IsCompact (univ ×ˢ ((u * ·) '' (K : Set (Gf E n))) : Set (G E (1 : n → ℤˣ))) := |
| 340 | isCompact_univ.prod (hK.isCompact.image (continuous_const_mul u)) |
| 341 | exact (hF_cont.continuousOn.integrableOn_compact h_compact).integrable_indicator |
| 342 | h_compact.measurableSet |
| 343 | -- The `γ` that move `g` into `G_∞ × u K` form the finite set `T u g.2`, and `F (γ * g) = F g`. |
| 344 | have h_orbit (u : Gf E n) (g : G E (1 : n → ℤˣ)) : |
| 345 | ∫ γ : V.Γ, Φ u (γ • g) ∂count = ((T u g.2).card : ℝ) • F g := by |
| 346 | have h_ind : (fun γ : V.Γ ↦ Φ u (γ • g)) = (T u g.2 : Set V.Γ).indicator fun _ ↦ F g := by |
| 347 | ext ⟨_, δ, rfl⟩ |
| 348 | have hγ : (V.ratEmbed δ).2 ∈ V.Γf := ⟨δ, rfl⟩ |
| 349 | simp [Φ, finPart, indicator, hT, hγ, Subgroup.smul_def, hF_left _ ⟨δ, rfl⟩, mul_assoc] |
| 350 | rw [h_ind, integral_indicator_const _ (T u g.2).measurableSet, measureReal_def, |
| 351 | count_apply_finset, ENNReal.toReal_natCast] |
| 352 | -- Only the class `c` of `g.2` contributes, with as many terms as `c.out` has automorphisms. |
| 353 | let weight (c : DoubleCosets V.Γf K) : ℝ := (Nat.card (classAut V.Γf K c.out) : ℝ)⁻¹ |
| 354 | have h_weight (c : DoubleCosets V.Γf K) : weight c * Nat.card (classAut V.Γf K c.out) = 1 := |
| 355 | have h_finite : Finite (classAut V.Γf K c.out) := finite_aut c.out |
| 356 | inv_mul_cancel₀ (Nat.cast_ne_zero.2 Nat.card_pos.ne') |
| 357 | have h_term (g : G E (1 : n → ℤˣ)) (c : DoubleCosets V.Γf K) : |
| 358 | weight c • ∫ γ : V.Γ, Φ c.out (γ • g) ∂count = |
| 359 | if c = DoubleCoset.mk V.Γf K g.2 then F g else 0 := by |
| 360 | rw [h_orbit, card_T, out_eq', smul_smul] |
| 361 | split_ifs |
| 362 | · rw [h_weight, one_smul] |
| 363 | · rw [Nat.cast_zero, mul_zero, zero_smul] |
| 364 | have h_sum (g : G E (1 : n → ℤˣ)) : F g = ∑ c, weight c • ∫ γ : V.Γ, Φ c.out (γ • g) ∂count := by |
| 365 | simp only [h_term, Finset.sum_ite_eq', Finset.mem_univ, ite_true] |
| 366 | have h_unfold (c : DoubleCosets V.Γf K) : |
| 367 | Integrable (fun g : G E (1 : n → ℤˣ) ↦ ∫ γ : V.Γ, Φ c.out (γ • g) ∂count) V.quotMeasure ∧ |
| 368 | ∫ g, ∫ γ : V.Γ, Φ c.out (γ • g) ∂count ∂V.quotMeasure = ∫ g, Φ c.out g := |
| 369 | integral_quotMeasure_integral (h_int c.out) |
| 370 | have h_vol (u : Gf E n) : ∫ g, Φ u g = (stdLevelIndex K : W)⁻¹ * f u := |
| 371 | integral_indicator_univ_prod_coset hF_avg K hf_stab u (h_int u) |
| 372 | calc ∫ g, F g ∂V.quotMeasure |
| 373 | = ∑ c, ∫ g, weight c • ∫ γ : V.Γ, Φ c.out (γ • g) ∂count ∂V.quotMeasure := by |
| 374 | rw [funext h_sum] |
| 375 | exact integral_finsetSum _ fun c _ ↦ (h_unfold c).left.smul (weight c) |
| 376 | _ = ∑ c, weight c • ((stdLevelIndex K : W)⁻¹ * f c.out) := by |
| 377 | simp only [integral_smul, (h_unfold _).right, h_vol] |
| 378 | _ = (stdLevelIndex K : W)⁻¹ * classSum V.Γf K f := by |
| 379 | rw [classSum, finsum_eq_sum_of_fintype, Finset.mul_sum] |
| 380 | exact Finset.sum_congr rfl fun c _ ↦ by rw [mul_smul_comm, inv_natCast_smul_eq ℝ ℚ] |
| 381 | |
| 382 | /-- If averaging `F` over the infinite factor gives `f`, its quotient integral equals the class |
| 383 | integral of `f` at any level `K`, divided by the index of `K` in the standard level. -/ |
| 384 | lemma integral_quotMeasure_eq_classIntegral {V : Space E n 1} {F : G E (1 : n → ℤˣ) → W} |
| 385 | {f : Gf E n → W} (h_left : V.Γ.FixesLeft F) |
| 386 | (h_avg : ∀ g : Gf E n, ∫ x : GInf E (1 : n → ℤˣ), F (x, g) = f g) |
| 387 | (K : Subgroup (Gf E n)) [hK : IsLevel K] (hf : IsOpen (rightStabilizer f : Set (Gf E n))) |
| 388 | (h_cont : Continuous F) : |
| 389 | ∫ g, F g ∂V.quotMeasure = (stdLevelIndex K : W)⁻¹ * classIntegral V.Γf K f := by |
| 390 | -- At the level fixing `f` inside `K`, the class-sum formula applies. |
| 391 | -- Indices multiply in the tower: [stdLevel : S] = [K : S] * [stdLevel : K]. |
| 392 | let S := rightStabilizer f ⊓ K |
| 393 | have : IsLevel S := ⟨inf_le_of_right_le hK.le, hf.inter hK.isOpen⟩ |
| 394 | have h_index : (stdLevelIndex S : W) = (rightStabilizer f).relIndex K * stdLevelIndex K := by |
| 395 | rw [← inf_relIndex_right, ← Nat.cast_mul, relIndex_mul_relIndex _ _ _ inf_le_right hK.le] |
| 396 | rw [integral_quotMeasure_eq_classSum h_left h_avg S inf_le_left h_cont, h_index, mul_inv_rev, |
| 397 | mul_assoc, classIntegral, inv_natCast_smul_eq ℚ W, smul_eq_mul] |
| 398 | |
| 399 | /-- Let `V` be a space with all signs `1`. Write `V.Γ` for its rational points `x⁻¹γx` |
| 400 | (`γ ∈ U(J)(E)`) in `G = G_∞ × G_f` and `V.Γf` for their finite parts, and let `K` be a level, an |
| 401 | open subgroup of `K₀ = stdLevel E n = G_f ∩ GL_n(Ô)`. Let `y` on `G_f` be left `V.Γf`-invariant with |
| 402 | open right stabiliser. Then `classIntegral V.Γf K y` equals `[K₀ : K]` times the integral of |
| 403 | `g ↦ y g_fin` over `V.Γ \ G` against `V.quotMeasure` (with `vol G_∞ = vol K₀ = 1`), where |
| 404 | `classIntegral V.Γf K y` is the sum over the double cosets `V.Γf g K'` of |
| 405 | `y g / #(V.Γf ∩ g K' g⁻¹)`, with `K' = rightStabilizer y ⊓ K`, divided by `[K : K']`. -/ |
| 406 | theorem classIntegral_eq_integral {V : Space E n 1} {y : Gf E n → W} |
| 407 | (hy : y ∈ smoothInvariants V.Γf) (K : Subgroup (Gf E n)) [hK : IsLevel K] : |
| 408 | classIntegral V.Γf K y = |
| 409 | (stdLevelIndex K : W) * ∫ g : G E (1 : n → ℤˣ), y g.2 ∂V.quotMeasure := by |
| 410 | obtain ⟨hy_left, hy_open⟩ := hy |
| 411 | have h_left : V.Γ.FixesLeft fun g ↦ y g.2 := |
| 412 | forall_mem_range.2 fun γ g ↦ hy_left _ ⟨γ, rfl⟩ g.2 |
| 413 | rw [integral_quotMeasure_eq_classIntegral h_left (f := y) (fun g ↦ by simp) K hy_open |
| 414 | (isLocallyConstant_of_eventually_mul <| hy_open.mem_nhds (one_mem _)).continuous.snd', |
| 415 | mul_inv_cancel_left₀ (Nat.cast_ne_zero.2 (isCompact_stdLevel.relIndex_ne_zero hK.isOpen))] |
| 416 | |
| 417 | end Space |
| 418 | |
| 419 | end New |