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.Real |
| 4 | import Mathlib.RingTheory.PicardGroup |
| 5 | public import New.Spanning.RemainingTerms.LinkLattice |
| 6 | public import New.Spanning.RemainingTerms.LinkVectors |
| 7 | public import New.Spanning.RemainingTerms.Data |
| 8 | public import New.Spanning.Unfolding.Climbing |
| 9 | import Lib.General.LinearAlgebra.MatrixPolynomials |
| 10 | |
| 11 | /-! |
| 12 | # The cut: from the lattice of a link to the vectors common to two links |
| 13 | |
| 14 | Let `A` be the span of `e₁, …, e_ϱ`, `Λ` the lattice of a class and `M` the level. The vectors of |
| 15 | `Λ` orthogonal to `A` and `γ A` whose part in `A` is divisible by `M` give a lattice `L⁺_γ` in the |
| 16 | link of a term `γ`. We descend from it to its intersection with the link of a second term `γ'`, |
| 17 | and from there to the part orthogonal to `z⁺` and `Υ_γ⁻¹ z⁺`, which lies in |
| 18 | `L_γ = S.termLattice c c' γ`. The last step costs at most a principal minor of their Gram matrix. |
| 19 | So the discriminant of this part, times the torsion index `S.torsionIndex`, the discriminant of |
| 20 | the projection to the complement of the intersection and a gain `x` from the places where the |
| 21 | residue meets, is at most the gauge `S.levelGauge` of the term (`nonempty_linkSplitting` below). |
| 22 | |
| 23 | * `New.Filling.HasCellRank.abs_norm_minor_gram_linkVectors_mul_le`, |
| 24 | `New.Filling.minorNorm_sq_le_linkDiscSq_mul`: the cost of the cut, in the three cases of rank |
| 25 | `0`, `1` and `2`. The first bounds the principal minors of the Gram matrix of the two vectors; |
| 26 | the second is the resulting lower bound for the discriminant of a lattice in the link on whose |
| 27 | span the `z`-forms are injective. |
| 28 | * `New.Filling.LinkSplitting`, `New.Filling.nonempty_linkSplitting`: the splitting of a link along |
| 29 | its intersection with a second link. |
| 30 | * `New.Filling.HasIntegralLifts.isIntMatrix_linkForm`: for two terms over one block, the form |
| 31 | `S.linkForm / M` is integral on pairs of lifts. |
| 32 | |
| 33 | Notions from other files: |
| 34 | |
| 35 | * `New.link γ`: the space of pairs (class of `y`, class of `γ⁻¹ y`) in `(A^⊥ / A)²`, with `y` |
| 36 | orthogonal to `A` and `γ A`. Here `A^⊥ / A = X₀ ⊥ E z` with `z` of norm `-N`, and the link is |
| 37 | the graph of an isometry `Υ_γ` of `X₀ ⊥ E z⁺`, with `z⁺` of norm `N`. |
| 38 | * `New.Filling.linkDiscSq`: for a rational basis `v` and an adelic change of basis `e`, |
| 39 | `S.linkDiscSq v e` is the squared discriminant of the lattice `v e` for `S.linkMetric`, which on |
| 40 | the link is the form of `X₀ ⊥ E z⁺`. |
| 41 | * `New.Filling.HasIntegralLifts`, `New.Filling.HasLevelLifts`: the columns of a matrix are the |
| 42 | images in the link of vectors of `Λ` orthogonal to `A` and `γ A`, respectively lie in `L⁺_γ`. |
| 43 | * `New.Filling.termsOver`: `S.termsOver c s c'` is the block of rational `γ` whose matrix in the |
| 44 | bases of the lattices of `c` and `c'` is integral with reduction `s`. |
| 45 | -/ |
| 46 | |
| 47 | @[expose] public section |
| 48 | |
| 49 | open Matrix Submodule Module Finset Fin Fintype Pointwise |
| 50 | |
| 51 | namespace New.Filling |
| 52 | |
| 53 | variable {E : Type} [Field E] [CMType E] [HasPrimitiveRoot5040 E] {𝔰 : Shape} {τ : Type} |
| 54 | {S : Filling E 𝔰} |
| 55 | |
| 56 | section |
| 57 | |
| 58 | omit [HasPrimitiveRoot5040 E] |
| 59 | |
| 60 | /-- Let `n = S.classCoord c * finAdeleMatrix t * w` be the coordinates of the adelic combinations |
| 61 | `t w` of rational vectors in the basis of the lattice of the class `c`. Let |
| 62 | `k = S.translateByClassReps c c' γ` be the matrix of `γ` in the bases of the lattices of `c` and |
| 63 | `c'`. The products with `z` on both halves (`zRowBlockDiagonal`) for `S.latticeMiddle` take the same |
| 64 | values on `linkMatrix k * n` as those for `S.ratMiddle` take on `linkMatrix γ * t * w`. -/ |
| 65 | lemma zRowBlockDiagonal_mul_linkMatrix_mul_classCoord {ρ : Type} [Fintype ρ] (c c' : S.Classes) |
| 66 | (γ : S.G E) (t : Matrix 𝔰.BesselIndex ρ E) (w : Matrix ρ τ (𝔸f E)) : |
| 67 | zRowBlockDiagonal (S.latticeMiddle (𝔸f E)) * linkMatrix (S.translateByClassReps c c' γ) * |
| 68 | (S.classCoord c * finAdeleMatrix t * w) = |
| 69 | finAdeleMatrix (zRowBlockDiagonal (S.ratMiddle E)) * |
| 70 | (finAdeleMatrix (linkMatrix γ * t) * w) := by |
| 71 | -- Both sides are the products with the last column of each of the two frames. |
| 72 | rw [← framePair_last_eq_zRowBlockDiagonal_mul, ← Matrix.mul_assoc, |
| 73 | framePair_translateByClassReps_mul_classCoord, |
| 74 | framePair_last_eq_zRowBlockDiagonal_mul] |
| 75 | simp [Matrix.mul_assoc] |
| 76 | |
| 77 | /-- Let the columns of the rational matrix `t` be orthogonal to `A` and `γ A` |
| 78 | (`isotropicFramePair γ`). Then the coordinates of the adelic combinations `t w` in the basis of the |
| 79 | lattice of the class `c` are orthogonal to `A` and `k A`, where `k` is the matrix of `γ` in the |
| 80 | bases of the lattices of `c` and `c'`. -/ |
| 81 | lemma isotropicFramePair_mul_classCoord_eq_zero {γ : S.G E} {ρ : Type} [Fintype ρ] |
| 82 | (c c' : S.Classes) {t : Matrix 𝔰.BesselIndex ρ E} |
| 83 | (h_orth : (isotropicFramePair γ)ᴴ * S.ratGram * t = 0) (w : Matrix ρ τ (𝔸f E)) : |
| 84 | (isotropicFramePair (S.translateByClassReps c c' γ))ᴴ * (S.latticeMiddle (𝔸f E)).splitGram * |
| 85 | (S.classCoord c * finAdeleMatrix t * w) = 0 := by |
| 86 | rw [← Matrix.mul_assoc, framePair_translateByClassReps_mul_classCoord, h_orth] |
| 87 | simp |
| 88 | |
| 89 | /-- If the first half of the images `linkMatrix γ * t * w` of adelic combinations `t w` of rational |
| 90 | vectors is a matrix `p` in `X₀`, the middle part of the coordinates of `t w` in the basis of the |
| 91 | lattice of the class `c` is `S.classCoordX₀ c * p`. -/ |
| 92 | lemma toRows_classCoord_mul {γ : S.G E} {ρ : Type} [Fintype ρ] (c : S.Classes) |
| 93 | {t : Matrix 𝔰.BesselIndex ρ E} {w : Matrix ρ τ (𝔸f E)} {p : Matrix 𝔰.κ τ (𝔸f E)} |
| 94 | (hp : (finAdeleMatrix (linkMatrix γ * t) * w).toRows₁ = fromRows p 0) : |
| 95 | (S.classCoord c * finAdeleMatrix t * w).toRows₂.toRows₁ = S.classCoordX₀ c * p := by |
| 96 | -- The first half of the images is the middle part of `t w`, and `S.classCoord c` is block |
| 97 | -- diagonal. |
| 98 | have h_middle : (finAdeleMatrix t * w).toRows₂.toRows₁ = fromRows p 0 := by |
| 99 | rw [← hp] |
| 100 | simp [← ext_iff, linkMatrix, Matrix.mul_apply, Matrix.one_apply] |
| 101 | have h_block (q : Matrix 𝔰.BesselIndex τ (𝔸f E)) : |
| 102 | q.toRows₂.toRows₁ = fromRows p 0 → |
| 103 | (S.classCoord c * q).toRows₂.toRows₁ = S.classCoordX₀ c * p := by |
| 104 | simp +contextual [← ext_iff, classCoord_eq_fromBlocks, Matrix.mul_apply] |
| 105 | rw [Matrix.mul_assoc, h_block _ h_middle] |
| 106 | |
| 107 | end |
| 108 | |
| 109 | section |
| 110 | |
| 111 | variable {c c' : S.Classes} {γ : S.G E} {j : Fin (𝔰.ϱ + 2)} |
| 112 | |
| 113 | /-- Let the columns of `m` be orthogonal to those of `y` for `S.linkMetric`, and let the columns of |
| 114 | `(m | y) f` lie in the lattice `L⁺_γ` of the link of `γ` for the class `c` (`HasLevelLifts c γ`). |
| 115 | Then there are adelic changes of basis `a`, `v` and a shear `z` such that the columns of `m a` and |
| 116 | of `m z + y v` lie in `L⁺_γ`, and the squared discriminant `S.linkDiscSq` of `(m | y) f` is the |
| 117 | product of those of `m a` and `y v`. -/ |
| 118 | lemma HasLevelLifts.exists_orthogonal_split [Fintype τ] [DecidableEq τ] {r : ℕ} |
| 119 | {m : Matrix (𝔰.MiddleIndex ⊕ 𝔰.MiddleIndex) τ E} |
| 120 | {y : Matrix (𝔰.MiddleIndex ⊕ 𝔰.MiddleIndex) (Fin r) E} {f : GL (τ ⊕ Fin r) (𝔸f E)} |
| 121 | (h_lift : HasLevelLifts c γ (finAdeleMatrix (fromCols m y) * f.val)) |
| 122 | (h_orth : mᴴ * S.linkMetric * y = 0) : |
| 123 | ∃ (a : GL τ (𝔸f E)) (v : GL (Fin r) (𝔸f E)) (z : Matrix τ (Fin r) (𝔸f E)), |
| 124 | HasLevelLifts c γ (finAdeleMatrix m * a.val) ∧ |
| 125 | HasLevelLifts c γ (finAdeleMatrix m * z + finAdeleMatrix y * v.val) ∧ |
| 126 | S.linkDiscSq m a * S.linkDiscSq y v = S.linkDiscSq (fromCols m y) f := by |
| 127 | -- An integral change of basis `V` makes `f * V` block triangular; both block columns of |
| 128 | -- `finAdeleMatrix (fromCols m y) * f * V` lift. |
| 129 | obtain ⟨a, v, z, h_prim⟩ : |
| 130 | ∃ (a : GL τ (𝔸f E)) (v : GL (Fin r) (𝔸f E)) (z : Matrix τ (Fin r) (𝔸f E)), |
| 131 | IsPrimitiveMatrix (Ô E) (f⁻¹.val * fromBlocks a.val z 0 v.val) := |
| 132 | exists_isPrimitiveMatrix_mul_fromBlocks f⁻¹.val ⟨f.val, f.mul_inv⟩ |
| 133 | obtain ⟨V, hV, hV_eq⟩ : |
| 134 | ∃ V ∈ intGL (τ ⊕ Fin r) (Ô E), V.val = f⁻¹.val * fromBlocks a.val z 0 v.val := |
| 135 | isPrimitiveMatrix_iff.1 h_prim |
| 136 | have hV_int : IsIntMatrix (Ô E) V.val := by |
| 137 | rw [hV_eq] |
| 138 | exact h_prim.left |
| 139 | have h_triangular : f.val * V.val = fromBlocks a.val z 0 v.val := by |
| 140 | rw [hV_eq, Units.mul_inv_cancel_left] |
| 141 | have h_blocks : finAdeleMatrix (fromCols m y) * f.val * V.val = |
| 142 | fromCols (finAdeleMatrix m * a.val) (finAdeleMatrix m * z + finAdeleMatrix y * v.val) := by |
| 143 | simp [Matrix.mul_assoc, h_triangular, fromCols_map, fromCols_mul_fromBlocks] |
| 144 | have h_lift' : HasLevelLifts c γ (fromCols (finAdeleMatrix m * a.val) |
| 145 | (finAdeleMatrix m * z + finAdeleMatrix y * v.val)) := by |
| 146 | rw [← h_blocks] |
| 147 | exact h_lift.mul hV_int |
| 148 | refine ⟨a, v, z, h_lift'.submatrix Sum.inl, h_lift'.submatrix Sum.inr, ?_⟩ |
| 149 | obtain ⟨h_open, h_compact⟩ : IsOpen (Ô E : Set (𝔸f E)) ∧ IsCompact (Ô E : Set (𝔸f E)) := |
| 150 | IsAdelic.isOpen_isCompact |
| 151 | have h_index : genIndex f.val.det = genIndex a.val.det * genIndex v.val.det := by |
| 152 | rw [← map_mul, ← det_fromBlocks_zero₂₁ a.val z, ← h_triangular, det_mul, map_mul, |
| 153 | genIndex_det_eq_one h_open h_compact hV, mul_one] |
| 154 | have h_gram : ((fromCols m y)ᴴ * S.linkMetric * fromCols m y).det = |
| 155 | (mᴴ * S.linkMetric * m).det * (yᴴ * S.linkMetric * y).det := by |
| 156 | simp [h_orth, conjTranspose_fromCols_eq_fromRows_conjTranspose] |
| 157 | simp only [linkDiscSq, h_gram, h_index, map_mul, Rat.cast_mul, abs_mul] |
| 158 | ring |
| 159 | |
| 160 | variable [Fintype τ] {s : S.ResidueGL} {x : ℕ} |
| 161 | |
| 162 | /-- Let `γ` be a term over the classes `c`, `c'` with reduction `s`, where `s` is compatible with |
| 163 | the unipotent character (`S.Agrees s`), and let the columns of `w` have integral lifts. Let `ρ` |
| 164 | choose rows among the two `z`-forms `zRowBlockDiagonal`, such that the minor of their values on `w` |
| 165 | is a unit of the finite adeles. Then the generalised index `genIndex` of the minor is at least `x`, |
| 166 | if `x` is at most the norm `S.meetNorm s` of the product of the places with `S.MeetsAt s`, and if |
| 167 | both forms are chosen unless `x = 1`. -/ |
| 168 | lemma HasIntegralLifts.le_genIndex_det_zRowBlockDiagonal (hs : S.Agrees s) |
| 169 | (h_term : γ ∈ S.termsOver c s c') {r : ℕ} |
| 170 | {w : Matrix (𝔰.MiddleIndex ⊕ 𝔰.MiddleIndex) (Fin r) (𝔸f E)} |
| 171 | (h_lift : HasIntegralLifts c γ w) {ρ : Fin r → Unit ⊕ Unit} (hx : x ≤ S.meetNorm s) |
| 172 | (hρ : x ≠ 1 → ρ.Bijective) |
| 173 | (h_unit : IsUnit ((finAdeleMatrix (zRowBlockDiagonal (S.ratMiddle E)) * w).submatrix ρ |
| 174 | id).det) : |
| 175 | x ≤ genIndex ((finAdeleMatrix (zRowBlockDiagonal (S.ratMiddle E)) * w).submatrix ρ id).det := by |
| 176 | -- The values of the `z`-forms are products of the lifts `n` with `z` and `γ z`. So the minor is |
| 177 | -- integral, and divisible by the places at which `s` meets if both forms occur. |
| 178 | obtain ⟨⟨k, hk_mem⟩, rfl, rfl : k = S.translateByClassReps c c' γ⟩ := h_term |
| 179 | obtain ⟨ι, _, t, u, h_orth, hn_int, h_eq⟩ := h_lift |
| 180 | set n : Matrix 𝔰.BesselIndex (Fin r) (𝔸f E) := S.classCoord c * finAdeleMatrix t * u |
| 181 | have hn_z : zRowBlockDiagonal (S.latticeMiddle (𝔸f E)) * |
| 182 | linkMatrix (S.translateByClassReps c c' γ) * n = |
| 183 | finAdeleMatrix (zRowBlockDiagonal (S.ratMiddle E)) * w := by |
| 184 | rw [← h_eq] |
| 185 | exact zRowBlockDiagonal_mul_linkMatrix_mul_classCoord c c' γ t u |
| 186 | have hn_orth : |
| 187 | (isotropicFramePair (S.translateByClassReps c c' γ))ᴴ * (S.latticeMiddle (𝔸f E)).splitGram * n |
| 188 | = 0 := |
| 189 | isotropicFramePair_mul_classCoord_eq_zero c c' h_orth u |
| 190 | have hJn : IsIntMatrix (Ô E) ((S.latticeMiddle (𝔸f E)).splitGram * n) := |
| 191 | S.isUnimodular_latticeMiddle.splitGram.isIntMatrix.mul hn_int |
| 192 | let P : Matrix (Fin (𝔰.ϱ + 1) ⊕ Fin (𝔰.ϱ + 1)) (Fin r) (𝔸f E) := |
| 193 | (framePair (S.translateByClassReps c c' γ))ᴴ * ((S.latticeMiddle (𝔸f E)).splitGram * n) |
| 194 | have h_products : (finAdeleMatrix (zRowBlockDiagonal (S.ratMiddle E)) * w).submatrix ρ id = |
| 195 | P.submatrix (Sum.map (fun _ : Unit ↦ 𝔰.top) (fun _ : Unit ↦ 𝔰.top) ∘ ρ) id := by |
| 196 | rw [← hn_z, ← framePair_last_eq_zRowBlockDiagonal_mul, Matrix.mul_assoc] |
| 197 | rfl |
| 198 | rw [h_products] at h_unit ⊢ |
| 199 | obtain rfl | h_ne := eq_or_ne x 1 |
| 200 | · have hP_int : IsIntMatrix (Ô E) P := |
| 201 | (isIntMatrix_framePair hk_mem.isIntMatrix).conjTranspose.mul hJn |
| 202 | exact_mod_cast one_le_genIndex (IsIntMatrix.det_mem fun a b ↦ hP_int _ b) h_unit |
| 203 | · have hP_zero : P.submatrix (Sum.map castSucc castSucc) id = 0 := by |
| 204 | rwa [Matrix.mul_assoc] at hn_orth |
| 205 | exact le_genIndex_det_of_le_meetNorm hs hJn hP_zero (.ofBijective ρ (hρ h_ne)) h_unit hx |
| 206 | |
| 207 | omit [HasPrimitiveRoot5040 E] in |
| 208 | /-- Let `γ` have cell rank `j ≤ ϱ + 1` (`S.HasCellRank`): in particular the leading minor of order |
| 209 | `j` of the matrix of products of the standard frame with its image under `γ` is nonzero. Take a |
| 210 | principal minor of order `r`, on the indices chosen by `ρ`, of the Gram matrix of `z⁺` and |
| 211 | `Υ_γ⁻¹ z⁺` (`linkVectors γ`), where `r = 2` is allowed only at the top cell rank `j = ϱ + 1`. Its |
| 212 | absolute norm is at most `(G / μ) ^ 2`. Here `μ = S.minorNorm j γ` is the normalised norm of that |
| 213 | leading minor, and `G` is the maximum of `N ^ f * μ` and of `S.termDiscNorm γ`, the product of the |
| 214 | moduli of the discriminant `S.termDisc γ` of the frames. The prime `N = S.N` of the filling is the |
| 215 | norm of `z⁺`, and `f` is the number of infinite places. -/ |
| 216 | lemma HasCellRank.abs_norm_minor_gram_linkVectors_mul_le (h_cell : S.HasCellRank j γ) {r : ℕ} |
| 217 | (hr : r ≤ 1 + (j - 𝔰.ϱ)) {ρ : Fin r → Fin 2} (hρ : ρ.Injective) : |
| 218 | |(Algebra.norm ℚ |
| 219 | (((linkVectors γ)ᴴ * S.positiveGram * linkVectors γ).submatrix ρ ρ).det : ℝ)| * |
| 220 | S.minorNorm j γ ^ 2 ≤ |
| 221 | (S.termDiscNorm γ ⊔ S.N ^ numInfPlaces E * S.minorNorm j γ) ^ 2 := by |
| 222 | -- The minor is `1`, `N` or the Gram determinant, of modulus `N² |S.termDisc γ| / |δ|²` at each |
| 223 | -- place, where `δ` is the leading minor of order `j` of the products of the frames. |
| 224 | have h_minor : 0 < S.minorNorm j γ := h_cell.minorNorm_pos |
| 225 | obtain _ | _ | r := r |
| 226 | · grw [← le_max_right, ← S.N_prime.one_le] |
| 227 | simp |
| 228 | · have h_entry : ((linkVectors γ)ᴴ * S.positiveGram * linkVectors γ) (ρ 0) (ρ 0) = S.N := by |
| 229 | rw [gram_linkVectors] |
| 230 | generalize ρ 0 = i |
| 231 | fin_cases i <;> rfl |
| 232 | have h_norm : |(Algebra.norm ℚ (S.N : E) : ℝ)| = (S.N ^ numInfPlaces E) ^ 2 := by |
| 233 | simp [abs_norm_eq_prod_norm_sq, ← pow_mul, mul_comm] |
| 234 | rw [det_fin_one, submatrix_apply, h_entry, h_norm, ← mul_pow] |
| 235 | grw [← le_max_right] |
| 236 | · have hρ_bij : ρ.Bijective := hρ.bijective_of_nat_card_le (by simp) |
| 237 | have h_det : (((linkVectors γ)ᴴ * S.positiveGram * linkVectors γ).submatrix ρ ρ).det = |
| 238 | ((linkVectors γ)ᴴ * S.positiveGram * linkVectors γ).det := |
| 239 | det_submatrix_equiv_self (.ofBijective ρ hρ_bij) _ |
| 240 | have h_top : j - 𝔰.ϱ = 1 := by lia |
| 241 | have h_ne (v : NumberField.InfinitePlace E) : |
| 242 | ‖Φ v (leadingMinor (S.frameProducts γ) j)‖ ≠ 0 := by |
| 243 | simpa using h_cell.leadingMinor_ne_zero |
| 244 | have h_norm : |(Algebra.norm ℚ ((linkVectors γ)ᴴ * S.positiveGram * linkVectors γ).det : ℝ)| * |
| 245 | S.minorNorm j γ ^ 2 = S.termDiscNorm γ ^ 2 := by |
| 246 | simp only [termDiscNorm, minorNorm, h_top, abs_norm_eq_prod_norm_sq, |
| 247 | h_cell.norm_det_gram_linkVectors] |
| 248 | have h_prod := prod_ne_zero_iff.2 fun v (_ : v ∈ univ) ↦ h_ne v |
| 249 | have hN : (S.N : ℝ) ≠ 0 := Nat.cast_ne_zero.2 S.N_prime.ne_zero |
| 250 | simp [field, prod_pow, pow_mul, prod_mul_distrib, prod_div_distrib] |
| 251 | grw [h_det, h_norm, termDiscNorm, ← le_max_left] |
| 252 | |
| 253 | /-- **The part seen by the `z`-forms.** Let `γ` have cell rank `j` and be a term over the classes |
| 254 | `c`, `c'` with reduction `s`, where `s` is compatible with the unipotent character (`S.Agrees s`). |
| 255 | Let the `r` columns of `y` lie in the link, where `r ≤ 2`, and `r ≤ 1` unless `j = ϱ + 1`. Let the |
| 256 | two `z`-forms `zRowBlockDiagonal` be injective on their span, and let them take the same values on |
| 257 | the basis `y v` as on a matrix `w` that has integral lifts. Then the squared discriminant of the |
| 258 | lattice with basis `y v` is at least `(x * μ / G) ^ 2`. Here `μ = S.minorNorm j γ` is the normalised |
| 259 | norm of the leading minor of order `j` of the products of the frames, and `G` is the maximum of |
| 260 | `S.termDiscNorm γ` and `N ^ f * μ`, where the prime `N = S.N` of the filling is the norm of `z⁺` and |
| 261 | `f` is the number of infinite places. The number `x` is at most the norm `S.meetNorm s` of the |
| 262 | product of the places with `S.MeetsAt s`, and `x = 1` unless `r = 2`. -/ |
| 263 | lemma minorNorm_sq_le_linkDiscSq_mul (hs : S.Agrees s) (h_term : γ ∈ S.termsOver c s c') |
| 264 | (h_cell : S.HasCellRank j γ) (hx : x ≤ S.meetNorm s) {r : ℕ} (hr_le : r ≤ 1 + (j - 𝔰.ϱ)) |
| 265 | (hr_eq : x ≠ 1 → r = 2) {y : Matrix (𝔰.MiddleIndex ⊕ 𝔰.MiddleIndex) (Fin r) E} |
| 266 | (hy_le : colSpan y ≤ link γ) (hy_inv : HasLeftInv (zRowBlockDiagonal (S.ratMiddle E) * y)) |
| 267 | (v : GL (Fin r) (𝔸f E)) {w : Matrix (𝔰.MiddleIndex ⊕ 𝔰.MiddleIndex) (Fin r) (𝔸f E)} |
| 268 | (h_lift : HasIntegralLifts c γ w) |
| 269 | (h_forms : finAdeleMatrix (zRowBlockDiagonal (S.ratMiddle E)) * w = |
| 270 | finAdeleMatrix (zRowBlockDiagonal (S.ratMiddle E) * y) * v.val) : |
| 271 | x ^ 2 * S.minorNorm j γ ^ 2 ≤ |
| 272 | S.linkDiscSq y v * (S.termDiscNorm γ ⊔ S.N ^ numInfPlaces E * S.minorNorm j γ) ^ 2 := by |
| 273 | -- The `z`-forms are the products with the pairs `ε` over `-z⁺` and `-Υ_γ⁻¹ z⁺`. Choose `r` of |
| 274 | -- them, by `ρ`, that pair nondegenerately with `y`. The determinant of the pairing has index at |
| 275 | -- least `x`, so the squared discriminant of the lattice is at least `x ^ 2 / D`, where `D` is |
| 276 | -- the absolute norm of their Gram determinant. |
| 277 | let ε : Matrix (𝔰.MiddleIndex ⊕ 𝔰.MiddleIndex) (Unit ⊕ Unit) E := linkVectorPairs γ |
| 278 | have hε_repr : εᴴ * S.linkMetric * y = zRowBlockDiagonal (S.ratMiddle E) * y := |
| 279 | linkVectorPairs_mul_linkMetric_mul hy_le |
| 280 | obtain ⟨ρ, hρ⟩ : ∃ ρ : Fin r → Unit ⊕ Unit, |
| 281 | ((zRowBlockDiagonal (S.ratMiddle E) * y).submatrix ρ id).det ≠ 0 := |
| 282 | not_forall.1 (det_eval_eq_zero_iff_not_linearIndependent.not_left.2 |
| 283 | (mulVec_injective_iff.1 hy_inv.injective_mulVec)) |
| 284 | have hρ_inj : ρ.Injective := by |
| 285 | intro a b h_eq |
| 286 | by_contra h_ne |
| 287 | exact hρ (det_zero_of_row_eq h_ne (by simp [funext_iff, h_eq])) |
| 288 | let e : Matrix (𝔰.MiddleIndex ⊕ 𝔰.MiddleIndex) (Fin r) E := ε.submatrix id ρ |
| 289 | have he_repr : eᴴ * S.linkMetric * y = (zRowBlockDiagonal (S.ratMiddle E) * y).submatrix ρ id := |
| 290 | congrArg (fun A ↦ A.submatrix ρ id) hε_repr |
| 291 | have h_pairing : (1 : GL (Fin r) (𝔸f E)).valᴴ * (finAdeleMatrix (eᴴ * S.linkMetric * y) * v.val) = |
| 292 | (finAdeleMatrix (zRowBlockDiagonal (S.ratMiddle E)) * w).submatrix ρ id := by |
| 293 | rw [h_forms, he_repr, Units.val_one, conjTranspose_one, Matrix.one_mul] |
| 294 | rfl |
| 295 | have h_gram : eᴴ * S.linkMetric * e = |
| 296 | ((linkVectors γ)ᴴ * S.positiveGram * linkVectors γ).submatrix |
| 297 | (zFormIndex ∘ ρ) (zFormIndex ∘ ρ) := |
| 298 | congrArg (fun A ↦ A.submatrix ρ ρ) (gram_linkVectorPairs γ) |
| 299 | have h_index : |
| 300 | IsUnit ((finAdeleMatrix (zRowBlockDiagonal (S.ratMiddle E)) * w).submatrix ρ id).det → |
| 301 | x ≤ genIndex ((finAdeleMatrix (zRowBlockDiagonal (S.ratMiddle E)) * w).submatrix ρ id).det := |
| 302 | h_lift.le_genIndex_det_zRowBlockDiagonal hs h_term hx |
| 303 | fun h_ne ↦ hρ_inj.bijective_of_nat_card_le (by simp [hr_eq h_ne]) |
| 304 | rw [← h_pairing] at h_index |
| 305 | set D : ℝ := |(Algebra.norm ℚ (eᴴ * S.linkMetric * e).det : ℝ)| with hD |
| 306 | have h_liouville : x ^ 2 ≤ S.linkDiscSq y v * D := by |
| 307 | have h_det : (eᴴ * S.linkMetric * y).det ≠ 0 := by rwa [he_repr] |
| 308 | refine (liouville_gram linkMetric_posDef e y 1 v h_det x.cast_nonneg h_index).trans_eq ?_ |
| 309 | rw [Units.val_one, det_one, map_one, linkDiscSq] |
| 310 | ring |
| 311 | have h_minor : D * S.minorNorm j γ ^ 2 ≤ |
| 312 | (S.termDiscNorm γ ⊔ S.N ^ numInfPlaces E * S.minorNorm j γ) ^ 2 := by |
| 313 | rw [hD, h_gram] |
| 314 | exact h_cell.abs_norm_minor_gram_linkVectors_mul_le hr_le (zFormIndex_injective.comp hρ_inj) |
| 315 | have h_nonneg : 0 ≤ S.linkDiscSq y v := by |
| 316 | unfold linkDiscSq |
| 317 | positivity |
| 318 | grw [h_liouville, mul_assoc, h_minor] |
| 319 | |
| 320 | /-- Let `V` be a subspace of `X₀` and let `Λ` be the lattice of the class `c`. Let the frame be |
| 321 | `e₁, …, e_ϱ, z`, with isotropic part `A` spanned by `e₁, …, e_ϱ`, and let |
| 322 | `k = S.translateByClassReps c c' γ`. The index of `Λ ∩ V ∩ L_γ` in the saturated lattice `Λ ∩ V` |
| 323 | (`saturatedLattice`) is read on the products with the image of the frame under `k`. It is the index, |
| 324 | in the module of the products of vectors of `Λ ∩ V` with this image, of those products that are `M` |
| 325 | times the products of a vector of `Λ ∩ A`. -/ |
| 326 | lemma submoduleIndex_termLattice (V : Submodule E (𝔰.κ → E)) : |
| 327 | submoduleIndex (S.termLattice c c' γ) (saturatedLattice (S.gram_classCoordX₀ c) V) = |
| 328 | sublatticeIndex (S.gram_classCoordX₀ c) V |
| 329 | ((frameMiddle (S.translateByClassReps c c' γ : Matrix 𝔰.BesselIndex 𝔰.BesselIndex (𝔸f E)))ᴴ |
| 330 | * |
| 331 | S.latticeMiddle (𝔸f E)) |
| 332 | (S.ideleM • colLattice (Ô E) |
| 333 | (isotropicRows ((S.latticeMiddle (𝔸f E)).frameGram |
| 334 | (S.translateByClassReps c c' γ)))ᴴ) := by |
| 335 | rw [termLattice, classLatticeX₀, submoduleIndex_inf_comap _ (saturatedLattice_le _ V), |
| 336 | sublatticeIndex, saturatedLattice, colLattice, colLattice, colLattice, ← Submodule.map_comp, |
| 337 | ← Matrix.mul_assoc _ (S.classCoordX₀ c), mulVecLin_mul _ (sublatticeBasis _ V).val] |
| 338 | rfl |
| 339 | |
| 340 | omit [HasPrimitiveRoot5040 E] in |
| 341 | /-- Let the columns of `m` be pairs of vectors of `X₀ ⊕ E z` on which both `z`-forms, the products |
| 342 | with `z` on the two halves, vanish. Then the first half of any adelic combination `m a` of them |
| 343 | lies in `X₀`: its `z`-coordinate is zero. -/ |
| 344 | lemma toRows₁_mul_eq_fromRows_zero {m : Matrix (𝔰.MiddleIndex ⊕ 𝔰.MiddleIndex) τ E} |
| 345 | (hm_forms : zRowBlockDiagonal (S.ratMiddle E) * m = 0) (a : Matrix τ τ (𝔸f E)) : |
| 346 | (finAdeleMatrix m * a).toRows₁ = fromRows (finAdeleMatrix m.toRows₁.toRows₁ * a) 0 := by |
| 347 | simp_all [← ext_iff, Matrix.mul_apply, middleGram, Nat.Prime.ne_zero] |
| 348 | |
| 349 | omit [HasPrimitiveRoot5040 E] in |
| 350 | /-- Let the columns of `m` lie in the link of `γ`, and let both `z`-forms vanish on them. Their Gram |
| 351 | matrix for `S.linkMetric` is the standard Gram matrix of their parts in `X₀`. -/ |
| 352 | lemma gram_linkMetric_eq_gram_toRows₁ {m : Matrix (𝔰.MiddleIndex ⊕ 𝔰.MiddleIndex) τ E} |
| 353 | (hm_link : colSpan m ≤ link γ) (hm_forms : zRowBlockDiagonal (S.ratMiddle E) * m = 0) : |
| 354 | mᴴ * S.linkMetric * m = m.toRows₁.toRows₁ᴴ * m.toRows₁.toRows₁ := by |
| 355 | -- The two halves of `m` have equal Gram matrices and no `z`-coordinates, and `S.linkMetric` is |
| 356 | -- the mean of the forms on the two halves where the `z`-forms vanish. |
| 357 | classical |
| 358 | have h_isotropic : mᴴ * S.linkForm * m = 0 := gram_linkForm_eq_zero_of_le_link hm_link hm_link |
| 359 | simp_all [← ext_iff, linkMetric, Matrix.mul_apply, middleGram, add_neg_eq_zero, ← two_mul, |
| 360 | Nat.Prime.ne_zero, Matrix.one_apply, Matrix.mul_add, Matrix.add_mul] |
| 361 | |
| 362 | end |
| 363 | |
| 364 | omit [HasPrimitiveRoot5040 E] in |
| 365 | /-- If both `z`-forms vanish, level lifts of `m a` give columns in the term lattice after |
| 366 | projection to `X₀`. The projections are integral, and orthogonality expresses their frame |
| 367 | pairings using the lift's `A` coordinates, which are divisible by the level. -/ |
| 368 | private lemma HasLevelLifts.colLattice_le_termLattice {c : S.Classes} {γ : S.G E} |
| 369 | {r : ℕ} {m : Matrix (𝔰.MiddleIndex ⊕ 𝔰.MiddleIndex) (Fin r) E} |
| 370 | (hm_forms : zRowBlockDiagonal (S.ratMiddle E) * m = 0) |
| 371 | {a : GL (Fin r) (𝔸f E)} (h_lift : HasLevelLifts c γ (finAdeleMatrix m * a.val)) |
| 372 | (c' : S.Classes) : |
| 373 | colLattice (Ô E) (finAdeleMatrix m.toRows₁.toRows₁ * a.val) ≤ S.termLattice c c' γ := by |
| 374 | let k : S.GFin := S.translateByClassReps c c' γ |
| 375 | let T : 𝔰.Form (𝔸f E) := S.latticeMiddle (𝔸f E) |
| 376 | let X := S.classCoordX₀ c * (finAdeleMatrix m.toRows₁.toRows₁ * a.val) |
| 377 | let Y := (frameMiddle (k : Matrix 𝔰.BesselIndex 𝔰.BesselIndex (𝔸f E)))ᴴ * T |
| 378 | obtain ⟨ρ, _, t, w, h_orth, hn_int, hn_level, h_eq⟩ := h_lift |
| 379 | set n : Matrix 𝔰.BesselIndex (Fin r) (𝔸f E) := S.classCoord c * finAdeleMatrix t * w |
| 380 | have hn_z : zRowBlockDiagonal T * linkMatrix k * n = |
| 381 | finAdeleMatrix (zRowBlockDiagonal (S.ratMiddle E)) * (finAdeleMatrix m * a.val) := by |
| 382 | rw [← h_eq] |
| 383 | exact zRowBlockDiagonal_mul_linkMatrix_mul_classCoord c c' γ t w |
| 384 | have hn_orth : (isotropicFramePair k)ᴴ * T.splitGram * n = 0 := |
| 385 | isotropicFramePair_mul_classCoord_eq_zero c c' h_orth w |
| 386 | have h_middle : n.toRows₂.toRows₁ = X := by |
| 387 | dsimp only [X] |
| 388 | apply toRows_classCoord_mul (γ := γ) |
| 389 | rw [h_eq] |
| 390 | exact toRows₁_mul_eq_fromRows_zero hm_forms a.val |
| 391 | have h_int : IsIntMatrix (Ô E) X := by |
| 392 | rw [← h_middle] |
| 393 | exact fun i ↦ hn_int (.inr (.inl i)) |
| 394 | -- `n` is orthogonal to both frames, so the products of its middle part with the frame of `γ` are |
| 395 | -- those of its part in `A`, up to sign, and this part is divisible by `M`. |
| 396 | have hn_forms : zRowBlockDiagonal T * linkMatrix k * n = 0 := by |
| 397 | rw [hn_z] |
| 398 | simp [← Matrix.mul_assoc, ← Matrix.map_mul, hm_forms] |
| 399 | have h_products : (isotropicRows (T.frameGram k))ᴴ * -n.toRows₁ = Y * n.toRows₂.toRows₁ := |
| 400 | isotropicRows_conjTranspose_mul_eq hn_orth hn_forms |
| 401 | refine le_inf (colLattice_le_preimageLattice_iff.mpr h_int) (colLattice_le fun i ↦ ?_) |
| 402 | change (Y * S.classCoordX₀ c) *ᵥ (finAdeleMatrix m.toRows₁.toRows₁ * a.val).col i ∈ |
| 403 | S.ideleM • colLattice (Ô E) (isotropicRows (T.frameGram k))ᴴ |
| 404 | rw [← Matrix.col_mul_eq_mulVec_col, Matrix.mul_assoc] |
| 405 | change (Y * X).col i ∈ S.ideleM • colLattice (Ô E) (isotropicRows (T.frameGram k))ᴴ |
| 406 | let u : Fin 𝔰.ϱ → 𝔸f E := -(S.ideleM⁻¹ • n.toRows₁.col i) |
| 407 | have hu_mem : (isotropicRows (T.frameGram k))ᴴ *ᵥ u ∈ colLattice (Ô E) |
| 408 | (isotropicRows (T.frameGram k))ᴴ := |
| 409 | ⟨u, fun b ↦ hn_level.neg b i, rfl⟩ |
| 410 | have h_col : S.ideleM • ((isotropicRows (T.frameGram k))ᴴ *ᵥ u) = |
| 411 | ((isotropicRows (T.frameGram k))ᴴ * -n.toRows₁).col i := by |
| 412 | rw [← mulVec_smul, smul_neg, smul_inv_smul] |
| 413 | rfl |
| 414 | rw [← h_middle, ← h_products, ← h_col] |
| 415 | exact smul_mem_pointwise_smul _ _ _ hu_mem |
| 416 | |
| 417 | /-- **The part in `X₀`.** Let `m` have a left inverse. Let its columns span a subspace of `link γ` |
| 418 | on which both `z`-forms vanish: `zRowBlockDiagonal (S.ratMiddle E) * m = 0`, the rows indexed by `z` |
| 419 | in each copy. Let `p = m.toRows₁.toRows₁` be the parts in `X₀`. Let the lattice with basis `m a` lie |
| 420 | in `L⁺_γ` (`HasLevelLifts`): it has integral lifts whose part in `A` is divisible by the level `M`. |
| 421 | Let `V` be the span of the columns of `p`. Let `L` be the intersection of `saturatedLattice` of `V` |
| 422 | with `L_γ = S.termLattice c c' γ`. Then `r = finrank E V`, and `L` is a lattice of rank `r`. Its |
| 423 | squared discriminant is at most `S.linkDiscSq m a`, the squared discriminant of `m a`, as `L` |
| 424 | contains the columns of `p a`. -/ |
| 425 | lemma HasLevelLifts.discriminant_sq_le {c : S.Classes} {γ : S.G E} {r : ℕ} |
| 426 | {m : Matrix (𝔰.MiddleIndex ⊕ 𝔰.MiddleIndex) (Fin r) E} (hm : HasLeftInv m) |
| 427 | (hm_link : colSpan m ≤ link γ) (hm_forms : zRowBlockDiagonal (S.ratMiddle E) * m = 0) |
| 428 | {a : GL (Fin r) (𝔸f E)} (h_lift : HasLevelLifts c γ (finAdeleMatrix m * a.val)) |
| 429 | (c' : S.Classes) : |
| 430 | let V : Submodule E (𝔰.κ → E) := colSpan m.toRows₁.toRows₁ |
| 431 | let L : Submodule (Ô E) (𝔰.κ → 𝔸f E) := |
| 432 | saturatedLattice (S.gram_classCoordX₀ c) V ⊓ S.termLattice c c' γ |
| 433 | r = finrank E V ∧ |
| 434 | IsLatticeOfRank (finrank E V) L ∧ |
| 435 | discriminant (finrank E V) L ^ 2 ≤ S.linkDiscSq m a := by |
| 436 | -- The projected columns of `m a` span a sublattice of the term lattice. Compare its |
| 437 | -- discriminant with that of the intersection `L` inside the saturated lattice of `V`. |
| 438 | intro V L |
| 439 | let p : Matrix 𝔰.κ (Fin r) E := m.toRows₁.toRows₁ |
| 440 | have h_gram : mᴴ * S.linkMetric * m = pᴴ * p := gram_linkMetric_eq_gram_toRows₁ hm_link hm_forms |
| 441 | have h_det : (pᴴ * p).det ≠ 0 := by |
| 442 | rw [← h_gram] |
| 443 | exact det_gram_linkMetric_ne_zero hm |
| 444 | have hp_inv : HasLeftInv p := ⟨(pᴴ * p)⁻¹ * pᴴ, by simp [h_det, Matrix.mul_assoc]⟩ |
| 445 | have h_rank : r = finrank E V := by simpa using hp_inv.card_eq_finrank_colSpan |
| 446 | have h_disc : S.linkDiscSq m a = |
| 447 | genIndex (finAdeleMatrix (pᴴ * p)).det * genIndex a.val.det ^ 2 := by |
| 448 | simp [← genIndex_algebraMap, RingHom.map_det, linkDiscSq, h_gram] |
| 449 | let k : S.GFin := S.translateByClassReps c c' γ |
| 450 | let T : 𝔰.Form (𝔸f E) := S.latticeMiddle (𝔸f E) |
| 451 | let Y : Matrix (Fin (𝔰.ϱ + 1)) 𝔰.MiddleIndex (𝔸f E) := |
| 452 | (frameMiddle (k : Matrix 𝔰.BesselIndex 𝔰.BesselIndex (𝔸f E)))ᴴ * T |
| 453 | have h_columns : colLattice (Ô E) (finAdeleMatrix p * a.val) ≤ S.termLattice c c' γ := |
| 454 | h_lift.colLattice_le_termLattice hm_forms c' |
| 455 | have h_int := colLattice_le_preimageLattice_iff.mp (h_columns.trans inf_le_left) |
| 456 | have h_mem (i : Fin r) : (Y * (S.classCoordX₀ c * (finAdeleMatrix p * a.val))).col i ∈ |
| 457 | S.ideleM • colLattice (Ô E) (isotropicRows (T.frameGram k))ᴴ := by |
| 458 | have h_col : (Y * S.classCoordX₀ c) *ᵥ (finAdeleMatrix p * a.val).col i ∈ |
| 459 | S.ideleM • colLattice (Ô E) (isotropicRows (T.frameGram k))ᴴ := |
| 460 | (h_columns (col_mem_colLattice i)).2 |
| 461 | rwa [← Matrix.col_mul_eq_mulVec_col, Matrix.mul_assoc] at h_col |
| 462 | -- `L` has finite index in the saturated lattice `Λ` of `V`. |
| 463 | let Λ : Submodule (Ô E) (𝔰.κ → 𝔸f E) := saturatedLattice (S.gram_classCoordX₀ c) V |
| 464 | have h_index : submoduleIndex L Λ = sublatticeIndex (S.gram_classCoordX₀ c) V Y |
| 465 | (S.ideleM • colLattice (Ô E) (isotropicRows (T.frameGram k))ᴴ) := by |
| 466 | rw [submoduleIndex_inf_of_le le_rfl, submoduleIndex_termLattice] |
| 467 | obtain ⟨h_le, -, h_finite⟩ : |
| 468 | (sublatticeDiscriminant (S.gram_classCoordX₀ c) V * submoduleIndex L Λ) ^ 2 ≤ S.linkDiscSq m a |
| 469 | ∧ |
| 470 | 0 < sublatticeDiscriminant (S.gram_classCoordX₀ c) V ∧ 1 ≤ submoduleIndex L Λ := by |
| 471 | rw [h_index, h_disc] |
| 472 | exact sublatticeDiscriminant_mul_index_sq_le (S.gram_classCoordX₀ c) V h_rank.symm le_rfl h_det |
| 473 | a |
| 474 | h_int Y h_mem |
| 475 | obtain ⟨h_lattice, h_disc_eq⟩ : IsLatticeOfRank (finrank E V) L ∧ |
| 476 | discriminant (finrank E V) L = discriminant (finrank E V) Λ * submoduleIndex L Λ := |
| 477 | (isLatticeOfRank_saturatedLattice _ V).of_le_and_discriminant_eq_mul_index inf_le_left |
| 478 | (Nat.one_le_iff_ne_zero.1 h_finite) |
| 479 | rw [h_disc_eq, discriminant_saturatedLattice] |
| 480 | exact ⟨h_rank, h_lattice, h_le⟩ |
| 481 | |
| 482 | variable (S) in |
| 483 | /-- A splitting of the link of `γ` along its intersection with the link of `γ'`, with a complement |
| 484 | of rank `i` and a lattice in it whose vectors have integral lifts modulo the intersection. The |
| 485 | discriminant of this lattice, times `x`, the torsion index of `γ` and the discriminant of |
| 486 | `S.commonPart`, the part of `L_γ` common to the two links, is at most the gauge |
| 487 | `𝗀* = S.levelGauge j c c' γ`. -/ |
| 488 | structure LinkSplitting (c c' : S.Classes) (j : Fin (𝔰.ϱ + 2)) (x : ℕ) (γ γ' : S.G E) (i : ℕ) where |
| 489 | /-- The index set of a family that spans the intersection of the links. -/ |
| 490 | CommonIndex : Type |
| 491 | /-- The index set `CommonIndex` is finite. -/ |
| 492 | [fintypeCommonIndex : Fintype CommonIndex] |
| 493 | /-- A family that spans the intersection of the links. -/ |
| 494 | commonCols : Matrix (𝔰.MiddleIndex ⊕ 𝔰.MiddleIndex) CommonIndex E |
| 495 | /-- A basis of a complement of the intersection in the link of `γ`. -/ |
| 496 | complCols : Matrix (𝔰.MiddleIndex ⊕ 𝔰.MiddleIndex) (Fin i) E |
| 497 | /-- The lattice in the complement has the basis `complCols * complLattice`. -/ |
| 498 | complLattice : GL (Fin i) (𝔸f E) |
| 499 | /-- The coefficients of the vectors of the intersection that are added to the basis vectors. -/ |
| 500 | complShear : Matrix CommonIndex (Fin i) (𝔸f E) |
| 501 | /-- The columns of `commonCols` span the intersection of the links. -/ |
| 502 | colSpan_common : colSpan commonCols = link γ ⊓ link γ' |
| 503 | /-- The complement lies in the link of `γ`. -/ |
| 504 | colSpan_compl_le : colSpan complCols ≤ link γ |
| 505 | /-- The columns of `complCols` are independent modulo the intersection. -/ |
| 506 | eq_zero_of_mulVec_mem : ∀ t : Fin i → E, complCols *ᵥ t ∈ link γ ⊓ link γ' → t = 0 |
| 507 | /-- The intersection and the complement span the link of `γ`. -/ |
| 508 | colSpan_fromCols : colSpan (fromCols commonCols complCols) = link γ |
| 509 | /-- The basis vectors, moved along the intersection by `complShear`, have integral lifts. -/ |
| 510 | hasIntegralLifts : |
| 511 | HasIntegralLifts c γ |
| 512 | (finAdeleMatrix commonCols * complShear + finAdeleMatrix complCols * complLattice.val) |
| 513 | /-- The part of `L_γ` common to the two links is a full lattice in `commonLink γ γ'`. -/ |
| 514 | isLatticeOfRank_commonPart : |
| 515 | IsLatticeOfRank (finrank E (commonLink γ γ')) (S.commonPart c c' γ γ') |
| 516 | /-- The bound by the gauge, squared. -/ |
| 517 | discriminant_sq_mul_le : |
| 518 | (S.torsionIndex (S.translateByClassReps c c' γ) * |
| 519 | discriminant (finrank E (commonLink γ γ')) (S.commonPart c c' γ γ') * x) ^ 2 * |
| 520 | S.linkDiscSq complCols complLattice ≤ S.levelGauge j c c' γ ^ 2 |
| 521 | |
| 522 | section |
| 523 | |
| 524 | omit [HasPrimitiveRoot5040 E] |
| 525 | |
| 526 | /-- Let `γ` have cell rank `j ≤ ϱ + 1` (`S.HasCellRank`). The dimension of the intersection of the |
| 527 | links of `γ` and `γ'` exceeds that of `commonLink γ γ'`, the vectors of `X₀` that both links send |
| 528 | to one vector of `X₀`, by at most `2`, and by at most `1` unless `j = ϱ + 1`. -/ |
| 529 | lemma HasCellRank.finrank_link_inf_le {γ : S.G E} {j : Fin (𝔰.ϱ + 2)} |
| 530 | (h_cell : S.HasCellRank j γ) (γ' : S.G E) : |
| 531 | finrank E ↥(link γ ⊓ link γ') ≤ finrank E (commonLink γ γ') + (1 + (j - 𝔰.ϱ)) := by |
| 532 | have h_linked : finrank E (linkedX₀ γ) + (j - 𝔰.ϱ) = 𝔰.k := h_cell.finrank_linkedX₀_add_sub |
| 533 | have h_corank : finrank E (linkedX₀ γ) + finrank E ↥(link γ ⊓ link γ') ≤ |
| 534 | finrank E (commonLink γ γ') + (𝔰.k + 1) := finrank_linkedX₀_add_finrank_inf_le γ γ' |
| 535 | omega |
| 536 | |
| 537 | /-- Let `γ` have the top cell rank `j = ϱ + 1`, and let the links of `γ` and `γ'` be equal, that is, |
| 538 | of corank `S.linkCorank γ γ' = 0`. Then the dimension of their intersection exceeds by `2` that of |
| 539 | `commonLink γ γ'`, the vectors of `X₀` that both links send to one vector of `X₀`. -/ |
| 540 | lemma HasCellRank.finrank_link_inf_eq_add_two {γ γ' : S.G E} {j : Fin (𝔰.ϱ + 2)} |
| 541 | (h_cell : S.HasCellRank j γ) (h_top : 𝔰.ϱ < j) (h_corank : S.linkCorank γ γ' = 0) : |
| 542 | finrank E ↥(link γ ⊓ link γ') = finrank E (commonLink γ γ') + 2 := by |
| 543 | have hj : j - 𝔰.ϱ = 1 := by omega |
| 544 | have h_linked : finrank E (linkedX₀ γ) + (j - 𝔰.ϱ) = 𝔰.k := h_cell.finrank_linkedX₀_add_sub |
| 545 | have h_common : finrank E (commonLink γ γ') ≤ finrank E (linkedX₀ γ) := |
| 546 | finrank_mono ((commonLink_le_linkedX₀_inf γ γ').trans inf_le_left) |
| 547 | have h_le : finrank E ↥(link γ ⊓ link γ') ≤ finrank E (commonLink γ γ') + (1 + (j - 𝔰.ϱ)) := |
| 548 | h_cell.finrank_link_inf_le γ' |
| 549 | rw [linkCorank] at h_corank |
| 550 | omega |
| 551 | |
| 552 | omit [CMType E] in |
| 553 | /-- Let `y` extend `x` to a basis of `L` by `r` columns in the kernel of `A` (`IsKernelExtension`). |
| 554 | Then the numbers of columns of `x` and `y` add up to the dimension of `L`. -/ |
| 555 | lemma IsKernelExtension.card_add_eq_finrank [Fintype τ] {P : Type} [Fintype P] [DecidableEq τ] |
| 556 | {A : Matrix τ P E} {x : Matrix P τ E} {L : Submodule E (P → E)} {r : ℕ} {y : Matrix P (Fin r) E} |
| 557 | (h_ext : IsKernelExtension A x L y) : Fintype.card τ + r = finrank E L := by |
| 558 | rw [← h_ext.colSpan_fromCols, ← h_ext.hasLeftInv.card_eq_finrank_colSpan, card_sum, |
| 559 | Fintype.card_fin] |
| 560 | |
| 561 | end |
| 562 | |
| 563 | /-- **The splitting.** Let `γ` be a term of cell rank `j` over the classes `c`, `c'` with reduction |
| 564 | `s`, where `s` is compatible with the unipotent character (`S.Agrees s`). Let `x` be a natural |
| 565 | number that is at most the norm `S.meetNorm s` of the product of the places with `S.MeetsAt s`, and |
| 566 | that is `1` unless `j = ϱ + 1` and the links of `γ` and `γ'` are equal. Then there is a |
| 567 | `LinkSplitting`, which consists of the following. Its `complCols` are a basis of a complement of the |
| 568 | intersection of the two links in the link of `γ`, of rank `S.linkCorank γ γ'`, the codimension of |
| 569 | the intersection. Its `complLattice` is a lattice in the complement whose basis vectors have |
| 570 | integral lifts modulo the intersection. The part `S.commonPart c c' γ γ'` of the lattice `L_γ` of |
| 571 | the term that is common to the two links is a full lattice in `commonLink γ γ'`. Finally |
| 572 | `(t * d * x) ^ 2 * D ≤ 𝗀* ^ 2`. Here `t` is the torsion index `S.torsionIndex` of the matrix of |
| 573 | `γ` in the bases of the lattices of `c` and `c'`, `d` is the discriminant of the common part, `D` is |
| 574 | the squared discriminant of the lattice in the complement, and the gauge |
| 575 | `𝗀* = S.levelGauge j c c' γ` is a power of the congruence level `M` times `S.minorGauge j c c' |
| 576 | γ / (S.N ^ f * S.minorNorm j γ)` times the larger of `S.termDiscNorm γ` and |
| 577 | `S.N ^ f * S.minorNorm j γ`, with `f` the number of infinite places. -/ |
| 578 | theorem nonempty_linkSplitting {c c' : S.Classes} {γ : S.G E} {j : Fin (𝔰.ϱ + 2)} {s : S.ResidueGL} |
| 579 | {x : ℕ} (hs : S.Agrees s) (h_term : γ ∈ S.termsOver c s c') |
| 580 | (h_cell : S.HasCellRank j γ) (γ' : S.G E) (hx : x ≤ S.meetNorm s) |
| 581 | (h_top : x ≠ 1 → 𝔰.ϱ < j) (h_corank : x ≠ 1 → S.linkCorank γ γ' = 0) : |
| 582 | Nonempty (S.LinkSplitting c c' j x γ γ' (S.linkCorank γ γ')) := by |
| 583 | -- Take a basis of `link γ` in three orthogonal parts: `m` spans the kernel of the two `z`-forms |
| 584 | -- in the intersection of the links, `m` and `u` span the intersection, and `y` completes them. |
| 585 | -- The discriminant of the lattice of the link is the product of those of three graded pieces. |
| 586 | obtain ⟨t, m, hm, hm_span⟩ : ∃ (t : ℕ) (m : Matrix (𝔰.MiddleIndex ⊕ 𝔰.MiddleIndex) (Fin t) E), |
| 587 | HasLeftInv m ∧ colSpan m = link γ ⊓ link γ' ⊓ |
| 588 | (zRowBlockDiagonal (S.ratMiddle E)).mulVecLin.ker := |
| 589 | ⟨_, exists_hasLeftInv_colSpan_eq _⟩ |
| 590 | have hm_link : colSpan m ≤ link γ := hm_span.trans_le (inf_le_left.trans inf_le_left) |
| 591 | have hm_forms : zRowBlockDiagonal (S.ratMiddle E) * m = 0 := |
| 592 | mul_eq_zero_of_colSpan_le_ker (hm_span.trans_le inf_le_right) |
| 593 | obtain ⟨r, u, hu⟩ : ∃ (r : ℕ) (u : Matrix (𝔰.MiddleIndex ⊕ 𝔰.MiddleIndex) (Fin r) E), |
| 594 | IsKernelExtension (mᴴ * S.linkMetric) m (link γ ⊓ link γ') u := |
| 595 | exists_isKernelExtension (det_gram_linkMetric_ne_zero hm) (hm_span.trans_le inf_le_left) |
| 596 | have hmu_span : colSpan (fromCols m u) = link γ ⊓ link γ' := hu.colSpan_fromCols |
| 597 | obtain ⟨i, y, hy⟩ : ∃ (i : ℕ) (y : Matrix (𝔰.MiddleIndex ⊕ 𝔰.MiddleIndex) (Fin i) E), |
| 598 | IsKernelExtension ((fromCols m u)ᴴ * S.linkMetric) (fromCols m u) (link γ) y := |
| 599 | exists_isKernelExtension (det_gram_linkMetric_ne_zero hu.hasLeftInv) |
| 600 | (hmu_span.trans_le inf_le_left) |
| 601 | set k : S.GFin := S.translateByClassReps c c' γ |
| 602 | obtain ⟨f, hf, hf_disc : S.torsionIndex k ^ 2 * S.linkDiscSq (fromCols (fromCols m u) y) f ≤ |
| 603 | (S.M ^ (2 * min 𝔰.ϱ j * numInfPlaces E) * S.minorGauge j c c' γ / |
| 604 | S.N ^ numInfPlaces E) ^ 2⟩ := |
| 605 | exists_hasLevelLifts_linkDiscSq_le h_term h_cell hy.hasLeftInv hy.colSpan_fromCols |
| 606 | obtain ⟨a₁, v, z, ha₁, hv, h_split₂ : S.linkDiscSq (fromCols m u) a₁ * S.linkDiscSq y v = |
| 607 | S.linkDiscSq (fromCols (fromCols m u) y) f⟩ := hf.exists_orthogonal_split hy.mul_eq_zero |
| 608 | obtain ⟨a, v₀, z₀, ha, hv₀, h_split₁ : S.linkDiscSq m a * S.linkDiscSq u v₀ = |
| 609 | S.linkDiscSq (fromCols m u) a₁⟩ := ha₁.exists_orthogonal_split hu.mul_eq_zero |
| 610 | -- The part `m` is compared with `S.commonPart`. |
| 611 | have h_common : colSpan m.toRows₁.toRows₁ = commonLink γ γ' := by |
| 612 | rw [commonLink, ← hm_span, ← LinearMap.range_comp] |
| 613 | rfl |
| 614 | obtain ⟨h_rank₀, h_lattice, hm_disc⟩ : t = finrank E (commonLink γ γ') ∧ |
| 615 | IsLatticeOfRank (finrank E (commonLink γ γ')) (S.commonPart c c' γ γ') ∧ |
| 616 | discriminant (finrank E (commonLink γ γ')) (S.commonPart c c' γ γ') ^ 2 ≤ |
| 617 | S.linkDiscSq m a := by |
| 618 | rw [commonPart, ← h_common] |
| 619 | exact ha.discriminant_sq_le hm hm_link hm_forms c' |
| 620 | have h_rank₁ : finrank E (commonLink γ γ') + r = finrank E ↥(link γ ⊓ link γ') := by |
| 621 | simpa [← h_rank₀] using hu.card_add_eq_finrank |
| 622 | have h_rank₂ : t + r + i = 𝔰.k + 1 := by simpa [finrank_link] using hy.card_add_eq_finrank |
| 623 | obtain rfl : i = S.linkCorank γ γ' := by |
| 624 | rw [linkCorank] |
| 625 | omega |
| 626 | -- The part `u` has rank `r ≤ 2`, and the two `z`-forms are injective on its span. |
| 627 | have hr_le : r ≤ 1 + (j - 𝔰.ϱ) := |
| 628 | Nat.le_of_add_le_add_left (h_rank₁.trans_le (h_cell.finrank_link_inf_le γ')) |
| 629 | have hr_eq (hx_ne : x ≠ 1) : r = 2 := Nat.add_left_cancel |
| 630 | (h_rank₁.trans (h_cell.finrank_link_inf_eq_add_two (h_top hx_ne) (h_corank hx_ne))) |
| 631 | have hu_inv : HasLeftInv (zRowBlockDiagonal (S.ratMiddle E) * u) := .of_ker_le_bot fun w hw ↦ |
| 632 | hu.eq_zero_of_mulVec_mem w (hm_span.ge ⟨hu.colSpan_le ⟨w, rfl⟩, by simpa using hw⟩) |
| 633 | set G : ℝ := S.termDiscNorm γ ⊔ S.N ^ numInfPlaces E * S.minorNorm j γ |
| 634 | have hu_forms : finAdeleMatrix (zRowBlockDiagonal (S.ratMiddle E)) * |
| 635 | (finAdeleMatrix m * z₀ + finAdeleMatrix u * v₀.val) = |
| 636 | finAdeleMatrix (zRowBlockDiagonal (S.ratMiddle E) * u) * v₀.val := by |
| 637 | simp [← Matrix.mul_assoc, ← Matrix.map_mul, hm_forms, Matrix.mul_add] |
| 638 | have hu_disc : x ^ 2 * S.minorNorm j γ ^ 2 ≤ S.linkDiscSq u v₀ * G ^ 2 := |
| 639 | minorNorm_sq_le_linkDiscSq_mul hs h_term h_cell hx hr_le hr_eq |
| 640 | (hu.colSpan_le.trans inf_le_left) hu_inv v₀ hv₀.hasIntegralLifts hu_forms |
| 641 | refine ⟨{ |
| 642 | CommonIndex := Fin t ⊕ Fin r |
| 643 | commonCols := fromCols m u |
| 644 | complCols := y |
| 645 | complLattice := v |
| 646 | complShear := z |
| 647 | colSpan_common := hmu_span |
| 648 | colSpan_compl_le := hy.colSpan_le |
| 649 | eq_zero_of_mulVec_mem := fun w hw ↦ hy.eq_zero_of_mulVec_mem w (hmu_span.ge hw) |
| 650 | colSpan_fromCols := hy.colSpan_fromCols |
| 651 | hasIntegralLifts := hv.hasIntegralLifts |
| 652 | isLatticeOfRank_commonPart := h_lattice |
| 653 | discriminant_sq_mul_le := le_of_mul_le_mul_right ?_ (pow_pos h_cell.minorNorm_pos 2) }⟩ |
| 654 | have hN : (S.N : ℝ) ≠ 0 := Nat.cast_ne_zero.2 S.N_prime.ne_zero |
| 655 | calc (S.torsionIndex k * |
| 656 | discriminant (finrank E (commonLink γ γ')) (S.commonPart c c' γ γ') * x) ^ 2 * |
| 657 | S.linkDiscSq y v * S.minorNorm j γ ^ 2 |
| 658 | _ = discriminant (finrank E (commonLink γ γ')) (S.commonPart c c' γ γ') ^ 2 * |
| 659 | S.torsionIndex k ^ 2 * S.linkDiscSq y v * (x ^ 2 * S.minorNorm j γ ^ 2) := by ring |
| 660 | _ ≤ S.linkDiscSq m a * S.torsionIndex k ^ 2 * S.linkDiscSq y v * |
| 661 | (S.linkDiscSq u v₀ * G ^ 2) := by |
| 662 | have hm_nonneg : 0 ≤ S.linkDiscSq m a := (sq_nonneg _).trans hm_disc |
| 663 | have hy_nonneg : 0 ≤ S.linkDiscSq y v := mul_nonneg (abs_nonneg _) (sq_nonneg _) |
| 664 | gcongr |
| 665 | _ = S.torsionIndex k ^ 2 * S.linkDiscSq ((m.fromCols u).fromCols y) f * G ^ 2 := by |
| 666 | rw [← h_split₂, ← h_split₁] |
| 667 | ring |
| 668 | _ ≤ (S.M ^ (2 * min 𝔰.ϱ j * numInfPlaces E) * S.minorGauge j c c' γ / |
| 669 | S.N ^ numInfPlaces E) ^ 2 * G ^ 2 := by gcongr |
| 670 | _ = S.levelGauge j c c' γ ^ 2 * S.minorNorm j γ ^ 2 := by |
| 671 | simp only [levelGauge, h_cell.maxGauge_eq, h_cell.minorGauge_eq, G] |
| 672 | field_simp |
| 673 | |
| 674 | omit [HasPrimitiveRoot5040 E] in |
| 675 | /-- Let `γ` and `γ'` be terms over the classes `c`, `c'` with the same reduction `s` modulo the |
| 676 | level `M = S.M`. Let `w` and `w'` have integral lifts (`HasIntegralLifts`): their columns are the |
| 677 | images, in the links of `γ` and `γ'`, of vectors of the lattice of `c`. Then the products of the |
| 678 | columns of `w` with those of `w'` for the form `S.linkForm / M` are integral adeles. Here |
| 679 | `S.linkForm = diag(T, -T)` on two copies of `X₀ ⊕ E z`, of Gram matrix `T`. -/ |
| 680 | lemma HasIntegralLifts.isIntMatrix_linkForm {c c' : S.Classes} {s : S.ResidueGL} {γ γ' : S.G E} |
| 681 | {σ : Type} {w : Matrix (𝔰.MiddleIndex ⊕ 𝔰.MiddleIndex) τ (𝔸f E)} |
| 682 | {w' : Matrix (𝔰.MiddleIndex ⊕ 𝔰.MiddleIndex) σ (𝔸f E)} (h_lift : HasIntegralLifts c γ w) |
| 683 | (hγ : γ ∈ S.termsOver c s c') (hγ' : γ' ∈ S.termsOver c s c') |
| 684 | (h_lift' : HasIntegralLifts c γ' w') : |
| 685 | IsIntMatrix (Ô E) (wᴴ * finAdeleMatrix ((S.M⁻¹ : E) • S.linkForm) * w') := by |
| 686 | -- The matrix `k` of `δ = γ γ'⁻¹` in the basis of the lattice is congruent to `1` modulo `M`. The |
| 687 | -- pairing is `-nᴴ J (k - 1) n' / M` for the integral lifts `n`, `n'` of `w`, `w'` and the Gram |
| 688 | -- matrix `J` of the lattice. |
| 689 | classical |
| 690 | obtain ⟨ρ, _, t, u, ht_orth, hn_int, rfl⟩ := h_lift |
| 691 | obtain ⟨ρ', _, t', u', ht'_orth, hn'_int, rfl⟩ := h_lift' |
| 692 | set n : Matrix 𝔰.BesselIndex τ (𝔸f E) := S.classCoord c * finAdeleMatrix t * u with hn |
| 693 | set n' : Matrix 𝔰.BesselIndex σ (𝔸f E) := S.classCoord c * finAdeleMatrix t' * u' with hn' |
| 694 | let δ : Matrix 𝔰.BesselIndex 𝔰.BesselIndex E := (γ * γ'⁻¹ : S.G E) |
| 695 | let k : Matrix 𝔰.BesselIndex 𝔰.BesselIndex (𝔸f E) := S.translateByClassReps c c (γ * γ'⁻¹) |
| 696 | let J : Matrix 𝔰.BesselIndex 𝔰.BesselIndex (𝔸f E) := (S.latticeMiddle (𝔸f E)).splitGram |
| 697 | have hJ_int : IsIntMatrix (Ô E) J := S.isUnimodular_latticeMiddle.splitGram.isIntMatrix |
| 698 | have hk_congr : IsIntMatrix (Ô E) (S.ideleM⁻¹ • (k - 1)) := by |
| 699 | have h_one : γ * γ'⁻¹ ∈ S.termsOver c 1 c := by simpa using termsOver.mul hγ (termsOver.inv hγ') |
| 700 | have h_level : S.translateByClassReps c c (γ * γ'⁻¹) ∈ unitaryLevel (Ô E) S.ideleM J := |
| 701 | S.principalLevel_eq_unitaryLevel.le h_one |
| 702 | exact h_level.right |
| 703 | -- The pairing of the rational vectors, over `E`. |
| 704 | have h_rat : (linkMatrix γ * t)ᴴ * ((S.M⁻¹ : E) • S.linkForm) * (linkMatrix γ' * t') = |
| 705 | (S.M⁻¹ : E) • (tᴴ * S.ratGram * t') - (S.M⁻¹ : E) • (tᴴ * S.ratGram * (δ * t')) := by |
| 706 | simpa [δ, fromBlocks_smul] using gram_linkMatrix_mul ht_orth ht'_orth (S.M⁻¹ : E) (S.M⁻¹ : E) |
| 707 | -- `S.classCoord c` carries `S.ratGram` to `J` and conjugates `δ` to `k`. |
| 708 | have h_gram (y : Matrix 𝔰.BesselIndex ρ' E) : |
| 709 | uᴴ * finAdeleMatrix (tᴴ * S.ratGram * y) * u' = |
| 710 | nᴴ * J * (S.classCoord c * finAdeleMatrix y * u') := by |
| 711 | rw [← classCoord_gram c, hn] |
| 712 | simp only [J, conjTranspose_mul, Matrix.mul_assoc] |
| 713 | have h_conj : S.classCoord c * finAdeleMatrix δ = k * S.classCoord c := by |
| 714 | have hk_eq : k = S.classCoord c * finAdeleMatrix δ * (classBasis c).val := |
| 715 | congrArg Units.val (coe_translateByClassReps c c (γ * γ'⁻¹)) |
| 716 | rw [hk_eq, classCoord, Matrix.mul_assoc, Units.mul_inv, Matrix.mul_one] |
| 717 | have h_move : S.classCoord c * finAdeleMatrix (δ * t') * u' = k * n' := by |
| 718 | rw [finAdeleMatrix, Matrix.map_mul, ← Matrix.mul_assoc, h_conj, hn'] |
| 719 | simp only [Matrix.mul_assoc] |
| 720 | have hM_inv : ((S.M⁻¹ : E) : 𝔸f E) = S.ideleM⁻¹.val := by simp [ideleM] |
| 721 | have h_pairing : |
| 722 | (finAdeleMatrix (linkMatrix γ * t) * u)ᴴ * finAdeleMatrix ((S.M⁻¹ : E) • S.linkForm) * |
| 723 | (finAdeleMatrix (linkMatrix γ' * t') * u') = |
| 724 | -(nᴴ * J * (S.ideleM⁻¹ • (k - 1) * n')) := |
| 725 | calc (finAdeleMatrix (linkMatrix γ * t) * u)ᴴ * finAdeleMatrix ((S.M⁻¹ : E) • S.linkForm) * |
| 726 | (finAdeleMatrix (linkMatrix γ' * t') * u') |
| 727 | _ = uᴴ * finAdeleMatrix |
| 728 | ((linkMatrix γ * t)ᴴ * ((S.M⁻¹ : E) • S.linkForm) * (linkMatrix γ' * t')) * u' := by |
| 729 | simp only [conjTranspose_mul, Matrix.map_mul, finAdeleMatrix_conjTranspose, |
| 730 | Matrix.mul_assoc] |
| 731 | _ = S.ideleM⁻¹.val • (uᴴ * finAdeleMatrix (tᴴ * S.ratGram * t') * u') - |
| 732 | S.ideleM⁻¹.val • (uᴴ * finAdeleMatrix (tᴴ * S.ratGram * (δ * t')) * u') := by |
| 733 | rw [h_rat, ← hM_inv] |
| 734 | simp [Matrix.map_sub, Matrix.mul_sub, Matrix.sub_mul] |
| 735 | _ = S.ideleM⁻¹.val • (nᴴ * J * n') - S.ideleM⁻¹.val • (nᴴ * J * (k * n')) := by |
| 736 | rw [h_gram t', h_gram (δ * t'), h_move] |
| 737 | _ = -(nᴴ * J * (S.ideleM⁻¹ • (k - 1) * n')) := by |
| 738 | simp [Units.smul_def, smul_sub, Matrix.mul_sub, Matrix.sub_mul] |
| 739 | rw [h_pairing] |
| 740 | exact ((hn_int.conjTranspose.mul hJ_int).mul (hk_congr.mul hn'_int)).neg |
| 741 | |
| 742 | end New.Filling |