module import Mathlib.Analysis.SpecialFunctions.RegularizedHypergeometric import Mathlib.Data.Rat.Cast.OfScientific import Mathlib.Tactic.Linter.Style public import Lib.Weil.DualPair.HolomorphicData public import New.OneLift.HeckeValues.CharacterLift public import New.UpperBound.Objects.Rows public import Lib.ClassField.HeckeCharacter.TameModulus public import Lib.General.LinearAlgebra.MatrixPolynomials /-! # Data of the three exchanges: the carrier, the choices and the functions 𝖥_i For admissible data `D`, the element `ϖ = New.Data.piM` of 𝓞_E generates the product of the primes at the places `New.Data.chosenPlace`. The file defines the objects of the three exchanges that turn a twist into a number on `W_j = New.Data.spaceW`, `1 ≤ j ≤ m`: the carrier φ° with its coefficients 𝖺, the modulus `ϖ^c`, the index sets of the spaces, the characters, the choices `i`, the fixed polynomial `P` and the functions `𝖥_i`. The standard definite space `E^n` is also written `I_n`, and `υ = New.WeilData.upsilonU1` is the character `ν_η` of weight 1 and trivial tame part. The letter `ϑ` denotes a tame character (`New.Data.TameChar`); it is a twist only where this is said. | object | Lean name | object | Lean name | |---|---|---|---| | `S = E^{2m,m}` | `CarrierIndex` | `χ′` | `twistedChiMPow` | | `W♭ = E^{6m+1}` | `FlatIndex` | `ν″` | `firstFactorChar` | | `V″`, `W′` | `FirstFactorIndex` | `ν♭ υ^m` | `carrierChar` | | `V°` | `SecondFactorIndex` | `φ°`, `𝖺 χ′` | `carrierForm`, `carrierCoeff` | | columns of `μ⁺`, plus Δ′ indices | `DetIndex` | `P`, `𝖥_i` | `paddedMinorProd`, `choiceFn` | | choices `i` | `ChoiceIndex` | `u`, `u°` | `conjHolomorphicWeight`, `kernelWeight` | ## Main definitions and results * `New.Rows.carrierForm`: the carrier φ°, the theta lift of the constant function from the unitary group of a negative definite space to that of a space with signs `+1` on `2 m` and `−1` on `m` coordinates. * `New.Rows.carrierCoeff`: the coefficients 𝖺 times a character, a class sum of theta kernels between two definite spaces. * `New.Data.choiceFn`: the function `𝖥_i` on `U(W_j)`, the integral of the carrier against a theta kernel. * `New.Data.isTameFor_of_hasWeight`, `New.Data.isTameFor_twistedChiMPow`: let `ϑ` be a twist, `c ≠ 0`, and take a character whose tame part is `ψ * ϑ.tamePart`, with `ψ` non-trivial exactly at the chosen places. It ramifies exactly at the places dividing `D.twistModulus ϑ c`, that is, the chosen places and the places in `ϑ.Q` (`New.Exchange.IsTameFor`). This applies to `New.Data.twistedChiMPow`. * `New.Rows.exists_int_weylRep_invariant_fockPoly_eq_smul_monomial`: for a monomial of the right degrees there is an integral vector whose Fock polynomial is a nonzero multiple of the monomial. The vector is fixed by the elements that act trivially on the rows of the monomial. Notions from other files: * `New.Modulus`: a nonzero ideal of 𝓞_E that is never divisible by both a place w and its conjugate w̄. * `New.Data.spaceW`: the diagonal hermitian space `W_j` of rank r over E with signs `D.signsW j`. * `New.Data.liftWeight`: the natural number `κ_j`, a function of the infinite place; the character `New.Data.liftChar` of the `j`-th lift has weight `−κ_j`. * The numbers of `D`: the rank `r` of `W_j`, the number `m` of lifts, `k = r + 1 − m`, `t = 5 r`, the gap `Δ = New.Data.gap = 2 r ^ 8` and `Δ′ = New.Data.reducedHalfGap = Δ / 2 − (t + 1) / 2`. * `New.Data.descentPair`: the data (`New.DescentPair`) of the lift from `W_j` to `I_{r+t}`. They include a `numbering` of the basis vectors of `W_j` and, at each infinite place, two partitions `μ⁺`, `μ⁻` given by their numbers `colsPlus`, `colsMinus` of columns of each height. * `New.Data.TameChar`, `New.Data.Twist`: a character of U(1)(𝔸) of weight 0 whose tame part is trivial outside a finite set Q of places; it is a twist if the tame part is non-trivial on all of Q. ## Use in the argument * The carrier φ° and the coefficients 𝖺: the class sum of a twisted square kernel against 𝖺 is a multiple of φ°. See `New.OneLift.ComparisonOperator.ThreeExchanges`. * Moduli, index sets, polynomial and functions `𝖥_i`: the third exchange and its left side as a theta series. See `New.OneLift.ComparisonOperator.ThreeExchanges` and `New.OneLift.ComparisonOperator.FirstFactors`. * Order, weights and gaps on `W_j`: the functions `𝖥_i` separate good forms. See `New.OneLift.ComparisonOperator.ProductsSpan`. * Integral vectors with a monomial Fock polynomial: the height bound for inverse ratios of twisted to untwisted Hecke L-values. See `New.OneLift.HeckeValues.TwistedValueHeights`. -/ @[expose] public section noncomputable section /-! ## The ideal generated by ϖ -/ /-- Let `D` be admissible data and `ϖ = D.piM` the integer of E whose prime divisors are the chosen places. The ideal generated by `ϖ` is the product of the primes `D.chosenPlace i`, over all pairs `i = (k, w)` with `w` a chosen place above the prime `p_k = D.levelPrime k`. -/ lemma New.Rows.span_piM {P : Parameters} (D : Data P) : Ideal.span {D.piM} = ∏ i : (k : Fin 2) × D.ChosenPlace k, (D.chosenPlace i).asIdeal := by -- Both sides consist of the `x` that lie in every prime `D.chosenPlace i`. For the left side pass -- to the integral adeles, where `D.piM` vanishes to order one at each place containing it. have h_places (w : FinPlace D.E) : D.piM ∈ w.asIdeal ↔ w ∈ Set.range D.chosenPlace := by simp [D.range_chosenPlace, Data.IsChosen] ext x rw [Ideal.mem_span_singleton, ← dvd_iff_Ô D.piM_ne_zero, dvd_iff_reduceAt_eq_zero D.intValuation_piM, mem_prod_finPlace_iff D.isConjApart_chosenPlace.injective] simp only [h_places, Set.forall_mem_range] -- The image of `x` reduces to `0` at a place exactly if the place contains `x`. exact forall_congr' fun i ↦ by simp /-! ## Stacked determinants, the trivial modulus, the carrier φ° and the coefficients 𝖺 -/ namespace New.Rows open Matrix MvPolynomial WeilData NumberField variable {Φ l n n' : Type} [Fintype l] [DecidableEq l] [Fintype n'] [DecidableEq n'] /-- The determinant of the square matrix formed by the columns `j` of the constant matrix `η` (rows `l`) stacked over the matrix of variables `X (τ, a, b)` (rows `n'`), both with columns `n`. -/ def stackedDet (τ : Φ) (η : Matrix l n ℂ) (j : l ⊕ n' → n) : MvPolynomial (Φ × n' × n) ℂ := (((η.map C).fromRows (of fun (a : n') (b : n) ↦ X (τ, a, b))).submatrix id j).det variable (E : Type) [Field E] [CMType E] [WeilData E] (m : ℕ) /-- The modulus of E whose ideal is the whole ring of integers. -/ abbrev unitModulus (E : Type) [Field E] [NumberField E] [IsCMField E] : Modulus E where ideal := ⊤ ne_bot := top_ne_bot not_le_star w := by simp [w.isPrime.ne_top'] /-- The carrier φ°: the theta lift of the constant function 1 from the unitary group of the negative definite space I_m⁻ to that of the space S with signs +1 on `Fin (2 * m)` and −1 on `Fin m`. The theta kernel is taken with trivial modulus, function 1 and the polynomial ∏_τ det(y⁻_τ)^{2m}, where y⁻_τ is the m × m block of variables in the rows of sign −1. Its characters are υ^m and 1, so it is υ(det g′)^m times the kernel with standard characters, for g′ in the group of I_m⁻. -/ def carrierForm : G E ((1 : Fin ((2 : ℕ) * m) → ℤˣ) ⊕ᵥ (-1 : Fin m → ℤˣ)) → ℂ := Space.lift (pairThetaKer (stdSpace E (Fin m)).neg (signedSpace E (1 ⊕ᵥ -1 : Fin (2 * m) ⊕ Fin m → ℤˣ)) (upsilonU1 ^ m) 1) (modDatum (stdSpace E (Fin m)).neg (signedSpace E (1 ⊕ᵥ -1)) (unitModulus E) 1 (Fock.polyVector (realSigns E (homSigns (-1) (1 ⊕ᵥ -1))) (∏ τ : InfinitePlace E, variableMinor τ Sum.inr id ^ (2 * m)))) fun _ ↦ 1 variable {E} /-- The function `𝖺(h) c(det h)` on the finite adelic points of `U(I_{n'})`: the class sum over `U(I_m)` at the level `New.stdLevel` of the theta kernel with characters `c` and `1`, trivial modulus, constant finite datum and polynomial `1`, taken at archimedean component `1` on both groups. The coefficient `𝖺(h)` is the value for `c = 1`. -/ def carrierCoeff (c : AutChar E) (h : Gf E n') : ℂ := stdClassSum (stdLevel E (Fin m)) (modKernelStdSpace (n' := n') (stdSpace E (Fin m)) c 1 (unitModulus E) 1 1 ⟨1, ·⟩ h) end New.Rows /-! ## Moduli, index sets, polynomial and functions of the third exchange The objects of the third exchange for admissible data `D` (`New.Data`), a tame character `ϑ` (`New.Data.TameChar`) and an index `j`. The spaces `V″` and `V°` are the standard definite spaces (all signs `+1`) on the index sets `New.Data.FirstFactorIndex` and `New.Data.SecondFactorIndex`. -/ namespace New.Data open Ideal Matrix Rows WeilData Fintype Sum LevelPlaces NumberField variable {P : Parameters} (D : Data P) /-- The modulus ϖ^c, the c-th power of the product of the chosen places above p₀, p₁. It is the modulus `D.twistModulus` of the trivial character; the argument `false` leaves out the factor Q, the product of the places of the character. -/ abbrev untwistedModulus : ℕ → Modulus D.E := fun c : ℕ ↦ D.twistModulus TameChar.one c false lemma ideal_untwistedModulus_eq_span {c : ℕ} : (D.untwistedModulus c).ideal = span {D.piM ^ c} := by rw [← span_singleton_pow, span_piM] exact mul_one ((∏ i : (k : Fin 2) × D.ChosenPlace k, (D.chosenPlace i).asIdeal) ^ c) instance : NeZero D.m := .of_gt D.ten_thousand_le_m /-! ### Index sets and the numbering of the basis -/ /-- The index set with 2m + m elements, in two blocks, of the space S of signature (2m, m). -/ abbrev CarrierIndex : Type := Fin (2 * D.m) ⊕ Fin D.m /-- The index set, with 6m + 1 elements, of the definite space W♭ = I_{6m+1}. -/ abbrev FlatIndex : Type := Fin (6 * D.m + 1) /-- The index set of V°: the r indices of W_j and t − 9m − 1 − r further ones. -/ abbrev SecondFactorIndex : Type := D.RowIndex ⊕ Fin (D.t - 9 * D.m - 1 - D.r) /-- The set of classes of U(V°) at principal level ϖ²: double cosets of U(V°)(𝔸_f) by the rational points and the congruence subgroup modulo ϖ². -/ abbrev SecondFactorClasses : Type := StdClasses (principalLevel D.SecondFactorIndex (D.piM ^ 2)) /-- The inverse of the numbering `New.Data.basisNumber`: the index in `New.Data.RowIndex` that has number min(i, r − 1). -/ def rowIndexOfNumber (i : ℕ) : D.RowIndex := D.basisNumber.symm ⟨i ⊓ (D.r - 1), by grind⟩ /-! ### Choices of classes and rows -/ /-- The part of a choice that lives on W♭ = I_{6m+1}: a class of U(W♭) at principal level ϖ² and, for each infinite place, Δ′ lists of 2m row indices among 6m + 1. Here Δ′ = `D.reducedHalfGap` = r⁸ − (t + 1)/2 is the size of the second block of `New.Data.DetIndex`: the number of columns of the partition μ⁺ of the greatest height k + j − 1. -/ abbrev RowChoice : Type := StdClasses (principalLevel D.FlatIndex (D.piM ^ 2)) × (D.Φ → Fin D.reducedHalfGap → Fin (2 * D.m) → D.FlatIndex) /-- A chosen invertible matrix over E whose rows lie in the lattice at the class `i.1` and whose entries are small at every complex embedding (`New.Space.exists_short_basis_stdSpace`). -/ def shortRows (i : D.RowChoice) : Matrix D.FlatIndex D.FlatIndex (P.E D.towerExp) := (Space.exists_short_basis_stdSpace P.conductor_mem_differentIdeal i.1.out).choose.valᵀ variable {D} (ϑ : D.TameChar) (j : D.LiftIndex) /-! ### Characters, padding, the polynomial and the functions `𝖥_i` -/ /-- The character χ′ = χ^j·ϑ of [U(1)], for the fixed weight-zero character χ of tame part ω and a tame character ϑ. -/ def twistedChiMPow : AutChar D.E := D.chiM ^ j.val * ϑ.toAutChar /-- The character `twistedChiMPow ϑ j = D.chiM ^ j * ϑ` has weight `0` at every infinite place. Its tame part is `D.liftTamePart ϑ j = D.chiMLocal ^ j * ϑ.tamePart`, where `D.chiMLocal` is the tame part of `D.chiM`. -/ lemma twistedChiMPow_hasWeight : (twistedChiMPow ϑ j).HasWeight 0 (D.liftTamePart ϑ j) := by simpa [twistedChiMPow, liftTamePart] using (D.chiM_hasWeight.zpow j).mul ϑ.hasWeight /-- The index set of the padding I_j⁻ ⊕ I_{3m−j} of W_j: a block of j elements and a block of 2m + (m − j) elements. -/ abbrev PadIndex : Type := Fin j ⊕ Fin (2 * D.m + (D.m - j)) /-- The index set of V″ and of W′: the r indices of W_j, the padding `New.Data.PadIndex` and the indices of W♭. -/ abbrev FirstFactorIndex : Type := (D.RowIndex ⊕ PadIndex j) ⊕ D.FlatIndex /-- The signs of the padded space W_j ⊕ I_j⁻ ⊕ I_{3m−j}: those of W_j, then −1 on j indices and +1 on 2m + (m − j) indices. -/ abbrev padSigns : D.RowIndex ⊕ PadIndex j → ℤˣ := D.signsW j ⊕ᵥ (-1 ⊕ᵥ 1) /-- The m chosen negative rows of the padded W_j: i < m goes to the i-th index of the padding block of size j if i < j, and to `New.Data.rowIndexOfNumber`(k + i − 1) otherwise. -/ def negIndex (i : Fin D.m) : D.RowIndex ⊕ PadIndex j := if hi : i.val < j then inr (inl ⟨i, hi⟩) else inl (D.rowIndexOfNumber (D.posRank i)) /-- The 2m constant rows for a column of height h < r₊ = k + j − 1, all basis vectors: i < 2m goes to the basis vector number h + i of W_j if h + i < r₊, and otherwise to index i of the positive padding block. -/ def posRowIndex (h : ℕ) (i : Fin (2 * D.m)) : D.RowIndex ⊕ PadIndex j := if h + i.val < D.posRank j then inl (D.rowIndexOfNumber (h + ↑i)) else inr (inr (i.castAdd (D.m - j))) /-- The j-th descent pair `New.Data.descentPair` at the trivial character: the data of the lift from W_j to I_{r+t}, with a `numbering` of the basis vectors of W_j and the numbers `colsPlus τ h`, `colsMinus τ h` of columns of height h of two partitions μ⁺, μ⁻ at each infinite place τ. -/ abbrev untwistedDescentPair : DescentPair D.E D.RowIndex (D.RowIndex ⊕ Fin D.t) := D.descentPair TameChar.one j /-- The index set of the determinants at the place τ, one for each column of the partition μ⁺. Let r₊ = `D.posRank j` = k + j − 1, with k = r + 1 − m, be the number of plus signs of W_j. For each height h < r₊ there are `(untwistedDescentPair j).colsPlus τ h` indices, the number of columns of height h that the data of the j-th lift assign to μ⁺; for the height r₊ there are Δ′ = `D.reducedHalfGap` indices. -/ abbrev DetIndex (τ : InfinitePlace D.E) : Type := (Σ h : Fin (D.posRank j), Fin ((untwistedDescentPair j).colsPlus τ h)) ⊕ Fin D.reducedHalfGap /-- The fixed polynomial P = ∏_τ det(y⁻_τ)^{e′(τ)} ∏_{h