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.Order.Star.Int |
| 4 | import Mathlib.RingTheory.Etale.Weakly |
| 5 | import Mathlib.RingTheory.PicardGroup |
| 6 | import Mathlib.RingTheory.TotallySplit |
| 7 | public import New.Spanning.RemainingTerms.BorderedDeterminant |
| 8 | import Lib.General.Analysis.GaussianIntegral |
| 9 | import Lib.General.NumberTheory.SUnitsAndClassNumber |
| 10 | import New.Spanning.Unfolding.ReducedPoints |
| 11 | |
| 12 | /-! |
| 13 | # Frames of near terms: short shared vectors and moves between frames |
| 14 | |
| 15 | This file proves lemmas for counting the frames `γ f` of the remaining terms `p = (c', γ)` modulo |
| 16 | moves. Here `f = (e₁, …, e_ϱ, z)` is the standard frame, `New.frameImage γ` is the frame `γ f`, and |
| 17 | `Z = S.frameProducts γ` is the matrix of products of `f` with `γ f`. At boxed points the frames are |
| 18 | uniformly independent, so the vectors shared by the two frames of a near term are short. |
| 19 | |
| 20 | ## Main definitions and results |
| 21 | |
| 22 | * `New.Filling.IsNearTermAt.eq_of_frameImage_eq`: near terms moved by elements of |
| 23 | `New.Filling.classUnipotent₀` are determined by their frames. |
| 24 | * `New.Filling.HasCellRank.mulVec_eStar_eq_zero_and_sum_indexX₀_le`, |
| 25 | `New.Filling.col_eq_zero_of_norm_lt_one`: certain vectors have a short `X₀`-part, and a short |
| 26 | vector of the lattice of `c` in `X₀` is zero. |
| 27 | * `New.Filling.exists_mem_classUnipotent₀_frameImage_mul_eq`: take two terms with the same integral |
| 28 | `S.frameProducts`, with nonzero leading minor of order `j`, and the same shared vectors, whose |
| 29 | frames agree outside the first block of rows and differ in that block by `S.frameModulus` times an |
| 30 | integral matrix. Then an element of `S.classUnipotent₀ c` carries one frame to the other. |
| 31 | |
| 32 | Notions from other files: |
| 33 | * `New.Filling.paddedLeading`: the first j rows of Z, completed by rows of the identity matrix. |
| 34 | * `New.Filling.HasCellRank`: γ has cell rank j, that is, the flags of the two frames share vectors |
| 35 | from the index j on (`NormOnePairOccursFrom`), the leading minor D_j of Z(γ) is nonzero, and the |
| 36 | discriminant `termDisc` of γ is nonzero exactly when j = ϱ + 1. |
| 37 | * `New.Filling.classUnipotent₀`: the rational unipotent elements of level M for the class c that fix |
| 38 | every vector of the frame. |
| 39 | * `New.Filling.IsNear`: γ is near if y and γ⁻¹y are both boxed points for some archimedean y. |
| 40 | |
| 41 | ## Relation to the literature |
| 42 | |
| 43 | See `New.Spanning.RemainingTerms.Sum` for related work. |
| 44 | -/ |
| 45 | |
| 46 | @[expose] public section |
| 47 | |
| 48 | /-! |
| 49 | ## Short vectors of terms with a cell rank, and near terms with equal frames |
| 50 | |
| 51 | Throughout, "`γ` has cell rank `j`" means `S.HasCellRank j γ` (this is not the level `M = S.M`). In |
| 52 | this section only `IsNearTermAt.eq_of_frameImage_eq` assumes `S.IsAdmissible`, and no lemma assumes |
| 53 | a primitive 5040th root of unity in `E`. |
| 54 | -/ |
| 55 | |
| 56 | section MiddleRelation |
| 57 | |
| 58 | open Matrix Finset Pointwise Fin |
| 59 | |
| 60 | namespace New.Filling |
| 61 | |
| 62 | variable {E : Type} [Field E] [CMType E] {𝔰 : Shape} {S : Filling E 𝔰} |
| 63 | {c : S.Classes} {γ : S.G E} {j : Fin (𝔰.ϱ + 2)} |
| 64 | |
| 65 | /-- Let `γ` have cell rank `j` (`HasCellRank`), let `Z = S.frameProducts γ` be the matrix of |
| 66 | products of the frame `f` with `γ f`, and let `k` be the last index or `j ≤ k`. The combination `y` |
| 67 | of the frame `γ f` with the coefficients of column `k` of `(paddedLeading j Z)⁻¹` has (a) no |
| 68 | coordinates along the isotropic vectors `e*_a` dual to the `e_a` and (b) an `X₀`-part of squared |
| 69 | length at most `1/5` under the embedding `Φ v` of every infinite place `v`. -/ |
| 70 | lemma HasCellRank.mulVec_eStar_eq_zero_and_sum_indexX₀_le (h : S.HasCellRank j γ) |
| 71 | (k : Fin (𝔰.ϱ + 1)) (hk : k.val < j → k = 𝔰.top) : |
| 72 | let y : 𝔰.BesselIndex → E := frameImage γ *ᵥ col (paddedLeading j (S.frameProducts γ))⁻¹ k |
| 73 | -- (a) |
| 74 | (∀ a : Fin 𝔰.ϱ, y (eStar a) = 0) ∧ |
| 75 | -- (b) |
| 76 | ∀ v : NumberField.InfinitePlace E, 5 * ∑ i : 𝔰.κ, ‖Φ v (y (𝔰.indexX₀ i))‖ ^ 2 ≤ 1 := by |
| 77 | intro y |
| 78 | obtain hjk | hkj := le_or_gt j.val k.val |
| 79 | · -- For `j ≤ k` the vector is in the span of the standard frame, where these coordinates vanish. |
| 80 | obtain ⟨w, hw⟩ := h.exists_shared_frame_vector hjk |
| 81 | simp [y, ← hw, frameImage_one_mulVec] |
| 82 | · -- Otherwise `k` is the last index and `paddedLeading j Z = Z`, so `Z` maps the column to the |
| 83 | -- last basis vector. Then `N` times the sum is `1` minus a square, and `5 ≤ N`. |
| 84 | obtain rfl : k = 𝔰.top := hk hkj |
| 85 | let x : Fin (𝔰.ϱ + 1) → E := col (paddedLeading j (S.frameProducts γ))⁻¹ 𝔰.top |
| 86 | have h_padded : paddedLeading j (S.frameProducts γ) = S.frameProducts γ := by |
| 87 | ext a l |
| 88 | simp [paddedLeading, a.is_le.trans_lt hkj] |
| 89 | have hZ : S.frameProducts γ *ᵥ x = Pi.single 𝔰.top 1 := by |
| 90 | nth_rw 1 [← h_padded] |
| 91 | simp only [x] |
| 92 | rw [← mulVec_single_one, mulVec_mulVec, h.paddedLeading_mul_inv, one_mulVec] |
| 93 | refine ⟨frameImage_mulVec_eStar_eq_zero hZ, fun v ↦ ?_⟩ |
| 94 | calc 5 * ∑ i, ‖Φ v (y (𝔰.indexX₀ i))‖ ^ 2 ≤ S.N * ∑ i, ‖Φ v (y (𝔰.indexX₀ i))‖ ^ 2 := by |
| 95 | grw [S.five_le_N] |
| 96 | _ = ‖Φ v 1‖ ^ 2 - (S.N * ‖Φ v (x 𝔰.top)‖) ^ 2 := |
| 97 | mul_sum_norm_sq_frameImage_mulVec_eq hZ v |
| 98 | _ ≤ 1 := by simp [mul_nonneg] |
| 99 | |
| 100 | /-- Let `l` be a matrix over `E` whose columns are vectors of `X₀` in the lattice of the class `c` |
| 101 | (their lattice coordinates `S.classCoordX₀ c * l` are integral). If column `i` has squared length |
| 102 | below `1` at every infinite place, it is zero. -/ |
| 103 | lemma col_eq_zero_of_norm_lt_one {n : Type} {l : Matrix 𝔰.κ n E} |
| 104 | (hl_int : IsIntMatrix (Ô E) (S.classCoordX₀ c * finAdeleMatrix l)) {i : n} |
| 105 | (h_short : ∀ v : NumberField.InfinitePlace E, ∑ a : 𝔰.κ, ‖Φ v (l a i)‖ ^ 2 < 1) : |
| 106 | l.col i = 0 := by |
| 107 | -- The hermitian norm of column `i` is an algebraic integer whose conjugates all have absolute |
| 108 | -- value below `1`, so it is `0`; and the form is definite on `X₀`. |
| 109 | let w : 𝔰.κ ⊕ Unit → E := l.col i ⊕ᵥ 0 |
| 110 | have h_form : star w ⬝ᵥ S.ratMiddle E *ᵥ w = (lᴴ * l) i i := by |
| 111 | simp [w, dotProduct, mulVec, middleGram, Matrix.one_apply, Matrix.mul_apply] |
| 112 | have h_int : IsIntegral ℤ ((lᴴ * l) i i) := by |
| 113 | simpa [← algebraMap_mem_Ô, Matrix.mul_apply] using |
| 114 | isIntMatrix_conjTranspose_mul_of_classCoordX₀ hl_int hl_int i i |
| 115 | have h_small (v : NumberField.InfinitePlace E) : ‖Φ v ((lᴴ * l) i i)‖ < 1 := |
| 116 | calc _ = ‖∑ k, star (Φ v (l k i)) * Φ v (l k i)‖ := by simp [Matrix.mul_apply] |
| 117 | _ ≤ ∑ k, ‖star (Φ v (l k i)) * Φ v (l k i)‖ := norm_sum_le _ _ |
| 118 | _ < 1 := by simpa [← sq] using h_short v |
| 119 | have hw : w = 0 := |
| 120 | S.eq_zero_of_ratMiddle_form_eq_zero w rfl |
| 121 | (h_form.trans (eq_zero_of_forall_norm_lt_one h_int h_small)) |
| 122 | exact funext fun a ↦ congrFun hw (.inl a) |
| 123 | |
| 124 | /-- Let `S` satisfy the standing hypotheses `S.IsAdmissible` on the level and the sizes. Let `u` and |
| 125 | `u'` be in `U⁰_c = S.classUnipotent₀ c`, the rational unipotent elements of level `S.M` for the |
| 126 | class `c` that fix the standard frame. Let `p = (c', γ)` and `p' = (c'', γ')` be near terms for `c` |
| 127 | at the same position `t` (`IsNearTermAt`). If `u γ` and `u' γ'` have the same frame image |
| 128 | (`frameImage`), then `p = p'`. -/ |
| 129 | lemma IsNearTermAt.eq_of_frameImage_eq [S.IsAdmissible] |
| 130 | {t : S.reducedImage besselS} {p p' : S.Classes × S.G E} |
| 131 | {u u' : S.G E} (hu : u ∈ S.classUnipotent₀ c) (hu' : u' ∈ S.classUnipotent₀ c) |
| 132 | (hp : S.IsNearTermAt c t p) (hp' : S.IsNearTermAt c t p') |
| 133 | (h_frame : frameImage (u * p.2).val.val = frameImage (u' * p'.2).val.val) : |
| 134 | p = p' := by |
| 135 | obtain ⟨⟨⟨-, hp_rep⟩, -⟩, s, hs, rfl⟩ := hp |
| 136 | obtain ⟨⟨⟨-, hp'_rep⟩, -⟩, s', hs', h_label⟩ := hp' |
| 137 | have h_one {w : S.G E} (hw : w ∈ S.classUnipotent₀ c) : w ∈ S.termsOver c 1 c := hw.1.2 |
| 138 | have h_over : u * p.2 ∈ S.termsOver c s p.1 := by simpa using termsOver.mul (h_one hu) hs |
| 139 | have h_over' : u' * p'.2 ∈ S.termsOver c s' p'.1 := by simpa using termsOver.mul (h_one hu') hs' |
| 140 | -- Equal frames put `s` and `s'` in one coset; their labels are equal too, so `s' = s`. |
| 141 | obtain rfl : s' = s := by |
| 142 | have h_coset : s'⁻¹ * s ∈ S.reducedImage besselS := |
| 143 | termsOver.inv_mul_mem_reducedImage h_over' h_over h_frame.symm |
| 144 | exact Subgroup.groupEquivQuotientProdSubgroup.injective |
| 145 | (Prod.ext (QuotientGroup.eq.2 h_coset) h_label) |
| 146 | -- So the classes agree, and the two terms lie in one double coset, which both represent. |
| 147 | obtain ⟨h_class, h_mem⟩ : p.1 = p'.1 ∧ (u * p.2)⁻¹ * (u' * p'.2) ∈ S.classUnipotent₀ p.1 := |
| 148 | termsOver.eq_and_mem_classUnipotent₀ h_over h_over' h_frame |
| 149 | have h_coset : DoubleCoset.mk (S.classUnipotent₀ c) (S.classUnipotent₀ p.1) p.2 = |
| 150 | DoubleCoset.mk (S.classUnipotent₀ c) (S.classUnipotent₀ p.1) p'.2 := |
| 151 | (DoubleCoset.eq ..).2 |
| 152 | ⟨u'⁻¹ * u, mul_mem (inv_mem hu') hu, (u * p.2)⁻¹ * (u' * p'.2), h_mem, by group⟩ |
| 153 | exact Prod.ext h_class (by rw [← hp_rep, h_coset, h_class, hp'_rep]) |
| 154 | |
| 155 | end New.Filling |
| 156 | |
| 157 | end MiddleRelation |
| 158 | |
| 159 | /-! |
| 160 | ## Uniform independence of frames at boxed points |
| 161 | |
| 162 | At a boxed point `y` the coefficients of a combination of the vectors `y⁻¹ f_l` are bounded by a |
| 163 | power of `b` times its length. |
| 164 | -/ |
| 165 | |
| 166 | namespace New.Filling |
| 167 | |
| 168 | open NumberField Matrix Finset Norms.L2Operator |
| 169 | |
| 170 | /-- If the entries of `A` have norm at most `B`, those of its adjugate have norm at most |
| 171 | `(n ^ 2 * B) ^ n`, as they are minors of order `n` up to sign. -/ |
| 172 | lemma norm_adjugate_le {n : ℕ} {B : ℝ} {A : Matrix (Fin (n + 1)) (Fin (n + 1)) ℂ} |
| 173 | (hA : ∀ i j : Fin (n + 1), ‖A i j‖ ≤ B) (i j : Fin (n + 1)) : |
| 174 | ‖A.adjugate i j‖ ≤ (n ^ 2 * B) ^ n := by |
| 175 | have h_minor : ‖A.submatrix j.succAbove i.succAbove‖ ≤ n ^ 2 * B := by |
| 176 | simpa only [Fintype.card_fin, sq] using |
| 177 | l2_opNorm_le_of_apply (A := A.submatrix j.succAbove i.succAbove) fun _ _ ↦ hA _ _ |
| 178 | calc ‖A.adjugate i j‖ = ‖(A.submatrix j.succAbove i.succAbove).det‖ := by |
| 179 | simp [adjugate_fin_succ_eq_det_submatrix] |
| 180 | _ ≤ ‖A.submatrix j.succAbove i.succAbove‖ ^ n := by |
| 181 | simpa only [Fintype.card_fin] using |
| 182 | norm_det_le_norm_pow (x := A.submatrix j.succAbove i.succAbove) |
| 183 | _ ≤ (n ^ 2 * B) ^ n := by gcongr |
| 184 | |
| 185 | variable {E : Type} [Field E] [CMType E] {𝔰 : Shape} {S : Filling E 𝔰} |
| 186 | |
| 187 | /-- If the entries of a complex matrix of order `ϱ + 1` have norm at most `b ^ e`, where `b = S.b` |
| 188 | is the size parameter of the data `S`, those of its adjugate have norm at most `b ^ ((2 + e) ϱ)`. -/ |
| 189 | lemma norm_adjugate_le_pow {e : ℕ} {A : 𝔰.FrameMatrix} |
| 190 | (hA : ∀ i j : Fin (𝔰.ϱ + 1), ‖A i j‖ ≤ S.b ^ e) (i j : Fin (𝔰.ϱ + 1)) : |
| 191 | ‖A.adjugate i j‖ ≤ S.b ^ ((2 + e) * 𝔰.ϱ) := by |
| 192 | have hb : 0 ≤ S.b := by linarith [S.one_le_b] |
| 193 | have hϱ : (𝔰.ϱ : ℝ) ≤ S.b := (Nat.cast_le.2 𝔰.ϱ.le_succ).trans S.succ_le_b |
| 194 | calc ‖A.adjugate i j‖ ≤ (𝔰.ϱ ^ 2 * S.b ^ e) ^ 𝔰.ϱ := norm_adjugate_le hA i j |
| 195 | _ ≤ (S.b ^ 2 * S.b ^ e) ^ 𝔰.ϱ := by gcongr |
| 196 | _ = S.b ^ ((2 + e) * 𝔰.ϱ) := by ring |
| 197 | |
| 198 | /-- Let `y` be a point of the real unitary group `𝔰.G₁`. Let the vectors `y⁻¹ f_l = frameVector y l` |
| 199 | of the frame `f = (e₁, …, e_ϱ, z)` have length at most `S.frameBoxRadius = b ^ (37 n)`. Let `y` also |
| 200 | have length at most `b ^ (7 n)`. Here `b = S.b`, `ϱ` is the number of hyperbolic planes, and |
| 201 | `n = ϱ + 1`. The length `besselLength y` is the infimum of the operator norm `‖s y‖ + 1` over `s` in |
| 202 | the Bessel subgroup. Then each coefficient `x a` of the combination `∑ x l • frameVector y l` is at |
| 203 | most `b ^ (46 n²)` times the length of the combination. -/ |
| 204 | lemma norm_coeff_le_norm_sum_frameVector {y : 𝔰.G₁} (h_box : y ∈ frameBox S.frameBoxRadius) |
| 205 | (h_size : besselLength y ≤ S.b ^ (7 * 𝔰.n)) (x : Fin (𝔰.ϱ + 1) → ℂ) (a : Fin (𝔰.ϱ + 1)) : |
| 206 | ‖x a‖ ≤ S.b ^ (46 * 𝔰.n ^ 2) * ‖∑ l : Fin (𝔰.ϱ + 1), x l • frameVector y l‖ := by |
| 207 | -- Take `u` unipotent with `u y` small, and let `T` be its unitriangular matrix on the frame. As |
| 208 | -- `u f = (u y) (y⁻¹ f)`, both `T` and `T x` are small, and `x = adj T (T x)`. |
| 209 | have hb : 0 ≤ S.b := by linarith [S.one_le_b] |
| 210 | obtain ⟨u, hu, h_small⟩ : ∃ u ∈ besselU, ‖(u * y).val.val‖ ≤ S.b ^ (7 * 𝔰.n) := |
| 211 | RealPlace.exists_norm_le_of_besselLength_le h_size |
| 212 | set T : 𝔰.FrameMatrix := frameMatrix u |
| 213 | have h_image (x : Fin (𝔰.ϱ + 1) → ℂ) (i : Fin (𝔰.ϱ + 1)) : |
| 214 | ‖(T *ᵥ x) i‖ ≤ S.b ^ (7 * 𝔰.n) * ‖∑ l, x l • frameVector y l‖ := |
| 215 | calc ‖(T *ᵥ x) i‖ = ‖∑ l, x l * u.val (𝔰.besselFrame i) (𝔰.besselFrame l)‖ := by |
| 216 | rw [mulVec, dotProduct_comm] |
| 217 | rfl |
| 218 | _ ≤ ‖(u * y).val.val‖ * ‖∑ l, x l • frameVector y l‖ := |
| 219 | norm_sum_le_mul_norm_sum_frameVector id x _ |
| 220 | _ ≤ _ := by gcongr |
| 221 | have h_entry (i k : Fin (𝔰.ϱ + 1)) : ‖T i k‖ ≤ S.b ^ (7 * 𝔰.n + 37 * 𝔰.n) := |
| 222 | calc ‖T i k‖ ≤ S.b ^ (7 * 𝔰.n) * ‖frameVector y k‖ := by |
| 223 | simpa [Pi.single_apply] using h_image (Pi.single k 1) i |
| 224 | _ ≤ _ := by |
| 225 | grw [pow_add, h_box k] |
| 226 | rfl |
| 227 | have h_cramer : x a = ∑ i, T.adjugate a i * (T *ᵥ x) i := by |
| 228 | change x a = (T.adjugate *ᵥ T *ᵥ x) a |
| 229 | rw [mulVec_mulVec, adjugate_mul, det_eq_one_of_unitriangular (frameMatrix_unitriangular hu), |
| 230 | one_smul, one_mulVec] |
| 231 | have h_exponent : 1 + ((2 + (7 * 𝔰.n + 37 * 𝔰.n)) * 𝔰.ϱ + 7 * 𝔰.n) ≤ 46 * 𝔰.n ^ 2 := by |
| 232 | nlinarith only [S.ten_pow_five_le_varrho, (rfl : 𝔰.n = 𝔰.ϱ + 1)] |
| 233 | calc ‖x a‖ ≤ ∑ i, ‖T.adjugate a i‖ * ‖(T *ᵥ x) i‖ := by |
| 234 | rw [h_cramer] |
| 235 | exact norm_sum_le_of_le _ fun i _ ↦ norm_mul_le _ _ |
| 236 | _ ≤ ∑ _ : Fin (𝔰.ϱ + 1), S.b ^ ((2 + (7 * 𝔰.n + 37 * 𝔰.n)) * 𝔰.ϱ) * |
| 237 | (S.b ^ (7 * 𝔰.n) * ‖∑ l, x l • frameVector y l‖) := by |
| 238 | gcongr with i |
| 239 | · exact norm_adjugate_le_pow h_entry a i |
| 240 | · exact h_image x i |
| 241 | _ ≤ S.b ^ (1 + ((2 + (7 * 𝔰.n + 37 * 𝔰.n)) * 𝔰.ϱ + 7 * 𝔰.n)) * |
| 242 | ‖∑ l, x l • frameVector y l‖ := by |
| 243 | grw [Fin.sum_const, nsmul_eq_mul, S.succ_le_b] |
| 244 | exact le_of_eq (by ring) |
| 245 | _ ≤ _ := by grw [pow_le_pow_right₀ S.one_le_b h_exponent] |
| 246 | |
| 247 | /-- At the infinite place `v`, for `y` giving a point of `𝔰.G₁` at each infinite place and a column |
| 248 | `x` over `E`: take `frameImage γ *ᵥ x`, embed each coordinate `i` by `Φ v`, divide it by |
| 249 | `S.basisScale v i`, and apply `(y v)⁻¹`. The result is the sum over `k` of |
| 250 | `Φ v (x k) / S.basisScale v (𝔰.besselFrame k)` times `frameVector (((S.ratToInf γ)⁻¹ * y) v) k`. -/ |
| 251 | lemma sum_smul_frameVector_eq (γ : S.G E) (y : InfinitePlace E → 𝔰.G₁) (v : InfinitePlace E) |
| 252 | (x : Fin (𝔰.ϱ + 1) → E) : |
| 253 | ∑ k : Fin (𝔰.ϱ + 1), (Φ v (x k) / S.basisScale v (𝔰.besselFrame k)) • |
| 254 | frameVector (((S.ratToInf γ)⁻¹ * y) v) k = |
| 255 | .toLp 2 ((((y v)⁻¹ : 𝔰.G₁) : Matrix 𝔰.BesselIndex 𝔰.BesselIndex ℂ) *ᵥ |
| 256 | fun i : 𝔰.BesselIndex ↦ Φ v ((frameImage γ *ᵥ x) i) / S.basisScale v i) := by |
| 257 | rw [← frameImage_ratToInf_mulVec_div γ v x, mulVec_mulVec] |
| 258 | ext i |
| 259 | simp [frameVector, mulVec, dotProduct, Matrix.mul_apply, mul_comm, -Fintype.sum_sum_type] |
| 260 | |
| 261 | /-- Let `S` satisfy the standing hypotheses `S.IsAdmissible`, which give `1 ≤ |κ_v| ≤ b ^ 23` for |
| 262 | `κ_v = S.realM v` and `b = S.b`. At the infinite place `v` of the CM field `E`, the scale factors |
| 263 | `S.basisScale v` of the normalised basis at two vectors of the frame differ in norm by a factor at |
| 264 | most `b ^ (23 ϱ)`. -/ |
| 265 | lemma norm_basisScale_besselFrame_le [S.IsAdmissible] (v : InfinitePlace E) (a k : Fin (𝔰.ϱ + 1)) : |
| 266 | ‖S.basisScale v (𝔰.besselFrame a)‖ ≤ |
| 267 | S.b ^ (23 * 𝔰.ϱ) * ‖S.basisScale v (𝔰.besselFrame k)‖ := by |
| 268 | have hκ : 1 ≤ |S.realM v| := one_le_abs_realM v |
| 269 | have h_pow : |S.realM v| ^ (𝔰.ϱ - a) ≤ S.b ^ (23 * 𝔰.ϱ) * |S.realM v| ^ (𝔰.ϱ - k) := |
| 270 | calc |S.realM v| ^ (𝔰.ϱ - a) ≤ |S.realM v| ^ 𝔰.ϱ := pow_le_pow_right₀ hκ (𝔰.ϱ.sub_le a) |
| 271 | _ ≤ S.b ^ (23 * 𝔰.ϱ) := by grw [abs_realM_le, pow_mul] |
| 272 | _ ≤ _ := le_mul_of_one_le_right (pow_nonneg (by linarith [S.one_le_b]) _) (one_le_pow₀ hκ) |
| 273 | simp only [basisScale_besselFrame, norm_div, norm_pow, Complex.norm_real, Real.norm_eq_abs, |
| 274 | ← mul_div_assoc] |
| 275 | gcongr |
| 276 | |
| 277 | /-- Bound the norm of a single summand `(x k / S.basisScale v (𝔰.besselFrame k)) • frameVector z k` |
| 278 | for `z ∈ frameBox S.frameBoxRadius` and `‖x k‖ ≤ B`. -/ |
| 279 | private lemma norm_div_basisScale_smul_frameVector_le [S.IsAdmissible] {z : 𝔰.G₁} |
| 280 | (h_box : z ∈ frameBox S.frameBoxRadius) (v : InfinitePlace E) (x : Fin (𝔰.ϱ + 1) → ℂ) |
| 281 | (B : ℝ) (hx : ∀ k : Fin (𝔰.ϱ + 1), ‖x k‖ ≤ B) (a k : Fin (𝔰.ϱ + 1)) : |
| 282 | ‖(x k / S.basisScale v (𝔰.besselFrame k)) • frameVector z k‖ ≤ |
| 283 | B * (S.b ^ (23 * 𝔰.ϱ) / ‖S.basisScale v (𝔰.besselFrame a)‖) * S.b ^ (37 * 𝔰.n) := by |
| 284 | have hb : 0 ≤ S.b := by linarith [S.one_le_b] |
| 285 | have hB : 0 ≤ B := (norm_nonneg _).trans (hx a) |
| 286 | have h_scale : ‖S.basisScale v (𝔰.besselFrame k)‖⁻¹ ≤ |
| 287 | S.b ^ (23 * 𝔰.ϱ) / ‖S.basisScale v (𝔰.besselFrame a)‖ := by |
| 288 | rw [inv_eq_one_div, div_le_div_iff₀ (norm_pos_iff.2 (S.basisScale_ne_zero v _)) |
| 289 | (norm_pos_iff.2 (S.basisScale_ne_zero v _)), one_mul] |
| 290 | exact norm_basisScale_besselFrame_le v a k |
| 291 | have h_frame : ‖frameVector z k‖ ≤ S.b ^ (37 * 𝔰.n) := h_box k |
| 292 | grw [norm_smul, norm_div, div_eq_mul_inv, hx k, h_scale, h_frame] |
| 293 | |
| 294 | /-- Let `S` satisfy the standing hypotheses `S.IsAdmissible` on the level and the sizes, and let `v` |
| 295 | be an infinite place of the CM field `E`. Let the frame vectors `z⁻¹ f_k` at `z` have length at most |
| 296 | `S.frameBoxRadius = b ^ (37 n)`. Take their combination whose coefficients are numbers `x k` of norm |
| 297 | at most `B` divided by the scale factors `S.basisScale v` of the normalised basis. Its length is at |
| 298 | most `B b ^ (1 + 23 ϱ + 37 n)` divided by the norm of the scale factor of any frame vector `a`, |
| 299 | where `b = S.b` and `n = ϱ + 1`. -/ |
| 300 | lemma norm_sum_div_basisScale_smul_frameVector_le [S.IsAdmissible] {z : 𝔰.G₁} |
| 301 | (h_box : z ∈ frameBox S.frameBoxRadius) (v : InfinitePlace E) {x : Fin (𝔰.ϱ + 1) → ℂ} {B : ℝ} |
| 302 | (hx : ∀ k : Fin (𝔰.ϱ + 1), ‖x k‖ ≤ B) (a : Fin (𝔰.ϱ + 1)) : |
| 303 | ‖∑ k : Fin (𝔰.ϱ + 1), (x k / S.basisScale v (𝔰.besselFrame k)) • frameVector z k‖ ≤ |
| 304 | B * S.b ^ (1 + 23 * 𝔰.ϱ + 37 * 𝔰.n) / ‖S.basisScale v (𝔰.besselFrame a)‖ := by |
| 305 | have hb : 0 ≤ S.b := by linarith [S.one_le_b] |
| 306 | have hB : 0 ≤ B := (norm_nonneg _).trans (hx a) |
| 307 | have h_term (k : Fin (𝔰.ϱ + 1)) : |
| 308 | ‖(x k / S.basisScale v (𝔰.besselFrame k)) • frameVector z k‖ ≤ |
| 309 | B * (S.b ^ (23 * 𝔰.ϱ) / ‖S.basisScale v (𝔰.besselFrame a)‖) * S.b ^ (37 * 𝔰.n) := |
| 310 | norm_div_basisScale_smul_frameVector_le h_box v x B hx a k |
| 311 | grw [norm_sum_le_of_le _ fun k _ ↦ h_term k, Fin.sum_const, nsmul_eq_mul, S.succ_le_b] |
| 312 | exact le_of_eq (by ring) |
| 313 | |
| 314 | /-- Assume `S.IsAdmissible`, the standing hypotheses on the level and the sizes. Let `γ` be near |
| 315 | (`S.IsNear γ`): for some point `y` of `𝔰.G₁` at each infinite place, both `y` and `γ⁻¹ y` lie in |
| 316 | `boxedPoints`. Let `Y` be the first `j` rows of the matrix `S.frameProducts γ` of products |
| 317 | `h(f_i, γ f_l)`, completed by rows of the identity matrix. At every infinite place `v`, with |
| 318 | embedding `Φ v`, the entries of the adjugate of `Y` have norm at most |
| 319 | `S.b ^ ((2 + 134 𝔰.n) 𝔰.ϱ)`. -/ |
| 320 | lemma IsNear.norm_adjugate_paddedLeading_le [S.IsAdmissible] {γ : S.G E} (h_near : S.IsNear γ) |
| 321 | (j : Fin (𝔰.ϱ + 2)) (v : InfinitePlace E) (k l : Fin (𝔰.ϱ + 1)) : |
| 322 | ‖Φ v ((paddedLeading j (S.frameProducts γ)).adjugate k l)‖ ≤ |
| 323 | S.b ^ ((2 + 134 * 𝔰.n) * 𝔰.ϱ) := by |
| 324 | have h_entry (i m : Fin (𝔰.ϱ + 1)) : |
| 325 | ‖(Φ v).mapMatrix (paddedLeading j (S.frameProducts γ)) i m‖ ≤ S.b ^ (134 * 𝔰.n) := by |
| 326 | rw [RingHom.mapMatrix_apply, map_apply, paddedLeading, of_apply] |
| 327 | split_ifs |
| 328 | · exact h_near.norm_frameProducts_le v i m |
| 329 | · simpa using one_le_pow₀ S.one_le_b |
| 330 | · simpa using pow_nonneg (zero_le_one.trans S.one_le_b) _ |
| 331 | have h_adj := norm_adjugate_le_pow h_entry k l |
| 332 | rwa [← RingHom.map_adjugate] at h_adj |
| 333 | |
| 334 | /-- The coordinates in the isotropic space `A` spanned by `e₁, …, e_ϱ` of the columns `k ≥ j` of |
| 335 | `γ f · adj Y`, where `f` is the frame, `γ f = frameImage γ`, and `Y` consists of the first `j` rows |
| 336 | of the matrix of products completed by rows of `1`; the columns `k < j` are set to `0`. For `γ` of |
| 337 | cell rank `j` these columns lie both in the span of `f` and in the span of `γ f`. There are none |
| 338 | when `j = ϱ + 1`. -/ |
| 339 | noncomputable def sharedVectors (S : Filling E 𝔰) (j : Fin (𝔰.ϱ + 2)) (γ : S.G E) : |
| 340 | Matrix (Fin 𝔰.ϱ) (Fin (𝔰.ϱ + 1)) E := |
| 341 | of fun (a : Fin 𝔰.ϱ) (k : Fin (𝔰.ϱ + 1)) ↦ |
| 342 | if j.val ≤ k.val then |
| 343 | (frameImage γ.val.val * (paddedLeading j (S.frameProducts γ)).adjugate) (.inl a) k |
| 344 | else 0 |
| 345 | |
| 346 | /-- Let `γ` have cell rank `j` (`S.HasCellRank j γ`). Let `k ≥ j`. Then column `k` of `γ f · adj Y` |
| 347 | lies in the span of the frame `f = frameImage 1`. Here `γ f = frameImage γ`, and `Y` is the first |
| 348 | `j` rows of the matrix of products `S.frameProducts γ`, completed by rows of the identity matrix. -/ |
| 349 | lemma HasCellRank.exists_frameImage_one_mulVec_eq {S : Filling E 𝔰} |
| 350 | {j : Fin (𝔰.ϱ + 2)} {γ : S.G E} (h : S.HasCellRank j γ) {k : Fin (𝔰.ϱ + 1)} |
| 351 | (hk : j.val ≤ k.val) : |
| 352 | ∃ w : Fin (𝔰.ϱ + 1) → E, |
| 353 | frameImage 1 *ᵥ w = |
| 354 | frameImage γ *ᵥ (paddedLeading j (S.frameProducts γ)).adjugate.col k := by |
| 355 | set Y : Matrix (Fin (𝔰.ϱ + 1)) (Fin (𝔰.ϱ + 1)) E := paddedLeading j (S.frameProducts γ) |
| 356 | obtain ⟨w, hw⟩ : ∃ w : Fin (𝔰.ϱ + 1) → E, frameImage 1 *ᵥ w = frameImage γ *ᵥ Y⁻¹.col k := |
| 357 | h.exists_shared_frame_vector hk |
| 358 | obtain ⟨-, h_minor, -⟩ := h |
| 359 | have h_det : Y.det ≠ 0 := by rwa [det_paddedLeading] |
| 360 | have h_adj : Y.det • Y⁻¹.col k = Y.adjugate.col k := by |
| 361 | ext i |
| 362 | simp [Matrix.inv_def, h_det] |
| 363 | exact ⟨Y.det • w, by rw [← h_adj, mulVec_smul, mulVec_smul, hw]⟩ |
| 364 | |
| 365 | /-- Left multiplication by an element `u` of `besselU0`, the unipotent elements that fix each vector |
| 366 | of the frame `f`, does not change the matrix of products `h(f_i, γ f_l)`. -/ |
| 367 | lemma frameProducts_mul_of_mem_besselU0 {S : Filling E 𝔰} {u : S.G E} (hu : u ∈ besselU0) |
| 368 | (γ : S.G E) : S.frameProducts (u * γ) = S.frameProducts γ := by |
| 369 | obtain ⟨h_unip, h_fix⟩ : u⁻¹ ∈ besselU ∧ frameMatrix u⁻¹ = 1 := mem_besselU0_iff.1 (inv_mem hu) |
| 370 | obtain ⟨h_one_unip, h_one⟩ := mem_besselU0_iff.1 (one_mem (besselU0 : Subgroup (S.G E))) |
| 371 | have h_gram : S.frameProducts (u⁻¹⁻¹ * γ * 1) = |
| 372 | (frameMatrix u⁻¹)ᴴ * S.frameProducts γ * frameMatrix (1 : S.G E) := |
| 373 | frameGram_inv_mul_mul h_unip h_one_unip |
| 374 | simpa [h_fix, h_one] using h_gram |
| 375 | |
| 376 | /-- Let `γ` have cell rank `j` (`S.HasCellRank j γ`) and let `u` be in `besselU0`, the unipotent |
| 377 | elements that fix each vector of the frame `f`. Then `u γ` and `γ` have the same shared vectors (the |
| 378 | first `ϱ` coordinates of the columns `k ≥ j` of `γ f · adj Y`, see `sharedVectors`), as these |
| 379 | columns lie in the span of `f`. -/ |
| 380 | lemma HasCellRank.sharedVectors_mul_of_mem_besselU0 {S : Filling E 𝔰} |
| 381 | {j : Fin (𝔰.ϱ + 2)} {γ : S.G E} (h : S.HasCellRank j γ) {u : S.G E} (hu : u ∈ besselU0) : |
| 382 | S.sharedVectors j (u * γ) = S.sharedVectors j γ := by |
| 383 | ext a k |
| 384 | simp only [sharedVectors, of_apply, frameProducts_mul_of_mem_besselU0 hu] |
| 385 | split_ifs with hk |
| 386 | · set Y : Matrix (Fin (𝔰.ϱ + 1)) (Fin (𝔰.ϱ + 1)) E := paddedLeading j (S.frameProducts γ) |
| 387 | obtain ⟨w, hw⟩ : ∃ w : Fin (𝔰.ϱ + 1) → E, |
| 388 | frameImage 1 *ᵥ w = frameImage γ *ᵥ Y.adjugate.col k := |
| 389 | h.exists_frameImage_one_mulVec_eq hk |
| 390 | have h_fix : frameImage (u : Matrix 𝔰.BesselIndex 𝔰.BesselIndex E) = frameImage 1 := by |
| 391 | simpa using frameImage_mul_of_mem_besselU0 (γ := 1) hu |
| 392 | have h_col : frameImage (u * γ : S.G E) *ᵥ Y.adjugate.col k = |
| 393 | frameImage γ *ᵥ Y.adjugate.col k := by |
| 394 | rw [frameImage_mul, ← mulVec_mulVec, ← hw, ← frameImage_mulVec, h_fix] |
| 395 | exact congrFun h_col (.inl a) |
| 396 | · rfl |
| 397 | |
| 398 | /-- Let `γ` be near, and let `frameImage 1 *ᵥ w = frameImage γ *ᵥ x`, where the entries of `x` |
| 399 | have norm at most `B` under `Φ v`. Then each entry of `w` has norm at most |
| 400 | `S.b ^ (46 n²) * (B * S.b ^ (1 + 23 ϱ + 37 n))` under `Φ v`, where `n = ϱ + 1`. -/ |
| 401 | private lemma IsNear.norm_le_of_frameImage_one_mulVec_eq [S.IsAdmissible] {γ : S.G E} |
| 402 | (h_near : S.IsNear γ) (hb : 1 ≤ S.b) (v : InfinitePlace E) |
| 403 | {w x : Fin (𝔰.ϱ + 1) → E} (hw : frameImage 1 *ᵥ w = frameImage γ *ᵥ x) |
| 404 | {B : ℝ} (hx : ∀ i, ‖Φ v (x i)‖ ≤ B) (a : Fin (𝔰.ϱ + 1)) : |
| 405 | ‖Φ v (w a)‖ ≤ S.b ^ (46 * 𝔰.n ^ 2) * (B * S.b ^ (1 + 23 * 𝔰.ϱ + 37 * 𝔰.n)) := by |
| 406 | obtain ⟨y, hy, hγy⟩ := h_near |
| 407 | have h_box : y v ∈ frameBox S.frameBoxRadius := mem_frameBox_of_mem_boxedPoints hy v |
| 408 | set z : 𝔰.G₁ := ((S.ratToInf γ)⁻¹ * y) v |
| 409 | have hz_box : z ∈ frameBox S.frameBoxRadius := mem_frameBox_of_mem_boxedPoints hγy v |
| 410 | let s (i : Fin (𝔰.ϱ + 1)) : ℂ := S.basisScale v (𝔰.besselFrame i) |
| 411 | -- The vector `f w = γ f x` has length bounded at the boxed point `γ⁻¹ y` because `x` is; at the |
| 412 | -- boxed point `y` this bounds `w`. |
| 413 | have h_same : ∑ i, (Φ v (w i) / s i) • frameVector (y v) i = |
| 414 | ∑ i, (Φ v (x i) / s i) • frameVector z i := by |
| 415 | calc _ = .toLp 2 ((y v)⁻¹.val.val *ᵥ fun i : 𝔰.BesselIndex ↦ |
| 416 | Φ v ((frameImage 1 *ᵥ w) i) / S.basisScale v i) := by |
| 417 | simpa only [map_one, inv_one, one_mul, OneMemClass.coe_one, Units.val_one] using |
| 418 | sum_smul_frameVector_eq (1 : S.G E) y v w |
| 419 | _ = _ := by |
| 420 | rw [hw] |
| 421 | exact (sum_smul_frameVector_eq γ y v x).symm |
| 422 | have h_size : besselLength (y v) ≤ S.b ^ (7 * 𝔰.n) := |
| 423 | (inCut_of_mem_boxedPoints hy v).trans |
| 424 | (pow_le_pow_right₀ hb (by linarith [S.ten_pow_five_le_varrho])) |
| 425 | have h_coeff : ‖Φ v (w a)‖ / ‖s a‖ ≤ S.b ^ (46 * 𝔰.n ^ 2) * |
| 426 | (B * S.b ^ (1 + 23 * 𝔰.ϱ + 37 * 𝔰.n)) / ‖s a‖ := |
| 427 | calc _ ≤ S.b ^ (46 * 𝔰.n ^ 2) * ‖∑ i, (Φ v (w i) / s i) • frameVector (y v) i‖ := by |
| 428 | rw [← norm_div] |
| 429 | exact norm_coeff_le_norm_sum_frameVector h_box h_size (fun i ↦ Φ v (w i) / s i) _ |
| 430 | _ ≤ _ := by |
| 431 | grw [h_same, norm_sum_div_basisScale_smul_frameVector_le hz_box v hx a, ← mul_div_assoc] |
| 432 | rwa [div_le_div_iff_of_pos_right (norm_pos_iff.2 (S.basisScale_ne_zero v _))] at h_coeff |
| 433 | |
| 434 | /-- Let `S` satisfy the standing hypotheses `S.IsAdmissible` on the level and the sizes. Let `γ` |
| 435 | have cell rank `j`. Let `γ` also be near. Let `Y` be the first `j` rows of `S.frameProducts γ` |
| 436 | completed by rows of `1`. If `j ≤ k`, column `k` of `S.sharedVectors j γ` consists of the |
| 437 | coordinates along `e₁, …, e_ϱ` of column `k` of `γ f · adj Y`, which lies in the spans of both the |
| 438 | frame `f` and `γ f`. If `k < j`, the column is zero. All these entries have norm at most |
| 439 | `S.b ^ (182 n²)` under the embedding `Φ v` of every infinite place `v`, where `n = ϱ + 1`. -/ |
| 440 | lemma HasCellRank.norm_sharedVectors_le [S.IsAdmissible] |
| 441 | {j : Fin (𝔰.ϱ + 2)} {γ : S.G E} (h : S.HasCellRank j γ) (h_near : S.IsNear γ) |
| 442 | (v : InfinitePlace E) (a : Fin 𝔰.ϱ) (k : Fin (𝔰.ϱ + 1)) : |
| 443 | ‖Φ v (S.sharedVectors j γ a k)‖ ≤ S.b ^ (182 * 𝔰.n ^ 2) := by |
| 444 | -- The vector is `γ f x = f w` with `x` a column of the adjugate of `Y`. |
| 445 | have hb : 1 ≤ S.b := S.one_le_b |
| 446 | rw [sharedVectors, of_apply] |
| 447 | split_ifs with hk |
| 448 | swap |
| 449 | · simpa using pow_nonneg (zero_le_one.trans hb) _ |
| 450 | set Y : Matrix (Fin (𝔰.ϱ + 1)) (Fin (𝔰.ϱ + 1)) E := paddedLeading j (S.frameProducts γ) |
| 451 | have hY (i : Fin (𝔰.ϱ + 1)) : ‖Φ v (Y.adjugate i k)‖ ≤ S.b ^ ((2 + 134 * 𝔰.n) * 𝔰.ϱ) := |
| 452 | h_near.norm_adjugate_paddedLeading_le j v i k |
| 453 | obtain ⟨w, hw⟩ : ∃ w : Fin (𝔰.ϱ + 1) → E, |
| 454 | frameImage 1 *ᵥ w = frameImage γ *ᵥ Y.adjugate.col k := |
| 455 | h.exists_frameImage_one_mulVec_eq hk |
| 456 | have h_entry : (frameImage γ.val.val * Y.adjugate) (.inl a) k = w a.castSucc := by |
| 457 | change (frameImage γ.val.val *ᵥ Y.adjugate.col k) (.inl a) = _ |
| 458 | rw [← hw, frameImage_one_mulVec, Sum.elim_inl, Fin.init] |
| 459 | have h_coeff := h_near.norm_le_of_frameImage_one_mulVec_eq hb v hw hY a.castSucc |
| 460 | have h_exponent : 46 * 𝔰.n ^ 2 + ((2 + 134 * 𝔰.n) * 𝔰.ϱ + (1 + 23 * 𝔰.ϱ + 37 * 𝔰.n)) ≤ |
| 461 | 182 * 𝔰.n ^ 2 := by lia |
| 462 | grw [h_entry, h_coeff, ← pow_add, ← pow_add, pow_le_pow_right₀ hb h_exponent] |
| 463 | |
| 464 | end New.Filling |
| 465 | |
| 466 | /-! |
| 467 | ## Moving frames by the unipotent group of the level |
| 468 | |
| 469 | Take two frames with the same integral matrix of products, with nonzero leading minor, and the same |
| 470 | shared vectors. If they agree outside the isotropic space and are congruent modulo `frameModulus`, |
| 471 | they are carried to one another by a move, that is, a unipotent element of level `M` that fixes the |
| 472 | standard frame. |
| 473 | -/ |
| 474 | |
| 475 | section FrameCount |
| 476 | |
| 477 | open Matrix Finset Fin Pointwise |
| 478 | |
| 479 | namespace New.Filling |
| 480 | |
| 481 | section Skew |
| 482 | |
| 483 | variable {R m n : Type} [CommRing R] [StarRing R] [Fintype m] [Fintype n] |
| 484 | |
| 485 | /-- The matrix `σ = δ̄ μ α - δ (μ α)ᴴ - αᴴ Pᴴ μ α`, a skew-hermitian solution of `σ P = δ δ̄ μ` when |
| 486 | `Pᴴ μ` is skew-hermitian and `μ α P = δ μ`. Under these hypotheses, if `δ` is invertible and |
| 487 | `δ⁻¹ μ α`, `δ⁻¹ P α` have the blocks `(μ₁, 0; μ₂, 0)`, `(1, 0; θ, 0)`, then `σ` is `δ δ̄` times the |
| 488 | block matrix `(μ₁ + μ₂ᴴ θ, -μ₂ᴴ; μ₂, 0)`. -/ |
| 489 | def skewSolution (P μ : Matrix m n R) (α : Matrix n m R) (δ : R) : Matrix m m R := |
| 490 | star δ • (μ * α) - δ • (μ * α)ᴴ - αᴴ * (Pᴴ * μ) * α |
| 491 | |
| 492 | variable {P μ : Matrix m n R} {α : Matrix n m R} {δ : R} |
| 493 | |
| 494 | /-- If `Pᴴ μ` is skew-hermitian, so is `skewSolution P μ α δ`. -/ |
| 495 | lemma conjTranspose_skewSolution (h_gram : μᴴ * P = -(Pᴴ * μ)) : |
| 496 | (skewSolution P μ α δ)ᴴ = -skewSolution P μ α δ := by |
| 497 | simp only [skewSolution, conjTranspose_sub, conjTranspose_smul, conjTranspose_mul, |
| 498 | conjTranspose_conjTranspose, star_star, h_gram, Matrix.neg_mul, Matrix.mul_neg, |
| 499 | Matrix.mul_assoc] |
| 500 | rw [← Matrix.mul_assoc Pᴴ] |
| 501 | abel |
| 502 | |
| 503 | /-- If `Pᴴ μ` is skew-hermitian and `μ α P = δ μ`, then `σ = skewSolution P μ α δ` solves |
| 504 | `σ P = δ δ̄ μ`: the first term gives `δ δ̄ μ` and the other two cancel. -/ |
| 505 | lemma skewSolution_mul (h_gram : μᴴ * P = -(Pᴴ * μ)) (h_solve : μ * α * P = δ • μ) : |
| 506 | skewSolution P μ α δ * P = (δ * star δ) • μ := by |
| 507 | have h_third : αᴴ * (Pᴴ * μ) * α * P = δ • (αᴴ * (Pᴴ * μ)) := by |
| 508 | simp only [← Matrix.mul_smul, ← h_solve, Matrix.mul_assoc] |
| 509 | rw [skewSolution, Matrix.sub_mul, Matrix.sub_mul, Matrix.smul_mul, Matrix.smul_mul, h_solve, |
| 510 | h_third, conjTranspose_mul, Matrix.mul_assoc αᴴ, h_gram, Matrix.mul_neg, smul_neg, smul_smul, |
| 511 | mul_comm, sub_neg_eq_add, add_sub_cancel_right] |
| 512 | |
| 513 | /-- If `P`, `μ`, `α` and `δ` have entries in a subring `O` stable under the involution, so has |
| 514 | `skewSolution P μ α δ`. -/ |
| 515 | lemma isIntMatrix_skewSolution {O : Subring R} [IsStarStable O] (hP : IsIntMatrix O P) |
| 516 | (hμ : IsIntMatrix O μ) (hα : IsIntMatrix O α) (hδ : δ ∈ O) : |
| 517 | IsIntMatrix O (skewSolution P μ α δ) := by |
| 518 | have hμα : IsIntMatrix O (μ * α) := hμ.mul hα |
| 519 | have h_third : IsIntMatrix O (αᴴ * (Pᴴ * μ) * α) := |
| 520 | (hα.conjTranspose.mul (hP.conjTranspose.mul hμ)).mul hα |
| 521 | exact ((hμα.smul (IsStarStable.star_mem hδ)).sub (hμα.conjTranspose.smul hδ)).sub h_third |
| 522 | |
| 523 | end Skew |
| 524 | |
| 525 | variable {E : Type} [Field E] [CMType E] {𝔰 : Shape} |
| 526 | |
| 527 | /-- The modulus `M * det (Y * Yᴴ)` for frames with the products `Z`, where `M = S.M` is the product |
| 528 | of the two level primes and `Y` consists of the first `j` rows of `Z` completed by rows of `1`. -/ |
| 529 | noncomputable def frameModulus (S : Filling E 𝔰) (j : Fin (𝔰.ϱ + 2)) |
| 530 | (Z : Matrix (Fin (𝔰.ϱ + 1)) (Fin (𝔰.ϱ + 1)) E) : E := |
| 531 | S.M • (paddedLeading j Z * (paddedLeading j Z)ᴴ).det |
| 532 | |
| 533 | variable {S : Filling E 𝔰} {j : Fin (𝔰.ϱ + 2)} {Z : Matrix (Fin (𝔰.ϱ + 1)) (Fin (𝔰.ϱ + 1)) E} |
| 534 | |
| 535 | /-- The elements of `E` that are integral at every finite place, the preimage of the ring `Ô E` of |
| 536 | integral finite adeles, form a subring stable under conjugation. -/ |
| 537 | lemma isStarStable_comap_Ô : |
| 538 | IsStarStable ((Ô E).comap (algebraMap E (𝔸f E))) := |
| 539 | ⟨fun hx ↦ by simpa using star_mem_Ô hx⟩ |
| 540 | |
| 541 | /-- The modulus `S.frameModulus j Z`, which is `M * det (Y * Yᴴ)` with `M = S.M` and `Y` the first |
| 542 | `j` rows of `Z` completed by rows of `1`, is nonzero if `leadingMinor Z j`, which is `det Y`, is |
| 543 | nonzero. -/ |
| 544 | lemma frameModulus_ne_zero (h_minor : leadingMinor Z j ≠ 0) : S.frameModulus j Z ≠ 0 := by |
| 545 | simp [frameModulus, h_minor, S.levelPrime_prime_and_ne, Nat.Prime.ne_zero] |
| 546 | |
| 547 | /-- If the entries of `Z` are algebraic integers, then its first `j` rows completed by rows of `1` |
| 548 | have entries that are integral at every finite place. -/ |
| 549 | lemma isIntMatrix_paddedLeading {𝔰 : Shape} {j : Fin (𝔰.ϱ + 2)} |
| 550 | {Z : Matrix (Fin (𝔰.ϱ + 1)) (Fin (𝔰.ϱ + 1)) E} |
| 551 | (hZ : ∀ a b : Fin (𝔰.ϱ + 1), IsIntegral ℤ (Z a b)) : |
| 552 | IsIntMatrix ((Ô E).comap (algebraMap E (𝔸f E))) (paddedLeading j Z) := by |
| 553 | simp [IsIntMatrix, paddedLeading, ite_mem, hZ] |
| 554 | |
| 555 | /-- Let `Y` be the first `j` rows of `Z` completed by rows of `1`, and let `P = isotropicRows Z` be |
| 556 | the first `ϱ` rows of `Z`. If the last column and the columns `k ≥ j` of `η` vanish, then `η Y` is |
| 557 | the product of the first `ϱ` columns of `η` with `P`, as the other rows of `Y` are rows of `P`. -/ |
| 558 | lemma mul_paddedLeading_eq_submatrix_mul_isotropicRows {R m : Type} [CommRing R] {j : Fin (𝔰.ϱ + 2)} |
| 559 | {Z : Matrix (Fin (𝔰.ϱ + 1)) (Fin (𝔰.ϱ + 1)) R} {η : Matrix m (Fin (𝔰.ϱ + 1)) R} |
| 560 | (h_zero : ∀ (i : m) (k : Fin (𝔰.ϱ + 1)), j.val ≤ k.val ∨ k = 𝔰.top → η i k = 0) : |
| 561 | η * paddedLeading j Z = η.submatrix id Fin.castSucc * isotropicRows Z := by |
| 562 | ext i b |
| 563 | rw [Matrix.mul_apply, Fin.sum_univ_castSucc, h_zero i _ (.inr rfl), zero_mul, add_zero, |
| 564 | Matrix.mul_apply] |
| 565 | refine Finset.sum_congr rfl fun k _ ↦ ?_ |
| 566 | by_cases hk : k.val < j.val |
| 567 | · simp [paddedLeading, isotropicRows, hk] |
| 568 | · simp [h_zero i k.castSucc (.inl (not_lt.1 hk))] |
| 569 | |
| 570 | /-- Let `Y` be the first `j` rows of `Z` completed by rows of `1`, let `P = isotropicRows Z` be the |
| 571 | first `ϱ` rows of `Z` and `α` the first `ϱ` columns of `adj Y`. If the last column and the columns |
| 572 | `k ≥ j` of `X adj Y` vanish, then `X α P = det Y • X`, as the other rows of `Y` are rows of `P`. -/ |
| 573 | lemma mul_adjugate_mul_isotropicRows {E : Type} [Field E] {𝔰 : Shape} {j : Fin (𝔰.ϱ + 2)} |
| 574 | {Z : Matrix (Fin (𝔰.ϱ + 1)) (Fin (𝔰.ϱ + 1)) E} {X : Matrix (Fin 𝔰.ϱ) (Fin (𝔰.ϱ + 1)) E} |
| 575 | (h_zero : ∀ (i : Fin 𝔰.ϱ) (k : Fin (𝔰.ϱ + 1)), j.val ≤ k.val ∨ k = 𝔰.top → |
| 576 | (X * (paddedLeading j Z).adjugate) i k = 0) : |
| 577 | X * (paddedLeading j Z).adjugate.submatrix id castSucc * isotropicRows Z = |
| 578 | (paddedLeading j Z).det • X := by |
| 579 | calc _ = X * (paddedLeading j Z).adjugate * paddedLeading j Z := |
| 580 | (mul_paddedLeading_eq_submatrix_mul_isotropicRows h_zero).symm |
| 581 | _ = _ := by rw [Matrix.mul_assoc, adjugate_mul, Matrix.mul_smul, Matrix.mul_one] |
| 582 | |
| 583 | /-- At the top cell rank `j = ϱ + 1`, with `paddedLeading j Z = Z`, let `P = isotropicRows Z` be the |
| 584 | first `ϱ` rows of the invertible matrix `Z` over the CM field `E`. If `Pᴴ μ` is skew-hermitian for |
| 585 | the complex conjugation of `E`, then `μ` kills the last column of `adj Z`: so does `P`, and `Pᴴ` is |
| 586 | injective. -/ |
| 587 | lemma mulVec_adjugate_top_eq_zero (hj : 𝔰.ϱ < j.val) (h_minor : leadingMinor Z j ≠ 0) |
| 588 | {μ : Matrix (Fin 𝔰.ϱ) (Fin (𝔰.ϱ + 1)) E} |
| 589 | (h_gram : μᴴ * isotropicRows Z = -((isotropicRows Z)ᴴ * μ)) : |
| 590 | μ *ᵥ (paddedLeading j Z).adjugate.col 𝔰.top = 0 := by |
| 591 | set Y : Matrix (Fin (𝔰.ϱ + 1)) (Fin (𝔰.ϱ + 1)) E := paddedLeading j Z with hY |
| 592 | set P : Matrix (Fin 𝔰.ϱ) (Fin (𝔰.ϱ + 1)) E := isotropicRows Z with hP_def |
| 593 | let α : Matrix (Fin (𝔰.ϱ + 1)) (Fin 𝔰.ϱ) E := Y.adjugate.submatrix id castSucc |
| 594 | have hP_adj (a : Fin 𝔰.ϱ) (b : Fin (𝔰.ϱ + 1)) : |
| 595 | (P * Y.adjugate) a b = if a.castSucc = b then Y.det else 0 := |
| 596 | calc (P * Y.adjugate) a b = (Y * Y.adjugate) a.castSucc b := by |
| 597 | simp [hP_def, hY, Matrix.mul_apply, paddedLeading, a.is_lt.trans hj] |
| 598 | _ = _ := by simp [mul_adjugate, Matrix.one_apply] |
| 599 | have h_last : P *ᵥ Y.adjugate.col 𝔰.top = 0 := by |
| 600 | ext a |
| 601 | exact (hP_adj a 𝔰.top).trans (ite_eq_right (castSucc_lt_last a).ne) |
| 602 | have hPα : P * α = Y.det • 1 := by |
| 603 | ext a b |
| 604 | exact (hP_adj a b.castSucc).trans (by simp [Matrix.one_apply]) |
| 605 | have h_kill : (Pᴴ * μ) *ᵥ Y.adjugate.col 𝔰.top = 0 := by |
| 606 | rw [← neg_eq_zero, ← neg_mulVec, ← h_gram, ← mulVec_mulVec, h_last, mulVec_zero] |
| 607 | have h_det : star Y.det ≠ 0 := by simpa [hY] using h_minor |
| 608 | have h_smul : star Y.det • μ *ᵥ Y.adjugate.col 𝔰.top = 0 := |
| 609 | calc _ = ((P * α)ᴴ * μ) *ᵥ Y.adjugate.col 𝔰.top := by simp [hPα, smul_mulVec] |
| 610 | _ = αᴴ *ᵥ (Pᴴ * μ) *ᵥ Y.adjugate.col 𝔰.top := by |
| 611 | rw [conjTranspose_mul, mulVec_mulVec, Matrix.mul_assoc] |
| 612 | _ = 0 := by rw [h_kill, mulVec_zero] |
| 613 | exact (smul_eq_zero_iff_right h_det).1 h_smul |
| 614 | |
| 615 | /-- The products of the isotropic vectors `e₁, …, e_ϱ` (the columns of `inclMatrix E Sum.inl`) with |
| 616 | the frame `γ f` for the Gram matrix `S.ratGram` are the first `ϱ` rows of `S.frameProducts γ`. -/ |
| 617 | lemma inclMatrix_conjTranspose_mul_frameImage (γ : S.G E) : |
| 618 | (inclMatrix E (Sum.inl : Fin 𝔰.ϱ → 𝔰.BesselIndex))ᴴ * S.ratGram * frameImage γ.val.val = |
| 619 | isotropicRows (S.frameProducts γ) := by |
| 620 | ext a b |
| 621 | simp [inclMatrix, splitGram, frameGram, Matrix.mul_apply, Matrix.one_apply] |
| 622 | |
| 623 | /-- Let `γ` and `γ'` be in the unitary group `S.G E`, with underlying matrices `γ.val.val` and |
| 624 | `γ'.val.val`. Let the frame of `γ'` be that of `γ` with `ξ` added to the first block of rows, and |
| 625 | let `P` be the first `ϱ` rows of `S.frameProducts γ`. Then `Pᴴ ξ` is skew-hermitian for the complex |
| 626 | conjugation of the CM field `E`, as both frames have the same Gram matrix. -/ |
| 627 | lemma conjTranspose_mul_isotropicRows_eq_neg {γ γ' : S.G E} {ξ : Matrix (Fin 𝔰.ϱ) (Fin (𝔰.ϱ + 1)) E} |
| 628 | (h_add : frameImage γ'.val.val = frameImage γ.val.val + fromRows ξ 0) : |
| 629 | ξᴴ * isotropicRows (S.frameProducts γ) = -((isotropicRows (S.frameProducts γ))ᴴ * ξ) := by |
| 630 | set F : Matrix 𝔰.BesselIndex (Fin (𝔰.ϱ + 1)) E := frameImage γ.val.val with hF |
| 631 | set D : Matrix 𝔰.BesselIndex (Fin (𝔰.ϱ + 1)) E := fromRows ξ 0 with hD |
| 632 | have h_gram : (F + D)ᴴ * S.ratGram * (F + D) = Fᴴ * S.ratGram * F := by |
| 633 | have h_unitary : γ'.val.valᴴ * S.ratGram * γ'.val.val = γ.val.valᴴ * S.ratGram * γ.val.val := |
| 634 | (mem_unitaryGroupOf_iff.1 γ'.prop).trans (mem_unitaryGroupOf_iff.1 γ.prop).symm |
| 635 | rw [← h_add] |
| 636 | exact congrArg (submatrix · 𝔰.besselFrame 𝔰.besselFrame) h_unitary |
| 637 | have h_left : Dᴴ * S.ratGram * F = ξᴴ * isotropicRows (S.frameProducts γ) := by |
| 638 | ext |
| 639 | simp [hD, hF, Matrix.mul_apply, splitGram, frameGram, Matrix.one_apply] |
| 640 | have h_right : Fᴴ * S.ratGram * D = (isotropicRows (S.frameProducts γ))ᴴ * ξ := by |
| 641 | simpa [Floors.IsHermitianUnit.conjTranspose_eq, Matrix.mul_assoc] using congrArg (·ᴴ) h_left |
| 642 | have h_isotropic : Dᴴ * S.ratGram * D = 0 := by |
| 643 | ext |
| 644 | simp [hD, Matrix.mul_apply, splitGram] |
| 645 | rw [conjTranspose_add, Matrix.add_mul, Matrix.add_mul, Matrix.mul_add, Matrix.mul_add, h_left, |
| 646 | h_right, h_isotropic, add_zero, add_assoc, add_eq_left] at h_gram |
| 647 | exact eq_neg_of_add_eq_zero_right h_gram |
| 648 | |
| 649 | /-- Let `γ` and `γ'` have the same matrix of products `S.frameProducts` and the same shared vectors |
| 650 | `S.sharedVectors j`. Here `Y = paddedLeading j (S.frameProducts γ)` is the first `j` rows of the |
| 651 | matrix of products completed by rows of `1`. Let `ξ` be the first block of rows (`toRows₁`) of |
| 652 | `frameImage γ' - frameImage γ`, the difference of the images `γ' f`, `γ f` of the frame. Then the |
| 653 | columns `k ≥ j` of `ξ adj Y` vanish. -/ |
| 654 | lemma frameImage_sub_mul_adjugate_apply_eq_zero {γ γ' : S.G E} |
| 655 | (hZ : S.frameProducts γ' = S.frameProducts γ) |
| 656 | (h_shared : S.sharedVectors j γ' = S.sharedVectors j γ) (i : Fin 𝔰.ϱ) {k : Fin (𝔰.ϱ + 1)} |
| 657 | (hk : j.val ≤ k.val) : |
| 658 | ((frameImage γ'.val.val - frameImage γ.val.val).toRows₁ * |
| 659 | (paddedLeading j (S.frameProducts γ)).adjugate) i k = 0 := by |
| 660 | set Y : Matrix (Fin (𝔰.ϱ + 1)) (Fin (𝔰.ϱ + 1)) E := paddedLeading j (S.frameProducts γ) |
| 661 | change ((frameImage γ'.val.val - frameImage γ.val.val) * Y.adjugate) (.inl i) k = 0 |
| 662 | rw [Matrix.sub_mul, Matrix.sub_apply, sub_eq_zero] |
| 663 | simpa only [sharedVectors, of_apply, ite_eq_left hk, hZ] using congrFun₂ h_shared i k |
| 664 | |
| 665 | /-- Let `S` satisfy the standing hypotheses `S.IsAdmissible` on the level and the sizes. Let `σ` be |
| 666 | a skew-hermitian matrix over `E` that is integral at every finite place, and let `P` be the first |
| 667 | `ϱ` rows of `S.frameProducts γ`. Then an element of `S.classUnipotent₀ c`, the unipotent group of |
| 668 | level `M` fixing the standard frame `f`, adds `M σ P` to the first block of rows of |
| 669 | `γ f = frameImage γ`. Here `M = S.M` is the product of the two level primes. -/ |
| 670 | lemma exists_frameImage_mul_eq_add_fromRows [HasPrimitiveRoot5040 E] |
| 671 | (c : S.Classes) (γ : S.G E) {σ : Matrix (Fin 𝔰.ϱ) (Fin 𝔰.ϱ) E} (h_skew : σᴴ = -σ) |
| 672 | (h_int : IsIntMatrix (Ô E) (finAdeleMatrix σ)) : |
| 673 | ∃ r ∈ S.classUnipotent₀ c, frameImage (r * γ).val.val = |
| 674 | frameImage γ.val.val + fromRows (S.M • (σ * isotropicRows (S.frameProducts γ))) 0 := by |
| 675 | let x : Matrix 𝔰.BesselIndex (Fin 𝔰.ϱ) E := inclMatrix E Sum.inl |
| 676 | -- Take the Eichler map of `exists_mem_classUnipotent_eq_one_add_smul` whose part `u` in the |
| 677 | -- lattice of `c` is zero. |
| 678 | obtain ⟨r, hr_mem, hr_eq⟩ : |
| 679 | ∃ r ∈ S.classUnipotent₀ c, r.val.val = 1 + S.M • (x * σ * (xᴴ * S.ratGram)) := by |
| 680 | obtain ⟨r, -, hr_mem, τ, hr_eq⟩ := S.exists_mem_classUnipotent_eq_one_add_smul c id 0 σ |
| 681 | (x := x) (by simp) h_skew |
| 682 | (by simp [IsIntMatrix]) h_int rfl |
| 683 | exact ⟨r, hr_mem (by simp), by simp [hr_eq, ← Nat.cast_smul_eq_nsmul E]⟩ |
| 684 | have h_incl (A : Matrix (Fin 𝔰.ϱ) (Fin (𝔰.ϱ + 1)) E) : x * A = fromRows A 0 := by |
| 685 | ext (a | i) b <;> simp [x, inclMatrix, Matrix.mul_apply, Matrix.one_apply] |
| 686 | exact ⟨r, hr_mem, by rw [frameImage_mul, hr_eq, Matrix.add_mul, Matrix.one_mul, Matrix.smul_mul, |
| 687 | Matrix.mul_assoc, inclMatrix_conjTranspose_mul_frameImage, Matrix.mul_assoc, ← Matrix.mul_smul, |
| 688 | h_incl]⟩ |
| 689 | |
| 690 | /-- Let `S` satisfy the standing hypotheses `S.IsAdmissible` on the level and the sizes. Let `γ` and |
| 691 | `γ'` have the same integral matrix of products `Z = S.frameProducts γ` with nonzero leading minor of |
| 692 | order `j`, and the same shared vectors `S.sharedVectors j`. Let `Y` be the first `j` rows of `Z` |
| 693 | completed by rows of `1`. If the two frames agree outside the isotropic space and differ there by |
| 694 | `S.frameModulus j Z = M det (Y Yᴴ)` times an integral matrix `X`, then a move, an element of the |
| 695 | unipotent group `S.classUnipotent₀ c` of level `M = S.M` fixing the standard frame, carries the |
| 696 | frame of `γ` to that of `γ'`. -/ |
| 697 | lemma exists_mem_classUnipotent₀_frameImage_mul_eq [HasPrimitiveRoot5040 E] {𝔰 : Shape} |
| 698 | {S : Filling E 𝔰} {j : Fin (𝔰.ϱ + 2)} {γ γ' : S.G E} (c : S.Classes) |
| 699 | (hZ : S.frameProducts γ' = S.frameProducts γ) |
| 700 | (hZ_int : ∀ a b : Fin (𝔰.ϱ + 1), IsIntegral ℤ (S.frameProducts γ a b)) |
| 701 | (h_minor : leadingMinor (S.frameProducts γ) j ≠ 0) |
| 702 | (h_shared : S.sharedVectors j γ' = S.sharedVectors j γ) |
| 703 | (h_rows : ∀ (i : 𝔰.MiddleIndex ⊕ Fin 𝔰.ϱ) (a : Fin (𝔰.ϱ + 1)), |
| 704 | γ'.val (.inr i) (𝔰.besselFrame a) = γ.val (.inr i) (𝔰.besselFrame a)) |
| 705 | {X : Matrix (Fin 𝔰.ϱ) (Fin (𝔰.ϱ + 1)) E} |
| 706 | (hX : IsIntMatrix ((Ô E).comap (algebraMap E (𝔸f E))) X) |
| 707 | (h_diff : (frameImage γ'.val.val - frameImage γ.val.val).toRows₁ = |
| 708 | S.frameModulus j (S.frameProducts γ) • X) : |
| 709 | ∃ r ∈ S.classUnipotent₀ c, frameImage (r * γ).val.val = frameImage γ'.val.val := by |
| 710 | -- With `P` the first `ϱ` rows of `Z`, we find an integral skew-hermitian `σ` such that `M σ P` is |
| 711 | -- the difference of the frames; the move with the matrix `σ` joins the two frames. |
| 712 | let O : Subring E := (Ô E).comap (algebraMap E (𝔸f E)) |
| 713 | have hO : IsStarStable O := isStarStable_comap_Ô |
| 714 | set Y : Matrix (Fin (𝔰.ϱ + 1)) (Fin (𝔰.ϱ + 1)) E := paddedLeading j (S.frameProducts γ) |
| 715 | set P : Matrix (Fin 𝔰.ϱ) (Fin (𝔰.ϱ + 1)) E := isotropicRows (S.frameProducts γ) |
| 716 | let α : Matrix (Fin (𝔰.ϱ + 1)) (Fin 𝔰.ϱ) E := Y.adjugate.submatrix id castSucc |
| 717 | have h_modulus : S.frameModulus j (S.frameProducts γ) ≠ 0 := frameModulus_ne_zero h_minor |
| 718 | have h_add : frameImage γ'.val.val = |
| 719 | frameImage γ.val.val + fromRows (S.frameModulus j (S.frameProducts γ) • X) 0 := by |
| 720 | rw [← h_diff] |
| 721 | ext (a | i) b <;> simp [h_rows] |
| 722 | have h_gram : Xᴴ * P = -(Pᴴ * X) := by |
| 723 | have h_real : star (S.frameModulus j (S.frameProducts γ)) = |
| 724 | S.frameModulus j (S.frameProducts γ) := by simp [frameModulus, mul_comm] |
| 725 | have h_skew : (S.frameModulus j (S.frameProducts γ) • X)ᴴ * P = |
| 726 | -(Pᴴ * (S.frameModulus j (S.frameProducts γ) • X)) := |
| 727 | conjTranspose_mul_isotropicRows_eq_neg h_add |
| 728 | rw [conjTranspose_smul, h_real, Matrix.smul_mul, Matrix.mul_smul, ← smul_neg] at h_skew |
| 729 | exact smul_right_injective _ h_modulus h_skew |
| 730 | -- The columns `k ≥ j` of `X adj Y` vanish, as the shared vectors agree. At the top cell rank the |
| 731 | -- last column vanishes too. |
| 732 | have h_solve : X * α * P = Y.det • X := by |
| 733 | refine mul_adjugate_mul_isotropicRows fun i k hk ↦ ?_ |
| 734 | obtain hj | hj := le_or_gt j.val k.val |
| 735 | · have h_zero : ((S.frameModulus j (S.frameProducts γ) • X) * Y.adjugate) i k = 0 := by |
| 736 | rw [← h_diff] |
| 737 | exact frameImage_sub_mul_adjugate_apply_eq_zero hZ h_shared i hj |
| 738 | rwa [Matrix.smul_mul, Matrix.smul_apply, smul_eq_zero_iff_right h_modulus] at h_zero |
| 739 | · obtain rfl : k = 𝔰.top := hk.resolve_left hj.not_ge |
| 740 | exact congrFun (mulVec_adjugate_top_eq_zero hj h_minor h_gram) i |
| 741 | have hY : IsIntMatrix O Y := isIntMatrix_paddedLeading hZ_int |
| 742 | have hP : IsIntMatrix O P := fun a b ↦ algebraMap_mem_Ô.2 (hZ_int a.castSucc b) |
| 743 | have hσ_int : IsIntMatrix O (skewSolution P X α Y.det) := |
| 744 | isIntMatrix_skewSolution hP hX (fun a b ↦ hY.adjugate a b.castSucc) hY.det_mem |
| 745 | have hσ_solves : S.M • (skewSolution P X α Y.det * P) = |
| 746 | S.frameModulus j (S.frameProducts γ) • X := by |
| 747 | rw [skewSolution_mul h_gram h_solve, frameModulus, det_mul, det_conjTranspose, smul_assoc] |
| 748 | obtain ⟨r, hr_mem, hr_move⟩ : ∃ r ∈ S.classUnipotent₀ c, frameImage (r * γ).val.val = |
| 749 | frameImage γ.val.val + fromRows (S.M • (skewSolution P X α Y.det * P)) 0 := |
| 750 | exists_frameImage_mul_eq_add_fromRows c γ (conjTranspose_skewSolution h_gram) hσ_int |
| 751 | exact ⟨r, hr_mem, by rw [hr_move, hσ_solves, h_add]⟩ |
| 752 | |
| 753 | end New.Filling |
| 754 | |
| 755 | end FrameCount |