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.Antidiag.FinsuppEquiv |
| 4 | import Mathlib.Data.Rat.Cast.OfScientific |
| 5 | public import New.Spanning.Unfolding.FrameMass |
| 6 | public import New.Spanning.Unfolding.PoincareSeries |
| 7 | public import New.UpperBound.Seesaw.EdgePairEvaluation |
| 8 | public import New.UpperBound.Size.ShortColumns |
| 9 | import Lib.General.Groups.IndexOfProduct |
| 10 | import Lib.SiegelWeil.Mass |
| 11 | import New.Spanning.Unfolding.Climbing |
| 12 | import New.Spanning.Unfolding.ReducedGroups |
| 13 | |
| 14 | /-! |
| 15 | # Filling data for admissible data: fit to Y₀, Bessel bounds, standing hypotheses |
| 16 | |
| 17 | For admissible data `D`, the file shows that the filling data `New.Data.filling` fit the space `Y₀`. |
| 18 | It also shows that they satisfy the standing hypotheses `New.Filling.IsAdmissible`, so that the |
| 19 | general filling theorem applies. |
| 20 | |
| 21 | ## Main definitions and results |
| 22 | |
| 23 | * `New.Data.filling_fits`: the filling data `New.Data.filling` fit the space `Y₀` |
| 24 | (`New.Filling.Fits`). |
| 25 | * `New.Data.sourceFormCoords`: source forms in coordinates, indexed by pairs (class, Bessel |
| 26 | coordinate). |
| 27 | * `New.Data.goodProjTranslate`: the map from forms of level `M` on `Y₀` to the image of the good |
| 28 | idempotent `New.Data.e₀`. It is a translation followed by this idempotent, scaled by the order of |
| 29 | the finite group `𝖦`. |
| 30 | * `New.Data.card_besselSystem_le_pow`, `New.Data.card_besselCoord_le_pow`: the Bessel system at one |
| 31 | place has at most `b ^ (2 k)` coordinates, and their tensor product at most `b ^ (2 k f)`. |
| 32 | * `New.Data.log_filling_besselDegree_mem_Icc`: two-sided bounds for the logarithm of the degree of |
| 33 | the Bessel systems. |
| 34 | * `New.Data.card_mul_card_classes_mul_prod_le`, `New.Data.card_sq_mul_mass_mul_prod_le`: two |
| 35 | products built from group orders, class number, masses, dimensions and degrees are at most |
| 36 | `(1 + b⁻⁹)` times `New.Filling.mainSecondMoment`. |
| 37 | |
| 38 | Notions from other files: |
| 39 | * `New.Data.spaceY`: for an index `j`, the hermitian space `Y_j` with its adelic frame, hence its |
| 40 | lattice `𝖬_j`, chosen as in `New.Data.exists_space_isStd_of_le_and_gram_eq_of_lt`. Only `j = 0` |
| 41 | occurs in this file. |
| 42 | * `New.Data.chosenGL`: The finite group 𝖦 = ∏ GL_r(𝔽_w), over the chosen places w above p₀ and p₁. |
| 43 | * `New.Data.targetParameter`: The entry i (from 0) of the target parameter at v: k/2 − 1 − i for |
| 44 | i < k − 1, and Δ/2 − w_{i+2−k}(v) otherwise, where Δ/2 = `D.halfGap` and |
| 45 | w_j(v) = `D.liftWeight j v`. |
| 46 | * `New.Filling.besselDegree`: The product over infinite places of the degrees of the Bessel systems. |
| 47 | * `New.Data.logLevelTarget`: a number `λ`, built from the mean of the `log (D.weight v)`, from |
| 48 | `log (M rootDisc / 2π)` and from `log b`, with `λ ≤ log N ≤ λ + √(log b)`. |
| 49 | -/ |
| 50 | |
| 51 | @[expose] public section |
| 52 | |
| 53 | noncomputable section |
| 54 | |
| 55 | /-! ## Fit to Y₀, source forms in coordinates and the projection to target forms -/ |
| 56 | |
| 57 | namespace New.Data |
| 58 | |
| 59 | open Matrix Shape Unitary Units |
| 60 | |
| 61 | variable {P : Parameters} (D : Data P) |
| 62 | |
| 63 | /-- The graded basis for `Y₀` is the filling lattice basis scaled by `D.latticeScale 0` on the |
| 64 | string. The Bessel factor cancels this scaling on `X₀`. -/ |
| 65 | private lemma gradedLatticeBasis_eq_scaled_filling : |
| 66 | gradedLatticeBasis D.shape.besselIndexEquiv D.ideleA D.piNIdele (D.latticeScale 0) = |
| 67 | (Unitary.toUnits (D.latticeScale 0) • |
| 68 | (toBesselH D.shape (D.N : 𝔸f D.E) (scalarFin D.shape.κ (D.latticeScale 0))⁻¹).val * |
| 69 | D.filling.latticeBasis).val := by |
| 70 | have h_embed (a : Gf D.E D.shape.κ) : (toBesselH D.shape (D.N : 𝔸f D.E) a).val.val = |
| 71 | fromBlocks 1 0 0 (fromBlocks (fromBlocks a.val.val 0 0 1) 0 0 1) := rfl |
| 72 | have h_unit (c : 𝔸f D.E) : (D.latticeScale 0).val * (star (D.latticeScale 0).val * c) = c := by |
| 73 | simp [← mul_assoc] |
| 74 | rw [Units.val_mul, Units.val_smul, smul_mul_assoc, h_embed, ← map_inv] |
| 75 | -- Compare the entries: equal indices give the scalars, by `h_unit`. Otherwise both are 0, as |
| 76 | -- the string indices `a`, `ϱ`, `2 ϱ - b` for `a, b < ϱ` are different. |
| 77 | simp [h_unit, ← ext_iff, filling, besselLatticeBasis, fromBlocks_multiply, scalarFin, |
| 78 | ← Unitary.star_eq_inv, besselIndexEquiv, gradedLatticeBasis, diagonal_apply, smul_def, |
| 79 | fromBlocks_smul, Matrix.one_apply, Fin.ext_iff, Fin.val_rev] |
| 80 | and_intros <;> grind |
| 81 | |
| 82 | /-- The filling data of D fit the hermitian space Y₀ = `D.spaceY 0` in the sense of |
| 83 | `New.Filling.Fits`. -/ |
| 84 | lemma filling_fits : |
| 85 | D.filling.Fits (D.spaceY 0) D.paramW D.columnCount (D.gradingY 0) |
| 86 | (scalarFin D.shape.κ (D.latticeScale 0))⁻¹ := by |
| 87 | -- The finite frame of `Y₀` is `gradedLatticeBasis` times an integral `γ` that is `≡ 1` at the |
| 88 | -- chosen places, by the choice of `D.spaceY`. |
| 89 | obtain ⟨γ, hγ_red, (hγ : (D.spaceY 0).xFin.val = |
| 90 | gradedLatticeBasis D.shape.besselIndexEquiv D.ideleA D.piNIdele (D.latticeScale 0) * |
| 91 | γ.val.val)⟩ := |
| 92 | D.exists_spaceY_xFin_eq 0 D.nat_le_of_hasLogBound |
| 93 | rw [D.gradedLatticeBasis_eq_scaled_filling] at hγ |
| 94 | exact |
| 95 | { isDiscreteSeriesBessel := D.isDiscreteSeriesBessel_filling_besselSystem |
| 96 | index_eq := rfl |
| 97 | isIdempotentKernel := D.isCuspKernel_typeKernel_paramW.toIsIdempotentKernel |
| 98 | exists_point_eq := ⟨γ, fun i w ↦ hγ_red ⟨i, w⟩, toUnits (D.latticeScale 0), ext hγ⟩ |
| 99 | central a := (Seesaw.commute_scalarFin a).inv_left } |
| 100 | |
| 101 | /-- The isomorphism that applies the central translation by `D.latticeScale 0` to a source form on |
| 102 | X₀ and takes its values at the class representatives, in the coordinates of the Bessel systems. -/ |
| 103 | def sourceFormCoords : |
| 104 | ↥D.SourceForm ≃ₗ[ℂ] EuclideanSpace ℂ (D.filling.Classes × D.filling.BesselCoord) := |
| 105 | LinearEquiv.ofBijective (D.centralRep (D.latticeScale 0)) |
| 106 | (D.centralRep.apply_bijective (D.latticeScale 0)) ≪≫ₗ D.filling_fits.sourceFormCoords |
| 107 | |
| 108 | /-- For s in 𝖦, the linear map from forms of parameter ς and level M on Y₀ to the image of the good |
| 109 | idempotent e₀. It is the translation by s, followed by |𝖦| times the action of e₀. -/ |
| 110 | abbrev goodProjTranslate (s : D.chosenGL) : |
| 111 | ↥(D.principalForms (D.spaceY 0)) →ₗ[ℂ] |
| 112 | LinearMap.range ((D.principalRep (D.spaceY 0)).asAlgebraHom D.e₀) := |
| 113 | (Nat.card D.chosenGL : ℂ) • |
| 114 | ((D.principalRep (D.spaceY 0)).asAlgebraHom D.e₀).rangeRestrict ∘ₗ D.principalRep (D.spaceY 0) s |
| 115 | |
| 116 | end New.Data |
| 117 | |
| 118 | /-! |
| 119 | ## Bessel systems: number of coordinates, target parameter and degree |
| 120 | |
| 121 | `New.Data.targetParameter v i` is numbered from 0, and `f` is the number of infinite places. |
| 122 | -/ |
| 123 | |
| 124 | section DegreeBounds |
| 125 | |
| 126 | open Nat Finset Real |
| 127 | |
| 128 | namespace New.Data |
| 129 | |
| 130 | variable {P : Parameters} (D : Data P) |
| 131 | |
| 132 | /-- At each infinite place `v`, the Bessel system of `D` has at most `(k + a) ^ k` coordinates, `k` |
| 133 | the rank of `X₀`. Their number is the dimension of the representation of `U(X₀)` at `v`, which is |
| 134 | that of a symmetric power of degree at most `a = D.a` of a space of dimension `k`. -/ |
| 135 | lemma card_besselSystem_le_add_pow (v : D.Φ) : |
| 136 | Fintype.card (D.filling.besselSystem v).Index ≤ (D.k + D.a) ^ D.k := by |
| 137 | -- The coordinates correspond to a basis of the Schur module of weight `D.columnCount v` (`A`, |
| 138 | -- `A'` are inverse matrices); this weight has no columns of height `2, …, k - 1`, so the basis is |
| 139 | -- in bijection `e` with the monomials of degree `D.columnCount v 1` in the variables `D.X 0`. |
| 140 | obtain ⟨A, A', hAA', hA'A, -⟩ := (D.filling_fits.isDiscreteSeriesBessel |
| 141 | v).exists_conj_rep_eq_schur |
| 142 | have h_degree : D.columnCount v 1 ≤ D.a := by by_cases hv : v ∈ D.aPlaces <;> |
| 143 | simp [columnCount, hv] |
| 144 | have one_lt_k : 1 < D.k := (D.nat_le_of_hasLogBound : 2 ≤ D.k) |
| 145 | have h_row (i : ℕ) (_ : 0 < i) (hi_lt : i < Fintype.card (D.X 0)) : |
| 146 | D.columnCount v i = if i = 1 then D.columnCount v 1 else 0 := by |
| 147 | rw [D.card_X₀] at hi_lt |
| 148 | by_cases hi_one : i = 1 <;> simp [columnCount, hi_one, hi_lt.ne, hi_lt.not_gt] |
| 149 | obtain ⟨(e : WeylIndexFamily (fun _ ↦ D.X 0) (fun _ ↦ D.columnCount v) ≃ Monomials (D.X 0) |
| 150 | (D.columnCount v 1)), -⟩ := |
| 151 | exists_equiv_schur_one_row_eq_symPowMatrix (.refl (D.X 0)) (one_lt_k.trans_eq D.card_X₀.symm) |
| 152 | h_row |
| 153 | -- There are `choose (k + a' - 1) a'` monomials of degree `a' ≤ a` in `k` variables. |
| 154 | calc Fintype.card (D.filling.besselSystem v).Index |
| 155 | _ = #((univ : Finset (D.X 0)).finsuppAntidiag (D.columnCount v 1)) := by |
| 156 | rw [A'.square_of_invertible A hA'A hAA', ← card_eq_of_equiv_fintype e.symm] |
| 157 | _ = (D.k + D.columnCount v 1 - 1).choose (D.columnCount v 1) := by |
| 158 | rw [card_finsuppAntidiag_nat_eq_choose, Finset.card_univ, D.card_X₀] |
| 159 | _ ≤ (D.k + D.columnCount v 1).choose D.k := by grw [sub_le, choose_symm_add] |
| 160 | _ ≤ (D.k + D.a) ^ D.k := by grw [choose_le_pow, h_degree] |
| 161 | |
| 162 | /-- At each infinite place `v`, the number of coordinates of the Bessel system of `D`, that is the |
| 163 | dimension of the representation of `U(X₀)` at `v`, is at most `b ^ (2 k)`, `k` the rank of `X₀`. -/ |
| 164 | lemma card_besselSystem_le_pow (v : D.Φ) : |
| 165 | (Fintype.card (D.filling.besselSystem v).Index : ℝ) ≤ D.b ^ (2 * D.k) := by |
| 166 | calc (Fintype.card (D.filling.besselSystem v).Index : ℝ) |
| 167 | _ ≤ (D.k + D.a : ℝ) ^ D.k := mod_cast D.card_besselSystem_le_add_pow v |
| 168 | _ ≤ (D.b ^ 2) ^ D.k := pow_le_pow_left₀ (by positivity) D.le_of_hasLogBound _ |
| 169 | _ = D.b ^ (2 * D.k) := (pow_mul _ _ _).symm |
| 170 | |
| 171 | /-- The tensor product of the Bessel systems of `D` over the `f` infinite places has at most |
| 172 | `b ^ (2 k f)` coordinates, `k` the rank of `X₀`. -/ |
| 173 | lemma card_besselCoord_le_pow : |
| 174 | (Fintype.card D.filling.BesselCoord : ℝ) ≤ D.b ^ (2 * D.k * D.f) := by |
| 175 | rw [Fintype.card_pi, Nat.cast_prod] |
| 176 | calc |
| 177 | _ ≤ ∏ _v : D.Φ, D.b ^ (2 * D.k) := by |
| 178 | gcongr with v |
| 179 | exact D.card_besselSystem_le_pow v |
| 180 | _ = D.b ^ (2 * D.k * D.f) := by rw [prod_const, Finset.card_univ, ← pow_mul] |
| 181 | |
| 182 | /-- For admissible data `D`, let `d` be the number of coordinates of the tensor product of the |
| 183 | Bessel systems, `k` the rank of `X₀`, `f` the number of infinite places and `b = D.b` the weight at |
| 184 | the `b`-places. Then `d ((k - 1)!)^f ≤ (b^{5/4})^{k f}`, where `b^{5/4}` is written `(√√b)^5`. -/ |
| 185 | lemma card_besselCoord_mul_factorial_le : |
| 186 | (Fintype.card D.filling.BesselCoord * (D.k - 1)! ^ D.f : ℝ) ≤ ((√√D.b ^ 5) ^ D.k) ^ D.f := by |
| 187 | -- Multiply `card_besselSystem_le_add_pow` over the `f` places, with `(k - 1)! ≤ k ^ k` and |
| 188 | -- `(k + a) * k ≤ √√b ^ 5`. |
| 189 | have h_coords : Fintype.card D.filling.BesselCoord ≤ ((D.k + D.a) ^ D.k) ^ D.f := by |
| 190 | simpa [Fintype.card_pi] using prod_le_pow_card univ _ _ fun v _ ↦ |
| 191 | D.card_besselSystem_le_add_pow v |
| 192 | have h_factorial : (D.k - 1)! ≤ D.k ^ D.k := by grw [sub_le, factorial_le_pow] |
| 193 | have h_size : (D.k + D.a : ℝ) * D.k ≤ √√D.b ^ 5 := D.le_of_hasLogBound |
| 194 | calc |
| 195 | _ ≤ ((D.k + D.a : ℝ) ^ D.k) ^ D.f * ((D.k : ℝ) ^ D.k) ^ D.f := by |
| 196 | exact_mod_cast Nat.mul_le_mul h_coords (Nat.pow_le_pow_left h_factorial D.f) |
| 197 | _ = (((D.k + D.a : ℝ) * D.k) ^ D.k) ^ D.f := by simp [mul_pow] |
| 198 | _ ≤ ((√√D.b ^ 5) ^ D.k) ^ D.f := by gcongr |
| 199 | |
| 200 | /-- For `i < l` and an infinite place `v`, the difference |
| 201 | `D.targetParameter v i - D.targetParameter v l` of entries of the target parameter lies between `1` |
| 202 | and the lift weight `D.liftWeight (l + 2 - D.k) v`. Here `k = D.k` is the rank of the source, and |
| 203 | `l + 2 - D.k` is truncated subtraction of natural numbers. -/ |
| 204 | lemma targetParameter_sub_mem_Icc (v : D.Φ) {i l : ℕ} (hil : i < l) : |
| 205 | (D.targetParameter v i - D.targetParameter v l : ℝ) ∈ Set.Icc 1 |
| 206 | ↑(D.liftWeight (l + 2 - D.k) v) := by |
| 207 | -- `1 ≤`: the integers `D.targetParameter v i` strictly decrease. `≤ w`: unfold `targetParameter`; |
| 208 | -- the entries numbered below `k - 1` are small, the others are `D.halfGap - w`. |
| 209 | have h_anti : D.targetParameter v l < D.targetParameter v i := D.targetParameter_strictAnti v hil |
| 210 | rw [Set.mem_Icc] |
| 211 | norm_cast |
| 212 | grind [targetParameter_eq] |
| 213 | |
| 214 | /-- The degree `D.filling.besselDegree` of the Bessel systems of `D` is the exponential of the sum, |
| 215 | over the infinite places `v` and over `k - 1 ≤ l < r`, of `∑_{i<l} log (ς_i - ς_l) - log l!`. Here |
| 216 | `ς = D.targetParameter v` is the sequence of `r = D.r` entries from which the Harish-Chandra |
| 217 | parameters at `v` are read off, and `k = D.k`. -/ |
| 218 | lemma filling_besselDegree_eq_exp_sum : |
| 219 | D.filling.besselDegree = exp (∑ v : D.Φ, ∑ l ∈ Ico (D.k - 1) D.r, |
| 220 | (∑ i ∈ range l, log (D.targetParameter v i - D.targetParameter v l) - Real.log l !)) := by |
| 221 | push_cast [Filling.besselDegree, (D.filling_fits.isDiscreteSeriesBessel _).deg_eq, ↓card_rowIndex, |
| 222 | exp_sum, exp_sub, weylDimensionPoly, ↓paramW_lt_iff, paramW] |
| 223 | congr! with v |
| 224 | -- Index the pairs by their numbers under `basisNumber`. |
| 225 | simp [prod_comm, prod_filter, reindex_equiv D.basisNumber.symm, prod_fin_eq_prod_range, |
| 226 | ← mem_range, ← prod_div_distrib] |
| 227 | refine prod_congr_of_eq_on_inter (fun l hl hl' ↦ ?_) |
| 228 | (fun l hl hl' ↦ absurd (mem_range.2 (mem_Ico.1 hl).2) hl') (fun l hl _ ↦ ?_) |
| 229 | -- `l < k - 1`: the differences are `l - i`, with product `l!`. |
| 230 | · field_simp |
| 231 | norm_cast |
| 232 | rw [min_eq_right (mem_range.1 hl).le, prod_congr rfl (g := fun i ↦ ((l - 1 - i : ℕ) : ℤ) + 1) |
| 233 | fun i hi ↦ by grind [targetParameter_eq]] |
| 234 | simp [prod_range_reflect (fun i : ℕ ↦ (i : ℤ) + 1), ← prod_range_add_one_eq_factorial] |
| 235 | -- `k - 1 ≤ l < r`: the numbers under `log` are positive by `targetParameter_sub_mem_Icc`. |
| 236 | · rw [min_eq_right (mem_range.1 hl).le, exp_log (mod_cast l.factorial_pos)] |
| 237 | refine congrArg (· / (l ! : ℝ)) (prod_congr rfl fun i hi ↦ ?_) |
| 238 | rw [exp_log (one_pos.trans_le (D.targetParameter_sub_mem_Icc v (mem_range.1 hi)).1)] |
| 239 | ring |
| 240 | |
| 241 | /-- Lower bound in `log_filling_besselDegree_mem_Icc`. Let `v` be an infinite place and |
| 242 | `k - 1 ≤ l < r`. With `ς = D.targetParameter v`, the sum of `log (ς_i - ς_l)` over `i < l` is at |
| 243 | least `(k - 1) log W_v`, where `W_v` is `D.weight v`. -/ |
| 244 | private lemma le_sum_log_targetParameter_sub (v : D.Φ) (l : ℕ) (hl : l ∈ Ico (D.k - 1) D.r) : |
| 245 | (D.k - 1) * Real.log (D.weight v) ≤ |
| 246 | ∑ i ∈ range l, log (D.targetParameter v i - D.targetParameter v l) := by |
| 247 | -- Keep only the terms `i < k - 1`; each of these differences is at least `weight v`. |
| 248 | have h_diff (i : ℕ) (hi : i ∈ range (D.k - 1)) : |
| 249 | (D.weight v : ℝ) ≤ D.targetParameter v i - D.targetParameter v l := |
| 250 | (D.weight_le_liftWeight_sub 0 v).trans (by norm_cast; grind [targetParameter_eq]) |
| 251 | calc |
| 252 | _ ≤ ∑ i ∈ range (D.k - 1), log (D.targetParameter v i - D.targetParameter v l) := by |
| 253 | simpa using sum_le_sum fun i hi ↦ log_le_log (HasLogBound.pos D) (h_diff i hi) |
| 254 | _ ≤ _ := sum_le_sum_of_subset_of_nonneg (range_mono (mem_Ico.1 hl).1) fun i hi _ ↦ |
| 255 | log_nonneg (D.targetParameter_sub_mem_Icc v (mem_range.1 hi)).1 |
| 256 | |
| 257 | /-- Upper bound in `log_filling_besselDegree_mem_Icc`. Let `v` be an infinite place and |
| 258 | `k - 1 ≤ l < r`. With `ς = D.targetParameter v`, the sum of `log (ς_i - ς_l)` over `i < l` is at |
| 259 | most `r (log W_v + 1/x)`, where `W_v` is `D.weight v` and `x` is `D.x`. -/ |
| 260 | private lemma sum_log_targetParameter_sub_le (v : D.Φ) (l : ℕ) (hl : l ∈ Ico (D.k - 1) D.r) : |
| 261 | ∑ i ∈ range l, log (D.targetParameter v i - D.targetParameter v l) ≤ |
| 262 | D.r * (Real.log (D.weight v) + D.x⁻¹) := by |
| 263 | -- Each of the `l < r` differences is at most `liftWeight (l + 2 - k) v` by |
| 264 | -- `targetParameter_sub_mem_Icc`. |
| 265 | calc |
| 266 | _ ≤ ∑ i ∈ range l, Real.log (D.liftWeight (l + 2 - D.k) v) := sum_le_sum fun i hi ↦ by |
| 267 | obtain ⟨h_one_le, h_le_w⟩ := D.targetParameter_sub_mem_Icc v (mem_range.1 hi) |
| 268 | exact log_le_log (one_pos.trans_le h_one_le) h_le_w |
| 269 | _ = l * Real.log (D.liftWeight (l + 2 - D.k) v) := by simp |
| 270 | _ ≤ D.r * (Real.log (D.weight v) + D.x⁻¹) := by |
| 271 | grw [(mem_Ico.1 hl).2, D.log_liftWeight_le (by grind)] |
| 272 | |
| 273 | /-- The logarithm of the degree of the Bessel systems of `D`, plus `f` times the sum of `log l!` |
| 274 | over `k − 1 ≤ l < r`, lies between `∑_v m (k − 1) log W_v` and `∑_v m r (log W_v + 1/x)`. Here `v` |
| 275 | runs over the `f` infinite places, `k` is the rank of `X₀`, `r` is the number of entries of the |
| 276 | target parameter, `m = r - k + 1`, `x` is the parameter `D.x` of the data and `W_v` is |
| 277 | `D.weight v`. -/ |
| 278 | lemma log_filling_besselDegree_mem_Icc : |
| 279 | Real.log D.filling.besselDegree + D.f * ∑ l ∈ Ico (D.k - 1) D.r, Real.log l ! ∈ Set.Icc |
| 280 | (∑ v : D.Φ, D.m * ((D.k - 1) * Real.log (D.weight v))) |
| 281 | (∑ v : D.Φ, D.m * (D.r * (Real.log (D.weight v) + D.x⁻¹))) := by |
| 282 | -- After inserting the formula for the degree the factorials cancel; it remains to bound, for each |
| 283 | -- `l`, the sum of `log (ς_i - ς_l)` over `i < l`. |
| 284 | have deg_eq : D.filling.besselDegree = exp (∑ v, ∑ l ∈ Ico (D.k - 1) D.r, |
| 285 | (∑ i ∈ range l, log (D.targetParameter v i - D.targetParameter v l) - Real.log l !)) := |
| 286 | D.filling_besselDegree_eq_exp_sum |
| 287 | have h_low (v : D.Φ) (l : ℕ) (hl : l ∈ Ico (D.k - 1) D.r) : (D.k - 1) * Real.log (D.weight v) ≤ |
| 288 | ∑ i ∈ range l, log (D.targetParameter v i - D.targetParameter v l) := |
| 289 | D.le_sum_log_targetParameter_sub v l hl |
| 290 | have h_up (v : D.Φ) (l : ℕ) (hl : l ∈ Ico (D.k - 1) D.r) : |
| 291 | ∑ i ∈ range l, log (D.targetParameter v i - D.targetParameter v l) ≤ |
| 292 | D.r * (Real.log (D.weight v) + D.x⁻¹) := |
| 293 | D.sum_log_targetParameter_sub_le v l hl |
| 294 | -- Sum both bounds over `v` and over the `m` values of `l`. |
| 295 | have h_card : D.r - (D.k - 1) = D.m := by grind |
| 296 | constructor |
| 297 | · simpa [deg_eq, h_card] using sum_le_sum (s := univ) fun (v : D.Φ) _ ↦ sum_le_sum (h_low v) |
| 298 | · simpa [deg_eq, h_card] using sum_le_sum (s := univ) fun (v : D.Φ) _ ↦ sum_le_sum (h_up v) |
| 299 | |
| 300 | end New.Data |
| 301 | |
| 302 | end DegreeBounds |
| 303 | |
| 304 | /-! |
| 305 | ## Number of classes, mean values and the standing hypotheses |
| 306 | |
| 307 | The ratio of the main second moment to the second moment of the Bessel group is computed exactly |
| 308 | (`New.Data.mainSecondMoment_div_identitySecondMoment_eq`). The sizes of the degree, of the ratio of |
| 309 | the masses and of `N` then give the range of this ratio |
| 310 | (`New.Data.mainSecondMoment_div_identitySecondMoment_mem_Icc`). |
| 311 | -/ |
| 312 | |
| 313 | namespace New.Data |
| 314 | |
| 315 | open Finset Real Filling Subgroup MulAction Fintype Shape NeZero NumberField |
| 316 | |
| 317 | variable {P : Parameters} (D : Data P) |
| 318 | |
| 319 | /-- The finite points of `U(X₀)` that `New.Filling.inclHFin` sends into the integral group |
| 320 | `New.Filling.latticeStabilizer` have index `(N^k - 1)^f` in the group `New.stdLevel` of integral |
| 321 | points, `N` being the prime level, `k` the rank of `X₀` and `f` the number of infinite places. -/ |
| 322 | lemma relIndex_latticeStabilizer : |
| 323 | (D.filling.latticeStabilizer.comap D.filling.inclHFin).relIndex (stdLevel D.E D.shape.κ) = |
| 324 | (D.N ^ D.k - 1 : ℝ) ^ D.f := by |
| 325 | -- An integral x lies in this preimage iff its row `k₀` is the unit vector modulo every place |
| 326 | -- of `D.piNPlaces`; each such stabiliser has index N ^ k - 1, and there are f places. |
| 327 | -- `H w` fixes the unit vector under the inverse transpose: row `k₀` is the unit vector. |
| 328 | let H (w : D.piNPlaces) : Subgroup (GL (D.X 0) (ResField w.val)) := |
| 329 | (stabilizer _ (Pi.single D.shape.k₀ 1 : D.X 0 → ResField w.1)).comap invTransposeGL.toMonoidHom |
| 330 | have h_level : |
| 331 | D.filling.latticeStabilizer.comap D.filling.inclHFin = levelOf Subtype.val (pi ⊤ H) := by |
| 332 | ext x |
| 333 | rw [Subgroup.mem_comap, mem_levelOf, D.filling.inclHFin_mem_latticeStabilizer_iff] |
| 334 | -- Both sides say that `x` is integral, with a condition on its row `k₀`. |
| 335 | change (x.val ∈ intGL D.shape.κ (Ô D.E) ∧ ∀ (_ : Unit) (j : D.shape.κ), |
| 336 | (x.val.val - 1) D.shape.k₀ j ∈ Ô D.E ∙ D.piNIdele.val) ↔ _ |
| 337 | refine exists_prop.symm.trans (exists_congr fun hx : x.val ∈ intGL D.shape.κ (Ô D.E) ↦ ?_) |
| 338 | -- π divides an integral adele iff it reduces to zero at every place of `D.piNPlaces`, and `H w` |
| 339 | -- says that the entries `r j` of row `k₀` of `x - 1` reduce to zero at `w`. |
| 340 | let r (j : D.shape.κ) : Ô D.E := |
| 341 | ⟨x.val.val D.shape.k₀ j, hx.isIntMatrix D.shape.k₀ j⟩ - if j = D.shape.k₀ then 1 else 0 |
| 342 | have h_mem (j : D.shape.κ) : (x.val.val - 1) D.shape.k₀ j ∈ Ô D.E ∙ D.piNIdele.val ↔ |
| 343 | algebraMap (RingOfIntegers D.E) (Ô D.E) D.piN ∣ r j := by |
| 344 | by_cases hj : j = D.shape.k₀ <;> |
| 345 | simp [hj, Ne.symm, r, Submodule.mem_span_singleton, dvd_def, Subtype.ext_iff, |
| 346 | Subring.smul_def, piNIdele] <;> |
| 347 | exact exists_congr fun _ ↦ and_congr_right' (by rw [mul_comm, eq_comm]) |
| 348 | have h_fix (w : D.piNPlaces) : stdLevel.reduceFamily Subtype.val ⟨x, hx⟩ w ∈ H w ↔ |
| 349 | ∀ j : D.shape.κ, reduceAt w.val (r j) = 0 := by |
| 350 | -- The inverse transpose fixes the unit vector iff row `k₀` of the reduction is that vector. |
| 351 | have h_mem_H (M : GL (D.X 0) (ResField w.val)) : M ∈ H w ↔ |
| 352 | (transposeGL M)⁻¹ ∈ stabilizer _ (Pi.single D.shape.k₀ 1 : D.X 0 → ResField w.val) := .rfl |
| 353 | rw [h_mem_H] |
| 354 | have h_entry (j : D.shape.κ) : (stdLevel.reduceFamily Subtype.val ⟨x, hx⟩ w).1 D.shape.k₀ j = |
| 355 | reduceAt w.val ⟨x.val.val D.shape.k₀ j, hx.isIntMatrix D.shape.k₀ j⟩ := rfl |
| 356 | simp [r, h_entry, funext_iff, Units.smul_def, -reduceAt_eq_zero, sub_eq_zero] |
| 357 | simp only [Subgroup.mem_pi, h_mem, dvd_iff_reduceAt_eq_zero D.intValuation_piN, h_fix, |
| 358 | forall_const, ← mem_piNPlaces] |
| 359 | exact ⟨fun h w _ j ↦ h j w.val w.property, fun h j w hw ↦ h ⟨w, hw⟩ trivial j⟩ |
| 360 | -- The index of a preimage under reduction is the product of the indices of the stabilisers. |
| 361 | rw [h_level, relIndex_levelOf (h := ⟨by simp, by simp [D.isSplitLevel_piNPlaces.star_notMem]⟩)] |
| 362 | simp [Seesaw.index_pi_univ, H, index_comap, index_stabilizer_GL_vector, card_ResField, |
| 363 | D.isSplitLevel_piNPlaces.q_eq, ↓card_X₀, Fin.pos', card_piNPlaces] |
| 364 | |
| 365 | /-- The number of classes of level `New.Data.levelX 0` on `U(X₀)` is `|H̄| (N^k - 1)^f` times |
| 366 | the mass `New.mass` in rank `k`, where `H̄` is the image (`New.Filling.reducedImage`) under |
| 367 | reduction of the integral points of `H = besselH`, the copy of `U(X₀)` in the unitary group, `N` is |
| 368 | the prime level and `f` is the number of infinite places. -/ |
| 369 | lemma card_classes_eq_card_mul_pow_mul_mass : |
| 370 | (Fintype.card D.filling.Classes : ℝ) = |
| 371 | Nat.card (D.filling.reducedImage besselH) * (D.N ^ D.k - 1) ^ D.f * mass D.E D.k := by |
| 372 | -- The classes have trivial automorphism groups, so their number is the index of `D.levelX 0` |
| 373 | -- in `stdLevel` times the mass; the index splits along |
| 374 | -- `D.levelX 0 ≤ (preimage of latticeStabilizer) ≤ stdLevel`. |
| 375 | rw [card_eq_nat_card] |
| 376 | refine (card_classes_eq_classSum D.classAut_levelX_zero_eq_bot).trans ?_ |
| 377 | rw [classSum_one_of_le IsLevel.le, classSum_stdRatPoints_eq_mass, card_X₀, |
| 378 | ← relIndex_mul_relIndex _ (D.filling.latticeStabilizer.comap D.filling.inclHFin) _ |
| 379 | (D.levelX_zero_eq_comap.trans_le (comap_mono (map_subtype_le _))) |
| 380 | fun x hx ↦ (D.filling.inclHFin_mem_latticeStabilizer_iff.1 hx).1, |
| 381 | levelX_zero_eq_comap, D.filling.relIndex_comap_principalLevel] |
| 382 | simp [D.relIndex_latticeStabilizer] |
| 383 | |
| 384 | /-- With `fr_v` the frame mass, and `d_v`, `deg_v` the dimension and the degree of the Bessel system |
| 385 | at `v`, the product of the `fr_v d_v ^ 2 / deg_v` is `(∏ fr_v) d ^ 2 / deg`, where `d` and `deg` are |
| 386 | the dimension and the degree of the tensor product of the Bessel systems. -/ |
| 387 | lemma prod_frameMass_mul_div_eq : |
| 388 | ∏ v : D.Φ, D.frameMass v * Fintype.card (D.filling.besselSystem v).Index ^ 2 / |
| 389 | (D.filling.besselSystem v).deg = |
| 390 | (∏ v : D.Φ, D.frameMass v) * Fintype.card D.filling.BesselCoord ^ 2 / |
| 391 | D.filling.besselDegree := by |
| 392 | rw [prod_div_distrib, prod_mul_distrib, prod_pow, Fintype.card_pi, Nat.cast_prod, besselDegree] |
| 393 | |
| 394 | /-- At an infinite place `v`, let `fr_v` be the frame mass, `sph_k` the mass of the unit sphere in |
| 395 | the rank `k` of `X₀`, `d_v` and `deg_v` the number of coordinates and the degree of the Bessel |
| 396 | system, and `c_v = fr_v N ^ k d_v ^ 2 / (sph_k deg_v)`, with `N` the prime level. The product of |
| 397 | the `sph_k c_v` over the `f` infinite places is `N ^ (k f) (∏ fr_v) d ^ 2 / deg`, where |
| 398 | `d = ∏ d_v` and `deg = ∏ deg_v`: the masses `sph_k` cancel. -/ |
| 399 | lemma prod_unitSphereMass_mul_div_eq : |
| 400 | ∏ v : D.Φ, D.unitSphereMass D.k v * (D.frameMass v * D.N ^ D.k * |
| 401 | Fintype.card (D.filling.besselSystem v).Index ^ 2 / |
| 402 | (D.unitSphereMass D.k v * (D.filling.besselSystem v).deg)) = |
| 403 | (D.N ^ D.k) ^ D.f * ((∏ v : D.Φ, D.frameMass v) * Fintype.card D.filling.BesselCoord ^ 2 / |
| 404 | D.filling.besselDegree) := by |
| 405 | have h_const : ((D.N : ℝ) ^ D.k) ^ D.f = ∏ _v : D.Φ, (D.N : ℝ) ^ D.k := by simp |
| 406 | rw [← D.prod_frameMass_mul_div_eq, h_const, ← prod_mul_distrib] |
| 407 | congr! 1 with v |
| 408 | field_simp [(D.unitSphereMass_pos D.k v).ne'] |
| 409 | |
| 410 | /-- The main second moment of the filling data is |
| 411 | `(|H̄| (N ^ k - 1) ^ f mass_k d) ^ 2 / (deg mass_r)`, where `H̄` is the reduced image of `besselH`, |
| 412 | `mass_l` is `New.mass` in rank `l`, and `d`, `deg` are the dimension and the degree of the tensor |
| 413 | product of the Bessel systems. -/ |
| 414 | lemma filling_mainSecondMoment_eq : |
| 415 | D.filling.mainSecondMoment = |
| 416 | (Nat.card (D.filling.reducedImage besselH) * (D.N ^ D.k - 1) ^ D.f * mass D.E D.k * |
| 417 | Fintype.card D.filling.BesselCoord) ^ 2 / (D.filling.besselDegree * mass D.E D.r) := by |
| 418 | rw [mainSecondMoment, sourceDim, Nat.cast_mul, card_classes_eq_card_mul_pow_mul_mass, Shape.r, |
| 419 | D.card_rowIndex] |
| 420 | |
| 421 | /-- Since the prime level `N` is at least `2`, the number `N ^ k - 1` is positive. -/ |
| 422 | lemma pow_sub_one_pos : (0 : ℝ) < D.N ^ D.k - 1 := |
| 423 | sub_pos.mpr (one_lt_pow₀ (mod_cast D.N_prime.one_lt) D.k_pos.ne') |
| 424 | |
| 425 | /-- For the filling data of admissible data `D`, let `H̄` be the reduced image of `besselH`, `d_v` |
| 426 | and `deg_v` the dimension and the degree of the Bessel system at `v`, `fr_v` the frame mass, `sph_k` |
| 427 | the mass of the sphere in rank `k`, `mass_l` the mass `New.mass` in rank `l` and |
| 428 | `c_v = fr_v N ^ k d_v ^ 2 / (sph_k deg_v)`. Then `|H̄| ^ 2 mass_k ∏ sph_k c_v` is at most |
| 429 | `(1 + b⁻⁹)` times the main second moment `(n_X ∏ d_v) ^ 2 / (mass_r ∏ deg_v)`. Here `n_X` is the |
| 430 | number of classes, `k`, `r` are the ranks of `X₀`, `Y₀`, and `b = D.b` is the weight at the |
| 431 | `b`-places. -/ |
| 432 | theorem card_sq_mul_mass_mul_prod_le : |
| 433 | Nat.card (D.filling.reducedImage besselH) ^ 2 * mass D.E D.k * |
| 434 | ∏ v : D.Φ, D.unitSphereMass D.k v * (D.frameMass v * D.N ^ D.k * |
| 435 | Fintype.card (D.filling.besselSystem v).Index ^ 2 / |
| 436 | (D.unitSphereMass D.k v * (D.filling.besselSystem v).deg)) ≤ |
| 437 | (1 + D.b⁻¹ ^ 9) * D.filling.mainSecondMoment := by |
| 438 | -- The left side is the left side of `prod_frameMass_mul_le` times the number `multiplier`. |
| 439 | let multiplier : ℝ := D.filling.mainSecondMoment / ((D.N ^ D.k) ^ D.f * mass D.E D.k) |
| 440 | have N_pos : (0 : ℝ) < D.N := mod_cast D.N_prime.pos |
| 441 | have deg_pos : 0 < D.filling.besselDegree := D.filling.besselDegree_pos |
| 442 | have mass_k_pos : 0 < mass D.E D.k := mass_pos D.E D.k |
| 443 | have mass_r_pos : 0 < mass D.E D.r := mass_pos D.E D.r |
| 444 | have pred_pos : (0 : ℝ) < D.N ^ D.k - 1 := D.pow_sub_one_pos |
| 445 | have multiplier_nonneg : 0 ≤ multiplier := by |
| 446 | simp only [multiplier, filling_mainSecondMoment_eq] |
| 447 | positivity |
| 448 | rw [D.prod_unitSphereMass_mul_div_eq] |
| 449 | calc |
| 450 | _ = (∏ v : D.Φ, D.frameMass v) * mass D.E D.r * (D.N ^ D.k / (D.N ^ D.k - 1)) ^ (2 * D.f) * |
| 451 | multiplier := by |
| 452 | simp only [multiplier, filling_mainSecondMoment_eq, div_pow, mul_comm 2 D.f, pow_mul] |
| 453 | field_simp |
| 454 | _ ≤ (1 + D.b⁻¹ ^ 9) * ((D.N ^ D.k) ^ D.f * mass D.E D.k) * multiplier := |
| 455 | mul_le_mul_of_nonneg_right D.prod_frameMass_mul_le multiplier_nonneg |
| 456 | _ = (1 + D.b⁻¹ ^ 9) * D.filling.mainSecondMoment := by |
| 457 | simp only [multiplier] |
| 458 | field_simp |
| 459 | |
| 460 | /-- For the filling data of admissible data `D`, let `H̄` be the reduced image of `besselH`, `n_X` |
| 461 | the number of classes, `d_v` and `deg_v` the dimension and the degree of the Bessel system at `v` |
| 462 | and `fr_v` the frame mass. Then `|H̄| n_X ∏ fr_v d_v ^ 2 / deg_v` is at most `(1 + b⁻⁹)` times the |
| 463 | main second moment `(n_X ∏ d_v) ^ 2 / (mass_r ∏ deg_v)`. Here `mass_r` is the mass `New.mass` in the |
| 464 | rank `r` of `Y₀`, and `b = D.b` is the weight at the `b`-places. -/ |
| 465 | theorem card_mul_card_classes_mul_prod_le : |
| 466 | Nat.card (D.filling.reducedImage besselH) * Fintype.card D.filling.Classes * |
| 467 | ∏ v : D.Φ, D.frameMass v * Fintype.card (D.filling.besselSystem v).Index ^ 2 / |
| 468 | (D.filling.besselSystem v).deg ≤ |
| 469 | (1 + D.b⁻¹ ^ 9) * D.filling.mainSecondMoment := by |
| 470 | -- With `n_X = |H̄| (N ^ k - 1) ^ f mass_k` the left side is at most the left side of |
| 471 | -- `card_sq_mul_mass_mul_prod_le`, which has `N ^ k` in place of `N ^ k - 1`. |
| 472 | let H : ℝ := Nat.card (D.filling.reducedImage besselH) |
| 473 | let Q : ℝ := (∏ v : D.Φ, D.frameMass v) * Fintype.card D.filling.BesselCoord ^ 2 / |
| 474 | D.filling.besselDegree |
| 475 | have frame_pos : 0 < ∏ v : D.Φ, D.frameMass v := prod_pos fun v _ ↦ D.frameMass_pos v |
| 476 | have deg_pos : 0 < D.filling.besselDegree := D.filling.besselDegree_pos |
| 477 | have mass_k_pos : 0 < mass D.E D.k := mass_pos D.E D.k |
| 478 | have pred_pos : (0 : ℝ) < D.N ^ D.k - 1 := D.pow_sub_one_pos |
| 479 | rw [D.prod_frameMass_mul_div_eq, card_classes_eq_card_mul_pow_mul_mass] |
| 480 | calc |
| 481 | _ = H ^ 2 * mass D.E D.k * ((D.N ^ D.k - 1) ^ D.f * Q) := by ring |
| 482 | _ ≤ H ^ 2 * mass D.E D.k * ((D.N ^ D.k) ^ D.f * Q) := by |
| 483 | gcongr |
| 484 | linarith |
| 485 | _ ≤ (1 + D.b⁻¹ ^ 9) * D.filling.mainSecondMoment := by |
| 486 | rw [← D.prod_unitSphereMass_mul_div_eq] |
| 487 | exact D.card_sq_mul_mass_mul_prod_le |
| 488 | |
| 489 | /-- For the filling data of admissible data `D`, the scaled Siegel constant `|S̄| |Ū| n_X c_S` is at |
| 490 | most `(1 + b⁻⁹)` times the main second moment `(n_X d)² / (deg mass_r)` times |
| 491 | `deg c^f / vol^n (cov Λ / d)²`. Here `S̄` is the reduced image of the Bessel subgroup `besselS`, |
| 492 | `|Ū| = unipotentOrder`, `n_X` is the number of classes, `c_S = siegelConst`, `b = D.b` is the weight |
| 493 | at the `b`-places, `d` and `deg` are the number of coordinates and the degree of the tensor product |
| 494 | of the Bessel systems, and `mass_r` is the mass in the rank `r` of `Y₀`. Further |
| 495 | `c = openCellConst`, `f` is the number of infinite places, `vol` the volume of the integral finite |
| 496 | adeles, `n` the number of frame vectors, `cov = unipotentCovolume` and `Λ = frameScaleProd`. -/ |
| 497 | lemma scaledSiegelConst_le : D.filling.scaledSiegelConst ≤ |
| 498 | (1 + D.b⁻¹ ^ 9) * D.filling.mainSecondMoment * D.filling.besselDegree * D.shape.openCellConst ^ |
| 499 | D.f / |
| 500 | volÔ D.E ^ D.shape.n * (D.filling.unipotentCovolume * D.filling.frameScaleProd / |
| 501 | Fintype.card D.filling.BesselCoord) ^ 2 := by |
| 502 | -- The scaled Siegel constant is the left side of `card_mul_card_classes_mul_prod_le` times |
| 503 | -- `scale`. |
| 504 | let scale : ℝ := D.filling.besselDegree * D.shape.openCellConst ^ D.f / volÔ D.E ^ D.shape.n * |
| 505 | (D.filling.unipotentCovolume * D.filling.frameScaleProd / Fintype.card D.filling.BesselCoord) ^ |
| 506 | 2 |
| 507 | have deg_pos : 0 < D.filling.besselDegree := D.filling.besselDegree_pos |
| 508 | have cell_pos : 0 < D.shape.openCellConst := D.shape.openCellConst_pos |
| 509 | have vol_pos : (0 : ℝ) < volÔ D.E := by |
| 510 | rw [volÔ_eq] |
| 511 | positivity [rootDiscr_pos D.E] |
| 512 | have N_pos : (0 : ℝ) < D.N := mod_cast D.N_prime.pos |
| 513 | have h_covolume : D.filling.unipotentCovolume * D.filling.frameScaleProd = |
| 514 | D.filling.unipotentOrder / (D.N ^ D.k) ^ D.f / volÔ D.E ^ (D.ϱ * (D.ϱ + D.k)) * |
| 515 | √√|NumberField.discr D.E| ^ D.ϱ := by |
| 516 | have h_order : ((D.filling.M : ℝ) ^ (2 * (D.ϱ * (D.ϱ + D.k)) + D.ϱ)) ^ D.f = |
| 517 | D.filling.unipotentOrder := by |
| 518 | rw [← pow_mul, unipotentOrder, Shape.k, card_X₀, Nat.cast_pow] |
| 519 | ring |
| 520 | -- The factor `frameScaleProd` cancels from the definition of the covolume. |
| 521 | rw [Filling.unipotentCovolume, div_mul_cancel₀ _ D.filling.frameScaleProd_pos.ne', Shape.k, |
| 522 | card_X₀, sum_unipotent_row_exponents, div_pow] |
| 523 | rw [h_order] |
| 524 | rfl |
| 525 | have h_siegel : D.filling.siegelConst = (∏ v : D.Φ, D.frameMass v) * |
| 526 | (D.shape.openCellConst ^ D.f * (√√|NumberField.discr D.E| ^ D.ϱ) ^ 2) / |
| 527 | (((D.N ^ D.k) ^ D.f) ^ 2 * volÔ D.E ^ (D.ϱ + 1 + 2 * (D.ϱ * (D.ϱ + D.k)))) := by |
| 528 | rw [D.prod_frameMass_mul_openCellConst_eq, mul_assoc, mul_div_cancel_right₀ _ (by positivity)] |
| 529 | calc |
| 530 | _ = Nat.card (D.filling.reducedImage besselH) * Fintype.card D.filling.Classes * |
| 531 | (∏ v : D.Φ, D.frameMass v * Fintype.card (D.filling.besselSystem v).Index ^ 2 / |
| 532 | (D.filling.besselSystem v).deg) * scale := by |
| 533 | -- Insert the constants; the powers of N, of the volume and of the discriminant cancel. |
| 534 | rw [prod_frameMass_mul_div_eq, scaledSiegelConst, card_reducedImage_besselS, h_siegel] |
| 535 | simp only [scale, h_covolume, Shape.n] |
| 536 | push_cast |
| 537 | field |
| 538 | _ ≤ (1 + D.b⁻¹ ^ 9) * D.filling.mainSecondMoment * scale := |
| 539 | mul_le_mul_of_nonneg_right D.card_mul_card_classes_mul_prod_le (by positivity) |
| 540 | _ = _ := by ring |
| 541 | |
| 542 | /-- Reduction at the chosen places maps the integral group `New.Filling.latticeStabilizer` of the |
| 543 | filling data onto the finite group `New.Filling.ResidueGL`. -/ |
| 544 | lemma filling_reduction_surjective : Function.Surjective D.filling.reduction := by |
| 545 | intro x |
| 546 | -- A preimage is the lift of the residues of `x`, written in the lattice basis of the filling. |
| 547 | let lift : stdLevel D.E D.shape.BesselIndex := liftResidue (w := D.chosenPlace) (Sigma.uncurry x) |
| 548 | obtain ⟨h_mem, h_reduction⟩ := (D.filling_fits.reduction_finiteEquiv_iff lift.val x).mpr |
| 549 | ⟨lift.property, reduceFamily_liftResidue (w := D.chosenPlace) (Sigma.uncurry x)⟩ |
| 550 | exact ⟨⟨D.filling_fits.finiteEquiv lift.val, h_mem⟩, h_reduction⟩ |
| 551 | |
| 552 | /-- The main second moment of the filling data, divided by their identity second moment, is |
| 553 | `d (N ^ k - 1) ^ f mass_k / (deg mass_r |Ū|)`. Here `d` and `deg` are the number of coordinates and |
| 554 | the degree of the tensor product of the Bessel systems, `mass_l` is the mass in rank `l`, and `|Ū|` |
| 555 | is the order `unipotentOrder` of the reduced unipotent group; `N` is the prime level, `k` and `r` |
| 556 | are the ranks of `X₀` and `Y₀`, and `f` is the number of infinite places. -/ |
| 557 | lemma mainSecondMoment_div_identitySecondMoment_eq : |
| 558 | D.filling.mainSecondMoment / D.filling.identitySecondMoment = |
| 559 | Fintype.card D.filling.BesselCoord * (D.N ^ D.k - 1) ^ D.f * mass D.E D.k / |
| 560 | (D.filling.besselDegree * mass D.E D.r * D.filling.unipotentOrder) := by |
| 561 | have h_rank : D.shape.r = D.r := D.card_rowIndex |
| 562 | have card_image_ne_zero : (Nat.card (D.filling.reducedImage besselH) : ℝ) ≠ 0 := |
| 563 | Nat.cast_ne_zero.2 Nat.card_pos.ne' |
| 564 | have h_dim : (D.filling.sourceDim : ℝ) ≠ 0 := |
| 565 | Nat.cast_ne_zero.2 (Nat.mul_pos Fintype.card_pos Fintype.card_pos).ne' |
| 566 | calc |
| 567 | _ = D.filling.sourceDim / (Nat.card (D.filling.reducedImage besselS) * |
| 568 | (D.filling.besselDegree * mass D.E D.r)) := by |
| 569 | rw [mainSecondMoment, identitySecondMoment, h_rank] |
| 570 | field_simp |
| 571 | _ = _ := by |
| 572 | rw [sourceDim, card_reducedImage_besselS, Nat.cast_mul, Nat.cast_mul, |
| 573 | card_classes_eq_card_mul_pow_mul_mass] |
| 574 | field_simp |
| 575 | |
| 576 | /-- Up to a factor `b ^ (± k f / 4)`, the ratio of the main second moment to the identity second |
| 577 | moment is `(M b ^ (-15 / 2)) ^ (k f) d ((k - 1)!) ^ f`. Here `b` is the weight at the `b`-places of |
| 578 | the admissible data `D`, `M = p₀ p₁` is the principal level, `d` is the number of coordinates of the |
| 579 | tensor product of the Bessel systems, `k` is the rank of `X₀` and `f` is the number of infinite |
| 580 | places. The statement is for the logarithms, with `D.logB = log b`. -/ |
| 581 | lemma abs_log_mainSecondMoment_div_identitySecondMoment_sub_le : |
| 582 | |log (D.filling.mainSecondMoment / D.filling.identitySecondMoment) - |
| 583 | (D.f * D.k * (log D.M - 15 / 2 * D.logB) + |
| 584 | log (Fintype.card D.filling.BesselCoord * (D.k - 1).factorial ^ D.f))| ≤ |
| 585 | D.f * D.k * D.logB / 4 := by |
| 586 | -- Insert the sizes of the degree, of the ratio of the masses and of `N` into the formula for the |
| 587 | -- ratio. All factorials cancel except `(k - 1)!`. |
| 588 | have k_le_r : D.k ≤ D.r := D.k_le_r |
| 589 | have k_pos : 0 < D.k := D.k_pos |
| 590 | have two_le_N : 2 ≤ D.N := D.N_prime.two_le |
| 591 | have pred_pos : (0 : ℝ) < D.N ^ D.k - 1 := D.pow_sub_one_pos |
| 592 | have M_pos : 0 < D.M := pos D.M |
| 593 | have deg_pos : 0 < D.filling.besselDegree := D.filling.besselDegree_pos |
| 594 | have rd_pos : 0 < rootDiscr D.E := rootDiscr_pos D.E |
| 595 | have dim_pos : 0 < Fintype.card D.filling.BesselCoord := card_pos |
| 596 | have mass_k_pos : 0 < mass D.E D.k := mass_pos D.E D.k |
| 597 | have mass_r_pos : 0 < mass D.E D.r := mass_pos D.E D.r |
| 598 | have h_order : (D.filling.unipotentOrder : ℝ) = |
| 599 | D.M ^ (D.f * (D.ϱ * (2 * D.k + 2 * D.ϱ + 1))) := by |
| 600 | rw [unipotentOrder, Shape.k, card_X₀, Nat.cast_pow] |
| 601 | rfl |
| 602 | -- The range of `N`, and `N ^ k - 1` against `N ^ k`. |
| 603 | have log_N : (D.f * D.k) • log D.N ∈ |
| 604 | Set.Icc ((D.f * D.k) • D.logLevelTarget) ((D.f * D.k) • (D.logLevelTarget + √D.logB)) := |
| 605 | (nsmul_right_mono _).mapsTo_Icc D.log_N_mem_Icc_logLevelTarget |
| 606 | have log_pred_le : D.f • log (D.N ^ D.k - 1) ≤ D.f • log (D.N ^ D.k) := |
| 607 | nsmul_le_nsmul_right (log_le_log pred_pos (sub_one_lt _).le) _ |
| 608 | have log_ratio : D.f • log (D.N ^ D.k / (D.N ^ D.k - 1)) ≤ D.f • (2 / D.N : ℝ) := |
| 609 | nsmul_le_nsmul_right D.log_pow_div_pow_sub_one_le _ |
| 610 | have mul_mean_log_weight_eq : |
| 611 | D.k * D.m * (D.f * ((∑ v : D.Φ, log (D.weight v)) / D.f)) = |
| 612 | D.k * D.m * ∑ v : D.Φ, log (D.weight v) := by rw [mul_div_cancel₀ _ (ne _)] |
| 613 | -- The degree and the ratio of the masses, with their factorials. |
| 614 | have log_deg : log D.filling.besselDegree + D.f * ∑ l ∈ Ico (D.k - 1) D.r, log l.factorial ∈ |
| 615 | Set.Icc (∑ v : D.Φ, D.m * ((D.k - 1) * log (D.weight v))) |
| 616 | (∑ v : D.Φ, D.m * (D.r * (log (D.weight v) + D.x⁻¹))) := |
| 617 | D.log_filling_besselDegree_mem_Icc |
| 618 | have mass_ratio : |∑ i ∈ Ico D.k D.r, (log (mass D.E (i + 1)) - log (mass D.E i) - |
| 619 | D.f * ((i + 1 / 2) * log D.rootDisc + log i.factorial - (i + 1) * log (2 * π)))| ≤ |
| 620 | log (1 + D.b⁻¹ ^ 9) - 2 * (D.f * (2 / D.N)) := D.abs_sum_log_mass_ratio_sub_le |
| 621 | have first_factorial : D.f * ∑ i ∈ Ico (D.k - 1) D.k, log i.factorial = |
| 622 | D.f * ∑ i ∈ {D.k - 1}, log i.factorial := by rw [D.k.Ico_pred_singleton k_pos] |
| 623 | -- The remaining terms are small against `f k log b`. |
| 624 | have rest_small : |
| 625 | |D.f * (D.m - 1) * (D.ϱ * log (D.M * D.rootDisc / 2 / π) + log (√D.rootDisc / 2 / π)) - |
| 626 | D.m * ∑ v : D.Φ, log (D.weight v)| ≤ D.f * D.k * D.logB / 4 - (log (1 + D.b⁻¹ ^ 9) + |
| 627 | D.m * (D.m * ∑ v : D.Φ, log (D.weight v) + D.f * D.r * D.x⁻¹) + D.f * D.k * √D.logB) := |
| 628 | -- The default `h_exp` tactic (`scale_arith`) splits all the `max` cases and times out here. |
| 629 | le_sub_iff_add_le.mpr (D.le_of_hasLogBound (h_exp := by |
| 630 | clear_aux_decl |
| 631 | clear * - D |
| 632 | scale_grind D)) |
| 633 | rw [mainSecondMoment_div_identitySecondMoment_eq, h_order] |
| 634 | simp only [eq_tsub_of_add_eq D.r_add_one] at * |
| 635 | -- Expand the logarithms and the sums: `sum_range_sub` telescopes the mass terms, and |
| 636 | -- `sum_range_id` evaluates the sums of the indices. What is left is linear in the logarithms, in |
| 637 | -- the sums of `log i!` and in `log b`. |
| 638 | simp (disch := intros; first | positivity | omega) only [log_div, log_mul, log_pow, log_sqrt, |
| 639 | sum_add_distrib, sum_const, Finset.card_range, nsmul_eq_mul, sum_range_id, |
| 640 | ← Nat.choose_two_right, card_univ, logLevelTarget, New.Parameters.logLevelMin, |
| 641 | abs_le, ↓sum_Ico_eq_sub, Set.mem_Icc, sum_sub_distrib, ← mul_sum, |
| 642 | sum_singleton, ← sum_mul, ← Nat.cast_sum _ (·), ↓sum_range_sub (log <| mass D.E ·)] at * |
| 643 | push_cast (disch := apply D.nat_le_of_hasLogBound) [Nat.cast_choose_two, ← add_assoc, |
| 644 | m_eq_two_mul_varrho_add_two] at * |
| 645 | constructor <;> linarith |
| 646 | |
| 647 | /-- For admissible data `D`, the ratio of the main second moment to the identity second moment lies |
| 648 | between `b ^ (11 k f)` and `(M / b ^ 6) ^ (k f)`. Here `b = D.b` is the weight at the `b`-places, |
| 649 | `M = p₀ p₁` is the principal level, `k` the rank of `X₀` and `f` the number of infinite places. -/ |
| 650 | theorem mainSecondMoment_div_identitySecondMoment_mem_Icc : |
| 651 | D.filling.mainSecondMoment / D.filling.identitySecondMoment ∈ |
| 652 | Set.Icc (D.b ^ (11 * (D.k * D.f))) ((D.M / D.b ^ 6) ^ (D.k * D.f)) := by |
| 653 | -- The factor `d ((k - 1)!) ^ f` lies between `1` and `b ^ (5 k f / 4)`, and `b ^ 19 ≤ M`. |
| 654 | have M_pos : (0 : ℝ) < D.M := Nat.cast_pos.2 (pos D.M) |
| 655 | have ratio_pos : 0 < D.filling.mainSecondMoment / D.filling.identitySecondMoment := by |
| 656 | have order_pos : 0 < D.filling.unipotentOrder := by simp [← card_reducedImage_besselU] |
| 657 | rw [mainSecondMoment_div_identitySecondMoment_eq] |
| 658 | positivity [D.filling.besselDegree_pos, mass_pos D.E D.k, mass_pos D.E D.r, D.pow_sub_one_pos] |
| 659 | have log_factor_nonneg : |
| 660 | 0 ≤ log (Fintype.card D.filling.BesselCoord * (D.k - 1).factorial ^ D.f) := |
| 661 | mod_cast log_natCast_nonneg (Fintype.card D.filling.BesselCoord * (D.k - 1).factorial ^ D.f) |
| 662 | have log_factor_le : log (Fintype.card D.filling.BesselCoord * (D.k - 1).factorial ^ D.f) ≤ |
| 663 | D.f * D.k * (5 / 4 * D.logB) := by |
| 664 | refine (log_le_log (by positivity) D.card_besselCoord_mul_factorial_le).trans_eq ?_ |
| 665 | rw [log_pow, log_pow, log_pow, log_sqrt (sqrt_nonneg _), log_sqrt (exp_nonneg _), log_exp] |
| 666 | linarith |
| 667 | have level_ge : (D.f * D.k : ℝ) * (19 * D.logB) ≤ D.f * D.k * log D.M := by |
| 668 | gcongr |
| 669 | simpa using log_le_log (by positivity) (D.le_of_hasLogBound : D.b ^ 19 ≤ D.M) |
| 670 | obtain ⟨h_lower, h_upper⟩ := abs_le.1 D.abs_log_mainSecondMoment_div_identitySecondMoment_sub_le |
| 671 | constructor |
| 672 | · rw [← log_le_log_iff (by positivity) ratio_pos, log_pow, log_exp] |
| 673 | push_cast |
| 674 | linarith |
| 675 | · rw [← log_le_log_iff ratio_pos (by positivity), log_pow, log_div M_pos.ne' (by positivity), |
| 676 | log_pow, log_exp] |
| 677 | push_cast |
| 678 | linarith |
| 679 | |
| 680 | /-- The prime level `N` is at most `b ^ (60 n)`, where `n` is `D.shape.n`. -/ |
| 681 | lemma N_le_pow : (D.N : ℝ) ≤ D.b ^ (60 * D.shape.n) := by |
| 682 | have h_log : log D.N ≤ 30 * (2 * D.ϱ + 2) * D.logB := by |
| 683 | simpa [D.m_eq_two_mul_varrho_add_two] using D.log_N_mem_Icc.2 |
| 684 | rw [← log_le_log_iff (Nat.cast_pos.2 D.N_prime.pos) (by positivity), log_pow, log_exp] |
| 685 | push_cast |
| 686 | linarith |
| 687 | |
| 688 | /-- Replacing `N ^ k` by `N ^ k - 1` loses at most the factor `b`, as both `b` and `N ^ k` are at |
| 689 | least `2`. -/ |
| 690 | lemma pow_div_le_pow_sub_one : (D.N : ℝ) ^ D.k / D.b ≤ D.N ^ D.k - 1 := by |
| 691 | have two_le_b : 2 ≤ D.b := D.le_of_hasLogBound |
| 692 | have two_le_pow : (2 : ℝ) ≤ D.N ^ D.k := |
| 693 | mod_cast D.N_prime.two_le.trans (Nat.le_self_pow D.k_pos.ne' _) |
| 694 | calc (D.N : ℝ) ^ D.k / D.b ≤ D.N ^ D.k / 2 := by gcongr |
| 695 | _ ≤ D.N ^ D.k - 1 := by linarith |
| 696 | |
| 697 | /-- The filling data of `D` satisfy the standing hypotheses `New.Filling.IsAdmissible`: the level |
| 698 | is the preimage of the principal level, reduction is onto, and the size inequalities hold. -/ |
| 699 | instance : D.filling.IsAdmissible := by |
| 700 | have h_energy : 0 < D.filling.identitySecondMoment := |
| 701 | mul_pos (Nat.cast_pos.2 Nat.card_pos) |
| 702 | (Nat.cast_pos.2 (Nat.mul_pos Fintype.card_pos Fintype.card_pos)) |
| 703 | have h_rank : D.shape.k = D.k := D.card_X₀ |
| 704 | have h_b : D.filling.b = D.b := rfl |
| 705 | have h_varpi (v : InfinitePlace D.E) : ‖Φ v D.filling.deltaE.val‖ = v |
| 706 | (P.deltaE D.towerExp).val := by |
| 707 | rw [← InfinitePlace.apply, mk_Φ] |
| 708 | rfl |
| 709 | have h_kappa (v : InfinitePlace D.E) : |
| 710 | |D.filling.realM v| = D.M * v (P.deltaE D.towerExp).val / (2 * π) := by |
| 711 | rw [abs_realM_eq, ← h_varpi v] |
| 712 | rfl |
| 713 | exact |
| 714 | { sourceLevel_eq := D.levelX_zero_eq_comap |
| 715 | reduction_surjective := D.filling_reduction_surjective |
| 716 | norm_deltaE_le := fun v ↦ by |
| 717 | rw [h_varpi v, h_b] |
| 718 | exact (D.apply_deltaE_mem_Icc v).2 |
| 719 | one_le_abs_realM := fun v ↦ D.le_of_hasLogBound.trans_eq (h_kappa v).symm |
| 720 | abs_realM_le := fun v ↦ by |
| 721 | rw [h_kappa v, h_b] |
| 722 | exact D.le_of_hasLogBound |
| 723 | N_le := D.N_le_pow |
| 724 | mul_identitySecondMoment_le := by |
| 725 | rw [h_rank] |
| 726 | exact (le_div_iff₀ h_energy).1 |
| 727 | D.mainSecondMoment_div_identitySecondMoment_mem_Icc.1 |
| 728 | mainSecondMoment_le := by |
| 729 | rw [h_rank] |
| 730 | exact (div_le_iff₀ h_energy).1 D.mainSecondMoment_div_identitySecondMoment_mem_Icc.2 |
| 731 | card_besselCoord_le := by |
| 732 | rw [h_rank] |
| 733 | exact D.card_besselCoord_le_pow |
| 734 | le_relIndex := by |
| 735 | rw [D.relIndex_latticeStabilizer, h_rank] |
| 736 | exact pow_le_pow_left₀ (by positivity) D.pow_div_le_pow_sub_one _ |
| 737 | scaledSiegelConst_le := D.scaledSiegelConst_le } |
| 738 | |
| 739 | end New.Data |
| 740 | |
| 741 | end |