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.Algebra.Ring.IsFormallyReal |
| 6 | import Mathlib.LinearAlgebra.Matrix.AbsoluteValue |
| 7 | public import New.Spanning.RemainingTerms.Box |
| 8 | public import New.Spanning.RemainingTerms.SiegelLemma |
| 9 | public import New.Spanning.Unfolding.BesselLevelStructure |
| 10 | import Lib.SiegelWeil.Mass |
| 11 | |
| 12 | /-! |
| 13 | # Near terms in the filling theorem: frames, cell ranks, nearness and integrality |
| 14 | |
| 15 | The terms `γ` of the count in the filling theorem are rational elements of the unitary group. |
| 16 | The data are `S : New.Filling E 𝔰` for a shape `𝔰`, with the size hypotheses |
| 17 | `New.Filling.IsAdmissible`, which compare all constants with powers of the large parameter `b`. |
| 18 | For the frame `(e₁, …, e_ϱ, z)`, `New.frameImage γ` is the matrix of its image under `γ`, and |
| 19 | `S.frameProducts γ` is the Gram matrix of the frame against its image, with leading minors |
| 20 | `New.leadingMinor`. This file describes how the flags of the frame and of its image under `γ` meet, |
| 21 | defines the cell rank and nearness of `γ`, proves a norm identity for `S.termDisc γ`, bounds the |
| 22 | Gram entries of near terms by powers of `S.b`, and shows that the Gram entries of terms are |
| 23 | algebraic integers. |
| 24 | |
| 25 | ## Main definitions and results |
| 26 | |
| 27 | * `New.Filling.CharsAgree`, `New.PairOccursAt`, `New.Filling.HasCellRank`: the terms that respect |
| 28 | the unipotent character, the vectors common to the two flags of a term, and its cell rank. |
| 29 | * `New.Filling.IsNear`: `γ` is near if some boxed point `y` (`New.Filling.boxedPoints`) has `γ⁻¹ y` |
| 30 | boxed. |
| 31 | * `New.Filling.mul_dotProduct_comp_indexX₀_eq_sub` gives the norm identity over `E`. |
| 32 | `New.Filling.map_termDisc_eq_norm` uses its sum of squares at an infinite place to show |
| 33 | `S.termDisc γ` is real and nonnegative there. It is totally positive or zero |
| 34 | (`New.Filling.termDisc_pos_or_eq_zero`). |
| 35 | * `New.Filling.IsNear.norm_frameProducts_le`, `New.Filling.IsNear.norm_map_leadingMinor_sq_le`: for |
| 36 | a near term, the Gram entries and the leading minors are bounded by powers of the size parameter |
| 37 | `S.b`. |
| 38 | |
| 39 | Notions from other files: |
| 40 | * `New.Filling.G`: for a commutative ring R with involution, the unitary group over R of ϱ |
| 41 | hyperbolic pairs and the middle Gram matrix diag(1, …, 1, −N) on X₀ ⊕ Ez, in the basis e₁, …, e_ϱ; |
| 42 | x_i (i in κ), z; e*₁, …, e*_ϱ. |
| 43 | * `New.Filling.termDisc`: 𝗀(γ) = |D_{ϱ+1}|² − N²|D_ϱ|², with D_l the leading minors of |
| 44 | `New.Filling.frameProducts γ`. |
| 45 | * `New.Shape.Form.besselU`, `New.Shape.Form.besselU0`: the Bessel unipotent group 𝖴 of isometries |
| 46 | that are block upper unitriangular and trivial on the middle block, and its elements that fix each |
| 47 | vector of the frame. |
| 48 | * `New.Filling.mainSecondMoment`, `New.Filling.identitySecondMoment`: the numbers |
| 49 | sourceDim² / (besselDegree · mass), with the mass of the genus of the standard lattice, and |
| 50 | sourceDim times the order of the reduced image of the Bessel subgroup `besselS`. |
| 51 | -/ |
| 52 | |
| 53 | @[expose] public section |
| 54 | |
| 55 | noncomputable section |
| 56 | |
| 57 | section FlagsAndCellRanks |
| 58 | |
| 59 | open NumberField Matrix Fintype |
| 60 | |
| 61 | namespace New |
| 62 | |
| 63 | variable {R : Type*} {E : Type} [CommRing R] [Field E] [CMType E] {𝔰 : Shape} (S : Filling E 𝔰) |
| 64 | [StarRing R] {T : 𝔰.Form R} |
| 65 | |
| 66 | /-- For a square matrix T on the middle coordinates, the two-row block diagonal matrix with two |
| 67 | copies of the row of T indexed by z. -/ |
| 68 | abbrev Filling.zRowBlockDiagonal (T : 𝔰.Form R) : |
| 69 | Matrix (Unit ⊕ Unit) (𝔰.MiddleIndex ⊕ 𝔰.MiddleIndex) R := |
| 70 | T.toRows₂.fromBlocks 0 0 T.toRows₂ |
| 71 | /-- The module of the vectors x of X₀ for which there is a pair of middle vectors, both orthogonal |
| 72 | to z, that lies in the links (`New.link`) of both γ and γ' and whose first vector has |
| 73 | X₀-coordinates x. -/ |
| 74 | def commonLink (γ γ' : T.G) : Submodule R (𝔰.κ → R) := |
| 75 | (link γ ⊓ link γ' ⊓ (Filling.zRowBlockDiagonal T).mulVecLin.ker).map |
| 76 | (LinearMap.funLeft R R (Sum.inl ∘ .inl)) |
| 77 | |
| 78 | /-- The frame f = (e₁, …, e_ϱ, z) and its image γf satisfy fx = γfy for some coefficient vectors |
| 79 | x, y that vanish at indices above a and have x_a = c, y_a = c'. -/ |
| 80 | def PairOccursAt (γ : T.G) (c c' : R) (a : Fin (𝔰.ϱ + 1)) : Prop := |
| 81 | ∃ x y : Fin (𝔰.ϱ + 1) → R, |
| 82 | frameImage (1 : Matrix 𝔰.BesselIndex 𝔰.BesselIndex R) *ᵥ x = frameImage γ.val.val *ᵥ y ∧ |
| 83 | x a = c ∧ y a = c' ∧ ∀ b : Fin (𝔰.ϱ + 1), b > a → x b = 0 ∧ y b = 0 |
| 84 | |
| 85 | /-- For some c with c c̄ = 1 and every index a ≥ j (counted from 0), the flags of f and γf share a |
| 86 | vector with leading coefficients c and 1 at a. -/ |
| 87 | def NormOnePairOccursFrom (j : ℕ) (γ : T.G) : Prop := |
| 88 | ∃ c : R, c * star c = 1 ∧ ∀ a : Fin (𝔰.ϱ + 1), j ≤ a.val → PairOccursAt γ c 1 a |
| 89 | |
| 90 | namespace Filling |
| 91 | |
| 92 | /-! ### Forms, coordinates, cell ranks and nearness -/ |
| 93 | |
| 94 | /-- The Gram matrix over E of the form on the space: two dual isotropic blocks of rank ϱ around the |
| 95 | middle Gram matrix `S.ratMiddle E` of X₀⊕Ez. -/ |
| 96 | abbrev ratGram : Matrix 𝔰.BesselIndex 𝔰.BesselIndex E := (S.ratMiddle E).splitGram |
| 97 | |
| 98 | /-- The block diagonal matrix diag(M, −M) over E on two copies of X₀⊕Ez, M = `S.ratMiddle E`. -/ |
| 99 | abbrev linkForm : Matrix (𝔰.MiddleIndex ⊕ 𝔰.MiddleIndex) (𝔰.MiddleIndex ⊕ 𝔰.MiddleIndex) E := |
| 100 | (S.ratMiddle E).fromBlocks 0 0 (-S.ratMiddle E) |
| 101 | |
| 102 | /-- For a class c, the inverse of the matrix `New.Filling.classBasis` c; it takes rational |
| 103 | coordinates to coordinates in the basis of the lattice h_cΛ₀. -/ |
| 104 | def classCoord (c : S.Classes) : |
| 105 | Matrix (Fin 𝔰.ϱ ⊕ 𝔰.MiddleIndex ⊕ Fin 𝔰.ϱ) (Fin 𝔰.ϱ ⊕ 𝔰.MiddleIndex ⊕ Fin 𝔰.ϱ) (𝔸f E) := |
| 106 | (S.classBasis c)⁻¹.val |
| 107 | |
| 108 | /-- The matrix whose columns are the standard basis vectors of X₀, written in the basis of the |
| 109 | middle part of the lattice h_cΛ₀ of the class c. It is `New.middleInclusionMatrix` times the inverse |
| 110 | of the chosen representative `c.out` of c in U(X₀)(𝔸_f), whose image in the unitary group of V is |
| 111 | h_c = `S.classRep c`. It depends on this choice of representative. -/ |
| 112 | def classCoordX₀ (c : S.Classes) : Matrix (𝔰.κ ⊕ Unit) 𝔰.κ (𝔸f E) := |
| 113 | middleInclusionMatrix 𝔰 S.piN * ((c.out⁻¹ : Gf E 𝔰.κ) : Matrix 𝔰.κ 𝔰.κ (𝔸f E)) |
| 114 | |
| 115 | /-- The number `n_p = #R̄₀ n_X N ^ (-k f)` against which pairs of terms are counted: here `R̄₀` is |
| 116 | the reduced image of the Bessel subgroup `besselS`, `n_X` the number of classes and `f` the number |
| 117 | of infinite places. -/ |
| 118 | abbrev pairCountScale : ℝ := |
| 119 | Nat.card (S.reducedImage besselS) * card S.Classes / S.N ^ (𝔰.k * numInfPlaces E) |
| 120 | |
| 121 | /-- γ has cell rank j ≤ ϱ+1: `New.NormOnePairOccursFrom` j holds, the leading minor D_j of |
| 122 | `S.frameProducts γ` is nonzero, and `S.termDisc γ` is nonzero exactly when j = ϱ+1. -/ |
| 123 | @[mk_iff] |
| 124 | structure HasCellRank (j : Fin (𝔰.ϱ + 1 + 1)) (γ : S.G E) : Prop where |
| 125 | /-- For some c with c c̄ = 1 and every index a ≥ j, the flags of the frame f and of γf share a |
| 126 | vector with leading coefficients c and 1 at a. -/ |
| 127 | normOnePairOccursFrom : NormOnePairOccursFrom j.val γ |
| 128 | /-- The leading minor D_j of the products of the two frames is nonzero. -/ |
| 129 | leadingMinor_ne_zero : leadingMinor (S.frameProducts γ) j ≠ 0 |
| 130 | /-- The cell rank is the top one, ϱ+1, exactly when `S.termDisc γ` is nonzero. -/ |
| 131 | lt_iff_termDisc_ne_zero : 𝔰.ϱ < j.val ↔ S.termDisc γ ≠ 0 |
| 132 | |
| 133 | /-- The product over the infinite places v of E of the complex absolute values of the images under |
| 134 | the embeddings `Φ v` of `S.termDisc γ` = |D_{ϱ+1}|² − N²|D_ϱ|², where D_l is the leading minor of |
| 135 | order l of `S.frameProducts γ`. -/ |
| 136 | def termDiscNorm (γ : S.G E) : ℝ := ∏ v : InfinitePlace E, ‖Φ v (S.termDisc γ)‖ |
| 137 | |
| 138 | /-- The rational element γ is near: there is an archimedean point y such that both y and γ⁻¹y |
| 139 | lie in the set `New.Filling.boxedPoints` of boxed points. -/ |
| 140 | def IsNear (γ : S.G E) : Prop := |
| 141 | ∃ y ∈ S.boxedPoints, (S.ratToInf γ)⁻¹ * y ∈ S.boxedPoints |
| 142 | |
| 143 | /-- The finite character `New.Filling.unipotentChar` takes the same value at u and at γ⁻¹uγ for |
| 144 | every rational u in 𝖴 ∩ γ𝖴γ⁻¹. -/ |
| 145 | def CharsAgree (γ : S.G E) : Prop := |
| 146 | ∀ u ∈ besselU, ∀ u' ∈ besselU, u * γ = γ * u' → |
| 147 | S.unipotentChar (S.ratToFin u) = S.unipotentChar (S.ratToFin u') |
| 148 | |
| 149 | end Filling |
| 150 | |
| 151 | end New |
| 152 | |
| 153 | end FlagsAndCellRanks |
| 154 | |
| 155 | namespace New.Filling |
| 156 | |
| 157 | open Subgroup Real NumberField Matrix Finset ComplexOrder Complex Fin Floors FloorGroups Nat |
| 158 | |
| 159 | variable {R : Type} [CommRing R] [StarRing R] {𝔰 : Shape} {T : 𝔰.Form R} {s s' : T.G} |
| 160 | {E : Type} [Field E] [CMType E] {S : Filling E 𝔰} {γ u : S.G E} {c c' : S.Classes} |
| 161 | {r : S.ResidueGL} {x y : Fin (𝔰.ϱ + 1) → E} |
| 162 | |
| 163 | /-! ### Frames and the Bessel subgroup -/ |
| 164 | |
| 165 | /-- The frame columns of a product s s' are s times those of s'. -/ |
| 166 | lemma frameImage_mul : frameImage (s * s').val.val = s.val.val * frameImage s'.val.val := rfl |
| 167 | |
| 168 | /-- Multiplying γ on the right by an element u of `New.Shape.Form.besselU0`, which fixes the frame |
| 169 | (e₁, …, e_ϱ, z), does not change the image of the frame. -/ |
| 170 | lemma frameImage_mul_of_mem_besselU0 (hu : u ∈ besselU0) : |
| 171 | frameImage (γ * u).val.val = frameImage γ.val.val := by |
| 172 | obtain ⟨hu_bessel, hu_frame⟩ := mem_besselU0_iff.1 hu |
| 173 | simp [submatrix_mul_besselFrame hu_bessel, hu_frame] |
| 174 | |
| 175 | /-- The isometry s⁻¹s' fixes the frame (e₁, …, e_ϱ, z) if and only if s and s' map the frame to |
| 176 | the same vectors. -/ |
| 177 | lemma frameImage_inv_mul_eq_iff : |
| 178 | frameImage (s⁻¹ * s').val.val = frameImage (1 : Matrix 𝔰.BesselIndex 𝔰.BesselIndex R) ↔ |
| 179 | frameImage s.val.val = frameImage s'.val.val := by |
| 180 | -- cancel the invertible matrix `s⁻¹` on the left |
| 181 | refine Iff.trans ?_ s⁻¹.val.val.mul_right_inj_of_invertible |
| 182 | rw [← frameImage_mul, ← frameImage_mul, inv_mul_cancel, eq_comm] |
| 183 | rfl |
| 184 | |
| 185 | /-- A unitary γ preserves the form on combinations of frame vectors: γf · y has the same product |
| 186 | with itself as f · y. -/ |
| 187 | lemma form_frameImage_mulVec (γ : S.G E) (y : Fin (𝔰.ϱ + 1) → E) : |
| 188 | star (frameImage γ.val.val *ᵥ y) ⬝ᵥ (S.ratMiddle E).splitGram *ᵥ frameImage γ.val.val *ᵥ y = |
| 189 | star (frameImage 1 *ᵥ y) ⬝ᵥ (S.ratMiddle E).splitGram *ᵥ frameImage 1 *ᵥ y := by |
| 190 | rw [frameImage_mulVec γ.val.val, U.form_mulVec_mulVec γ] |
| 191 | |
| 192 | /-! ### Vectors shared by two frames and the norm identity -/ |
| 193 | |
| 194 | /-- Pairing the standard frame `e₁, …, e_ϱ, z` with a vector `v` reads off its coordinates |
| 195 | at the dual vectors `e*_a`, followed by its coordinate at `z` multiplied by `-N`. -/ |
| 196 | lemma frameImage_one_conjTranspose_mulVec_ratGram (v : 𝔰.BesselIndex → E) : |
| 197 | (frameImage (1 : Matrix 𝔰.BesselIndex 𝔰.BesselIndex E))ᴴ *ᵥ S.ratGram *ᵥ v = |
| 198 | Fin.snoc (fun a : Fin 𝔰.ϱ ↦ v (eStar a)) (-(S.N * v 𝔰.z)) := by |
| 199 | ext i |
| 200 | refine Fin.lastCases ?_ (fun a ↦ ?_) i |
| 201 | · simp [ratGram, Shape.middleGram, Shape.Form.splitGram, mulVec, dotProduct, Matrix.one_apply] |
| 202 | · simp [ratGram, Shape.Form.splitGram, mulVec, dotProduct, Matrix.one_apply, apply_ite star] |
| 203 | |
| 204 | /-- For the coefficients `x` of a combination of the frame `e_1, …, e_ϱ, z_N`, the product, for the |
| 205 | form `S.ratGram`, of this combination with `y` is the sum of `x̄_a y(e*_a)` over `a ≤ ϱ` minus |
| 206 | `N x̄_z y(z)`, where `x_z` is the last coefficient and `y(·)` are coordinates of `y`. -/ |
| 207 | lemma form_frameImage_one {E : Type} [Field E] [CMType E] {𝔰 : Shape} {S : Filling E 𝔰} |
| 208 | (x : Fin (𝔰.ϱ + 1) → E) (y : 𝔰.BesselIndex → E) : |
| 209 | star (frameImage 1 *ᵥ x) ⬝ᵥ S.ratGram *ᵥ y = |
| 210 | ∑ a : Fin 𝔰.ϱ, star (x a.castSucc) * y (eStar a) - S.N * (star (x 𝔰.top) * y 𝔰.z) := by |
| 211 | rw [star_mulVec, ← dotProduct_mulVec, S.frameImage_one_conjTranspose_mulVec_ratGram] |
| 212 | simp [dotProduct, sum_univ_castSucc, sub_eq_add_neg, mul_left_comm] |
| 213 | |
| 214 | /-- The Gram matrix of the frame sends the coefficients of a translated frame vector |
| 215 | to its pairings with the standard frame. -/ |
| 216 | private lemma frameProducts_mulVec : |
| 217 | let v := frameImage γ.val.val *ᵥ y |
| 218 | S.frameProducts γ *ᵥ y = snoc (v ∘ eStar) (-(S.N * v 𝔰.z)) := by |
| 219 | rw [frameProducts, frameGram_eq_frameImage, ← mulVec_mulVec, ← mulVec_mulVec] |
| 220 | exact S.frameImage_one_conjTranspose_mulVec_ratGram _ |
| 221 | |
| 222 | /-- If `f · x = γ f · y`, then the `z`-coefficients of `x` and `y` have the same norm. -/ |
| 223 | lemma star_mul_last_eq_of_frameImage_eq |
| 224 | (hxy : frameImage (1 : Matrix 𝔰.BesselIndex 𝔰.BesselIndex E) *ᵥ x = |
| 225 | frameImage γ.val.val *ᵥ y) : |
| 226 | star (x 𝔰.top) * x 𝔰.top = star (y 𝔰.top) * y 𝔰.top := by |
| 227 | have h_norm := form_frameImage_mulVec γ y |
| 228 | rw [← hxy, form_frameImage_one, form_frameImage_one] at h_norm |
| 229 | simpa [frameImage_one_mulVec, S.N_prime.ne_zero] using h_norm |
| 230 | |
| 231 | /-- If `γ f · y = f · x`, then its products with the frame vanish except the one with `z`, which |
| 232 | is `-N` times the `z`-coefficient of `x`. -/ |
| 233 | lemma frameProducts_mulVec_of_frameImage_eq |
| 234 | (hxy : frameImage (1 : Matrix 𝔰.BesselIndex 𝔰.BesselIndex E) *ᵥ x = |
| 235 | frameImage γ.val.val *ᵥ y) : |
| 236 | S.frameProducts γ *ᵥ y = Pi.single 𝔰.top (-S.N * x 𝔰.top) := by |
| 237 | rw [frameProducts_mulVec, ← hxy, frameImage_one_mulVec] |
| 238 | funext i |
| 239 | refine Fin.lastCases ?_ (fun a ↦ ?_) i <;> simp [castSucc_ne_last] |
| 240 | |
| 241 | /-- The middle form is anisotropic on the vectors without `z`-coordinate. -/ |
| 242 | lemma eq_zero_of_ratMiddle_form_eq_zero (w : 𝔰.MiddleIndex → E) (hw : w (Sum.inr ()) = 0) |
| 243 | (h_norm : star w ⬝ᵥ S.ratMiddle E *ᵥ w = 0) : |
| 244 | w = 0 := by |
| 245 | let v₀ : InfinitePlace E := Classical.ofNonempty |
| 246 | -- at an infinite place the form is the sum of the squared absolute values on `X₀` |
| 247 | have h_sum : ∑ i : 𝔰.κ, ‖Φ v₀ (w (Sum.inl i))‖ ^ 2 = 0 := by |
| 248 | simpa [middleGram, hw, conj_mul', dotProduct, mulVec, Matrix.one_apply, ← ofReal_inj] |
| 249 | using congrArg (Φ v₀) h_norm |
| 250 | simpa [hw, funext_iff, sum_eq_zero_iff_of_nonneg] using h_sum |
| 251 | |
| 252 | /-- If `γ f · y` is orthogonal to `e₁, …, e_ϱ` and has product `D` with `z`, then it has no |
| 253 | `e*`-part. -/ |
| 254 | lemma frameImage_mulVec_eStar_eq_zero {D : E} |
| 255 | (h_prod : S.frameProducts γ *ᵥ y = Pi.single 𝔰.top D) (a : Fin 𝔰.ϱ) : |
| 256 | (frameImage γ.val.val *ᵥ y) (eStar a) = 0 := by |
| 257 | simpa [frameProducts_mulVec, castSucc_ne_last] using congrFun h_prod a.castSucc |
| 258 | |
| 259 | /-- If `γ f · y` is orthogonal to `e₁, …, e_ϱ` and has product `D` with `z`, then `-N` times |
| 260 | its `z`-coordinate is `D`. -/ |
| 261 | lemma neg_mul_frameImage_mulVec_z_eq {D : E} |
| 262 | (h_prod : S.frameProducts γ *ᵥ y = Pi.single 𝔰.top D) : |
| 263 | -(S.N * (frameImage γ.val.val *ᵥ y) 𝔰.z) = D := by |
| 264 | simpa [frameProducts_mulVec] using congrFun h_prod 𝔰.top |
| 265 | |
| 266 | /-- Let `S` be a filling over the CM field `E`, with the prime `N = S.N`, and let `γ ∈ S.G E`. Let |
| 267 | `y = frameImage γ *ᵥ c` be a combination of the image `γ f` of the frame `f = (e_1, …, e_ϱ, z)` |
| 268 | whose products with `f`, the vector `S.frameProducts γ *ᵥ c`, are `(0, …, 0, c')`. Let |
| 269 | `y₀ = y ∘ 𝔰.indexX₀` be the part of `y` in the definite summand `X₀`, and `c_z = c 𝔰.top` the |
| 270 | coefficient at `z`. Then `N ⟨y₀, y₀⟩ = c' c̄' - N² c_z c̄_z`. -/ |
| 271 | theorem mul_dotProduct_comp_indexX₀_eq_sub {γ : S.G E} {c : Fin (𝔰.ϱ + 1) → E} {c' : E} |
| 272 | (h_products : S.frameProducts γ *ᵥ c = Pi.single 𝔰.top c') : |
| 273 | S.N * (star ((frameImage γ *ᵥ c) ∘ 𝔰.indexX₀) ⬝ᵥ (frameImage γ *ᵥ c) ∘ 𝔰.indexX₀) = |
| 274 | c' * star c' - S.N ^ 2 * (c 𝔰.top * star (c 𝔰.top)) := by |
| 275 | set t : 𝔰.BesselIndex → E := frameImage γ.val.val *ᵥ c |
| 276 | have h_dual : ∀ a : Fin 𝔰.ϱ, t (eStar a) = 0 := frameImage_mulVec_eStar_eq_zero h_products |
| 277 | -- The translated vector has the norm of the original frame vector. Its dual coordinates vanish, |
| 278 | -- so only the definite part and the z-coordinate contribute. |
| 279 | have h_norm : star (t ∘ 𝔰.indexX₀) ⬝ᵥ (t ∘ 𝔰.indexX₀) - S.N * (star (t 𝔰.z) * t 𝔰.z) = |
| 280 | -(S.N * (star (c 𝔰.top) * c 𝔰.top)) := by |
| 281 | have h_form : star t ⬝ᵥ (S.ratMiddle E).splitGram *ᵥ t = |
| 282 | star (frameImage 1 *ᵥ c) ⬝ᵥ (S.ratMiddle E).splitGram *ᵥ frameImage 1 *ᵥ c := |
| 283 | form_frameImage_mulVec γ c |
| 284 | rw [frameImage_one_mulVec] at h_form |
| 285 | simpa [middleGram, h_dual, dotProduct, mulVec, splitGram, Matrix.one_apply, sub_eq_add_neg, |
| 286 | mul_left_comm _ (S.N : E)] using h_form |
| 287 | have h_last : -(S.N * t 𝔰.z) = c' := neg_mul_frameImage_mulVec_z_eq h_products |
| 288 | rw [← h_last, star_neg, star_mul', star_natCast] |
| 289 | linear_combination (S.N : E) * h_norm |
| 290 | |
| 291 | /-- If `γ f · y` is orthogonal to `e₁, …, e_ϱ` and has product `D` with `z`, then at each |
| 292 | infinite place `N` times the squared length of its `X₀`-part is `|D|² - N² |y_z|²`. -/ |
| 293 | lemma mul_sum_norm_sq_frameImage_mulVec_eq {D : E} |
| 294 | (h_prod : S.frameProducts γ *ᵥ y = Pi.single 𝔰.top D) (v : InfinitePlace E) : |
| 295 | S.N * ∑ i : 𝔰.κ, ‖Φ v ((frameImage γ.val.val *ᵥ y) (𝔰.indexX₀ i))‖ ^ 2 = |
| 296 | ‖Φ v D‖ ^ 2 - (S.N * ‖Φ v (y 𝔰.top)‖) ^ 2 := by |
| 297 | -- Each conjugate product in the field identity maps to a squared norm. |
| 298 | simpa [dotProduct, ← ofReal_inj, conj_mul', mul_conj', mul_pow] using |
| 299 | congrArg (Φ v) (mul_dotProduct_comp_indexX₀_eq_sub h_prod) |
| 300 | |
| 301 | /-- Let γ be any rational element of the unitary group, and let D_l be the leading minors of the |
| 302 | matrix `S.frameProducts γ` of products of the frame (e₁, …, e_ϱ, z) with its image under γ. At every |
| 303 | infinite place v the image of `S.termDisc γ` = |D_{ϱ+1}|² − N²|D_ϱ|², where |x|² means x x̄, equals |
| 304 | its absolute value: it is real and nonnegative. -/ |
| 305 | lemma map_termDisc_eq_norm {γ : S.G E} (v : InfinitePlace E) : |
| 306 | Φ v (S.termDisc γ) = ‖Φ v (S.termDisc γ)‖ := by |
| 307 | -- Cramer's rule gives `y` with `S.frameProducts γ *ᵥ y = (0, …, 0, det (S.frameProducts γ))` and |
| 308 | -- last coordinate the leading `ϱ × ϱ` minor; then the norm identity writes |
| 309 | -- `Φ v (S.termDisc γ)` as `N` times a sum of squares. |
| 310 | obtain ⟨y, hy, h_last⟩ : ∃ y : Fin (𝔰.ϱ + 1) → E, |
| 311 | S.frameProducts γ *ᵥ y = Pi.single 𝔰.top (S.frameProducts γ).det ∧ |
| 312 | y 𝔰.top = leadingMinor (S.frameProducts γ) 𝔰.top.castSucc := |
| 313 | exists_mulVec_eq_single_det (S.frameProducts γ) |
| 314 | set q : ℝ := ‖Φ v (S.frameProducts γ).det‖ ^ 2 - (S.N * ‖Φ v (y 𝔰.top)‖) ^ 2 with hq |
| 315 | have h_eq : S.N * ∑ i : 𝔰.κ, ‖Φ v ((frameImage γ.val.val *ᵥ y) (𝔰.indexX₀ i))‖ ^ 2 = q := |
| 316 | mul_sum_norm_sq_frameImage_mulVec_eq hy v |
| 317 | have h_nonneg : 0 ≤ q := h_eq.le.trans' (by positivity) |
| 318 | have h_disc : Φ v (S.termDisc γ) = (q : ℂ) := by |
| 319 | simp [hq, h_last, mul_pow, frameDisc, mul_conj'] |
| 320 | exact eq_coe_norm_of_nonneg (by rwa [h_disc, zero_le_real]) |
| 321 | |
| 322 | /-- If `S.termDisc γ` is nonzero, then `γ` has cell rank `ϱ + 1` (`S.HasCellRank` at |
| 323 | `last (𝔰.ϱ + 1)`). First, `NormOnePairOccursFrom (ϱ + 1)` holds vacuously, since no frame index lies |
| 324 | beyond it. Second, the determinant of `S.frameProducts γ` is nonzero. -/ |
| 325 | lemma hasCellRank_last (h_disc_ne : S.termDisc γ ≠ 0) : S.HasCellRank (last (𝔰.ϱ + 1)) γ := by |
| 326 | have h_form : NormOnePairOccursFrom (last (𝔰.ϱ + 1)).val γ := |
| 327 | ⟨1, by simp, fun a ha ↦ absurd ha (by simp [a.is_le])⟩ |
| 328 | refine ⟨h_form, fun (h_det : (S.frameProducts γ).det = 0) ↦ ?_, by simp [h_disc_ne]⟩ |
| 329 | -- If `det (S.frameProducts γ) = 0`, then `S.termDisc γ = -N² |D_ϱ|²`, while |
| 330 | -- `map_termDisc_eq_norm` makes it nonnegative at an infinite place; so it vanishes. |
| 331 | let v₀ : InfinitePlace E := Classical.ofNonempty |
| 332 | have h_eval : ‖Φ v₀ (S.termDisc γ)‖ = |
| 333 | -(S.N * ‖Φ v₀ (leadingMinor (S.frameProducts γ) 𝔰.top.castSucc)‖) ^ 2 := by |
| 334 | rw [← ofReal_inj, ← map_termDisc_eq_norm] |
| 335 | simp [frameDisc, h_det, mul_pow, mul_conj'] |
| 336 | have h_zero : ‖Φ v₀ (S.termDisc γ)‖ = 0 := by nlinarith [norm_nonneg (Φ v₀ (S.termDisc γ))] |
| 337 | exact h_disc_ne (by simpa using h_zero) |
| 338 | |
| 339 | /-- Either `S.termDisc γ` is totally positive, and then the matrix of products of the two frames |
| 340 | has a nonzero determinant, or `S.termDisc γ` vanishes. -/ |
| 341 | theorem termDisc_pos_or_eq_zero (γ : S.G E) : |
| 342 | ((∀ v : InfinitePlace E, 0 < Φ v (S.termDisc γ)) ∧ (S.frameProducts γ).det ≠ 0) ∨ |
| 343 | S.termDisc γ = 0 := by |
| 344 | refine or_iff_not_imp_right.2 fun h_ne ↦ |
| 345 | ⟨fun v ↦ ?_, (hasCellRank_last h_ne).leadingMinor_ne_zero⟩ |
| 346 | rw [map_termDisc_eq_norm, zero_lt_real, norm_pos_iff] |
| 347 | exact (map_ne_zero (Φ v)).2 h_ne |
| 348 | |
| 349 | /-- Let `γ` be a rational element of the unitary group and `γ_v = S.ratToInf γ v` its rescaled image |
| 350 | at the infinite place `v`. Let `Z = realFrameGram γ_v` be the matrix of products of the frame |
| 351 | `(e₁, …, e_ϱ, z)` with its image under `γ_v`, and `D_ϱ` the leading principal minor of order `ϱ` of |
| 352 | `Z`. Then `gramDiscReal Z = |det Z|² - |D_ϱ|²` is `s²` times the complex absolute value of |
| 353 | `S.termDisc γ` under the embedding `Φ v`, where `s` is the product of the squared scales |
| 354 | `S.frameScaleSq v a` of the `n = ϱ + 1` frame vectors. -/ |
| 355 | lemma gramDiscReal_realFrameGram_ratToInf {γ : S.G E} (v : InfinitePlace E) : |
| 356 | RealPlace.gramDiscReal (realFrameGram (S.ratToInf γ v)) = |
| 357 | (∏ a : Fin 𝔰.n, S.frameScaleSq v a) ^ 2 * ‖Φ v (S.termDisc γ)‖ := by |
| 358 | -- The minors scale by products of the `S.frameScaleSq v a`; the last factor, |
| 359 | -- `S.frameScaleSq v 𝔰.ϱ = 1 / N`, accounts for the `N ^ 2` in `S.termDisc γ`. |
| 360 | have h_det : (realFrameGram (S.ratToInf γ v)).det = |
| 361 | (∏ a : Fin 𝔰.n, S.frameScaleSq v a : ℝ) * Φ v (S.frameProducts γ).det := by |
| 362 | simpa [frameScaleSq] using S.det_submatrix_realFrameGram_ratToInf γ v id |
| 363 | have h_minor : leadingMinor (realFrameGram (S.ratToInf γ v)) 𝔰.top.castSucc = |
| 364 | (∏ a : Fin 𝔰.ϱ, S.frameScaleSq v a : ℝ) * |
| 365 | Φ v (leadingMinor (S.frameProducts γ) 𝔰.top.castSucc) := by |
| 366 | simp [leadingMinor, det_submatrix_realFrameGram_ratToInf, frameScaleSq] |
| 367 | have h_disc : frameDisc 1 (realFrameGram (S.ratToInf γ v)) = |
| 368 | ((∏ a : Fin 𝔰.n, S.frameScaleSq v a) ^ 2 : ℝ) * Φ v (S.termDisc γ) := by |
| 369 | simp [frameDisc, h_det, h_minor, frameScaleSq, prod_univ_castSucc] |
| 370 | field [Nat.Prime.ne_zero] |
| 371 | rw [RealPlace.gramDiscReal, h_disc, re_ofReal_mul, ← ofReal_re ‖Φ v _‖, ← map_termDisc_eq_norm] |
| 372 | |
| 373 | /-! ### Passing to the infinite and the finite places; the Bessel group; sizes of constants -/ |
| 374 | |
| 375 | /-- The image of an element of `New.Shape.Form.besselU0` at an infinite place lies in the |
| 376 | corresponding subgroup of the complex unitary group `𝔰.G₁`. -/ |
| 377 | lemma ratToInf_mem_besselU0 (hu : u ∈ besselU0) (v : InfinitePlace E) : |
| 378 | S.ratToInf u v ∈ besselU0 := |
| 379 | ⟨hu.left.ratToInf_mem_agreeWithOneOn v, hu.right.ratToInf_mem_agreeWithOneOn v⟩ |
| 380 | |
| 381 | /-- Dividing each coordinate by its basis scale intertwines the rational and infinite frame maps. -/ |
| 382 | lemma frameImage_ratToInf_mulVec_div (γ : S.G E) (v : InfinitePlace E) (x : Fin (𝔰.ϱ + 1) → E) : |
| 383 | frameImage (S.ratToInf γ v).val.val *ᵥ (fun k ↦ Φ v (x k) / S.basisScale v (𝔰.besselFrame k)) = |
| 384 | fun i ↦ Φ v ((frameImage γ *ᵥ x) i) / S.basisScale v i := by |
| 385 | funext i |
| 386 | simp only [mulVec, dotProduct, submatrix_apply, id_eq, ratToInf_apply, map_sum, map_mul, sum_div] |
| 387 | exact sum_congr rfl fun k _ ↦ by field_simp [basisScale_ne_zero] |
| 388 | |
| 389 | /-- The image of γ at v is the conjugate of Φ_v γ by the diagonal `S.basisScale v`, so applied to |
| 390 | frame coordinates rescaled relative to a reference index a it gives the rescaled value of γf · y. -/ |
| 391 | lemma frameImage_ratToInf_mulVec (γ : S.G E) (v : InfinitePlace E) (a i : 𝔰.BesselIndex) |
| 392 | (y : Fin (𝔰.ϱ + 1) → E) : |
| 393 | (frameImage (S.ratToInf γ v).val.val *ᵥ fun l : Fin (𝔰.ϱ + 1) ↦ |
| 394 | S.basisScale v a / S.basisScale v (𝔰.besselFrame l) * Φ v (y l)) i = |
| 395 | S.basisScale v a / S.basisScale v i * Φ v ((frameImage γ.val.val *ᵥ y) i) := by |
| 396 | have h := congrFun (congrArg (fun z : 𝔰.BesselIndex → ℂ ↦ S.basisScale v a • z) |
| 397 | (frameImage_ratToInf_mulVec_div γ v y)) i |
| 398 | rw [← Matrix.mulVec_smul] at h |
| 399 | simpa [Pi.smul_def, smul_eq_mul, div_eq_mul_inv, mul_assoc, mul_left_comm, mul_comm] using h |
| 400 | |
| 401 | /-- The property that a norm-one pair occurs from `j` passes from a rational element γ to its |
| 402 | rescaled image `S.ratToInf γ v` at any infinite place `v`. -/ |
| 403 | lemma _root_.New.NormOnePairOccursFrom.ratToInf {γ : S.G E} (v : InfinitePlace E) {j : ℕ} |
| 404 | (h_pair : NormOnePairOccursFrom j γ) : |
| 405 | NormOnePairOccursFrom j (S.ratToInf γ v) := by |
| 406 | obtain ⟨c, hc, h_flag⟩ := h_pair |
| 407 | refine ⟨Φ v c, by simpa using congrArg (Φ v) hc, fun a ha ↦ ?_⟩ |
| 408 | obtain ⟨x, y, hxy, hxa, hya, h_above⟩ := h_flag a ha |
| 409 | -- `S.ratToInf γ v` is `Φ v γ` conjugated by the diagonal `S.basisScale v`, so rescale the |
| 410 | -- coordinates of the common vector by `d`, which is `1` at the leading index. |
| 411 | let d : 𝔰.BesselIndex → ℂ := fun i ↦ S.basisScale v (𝔰.besselFrame a) / S.basisScale v i |
| 412 | have hd : d (𝔰.besselFrame a) = 1 := by simp [d, basisScale_ne_zero] |
| 413 | refine ⟨d ∘ 𝔰.besselFrame * Φ v ∘ x, d ∘ 𝔰.besselFrame * Φ v ∘ y, ?_, ?_⟩ |
| 414 | · ext i |
| 415 | calc (frameImage (1 : Matrix 𝔰.BesselIndex 𝔰.BesselIndex ℂ) *ᵥ |
| 416 | (d ∘ 𝔰.besselFrame * Φ v ∘ x)) i |
| 417 | = d i * Φ v ((frameImage (1 : Matrix 𝔰.BesselIndex 𝔰.BesselIndex E) *ᵥ x) i) := by |
| 418 | simpa [d, Function.comp_def, Pi.mul_def] using |
| 419 | frameImage_ratToInf_mulVec (S := S) 1 v (𝔰.besselFrame a) i x |
| 420 | _ = d i * Φ v ((frameImage γ.val.val *ᵥ y) i) := by rw [hxy] |
| 421 | _ = (frameImage (S.ratToInf γ v).val.val *ᵥ (d ∘ 𝔰.besselFrame * Φ v ∘ y)) i := |
| 422 | (frameImage_ratToInf_mulVec γ v (𝔰.besselFrame a) i y).symm |
| 423 | · simp +contextual [hd, hxa, hya, h_above] |
| 424 | |
| 425 | /-- If γ is a term over (c, r, c'), then the matrix of h_c⁻¹ γ h_c' in the lattice basis is |
| 426 | integral over Ô E. -/ |
| 427 | lemma termsOver.isIntMatrix_translateByClassReps : |
| 428 | γ ∈ S.termsOver c r c' → IsIntMatrix (Ô E) (S.translateByClassReps c c' γ).val.val := by |
| 429 | rintro ⟨g, -, hg⟩ |
| 430 | rw [← hg] |
| 431 | exact g.property.isIntMatrix |
| 432 | |
| 433 | /-- For a class c, the matrix classCoord c, which takes rational coordinates to coordinates in the |
| 434 | basis of the lattice h_cΛ₀, carries the form in rational coordinates to the form in lattice |
| 435 | coordinates. -/ |
| 436 | lemma classCoord_conj_splitGram (c : S.Classes) : |
| 437 | (S.classCoord c)ᴴ * (S.latticeMiddle (𝔸f E)).splitGram * S.classCoord c = |
| 438 | (S.ratMiddle (𝔸f E)).splitGram := by |
| 439 | have h_basis : (classBasis c).valᴴ * (S.ratMiddle (𝔸f E)).splitGram * (classBasis c).val = |
| 440 | (S.latticeMiddle (𝔸f E)).splitGram := |
| 441 | gram_mul_of_gram_eq (mem_unitaryGroupOf_iff.1 (toBesselH 𝔰 (S.N : 𝔸f E) c.out).prop) |
| 442 | (gram_besselLatticeBasis _ _ S.piN_mul_star) |
| 443 | exact gram_inv_of_gram_eq h_basis |
| 444 | |
| 445 | /-- The frame image of h_c⁻¹ γ h_c' in the lattice basis is the frame image of γ, read in the |
| 446 | adeles and written in the coordinates classCoord c of the lattice h_cΛ₀. -/ |
| 447 | lemma frameImage_translateByClassReps : |
| 448 | frameImage (S.translateByClassReps c c' γ).val.val = |
| 449 | S.classCoord c * finAdeleMatrix (frameImage γ.val.val) := by |
| 450 | -- the right factor `classBasis c'` of `S.translateByClassReps c c' γ` fixes the frame |
| 451 | rw [coe_translateByClassReps] |
| 452 | exact frameImage_mul_of_mem_agreeWithOneOn (by simp [classBasis, toBesselH, besselLatticeBasis, |
| 453 | Matrix.mul_apply, Matrix.one_apply]) _ |
| 454 | |
| 455 | /-- The Gram matrix of the adelic element `h_c⁻¹ γ h_c'` in the lattice basis is that of `γ`. -/ |
| 456 | lemma frameGram_translateByClassReps : |
| 457 | (S.latticeMiddle (𝔸f E)).frameGram (S.translateByClassReps c c' γ) = finAdeleMatrix |
| 458 | (S.frameProducts γ) := by |
| 459 | -- `S.classCoord c` carries one form to the other (`classCoord_conj_splitGram`), and it fixes the |
| 460 | -- frame |
| 461 | have h_frame : |
| 462 | ((1 : Matrix 𝔰.BesselIndex 𝔰.BesselIndex E).submatrix 𝔰.besselFrame id).map |
| 463 | (algebraMap E (𝔸f E)) * (S.classCoord c)ᴴ = |
| 464 | (1 : Matrix 𝔰.BesselIndex 𝔰.BesselIndex (𝔸f E)).submatrix 𝔰.besselFrame id := by |
| 465 | simp [classCoord, ← ext_iff, classBasis, toBesselH, besselLatticeBasis, |
| 466 | fromBlocks_conjTranspose, Matrix.one_apply, Matrix.mul_apply, forall_fin_succ'] |
| 467 | simp [frameGram_eq_frameImage, frameImage_translateByClassReps, ← classCoord_conj_splitGram c, |
| 468 | ← Matrix.mul_assoc, map_splitGram_ratMiddle, h_frame] |
| 469 | |
| 470 | /-- If γ is near, that is, γ joins two boxed archimedean points, then so is u γ u' for rational u |
| 471 | and u' in the group besselU0 of Bessel unipotent elements that fix the frame. -/ |
| 472 | lemma IsNear.mul_of_mem_besselU0 {u' : (S.ratMiddle E).G} (h_near : S.IsNear γ) |
| 473 | (hu : u ∈ besselU0) (hu' : u' ∈ besselU0) : |
| 474 | S.IsNear (u * γ * u') := by |
| 475 | -- if y witnesses that γ is near, then the image of u times y does so for u γ u' |
| 476 | obtain ⟨y, hy, hy'⟩ := h_near |
| 477 | refine ⟨S.ratToInf u * y, |
| 478 | (mul_mem_boxedPoints_iff fun v ↦ ratToInf_mem_besselU0 hu v).2 hy, ?_⟩ |
| 479 | change (S.ratToInf (u * γ * u'))⁻¹ * (S.ratToInf u * y) ∈ S.boxedPoints |
| 480 | simpa [mul_assoc, mul_mem_boxedPoints_iff, ratToInf_mem_besselU0, hu'] using hy' |
| 481 | |
| 482 | /-- An isometry that fixes every vector of the frame (e₁, …, e_ϱ, z) lies in `besselS`. -/ |
| 483 | lemma mem_besselS_of_frameImage_eq_one (h_fix : frameImage s.val.val = frameImage 1) : |
| 484 | s ∈ besselS := |
| 485 | mem_besselS_iff_frameImage.2 fun i a _ ↦ congrFun₂ h_fix i a |
| 486 | |
| 487 | /-- For filling data with size parameter `b`, the powers `b ^ e` with `e ≤ 10 ^ 5 n ^ 9 f` are at |
| 488 | most `τ = S.tailScale = b ^ (k f / 4)`. Here `n = ϱ + 1` is the number of frame vectors, `k` is the |
| 489 | rank of `X₀` and `f` is the number of infinite places. -/ |
| 490 | lemma pow_le_tailScale {e : ℕ} (he : e ≤ 10 ^ 5 * 𝔰.n ^ 9 * numInfPlaces E) : |
| 491 | S.b ^ e ≤ S.tailScale := by |
| 492 | -- compare the exponents |
| 493 | have h_exponent : (e : ℝ) ≤ 𝔰.k * numInfPlaces E / 4 := by |
| 494 | have hk : 1000 * (2 * 𝔰.ϱ + 2) ^ 9 ≤ 𝔰.k := S.pow_le_k |
| 495 | rify at he hk |
| 496 | grw [he, ← hk] |
| 497 | -- `(2 ϱ + 2) ^ 9 = 2 ^ 9 (ϱ + 1) ^ 9`, and `10 ^ 5 ≤ 1000 * 2 ^ 9 / 4` |
| 498 | have h_eq : (1000 : ℝ) * (2 * 𝔰.ϱ + 2) ^ 9 * numInfPlaces E / 4 = |
| 499 | 128000 * ((𝔰.ϱ + 1) ^ 9 * numInfPlaces E) := by ring |
| 500 | rw [h_eq] |
| 501 | linarith |
| 502 | simpa [tailScale] using rpow_le_rpow_of_exponent_le S.one_le_b h_exponent |
| 503 | |
| 504 | /-- The fourth power of `tailScale` `τ = b ^ (k f / 4)` is `b ^ (k f)`, where `k = 𝔰.k` and |
| 505 | `f = numInfPlaces E` is the number of infinite places of `E`. -/ |
| 506 | lemma tailScale_pow_four : |
| 507 | S.tailScale ^ 4 = S.b ^ (𝔰.k * numInfPlaces E) := by |
| 508 | rw [tailScale, ← rpow_mul_natCast (by linarith [S.thousand_le_b]), ← rpow_natCast] |
| 509 | push_cast |
| 510 | ring_nf |
| 511 | |
| 512 | /-- The ratio of `mainSecondMoment` to `identitySecondMoment` is at least `τ ^ 44 = b ^ (11 k f)`, |
| 513 | where `τ = tailScale`. -/ |
| 514 | lemma tailScale_pow_mul_identitySecondMoment_le [S.IsAdmissible] : |
| 515 | S.tailScale ^ 44 * S.identitySecondMoment ≤ S.mainSecondMoment := by |
| 516 | rw [pow_mul _ 4 11, tailScale_pow_four, ← pow_mul'] |
| 517 | exact IsAdmissible.mul_identitySecondMoment_le |
| 518 | |
| 519 | lemma two_le_M : 2 ≤ S.M := by simp [two_le_iff, Nat.Prime.ne_one, Nat.Prime.ne_zero] |
| 520 | |
| 521 | lemma two_le_b : 2 ≤ S.b := by linarith [S.thousand_le_b] |
| 522 | |
| 523 | lemma b_pos : 0 < S.b := by linarith [S.thousand_le_b] |
| 524 | |
| 525 | lemma two_le_tailScale : 2 ≤ S.tailScale := |
| 526 | two_le_b.trans (by simpa using pow_le_tailScale (S := S) (e := 1) NeZero.one_le) |
| 527 | |
| 528 | lemma one_le_tailScale : 1 ≤ S.tailScale := one_le_two.trans two_le_tailScale |
| 529 | |
| 530 | lemma identitySecondMoment_nonneg : 0 ≤ S.identitySecondMoment := by simp [identitySecondMoment] |
| 531 | |
| 532 | lemma mainSecondMoment_nonneg : 0 ≤ S.mainSecondMoment := |
| 533 | div_nonneg (sq_nonneg _) (mul_pos S.besselDegree_pos (mass_pos ..)).le |
| 534 | |
| 535 | /-- The number `pairCountScale`, which is the size of the reduced image of the Bessel subgroup times |
| 536 | the number of classes, divided by `N ^ (k f)`, is positive. -/ |
| 537 | lemma pairCountScale_pos : 0 < S.pairCountScale := by |
| 538 | have hN : 0 < S.N := S.N_prime.pos |
| 539 | positivity [Nat.card_pos (α := S.reducedImage besselS)] |
| 540 | |
| 541 | /-- For a natural number `C ≤ 10 ^ 5`, `C * 𝔰.n ^ 2 ≤ 𝔰.n ^ 3`. This holds because the filling data |
| 542 | `S` forces `𝔰.n ≥ 10 ^ 5`. -/ |
| 543 | lemma mul_sq_le_cube (S : Filling E 𝔰) {C : ℕ} (hC : C ≤ 10 ^ 5) : C * 𝔰.n ^ 2 ≤ 𝔰.n ^ 3 := by |
| 544 | rw [pow_succ' _ 2] |
| 545 | exact Nat.mul_le_mul_right _ (hC.trans (S.ten_pow_five_le_varrho.trans 𝔰.ϱ.le_succ)) |
| 546 | |
| 547 | /-- Let the data be admissible, with size parameter `b = S.b`, and let `γ` be near: some archimedean |
| 548 | point `y` has both `y` and `γ⁻¹ y` in `boxedPoints`. Then the products of the frame vectors with |
| 549 | their images under `γ`, the entries of `S.frameProducts γ`, have absolute value at most |
| 550 | `b ^ (134 n)`, `n = ϱ + 1`, at every infinite place `w`. -/ |
| 551 | lemma IsNear.norm_frameProducts_le [S.IsAdmissible] (w : InfinitePlace E) |
| 552 | (i j : Fin (𝔰.ϱ + 1)) (h_near : S.IsNear γ) : |
| 553 | ‖Φ w (S.frameProducts γ i j)‖ ≤ S.b ^ (134 * 𝔰.n) := by |
| 554 | obtain ⟨y, hy, hy'⟩ := h_near |
| 555 | have h_box : ‖frameVector (y w) i‖ ≤ S.frameBoxRadius := mem_frameBox_of_mem_boxedPoints hy w i |
| 556 | have h_box' : ‖frameVector (((S.ratToInf γ)⁻¹ * y) w) j‖ ≤ S.frameBoxRadius := |
| 557 | mem_frameBox_of_mem_boxedPoints hy' w j |
| 558 | have hb : 0 < S.b := b_pos |
| 559 | have hN : 0 < S.N := S.N_prime.pos |
| 560 | -- The entry `(i, j)` of `realFrameGram (S.ratToInf γ w)` is that of `S.frameProducts γ` times |
| 561 | -- `|S.realM w| ^ ((ϱ - i) + (ϱ - j)) / N`, and it is bounded by the product of the norms of the |
| 562 | -- frame vectors `i` of `y` and `j` of `γ⁻¹ y`. |
| 563 | have h_entry : |S.realM w| ^ (𝔰.ϱ - i + (𝔰.ϱ - j)) * ‖Φ w (S.frameProducts γ i j)‖ ≤ |
| 564 | S.N * ‖frameVector (y w) i‖ * ‖frameVector (((S.ratToInf γ)⁻¹ * y) w) j‖ := by |
| 565 | simpa [field, ← pow_add] using norm_realFrameGram_le_mul (S.ratToInf γ w) (y w) i j |
| 566 | -- Both norms are at most `frameBoxRadius = b ^ (37 n)`, and `N ≤ b ^ (60 n)`. |
| 567 | grw [← one_le_abs_realM, one_pow, one_mul, h_box, frameBoxRadius, h_box', frameBoxRadius, N_le, |
| 568 | ← pow_add, ← pow_add] at h_entry |
| 569 | exact h_entry.trans_eq (by ring) |
| 570 | |
| 571 | /-- For admissible data with size parameter `b = S.b` and a near term `γ` (see `IsNear`), the |
| 572 | leading minors of the matrix `S.frameProducts γ` of products of the frame with its image under `γ` |
| 573 | have squared absolute value at most `b ^ (270 n²)`, `n = ϱ + 1`, at every infinite place `w`. -/ |
| 574 | lemma IsNear.norm_map_leadingMinor_sq_le [S.IsAdmissible] (l : Fin (𝔰.ϱ + 1 + 1)) |
| 575 | (w : InfinitePlace E) (h_near : S.IsNear γ) : |
| 576 | ‖Φ w (leadingMinor (S.frameProducts γ) l)‖ ^ 2 ≤ S.b ^ (270 * 𝔰.n ^ 2) := by |
| 577 | have hb : 0 < S.b := b_pos |
| 578 | -- the minor is a sum of at most `l ^ l` products of `l` entries, each bounded by |
| 579 | -- `norm_frameProducts_le` |
| 580 | have h_det : ‖Φ w (leadingMinor (S.frameProducts γ) l)‖ ≤ |
| 581 | (l : ℝ) ^ l.val * S.b ^ (134 * 𝔰.n * l.val) := by |
| 582 | grw [← place_apply, leadingMinor, det_le (by bound [h_near.norm_frameProducts_le w]), |
| 583 | Nat.factorial_le_pow] |
| 584 | simp [← pow_mul] |
| 585 | -- by `l ≤ ϱ + 1 ≤ b` the left side is at most a power of `b`; compare the exponents |
| 586 | have hl : (l : ℝ) ≤ S.b := by grw [l.is_le, S.succ_le_b] |
| 587 | have h_exponent : (l.val + 134 * 𝔰.n * l.val) * 2 ≤ 270 * 𝔰.n ^ 2 := by |
| 588 | nlinarith only [S.ten_pow_five_le_varrho, l.is_le] |
| 589 | grw [h_det, hl, ← pow_add, ← pow_mul] |
| 590 | exact pow_le_pow_right₀ S.one_le_b h_exponent |
| 591 | |
| 592 | /-- If `γ` is a term over `(c, r, c')` and `u` is a term over `(c, r', d)` |
| 593 | with the same frame image `frameImage γ = frameImage u`, then `r⁻¹ * r'` lies in |
| 594 | `S.reducedImage besselS`, the reduced image of the Bessel subgroup. So `r` and `r'` lie in one left |
| 595 | coset of it. -/ |
| 596 | lemma termsOver.inv_mul_mem_reducedImage (hγ : γ ∈ S.termsOver c r c') |
| 597 | {r' : S.ResidueGL} {d : S.Classes} (hu : u ∈ S.termsOver c r' d) |
| 598 | (h_same_frame : frameImage γ.val.val = frameImage u.val.val) : |
| 599 | r⁻¹ * r' ∈ S.reducedImage besselS := by |
| 600 | obtain ⟨m, rfl, hm⟩ := hγ |
| 601 | obtain ⟨m', rfl, hm'⟩ := hu |
| 602 | have h_eq : frameImage m.val.val.val = frameImage m'.val.val.val := by |
| 603 | rw [hm, hm', frameImage_translateByClassReps, frameImage_translateByClassReps, h_same_frame] |
| 604 | exact ⟨m⁻¹ * m', mem_besselS_of_frameImage_eq_one (frameImage_inv_mul_eq_iff.2 h_eq), by simp⟩ |
| 605 | |
| 606 | /-- Under `S.IsAdmissible`, let `γ ∈ S.termsOver c r c'` and `u ∈ S.termsOver c r d`. Suppose they |
| 607 | have the same `frameImage`, the image of the frame `(e₁, …, e_ϱ, z)`. Then `c' = d` and `γ⁻¹ * u` |
| 608 | lies in `S.classUnipotent₀ c'`, the integral unipotent elements fixing every frame vector. -/ |
| 609 | lemma termsOver.eq_and_mem_classUnipotent₀ [S.IsAdmissible] (hγ : γ ∈ S.termsOver c r c') |
| 610 | {d : S.Classes} (hu : u ∈ S.termsOver c r d) |
| 611 | (h_same_frame : frameImage γ.val.val = frameImage u.val.val) : |
| 612 | c' = d ∧ γ⁻¹ * u ∈ S.classUnipotent₀ c' := by |
| 613 | -- `γ⁻¹ * u` fixes the frame, so it lies in `besselS`, and it is a term over `(c', 1, d)` |
| 614 | have h_fix : frameImage (γ⁻¹ * u).val.val = frameImage 1 := |
| 615 | frameImage_inv_mul_eq_iff.2 h_same_frame |
| 616 | have h_over : γ⁻¹ * u ∈ S.termsOver c' 1 d := by simpa using mul (inv hγ) hu |
| 617 | obtain ⟨h_class, h_mem⟩ := |
| 618 | eq_and_mem_classUnipotent_of_besselS (mem_besselS_of_frameImage_eq_one h_fix) h_over |
| 619 | -- fixing every frame vector is the extra condition of `classUnipotent₀` |
| 620 | have h_frame : frameMatrix (γ⁻¹ * u) = 1 := by |
| 621 | change (frameImage (γ⁻¹ * u).val.val).submatrix 𝔰.besselFrame id = 1 |
| 622 | rw [h_fix] |
| 623 | simp [submatrix_submatrix, submatrix_one, besselFrame_injective] |
| 624 | exact ⟨h_class, h_mem, mem_besselU0_iff.2 ⟨h_mem.1, h_frame⟩⟩ |
| 625 | |
| 626 | /-- If `γ` is a term over `(c, r, c')`, so that `h_c⁻¹ γ h_c'` is integral, then the products of |
| 627 | the frame with its image under `γ` are algebraic integers. -/ |
| 628 | lemma isIntegral_frameProducts (hγ : γ ∈ S.termsOver c r c') |
| 629 | (i j : Fin (𝔰.ϱ + 1)) : IsIntegral ℤ (S.frameProducts γ i j) := by |
| 630 | -- the adelic entry is that of a product of two integral matrices |
| 631 | have h_int : (S.latticeMiddle (𝔸f E)).frameGram (S.translateByClassReps c c' γ) i j ∈ Ô E := |
| 632 | S.isUnimodular_latticeMiddle.splitGram.isIntMatrix.mul |
| 633 | (termsOver.isIntMatrix_translateByClassReps hγ) _ _ |
| 634 | simpa [frameGram_translateByClassReps] using h_int |
| 635 | |
| 636 | end New.Filling |
| 637 | |
| 638 | end |