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 | public import New.Spanning.RemainingTerms.FrameParts |
| 5 | import New.Spanning.Unfolding.ReducedPoints |
| 6 | |
| 7 | /-! |
| 8 | # Counting frames over a lattice of small discriminant |
| 9 | |
| 10 | Modulo moves, few frames of near terms have a lattice `L_γ^M` that contains a given lattice `L` of |
| 11 | small discriminant (`New.Filling.IsFrameSet.encard_le`, and for the terms of one label |
| 12 | `New.Filling.encard_setOf_isNearTermAt_and_le_termLattice_le`). After the cell rank and the matrix |
| 13 | of products are fixed, the frames are sorted in three rounds: by the lift of `L`, by the part in |
| 14 | `X₀`, and by the part in the isotropic space. |
| 15 | |
| 16 | Notions from other files: |
| 17 | |
| 18 | * `New.frameImage γ`: the frame `γ f` of `γ`, the image of the standard frame |
| 19 | `f = (e₁, …, e_ϱ, z)` of `n = ϱ + 1` vectors; `S.frameProducts γ` is the matrix of products of |
| 20 | `f` with `γ f`. |
| 21 | * `S.classUnipotent₀ c`: the group of moves for the class `c`. |
| 22 | * `S.HasCellRank j γ`: the element `γ` has cell rank `j ≤ ϱ + 1`: from the index `j` on, the flags |
| 23 | of `f` and `γ f` share vectors whose two leading coefficients have the same norm, and the leading |
| 24 | minor of order `j` of the matrix of products is nonzero; a further condition singles out |
| 25 | `j = ϱ + 1`. |
| 26 | * `S.sharedVectors j γ`: the matrix whose columns `k ≥ j` are the coordinates in the isotropic |
| 27 | space of the columns of `γ f · adj Y`, the others being `0`. Here `Y` consists of the first `j` |
| 28 | rows of the matrix of products completed by rows of `1`; for `γ` of cell rank `j` these columns |
| 29 | lie in the spans of both frames. |
| 30 | * `S.termLattice c c' γ`: the lattice `L_γ^M` of the `v ∈ Λ ∩ X₀` such that some vector of |
| 31 | `v + M (Λ ∩ X)` is orthogonal to `γ f`, where `Λ` is the lattice of `c` and `X` is the isotropic |
| 32 | space spanned by `e₁, …, e_ϱ`. |
| 33 | * `New.genIndex d`: the generalised index of an idele `d`, the inverse of the factor by which `d` |
| 34 | scales Haar measure. |
| 35 | -/ |
| 36 | |
| 37 | @[expose] public section |
| 38 | |
| 39 | namespace New.Filling |
| 40 | |
| 41 | open NumberField Matrix Module Fintype ENNReal Pointwise |
| 42 | |
| 43 | /-- Colour the elements of `A` by `φ` with at most `N` colours, so that elements of one colour are |
| 44 | related by `R`. If every nonempty set of pairwise related elements of `A` has at most `x` elements, |
| 45 | then `A` has at most `N * x` elements. -/ |
| 46 | lemma encard_le_of_encard_range_le {α β : Type} {A : Set α} {R : α → α → Prop} {N x : ℝ≥0∞} |
| 47 | (φ : A → β) (h_colours : (Set.range φ).encard ≤ N) (h_rel : ∀ a b : A, φ a = φ b → R a b) |
| 48 | (h_class : ∀ B : Set α, B ⊆ A → ∀ a₀ ∈ B, (∀ a ∈ B, ∀ b ∈ B, R a b) → B.encard ≤ x) : |
| 49 | A.encard ≤ N * x := by |
| 50 | rw [← ENNReal.tsum_set_one] |
| 51 | refine tsum_le_of_encard_range_le (w := fun _ ↦ 1) φ h_colours h_rel fun B hB a ha h_pairs ↦ ?_ |
| 52 | rw [ENNReal.tsum_set_one] |
| 53 | exact h_class B hB a ha h_pairs |
| 54 | |
| 55 | /-- Let `E` be a CM field and let `K` and `K'` be submodules of vectors of finite adeles over |
| 56 | `Ô E`. Assume `K ∩ K'` has finite index in `K'`. For each `a` in the set `A`, let `f a` be a family |
| 57 | of vectors in `K'` indexed by the finite type `ι`. Fix a bound `x : ℝ≥0∞`. If every nonempty |
| 58 | subset of `A` whose families are congruent modulo `K` has at most `x` elements, then |
| 59 | `A` has at most `[K' : K ∩ K'] ^ card ι * x` elements. -/ |
| 60 | lemma encard_le_of_colouring {E : Type} [Field E] [CMType E] |
| 61 | {α ι σ : Type} [Fintype ι] {A : Set α} (f : α → ι → σ → 𝔸f E) |
| 62 | {K K' : Submodule (Ô E) (σ → 𝔸f E)} (h_index : submoduleIndex K K' ≠ 0) |
| 63 | (hf : ∀ a ∈ A, ∀ i : ι, f a i ∈ K') {x : ℝ≥0∞} |
| 64 | (h_class : ∀ B : Set α, B ⊆ A → ∀ a₀ ∈ B, |
| 65 | (∀ a ∈ B, ∀ b ∈ B, ∀ i : ι, f a i - f b i ∈ K) → B.encard ≤ x) : |
| 66 | A.encard ≤ ENNReal.ofReal (submoduleIndex K K' ^ card ι) * x := by |
| 67 | rw [← ENNReal.tsum_set_one] |
| 68 | refine tsum_le_relIndex_pow_mul f h_index hf (fun _ ↦ 1) x fun B hB a ha h_pairs ↦ ?_ |
| 69 | rw [ENNReal.tsum_set_one] |
| 70 | exact h_class B hB a ha h_pairs |
| 71 | |
| 72 | /-- For `b ≥ 3` we have `1 + 2 b ^ m ≤ b ^ m'` whenever `m < m'`. -/ |
| 73 | private lemma one_add_two_mul_pow_le_pow {b : ℝ} (hb : 3 ≤ b) {m m' : ℕ} (h_lt : m < m') : |
| 74 | 1 + 2 * b ^ m ≤ b ^ m' := by |
| 75 | calc 1 + 2 * b ^ m ≤ b ^ (m + 1) := by |
| 76 | nlinarith [pow_succ b m, one_le_pow₀ (a := b) (n := m) (by linarith)] |
| 77 | _ ≤ b ^ m' := pow_le_pow_right₀ (by linarith) h_lt |
| 78 | |
| 79 | section FrameSets |
| 80 | |
| 81 | variable {E : Type} [Field E] [CMType E] {𝔰 : Shape} {S : Filling E 𝔰} |
| 82 | |
| 83 | section Moves |
| 84 | |
| 85 | variable {c : S.Classes} {u γ : S.G E} |
| 86 | |
| 87 | /-- A move fixes the standard frame. -/ |
| 88 | private lemma mem_besselU0_of_mem_classUnipotent₀ (hu : u ∈ S.classUnipotent₀ c) : u ∈ besselU0 := |
| 89 | (Subgroup.mem_inf.1 hu).2 |
| 90 | |
| 91 | /-- A move for the class `c` keeps the set of terms over `(c, s, c')`. -/ |
| 92 | private lemma mul_mem_termsOver_of_mem_classUnipotent₀ (hu : u ∈ S.classUnipotent₀ c) |
| 93 | {s : S.ResidueGL} |
| 94 | {c' : S.Classes} (hγ : γ ∈ S.termsOver c s c') : u * γ ∈ S.termsOver c s c' := by |
| 95 | -- That `h_c⁻¹ u h_c` lies in the principal level says that `u` is a term over `(c, 1, c)`. |
| 96 | have h_over : u ∈ S.termsOver c 1 c := (Subgroup.mem_inf.1 (Subgroup.mem_inf.1 hu).1).2 |
| 97 | simpa using termsOver.mul h_over hγ |
| 98 | |
| 99 | /-- A move keeps the cell rank of an element. -/ |
| 100 | private lemma HasCellRank.mul_of_mem_classUnipotent₀ {j : Fin (𝔰.ϱ + 2)} |
| 101 | (h_cellRank : S.HasCellRank j γ) (hu : u ∈ S.classUnipotent₀ c) : |
| 102 | S.HasCellRank j (u * γ) := by |
| 103 | have h_stable : S.HasCellRank j (u⁻¹⁻¹ * γ * 1) ↔ S.HasCellRank j γ := |
| 104 | isStable_hasCellRank j u⁻¹ (inv_mem (Subgroup.mem_inf.1 (Subgroup.mem_inf.1 hu).1).1) 1 |
| 105 | (one_mem _) γ |
| 106 | simpa [h_cellRank] using h_stable |
| 107 | |
| 108 | end Moves |
| 109 | |
| 110 | variable (S) in |
| 111 | /-- A frame set for the class `c`: a set of near terms `(c', γ)` over blocks `(c, s, c')`, for any |
| 112 | `s`, whose frames are different modulo moves, the elements of the unipotent group of level `M` |
| 113 | that fix the standard frame. -/ |
| 114 | structure IsFrameSet (c : S.Classes) (B : Set (S.Classes × S.G E)) : Prop where |
| 115 | /-- The terms are near. -/ |
| 116 | near : ∀ p ∈ B, S.IsNear p.2 |
| 117 | /-- The terms lie over blocks with the first class `c`. -/ |
| 118 | mem_termsOver : ∀ p ∈ B, ∃ s : S.ResidueGL, p.2 ∈ S.termsOver c s p.1 |
| 119 | /-- Terms whose frames agree after moves are equal. -/ |
| 120 | separated : ∀ p ∈ B, ∀ q ∈ B, ∀ u ∈ S.classUnipotent₀ c, ∀ u' ∈ S.classUnipotent₀ c, |
| 121 | frameImage (u * p.2).val.val = frameImage (u' * q.2).val.val → p = q |
| 122 | |
| 123 | /-- A subset of a frame set is a frame set. -/ |
| 124 | lemma IsFrameSet.mono {c : S.Classes} {B : Set (S.Classes × S.G E)} (hB : S.IsFrameSet c B) |
| 125 | {D : Set (S.Classes × S.G E)} (hD : D ⊆ B) : S.IsFrameSet c D where |
| 126 | near p hp := hB.near p (hD hp) |
| 127 | mem_termsOver p hp := hB.mem_termsOver p (hD hp) |
| 128 | separated p hp q hq := hB.separated p (hD hp) q (hD hq) |
| 129 | |
| 130 | variable [S.IsAdmissible] {c : S.Classes} {B : Set (S.Classes × S.G E)} |
| 131 | |
| 132 | omit [S.IsAdmissible] in |
| 133 | /-- The matrix of products of the standard frame with the frame of a term of a frame set has |
| 134 | integral entries. -/ |
| 135 | lemma IsFrameSet.isIntegral_frameProducts (hB : S.IsFrameSet c B) {p : S.Classes × S.G E} |
| 136 | (hp : p ∈ B) (a b : Fin (𝔰.ϱ + 1)) : IsIntegral ℤ (S.frameProducts p.2 a b) := by |
| 137 | obtain ⟨_, h_over⟩ := hB.mem_termsOver p hp |
| 138 | exact Filling.isIntegral_frameProducts h_over a b |
| 139 | |
| 140 | /-- Let `E` be a CM field, `S` admissible filling data over `E`, and `c` a class. Let `B` be a frame |
| 141 | set for `c`: near terms over blocks with the first class `c`, whose frames differ modulo moves, the |
| 142 | unipotent elements of level `M` that fix the standard frame. The terms of `B` have at most |
| 143 | `b ^ (270 n³ f)` matrices of products of the standard frame with their frame. Here `b = S.b` is the |
| 144 | size parameter of `S`, `n` is the length of the frame and `f` the number of infinite places. -/ |
| 145 | lemma IsFrameSet.encard_range_frameProducts_le (hB : S.IsFrameSet c B) : |
| 146 | (Set.range fun p : B ↦ S.frameProducts p.val.2).encard ≤ |
| 147 | ENNReal.ofReal (S.b ^ (270 * 𝔰.n ^ 3 * numInfPlaces E)) := by |
| 148 | -- The entries are integral and bounded at every infinite place. |
| 149 | have hb : 1000 ≤ S.b := S.thousand_le_b |
| 150 | have h_packing : (Set.range fun p : B ↦ S.frameProducts p.val.2).encard ≤ ENNReal.ofReal |
| 151 | ((1 + 2 * S.b ^ (134 * 𝔰.n)) ^ (card (Fin 𝔰.n × Fin 𝔰.n) * numInfPlaces E * 2)) := by |
| 152 | refine encard_le_of_isIntegral_norm_le Function.uncurry ?_ Function.uncurry_injective.injOn |
| 153 | rintro _ ⟨⟨p, hp⟩, rfl⟩ ⟨a, b⟩ |
| 154 | exact ⟨hB.isIntegral_frameProducts hp a b, |
| 155 | fun v ↦ (hB.near p hp).norm_frameProducts_le v a b⟩ |
| 156 | have h_radius : 1 + 2 * S.b ^ (134 * 𝔰.n) ≤ S.b ^ (135 * 𝔰.n) := |
| 157 | one_add_two_mul_pow_le_pow (by linarith) (by lia) |
| 158 | grw [h_packing, h_radius, ← pow_mul, card_prod, Fintype.card_fin] |
| 159 | exact le_of_eq (by ring_nf) |
| 160 | |
| 161 | omit [S.IsAdmissible] in |
| 162 | /-- There are `ϱ + 2` cell ranks, and `ϱ + 2 ≤ b ^ (2 f)` with `f` the number of infinite places. -/ |
| 163 | private lemma varrho_add_two_le_b_pow : ((𝔰.ϱ + 2 : ℕ) : ℝ) ≤ S.b ^ (2 * numInfPlaces E) := |
| 164 | calc ((𝔰.ϱ + 2 : ℕ) : ℝ) ≤ S.b ^ 2 := by |
| 165 | have h_succ : ((𝔰.ϱ + 1 : ℕ) : ℝ) ≤ S.b := S.succ_le_b |
| 166 | push_cast at h_succ ⊢ |
| 167 | nlinarith [S.thousand_le_b] |
| 168 | _ ≤ S.b ^ (2 * numInfPlaces E) := |
| 169 | pow_le_pow_right₀ S.one_le_b (Nat.le_mul_of_pos_right 2 Fintype.card_pos) |
| 170 | |
| 171 | end FrameSets |
| 172 | |
| 173 | variable {E : Type} [Field E] [CMType E] [HasPrimitiveRoot5040 E] {𝔰 : Shape} {S : Filling E 𝔰} |
| 174 | [S.IsAdmissible] |
| 175 | |
| 176 | section Rounds |
| 177 | |
| 178 | variable {j : Fin (𝔰.ϱ + 2)} {c : S.Classes} {B : Set (S.Classes × S.G E)} |
| 179 | {Z : Matrix (Fin (𝔰.ϱ + 1)) (Fin (𝔰.ϱ + 1)) E} {r l : ℕ} {y : Matrix 𝔰.κ (Fin r) E} |
| 180 | |
| 181 | omit [HasPrimitiveRoot5040 E] [S.IsAdmissible] in |
| 182 | /-- Let `γ` be a term over the block `(c, s, c')`: a rational element such that `h_c⁻¹ γ h_c'`, for |
| 183 | the representatives of the classes `c` and `c'`, is integral with reduction `s`. The entries of its |
| 184 | matrix of shared vectors for the index `j` are algebraic integers. -/ |
| 185 | lemma isIntegral_sharedVectors {γ : S.G E} {s : S.ResidueGL} {c' : S.Classes} |
| 186 | (h_over : γ ∈ S.termsOver c s c') (a : Fin 𝔰.ϱ) (k : Fin (𝔰.ϱ + 1)) : |
| 187 | IsIntegral ℤ (S.sharedVectors j γ a k) := by |
| 188 | let O : Subring E := (Ô E).comap (algebraMap E (𝔸f E)) |
| 189 | have hY : IsIntMatrix O (paddedLeading j (S.frameProducts γ)) := |
| 190 | isIntMatrix_paddedLeading (isIntegral_frameProducts h_over) |
| 191 | have h_frame : IsIntMatrix O (frameImage γ.val.val).toRows₁ := by |
| 192 | intro i b |
| 193 | have h_entry : frameImage (S.translateByClassReps c c' γ).val.val (.inl i) b ∈ Ô E := |
| 194 | termsOver.isIntMatrix_translateByClassReps h_over (.inl i) (𝔰.besselFrame b) |
| 195 | -- The change to the lattice basis keeps the coordinates in the isotropic space. |
| 196 | rw [frameImage_translateByClassReps, classCoord_eq_fromBlocks] at h_entry |
| 197 | simpa [O, Matrix.mul_apply, Matrix.one_apply] using h_entry |
| 198 | rw [sharedVectors, of_apply] |
| 199 | split_ifs |
| 200 | · exact algebraMap_mem_Ô.1 (h_frame.mul hY.adjugate a k) |
| 201 | · exact isIntegral_zero |
| 202 | |
| 203 | omit [HasPrimitiveRoot5040 E] in |
| 204 | /-- Let `B` be a frame set whose terms all have cell rank `j`: from the index `j` on, the flags of |
| 205 | the standard frame `f` and of the frame `γ f` share vectors, and the leading minor of order `j` of |
| 206 | their matrix of products is nonzero. Then there are at most `b ^ (366 n⁴ f')` matrices |
| 207 | `S.sharedVectors j γ`. Here `b = S.b` is the size parameter of `S`, `n = ϱ + 1` the length of the |
| 208 | frame and `f'` the number of infinite places. -/ |
| 209 | lemma IsFrameSet.encard_range_sharedVectors_le (hB : S.IsFrameSet c B) |
| 210 | (h_cellRank : ∀ p ∈ B, S.HasCellRank j p.2) : |
| 211 | (Set.range fun p : B ↦ S.sharedVectors j p.val.2).encard ≤ |
| 212 | ENNReal.ofReal (S.b ^ (366 * 𝔰.n ^ 4 * numInfPlaces E)) := by |
| 213 | -- The entries are integral and bounded at every infinite place. |
| 214 | have hb : 1000 ≤ S.b := S.thousand_le_b |
| 215 | refine (encard_le_of_isIntegral_norm_le (r := S.b ^ (182 * 𝔰.n ^ 2)) Function.uncurry ?_ |
| 216 | Function.uncurry_injective.injOn).trans (ofReal_le_ofReal ?_) |
| 217 | · rintro _ ⟨⟨p, hp⟩, rfl⟩ ⟨a, k⟩ |
| 218 | obtain ⟨s, h_over⟩ := hB.mem_termsOver p hp |
| 219 | exact ⟨isIntegral_sharedVectors h_over a k, |
| 220 | fun v ↦ (h_cellRank p hp).norm_sharedVectors_le (hB.near p hp) v a k⟩ |
| 221 | · grw [one_add_two_mul_pow_le_pow (m' := 183 * 𝔰.n ^ 2) (by linarith) (by lia), ← pow_mul, |
| 222 | card_prod, Fintype.card_fin, Fintype.card_fin] |
| 223 | exact pow_le_pow_right₀ (by linarith) (by lia) |
| 224 | |
| 225 | omit [S.IsAdmissible] in |
| 226 | /-- Let `γ` and `γ'` have the same integral matrix of products `Z` with nonzero leading minor of |
| 227 | order `j`, the same shared vectors and the same part in the anisotropic space `X₀`. Let `c`, `c'`, |
| 228 | `c''` be any three classes, with representatives `h_c`, `h_c'`, `h_c''`. If the first `ϱ` rows of |
| 229 | the frames of `h_c⁻¹ γ h_c'` and `h_c⁻¹ γ' h_c''` are congruent modulo `d = S.frameModulus j Z`, |
| 230 | then some `u ∈ S.classUnipotent₀ c`, a move for `c`, carries the frame of `γ` to the frame of |
| 231 | `γ'`. -/ |
| 232 | private lemma exists_frameImage_mul_eq_of_sub_mem {γ γ' : S.G E} {c' c'' : S.Classes} |
| 233 | (hγ : S.frameProducts γ = Z) (hγ' : S.frameProducts γ' = Z) |
| 234 | (hZ_int : ∀ a b : Fin (𝔰.ϱ + 1), IsIntegral ℤ (Z a b)) (h_minor : leadingMinor Z j ≠ 0) |
| 235 | (h_shared : S.sharedVectors j γ' = S.sharedVectors j γ) |
| 236 | (h_part : framePartX₀ γ' = framePartX₀ γ) |
| 237 | {d : (𝔸f E)ˣ} (hd : d.val = ((S.frameModulus j Z : E) : 𝔸f E)) |
| 238 | (h_congr : ∀ i : Fin 𝔰.ϱ, (frameImage (S.translateByClassReps c c'' γ').val.val).toRows₁ i - |
| 239 | (frameImage (S.translateByClassReps c c' γ).val.val).toRows₁ i ∈ d • intVectors (Ô E) |
| 240 | (Fin 𝔰.n)) : |
| 241 | ∃ u ∈ S.classUnipotent₀ c, frameImage (u * γ).val.val = frameImage γ'.val.val := by |
| 242 | subst hγ |
| 243 | have hd_ne : S.frameModulus j (S.frameProducts γ) ≠ 0 := frameModulus_ne_zero h_minor |
| 244 | let ξ : Matrix (Fin 𝔰.ϱ) (Fin 𝔰.n) E := (frameImage γ'.val.val - frameImage γ.val.val).toRows₁ |
| 245 | -- The change to the lattice basis keeps the coordinates in the isotropic space. |
| 246 | have h_diff : (frameImage (S.translateByClassReps c c'' γ').val.val).toRows₁ - |
| 247 | (frameImage (S.translateByClassReps c c' γ).val.val).toRows₁ = finAdeleMatrix ξ := by |
| 248 | simp [ξ, frameImage_translateByClassReps, classCoord_eq_fromBlocks, ← ext_iff, Matrix.mul_apply, |
| 249 | Matrix.one_apply] |
| 250 | have hξ : IsIntMatrix ((Ô E).comap (algebraMap E (𝔸f E))) |
| 251 | ((S.frameModulus j (S.frameProducts γ))⁻¹ • ξ) := by |
| 252 | intro i a |
| 253 | have h_row : finAdeleMatrix ξ i ∈ d • intVectors (Ô E) (Fin 𝔰.n) := by |
| 254 | rw [← h_diff] |
| 255 | exact h_congr i |
| 256 | exact (inv_smul_mem_of_finAdele_mem_smul (v := ξ i) hd_ne hd h_row) a |
| 257 | exact exists_mem_classUnipotent₀_frameImage_mul_eq c hγ' hZ_int h_minor h_shared |
| 258 | (apply_inr_besselFrame_eq hγ' h_part) hξ (smul_inv_smul₀ hd_ne ξ).symm |
| 259 | |
| 260 | omit [S.IsAdmissible] in |
| 261 | /-- Let `E` be a CM field with a primitive 5040-th root of unity and `S` admissible filling data |
| 262 | over `E`. Take near terms of cell rank `j` (from the index `j` on, the flags of the standard frame |
| 263 | and of the frame of the term share vectors, and the leading minor of order `j` of their matrix of |
| 264 | products is nonzero), with frames different modulo moves and one matrix of products `Z`. Let `Y` be |
| 265 | the first `j` rows of `Z` completed by rows of `1`. Suppose that the terms have the same matrix of |
| 266 | shared vectors (the coordinates in the isotropic space of the columns `k ≥ j` of `γ f · adj Y`, |
| 267 | which lie in the spans of both frames) and that their frames have one part in the anisotropic space |
| 268 | `X₀` after the moves `u`, unipotent elements of level `M` that fix the standard frame. Let |
| 269 | `d = M det (Y Yᴴ)`. Then there are at most `[d] ^ (n ϱ)` terms, where `[d]` is the generalised |
| 270 | index and `n = ϱ + 1`. -/ |
| 271 | lemma IsFrameSet.encard_le_of_sharedVectors_eq (hB : S.IsFrameSet c B) |
| 272 | (h_cellRank : ∀ p ∈ B, S.HasCellRank j p.2) (hZ : ∀ p ∈ B, S.frameProducts p.2 = Z) |
| 273 | (h_shared : ∀ p ∈ B, ∀ q ∈ B, S.sharedVectors j p.2 = S.sharedVectors j q.2) |
| 274 | {u : S.Classes × S.G E → S.G E} (hu : ∀ p ∈ B, u p ∈ S.classUnipotent₀ c) |
| 275 | (h_part : ∀ p ∈ B, ∀ q ∈ B, framePartX₀ (u p * p.2) = framePartX₀ (u q * q.2)) |
| 276 | {d : (𝔸f E)ˣ} (hd : d.val = ((S.frameModulus j Z : E) : 𝔸f E)) : |
| 277 | B.encard ≤ ENNReal.ofReal ((genIndex d.val ^ 𝔰.n) ^ 𝔰.ϱ) := by |
| 278 | -- A term is determined by the first `ϱ` rows of its moved frame modulo `d`. |
| 279 | obtain rfl | ⟨p₁, hp₁⟩ := B.eq_empty_or_nonempty |
| 280 | · simp |
| 281 | obtain rfl : S.frameProducts p₁.2 = Z := hZ p₁ hp₁ |
| 282 | have hZ_int (a b : Fin (𝔰.ϱ + 1)) : IsIntegral ℤ (S.frameProducts p₁.2 a b) := |
| 283 | hB.isIntegral_frameProducts hp₁ a b |
| 284 | have h_fix (p : S.Classes × S.G E) (hp : p ∈ B) : u p ∈ besselU0 := |
| 285 | mem_besselU0_of_mem_classUnipotent₀ (hu p hp) |
| 286 | have hZ_moved (p : S.Classes × S.G E) (hp : p ∈ B) : |
| 287 | S.frameProducts (u p * p.2) = S.frameProducts p₁.2 := |
| 288 | (frameProducts_mul_of_mem_besselU0 (h_fix p hp) p.2).trans (hZ p hp) |
| 289 | have hd_int : d.val ∈ Ô E := by simpa only [hd] using |
| 290 | frameModulus_mem_integralAdeles_of_isIntegral hZ_int |
| 291 | let block (p : S.Classes × S.G E) : Matrix (Fin 𝔰.ϱ) (Fin 𝔰.n) (𝔸f E) := |
| 292 | (frameImage (S.translateByClassReps c p.1 (u p * p.2)).val.val).toRows₁ |
| 293 | have h_block_int (p : S.Classes × S.G E) (hp : p ∈ B) (i : Fin 𝔰.ϱ) : |
| 294 | block p i ∈ intVectors (Ô E) (Fin 𝔰.n) := by |
| 295 | obtain ⟨_, h_over⟩ := hB.mem_termsOver p hp |
| 296 | exact fun a ↦ termsOver.isIntMatrix_translateByClassReps |
| 297 | (mul_mem_termsOver_of_mem_classUnipotent₀ (hu p hp) h_over) (.inl i) (𝔰.besselFrame a) |
| 298 | have h_unique (p : S.Classes × S.G E) (hp : p ∈ B) (q : S.Classes × S.G E) (hq : q ∈ B) |
| 299 | (h_congr : ∀ i : Fin 𝔰.ϱ, block q i - block p i ∈ d • intVectors (Ô E) (Fin 𝔰.n)) : |
| 300 | p = q := by |
| 301 | have h_shared_moved : S.sharedVectors j (u q * q.2) = S.sharedVectors j (u p * p.2) := by |
| 302 | rw [(h_cellRank q hq).sharedVectors_mul_of_mem_besselU0 (h_fix q hq), |
| 303 | (h_cellRank p hp).sharedVectors_mul_of_mem_besselU0 (h_fix p hp), h_shared q hq p hp] |
| 304 | obtain ⟨v, hv, h_frame⟩ : ∃ v ∈ S.classUnipotent₀ c, |
| 305 | frameImage (v * (u p * p.2)).val.val = frameImage (u q * q.2).val.val := |
| 306 | exists_frameImage_mul_eq_of_sub_mem (hZ_moved p hp) (hZ_moved q hq) hZ_int |
| 307 | (h_cellRank p₁ hp₁).leadingMinor_ne_zero h_shared_moved (h_part q hq p hp) hd h_congr |
| 308 | rw [← mul_assoc] at h_frame |
| 309 | exact hB.separated p hp q hq (v * u p) (mul_mem hv (hu p hp)) (u q) (hu q hq) h_frame |
| 310 | calc (B.encard : ℝ≥0∞) |
| 311 | ≤ ENNReal.ofReal (submoduleIndex (d • intVectors (Ô E) (Fin 𝔰.n)) |
| 312 | (intVectors (Ô E) (Fin 𝔰.n)) ^ card (Fin 𝔰.ϱ)) * 1 := by |
| 313 | refine encard_le_of_colouring block (submoduleIndex_smul_ne_zero hd_int) h_block_int |
| 314 | fun C hC _ _ h_congr ↦ ?_ |
| 315 | exact_mod_cast Set.encard_le_one_iff.2 fun p q hp hq ↦ |
| 316 | h_unique p (hC hp) q (hC hq) (h_congr q hq p hp) |
| 317 | _ = ENNReal.ofReal ((genIndex d.val ^ 𝔰.n) ^ 𝔰.ϱ) := by |
| 318 | rw [submoduleIndex_smul_intVectors hd_int, Fintype.card_fin, Fintype.card_fin, mul_one] |
| 319 | |
| 320 | /-- **The part in the isotropic space.** Let `E` be a CM field with a primitive 5040-th root of |
| 321 | unity and `S` admissible filling data over `E`. Let `B` be a frame set for the class `c`: near terms |
| 322 | whose frames differ modulo moves, the unipotent elements of level `M` that fix the standard frame. |
| 323 | Suppose the terms of `B` all have cell rank `j`: from the index `j` on, the flags of the standard |
| 324 | frame and of the frame of the term share vectors, and the leading minor of order `j` of their matrix |
| 325 | of products is nonzero. Suppose also that they all have the matrix of products `Z`. Finally, suppose |
| 326 | that after moves `u` in `S.classUnipotent₀ c` their frames all have one part in the anisotropic |
| 327 | space `X₀`. Then `B` has at most `b ^ (366 n⁴ f) · [d] ^ (n ϱ)` terms. Here `b = S.b`, `n = ϱ + 1` |
| 328 | is the length of the frame and `f` the number of infinite places. `[d]` is the generalised index of |
| 329 | `d = S.frameModulus j Z = M det(Y Yᴴ)`, where `Y` is the first `j` rows of `Z` completed by rows of |
| 330 | `1`. -/ |
| 331 | lemma IsFrameSet.encard_le_of_framePartX₀_eq (hB : S.IsFrameSet c B) |
| 332 | (h_cellRank : ∀ p ∈ B, S.HasCellRank j p.2) (hZ : ∀ p ∈ B, S.frameProducts p.2 = Z) |
| 333 | {u : S.Classes × S.G E → S.G E} (hu : ∀ p ∈ B, u p ∈ S.classUnipotent₀ c) |
| 334 | (h_part : ∀ p ∈ B, ∀ q ∈ B, framePartX₀ (u p * p.2) = framePartX₀ (u q * q.2)) |
| 335 | {d : (𝔸f E)ˣ} (hd : d.val = ((S.frameModulus j Z : E) : 𝔸f E)) : |
| 336 | B.encard ≤ ENNReal.ofReal (S.b ^ (366 * 𝔰.n ^ 4 * numInfPlaces E)) * |
| 337 | ENNReal.ofReal ((genIndex d.val ^ 𝔰.n) ^ 𝔰.ϱ) := by |
| 338 | refine encard_le_of_encard_range_le (fun p : B ↦ S.sharedVectors j p.val.2) |
| 339 | (hB.encard_range_sharedVectors_le h_cellRank) |
| 340 | (R := fun p q : S.Classes × S.G E ↦ S.sharedVectors j p.2 = S.sharedVectors j q.2) |
| 341 | (fun _ _ h ↦ h) ?_ |
| 342 | intro D hD _ _ h_shared |
| 343 | exact (hB.mono hD).encard_le_of_sharedVectors_eq (fun p hp ↦ h_cellRank p (hD hp)) |
| 344 | (fun p hp ↦ hZ p (hD hp)) h_shared (fun p hp ↦ hu p (hD hp)) |
| 345 | (fun p hp q hq ↦ h_part p (hD hp) q (hD hq)) hd |
| 346 | |
| 347 | /-- **The part in `X₀`, the anisotropic space.** Let `E` be a CM field with a primitive 5040-th root |
| 348 | of unity and `S` admissible filling data over `E`. Take near terms of cell rank `j`, with frames |
| 349 | different modulo moves and one matrix of products `Z`, whose leading minor of order `j` is `δ`. |
| 350 | Suppose that after the moves `u` the parts in `X₀` of the frames have the same products with the `r` |
| 351 | independent columns of `y`, and `r + l = k`, the rank of `X₀`. Then there are at most |
| 352 | `[d] ^ (l n) · b ^ (366 n⁴ f) · [d'] ^ (n ϱ)` terms, where `d = M δ`, `d' = S.frameModulus j Z`, |
| 353 | `[·]` is the generalised index, `b = S.b`, `n = ϱ + 1` the length of the frame and `f` the number of |
| 354 | infinite places. -/ |
| 355 | lemma IsFrameSet.encard_le_of_conjTranspose_mul_eq (hB : S.IsFrameSet c B) |
| 356 | (h_cellRank : ∀ p ∈ B, S.HasCellRank j p.2) (hZ : ∀ p ∈ B, S.frameProducts p.2 = Z) |
| 357 | {p₀ : S.Classes × S.G E} (hp₀ : p₀ ∈ B) (hy : HasLeftInv y) (h_rank : r + l = 𝔰.k) |
| 358 | {u : S.Classes × S.G E → S.G E} (hu : ∀ p ∈ B, u p ∈ S.classUnipotent₀ c) |
| 359 | (h_orth : ∀ p ∈ B, (framePartX₀ (u p * p.2))ᴴ * y = (framePartX₀ (u p₀ * p₀.2))ᴴ * y) |
| 360 | {d d' : (𝔸f E)ˣ} (hd : d.val = ((S.M * leadingMinor Z j : E) : 𝔸f E)) |
| 361 | (hd' : d'.val = ((S.frameModulus j Z : E) : 𝔸f E)) : |
| 362 | B.encard ≤ ENNReal.ofReal ((genIndex d.val ^ l) ^ 𝔰.n) * |
| 363 | (ENNReal.ofReal (S.b ^ (366 * 𝔰.n ^ 4 * numInfPlaces E)) * |
| 364 | ENNReal.ofReal ((genIndex d'.val ^ 𝔰.n) ^ 𝔰.ϱ)) := by |
| 365 | -- The parts `x p` in `X₀` differ from `x p₀` by vectors of the lattice `P` orthogonal to `y`; |
| 366 | -- sort them modulo `d P`. |
| 367 | let x (p : S.Classes × S.G E) : Matrix 𝔰.κ (Fin (𝔰.ϱ + 1)) E := framePartX₀ (u p * p.2) |
| 368 | let P : Submodule (Ô E) (𝔰.κ → 𝔸f E) := S.complementLattice c y |
| 369 | have hZ_moved (p : S.Classes × S.G E) (hp : p ∈ B) : S.frameProducts (u p * p.2) = Z := |
| 370 | (frameProducts_mul_of_mem_besselU0 (mem_besselU0_of_mem_classUnipotent₀ (hu p hp)) p.2).trans |
| 371 | (hZ p hp) |
| 372 | have hZ_int (a b : Fin (𝔰.ϱ + 1)) : IsIntegral ℤ (Z a b) := |
| 373 | by simpa [hZ p₀ hp₀] using hB.isIntegral_frameProducts hp₀ a b |
| 374 | have hd_int : d.val ∈ Ô E := by |
| 375 | rw [hd, ← det_paddedLeading] |
| 376 | exact mul_mem (natCast_mem ((Ô E).comap (algebraMap E (𝔸f E))) S.M) |
| 377 | (isIntMatrix_paddedLeading hZ_int).det_mem |
| 378 | have h_mem (p : S.Classes × S.G E) (hp : p ∈ B) (i : Fin (𝔰.ϱ + 1)) : |
| 379 | ((↑) : E → 𝔸f E) ∘ (x p - x p₀).col i ∈ P := by |
| 380 | obtain ⟨s, h_over⟩ : ∃ s : S.ResidueGL, p.2 ∈ S.termsOver c s p.1 := hB.mem_termsOver p hp |
| 381 | obtain ⟨s₀, h_over₀⟩ : ∃ s : S.ResidueGL, p₀.2 ∈ S.termsOver c s p₀.1 := hB.mem_termsOver p₀ hp₀ |
| 382 | have h_zero : yᴴ * (x p - x p₀) = 0 := by |
| 383 | rw [← conjTranspose_eq_zero, conjTranspose_mul, conjTranspose_conjTranspose, |
| 384 | conjTranspose_sub, Matrix.sub_mul, h_orth p hp, sub_self] |
| 385 | have h_col : yᴴ *ᵥ (x p - x p₀).col i = 0 := funext fun a ↦ congrFun₂ h_zero a i |
| 386 | exact coe_mem_complementLattice h_col |
| 387 | (col_framePartX₀_sub_mem (mul_mem_termsOver_of_mem_classUnipotent₀ (hu p₀ hp₀) h_over₀) |
| 388 | (mul_mem_termsOver_of_mem_classUnipotent₀ (hu p hp) h_over) |
| 389 | ((hZ_moved p hp).trans (hZ_moved p₀ hp₀).symm) i) |
| 390 | have h_index : (submoduleIndex (d • P) P : ℝ) = genIndex d.val ^ l := |
| 391 | submoduleIndex_smul_complementLattice hy h_rank hd_int |
| 392 | have h_index_ne : submoduleIndex (d • P) P ≠ 0 := by |
| 393 | exact_mod_cast h_index.trans_ne (pow_pos (genIndex_pos d) l).ne' |
| 394 | have h_factor : ENNReal.ofReal ((genIndex d.val ^ l) ^ 𝔰.n) = |
| 395 | ENNReal.ofReal ((submoduleIndex (d • P) P : ℝ) ^ card (Fin 𝔰.n)) := by |
| 396 | rw [h_index, Fintype.card_fin] |
| 397 | rw [h_factor] |
| 398 | refine encard_le_of_colouring (fun p i ↦ ((↑) : E → 𝔸f E) ∘ (x p - x p₀).col i) h_index_ne h_mem |
| 399 | fun D hD p₁ hp₁ h_congr ↦ ?_ |
| 400 | -- In one class `D` the parts in `X₀` are congruent modulo `d`; a move removes the difference. |
| 401 | have h_join : ∀ p ∈ D, ∃ u' ∈ S.classUnipotent₀ c, framePartX₀ (u' * p.2) = x p₁ := by |
| 402 | intro p hp |
| 403 | have h_multiple (i : Fin (𝔰.ϱ + 1)) : |
| 404 | ((↑) : E → 𝔸f E) ∘ (x p - x p₁).col i ∈ d • S.classLatticeX₀ c := by |
| 405 | obtain ⟨v, hv, h_value⟩ : ∃ v ∈ P, d.val • v = |
| 406 | ((↑) : E → 𝔸f E) ∘ (x p - x p₀).col i - ((↑) : E → 𝔸f E) ∘ (x p₁ - x p₀).col i := |
| 407 | (Submodule.mem_smul_pointwise_iff_exists _ _ _).1 (h_congr p hp p₁ hp₁ i) |
| 408 | exact ⟨v, saturatedLattice_le _ _ hv, h_value.trans (by ext a; simp)⟩ |
| 409 | have h_moved_cellRank (q : S.Classes × S.G E) (hq : q ∈ B) : S.HasCellRank j (u q * q.2) := |
| 410 | (h_cellRank q hq).mul_of_mem_classUnipotent₀ (hu q hq) |
| 411 | have hZ₁ : S.frameProducts (u p₁ * p₁.2) = Z := hZ_moved p₁ (hD hp₁) |
| 412 | have hZ_eq : S.frameProducts (u p * p.2) = S.frameProducts (u p₁ * p₁.2) := |
| 413 | (hZ_moved p (hD hp)).trans hZ₁.symm |
| 414 | obtain ⟨v, hv, h_moved⟩ : ∃ v ∈ S.classUnipotent₀ c, framePartX₀ (v * (u p * p.2)) = x p₁ := |
| 415 | (h_moved_cellRank p₁ (hD hp₁)).exists_framePartX₀_mul_eq_of_sub_mem |
| 416 | (h_moved_cellRank p (hD hp)) hZ_eq (by rw [hZ₁, hd]) (by rwa [hZ₁]) h_multiple |
| 417 | exact ⟨v * u p, mul_mem hv (hu p (hD hp)), by rwa [mul_assoc]⟩ |
| 418 | choose! u' hu' h_eq using h_join |
| 419 | exact (hB.mono hD).encard_le_of_framePartX₀_eq (fun p hp ↦ h_cellRank p (hD hp)) |
| 420 | (fun p hp ↦ hZ p (hD hp)) hu' (fun p hp q hq ↦ (h_eq p hp).trans (h_eq q hq).symm) hd' |
| 421 | |
| 422 | /-- **Lifts of `L`.** Let `E` be a CM field with a primitive 5040-th root of unity and `S` |
| 423 | admissible filling data over `E`. Take near terms `γ` of cell rank `j`, with frames different modulo |
| 424 | moves and one matrix of products `Z`, whose lattices `L_γ^M` contain the lattice `L ⊆ Λ ∩ X₀` of |
| 425 | corank `l` with the basis `y a`. Let `d` be `M` times the leading minor of order `j` of `Z`, and |
| 426 | `d' = S.frameModulus j Z`. Then there are at most `disc(L) ^ (2 ϱ) · [d] ^ (l n) · b ^ (366 n⁴ |
| 427 | f) · [d'] ^ (n ϱ)` terms. Here `[d] = genIndex d` is the inverse of the factor by which `d` scales |
| 428 | Haar measure, `disc(L)` is the square root of the generalised index of the Gram determinant of a |
| 429 | basis of `L`, `b = S.b`, `n = ϱ + 1` and `f` is the number of infinite places. -/ |
| 430 | lemma IsFrameSet.encard_le_of_le_termLattice (hB : S.IsFrameSet c B) |
| 431 | (h_cellRank : ∀ p ∈ B, S.HasCellRank j p.2) (hZ : ∀ p ∈ B, S.frameProducts p.2 = Z) |
| 432 | (hy : HasLeftInv y) (h_rank : r + l = 𝔰.k) {a : GL (Fin r) (𝔸f E)} |
| 433 | (h_le_classLattice : colLattice (Ô E) (finAdeleMatrix y * a.val) ≤ S.classLatticeX₀ c) |
| 434 | (h_le_termLattice : |
| 435 | ∀ p ∈ B, colLattice (Ô E) (finAdeleMatrix y * a.val) ≤ S.termLattice c p.1 p.2) |
| 436 | {d d' : (𝔸f E)ˣ} (hd : d.val = ((S.M * leadingMinor Z j : E) : 𝔸f E)) |
| 437 | (hd' : d'.val = ((S.frameModulus j Z : E) : 𝔸f E)) : |
| 438 | B.encard ≤ |
| 439 | ENNReal.ofReal ((discriminant r (colLattice (Ô E) (finAdeleMatrix y * a.val)) ^ 2) ^ 𝔰.ϱ) * |
| 440 | (ENNReal.ofReal ((genIndex d.val ^ l) ^ 𝔰.n) * |
| 441 | (ENNReal.ofReal (S.b ^ (366 * 𝔰.n ^ 4 * numInfPlaces E)) * |
| 442 | ENNReal.ofReal ((genIndex d'.val ^ 𝔰.n) ^ 𝔰.ϱ))) := by |
| 443 | -- Sort the rows of the lifts modulo the lattice `K` spanned by the Gram matrix of the basis of |
| 444 | -- `L`; its index is the square of the discriminant. |
| 445 | have h_lift : ∀ p ∈ B, ∃ w : Matrix (Fin 𝔰.ϱ) (Fin r) E, IsLift p.2 y a w := |
| 446 | fun p hp ↦ exists_isLift (h_le_termLattice p hp) |
| 447 | choose! w hw using h_lift |
| 448 | let K : Submodule (Ô E) (Fin r → 𝔸f E) := |
| 449 | colLattice (Ô E) ((finAdeleMatrix y * a.val)ᴴ * (finAdeleMatrix y * a.val))ᵀ |
| 450 | have h_index : (submoduleIndex K (intVectors (Ô E) (Fin r)) : ℝ) = |
| 451 | discriminant r (colLattice (Ô E) (finAdeleMatrix y * a.val)) ^ 2 := |
| 452 | submoduleIndex_gram_eq_discriminant_sq hy h_le_classLattice |
| 453 | have h_index_ne : submoduleIndex K (intVectors (Ô E) (Fin r)) ≠ 0 := by |
| 454 | exact_mod_cast h_index.trans_ne |
| 455 | (pow_pos (IsLatticeOfRank.discriminant_pos ⟨y, a, hy, rfl⟩) 2).ne' |
| 456 | have h_factor : |
| 457 | ENNReal.ofReal ((discriminant r (colLattice (Ô E) (finAdeleMatrix y * a.val)) ^ 2) ^ 𝔰.ϱ) = |
| 458 | ENNReal.ofReal ((submoduleIndex K (intVectors (Ô E) (Fin r)) : ℝ) ^ card (Fin 𝔰.ϱ)) := by |
| 459 | rw [h_index, Fintype.card_fin] |
| 460 | rw [h_factor] |
| 461 | refine encard_le_of_colouring (fun p i ↦ (finAdeleMatrix (w p) * a.val) i) h_index_ne |
| 462 | (fun p hp i ↦ (hw p hp).isIntMatrix i) fun D hD p₁ hp₁ h_congr ↦ ?_ |
| 463 | -- In one class `D` a move gives every frame the lift of `p₁`. |
| 464 | have h_join : ∀ p ∈ D, ∃ u ∈ S.classUnipotent₀ c, |
| 465 | (framePartX₀ (u * p.2))ᴴ * y = -((S.M : E) • ((isotropicRows Z)ᴴ * w p₁)) := by |
| 466 | intro p hp |
| 467 | rw [← hZ p (hD hp)] |
| 468 | exact (hw p (hD hp)).exists_conjTranspose_framePartX₀_mul_eq_neg hy h_le_classLattice |
| 469 | (h_congr p₁ hp₁ p hp) |
| 470 | choose! u hu h_eq using h_join |
| 471 | exact (hB.mono hD).encard_le_of_conjTranspose_mul_eq (fun p hp ↦ h_cellRank p (hD hp)) |
| 472 | (fun p hp ↦ hZ p (hD hp)) hp₁ hy h_rank hu |
| 473 | (fun p hp ↦ (h_eq p hp).trans (h_eq p₁ hp₁).symm) hd hd' |
| 474 | |
| 475 | |
| 476 | /-- The terms of a frame set with one cell rank `j` and one matrix of products `Z`, whose lattices |
| 477 | `L_γ^M` contain a lattice `L` of corank `l` and discriminant at most `b ^ (n³ f)`, number at most |
| 478 | `b ^ ((366 n⁴ + 2 n³ (ϱ + l n + n ϱ)) f)`; here `n = ϱ + 1` is the length of the frame and `f` the |
| 479 | number of infinite places. -/ |
| 480 | private lemma IsFrameSet.encard_le_of_frameProducts_eq (hB : S.IsFrameSet c B) |
| 481 | (h_cellRank : ∀ p ∈ B, S.HasCellRank j p.2) {p₀ : S.Classes × S.G E} (hp₀ : p₀ ∈ B) |
| 482 | (hZ : ∀ p ∈ B, S.frameProducts p.2 = S.frameProducts p₀.2) (hy : HasLeftInv y) |
| 483 | (h_rank : r + l = 𝔰.k) {a : GL (Fin r) (𝔸f E)} |
| 484 | (h_le_classLattice : colLattice (Ô E) (finAdeleMatrix y * a.val) ≤ S.classLatticeX₀ c) |
| 485 | (h_disc : discriminant r (colLattice (Ô E) (finAdeleMatrix y * a.val)) ≤ S.discriminantBound) |
| 486 | (h_le_termLattice : |
| 487 | ∀ p ∈ B, colLattice (Ô E) (finAdeleMatrix y * a.val) ≤ S.termLattice c p.1 p.2) : |
| 488 | B.encard ≤ ENNReal.ofReal (S.b ^ ((366 * 𝔰.n ^ 4 + |
| 489 | 2 * 𝔰.n ^ 3 * (𝔰.ϱ + l * 𝔰.n + 𝔰.n * 𝔰.ϱ)) * numInfPlaces E)) := by |
| 490 | have hb : 1 ≤ S.b := S.one_le_b |
| 491 | let N : ℝ := S.b ^ (2 * 𝔰.n ^ 3 * numInfPlaces E) |
| 492 | have h_pos : 0 < discriminant r (colLattice (Ô E) (finAdeleMatrix y * a.val)) := |
| 493 | IsLatticeOfRank.discriminant_pos ⟨y, a, hy, rfl⟩ |
| 494 | have h_disc_sq : discriminant r (colLattice (Ô E) (finAdeleMatrix y * a.val)) ^ 2 ≤ N := by |
| 495 | grw [h_disc, discriminantBound, ← pow_mul] |
| 496 | exact pow_le_pow_right₀ hb (by lia) |
| 497 | have h_minor : leadingMinor (S.frameProducts p₀.2) j ≠ 0 := |
| 498 | (h_cellRank p₀ hp₀).leadingMinor_ne_zero |
| 499 | have hM_ne : (S.M : E) ≠ 0 := by simp [S.levelPrime_prime_and_ne, Nat.Prime.ne_zero] |
| 500 | let d : (𝔸f E)ˣ := principalIdele |
| 501 | (Units.mk0 (S.M * leadingMinor (S.frameProducts p₀.2) j) (mul_ne_zero hM_ne h_minor)) |
| 502 | let d' : (𝔸f E)ˣ := principalIdele |
| 503 | (Units.mk0 (S.frameModulus j (S.frameProducts p₀.2)) (S.frameModulus_ne_zero h_minor)) |
| 504 | have hd_pos : 0 < genIndex d.val := genIndex_pos d |
| 505 | have hd'_pos : 0 < genIndex d'.val := genIndex_pos d' |
| 506 | have hd_le : genIndex d.val ≤ N := (hB.near p₀ hp₀).genIndex_M_mul_leadingMinor_le j |
| 507 | have hd'_le : genIndex d'.val ≤ N := (hB.near p₀ hp₀).genIndex_frameModulus_le |
| 508 | -- The three rounds, with every index replaced by the common bound `N = b ^ (2 n³ f)`. |
| 509 | grw [hB.encard_le_of_le_termLattice (d := d) (d' := d') h_cellRank hZ hy h_rank h_le_classLattice |
| 510 | h_le_termLattice (hd := rfl) (hd' := rfl), h_disc_sq, hd_le, hd'_le] |
| 511 | simp (disch := positivity) only [← ofReal_mul] |
| 512 | simp only [N, ← pow_mul, ← pow_add] |
| 513 | exact le_of_eq (by ring_nf) |
| 514 | |
| 515 | /-- **Frames over a lattice.** Let `L ⊆ Λ ∩ X₀` be a lattice of corank `l` and discriminant at most |
| 516 | `b ^ (n³ f)`, and `B` a frame set for the class `c`: near terms `(c', γ)` with `γ` over some block |
| 517 | `(c, s, c')` (that is, `h_c⁻¹ γ h_c'` is integral with reduction `s`), whose frames are different |
| 518 | modulo moves. Suppose that each term has a cell rank `j` and that `L ⊆ L_γ^M`. Then `B` has at most |
| 519 | `b ^ (2000 n⁶ (l + 1) f)` elements. Here `L_γ^M` is the lattice of the `v ∈ Λ ∩ X₀` such that some |
| 520 | vector of `v + M (Λ ∩ X)` is orthogonal to the frame of `γ`, where `Λ` is the lattice of `c`, `X` |
| 521 | the isotropic and `X₀` the anisotropic space; `b = S.b` is the size parameter, `n` the length of the |
| 522 | frame and `f` the number of infinite places. -/ |
| 523 | theorem IsFrameSet.encard_le (hB : S.IsFrameSet c B) |
| 524 | (h_cellRank : ∀ p ∈ B, ∃ j : Fin (𝔰.ϱ + 2), S.HasCellRank j p.2) |
| 525 | (h_rank : r + l = 𝔰.k) {L : Submodule (Ô E) (𝔰.κ → 𝔸f E)} (hL : IsLatticeOfRank r L) |
| 526 | (h_le_classLattice : L ≤ S.classLatticeX₀ c) (h_disc : discriminant r L ≤ S.discriminantBound) |
| 527 | (h_le_termLattice : ∀ p ∈ B, L ≤ S.termLattice c p.1 p.2) : |
| 528 | B.encard ≤ ENNReal.ofReal (S.b ^ (2000 * 𝔰.n ^ 6 * (l + 1) * numInfPlaces E)) := by |
| 529 | -- Fix the cell rank and the matrix of products; then sort in three rounds. |
| 530 | have hb : 1 ≤ S.b := S.one_le_b |
| 531 | obtain ⟨y, a, hy, rfl⟩ : ∃ (y : Matrix 𝔰.κ (Fin r) E) (a : GL (Fin r) (𝔸f E)), |
| 532 | HasLeftInv y ∧ colLattice (Ô E) (finAdeleMatrix y * a.val) = L := hL |
| 533 | choose! rankOf h_rankOf using h_cellRank |
| 534 | have h_ranks : (Set.range fun p : B ↦ rankOf p).encard ≤ |
| 535 | ENNReal.ofReal (S.b ^ (2 * numInfPlaces E)) := by |
| 536 | grw [Set.encard_le_card, ← varrho_add_two_le_b_pow, ofReal_natCast] |
| 537 | simp |
| 538 | let count : ℝ≥0∞ := ENNReal.ofReal (S.b ^ ((366 * 𝔰.n ^ 4 + |
| 539 | 2 * 𝔰.n ^ 3 * (𝔰.ϱ + l * 𝔰.n + 𝔰.n * 𝔰.ϱ)) * numInfPlaces E)) |
| 540 | have h_one_rank (j : Fin (𝔰.ϱ + 2)) (D : Set (S.Classes × S.G E)) (hD : D ⊆ B) |
| 541 | (h_cellRank : ∀ p ∈ D, S.HasCellRank j p.2) : |
| 542 | D.encard ≤ ENNReal.ofReal (S.b ^ (270 * 𝔰.n ^ 3 * numInfPlaces E)) * count := by |
| 543 | refine encard_le_of_encard_range_le (fun p : D ↦ S.frameProducts p.val.2) |
| 544 | (hB.mono hD).encard_range_frameProducts_le |
| 545 | (R := fun p q ↦ S.frameProducts p.2 = S.frameProducts q.2) (fun _ _ h ↦ h) ?_ |
| 546 | intro C hC p₀ hp₀ hZ |
| 547 | exact (hB.mono (hC.trans hD)).encard_le_of_frameProducts_eq |
| 548 | (fun p hp ↦ h_cellRank p (hC hp)) hp₀ (fun p hp ↦ hZ p hp p₀ hp₀) hy h_rank |
| 549 | h_le_classLattice h_disc fun p hp ↦ h_le_termLattice p (hD (hC hp)) |
| 550 | calc (B.encard : ℝ≥0∞) |
| 551 | ≤ ENNReal.ofReal (S.b ^ (2 * numInfPlaces E)) * |
| 552 | (ENNReal.ofReal (S.b ^ (270 * 𝔰.n ^ 3 * numInfPlaces E)) * count) := by |
| 553 | refine encard_le_of_encard_range_le (fun p : B ↦ rankOf p) h_ranks |
| 554 | (R := fun p q ↦ rankOf p = rankOf q) (fun _ _ h ↦ h) ?_ |
| 555 | intro D hD p₀ hp₀ h_same |
| 556 | refine h_one_rank (rankOf p₀) D hD fun p hp ↦ ?_ |
| 557 | rw [← h_same p hp p₀ hp₀] |
| 558 | exact h_rankOf p (hD hp) |
| 559 | _ = ENNReal.ofReal (S.b ^ ((2 + 270 * 𝔰.n ^ 3 + (366 * 𝔰.n ^ 4 + |
| 560 | 2 * 𝔰.n ^ 3 * (𝔰.ϱ + l * 𝔰.n + 𝔰.n * 𝔰.ϱ))) * numInfPlaces E)) := by |
| 561 | simp (disch := positivity) only [count, ← ofReal_mul, ← pow_add] |
| 562 | ring_nf |
| 563 | _ ≤ ENNReal.ofReal (S.b ^ (2000 * 𝔰.n ^ 6 * (l + 1) * numInfPlaces E)) := |
| 564 | ofReal_le_ofReal (pow_le_pow_right₀ hb (Nat.mul_le_mul_right _ (by lia))) |
| 565 | |
| 566 | end Rounds |
| 567 | |
| 568 | /-- Let `E` be a CM field with a primitive 5040-th root of unity and `S` admissible filling data |
| 569 | over `E`, of level `M = p₀ p₁` (`S.M`) and size parameter `b = S.b`. Let `Λ` be the lattice of the |
| 570 | class `c`, `X₀` the anisotropic space (of dimension `𝔰.k`), `X` the isotropic space, `n` the length |
| 571 | of the frame and `f` the number of infinite places. Let `L ⊆ Λ ∩ X₀` be a lattice of rank `r`, with |
| 572 | `r + l = 𝔰.k`, and discriminant at most `b ^ (n³ f)`. Then at most `b ^ (2000 n⁶ (l + 1) f)` pairs |
| 573 | `p = (c', γ)` with `S.IsNearTermAt c t p` have `L ⊆ S.termLattice c c' γ`. The condition |
| 574 | `S.IsNearTermAt c t p` says three things. First, `γ` is a near term from `c'` to `c` and is the |
| 575 | representative picked in its double coset. Second, `γ` has some cell rank `j`: from the index `j` |
| 576 | on, the flags of the standard frame and of `γ`'s frame share vectors, and the leading minor of order |
| 577 | `j` of their matrix of products is nonzero. Third, `γ` has label `t`, the position of its reduction |
| 578 | in its coset of `S.reducedImage besselS`, the image in `S.ResidueGL` of the integral points of the |
| 579 | Bessel group. -/ |
| 580 | theorem encard_setOf_isNearTermAt_and_le_termLattice_le {c : S.Classes} {r l : ℕ} |
| 581 | (t : S.reducedImage besselS) |
| 582 | (h_rank : r + l = 𝔰.k) {L : Submodule (Ô E) (𝔰.κ → 𝔸f E)} (hL : IsLatticeOfRank r L) |
| 583 | (h_le_classLattice : L ≤ S.classLatticeX₀ c) |
| 584 | (h_disc : discriminant r L ≤ S.discriminantBound) : |
| 585 | {p : S.Classes × S.G E | S.IsNearTermAt c t p ∧ L ≤ S.termLattice c p.1 p.2}.encard ≤ |
| 586 | ENNReal.ofReal (S.b ^ (2000 * 𝔰.n ^ 6 * (l + 1) * numInfPlaces E)) := by |
| 587 | let B : Set (S.Classes × S.G E) := |
| 588 | {p : S.Classes × S.G E | S.IsNearTermAt c t p ∧ L ≤ S.termLattice c p.1 p.2} |
| 589 | have h_near : ∀ p ∈ B, S.IsNear p.2 := by |
| 590 | rintro p ⟨⟨⟨⟨h_near, -⟩, -⟩, -⟩, -⟩ |
| 591 | exact h_near |
| 592 | have h_over : ∀ p ∈ B, ∃ s : S.ResidueGL, p.2 ∈ S.termsOver c s p.1 := by |
| 593 | rintro p ⟨⟨-, s, h_over, -⟩, -⟩ |
| 594 | exact ⟨s, h_over⟩ |
| 595 | have h_cellRank : ∀ p ∈ B, ∃ i : Fin (𝔰.ϱ + 2), S.HasCellRank i p.2 := by |
| 596 | rintro p ⟨⟨⟨-, h_cellRank⟩, -⟩, -⟩ |
| 597 | exact h_cellRank |
| 598 | -- Terms of one label are determined by their frames modulo moves. |
| 599 | have h_frames : S.IsFrameSet c B := |
| 600 | ⟨h_near, h_over, fun p hp q hq u hu u' hu' ↦ hp.1.eq_of_frameImage_eq hu hu' hq.1⟩ |
| 601 | exact h_frames.encard_le h_cellRank h_rank hL h_le_classLattice h_disc fun p hp ↦ hp.2 |
| 602 | |
| 603 | end New.Filling |