module import Mathlib.Algebra.Order.Star.Real import TauCeti.RingTheory.DedekindDomain.FiniteAdeleRing.FiniteIndexIdeal import TauCeti.LinearAlgebra.Matrix.Range import TauCeti.NumberTheory.NumberField.Global.Adeles.Lattice import TauCeti.LinearAlgebra.Submodule.Prod.Index public import TauCeti.LinearAlgebra.Submodule.Zeta import TauCeti.NumberTheory.NumberField.CMField.AdelicLattice import TauCeti.RingTheory.Ideal.Norm.AbsNorm public import Lib.SiegelWeil.Mass public import New.Spanning.RemainingTerms.SiegelLemma import Lib.Adelic.Adeles.LocalFactors import Lib.Adelic.Unitary.CongruenceLevels import Lib.Adelic.Witt.WittTheorem import Lib.General.NumberTheory.LatticeCovolumes /-! # Discriminants of lattices and sums over sublattices Lattices of rational subspaces of a space with the standard hermitian form, written over `Ô`; their discriminants; and a bound for the sum of a negative power of the index over all sublattices of finite index. The bound for the sum over sublattices is a consequence of Hey's formula for the zeta function of a lattice. Here we use Tau Ceti's bound, proved by induction on the rank over any ring whose left ideals of finite index are principal. The formula that compares the discriminant of `L ∩ W` with that of the dual lattice in `W^⊥` is `New.Filling.jacobi_perp_discriminant`, stated for Gram determinants. -/ @[expose] public section noncomputable section namespace New.Filling open NumberField Matrix Module ENNReal section SubmoduleZeta variable {R N N' : Type*} [CommRing R] [AddCommGroup N] [Module R N] [AddCommGroup N'] [Module R N'] /-- The sum of `[range f : M] ^ (-s)` over the submodules `M` of finite index in the range of a linear map `f` is at most the same sum over the submodules of finite index in its domain. -/ lemma tsum_relIndex_range_le_submoduleZeta (f : N →ₗ[R] N') (s : ℕ) : ∑' M : {M : Submodule R N' // M ≤ LinearMap.range f ∧ M.toAddSubgroup.relIndex (LinearMap.range f).toAddSubgroup ≠ 0}, (M.val.toAddSubgroup.relIndex (LinearMap.range f).toAddSubgroup : ℝ≥0∞)⁻¹ ^ s ≤ submoduleZeta R N s := by let Q := LinearMap.range f -- Finite-index submodules contained in the range are exactly the finite-index submodules of Q. let e : {M : Submodule R N' // M ≤ Q ∧ M.toAddSubgroup.relIndex Q.toAddSubgroup ≠ 0} ≃ {L : Submodule R Q // L.cardQuot ≠ 0} := (Equiv.subtypeSubtypeEquivSubtypeInter (· ≤ Q) _).symm.trans (Q.mapIic.symm.toEquiv.subtypeEquiv fun _ ↦ Iff.rfl) calc _ = submoduleZeta R Q s := by rw [submoduleZeta_def] exact e.tsum_eq fun L ↦ (L.val.cardQuot : ℝ≥0∞)⁻¹ ^ s _ ≤ submoduleZeta R N s := submoduleZeta_le_of_surjective f.surjective_rangeRestrict s end SubmoduleZeta section Columns variable {A l m n : Type} [CommRing A] {R : Subring A} [Fintype m] [Fintype n] /-- The lattice of the columns of `B * C` is the image under `B` of that of the columns of `C`. -/ lemma colLattice_mul (B : Matrix l m A) (C : Matrix m n A) : colLattice R (B * C) = (colLattice R C).map (B.mulVecLin.restrictScalars R) := by rw [colLattice, colLattice, ← Submodule.map_comp, mulVecLin_mul, LinearMap.restrictScalars_comp] /-- If `U` has entries in `R`, then the lattice of the columns of `B * U` lies in that of the columns of `B`. -/ lemma colLattice_mul_le (B : Matrix l m A) {U : Matrix m n A} (hU : IsIntMatrix R U) : colLattice R (B * U) ≤ colLattice R B := by rw [colLattice_mul] exact Submodule.map_mono (colLattice_le fun j i ↦ hU i j) omit [Fintype m] in /-- Let `R` be a subring of a commutative ring `A`. The `R`-span `colLattice R B` of the columns of an `m × n` matrix `B` over `A` is the range of an `R`-linear map from `R ^ n` to `A ^ m`. -/ lemma exists_range_eq_colLattice (B : Matrix m n A) : ∃ f : (n → R) →ₗ[R] (m → A), LinearMap.range f = colLattice R B := by classical rw [colLattice_eq_span] exact ⟨Fintype.linearCombination R B.col, Fintype.range_linearCombination R B.col⟩ end Columns variable {E κ P : Type} [Field E] [NumberField E] [IsCMField E] [HasPrimitiveRoot5040 E] [Fintype κ] [Fintype P] {r : ℕ} /-- Let `𝔸f E` be the finite adeles of the number field `E` and `Ô E` the integral ones. An `Ô E`-submodule `L` of `(𝔸f E) ^ κ` is a lattice of rank `r` if it is spanned over `Ô E` by the columns of `x a`, where the `r` columns of `x` are independent vectors in `E ^ κ` and `a` is an invertible `r × r` matrix over `𝔸f E`. -/ def IsLatticeOfRank (r : ℕ) (L : Submodule (Ô E) (κ → 𝔸f E)) : Prop := ∃ (x : Matrix κ (Fin r) E) (a : GL (Fin r) (𝔸f E)), HasLeftInv x ∧ colLattice (Ô E) (finAdeleMatrix x * a.val) = L open scoped Classical in /-- The discriminant of a lattice `L` of rank `r`: the square root of `genIndex (det (Bᴴ * B))` for some chosen basis `B = x a`. Here `ᴴ` is the conjugate transpose and `genIndex u` is the inverse of the factor by which a unit `u` scales Haar measure on the finite adeles (`0` for a non-unit). The value is `0` if `L` is not a lattice of rank `r`. -/ def discriminant (r : ℕ) (L : Submodule (Ô E) (κ → 𝔸f E)) : ℝ := if h : IsLatticeOfRank r L then √(genIndex ((finAdeleMatrix h.choose * h.choose_spec.choose.val)ᴴ * (finAdeleMatrix h.choose * h.choose_spec.choose.val)).det) else 0 omit [IsCMField E] [HasPrimitiveRoot5040 E] in /-- If `x` has a left inverse over `E` and `a` is an invertible matrix over the finite adeles `𝔸f E`, then `finAdeleMatrix x * a` (with `x` read over `𝔸f E`) has a left inverse over `𝔸f E`. -/ lemma hasLeftInv_finAdeleMatrix_mul {x : Matrix κ (Fin r) E} (hx : HasLeftInv x) (a : GL (Fin r) (𝔸f E)) : HasLeftInv (finAdeleMatrix x * a.val) := by exact Matrix.exists_mul_map_mul_eq_one_of_linearIndependent_col (Matrix.mulVec_injective_iff.1 hx.injective_mulVec) a /-- Let `E` be a CM field with a primitive 5040th root of unity, `𝔸f E` its finite adeles and `Ô E` the integral ones. Let `B`, `C` be matrices over `𝔸f E` whose columns have the same `Ô E`-span, and let `B` have a left inverse. Then the Gram determinants `det (Bᴴ * B)` and `det (Cᴴ * C)`, with `ᴴ` the conjugate transpose, have the same generalised index: `genIndex a` is the inverse of the factor by which a unit `a` scales Haar measure, and `0` for a non-unit. -/ lemma genIndex_det_gram_eq_of_colLattice_eq {B C : Matrix κ (Fin r) (𝔸f E)} (hB : HasLeftInv B) (h_eq : colLattice (Ô E) B = colLattice (Ô E) C) : genIndex (Bᴴ * B).det = genIndex (Cᴴ * C).det := by -- The bases differ by an integral matrix with integral inverse. obtain ⟨U, hU_int, rfl⟩ : ∃ U : Matrix (Fin r) (Fin r) (𝔸f E), IsIntMatrix (Ô E) U ∧ B * U = C := exists_isIntMatrix_mul_eq h_eq.ge obtain ⟨V, hV_int, hV⟩ : ∃ V : Matrix (Fin r) (Fin r) (𝔸f E), IsIntMatrix (Ô E) V ∧ B * U * V = B := exists_isIntMatrix_mul_eq h_eq.le have hUV : U * V = 1 := Matrix.mul_left_cancel_of_mulVec_injective hB.injective_mulVec (by simpa only [← Matrix.mul_assoc, Matrix.mul_one] using hV) rw [gram_mul_standard] exact genIndex_det_conj_of_isIntMatrix hU_int hV_int (mul_eq_one_comm.1 hUV) hUV /-- Let `E` be a CM field with a primitive 5040th root of unity, `𝔸f E` its finite adeles and `Ô E` the integral ones. Let `x` be a matrix over `E` with a left inverse, `a` an invertible matrix over `𝔸f E`, and `B = finAdeleMatrix x * a`, with `x` read over `𝔸f E`. The discriminant of the `Ô E`-span of the columns of `B`, defined from a chosen basis of this form, can be computed from `B`: it is `√(genIndex (Bᴴ * B).det)`. -/ lemma discriminant_colLattice {x : Matrix κ (Fin r) E} (hx : HasLeftInv x) (a : GL (Fin r) (𝔸f E)) : discriminant r (colLattice (Ô E) (finAdeleMatrix x * a.val)) = √(genIndex ((finAdeleMatrix x * a.val)ᴴ * (finAdeleMatrix x * a.val)).det) := by have hL : IsLatticeOfRank r (colLattice (Ô E) (finAdeleMatrix x * a.val)) := ⟨x, a, hx, rfl⟩ rw [discriminant, dite_eq_left hL] -- The discriminant is defined by a chosen basis `y b`, which spans the same lattice as `x a`. set y : Matrix κ (Fin r) E := hL.choose set b : GL (Fin r) (𝔸f E) := hL.choose_spec.choose obtain ⟨-, h_chosen⟩ : HasLeftInv y ∧ colLattice (Ô E) (finAdeleMatrix y * b.val) = colLattice (Ô E) (finAdeleMatrix x * a.val) := hL.choose_spec.choose_spec rw [genIndex_det_gram_eq_of_colLattice_eq (hasLeftInv_finAdeleMatrix_mul hx a) h_chosen.symm] open ComplexOrder in /-- Let `E` be a CM field with a primitive 5040th root of unity, `𝔸f E` its finite adeles and `Ô E` the integral ones. Let `L` be a lattice of rank `r` in `(𝔸f E) ^ κ`: the `Ô E`-span of the columns of `x a`, where `x` has `r` independent columns over `E` and `a` is invertible over `𝔸f E`. Then the discriminant of `L`, the square root of the generalised index `genIndex` of the Gram determinant of such a basis, is positive. -/ lemma IsLatticeOfRank.discriminant_pos {L : Submodule (Ô E) (κ → 𝔸f E)} (hL : IsLatticeOfRank r L) : 0 < discriminant r L := by obtain ⟨x, a, hx, rfl⟩ := hL rw [discriminant_colLattice hx] exact Real.sqrt_pos.2 (genIndex_det_gram_finAdeleMatrix_mul_pos hx a) /-- For an adelic matrix `B` and an invertible adelic matrix `A`, passing from `B` to `B * A` multiplies the square root of the generalised index `genIndex` of the Gram determinant by the generalised index of `det A`. -/ lemma sqrt_genIndex_det_gram_mul (B : Matrix κ (Fin r) (𝔸f E)) (A : GL (Fin r) (𝔸f E)) : √(genIndex ((B * A.val)ᴴ * (B * A.val)).det) = √(genIndex (Bᴴ * B).det) * genIndex A.val.det := by rw [gram_mul_standard, genIndex_det_conj, Real.sqrt_mul' _ (sq_nonneg _), Real.sqrt_sq] exact (genIndex_pos A.det).le omit [IsCMField E] [HasPrimitiveRoot5040 E] in /-- The Haar index of a finite idele is the absolute norm of its fractional ideal. For an integral idele `x`, both indices count the elements of `Ô E / x Ô E`. -/ private lemma genIndex_eq_finiteAdeleGenIndex {a : 𝔸f E} (ha : IsUnit a) : genIndex a = (NumberField.FiniteAdeleRing.genIndex E a : ℝ) := by have integral (x : 𝔸f E) (hx : x ∈ Ô E) (hu : IsUnit x) : genIndex x = (NumberField.FiniteAdeleRing.genIndex E x : ℝ) := by rw [genIndex_eq_card isOpen_Ô isCompact_Ô hx hu] have h := NumberField.FiniteAdeleRing.genIndex_eq_cardQuot (g := ⟨x, hx⟩) hu exact_mod_cast h.symm -- Clear the denominators of `a` and cancel the index of the positive integer `m`. obtain ⟨m, hm, hma⟩ := NumberField.FiniteAdeleRing.exists_natCast_mul_mem_integralAdeles a have hmunit : IsUnit (m : 𝔸f E) := by simpa using (Nat.cast_ne_zero.2 hm : (m : E) ≠ 0).isUnit.map (algebraMap E (𝔸f E)) have h := integral _ hma (hmunit.mul ha) rw [map_mul, map_mul, Rat.cast_mul, ← integral m (by simp) hmunit] at h exact mul_left_cancel₀ (genIndex_pos hmunit.unit).ne' h omit [IsCMField E] [HasPrimitiveRoot5040 E] [Fintype κ] in /-- If `M` has finite index in the `Ô E`-span of the columns of an adelic matrix `B` over a number field `E`, then `M` is spanned by the columns of `B * A` for some invertible `A`, and its index is the generalised index of `det A`. -/ lemma exists_colLattice_mul_eq_of_le {B : Matrix κ (Fin r) (𝔸f E)} {M : Submodule (Ô E) (κ → 𝔸f E)} (h_le : M ≤ colLattice (Ô E) B) (h_index : submoduleIndex M (colLattice (Ô E) B) ≠ 0) : ∃ A : GL (Fin r) (𝔸f E), colLattice (Ô E) (B * A.val) = M ∧ (submoduleIndex M (colLattice (Ô E) B) : ℝ) = genIndex A.val.det := by classical rw [colLattice_eq_span] at h_le h_index obtain ⟨C, hC, hM, hdet⟩ := NumberField.FiniteAdeleRing.exists_span_col_mul_eq (B := B) h_le h_index refine ⟨((isUnit_iff_isUnit_det C).2 hC).unit, ?_, ?_⟩ · rw [colLattice_eq_span] exact hM · rw [IsUnit.unit_spec, genIndex_eq_finiteAdeleGenIndex hC, colLattice_eq_span] exact_mod_cast hdet.symm omit [IsCMField E] [HasPrimitiveRoot5040 E] in /-- A finite-index submodule of the integral vectors over a number field is the column lattice of a matrix invertible over the finite adeles. -/ lemma exists_colLattice_eq_of_submoduleIndex_ne_zero {n : Type} [Fintype n] [DecidableEq n] {M : Submodule (Ô E) (n → 𝔸f E)} (h_le : M ≤ intVectors (Ô E) n) (h_index : submoduleIndex M (intVectors (Ô E) n) ≠ 0) : ∃ A : GL n (𝔸f E), colLattice (Ô E) A.val = M := by classical -- Number the columns of the identity to apply the finite-index column-span theorem. let e := Fintype.equivFin n let B := (1 : Matrix n n (𝔸f E)).submatrix id e.symm have cols {ι ι' : Type} [Fintype ι] [Fintype ι'] (X : Matrix n ι (𝔸f E)) (σ : ι' ≃ ι) : colLattice (Ô E) (X.submatrix id σ) = colLattice (Ô E) X := by rw [colLattice_eq_span, colLattice_eq_span] exact congrArg (Submodule.span (Ô E)) (σ.surjective.range_comp X.col) have hB : colLattice (Ô E) B = intVectors (Ô E) n := (cols (1 : Matrix n n (𝔸f E)) e.symm).trans (by simp [colLattice]) obtain ⟨A, hA, -⟩ := exists_colLattice_mul_eq_of_le (B := B) (hB.symm ▸ h_le) (hB.symm ▸ h_index) let D := Units.map (reindexAlgEquiv (𝔸f E) (𝔸f E) e.symm).toMonoidHom A refine ⟨D, ?_⟩ rw [← hA, ← cols D.val e.symm] congr 1 ext i j simp [D, B, Matrix.mul_apply, Matrix.one_apply, e.eq_symm_apply] omit [IsCMField E] [HasPrimitiveRoot5040 E] in /-- A finite-index submodule of a rank-`r` lattice over the integral finite adeles of a number field is a lattice of the same rank. -/ lemma IsLatticeOfRank.of_submoduleIndex_ne_zero {L M : Submodule (Ô E) (κ → 𝔸f E)} (hL : IsLatticeOfRank r L) (h_le : M ≤ L) (h_index : submoduleIndex M L ≠ 0) : IsLatticeOfRank r M := by obtain ⟨x, a, hx, rfl⟩ := hL obtain ⟨A, hM, -⟩ := exists_colLattice_mul_eq_of_le h_le h_index exact ⟨x, a * A, hx, by rw [Units.val_mul, ← Matrix.mul_assoc, hM]⟩ /-- Let `E` be a CM field with a primitive 5040th root of unity, `𝔸f E` its finite adeles and `Ô E` the integral ones. Let `L` be a lattice of rank `r` in `(𝔸f E) ^ κ`: the `Ô E`-span of the columns of `B = x a`, with `r` independent columns of `x` over `E` and `a` invertible over `𝔸f E`. If `M` is an `Ô E`-submodule of `L` of finite non-zero index `submoduleIndex M L`, then its discriminant is that of `L` times this index. -/ lemma IsLatticeOfRank.discriminant_eq_mul_submoduleIndex {L M : Submodule (Ô E) (κ → 𝔸f E)} (hL : IsLatticeOfRank r L) (h_le : M ≤ L) (h_index : submoduleIndex M L ≠ 0) : discriminant r M = discriminant r L * submoduleIndex M L := by -- If `x a` is a basis of `L`, then `x a A` is a basis of `M`, and the index is that of `det A`. obtain ⟨x, a, hx, rfl⟩ := hL obtain ⟨A, hM, h_det⟩ : ∃ A : GL (Fin r) (𝔸f E), colLattice (Ô E) (finAdeleMatrix x * a.val * A.val) = M ∧ (submoduleIndex M (colLattice (Ô E) (finAdeleMatrix x * a.val)) : ℝ) = genIndex A.val.det := exists_colLattice_mul_eq_of_le h_le h_index have h_basis : finAdeleMatrix x * (a * A).val = finAdeleMatrix x * a.val * A.val := (Matrix.mul_assoc ..).symm rw [h_det, ← hM, ← h_basis, discriminant_colLattice hx, discriminant_colLattice hx, h_basis, sqrt_genIndex_det_gram_mul] /-- An `Ô E`-submodule `M` of finite index in a lattice `L` of rank `r` is a lattice of the same rank, and its discriminant is the discriminant of `L` times the index `submoduleIndex M L` of `M` in `L`. -/ lemma IsLatticeOfRank.of_le_and_discriminant_eq_mul_index {L M : Submodule (Ô E) (κ → 𝔸f E)} (hL : IsLatticeOfRank r L) (h_le : M ≤ L) (h_index : submoduleIndex M L ≠ 0) : IsLatticeOfRank r M ∧ discriminant r M = discriminant r L * submoduleIndex M L := ⟨hL.of_submoduleIndex_ne_zero h_le h_index, hL.discriminant_eq_mul_submoduleIndex h_le h_index⟩ omit [IsCMField E] [HasPrimitiveRoot5040 E] in /-- The `Ô`-span `colLattice` of the columns of `B` lies in `preimageLattice (Ô E) H`, the vectors that `H` maps to integral ones, if and only if `H * B` has all entries in `Ô`. -/ lemma colLattice_le_preimageLattice_iff {σ τ : Type} [Fintype τ] {H : Matrix σ κ (𝔸f E)} {B : Matrix κ τ (𝔸f E)} : colLattice (Ô E) B ≤ preimageLattice (Ô E) H ↔ IsIntMatrix (Ô E) (H * B) := by classical exact ⟨fun h_le i j ↦ h_le (col_mem_colLattice j) i, fun h_int ↦ colLattice_le fun j i ↦ h_int i j⟩ variable [DecidableEq κ] omit [IsCMField E] [HasPrimitiveRoot5040 E] [DecidableEq κ] in /-- The image under a rational matrix `η` of the lattice spanned by the columns of `x a` is the lattice spanned by the columns of `(η x) a`. -/ lemma map_colLattice_finAdeleMatrix_mul (η : Matrix κ κ E) (x : Matrix κ (Fin r) E) (a : Matrix (Fin r) (Fin r) (𝔸f E)) : (colLattice (Ô E) (finAdeleMatrix x * a)).map ((finAdeleMatrix η).mulVecLin.restrictScalars (Ô E)) = colLattice (Ô E) (finAdeleMatrix (η * x) * a) := by have h_map : finAdeleMatrix (η * x) = finAdeleMatrix η * finAdeleMatrix x := Matrix.map_mul rw [h_map, Matrix.mul_assoc, colLattice_mul (finAdeleMatrix η)] omit [IsCMField E] [HasPrimitiveRoot5040 E] in /-- A matrix `η` over `E` with a left inverse maps a lattice of rank `r` in `(𝔸f E) ^ κ` (the `Ô E`-span of the adelic basis `x a` of an `r`-dimensional subspace of `E ^ κ`) to a lattice of rank `r`. -/ lemma IsLatticeOfRank.map_of_hasLeftInv {L : Submodule (Ô E) (κ → 𝔸f E)} (hL : IsLatticeOfRank r L) {η : Matrix κ κ E} (hη : HasLeftInv η) : IsLatticeOfRank r (L.map ((finAdeleMatrix η).mulVecLin.restrictScalars (Ô E))) := by obtain ⟨x, a, hx, rfl⟩ := hL exact ⟨η * x, a, hη.mul hx, (map_colLattice_finAdeleMatrix_mul η x a.val).symm⟩ /-- An isometry `η` of the standard hermitian form over `E` (`ηᴴ * η = 1`) keeps the discriminant of a lattice of rank `r`, that is, the square root of the generalised index of the Gram determinant of a basis of the lattice. -/ lemma IsLatticeOfRank.discriminant_map_of_unitary {L : Submodule (Ô E) (κ → 𝔸f E)} (hL : IsLatticeOfRank r L) {η : Matrix κ κ E} (hη : ηᴴ * η = 1) : discriminant r (L.map ((finAdeleMatrix η).mulVecLin.restrictScalars (Ô E))) = discriminant r L := by -- The basis `x a` is moved to `(η x) a`, which has the same Gram matrix. obtain ⟨x, a, hx, rfl⟩ := hL have h_inv : HasLeftInv (η * x) := HasLeftInv.mul ⟨ηᴴ, hη⟩ hx have h_gram : (finAdeleMatrix (η * x) * a.val)ᴴ * (finAdeleMatrix (η * x) * a.val) = (finAdeleMatrix x * a.val)ᴴ * (finAdeleMatrix x * a.val) := by simp_rw [gram_finAdeleMatrix_mul_self, gram_mul_standard, hη, Matrix.mul_one] rw [map_colLattice_finAdeleMatrix_mul, discriminant_colLattice h_inv, discriminant_colLattice hx, h_gram] /-- An isometry `η` of the standard hermitian form over `E` (`ηᴴ * η = 1`) maps a lattice of rank `r` to a lattice of rank `r` with the same discriminant. -/ lemma IsLatticeOfRank.map_of_unitary {L : Submodule (Ô E) (κ → 𝔸f E)} (hL : IsLatticeOfRank r L) {η : Matrix κ κ E} (hη : ηᴴ * η = 1) : IsLatticeOfRank r (L.map ((finAdeleMatrix η).mulVecLin.restrictScalars (Ô E))) ∧ discriminant r (L.map ((finAdeleMatrix η).mulVecLin.restrictScalars (Ô E))) = discriminant r L := ⟨hL.map_of_hasLeftInv ⟨ηᴴ, hη⟩, hL.discriminant_map_of_unitary hη⟩ section Saturated variable {H' : Matrix κ P (𝔸f E)} {H : Matrix P κ (𝔸f E)} /-- The saturated lattice of a subspace `V` of `E ^ κ` for a matrix `H` with left inverse `H'`: the `Ô`-span of the chosen basis `sublatticeBasis u V`, where `u` is the identity `H' * H = 1`. Its columns are adelic points of `V`, and their image under `H` is a primitive integral matrix. -/ def saturatedLattice (u : H' * H = 1) (V : Submodule E (κ → E)) : Submodule (Ô E) (κ → 𝔸f E) := colLattice (Ô E) (sublatticeBasis u V).val /-- The matrix `H`, which has the left inverse `H'`, maps the saturated lattice of `V` to integral vectors. -/ lemma saturatedLattice_le (h_left_inv : H' * H = 1) (V : Submodule E (κ → E)) : saturatedLattice h_left_inv V ≤ preimageLattice (Ô E) H := colLattice_le_preimageLattice_iff.2 (isPrimitiveMatrix_mul_sublatticeBasis h_left_inv V).left /-- The saturated lattice of `V` is a lattice whose rank is the dimension of `V`. -/ lemma isLatticeOfRank_saturatedLattice (h_left_inv : H' * H = 1) (V : Submodule E (κ → E)) : IsLatticeOfRank (finrank E V) (saturatedLattice h_left_inv V) := by obtain ⟨y, a, hy_inv, -, h_basis⟩ := exists_sublatticeBasis_eq_finAdeleMatrix_mul h_left_inv V exact ⟨y, a, hy_inv, by rw [saturatedLattice, h_basis]⟩ /-- The discriminant of the saturated lattice of `V` is `sublatticeDiscriminant h_left_inv V`, the square root of the generalised index of the Gram determinant of its chosen basis. -/ lemma discriminant_saturatedLattice (h_left_inv : H' * H = 1) (V : Submodule E (κ → E)) : discriminant (finrank E V) (saturatedLattice h_left_inv V) = sublatticeDiscriminant h_left_inv V := by obtain ⟨y, a, hy_inv, -, h_basis⟩ := exists_sublatticeBasis_eq_finAdeleMatrix_mul h_left_inv V rw [saturatedLattice, sublatticeDiscriminant, h_basis, discriminant_colLattice hy_inv] /-- Let `E` be a CM field with a primitive 5040th root of unity, `𝔸f E` its finite adeles and `Ô E` the integral ones. Let the matrix `H` over `𝔸f E` have the left inverse `H'`, and let `V` be a subspace of `E ^ κ`. Suppose that, for every adelic matrix `m` with `finrank E V` columns, the Gram matrix `mᴴ * m` has entries in `Ô E` whenever `H * m` has. Then the discriminant `sublatticeDiscriminant h_left_inv V` is at least `1`. -/ lemma one_le_sublatticeDiscriminant (h_left_inv : H' * H = 1) (V : Submodule E (κ → E)) (h_int : ∀ m : Matrix κ (Fin (finrank E V)) (𝔸f E), IsIntMatrix (Ô E) (H * m) → IsIntMatrix (Ô E) (mᴴ * m)) : 1 ≤ sublatticeDiscriminant h_left_inv V := by -- The Gram determinant is integral, and it is a unit because the discriminant is positive. have h_pos := sublatticeDiscriminant_pos h_left_inv V set m : Matrix κ (Fin (finrank E V)) (𝔸f E) := (sublatticeBasis h_left_inv V).val with hm rw [sublatticeDiscriminant, ← hm] at h_pos ⊢ have h_unit : IsUnit (mᴴ * m).det := genIndex.apply_ne_zero_iff.1 (Real.sqrt_pos.1 h_pos).ne' have h_gram_int : IsIntMatrix (Ô E) (mᴴ * m) := h_int m (isPrimitiveMatrix_mul_sublatticeBasis h_left_inv V).left exact Real.one_le_sqrt.2 (one_le_genIndex h_gram_int.det_mem h_unit) /-- Let `E` be a CM field with a primitive 5040th root of unity, `𝔸f E` its finite adeles and `Ô E` the integral ones, and let the matrix `H` over `𝔸f E` have the left inverse `H'`. Let `L` be a lattice of rank `r` that `H` maps to integral vectors: the `Ô E`-span in `(𝔸f E) ^ κ` of the columns of `x a`, with `r` independent columns of `x` over `E` and `a` invertible over `𝔸f E`. Then `L` is spanned by the columns of `S * A` for some subspace `W` of `E ^ κ` of dimension `r` and some integral `A` invertible over `𝔸f E`. Here `S = sublatticeBasis h_left_inv W` is the chosen basis of the saturated lattice of `W`. The discriminant of a lattice is the square root of `genIndex` of the Gram determinant of a basis, with `genIndex u` the inverse of the factor by which a unit `u` scales Haar measure; that of `L` is `sublatticeDiscriminant h_left_inv W`, the one of `S`, times `genIndex (det A)`. -/ lemma IsLatticeOfRank.exists_eq_colLattice_sublatticeBasis_mul {L : Submodule (Ô E) (κ → 𝔸f E)} {H' : Matrix κ P (𝔸f E)} {H : Matrix P κ (𝔸f E)} (h_left_inv : H' * H = 1) (hL : IsLatticeOfRank r L) (h_le : L ≤ preimageLattice (Ô E) H) : ∃ (W : Submodule E (κ → E)) (A : GL (Fin (finrank E W)) (𝔸f E)), finrank E W = r ∧ IsIntMatrix (Ô E) A.val ∧ colLattice (Ô E) ((sublatticeBasis h_left_inv W).val * A.val) = L ∧ discriminant r L = sublatticeDiscriminant h_left_inv W * genIndex A.val.det := by classical -- Take the rational column space of a basis of the lattice. obtain ⟨x, a, hx, rfl⟩ := hL obtain ⟨W, hW⟩ : ∃ W : Submodule E (κ → E), colSpan x = W := ⟨colSpan x, rfl⟩ obtain rfl : finrank E W = r := by rw [← hW, ← hx.card_eq_finrank_colSpan, Fintype.card_fin] obtain ⟨A, hA_int, hA⟩ := exists_integral_sublatticeBasis_factor h_left_inv hW.le (det_gram_ne_zero hx) a (colLattice_le_preimageLattice_iff.1 h_le) refine ⟨W, A, rfl, hA_int, by rw [← hA], ?_⟩ rw [discriminant_colLattice hx, hA, sqrt_genIndex_det_gram_mul, sublatticeDiscriminant] end Saturated omit [Fintype κ] [DecidableEq κ] [IsCMField E] [HasPrimitiveRoot5040 E] in /-- For an adelic matrix `B` with `r` columns, the sum of `[L : M] ^ (-(r + μ))` over the submodules `M` of finite index in the span `L = colLattice (Ô E) B` of its columns is at most `ζ(μ) ^ r`, where `ζ(μ) = idealZeta (Ô E) μ` is the sum of `[Ô : I] ^ (-μ)` over the ideals `I` of finite index. -/ lemma tsum_submoduleIndex_colLattice_inv_pow_le (B : Matrix κ (Fin r) (𝔸f E)) (μ : ℕ) : ∑' M : {M : Submodule (Ô E) (κ → 𝔸f E) // M ≤ colLattice (Ô E) B ∧ submoduleIndex M (colLattice (Ô E) B) ≠ 0}, (submoduleIndex M.val (colLattice (Ô E) B) : ℝ≥0∞)⁻¹ ^ (r + μ) ≤ idealZeta (Ô E) μ ^ r := by obtain ⟨f, hf⟩ := exists_range_eq_colLattice (R := Ô E) B rw [← hf, show idealZeta (Ô E) μ = submoduleZeta (Ô E) (Ô E) μ from (submoduleZeta_def ..).symm] exact (tsum_relIndex_range_le_submoduleZeta f (r + μ)).trans (submoduleZeta_pi_le (fun _ ↦ IsDedekindDomain.FiniteAdeleRing.isPrincipal_of_cardQuot_ne_zero (R := 𝓞 E) (K := E)) r μ) omit [DecidableEq κ] [IsCMField E] [HasPrimitiveRoot5040 E] in /-- For a lattice `L` of rank `r`, the sum of `[L : M] ^ (-(r + μ))` over the sublattices `M` of finite index is at most `ζ(μ) ^ r`, where `ζ(μ) = idealZeta (Ô E) μ` is the sum of `[Ô : I] ^ (-μ)` over the ideals `I` of finite index in `Ô`. (Hey's formula would give the sum exactly, as a product of zeta values; only this bound is used, and it is proved without the formula.) -/ theorem IsLatticeOfRank.tsum_submoduleIndex_inv_pow_le {L : Submodule (Ô E) (κ → 𝔸f E)} (hL : IsLatticeOfRank r L) (μ : ℕ) : ∑' M : {M : Submodule (Ô E) (κ → 𝔸f E) // M ≤ L ∧ submoduleIndex M L ≠ 0}, (submoduleIndex M.val L : ℝ≥0∞)⁻¹ ^ (r + μ) ≤ idealZeta (Ô E) μ ^ r := by obtain ⟨x, a, -, rfl⟩ := hL exact tsum_submoduleIndex_colLattice_inv_pow_le _ μ end New.Filling end