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.Algebra.Ring.IsFormallyReal |
| 4 | import Mathlib.Topology.UniformSpace.Uniformizable |
| 5 | public import Lib.General.NumberTheory.LatticeCovolumes |
| 6 | public import New.Spanning.RemainingTerms.SiegelLemma |
| 7 | public import New.Spanning.Unfolding.BesselLevelStructure |
| 8 | import Lib.Cohomology.Etale.Basic |
| 9 | import Lib.DiscreteSeries.Bessel.UnipotentHaarMeasure |
| 10 | import New.Spanning.Unfolding.Packing |
| 11 | import New.Spanning.Unfolding.ReducedPoints |
| 12 | |
| 13 | /-! |
| 14 | # The Bessel kernel and the integral of a class cutoff over the real unipotent group |
| 15 | |
| 16 | This file proves that the kernel `New.Filling.besselKernel`, the tensor |
| 17 | `besselFn(y) ⊗ besselFn(γ⁻¹ y)^*` of Bessel functions at the infinite places, is continuous. |
| 18 | It bounds the amplitude `New.Filling.amplitude` by the integral of the norms |
| 19 | `New.Filling.amplitudeMajorant`. It then computes the integral of a class cutoff |
| 20 | `S.classCutoff c` over the real unipotent group as `S.unipotentCovolume`. The group is unfolded |
| 21 | one coordinate at a time (`New.Filling.rowCoords`). The integral is then a product of covolumes of |
| 22 | explicit lattices. |
| 23 | |
| 24 | ## Main definitions and results |
| 25 | |
| 26 | * `New.Filling.enorm_amplitude_le`: the norm of the amplitude |
| 27 | `∫ β_c(y) β_c'(γ⁻¹ y) W(y) ⊗ W(γ⁻¹ y)^* dy` is at most the integral of the norm of its integrand. |
| 28 | * `New.Filling.lintegral_classCutoff_eq_unipotentCovolume`: let `E` contain a primitive 5040th |
| 29 | root of unity and let `S` be admissible. For every class `c` and archimedean point `y`, the |
| 30 | integral of the cutoff `u ↦ S.classCutoff c (u y)` over the real unipotent group 𝖴_∞, for the |
| 31 | product of the Haar measures `New.Shape.besselHaar`, is the number `S.unipotentCovolume`. |
| 32 | |
| 33 | Notions from other files: |
| 34 | * `New.Filling.besselFn`: for a tuple `i` of coordinates (`New.Filling.BesselCoord`), the product |
| 35 | over the places `v` of the `i v`-th coordinate of `W side (y v)`. |
| 36 | * `New.Filling.M`, `New.Filling.classUnipotent`: the level M = p₀ p₁, the product of the two primes |
| 37 | `S.levelPrime`; the rational points u of 𝖴 with h_c⁻¹ u h_c in the principal congruence |
| 38 | subgroup K(M). |
| 39 | * `New.Shape.Form.besselU`, `New.Shape.Form.besselS`: the group 𝖴 of block upper unitriangular |
| 40 | isometries, and the Bessel subgroup, which 𝖴 generates together with the unitary group of the |
| 41 | standard form on κ. |
| 42 | * `New.Filling.IsAdmissible`: the standing hypotheses. The level `sourceLevel` is the preimage of |
| 43 | K(M), `reduction` is onto, and size inequalities hold between b, M and ϖ, κ_v, N, the second |
| 44 | moments, the number of Bessel coordinates, an index and the constant `scaledSiegelConst`. |
| 45 | * `New.Filling.unipotentCovolume`: an explicit positive number built from M, N, |κ|, ϱ, the |
| 46 | discriminant of E and the scales of the frame at the infinite places. |
| 47 | -/ |
| 48 | |
| 49 | @[expose] public section |
| 50 | |
| 51 | /-! |
| 52 | ## Continuity of the Bessel kernel and the bound of an amplitude |
| 53 | |
| 54 | First facts on the kernel `New.Filling.besselKernel`, the tensor `besselFn(y) ⊗ besselFn(γ⁻¹ y)^*` |
| 55 | of Bessel functions at the infinite places. The amplitude `New.Filling.amplitude`, its integral |
| 56 | against the cutoffs `New.Filling.classCutoff`, is bounded by the integral of the norms |
| 57 | `New.Filling.amplitudeMajorant` (`New.Filling.enorm_amplitude_le`). |
| 58 | -/ |
| 59 | |
| 60 | section AmplitudeBounds |
| 61 | |
| 62 | open Fintype NumberField |
| 63 | |
| 64 | namespace New.Filling |
| 65 | |
| 66 | variable {E : Type} {𝔰 : Shape} [Field E] [CMType E] {S : Filling E 𝔰} {γ : S.G E} |
| 67 | {side : FullOrCut} |
| 68 | |
| 69 | /-- Each coordinate of the product of the local Bessel functions is continuous on G_∞. -/ |
| 70 | @[fun_prop] |
| 71 | lemma continuous_besselFn (i : S.BesselCoord) : |
| 72 | Continuous fun y : InfinitePlace E → 𝔰.G₁ ↦ S.besselFn side y i := by |
| 73 | fun_prop [besselFn] |
| 74 | |
| 75 | /-- The kernel `y ↦ W(y) ⊗ W(γ⁻¹ y)^*` is continuous on G_∞. -/ |
| 76 | @[fun_prop] |
| 77 | lemma continuous_besselKernel : Continuous (S.besselKernel side γ) := by fun_prop [besselKernel] |
| 78 | |
| 79 | /-- The norm of `W(y) ⊗ W(γ⁻¹ y)^*` is the product of the norms of the local factors. The factor at |
| 80 | the infinite place `v` is the Bessel function `(S.besselSystem v).besselFn side`, full or cut |
| 81 | according to `side`, and `S.ratToInf γ` is the image in G_∞ of the rational element `γ`. -/ |
| 82 | lemma enorm_besselKernel (y : InfinitePlace E → 𝔰.G₁) : |
| 83 | ‖S.besselKernel side γ y‖ₑ = |
| 84 | (∏ v : InfinitePlace E, ‖(S.besselSystem v).besselFn side (y v)‖ₑ) * |
| 85 | ∏ v : InfinitePlace E, ‖(S.besselSystem v).besselFn side (((S.ratToInf γ)⁻¹ * y) v)‖ₑ := by |
| 86 | -- Square both sides: the sum over pairs of tuples of indices of the squared coordinates factors |
| 87 | -- as a product over the places, for each of the two tensor factors. |
| 88 | simp only [eNorm_eq_nnNorm] |
| 89 | norm_cast |
| 90 | rw [← sq_eq_sq₀ zero_le zero_le] |
| 91 | simp [EuclideanSpace.nnNorm_eq, besselKernel, besselFn, mul_pow, ← Finset.prod_pow, sum_prod_type, |
| 92 | prod_sum, sum_mul_sum] |
| 93 | |
| 94 | /-- Let `S` be data of the filling theorem over the CM field `E`, let `γ` be a rational element of |
| 95 | the unitary group and `y` a point at the infinite places. If the cut Bessel kernel of `γ`, the |
| 96 | tensor of the cut Bessel functions at `y` and at `γ⁻¹ y`, is nonzero, then at every infinite place |
| 97 | `v` both components lie in the cut. By definition `InCut g b` says exactly that |
| 98 | `besselLength g ≤ b ^ (6 * 𝔰.n + 2)`. -/ |
| 99 | lemma inCut_of_besselKernel_ne_zero {y : NumberField.InfinitePlace E → 𝔰.G₁} |
| 100 | (h_kernel : S.besselKernel .cut γ y ≠ 0) (v : NumberField.InfinitePlace E) : |
| 101 | InCut (y v) S.b ∧ InCut (((S.ratToInf γ)⁻¹ * y) v) S.b := by |
| 102 | -- All local factors at `y` and at `γ⁻¹ y` are nonzero, and each vanishes outside the cut. |
| 103 | rw [← eNorm_ne_zero, enorm_besselKernel, mul_ne_zero_iff, Finset.prod_ne_zero_iff, |
| 104 | Finset.prod_ne_zero_iff] at h_kernel |
| 105 | obtain ⟨h_at_y, h_at_γy⟩ := h_kernel |
| 106 | have h_factors : (S.besselSystem v).besselFn .cut (y v) ≠ 0 ∧ |
| 107 | (S.besselSystem v).besselFn .cut (((S.ratToInf γ)⁻¹ * y) v) ≠ 0 := |
| 108 | ⟨eNorm_ne_zero.1 (h_at_y v (Finset.mem_univ v)), |
| 109 | eNorm_ne_zero.1 (h_at_γy v (Finset.mem_univ v))⟩ |
| 110 | exact h_factors.imp ((S.besselSystem v).isCutPair.inCut_of_ne_zero _) |
| 111 | ((S.besselSystem v).isCutPair.inCut_of_ne_zero _) |
| 112 | |
| 113 | /-- The norm of the amplitude `∫ β_c(y) β_c'(γ⁻¹ y) W(y) ⊗ W(γ⁻¹ y)^* dy` is at most the integral of |
| 114 | the norm of its integrand. -/ |
| 115 | lemma enorm_amplitude_le (c c' : S.Classes) : |
| 116 | ‖S.amplitude side c c' γ‖ₑ ≤ S.amplitudeMajorant side c c' γ := by |
| 117 | grw [amplitude, MeasureTheory.eNorm_integral_le_lintegral_eNorm, enorm_toReal_smul_le, |
| 118 | amplitudeMajorant] |
| 119 | |
| 120 | end New.Filling |
| 121 | |
| 122 | end AmplitudeBounds |
| 123 | |
| 124 | /-! |
| 125 | ## Integral of a class cutoff over the real unipotent group |
| 126 | |
| 127 | `New.Filling.lintegral_classCutoff_eq_unipotentCovolume` computes the covolume of the arithmetic |
| 128 | unipotent group `S.classUnipotent c` of a class `c` in the real unipotent group (a copy of |
| 129 | `New.Shape.Form.besselU` at each infinite place, with the Haar measure `New.Shape.besselHaar`): the |
| 130 | cutoff `S.classCutoff c`, whose translates under `S.classUnipotent c` sum to `1`, has integral |
| 131 | `S.unipotentCovolume`. |
| 132 | |
| 133 | The group is unfolded one coordinate at a time by `New.Filling.existsUnique_mul_mem_box`. The basis |
| 134 | is e_a, the middle block, e*_a (`New.Shape.BesselIndex`); the coordinates of a unipotent element are |
| 135 | the free entries of each row e_a (positions `New.RealPlace.IsFreeEntry`) and the imaginary part of |
| 136 | its entry at e*_a. Each coordinate is additive once the earlier ones vanish; the integral is then a |
| 137 | product of covolumes of explicit lattices. |
| 138 | -/ |
| 139 | |
| 140 | section UnipotentCovolume |
| 141 | |
| 142 | namespace New.Filling |
| 143 | |
| 144 | open NumberField MeasureTheory Matrix Complex Finset RealPlace Sum ENNReal Function Fintype |
| 145 | |
| 146 | /-- Additivity of an entry in the row of e_a, for x and u in the Bessel unipotent group of G₁. Let |
| 147 | the column j be e*_a or free for the row (`IsFreeEntry`: e_b or e*_b with b > a, or a column of the |
| 148 | middle block). If the free entries of u vanish in the rows e_b with b > a and in the row e_b with |
| 149 | j = e*_b, and the entries of u at (e_b, e*_b), b > a, are real, then the (e_a, j) entry of x·u is |
| 150 | the sum of those of u and x. -/ |
| 151 | lemma besselU_mul_apply_eq_add {𝔰 : Shape} (x u : (𝔰.middleGram (1 : ℂ)).besselU) {a : Fin 𝔰.ϱ} |
| 152 | {j : 𝔰.BesselIndex} (hj : j = eStar a ∨ IsFreeEntry (a, j)) |
| 153 | (h_im : ∀ b : Fin 𝔰.ϱ, a < b → |
| 154 | ((u : Matrix 𝔰.BesselIndex 𝔰.BesselIndex ℂ) (inl b) (eStar b)).im = 0) |
| 155 | (h_zero : ∀ (b : Fin 𝔰.ϱ) (k : 𝔰.BesselIndex), a < b ∨ j = eStar b → IsFreeEntry (b, k) → |
| 156 | (u : Matrix 𝔰.BesselIndex 𝔰.BesselIndex ℂ) (inl b) k = 0) : |
| 157 | (↑(x * u) : Matrix 𝔰.BesselIndex 𝔰.BesselIndex ℂ) (inl a) j = |
| 158 | (u : Matrix 𝔰.BesselIndex 𝔰.BesselIndex ℂ) (inl a) j + |
| 159 | (x : Matrix 𝔰.BesselIndex 𝔰.BesselIndex ℂ) (inl a) j := by |
| 160 | set X : Matrix 𝔰.BesselIndex 𝔰.BesselIndex ℂ := ↑x with hX |
| 161 | set U' : Matrix 𝔰.BesselIndex 𝔰.BesselIndex ℂ := ↑u with hU' |
| 162 | -- It suffices that ((X − 1)(U' − 1))(e_a, j) = 0, and this holds term by term. |
| 163 | suffices h_prod : ((X - 1) * (U' - 1)) (inl a) j = 0 by |
| 164 | have h_ne : inl a ≠ j := by grind [IsFreeEntry] |
| 165 | simpa [hX, hU', Matrix.one_apply, h_ne, sub_eq_iff_eq_add', mul_sub, sub_mul] using h_prod |
| 166 | -- Outside the columns e*_d, the rows of U' that matter below are those of 1. |
| 167 | have h_row (k l : 𝔰.BesselIndex) (hk : ∀ b, k = inl b → a < b ∨ j = eStar b) |
| 168 | (hl : ∀ d, l ≠ eStar d) : U' k l = if k = l then 1 else 0 := by |
| 169 | have h_low (hkl : BesselIndex.level l ≤ BesselIndex.level k) : |
| 170 | U' k l = if k = l then 1 else 0 := mem_besselU.1 u.property k l hkl |
| 171 | rcases k with b | i | b <;> rcases l with b' | i' | b' <;> |
| 172 | simp only [BesselIndex.level, elim_inl, elim_inr] at h_low <;> |
| 173 | grind [IsFreeEntry] |
| 174 | refine sum_eq_zero fun k _ ↦ mul_eq_zero.2 ?_ |
| 175 | by_cases hk : BesselIndex.level k ≤ BesselIndex.level (inl a : 𝔰.BesselIndex) |
| 176 | · exact .inl (sub_eq_zero.2 (mem_besselU.1 x.property _ k hk)) |
| 177 | -- Here k has higher level than e_a, and we show that U'(k, j) is the entry of 1. |
| 178 | refine .inr (sub_eq_zero.2 ?_) |
| 179 | have hk_row (b : Fin 𝔰.ϱ) (hb : k = inl b) : a < b ∨ j = eStar b := |
| 180 | .inl (by simpa [hb, BesselIndex.level] using hk) |
| 181 | by_cases! hj_star : ∀ d, j ≠ eStar d |
| 182 | · exact h_row k j hk_row hj_star |
| 183 | obtain ⟨c, rfl⟩ := hj_star |
| 184 | -- In the column e*_c use U' · (J U'ᴴ J) = 1. |
| 185 | let J : Matrix 𝔰.BesselIndex 𝔰.BesselIndex ℂ := (𝔰.middleGram (1 : ℂ)).splitGram |
| 186 | have h_inv : U' * (J * U'ᴴ * J) = 1 := by |
| 187 | rw [← U.coe_inv IsHermitianInvolution.mul_self u.val] |
| 188 | exact u.val.val.mul_inv |
| 189 | have h_unitary : ∑ d, U' k (inl d) * starRingEnd ℂ (U' (inl c) (eStar d)) + U' k (eStar c) = |
| 190 | if k = eStar c then 1 else 0 := by |
| 191 | simpa [Matrix.one_apply, J, Shape.Form.splitGram, h_row (inl c), Matrix.mul_apply] using |
| 192 | congrFun₂ h_inv k (eStar c) |
| 193 | have h_col (d : Fin 𝔰.ϱ) : U' k (inl d) = if k = inl d then 1 else 0 := |
| 194 | h_row k _ hk_row (by simp) |
| 195 | rcases k with d | i | d |
| 196 | · -- For c ≠ d one of the two entries is free, hence zero; for c = d the entry is real. |
| 197 | have h_skew : starRingEnd ℂ (U' (inl c) (eStar d)) + U' (inl d) (eStar c) = 0 := by |
| 198 | simpa [h_col] using h_unitary |
| 199 | have had : a < d := by simpa [BesselIndex.level] using hk |
| 200 | suffices U' (inl d) (eStar c) = 0 by simpa |
| 201 | grind [conj_eq_iff_im, IsFreeEntry] |
| 202 | · simpa [h_col] using h_unitary |
| 203 | · simpa [h_col, Matrix.one_apply] using h_unitary |
| 204 | |
| 205 | /-- Let `E` contain a primitive 5040th root of unity and let `S` be admissible. The basis matrix |
| 206 | `classBasis c` of the lattice of the class `c` differs from the identity only in its middle block |
| 207 | `M`, and the generalised index (`genIndex`, the inverse Haar modulus) of `det M` is `N ^ (-f)`. |
| 208 | Here `N = S.N` is the prime `π π̄` of `S` and `f` is the number of infinite places of `E`. -/ |
| 209 | lemma exists_classBasis_eq_fromBlocks {E : Type} [Field E] [CMType E] [HasPrimitiveRoot5040 E] |
| 210 | {𝔰 : Shape} {S : Filling E 𝔰} (c : S.Classes) : |
| 211 | ∃ M : Matrix 𝔰.MiddleIndex 𝔰.MiddleIndex (𝔸f E), |
| 212 | (classBasis c).val = fromBlocks 1 0 0 (fromBlocks M 0 0 1) ∧ |
| 213 | genIndex M.det = 1 / S.N ^ numInfPlaces E := by |
| 214 | -- The witness `M` is read off from the product of the block matrices that define `classBasis c`. |
| 215 | use ?_, by |
| 216 | simp [Matrix.fromBlocks_multiply, classBasis, toBesselH, besselLatticeBasis] |
| 217 | rfl |
| 218 | -- det M is the determinant of the unitary representative of c over the conjugate of `S.piN`. |
| 219 | -- Apply `genIndex` to the unitarity relation and to `piN_mul_star`, and take positive square |
| 220 | -- roots. |
| 221 | have h_unitary : genIndex c.out.val.val.det = 1 := by |
| 222 | have h_sq : genIndex c.out.val.val.det ^ 2 = 1 := by |
| 223 | simpa [← sq] using congrArg (fun A ↦ genIndex (det A)) |
| 224 | (show c.out.val.valᴴ * 1 * c.out.val.val = 1 from |
| 225 | mem_unitaryGroupOf_iff.1 c.out.property) |
| 226 | exact (pow_eq_one_iff_of_nonneg (genIndex_pos c.out.val.det).le two_ne_zero).1 h_sq |
| 227 | have h_norm : genIndex (S.piN : 𝔸f E) = S.N ^ numInfPlaces E := by |
| 228 | have h_sq : genIndex (S.piN * star S.piN.val : 𝔸f E) = genIndex (S.N : 𝔸f E) := |
| 229 | congrArg genIndex S.piN_mul_star |
| 230 | simpa [genIndex_natCast, ← sq, (genIndex_pos S.piN).le] using h_sq |
| 231 | simp [h_unitary, h_norm] |
| 232 | |
| 233 | /-- Let `E` contain a primitive 5040th root of unity and let `S` be admissible. Let `γ` lie in |
| 234 | `S.classUnipotent c`, the rational unipotent elements that the representative of the class `c` |
| 235 | conjugates into the principal congruence subgroup of level `S.M`. Then the row of γ − 1 at e_a, |
| 236 | divided by `S.M`, has integral coordinates in the basis `classBasis c` of the lattice of `c`. -/ |
| 237 | lemma classUnipotent_sub_one_div_M_row_integral {E : Type} [Field E] [CMType E] |
| 238 | [HasPrimitiveRoot5040 E] {𝔰 : Shape} {S : Filling E 𝔰} {c : S.Classes} |
| 239 | (γ : S.classUnipotent c) (a : Fin 𝔰.ϱ) (j : 𝔰.BesselIndex) : |
| 240 | (finAdeleMatrix ((S.M : E)⁻¹ • ((γ : Matrix 𝔰.BesselIndex 𝔰.BesselIndex E) - 1)) (inl a) ᵥ* |
| 241 | (classBasis c).val) j ∈ Ô E := by |
| 242 | -- Conjugation by the basis turns γ into `S.translateByClassReps c c γ`, which lies in |
| 243 | -- `S.principalLevel`. |
| 244 | let k : Matrix 𝔰.BesselIndex 𝔰.BesselIndex (𝔸f E) := S.translateByClassReps c c γ |
| 245 | have h_conj : finAdeleMatrix ((S.M : E)⁻¹ • ((γ : Matrix 𝔰.BesselIndex 𝔰.BesselIndex E) - 1)) * |
| 246 | (classBasis c).val = (classBasis c).val * S.ideleM⁻¹ • (k - 1) := by |
| 247 | simp [k, coe_translateByClassReps, Matrix.map_sub, -Nat.cast_mul, sub_mul, mul_assoc, mul_sub] |
| 248 | rfl |
| 249 | have h_level : S.translateByClassReps c c γ ∈ S.principalLevel := γ.property.2 |
| 250 | have h_int : (S.ideleM⁻¹ • (k - 1)) (inl a) j ∈ Ô E := |
| 251 | (S.principalLevel_eq_unitaryLevel.le h_level).2 _ j |
| 252 | obtain ⟨M, h_basis, -⟩ := exists_classBasis_eq_fromBlocks c |
| 253 | rw [← mul_apply_eq_vecMul, h_conj] |
| 254 | simpa [Matrix.one_apply, h_basis, Matrix.mul_apply] using h_int |
| 255 | |
| 256 | attribute [local simp] BesselIndex.level frameScaleSq |
| 257 | |
| 258 | attribute [local grind] IsFreeEntry |
| 259 | |
| 260 | section FreeBlock |
| 261 | |
| 262 | variable {R : Type*} [CommRing R] {𝔰 : Shape} {b : Matrix 𝔰.BesselIndex 𝔰.BesselIndex R} |
| 263 | {M : Matrix 𝔰.MiddleIndex 𝔰.MiddleIndex R} |
| 264 | |
| 265 | open scoped Classical in |
| 266 | private lemma freeEntry_cross_eq_zero |
| 267 | (hb : b = fromBlocks 1 0 0 (fromBlocks M 0 0 1)) (a : Fin 𝔰.ϱ) : |
| 268 | ∀ i, ¬IsFreeEntry (a, i) → ∀ j, IsFreeEntry (a, j) → b i j = 0 := by |
| 269 | simp [Matrix.one_apply, hb] |
| 270 | omega |
| 271 | |
| 272 | open scoped Classical in |
| 273 | /-- If `b` differs from the identity only in its middle block, then its square block on the free |
| 274 | columns (`IsFreeEntry`) of the row e_a has the determinant of `b`. -/ |
| 275 | lemma det_toSquareBlockProp_isFreeEntry (hb : b = fromBlocks 1 0 0 (fromBlocks M 0 0 1)) |
| 276 | (a : Fin 𝔰.ϱ) : |
| 277 | (b.toSquareBlockProp fun j : 𝔰.BesselIndex ↦ IsFreeEntry (a, j)).det = b.det := by |
| 278 | have h_rest : (b.toSquareBlockProp fun j ↦ ¬IsFreeEntry (a, j)) = 1 := by |
| 279 | simp [Matrix.one_apply, toSquareBlockProp, ← ext_iff, hb] |
| 280 | simp [b.twoBlockTriangular_det (fun j ↦ IsFreeEntry (a, j)) (freeEntry_cross_eq_zero hb a), |
| 281 | h_rest] |
| 282 | |
| 283 | open scoped Classical in |
| 284 | /-- If `b` differs from the identity only in its middle block, then the entries of `l ᵥ* b` in the |
| 285 | free columns (`IsFreeEntry`) of the row e_a depend only on the entries of `l` in these columns. -/ |
| 286 | lemma transpose_toSquareBlockProp_mulVec (hb : b = fromBlocks 1 0 0 (fromBlocks M 0 0 1)) |
| 287 | (a : Fin 𝔰.ϱ) (l : 𝔰.BesselIndex → R) (j : {j : 𝔰.BesselIndex // IsFreeEntry (a, j)}) : |
| 288 | ((b.toSquareBlockProp fun j : 𝔰.BesselIndex ↦ IsFreeEntry (a, j))ᵀ *ᵥ l ∘ Subtype.val) j = |
| 289 | (l ᵥ* b) j := by |
| 290 | refine sum_of_injective _ Subtype.val_injective _ _ (fun k hk ↦ ?_) fun k ↦ mul_comm _ (l k) |
| 291 | have hk_free : ¬IsFreeEntry (a, k) := fun h ↦ hk ⟨⟨k, h⟩, rfl⟩ |
| 292 | exact mul_eq_zero_of_right _ (freeEntry_cross_eq_zero hb a k hk_free j j.property) |
| 293 | |
| 294 | end FreeBlock |
| 295 | |
| 296 | section Coordinates |
| 297 | |
| 298 | variable {E : Type} [Field E] [CMType E] {𝔰 : Shape} {S : Filling E 𝔰} |
| 299 | |
| 300 | /-- The embedding of `S.classUnipotent c` into the real unipotent group 𝖴_∞, the product over the |
| 301 | infinite places of the Bessel unipotent group of G₁. -/ |
| 302 | noncomputable def classUnipotentToInf (c : S.Classes) : |
| 303 | S.classUnipotent c →* InfinitePlace E → (𝔰.middleGram (1 : ℂ)).besselU := |
| 304 | .mk' (fun γ v ↦ ⟨S.ratToInf γ v, γ.property.1.ratToInf_mem_agreeWithOneOn v⟩) (by aesop) |
| 305 | |
| 306 | /-- The component at `v` of `classUnipotentToInf c γ`, seen in `G₁`, is |
| 307 | `S.ratToInf γ v`. -/ |
| 308 | lemma coe_classUnipotentToInf_apply {c : S.Classes} (γ : S.classUnipotent c) (v : InfinitePlace E) : |
| 309 | (classUnipotentToInf c γ v : 𝔰.G₁) = S.ratToInf γ v := rfl |
| 310 | |
| 311 | /-- The map `classUnipotentToInf c` is injective. -/ |
| 312 | lemma classUnipotentToInf_injective (c : S.Classes) : Injective (classUnipotentToInf c) := by |
| 313 | intro _ |
| 314 | simp [funext_iff, coe_classUnipotentToInf_apply, ← SetLike.coe_eq_coe, GeneralLinearGroup.ext_iff, |
| 315 | (RingHom.injective _).eq_iff] |
| 316 | |
| 317 | /-- The free entries (`IsFreeEntry`) of the row e_a of a point `u` of the real unipotent group |
| 318 | 𝖴_∞, at all infinite places. -/ |
| 319 | def freeRowCoords (u : InfinitePlace E → (𝔰.middleGram (1 : ℂ)).besselU) (a : Fin 𝔰.ϱ) |
| 320 | (j : {j : 𝔰.BesselIndex // IsFreeEntry (a, j)}) (v : InfinitePlace E) : ℂ := |
| 321 | (u v : Matrix 𝔰.BesselIndex 𝔰.BesselIndex ℂ) (inl a) j |
| 322 | |
| 323 | /-- The imaginary parts of the entry at (e_a, e*_a) of a point `u` of the real unipotent group |
| 324 | 𝖴_∞, at all infinite places. -/ |
| 325 | def imRowCoords (u : InfinitePlace E → (𝔰.middleGram (1 : ℂ)).besselU) (a : Fin 𝔰.ϱ) |
| 326 | (v : InfinitePlace E) : ℝ := |
| 327 | ((u v : Matrix 𝔰.BesselIndex 𝔰.BesselIndex ℂ) (inl a) (eStar a)).im |
| 328 | |
| 329 | /-- The coordinates of a point `u` of the real unipotent group 𝖴_∞, grouped by rows: for each row |
| 330 | e_a, its free entries (`freeRowCoords`) and the imaginary parts of its entry at e*_a |
| 331 | (`imRowCoords`), at all infinite places. -/ |
| 332 | def rowCoords (u : InfinitePlace E → (𝔰.middleGram (1 : ℂ)).besselU) : |
| 333 | (∀ a : Fin 𝔰.ϱ, {j : 𝔰.BesselIndex // IsFreeEntry (a, j)} → InfinitePlace E → ℂ) × |
| 334 | (Fin 𝔰.ϱ → InfinitePlace E → ℝ) := |
| 335 | (freeRowCoords u, imRowCoords u) |
| 336 | |
| 337 | open scoped Classical in |
| 338 | /-- The map `rowCoords` sends a point of the real unipotent group 𝖴_∞ to the free entries of its |
| 339 | rows e_a and the imaginary parts (real numbers) of its entries at (e_a, e*_a), at all infinite |
| 340 | places of `E`. It carries the product over the infinite places of the Haar measure `besselHaar` to |
| 341 | Lebesgue measure on these coordinates. -/ |
| 342 | lemma measurePreserving_rowCoords : |
| 343 | MeasurePreserving (rowCoords (E := E) (𝔰 := 𝔰)) (.pi fun _ ↦ 𝔰.besselHaar) |
| 344 | (volume.prod volume) := by |
| 345 | -- Use `measurePreserving_freeEntries_besselHaar` at each place, then regroup the coordinates by |
| 346 | -- rows instead of places. |
| 347 | exact ((((measurePreserving_sigma |
| 348 | (.symm (.subtypeProdEquivSigmaSubtype fun a j ↦ IsFreeEntry (𝔰 := 𝔰) (a, j)))).comp |
| 349 | measurePreserving_flip).prod measurePreserving_flip).comp |
| 350 | (measurePreserving_arrowProdEquivProdArrow ..)).comp |
| 351 | (measurePreserving_pi _ _ fun _ : InfinitePlace E ↦ measurePreserving_freeEntries_besselHaar) |
| 352 | |
| 353 | open scoped Pointwise in |
| 354 | /-- Unfolding. Let `E` contain a primitive 5040th root of unity and let `S` be admissible. The |
| 355 | cutoff `S.classCutoff c` is a measurable function G_∞ → [0, ∞], on tuples `y` of points of `G₁` at |
| 356 | the infinite places, whose left translates under the congruence group `S.classUnipotent c` of |
| 357 | rational unipotent elements add up to `1`. Let `B` be a measurable subset of the real unipotent |
| 358 | group 𝖴_∞ that meets each coset `u Γ` of the image `Γ` of `S.classUnipotent c` under |
| 359 | `classUnipotentToInf c` in exactly one point. Then the integral over 𝖴_∞ of |
| 360 | `u ↦ S.classCutoff c (u y)` is the measure of `B`, both for the product of the Haar measures |
| 361 | `𝔰.besselHaar`. -/ |
| 362 | lemma lintegral_classCutoff_eq_measure [HasPrimitiveRoot5040 E] [S.IsAdmissible] (c : S.Classes) |
| 363 | (y : InfinitePlace E → 𝔰.G₁) |
| 364 | {B : Set (InfinitePlace E → (𝔰.middleGram (1 : ℂ)).besselU)} (hB_meas : MeasurableSet B) |
| 365 | (hB_unique : ∀ u : InfinitePlace E → (𝔰.middleGram (1 : ℂ)).besselU, |
| 366 | ∃! γ : (classUnipotentToInf c).range, u * γ ∈ B) : |
| 367 | ∫⁻ u : InfinitePlace E → (𝔰.middleGram (1 : ℂ)).besselU, |
| 368 | S.classCutoff c (fun v : InfinitePlace E ↦ u v * y v) ∂(.pi fun _ ↦ 𝔰.besselHaar) = |
| 369 | Measure.pi (fun _ ↦ 𝔰.besselHaar) B := by |
| 370 | let Γ : Subgroup (InfinitePlace E → (𝔰.middleGram (1 : ℂ)).besselU) := |
| 371 | (classUnipotentToInf c).range |
| 372 | -- The inverse of `B` is a fundamental domain for the left translations by `Γ`. |
| 373 | have h_fund : IsFundamentalDomain Γ B⁻¹ (.pi fun _ ↦ 𝔰.besselHaar) := |
| 374 | .mk' hB_meas.inv.nullMeasurableSet fun u ↦ |
| 375 | ((Equiv.inv Γ).existsUnique_congr fun γ ↦ by simp [Subgroup.smul_def]).1 (hB_unique u⁻¹) |
| 376 | have h_sum (u : InfinitePlace E → (𝔰.middleGram (1 : ℂ)).besselU) : |
| 377 | ∑' γ : Γ, S.classCutoff c (fun v ↦ (γ • u) v * y v) = 1 := by |
| 378 | rw [← ((classUnipotentToInf c).ofInjective (classUnipotentToInf_injective c)).tsum_eq, |
| 379 | ← tsum_classCutoff_eq_one c fun v ↦ u v * y v] |
| 380 | exact tsum_congr fun γ ↦ congrArg (S.classCutoff c) (funext fun v ↦ mul_assoc ..) |
| 381 | have : Countable Γ := (classUnipotentToInf c).rangeRestrict_surjective.countable |
| 382 | have : MeasurableConstSMul Γ (InfinitePlace E → (𝔰.middleGram (1 : ℂ)).besselU) := |
| 383 | ⟨fun γ ↦ measurable_const_mul γ.val⟩ |
| 384 | have : SMulInvariantMeasure Γ (InfinitePlace E → (𝔰.middleGram (1 : ℂ)).besselU) |
| 385 | (.pi fun _ ↦ 𝔰.besselHaar) := |
| 386 | ⟨fun γ s _ ↦ measure_preimage_mul _ γ.val s⟩ |
| 387 | -- The translates of the cutoff add up to 1, and the measure is inversion invariant. |
| 388 | rw [h_fund.lintegral_eq_tsum'', ← lintegral_tsum (by fun_prop), lintegral_congr h_sum] |
| 389 | simp [Set.univ_inter] |
| 390 | |
| 391 | /-- Let `γ ∈ S.classUnipotent c`. If, at an infinite place `v`, right multiplication by `γ` adds the |
| 392 | (e_a, e*_a) entry of `γ` to that of every unipotent `x`, then the (e_a, e*_a) entry of `γ` divided |
| 393 | by the level `S.M` is skew: the complex conjugation `star` of the CM field `E` changes its sign. -/ |
| 394 | lemma star_inv_mul_apply_eStar_eq_neg {c : S.Classes} (γ : S.classUnipotent c) (v : InfinitePlace E) |
| 395 | (a : Fin 𝔰.ϱ) |
| 396 | (h_add : ∀ x : (𝔰.middleGram (1 : ℂ)).besselU, |
| 397 | (↑(x * classUnipotentToInf c γ v) : Matrix 𝔰.BesselIndex 𝔰.BesselIndex ℂ) (inl a) (eStar a) = |
| 398 | (classUnipotentToInf c γ v : Matrix 𝔰.BesselIndex 𝔰.BesselIndex ℂ) (inl a) (eStar a) + |
| 399 | (x : Matrix 𝔰.BesselIndex 𝔰.BesselIndex ℂ) (inl a) (eStar a)) : |
| 400 | star ((S.M : E)⁻¹ * (γ : Matrix 𝔰.BesselIndex 𝔰.BesselIndex E) (inl a) (eStar a)) = |
| 401 | -((S.M : E)⁻¹ * (γ : Matrix 𝔰.BesselIndex 𝔰.BesselIndex E) (inl a) (eStar a)) := by |
| 402 | -- Take x = γ⁻¹ = J γᴴ J. |
| 403 | let J : Matrix 𝔰.BesselIndex 𝔰.BesselIndex ℂ := (𝔰.middleGram (1 : ℂ)).splitGram |
| 404 | let Y : Matrix 𝔰.BesselIndex 𝔰.BesselIndex ℂ := classUnipotentToInf c γ v |
| 405 | have h_inv : (1 : Matrix 𝔰.BesselIndex 𝔰.BesselIndex ℂ) (inl a) (eStar a) = |
| 406 | Y (inl a) (eStar a) + (J * Yᴴ * J) (inl a) (eStar a) := by |
| 407 | rw [← U.coe_inv IsHermitianInvolution.mul_self] |
| 408 | simpa using h_add (classUnipotentToInf c γ v)⁻¹ |
| 409 | apply (Φ v).injective |
| 410 | simpa [Matrix.mul_apply, J, Y, coe_classUnipotentToInf_apply, basisScale, Complex.ext_iff, |
| 411 | self_eq_neg, ← two_mul, Nat.Prime.ne_zero, -ofReal_div] using h_inv |
| 412 | |
| 413 | /-- For admissible `S` and `γ ∈ S.classUnipotent c`, the (e_a, e*_a) entry of `γ` is the level |
| 414 | `S.M` times an algebraic integer. -/ |
| 415 | lemma isIntegral_inv_mul_apply_eStar [HasPrimitiveRoot5040 E] {c : S.Classes} |
| 416 | (γ : S.classUnipotent c) (a : Fin 𝔰.ϱ) : |
| 417 | IsIntegral ℤ |
| 418 | ((S.M : E)⁻¹ * (γ : Matrix 𝔰.BesselIndex 𝔰.BesselIndex E) (inl a) (eStar a)) := by |
| 419 | obtain ⟨M, h_basis, -⟩ := exists_classBasis_eq_fromBlocks c |
| 420 | -- `using!` identifies the entry of `finAdeleMatrix` with the image under `algebraMap`. |
| 421 | exact algebraMap_mem_Ô.1 |
| 422 | (by simpa [vecMul_fromBlocks, h_basis] using! classUnipotent_sub_one_div_M_row_integral γ a |
| 423 | (eStar a)) |
| 424 | |
| 425 | open scoped Classical in |
| 426 | /-- The volume of the fundamental domain for the free entries (`IsFreeEntry`) of the row e_a, of |
| 427 | which there are 2(ϱ − 1 − a) + k + 1, is `(∏ v, S.M ^ 2 / S.frameScaleSq v a) / volÔ E` to that |
| 428 | power. Here `S.basisScale v j` is the scale of the basis vector `j` at the place `v`, |
| 429 | `S.frameScaleSq v a` is the square of the scale of e_a, `S.M` is the level, and `volÔ E` is |
| 430 | 2^r₂/√|disc E|, with r₂ the number of complex places. -/ |
| 431 | lemma prod_norm_basisScale_sq_div_eq (S : Filling E 𝔰) (a : Fin 𝔰.ϱ) : |
| 432 | (∏ v : InfinitePlace E, ‖∏ j : {j : 𝔰.BesselIndex // IsFreeEntry (a, j)}, |
| 433 | (S.M : ℂ) / S.basisScale v (inl a) * S.basisScale v j‖ ^ 2) / |
| 434 | (1 / (S.N : ℝ) ^ numInfPlaces E) / |
| 435 | volÔ E ^ Fintype.card {j : 𝔰.BesselIndex // IsFreeEntry (a, j)} = |
| 436 | ((∏ v : InfinitePlace E, (S.M : ℝ) ^ 2 / S.frameScaleSq v a) / volÔ E) ^ |
| 437 | (a.rev + (𝔰.k + 1) + a.rev : ℕ) := by |
| 438 | -- `↓` splits the product and the count over the three blocks before they are simplified. |
| 439 | simp [div_pow, prod_pow, tsub_add_eq_tsub_tsub_swap, Finset.prod_mul_distrib, |
| 440 | Fintype.card_subtype, card_filter, basisScale, ↓prod_sum_type, |
| 441 | ← prod_subtype _ mem_filter_univ, ↓sum_sum_type, prod_filter, filter_lt_eq_Ioi, mul_pow, |
| 442 | pow_right_comm _ _ 2, prod_ite] |
| 443 | field [prod_eq_zero_iff, Nat.Prime.ne_zero] |
| 444 | |
| 445 | /-- The number `S.unipotentCovolume` is the product, over the rows e_a, of the covolumes of the |
| 446 | lattice of free entries and of the lattice of imaginary parts at e*_a. -/ |
| 447 | lemma unipotentCovolume_eq_prod (S : Filling E 𝔰) : |
| 448 | S.unipotentCovolume = |
| 449 | (∏ a : Fin 𝔰.ϱ, ((∏ v : InfinitePlace E, (S.M : ℝ) ^ 2 / S.frameScaleSq v a) / volÔ E) ^ |
| 450 | (a.rev + (𝔰.k + 1) + a.rev : ℕ)) * |
| 451 | ∏ a : Fin 𝔰.ϱ, ((∏ v : InfinitePlace E, |S.M / S.frameScaleSq v a|) * |
| 452 | √√|NumberField.discr E|) := by |
| 453 | have h_exponent (k : ℕ) (a : Fin 𝔰.ϱ) : |
| 454 | k + 2 * (𝔰.ϱ - a) = a.rev + (k + 1) + a.rev + 1 := by grind |
| 455 | rw [unipotentCovolume, ← sum_range_reflect, sum_range, frameScaleProd, prod_comm, |
| 456 | Fin.prod_univ_castSucc] |
| 457 | simp [div_pow, pow_mul', prod_pow, tsub_add_eq_tsub_tsub_swap, Finset.prod_mul_distrib, |
| 458 | Finset.sum_add_distrib, mul_pow, abs_div, pow_right_comm _ _ 2, |
| 459 | pow_succ _ (_ + _), prod_pow_eq_pow_sum, h_exponent] |
| 460 | field [prod_eq_zero_iff, Nat.Prime.ne_zero] |
| 461 | |
| 462 | /-- The index `inl a` is distinct from `j.val` for any free entry `j`. -/ |
| 463 | lemma inl_ne_coe_isFreeEntry (a : Fin 𝔰.ϱ) (j : {j : 𝔰.BesselIndex // IsFreeEntry (a, j)}) : |
| 464 | inl a ≠ j.val := by grind |
| 465 | |
| 466 | /-- For any free entry `j`, `j.val` is distinct from `eStar a`. -/ |
| 467 | lemma coe_isFreeEntry_ne_eStar (a : Fin 𝔰.ϱ) (j : {j : 𝔰.BesselIndex // IsFreeEntry (a, j)}) : |
| 468 | j.val ≠ eStar a := by grind |
| 469 | |
| 470 | omit [CMType E] in |
| 471 | /-- Evaluating `rowCoords` at the identity element gives `0`. -/ |
| 472 | lemma rowCoords_one : rowCoords (1 : InfinitePlace E → (𝔰.middleGram (1 : ℂ)).besselU) = 0 := by |
| 473 | simp [rowCoords, freeRowCoords, imRowCoords, Prod.ext_iff, funext_iff, inl_ne_coe_isFreeEntry] |
| 474 | |
| 475 | omit [CMType E] in |
| 476 | /-- The coordinate map `rowCoords` is injective. -/ |
| 477 | lemma rowCoords_injective : Injective (rowCoords (E := E) (𝔰 := 𝔰)) := by |
| 478 | intro u u' h_eq |
| 479 | obtain ⟨h_free, h_im⟩ := Prod.ext_iff.1 h_eq |
| 480 | exact funext fun v ↦ injective_freeEntries_besselU (Prod.ext |
| 481 | (funext fun ⟨(a, j), hj⟩ ↦ congrFun₂ (congrFun h_free a) ⟨j, hj⟩ v) |
| 482 | (funext fun a ↦ congrFun₂ h_im a v)) |
| 483 | |
| 484 | omit [CMType E] in |
| 485 | /-- If the free entries (`freeRowCoords`) and the imaginary parts of the (e_d, e*_d) entry |
| 486 | (`imRowCoords`) of `u` vanish in every row e_d with d > a, then the free entries of `x * u` in the |
| 487 | row e_a are the sum of those of `u` and of `x`. -/ |
| 488 | lemma rowCoords_mul_fst (x : InfinitePlace E → (𝔰.middleGram (1 : ℂ)).besselU) |
| 489 | {u : InfinitePlace E → (𝔰.middleGram (1 : ℂ)).besselU} {a : Fin 𝔰.ϱ} |
| 490 | (h_free : ∀ d : Fin 𝔰.ϱ, a < d → freeRowCoords u d = 0) |
| 491 | (h_im : ∀ d : Fin 𝔰.ϱ, a < d → imRowCoords u d = 0) : |
| 492 | freeRowCoords (x * u) a = freeRowCoords u a + freeRowCoords x a := by |
| 493 | funext j v |
| 494 | refine besselU_mul_apply_eq_add (x v) (u v) (.inr j.property) (fun d hd ↦ congrFun (h_im d hd) v) |
| 495 | fun d k hd hk ↦ congrFun₂ (h_free d ?_) ⟨k, hk⟩ v |
| 496 | -- If the free column `j` is e*_d, then d > a. |
| 497 | aesop |
| 498 | |
| 499 | omit [CMType E] in |
| 500 | /-- If the free entries of `u` vanish in the rows e_d with d ≥ a and the imaginary parts at |
| 501 | (e_d, e*_d) vanish for d > a, then at each place right multiplication by `u` adds the (e_a, e*_a) |
| 502 | entry of `u` to that of `x`. -/ |
| 503 | lemma mul_apply_eStar_of_rowCoords {u : InfinitePlace E → (𝔰.middleGram (1 : ℂ)).besselU} |
| 504 | {a : Fin 𝔰.ϱ} (h_free : ∀ d : Fin 𝔰.ϱ, a ≤ d → freeRowCoords u d = 0) |
| 505 | (h_im : ∀ d : Fin 𝔰.ϱ, a < d → imRowCoords u d = 0) (v : InfinitePlace E) |
| 506 | (x : (𝔰.middleGram (1 : ℂ)).besselU) : |
| 507 | (↑(x * u v) : Matrix 𝔰.BesselIndex 𝔰.BesselIndex ℂ) (inl a) (eStar a) = |
| 508 | (u v : Matrix 𝔰.BesselIndex 𝔰.BesselIndex ℂ) (inl a) (eStar a) + |
| 509 | (x : Matrix 𝔰.BesselIndex 𝔰.BesselIndex ℂ) (inl a) (eStar a) := by |
| 510 | refine besselU_mul_apply_eq_add x (u v) (.inl rfl) (fun d hd ↦ congrFun (h_im d hd) v) |
| 511 | fun d k hd hk ↦ congrFun₂ (h_free d ?_) ⟨k, hk⟩ v |
| 512 | simpa [le_iff_lt_or_eq] using hd |
| 513 | |
| 514 | section Lattices |
| 515 | |
| 516 | /-! In this section `c` is a class and e_a is a row; `S` is admissible unless this is omitted. -/ |
| 517 | |
| 518 | open scoped Classical |
| 519 | |
| 520 | variable [HasPrimitiveRoot5040 E] |
| 521 | |
| 522 | /-- The transpose of the square block of the lattice basis `classBasis c` on the free columns |
| 523 | (`IsFreeEntry`) of the row e_a, as an invertible matrix. -/ |
| 524 | noncomputable def freeBlock (c : S.Classes) (a : Fin 𝔰.ϱ) : |
| 525 | GL {j : 𝔰.BesselIndex // IsFreeEntry (a, j)} (𝔸f E) := |
| 526 | .mk'' ((classBasis c).val.toSquareBlockProp fun j ↦ IsFreeEntry (a, j))ᵀ <| by |
| 527 | obtain ⟨M, h_basis, -⟩ := exists_classBasis_eq_fromBlocks c |
| 528 | simp [det_toSquareBlockProp_isFreeEntry h_basis] |
| 529 | |
| 530 | /-- Multiplying `(freeBlock c a).val` with `l ∘ Subtype.val` at a free |
| 531 | entry agrees with `l ᵥ* (classBasis c).val`. -/ |
| 532 | lemma freeBlock_mulVec (c : S.Classes) (a : Fin 𝔰.ϱ) (l : 𝔰.BesselIndex → 𝔸f E) |
| 533 | (j : {j : 𝔰.BesselIndex // IsFreeEntry (a, j)}) : |
| 534 | ((freeBlock c a).val *ᵥ l ∘ Subtype.val) j = (l ᵥ* (classBasis c).val) j := by |
| 535 | obtain ⟨M, h_basis, -⟩ := exists_classBasis_eq_fromBlocks c |
| 536 | exact transpose_toSquareBlockProp_mulVec h_basis a l j |
| 537 | |
| 538 | lemma genIndex_det_freeBlock (c : S.Classes) (a : Fin 𝔰.ϱ) : |
| 539 | genIndex (freeBlock c a).val.det = 1 / S.N ^ numInfPlaces E := by |
| 540 | obtain ⟨M, h_basis, h_index⟩ := exists_classBasis_eq_fromBlocks c |
| 541 | rw [← h_index, freeBlock, GeneralLinearGroup.val_mk'', det_transpose, |
| 542 | det_toSquareBlockProp_isFreeEntry h_basis, h_basis] |
| 543 | simp |
| 544 | |
| 545 | omit [HasPrimitiveRoot5040 E] in |
| 546 | variable (S) in |
| 547 | /-- For each `a`, the scales `S.M / S.basisScale v (inl a) * S.basisScale v j` are nonzero for all |
| 548 | infinite places `v` and all `j` with `IsFreeEntry (a, j)`. Here `inl a` indexes the basis vector |
| 549 | e_a. So this family of scales is a unit. -/ |
| 550 | lemma isUnit_basisScale_ratio (a : Fin 𝔰.ϱ) : |
| 551 | IsUnit fun (j : {j : 𝔰.BesselIndex // IsFreeEntry (a, j)}) (v : InfinitePlace E) ↦ |
| 552 | (S.M : ℂ) / S.basisScale v (inl a) * S.basisScale v j := by |
| 553 | simp [Nat.Prime.ne_zero, Pi.isUnit_iff] |
| 554 | |
| 555 | /-- The lattice of free entries of the row e_a for the class `c`: the vectors with entries |
| 556 | `S.M / S.basisScale v e_a * S.basisScale v j * Φ v (x j)`, for the rational vectors `x` on the free |
| 557 | columns `j` such that `freeBlock c a *ᵥ x` is integral. Here `S.basisScale v j` is the scale of the |
| 558 | basis vector `j` at the infinite place `v`, and `Φ v` is the chosen complex embedding at `v`. -/ |
| 559 | noncomputable def freeLattice (c : S.Classes) (a : Fin 𝔰.ϱ) : |
| 560 | AddSubmonoid ({j : 𝔰.BesselIndex // IsFreeEntry (a, j)} → InfinitePlace E → ℂ) := |
| 561 | (Variety.classLattice (freeBlock c a)⁻¹ ⊥ |
| 562 | (ContinuousLinearEquiv.smulLeft (isUnit_basisScale_ratio S a).unit)).toAddSubmonoid |
| 563 | |
| 564 | /-- Let `S` be a filling of shape `𝔰` over the CM field `E` containing a primitive 5040th root of |
| 565 | unity, with `S` admissible. For `c` in `S.Classes`, the lattice `freeLattice c a` of free entries of |
| 566 | the row e_a has a measurable strict fundamental domain. Its volume is `((∏ v, S.M ^ |
| 567 | 2 / S.frameScaleSq v a) / volÔ E) ^ (a.rev + (𝔰.k + 1) + a.rev)`, the exponent being the number of |
| 568 | free columns. -/ |
| 569 | lemma exists_fundamental_domain_freeLattice (c : S.Classes) (a : Fin 𝔰.ϱ) : |
| 570 | ∃ F : Set ({j : 𝔰.BesselIndex // IsFreeEntry (a, j)} → InfinitePlace E → ℂ), |
| 571 | MeasurableSet F ∧ |
| 572 | volume.real F = ((∏ v : InfinitePlace E, (S.M : ℝ) ^ 2 / S.frameScaleSq v a) / volÔ E) ^ |
| 573 | (a.rev + (𝔰.k + 1) + a.rev : ℕ) ∧ |
| 574 | ∀ x : {j : 𝔰.BesselIndex // IsFreeEntry (a, j)} → InfinitePlace E → ℂ, |
| 575 | ∃! l : freeLattice c a, l.val + x ∈ F := by |
| 576 | obtain ⟨F, hF_meas, hF_vol, hF_fund⟩ := |
| 577 | exists_fundamental_domain_classLattice _ (isUnit_basisScale_ratio S a) (freeBlock c a) |
| 578 | exact ⟨F, hF_meas, by rw [hF_vol, genIndex_det_freeBlock, prod_norm_basisScale_sq_div_eq], |
| 579 | hF_fund⟩ |
| 580 | |
| 581 | /-- Let `E` contain a primitive 5040th root of unity and let `S` be admissible. The free entries |
| 582 | (`IsFreeEntry`) of the row e_a of the real image of any `γ ∈ S.classUnipotent c` lie in |
| 583 | `freeLattice c a`, the lattice of rescaled rational vectors `x` on the free columns with |
| 584 | `freeBlock c a *ᵥ x` integral. -/ |
| 585 | lemma rowCoords_fst_mem_freeLattice (c : S.Classes) (a : Fin 𝔰.ϱ) (γ : S.classUnipotent c) : |
| 586 | freeRowCoords (classUnipotentToInf c γ) a ∈ freeLattice c a := by |
| 587 | let row : 𝔰.BesselIndex → 𝔸f E := |
| 588 | finAdeleMatrix ((S.M : E)⁻¹ • ((γ : Matrix 𝔰.BesselIndex 𝔰.BesselIndex E) - 1)) (inl a) |
| 589 | have h_int (j : {j : 𝔰.BesselIndex // IsFreeEntry (a, j)}) : |
| 590 | ((freeBlock c a).val *ᵥ row ∘ Subtype.val) j ∈ Ô E := by |
| 591 | simpa only [freeBlock_mulVec] using classUnipotent_sub_one_div_M_row_integral γ a j |
| 592 | refine ⟨_, torsionClass_eq_zero.2 h_int, ?_⟩ |
| 593 | have hM : (S.M : ℂ) ≠ 0 := by simp [Nat.Prime.ne_zero] |
| 594 | simp [funext_iff, mul_assoc, freeRowCoords, coe_classUnipotentToInf_apply, |
| 595 | inl_ne_coe_isFreeEntry, field, -Nat.cast_mul] |
| 596 | |
| 597 | /-- Let `E` contain a primitive 5040th root of unity and let `S` be admissible. Fix a class `c` and |
| 598 | a row e_a; its free columns (`IsFreeEntry`) are e_b and e*_b with b > a and the middle block. Let |
| 599 | `l` lie in `freeLattice c a`: its entries are the rescaled complex embeddings of a rational vector |
| 600 | `x` on the free columns with `freeBlock c a *ᵥ x` integral, `freeBlock c a` being the transposed |
| 601 | block of the lattice basis of `c` on these columns. Then `l` is the vector of free entries in the |
| 602 | row e_a of the real image of some `γ ∈ S.classUnipotent c`, for which all coordinates `rowCoords` |
| 603 | vanish in the rows e_d with d > a. -/ |
| 604 | lemma exists_rowCoords_fst_eq (c : S.Classes) (a : Fin 𝔰.ϱ) |
| 605 | {l : {j : 𝔰.BesselIndex // IsFreeEntry (a, j)} → InfinitePlace E → ℂ} |
| 606 | (hl : l ∈ freeLattice c a) : |
| 607 | ∃ γ : S.classUnipotent c, |
| 608 | freeRowCoords (classUnipotentToInf c γ) a = l ∧ |
| 609 | (∀ d : Fin 𝔰.ϱ, a < d → freeRowCoords (classUnipotentToInf c γ) d = 0) ∧ |
| 610 | ∀ d : Fin 𝔰.ϱ, a < d → imRowCoords (classUnipotentToInf c γ) d = 0 := by |
| 611 | obtain ⟨x, hx, hxl⟩ := hl |
| 612 | obtain ⟨M, h_basis, -⟩ := exists_classBasis_eq_fromBlocks c |
| 613 | rw [← extend_comp Subtype.val_injective x 0] at hx hxl |
| 614 | -- `x`, extended by zero off the free positions, has integral coordinates in the lattice basis. |
| 615 | have hx_int : algebraMap E (𝔸f E) ∘ extend Subtype.val x 0 ᵥ* (classBasis c).val ∈ |
| 616 | intVectors (Ô E) 𝔰.BesselIndex := by |
| 617 | intro j |
| 618 | by_cases hj : IsFreeEntry (a, j) |
| 619 | · rw [← freeBlock_mulVec c a _ ⟨j, hj⟩] |
| 620 | exact torsionClass_eq_zero.1 hx _ |
| 621 | · revert j |
| 622 | simp +contextual [vecMul_fromBlocks, h_basis] |
| 623 | -- In the rows e_d, γ differs from 1 only in the row e_a and the column e*_a. |
| 624 | obtain ⟨γ, hγ⟩ := |
| 625 | exists_eichler_classUnipotent c a (fun _ hj ↦ extend_val_apply' (g := x) hj) hx_int 0 |
| 626 | refine ⟨γ, ?_, fun d hd ↦ ?_, fun d hd ↦ ?_⟩ |
| 627 | · simp [funext_iff, mul_assoc, ← hxl, freeRowCoords, coe_classUnipotentToInf_apply, basisScale, |
| 628 | field, inl_ne_coe_isFreeEntry, coe_isFreeEntry_ne_eStar, hγ] |
| 629 | · have h_col (j : {j : 𝔰.BesselIndex // IsFreeEntry (d, j)}) : j.val ≠ eStar a := by grind |
| 630 | simp [funext_iff, freeRowCoords, coe_classUnipotentToInf_apply, inl_ne_coe_isFreeEntry, hγ, |
| 631 | h_col, hd.ne'] |
| 632 | · simp [funext_iff, imRowCoords, coe_classUnipotentToInf_apply, hγ, hd.ne'] |
| 633 | |
| 634 | /-- Let `E` contain a primitive 5040th root of unity. Suppose that at the place `v`, right |
| 635 | multiplication by the image `classUnipotentToInf c γ v` of `γ ∈ S.classUnipotent c` |
| 636 | adds its (e_a, e*_a) entry to that of every `x` in `besselU`. Then the imaginary parts of this entry |
| 637 | of `classUnipotentToInf c γ` at all places form a vector `(S.M / S.frameScaleSq w a * Im Φ_w(s))_w` |
| 638 | for an integer `s` of `E` with `star s = -s` (`imSkewLattice`). -/ |
| 639 | lemma rowCoords_snd_mem_imSkewLattice (c : S.Classes) (a : Fin 𝔰.ϱ) (γ : S.classUnipotent c) |
| 640 | (v : InfinitePlace E) |
| 641 | (h_add : ∀ x : (𝔰.middleGram (1 : ℂ)).besselU, |
| 642 | (↑(x * classUnipotentToInf c γ v) : Matrix 𝔰.BesselIndex 𝔰.BesselIndex ℂ) (inl a) (eStar a) = |
| 643 | (classUnipotentToInf c γ v : Matrix 𝔰.BesselIndex 𝔰.BesselIndex ℂ) (inl a) (eStar a) + |
| 644 | (x : Matrix 𝔰.BesselIndex 𝔰.BesselIndex ℂ) (inl a) (eStar a)) : |
| 645 | imRowCoords (classUnipotentToInf c γ) a ∈ |
| 646 | imSkewLattice fun w : InfinitePlace E ↦ S.M / S.frameScaleSq w a := by |
| 647 | -- The entry of γ at (e_a, e*_a) is `S.M` times s, with s integral and skew. |
| 648 | refine ⟨IsIntegralClosure.mk' (𝓞 E) _ (isIntegral_inv_mul_apply_eStar γ a), RingOfIntegers.ext ?_, |
| 649 | ?_⟩ |
| 650 | · simpa using star_inv_mul_apply_eStar_eq_neg γ v a h_add |
| 651 | · have hM : (S.M : ℝ) ≠ 0 := by simp [Nat.Prime.ne_zero] |
| 652 | simp [pow_mul', funext_iff, imRowCoords, coe_classUnipotentToInf_apply, basisScale, field, |
| 653 | -Nat.cast_mul, -ofReal_div] |
| 654 | |
| 655 | /-- Let `E` contain a primitive 5040th root of unity. Fix a class `c` and a row e_a. Let `l` be a |
| 656 | vector `(S.M / S.frameScaleSq v a * Im Φ_v(s))_v` for an integer `s` of `E` with `star s = -s` |
| 657 | (`imSkewLattice`). Then `l` is the vector of imaginary parts at (e_a, e*_a) of the real image of |
| 658 | some `γ ∈ S.classUnipotent c` whose other coordinates `rowCoords` vanish. -/ |
| 659 | lemma exists_rowCoords_snd_eq (c : S.Classes) (a : Fin 𝔰.ϱ) {l : InfinitePlace E → ℝ} |
| 660 | (hl : l ∈ imSkewLattice fun v : InfinitePlace E ↦ S.M / S.frameScaleSq v a) : |
| 661 | ∃ γ : S.classUnipotent c, |
| 662 | imRowCoords (classUnipotentToInf c γ) a = l ∧ |
| 663 | freeRowCoords (classUnipotentToInf c γ) = 0 ∧ |
| 664 | ∀ d : Fin 𝔰.ϱ, d ≠ a → imRowCoords (classUnipotentToInf c γ) d = 0 := by |
| 665 | obtain ⟨s, hs, hsl⟩ := hl |
| 666 | obtain ⟨γ, hγ⟩ := exists_eichler_classUnipotent c a (l := 0) (by simp) (by simp) ⟨s, hs⟩ |
| 667 | refine ⟨γ, ?_, ?_, fun d hd ↦ ?_⟩ |
| 668 | · simp [pow_mul', funext_iff, mul_assoc, ← hsl, imRowCoords, coe_classUnipotentToInf_apply, |
| 669 | basisScale, field, hγ, -ofReal_div] |
| 670 | · funext d j v |
| 671 | by_cases hd : d = a |
| 672 | · subst hd |
| 673 | simp [freeRowCoords, coe_classUnipotentToInf_apply, inl_ne_coe_isFreeEntry, |
| 674 | coe_isFreeEntry_ne_eStar, hγ] |
| 675 | · simp [freeRowCoords, coe_classUnipotentToInf_apply, inl_ne_coe_isFreeEntry, hγ, hd] |
| 676 | · simp [funext_iff, imRowCoords, coe_classUnipotentToInf_apply, hγ, hd] |
| 677 | |
| 678 | end Lattices |
| 679 | |
| 680 | open scoped Classical in |
| 681 | /-- Let `S` be admissible and `c` a class, with finite adelic representative h_c. The group |
| 682 | `S.classUnipotent c` consists of the rational unipotent `γ` with h_c⁻¹ γ h_c in the principal |
| 683 | congruence subgroup of level `S.M`; let `Γ` be its image in the real unipotent group 𝖴_∞. In the |
| 684 | basis e₁, …, e_ϱ, middle block, e*₁, …, e*_ϱ, the map `rowCoords` sends a point of 𝖴_∞ to the free |
| 685 | entries of each row e_a and the imaginary parts of the entries at (e_a, e*_a), at all infinite |
| 686 | places. There are measurable sets `F a` and `F' a` such that each coset `u Γ` has exactly one point |
| 687 | with coordinates in the box over them. The product of the volumes of all `F a` and `F' a` is the |
| 688 | explicit number `S.unipotentCovolume`, which does not depend on `c`. -/ |
| 689 | lemma exists_box_existsUnique_rowCoords_mem [HasPrimitiveRoot5040 E] |
| 690 | (c : S.Classes) : |
| 691 | ∃ (F : ∀ a : Fin 𝔰.ϱ, Set ({j : 𝔰.BesselIndex // IsFreeEntry (a, j)} → InfinitePlace E → ℂ)) |
| 692 | (F' : Fin 𝔰.ϱ → Set (InfinitePlace E → ℝ)), |
| 693 | (∀ a : Fin 𝔰.ϱ, MeasurableSet (F a)) ∧ |
| 694 | (∀ a : Fin 𝔰.ϱ, MeasurableSet (F' a)) ∧ |
| 695 | (∏ a : Fin 𝔰.ϱ, volume.real (F a)) * ∏ a : Fin 𝔰.ϱ, volume.real (F' a) = S.unipotentCovolume ∧ |
| 696 | ∀ u : InfinitePlace E → (𝔰.middleGram (1 : ℂ)).besselU, |
| 697 | ∃! γ : (classUnipotentToInf c).range, |
| 698 | rowCoords (u * γ.val) ∈ Set.univ.pi F ×ˢ Set.univ.pi F' := by |
| 699 | -- The group translates the coordinates by explicit lattices, in a triangular way. So |
| 700 | -- `existsUnique_mul_mem_box` applies to fundamental domains of these lattices. |
| 701 | choose F hF_meas hF_vol hF_fund using exists_fundamental_domain_freeLattice c |
| 702 | choose F' hF'_meas hF'_vol hF'_fund using fun a : Fin 𝔰.ϱ ↦ |
| 703 | exists_fundamental_domain_im_skew (fun v ↦ S.M / S.frameScaleSq v a) |
| 704 | (by simp [Nat.Prime.ne_zero]) |
| 705 | refine ⟨F, F', hF_meas, hF'_meas, ?_, fun u ↦ ?_⟩ |
| 706 | · simp only [hF_vol, hF'_vol, unipotentCovolume_eq_prod] |
| 707 | -- The coordinates as one family: `inl a` for the free entries of the row e_a, `inr a` for the |
| 708 | -- imaginary parts. The type names the additive group in which each coordinate lies. |
| 709 | let coord (u : InfinitePlace E → (𝔰.middleGram (1 : ℂ)).besselU) : ∀ i : Fin 𝔰.ϱ ⊕ Fin 𝔰.ϱ, |
| 710 | (Sum.elim (fun a ↦ .of ({j // IsFreeEntry (a, j)} → InfinitePlace E → ℂ)) |
| 711 | (fun _ ↦ .of (InfinitePlace E → ℝ)) i : AddGrpCat) := |
| 712 | Sum.rec (freeRowCoords u) (imRowCoords u) |
| 713 | have h_coord_inj : coord.Injective := fun _ _ h ↦ |
| 714 | rowCoords_injective (Prod.ext (funext (congrFun h <| inl ·)) (funext (congrFun h <| inr ·))) |
| 715 | have h_coord_one_inl (d : Fin 𝔰.ϱ) : coord 1 (inl d) = 0 := |
| 716 | congrFun (congrArg Prod.fst rowCoords_one) d |
| 717 | have h_coord_one_inr (d : Fin 𝔰.ϱ) : coord 1 (inr d) = 0 := |
| 718 | congrFun (congrArg Prod.snd rowCoords_one) d |
| 719 | -- The last rows come first; in one row the free entries come before the imaginary part. |
| 720 | let deg : Fin 𝔰.ϱ ⊕ Fin 𝔰.ϱ → ℕ := Sum.elim (fun a ↦ 2 * a.rev) fun a ↦ 2 * a.rev + 1 |
| 721 | -- What the vanishing of the coordinates of lower degree means, row by row. |
| 722 | have h_low_inl {x : InfinitePlace E → (𝔰.middleGram (1 : ℂ)).besselU} {a : Fin 𝔰.ϱ} |
| 723 | (h_low : ∀ i, deg i < deg (inl a) → coord x i = coord 1 i) : |
| 724 | (∀ d, a < d → freeRowCoords x d = 0) ∧ ∀ d, a < d → imRowCoords x d = 0 := |
| 725 | ⟨fun d hd ↦ (h_low (inl d) (by grind)).trans (h_coord_one_inl d), |
| 726 | fun d hd ↦ (h_low (inr d) (by grind)).trans (h_coord_one_inr d)⟩ |
| 727 | have h_low_inr {x : InfinitePlace E → (𝔰.middleGram (1 : ℂ)).besselU} {a : Fin 𝔰.ϱ} |
| 728 | (h_low : ∀ i, deg i < deg (inr a) → coord x i = coord 1 i) : |
| 729 | (∀ d, a ≤ d → freeRowCoords x d = 0) ∧ ∀ d, a < d → imRowCoords x d = 0 := |
| 730 | ⟨fun d hd ↦ (h_low (inl d) (by grind)).trans (h_coord_one_inl d), |
| 731 | fun d hd ↦ (h_low (inr d) (by grind)).trans (h_coord_one_inr d)⟩ |
| 732 | refine (existsUnique_congr fun _ ↦ Sum.forall).1 |
| 733 | (existsUnique_mul_mem_box deg coord h_coord_inj (classUnipotentToInf c).range |
| 734 | (Sum.rec (freeLattice c) |
| 735 | fun a ↦ (imSkewLattice fun v ↦ S.M / S.frameScaleSq v a).toAddSubmonoid) |
| 736 | (Sum.rec F F') (Sum.rec hF_fund hF'_fund) ?attained ?in_lattice ?translates u) |
| 737 | case translates => |
| 738 | rintro γ (a | a) h_low x |
| 739 | · obtain ⟨h_free, h_im⟩ := h_low_inl h_low |
| 740 | exact rowCoords_mul_fst x h_free h_im |
| 741 | · obtain ⟨h_free, h_im⟩ := h_low_inr h_low |
| 742 | exact funext fun v ↦ congrArg im (mul_apply_eStar_of_rowCoords h_free h_im v (x v)) |
| 743 | case in_lattice => |
| 744 | rintro ⟨_, γ, rfl⟩ (a | a) h_low |
| 745 | · exact rowCoords_fst_mem_freeLattice c a γ |
| 746 | · obtain ⟨h_free, h_im⟩ := h_low_inr h_low |
| 747 | exact rowCoords_snd_mem_imSkewLattice c a γ Classical.ofNonempty |
| 748 | (mul_apply_eStar_of_rowCoords h_free h_im _) |
| 749 | case attained => |
| 750 | rintro (a | a) l hl |
| 751 | · obtain ⟨γ, hγ, h_free, h_im⟩ := exists_rowCoords_fst_eq c a hl |
| 752 | refine ⟨⟨_, γ, rfl⟩, hγ, ?_⟩ |
| 753 | rintro (d | d) h_ne h_deg |
| 754 | · exact (h_free d (by grind)).trans (h_coord_one_inl d).symm |
| 755 | · exact (h_im d (by grind)).trans (h_coord_one_inr d).symm |
| 756 | · obtain ⟨γ, hγ, h_free, h_im⟩ := exists_rowCoords_snd_eq c a hl |
| 757 | refine ⟨⟨_, γ, rfl⟩, hγ, ?_⟩ |
| 758 | rintro (d | d) h_ne - |
| 759 | · exact (congrFun h_free d).trans (h_coord_one_inl d).symm |
| 760 | · exact (h_im d fun hd ↦ h_ne (congrArg inr hd)).trans (h_coord_one_inr d).symm |
| 761 | |
| 762 | end Coordinates |
| 763 | |
| 764 | /-- Let `E` contain a primitive 5040th root of unity and let `S` be admissible. For every class `c` |
| 765 | and archimedean point `y`, the integral of the cutoff `u ↦ S.classCutoff c (u y)` over the real |
| 766 | unipotent group 𝖴_∞, for the product of the Haar measures `New.Shape.besselHaar`, is the number |
| 767 | `S.unipotentCovolume`, which depends neither on `c` nor on `y`. |
| 768 | |
| 769 | A case of the covolume computation for Heisenberg radicals, with a fixed product Haar measure in |
| 770 | place of Tate's self-dual measures. -/ |
| 771 | lemma lintegral_classCutoff_eq_unipotentCovolume {E : Type} [Field E] [CMType E] |
| 772 | [HasPrimitiveRoot5040 E] {𝔰 : Shape} (S : Filling E 𝔰) (c : S.Classes) [S.IsAdmissible] |
| 773 | (y : InfinitePlace E → 𝔰.G₁) : |
| 774 | ∫⁻ u : InfinitePlace E → (𝔰.middleGram (1 : ℂ)).besselU, |
| 775 | S.classCutoff c (fun v : InfinitePlace E ↦ u v * y v) ∂(.pi fun _ ↦ 𝔰.besselHaar) = |
| 776 | .ofReal S.unipotentCovolume := by |
| 777 | classical |
| 778 | -- The integral is the measure of a box that meets each coset of `S.classUnipotent c` once. |
| 779 | obtain ⟨F, F', hF_meas, hF'_meas, h_vol, h_unique⟩ := exists_box_existsUnique_rowCoords_mem c |
| 780 | have h_box : MeasurableSet (Set.univ.pi F ×ˢ Set.univ.pi F') := |
| 781 | (MeasurableSet.univ_pi hF_meas).prod (.univ_pi hF'_meas) |
| 782 | have h_real : ((∏ a, volume (F a)) * ∏ a, volume (F' a)).toReal = S.unipotentCovolume := by |
| 783 | simp [← h_vol, measureReal_def] |
| 784 | rw [lintegral_classCutoff_eq_measure c y (measurePreserving_rowCoords.measurable h_box) h_unique, |
| 785 | measurePreserving_rowCoords.measure_preimage h_box.nullMeasurableSet, Measure.prod_prod, |
| 786 | volume_pi_pi, volume_pi_pi, ← h_real, ofReal_toReal] |
| 787 | -- An infinite measure would have real value 0, but `S.unipotentCovolume` is positive. |
| 788 | exact fun h_top ↦ S.unipotentCovolume_pos.ne (by simpa [h_top] using h_real) |
| 789 | |
| 790 | end New.Filling |
| 791 | |
| 792 | end UnipotentCovolume |