import OAI.AlgebraicGeometry.HodgeConjecture.HeckeCycles.TorsionCoordinateMaps import Mathlib.Algebra.BigOperators.Pi /-! # Torsion Generators -/ namespace OAI.AlgebraicGeometry.HodgeConjecture.HeckeCycles.TorsionGenerators.CM noncomputable section /-! The standard torsion coordinates are generated by their coordinate unit vectors. Homomorphisms are therefore determined by the images of the generators used in the actual lifting construction. -/ open OAI.AlgebraicGeometry.HodgeConjecture.HeckeCycles.TorsionCoordinateMaps.CM.Criterion def generator (q n g : ℕ) (i : Fin g) : TorsionCoordinateMaps.CM.Criterion.coordinates q n g := Multiplicative.ofAdd (Pi.single i (1 : ZMod (q ^ n))) theorem decomposition (q n g : ℕ) (hq : q ≠ 0) (x : TorsionCoordinateMaps.CM.Criterion.coordinates q n g) : x = ∏ i, generator q n g i ^ (x.toAdd i).val := by let : NeZero (q ^ n) := ⟨pow_ne_zero n hq⟩ have hcoef (i : Fin g) : (x.toAdd i).val • (1 : ZMod (q ^ n)) = x.toAdd i := by rw [nsmul_eq_mul, mul_one] exact ZMod.natCast_zmod_val _ have hvec (i : Fin g) : (x.toAdd i).val • (Pi.single i (1 : ZMod (q ^ n)) : Fin g → ZMod (q ^ n)) = Pi.single i (x.toAdd i) := by funext j by_cases hji : j = i · subst j simpa only [Pi.smul_apply, Pi.single_eq_same] using hcoef i · simp only [Pi.smul_apply, Pi.single_eq_of_ne hji, smul_zero] apply Multiplicative.toAdd.injective rw [toAdd_prod] calc x.toAdd = ∑ i, Pi.single i (x.toAdd i) := (Finset.univ_sum_single x.toAdd).symm _ = _ := by apply Finset.sum_congr rfl intro i _ rw [toAdd_pow] exact (hvec i).symm theorem hom_ext {A : Type*} [CommGroup A] (q n g : ℕ) (hq : q ≠ 0) (f h : TorsionCoordinateMaps.CM.Criterion.coordinates q n g →* A) (hgen : ∀ i, f (generator q n g i) = h (generator q n g i)) : f = h := by apply MonoidHom.ext intro x rw [decomposition q n g hq x, map_prod, map_prod] apply Finset.prod_congr rfl intro i _ rw [map_pow, map_pow, hgen i] end end OAI.AlgebraicGeometry.HodgeConjecture.HeckeCycles.TorsionGenerators.CM