Skip to content

Formal Groups, Theta Normal Form & Prime-Counting Divisibility ​

This page unpacks the two core divisibility landmarks of Stage 02 — src/New/Derivatives/FormalGroup/ThetaProducts.lean (02_derivatives/theta_products) and src/New/Derivatives/Divisibility/Count.lean (02_derivatives/count) — together with their immediate upstream formal-group and direction-elimination helpers (FrobeniusCongruence.lean, Exponent.lean, NullFrames.lean) and downstream Stage 03 bridge (Vacuum/Divisibility.lean). Return to the Stage 02 Overview, or continue to Tight Frames, Resolution Products & the Integral Vacuum and Sharpness: Attaining the Divisibility Bound.

Level 1 · First-Principles

Level 1 — First-Principles ​

Take a smooth function F(z) whose Taylor series has integer coefficients. Differentiating F B times at z=0 pulls down a factorial B!, so the B-th derivative is automatically divisible by roughly pB/(p−1) for every whole number greater than 1 with no smaller positive divisorsprime number p. That baseline comes purely from calculus — it treats every prime identically.

Now replace a generic series by the quasi-periodic entire function attached to an elliptic curveelliptic theta function with extra ring symmetries from the integers of an imaginary quadratic fieldcomplex multiplication K=Q(−d), where d≡7(mod8) is prime. Measuring divisibility by powers of p — its exact prime-power divisibility exponentarithmetic height (the $p$-adic valuation) — reveals a striking split governed by the sign-flipping quadratic character χK(p) recording how p factors in Kquadratic twist (the Legendre symbol). Near z=0, the curve's addition law defines a power-series group law with a local coordinate Tformal group law that satisfies a Frobenius congruence:

  • When p splits (χK(p)=1), the formal group law has height 1, so rescaling by a number ϖ of valuation ρp=1p−1 wipes out the entire factorial gain: the net slope is γp=0.
  • When p is inert (χK(p)=−1), the curve is supersingular modulo p (height 2), so the Frobenius congruence jumps by qp=p2 instead of p:θ(pz)θ(z)p2≡1(modp).Because p2−1 is vastly larger than p−1, rescaling the variable by ϖ of valuation only ρp=1p2−1 already pulls almost all of θ(ϖz) into an integral series, leaving a single controlled exponential tail. Every derivative therefore keeps an extra divisibility slopeγp=1p−1−1p2−1=pp2−1=1p+1p3+1p5+⋯.
  • When p=d is ramified (χK(d)=0), the uniformizer is πd=−d of valuation 1/2 and norm qd=d, costing ρd=12(d−1) and leaving extra slopeγd=1d−1−12(d−1)=12(d−1)=12(1d+1d2+1d3+⋯).

In every case, 2γplog⁡p equals ∑e≥1Λ(pe)(1−χK(pe))p−e, matching the exact prime-power logarithmic weight Λ(n)von Mangoldt function twisted by (1−χK(n)).

Pipeline from the one-curve congruence modulo p through Galois-shifted places and spanning vector families to the factored normal form and derivative divisibility count

Passing from one variable to the multi-variable theta functions over the cyclotomic CM field E=K(ζq1) takes four clean algebraic moves:

  1. Collapse along a spanning frame: Suppose a family of vectors uj with multiplicities mj forms a weighted spanning family reconstructing every vector from its projections uj†ztight frame (a resolution of the identity). Taking the product ∏jθ(uj†z)mj multiplies the one-variable exponential tails together into a single exponent ∑jmjΞ(uj†z).
  2. Pair each place with its Galois partner: Modulo πp, raising a coordinate at an infinite place τ to the pe-th power acts like complex conjugation at the shifted place τ′=−peτ. That congruence collapses the sum over all frame vectors uj into a universal canonical factorization expressing F(ϖz) as an integral series times the exponential of cross-place couplings Γe pairing each place τ with its shifted partner τ′theta normal form. Crucially, the resulting theta normal form forgets every detail of the specific frame uj.
  3. Kill the couplings by changing directions: The exponential factor exp⁡(cϖ∑λe,jΓepj) is the only obstruction preventing F(ϖz) from having integral coefficients. Because cϖπp has valuation 1p−1, making every active Frobenius coupling Γe divisible by πp forces the entire exponential — and hence F(ϖz) — to become integral up to degree B. Stage 02 achieves this by applying a linear change of variables that steers the column directions into null spaces modulo πp, paying a controlled determinant "deduction" for each imposed congruence.
  4. Read off the derivative bound and lift to Schur matrices: Once G(s)=F(ϖz(s)) is integral in degree B, Legendre's factorial bound gives vp(jet of G)≥B/(p−1)−O(fN3logp⁡B). Dividing by the chain-rule scaling factor ϖB and the change-of-direction determinants leaves γpB minus the deduction sum — the exact derivative divisibility lower bound on matrix minors and Schur-matrix polynomialsSchur jet (the predicted divisibility of every minor product and Schur jet entry).

How Galois-shifted place pairings drive direction substitution, determinant deductions, marked-place charges, and the passage from minor determinants to matrix derivatives

Where this analogy breaks ​

Saying that "killing the couplings turns F(ϖz) into an integral series" hides two subtle features that make the formal proof work. First, you do not need to kill infinitely many Frobenius couplings Γe: because Γe is homogeneous of degree pe+1, only exponents e≤⌊logp⁡B⌋ can ever touch Taylor coefficients of degree B, so the direction elimination solves only finitely many congruences. Second, in Stage 03 some places τ carry exceptional height-1 columns ("marked places") that cannot be eliminated cheaply by linear algebra alone; instead, Stage 02 exempts those pairs from the congruence conditions and pays for them explicitly with row-level prime-power "charges" pw(τ,h,b) that add cleanly to the exponent bound.

Level 2 · Undergrad Bridge

Level 2 — Undergrad Bridge ​

1. Prime splitting and the supersingular formal group (FrobeniusCongruence.lean, Exponent.lean) ​

Fix P:Parameters, so d=P.d is a prime with d≡7(mod8) and q0 is a multiple of 18480=16⋅3⋅5⋅7⋅11 with d≡q0/2−1(modq0). Since d≡7(mod8), the prime 2 splits in K=Q(−d) (χK(2)=1), so every non-split prime p is odd; moreover, in the proof's admissible data all primes dividing q0 split in K, so every non-split prime satisfies p≥13.

Let C=P.cmCurve be the CM lattice Ω0OK scaled so that ℘″(t)=2 at its chosen 2-torsion point t with a12=12℘(t), and write θ,x,y for the Taylor series at 0 (embedded into Cp via ιp:C→Cp) of C.θ, C.translatedX(z)=℘(z+t)−℘(t), and C.translatedY(z)=(℘′(z+t)−a1x(z))/2, with g=−log⁡θ. The ring O[[y]]=O[[T]] is C.integralSeriesRing over the valuation ring O=valRingCp p.

For any prime p with χK(p)≠1, define:

Prime TypeχK(p)πpv(πp)qpρp=v(πp)qp−1γp=1p−1−ρpIp∘ (partnerExponents)Ip (positivePartnerExponents)
Split+1p1p1p−10∅∅
Inert (height 2)−1p1p21p2−1pp2−1=∑e≥1, oddp−e{1,3,5,…}{1,3,5,…}
Ramified (p=d)0−d12d12(d−1)12(d−1)=12∑e≥1d−eN (includes 0){1,2,3,…}

The one-curve formal-group pipeline then runs in two modules:

  1. FrobeniusCongruence.lean: Proves the Frobenius congruence θ(πpz)/θ(z)qp≡1(modπp) in O[[y]] (New.CMLattice.exists_rescale_theta_eq_pow_mul_one_add_smul), hence qpg(z)−g(πpz)∈πpO[[y]] (New.CMLattice.exists_negLogTheta_frobenius_congruence). Independently, a recursion proves that at an inert prime p the coefficient of zp−1 in x(z) is a p-adic unit (New.CMLattice.norm_coeff_taylorVia_translatedX_eq_one).
  2. Exponent.lean: Averaging ζ−p−1g(ζz) over the (qp−1)-th roots of unity isolates the part g♭ supported in degrees ≡p+1(modqp−1). Solving the resulting functional equation degree by degree for Ξ1=−g♭(ϖz)/cϖ (where v(ϖ)=ρp and cϖ=ϖp+1/p) yields New.CMLattice.exists_exponent_tsum:θ(ϖz)=W(z)exp⁡(cϖΞ1(z)),Ξ1(z)≡∑e∈Ip∘∑j≥0λe,j(zpez)pj(modπp),with W,Ξ1∈O[[z]], and when p is inert, λe,0∈O× for all odd e (a unit property later essential for sharpness in BoundAttained.lean). Note the exact balancing identity (New.Parameters.norm_pow_succ_div_mul_piPrimeInt):v(cϖπp)=(p+1)ρp−1+v(πp)=1p−1,which sits right at the threshold where exp⁡(cϖπp⋅integral series) has integral coefficients.

2. Partner places, Frobenius couplings, and the theta normal form (ThetaProducts.lean) ​

Let E=P.E s=K(ζq1) with infinite places Φs=P.Φ s≅Gal(E/K)≅(Z/q1Z)×. For e∈N and τ∈Φs, define the partner place (New.Parameters.partner):

τ′=P.partner s p e τ=(−pe)⋅τ∈Φs.

Comparing Frobenius on the generators of OE proves New.Parameters.norm_pow_sub_conj_partner_le (and its conjugate form norm_conj_pow_sub_partner_le for elements integral above p): for every e∈Ip∘ (odd e when p is inert; all e≥0 when p=d) and α∈OE,

τ(α)pe≡τ′(α)―(modπp),τ(y)―pe≡τ′(y)(modπp).

Now let vectors uj∈En (integral above p) with multiplicities mj∈N form a resolution of the identity (IsResolution u m), meaning z=∑jmj(uj†z)uj, where (uj†z)=∑(τ,c)τ(uj,c)―z(τ,c) has integral coefficients in Cp (norm_daggerForms_le_one). By dvd_pow_sub_sum_partner, (uj†z)pe≡∑(τ,c)τ′(uj,c)z(τ,c)pe(modπp). Multiplying by mj(uj†z) and summing over j applies the resolution identity ∑jmjτ′(uj,c)(uj†z)=z(τ′,c) to give New.Parameters.piPrimeInt_dvd_sum_linearSeries_sub_coupling:

∑j∈Jmj(uj†z)pe(uj†z)≡Γe:=∑(τ,c)∈Φs×nz(τ,c)pez(τ′,c)(modπp)(e∈Ip∘).

Because θ(ϖz)=Wexp⁡(cϖΞ1), multiplying over all j (rescale_thetaProd_eq_mul_expSubst) and lifting the congruence term-by-term through pj-th powers (dvd_sum_subst_sub_couplingSum) while checking that any integral series H∈C.multiSeriesRing(daggerForms u) becomes integral at ϖz (rescale_mem_range_of_mem_multiSeriesRing) produces the headline theorem of ThetaProducts.lean, New.Parameters.exists_hasNormalForm:

(∏j∈Jθ(uj†z)mj⋅H)(ϖz)=Wtot(z)exp(cϖ∑e∈Ip∘∑j≥0λe,jΓepj),Wtot∈O[[z]].

3. Direction substitution, Legendre's bound, deductions, and charges (NullFrames.lean, Count.lean) ​

Now specialize the variable index set to Φs×n′×n, representing a family of N×|n| matrices zτ (N=|n′|). Let κ:Φs→N→N specify Young diagrams with κ(τ,h) columns of height h, let i′:WeylIndex n′ κ fill each column with rows in n′, and let yτ be integral matrices with rows indexed by n. The minor product (New.minorProd i' y) is the homogeneous polynomial of degree B=boxes(κ,N) given by

Py(z)=∏τ∈Φs∏h<N∏j<κ(τ,h)det((zτyτ)rows of (i′τ,h,j),first h cols).

To bound vp(Py(∂)F(0)) for any series F satisfying HasNormalForm, Count.lean runs a three-step machine:

  1. Direction substitution and null-frame elimination (NullFrames.lean, Count.lean): Introduce auxiliary variables s(τ,h,k,b) (DirectionVar, at most fN3 variables by card_directionVar_le) and substitute

    z(τ,b,a)(s)=∑h<N∑k<hpw(τ,h,b)β(τ,h,k,a)s(τ,h,k,b),β(τ,h,k,a)=∑k′<h(gτ,h)k,k′y(τ,a,k′)

    via directionSubst and newDirection g y. Fix a finite set marked of marked places; a pair of heights (h,h′) at (τ,τ′) is exempt (IsExemptPair) if h=1 and either τ∈marked or (h′=1 and τ′∈marked).

    • For the active exponents S={e∈Ip∘∣e≤⌊logp⁡B⌋}, NullFrames.lean::exists_newDirection_dvd constructs integral matrices gτ,h such that πp divides every non-exempt Frobenius pairing ∑aβτ,h,k,apeβτ′,h′,k′,a, while the determinant product costs at most∏τ∈Φs∏h<N∥det(gτ,h)∥κ(τ,h)≥∥πp∥D,D=∑e∈S∑τ∈ΦsdeductionTermp(κ,N,marked,τ,τ′,e).
    • For the exempt pairs, the row-charge condition IsChargeExponent ensures w(τ,1,b)>0 or w(τ′,h′,b)>0, so p (hence πp) divides the scaled pairing. By dvd_subst_coupling_directionSubst_of_charges, πp∣Γe(z(s)) for every e∈S.
    • Since v(cϖπp)=1p−1 (norm_pow_succ_div_mul_piPrimeInt), HasNormalForm.norm_coeff_subst_le_one guarantees that G(s)=F(ϖz(s)) has integral coefficients in degree B.
  2. Legendre's factorial bound and the chain rule (norm_jet_le_of_isHomogeneous, norm_jet_columnDetProd_subst): Let P∗(s)=columnDetProd i′ be the product of the h×h determinants det(s(τ,h,k,r)), homogeneous of degree B (isHomogeneous_columnDetProd). By Legendre's bound on multinomial factorials (norm_prod_factorial_le), norm_jet_le_of_isHomogeneous gives

    ∥jet(P∗,G)∥≤pfN3(⌊logp⁡B⌋+1)−B/(p−1).

    On the other hand, the chain rule (norm_jet_columnDetProd_subst) computes

    ∥jet(P∗,G)∥=∥ϖ∥B⋅p−fillingCharge(w,i′)⋅(∏τ,h∥detgτ,h∥κ(τ,h))⋅∥jet(Py,F)∥.

    Dividing through by ∥ϖ∥B=p−ρpB turns B/(p−1) into γpB, proving New.Parameters.norm_jet_minorProd_le_of_isChargeExponent.

  3. Relating deductions to predictedDivisibility (mul_tsum_deductionAt, mul_sum_deductionTerm_le): Write aτ=heightOneColumns κ N τ, aτ′=lowColumnCount κ N τ, and lτ=lowBoxCount κ N τ, so B=∑τ(aτ+lτ) (boxes_eq_sum). Because x−min(x,y)=(x−y)+ and ∑e∈Ipv(πp)p−e=γp, New.mul_tsum_deductionAt proves the exact identity

    v(πp)∑e∈Ip∘deductionAt(e)=γpB−predictedDivisibilityp(κ,N),

    where

    predictedDivisibilityp(κ,N)=v(πp)∑e∈Ip∑τ∈Φs((aτ/pe−aτ′−aτ′′)++(lτ/pe−lτ′)+−aτ′/pe)−1p=d⋅12∑τ∈Φs(min(aτ,aτ0′+aτ0′′)+aτ′+min(lτ,lτ0′)).

    Marking marked has the exact same effect on deductions as erasing height-1 columns at marked (deductionTerm_eraseHeightOne), yielding mul_sum_deductionTerm_le and hence norm_jet_minorProd_le_of_charges (and, with marked = ∅ and w=0, norm_jet_minorProd_le_of_hasNormalForm).

4. From minor products to Schur-matrix jets and Stage 03 (Count.lean, Vacuum/Divisibility.lean) ​

When κ fits the ranks |n|≤|n′| (FitsRanks), New.minorProd_eq_sum expands the minor product Py(z) in the i′-th row of the Schur matrix schur κ z:

Py(z)=∑i:WeylIndex n κevaly(nablaBasis i⋅detPow)⋅schur(κ,z)i′,i.

Because the polynomials nablaBasis i⋅detPow remain linearly independent over the residue field of O, New.exists_norm_le_norm_sum_mul_eval produces an integral point y at which the linear combination has norm at least the target coefficient, proving New.exists_norm_schurJet_le_norm_jet_minorProd:

∃y:Φ→n→N→O,∥schurJet κ F i′ i∥≤∥jet(Py,F)∥.

Combining this with exists_hasNormalForm_jetSeries and norm_jet_minorProd_le_of_charges in src/New/Derivatives/Vacuum/Divisibility.lean produces New.Parameters.norm_schurJet_jetSeries_le_of_charges, the exact entry point consumed by Stage 03 (src/New/UpperBound/Divisibility/ChainValuation.lean and ValuationAtNonSplitPrimes.lean) to bound valuations of iterated unitary theta lifts at all non-split primes.

Level 3 · Formal Lean Contract

Level 3 — Formal Lean Contract ​

The extracted Stage 02 skeletons embedded below correspond to src/New/Derivatives/FormalGroup/ThetaProducts.lean and src/New/Derivatives/Divisibility/Count.lean at pinned upstream commit 41c2716658c42ba08eb0648994a2efe83082a95c (41c2716658c4).

Extractor Stub-Truncation Disclosure (skeleton/02_derivatives/count.lean) ​

Deterministic rh-extract stub truncation on three let-bound return types: In src/New/Derivatives/Divisibility/Count.lean (lines 581–713), the three headline theorems New.Parameters.norm_jet_minorProd_le_of_isChargeExponent, New.Parameters.norm_jet_minorProd_le_of_charges, and New.Parameters.norm_jet_minorProd_le_of_hasNormalForm introduce let N : ℕ := card n' inside their Lean return types. Because rh-extract splits proof bodies at the first depth-0 := token after the signature colon, those three generated stubs in skeleton/02_derivatives/count.lean truncate at let N : ℕ := by sorry rather than displaying the full inequality.

For complete formal transparency, the exact, verbatim upstream theorem statements from src/New/Derivatives/Divisibility/Count.lean (lines 581–593, 658–672, and 703–710 at commit 41c2716658c42ba08eb0648994a2efe83082a95c) are reproduced below:

lean
-- src/New/Derivatives/Divisibility/Count.lean:581-593
theorem norm_jet_minorProd_le_of_isChargeExponent [DecidableEq n'] (hp : chiK P.d p ≠ 1)
    (hϖ : ‖ϖ‖ = p ^ (-varpiValuation P.d p))
    (hF : HasNormalForm (partnerExponents P.d p) (P.partner s p) ϖ l F)
    (marked : Finset (P.Φ s)) (w : P.Φ s → ℕ → n' → ℕ)
    (hw : ∀ e ∈ partnerExponents P.d p, IsChargeExponent (P.partner s p e) marked w)
    (i' : WeylIndex n' κ) (y : P.Φ s → n → ℕ → valRingCp p) :
    let N : ℕ := card n'
    let B : ℕ := boxes κ N
    ‖jet ℂ_[p] (minorProd i' fun (τ : P.Φ s) (a : n) (k : ℕ) ↦ (y τ a k : ℂ_[p])) F‖ ≤
      p ^ (fillingCharge w i' - (gammaPrime P.d p * B -
        piPrimeValuation P.d p * ∑ e ≤ p.log B with e ∈ partnerExponents P.d p,
          ∑ τ : P.Φ s, deductionTerm p κ N marked τ (P.partner s p e τ) e -
        card (P.Φ s) * N ^ 3 * (p.log B + 1)) : ℝ) := by
lean
-- src/New/Derivatives/Divisibility/Count.lean:658-672
theorem norm_jet_minorProd_le_of_charges [DecidableEq n'] (hp : chiK P.d p ≠ 1)
    (hϖ : ‖ϖ‖ = p ^ (-varpiValuation P.d p))
    (hF : HasNormalForm (partnerExponents P.d p) (P.partner s p) ϖ l F)
    (marked : Finset (P.Φ s)) (w : P.Φ s → ℕ → n' → ℕ)
    (hw : ∀ e ∈ partnerExponents P.d p, ∀ (τ : P.Φ s) (h : ℕ) (b : n'),
      κ τ 1 ≠ 0 → κ (P.partner s p e τ) h ≠ 0 → τ ∈ marked ∨ h = 1 ∧ P.partner s p e τ ∈ marked →
        w τ 1 b ≠ 0 ∨ w (P.partner s p e τ) h b ≠ 0)
    (i' : WeylIndex n' κ) (y : P.Φ s → n → ℕ → valRingCp p) :
    let N : ℕ := card n'
    let B : ℕ := boxes κ N
    ‖jet ℂ_[p] (minorProd i' fun (τ : P.Φ s) (a : n) (k : ℕ) ↦ (y τ a k : ℂ_[p])) F‖ ≤
      p ^ (fillingCharge w i' -
        (predictedDivisibility P.d p (P.partner s p) (eraseHeightOne κ marked) N +
          gammaPrime P.d p * (B - boxes (eraseHeightOne κ marked) N) -
          card (P.Φ s) * N ^ 3 * (1 + Real.logb p (max B 1 : ℕ))) : ℝ) := by
lean
-- src/New/Derivatives/Divisibility/Count.lean:703-710
theorem norm_jet_minorProd_le_of_hasNormalForm [DecidableEq n'] (hp : chiK P.d p ≠ 1)
    (hϖ : ‖ϖ‖ = p ^ (-varpiValuation P.d p))
    (hF : HasNormalForm (partnerExponents P.d p) (P.partner s p) ϖ l F)
    (i' : WeylIndex n' κ) (y : P.Φ s → n → ℕ → valRingCp p) :
    let N : ℕ := card n'
    ‖jet ℂ_[p] (minorProd i' fun (τ : P.Φ s) (a : n) (k : ℕ) ↦ (y τ a k : ℂ_[p])) F‖ ≤
      p ^ (-(predictedDivisibility P.d p (P.partner s p) κ N -
        card (P.Φ s) * N ^ 3 * (1 + Real.logb p (max (boxes κ N) 1 : ℕ))) : ℝ) := by

Verification status (audit/verification-status.json): Local Lean compilation and kernel replay remain build_status: unverified-locally at pinned commit 41c2716658c42ba08eb0648994a2efe83082a95c (41c2716658c4). Static token scanning currently has scan_scope: entry, covering only Challenge.lean, src/Main.lean, and src/Statements.lean (0 forbidden tokens in solution files, 5 expected sorry tokens in Challenge.lean). Neither ThetaProducts.lean nor Count.lean has been locally compiled, kernel-checked, or statically scanned here.

lemma New.coeff_subst_linearSeries — Upstream source (src/New/Derivatives/FormalGroup/ThetaProducts.lean L56-L72)

lean
/-- The coefficient of `z ^ D` in `g(∑ c_x z_x)` is `c ^ D g⁽ⁿ⁾(0) / D!` with `n = |D|`, where
`c ^ D = ∏ c_x ^ D_x`, `D! = ∏ D_x!` and `g⁽ⁿ⁾(0)` is `n!` times the `n`-th coefficient of `g`. -/
@[simp] lemma New.coeff_subst_linearSeries {D : X →₀ ℕ} (c : X → ℂ_[p]) (g : PowerSeries ℂ_[p]) :
    (g.subst (linearSeries c)).coeff D =
      (∏ x : X, c x ^ D x) * (D.degree ! * g.coeff D.degree) / ∏ x : X, ((D x)! : ℂ_[p]) := by
  sorry -- [EXTRACTED_STUB upstream=src/New/Derivatives/FormalGroup/ThetaProducts.lean:56-72 commit=41c2716658c42ba08eb0648994a2efe83082a95c body_lines=13 body_sha256=bc3775e6c43ef0d5b8b9818097d78ea023e44ae8d09a2fe1f880d2a3754e7a1f]

lemma New.rescale_subst_linearSeries — Upstream source (src/New/Derivatives/FormalGroup/ThetaProducts.lean L74-L79)

lean
/-- Scaling all variables of `g(∑ c_x z_x)` by `a` is scaling the variable of `g` by `a`. -/
@[simp] lemma New.rescale_subst_linearSeries {a : ℂ_[p]} (c : X → ℂ_[p]) (g : PowerSeries ℂ_[p]) :
    rescale (fun _ : X ↦ a) (g.subst (linearSeries c)) = (g.rescale a).subst (linearSeries c) := by
  sorry -- [EXTRACTED_STUB upstream=src/New/Derivatives/FormalGroup/ThetaProducts.lean:74-79 commit=41c2716658c42ba08eb0648994a2efe83082a95c body_lines=4 body_sha256=e1afd2a784c34d4aa8e74cd7474224f2cbb36c1f4b21228466714541de1432b2]

lemma New.piPrimeInt_dvd_iff — Upstream source (src/New/Derivatives/FormalGroup/ThetaProducts.lean L98-L102)

lean
/-- An element of the valuation ring of `ℂ_p` is divisible by `π_p` (`√-d` if `p = d`, else `p`)
exactly when its norm is at most that of `π_p`. -/
lemma New.piPrimeInt_dvd_iff {d p : ℕ} [PrimeSevenModEight d] [Fact p.Prime] [PadicPlace p]
    {x : valRingCp p} : piPrimeInt d ∣ x ↔ ‖(x : ℂ_[p])‖ ≤ ‖ιₚ (piPrime d p)‖ := by
  sorry -- [EXTRACTED_STUB upstream=src/New/Derivatives/FormalGroup/ThetaProducts.lean:98-102 commit=41c2716658c42ba08eb0648994a2efe83082a95c body_lines=1 body_sha256=03140b8a044605f648388b2e3181be544a769773753f0b649f00ee0de1b59d39]

def New.Parameters.partner — Upstream source (src/New/Derivatives/FormalGroup/ThetaProducts.lean L106-L112)

lean
/-- The partner `-p ^ e τ` of an infinite place `τ` of `E`. Here `P` fixes the prime `d` and the
modulus `q₀`, and `E = P.E s` is `K = ℚ(√-d)` with a root of unity of order `q₁ = P.q₁ s` adjoined,
`s` being the level in the tower of these fields. The infinite places `P.Φ s` of `E` form the group
`Gal(E/K) = (ℤ/q₁)ˣ`, and the partner is the product of `τ` with `P.placeOfInt s (-p ^ e)`, the
place of the class of `-p ^ e` modulo `q₁` (the identity if this class is not a unit). -/
noncomputable def New.Parameters.partner (P : Parameters) (s p e : ℕ) (τ : P.Φ s) : P.Φ s := by
  sorry -- [EXTRACTED_STUB upstream=src/New/Derivatives/FormalGroup/ThetaProducts.lean:106-112 commit=41c2716658c42ba08eb0648994a2efe83082a95c body_lines=1 body_sha256=b6e981f2c6b5eeb194da9fd8055a6ac1990d615b700600686569cb146aeb97fa]

lemma New.Parameters.norm_pow_succ_div_mul_piPrimeInt — Upstream source (src/New/Derivatives/FormalGroup/ThetaProducts.lean L114-L134)

lean
/-- Let `p` be non-split in `K = ℚ(√-d)` (`χ_K(p) ≠ 1`) and let `ϖ` have valuation
`ρ_p = varpiValuation P.d p`, which is `1 / (p² - 1)` if `p` is inert and `1 / (2 p - 2)` if
`p = d`. Then `c_ϖ π_p` has valuation `1 / (p - 1)`, where `c_ϖ = ϖ ^ (p + 1) / p` and `π_p` is
`√-d` if `p = d` and `p` otherwise. -/
lemma New.Parameters.norm_pow_succ_div_mul_piPrimeInt (P : Parameters) {p : ℕ} [Fact p.Prime] [PadicPlace p]
    (hp : chiK P.d p ≠ 1) {ϖ : ℂ_[p]} (hϖ : ‖ϖ‖ = p ^ (-varpiValuation P.d p)) :
    ‖ϖ ^ (p + 1) / p * (piPrimeInt P.d : valRingCp p)‖ = p ^ (-(1 / (p - 1)) : ℝ) := by
  sorry -- [EXTRACTED_STUB upstream=src/New/Derivatives/FormalGroup/ThetaProducts.lean:114-134 commit=41c2716658c42ba08eb0648994a2efe83082a95c body_lines=15 body_sha256=e00979897e7ec7004ac61b51fa350a3e1d7bf32e7483f8e7063e3aa4583cc0d8]

lemma New.Parameters.norm_pow_sub_conj_partner_le — Upstream source (src/New/Derivatives/FormalGroup/ThetaProducts.lean L136-L178)

lean
/-- Let `E = P.E s` be `K = ℚ(√-d)` (`d = P.d`) with a root of unity of order `q₁ = P.q₁ s`
adjoined, `s` being the level in the tower of these fields. Let `e` be in
`I_p° = partnerExponents P.d p`. Let `τ : P.Φ s` be an infinite place of `E`, and
`τ' = -p ^ e τ = P.partner s p e τ` its partner: the product of `τ` with the class of `-p ^ e` in
the group `Gal(E/K) = (ℤ/q₁)ˣ` of places. Then `τ(α) ^ p ^ e ≡ conj (τ'(α))` modulo `π_p` for `α` in
`𝓞 E`. -/
lemma New.Parameters.norm_pow_sub_conj_partner_le {P : Parameters} {s p : ℕ} [Fact p.Prime] [PadicPlace p] {e : ℕ}
    (he : e ∈ partnerExponents P.d p) (τ : P.Φ s) (α : 𝓞 (P.E s)) :
    ‖ιₚ (Φ τ α) ^ p ^ e - ιₚ (conj (Φ (P.partner s p e τ) α))‖ ≤ ‖ιₚ (piPrime P.d p)‖ := by
  sorry -- [EXTRACTED_STUB upstream=src/New/Derivatives/FormalGroup/ThetaProducts.lean:136-178 commit=41c2716658c42ba08eb0648994a2efe83082a95c body_lines=35 body_sha256=7c512132aa4a0a04edb13c8ad8d099134b6aebfca8ffa6c51cd694b65e21adf0]

lemma New.Parameters.norm_conj_pow_sub_partner_le — Upstream source (src/New/Derivatives/FormalGroup/ThetaProducts.lean L180-L209)

lean
/-- Let `E = P.E s` be `K = ℚ(√-d)` (`d = P.d`) with a root of unity of order `q₁ = P.q₁ s`
adjoined, `s` being the level in the tower of these fields. Let `e` be in
`I_p° = partnerExponents P.d p`. Let `τ : P.Φ s` be an infinite place of `E`, and
`τ' = -p ^ e τ = P.partner s p e τ` its partner: the product of `τ` with the class of `-p ^ e` in
the group `Gal(E/K) = (ℤ/q₁)ˣ` of places. Then `conj (τ(y)) ^ p ^ e ≡ τ'(y)` modulo `π_p` for `y` in
`E` integral at all primes above `p`. -/
lemma New.Parameters.norm_conj_pow_sub_partner_le {P : Parameters} {s p : ℕ} [Fact p.Prime] [PadicPlace p] {e : ℕ}
    (he : e ∈ partnerExponents P.d p) (τ : P.Φ s) {y : P.E s} (hy : IsIntegralAbove p y) :
    ‖ιₚ (conj (Φ τ y)) ^ p ^ e - ιₚ (Φ (P.partner s p e τ) y)‖ ≤ ‖ιₚ (piPrime P.d p)‖ := by
  sorry -- [EXTRACTED_STUB upstream=src/New/Derivatives/FormalGroup/ThetaProducts.lean:180-209 commit=41c2716658c42ba08eb0648994a2efe83082a95c body_lines=22 body_sha256=25850759c82bc26a32745b8106d1866e8cb8c75e73fc9e3a9789f18664cdb0ea]

lemma New.Parameters.dvd_pow_sub_sum_partner — Upstream source (src/New/Derivatives/FormalGroup/ThetaProducts.lean L211-L232)

lean
/-- Let `E = P.E s` be `K = ℚ(√-d)` with a root of unity of order `q₁ = P.q₁ s` adjoined, `e` in
`I_p° = partnerExponents P.d p` and `y` a vector over `E` integral above `p`. Then the `p ^ e`-th
power of the linear form `y† z = ∑ conj (τ(y_c)) z_(τ,c)` is `∑ τ'(y_c) z_(τ,c) ^ p ^ e` modulo
`π_p`; the sum runs over infinite places `τ` in `P.Φ s` and coordinates `c`.
`τ' = -p ^ e τ = P.partner s p e τ` is the product of `τ` with the class of `-p ^ e` in the group
`Gal(E/K) = (ℤ/q₁)ˣ` of places. `μ`, `ν` are the coefficients of the form and of the sum, read as
integers of `ℂ_p` through the embedding `ιₚ : ℂ → ℂ_p`. -/
lemma New.Parameters.dvd_pow_sub_sum_partner {P : Parameters} {s p : ℕ} [Fact p.Prime] [PadicPlace p] {e : ℕ}
    {n : Type} [Fintype n] (he : e ∈ partnerExponents P.d p)
    {y : n → P.E s} (hy : ∀ i : n, IsIntegralAbove p (y i))
    {μ ν : P.Φ s × n → valRingCp p} (hμ : ∀ x : P.Φ s × n, (μ x : ℂ_[p]) = ιₚ (dagger y x))
    (hν : ∀ x : P.Φ s × n, (ν x : ℂ_[p]) = ιₚ (Φ (P.partner s p e x.1) (y x.2))) :
    C (piPrimeInt P.d) ∣ linearSeries μ ^ p ^ e - ∑ x : P.Φ s × n, ν x • X x ^ p ^ e := by
  sorry -- [EXTRACTED_STUB upstream=src/New/Derivatives/FormalGroup/ThetaProducts.lean:211-232 commit=41c2716658c42ba08eb0648994a2efe83082a95c body_lines=10 body_sha256=c44fd2aa8e2f2c8dc7d61d422785a7104f64be643a7e57bcbe2396a1b48e5ff6]

lemma New.Parameters.norm_daggerForms_le_one — Upstream source (src/New/Derivatives/FormalGroup/ThetaProducts.lean L234-L241)

lean
/-- For vectors `u_j` over `E = P.E s` integral above `p`, the linear forms `u_j† z`, whose
coefficient at `z_(τ,c)` is `conj (τ(u_{j,c}))` read in `ℂ_p` through the embedding `ιₚ` of `ℂ`,
have integral coefficients. -/
lemma New.Parameters.norm_daggerForms_le_one (P : Parameters) (s : ℕ) {p : ℕ} [Fact p.Prime] [PadicPlace p]
    {n J : Type} {u : J → n → P.E s}
    (hu : ∀ (j : J) (i : n), IsIntegralAbove p (u j i)) (j : J) (x : P.Φ s × n) :
    ‖(daggerForms u j x : ℂ_[p])‖ ≤ 1 := by
  sorry -- [EXTRACTED_STUB upstream=src/New/Derivatives/FormalGroup/ThetaProducts.lean:234-241 commit=41c2716658c42ba08eb0648994a2efe83082a95c body_lines=1 body_sha256=9c9b3b10c9753c70429fbdf5af73ae57b370c375f785d8a176a8052aad1ec760]

lemma New.Parameters.piPrimeInt_dvd_sum_linearSeries_sub_coupling — Upstream source (src/New/Derivatives/FormalGroup/ThetaProducts.lean L243-L276)

lean
/-- Let `E = P.E s` be `K = ℚ(√-d)` (`d = P.d`) with a root of unity of order `q₁ = P.q₁ s`
adjoined, `s` being the tower level, and let `e` be in `I_p° = partnerExponents P.d p`. Let the
vectors `u_j` of `Eⁿ`, integral above `p` and each taken `m_j` times, be a resolution of the
identity: `z = ∑ m_j (u_j† z) u_j`. Then `∑ m_j (u_j† z) ^ p ^ e * (u_j† z)` is the coupling
`Γ_e = ∑ z_(τ,c) ^ p ^ e * z_(τ',c)` modulo `π_p`. -/
lemma New.Parameters.piPrimeInt_dvd_sum_linearSeries_sub_coupling (P : Parameters) (s : ℕ) {p : ℕ} [Fact p.Prime]
    [PadicPlace p]
    {n J : Type} [Fintype n] [Fintype J] {u : J → n → P.E s} {m : J → ℕ} [DecidableEq n]
    {e : ℕ} (he : e ∈ partnerExponents P.d p)
    (h_res : IsResolution u m) (hu : ∀ (j : J) (i : n), IsIntegralAbove p (u j i))
    {μ : J → P.Φ s × n → valRingCp p}
    (hμ : ∀ (j : J) (x : P.Φ s × n), (μ j x : ℂ_[p]) = daggerForms u j x) :
    C (piPrimeInt P.d) ∣
      ∑ j : J, m j * (linearSeries (μ j) ^ p ^ e * linearSeries (μ j)) -
        coupling (P.partner s p) e := by
  sorry -- [EXTRACTED_STUB upstream=src/New/Derivatives/FormalGroup/ThetaProducts.lean:243-276 commit=41c2716658c42ba08eb0648994a2efe83082a95c body_lines=20 body_sha256=5d3c7c31cded664942b3f6ec8e404146ad406bd465d86cc1b468d263c10af4cd]

lemma New.dvd_sum_subst_sub_couplingSum — Upstream source (src/New/Derivatives/FormalGroup/ThetaProducts.lean L298-L350)

lean
/-- Let `π ∣ p`, let `Ξ` be a series in one variable congruent to
`∑ λ_{e j} (z ^ p ^ e * z) ^ p ^ j` modulo `π`, the sum over `e ∈ S` and `j` with
`λ_{e j} = l e j`, and let `partner e` be a self-map of the set `Φ` of places, with
`Γ_e = coupling partner e = ∑ z_(τ,c) ^ p ^ e * z_(partner e τ,c)` summed over `(τ, c)` in `Φ × n`.
If series `L_i` without constant term are such that `∑ m_i L_i ^ p ^ e * L_i` is `Γ_e` modulo `π`
for `e ∈ S`, then the `Ξ(L_i)`, each taken `m_i` times, add up to
`couplingSum S partner l = ∑ λ_{e j} Γ_e ^ p ^ j` modulo `π`. -/
lemma New.dvd_sum_subst_sub_couplingSum {Φ n J : Type} [Fintype Φ] [Fintype n] [Fintype J]
    {S : Set ℕ} {partner : ℕ → Φ → Φ} {l : ℕ → ℕ → valRingCp p} {π : valRingCp p} (hπ : π ∣ p)
    {Ξ : PowerSeries (valRingCp p)}
    (hΞ : C π ∣ Ξ -
      ∑' x : S × ℕ, l x.1 x.2 • (PowerSeries.X ^ p ^ (x.1 : ℕ) * PowerSeries.X) ^ p ^ x.2)
    {L : J → MvPowerSeries (Φ × n) (valRingCp p)} (hL : ∀ i : J, constantCoeff (L i) = 0)
    {m : J → ℕ} (hΓ : ∀ e ∈ S, C π ∣ ∑ i : J, m i * (L i ^ p ^ e * L i) - coupling partner e) :
    C π ∣ ∑ i : J, m i • Ξ.subst (L i) - couplingSum S partner l := by
  sorry -- [EXTRACTED_STUB upstream=src/New/Derivatives/FormalGroup/ThetaProducts.lean:298-350 commit=41c2716658c42ba08eb0648994a2efe83082a95c body_lines=39 body_sha256=1943ccf834776cebee76492fc148c944a423e7bd4683784ebff9fdacdde8a5c5]

lemma New.expSubst_nsmul — Upstream source (src/New/Derivatives/FormalGroup/ThetaProducts.lean L352-L355)

lean
/-- For a series `g` without constant term, `exp (n g) = exp(g) ^ n`. -/
lemma New.expSubst_nsmul {σ : Type} {g : MvPowerSeries σ ℂ_[p]} (hg : constantCoeff g = 0) (n : ℕ) :
    expSubst (n • g) = expSubst g ^ n := by
  sorry -- [EXTRACTED_STUB upstream=src/New/Derivatives/FormalGroup/ThetaProducts.lean:352-355 commit=41c2716658c42ba08eb0648994a2efe83082a95c body_lines=2 body_sha256=55153e63a97f327a64147cfaf05a673f9cc2e1de6b671200fdea2cf3d0589f4d]

lemma New.rescale_subst_linearSeries_coe — Upstream source (src/New/Derivatives/FormalGroup/ThetaProducts.lean L357-L364)

lean
/-- For a linear form `L = ∑ ν_x z_x` with integral coefficients, `g(L)` at `ϖ z` is the series
`g(ϖ t)` at `t = L`. -/
lemma New.rescale_subst_linearSeries_coe {X : Type} [Fintype X] (ϖ : ℂ_[p]) (g : PowerSeries ℂ_[p])
    (ν : X → valRingCp p) :
    (g.subst (linearSeries fun x : X ↦ (ν x : ℂ_[p]))).rescale (fun _ : X ↦ ϖ) =
      (g.rescale ϖ).subst (seriesToCp (linearSeries ν)) := by
  sorry -- [EXTRACTED_STUB upstream=src/New/Derivatives/FormalGroup/ThetaProducts.lean:357-364 commit=41c2716658c42ba08eb0648994a2efe83082a95c body_lines=3 body_sha256=b5c7b982c0c62bbfb3b13e81feb4959bef74057bdcb713a7068aa395fd25c765]

lemma New.seriesToCp_subst — Upstream source (src/New/Derivatives/FormalGroup/ThetaProducts.lean L366-L371)

lean
/-- The inclusion `seriesToCp` of integral series commutes with substituting a series `L` without
constant term into a series `G` in one variable. -/
lemma New.seriesToCp_subst {X : Type} {L : MvPowerSeries X (valRingCp p)} (hL : constantCoeff L = 0)
    (G : PowerSeries (valRingCp p)) :
    seriesToCp (G.subst L) = PowerSeries.subst (seriesToCp L) (seriesToCp G) := by
  sorry -- [EXTRACTED_STUB upstream=src/New/Derivatives/FormalGroup/ThetaProducts.lean:366-371 commit=41c2716658c42ba08eb0648994a2efe83082a95c body_lines=1 body_sha256=2f1d0c513de539b20865927cfe5f62f1f07dadcd58a54cbb93ba585bd678800c]

lemma New.CMLattice.rescale_mem_range_of_mem_multiSeriesRing — Upstream source (src/New/Derivatives/FormalGroup/ThetaProducts.lean L377-L402)

lean
/-- Let `d ≡ 7 mod 8` be prime, `C` a lattice with complex multiplication by the integers of
`ℚ(√-d)` and a point `t` of order two with `a₁² = 12 ℘(t)`, and `y` the Taylor series at `0`, read
in `ℂ_p` by `ιₚ`, of `C.translatedY z = (℘'(z + t) - a₁ (℘(z + t) - ℘(t))) / 2`. Let `μ_i` be
integral linear forms and `v(ϖ) ≥ ρ_p = varpiValuation d p`. Then a series `H` in
`C.multiSeriesRing`, the ring of integral series in the `y(μ_i z)`, is integral at `ϖ z`: `H(ϖ z)`
is in the range of `seriesToCp`, the inclusion of series over the integers of `ℂ_p`. -/
lemma New.CMLattice.rescale_mem_range_of_mem_multiSeriesRing [PrimeSevenModEight d]
    (hϖ : ‖ϖ‖ ≤ p ^ (-varpiValuation d p))
    {H : MvPowerSeries X ℂ_[p]} (hH : H ∈ C.multiSeriesRing fun (i : I) (x : X) ↦ (μ i x : ℂ_[p])) :
    H.rescale (fun _ : X ↦ ϖ) ∈ seriesToCp.range := by
  sorry -- [EXTRACTED_STUB upstream=src/New/Derivatives/FormalGroup/ThetaProducts.lean:377-402 commit=41c2716658c42ba08eb0648994a2efe83082a95c body_lines=17 body_sha256=b3b19b42992d2aaccc9e2dc9fee927db636a28580f130fab8f7a2bf90b183b59]

lemma New.CMLattice.rescale_thetaProd_eq_mul_expSubst — Upstream source (src/New/Derivatives/FormalGroup/ThetaProducts.lean L404-L433)

lean
/-- Let `C` be a lattice with complex multiplication by the integers of `ℚ(√-d)` and a point of
order two, and `θ = taylorVia ιₚ C.θ` the Taylor series of its theta function, read in `ℂ_p` by the
embedding `ιₚ` of `ℂ`. Let `θ(ϖ z) = W exp (κ Ξ)` with integral series `W`, `Ξ` and `Ξ(0) = 0`. Then
`C.thetaProd`, the product `∏ θ(μ_i z) ^ m_i` for integral linear forms `μ_i`, is at `ϖ z` the
integral series `∏ W(μ_i z) ^ m_i` times `exp (κ ∑ m_i Ξ(μ_i z))`. -/
lemma New.CMLattice.rescale_thetaProd_eq_mul_expSubst {κ : ℂ_[p]} {W Ξ : PowerSeries (valRingCp p)}
    (hΞ : PowerSeries.constantCoeff Ξ = 0)
    (h_theta : (taylorVia ιₚ C.θ).rescale ϖ = seriesToCp W * expSubst (κ • seriesToCp Ξ))
    (m : I → ℕ) :
    (C.thetaProd (fun (i : I) (x : X) ↦ (μ i x : ℂ_[p])) m).rescale (fun _ : X ↦ ϖ) =
      seriesToCp (∏ i : I, W.subst (linearSeries (μ i)) ^ m i) *
        expSubst (κ • seriesToCp (∑ i : I, m i • Ξ.subst (linearSeries (μ i)))) := by
  sorry -- [EXTRACTED_STUB upstream=src/New/Derivatives/FormalGroup/ThetaProducts.lean:404-433 commit=41c2716658c42ba08eb0648994a2efe83082a95c body_lines=19 body_sha256=6912ddf424ec1d937b3a79c5a9ae82c496841d4fb4dd30f9bd6dc5310bd9e4e0]

lemma New.Parameters.exists_hasNormalForm — Upstream source (src/New/Derivatives/FormalGroup/ThetaProducts.lean L439-L477)

lean
/-- Let `E = P.E s` be `K = ℚ(√-d)` with a root of unity of order `q₁ = P.q₁ s` adjoined, `p` a
prime not split in `K` (`chiK P.d p ≠ 1`), `I_p° = partnerExponents P.d p`, and for an infinite
place `τ` of `E` let its partner `τ' = -p ^ e τ` be the product of `τ` with the class of `-p ^ e` in
the group `Gal(E/K) = (ℤ/q₁)ˣ` of places. There are `ϖ` of valuation `ρ_p = varpiValuation P.d p`
and integers `λ_{e j}` of `ℂ_p`, with the `λ_{e 0}` for odd `e` units if `p` is inert, such that the
following holds. Take any resolution of the identity by vectors `u_j` of `Eⁿ`, taken `m_j` times and
integral above `p`. Then the product `∏ θ(u_j† z) ^ m_j` times an integral series in the `y(u_j† z)`
has the normal form. -/
lemma New.Parameters.exists_hasNormalForm (P : Parameters) (s : ℕ) [PadicPlace p] (hp : chiK P.d p ≠ 1) :
    ∃ (ϖ : ℂ_[p]) (l : ℕ → ℕ → valRingCp p),
    ‖ϖ‖ = p ^ (-varpiValuation P.d p) ∧
    (chiK P.d p = -1 → ∀ e : ℕ, Odd e → IsUnit (l e 0)) ∧
    ∀ {n J : Type} [Fintype n] [DecidableEq n] [Fintype J] (u : J → n → P.E s) (m : J → ℕ),
      IsResolution u m → (∀ (j : J) (i : n), IsIntegralAbove p (u j i)) →
        ∀ H ∈ P.cmCurve.multiSeriesRing (daggerForms u),
          HasNormalForm (partnerExponents P.d p) (P.partner s p) ϖ l
            (P.cmCurve.thetaProd (daggerForms u) m * H) := by
  sorry -- [EXTRACTED_STUB upstream=src/New/Derivatives/FormalGroup/ThetaProducts.lean:439-477 commit=41c2716658c42ba08eb0648994a2efe83082a95c body_lines=23 body_sha256=13683f6b838cae63d5052f3d5b3afcbb38c5bd6c65d341cfaf10b1f242e9a0c4]

lemma New.norm_prod_factorial_le — Upstream source (src/New/Derivatives/Divisibility/Count.lean L70-L85)

lean
/-- Legendre's bound for a multi-index `d`, of degree `l = d.degree`: the valuation of `∏ (d x)!`
is at least `l / (p - 1) - card σ * (1 + ⌊log_p l⌋)`. -/
lemma New.norm_prod_factorial_le (d : σ →₀ ℕ) :
    ‖d.prod fun (_ : σ) (k : ℕ) ↦ (k.factorial : ℂ_[p])‖ ≤
      p ^ (card σ * (p.log d.degree + 1) - d.degree / (p - 1) : ℝ) := by
  sorry -- [EXTRACTED_STUB upstream=src/New/Derivatives/Divisibility/Count.lean:70-85 commit=41c2716658c42ba08eb0648994a2efe83082a95c body_lines=12 body_sha256=e6d7d71b286167034aedfb2257a08f439b9009f8269ebb329e5bac80cc365fc2]

lemma New.norm_jet_le_of_isHomogeneous — Upstream source (src/New/Derivatives/Divisibility/Count.lean L87-L103)

lean
/-- If the coefficients of degree `l` of the series `G` are integral and `Q` is a homogeneous
polynomial of degree `l` with integral coefficients, then the jet `(Q(∂) G)(0)` has valuation at
least `l / (p - 1) - card σ * (1 + ⌊log_p l⌋)`.

A consequence of the lower bound `v(m!) ≥ m / (p - 1) - (1 + ⌊log_p m⌋)` given by Legendre's
formula, applied to each exponent of each monomial of `Q`. -/
lemma New.norm_jet_le_of_isHomogeneous {G : MvPowerSeries σ ℂ_[p]} {l : ℕ}
    (hG : ∀ d : σ →₀ ℕ, d.degree = l → ‖G.coeff d‖ ≤ 1) {Q : MvPolynomial σ (valRingCp p)}
    (hQ : Q.IsHomogeneous l) :
    ‖jet ℂ_[p] (Q.map (valRingCp p).subtype) G‖ ≤
      p ^ (card σ * (p.log l + 1) - l / (p - 1) : ℝ) := by
  sorry -- [EXTRACTED_STUB upstream=src/New/Derivatives/Divisibility/Count.lean:87-103 commit=41c2716658c42ba08eb0648994a2efe83082a95c body_lines=7 body_sha256=8fc1475ebbad1ab3954d1ae8241a9fefc598a4f3a383aec4b43ef1df3f27ae37]

def New.minorProd — Upstream source (src/New/Derivatives/Divisibility/Count.lean L111-L118)

lean
/-- The polynomial `P_y(z)` in the entries `X (τ, b, a)` of matrices `z_τ` of size `n' × n`. It is
the product, over the places `τ` and the columns `j` of height `h < card n'` of the diagram `κ τ`,
of the minor of `z_τ y_τ` on the rows `(i' τ).1 h j b` that the filling `i'` puts into the column
and on the first `h` columns. -/
noncomputable def New.minorProd (i' : WeylIndex n' κ) (y : Φ → n → ℕ → R) :
    MvPolynomial (Φ × n' × n) R := by
  sorry -- [EXTRACTED_STUB upstream=src/New/Derivatives/Divisibility/Count.lean:111-118 commit=41c2716658c42ba08eb0648994a2efe83082a95c body_lines=2 body_sha256=0ab04c46a15396ce309c7be3a56a7e7a972a730d28ad05102fb64fedb57808a3]

abbrev New.DirectionVar — Upstream source (src/New/Derivatives/Divisibility/Count.lean L126-L128)

lean
/-- The index type of the new variables `s_(τ h k b)`: an index `(⟨h, k⟩, τ, b)` consists of a
height `h < N`, a direction `k < h` of that height, a place `τ` and a row `b`. -/
abbrev New.DirectionVar (Φ n' : Type) (N : ℕ) : Type := by
  sorry -- [EXTRACTED_STUB upstream=src/New/Derivatives/Divisibility/Count.lean:126-128 commit=41c2716658c42ba08eb0648994a2efe83082a95c body_lines=1 body_sha256=ab5c4d61c26ac0211a15ec461ac065deaab24e4e53fe65990d686834317b3b9f]

lemma New.card_directionVar_le — Upstream source (src/New/Derivatives/Divisibility/Count.lean L131-L135)

lean
lemma New.card_directionVar_le : card (DirectionVar Φ n' (card n')) ≤ card Φ * card n' ^ 3 := by
  sorry -- [EXTRACTED_STUB upstream=src/New/Derivatives/Divisibility/Count.lean:131-135 commit=41c2716658c42ba08eb0648994a2efe83082a95c body_lines=5 body_sha256=503d85cf8d5329183093827647809d60686a65cf6dbdbc7a2df8bf9798ded298]

def New.directionSubst — Upstream source (src/New/Derivatives/Divisibility/Count.lean L137-L144)

lean
/-- The matrix of the linear substitution `z(s)` with row factors `c` and directions `β`: row `b`
of `z_τ(s)` is `∑_(h, k) c_(τ h b) s_(τ h k b) β_(τ h k)`. So the entry at `x = (τ, b, a)` and
`o = (⟨h, k⟩, τ', b')` is `c τ h b * β τ h k a` if `(τ', b') = (τ, b)`, and zero otherwise. -/
noncomputable def New.directionSubst [DecidableEq Φ]
    {N : ℕ} (c : Φ → ℕ → n' → R) (β : Φ → ∀ h : ℕ, Fin h → n → R) :
    Matrix (Φ × n' × n) (DirectionVar Φ n' N) R := by
  sorry -- [EXTRACTED_STUB upstream=src/New/Derivatives/Divisibility/Count.lean:137-144 commit=41c2716658c42ba08eb0648994a2efe83082a95c body_lines=3 body_sha256=ce85e98988c12b5e3b7aba3ac3ae5b573ce7b8486f6e77a4d50daa01bb136c2f]

lemma New.linSubst_directionSubst_X — Upstream source (src/New/Derivatives/Divisibility/Count.lean L146-L155)

lean
/-- The map `linSubst M` sends each variable `X o` to `∑_x M x o • X x`. For the matrix `M` of the
substitution `z(s)` it sends `s_(τ h k b)` to `c_(τ h b)` times the linear form
`∑_a β_(τ h k a) z_(τ b a)`. -/
lemma New.linSubst_directionSubst_X [DecidableEq Φ]
    {N : ℕ} (c : Φ → ℕ → n' → R) (β : Φ → ∀ h : ℕ, Fin h → n → R)
    (h : Fin N) (k : Fin h) (τ : Φ) (b : n') :
    linSubst (directionSubst c β) (X (⟨h, k⟩, τ, b)) =
      C (c τ h b) * ∑ a : n, C (β τ h k a) * X (τ, b, a) := by
  sorry -- [EXTRACTED_STUB upstream=src/New/Derivatives/Divisibility/Count.lean:146-155 commit=41c2716658c42ba08eb0648994a2efe83082a95c body_lines=3 body_sha256=6c3f03378021eb9be7ffe7d5fca0d5bdd72b0778ab450e3fa383849d24af6883]

def New.columnDetProd — Upstream source (src/New/Derivatives/Divisibility/Count.lean L158-L164)

lean
/-- The polynomial `P_*` in the new variables: the product, over the places `τ` and the columns `j`
of height `h < card n'` of the diagram `κ τ`, of the determinants `det (s_(τ h k b))`, with `k < h`
and `b` among the rows that the filling `i'` puts into the column. -/
noncomputable def New.columnDetProd (i' : WeylIndex n' κ) :
    MvPolynomial (DirectionVar Φ n' (card n')) R := by
  sorry -- [EXTRACTED_STUB upstream=src/New/Derivatives/Divisibility/Count.lean:158-164 commit=41c2716658c42ba08eb0648994a2efe83082a95c body_lines=2 body_sha256=5eefb9f19b39b5cf7e9d615b4cd38eff493cefbd00b362727454920080e81986]

lemma New.map_columnDetProd — Upstream source (src/New/Derivatives/Divisibility/Count.lean L166-L169)

lean
/-- The polynomial `columnDetProd R i'` is compatible with change of the coefficient ring. -/
lemma New.map_columnDetProd {R' : Type} [CommRing R'] (φ : R →+* R') (i' : WeylIndex n' κ) :
    (columnDetProd R i').map φ = columnDetProd R' i' := by
  sorry -- [EXTRACTED_STUB upstream=src/New/Derivatives/Divisibility/Count.lean:166-169 commit=41c2716658c42ba08eb0648994a2efe83082a95c body_lines=2 body_sha256=8ce82a61460fc637c19202933c202f20c396b856d6557f19d33c174dceee28d4]

lemma New.isHomogeneous_det_directionVar — Upstream source (src/New/Derivatives/Divisibility/Count.lean L172-L184)

lean
/-- The determinant of the `h × h` matrix of the variables `s_(τ h k b) = X (⟨h, k⟩, τ, I b)` of
`MvPolynomial (DirectionVar Φ n' N) R`, with rows `I b` and directions `k < h`, is homogeneous of
degree `h`. -/
lemma New.isHomogeneous_det_directionVar {N : ℕ} (τ : Φ) (h : Fin N) (I : Fin h → n') :
    IsHomogeneous (of fun b k : Fin h ↦
      (X (⟨h, k⟩, τ, I b) : MvPolynomial (DirectionVar Φ n' N) R)).det h := by
  sorry -- [EXTRACTED_STUB upstream=src/New/Derivatives/Divisibility/Count.lean:172-184 commit=41c2716658c42ba08eb0648994a2efe83082a95c body_lines=8 body_sha256=80d6239a326984e7e2a6569bf5189a8ac2f39cb3a37ba0390e6514b7b6f91888]

lemma New.isHomogeneous_columnDetProd — Upstream source (src/New/Derivatives/Divisibility/Count.lean L186-L194)

lean
/-- The product `columnDetProd R i'` of the determinants of the columns of `κ` is homogeneous. Its
degree `boxes κ (card n')` is the number of boxes in the columns of height below `card n'`. -/
lemma New.isHomogeneous_columnDetProd (i' : WeylIndex n' κ) :
    (columnDetProd R i').IsHomogeneous (boxes κ (card n')) := by
  sorry -- [EXTRACTED_STUB upstream=src/New/Derivatives/Divisibility/Count.lean:186-194 commit=41c2716658c42ba08eb0648994a2efe83082a95c body_lines=6 body_sha256=738eee8336b3ac1c6c814620e4fa9b62a7f63aa8152fca948174d8447285f938]

lemma New.jet_columnDetProd_subst — Upstream source (src/New/Derivatives/Divisibility/Count.lean L196-L235)

lean
/-- The chain rule for the substitution `z(s)` along the polynomial `P_* = columnDetProd R i'`. The
filling `i'` puts the row `(i' τ).1 h j b` into box `b` of column `j` of height `h` at the place
`τ`. With new variables `s_(τ h k r)`, `P_*` is the product over all `τ`, `h`, `j` of the
determinants `det (s_(τ h k r))`, with `k < h` and `r` among the rows of the column. The matrix
`directionSubst c (newDirection g y)` defines the substitution `z_(τ r a) = ∑_(h, k) c_(τ h r) *
β_(τ h k a) * s_(τ h k r)`, where `β_(τ h k a)` is the new direction
`∑_k' (g τ h)_(k k') y_(τ a k')`. The jet of `F(z(s))` along `P_*` is the jet of `F` along the
product of minors `minorProd i' y`, times `det (g τ h)` for each column and `c_(τ h r)` for each
box, `r` being its row. -/
lemma New.jet_columnDetProd_subst [DecidableEq Φ] (i' : WeylIndex n' κ) (c : Φ → ℕ → n' → R)
    (g : Φ → ∀ h : ℕ, Matrix (Fin h) (Fin h) R) (y : Φ → n → ℕ → R)
    (F : MvPowerSeries (Φ × n' × n) R) :
    jet R (columnDetProd R i')
        (F.subst fun x : Φ × n' × n ↦ linearSeries (directionSubst c (newDirection g y) x)) =
      (∏ τ : Φ, ∏ h : Fin (card n'), ∏ j : Fin (κ τ h),
        ((g τ h).det * ∏ b : Fin h, c τ h ((i' τ).1 h j b))) *
        jet R (minorProd i' y) F := by
  sorry -- [EXTRACTED_STUB upstream=src/New/Derivatives/Divisibility/Count.lean:196-235 commit=41c2716658c42ba08eb0648994a2efe83082a95c body_lines=24 body_sha256=923e11a022df02270a7780b09dba918258a52a122e03efd5227192408906d744]

lemma New.dvd_subst_coupling — Upstream source (src/New/Derivatives/Divisibility/Count.lean L244-L272)

lean
/-- Let `π` divide `p`, let `α` be the index type of the entries at one place, and substitute linear
forms `∑_o z x o * s_o` for the variables `X_x`, `x = (τ, a) ∈ Φ × α`, of the coupling
`Γ_e = ∑ X_(τ, a) ^ p ^ e * X_(pr e τ, a)`. Modulo `p` the result is a combination of the
`s_o ^ p ^ e * s_q`. If `π` divides all coefficients of this combination, it divides the result. -/
lemma New.dvd_subst_coupling {α ι : Type} [Fintype α] [Fintype ι] (hπ : π ∣ p)
    {z : Φ × α → ι → valRingCp p}
    (hz : ∀ o q : ι, π ∣ ∑ x : Φ × α, z x o ^ p ^ e * z (pr e x.1, x.2) q) :
    MvPowerSeries.C π ∣ (coupling pr e : MvPowerSeries (Φ × α) (valRingCp p)).subst
      fun x : Φ × α ↦ linearSeries (z x) := by
  sorry -- [EXTRACTED_STUB upstream=src/New/Derivatives/Divisibility/Count.lean:244-272 commit=41c2716658c42ba08eb0648994a2efe83082a95c body_lines=21 body_sha256=d42f92a877695fc8348f4babc7f115f662c08ecf407f859737ba7b6396f7381d]

lemma New.dvd_subst_coupling_directionSubst — Upstream source (src/New/Derivatives/Divisibility/Count.lean L274-L301)

lean
/-- Let `π` divide `p`. The source variables `s_(τ h k b)` are indexed by a height `h < N`, a
direction `k < h`, a place `τ` and a row `b`. The matrix `directionSubst c β` defines the
substitution `z_(τ b a) = ∑_(h, k) c_(τ h b) * β_(τ h k a) * s_(τ h k b)`, with row factors `c` and
directions `β`. If `π` divides `c ^ p ^ e * c'` times the pairing `[β, β']_e = ∑ β_a ^ p ^ e * β'_a`
for each place `τ` and its partner `pr e τ`, each row and all directions `β` at `τ` and `β'` at the
partner, then `π` divides `Γ_e(z(s))`. -/
lemma New.dvd_subst_coupling_directionSubst (hπ : π ∣ p) {N : ℕ} {c : Φ → ℕ → n' → valRingCp p}
    {β : Φ → ∀ h : ℕ, Fin h → n → valRingCp p}
    (h_pair : ∀ (τ : Φ) (b : n') (h : ℕ) (k : Fin h) (h' : ℕ) (k' : Fin h'),
      π ∣ c τ h b ^ p ^ e * c (pr e τ) h' b * ∑ a : n, β τ h k a ^ p ^ e * β (pr e τ) h' k' a) :
    MvPowerSeries.C π ∣ (coupling pr e : MvPowerSeries (Φ × n' × n) (valRingCp p)).subst
      fun x : Φ × n' × n ↦ linearSeries (directionSubst (N := N) c β x) := by
  sorry -- [EXTRACTED_STUB upstream=src/New/Derivatives/Divisibility/Count.lean:274-301 commit=41c2716658c42ba08eb0648994a2efe83082a95c body_lines=17 body_sha256=6539410cee6b76569dbe6d98c4167efba29aec6529eb68f8f0a0dbd94527c9a1]

def New.IsChargeExponent — Upstream source (src/New/Derivatives/Divisibility/Count.lean L303-L310)

lean
/-- The charges `p ^ w τ h b` (place, height, row) cover the exempt pairs for the set `ev` of marked
places and the map `partner` on places. A pair consists of the height one at `τ` and a height `h` at
`partner τ`. It is exempt if `τ ∈ ev`, or if `h = 1` and `partner τ ∈ ev`. In each exempt pair and
each row `b`, one of the two exponents is not zero, so that `p` divides the product of the
charges. -/
def New.IsChargeExponent (partner : Φ → Φ) (ev : Finset Φ) (w : Φ → ℕ → n' → ℕ) : Prop := by
  sorry -- [EXTRACTED_STUB upstream=src/New/Derivatives/Divisibility/Count.lean:303-310 commit=41c2716658c42ba08eb0648994a2efe83082a95c body_lines=2 body_sha256=468256dd5d9db608d585ed560204d8a287371df9d12adde21d997a72fc170093]

def New.fillingCharge — Upstream source (src/New/Derivatives/Divisibility/Count.lean L312-L315)

lean
/-- The sum of the exponents `w τ h r` over the boxes in the columns of height `h < card n'` of the
diagrams `κ τ`, where `r` is the row that the filling `i'` puts into the box. -/
def New.fillingCharge {κ : Φ → ℕ → ℕ} (w : Φ → ℕ → n' → ℕ) (i' : WeylIndex n' κ) : ℕ := by
  sorry -- [EXTRACTED_STUB upstream=src/New/Derivatives/Divisibility/Count.lean:312-315 commit=41c2716658c42ba08eb0648994a2efe83082a95c body_lines=1 body_sha256=b680bebfd7625e67d8c4baa984828b8f03cf327337bc2ebdd466a68f5313338a]

lemma New.fillingCharge_zero — Upstream source (src/New/Derivatives/Divisibility/Count.lean L318-L319)

lean
lemma New.fillingCharge_zero {κ : Φ → ℕ → ℕ} (i' : WeylIndex n' κ) :
    fillingCharge (0 : Φ → ℕ → n' → ℕ) i' = 0 := by
  sorry -- [EXTRACTED_STUB upstream=src/New/Derivatives/Divisibility/Count.lean:318-319 commit=41c2716658c42ba08eb0648994a2efe83082a95c body_lines=1 body_sha256=37513f527673a95cddbf536e90a37b7ad8cf3492afb36bcf559d85ff16a05aea]

lemma New.fillingCharge_congr — Upstream source (src/New/Derivatives/Divisibility/Count.lean L322-L328)

lean
/-- The sum `fillingCharge w i'` of the exponents `w` over the filling `i'` depends only on the
values `w τ h b` at the heights `h` that occur in `κ τ` (those with `κ τ h ≠ 0`). -/
lemma New.fillingCharge_congr {κ : Φ → ℕ → ℕ} {w w' : Φ → ℕ → n' → ℕ}
    (h_eq : ∀ (τ : Φ) (h : ℕ) (b : n'), κ τ h ≠ 0 → w τ h b = w' τ h b) (i' : WeylIndex n' κ) :
    fillingCharge w i' = fillingCharge w' i' := by
  sorry -- [EXTRACTED_STUB upstream=src/New/Derivatives/Divisibility/Count.lean:322-328 commit=41c2716658c42ba08eb0648994a2efe83082a95c body_lines=2 body_sha256=84170b2ab50a2dc846ce0925031a2a94b38f393ac8fcef81b345b04767cfb863]

lemma New.dvd_subst_coupling_directionSubst_of_charges — Upstream source (src/New/Derivatives/Divisibility/Count.lean L330-L354)

lean
/-- Let `π` divide `p` and let `marked` be a set of places. A pair of heights `h` at `τ` and `h'` at
the partner `τ' = pr e τ` is exempt (`IsExemptPair`) if `h = 1`, and `τ ∈ marked` or both `h' = 1`
and `τ' ∈ marked`. Suppose that `π` divides the pairings `∑ β_a ^ p ^ e * β'_a` of directions `β` at
`τ` and `β'` at `τ'`, except for the exempt pairs. If one of the two exponents `w` is positive in
each exempt pair (`IsChargeExponent`), then `π` divides the coupling
`Γ_e = ∑ z_(τ b a) ^ p ^ e * z_(pr e τ, b a)` after the substitution `directionSubst`. -/
lemma New.dvd_subst_coupling_directionSubst_of_charges (hπ : π ∣ p) {N : ℕ} {marked : Finset Φ}
    {w : Φ → ℕ → n' → ℕ} {β : Φ → ∀ h : ℕ, Fin h → n → valRingCp p}
    (hw : IsChargeExponent (pr e) marked w)
    (h_pair : ∀ (τ : Φ) (h : ℕ) (k : Fin h) (h' : ℕ) (k' : Fin h'),
      ¬IsExemptPair marked τ (pr e τ) h h' →
        π ∣ ∑ a : n, β τ h k a ^ p ^ e * β (pr e τ) h' k' a) :
    MvPowerSeries.C π ∣ (coupling pr e : MvPowerSeries (Φ × n' × n) (valRingCp p)).subst
      fun x : Φ × n' × n ↦ linearSeries (directionSubst (N := N)
        (fun (τ : Φ) (h : ℕ) (b : n') ↦ (p : valRingCp p) ^ w τ h b) β x) := by
  sorry -- [EXTRACTED_STUB upstream=src/New/Derivatives/Divisibility/Count.lean:330-354 commit=41c2716658c42ba08eb0648994a2efe83082a95c body_lines=11 body_sha256=370e6334b1671cda23ce4b8f113d68e3c544bad9a8258dd3e9af720fdb937979]

lemma New.norm_jet_columnDetProd_subst — Upstream source (src/New/Derivatives/Divisibility/Count.lean L356-L386)

lean
/-- The chain rule in norms for `F(ϖ z)`. Here `z` is the linear substitution `directionSubst`, that
is `z_(τ r a) = ∑_(h, k) p ^ (w τ h r) * β_(τ h k a) * s_(τ h k r)` with the new directions
`β_(τ h k a) = ∑_k' (g τ h)_(k k') y_(τ a k')`, and `seriesToCp` reads an integral series as one
over `ℂ_[p]`. The filling `i'` puts a row `r` into each box of the `κ τ h` columns of height `h` at
the place `τ`. The polynomial `columnDetProd` is the product over the columns with `h < card n'` of
the determinants `det (s_(τ h k r))`, with `k < h` and `r` among the rows of the column, and
`minorProd` is the product of the corresponding minors of `z_τ y_τ`. The norm of the jet along the
former is that of the jet of `F` along the latter up to factors: each box gives `ϖ` and its row
factor, and each column gives `det (g τ h)`. -/
lemma New.norm_jet_columnDetProd_subst {κ : Φ → ℕ → ℕ} (i' : WeylIndex n' κ) (w : Φ → ℕ → n' → ℕ)
    (g : Φ → ∀ h : ℕ, Matrix (Fin h) (Fin h) (valRingCp p)) (y : Φ → n → ℕ → valRingCp p)
    (ϖ : ℂ_[p]) (F : MvPowerSeries (Φ × n' × n) ℂ_[p]) :
    ‖jet ℂ_[p] (columnDetProd ℂ_[p] i') (F.subst fun x : Φ × n' × n ↦ ϖ • seriesToCp
        (linearSeries (directionSubst (fun (τ : Φ) (h : ℕ) (b : n') ↦ p ^ w τ h b)
          (newDirection g y) x)))‖ =
      ‖ϖ‖ ^ boxes κ (card n') * (p : ℝ)⁻¹ ^ fillingCharge w i' *
        (∏ τ : Φ, ∏ h : Fin (card n'), ‖((g τ h).det : ℂ_[p])‖ ^ κ τ h) *
        ‖jet ℂ_[p] (minorProd i' fun (τ : Φ) (a : n) (k : ℕ) ↦ (y τ a k : ℂ_[p])) F‖ := by
  sorry -- [EXTRACTED_STUB upstream=src/New/Derivatives/Divisibility/Count.lean:356-386 commit=41c2716658c42ba08eb0648994a2efe83082a95c body_lines=14 body_sha256=311bfa0a1e3fddb930bcf846731fca634da9ac52a9d1b91b93bbcc4b93ef0d0f]

def New.heightOneColumns — Upstream source (src/New/Derivatives/Divisibility/Count.lean L394-L396)

lean
/-- The number `a_τ` of columns of height one at `τ`, among the heights below `N`. Here `κ τ h` is
the number of columns of height `h` at the place `τ`. -/
def New.heightOneColumns (τ : Φ) : ℕ := by
  sorry -- [EXTRACTED_STUB upstream=src/New/Derivatives/Divisibility/Count.lean:394-396 commit=41c2716658c42ba08eb0648994a2efe83082a95c body_lines=1 body_sha256=8ae11d9814c9f22924156209402e143a49d263d8dff6343919dd1883ebd5da00]

def New.lowColumnCount — Upstream source (src/New/Derivatives/Divisibility/Count.lean L398-L400)

lean
/-- The number `a'_τ` of low columns at `τ`, those whose height is below `N` and is not one. (A
diagram has no column of height zero; if `κ τ 0 ≠ 0`, these columns count here.) -/
def New.lowColumnCount (τ : Φ) : ℕ := by
  sorry -- [EXTRACTED_STUB upstream=src/New/Derivatives/Divisibility/Count.lean:398-400 commit=41c2716658c42ba08eb0648994a2efe83082a95c body_lines=1 body_sha256=1cf12af82bc0019db04b256316ff22fe9a3a4d34c8c838110390f3c65cb6ca8c]

def New.lowBoxCount — Upstream source (src/New/Derivatives/Divisibility/Count.lean L402-L404)

lean
/-- The number `l_τ` of boxes in the low columns at `τ`, those whose height is below `N` and is not
one. -/
def New.lowBoxCount (τ : Φ) : ℕ := by
  sorry -- [EXTRACTED_STUB upstream=src/New/Derivatives/Divisibility/Count.lean:402-404 commit=41c2716658c42ba08eb0648994a2efe83082a95c body_lines=1 body_sha256=7b69bb2ed6ba6fdb37d3478d97bb4463de701a9cadb1edc2224b80e179be07e1]

def New.eraseHeightOne — Upstream source (src/New/Derivatives/Divisibility/Count.lean L406-L409)

lean
/-- The diagrams `κ` without their columns of height one at the places of the set `ev`, the marked
places. -/
def New.eraseHeightOne (ev : Finset Φ) (τ : Φ) (h : ℕ) : ℕ := by
  sorry -- [EXTRACTED_STUB upstream=src/New/Derivatives/Divisibility/Count.lean:406-409 commit=41c2716658c42ba08eb0648994a2efe83082a95c body_lines=1 body_sha256=ffa90f21f7199753ed9688de1b1ed290c6d61f64cb4f12b74407f819a6bd8961]

def New.predictedDivisibility — Upstream source (src/New/Derivatives/Divisibility/Count.lean L411-L428)

lean
/-- The predicted divisibility at a prime `p`. Let `a_τ` be the number of columns of
height one, `a'_τ` the number of the other columns and `l_τ` the number of boxes in these, all
among the heights below `N`. With `τ' = pr e τ` the predicted divisibility is
`v(π_p) ∑_e ∑_τ ((a_τ / p ^ e - a_τ' - a'_τ')₊ + (l_τ / p ^ e - l_τ')₊ - a'_τ / p ^ e)`. Here
`v(π_p) = piPrimeValuation d p`, and `e` runs over `I_p = positivePartnerExponents d p` (the odd
numbers if `p` is inert, all `e ≥ 1` if `p = d`, none if `p` splits). If `p = d`, half the sum of
`min (a_τ, a_τ' + a'_τ') + a'_τ + min (l_τ, l_τ')` with `τ' = pr 0 τ` is subtracted. -/
noncomputable def New.predictedDivisibility [Fact d.Prime] : ℝ := by
  sorry -- [EXTRACTED_STUB upstream=src/New/Derivatives/Divisibility/Count.lean:411-428 commit=41c2716658c42ba08eb0648994a2efe83082a95c body_lines=10 body_sha256=b8deb5d6dda113a603683342daef0f97315f63a59241d41f41f88b9baa60f84a]

def New.deductionAt — Upstream source (src/New/Derivatives/Divisibility/Count.lean L430-L433)

lean
/-- The sum of the deduction terms for the couplings of the places `τ` with their partners `pr e τ`,
without marked places; it is zero unless `e` lies in `I_p° = partnerExponents d p`. -/
noncomputable def New.deductionAt [Fact d.Prime] (e : ℕ) : ℝ := by
  sorry -- [EXTRACTED_STUB upstream=src/New/Derivatives/Divisibility/Count.lean:430-433 commit=41c2716658c42ba08eb0648994a2efe83082a95c body_lines=1 body_sha256=ec4ed445dc575d060238a654f5b15df81fafac3d0072b3f529a46aa8dea959dc]

lemma New.eraseHeightOne_empty — Upstream source (src/New/Derivatives/Divisibility/Count.lean L436-L438)

lean
lemma New.eraseHeightOne_empty : eraseHeightOne κ ∅ = κ := by
  sorry -- [EXTRACTED_STUB upstream=src/New/Derivatives/Divisibility/Count.lean:436-438 commit=41c2716658c42ba08eb0648994a2efe83082a95c body_lines=3 body_sha256=41a93a0dc6e29c68e2b7afeb62662149f1e60601ac9803b425cecb4ce15338cb]

lemma New.deductionTerm_empty — Upstream source (src/New/Derivatives/Divisibility/Count.lean L441-L449)

lean
/-- The deduction term without marked places, in terms of the numbers of columns of height one, of
low columns (those of other height) and of boxes in the low columns. -/
lemma New.deductionTerm_empty (τ τ' : Φ) (e : ℕ) :
    deductionTerm p κ N ∅ τ τ' e =
      min (heightOneColumns κ N τ / p ^ e : ℝ) (heightOneColumns κ N τ' + lowColumnCount κ N τ') +
        lowColumnCount κ N τ / p ^ e +
        min (lowBoxCount κ N τ / p ^ e : ℝ) (lowBoxCount κ N τ') := by
  sorry -- [EXTRACTED_STUB upstream=src/New/Derivatives/Divisibility/Count.lean:441-449 commit=41c2716658c42ba08eb0648994a2efe83082a95c body_lines=3 body_sha256=e72e56e1795c3b1f4ab017f4edfe9ed09a1faecd098bf001e503d64bba1ee440]

lemma New.deductionTerm_eraseHeightOne — Upstream source (src/New/Derivatives/Divisibility/Count.lean L452-L461)

lean
/-- Marking the places of `marked` has the same effect on the deduction terms as removing their
columns of height one. -/
lemma New.deductionTerm_eraseHeightOne (marked : Finset Φ) (τ τ' : Φ) (e : ℕ) :
    deductionTerm p (eraseHeightOne κ marked) N ∅ τ τ' e = deductionTerm p κ N marked τ τ' e := by
  sorry -- [EXTRACTED_STUB upstream=src/New/Derivatives/Divisibility/Count.lean:452-461 commit=41c2716658c42ba08eb0648994a2efe83082a95c body_lines=7 body_sha256=7ba9b115610a6947a365fdf024c60d8c5ece0c075cd4a97d58d1e53a90bf12b9]

lemma New.boxes_eq_sum — Upstream source (src/New/Derivatives/Divisibility/Count.lean L464-L472)

lean
/-- The number `boxes κ N` of boxes in the columns of height below `N` is the sum over the places
`τ` of `heightOneColumns κ N τ`, the columns of height one, and `lowBoxCount κ N τ`, the boxes in
the columns of other height below `N`. -/
lemma New.boxes_eq_sum :
    (boxes κ N : ℝ) = ∑ τ : Φ, (heightOneColumns κ N τ + lowBoxCount κ N τ : ℝ) := by
  sorry -- [EXTRACTED_STUB upstream=src/New/Derivatives/Divisibility/Count.lean:464-472 commit=41c2716658c42ba08eb0648994a2efe83082a95c body_lines=5 body_sha256=98718ac2781a58c47cc1c3cdb940a430cecce9d749f05ebf31f37d0227b260eb]

lemma New.deductionAt_nonneg — Upstream source (src/New/Derivatives/Divisibility/Count.lean L474-L476)

lean
lemma New.deductionAt_nonneg [Fact d.Prime] (e : ℕ) : 0 ≤ deductionAt d p pr κ N e := by
  sorry -- [EXTRACTED_STUB upstream=src/New/Derivatives/Divisibility/Count.lean:474-476 commit=41c2716658c42ba08eb0648994a2efe83082a95c body_lines=3 body_sha256=e143a9c6af22ca84a9a4515ab7d8e4e2527b9a592309b44352b82f2bf951e0ad]

lemma New.summable_deductionAt — Upstream source (src/New/Derivatives/Divisibility/Count.lean L478-L495)

lean
/-- The sums of deduction terms are summable over `e`: they are bounded by a constant times `p⁻ᵉ`.
The term `deductionAt d p pr κ N e` is the sum over `τ` of `deductionTerm p κ N ∅ τ (pr e τ) e` if
`e ∈ partnerExponents d p` (odd if `p` is inert in `ℚ(√-d)`, arbitrary if `p = d`, none if `p`
splits), and zero otherwise. -/
lemma New.summable_deductionAt [Fact p.Prime] [Fact d.Prime] :
    Summable (deductionAt d p pr κ N) := by
  sorry -- [EXTRACTED_STUB upstream=src/New/Derivatives/Divisibility/Count.lean:478-495 commit=41c2716658c42ba08eb0648994a2efe83082a95c body_lines=13 body_sha256=f6f17a7a6e9f6a263b66232d40b093c7fe64dcec0ec863e945bcdfd8f85c5cc8]

lemma New.mul_tsum_deductionAt — Upstream source (src/New/Derivatives/Divisibility/Count.lean L497-L535)

lean
/-- The deduction is `γ_p B` less the predicted divisibility. Here `d` is the prime of `ℚ(√-d)`, `p`
the prime at which one counts, `pr e τ` the partner of the place `τ`, `κ τ h` the number of columns
of height `h` at `τ`, `B` the number of boxes in the columns of height below `N`, and as usual
`v(π_p) = piPrimeValuation d p`, `γ_p = gammaPrime d p`. -/
lemma New.mul_tsum_deductionAt [Fact p.Prime] [Fact d.Prime] :
    piPrimeValuation d p * ∑' e : ℕ, deductionAt d p pr κ N e =
      gammaPrime d p * boxes κ N - predictedDivisibility d p pr κ N := by
  sorry -- [EXTRACTED_STUB upstream=src/New/Derivatives/Divisibility/Count.lean:497-535 commit=41c2716658c42ba08eb0648994a2efe83082a95c body_lines=33 body_sha256=bbc8d61dc38da7ad2518905c52e5b41089447db37e00110a776f1d256e2c7cdc]

lemma New.mul_sum_deductionTerm_le — Upstream source (src/New/Derivatives/Divisibility/Count.lean L537-L554)

lean
/-- Let `d` and `p` be primes, `pr e τ` the partner of the place `τ` and `κ τ h` the number of
columns of height `h` at `τ`; only heights below `N` count. The deduction for the set `marked` of
places is `v(π_p) = piPrimeValuation d p` times the sum of `deductionTerm p κ N marked τ (pr e τ) e`
over all `τ` and the `e ≤ e₀` in `I_p° = partnerExponents d p`. It is at most `γ_p B°` less the
predicted divisibility of `κ° = eraseHeightOne κ marked`, which is `κ` without its columns of height
one at the marked places. Here `B°` is the number of boxes of `κ°` and `γ_p = gammaPrime d p`. -/
lemma New.mul_sum_deductionTerm_le [Fact p.Prime] [Fact d.Prime] (marked : Finset Φ) (e₀ : ℕ) :
    piPrimeValuation d p *
        ∑ e ≤ e₀ with e ∈ partnerExponents d p, ∑ τ : Φ, deductionTerm p κ N marked τ (pr e τ) e ≤
      gammaPrime d p * boxes (eraseHeightOne κ marked) N -
        predictedDivisibility d p pr (eraseHeightOne κ marked) N := by
  sorry -- [EXTRACTED_STUB upstream=src/New/Derivatives/Divisibility/Count.lean:537-554 commit=41c2716658c42ba08eb0648994a2efe83082a95c body_lines=8 body_sha256=7cd1d447ae6f2cb4b7eff9b60621db893a72021d6dd4d5c6be95d4e8da64182e]

theorem New.Parameters.norm_jet_minorProd_le_of_isChargeExponent — Upstream source (src/New/Derivatives/Divisibility/Count.lean L563-L639)

lean
/-- The count with charges, with the deduction cut at `⌊log_p B⌋`. Here `P` fixes the prime `d` of
`K = ℚ(√-d)`, `P.Φ s` is the set of infinite places of the field of level `s`, the instance
`PadicPlace p` is an embedding of `ℂ` into `ℂ_[p]`, and `κ τ h` is the number of columns of height
`h` at the place `τ`. Let `p` be non-split (`chiK P.d p ≠ 1`), let `v(ϖ) = ρ_p`, where
`ρ_p = varpiValuation P.d p = v(π_p) / (q_p - 1)` for the norm `q_p` of a prime above `p`, and let
`F` have the normal form for the exponents `e ∈ I_p°` (odd; all `e` if `p = d`): `F(ϖ z)` is an
integral series times the exponential of the product of `ϖ ^ (p + 1) / p` with a combination of
powers `Γ_e ^ p ^ j` of couplings, whose integral coefficients are given by `l`. Mark a set `marked`
of places, and give row `b` of the columns of height `h` at `τ` a charge `p ^ w τ h b`. For a
partner `τ'` of `τ`, one of `w τ 1 b` and `w τ' h b` is positive if `τ ∈ marked`, or if `h = 1` and
`τ' ∈ marked` (`IsChargeExponent`). The filling `i'` puts a row into each box of `κ`, and with the
integral matrices `y_τ` it defines the product of minors `P_y = minorProd i' y`: over the columns,
the minor of `z_τ y_τ` on the rows of the column and the first `h` columns. Let `B` be the number of
boxes. Then the valuation of `jet` of `F` along `P_y`, plus the sum `fillingCharge w i'` of the
exponents over the boxes, is at least `gammaPrime P.d p * B`, less `v(π_p) = piPrimeValuation P.d p`
times the sum of `deductionTerm` over all places and the exponents `e ∈ I_p°` with `e ≤ ⌊log_p B⌋`,
and less `f N ^ 3 (1 + ⌊log_p B⌋)`. Here `f` is the number of infinite places, `N` the number of
rows, and only columns of height below `N` are counted. -/
theorem New.Parameters.norm_jet_minorProd_le_of_isChargeExponent [DecidableEq n'] (hp : chiK P.d p ≠ 1)
    (hϖ : ‖ϖ‖ = p ^ (-varpiValuation P.d p))
    (hF : HasNormalForm (partnerExponents P.d p) (P.partner s p) ϖ l F)
    (marked : Finset (P.Φ s)) (w : P.Φ s → ℕ → n' → ℕ)
    (hw : ∀ e ∈ partnerExponents P.d p, IsChargeExponent (P.partner s p e) marked w)
    (i' : WeylIndex n' κ) (y : P.Φ s → n → ℕ → valRingCp p) :
    let N : ℕ := by
  sorry -- [EXTRACTED_STUB upstream=src/New/Derivatives/Divisibility/Count.lean:563-639 commit=41c2716658c42ba08eb0648994a2efe83082a95c body_lines=53 body_sha256=a775fe3767de7595bba8bcb54c03d9d6d6b8162b141500d9acf1056b41bc9d36]

theorem New.Parameters.norm_jet_minorProd_le_of_charges — Upstream source (src/New/Derivatives/Divisibility/Count.lean L641-L684)

lean
/-- **The count with charges.** Here `P` fixes the prime `d` of `K = ℚ(√-d)`, `P.Φ s` is the set of
infinite places of the field of level `s`, the instance `PadicPlace p` is an embedding of `ℂ` into
`ℂ_[p]`, and `κ τ h` is the number of columns of height `h` at the place `τ`. Let `p` be non-split,
let `v(ϖ) = ρ_p`, where `ρ_p = varpiValuation P.d p = v(π_p) / (q_p - 1)` for the norm `q_p` of a
prime above `p`, let `F` have the normal form for the exponents `e ∈ I_p°` (odd; all `e` if
`p = d`): `F(ϖ z)` is an integral series times the exponential of `ϖ ^ (p + 1) / p` times a
combination of powers `Γ_e ^ p ^ j` of couplings, with integral coefficients `l`. The filling `i'`
puts a row into each box of `κ` and, with the integral matrices `y_τ`, defines
`P_y = minorProd i' y`: the product over the columns of the minor of `z_τ y_τ` on the rows of the
column and the first `h` columns, `h` being its height. Let `κ°` arise from `κ` by removing the
columns of height one at the places of `marked`. Let charges `p ^ w` be given such that one of
`w τ 1 b` and `w τ' h b` is positive whenever `τ'` is a partner of `τ`, the heights `1` at `τ` and
`h` at `τ'` occur, and either `τ ∈ marked`, or `h = 1` and `τ' ∈ marked`. Then the valuation of the
jet of `F` along `P_y`, plus the sum `fillingCharge w i'` of the exponents over the boxes, is at
least the predicted divisibility of `κ°`, plus `γ_p = gammaPrime P.d p` for each removed box, less
`f N ^ 3 (1 + log_p max (B, 1))`. Here `f` is the number of infinite places, `N` the number of rows
and `B` the number of boxes of `κ` in columns of height below `N`. -/
theorem New.Parameters.norm_jet_minorProd_le_of_charges [DecidableEq n'] (hp : chiK P.d p ≠ 1)
    (hϖ : ‖ϖ‖ = p ^ (-varpiValuation P.d p))
    (hF : HasNormalForm (partnerExponents P.d p) (P.partner s p) ϖ l F)
    (marked : Finset (P.Φ s)) (w : P.Φ s → ℕ → n' → ℕ)
    (hw : ∀ e ∈ partnerExponents P.d p, ∀ (τ : P.Φ s) (h : ℕ) (b : n'),
      κ τ 1 ≠ 0 → κ (P.partner s p e τ) h ≠ 0 → τ ∈ marked ∨ h = 1 ∧ P.partner s p e τ ∈ marked →
        w τ 1 b ≠ 0 ∨ w (P.partner s p e τ) h b ≠ 0)
    (i' : WeylIndex n' κ) (y : P.Φ s → n → ℕ → valRingCp p) :
    let N : ℕ := by
  sorry -- [EXTRACTED_STUB upstream=src/New/Derivatives/Divisibility/Count.lean:641-684 commit=41c2716658c42ba08eb0648994a2efe83082a95c body_lines=19 body_sha256=7611aa7288a6f1eadd46e9074521fd340018c3a8f26c73521d51c1e1680217f2]

theorem New.Parameters.norm_jet_minorProd_le_of_hasNormalForm — Upstream source (src/New/Derivatives/Divisibility/Count.lean L686-L713)

lean
/-- **The count.** Here `P` fixes the prime `d` of `K = ℚ(√-d)`, `P.Φ s` is the set of infinite
places of the field of level `s`, and the instance `PadicPlace p` is an embedding of `ℂ` into
`ℂ_[p]`. Let `p` be non-split (`chiK P.d p ≠ 1`), and let `v(ϖ) = ρ_p`, where
`ρ_p = varpiValuation P.d p = v(π_p) / (q_p - 1)` for the norm `q_p` of a prime above `p`. Let `F`
have the normal form (`HasNormalForm`) for the exponents `e ∈ I_p°` (odd; all `e` if `p = d`):
`F(ϖ z)` is an integral series times the exponential of `ϖ ^ (p + 1) / p` times a combination of
powers `Γ_e ^ p ^ j` of couplings, with integral coefficients `l`. The filling `i'` puts a row into
each box of `κ` and, with the integral matrices `y_τ`, defines `P_y = minorProd i' y`, the product
over the columns of the minor of `z_τ y_τ` on the rows of the column and the first `h` columns, `h`
being its height. Then the valuation of the jet `P_y(∂)F(0)` of `F` along `P_y` is at least the
predicted divisibility of `κ`, less `f N ^ 3 (1 + log_p max (B, 1))`. Here `f` is the number of
infinite places, `N` the number of rows and `B` the number of boxes of `κ` in columns of height
below `N`. The predicted divisibility is
`v(π_p) ∑_e ∑_τ ((a_τ / p ^ e - a_τ' - a'_τ')₊ + (l_τ / p ^ e - l_τ')₊ - a'_τ / p ^ e)` over
positive `e ∈ I_p°`, where `τ' = P.partner s p e τ = -p ^ e τ` is the partner
of `τ` and `a`, `a'`, `l` count the columns of height one, the other columns and the boxes in these;
for `p = d` half a term for `e = 0` is subtracted (`predictedDivisibility`). -/
theorem New.Parameters.norm_jet_minorProd_le_of_hasNormalForm [DecidableEq n'] (hp : chiK P.d p ≠ 1)
    (hϖ : ‖ϖ‖ = p ^ (-varpiValuation P.d p))
    (hF : HasNormalForm (partnerExponents P.d p) (P.partner s p) ϖ l F)
    (i' : WeylIndex n' κ) (y : P.Φ s → n → ℕ → valRingCp p) :
    let N : ℕ := by
  sorry -- [EXTRACTED_STUB upstream=src/New/Derivatives/Divisibility/Count.lean:686-713 commit=41c2716658c42ba08eb0648994a2efe83082a95c body_lines=7 body_sha256=24900ed018628d84e7d816b6a1583e00734d42549ffe68e94061840791766a50]

lemma New.exists_norm_le_norm_sum_mul_eval — Upstream source (src/New/Derivatives/Divisibility/Count.lean L723-L759)

lean
/-- If polynomials `b t` over the valuation ring of `ℂ_[p]` stay linearly independent over the
residue field, then for all numbers `α t` there is an integral point `y` at which
`∑ α t * b t (y)` has norm at least that of a given `α t₁`. -/
lemma New.exists_norm_le_norm_sum_mul_eval {ι σ : Type} [Fintype ι]
    {b : ι → MvPolynomial σ (valRingCp p)}
    (hb : LinearIndependent (IsLocalRing.ResidueField (valRingCp p))
      fun t : ι ↦ (b t).map (IsLocalRing.residue (valRingCp p)))
    (α : ι → ℂ_[p]) (t₁ : ι) :
    ∃ y : σ → valRingCp p, ‖α t₁‖ ≤ ‖∑ t : ι, α t * (eval y (b t) : valRingCp p)‖ := by
  sorry -- [EXTRACTED_STUB upstream=src/New/Derivatives/Divisibility/Count.lean:723-759 commit=41c2716658c42ba08eb0648994a2efe83082a95c body_lines=29 body_sha256=8f5086b022da3e86ae2c2207e3946bb282ab2856d732cee6c799b1478dfe23fd]

lemma New.minorProd_eq_sum — Upstream source (src/New/Derivatives/Divisibility/Count.lean L761-L788)

lean
/-- Expansion of the product of minors `P_y(z) = minorProd i' y`: the entries of row `i'` of the
Schur matrix of the variables `z_τ` are its coefficients in the family `nablaBasis i * detPow`
evaluated at `y`. Here `nablaBasis i` is the product of minors for the filling `i`, and `detPow` is
the product, over the places `τ`, of the determinant of the first `card n` columns of `y_τ`, each to
the power `schurDetExp`: the number `κ τ (card n)` if `card n < card n'`, and zero otherwise. The
hypothesis `FitsRanks` says `card n ≤ card n'` and that `κ` has no column of height strictly between
the two. -/
lemma New.minorProd_eq_sum (hκ : FitsRanks (fun _ : Φ ↦ n) (fun _ : Φ ↦ n') κ) (i' : WeylIndex n' κ)
    (y : (Σ _ : Φ, n) × ℕ → R) :
    minorProd i' (fun (τ : Φ) (a : n) (k : ℕ) ↦ y (⟨τ, a⟩, k)) =
      ∑ i : WeylIndex n κ, eval y (nablaBasis R (fun _ : Φ ↦ n) κ i *
          detPow R (fun _ : Φ ↦ n) (schurDetExp (fun _ : Φ ↦ n) (fun _ : Φ ↦ n') κ)) •
        schur κ (fun τ : Φ ↦ of fun (b : n') (a : n) ↦ X (τ, b, a)) i' i := by
  sorry -- [EXTRACTED_STUB upstream=src/New/Derivatives/Divisibility/Count.lean:761-788 commit=41c2716658c42ba08eb0648994a2efe83082a95c body_lines=16 body_sha256=425736712b86563c17a8edbc2975179502b2c07968f400d1cb12d53850cf0d85]

lemma New.exists_norm_schurJet_le_norm_jet_minorProd — Upstream source (src/New/Derivatives/Divisibility/Count.lean L790-L821)

lean
/-- An entry of the Schur matrix `schur κ z` may be replaced by a product of minors. Suppose
`card n ≤ card n'` and that `κ` has no column of height strictly between the two (`FitsRanks`). Take
a power series `F` and standard fillings `i'`, `i`. Let `P` be the polynomial entry of `schur κ z`
at `(i', i)`. Then there are matrices `y_τ` with entries in `valRingCp p` such that
`schurJet κ F i' i = (P(∂) F)(0)` has norm at most that of `(P_y(∂) F)(0)`, where
`P_y = minorProd i' y`. -/
lemma New.exists_norm_schurJet_le_norm_jet_minorProd
    (hκ : FitsRanks (fun _ : Φ ↦ n) (fun _ : Φ ↦ n') κ)
    (F : MvPowerSeries (Φ × n' × n) ℂ_[p]) (i' : WeylIndex n' κ) (i : WeylIndex n κ) :
    ∃ y : Φ → n → ℕ → valRingCp p,
      ‖schurJet κ F i' i‖ ≤ ‖jet ℂ_[p]
        (minorProd i' fun (τ : Φ) (a : n) (k : ℕ) ↦ (y τ a k : ℂ_[p])) F‖ := by
  sorry -- [EXTRACTED_STUB upstream=src/New/Derivatives/Divisibility/Count.lean:790-821 commit=41c2716658c42ba08eb0648994a2efe83082a95c body_lines=21 body_sha256=ada23d9656b3e76e27d98a949b39ec9268169aa843d377180748129911d97514]

Page Glossary ​

prime number
A whole number greater than 1 whose only positive whole-number divisors are 1 and itself; every integer above 1 factors uniquely into a product of them.
elliptic theta function
A quasi-periodic entire function on a CM lattice normalized at the origin, whose finite products along tight-frame projections build integral multi-variable theta functions and collapse p-adically into exponential normal forms.
complex multiplication
Extra scaling-and-rotation symmetries of a two-dimensional lattice in ℂ preserved by the integers 𝓞_K of an imaginary quadratic field K = ℚ(√(-d)), pinning down every Galois-conjugate lattice area via the Chowla–Selberg formula.
arithmetic height
A logarithmic measure combining ordinary archimedean size with prime-by-prime p-adic divisibility, locked together by the product formula so a nonzero algebraic quantity cannot be simultaneously small at every place.
quadratic twist
Multiplying a Dirichlet character χ modulo N by the Legendre symbol (·/d) of an odd prime d coprime to N, yielding a non-principal character modulo N·d whose L-function family admits zero-density control.
formal group law
A power-series addition law encoding an elliptic curve's group structure near the origin, whose Lubin–Tate scaling and Frobenius congruence isolate the exact p-adic powers controlling theta-function derivatives.
von Mangoldt function
The arithmetic weight Λ(n) equal to log p when n is a prime power pᵏ (k ≥ 1) and 0 otherwise, converting multiplicative prime factorizations into additive logarithms.
tight frame
A balanced, possibly overcomplete family of vectors with integer multiplicities whose projections reconstruct the exact standard inner product—allowing integral root-of-unity spokes to pull back one-dimensional elliptic theta sections into high-dimensional integral theta functions.
theta normal form
A p-adic factorization of rescaled multivariable theta products into an integral power series times an exponential of Frobenius-power couplings pairing each infinite place with its shifted partner place.
Schur jet
The evaluation at the origin of a symmetry-adapted Schur differential operator on a theta function's multivariate Taylor expansion, whose prime-by-prime divisibility is controlled through minor products and matched by an explicit sharpness construction.