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 New.Spanning.Unfolding.Terms |
| 4 | import Lib.General.NumberTheory.LatticeCovolumes |
| 5 | import New.Spanning.RemainingTerms.BorderedDeterminant |
| 6 | |
| 7 | /-! |
| 8 | # Eichler-type unipotent elements, colouring bounds and reduced points |
| 9 | |
| 10 | This file gives explicit elements of the congruence subgroup `New.Filling.classUnipotent` of |
| 11 | `New.Shape.Form.besselU` by Eichler's formula along isotropic basis vectors `e_a`. It also proves |
| 12 | counting tools for the remaining terms: weighted sums are bounded by colouring, and the index of a |
| 13 | scaled lattice is computed. |
| 14 | Finally, every point at the infinite places is moved to a reduced point by exactly one coset of |
| 15 | unipotent elements, so that the indicator of the reduced points is a partition of unity in boxes. |
| 16 | |
| 17 | ## Main definitions and results |
| 18 | |
| 19 | * `New.Filling.exists_mem_classUnipotent_eq_one_add_smul`: the general element, along several `e_a` |
| 20 | at once. |
| 21 | * `New.Filling.exists_eichler_classUnipotent`: an element with one prescribed row. |
| 22 | * `New.Filling.tsum_le_of_encard_range_le`: a weighted sum is at most the number of colours times |
| 23 | the bound for one colour; `New.Filling.tsum_le_relIndex_pow_mul`: colours are residue classes |
| 24 | modulo a subgroup of finite index. |
| 25 | * `New.Filling.IsResidueDomain.exists_mul_mem_reducedPoints_iff_rightCoset`: exactly one coset of |
| 26 | unipotent elements moves a point to a reduced point (`New.Filling.reducedPoints`). |
| 27 | * `New.Filling.IsResidueDomain.isBoxPartitionOfUnity`: the indicator of the reduced points has the |
| 28 | properties `New.Filling.IsBoxPartitionOfUnity`. |
| 29 | |
| 30 | Notions from other files: |
| 31 | * `New.Filling.classUnipotent c`: the group `𝖴_c(M)` of rational unipotent elements that lie in the |
| 32 | principal congruence subgroup at the class `c`; `New.Filling.classUnipotent₀ c` is its subgroup |
| 33 | fixing the frame `e_1, …, e_ϱ, z`, whose indices are given by `New.Shape.besselFrame`. |
| 34 | * `New.Filling.IsResidueDomain`: a measurable set `D` of representatives modulo `M 𝓞_E` of modulus |
| 35 | at most `b ^ 26`; `New.Filling.reducedPoints D`: the points with all entries of their triangular |
| 36 | matrix above the diagonal in `D`. |
| 37 | * `New.Filling.IsAdmissible`: the standing hypotheses, among them `|ϖ| ≤ b` and `1 ≤ |κ_v|` at |
| 38 | every infinite place. |
| 39 | |
| 40 | Here and below `M = S.M` is the level of the filling data `S`. |
| 41 | -/ |
| 42 | |
| 43 | @[expose] public section |
| 44 | |
| 45 | namespace New.Filling |
| 46 | |
| 47 | /-! |
| 48 | ## Eichler-type elements of the unipotent congruence subgroups |
| 49 | |
| 50 | Indices `𝔰.BesselIndex` come in three blocks: `.inl a` for `e_a`, a middle block, and |
| 51 | `.inr (.inr a)` for the dual vector `e*_a`. The middle block has the indices of the vector `z` and |
| 52 | those of the space `X₀`, given by `𝔰.indexX₀`. `S.ratGram` is the Gram matrix, `S.M` the level, |
| 53 | `New.Filling.finAdeleMatrix` maps a rational matrix to the finite adeles, and `S.classCoord c` |
| 54 | passes to coordinates in the basis `New.Filling.classBasis c` of the lattice of the class `c`. |
| 55 | -/ |
| 56 | |
| 57 | section UnipotentElements |
| 58 | |
| 59 | open Matrix Floors NumberField Set |
| 60 | |
| 61 | variable {E : Type} [Field E] [CMType E] {𝔰 : Shape} {S : Filling E 𝔰} |
| 62 | |
| 63 | /-- Eichler maps are isometries. Let `J` be hermitian, let the columns of `x` be isotropic and |
| 64 | orthogonal to each other and to those of `u`, let `s` be skew-hermitian, and let `g = star g` and |
| 65 | `τ + star τ = g`. Then `1 + g (x uᴴ J - (u + x (τ uᴴ J u - s)) xᴴ J)` preserves `J`. -/ |
| 66 | lemma conjTranspose_eichler_mul_mul {n m : Type} [Fintype n] [DecidableEq n] [Fintype m] |
| 67 | {J : Matrix n n E} (hJ : Jᴴ = J) {x u : Matrix n m E} {s : Matrix m m E} {g τ : E} |
| 68 | (hxu : xᴴ * J * u = 0) (hxx : xᴴ * J * x = 0) (h_skew : sᴴ = -s) (hg : star g = g) |
| 69 | (hτ : τ + star τ = g) : |
| 70 | (1 + g • (x * (uᴴ * J) - (u + x * (τ • (uᴴ * J * u) - s)) * (xᴴ * J)))ᴴ * J * |
| 71 | (1 + g • (x * (uᴴ * J) - (u + x * (τ • (uᴴ * J * u) - s)) * (xᴴ * J))) = J := by |
| 72 | -- Expand: the products through `xᴴ J u`, `xᴴ J x`, `uᴴ J x` vanish, and the rest cancels. |
| 73 | have hux : uᴴ * J * x = 0 := orthogonal_symm hJ hxu |
| 74 | have h_zero (v : Matrix m n E) : xᴴ * (J * (u * v)) = 0 ∧ xᴴ * (J * (x * v)) = 0 ∧ |
| 75 | uᴴ * (J * (x * v)) = 0 := by |
| 76 | simp only [← Matrix.mul_assoc, hxu, hxx, hux, Matrix.zero_mul, and_self] |
| 77 | simp [h_skew, hJ, hg, eq_sub_of_add_eq' hτ, h_zero, Matrix.mul_assoc, Matrix.mul_sub, |
| 78 | Matrix.add_mul, Matrix.sub_mul, Matrix.mul_add] |
| 79 | module |
| 80 | |
| 81 | /-- Eichler maps along the columns `e_{p b}` are unitriangular. Let `J = S.ratGram` be the Gram |
| 82 | matrix over `E` of the filling-theorem data `S`. Let `x` have the columns `e_{p b}`. Let the columns |
| 83 | of `u` have coordinate `0` at the dual vector `e*_a` (index `eStar a`) whenever `a ≤ p b'` for some |
| 84 | `b'`. Then entry `(i, j)` of Eichler's matrix `x uᴴ J - (u + x (τ uᴴ J u - s)) xᴴ J` is `0` whenever |
| 85 | `BesselIndex.level j ≤ BesselIndex.level i`. -/ |
| 86 | lemma eichler_apply_eq_zero_of_level_le {m : Type} [Fintype m] {p : m → Fin 𝔰.ϱ} |
| 87 | {u : Matrix 𝔰.BesselIndex m E} {x : Matrix 𝔰.BesselIndex m E} (s : Matrix m m E) (τ : E) |
| 88 | (hu_zero : ∀ (a : Fin 𝔰.ϱ) (b b' : m), a ≤ p b' → u (eStar a) b = 0) |
| 89 | (hx : inclMatrix E (fun b : m ↦ (Sum.inl (p b) : 𝔰.BesselIndex)) = x) : |
| 90 | ∀ i j : 𝔰.BesselIndex, BesselIndex.level j ≤ BesselIndex.level i → |
| 91 | (x * (uᴴ * S.ratGram) - (u + x * (τ • (uᴴ * S.ratGram * u) - s)) * (xᴴ * S.ratGram)) i j = |
| 92 | 0 := by |
| 93 | simp [← hx, splitGram, BesselIndex.level, inclMatrix, Matrix.mul_sub, |
| 94 | Matrix.add_mul, Matrix.sub_mul, Matrix.one_apply, Matrix.mul_apply, sub_eq_zero] |
| 95 | grind [Finset.sum_eq_zero, star_zero] |
| 96 | |
| 97 | /-- Eichler maps have level `M = S.M`. Let `J = S.ratGram` be the Gram matrix. Let the columns of |
| 98 | `x` and `u` lie in the lattice of the class `c`, let the matrix `s` and the number `τ` be integral, |
| 99 | and let the rational isometry `γ` have the matrix `1 + M (x uᴴ J - (u + x (τ uᴴ J u - s)) xᴴ J)`. |
| 100 | Then `M⁻¹ (γ' - 1)` has entries in `Ô`, where `γ' = S.translateByClassReps c c γ` is `γ` written in |
| 101 | the basis of the lattice and `S.ideleM` is `M` as a unit of the finite adeles. -/ |
| 102 | lemma isIntMatrix_ideleM_inv_smul_eichler (c : S.Classes) {m : Type} [Fintype m] |
| 103 | {x u : Matrix 𝔰.BesselIndex m E} {s : Matrix m m E} |
| 104 | (hx : IsIntMatrix (Ô E) (S.classCoord c * finAdeleMatrix x)) |
| 105 | (hu : IsIntMatrix (Ô E) (S.classCoord c * finAdeleMatrix u)) |
| 106 | (hs : IsIntMatrix (Ô E) (finAdeleMatrix s)) {τ : E} (hτ : algebraMap E (𝔸f E) τ ∈ Ô E) |
| 107 | {γ : S.G E} (h_val : γ.val.val = 1 + (S.M : E) • |
| 108 | (x * (uᴴ * S.ratGram) - (u + x * (τ • (uᴴ * S.ratGram * u) - s)) * (xᴴ * S.ratGram))) : |
| 109 | IsIntMatrix (Ô E) (S.ideleM⁻¹ • ((S.translateByClassReps c c γ).val.val - 1)) := by |
| 110 | -- In the basis of the lattice this is the same expression in integral matrices, as |
| 111 | -- `classCoord_conj_splitGram` moves `J` to that basis. |
| 112 | have hJ : IsIntMatrix (Ô E) (S.latticeMiddle (𝔸f E)).splitGram := |
| 113 | S.isUnimodular_latticeMiddle.splitGram.isIntMatrix |
| 114 | let J' : Matrix 𝔰.BesselIndex 𝔰.BesselIndex (𝔸f E) := (S.latticeMiddle (𝔸f E)).splitGram |
| 115 | let X : Matrix 𝔰.BesselIndex m (𝔸f E) := S.classCoord c * finAdeleMatrix x |
| 116 | let V : Matrix 𝔰.BesselIndex m (𝔸f E) := S.classCoord c * finAdeleMatrix u |
| 117 | let W : Matrix m m (𝔸f E) := algebraMap E (𝔸f E) τ • (Vᴴ * (J' * V)) - finAdeleMatrix s |
| 118 | have h_inner : IsIntMatrix (Ô E) W := |
| 119 | ((hu.conjTranspose.mul (hJ.mul hu)).smul hτ).sub hs |
| 120 | have h_eq : S.ideleM⁻¹ • ((S.translateByClassReps c c γ).val.val - 1) = |
| 121 | (X * Vᴴ - (V + X * W) * Xᴴ) * J' := by |
| 122 | simp [h_val, X, V, W, J', ↓inv_smul_eq_iff, coe_translateByClassReps, Matrix.map_add, |
| 123 | Matrix.map_sub, ideleM, Units.smul_def, ← classCoord_conj_splitGram c, Matrix.mul_assoc, |
| 124 | Matrix.mul_sub, Matrix.add_mul, Matrix.sub_mul, finAdeleMatrix_conjTranspose, |
| 125 | map_splitGram_ratMiddle, classCoord, Matrix.mul_add] |
| 126 | rw [h_eq] |
| 127 | exact ((hx.mul hu.conjTranspose).sub |
| 128 | ((hu.add (hx.mul h_inner)).mul hx.conjTranspose)).mul hJ |
| 129 | |
| 130 | /-- A general element of `𝖴_c(M)`, given by Eichler's formula, when `E` contains a primitive 5040th |
| 131 | root of unity. Let `J = S.ratGram`. Let `x` have the columns `e_{p b}`. Let the columns of `u` lie |
| 132 | in the lattice of the class `c`. Let `u` also have coordinate `0` at the dual vector `e*_a` (index |
| 133 | `eStar a`) for all `b, b'` and every `a ≤ p b'`. Let `s` be integral and skew-hermitian. Then there |
| 134 | is `γ` in the group `𝖴_c(M)` of rational unipotent elements of level `M = S.M` at `c` with two |
| 135 | properties. (a) `γ` fixes the frame `e₁, …, e_ϱ, z`, that is, it lies in `S.classUnipotent₀ c`, if |
| 136 | the columns of `u` are orthogonal to the frame. (b) `γ` has the matrix |
| 137 | `1 + M (x uᴴ J - (u + x (τ uᴴ J u - s)) xᴴ J)` for some `τ : E`. -/ |
| 138 | lemma exists_mem_classUnipotent_eq_one_add_smul [HasPrimitiveRoot5040 E] (c : S.Classes) {m : Type} |
| 139 | [Fintype m] (p : m → Fin 𝔰.ϱ) (u : Matrix 𝔰.BesselIndex m E) (s : Matrix m m E) |
| 140 | {x : Matrix (Fin 𝔰.ϱ ⊕ 𝔰.MiddleIndex ⊕ Fin 𝔰.ϱ) m E} |
| 141 | (hu_zero : ∀ (a : Fin 𝔰.ϱ) (b b' : m), a ≤ p b' → u (eStar a) b = 0) (h_skew : sᴴ = -s) |
| 142 | (hu_int : IsIntMatrix (Ô E) (S.classCoord c * finAdeleMatrix u)) |
| 143 | (hs_int : IsIntMatrix (Ô E) (finAdeleMatrix s)) |
| 144 | (hx_eq : inclMatrix E (fun b : m ↦ (Sum.inl (p b) : 𝔰.BesselIndex)) = x) : |
| 145 | ∃ γ ∈ S.classUnipotent c, |
| 146 | -- (a) `γ` fixes the frame if `u` is orthogonal to it |
| 147 | ((∀ (b : m) (a : Fin (𝔰.ϱ + 1)), (uᴴ * S.ratGram) b (𝔰.besselFrame a) = 0) → |
| 148 | γ ∈ S.classUnipotent₀ c) ∧ |
| 149 | -- (b) the matrix of `γ` |
| 150 | ∃ τ : E, |
| 151 | γ.val.val = 1 + |
| 152 | (S.M : E) • |
| 153 | (x * (uᴴ * S.ratGram) - |
| 154 | (u + x * (τ • (uᴴ * S.ratGram * u) - s)) * (xᴴ * S.ratGram)) := by |
| 155 | -- The matrix is an Eichler map along the isotropic columns `x`; take `τ = S.M * τ₀` with an |
| 156 | -- integer `τ₀` such that `τ₀ + star τ₀ = 1`. |
| 157 | obtain ⟨-, τ₀, -, -, hτ₀, -⟩ := |
| 158 | HasPrimitiveRoot5040.exists_mul_self_eq_neg_one_and_mul_star_eq_two (E := E) |
| 159 | -- the columns `e_{p b}` of `x` are orthogonal to `u`, to `x` and to the frame, and integral |
| 160 | have hxu : xᴴ * S.ratGram * u = 0 := by |
| 161 | ext b b' |
| 162 | simp [← hx_eq, splitGram, inclMatrix, Matrix.mul_apply, Matrix.one_apply, |
| 163 | hu_zero (p b) b' b le_rfl] |
| 164 | have hxx : xᴴ * S.ratGram * x = 0 := by |
| 165 | ext b b' |
| 166 | simp [← hx_eq, splitGram, inclMatrix, Matrix.mul_apply, Matrix.one_apply] |
| 167 | have hx_frame (b : m) (a : Fin (𝔰.ϱ + 1)) : (xᴴ * S.ratGram) b (𝔰.besselFrame a) = 0 := by |
| 168 | induction a using Fin.lastCases <;> |
| 169 | simp [← hx_eq, splitGram, inclMatrix, Matrix.mul_apply, Matrix.one_apply] |
| 170 | have hx_int : IsIntMatrix (Ô E) (S.classCoord c * finAdeleMatrix x) := by |
| 171 | simp [← hx_eq, IsIntMatrix, ↓classCoord_eq_fromBlocks, ite_mem, inclMatrix, Matrix.mul_apply, |
| 172 | Matrix.one_apply] |
| 173 | let A : Matrix 𝔰.BesselIndex 𝔰.BesselIndex E := |
| 174 | x * (uᴴ * S.ratGram) - (u + x * ((S.M * τ₀ : E) • (uᴴ * S.ratGram * u) - s)) * (xᴴ * S.ratGram) |
| 175 | have h_unitary : (1 + (S.M : E) • A)ᴴ * S.ratGram * (1 + (S.M : E) • A) = S.ratGram := by |
| 176 | have h_star : star (S.M : E) = S.M := star_natCast _ |
| 177 | have h_trace : (S.M * τ₀ : E) + star (S.M * τ₀ : E) = S.M := by |
| 178 | simp [← coe_star_ringOfIntegers, eq_sub_of_add_eq' hτ₀] |
| 179 | ring |
| 180 | exact conjTranspose_eichler_mul_mul IsHermitianUnit.conjTranspose_eq hxu hxx h_skew h_star |
| 181 | h_trace |
| 182 | let γ : S.G E := U.of IsHermitianUnit.isUnit _ h_unitary |
| 183 | have hγ : γ ∈ S.classUnipotent c := by |
| 184 | -- `γ` is unitriangular, and it has level `S.M` since `(S.M)⁻¹ (γ - 1) = A` is integral in the |
| 185 | -- basis of the unimodular lattice (`IsUnimodular.mem_unitaryLevel`) |
| 186 | have h_unitri : ∀ i j : 𝔰.BesselIndex, BesselIndex.level j ≤ BesselIndex.level i → |
| 187 | γ.val.val i j = (1 : Matrix 𝔰.BesselIndex 𝔰.BesselIndex E) i j := by |
| 188 | intro i j hij |
| 189 | have h_A : A i j = 0 := eichler_apply_eq_zero_of_level_le s _ hu_zero hx_eq i j hij |
| 190 | simp [γ, ↓U.val_of_coe, h_A] |
| 191 | have h_level : IsIntMatrix (Ô E) (S.ideleM⁻¹ • ((S.translateByClassReps c c γ).val.val - 1)) := |
| 192 | isIntMatrix_ideleM_inv_smul_eichler c hx_int hu_int hs_int (coe_mem_Ô (S.M * τ₀ : 𝓞 E)) |
| 193 | (by simp [γ, A]) |
| 194 | exact ⟨mem_besselU.2 h_unitri, S.principalLevel_eq_unitaryLevel.ge |
| 195 | (S.isUnimodular_latticeMiddle.splitGram.mem_unitaryLevel S.ideleM_mem h_level)⟩ |
| 196 | refine ⟨γ, hγ, fun hu_frame ↦ ⟨hγ, hγ.left, fun i ↦ forall_mem_range.2 fun a ↦ ?_⟩, |
| 197 | S.M * τ₀, rfl⟩ |
| 198 | -- the columns of `γ - 1` at the frame vanish, as `u` and `x` are orthogonal to the frame |
| 199 | change γ.val.val i (𝔰.besselFrame a) = |
| 200 | (1 : Matrix 𝔰.BesselIndex 𝔰.BesselIndex E) i (𝔰.besselFrame a) |
| 201 | simp [γ, A, hu_frame, hx_frame, Matrix.mul_assoc, Matrix.mul_sub, Matrix.add_mul, Matrix.sub_mul, |
| 202 | Matrix.one_apply, Matrix.mul_apply] |
| 203 | |
| 204 | /-- An element of `𝖴_c(M) = S.classUnipotent c` with given rows at the `e_b`; here `M = S.M` is the |
| 205 | level and `E` contains a primitive 5040th root of unity. Let the row vector `l` vanish at `e_b` and |
| 206 | at the dual vector `e*_b` for all `b ≤ a`; these are exactly the indices `j` for which |
| 207 | `RealPlace.IsFreeEntry (a, j)` fails. Let `l` be integral on the lattice of the class `c`, spanned |
| 208 | over `Ô` by the columns of `classBasis c`, and let `s` be an integer of `E` with `star s = -s`. Then |
| 209 | some `γ` in `𝖴_c(M)` has, in `γ - 1` and outside the column `e*_a` (index `eStar a`), the row `M l` |
| 210 | at `e_a` and zero rows at the other `e_b`. If `l = 0`, the only entry of these rows that can be |
| 211 | nonzero is `M s` at `(e_a, e*_a)`. -/ |
| 212 | lemma exists_eichler_classUnipotent [HasPrimitiveRoot5040 E] (c : S.Classes) (a : Fin 𝔰.ϱ) |
| 213 | {l : Fin 𝔰.ϱ ⊕ 𝔰.MiddleIndex ⊕ Fin 𝔰.ϱ → E} |
| 214 | (hl_free : ∀ j : 𝔰.BesselIndex, ¬RealPlace.IsFreeEntry (a, j) → l j = 0) |
| 215 | (hl_int : |
| 216 | algebraMap E (𝔸f E) ∘ l ᵥ* (classBasis c).val ∈ |
| 217 | intVectors (Ô E) (Fin 𝔰.ϱ ⊕ 𝔰.MiddleIndex ⊕ Fin 𝔰.ϱ)) |
| 218 | (s : skewAdjoint (𝓞 E)) : |
| 219 | ∃ γ : S.classUnipotent c, ∀ (b : Fin 𝔰.ϱ) (j : SplitIndex 𝔰.ϱ 𝔰.MiddleIndex), |
| 220 | j ≠ eStar a ∨ l = 0 → |
| 221 | γ.val.val (Sum.inl b) j = |
| 222 | (if Sum.inl b = j then 1 else 0) + |
| 223 | S.M * if b = a then l j + (if j = eStar a then (s.val : E) else 0) else 0 := by |
| 224 | -- write `l = u ᵥ* J` and apply `exists_mem_classUnipotent_eq_one_add_smul` to the single columns |
| 225 | -- `e_a` and `uᴴ` |
| 226 | obtain ⟨u, rfl⟩ := S.ratGram.vecMul_surjective_iff_isUnit.2 IsHermitianUnit.isUnit l |
| 227 | have h_form : IsIntMatrix (Ô E) (finAdeleMatrix (of ![u] * S.ratGram) * (classBasis c).val) := by |
| 228 | intro i |
| 229 | rw [Subsingleton.elim i 0] |
| 230 | exact hl_int |
| 231 | -- the lattice is unimodular, so a vector whose linear form is integral lies in it |
| 232 | have hu : IsIntMatrix (Ô E) (S.classCoord c * finAdeleMatrix (of ![u])ᴴ) := by |
| 233 | obtain ⟨h_unit, h_inv⟩ := |
| 234 | (S.isUnimodular_latticeMiddle (F := 𝔸f E) (R := Ô E)).splitGram.isUnit_det_and_isIntMatrix_inv |
| 235 | have h_coord : S.classCoord c * finAdeleMatrix (of ![u])ᴴ = |
| 236 | (finAdeleMatrix (of ![u] * S.ratGram) * |
| 237 | (classBasis c).val * (S.latticeMiddle (𝔸f E)).splitGram⁻¹)ᴴ := by |
| 238 | simp [← classCoord_conj_splitGram c, h_unit, -cons_mul, classCoord, |
| 239 | finAdeleMatrix_conjTranspose, |
| 240 | map_splitGram_ratMiddle, Matrix.mul_assoc] |
| 241 | rw [h_coord] |
| 242 | exact (h_form.mul h_inv).conjTranspose |
| 243 | have h_zero (a' : Fin 𝔰.ϱ) (i i' : Fin 1) (ha' : a' ≤ ![a] i') : |
| 244 | (of ![u])ᴴ (eStar a') i = 0 := by |
| 245 | simp_all |
| 246 | have h_skew : !![(s.val : E)]ᴴ = -!![(s.val : E)] := |
| 247 | ext (by simp [← coe_star_ringOfIntegers]) |
| 248 | have h_int : IsIntMatrix (Ô E) (finAdeleMatrix !![(s.val : E)]) := by |
| 249 | intro i j |
| 250 | fin_cases i |
| 251 | fin_cases j |
| 252 | exact coe_mem_Ô _ |
| 253 | obtain ⟨γ, hγ, -, τ, h_val⟩ := |
| 254 | exists_mem_classUnipotent_eq_one_add_smul c ![a] (of ![u])ᴴ !![s.val] h_zero h_skew hu h_int rfl |
| 255 | refine ⟨⟨γ, hγ⟩, ?_⟩ |
| 256 | -- read off the rows `e_b` of `γ` |
| 257 | simp [h_val, splitGram, vecMul_eq_sum, funext_iff, Matrix.one_apply, inclMatrix, Matrix.add_mul, |
| 258 | Matrix.mul_assoc, Matrix.mul_apply] |
| 259 | intro b b' h_case |
| 260 | obtain h_ne | h_row := h_case |
| 261 | · obtain rfl | hb := eq_or_ne b a <;> simp [*, Ne.symm h_ne] |
| 262 | · obtain ⟨h_dual, ⟨h_X₀, h_z⟩, h_isotropic⟩ := h_row |
| 263 | simp [h_dual, h_X₀, h_z, h_isotropic] |
| 264 | aesop |
| 265 | |
| 266 | /-- For each vector `f_b` of the frame `e_1, …, e_ϱ, z` there is a rational linear form that is |
| 267 | integral on the lattice of the class `c`, spanned over `Ô` by the columns of `classBasis c`, takes |
| 268 | the value `1` at `f_b`, and vanishes at the other basis vectors outside `X₀` (whose indices are the |
| 269 | range of `𝔰.indexX₀`). -/ |
| 270 | lemma exists_integral_form_besselFrame (c : S.Classes) (b : Fin (𝔰.ϱ + 1)) : |
| 271 | ∃ l : 𝔰.BesselIndex → E, |
| 272 | (∀ j : 𝔰.BesselIndex, j ∉ range 𝔰.indexX₀ → l j = if j = 𝔰.besselFrame b then 1 else 0) ∧ |
| 273 | algebraMap E (𝔸f E) ∘ l ᵥ* (classBasis c).val ∈ intVectors (Ô E) 𝔰.BesselIndex := by |
| 274 | -- The vector `f_b` belongs to the basis of the lattice, and its coordinate is an adelic form of |
| 275 | -- this kind. Integrality is an open condition on the values on `X₀`, so rational values do. |
| 276 | let form (w : 𝔰.κ → 𝔸f E) : 𝔰.BesselIndex → 𝔸f E := |
| 277 | Pi.single (𝔰.besselFrame b) 1 + inclMatrix (𝔸f E) 𝔰.indexX₀ *ᵥ w |
| 278 | let U : Set (𝔰.κ → 𝔸f E) := |
| 279 | {w : 𝔰.κ → 𝔸f E | form w ᵥ* (classBasis c).val ∈ intVectors (Ô E) 𝔰.BesselIndex} |
| 280 | have h_open : IsOpen U := (isOpen_intVectors isOpen_Ô).preimage (by fun_prop) |
| 281 | have h_coord : form (fun i : 𝔰.κ ↦ S.classCoord c (𝔰.besselFrame b) (𝔰.indexX₀ i)) = |
| 282 | S.classCoord c (𝔰.besselFrame b) := by |
| 283 | induction b using Fin.lastCases <;> |
| 284 | simp [form, funext_iff, classCoord_eq_fromBlocks, inclMatrix, mulVec, dotProduct, |
| 285 | Matrix.one_apply, Pi.single_apply, eq_comm] |
| 286 | have h_dual : S.classCoord c (𝔰.besselFrame b) ᵥ* (classBasis c).val = |
| 287 | Pi.single (𝔰.besselFrame b) 1 := by |
| 288 | ext j |
| 289 | rw [← mul_apply_eq_vecMul, classCoord, Units.inv_mul, one_eq_pi_single] |
| 290 | have h_adelic : (fun i : 𝔰.κ ↦ S.classCoord c (𝔰.besselFrame b) (𝔰.indexX₀ i)) ∈ U := by |
| 291 | simp only [U, mem_ofPred_eq, h_coord, h_dual, single_mem_intVectors] |
| 292 | have h_dense : DenseRange fun w : 𝔰.κ → E ↦ algebraMap E (𝔸f E) ∘ w := |
| 293 | .piMap fun _ ↦ denseRange_algebraMap_finAdele |
| 294 | obtain ⟨w, hw⟩ : ∃ w : 𝔰.κ → E, algebraMap E (𝔸f E) ∘ w ∈ U := |
| 295 | h_dense.exists_mem_open h_open ⟨_, h_adelic⟩ |
| 296 | let l : 𝔰.BesselIndex → E := Pi.single (𝔰.besselFrame b) 1 + inclMatrix E 𝔰.indexX₀ *ᵥ w |
| 297 | have h_map : algebraMap E (𝔸f E) ∘ l = form (algebraMap E (𝔸f E) ∘ w) := by |
| 298 | ext j |
| 299 | simp [l, form, inclMatrix, mulVec, dotProduct, Matrix.one_apply, Pi.single_apply, |
| 300 | apply_ite (algebraMap E (𝔸f E))] |
| 301 | refine ⟨l, fun j hj ↦ ?_, ?_⟩ |
| 302 | · have h_ne (i : 𝔰.κ) : j ≠ 𝔰.indexX₀ i := fun h ↦ hj ⟨i, h.symm⟩ |
| 303 | simp [l, inclMatrix, mulVec, dotProduct, h_ne, Pi.single_apply] |
| 304 | · rw [h_map] |
| 305 | exact hw |
| 306 | |
| 307 | /-- Let `E` contain a primitive 5040th root of unity. For `a < b` and `x` an integer of `E`, the |
| 308 | matrix `1 + Matrix.single a b (M x)` is `frameMatrix u` for some `u` in the congruence subgroup |
| 309 | `𝖴_c(M) = S.classUnipotent c` of the class `c`. Here `frameMatrix u` is the matrix of `u` on the |
| 310 | frame `e_1, …, e_ϱ, z`, and `M = S.M` is the level. -/ |
| 311 | lemma exists_classUnipotent_frameMatrix_eq [HasPrimitiveRoot5040 E] (c : S.Classes) |
| 312 | {a b : Fin (𝔰.ϱ + 1)} (hab : a < b) (x : 𝓞 E) : |
| 313 | ∃ u : S.classUnipotent c, frameMatrix u.val = 1 + Matrix.single a b (S.M * (x : E)) := by |
| 314 | -- Take the element whose row at `e_a` is `M x` times an integral form dual to `f_b`. |
| 315 | obtain ⟨a, rfl⟩ : ∃ a' : Fin 𝔰.ϱ, a'.castSucc = a := |
| 316 | Fin.exists_castSucc_eq.2 (Fin.ne_last_of_lt hab) |
| 317 | obtain ⟨l, hl_frame, hl_int⟩ : ∃ l : 𝔰.BesselIndex → E, |
| 318 | (∀ j ∉ range 𝔰.indexX₀, l j = if j = 𝔰.besselFrame b then 1 else 0) ∧ |
| 319 | algebraMap E (𝔸f E) ∘ l ᵥ* (classBasis c).val ∈ intVectors (Ô E) 𝔰.BesselIndex := |
| 320 | exists_integral_form_besselFrame c b |
| 321 | have h_free (j : 𝔰.BesselIndex) (hj : ¬RealPlace.IsFreeEntry (a, j)) : ((x : E) • l) j = 0 := by |
| 322 | have h_range : j ∉ range 𝔰.indexX₀ := by |
| 323 | rintro ⟨i, rfl⟩ |
| 324 | exact hj trivial |
| 325 | have h_ne : j ≠ 𝔰.besselFrame b := by |
| 326 | rintro rfl |
| 327 | induction b using Fin.lastCases <;> simp_all |
| 328 | rw [Pi.smul_apply, hl_frame j h_range, ite_eq_right h_ne, smul_zero] |
| 329 | have h_int : algebraMap E (𝔸f E) ∘ ((x : E) • l) ᵥ* (classBasis c).val ∈ |
| 330 | intVectors (Ô E) 𝔰.BesselIndex := by |
| 331 | have h_scale : algebraMap E (𝔸f E) ∘ ((x : E) • l) = |
| 332 | algebraMap E (𝔸f E) x • algebraMap E (𝔸f E) ∘ l := |
| 333 | funext fun j ↦ map_mul (algebraMap E (𝔸f E)) (x : E) (l j) |
| 334 | rw [h_scale, smul_vecMul] |
| 335 | exact fun j ↦ mul_mem (coe_mem_Ô x) (hl_int j) |
| 336 | obtain ⟨u, hu⟩ := exists_eichler_classUnipotent c a h_free h_int 0 |
| 337 | obtain ⟨hu_unip, -⟩ : u.val ∈ besselU ∧ S.translateByClassReps c c u ∈ S.principalLevel := |
| 338 | u.property |
| 339 | refine ⟨u, ext fun i j ↦ ?_⟩ |
| 340 | induction i using Fin.lastCases with |
| 341 | | last => |
| 342 | rw [frameMatrix_unitriangular hu_unip _ j j.le_last, Matrix.add_apply, |
| 343 | single_apply_of_row_ne a.castSucc_ne_last, add_zero] |
| 344 | | cast i => |
| 345 | have h_star := (𝔰.eStar_ne_besselFrame a j).symm |
| 346 | have h_range : 𝔰.besselFrame j ∉ range 𝔰.indexX₀ := by |
| 347 | induction j using Fin.lastCases <;> simp |
| 348 | have h_diag : Sum.inl i = 𝔰.besselFrame j ↔ i.castSucc = j := by |
| 349 | rw [← besselFrame_castSucc, besselFrame_injective.eq_iff] |
| 350 | rw [frameMatrix, submatrix_apply, besselFrame_castSucc, hu i _ (.inl h_star)] |
| 351 | simp [Matrix.one_apply, besselFrame_injective.eq_iff, single_apply, hl_frame _ h_range, h_star, |
| 352 | h_diag, ite_and, eq_comm (a := a), eq_comm (a := b)] |
| 353 | |
| 354 | /-- An element `u` of the congruence subgroup `𝖴_c(M) = S.classUnipotent c` acts on the frame |
| 355 | `e_1, …, e_ϱ, z` by a matrix `frameMatrix u` whose entries above the diagonal are multiples of the |
| 356 | level `M = S.M` by integers of `E`. -/ |
| 357 | lemma exists_frameMatrix_classUnipotent_eq_mul (c : S.Classes) (u : S.classUnipotent c) |
| 358 | {a b : Fin (𝔰.ϱ + 1)} (hab : a < b) : ∃ x : 𝓞 E, frameMatrix u.val a b = S.M * (x : E) := by |
| 359 | -- In the basis of the lattice `M⁻¹ (u - 1)` is integral, and the frame belongs to this basis. |
| 360 | obtain ⟨a, rfl⟩ : ∃ a' : Fin 𝔰.ϱ, a'.castSucc = a := |
| 361 | Fin.exists_castSucc_eq.2 (Fin.ne_last_of_lt hab) |
| 362 | obtain ⟨-, hu_level⟩ : u.val ∈ besselU ∧ S.translateByClassReps c c u ∈ S.principalLevel := |
| 363 | u.property |
| 364 | have h_cong : IsIntMatrix (Ô E) (S.ideleM⁻¹ • ((S.translateByClassReps c c u).val.val - 1)) := |
| 365 | (mem_unitaryLevel_def.1 (S.principalLevel_eq_unitaryLevel.le hu_level)).2 |
| 366 | have h_entry : (S.translateByClassReps c c u).val.val (.inl a) (𝔰.besselFrame b) = |
| 367 | algebraMap E (𝔸f E) (frameMatrix u.val a.castSucc b) := by |
| 368 | simpa [classCoord_eq_fromBlocks, frameMatrix, Matrix.mul_apply, Matrix.one_apply] using |
| 369 | congrFun₂ (frameImage_translateByClassReps (c := c) (c' := c) (γ := u)) (.inl a) b |
| 370 | have h_ne : (Sum.inl a : 𝔰.BesselIndex) ≠ 𝔰.besselFrame b := by |
| 371 | rw [← besselFrame_castSucc] |
| 372 | exact besselFrame_injective.ne hab.ne |
| 373 | have h_int : IsIntegral ℤ ((S.M : E)⁻¹ * frameMatrix u.val a.castSucc b) := by |
| 374 | rw [← algebraMap_mem_Ô] |
| 375 | simpa [h_entry, one_apply_ne h_ne, ideleM, Units.smul_def] using |
| 376 | h_cong (.inl a) (𝔰.besselFrame b) |
| 377 | have hM : (S.M : E) ≠ 0 := by simp [Nat.Prime.ne_zero] |
| 378 | exact ⟨⟨_, h_int⟩, (mul_inv_cancel_left₀ hM _).symm⟩ |
| 379 | |
| 380 | end UnipotentElements |
| 381 | |
| 382 | /-! |
| 383 | ## Colouring bounds and the index of scaled lattices |
| 384 | |
| 385 | Here `New.submoduleIndex M M'` is the index of `M ⊓ M'` in `M'`, and `New.genIndex c` is `[Ô : c Ô]` |
| 386 | for `c ∈ Ô`. |
| 387 | -/ |
| 388 | |
| 389 | section ColouringCounts |
| 390 | |
| 391 | open Set Fintype AddSubgroup Pointwise ENNReal QuotientAddGroup NumberField |
| 392 | |
| 393 | variable {α β ι E : Type*} [Fintype ι] |
| 394 | |
| 395 | /-- Colour the set `A` with at most `N` colours so that elements of one colour are `R`-related. If |
| 396 | every nonempty subset of `A` of pairwise `R`-related elements has total weight at most `x` for the |
| 397 | weight `w`, then `A` has total weight at most `N * x`. -/ |
| 398 | lemma tsum_le_of_encard_range_le {A : Set α} {R : α → α → Prop} {N x : ℝ≥0∞} {w : α → ℝ≥0∞} |
| 399 | (φ : A → β) (h_colours : encard (range φ) ≤ N) (h_rel : ∀ a b : A, φ a = φ b → R a b) |
| 400 | (h_class : ∀ B : Set α, B ⊆ A → ∀ b₀ : α, b₀ ∈ B → (∀ a ∈ B, ∀ b ∈ B, R a b) → |
| 401 | ∑' a : B, w a ≤ x) : |
| 402 | ∑' a : A, w a ≤ N * x := by |
| 403 | -- The fibre of `φ` through `b` is a nonempty set of pairwise `R`-related elements. |
| 404 | have h_fibre (c : range φ) : ∑' a : rangeFactorization φ ⁻¹' {c}, w a ≤ x := by |
| 405 | obtain ⟨_, b, rfl⟩ := c |
| 406 | rw [← tsum_image w Subtype.val_injective.injOn] |
| 407 | refine h_class _ (Subtype.coe_image_subset A _) b ⟨b, rfl, rfl⟩ ?_ |
| 408 | rintro _ ⟨a, ha, rfl⟩ _ ⟨a', ha', rfl⟩ |
| 409 | exact h_rel a a' (congrArg Subtype.val (ha.trans ha'.symm)) |
| 410 | calc |
| 411 | _ = ∑' (c : range φ) (a : rangeFactorization φ ⁻¹' {c}), w a := (tsum_fiberwise ..).symm |
| 412 | _ ≤ ∑' _ : range φ, x := tsum_le_tsum h_fibre |
| 413 | _ ≤ N * x := by grw [tsum_set_const, h_colours] |
| 414 | |
| 415 | /-- Colouring by residue classes. Let `f a`, for `a ∈ A`, be a vector with entries in `K'`, and let |
| 416 | `K ⊓ K'` have finite index in `K'`. If every nonempty subset of `A` on which `f` is constant modulo |
| 417 | `K` has total weight at most `x`, then `A` has total weight at most `[K' : K ⊓ K'] ^ card ι * x`. -/ |
| 418 | lemma tsum_le_relIndex_pow_mul {A : Set α} [AddCommGroup β] (f : α → ι → β) {K K' : AddSubgroup β} |
| 419 | (h_index : relIndex K K' ≠ 0) (hf : ∀ a ∈ A, ∀ i : ι, f a i ∈ K') (w : α → ℝ≥0∞) (x : ℝ≥0∞) |
| 420 | (h_class : ∀ B : Set α, B ⊆ A → ∀ b₀ : α, b₀ ∈ B → |
| 421 | (∀ a ∈ B, ∀ b ∈ B, ∀ i : ι, f a i - f b i ∈ K) → ∑' a : B, w a ≤ x) : |
| 422 | ∑' a : A, w a ≤ ENNReal.ofReal (K.relIndex K' ^ card ι) * x := by |
| 423 | -- Colour `a` by the classes of the `f a i` in `K' / (K ⊓ K')`. |
| 424 | let : Fintype (K' ⧸ K.addSubgroupOf K') := fintypeOfIndexNeZero h_index |
| 425 | let colour (a : A) (i : ι) : K' ⧸ K.addSubgroupOf K' := mk' _ ⟨f a i, hf a a.property i⟩ |
| 426 | refine tsum_le_of_encard_range_le colour ?_ (fun a b hab i ↦ ?_) h_class |
| 427 | · grw [encard_le_card] |
| 428 | simp [relIndex, index] |
| 429 | · simpa [colour, eq_iff_sub_mem, mem_addSubgroupOf] using congrFun hab i |
| 430 | |
| 431 | variable [Field E] [NumberField E] [IsCMField E] [HasPrimitiveRoot5040 E] {c : (𝔸f E)ˣ} |
| 432 | |
| 433 | /-- The index of `c Ô^ι` in the lattice `intVectors (Ô E) ι = Ô^ι` of integral vectors of finite |
| 434 | adeles is `[Ô : c Ô] ^ card ι` (`genIndex c = [Ô : c Ô]`), for a unit `c` of the finite adeles that |
| 435 | lies in `Ô`. -/ |
| 436 | lemma submoduleIndex_smul_intVectors (hc : ↑c ∈ Ô E) : |
| 437 | submoduleIndex (c • intVectors (Ô E) ι) (intVectors (Ô E) ι) = genIndex c.val ^ card ι := by |
| 438 | classical |
| 439 | -- `c Ô^ι` is the lattice spanned by the columns of the scalar matrix `c • 1`, whose determinant |
| 440 | -- is `c ^ card ι`. |
| 441 | simpa [colLattice, c.smul_def] using! |
| 442 | submoduleIndex_colLattice_intVectors (n := ι) (M := c • 1) (.smul hc .one) |
| 443 | |
| 444 | /-- For a unit `c` of the finite adeles that lies in `Ô`, the index of `c Ô^ι` in `Ô^ι` is not |
| 445 | zero. -/ |
| 446 | lemma submoduleIndex_smul_ne_zero (hc : (c : 𝔸f E) ∈ Ô E) : |
| 447 | submoduleIndex (c • intVectors (Ô E) ι) (intVectors (Ô E) ι) ≠ 0 := |
| 448 | mod_cast (submoduleIndex_smul_intVectors hc).trans_ne (pow_pos (genIndex_pos c) _).ne' |
| 449 | |
| 450 | end ColouringCounts |
| 451 | |
| 452 | end New.Filling |
| 453 | |
| 454 | /-! |
| 455 | ## Reduced points |
| 456 | |
| 457 | The elements of `S.classUnipotent c` that move a given point to a reduced one |
| 458 | (`New.Filling.reducedPoints`) form exactly one coset of `S.classUnipotent₀ c`. |
| 459 | -/ |
| 460 | |
| 461 | section ReducedPoints |
| 462 | |
| 463 | open NumberField Matrix Set ENNReal |
| 464 | |
| 465 | namespace New.Filling |
| 466 | |
| 467 | /-- Let `g` and `γ` be upper unitriangular and `a < b`. If `γ l b` is the entry of `1` for every |
| 468 | `l` strictly between `a` and `b`, then the entry `(a, b)` of `g γ` is `γ a b + g a b`. -/ |
| 469 | private lemma mul_apply_eq_add_of_unitriangular {R : Type*} [CommRing R] {n : ℕ} |
| 470 | (g γ : unitriangular (id : Fin n → Fin n) R) {a b : Fin n} (hab : a < b) |
| 471 | (h_low : ∀ l : Fin n, a < l → l < b → |
| 472 | (γ : GL (Fin n) R) l b = (1 : Matrix (Fin n) (Fin n) R) l b) : |
| 473 | ((g * γ : unitriangular (id : Fin n → Fin n) R) : GL (Fin n) R) a b = |
| 474 | (γ : GL (Fin n) R) a b + (g : GL (Fin n) R) a b := by |
| 475 | -- Below row `a`, column `b` of γ agrees with the identity. Compare their products by `g`. |
| 476 | have h_diff := mul_apply_sub_mul_apply_of_unitriangular (u := g.val) (A := γ.val.val) (B := 1) |
| 477 | (i := a) (l := b) g.property fun k hak ↦ |
| 478 | (lt_or_ge k b).elim (h_low k hak) (fun hbk ↦ γ.property k b hbk) |
| 479 | rw [Matrix.mul_one, Matrix.one_apply_ne hab.ne, sub_zero] at h_diff |
| 480 | exact sub_eq_iff_eq_add.mp h_diff |
| 481 | |
| 482 | /-- Reduction of unitriangular matrices. Let `L` be an additive submonoid of the ring `R`, and let |
| 483 | every element of `R` have exactly one translate by `L` in `D`. Let `Γ` be a group of upper |
| 484 | unitriangular matrices whose entries above the diagonal lie in `L` and which contains the elementary |
| 485 | matrices `1 + single a b l` with `a < b` and `l` in `L`. Then for every unitriangular `x` exactly |
| 486 | one `γ` in `Γ` puts all entries of `x γ` above the diagonal in `D`. -/ |
| 487 | lemma existsUnique_mul_unitriangular_mem {R : Type*} [CommRing R] {n : ℕ} |
| 488 | (Γ : Subgroup (unitriangular (id : Fin n → Fin n) R)) (L : AddSubmonoid R) {D : Set R} |
| 489 | (hD : ∀ w : R, ∃! l : L, (l : R) + w ∈ D) |
| 490 | (h_onto : ∀ a b : Fin n, a < b → ∀ l ∈ L, ∃ γ : Γ, |
| 491 | ((γ : GL (Fin n) R) : Matrix (Fin n) (Fin n) R) = 1 + single a b l) |
| 492 | (h_mem : ∀ (γ : Γ) (a b : Fin n), a < b → (γ : GL (Fin n) R) a b ∈ L) |
| 493 | (x : unitriangular (id : Fin n → Fin n) R) : |
| 494 | ∃! γ : Γ, ∀ a b : Fin n, a < b → (x * γ : GL (Fin n) R) a b ∈ D := by |
| 495 | -- The entries above the diagonal are coordinates, graded by their distance from the diagonal, |
| 496 | -- and `Γ` translates them one diagonal after the other. |
| 497 | let entry (g : unitriangular (id : Fin n → Fin n) R) (p : {p : Fin n × Fin n // p.1 < p.2}) : R := |
| 498 | (g : GL (Fin n) R) p.val.1 p.val.2 |
| 499 | let deg (p : {p : Fin n × Fin n // p.1 < p.2}) : ℕ := p.val.2.val - p.val.1.val |
| 500 | have entry_injective : entry.Injective := (unitriangularEquiv (id : Fin n → Fin n) R).injective |
| 501 | have h_elementary : ∀ p : {p : Fin n × Fin n // p.1 < p.2}, ∀ l ∈ L, |
| 502 | ∃ γ : Γ, entry γ p = l ∧ ∀ q ≠ p, deg q ≤ deg p → entry γ q = entry 1 q := by |
| 503 | rintro ⟨⟨a, b⟩, hab⟩ l hl |
| 504 | obtain ⟨γ, hγ⟩ : ∃ γ : Γ, |
| 505 | ((γ : GL (Fin n) R) : Matrix (Fin n) (Fin n) R) = 1 + single a b l := h_onto a b hab l hl |
| 506 | refine ⟨γ, by simp [entry, hγ, one_apply_ne hab.ne], ?_⟩ |
| 507 | rintro ⟨⟨a', b'⟩, hab'⟩ h_ne - |
| 508 | have h_position : ¬(a = a' ∧ b = b') := by |
| 509 | rintro ⟨rfl, rfl⟩ |
| 510 | exact h_ne rfl |
| 511 | simp [entry, hγ, h_position] |
| 512 | have h_transl : ∀ (γ : Γ) (p : {p : Fin n × Fin n // p.1 < p.2}), |
| 513 | (∀ q : {p : Fin n × Fin n // p.1 < p.2}, deg q < deg p → entry γ q = entry 1 q) → |
| 514 | ∀ g : unitriangular (id : Fin n → Fin n) R, entry (g * γ) p = entry γ p + entry g p := by |
| 515 | rintro γ ⟨⟨a, b⟩, hab⟩ h_low g |
| 516 | exact mul_apply_eq_add_of_unitriangular (a := a) (b := b) g γ hab fun l hal hlb ↦ by |
| 517 | have h_degree : b.val - l.val < b.val - a.val := by omega |
| 518 | have h_entry : (γ : GL (Fin n) R) l b = (1 : Matrix (Fin n) (Fin n) R) l b := |
| 519 | h_low ⟨(l, b), hlb⟩ h_degree |
| 520 | exact h_entry |
| 521 | have h_box (γ : Γ) : entry (x * γ) ∈ univ.pi (fun _ ↦ D) ↔ |
| 522 | ∀ a b : Fin n, a < b → (x * γ : GL (Fin n) R) a b ∈ D := |
| 523 | ⟨fun h a b hab ↦ h ⟨(a, b), hab⟩ trivial, fun h p _ ↦ h p.val.1 p.val.2 p.property⟩ |
| 524 | have h_unique : ∃! γ : Γ, entry (x * γ) ∈ univ.pi fun _ ↦ D := |
| 525 | existsUnique_mul_mem_box deg entry entry_injective Γ (fun _ ↦ L) _ (fun _ ↦ hD) h_elementary |
| 526 | (fun γ p _ ↦ h_mem γ p.val.1 p.val.2 p.property) h_transl x |
| 527 | exact (existsUnique_congr h_box).1 h_unique |
| 528 | |
| 529 | variable {E : Type} [Field E] [CMType E] {𝔰 : Shape} {S : Filling E 𝔰} |
| 530 | {D : Set (InfinitePlace E → ℂ)} |
| 531 | |
| 532 | /-- Let `u` in the rational unitary group `S.G E` of the filling-theorem data `S` lie in `besselU`, |
| 533 | the block upper unitriangular isometries. `S.ratTriangle y a b v` is entry `(a, b)` of the |
| 534 | triangular matrix `gramSchmidtMatrix (y v)`, read in the rational frame. It equals the sum over `l` |
| 535 | of `S.ratTriangle (S.ratToInf u * y) a l v * Φ v (frameMatrix u l b)`. Here `frameMatrix u` is the |
| 536 | submatrix of `u` on the frame (e₁, …, e_ϱ, z), and `Φ v` is the chosen embedding at `v`. -/ |
| 537 | lemma ratTriangle_eq_sum {u : S.G E} (hu : u ∈ besselU) (y : InfinitePlace E → 𝔰.G₁) |
| 538 | (a b : Fin (𝔰.ϱ + 1)) (v : InfinitePlace E) : |
| 539 | S.ratTriangle y a b v = |
| 540 | ∑ l : Fin (𝔰.ϱ + 1), S.ratTriangle (S.ratToInf u * y) a l v * Φ v (frameMatrix u l b) := by |
| 541 | -- This is the rule in the normalised frame; the scales of the summation index `l` cancel. |
| 542 | have h_normalised : gramSchmidtMatrix (S.ratToInf u v * y v) * frameMatrix (S.ratToInf u v) = |
| 543 | gramSchmidtMatrix (y v) := |
| 544 | gramSchmidtMatrix_besselS_mul (y v) |
| 545 | (mem_partialUnitriangularGroup_of_mem_besselU (hu.ratToInf_mem_agreeWithOneOn v)) |
| 546 | have h_entry (l : Fin (𝔰.ϱ + 1)) : frameMatrix (S.ratToInf u v) l b = Φ v (frameMatrix u l b) * |
| 547 | (S.basisScale v (𝔰.besselFrame b) / S.basisScale v (𝔰.besselFrame l)) := |
| 548 | S.ratToInf_apply u v (𝔰.besselFrame l) (𝔰.besselFrame b) |
| 549 | rw [ratTriangle, ← h_normalised, Matrix.mul_apply, Finset.sum_mul] |
| 550 | refine Finset.sum_congr rfl fun l _ ↦ ?_ |
| 551 | have h_scale : S.basisScale v (𝔰.besselFrame b) ≠ 0 := S.basisScale_ne_zero v _ |
| 552 | rw [ratTriangle, h_entry, Pi.mul_apply] |
| 553 | field |
| 554 | |
| 555 | /-- Let `S` be filling data over `E`, where `E` contains a primitive 5040th root of unity, and let |
| 556 | `D` be a set of representatives modulo `S.M 𝓞_E` as in `New.Filling.IsResidueDomain`. For each class |
| 557 | `c` in `S.Classes` and each point `y`, the `u` in `S.classUnipotent c` with `S.ratToInf u * y` |
| 558 | reduced for `D` form exactly one right coset of `S.classUnipotent₀ c`. -/ |
| 559 | theorem IsResidueDomain.exists_mul_mem_reducedPoints_iff_rightCoset [HasPrimitiveRoot5040 E] |
| 560 | (hD : S.IsResidueDomain D) (c : S.Classes) (y : InfinitePlace E → 𝔰.G₁) : |
| 561 | ∃ u₀ : S.classUnipotent c, ∀ u : S.classUnipotent c, |
| 562 | S.ratToInf u * y ∈ S.reducedPoints D ↔ (u * u₀⁻¹).val ∈ S.classUnipotent₀ c := by |
| 563 | -- Work in the group `G` of unitriangular matrices over the ring of tuples. It contains the |
| 564 | -- triangular matrices `triangle z` and the action `θ u` of `u` on the frame, and |
| 565 | -- `triangle (u y) = triangle y * θ u⁻¹`. |
| 566 | let φ : E →+* (InfinitePlace E → ℂ) := RingHom.pi Φ |
| 567 | let G : Subgroup (GL (Fin (𝔰.ϱ + 1)) (InfinitePlace E → ℂ)) := unitriangular id _ |
| 568 | let frameHom : |
| 569 | S.classUnipotent c →* Matrix (Fin (𝔰.ϱ + 1)) (Fin (𝔰.ϱ + 1)) (InfinitePlace E → ℂ) := |
| 570 | { toFun u := (frameMatrix u.val).map φ |
| 571 | map_one' := by simp [frameMatrix, submatrix_one, besselFrame_injective] |
| 572 | map_mul' u u' := by rw [Subgroup.coe_mul, frameMatrix_mul u'.property.left, Matrix.map_mul] } |
| 573 | let θ : S.classUnipotent c →* G := frameHom.toHomUnits.codRestrict G fun u a b hba ↦ by |
| 574 | simp [frameHom, frameMatrix_unitriangular u.property.left a b hba, Matrix.one_apply, |
| 575 | apply_ite φ] |
| 576 | have hθ (u : S.classUnipotent c) : (θ u).val.val = (frameMatrix u.val).map φ := rfl |
| 577 | -- The kernel of `θ` is the fixer of the frame. |
| 578 | have h_ker (u : S.classUnipotent c) : θ u = 1 ↔ u.val ∈ S.classUnipotent₀ c := by |
| 579 | have h_frame : u.val ∈ S.classUnipotent₀ c ↔ frameMatrix u.val = 1 := |
| 580 | ⟨fun h ↦ (mem_besselU0_iff.1 h.right).right, |
| 581 | fun h ↦ ⟨u.property, mem_besselU0_iff.2 ⟨u.property.left, h⟩⟩⟩ |
| 582 | rw [h_frame, Subtype.ext_iff, Units.ext_iff, hθ, ← (map_injective φ.injective).eq_iff] |
| 583 | simp |
| 584 | have h_triangle (z : InfinitePlace E → 𝔰.G₁) (a b : Fin (𝔰.ϱ + 1)) (hba : b ≤ a) : |
| 585 | of (S.ratTriangle z) a b = |
| 586 | (1 : Matrix (Fin (𝔰.ϱ + 1)) (Fin (𝔰.ϱ + 1)) (InfinitePlace E → ℂ)) a b := by |
| 587 | ext v |
| 588 | simp [ratTriangle_eq_one_apply_of_le z hba v, Matrix.one_apply, ite_apply] |
| 589 | have h_det (z : InfinitePlace E → 𝔰.G₁) : (of (S.ratTriangle z)).det = 1 := |
| 590 | det_eq_one_of_unitriangular (lev := id) (h_triangle z) |
| 591 | let triangle (z : InfinitePlace E → 𝔰.G₁) : G := |
| 592 | ⟨.mk'' (of (S.ratTriangle z)) (by simp [h_det z]), h_triangle z⟩ |
| 593 | have h_move (u : S.classUnipotent c) : triangle y * θ u⁻¹ = |
| 594 | triangle (S.ratToInf u * y) := by |
| 595 | have h_sum : of (S.ratTriangle y) = |
| 596 | of (S.ratTriangle (S.ratToInf u * y)) * (frameMatrix u.val).map φ := by |
| 597 | ext a b v |
| 598 | simpa [φ, Matrix.mul_apply] using ratTriangle_eq_sum u.property.left y a b v |
| 599 | rw [map_inv, mul_inv_eq_iff_eq_mul] |
| 600 | exact Subtype.ext (Units.ext h_sum) |
| 601 | have hφ (x : 𝓞 E) : φ (S.M * (x : E)) = fun v : InfinitePlace E ↦ Φ v (S.M * (x : E)) := rfl |
| 602 | have h_elementary : ∀ a b : Fin (𝔰.ϱ + 1), a < b → ∀ l ∈ S.levelMultiples, |
| 603 | ∃ γ : θ.range, (γ : GL (Fin (𝔰.ϱ + 1)) (InfinitePlace E → ℂ)).val = 1 + single a b l := by |
| 604 | intro a b hab l hl |
| 605 | obtain ⟨x, rfl⟩ : ∃ x : 𝓞 E, (fun v : InfinitePlace E ↦ Φ v (S.M * (x : E))) = l := |
| 606 | mem_levelMultiples.1 hl |
| 607 | obtain ⟨u, hu⟩ : ∃ u : S.classUnipotent c, frameMatrix u.val = 1 + single a b (S.M * (x : E)) := |
| 608 | exists_classUnipotent_frameMatrix_eq c hab x |
| 609 | refine ⟨⟨θ u, u, rfl⟩, ?_⟩ |
| 610 | rw [hθ, hu, ← hφ, Matrix.map_add φ φ.map_add, Matrix.map_one φ φ.map_zero φ.map_one, |
| 611 | map_single a b (S.M * (x : E)) φ] |
| 612 | have h_level : ∀ (γ : θ.range) (a b : Fin (𝔰.ϱ + 1)), a < b → |
| 613 | (γ : GL (Fin (𝔰.ϱ + 1)) (InfinitePlace E → ℂ)) a b ∈ S.levelMultiples := by |
| 614 | rintro ⟨_, u, rfl⟩ a b hab |
| 615 | obtain ⟨x, hx⟩ : ∃ x : 𝓞 E, frameMatrix u.val a b = S.M * (x : E) := |
| 616 | exists_frameMatrix_classUnipotent_eq_mul c u hab |
| 617 | rw [hθ, map_apply, hx, hφ] |
| 618 | exact mem_levelMultiples.2 ⟨x, rfl⟩ |
| 619 | obtain ⟨⟨_, u₀, rfl⟩, h_mem, h_only⟩ : |
| 620 | ∃! γ : θ.range, ∀ a b : Fin (𝔰.ϱ + 1), a < b → |
| 621 | (triangle y * γ : GL (Fin (𝔰.ϱ + 1)) (InfinitePlace E → ℂ)) a b ∈ D := |
| 622 | existsUnique_mul_unitriangular_mem θ.range S.levelMultiples.toAddSubmonoid |
| 623 | hD.existsUnique_add_mem h_elementary h_level (triangle y) |
| 624 | refine ⟨u₀⁻¹, fun u ↦ ?_⟩ |
| 625 | have h_iff : S.ratToInf u * y ∈ S.reducedPoints D ↔ |
| 626 | ∀ a b : Fin (𝔰.ϱ + 1), a < b → (triangle y * θ u⁻¹).val.val a b ∈ D := by |
| 627 | rw [h_move, reducedPoints, mem_ofPred_eq] |
| 628 | rfl -- the entries of `triangle z` are those of `S.ratTriangle z` |
| 629 | rw [h_iff, ← h_ker, inv_inv, map_mul, mul_eq_one_iff_inv_eq, ← map_inv] |
| 630 | refine ⟨fun h ↦ ?_, fun h ↦ ?_⟩ |
| 631 | · exact congrArg Subtype.val (h_only ⟨θ u⁻¹, u⁻¹, rfl⟩ h) |
| 632 | · rw [h] |
| 633 | exact h_mem |
| 634 | |
| 635 | /-- Let `S` satisfy the standing hypotheses `New.Filling.IsAdmissible`, let `E` contain a primitive |
| 636 | 5040th root of unity, and let `D` be a set of representatives modulo `S.M 𝓞_E` as in |
| 637 | `New.Filling.IsResidueDomain`. For every class `c`, the indicator `ω` of the points reduced for `D` |
| 638 | is a partition of unity in boxes. -/ |
| 639 | theorem IsResidueDomain.isBoxPartitionOfUnity [S.IsAdmissible] [HasPrimitiveRoot5040 E] |
| 640 | (hD : S.IsResidueDomain D) (c : S.Classes) : |
| 641 | S.IsBoxPartitionOfUnity c ((S.reducedPoints D).indicator 1) where |
| 642 | measurable := measurable_one.indicator hD.measurableSet_reducedPoints |
| 643 | mem_frameBox_besselLength y v h_ne := hD.mem_frameBox (mem_of_indicator_ne_zero h_ne) v |
| 644 | tsum_mul_eq_one y a ha := by |
| 645 | -- The `γ` that make `γ y` reduced form one coset of `S.classUnipotent₀ c`, on which `a` has sum |
| 646 | -- one. |
| 647 | obtain ⟨γ₀, hγ₀⟩ : ∃ γ₀ : S.classUnipotent c, ∀ γ : S.classUnipotent c, |
| 648 | S.ratToInf γ * y ∈ S.reducedPoints D ↔ (γ * γ₀⁻¹).val ∈ S.classUnipotent₀ c := |
| 649 | hD.exists_mul_mem_reducedPoints_iff_rightCoset c y |
| 650 | let f (u : (S.classUnipotent₀ c).subgroupOf (S.classUnipotent c)) : S.classUnipotent c := |
| 651 | u.val * γ₀ |
| 652 | have f_injective : f.Injective := (mul_left_injective γ₀).comp Subtype.val_injective |
| 653 | have h_support : (Function.support fun γ : S.classUnipotent c ↦ |
| 654 | a γ * (S.reducedPoints D).indicator 1 (S.ratToInf γ * y)) ⊆ range f := by |
| 655 | intro γ hγ |
| 656 | have h_reduced : S.ratToInf γ * y ∈ S.reducedPoints D := |
| 657 | mem_of_indicator_ne_zero (right_ne_zero_of_mul hγ) |
| 658 | exact ⟨⟨γ * γ₀⁻¹, (hγ₀ γ).1 h_reduced⟩, inv_mul_cancel_right γ γ₀⟩ |
| 659 | rw [← f_injective.tsum_eq h_support, ← ha γ₀] |
| 660 | refine tsum_congr fun u ↦ ?_ |
| 661 | have h_reduced : S.ratToInf (f u) * y ∈ S.reducedPoints D := by |
| 662 | rw [hγ₀, mul_inv_cancel_right] |
| 663 | exact u.property |
| 664 | rw [indicator_of_mem h_reduced, Pi.one_apply, mul_one] |
| 665 | le_one y := indicator_le_self' (fun _ _ ↦ zero_le_one) y |
| 666 | besselFixer_invariant s y hs := by |
| 667 | classical |
| 668 | simp [indicator_apply, mul_mem_reducedPoints_iff hs] |
| 669 | |
| 670 | end New.Filling |
| 671 | |
| 672 | end ReducedPoints |