import OAI.AlgebraicGeometry.AbelianScheme.CentralAction.SideResidues import OAI.AlgebraicGeometry.AbelianScheme.CentralAction.IdealConjugation /-! # Generators -/ namespace OAI.AlgebraicGeometry.AbelianScheme.CentralAction.Generators.Construction noncomputable section /-! Apply the explicit Finiteness input to the actual one-side-per-pair ideal. The generator has the exact norm and fixes the actual finite level ring. -/ open _root_.NumberField open scoped nonZeroDivisors variable {E K : Type} [Field E] [NumberField E] [NumberField.IsCMField E] [Field K] [NumberField K] {s q : ℕ} [Fact q.Prime] theorem sideIdeal_polarized (D : TateComparison.Data.SphericalPELAlbaneseData E K s q) (hgood : D.IsGoodCompletelySplitPrime) (hdegree : Module.finrank ℚ E = 2 * s) (side : Fin s → Bool) : (SideResidues.Construction.sideIdeal D side : Arithmetic.Construction.FI E) * Arithmetic.Construction.conjugateIdeal (SideResidues.Construction.sideIdeal D side : Arithmetic.Construction.FI E) = FractionalIdeal.spanSingleton (𝓞 E)⁰ (q : E) := by rw [IdealConjugation.Construction.conjugateIdeal_coe, SideResidues.Construction.sideIdeal_conjugate D hgood, ← FractionalIdeal.coeIdeal_mul, SideResidues.Construction.sideIdeal_mul_opposite D hgood hdegree, SideResidues.Construction.qPowerIdeal, FractionalIdeal.coeIdeal_span_singleton] simp only [pow_one, map_natCast] /-- A positive power of the selected-side ideal is generated by a marked scalar of exactly the required rational norm. -/ theorem marked_side_generator (D : TateComparison.Data.SphericalPELAlbaneseData E K s q) (hgood : D.IsGoodCompletelySplitPrime) (hlevel : 0 < D.level) (hdegree : Module.finrank ℚ E = 2 * s) (hFiniteness : Arithmetic.Construction.PrincipalizationInput E) (side : Fin s → Bool) : ∃ (n : ℕ) (b : 𝓞 E), 0 < n ∧ b ≠ 0 ∧ (SideResidues.Construction.sideIdeal D side) ^ n = Ideal.span {b} ∧ (b : E) * IsCMField.complexConj E (b : E) = (q : E) ^ n ∧ Marking.Construction.levelReduction E D.level b = 1 := by let : Finite (Marking.Construction.LevelRing E D.level) := Marking.Construction.finite_level_ring E D.level hlevel have hI : (SideResidues.Construction.sideIdeal D side : Arithmetic.Construction.FI E) ≠ 0 := FractionalIdeal.coeIdeal_ne_zero.mpr (SideResidues.Construction.sideIdeal_ne_bot D side) have hpol : (SideResidues.Construction.sideIdeal D side : Arithmetic.Construction.FI E) * Arithmetic.Construction.conjugateIdeal (SideResidues.Construction.sideIdeal D side : Arithmetic.Construction.FI E) = FractionalIdeal.spanSingleton (𝓞 E)⁰ ((q : E) ^ 1) := by simpa only [pow_one] using sideIdeal_polarized D hgood hdegree side obtain ⟨n, b, hn, hb, hprincipal, hnorm, hmark⟩ := Arithmetic.Construction.marked_integral_principalization hFiniteness (SideResidues.Construction.sideIdeal D side : Arithmetic.Construction.FI E) hI FractionalIdeal.coeIdeal_le_one q 1 (Fact.out : q.Prime).ne_zero hpol (Marking.Construction.levelReduction E D.level) (Marking.Construction.level_prime_unit E D.level q hgood.2.2.1) refine ⟨n, b, hn, hb, ?_, ?_, hmark⟩ · apply FractionalIdeal.coeIdeal_injective (K := E) change (((SideResidues.Construction.sideIdeal D side) ^ n : Ideal (𝓞 E)) : Arithmetic.Construction.FI E) = ((Ideal.span {b} : Ideal (𝓞 E)) : Arithmetic.Construction.FI E) rw [FractionalIdeal.coeIdeal_pow, FractionalIdeal.coeIdeal_span_singleton] exact hprincipal · simpa only [one_mul] using hnorm /-- Equality of the principal ideal gives the exact q-adic exponents, up to a unit, at every chosen and opposite coordinate. -/ theorem side_generator_local_exponents (D : TateComparison.Data.SphericalPELAlbaneseData E K s q) (hgood : D.IsGoodCompletelySplitPrime) (side : Fin s → Bool) (n : ℕ) (b : 𝓞 E) (hprincipal : (SideResidues.Construction.sideIdeal D side) ^ n = Ideal.span {b}) (v : Fin s) (w : Bool) : ∃ u : ℤ_[q]ˣ, D.localCharacter (v, w) b = (q : ℤ_[q]) ^ (if w = side v then n else 0) * u := by classical have hm := congrArg (Ideal.map (D.localCharacter (v, w))) hprincipal rw [Ideal.map_pow, Ideal.map_span, Set.image_singleton] at hm have he : Ideal.span {(q : ℤ_[q]) ^ (if w = side v then n else 0)} = Ideal.span {D.localCharacter (v, w) b} := by by_cases hw : w = side v · subst w rw [SideResidues.Construction.sideIdeal_map_selected, Ideal.span_singleton_pow] at hm simpa only [ite_true] using hm · rw [SideResidues.Construction.sideIdeal_map_unselected D hgood side v w hw] at hm simpa only [ite_eq_right hw, pow_zero, Ideal.span_singleton_one, Ideal.top_pow] using hm obtain ⟨u, hu⟩ := Ideal.span_singleton_eq_span_singleton.mp he exact ⟨u, hu.symm⟩ /-- Principalization with every equation needed by the geometric scalar construction, in the integral ring on which the PEL family acts. -/ theorem marked_side_generator_local (D : TateComparison.Data.SphericalPELAlbaneseData E K s q) (hgood : D.IsGoodCompletelySplitPrime) (hlevel : 0 < D.level) (hdegree : Module.finrank ℚ E = 2 * s) (hFiniteness : Arithmetic.Construction.PrincipalizationInput E) (side : Fin s → Bool) : ∃ (n : ℕ) (b : 𝓞 E), 0 < n ∧ b ≠ 0 ∧ b * IsCMField.ringOfIntegersComplexConj E b = (q : 𝓞 E) ^ n ∧ Marking.Construction.levelReduction E D.level b = 1 ∧ ∀ (v : Fin s) (w : Bool), ∃ u : ℤ_[q]ˣ, D.localCharacter (v, w) b = (q : ℤ_[q]) ^ (if w = side v then n else 0) * u := by obtain ⟨n, b, hn, hb, hp, hnorm, hmark⟩ := marked_side_generator D hgood hlevel hdegree hFiniteness side refine ⟨n, b, hn, hb, ?_, hmark, side_generator_local_exponents D hgood side n b hp⟩ apply Subtype.val_injective exact hnorm end end OAI.AlgebraicGeometry.AbelianScheme.CentralAction.Generators.Construction