module import Mathlib.Algebra.Module.SpanRankOperations import Mathlib.GroupTheory.Schreier import Mathlib.LinearAlgebra.Span.TensorProduct import Mathlib.RingTheory.Etale.Weakly import Mathlib.RingTheory.Finiteness.ModuleFinitePresentation import Mathlib.RingTheory.Henselian import Mathlib.RingTheory.SimpleRing.Principal import Mathlib.RingTheory.TotallySplit import Mathlib.RingTheory.Valuation.Extension import TauCeti.RingTheory.Valuation.ValuationSubring public import Lib.Shimura.GoodReduction.TorsionSizes import Lib.Shimura.ComplexTheta.DimensionFormula /-! # Orthogonality of theta translates and balls of integral theta functions Theta functions for a full lattice `L` with Appell–Humbert data with positive Riemann form (`New.IsPosRiemann`) are acted on by the translations `New.RealComplexForm.thetaShift B a` by the dual lattice. The file proves an orthogonality relation for these translates. It then studies the balls of a sup norm ‖f‖ on theta functions, built from the values at torsion points. ## Main definitions and results * `New.IsAppellHumbert.sum_shift_mul_shift`: the orthogonality relation for the translates of two theta functions. * `New.IsAppellHumbert.exists_proportional_orbit_lattice`: over a valuation ring of `ℂ`, the modules generated by the translates of two finite families are proportional. This needs that neither family is zero. It also needs a natural number that is a unit of the ring and kills the dual lattice modulo `L`. * `New.ThetaTori.HasGoodReduction.normBall`: the theta functions of norm at most ‖f‖. * `New.ThetaTori.HasGoodReduction.mem_of_mem_normBall` (from `New.ThetaTori.HasGoodReduction.exists_smul_thetaNorm_eq`): if f is also a theta function for an Appell–Humbert datum (L₀, B, ζ), L₀ ⊇ L, a module that contains the translates `New.RealComplexForm.thetaShift B u f` of f by the dual of L₀ contains the theta functions for (L₀, B, ζ) in the ball of f. The later results rest on this. * `New.ThetaTori.HasGoodReduction.normBall_pow_pow`: if f is also a theta function for an Appell–Humbert datum (L₀, B, ζ) with L₀ ⊇ L/r, the r ^ j-th power of the ball of f is the ball of f ^ r ^ j. * `New.ThetaTori.HasGoodReduction.finrank_reduction_eq`: the reduction of a finitely generated ball has dimension dim `New.RealComplexForm.thetaSpace`. Notions from other files: * `New.RealComplexForm.thetaShift`: The twisted translation by `a`, a complex-linear map on all functions `V → ℂ`: `thetaShift B a f z = exp (-(B a z + B a a / 2)) * f (z + a)`. * `New.IsAppellHumbert`: Appell–Humbert data: Re B is symmetric, and on L one has |χ| = 1 and χ(l + m) = χ(l)χ(m)·exp(πi E(m, l)), E the Riemann form of B. * `New.ThetaTori.IsAmpleType`: (L, B, χ) is an Appell–Humbert datum with positive Riemann form, and χ has finite order on L: χⁿ = 1 there for some n ≠ 0. ## Relation to the literature Known result: Schur orthogonality for the theta group of a polarised complex torus. This is `New.IsAppellHumbert.sum_shift_mul_shift`. See also `Lib.Shimura.ThetaNormality.RiemannRelation` and `Lib.Shimura.ComplexTheta.DimensionFormula`. -/ @[expose] public section /-! ## Orthogonality of theta translates and proportional orbit lattices The translations `New.RealComplexForm.thetaShift B a` by the dual lattice `New.RealComplexForm.dualLattice` act on the theta functions `New.RealComplexForm.thetaSpace`, a space whose dimension is the square root of the index of `L` in the dual lattice. The results of this section are for Appell–Humbert data (`New.IsAppellHumbert`) with positive Riemann form (`New.IsPosRiemann`) on a full lattice `L`. -/ /-- If `u * a * b = 1`, then the weighted product `d * (u * (b * x / q * (a * y)))` equals `q⁻¹ * (d * (x * y))`. -/ private lemma mul_mul_div_mul_eq_inv_mul_of_mul_mul_eq_one {u a b : ℂ} (h : u * a * b = 1) (d x y q : ℂ) : d * (u * (b * x / q * (a * y))) = q⁻¹ * (d * (x * y)) := by linear_combination q⁻¹ * d * x * y * h namespace New open Module LinearMap Fintype Function QuotientAddGroup ValuationRing variable {V : Type} [FinComplexSpace V] {L : Submodule ℤ V} [IsFullRankLattice L] {B : ThetaTori.LatticeForm L} {χ : V → ℂ} [hB : IsAppellHumbert B χ] [hp : IsPosRiemann B] omit [IsFullRankLattice L] hp in include hB in /-- For Appell–Humbert data `(B, χ)`, `B.thetaShift (-s) (B.thetaShift s x) = x` for every `s : V` and `x : V → ℂ`. -/ private lemma IsAppellHumbert.thetaShift_neg_thetaShift (s : V) (x : V → ℂ) : B.thetaShift (-s) (B.thetaShift s x) = x := by simpa using hB.thetaShift_thetaShift (-s) s (f := x) omit [IsFullRankLattice L] hp in /-- If `t`, `u`, and `v` in `B.dualLattice` satisfy `(t + u - v).val ∈ L`, then for theta functions `f` and `x` in `B.thetaSpace χ` and any `z : V`, `B.thetaShift (-u) x z • B.thetaShift t (B.thetaShift u f) = B.thetaShift (-v) (B.thetaShift t x) z • B.thetaShift v f`. -/ private lemma IsAppellHumbert.thetaShift_smul_thetaShift_of_sub_mem {t u v : B.dualLattice} (h_mem : (t + u - v).val ∈ L) (f x : B.thetaSpace χ) (z : V) : B.thetaShift (-u) x z • B.thetaShift t (B.thetaShift u f) = B.thetaShift (-v) (B.thetaShift t x) z • B.thetaShift v f := by -- As `t + u ≡ v` modulo `L`, on theta functions -- `thetaShift t ∘ thetaShift u = κ • thetaShift v`: translation by a further -- point of `L` only rescales them (`thetaShift_add_eq_smul_of_mem`). set l : V := (t + u - v).val have sum_eq : (t : V) + u = v + l := by simp [l] -- `κ` collects the factors of `thetaShift_thetaShift` and `thetaShift_add_eq_smul_of_mem`. let κ : ℂ := Complex.exp (Real.pi * Complex.I * B.riemannForm t u) * (Complex.exp (-(Real.pi * Complex.I * B.riemannForm v l)) * χ l) have hκ (y : V → ℂ) (hy : y ∈ B.thetaSpace χ) : B.thetaShift t (B.thetaShift u y) = κ • B.thetaShift v y := by rw [hB.thetaShift_thetaShift, sum_eq, hB.thetaShift_add_eq_smul_of_mem hy _ h_mem, smul_smul] -- Apply this to `f` and to `y = thetaShift (-u) x`, for which `thetaShift u y = x`. have hx : B.thetaShift t x = κ • B.thetaShift v (B.thetaShift (-u) x) := by rw [← hκ _ (hB.thetaShift_mem_of_mem_dualLattice (neg_mem u.property) x.property)] simpa using congrArg (B.thetaShift t) (hB.thetaShift_neg_thetaShift (-u) x).symm rw [hκ f f.property, hx, map_smul, hB.thetaShift_neg_thetaShift, Pi.smul_apply, smul_eq_mul, smul_smul, mul_comm] /-- Schur orthogonality for the translates of theta functions. Let translation by every point of the dual lattice permute the points `a s`, `s ∈ T`, of the dual lattice modulo `L`. With `U a = thetaShift B a`, theta functions satisfy `d * ∑ s, U (-a s) g z * U (a s) f w = |T| f z g w`, where `d` is `Nat.sqrt` of the index of `L` in the dual lattice, the index being the square of the dimension of the space of theta functions. -/ lemma IsAppellHumbert.sum_shift_mul_shift (T : Type*) [Fintype T] (a : T → B.dualLattice) (ha : ∀ t : ↥(RealComplexForm.dualLattice B), ∃ e : T ≃ T, ∀ s : T, (t + a s - a (e s)).val ∈ L) (f g : B.thetaSpace χ) (z w : V) : (L.toAddSubgroup.relIndex B.dualLattice.toAddSubgroup).sqrt * ∑ s : T, B.thetaShift (-a s) g z * B.thetaShift (a s) f w = card T * f.val z * g.val w := by -- The operator `Q : x ↦ ∑ s, thetaShiftEnd (-a s) x z • thetaShiftEnd (a s) f` commutes with the -- translations by the dual lattice, so it is a scalar `c` (Schur). Evaluating `Q g` at `w` gives -- the sum; the trace of `Q` gives `c`; the square root of the index is the dimension. let Q : End ℂ (B.thetaSpace χ) := ∑ s, ((proj z ∘ₗ B.thetaShift (-a s)).domRestrict _).smulRight (hB.thetaShiftEnd (a s) f) obtain ⟨c, hQ⟩ : ∃ c : ℂ, Q = c • 1 := by refine schur_lemma fun t ↦ ext fun x ↦ ?_ obtain ⟨e, he_mem⟩ := ha t -- The term `s` of `thetaShift t (Q x)` is the term `e s` of `Q (thetaShift t x)` (via -- `thetaShift_smul_thetaShift_of_sub_mem` with `u = a s` and `v = a (e s)`); reindex by `e`. have h_sum : ∑ s, B.thetaShift (-a s) x z • B.thetaShift t (B.thetaShift (a s) f) = ∑ s, B.thetaShift (-a s) (B.thetaShift t x) z • B.thetaShift (a s) f := sum_equiv e _ _ fun s ↦ hB.thetaShift_smul_thetaShift_of_sub_mem (he_mem s) f x z apply Subtype.ext change B.thetaShift t (Q x).val = (Q (hB.thetaShiftEnd t x)).val simp only [Q, LinearMap.sum_apply, Submodule.coe_sum, map_sum, LinearMap.smulRight_apply, LinearMap.domRestrict_apply, LinearMap.comp_apply, LinearMap.proj_apply, SetLike.val_smul, map_smul] exact h_sum have h_finite : Module.Finite ℂ (B.thetaSpace χ) := hB.finite_thetaSpace have sum_eq : ∑ s, B.thetaShift (-a s) g z * B.thetaShift (a s) f w = c * g.val w := by have h := congrArg (fun T : End ℂ (B.thetaSpace χ) ↦ (T g).val w) hQ simp only [Q, LinearMap.sum_apply, Submodule.coe_sum, Finset.sum_apply, LinearMap.smulRight_apply, LinearMap.domRestrict_apply, LinearMap.comp_apply, LinearMap.proj_apply, SetLike.val_smul, Pi.smul_apply, smul_eq_mul, LinearMap.smul_apply, one_apply_eq_self] at h exact h -- each summand of `Q` has rank at most one, and its trace is -- `thetaShiftEnd (-a s) (thetaShiftEnd (a s) f) z = f z` have trace_eq : card T * f.val z = c * finrank ℂ (B.thetaSpace χ) := by simpa [Q, hB.thetaShift_neg_thetaShift] using congrArg (trace ℂ (B.thetaSpace χ)) hQ rw [← hB.finrank_thetaSpace_sq, Nat.sqrt_eq', sum_eq, trace_eq, mul_left_comm, mul_assoc] omit hB in /-- If a natural number `N` that is a unit of the ring `O` kills the dual lattice modulo `L`, then the order of the dual lattice modulo `L` is a unit of `O`. -/ private lemma IsAppellHumbert.isUnit_natCard_dualLattice_quotient_of_nsmul_mem (hB : IsAppellHumbert B χ) {O : Type*} [CommRing O] {N : ℕ} (hN : IsUnit (N : O)) (hN_kills : ∀ a ∈ B.dualLattice, N • a ∈ L) : IsUnit (Nat.card (B.dualLattice ⧸ (L.submoduleOf B.dualLattice).toAddSubgroup) : O) := by have h_finite : Finite (B.dualLattice ⧸ (L.submoduleOf B.dualLattice).toAddSubgroup) := hB.finite_dualLattice_quotient have kills : ∀ s : B.dualLattice ⧸ (L.submoduleOf B.dualLattice).toAddSubgroup, N • s = 0 := mk_surjective.forall.mpr fun a ↦ (eq_zero_iff _).mpr (hN_kills a a.property) exact isUnit_of_dvd_unit (card_dvd_exponent_nsmul_rank' _ kills).natCast (mod_cast hN.pow _) /-- In an `O`-submodule `M` of `V → ℂ`, if `(Nat.card G : O) • (a / q) • y` expands as `d • ∑ s, e s • (u s / q) • T s` with `Nat.card G` a unit of `O`, each `T s ∈ M`, and each `u s / q` in the image of `algebraMap O ℂ`, then `(a / q) • y ∈ M`. -/ private lemma smul_mem_of_div_mem_range {O : Type*} [CommRing O] [Algebra O ℂ] {V G : Type} [Fintype G] {M : Submodule O (V → ℂ)} {d : ℕ} {e : G → O} {T : G → V → ℂ} {u : G → ℂ} {y : V → ℂ} {a q : ℂ} (h_card : IsUnit (Nat.card G : O)) (h_expand : (Nat.card G : O) • (a / q) • y = d • ∑ s : G, e s • (u s / q) • T s) (hT : ∀ r : G, T r ∈ M) (hq : ∀ r : G, ∃ b : O, algebraMap O ℂ b = u r / q) : (a / q) • y ∈ M := by choose b hb using hq rw [← M.smul_mem_iff_of_isUnit h_card, h_expand] refine nsmul_mem (sum_mem fun r _ ↦ ?_) _ simp [← hb, M.smul_mem, hT r] /-- If finitely many elements `v j` of the fraction field `K` of a valuation ring `O` are not all zero, one of them is not zero and every quotient `v j' / v j` by it is the image of an element of `O`: take one of largest valuation. -/ private lemma exists_ne_zero_forall_div_mem_range (O : Type*) {K : Type*} [CommRing O] [IsDomain O] [ValuationRing O] [Field K] [Algebra O K] [IsFractionRing O K] {ι : Type*} [Finite ι] {v : ι → K} (hv : ∃ j, v j ≠ 0) : ∃ j, v j ≠ 0 ∧ ∀ j', ∃ b : O, algebraMap O K b = v j' / v j := by have : Fintype ι := ofFinite ι obtain ⟨j₀, hj₀⟩ := hv obtain ⟨j, -, h_ne, h_div⟩ := (valuation O K).valuationSubring.exists_ne_zero_and_div_mem (s := Finset.univ) (g := v) ⟨j₀, Finset.mem_univ j₀, hj₀⟩ exact ⟨j, h_ne, fun j' ↦ (mem_integer_iff O K _).mp (h_div j' (Finset.mem_univ j'))⟩ /-- Weighted orthogonality expansion for theta translates indexed by the finite quotient `G = B.dualLattice ⧸ L`, with weights `c` and inverses `e` satisfying `algebraMap O ℂ (e s) * c s.out * c (-s.out) = 1`. -/ private lemma IsAppellHumbert.weighted_shift_expand {O : Type*} [CommRing O] [Algebra O ℂ] {c : V → ℂ} {e : (B.dualLattice ⧸ (L.submoduleOf B.dualLattice).toAddSubgroup) → O} [Fintype (B.dualLattice ⧸ (L.submoduleOf B.dualLattice).toAddSubgroup)] (he_mul : ∀ s : B.dualLattice ⧸ (L.submoduleOf B.dualLattice).toAddSubgroup, algebraMap O ℂ (e s) * c s.out * c (-s.out) = 1) (x y : B.thetaSpace χ) (z : V) (q : ℂ) : (Nat.card (B.dualLattice ⧸ (L.submoduleOf B.dualLattice).toAddSubgroup) : O) • (x.val z / q) • y.val = finrank ℂ (B.thetaSpace χ) • ∑ s : B.dualLattice ⧸ (L.submoduleOf B.dualLattice).toAddSubgroup, e s • (((c (-s.out) • hB.thetaShiftEnd (-s.out)) y).val z / q) • c s.out • B.thetaShift s.out x := by let H : AddSubgroup B.dualLattice := (L.submoduleOf B.dualLattice).toAddSubgroup let G : Type := B.dualLattice ⧸ H funext w -- The family is a set of representatives `s.out`, which translation by `t` permutes modulo `L`. have h_perm (t : B.dualLattice) : ∃ e : G ≃ G, ∀ s : G, (t + s.out - (e s).out).val ∈ L := ⟨.addLeft ↑t, fun s ↦ (eq_iff_sub_mem (N := H)).mp (by simp)⟩ have orthogonality := sum_shift_mul_shift G (fun s ↦ s.out) h_perm x y z w trans q⁻¹ * (card G * x.val z * y.val w) · rw [Pi.smul_apply, Pi.smul_apply, Algebra.smul_def, smul_eq_mul, Nat.card_eq_fintype_card, map_natCast, div_eq_mul_inv] ring · -- Termwise, the weights cancel by `e s * c s * c (-s) = 1`. rw [← orthogonality, ← hB.finrank_thetaSpace_sq, Nat.sqrt_eq', Finset.mul_sum, Finset.mul_sum] simp only [Pi.smul_apply, Finset.sum_apply, Algebra.smul_def, Finset.mul_sum] refine Finset.sum_congr rfl fun s _ ↦ ?_ exact (mul_mul_div_mul_eq_inv_mul_of_mul_mul_eq_one (he_mul s) _ _ _ _).symm /-- For a nonzero finite family `u` of theta functions and a point `z` where some theta function `x` does not vanish, one weighted translate `(c (-s.out) • hB.thetaShiftEnd (-s.out)) (u j)` is nonzero at `z` and its value at `z` divides all other translate values at `z` over the valuation ring `O`. -/ private lemma IsAppellHumbert.exists_max_weighted_shift_eval {O : Type*} [CommRing O] [IsDomain O] [ValuationRing O] [Algebra O ℂ] [IsFractionRing O ℂ] {c : V → ℂ} {e : (B.dualLattice ⧸ (L.submoduleOf B.dualLattice).toAddSubgroup) → O} [Fintype (B.dualLattice ⧸ (L.submoduleOf B.dualLattice).toAddSubgroup)] (he_mul : ∀ s : B.dualLattice ⧸ (L.submoduleOf B.dualLattice).toAddSubgroup, algebraMap O ℂ (e s) * c s.out * c (-s.out) = 1) {x : B.thetaSpace χ} {z : V} (hx : x.val z ≠ 0) {ι : Type} [Finite ι] {u : ι → B.thetaSpace χ} {k : ι} (hu : u k ≠ 0) : ∃ (j : ι) (s : B.dualLattice ⧸ (L.submoduleOf B.dualLattice).toAddSubgroup), ((c (-s.out) • hB.thetaShiftEnd (-s.out)) (u j)).val z ≠ 0 ∧ ∀ (j' : ι) (s' : B.dualLattice ⧸ (L.submoduleOf B.dualLattice).toAddSubgroup), ∃ b : O, algebraMap O ℂ b = ((c (-s'.out) • hB.thetaShiftEnd (-s'.out)) (u j')).val z / ((c (-s.out) • hB.thetaShiftEnd (-s.out)) (u j)).val z := by let G : Type := B.dualLattice ⧸ (L.submoduleOf B.dualLattice).toAddSubgroup let A (s : G) : End ℂ (B.thetaSpace χ) := c (-s.out) • hB.thetaShiftEnd (-s.out) have h_some : ∃ p : ι × G, (A p.snd (u p.fst)).val z ≠ 0 := by by_contra! h_none -- All values vanish, so the right side of `weighted_shift_expand` is `0`; the left is not. have h_all_zero : ∀ (j' : ι) (s' : G), ((c (-s'.out) • hB.thetaShiftEnd (-s'.out)) (u j')).val z = 0 := fun j' s' ↦ h_none (j', s') have h_rhs : (Nat.card G : O) • (x.val z / 1) • (u k).val = 0 := by rw [hB.weighted_shift_expand he_mul x (u k) z 1] simp only [h_all_zero, zero_div, zero_smul, smul_zero, Finset.sum_const_zero] have h_uk : (u k).val = 0 := by rw [div_one] at h_rhs have h_ne : (algebraMap O ℂ (Nat.card G : O)) ≠ 0 := by rw [map_natCast] exact Nat.cast_ne_zero.mpr Nat.card_pos.ne' have h1 : x.val z • (u k).val = 0 := by have h_smul : algebraMap O ℂ (Nat.card G : O) • (x.val z • (u k).val) = 0 := by rwa [algebraMap_smul] exact (smul_eq_zero.mp h_smul).resolve_left h_ne exact (smul_eq_zero.mp h1).resolve_left hx exact hu (Subtype.ext h_uk) obtain ⟨⟨j, s⟩, h_ne, h_div⟩ := exists_ne_zero_forall_div_mem_range O h_some exact ⟨j, s, h_ne, fun j' s' ↦ h_div (j', s')⟩ /-- Let `O` be a valuation ring with fraction field `ℂ`, and `f`, `g` finite families of theta functions. Suppose that (a) a natural number that is a unit of `O` kills the dual lattice modulo `L`, (b) neither family is zero, and (c) the weights `c` are such that, for `a` in the dual lattice, `c a * c (-a)` is the image of a unit of `O`. Then for some `γ ≠ 0`, an `O`-module stable under the translations `c a • thetaShift B a` contains all `g k` iff it contains all `γ • f i`. -/ lemma IsAppellHumbert.exists_proportional_orbit_lattice {O : Type*} [CommRing O] [IsDomain O] [ValuationRing O] [Algebra O ℂ] [IsFractionRing O ℂ] {ι κ : Type} [Finite ι] [Finite κ] (f : ι → B.thetaSpace χ) (g : κ → B.thetaSpace χ) (i : ι) (k : κ) (c : V → ℂ) {N : ℕ} (hN : IsUnit (N : O)) (hN_kills : ∀ a ∈ B.dualLattice, N • a ∈ L) (hf : f i ≠ 0) (hg : g k ≠ 0) (hc : ∀ a ∈ B.dualLattice, ∃ e : Oˣ, algebraMap O ℂ e = c a * c (-a)) : ∃ γ ≠ (0 : ℂ), ∀ M : Submodule O (V → ℂ), (∀ a ∈ B.dualLattice, ∀ x ∈ M, c a • B.thetaShift a x ∈ M) → ((∀ k : κ, (g k).val ∈ M) ↔ ∀ i : ι, γ • (f i).val ∈ M) := by -- Fix `z` with `f i z ≠ 0`, and let `A s` be the weighted translation by `-s`. By orthogonality, -- a stable module containing `x` contains `(x z / q) • y` once all `A s y z / q` are integral. -- Take for `γ` the ratio `A t (g k₀) z / A s (f i₀) z`, each of largest valuation in its family. obtain ⟨z, hz⟩ : ∃ z : V, (f i).val z ≠ (0 : B.thetaSpace χ).val z := ne_iff.mp fun h_eq ↦ hf (Subtype.ext h_eq) let H : AddSubgroup B.dualLattice := (L.submoduleOf B.dualLattice).toAddSubgroup -- `G`, the dual lattice modulo `L`, is finite, and its order divides a power of `N`. let G : Type := B.dualLattice ⧸ H have h_finite : Finite G := hB.finite_dualLattice_quotient let h_fintype : Fintype G := Fintype.ofFinite G have card_unit : IsUnit (Nat.card G : O) := hB.isUnit_natCard_dualLattice_quotient_of_nsmul_mem hN hN_kills let A (s : G) : End ℂ (B.thetaSpace χ) := c (-s.out) • hB.thetaShiftEnd (-s.out) have inv_mem (s : G) : ∃ e : O, algebraMap O ℂ e * c s.out * c (-s.out) = 1 := by obtain ⟨e, he_eq⟩ := hc s.out s.out.property exact ⟨↑e⁻¹, by rw [mul_assoc, ← he_eq, ← map_mul, e.inv_mul, map_one]⟩ choose e he_mul using inv_mem obtain ⟨i₀, s, f_ne, f_max⟩ := hB.exists_max_weighted_shift_eval he_mul hz hf obtain ⟨k₀, t, g_ne, g_max⟩ := hB.exists_max_weighted_shift_eval he_mul hz hg let γ : ℂ := (A t (g k₀)).val z / (A s (f i₀)).val z refine ⟨γ, div_ne_zero g_ne f_ne, fun M hM ↦ ?_⟩ have A_mem (r : G) (x : B.thetaSpace χ) (hx : x.val ∈ M) : (A r x).val ∈ M := hM _ (-r.out).property _ hx refine ⟨fun hg_mem j ↦ ?_, fun hf_mem j ↦ ?_⟩ · -- Take `x = A t (g k₀)`, `y = f j` and `q = A s (f i₀) z`, so that `x z / q = γ`. exact smul_mem_of_div_mem_range card_unit (hB.weighted_shift_expand he_mul (A t (g k₀)) (f j) z _) (fun r ↦ hM _ r.out.property _ (A_mem t (g k₀) (hg_mem k₀))) (f_max j) · -- Take `x = A s (γ • f i₀)`, `y = g j` and `q = A t (g k₀) z`, so that `x z / q = 1`. have h_ratio : γ * (A s (f i₀)).val z / (A t (g k₀)).val z = 1 := by have hf_ne : (A s (f i₀)).val z ≠ 0 := f_ne have hg_ne : (A t (g k₀)).val z ≠ 0 := g_ne simp [γ, hf_ne, hg_ne] simpa [h_ratio] using smul_mem_of_div_mem_range card_unit (hB.weighted_shift_expand he_mul (A s (γ • f i₀)) (g j) z ((A t (g k₀)).val z)) (fun r ↦ hM _ r.out.property _ (A_mem s (γ • f i₀) (hf_mem i₀))) (g_max j) end New /-! ## Balls of the theta norm under good reduction Theta functions for (L, B, χ) on V carry a sup norm ‖f‖ = `New.ThetaTori.LatticeForm.thetaNorm`, the supremum over the torsion points x of V/L of the valuation v of the value `New.RealComplexForm.thetaShift B x f 0`. The standing hypothesis is `New.ThetaTori.HasGoodReduction`: the datum is of ample type, the norm is multiplicative, a natural number that is a v-unit maps the dual lattice `New.RealComplexForm.dualLattice` into L, and r > 1 is a v-unit. -/ namespace New.ThetaTori open Module Submodule NNReal Valuation MvPolynomial Set IsLocalRing variable {ι V : Type} [FinComplexSpace V] {L : Submodule ℤ V} {B : LatticeForm L} {χ g : V → ℂ} {u : V} {f : V → ℂ} {v : Valuation ℂ ℝ≥0} {r a : ℕ} {M : Submodule v.valuationSubring (V → ℂ)} (R : Type*) {A : Type*} [CommRing R] [CommRing A] [Algebra R A] (x : ι → A) (m : ℕ) /-- The m-th power of the R-span of the x_i in A, that is, the values at x of the forms of degree m over R. -/ abbrev formSpan : Submodule R A := span R (range x) ^ m /-- Evaluation at `x` maps the homogeneous polynomials of degree `m` over `R` onto `New.ThetaTori.formSpan R x m`. -/ lemma map_homogeneousSubmodule_eq_formSpan : (homogeneousSubmodule ι R m).map (aeval x).toLinearMap = formSpan R x m := by simp [Submodule.map_pow, ← homogeneousSubmodule_one_pow R m, map_span, homogeneousSubmodule_one_eq_span_X, ← range_comp'] /-- p is a primitive integral scaling of w: p_j = w_j/s for one complex s and all j, and some coordinate p_c is a unit of the valuation ring. -/ def IsIntegralCoords (w : ι → ℂ) (p : ι → v.valuationSubring) : Prop := ∃ s : ℂ, (∀ j : ι, p j = w j / s) ∧ ∃ c : ι, v (p c) = 1 /-- The theta norm is homogeneous: ‖c • f‖ = v(c) ‖f‖. -/ lemma thetaNorm_smul (c : ℂ) : B.thetaNorm v (c • f) = v c * B.thetaNorm v f := by have h_size : B.sizeAt v (c • f) = fun x ↦ v c * B.sizeAt v f x := funext fun x ↦ by simp [LatticeForm.sizeAt] simp only [LatticeForm.thetaNorm, h_size, NNReal.mul_iSup] @[simp] lemma thetaNorm_zero : B.thetaNorm v 0 = 0 := by simp [range, LatticeForm.sizeAt] /-- The theta norm of `f ^ a`, taken for the form `a • B`, is the `a`-th power of the theta norm of `f`. -/ lemma thetaNorm_pow : (a • B).thetaNorm v (f ^ a) = B.thetaNorm v f ^ a := by have h_size : (a • B).sizeAt v (f ^ a) = fun x ↦ B.sizeAt v f x ^ a := sizeAt_pow simp only [LatticeForm.thetaNorm, h_size, NNReal.iSup_pow] private lemma riemannForm_nsmul_right (Q : RealComplexForm V) (u l : V) : (r • Q).riemannForm u l = Q.riemannForm u (r • l) := by rw [RealComplexForm.riemannForm.map_nsmul, LinearMap.smul_apply, LinearMap.smul_apply, map_nsmul] /-- Let `r ≠ 0`, and let `L₀` contain every `u` with `r • u ∈ L`. Then the dual lattice of `L₀` for the form `r • B` lies in the dual lattice of `L` for `B`. -/ lemma dualLattice_nsmul_le {L₀ : Submodule ℤ V} (hr : r ≠ 0) (h : ∀ u : V, r • u ∈ L → u ∈ L₀) : (r • B).dualLattice (L := L₀) ≤ B.dualLattice := by -- For l in L the vector l / r lies in L₀, and pairing it for r • B is pairing l for B. intro u hu l hl have h_cancel : r • ((r⁻¹ : ℝ) • l) = l := by rw [← Nat.cast_smul_eq_nsmul ℝ, smul_smul, mul_inv_cancel₀ (Nat.cast_ne_zero.mpr hr), one_smul] have h_mem : (r⁻¹ : ℝ) • l ∈ L₀ := h _ (by rwa [h_cancel]) simpa only [riemannForm_nsmul_right, h_cancel] using hu ((r⁻¹ : ℝ) • l) h_mem variable [IsFullRankLattice L] /-- For (L, B, χ) of ample type (`New.ThetaTori.IsAmpleType`) and `u` in the dual lattice, the translate `New.RealComplexForm.thetaShift B u f` has the same theta norm as `f`. -/ lemma IsAmpleType.thetaNorm_thetaShift (G : IsAmpleType B χ) (hu : u ∈ B.dualLattice) : B.thetaNorm v (B.thetaShift u f) = B.thetaNorm v f := by -- u is a torsion point, and shifting by it permutes the torsion points. have h_pos : IsPosRiemann B := G.isPosRiemann obtain ⟨N, hN, h_kills⟩ := G.exists_nsmul_mem_of_mem_dualLattice let u' : torsionPoints L := ⟨u, N, hN, h_kills u hu⟩ calc _ = ⨆ x, B.sizeAt v f (x + u') := iSup_congr (G.sizeAt_thetaShift u') _ = B.thetaNorm v f := (Equiv.addRight _).iSup_comp namespace HasGoodReduction variable (B χ v) in /-- The ball of radius ‖f‖: the module, over the valuation ring of v, of the theta functions g for (L, B, χ) with v(`New.RealComplexForm.thetaShift` B x g 0) ≤ ‖f‖ at every torsion point x. -/ noncomputable def normBall (f : V → ℂ) : Submodule v.valuationSubring (V → ℂ) := (B.thetaSpace χ).restrictScalars v.valuationSubring ⊓ ⨅ x : torsionPoints L, Submodule.comap ((LinearMap.proj 0 ∘ₗ B.thetaShift x).restrictScalars v.valuationSubring) (v.leSubmodule (B.thetaNorm v f)) omit [IsFullRankLattice L] in /-- The `n`-th power of the theta norm ball of `f` lies in the theta norm ball of `f ^ n` for the form `n • B`. This follows by multiplying the pointwise bounds at torsion points. -/ lemma pow_normBall_le (n : ℕ) : normBall B χ v f ^ n ≤ normBall (n • B) (χ ^ n) v (f ^ n) := by simp only [normBall] induction n with | zero => simp only [thetaNorm_pow] have h_unit : (1 : ℂ) ∈ v.leSubmodule 1 := v.map_one.le simpa [thetaShift_apply_apply, h_unit] using thetaSpace.pow (zero_mem (B.thetaSpace χ)) 0 | succ n ih => refine (mul_le_mul_left ih _).trans ?_ rw [Submodule.mul_le, thetaNorm_pow, thetaNorm_pow] -- A product of theta functions is again a theta function, and the sizes multiply pointwise. intro x hx y hy rw [Submodule.mem_inf, Submodule.restrictScalars_mem, Submodule.mem_iInf] at hx hy ⊢ refine ⟨?_, fun i ↦ ?_⟩ · rw [add_smul, one_smul, pow_add, pow_one] exact thetaSpace.mul hx.1 hy.1 · change ((n + 1) • B).sizeAt v (x * y) i ≤ B.thetaNorm v f ^ (n + 1) rw [add_smul, one_smul, pow_add, pow_one, sizeAt_mul, Pi.mul_apply] exact mul_le_mul' (hx.2 i) (hy.2 i) variable (G : HasGoodReduction B χ v r) include G in /-- A function lies in the ball of `g` if and only if it is a theta function for (L, B, χ) whose theta norm is at most that of `g`. -/ lemma mem_normBall : f ∈ normBall B χ v g ↔ f ∈ B.thetaSpace χ ∧ B.thetaNorm v f ≤ B.thetaNorm v g := by -- for a theta function `f` the sizes are bounded above, so `‖f‖ ≤ ‖g‖` says that each size of -- `f` is at most `‖g‖` rw [normBall, Submodule.mem_inf, Submodule.restrictScalars_mem] refine and_congr_right fun hf_mem ↦ ?_ rw [ciSup_le_iff (bddAbove_of_mem_sizes ⟨G.toIsAmpleType, hf_mem⟩), Submodule.mem_iInf] -- membership in the preimage of `v.leSubmodule` is, by definition, the bound on the size at `x` exact forall_congr' fun x ↦ Iff.rfl include G in /-- For `u` in the dual lattice, the ball of `g` is stable under the translation `New.RealComplexForm.thetaShift B u`. -/ lemma thetaShift_mem_normBall (hu : u ∈ B.dualLattice) (hf : f ∈ normBall B χ v g) : B.thetaShift u f ∈ normBall B χ v g := by obtain ⟨hf_theta, hf_le⟩ := G.mem_normBall.mp hf exact G.mem_normBall.mpr ⟨G.thetaShift_mem_of_mem_dualLattice hu hf_theta, (G.thetaNorm_thetaShift hu).trans_le hf_le⟩ include G /-! ### Consequences of good reduction -/ omit [IsFullRankLattice L] in /-- Good reduction passes from (B, χ) to (r ^ j • B, χ ^ r ^ j), with the same `v` and `r`. -/ lemma pow (j : ℕ) : HasGoodReduction (r ^ j • B) (χ ^ r ^ j) v r := by have h_amp : IsAmpleType (r ^ j • B) (χ ^ r ^ j) := G.nsmul (pow_ne_zero j G.one_lt.ne_bot) -- If N kills the dual for B modulo L, then N * r ^ j kills the dual for r ^ j • B, and it has -- valuation 1 because v r = 1. obtain ⟨N, hN_val, hN_kills⟩ := G.dual_torsion have h_tor : ∀ a ∈ (r ^ j • B).dualLattice, (N * r ^ j) • a ∈ L := fun a ha ↦ by simpa [mul_smul] using hN_kills _ (mem_dualLattice_nsmul.mp ha) exact { h_amp, G with dual_torsion := ⟨N * r ^ j, by simp [hN_val, G.val_eq_one], h_tor⟩ } variable (hf : f ∈ B.thetaSpace χ) (hf_ne : f ≠ 0) {L₀ : Submodule ℤ V} {ζ : V → ℂ} /-! ### Modules containing the translates of f; normal generation -/ include G hf include hf_ne in /-- Assume good reduction (`G`), let f ≠ 0 be a theta function for (L, B, χ) (`hf`, `hf_ne`) and for an Appell–Humbert datum (L₀, B, ζ) (`hAH`, `hf_L₀`) with L ≤ L₀ (`h_le`), let g be a theta function for (L₀, B, ζ), and let the module M over the valuation ring of the valuation v on ℂ contain the translates `New.RealComplexForm.thetaShift B u f` of f by the dual lattice of L₀. Then g = c • x with x in M and ‖g‖ = v(c)‖f‖, where ‖·‖ is the sup norm `New.ThetaTori.LatticeForm.thetaNorm`. -/ lemma exists_smul_thetaNorm_eq (h_le : L ≤ L₀) [IsFullRankLattice L₀] (hAH : IsAppellHumbert (L := L₀) B ζ) (hf_L₀ : f ∈ B.thetaSpace (L := L₀) ζ) (hg_L₀ : g ∈ B.thetaSpace (L := L₀) ζ) (h_shift : ∀ u ∈ B.dualLattice (L := L₀), B.thetaShift u f ∈ M) : ∃ c : ℂ, ∃ x ∈ M, g = c • x ∧ B.thetaNorm v g = v c * B.thetaNorm v f := by -- By `IsAppellHumbert.exists_proportional_orbit_lattice` a nonzero multiple γ • g lies in the -- same shift-stable lattices as f. For balls this gives ‖γ • g‖ = ‖f‖; for the functions all of -- whose shifts lie in M, γ • g ∈ M. have h_posRiemann : IsPosRiemann B := G.isPosRiemann by_cases g0 : g = 0 · exact ⟨0, 0, zero_mem M, by simp [g0], by simp [g0]⟩ have h_dual : B.dualLattice (L := L₀) ≤ B.dualLattice := fun u hu l hl ↦ hu l (h_le hl) -- The number n that kills the dual of L modulo L is a unit of the valuation ring, and it also -- kills the dual of L₀ modulo L₀. obtain ⟨n, hn_val, hn_kills⟩ := G.dual_torsion have hn_unit : IsUnit (n : v.valuationSubring) := (valuationSubring.integers v).isUnit_of_one' hn_val obtain ⟨γ, γ0, h_scale⟩ := hAH.exists_proportional_orbit_lattice ![⟨g, hg_L₀⟩] ![⟨f, hf_L₀⟩] 0 0 1 hn_unit (fun u hu ↦ h_le (hn_kills u (h_dual hu))) (by simpa using g0) (by simpa using hf_ne) (by simp) replace h_scale (N : Submodule v.valuationSubring (V → ℂ)) (hN : ∀ u ∈ B.dualLattice (L := L₀), ∀ x ∈ N, B.thetaShift u x ∈ N) : f ∈ N ↔ γ • g ∈ N := by simpa using h_scale N (by simpa using hN) -- Balls are stable under shifts, so f and γ • g lie in each other's ball. have h_ball (y : V → ℂ) : f ∈ normBall B χ v y ↔ γ • g ∈ normBall B χ v y := h_scale (normBall B χ v y) fun u hu x ↦ G.thetaShift_mem_normBall (h_dual hu) have h_norm : B.thetaNorm v f = v γ * B.thetaNorm v g := by obtain ⟨hγg_theta, hγg_le⟩ := G.mem_normBall.mp ((h_ball f).mp (G.mem_normBall.mpr ⟨hf, le_rfl⟩)) rw [← thetaNorm_smul] exact le_antisymm (G.mem_normBall.mp ((h_ball _).mpr (G.mem_normBall.mpr ⟨hγg_theta, le_rfl⟩))).right hγg_le -- The functions all of whose shifts lie in M form a shift-stable lattice: two shifts compose -- to one shift up to a factor of valuation 1, as dual vectors are torsion. set N : Submodule v.valuationSubring (V → ℂ) := ⨅ b ∈ B.dualLattice (L := L₀), M.comap ((B.thetaShift b).restrictScalars v.valuationSubring) have mem_N (x : V → ℂ) : x ∈ N ↔ ∀ b ∈ B.dualLattice (L := L₀), B.thetaShift b x ∈ M := by simp [N] have hN_stable : ∀ u ∈ B.dualLattice (L := L₀), ∀ x ∈ N, B.thetaShift u x ∈ N := by obtain ⟨m, m0, hm_kills⟩ := hAH.exists_nsmul_mem_of_mem_dualLattice intro u hu x hx refine (mem_N _).mpr fun b hb ↦ ?_ have h_val : v (Complex.exp (Real.pi * Complex.I * B.riemannForm b u)) = 1 := hAH.valuation_exp_riemannForm ⟨b, m, m0, hm_kills b hb⟩ ⟨u, m, m0, hm_kills u hu⟩ rw [hAH.thetaShift_thetaShift] exact M.smul_mem ⟨_, h_val.le⟩ ((mem_N x).mp hx (b + u) (add_mem hb hu)) have h_in_N : γ • g ∈ N := (h_scale N hN_stable).mp ((mem_N f).mpr h_shift) have h_in_M : γ • g ∈ M := by simpa using (mem_N (γ • g)).mp h_in_N 0 (zero_mem _) exact ⟨γ⁻¹, γ • g, h_in_M, by simp [γ0], by simp [h_norm, γ0]⟩ include G in /-- Assume good reduction (`G`), and let f be a theta function for (L, B, χ) (`hf`) and for an Appell–Humbert datum (L₀, B, ζ) (`hAH`, `hf_L₀`) with L ≤ L₀ (`h_le`). A module M over the valuation ring of v that contains the translates of f by the dual lattice of L₀ contains every theta function g for (L₀, B, ζ) that lies in the ball of f (`New.ThetaTori.HasGoodReduction.normBall`). -/ lemma mem_of_mem_normBall (h_le : L ≤ L₀) [IsFullRankLattice L₀] (hAH : IsAppellHumbert (L := L₀) B ζ) (hf_L₀ : f ∈ B.thetaSpace (L := L₀) ζ) (hg_L₀ : g ∈ B.thetaSpace (L := L₀) ζ) (h_shift : ∀ u ∈ B.dualLattice (L := L₀), B.thetaShift u f ∈ M) (hg : g ∈ normBall B χ v f) : g ∈ M := by obtain ⟨hg_theta, hg_le⟩ := G.mem_normBall.mp hg rcases eq_or_ne f 0 with hf_zero | hf_ne · -- The ball of radius 0 contains only 0, since a nonzero theta function has positive norm. obtain rfl : g = 0 := by by_contra g0 simp [hf_zero, (G.thetaNorm_pos hg_theta g0).ne'] at hg_le exact zero_mem M -- Otherwise g = c • x with x ∈ M and v c * ‖f‖ = ‖g‖ ≤ ‖f‖, so c is integral. obtain ⟨c, x, hx, rfl, h_norm⟩ := G.exists_smul_thetaNorm_eq hf hf_ne h_le hAH hf_L₀ hg_L₀ h_shift have hc : v c ≤ 1 := by simpa [h_norm, G.thetaNorm_pos hf hf_ne] using hg_le exact M.smul_mem ⟨c, hc⟩ hx omit [IsFullRankLattice L] G hf in /-- If `f` is a theta function for an Appell–Humbert datum `(L₀, B, ζ)` (`hAH`, `hf_L₀`), then for any `n : ℕ` and `b : V`, the product `f ^ n * B.thetaShift ((n + 1) • b) f` belongs to `((n + 1) • B).thetaSpace (L := L₀)` with multiplier `fun l ↦ (ζ ^ (n + 1)) l * ((n + 1) • B).riemannPhase l b`. -/ private lemma pow_mul_thetaShift_mem_thetaSpace_shifted (hAH : IsAppellHumbert (L := L₀) B ζ) (hf_L₀ : f ∈ B.thetaSpace (L := L₀) ζ) (n : ℕ) (b : V) : f ^ n * B.thetaShift ((n + 1) • b) f ∈ ((n + 1) • B).thetaSpace (L := L₀) fun l ↦ (ζ ^ (n + 1)) l * ((n + 1) • B).riemannPhase l b := by have h_mult : (fun l ↦ (ζ ^ (n + 1)) l * ((n + 1) • B).riemannPhase l b) = ζ ^ n * fun l ↦ ζ l * B.riemannPhase l ((n + 1) • b) := by ext l simp only [Pi.mul_apply, Pi.pow_apply, pow_succ, RealComplexForm.riemannPhase, riemannForm_nsmul_right, mul_assoc] rw [h_mult, succ_nsmul B n] exact thetaSpace.mul (thetaSpace.pow hf_L₀ n) (hAH.thetaShift_mem hf_L₀ ((n + 1) • b)) /-- Under good reduction `G` for `(B, χ)` at `v`, if `f` is a theta function for `(L, B, χ)` (`hf`), `n ≠ 0`, and `w` belongs to `B.dualLattice`, then the theta norm `((n + 1) • B).thetaNorm v (f ^ n * B.thetaShift w f)` equals `B.thetaNorm v f ^ (n + 1)`. -/ private lemma thetaNorm_pow_mul_thetaShift {n : ℕ} (hn : n ≠ 0) {w : V} (hw : w ∈ B.dualLattice) : ((n + 1) • B).thetaNorm v (f ^ n * B.thetaShift w f) = B.thetaNorm v f ^ (n + 1) := by rw [succ_nsmul, LatticeForm.thetaNorm, sizeAt_mul, G.hasMultiplicativeNorm ⟨G.nsmul hn, thetaSpace.pow hf n⟩ ⟨G.toIsAmpleType, G.thetaShift_mem_of_mem_dualLattice hw hf⟩, ← LatticeForm.thetaNorm, ← LatticeForm.thetaNorm, G.thetaNorm_thetaShift hw, thetaNorm_pow, pow_succ] /-- Under good reduction `G` for `(B, χ)` at `v` with level `r` and `G_nsmul` for `(r • B, χ ^ r)`, if `f` is a theta function for `(L, B, χ)` (`hf`) and for an Appell–Humbert datum `(L₀, B, ζ)` (`hAH`, `hf_L₀`) such that `r • u ∈ L` implies `u ∈ L₀` (`h_div`), then for every `b` in `(r • B).dualLattice`, the translate `(r • B).thetaShift b (f ^ r)` belongs to `normBall B χ v f ^ r`. -/ private lemma thetaShift_pow_mem_pow_normBall [IsFullRankLattice L₀] (hAH : IsAppellHumbert (L := L₀) B ζ) (hf_L₀ : f ∈ B.thetaSpace (L := L₀) ζ) (h_div : ∀ u : V, r • u ∈ L → u ∈ L₀) (G_nsmul : HasGoodReduction (r • B) (χ ^ r) v r) {b : V} (hb : b ∈ (r • B).dualLattice) : (r • B).thetaShift b (f ^ r) ∈ normBall B χ v f ^ r := by -- Write `r = n + 1` and apply `mem_of_mem_normBall` over `L₀` to -- `t = f ^ n * B.thetaShift ((n + 1) • b) f`. obtain ⟨n, rfl⟩ : ∃ n : ℕ, r = n + 1 := le_iff_exists_add'.mp G.one_lt.le have hAH_pow : IsAppellHumbert (L := L₀) ((n + 1) • B) (ζ ^ (n + 1)) := hAH.nsmul (n + 1) have hf_mem : f ∈ normBall B χ v f := G.mem_normBall.mpr ⟨hf, le_rfl⟩ have hb' : (n + 1) • b ∈ B.dualLattice := mem_dualLattice_nsmul.mp hb have h_shift_mem : B.thetaShift ((n + 1) • b) f ∈ normBall B χ v f := G.thetaShift_mem_normBall hb' hf_mem set t : V → ℂ := f ^ n * B.thetaShift ((n + 1) • b) f with ht have ht_L : t ∈ ((n + 1) • B).thetaSpace (χ ^ (n + 1)) := by rw [succ_nsmul, pow_succ] exact thetaSpace.mul (thetaSpace.pow hf n) (G.mem_normBall.mp h_shift_mem).left -- For `L₀`, the product `t` has the multiplier of the shift of `f ^ (n + 1)` by `b`. have ht_L₀ := pow_mul_thetaShift_mem_thetaSpace_shifted hAH hf_L₀ n b have h_le : L ≤ L₀ := fun l hl ↦ h_div l (nsmul_mem hl (n + 1)) -- The dual of `L₀` for `(n + 1) • B` lies in the dual of `L` for `B` (`dualLattice_nsmul_le`), -- and a shift of `t` is a product of `n + 1` shifts of elements of the ball. have h_shift_t : ∀ u ∈ ((n + 1) • B).dualLattice (L := L₀), ((n + 1) • B).thetaShift u t ∈ normBall B χ v f ^ (n + 1) := by intro u hu have hu' : u ∈ B.dualLattice := dualLattice_nsmul_le n.succ_ne_zero h_div hu rw [show ((n + 1) • B).thetaShift u t = B.thetaShift u f ^ n * B.thetaShift u (B.thetaShift ((n + 1) • b) f) by simp [ht, add_smul]] exact mul_mem_mul (pow_mem_pow _ (G.thetaShift_mem_normBall hu' hf_mem) n) (G.thetaShift_mem_normBall hu' h_shift_mem) -- Good reduction: the norm is multiplicative, so both sides equal `B.thetaNorm v f ^ (n + 1)`. have h_norm_le : ((n + 1) • B).thetaNorm v (((n + 1) • B).thetaShift b (f ^ (n + 1))) ≤ ((n + 1) • B).thetaNorm v t := by rw [G_nsmul.thetaNorm_thetaShift hb, thetaNorm_pow, ht, G.thetaNorm_pow_mul_thetaShift hf (by simpa using G.one_lt.ne') hb'] -- `t` is a theta function for both lattices and the shift of `f ^ (n + 1)` by `b` lies in its -- ball, so `mem_of_mem_normBall` for `L₀` puts that shift into the power of the ball of `f`. exact G_nsmul.mem_of_mem_normBall ht_L h_le (hAH_pow.mul_riemannPhase b) ht_L₀ (hAH_pow.thetaShift_mem (thetaSpace.pow hf_L₀ _) b) h_shift_t (G_nsmul.mem_normBall.mpr ⟨G_nsmul.thetaShift_mem_of_mem_dualLattice hb (thetaSpace.pow hf _), h_norm_le⟩) include G in /-- Assume good reduction `G` for `(B, χ)` at `v` with level `r`: the ample-type conditions, `v(N) = 1` for some `N` mapping the dual lattice of `L` into `L`, `r > 1` with `v(r) = 1`, and a multiplicative sup norm. Let `f` be a theta function for `(L, B, χ)` (`hf`) and also for an Appell–Humbert datum `(L₀, B, ζ)` (`hAH`, `hf_L₀`) with `L₀` containing `r⁻¹L` (`h_div`), and let `G_nsmul` be good reduction for `(r • B, χ ^ r)`. Here `normBall f` is the module, over the valuation ring of `v`, of theta functions `g` whose shifted values at every torsion point have valuation at most `‖f‖`. Then the `r`-th power of this module for `f` equals the corresponding module for `f ^ r` in degree `r • B`. -/ lemma normBall_pow [IsFullRankLattice L₀] (hAH : IsAppellHumbert (L := L₀) B ζ) (hf_L₀ : f ∈ B.thetaSpace (L := L₀) ζ) (h_div : ∀ u : V, r • u ∈ L → u ∈ L₀) (G_nsmul : HasGoodReduction (r • B) (χ ^ r) v r) : normBall B χ v f ^ r = normBall (r • B) (χ ^ r) v (f ^ r) := by refine le_antisymm (pow_normBall_le r) fun x hx ↦ ?_ -- For the reverse inclusion, `mem_of_mem_normBall` for `L₀ = L` reduces the claim to shifts of -- `f ^ r` by vectors in the dual lattice for `r • B` (`thetaShift_pow_mem_pow_normBall`). have hf_pow : f ^ r ∈ (r • B).thetaSpace (χ ^ r) := thetaSpace.pow hf r exact G_nsmul.mem_of_mem_normBall hf_pow le_rfl G_nsmul.isAppellHumbert hf_pow (G_nsmul.mem_normBall.mp hx).left (fun _ hb ↦ G.thetaShift_pow_mem_pow_normBall hf hAH hf_L₀ h_div G_nsmul hb) hx include G in /-- Integral normal generation: assume good reduction (`G`), and let f be a theta function for (L, B, χ) (`hf`) and also for an Appell–Humbert datum (L₀, B, ζ) (`hAH`, `hf_L₀`) on a lattice L₀ containing r⁻¹L (`h_div`). Then the r^j-th power of the ball of radius ‖f‖ is the ball of radius ‖f^(r^j)‖ in degree r^j B, for the good reduction `New.ThetaTori.HasGoodReduction.pow` of (r ^ j • B, χ ^ r ^ j); here r > 1, with v(r) = 1, is the level of `G`. -/ lemma normBall_pow_pow [IsFullRankLattice L₀] (hAH : IsAppellHumbert (L := L₀) B ζ) (hf_L₀ : f ∈ B.thetaSpace (L := L₀) ζ) (h_div : ∀ u : V, r • u ∈ L → u ∈ L₀) (j : ℕ) : normBall B χ v f ^ r ^ j = normBall (r ^ j • B) (χ ^ r ^ j) v (f ^ r ^ j) := by induction j with | zero => simp | succ j ih => have h_pow : normBall B χ v f ^ r ^ (j + 1) = normBall (r ^ j • B) (χ ^ r ^ j) v (f ^ r ^ j) ^ r := by rw [pow_succ, pow_mul, ih] -- Apply `normBall_pow` to f ^ r ^ j in degree r ^ j • B. The forms r • r ^ j • B and r ^ -- (j + 1) • B agree; the corresponding characters and theta functions also agree. rw [h_pow] have hB_eq : r • (r ^ j • B) = r ^ (j + 1) • B := by rw [← mul_nsmul, ← pow_succ] have hχ_eq : (χ ^ r ^ j) ^ r = χ ^ r ^ (j + 1) := by rw [← pow_mul, ← pow_succ] have hf_eq : (f ^ r ^ j) ^ r = f ^ r ^ (j + 1) := by rw [← pow_mul, ← pow_succ] have G' : HasGoodReduction (r • (r ^ j • B)) ((χ ^ r ^ j) ^ r) v r := hB_eq ▸ hχ_eq ▸ G.pow (j + 1) have h_step := (G.pow j).normBall_pow (thetaSpace.pow hf (r ^ j)) (hAH.nsmul (r ^ j)) (thetaSpace.pow hf_L₀ (r ^ j)) h_div G' have h_congr : ∀ {B₁ B₂ : LatticeForm L} {χ₁ χ₂ : V → ℂ} {g₁ g₂ : V → ℂ}, B₁ = B₂ → χ₁ = χ₂ → g₁ = g₂ → normBall B₁ χ₁ v g₁ = normBall B₂ χ₂ v g₂ := by rintro _ _ _ _ _ _ rfl rfl rfl rfl exact h_step.trans (h_congr hB_eq hχ_eq hf_eq) /-! ### Reduction of a ball -/ variable {W : Type} [AddCommGroup W] [Module v.valuationSubring W] {ballMap : W →ₗ[v.valuationSubring] V → ℂ} include hf_ne /-- Assume good reduction (`G`) for the valuation v on ℂ, with ‖·‖ the theta norm `New.ThetaTori.LatticeForm.thetaNorm`, and let f ≠ 0 be a theta function for (L, B, χ) (`hf`, `hf_ne`). Every theta function g for (L, B, χ) is c • y for some c in ℂ and y in the ball of f, with ‖g‖ = v(c)‖f‖. -/ lemma exists_eq_smul_normBall (hg : g ∈ B.thetaSpace χ) : ∃ c : ℂ, ∃ y ∈ normBall B χ v f, g = c • y ∧ B.thetaNorm v g = v c * B.thetaNorm v f := by -- `exists_smul_thetaNorm_eq` for L₀ = L and M the ball of f, which contains the shifts of f. exact G.exists_smul_thetaNorm_eq hf hf_ne le_rfl G.isAppellHumbert hf hg fun u hu ↦ G.thetaShift_mem_normBall hu (G.mem_normBall.mpr ⟨hf, le_rfl⟩) attribute [local instance] Ideal.Quotient.field in omit G hf hf_ne in /-- A reduction map whose kernel is contained in the maximal ideal times the module has image dimension equal to the minimal number of generators. -/ private lemma finrank_range_eq_spanFinrank {R k M Q : Type*} [CommRing R] [IsLocalRing R] [Field k] [AddCommGroup M] [Module R M] [AddCommGroup Q] [Module k Q] {P : Submodule R M} (hP : P.FG) {σ : R →+* k} [RingHomSurjective σ] (f : P →ₛₗ[σ] Q) (hker : f.ker ≤ maximalIdeal R • (⊤ : Submodule R P)) : finrank k f.range = P.spanFinrank := by let I := maximalIdeal R • (⊤ : Submodule R P) have hI : I ≤ f.ker := by refine Submodule.smul_le.mpr fun a ha x _ ↦ ?_ change f (a • x) = 0 rw [map_smulₛₗ, show σ a = 0 from (ker_eq_maximalIdeal σ σ.surjective).ge ha, zero_smul] -- The map out of the residue quotient is injective and has the same image as f. have hinj := LinearMap.ker_eq_bot.mp (I.ker_liftQ_eq_bot f hI hker) calc finrank k f.range = (⊤ : Submodule R (P ⧸ I)).spanFinrank := by simpa only [Module.finrank_eq_spanFinrank_of_free, Submodule.spanFinrank_top, Submodule.map_top, I.range_liftQ] using (Submodule.spanFinrank_map_eq_of_injective (I.liftQ f hI) hinj (p := ⊤)) _ = finrank (R ⧸ maximalIdeal R) (P ⧸ I) := by rw [Module.finrank_eq_spanFinrank_of_free] exact congrArg Cardinal.toNat (Submodule.spanRank_restrictScalars_eq (R := R) (Ideal.Quotient.mk_surjective (I := maximalIdeal R)) (⊤ : Submodule (R ⧸ maximalIdeal R) (P ⧸ I))) _ = P.spanFinrank := (spanFinrank_eq_finrank_quotient P hP).symm /-- Under good reduction (`G`) for the valuation `v` on `ℂ` and the full lattice `L` with form `B` and multiplier `χ`, let `f ≠ 0` be a theta function for `(L, B, χ)` (`hf`, `hf_ne`), `ballMap` a linear map from a finite `v.valuationSubring`-module `W` onto `normBall B χ v f` (`h_range`), `φ : v.valuationSubring →+* k` a surjective ring map onto a field `k`, and `reduction : W →ₛₗ[φ] Q` a `φ`-semilinear map into a `k`-vector space `Q` vanishing at `w` exactly when `B.thetaNorm v (ballMap w) < B.thetaNorm v f` (`h_zero`). Then `finrank k reduction.range` equals `ballMap.range.spanFinrank`. -/ private lemma finrank_range_reduction_eq_spanFinrank (h_range : ballMap.range = normBall B χ v f) {k Q : Type*} [Field k] [AddCommGroup Q] [Module k Q] [Module.Finite v.valuationSubring W] {φ : v.valuationSubring →+* k} [RingHomSurjective φ] {reduction : W →ₛₗ[φ] Q} (h_zero : ∀ w : W, reduction w = 0 ↔ B.thetaNorm v (ballMap w) < B.thetaNorm v f) : finrank k reduction.range = ballMap.range.spanFinrank := by -- Descend the reduction map to the ball. have h_ker : ballMap.ker ≤ reduction.ker := fun w hw ↦ by simp [h_zero, LinearMap.mem_ker.mp hw, G.thetaNorm_pos hf hf_ne] let e := ballMap.quotKerEquivRange.symm let redBall := (ballMap.ker.liftQ reduction h_ker).comp e.toLinearMap have h_image : redBall.range = reduction.range := by rw [LinearMap.range_comp_of_range_eq_top _ e.range, ballMap.ker.range_liftQ] -- A function with zero reduction is a small scalar times a function in the ball. have h_small : redBall.ker ≤ maximalIdeal v.valuationSubring • (⊤ : Submodule v.valuationSubring ballMap.range) := by rintro ⟨_, w, rfl⟩ ht change ballMap.ker.liftQ reduction h_ker (e ⟨ballMap w, w, rfl⟩) = 0 at ht rw [show e ⟨ballMap w, w, rfl⟩ = ballMap.ker.mkQ w from ballMap.quotKerEquivRange_symm_apply_image w ⟨w, rfl⟩] at ht have h_lt := (h_zero w).mp ht obtain ⟨a, z, hz, hw, h_norm⟩ := G.exists_eq_smul_normBall hf hf_ne (G.mem_normBall.mp (h_range.le ⟨w, rfl⟩)).left have ha : v a < 1 := by simpa [h_norm, G.thetaNorm_pos hf hf_ne] using h_lt have h_factor : (⟨ballMap w, w, rfl⟩ : ballMap.range) = (⟨a, ha.le⟩ : v.valuationSubring) • ⟨z, h_range.ge hz⟩ := Subtype.ext hw rw [h_factor] exact Submodule.smul_mem_smul (v.mem_maximalIdeal_iff.mpr ha) trivial rw [← h_image] exact finrank_range_eq_spanFinrank (Module.Finite.iff_fg.mp inferInstance) redBall h_small omit G hf hf_ne in /-- The reduction of a ball has the dimension of the space of theta functions. Let `L` be a full lattice in the complex vector space `V`, `B` a form for `L`, `χ : V → ℂ` a multiplier, and `v` a valuation on `ℂ` with valuation ring `O`. Write `‖g‖ = B.thetaNorm v g` for the supremum of `v (B.thetaShift x g 0)` over the torsion points `x` of `V/L`. Assume good reduction (`G`): `(L, B, χ)` is of ample type, the norm is multiplicative, some natural number `N` with `v N = 1` maps the dual lattice into `L`, and `r > 1` has `v r = 1`. Let `f ≠ 0` be a theta function for `(L, B, χ)`, and let `ballMap` be an `O`-linear map from a finite `O`-module `W` onto the ball `normBall B χ v f` of the theta functions `g` with `‖g‖ ≤ ‖f‖`. Let `φ` be a ring map from `O` onto a field `k`, and `reduction` a `φ`-semilinear map from `W` to a `k`-vector space `Q` that vanishes at `w` exactly when `‖ballMap w‖ < ‖f‖`. Then the `k`-span of the image of `reduction` has the dimension over `k` that the space `B.thetaSpace χ` of theta functions has over `ℂ`. -/ lemma finrank_reduction_eq (G : HasGoodReduction B χ v r) (hf : f ∈ B.thetaSpace χ) (hf_ne : f ≠ 0) {W : Type} [AddCommGroup W] [Module v.valuationSubring W] {ballMap : W →ₗ[v.valuationSubring] V → ℂ} (h_range : ballMap.range = normBall B χ v f) {k Q : Type*} [Field k] [AddCommGroup Q] [Module k Q] [Module.Finite v.valuationSubring W] {φ : v.valuationSubring →+* k} (hφ : Function.Surjective φ) {reduction : W →ₛₗ[φ] Q} (h_zero : ∀ w : W, reduction w = 0 ↔ B.thetaNorm v (ballMap w) < B.thetaNorm v f) : finrank k (span k (range reduction)) = finrank ℂ (B.thetaSpace χ) := by -- The ball is finite and torsion free over the valuation ring, hence free. have h_flat : Flat v.valuationSubring ballMap.range := by refine Flat.flat_iff_torsion_eq_bot_of_isBezout.mpr (eq_bot_iff.mpr fun x hx ↦ ?_) obtain ⟨a, ha⟩ := hx refine (Submodule.mem_bot _).mpr (Subtype.ext (funext fun z ↦ ?_)) have ha0 : (a : ℂ) ≠ 0 := fun h ↦ nonZeroDivisors.ne_zero a.property (Subtype.ext h) have h_val : (a : ℂ) * x.val z = 0 := congrFun (congrArg Subtype.val ha) z exact (mul_eq_zero.mp h_val).resolve_left ha0 have h_free : Free v.valuationSubring ballMap.range := free_of_flat_of_isLocalRing have h_surj : RingHomSurjective φ := ⟨hφ⟩ have h_flat_ℂ : Flat v.valuationSubring ℂ := IsLocalization.flat ℂ (nonZeroDivisors v.valuationSubring) have h_span : span ℂ (ballMap.range : Set (V → ℂ)) = B.thetaSpace χ := by refine span_eq_of_le _ (fun z hz ↦ (G.mem_normBall.mp (h_range.le hz)).left) fun g hg ↦ ?_ -- Every theta function is a multiple of an element of the ball. obtain ⟨c, z, hz, rfl, -⟩ := G.exists_eq_smul_normBall hf hf_ne hg exact smul_mem _ c (subset_span (h_range.ge hz)) -- Both sides are the rank of the ball; on the right, `ℂ` is flat over the valuation ring. calc finrank k (span k (range reduction)) = finrank v.valuationSubring ballMap.range := by rw [← reduction.coe_range, span_eq, G.finrank_range_reduction_eq_spanFinrank hf hf_ne h_range h_zero, Module.finrank_eq_spanFinrank_of_free, Submodule.spanFinrank_top] _ = finrank ℂ (span ℂ (ballMap.range : Set (V → ℂ))) := by simp _ = finrank ℂ (B.thetaSpace χ) := by rw [h_span] omit hf hf_ne in include G in /-- Under good reduction (`G`), if `ballMap` maps `W` onto `normBall B χ v f`, every point of `B.dualLattice` is congruent modulo `L` to some `pt d`, each `scaled d w = ballMap w (pt d) / s d` has a unit coordinate `scaled d (c d)` and is a non-unit at `w₀`, and `pt b ∈ L` has integral scaled values on `normBall B χ v f`, then for every `u ∈ B.dualLattice` the shifted value `B.thetaShift u (ballMap w₀) (pt b) / s b` has valuation `< 1`. -/ private lemma val_thetaShift_div_lt_one_of_scaled_lt_one (h_range : ballMap.range = normBall B χ v f) {I : Sort*} {pt : I → V} (hpt_cover : ∀ u' : B.dualLattice, ∃ d : I, pt d - u' ∈ L) {scaled : I → W → v.valuationSubring} {s : I → ℂ} (hp_eq : ∀ (d : I) (w : W), (scaled d w : ℂ) = ballMap w (pt d) / s d) {c : I → W} (hc : ∀ d : I, v (scaled d (c d)) = 1) {w₀ : W} (h_small : ∀ d : I, v (scaled d w₀) < 1) {b : I} (hb : pt b ∈ L) (h_int_b : ∀ y : V → ℂ, y ∈ normBall B χ v f → v (y (pt b) / s b) ≤ 1) (hu : u ∈ B.dualLattice) : v (B.thetaShift u (ballMap w₀) (pt b) / s b) < 1 := by -- `pt b + u` is congruent to some `pt d`, and by quasi-periodicity the values there differ by a -- factor common to all `ballMap i`. obtain ⟨d, hd : pt d - (pt b + u) ∈ L⟩ := hpt_cover ⟨pt b + u, add_mem (G.le_dualLattice hb) hu⟩ set l : V := pt d - (pt b + u) with hl have h_quasi (i : W) : ballMap i (pt d) = χ l * Complex.exp (B l (pt b + u) + B l l / 2) * ballMap i (pt b + u) := by simpa only [hl, add_sub_cancel] using (G.mem_normBall.mp (h_range.le ⟨i, rfl⟩)).left.2 l hd (pt b + u) have h_shift_val (i : W) : B.thetaShift u (ballMap i) (pt b) = Complex.exp (-(B u (pt b) + B u u / 2)) * ballMap i (pt b + u) := by simp [thetaShift] -- So the shifted values at `pt b` are proportional to `scaled d`, whose coordinate `c d` is a -- unit. have h_cross : scaled d (c d) * (B.thetaShift u (ballMap w₀) (pt b) / s b) = scaled d w₀ * (B.thetaShift u (ballMap (c d)) (pt b) / s b) := by simp only [hp_eq, h_quasi, h_shift_val] ring calc _ = v (scaled d w₀) * v (B.thetaShift u (ballMap (c d)) (pt b) / s b) := by rw [← map_mul, ← h_cross, map_mul, hc, one_mul] _ < 1 := mul_lt_one_of_lt_of_le (h_small d) (h_int_b _ (G.thetaShift_mem_normBall hu (h_range.le ⟨c d, rfl⟩))) include G in /-- Values at points meeting every class of the dual lattice modulo L detect the reduction. Here L is a full lattice in the complex vector space V, B a form for it, χ and f functions V → ℂ, and v a valuation on ℂ. Under good reduction (`G`), let f ≠ 0 be a theta function (`hf`, `hf_ne`), `ballMap` a linear map of W onto the ball of f (`h_range`), every point of the dual lattice congruent modulo L to some `pt b` (`hpt_cover`), and `scaled b` a primitive integral scaling of (ballMap w (pt b))_w with a unit coordinate (`h_scaled`). Then ‖ballMap w₀‖ < ‖f‖ if and only if `scaled b w₀` is a non-unit for all b. -/ lemma thetaNorm_lt_iff_coords (h_range : ballMap.range = normBall B χ v f) {I : Sort*} {pt : I → V} (hpt_cover : ∀ u : B.dualLattice, ∃ b : I, pt b - u ∈ L) {scaled : I → W → v.valuationSubring} (h_scaled : ∀ b : I, IsIntegralCoords (fun w : W ↦ ballMap w (pt b)) (scaled b)) (w₀ : W) : B.thetaNorm v (ballMap w₀) < B.thetaNorm v f ↔ ∀ b : I, v (scaled b w₀) < 1 := by -- Every y in the ball has integral scaled values y (pt b) / s b. If ‖ballMap w₀‖ < ‖f‖, then -- ballMap w₀ is a non-unit times such a y. Conversely, if all scaled b w₀ are non-units but -- ‖f‖ ≤ ‖ballMap w₀‖, then by `mem_of_mem_normBall` the whole ball has non-unit scaled values at -- pt b, although scaled b has a unit coordinate. have h_coords : ∀ b : I, ∃ s : ℂ, (∀ w : W, (scaled b w : ℂ) = ballMap w (pt b) / s) ∧ ∃ c : W, v (scaled b c) = 1 := by simpa only [IsIntegralCoords] using h_scaled choose s hp_eq c hc using h_coords have h_ball_mem (i : W) : ballMap i ∈ normBall B χ v f := h_range.le ⟨i, rfl⟩ have hw₀_theta : ballMap w₀ ∈ B.thetaSpace χ := (G.mem_normBall.mp (h_ball_mem w₀)).left have h_int (b : I) (y : V → ℂ) (hy : y ∈ normBall B χ v f) : v (y (pt b) / s b) ≤ 1 := by obtain ⟨i, rfl⟩ := h_range.ge hy simpa [← hp_eq, v.mem_valuationSubring_iff] using (scaled b i).prop constructor · intro h_lt b obtain ⟨γ, y, hy, h_eq, hγ⟩ := G.exists_eq_smul_normBall hf hf_ne hw₀_theta have hγ_lt : v γ < 1 := by simpa [hγ, G.thetaNorm_pos hf hf_ne] using h_lt have hp_mul : (scaled b w₀ : ℂ) = γ * (y (pt b) / s b) := by simp [hp_eq, h_eq, mul_div_assoc] rw [hp_mul, map_mul] exact mul_lt_one_of_lt_of_le hγ_lt (h_int b y hy) intro h_small by_contra h_norm -- Take a point pt b in L; N consists of the functions whose scaled value there is a non-unit. obtain ⟨b, hb⟩ : ∃ b : I, pt b ∈ L := by simpa using hpt_cover 0 set N : Submodule v.valuationSubring (V → ℂ) := comap (.smulRight (.proj (pt b)) (s b)⁻¹) (v.ltSubmodule 1) -- By the definitions of `comap` and `ltSubmodule`. have mem_N (y : V → ℂ) : y ∈ N ↔ v (y (pt b) / s b) < 1 := .rfl have h_shift_mem (u' : V) (hu' : u' ∈ B.dualLattice) : B.thetaShift u' (ballMap w₀) ∈ N := (mem_N _).mpr <| G.val_thetaShift_div_lt_one_of_scaled_lt_one h_range hpt_cover hp_eq hc h_small hb (h_int b) hu' obtain ⟨hc_theta, hc_le⟩ := G.mem_normBall.mp (h_ball_mem (c b)) have h_ball : ballMap (c b) ∈ normBall B χ v (ballMap w₀) := G.mem_normBall.mpr ⟨hc_theta, hc_le.trans (not_lt.mp h_norm)⟩ have h_mem : ballMap (c b) ∈ N := G.mem_of_mem_normBall hw₀_theta le_rfl G.isAppellHumbert hw₀_theta hc_theta h_shift_mem h_ball have h_unit : v (ballMap (c b) (pt b) / s b) = 1 := by rw [← hp_eq, hc] exact ((mem_N (ballMap (c b))).mp h_mem).ne h_unit end HasGoodReduction end New.ThetaTori