import Mathlib import Definitions.Def_ModularCurve_ToricDescentData set_option autoImplicit false noncomputable section namespace ModularCurve section Dichotomy variable {G : Type*} [Group G] {J : Type*} [AddCommGroup J] [Module HeckeAlg J] [DistribMulAction G J] def IsToricDichotomyQGuarded (q : ā„•) (S : Finset Nat.Primes) (I : Subgroup G) (š’Æ : Submodule HeckeAlg J) (Jā‚€ : Type*) [AddCommGroup Jā‚€] [Module HeckeAlg Jā‚€] : Prop := āˆ€ š”Ŗ : Ideal HeckeAlg, š”Ŗ.IsMaximal → ¬ IsEventuallyEisenstein š”Ŗ → IsUnit ((q : ā„•) : HeckeAlg ā§ø š”Ŗ) → āˆ€ x ∈ heckeTorsion J š”Ŗ, (āˆ€ σ ∈ I, σ • x = x) → x ∈ š’Æ ∨ HasLowerLevelTorsion S š”Ŗ Jā‚€ end Dichotomy section Bundle def ExistsToricDichotomyDataQGuarded {G : Type*} [Group G] (J : Type*) [AddCommGroup J] [Module HeckeAlg J] [DistribMulAction G J] (q : Nat.Primes) (S : Finset Nat.Primes) (I : Subgroup G) (φ : G) (Jā‚€ : Type*) [AddCommGroup Jā‚€] [Module HeckeAlg Jā‚€] : Prop := ∃ š’Æ : Submodule HeckeAlg J, ToricFrobeniusSq (q : ā„•) φ š’Æ ∧ IsToricDichotomyQGuarded (q : ā„•) S I š’Æ Jā‚€ ∧ ToricFrobeniusHecke q φ š’Æ namespace ExistsToricDichotomyDataQGuarded variable {G : Type*} [Group G] {J : Type*} [AddCommGroup J] [Module HeckeAlg J] [DistribMulAction G J] {q : Nat.Primes} {S : Finset Nat.Primes} {I : Subgroup G} {φ : G} {Jā‚€ : Type*} [AddCommGroup Jā‚€] [Module HeckeAlg Jā‚€] def toric (h : ExistsToricDichotomyDataQGuarded J q S I φ Jā‚€) : Submodule HeckeAlg J := h.choose theorem toricFrobeniusSq (h : ExistsToricDichotomyDataQGuarded J q S I φ Jā‚€) : ToricFrobeniusSq (q : ā„•) φ h.toric := h.choose_spec.1 theorem toricDichotomy (h : ExistsToricDichotomyDataQGuarded J q S I φ Jā‚€) : IsToricDichotomyQGuarded (q : ā„•) S I h.toric Jā‚€ := h.choose_spec.2.1 theorem toricFrobeniusHecke (h : ExistsToricDichotomyDataQGuarded J q S I φ Jā‚€) : ToricFrobeniusHecke q φ h.toric := h.choose_spec.2.2 end ExistsToricDichotomyDataQGuarded end Bundle end ModularCurve end