import OAI.AlgebraicGeometry.HodgeConjecture.CMExtraction.Moduli /-! # Cofinal Moduli -/ namespace OAI.AlgebraicGeometry.HodgeConjecture.CMExtraction.CofinalModuli.Intrinsic noncomputable section /-! The same pre-prime test works at every sufficiently divisible deeper PEL level. The models are chosen at the specified level before the prime. -/ open scoped Classical _root_.Matrix open _root_.CategoryTheory attribute [local instance] Intrinsic.Multiplicity.nativePlaceDecidableEq Intrinsic.Multiplicity.nativeTripleDecidableEq variable (E : IntermediateField ℚ ℂ) [NumberField E] [NumberField.IsCMField E] [IsGalois ℚ E] {s : ℕ} (P : AbelianModuli.ReferenceFamily.Datum.RankThreePELDatum E s) (hP : P.IsAdmissible) (hμ : P.μ = E.val.toRingHom) (v : Multiplicity.Odd.Sign E) (hv : v.val 1 = true) {MpR MpF MpA : Type} [Group MpR] [Group MpF] [Group MpA] (W : RepresentationTheory.Theta.PoissonAutomorphyNormalizationData.WeilData (Fin s × Fin 3) MpR MpF MpA) (R : PreprimeCalibration.Intrinsic.RetainedPreprimeData E P hP hμ v hv W) theorem exists_retained_cofinal_moduli (hReferenceFamily : AbelianScheme.IsogenyQuotient.Reference.Family.Construction.ReferenceFamilyInput) (hIntegralModel : RepresentationTheory.Hecke.IntegralModel.OrdinaryCharacterIntrinsic.FullIntegralModelInput) (hs : 0 < s) (hdegree : Module.finrank ℚ E = 2 * s) (base : ℕ) (hbase : 0 < base) : ∃ N : ℕ, 3 ≤ N ∧ base ∣ N ∧ R.depth ∣ N ∧ ∀ L : ℕ, 0 < L → N ∣ L → ∃ M : Moduli.Intrinsic.RetainedModuli E P hP hμ v hv W R, M.level = L := by have hemb : E.val.toRingHom.comp (RingHom.id E) = P.μ := by rw [RingHom.comp_id, hμ] obtain ⟨N, hN, hdiv, hlevels⟩ := hReferenceFamily s hs hdegree P hP (RingHom.id E) E.val.toRingHom hemb ⊤ (R.depth * base) (Nat.mul_pos R.depth_pos hbase) have hbN : base ∣ N := dvd_trans (dvd_mul_left base R.depth) hdiv have hrN : R.depth ∣ N := dvd_trans (dvd_mul_right R.depth base) hdiv refine ⟨N, hN, hbN, hrN, ?_⟩ intro L hL hNL have hL3 : 3 ≤ L := hN.trans (Nat.le_of_dvd hL hNL) obtain ⟨hdet, _, Γ, hΓ, htor, M, hM, hball, C₀, X, hX, hunif⟩ := hlevels L hL hNL have hdeep : PELModuli.IntegralModel.PEL.Has.IsSufficientlyDeepFullLevel P L := by refine ⟨hL3, ?_⟩ intro g hg k hk hpow exact htor g ((hΓ g).mpr ⟨hg, hdet g hg⟩) k hk hpow exact ⟨{ level := L level_ge_three := hL3 depth_dvd := dvd_trans hrN hNL deep := hdeep model := M fine := hM ballComponents := hball principal := Γ principal_mem := hΓ torsion_free := htor component := C₀ variety := X projectiveComponent := hX uniformization := hunif integral := RepresentationTheory.Hecke.OrdinaryCharacterIntegralModelOf.OrdinaryIntrinsic.integralModelOfFullIntegralModel hIntegralModel hs hdegree hP hemb hdeep hM }, rfl⟩ end end OAI.AlgebraicGeometry.HodgeConjecture.CMExtraction.CofinalModuli.Intrinsic