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.Algebra.Order.Star.Real |
| 5 | import Mathlib.RingTheory.PicardGroup |
| 6 | import TauCeti.LinearAlgebra.Matrix.Range |
| 7 | public import New.Spanning.RemainingTerms.Cut |
| 8 | import Lib.Base |
| 9 | import Lib.General.LinearAlgebra.HermitianMatrices |
| 10 | |
| 11 | /-! |
| 12 | # The gain: a discriminant bound for the common lattice of two terms over one block |
| 13 | |
| 14 | Take two terms `γ`, `γ'` over one block `(c, s, c')` whose `s` agrees. The square of the |
| 15 | discriminant of their common lattice `L₁₂` is at most the product of their values of `S.levelGauge`, |
| 16 | divided by a power of `M / 2` if the links differ, and by the square of the norm of the places at |
| 17 | which `s` meets if the links are equal and `S.termDisc` does not vanish |
| 18 | (`New.Filling.pairDiscriminant_sq_le`). A block is a pair of classes `c`, `c'` with an element `s` |
| 19 | of the finite group `S.ResidueGL`. The element `s` agrees if the character `S.unipotentChar` takes |
| 20 | the same value on any two integral unipotents `u`, `u'` whose reductions satisfy `ū s = s ū'`. |
| 21 | |
| 22 | The proof descends from the lattice `L⁺_γ` of each link in three steps. |
| 23 | |
| 24 | * The congruence (`New.Filling.LinkSplitting.one_le_mul_linkDiscSq`): passing to the intersection of |
| 25 | the two links gains a power of `M / 2`, as `γ γ'⁻¹` is `1` modulo `M` on `Λ`. |
| 26 | * The cut (`New.Filling.nonempty_linkSplitting`): passing to `commonLink γ γ'`, the vectors of `X₀` |
| 27 | that both links send to one vector of `X₀`. This gives |
| 28 | `New.Filling.torsionIndex_mul_discriminant_commonPart_le`, a bound for the parts `S.commonPart` of |
| 29 | the lattices of the two terms, with the torsion indices saved. |
| 30 | * The index (`New.Filling.submoduleIndex_pairLattice_dvd_torsionIndex`): passing to `L₁₂` costs at |
| 31 | most the torsion index of the other term. |
| 32 | |
| 33 | Here `A` is the span of `e₁, …, e_ϱ`, `Λ` is the lattice of the class `c`, `M` is the level and |
| 34 | `L_γ = S.termLattice c c' γ`. The lattice `L⁺_γ` consists of the vectors of the link of `γ` with an |
| 35 | integral lift whose part in `A` is divisible by `M` (`New.Filling.HasLevelLifts`). The space `X₀` |
| 36 | and the line `E z` make up the middle space of the frame, and `X₀ ⊥ E z⁺` is positive definite, with |
| 37 | `z⁺` of norm `S.N`. The torsion index of `γ` is `S.torsionIndex (S.translateByClassReps c c' γ)`. |
| 38 | |
| 39 | Notions from other files: |
| 40 | * `link γ`: the pairs of classes in `A^⊥ / A` of `t` and `γ⁻¹ t`, for `t` orthogonal to `A + γ A`. |
| 41 | * `linkIsometry γ`: the isometry `Υ_γ` of `X₀ ⊥ E z⁺` that the link of `γ` determines. |
| 42 | * `S.termsOver c s c'`: the rational `γ` with `h_c⁻¹ γ h_c'` in the stabilizer of the lattice and |
| 43 | reducing to `s`; this product is `S.translateByClassReps c c' γ`. |
| 44 | * `S.HasCellRank j γ`: `γ` has cell rank `j ≤ ϱ + 1`, the top one exactly if `S.termDisc γ ≠ 0`. |
| 45 | * `S.levelGauge j c c' γ`: the gauge `𝗀*` of the term, a positive real bound for discriminants. |
| 46 | -/ |
| 47 | |
| 48 | @[expose] public section |
| 49 | |
| 50 | namespace New.Filling |
| 51 | |
| 52 | open NumberField Matrix Module Pointwise ComplexOrder |
| 53 | |
| 54 | variable {E : Type} [Field E] [CMType E] {𝔰 : Shape} {S : Filling E 𝔰} |
| 55 | {j j' : Fin (𝔰.ϱ + 2)} {c c' : S.Classes} {γ γ' : S.G E} {s : S.ResidueGL} {x : ℕ} |
| 56 | |
| 57 | /-! ### Ranks -/ |
| 58 | |
| 59 | lemma commonLink_comm : commonLink γ γ' = commonLink γ' γ := by |
| 60 | rw [commonLink, commonLink, inf_comm (link γ')] |
| 61 | |
| 62 | lemma linkCorank_comm : S.linkCorank γ γ' = S.linkCorank γ' γ := by |
| 63 | rw [linkCorank, linkCorank, inf_comm] |
| 64 | |
| 65 | /-- The corank `S.linkCorank γ γ'`, the codimension of the intersection of the links of `γ` and |
| 66 | `γ'` in each of them, vanishes exactly if the links are equal. -/ |
| 67 | lemma linkCorank_eq_zero_iff : S.linkCorank γ γ' = 0 ↔ link γ = link γ' := by |
| 68 | rw [linkCorank, Nat.sub_eq_zero_iff_le] |
| 69 | refine ⟨fun h_le ↦ ?_, fun h_link ↦ by rw [← h_link, inf_idem, finrank_link]⟩ |
| 70 | have h_left : link γ ⊓ link γ' = link γ := |
| 71 | Submodule.eq_of_le_of_finrank_le inf_le_left ((finrank_link γ).trans_le h_le) |
| 72 | have h_right : link γ ⊓ link γ' = link γ' := |
| 73 | Submodule.eq_of_le_of_finrank_le inf_le_right ((finrank_link γ').trans_le h_le) |
| 74 | exact h_left.symm.trans h_right |
| 75 | |
| 76 | /-- Let `γ` have cell rank `j`. The codimension in `X₀` of `commonLink γ γ'`, the space of the |
| 77 | vectors that both links send to one vector of `X₀`, is at most `c⁺ + (j - ϱ)`. Here |
| 78 | `c⁺ = S.linkCorank γ γ'` is the codimension of the intersection of the links in each of them, and |
| 79 | the natural number `j - ϱ` is `1` at the top rank and `0` below. -/ |
| 80 | lemma le_finrank_commonLink_add (h_cell : S.HasCellRank j γ) (γ' : S.G E) : |
| 81 | 𝔰.k ≤ finrank E (commonLink γ γ') + S.linkCorank γ γ' + (j - 𝔰.ϱ) := by |
| 82 | have h_inf := h_cell.finrank_link_inf_le γ' |
| 83 | rw [linkCorank] |
| 84 | omega |
| 85 | |
| 86 | /-- Let `γ` and `γ'` have cell ranks and the same link. Then `𝗀 = S.termDisc` vanishes at `γ` if and |
| 87 | only if it vanishes at `γ'`. -/ |
| 88 | lemma termDisc_eq_zero_iff_of_link_eq (h_cell : S.HasCellRank j γ) (h_cell' : S.HasCellRank j' γ') |
| 89 | (h_link : link γ = link γ') : S.termDisc γ = 0 ↔ S.termDisc γ' = 0 := by |
| 90 | -- The link determines `X₀^γ`, which is `X₀` if `𝗀 = 0` and a hyperplane of `X₀` otherwise. |
| 91 | have h_linked : linkedX₀ γ = linkedX₀ γ' := by |
| 92 | rw [linkedX₀, linkedX₀, linkIsometry_eq_of_link_eq h_link] |
| 93 | have h_rank : finrank E (linkedX₀ γ) + (j.val - 𝔰.ϱ) = 𝔰.k := h_cell.finrank_linkedX₀_add_sub |
| 94 | have h_rank' : finrank E (linkedX₀ γ') + (j'.val - 𝔰.ϱ) = 𝔰.k := h_cell'.finrank_linkedX₀_add_sub |
| 95 | rw [h_linked] at h_rank |
| 96 | have h_top : 𝔰.ϱ < j.val ↔ 𝔰.ϱ < j'.val := by omega |
| 97 | rw [h_cell.lt_iff_termDisc_ne_zero, h_cell'.lt_iff_termDisc_ne_zero] at h_top |
| 98 | exact not_iff_not.1 h_top |
| 99 | |
| 100 | /-! ### The congruence -/ |
| 101 | |
| 102 | /-- Let `a` have absolute value `r` at every complex embedding of the CM type, and let `f` be the |
| 103 | number of infinite places. Multiplying an `i × i` matrix by `a` multiplies the absolute norm to |
| 104 | `ℚ` of its determinant by `r ^ (2 i f)`. -/ |
| 105 | lemma abs_norm_det_smul {i : ℕ} {a : E} {r : ℝ} (ha : ∀ v : InfinitePlace E, ‖Φ v a‖ = r) |
| 106 | (A : Matrix (Fin i) (Fin i) E) : |
| 107 | |(Algebra.norm ℚ (a • A).det : ℝ)| = |
| 108 | r ^ (2 * i * numInfPlaces E) * |(Algebra.norm ℚ A.det : ℝ)| := by |
| 109 | rw [abs_norm_eq_prod_norm_sq, abs_norm_eq_prod_norm_sq, det_smul] |
| 110 | simp only [map_mul, map_pow, norm_mul, norm_pow, ha, mul_pow, Finset.prod_mul_distrib, |
| 111 | Finset.prod_const, Finset.card_univ, Fintype.card_fin] |
| 112 | ring |
| 113 | |
| 114 | /-- The form of `X₀ ⊥ E z⁺` is positive definite at every complex embedding `Φ w` of the CM type. -/ |
| 115 | lemma positiveGram_posDef (w : InfinitePlace E) : (S.positiveGram.map (Φ w)).PosDef := by |
| 116 | simp [positiveGram, diagonal_map, S.N_prime.pos] |
| 117 | |
| 118 | /-- Let `b` and `b'` be `i` columns with the same Gram matrix in `X₀ ⊥ E z⁺`, so that `b' = u b` |
| 119 | for an isometry `u`. Then the absolute norm to `ℚ` of the Gram determinant of `b - b' = (1 - u) b` |
| 120 | is at most `4 ^ (2 i f)` times that of `b`, where `f` is the number of infinite places: at each |
| 121 | place the first is at most `4 ^ i` times the second in modulus. -/ |
| 122 | lemma abs_norm_det_gram_sub_le {i : ℕ} {b b' : Matrix 𝔰.MiddleIndex (Fin i) E} |
| 123 | (h_gram : b'ᴴ * S.positiveGram * b' = bᴴ * S.positiveGram * b) : |
| 124 | |(Algebra.norm ℚ ((b - b')ᴴ * S.positiveGram * (b - b')).det : ℝ)| ≤ |
| 125 | (2 ^ 2) ^ (2 * i * numInfPlaces E) * |
| 126 | |(Algebra.norm ℚ (bᴴ * S.positiveGram * b).det : ℝ)| := by |
| 127 | -- The Gram matrix of the sum is positive, so that of the difference is bounded |
| 128 | -- by four times the common Gram matrix. |
| 129 | let C : Matrix (Fin i) (Fin i) E := (4 : E) • (bᴴ * S.positiveGram * b) |
| 130 | have h_sum : C - (b - b')ᴴ * S.positiveGram * (b - b') = |
| 131 | (b + b')ᴴ * S.positiveGram * (b + b') := by |
| 132 | have h_four : (4 : E) = 2 + 2 := by norm_num |
| 133 | simp only [C, h_four, add_smul, two_smul, conjTranspose_sub, conjTranspose_add, |
| 134 | Matrix.sub_mul, Matrix.mul_sub, Matrix.add_mul, Matrix.mul_add, h_gram] |
| 135 | abel |
| 136 | have h_pos (w : InfinitePlace E) (a : Matrix 𝔰.MiddleIndex (Fin i) E) : |
| 137 | ((aᴴ * S.positiveGram * a).map (Φ w)).PosSemidef := by |
| 138 | simpa [map_conjTranspose] using |
| 139 | (positiveGram_posDef w).posSemidef.conjTranspose_mul_mul_same (a.map (Φ w)) |
| 140 | have h_place (w : InfinitePlace E) : |
| 141 | ‖Φ w ((b - b')ᴴ * S.positiveGram * (b - b')).det‖ ≤ ‖Φ w C.det‖ := by |
| 142 | have h_rest : ((C - (b - b')ᴴ * S.positiveGram * (b - b')).map (Φ w)).PosSemidef := by |
| 143 | rw [h_sum] |
| 144 | exact h_pos w (b + b') |
| 145 | rw [Matrix.map_sub _ (map_sub _)] at h_rest |
| 146 | simpa [RingHom.map_det] using norm_det_le_norm_det_of_posSemidef (h_pos w (b - b')) h_rest |
| 147 | have h_four (w : InfinitePlace E) : ‖Φ w (4 : E)‖ = 4 := by simp [map_ofNat] |
| 148 | calc |
| 149 | _ ≤ |(Algebra.norm ℚ C.det : ℝ)| := by |
| 150 | rw [abs_norm_eq_prod_norm_sq, abs_norm_eq_prod_norm_sq] |
| 151 | grw [h_place] |
| 152 | _ = _ := by |
| 153 | simpa only [C, show (2 : ℝ) ^ 2 = 4 by norm_num] using |
| 154 | abs_norm_det_smul h_four (bᴴ * S.positiveGram * b) |
| 155 | |
| 156 | /-- The matrix whose columns are the vectors `y₀ + λ z⁺` of `X₀ ⊥ E z⁺` attached to the columns |
| 157 | `(y₀ + λ' z, y₀' + λ z)` of `y`. -/ |
| 158 | def sourceCols {σ : Type} (y : Matrix (𝔰.MiddleIndex ⊕ 𝔰.MiddleIndex) σ E) : |
| 159 | Matrix 𝔰.MiddleIndex σ E := |
| 160 | (of fun a : σ ↦ linkSource E 𝔰 (y.col a))ᵀ |
| 161 | |
| 162 | /-- The entries of `yᴴ Q y'` are the values of the form with matrix `Q` on the columns of `y` and |
| 163 | `y'`. -/ |
| 164 | lemma conjTranspose_mul_mul_apply_eq_dotProduct {m σ : Type} [Fintype m] (Q : Matrix m m E) |
| 165 | (y y' : Matrix m σ E) (a a' : σ) : |
| 166 | (yᴴ * Q * y') a a' = star (y.col a) ⬝ᵥ Q *ᵥ y'.col a' := by |
| 167 | rw [Matrix.mul_assoc] |
| 168 | rfl |
| 169 | |
| 170 | /-- Let `y` be a matrix whose columns span a submodule of `link γ`. Its Gram matrix for |
| 171 | `S.linkMetric`, the positive form on pairs of middle vectors, equals the Gram matrix for |
| 172 | `S.positiveGram` of the vectors `sourceCols y` of `X₀ ⊥ E z⁺`. -/ |
| 173 | lemma gram_linkMetric_eq_gram_sourceCols {i : ℕ} |
| 174 | {y : Matrix (𝔰.MiddleIndex ⊕ 𝔰.MiddleIndex) (Fin i) E} (hy : colSpan y ≤ link γ) : |
| 175 | yᴴ * S.linkMetric * y = (sourceCols y)ᴴ * S.positiveGram * sourceCols y := by |
| 176 | ext a a' |
| 177 | simp only [conjTranspose_mul_mul_apply_eq_dotProduct] |
| 178 | exact linkMetric_form_of_mem_link (col_mem_of_colSpan_le hy a) (col_mem_of_colSpan_le hy a') |
| 179 | |
| 180 | /-- A pair of middle vectors `(y₀ + λ' z, y₀' + λ z)` has the source `y₀ + λ z⁺` and the target |
| 181 | `y₀' + λ' z⁺` in `X₀ ⊥ E z⁺`. Let the columns of `y` and `y'` lie in the links of `γ` and `γ'`, and |
| 182 | let `Υ_γ b' = Υ_γ' (sourceCols y')`. Then the products of `y` with `y'` for `S.linkForm`, the |
| 183 | difference of the forms on the two middle vectors, are those of `sourceCols y` with |
| 184 | `sourceCols y' - b'` for the form `S.positiveGram`. -/ |
| 185 | lemma gram_linkForm_eq_gram_sourceCols_sub {i : ℕ} |
| 186 | {y y' : Matrix (𝔰.MiddleIndex ⊕ 𝔰.MiddleIndex) (Fin i) E} (hy : colSpan y ≤ link γ) |
| 187 | (hy' : colSpan y' ≤ link γ') {b' : Matrix 𝔰.MiddleIndex (Fin i) E} |
| 188 | (hb' : ∀ l : Fin i, linkIsometry γ (b'.col l) = linkIsometry γ' ((sourceCols y').col l)) : |
| 189 | yᴴ * S.linkForm * y' = (sourceCols y)ᴴ * S.positiveGram * (sourceCols y' - b') := by |
| 190 | rw [Matrix.mul_sub] |
| 191 | ext l l' |
| 192 | simp only [Matrix.sub_apply, conjTranspose_mul_mul_apply_eq_dotProduct] |
| 193 | have h_col : (sourceCols y).col l = linkSource E 𝔰 (y.col l) := rfl |
| 194 | have h_col' : (sourceCols y').col l' = linkSource E 𝔰 (y'.col l') := rfl |
| 195 | rw [dotProduct_linkForm_mulVec_eq_sub, ← dotProduct_positiveGram_mulVec_linkIsometry γ _ |
| 196 | (b'.col l'), hb', h_col, h_col', |
| 197 | ← linkIsometry_linkSource (col_mem_of_colSpan_le hy l), |
| 198 | ← linkIsometry_linkSource (col_mem_of_colSpan_le hy' l')] |
| 199 | |
| 200 | /-- Let `y v` and `y' v'` be lattices of rank `i` in the links of `γ` and `γ'`, given by rational |
| 201 | columns and adelic bases. Suppose that `S.linkForm`, the difference of the forms on the two middle |
| 202 | vectors of a pair, pairs `y` with `y'` nondegenerately and the lattices with values in `M Ô`, for |
| 203 | the level `M = S.M`. Then the product of their squared discriminants `S.linkDiscSq` is at least |
| 204 | `(M / 2) ^ (4 i f)`, where `f` is the number of infinite places. -/ |
| 205 | lemma one_le_mul_linkDiscSq [HasPrimitiveRoot5040 E] {i : ℕ} |
| 206 | {y y' : Matrix (𝔰.MiddleIndex ⊕ 𝔰.MiddleIndex) (Fin i) E} |
| 207 | (hy : colSpan y ≤ link γ) (hy' : colSpan y' ≤ link γ') {v v' : GL (Fin i) (𝔸f E)} |
| 208 | (h_det : (yᴴ * S.linkForm * y').det ≠ 0) |
| 209 | (h_int : IsIntMatrix (Ô E) |
| 210 | (v.valᴴ * (finAdeleMatrix ((S.M⁻¹ : E) • (yᴴ * S.linkForm * y')) * v'.val))) : |
| 211 | 1 ≤ ((2 / S.M : ℝ) ^ (2 * i * numInfPlaces E)) ^ 2 * |
| 212 | (S.linkDiscSq y v * S.linkDiscSq y' v') := by |
| 213 | -- Let `a`, `b` be the vectors of `X₀ ⊥ E z⁺` under `y`, `y'`, and `u = Υ_γ⁻¹ Υ_γ'`. The pairing |
| 214 | -- is that of `a` with `(1 - u) b`, so `a / M` and `(1 - u) b` pair integrally. |
| 215 | let a : Matrix 𝔰.MiddleIndex (Fin i) E := sourceCols y |
| 216 | let b : Matrix 𝔰.MiddleIndex (Fin i) E := sourceCols y' |
| 217 | let ub : Matrix 𝔰.MiddleIndex (Fin i) E := |
| 218 | (of fun l : Fin i ↦ (linkIsometry γ).symm (linkIsometry γ' (b.col l)))ᵀ |
| 219 | have h_ub (l : Fin i) : linkIsometry γ (ub.col l) = linkIsometry γ' (b.col l) := |
| 220 | (linkIsometry γ).apply_symm_apply _ |
| 221 | have h_isometry : ubᴴ * S.positiveGram * ub = bᴴ * S.positiveGram * b := by |
| 222 | ext l l' |
| 223 | simp only [conjTranspose_mul_mul_apply_eq_dotProduct] |
| 224 | rw [← dotProduct_positiveGram_mulVec_linkIsometry γ, h_ub, h_ub, |
| 225 | dotProduct_positiveGram_mulVec_linkIsometry] |
| 226 | have h_form : yᴴ * S.linkForm * y' = aᴴ * S.positiveGram * (b - ub) := |
| 227 | gram_linkForm_eq_gram_sourceCols_sub hy hy' h_ub |
| 228 | have h_pairing : ((S.M⁻¹ : E) • a)ᴴ * S.positiveGram * (b - ub) = |
| 229 | (S.M⁻¹ : E) • (yᴴ * S.linkForm * y') := by |
| 230 | simp [h_form] |
| 231 | have h_left : ((S.M⁻¹ : E) • a)ᴴ * S.positiveGram * ((S.M⁻¹ : E) • a) = |
| 232 | (S.M⁻¹ : E) ^ 2 • (aᴴ * S.positiveGram * a) := by |
| 233 | simp [smul_smul, sq] |
| 234 | have h_det' : (((S.M⁻¹ : E) • a)ᴴ * S.positiveGram * (b - ub)).det ≠ 0 := by |
| 235 | rw [h_pairing] |
| 236 | simpa [Nat.Prime.ne_zero] using h_det |
| 237 | rw [← h_pairing] at h_int |
| 238 | -- Liouville's inequality for this integral pairing, with the bounds for the Gram determinants. |
| 239 | have h_liouville : (1 : ℝ) ^ 2 ≤ genIndex v.val.det ^ 2 * |
| 240 | (|(Algebra.norm ℚ (((S.M⁻¹ : E) • a)ᴴ * S.positiveGram * ((S.M⁻¹ : E) • a)).det : ℝ)| * |
| 241 | |(Algebra.norm ℚ ((b - ub)ᴴ * S.positiveGram * (b - ub)).det : ℝ)| * |
| 242 | genIndex v'.val.det ^ 2) := |
| 243 | liouville_gram positiveGram_posDef ((S.M⁻¹ : E) • a) (b - ub) v v' h_det' |
| 244 | zero_le_one (one_le_genIndex h_int.det_mem) |
| 245 | have h_scalar (w : InfinitePlace E) : ‖Φ w ((S.M⁻¹ : E) ^ 2)‖ = (S.M : ℝ)⁻¹ ^ 2 := by simp |
| 246 | rw [linkDiscSq, linkDiscSq, gram_linkMetric_eq_gram_sourceCols hy, |
| 247 | gram_linkMetric_eq_gram_sourceCols hy'] |
| 248 | calc |
| 249 | (1 : ℝ) = 1 ^ 2 := (one_pow 2).symm |
| 250 | _ ≤ _ := h_liouville |
| 251 | _ ≤ genIndex v.val.det ^ 2 * (((S.M : ℝ)⁻¹ ^ 2) ^ (2 * i * numInfPlaces E) * |
| 252 | |(Algebra.norm ℚ (aᴴ * S.positiveGram * a).det : ℝ)| * |
| 253 | ((2 ^ 2) ^ (2 * i * numInfPlaces E) * |
| 254 | |(Algebra.norm ℚ (bᴴ * S.positiveGram * b).det : ℝ)|) * |
| 255 | genIndex v'.val.det ^ 2) := by |
| 256 | rw [h_left, abs_norm_det_smul h_scalar] |
| 257 | gcongr |
| 258 | exact abs_norm_det_gram_sub_le h_isometry |
| 259 | _ = _ := by |
| 260 | simp only [div_eq_mul_inv, mul_pow, ← pow_mul, a, b] |
| 261 | ring |
| 262 | |
| 263 | /-- Let the columns of `m` lie in the link of `γ'` and span the link of `γ` together with those of |
| 264 | `y`. Let the columns of `y'` lie in the link of `γ'` and be independent modulo the intersection of |
| 265 | the links. Then `S.linkForm`, the difference of the forms on the two middle vectors of a pair, |
| 266 | pairs `y` and `y'` nondegenerately. -/ |
| 267 | lemma det_conjTranspose_mul_linkForm_mul_ne_zero {ρ : Type} [Fintype ρ] {i : ℕ} |
| 268 | {m : Matrix (𝔰.MiddleIndex ⊕ 𝔰.MiddleIndex) ρ E} |
| 269 | {y y' : Matrix (𝔰.MiddleIndex ⊕ 𝔰.MiddleIndex) (Fin i) E} (hm : colSpan m ≤ link γ') |
| 270 | (hmy : colSpan (fromCols m y) = link γ) (hy' : colSpan y' ≤ link γ') |
| 271 | (hy'_indep : ∀ t : Fin i → E, y' *ᵥ t ∈ link γ' ⊓ link γ → t = 0) : |
| 272 | (yᴴ * S.linkForm * y').det ≠ 0 := by |
| 273 | classical |
| 274 | -- A vector `y' t` orthogonal to `y` is orthogonal to `link γ`, which is its own orthogonal, so it |
| 275 | -- lies in both links and `t = 0`. |
| 276 | intro h_zero |
| 277 | obtain ⟨t, ht_ne, ht⟩ : ∃ t : Fin i → E, t ≠ 0 ∧ (yᴴ * S.linkForm * y') *ᵥ t = 0 := |
| 278 | exists_mulVec_eq_zero_iff.2 h_zero |
| 279 | have h_mem' : y' *ᵥ t ∈ link γ' := hy' ⟨t, rfl⟩ |
| 280 | suffices h_mem : y' *ᵥ t ∈ link γ from ht_ne (hy'_indep t ⟨h_mem', h_mem⟩) |
| 281 | have h_orth_m : mᴴ *ᵥ S.linkForm *ᵥ y' *ᵥ t = 0 := by |
| 282 | rw [mulVec_mulVec, mulVec_mulVec, gram_linkForm_eq_zero_of_le_link hm hy', zero_mulVec] |
| 283 | have h_orth_y : yᴴ *ᵥ S.linkForm *ᵥ y' *ᵥ t = 0 := by |
| 284 | rw [mulVec_mulVec, mulVec_mulVec, ht] |
| 285 | rw [mem_link_iff_orthogonal, ← hmy] |
| 286 | rintro _ ⟨w, rfl⟩ |
| 287 | rw [mulVecLin_apply, star_mulVec_dotProduct, conjTranspose_fromCols_eq_fromRows_conjTranspose, |
| 288 | fromRows_mulVec, h_orth_m, h_orth_y] |
| 289 | simp |
| 290 | |
| 291 | /-- Let `a w` and `b w'` be adelic combinations of the rational columns `a` and `b`. Their matrix |
| 292 | of products for the form `r B` is `wᴴ (r aᴴ B b) w'`, with `finAdeleMatrix` the diagonal embedding |
| 293 | of rational matrices into adelic ones. -/ |
| 294 | lemma gram_finAdeleMatrix_mul {n σ τ ι : Type} [Fintype n] [Fintype σ] [Fintype τ] (r : E) |
| 295 | (B : Matrix n n E) (a : Matrix n σ E) (b : Matrix n τ E) (w : Matrix σ ι (𝔸f E)) |
| 296 | (w' : Matrix τ ι (𝔸f E)) : |
| 297 | (finAdeleMatrix a * w)ᴴ * finAdeleMatrix (r • B) * (finAdeleMatrix b * w') = |
| 298 | wᴴ * (finAdeleMatrix (r • (aᴴ * B * b)) * w') := by |
| 299 | simp [finAdeleMatrix_conjTranspose, Matrix.mul_assoc] |
| 300 | |
| 301 | /-- **The congruence.** Let `γ`, `γ'` lie in `S.termsOver c s c'`. |
| 302 | `D : S.LinkSplitting c c' j x γ γ' i` splits the link of `γ` into its intersection with the link of |
| 303 | `γ'` and a complement of rank `i` with a lattice. `D'` does the same for `γ'`, with `j'`, `x'`. The |
| 304 | two lattices are paired nondegenerately by `S.linkForm`, the difference of the forms on the two |
| 305 | middle vectors of a pair, with values in `M Ô` for `M = S.M`. So the product of their squared |
| 306 | discriminants `S.linkDiscSq` is at least `(M / 2) ^ (4 i f)`, where `f = numInfPlaces E` is the |
| 307 | number of infinite places. -/ |
| 308 | lemma LinkSplitting.one_le_mul_linkDiscSq [HasPrimitiveRoot5040 E] {x' i : ℕ} |
| 309 | (D : S.LinkSplitting c c' j x γ γ' i) |
| 310 | (D' : S.LinkSplitting c c' j' x' γ' γ i) (h_over : γ ∈ S.termsOver c s c') |
| 311 | (h_over' : γ' ∈ S.termsOver c s c') : |
| 312 | 1 ≤ ((2 / S.M : ℝ) ^ (2 * i * numInfPlaces E)) ^ 2 * |
| 313 | (S.linkDiscSq D.complCols D.complLattice * S.linkDiscSq D'.complCols D'.complLattice) := by |
| 314 | classical |
| 315 | let _ : Fintype D.CommonIndex := D.fintypeCommonIndex |
| 316 | let _ : Fintype D'.CommonIndex := D'.fintypeCommonIndex |
| 317 | have h_common : colSpan D.commonCols ≤ link γ' := D.colSpan_common.trans_le inf_le_right |
| 318 | -- In the pairing of the two lifts the terms along the intersection of the links vanish. |
| 319 | have h_common_common : D.commonColsᴴ * S.linkForm * D'.commonCols = 0 := |
| 320 | gram_linkForm_eq_zero_of_le_link h_common (D'.colSpan_common.trans_le inf_le_left) |
| 321 | have h_common_compl : D.commonColsᴴ * S.linkForm * D'.complCols = 0 := |
| 322 | gram_linkForm_eq_zero_of_le_link h_common D'.colSpan_compl_le |
| 323 | have h_compl_common : D.complColsᴴ * S.linkForm * D'.commonCols = 0 := |
| 324 | gram_linkForm_eq_zero_of_le_link D.colSpan_compl_le (D'.colSpan_common.trans_le inf_le_right) |
| 325 | refine Filling.one_le_mul_linkDiscSq D.colSpan_compl_le D'.colSpan_compl_le |
| 326 | (det_conjTranspose_mul_linkForm_mul_ne_zero h_common D.colSpan_fromCols D'.colSpan_compl_le |
| 327 | D'.eq_zero_of_mulVec_mem) ?_ |
| 328 | have h_pair : IsIntMatrix (Ô E) |
| 329 | ((finAdeleMatrix D.commonCols * D.complShear + |
| 330 | finAdeleMatrix D.complCols * D.complLattice.val)ᴴ * |
| 331 | finAdeleMatrix ((S.M⁻¹ : E) • S.linkForm) * |
| 332 | (finAdeleMatrix D'.commonCols * D'.complShear + |
| 333 | finAdeleMatrix D'.complCols * D'.complLattice.val)) := |
| 334 | D.hasIntegralLifts.isIntMatrix_linkForm h_over h_over' D'.hasIntegralLifts |
| 335 | simp only [conjTranspose_add, Matrix.add_mul, Matrix.mul_add, gram_finAdeleMatrix_mul, |
| 336 | h_common_common, h_common_compl, h_compl_common] at h_pair |
| 337 | simpa using h_pair |
| 338 | |
| 339 | /-! ### The congruence and the cut together -/ |
| 340 | |
| 341 | /-- If `γ` is a term over `(c, s, c')` (it lies in `S.termsOver c s c'`) and has cell rank `j`, then |
| 342 | its gauge `S.levelGauge j c c' γ` is positive. -/ |
| 343 | lemma levelGauge_pos [HasPrimitiveRoot5040 E] (h_over : γ ∈ S.termsOver c s c') |
| 344 | (h_cell : S.HasCellRank j γ) : 0 < S.levelGauge j c c' γ := by |
| 345 | have h_gauge : 0 < S.maxGauge j c c' γ := maxGauge_pos h_over h_cell |
| 346 | have hM : 0 < S.M := Nat.pos_of_ne_zero (by simp [Nat.Prime.ne_zero]) |
| 347 | unfold levelGauge |
| 348 | positivity |
| 349 | |
| 350 | /-- **Congruence and cut.** Let `γ`, `γ'` be rational terms over one block. Let `s` agree, let `x` |
| 351 | be at most `S.meetNorm s`, the product of the norms of the places at which `s` meets, and let `j`, |
| 352 | `j'` be the cell ranks of the terms: `S.HasCellRank j γ` puts `γ` in normal form from the index `j` |
| 353 | on, with a nonzero leading minor of order `j` in the products of the frame with its image. |
| 354 | |
| 355 | For each term multiply its torsion index `S.torsionIndex`, the index of `Λ ∩ A + k (Λ ∩ A)` in |
| 356 | `Λ ∩ (A + k A)` for `k = S.translateByClassReps c c' γ`, by the discriminant of `S.commonPart`, the |
| 357 | part of its lattice in `commonLink γ γ'`, the subspace of `X₀` common to the two links. The product |
| 358 | of these two numbers is at most `(2 / M) ^ (2 c⁺ f)` times the product of the gauges `S.levelGauge`: |
| 359 | the gauge is the larger of `S.N ^ f * minorNorm` and `termDiscNorm` of the term, divided by its two |
| 360 | isotropic row indices, times `M ^ (2 min(ϱ, j) f)`, `j'` for `γ'`. Here `M = S.M` is the level, |
| 361 | `c⁺ = S.linkCorank γ γ'` is the codimension of the intersection of the links in each and `f` is the |
| 362 | number of infinite places. The bound may be divided by `x ^ 2` if `c⁺ = 0` and `γ` has the top rank |
| 363 | `𝔰.ϱ < j`. -/ |
| 364 | lemma torsionIndex_mul_discriminant_commonPart_le [HasPrimitiveRoot5040 E] (h_agrees : S.Agrees s) |
| 365 | (h_meet : x ≤ S.meetNorm s) (h_over : γ ∈ S.termsOver c s c') |
| 366 | (h_over' : γ' ∈ S.termsOver c s c') |
| 367 | (h_cell : S.HasCellRank j γ) (h_cell' : S.HasCellRank j' γ') : |
| 368 | S.torsionIndex (S.translateByClassReps c c' γ) * |
| 369 | discriminant (finrank E (commonLink γ γ')) (S.commonPart c c' γ γ') * |
| 370 | (S.torsionIndex (S.translateByClassReps c c' γ') * |
| 371 | discriminant (finrank E (commonLink γ' γ)) (S.commonPart c c' γ' γ)) * |
| 372 | (if 𝔰.ϱ < j ∧ S.linkCorank γ γ' = 0 then x else 1 : ℕ) ^ 2 ≤ |
| 373 | (2 / S.M) ^ (2 * S.linkCorank γ γ' * numInfPlaces E) * |
| 374 | (S.levelGauge j c c' γ * S.levelGauge j' c c' γ') := by |
| 375 | -- Split both links along their intersection. The complements are paired nondegenerately by |
| 376 | -- `S.linkForm`, and their lattices are paired integrally by `S.linkForm / M`, so the product of |
| 377 | -- their discriminants is bounded below. In each splitting, the discriminant of the complement |
| 378 | -- times the torsion index, the discriminant of the common part and `X` is at most the gauge. |
| 379 | set X : ℕ := if 𝔰.ϱ < j ∧ S.linkCorank γ γ' = 0 then x else 1 with hX |
| 380 | have hX_le : X ≤ S.meetNorm s := by |
| 381 | rw [hX] |
| 382 | split_ifs |
| 383 | exacts [h_meet, one_le_meetNorm s] |
| 384 | have h_top (h_ne : X ≠ 1) : 𝔰.ϱ < j := |
| 385 | by_contra fun h_not ↦ h_ne (ite_eq_right fun h_both ↦ h_not h_both.left) |
| 386 | have h_corank (h_ne : X ≠ 1) : S.linkCorank γ γ' = 0 := |
| 387 | by_contra fun h_not ↦ h_ne (ite_eq_right fun h_both ↦ h_not h_both.right) |
| 388 | have h_link (h_ne : X ≠ 1) : link γ = link γ' := linkCorank_eq_zero_iff.1 (h_corank h_ne) |
| 389 | have h_top' (h_ne : X ≠ 1) : 𝔰.ϱ < j' := by |
| 390 | have h_disc : S.termDisc γ' ≠ 0 := |
| 391 | (termDisc_eq_zero_iff_of_link_eq h_cell h_cell' (h_link h_ne)).not.1 |
| 392 | (h_cell.lt_iff_termDisc_ne_zero.1 (h_top h_ne)) |
| 393 | exact h_cell'.lt_iff_termDisc_ne_zero.2 h_disc |
| 394 | have h_corank' (h_ne : X ≠ 1) : S.linkCorank γ' γ = 0 := |
| 395 | linkCorank_eq_zero_iff.2 (h_link h_ne).symm |
| 396 | obtain ⟨D⟩ : Nonempty (S.LinkSplitting c c' j X γ γ' (S.linkCorank γ γ')) := |
| 397 | nonempty_linkSplitting h_agrees h_over h_cell γ' hX_le h_top h_corank |
| 398 | obtain ⟨D'⟩ : Nonempty (S.LinkSplitting c c' j' X γ' γ (S.linkCorank γ γ')) := by |
| 399 | rw [linkCorank_comm] |
| 400 | exact nonempty_linkSplitting h_agrees h_over' h_cell' γ hX_le h_top' h_corank' |
| 401 | have h_congruence : 1 ≤ ((2 / S.M : ℝ) ^ (2 * S.linkCorank γ γ' * numInfPlaces E)) ^ 2 * |
| 402 | (S.linkDiscSq D.complCols D.complLattice * S.linkDiscSq D'.complCols D'.complLattice) := |
| 403 | D.one_le_mul_linkDiscSq D' h_over h_over' |
| 404 | have h_pos : 0 < S.levelGauge j c c' γ := levelGauge_pos h_over h_cell |
| 405 | have h_pos' : 0 < S.levelGauge j' c c' γ' := levelGauge_pos h_over' h_cell' |
| 406 | set d : ℝ := S.torsionIndex (S.translateByClassReps c c' γ) * |
| 407 | discriminant (finrank E (commonLink γ γ')) (S.commonPart c c' γ γ') |
| 408 | set d' : ℝ := S.torsionIndex (S.translateByClassReps c c' γ') * |
| 409 | discriminant (finrank E (commonLink γ' γ)) (S.commonPart c c' γ' γ) |
| 410 | have h_nonneg : 0 ≤ S.linkDiscSq D'.complCols D'.complLattice := by |
| 411 | rw [linkDiscSq] |
| 412 | positivity |
| 413 | refine le_of_sq_le_sq ?_ (by positivity) |
| 414 | calc |
| 415 | _ ≤ (d * d' * X ^ 2) ^ 2 * |
| 416 | (((2 / S.M) ^ (2 * S.linkCorank γ γ' * numInfPlaces E)) ^ 2 * |
| 417 | (S.linkDiscSq D.complCols D.complLattice * S.linkDiscSq D'.complCols D'.complLattice)) := |
| 418 | le_mul_of_one_le_right (sq_nonneg _) h_congruence |
| 419 | _ = ((2 / S.M) ^ (2 * S.linkCorank γ γ' * numInfPlaces E)) ^ 2 * |
| 420 | ((d * X) ^ 2 * S.linkDiscSq D.complCols D.complLattice * |
| 421 | ((d' * X) ^ 2 * S.linkDiscSq D'.complCols D'.complLattice)) := by ring |
| 422 | _ ≤ ((2 / S.M) ^ (2 * S.linkCorank γ γ' * numInfPlaces E)) ^ 2 * |
| 423 | (S.levelGauge j c c' γ ^ 2 * S.levelGauge j' c c' γ' ^ 2) := by |
| 424 | gcongr |
| 425 | exacts [D.discriminant_sq_mul_le, D'.discriminant_sq_mul_le] |
| 426 | _ = _ := by ring |
| 427 | |
| 428 | /-! ### The index -/ |
| 429 | |
| 430 | /-- Let `T` be a Gram matrix on the middle space `X₀ ⊕ ⟨z⟩` of the shape `𝔰`, and `T.splitGram` the |
| 431 | form of `𝔰.ϱ` hyperbolic planes `eᵢ, e*ᵢ` with `T` on the middle. Let `k` be a matrix indexed by |
| 432 | `𝔰.BesselIndex`. Let `a ⊕ᵥ (m ⊕ᵥ 0)` be a vector with coordinates `a` on `e₁, …, e_ϱ`, `m` on the |
| 433 | middle (indexed by `𝔰.MiddleIndex`) and `0` on `e*₁, …, e*_ϱ`. Its products with `frameImage k`, the |
| 434 | image under `k` of the frame `e₁, …, e_ϱ, z`, have two parts. One part pairs `a` with |
| 435 | `isotropicRows (T.frameGram k)`, the rows for `e₁, …, e_ϱ` of the matrix of products of the frame |
| 436 | with its image. The other part pairs `m` with `frameMiddle k`, the middle parts of that image, |
| 437 | through `T`. -/ |
| 438 | lemma frameImage_conjTranspose_mulVec {R : Type} [CommRing R] [StarRing R] {T : 𝔰.Form R} |
| 439 | (k : Matrix 𝔰.BesselIndex 𝔰.BesselIndex R) (a : Fin 𝔰.ϱ → R) (m : 𝔰.MiddleIndex → R) : |
| 440 | ((frameImage k)ᴴ * T.splitGram) *ᵥ (a ⊕ᵥ (m ⊕ᵥ 0)) = |
| 441 | (isotropicRows (T.frameGram k))ᴴ *ᵥ a + ((frameMiddle k)ᴴ * T) *ᵥ m := by |
| 442 | have h_form : T.splitGram *ᵥ (a ⊕ᵥ (m ⊕ᵥ 0)) = (0 : Fin 𝔰.ϱ → R) ⊕ᵥ (T *ᵥ m ⊕ᵥ a) := |
| 443 | splitGram_mulVec _ |
| 444 | rw [← mulVec_mulVec, ← mulVec_mulVec m, h_form] |
| 445 | generalize T *ᵥ m = m' |
| 446 | ext b |
| 447 | simp [mulVec, dotProduct, frameGram, splitGram, Matrix.mul_apply, |
| 448 | fromBlocks_conjTranspose, conjTranspose_fromCols_eq_fromRows_conjTranspose, Matrix.one_apply] |
| 449 | ring |
| 450 | |
| 451 | /-- Let `t` be a vector of `A ⊕ X₀` whose part `v` in `X₀` lies in `commonLink γ γ'`, the vectors of |
| 452 | `X₀` that are the first entry of a pair, orthogonal to `z`, lying in the links of both `γ` and `γ'`. |
| 453 | If `t` is orthogonal for the form `S.ratGram` to the frame `(γ e₁, …, γ e_ϱ, γ z)` of `γ`, then |
| 454 | `γ' γ⁻¹ t - t` lies in `A + γ' A`, the span of the columns of `isotropicFramePair γ'`. -/ |
| 455 | lemma mulVec_sub_mem_colSpan_isotropicFramePair {a : Fin 𝔰.ϱ → E} {v : 𝔰.κ → E} |
| 456 | (hv : v ∈ commonLink γ γ') {t : 𝔰.BesselIndex → E} (ht : t = a ⊕ᵥ ((v ⊕ᵥ 0) ⊕ᵥ 0)) |
| 457 | (h_orth : ((frameImage (γ : Matrix 𝔰.BesselIndex 𝔰.BesselIndex E))ᴴ * S.ratGram) *ᵥ t = 0) : |
| 458 | (γ' : Matrix 𝔰.BesselIndex 𝔰.BesselIndex E) *ᵥ |
| 459 | ((↑(γ⁻¹ : S.G E) : Matrix 𝔰.BesselIndex 𝔰.BesselIndex E) *ᵥ t) - t ∈ |
| 460 | colSpan (isotropicFramePair γ') := by |
| 461 | -- Take `t'` in `v + A` orthogonal to the frame of `γ'`. As the link isometries agree on `v`, the |
| 462 | -- vector `γ⁻¹ t - γ'⁻¹ t'` lies in `A`, and `γ' γ⁻¹ t - t = (t' - t) + γ' (γ⁻¹ t - γ'⁻¹ t')`. |
| 463 | let γinv : Matrix 𝔰.BesselIndex 𝔰.BesselIndex E := (γ⁻¹ : S.G E) |
| 464 | let γinv' : Matrix 𝔰.BesselIndex 𝔰.BesselIndex E := (γ'⁻¹ : S.G E) |
| 465 | obtain ⟨h_inv_dual, h_inv_z⟩ : |
| 466 | (∀ b : Fin 𝔰.ϱ, (γinv *ᵥ t) (eStar b) = 0) ∧ (γinv *ᵥ t) 𝔰.z = 0 := |
| 467 | (frameImage_conjTranspose_mulVec_eq_zero_iff γ t).1 h_orth |
| 468 | obtain ⟨ht_dual, ht_z, ht_part⟩ : |
| 469 | (∀ b : Fin 𝔰.ϱ, t (eStar b) = 0) ∧ t 𝔰.z = 0 ∧ t ∘ 𝔰.indexX₀ = v := by |
| 470 | rw [ht] |
| 471 | exact ⟨fun _ ↦ rfl, rfl, rfl⟩ |
| 472 | have ht_perp : t ∈ framePerp γ := |
| 473 | mem_framePerp.2 ⟨mem_isotropicPerp.2 ⟨ht_dual, h_inv_dual⟩, ht_z, h_inv_z⟩ |
| 474 | have hv_linked' : v ∈ linkedX₀ γ' := (commonLink_le_linkedX₀_inf γ γ' hv).2 |
| 475 | obtain ⟨⟨t', ht'_perp⟩, ht'_part : t' ∘ 𝔰.indexX₀ = v⟩ : v ∈ (framePerpToX₀ γ').range := |
| 476 | (range_framePerpToX₀ γ').ge hv_linked' |
| 477 | obtain ⟨ht'_orth, ht'_z, h_inv_z'⟩ := mem_framePerp.1 ht'_perp |
| 478 | obtain ⟨ht'_dual, h_inv_dual'⟩ := mem_isotropicPerp.1 ht'_orth |
| 479 | have h_images : (((γinv *ᵥ t) ∘ 𝔰.indexX₀) ⊕ᵥ 0 : 𝔰.MiddleIndex → E) = |
| 480 | ((γinv' *ᵥ t') ∘ 𝔰.indexX₀) ⊕ᵥ 0 := by |
| 481 | rw [← linkIsometry_comp_indexX₀ ht_perp, ← linkIsometry_comp_indexX₀ ht'_perp, ht_part, |
| 482 | ht'_part, (mem_commonLink.1 hv).2] |
| 483 | have h_fst : t' - t ∈ isotropicSpan 1 := by |
| 484 | rw [mem_isotropicSpan_one] |
| 485 | rintro ((i | i) | b) |
| 486 | · exact sub_eq_zero.2 (congrFun (ht'_part.trans ht_part.symm) i) |
| 487 | · exact sub_eq_zero.2 (ht'_z.trans ht_z.symm) |
| 488 | · exact sub_eq_zero.2 ((ht'_dual b).trans (ht_dual b).symm) |
| 489 | have h_snd : γinv *ᵥ t - γinv' *ᵥ t' ∈ isotropicSpan 1 := by |
| 490 | rw [mem_isotropicSpan_one] |
| 491 | rintro ((i | i) | b) |
| 492 | · exact sub_eq_zero.2 (congrFun h_images (.inl i)) |
| 493 | · exact sub_eq_zero.2 (h_inv_z.trans h_inv_z'.symm) |
| 494 | · exact sub_eq_zero.2 ((h_inv_dual b).trans (h_inv_dual' b).symm) |
| 495 | have h_decomp : (γ' : Matrix 𝔰.BesselIndex 𝔰.BesselIndex E) *ᵥ (γinv *ᵥ t) - t = |
| 496 | t' - t + |
| 497 | (γ' : Matrix 𝔰.BesselIndex 𝔰.BesselIndex E).mulVecLin (γinv *ᵥ t - γinv' *ᵥ t') := by |
| 498 | simp [γinv', mulVec_sub] |
| 499 | rw [colSpan_isotropicFramePair, isotropicSpan_eq_map (γ' : Matrix 𝔰.BesselIndex 𝔰.BesselIndex E), |
| 500 | h_decomp] |
| 501 | exact Submodule.add_mem_sup h_fst (Submodule.mem_map_of_mem h_snd) |
| 502 | |
| 503 | /-- For a filling `S` of shape `𝔰` over `E`, rational points `γ` and `γ'` in `S.G E`, a matrix |
| 504 | `p` with `r` columns lying in `commonLink γ γ'`, and the block matrix `P` whose columns are the |
| 505 | standard basis vectors `e_a` (`a < 𝔰.ϱ`) and the columns of `p`, if a vector `v` lies in the kernel |
| 506 | of `(frameImage γ)ᴴ * S.ratGram * P`, then `(γ' γ⁻¹ - 1) P v` lies in the column span of |
| 507 | `isotropicFramePair γ'`. -/ |
| 508 | private lemma sub_one_mul_mulVec_mem_colSpan_isotropicFramePair {r : ℕ} |
| 509 | {p : Matrix 𝔰.κ (Fin r) E} (hp : colSpan p ≤ commonLink γ γ') |
| 510 | {P : Matrix 𝔰.BesselIndex (Fin 𝔰.ϱ ⊕ Fin r) E} |
| 511 | (hP : P = fromBlocks 1 0 0 (fromRows (fromRows p 0) 0)) {v : Fin 𝔰.ϱ ⊕ Fin r → E} |
| 512 | (hv : ((frameImage (γ : Matrix 𝔰.BesselIndex 𝔰.BesselIndex E))ᴴ * S.ratGram * P) *ᵥ v = 0) : |
| 513 | ((↑(γ' * γ⁻¹ : S.G E) : Matrix 𝔰.BesselIndex 𝔰.BesselIndex E) - 1) *ᵥ (P *ᵥ v) ∈ |
| 514 | colSpan (isotropicFramePair γ') := by |
| 515 | let m : Matrix 𝔰.BesselIndex 𝔰.BesselIndex E := (γ' * γ⁻¹ : S.G E) |
| 516 | have hp_mem : p *ᵥ (v ∘ Sum.inr) ∈ commonLink γ γ' := |
| 517 | hp (LinearMap.mem_range_self p.mulVecLin _) |
| 518 | have h_shape : P *ᵥ v = v ∘ Sum.inl ⊕ᵥ ((p *ᵥ (v ∘ Sum.inr) ⊕ᵥ 0) ⊕ᵥ 0) := by |
| 519 | rw [hP, fromBlocks_mulVec, fromRows_mulVec, fromRows_mulVec] |
| 520 | simp |
| 521 | have h_orth : ((frameImage (γ : Matrix 𝔰.BesselIndex 𝔰.BesselIndex E))ᴴ * S.ratGram) *ᵥ |
| 522 | (P *ᵥ v) = 0 := by |
| 523 | rw [mulVec_mulVec, hv] |
| 524 | have h_mem : m *ᵥ P *ᵥ v - P *ᵥ v ∈ colSpan (isotropicFramePair γ') := by |
| 525 | have h_factor : m = (γ' : Matrix 𝔰.BesselIndex 𝔰.BesselIndex E) * (γ⁻¹ : S.G E) := rfl |
| 526 | rw [h_factor, ← mulVec_mulVec] |
| 527 | exact mulVec_sub_mem_colSpan_isotropicFramePair hp_mem h_shape h_orth |
| 528 | rwa [sub_mulVec, one_mulVec] |
| 529 | |
| 530 | /-- Let the columns of `p` lie in `commonLink γ γ'` and let those of `P` be the `e_a` and the |
| 531 | columns of `p`. Then `(γ' γ⁻¹ - 1) P = F W + Z Q` for some matrices `W` and `Z`. Here the columns of |
| 532 | `F = isotropicFramePair γ'` are the `e_a` and the `γ' e_a`, and `Q` is the matrix of products of `P` |
| 533 | with the frame `(γ e₁, …, γ e_ϱ, γ z)` for the form `S.ratGram`. -/ |
| 534 | lemma exists_sub_one_mul_eq_isotropicFramePair_mul_add {r : ℕ} {p : Matrix 𝔰.κ (Fin r) E} |
| 535 | (hp : colSpan p ≤ commonLink γ γ') {P : Matrix 𝔰.BesselIndex (Fin 𝔰.ϱ ⊕ Fin r) E} |
| 536 | (hP : P = fromBlocks 1 0 0 (fromRows (fromRows p 0) 0)) : |
| 537 | ∃ (W : Matrix (Fin 𝔰.ϱ ⊕ Fin 𝔰.ϱ) (Fin 𝔰.ϱ ⊕ Fin r) E) |
| 538 | (Z : Matrix 𝔰.BesselIndex (Fin (𝔰.ϱ + 1)) E), |
| 539 | ((↑(γ' * γ⁻¹ : S.G E) : Matrix 𝔰.BesselIndex 𝔰.BesselIndex E) - 1) * P = |
| 540 | isotropicFramePair γ' * W + |
| 541 | Z * ((frameImage (γ : Matrix 𝔰.BesselIndex 𝔰.BesselIndex E))ᴴ * S.ratGram * P) := by |
| 542 | -- For the matrix `Q` of products below, take a basis `y` of its kernel; write `1 = y e + b Q`. |
| 543 | let m : Matrix 𝔰.BesselIndex 𝔰.BesselIndex E := (γ' * γ⁻¹ : S.G E) |
| 544 | set Q : Matrix (Fin (𝔰.ϱ + 1)) (Fin 𝔰.ϱ ⊕ Fin r) E := |
| 545 | (frameImage (γ : Matrix 𝔰.BesselIndex 𝔰.BesselIndex E))ᴴ * S.ratGram * P with hQ |
| 546 | obtain ⟨y, -, hy⟩ := exists_hasLeftInv_colSpan_eq Q.mulVecLin.ker |
| 547 | obtain ⟨e, b, h_one : y * e + b * Q = 1⟩ := exists_mul_add_mul_eq_one (x := Q) (y := y) hy.ge |
| 548 | have h_col (i : Fin (finrank E Q.mulVecLin.ker)) : |
| 549 | ((m - 1) * P * y).col i ∈ colSpan (isotropicFramePair γ') := by |
| 550 | have h_mem_ker : y.col i ∈ Q.mulVecLin.ker := hy.le ⟨_, y.mulVec_single_one i⟩ |
| 551 | have h_ker : Q *ᵥ y.col i = 0 := LinearMap.mem_ker.1 h_mem_ker |
| 552 | have h_eq : ((m - 1) * P * y).col i = (m - 1) *ᵥ P *ᵥ y.col i := by |
| 553 | rw [mulVec_mulVec] |
| 554 | rfl |
| 555 | rw [h_eq] |
| 556 | exact sub_one_mul_mulVec_mem_colSpan_isotropicFramePair hp hP h_ker |
| 557 | obtain ⟨w, hw : isotropicFramePair γ' * w = (m - 1) * P * y⟩ := |
| 558 | exists_mul_eq_of_range_le h_col |
| 559 | refine ⟨w * e, (m - 1) * P * b, ?_⟩ |
| 560 | rw [← Matrix.mul_assoc, hw, Matrix.mul_assoc _ y, Matrix.mul_assoc _ b, ← Matrix.mul_add, h_one, |
| 561 | Matrix.mul_one] |
| 562 | |
| 563 | /-- The matrix `S.classCoord c`, which passes to the coordinates of the lattice of `c`, intertwines |
| 564 | the rational matrix `δ` with `S.translateByClassReps c c δ`. -/ |
| 565 | lemma translateByClassReps_mul_classCoord (δ : S.G E) : |
| 566 | (S.translateByClassReps c c δ : Matrix 𝔰.BesselIndex 𝔰.BesselIndex (𝔸f E)) * S.classCoord c = |
| 567 | S.classCoord c * finAdeleMatrix (δ : Matrix 𝔰.BesselIndex 𝔰.BesselIndex E) := by |
| 568 | rw [coe_translateByClassReps, classCoord, Units.val_mul, Units.val_mul, Matrix.mul_assoc, |
| 569 | Units.mul_inv, Matrix.mul_one] |
| 570 | rfl |
| 571 | |
| 572 | /-- Let `y` be orthogonal to the frame of `γ` for the split Gram matrix. Then `m y`, with |
| 573 | `m = S.translateByClassReps c c (γ' * γ⁻¹)`, is orthogonal to the frame of `γ'`, since `m` is an |
| 574 | isometry that takes the frame of `γ` to that of `γ'`. -/ |
| 575 | private lemma frameImage_mulVec_translateByClassReps_eq_zero {y : 𝔰.BesselIndex → 𝔸f E} |
| 576 | (hy : ((frameImage (S.translateByClassReps c c' γ : |
| 577 | Matrix 𝔰.BesselIndex 𝔰.BesselIndex (𝔸f E)))ᴴ * |
| 578 | (S.latticeMiddle (𝔸f E)).splitGram) *ᵥ y = 0) : |
| 579 | ((frameImage (S.translateByClassReps c c' γ' : |
| 580 | Matrix 𝔰.BesselIndex 𝔰.BesselIndex (𝔸f E)))ᴴ * |
| 581 | (S.latticeMiddle (𝔸f E)).splitGram) *ᵥ |
| 582 | (S.translateByClassReps c c (γ' * γ⁻¹) : Matrix 𝔰.BesselIndex 𝔰.BesselIndex (𝔸f E)) *ᵥ |
| 583 | y = 0 := by |
| 584 | set g : Matrix 𝔰.BesselIndex 𝔰.BesselIndex (𝔸f E) := |
| 585 | (S.translateByClassReps c c' γ : Matrix 𝔰.BesselIndex 𝔰.BesselIndex (𝔸f E)) |
| 586 | set g' : Matrix 𝔰.BesselIndex 𝔰.BesselIndex (𝔸f E) := |
| 587 | (S.translateByClassReps c c' γ' : Matrix 𝔰.BesselIndex 𝔰.BesselIndex (𝔸f E)) |
| 588 | set m : Matrix 𝔰.BesselIndex 𝔰.BesselIndex (𝔸f E) := |
| 589 | (S.translateByClassReps c c (γ' * γ⁻¹) : Matrix 𝔰.BesselIndex 𝔰.BesselIndex (𝔸f E)) |
| 590 | set J : Matrix 𝔰.BesselIndex 𝔰.BesselIndex (𝔸f E) := (S.latticeMiddle (𝔸f E)).splitGram |
| 591 | have h_frame : frameImage g' = m * frameImage g := by |
| 592 | have h_mul : S.translateByClassReps c c (γ' * γ⁻¹) * S.translateByClassReps c c' γ = |
| 593 | S.translateByClassReps c c' γ' := by |
| 594 | simp [translateByClassReps, mul_assoc] |
| 595 | unfold g g' m |
| 596 | rw [← frameImage_mul, h_mul] |
| 597 | have hm_isometry : mᴴ * J * m = J := |
| 598 | mem_unitaryGroupOf_iff.1 (S.translateByClassReps c c (γ' * γ⁻¹)).property |
| 599 | rw [h_frame, mulVec_mulVec, conjTranspose_mul, Matrix.mul_assoc, Matrix.mul_assoc, |
| 600 | ← Matrix.mul_assoc mᴴ, hm_isometry] |
| 601 | exact hy |
| 602 | |
| 603 | variable [HasPrimitiveRoot5040 E] |
| 604 | |
| 605 | /-- The adelic form of `mulVec_sub_mem_colSpan_isotropicFramePair`, in the coordinates of the |
| 606 | lattice of `c`. Let `y` be a vector of `A ⊕ X₀` whose part in `X₀` is an adelic vector `v` of the |
| 607 | lattice of `commonLink γ γ'`. If `y` is orthogonal to the frame of `γ`, then `(γ' γ⁻¹ - 1) y` lies |
| 608 | in `A + γ' A`. Here each term acts by its `S.translateByClassReps`. -/ |
| 609 | lemma sub_one_mulVec_mem_colSpan_isotropicFramePair {a : Fin 𝔰.ϱ → 𝔸f E} {v : 𝔰.κ → 𝔸f E} |
| 610 | (hv : v ∈ saturatedLattice (S.gram_classCoordX₀ c) (commonLink γ γ')) |
| 611 | {y : 𝔰.BesselIndex → 𝔸f E} (hy : y = a ⊕ᵥ (S.classCoordX₀ c *ᵥ v ⊕ᵥ 0)) |
| 612 | (h_orth : ((frameImage (S.translateByClassReps c c' γ : |
| 613 | Matrix 𝔰.BesselIndex 𝔰.BesselIndex (𝔸f E)))ᴴ * |
| 614 | (S.latticeMiddle (𝔸f E)).splitGram) *ᵥ y = 0) : |
| 615 | ((S.translateByClassReps c c (γ' * γ⁻¹) : Matrix 𝔰.BesselIndex 𝔰.BesselIndex (𝔸f E)) - 1) *ᵥ y ∈ |
| 616 | colSpan (isotropicFramePair (S.translateByClassReps c c' γ')) := by |
| 617 | obtain ⟨p, e, -, hp, h_basis⟩ := |
| 618 | exists_sublatticeBasis_eq_finAdeleMatrix_mul (S.gram_classCoordX₀ c) (commonLink γ γ') |
| 619 | obtain ⟨r, -, hr⟩ := hv |
| 620 | have hv_eq : v = finAdeleMatrix p *ᵥ (e.val *ᵥ r) := by |
| 621 | rw [← hr, h_basis, mulVec_mulVec] |
| 622 | rfl |
| 623 | set P : Matrix 𝔰.BesselIndex (Fin 𝔰.ϱ ⊕ Fin (finrank E (commonLink γ γ'))) E := |
| 624 | fromBlocks 1 0 0 (fromRows (fromRows p 0) 0) with hP |
| 625 | let m : Matrix 𝔰.BesselIndex 𝔰.BesselIndex E := (γ' * γ⁻¹ : S.G E) |
| 626 | let Q : Matrix (Fin (𝔰.ϱ + 1)) (Fin 𝔰.ϱ ⊕ Fin (finrank E (commonLink γ γ'))) E := |
| 627 | (frameImage (γ : Matrix 𝔰.BesselIndex 𝔰.BesselIndex E))ᴴ * S.ratGram * P |
| 628 | obtain ⟨W, Z, h_split : (m - 1) * P = isotropicFramePair γ' * W + Z * Q⟩ := |
| 629 | exists_sub_one_mul_eq_isotropicFramePair_mul_add hp.le hP |
| 630 | set ξ : Fin 𝔰.ϱ ⊕ Fin (finrank E (commonLink γ γ')) → 𝔸f E := a ⊕ᵥ e.val *ᵥ r with hξ |
| 631 | have hy_eq : y = (S.classCoord c * finAdeleMatrix P) *ᵥ ξ := by |
| 632 | rw [hy, hv_eq, hP, hξ, classCoord_eq_fromBlocks, ← mulVec_mulVec] |
| 633 | simp [fromBlocks_map, fromRows_map, fromBlocks_mulVec, fromRows_mulVec, fromCols_mulVec] |
| 634 | have hξ_orth : finAdeleMatrix Q *ᵥ ξ = 0 := by |
| 635 | unfold Q |
| 636 | rw [← classCoord_gram c, ← frameImage_translateByClassReps (c' := c'), ← mulVec_mulVec, ← hy_eq, |
| 637 | h_orth] |
| 638 | have h_moved : |
| 639 | ((S.translateByClassReps c c (γ' * γ⁻¹) : Matrix 𝔰.BesselIndex 𝔰.BesselIndex (𝔸f E)) - 1) * |
| 640 | (S.classCoord c * finAdeleMatrix P) = |
| 641 | S.classCoord c * finAdeleMatrix ((m - 1) * P) := by |
| 642 | rw [Matrix.sub_mul, ← Matrix.mul_assoc, translateByClassReps_mul_classCoord, Matrix.one_mul, |
| 643 | Matrix.mul_assoc, ← Matrix.mul_sub, Matrix.sub_mul, Matrix.one_mul] |
| 644 | simp [m, Matrix.map_sub] |
| 645 | have h_map : finAdeleMatrix (isotropicFramePair γ' * W + Z * Q) = |
| 646 | finAdeleMatrix (isotropicFramePair γ') * finAdeleMatrix W + |
| 647 | finAdeleMatrix Z * finAdeleMatrix Q := by |
| 648 | simp [Matrix.map_add] |
| 649 | have h_image : |
| 650 | ((S.translateByClassReps c c (γ' * γ⁻¹) : Matrix 𝔰.BesselIndex 𝔰.BesselIndex (𝔸f E)) - 1) *ᵥ |
| 651 | y = |
| 652 | (S.classCoord c * finAdeleMatrix (isotropicFramePair γ')) *ᵥ (finAdeleMatrix W *ᵥ ξ) := by |
| 653 | rw [hy_eq, mulVec_mulVec, h_moved, h_split, h_map, ← mulVec_mulVec ξ (S.classCoord c), |
| 654 | add_mulVec, ← mulVec_mulVec ξ (finAdeleMatrix Z), hξ_orth, mulVec_zero, add_zero, |
| 655 | ← mulVec_mulVec ξ, mulVec_mulVec (finAdeleMatrix W *ᵥ ξ)] |
| 656 | rw [h_image, classCoord_mul_isotropicFramePair] |
| 657 | exact LinearMap.mem_range_self (isotropicFramePair (S.translateByClassReps c c' γ')).mulVecLin _ |
| 658 | |
| 659 | /-- Let `γ` and `γ'` lie in `S.termsOver c s c'`: rational elements with `h_c⁻¹ γ h_c'` in `K` that |
| 660 | reduce to `s`. Work in the coordinates in which the lattice `Λ` of `c` is that of the integral |
| 661 | vectors and `γ'` acts by `k = S.translateByClassReps c c' γ'`. Take `v` in `S.commonPart c c' γ γ'`, |
| 662 | the part of `L_γ = S.termLattice c c' γ` in `commonLink γ γ'`. Its products with the frame |
| 663 | `(k e₁, …, k e_ϱ, k z)` are `M` times those of a vector of `Λ ∩ (A + k A)` plus `M` times those of a |
| 664 | vector of `Λ ∩ A`. So the image of the common part under this pairing lies in the sum of the two |
| 665 | lattices on the right. -/ |
| 666 | lemma map_commonPart_le (h_over : γ ∈ S.termsOver c s c') (h_over' : γ' ∈ S.termsOver c s c') : |
| 667 | (S.commonPart c c' γ γ').map |
| 668 | (((frameMiddle (S.translateByClassReps c c' γ' : |
| 669 | Matrix 𝔰.BesselIndex 𝔰.BesselIndex (𝔸f E)))ᴴ * |
| 670 | S.latticeMiddle (𝔸f E) * S.classCoordX₀ c).mulVecLin.restrictScalars (Ô E)) ≤ |
| 671 | (intVectors (Ô E) 𝔰.BesselIndex ⊓ |
| 672 | (colSpan (isotropicFramePair (S.translateByClassReps c c' γ'))).restrictScalars (Ô E)).map |
| 673 | (S.ideleM • |
| 674 | ((frameImage (S.translateByClassReps c c' γ' : |
| 675 | Matrix 𝔰.BesselIndex 𝔰.BesselIndex (𝔸f E)))ᴴ * |
| 676 | (S.latticeMiddle (𝔸f E)).splitGram).mulVecLin.restrictScalars (Ô E)) ⊔ |
| 677 | S.ideleM • colLattice (Ô E) |
| 678 | (isotropicRows ((S.latticeMiddle (𝔸f E)).frameGram |
| 679 | (S.translateByClassReps c c' γ')))ᴴ := by |
| 680 | -- The vector `v` has a lift `y = v - M a`, `a ∈ Λ ∩ A`, orthogonal to the frame of `γ`. The |
| 681 | -- element `m = γ' γ⁻¹` is congruent to `1` modulo `M`, and `m y` is orthogonal to the frame of |
| 682 | -- `γ'`. So `v = M a + M w + m y` with `w = -M⁻¹ (m - 1) y` integral. |
| 683 | rintro _ ⟨v, h_mem, rfl⟩ |
| 684 | obtain ⟨hv, hv_int, hv_products⟩ := h_mem |
| 685 | let g : Matrix 𝔰.BesselIndex 𝔰.BesselIndex (𝔸f E) := S.translateByClassReps c c' γ |
| 686 | let g' : Matrix 𝔰.BesselIndex 𝔰.BesselIndex (𝔸f E) := S.translateByClassReps c c' γ' |
| 687 | let m : Matrix 𝔰.BesselIndex 𝔰.BesselIndex (𝔸f E) := S.translateByClassReps c c (γ' * γ⁻¹) |
| 688 | obtain ⟨a, ha, h_products⟩ : ∃ a ∈ intVectors (Ô E) (Fin 𝔰.ϱ), |
| 689 | S.ideleM • (isotropicRows ((S.latticeMiddle (𝔸f E)).frameGram g))ᴴ *ᵥ a = |
| 690 | ((frameMiddle g)ᴴ * S.latticeMiddle (𝔸f E) * S.classCoordX₀ c) *ᵥ v := by |
| 691 | obtain ⟨_, ⟨a, ha, rfl⟩, h_products⟩ := |
| 692 | (Submodule.mem_smul_pointwise_iff_exists _ _ _).1 hv_products |
| 693 | exact ⟨a, ha, h_products⟩ |
| 694 | let J : Matrix 𝔰.BesselIndex 𝔰.BesselIndex (𝔸f E) := (S.latticeMiddle (𝔸f E)).splitGram |
| 695 | have hJ : J = (S.latticeMiddle (𝔸f E)).splitGram := rfl |
| 696 | set y : 𝔰.BesselIndex → 𝔸f E := -(S.ideleM • a) ⊕ᵥ (S.classCoordX₀ c *ᵥ v ⊕ᵥ 0) with hy |
| 697 | have hy_int : y ∈ intVectors (Ô E) 𝔰.BesselIndex := by |
| 698 | rintro (i | i | i) |
| 699 | · exact neg_mem (mul_mem S.ideleM_mem (ha i)) |
| 700 | · exact hv_int i |
| 701 | · exact zero_mem _ |
| 702 | have hy_orth : ((frameImage g)ᴴ * J) *ᵥ y = 0 := by |
| 703 | rw [hy, hJ, frameImage_conjTranspose_mulVec, mulVec_mulVec, mulVec_neg, mulVec_smul, |
| 704 | neg_add_eq_zero] |
| 705 | exact h_products |
| 706 | have h_one : γ' * γ⁻¹ ∈ S.termsOver c 1 c := by |
| 707 | simpa using termsOver.mul h_over' (termsOver.inv h_over) |
| 708 | have h_cong : IsIntMatrix (Ô E) (S.ideleM⁻¹ • (m - 1)) := |
| 709 | (S.principalLevel_eq_unitaryLevel.le h_one).2 |
| 710 | have h_span : (m - 1) *ᵥ y ∈ colSpan (isotropicFramePair (S.translateByClassReps c c' γ')) := |
| 711 | sub_one_mulVec_mem_colSpan_isotropicFramePair hv hy hy_orth |
| 712 | have hmy_orth : ((frameImage g')ᴴ * J) *ᵥ m *ᵥ y = 0 := |
| 713 | frameImage_mulVec_translateByClassReps_eq_zero hy_orth |
| 714 | set w : 𝔰.BesselIndex → 𝔸f E := -((S.ideleM⁻¹ • (m - 1)) *ᵥ y) with hw |
| 715 | have hw_int : w ∈ intVectors (Ô E) 𝔰.BesselIndex := neg_mem (h_cong.mulVec hy_int) |
| 716 | have hw_span : w ∈ colSpan (isotropicFramePair (S.translateByClassReps c c' γ')) := by |
| 717 | rw [hw, smul_mulVec] |
| 718 | exact neg_mem (Submodule.smul_mem _ (S.ideleM⁻¹).val h_span) |
| 719 | have hw_products : |
| 720 | S.ideleM • (((frameImage g')ᴴ * J) *ᵥ w) = ((frameImage g')ᴴ * J) *ᵥ y := by |
| 721 | rw [hw, smul_mulVec, mulVec_neg, mulVec_smul, smul_neg, smul_inv_smul, sub_mulVec, one_mulVec, |
| 722 | mulVec_sub, hmy_orth, zero_sub, neg_neg] |
| 723 | have h_value : ((frameImage g')ᴴ * J) *ᵥ y = |
| 724 | -(S.ideleM • (isotropicRows ((S.latticeMiddle (𝔸f E)).frameGram g'))ᴴ *ᵥ a) + |
| 725 | ((frameMiddle g')ᴴ * S.latticeMiddle (𝔸f E) * S.classCoordX₀ c) *ᵥ v := by |
| 726 | rw [hy, hJ, frameImage_conjTranspose_mulVec, mulVec_mulVec, mulVec_neg, mulVec_smul] |
| 727 | refine Submodule.mem_sup.2 ⟨_, Submodule.mem_map_of_mem ⟨hw_int, hw_span⟩, _, |
| 728 | Submodule.smul_mem_pointwise_smul _ _ _ ⟨a, ha, rfl⟩, ?_⟩ |
| 729 | simp only [LinearMap.smul_apply, LinearMap.restrictScalars_apply, mulVecLin_apply] |
| 730 | rw [hw_products, h_value] |
| 731 | abel |
| 732 | |
| 733 | lemma pairLattice_eq_commonPart_inf : |
| 734 | S.pairLattice c c' γ γ' = S.commonPart c c' γ γ' ⊓ S.termLattice c c' γ' := by |
| 735 | rw [pairLattice, commonPart, inf_assoc] |
| 736 | |
| 737 | /-- **The index.** Let `γ`, `γ'` both lie in `S.termsOver c s c'`, with lattices `L_γ`, `L_γ'` given |
| 738 | by `S.termLattice`. The part of `L_γ` in `commonLink γ γ'` is `S.commonPart c c' γ γ'`, and it |
| 739 | contains the common lattice `L₁₂ = S.pairLattice c c' γ γ'`, the part of `L_γ ∩ L_γ'` in that space. |
| 740 | The index of `L₁₂` in it (`submoduleIndex`) divides the torsion index of `γ'`: the index |
| 741 | `S.torsionIndex` of `Λ ∩ A + k (Λ ∩ A)` in `Λ ∩ (A + k A)`, for the standard lattice `Λ`, the |
| 742 | isotropic space `A` and `k = S.translateByClassReps c c' γ'`. -/ |
| 743 | lemma submoduleIndex_pairLattice_dvd_torsionIndex (h_over : γ ∈ S.termsOver c s c') |
| 744 | (h_over' : γ' ∈ S.termsOver c s c') : |
| 745 | submoduleIndex (S.pairLattice c c' γ γ') (S.commonPart c c' γ γ') ∣ |
| 746 | S.torsionIndex (S.translateByClassReps c c' γ') := by |
| 747 | have h_le : S.commonPart c c' γ γ' ≤ preimageLattice (Ô E) (S.classCoordX₀ c) := |
| 748 | inf_le_left.trans (saturatedLattice_le _ _) |
| 749 | rw [pairLattice_eq_commonPart_inf, submoduleIndex_inf_of_le le_rfl, termLattice, classLatticeX₀, |
| 750 | submoduleIndex_inf_comap _ h_le] |
| 751 | refine submoduleIndex_dvd_of_le _ (colLattice_le ?_) (map_commonPart_le h_over h_over') |
| 752 | let k : Matrix 𝔰.BesselIndex 𝔰.BesselIndex (𝔸f E) := S.translateByClassReps c c' γ' |
| 753 | rintro (a | a) |
| 754 | · -- The products of `e_a` with the frame are a column of the matrix that spans the lattice. |
| 755 | have h_col : (isotropicRows ((S.latticeMiddle (𝔸f E)).frameGram k))ᴴ.col a = |
| 756 | ((frameImage k)ᴴ * (S.latticeMiddle (𝔸f E)).splitGram) *ᵥ |
| 757 | (isotropicFramePair (S.translateByClassReps c c' γ')).col (.inl a) := by |
| 758 | funext b |
| 759 | simp [k, frameGram, splitGram, mulVec_eq_sum, Finset.sum_apply, ite_apply, Matrix.mul_apply, |
| 760 | fromBlocks_conjTranspose, conjTranspose_fromCols_eq_fromRows_conjTranspose, |
| 761 | Matrix.one_apply] |
| 762 | rw [Submodule.mem_comap, LinearMap.smul_apply, LinearMap.restrictScalars_apply, mulVecLin_apply, |
| 763 | ← h_col] |
| 764 | exact Submodule.smul_mem_pointwise_smul _ _ _ (col_mem_colLattice a) |
| 765 | · -- The products of `k e_a` with the frame of `k` vanish, as `k` is an isometry. |
| 766 | have h_isometry : kᴴ * (S.latticeMiddle (𝔸f E)).splitGram * k = |
| 767 | (S.latticeMiddle (𝔸f E)).splitGram := mem_unitaryGroupOf_iff.1 |
| 768 | (S.translateByClassReps c c' γ').property |
| 769 | have h_zero : ((frameImage k)ᴴ * (S.latticeMiddle (𝔸f E)).splitGram) *ᵥ |
| 770 | (isotropicFramePair (S.translateByClassReps c c' γ')).col (.inr a) = 0 := by |
| 771 | funext b |
| 772 | calc |
| 773 | _ = (kᴴ * (S.latticeMiddle (𝔸f E)).splitGram * k) (𝔰.besselFrame b) |
| 774 | (𝔰.besselFrame a.castSucc) := rfl |
| 775 | _ = (S.latticeMiddle (𝔸f E)).splitGram (𝔰.besselFrame b) (𝔰.besselFrame a.castSucc) := by |
| 776 | rw [h_isometry] |
| 777 | _ = 0 := by cases b using Fin.lastCases <;> simp |
| 778 | rw [Submodule.mem_comap, LinearMap.smul_apply, |
| 779 | LinearMap.restrictScalars_apply, mulVecLin_apply, h_zero, smul_zero] |
| 780 | exact zero_mem _ |
| 781 | |
| 782 | /-- Let `γ`, `γ'` lie in `S.termsOver c s c'` and have cell ranks `j`, `j'` (`S.HasCellRank`), where |
| 783 | `s` agrees (`S.Agrees`, a condition on the unipotent character). Then |
| 784 | `L₁₂ = S.pairLattice c c' γ γ'`, the part of `L_γ ∩ L_γ'` in `commonLink γ γ'`, is a full lattice in |
| 785 | that subspace, and its discriminant `S.pairDiscriminant` is at most that of `S.commonPart`, the part |
| 786 | of `L_γ` there, times the torsion index of `γ'`, the index of `Λ ∩ A + k (Λ ∩ A)` in `Λ ∩ (A + k A)` |
| 787 | for `k = S.translateByClassReps c c' γ'`. -/ |
| 788 | lemma isLatticeOfRank_and_pairDiscriminant_le (h_agrees : S.Agrees s) |
| 789 | (h_over : γ ∈ S.termsOver c s c') |
| 790 | (h_over' : γ' ∈ S.termsOver c s c') (h_cell : S.HasCellRank j γ) |
| 791 | (h_cell' : S.HasCellRank j' γ') : |
| 792 | IsLatticeOfRank (finrank E (commonLink γ γ')) (S.pairLattice c c' γ γ') ∧ |
| 793 | S.pairDiscriminant c c' γ γ' ≤ |
| 794 | discriminant (finrank E (commonLink γ γ')) (S.commonPart c c' γ γ') * |
| 795 | S.torsionIndex (S.translateByClassReps c c' γ') := by |
| 796 | obtain ⟨D⟩ : Nonempty (S.LinkSplitting c c' j 1 γ γ' (S.linkCorank γ γ')) := |
| 797 | nonempty_linkSplitting h_agrees h_over h_cell γ' (one_le_meetNorm s) (absurd rfl) (absurd rfl) |
| 798 | have h_part : IsLatticeOfRank (finrank E (commonLink γ γ')) (S.commonPart c c' γ γ') := |
| 799 | D.isLatticeOfRank_commonPart |
| 800 | obtain ⟨h_ne, h_le⟩ : |
| 801 | submoduleIndex (S.pairLattice c c' γ γ') (S.commonPart c c' γ γ') ≠ 0 ∧ |
| 802 | submoduleIndex (S.pairLattice c c' γ γ') (S.commonPart c c' γ γ') ≤ |
| 803 | S.torsionIndex (S.translateByClassReps c c' γ') := |
| 804 | ne_zero_and_le_of_dvd (torsionIndex_pos h_over' h_cell').ne' |
| 805 | (submoduleIndex_pairLattice_dvd_torsionIndex h_over h_over') |
| 806 | have h_pair_le : S.pairLattice c c' γ γ' ≤ S.commonPart c c' γ γ' := |
| 807 | pairLattice_eq_commonPart_inf.trans_le inf_le_left |
| 808 | obtain ⟨h_lattice, h_disc⟩ := h_part.of_le_and_discriminant_eq_mul_index h_pair_le h_ne |
| 809 | refine ⟨h_lattice, ?_⟩ |
| 810 | rw [pairDiscriminant, h_disc] |
| 811 | exact mul_le_mul_of_nonneg_left (Nat.cast_le.2 h_le) h_part.discriminant_pos.le |
| 812 | |
| 813 | /-- Suppose `s` agrees (`S.Agrees s`), and `γ`, `γ'` are terms over `(c, s, c')` with cell ranks |
| 814 | `j`, `j'`. Then their common lattice `S.pairLattice c c' γ γ'` is a lattice of rank |
| 815 | `finrank E (commonLink γ γ')`. -/ |
| 816 | lemma isLatticeOfRank_pairLattice (h_agrees : S.Agrees s) (h_over : γ ∈ S.termsOver c s c') |
| 817 | (h_over' : γ' ∈ S.termsOver c s c') (h_cell : S.HasCellRank j γ) |
| 818 | (h_cell' : S.HasCellRank j' γ') : |
| 819 | IsLatticeOfRank (finrank E (commonLink γ γ')) (S.pairLattice c c' γ γ') := |
| 820 | (isLatticeOfRank_and_pairDiscriminant_le h_agrees h_over h_over' h_cell h_cell').1 |
| 821 | |
| 822 | /-- Let `γ` and `γ'` be terms over `(c, s, c')` with cell ranks `j` and `j'`, and let `s` agree |
| 823 | (`S.Agrees s`). Then `S.pairDiscriminant c c' γ γ'`, the discriminant of the common lattice of `γ` |
| 824 | and `γ'`, is at least `1`, as this lattice lies in an integral one. -/ |
| 825 | lemma one_le_pairDiscriminant (h_agrees : S.Agrees s) (h_over : γ ∈ S.termsOver c s c') |
| 826 | (h_over' : γ' ∈ S.termsOver c s c') (h_cell : S.HasCellRank j γ) |
| 827 | (h_cell' : S.HasCellRank j' γ') : |
| 828 | 1 ≤ S.pairDiscriminant c c' γ γ' := by |
| 829 | have h_le : S.pairLattice c c' γ γ' ≤ preimageLattice (Ô E) (S.classCoordX₀ c) := |
| 830 | inf_le_left.trans (saturatedLattice_le _ _) |
| 831 | obtain ⟨V, T, -, hT_int, -, h_disc⟩ := |
| 832 | (isLatticeOfRank_pairLattice h_agrees h_over h_over' h_cell |
| 833 | h_cell').exists_eq_colLattice_sublatticeBasis_mul (S.gram_classCoordX₀ c) h_le |
| 834 | rw [pairDiscriminant, h_disc] |
| 835 | exact one_le_mul_of_one_le_of_one_le (one_le_latticeDisc V) |
| 836 | (one_le_genIndex hT_int.det_mem T.det.isUnit) |
| 837 | |
| 838 | lemma pairLattice_comm : S.pairLattice c c' γ γ' = S.pairLattice c c' γ' γ := by |
| 839 | rw [pairLattice, pairLattice, commonLink_comm, inf_comm (S.termLattice c c' γ)] |
| 840 | |
| 841 | lemma pairDiscriminant_comm : S.pairDiscriminant c c' γ γ' = S.pairDiscriminant c c' γ' γ := by |
| 842 | rw [pairDiscriminant, pairDiscriminant, commonLink_comm, pairLattice_comm] |
| 843 | |
| 844 | /-- **Gain.** Let `γ`, `γ'` be rational terms of cell ranks `j`, `j'` over one block: two classes |
| 845 | `c`, `c'` and an element `s` of `S.ResidueGL` to which both reduce after translation to the lattices |
| 846 | of the classes. Let `s` agree and let `x` be at most `S.meetNorm s`, the product of the norms of the |
| 847 | places at which `s` meets (modulo such a place the spans of the frame and of its image under `s` |
| 848 | share a nonzero vector). The common lattice `S.pairLattice` is the part of `L_γ ∩ L_γ'` in |
| 849 | `commonLink γ γ'`, the subspace of `X₀` common to the two links, for the lattices `L_γ`, `L_γ'` of |
| 850 | the terms. Its discriminant is at most `(2 / M) ^ (c⁺ f)` times the geometric mean of the gauges |
| 851 | `S.levelGauge`, each the larger of `S.N ^ f * minorNorm` and `termDiscNorm`, divided by the two |
| 852 | isotropic row indices, times `M ^ (2 min(ϱ, j) f)`, `j'` for `γ'`. Here `M = S.M` is the level, |
| 853 | `c⁺ = S.linkCorank γ γ'` is the codimension in each link of the intersection of the two, and `f` is |
| 854 | the number of infinite places. The bound may be divided by `x` if `c⁺ = 0` and `γ` has the top rank |
| 855 | `𝔰.ϱ < j`. The inequality is stated squared. -/ |
| 856 | theorem pairDiscriminant_sq_le (h_agrees : S.Agrees s) (h_meet : x ≤ S.meetNorm s) |
| 857 | (h_over : γ ∈ S.termsOver c s c') (h_over' : γ' ∈ S.termsOver c s c') |
| 858 | (h_cell : S.HasCellRank j γ) (h_cell' : S.HasCellRank j' γ') : |
| 859 | (S.pairDiscriminant c c' γ γ' * |
| 860 | (if 𝔰.ϱ < j ∧ S.linkCorank γ γ' = 0 then x else 1 : ℕ)) ^ 2 ≤ |
| 861 | (2 / S.M) ^ (2 * S.linkCorank γ γ' * numInfPlaces E) * |
| 862 | (S.levelGauge j c c' γ * S.levelGauge j' c c' γ') := by |
| 863 | -- Bound the index of the common lattice once from each term; the torsion indices change places. |
| 864 | have h_first : S.pairDiscriminant c c' γ γ' ≤ |
| 865 | discriminant (finrank E (commonLink γ γ')) (S.commonPart c c' γ γ') * |
| 866 | S.torsionIndex (S.translateByClassReps c c' γ') := |
| 867 | (isLatticeOfRank_and_pairDiscriminant_le h_agrees h_over h_over' h_cell h_cell').2 |
| 868 | have h_second : S.pairDiscriminant c c' γ' γ ≤ |
| 869 | discriminant (finrank E (commonLink γ' γ)) (S.commonPart c c' γ' γ) * |
| 870 | S.torsionIndex (S.translateByClassReps c c' γ) := |
| 871 | (isLatticeOfRank_and_pairDiscriminant_le h_agrees h_over' h_over h_cell' h_cell).2 |
| 872 | rw [pairDiscriminant_comm] at h_second |
| 873 | have h_nonneg : 0 ≤ S.pairDiscriminant c c' γ γ' := |
| 874 | zero_le_one.trans (one_le_pairDiscriminant h_agrees h_over h_over' h_cell h_cell') |
| 875 | refine le_trans ?_ |
| 876 | (torsionIndex_mul_discriminant_commonPart_le h_agrees h_meet h_over h_over' h_cell h_cell') |
| 877 | rw [mul_pow, sq (S.pairDiscriminant c c' γ γ')] |
| 878 | refine mul_le_mul_of_nonneg_right ?_ (sq_nonneg _) |
| 879 | calc |
| 880 | S.pairDiscriminant c c' γ γ' * S.pairDiscriminant c c' γ γ' |
| 881 | ≤ (discriminant (finrank E (commonLink γ γ')) (S.commonPart c c' γ γ') * |
| 882 | S.torsionIndex (S.translateByClassReps c c' γ')) * |
| 883 | (discriminant (finrank E (commonLink γ' γ)) (S.commonPart c c' γ' γ) * |
| 884 | S.torsionIndex (S.translateByClassReps c c' γ)) := |
| 885 | mul_le_mul h_first h_second h_nonneg (h_nonneg.trans h_first) |
| 886 | _ = _ := by ring |
| 887 | |
| 888 | /-! ### The gauge of a near term -/ |
| 889 | |
| 890 | /-- Let the data satisfy the standing hypotheses `S.IsAdmissible`. Let `γ` be a term of cell rank |
| 891 | `j` over a block. Let `γ` be near: some archimedean point `y` and `γ⁻¹ y` both lie in |
| 892 | `S.boxedPoints`, the reduced points of bounded Bessel length at every infinite place. Then the gauge |
| 893 | `S.levelGauge`, the larger of `S.N ^ f * S.minorNorm j γ` and `S.termDiscNorm γ`, divided by its two |
| 894 | isotropic row indices, times `M ^ (2 min(ϱ, j) f)`, is at most `S.discriminantBound = b ^ (n³ f)`. |
| 895 | Here `M` is the congruence level, `b = S.b` the size bound, `n = ϱ + 1` and `f` the number of |
| 896 | infinite places. -/ |
| 897 | lemma IsNear.levelGauge_le [S.IsAdmissible] (h_near : S.IsNear γ) (h_over : γ ∈ S.termsOver c s c') |
| 898 | (h_cell : S.HasCellRank j γ) : S.levelGauge j c c' γ ≤ S.discriminantBound := by |
| 899 | -- The squares of the minors of the matrix of products are at most `b ^ (270 n²)` at every place; |
| 900 | -- the powers of `M` and `N` are of lower order. |
| 901 | have hb : 1 ≤ S.b := S.one_le_b |
| 902 | have h_prod (l : Fin (𝔰.ϱ + 2)) : |
| 903 | ∏ v, ‖Φ v (leadingMinor (S.frameProducts γ) l)‖ ^ 2 ≤ |
| 904 | S.b ^ (270 * 𝔰.n ^ 2 * numInfPlaces E) := by |
| 905 | rw [pow_mul] |
| 906 | refine (Finset.prod_le_prod₀ (fun _ _ ↦ by positivity) |
| 907 | fun v _ ↦ h_near.norm_map_leadingMinor_sq_le l v).trans_eq ?_ |
| 908 | rw [Finset.prod_const, Finset.card_univ] |
| 909 | have h_disc : S.termDiscNorm γ ≤ S.b ^ (270 * 𝔰.n ^ 2 * numInfPlaces E) := h_near.termDiscNorm_le |
| 910 | have hN : (1 : ℝ) ≤ S.N := Nat.one_le_cast.2 S.N_prime.one_le |
| 911 | have h_minor : S.minorNorm j γ ≤ S.b ^ (270 * 𝔰.n ^ 2 * numInfPlaces E) := by |
| 912 | rw [minorNorm, abs_norm_eq_prod_norm_sq] |
| 913 | exact (div_le_self (by positivity) (one_le_pow₀ hN)).trans (h_prod j) |
| 914 | have h_index : (1 : ℝ) ≤ S.isotropicRowsIndex j (S.translateByClassReps c c' γ) := |
| 915 | Nat.one_le_cast.2 (isotropicRowsIndex_pos h_over h_cell) |
| 916 | have h_index_inv : (1 : ℝ) ≤ S.isotropicRowsIndex j (S.translateByClassReps c c' γ)⁻¹ := |
| 917 | Nat.one_le_cast.2 (isotropicRowsIndex_inv_pos h_over h_cell) |
| 918 | have h_minor_pos : 0 < S.minorNorm j γ := h_cell.minorNorm_pos |
| 919 | have h_max : S.termDiscNorm γ ⊔ S.N ^ numInfPlaces E * S.minorNorm j γ ≤ |
| 920 | (S.b ^ (60 * 𝔰.n)) ^ numInfPlaces E * S.b ^ (270 * 𝔰.n ^ 2 * numInfPlaces E) := by |
| 921 | refine sup_le ?_ ?_ |
| 922 | · exact h_disc.trans (le_mul_of_one_le_left (by positivity) (one_le_pow₀ (one_le_pow₀ hb))) |
| 923 | · gcongr |
| 924 | exact S.N_le |
| 925 | have h_gauge : S.maxGauge j c c' γ ≤ |
| 926 | (S.b ^ (60 * 𝔰.n)) ^ numInfPlaces E * S.b ^ (270 * 𝔰.n ^ 2 * numInfPlaces E) := by |
| 927 | -- The two indices in the denominator of the gauge are at least `1`. |
| 928 | rw [h_cell.maxGauge_eq] |
| 929 | exact (div_le_self (le_sup_of_le_right (by positivity)) |
| 930 | (one_le_mul_of_one_le_of_one_le h_index h_index_inv)).trans h_max |
| 931 | have h_exponent : 23 * (2 * min 𝔰.ϱ j * numInfPlaces E) + |
| 932 | (60 * 𝔰.n * numInfPlaces E + 270 * 𝔰.n ^ 2 * numInfPlaces E) ≤ |
| 933 | 𝔰.n ^ 3 * numInfPlaces E := by |
| 934 | have h_min : min 𝔰.ϱ j ≤ 𝔰.n := (min_le_left _ _).trans (Nat.le_succ _) |
| 935 | have h_square : 𝔰.n ≤ 𝔰.n ^ 2 := Nat.le_self_pow two_ne_zero _ |
| 936 | have h_cube : 376 * 𝔰.n ^ 2 ≤ 𝔰.n ^ 3 := S.mul_sq_le_cube (by norm_num) |
| 937 | calc |
| 938 | _ = (46 * min 𝔰.ϱ j + 60 * 𝔰.n + 270 * 𝔰.n ^ 2) * numInfPlaces E := by ring |
| 939 | _ ≤ _ := Nat.mul_le_mul_right _ (by linarith) |
| 940 | calc |
| 941 | S.levelGauge j c c' γ ≤ (S.b ^ 23) ^ (2 * min 𝔰.ϱ j * numInfPlaces E) * |
| 942 | ((S.b ^ (60 * 𝔰.n)) ^ numInfPlaces E * S.b ^ (270 * 𝔰.n ^ 2 * numInfPlaces E)) := by |
| 943 | have h_pos : 0 < S.maxGauge j c c' γ := maxGauge_pos h_over h_cell |
| 944 | rw [levelGauge] |
| 945 | gcongr |
| 946 | exact S.M_le_b_pow |
| 947 | _ ≤ S.discriminantBound := by |
| 948 | rw [← pow_mul, ← pow_mul, ← pow_add, ← pow_add] |
| 949 | exact pow_le_pow_right₀ hb h_exponent |
| 950 | |
| 951 | end New.Filling |