diff --git a/lakefile.toml b/lakefile.toml index 2bca04769..e4a5c654b 100644 --- a/lakefile.toml +++ b/lakefile.toml @@ -12,7 +12,7 @@ pp.unicode.fun = true # universal across all origin projects [[require]] name = "mathlib" git = "https://github.com/leanprover-community/mathlib4.git" -rev = "e4b72ca0d01c" # daily steady-state bump 2026-08-25, toolchain v4.34.0-rc2 +rev = "d13f23b723b8a846827a245b89c10fc7d3f11612" # Zauner compatibility: Lean/Mathlib v4.34.1 # ───────────────────────── shared, refactored-out lemmas ───────────────────────── [[lean_lib]] @@ -85,7 +85,6 @@ globs = ["CebotarevDensity"] [lean_lib.leanOptions] autoImplicit = false relaxedAutoImplicit = false -maxSynthPendingDepth = 3 # ───────── Belabas–Friedman: effective residue of the Dedekind zeta function ───────── # Imports mathlib (and CebotarevDensity for the ζ_K Euler product); built on demand. diff --git a/lean-toolchain b/lean-toolchain index b814d987e..ba8ebf2db 100644 --- a/lean-toolchain +++ b/lean-toolchain @@ -1 +1 @@ -leanprover/lean4:v4.34.0-rc2 +leanprover/lean4:v4.34.1 diff --git a/projects/Chebotarev/CebotarevDensity/Abelian.lean b/projects/Chebotarev/CebotarevDensity/Abelian.lean index ceca8bdf6..497e8ecc3 100644 --- a/projects/Chebotarev/CebotarevDensity/Abelian.lean +++ b/projects/Chebotarev/CebotarevDensity/Abelian.lean @@ -233,13 +233,13 @@ private theorem prime_dvd_natAbs_discr_cyclotomic_dvd (E : Type*) [Field E] [NumberField E] (m : ℕ) [NeZero m] [IsCyclotomicExtension {m} ℚ E] {p : ℕ} (hp : p.Prime) (hpd : p ∣ (NumberField.discr E).natAbs) : p ∣ m := by by_contra hpm - haveI : Fact (Nat.Prime p) := ⟨hp⟩ + have : Fact (Nat.Prime p) := ⟨hp⟩ have hpprime : Prime (p : ℤ) := Nat.prime_iff_prime_int.mp hp refine absurd (Int.ofNat_dvd_left.mpr hpd) ?_ rw [NumberField.not_dvd_discr_iff_forall_liesOver E (𝓞 E) hpprime] intro P hPmax hlo - haveI := hPmax.isPrime - haveI := hlo + have := hPmax.isPrime + have := hlo have hspanbot : Ideal.span {(p : ℤ)} ≠ ⊥ := by rw [Ne, Ideal.span_singleton_eq_bot]; exact hpprime.ne_zero have hPbot : P ≠ ⊥ := Ideal.ne_bot_of_liesOver_of_ne_bot hspanbot P @@ -263,9 +263,9 @@ private theorem cyclotomicField_finrank_eq (Set.mem_singleton m) (NeZero.ne m) set K₁ : IntermediateField ℚ M := IntermediateField.adjoin ℚ {ζ} with hK₁def set K₂ : IntermediateField ℚ M := (IsScalarTower.toAlgHom ℚ K M).fieldRange with hK₂def - haveI hK₁cyc : IsCyclotomicExtension {m} ℚ K₁ := + have hK₁cyc : IsCyclotomicExtension {m} ℚ K₁ := hζ.intermediateField_adjoin_isCyclotomicExtension (K := ℚ) - haveI : IsGalois ℚ K₁ := IsCyclotomicExtension.isGalois (S := {m}) (K := ℚ) (L := K₁) + have : IsGalois ℚ K₁ := IsCyclotomicExtension.isGalois (S := {m}) (K := ℚ) (L := K₁) have hfinK₁ : Module.finrank ℚ K₁ = m.totient := IsCyclotomicExtension.finrank K₁ (Polynomial.cyclotomic.irreducible_rat (NeZero.pos m)) have hsup : K₁ ⊔ K₂ = ⊤ := by @@ -317,8 +317,8 @@ private theorem compositum_charProd_bijective [IsGalois K L] [IsGalois K M] (m : ℕ) [NeZero m] [IsCyclotomicExtension {m} L M] (hcop : ((NumberField.discr L).natAbs).Coprime m) (ζ : M) (hζ : IsPrimitiveRoot ζ m) : Function.Bijective ((AlgEquiv.restrictNormalHom L).prod (hζ.autToPow K)) := by - haveI : FiniteDimensional K M := inferInstance - haveI : IsGalois L M := IsGalois.tower_top_of_isGalois K L M + have : FiniteDimensional K M := inferInstance + have : IsGalois L M := IsGalois.tower_top_of_isGalois K L M set χK : Gal(M/K) →* (ZMod m)ˣ := hζ.autToPow K with hχK set Φ : Gal(M/K) →* Gal(L/K) × (ZMod m)ˣ := (AlgEquiv.restrictNormalHom L).prod χK with hΦ @@ -372,8 +372,8 @@ private theorem autToPow_L_bijective [IsGalois K L] [IsGalois K M] (m : ℕ) [NeZero m] [IsCyclotomicExtension {m} L M] (hcop : ((NumberField.discr L).natAbs).Coprime m) (ζ : M) (hζ : IsPrimitiveRoot ζ m) : Function.Bijective (hζ.autToPow L) := by - haveI : FiniteDimensional K M := inferInstance - haveI : IsGalois L M := IsGalois.tower_top_of_isGalois K L M + have : FiniteDimensional K M := inferInstance + have : IsGalois L M := IsGalois.tower_top_of_isGalois K L M have hML : Module.finrank L M = m.totient := cyclotomicField_finrank_eq L M m hcop have hcardML : Nat.card Gal(M/L) = Nat.card (ZMod m)ˣ := by rw [IsGalois.card_aut_eq_finrank L M, hML, Nat.card_eq_fintype_card, @@ -426,7 +426,7 @@ private theorem compositum_isCyclotomic_over_fixedField (IntermediateField.adjoin_le_iff.mpr (Set.singleton_subset_iff.mpr (IntermediateField.subset_adjoin K _ hζ.pow_eq_one))) (IntermediateField.adjoin_le_iff.mpr fun x hx ↦ by - obtain ⟨i, -, rfl⟩ := hζ.eq_pow_of_pow_eq_one (Set.mem_setOf_eq ▸ hx) + obtain ⟨i, -, rfl⟩ := hζ.eq_pow_of_pow_eq_one (Set.mem_ofPred_eq ▸ hx) exact pow_mem (IntermediateField.subset_adjoin K _ (Set.mem_singleton ζ)) i) have hsup : (F ⊔ Kμ).fixingSubgroup = ⊥ := by rw [IntermediateField.fixingSubgroup_sup, IntermediateField.fixingSubgroup_fixedField, _hmeet] @@ -437,8 +437,8 @@ private theorem compositum_isCyclotomic_over_fixedField apply IntermediateField.restrictScalars_injective K rw [IntermediateField.restrictScalars_adjoin_eq_sup, hadjζ, htop] rfl - haveI : Algebra.IsIntegral ↥F M := Algebra.IsIntegral.of_finite ↥F M - haveI hcyc : IsCyclotomicExtension {m} ↥F (IntermediateField.adjoin (↥F) {ζ}) := + have : Algebra.IsIntegral ↥F M := Algebra.IsIntegral.of_finite ↥F M + have hcyc : IsCyclotomicExtension {m} ↥F (IntermediateField.adjoin (↥F) {ζ}) := IsPrimitiveRoot.intermediateField_adjoin_isCyclotomicExtension (K := ↥F) hζ rw [htopF] at hcyc exact IsCyclotomicExtension.equiv (S := {m}) (A := ↥F) (f := IntermediateField.topEquiv) @@ -454,7 +454,7 @@ private theorem smul_algebraMap_eq_repl [Algebra K L] [Algebra K M] [Algebra L M] [IsScalarTower K L M] [IsGalois K L] [IsGalois K M] (σ : Gal(M/K)) (y : 𝓞 L) : σ • (algebraMap (𝓞 L) (𝓞 M) y) = algebraMap (𝓞 L) (𝓞 M) ((σ.restrictNormal L) • y) := by - haveI : IsScalarTower (𝓞 K) (𝓞 L) (𝓞 M) := inferInstance + have : IsScalarTower (𝓞 K) (𝓞 L) (𝓞 M) := inferInstance have hbridgeM : ∀ (g : M ≃ₐ[K] M) (x : 𝓞 M), ((g • x : 𝓞 M) : M) = g • (x : M) := fun g x ↦ by simpa [Algebra.smul_def] using (smul_distrib_smul (G := M ≃ₐ[K] M) (R := 𝓞 M) (S := M) g x 1).symm @@ -479,7 +479,7 @@ private theorem isArithFrobAt_restrictNormal_repl [IsGalois K L] [IsGalois K M] (σ : Gal(M/K)) (𝔓 : Ideal (𝓞 M)) (hσ : IsArithFrobAt (𝓞 K) σ 𝔓) : IsArithFrobAt (𝓞 K) (σ.restrictNormal L) (𝔓.under (𝓞 L)) := by - haveI : IsScalarTower (𝓞 K) (𝓞 L) (𝓞 M) := inferInstance + have : IsScalarTower (𝓞 K) (𝓞 L) (𝓞 M) := inferInstance have hunder : (𝔓.under (𝓞 L)).under (𝓞 K) = 𝔓.under (𝓞 K) := Ideal.under_under 𝔓 intro y rw [hunder, Ideal.under, Ideal.mem_comap, map_sub, map_pow, @@ -495,16 +495,16 @@ private theorem frobeniusClass_proj_isPrime_aux (_hfr : frobeniusClass K M 𝔭 = ConjClasses.mk τM) : frobeniusClass K L 𝔭 = ConjClasses.mk σ := by obtain ⟨𝔓, h𝔓p, h𝔓lo, -⟩ := exists_prime_liesOver K M 𝔭 (UnramifiedIn.ne_bot K M _hunrM) - haveI := h𝔓p - haveI := h𝔓lo - haveI : Finite (𝓞 M ⧸ 𝔓) := Ideal.finiteQuotientOfFreeOfNeBot 𝔓 + have := h𝔓p + have := h𝔓lo + have : Finite (𝓞 M ⧸ 𝔓) := Ideal.finiteQuotientOfFreeOfNeBot 𝔓 (ne_bot_of_ramificationIdx_eq_one K M (UnramifiedIn.ramificationIdx_eq_one K M _hunrM 𝔓 h𝔓lo)) set σM : Gal(M/K) := arithFrobAt (𝓞 K) Gal(M/K) 𝔓 have hMfrobσM : IsArithFrobAt (𝓞 K) σM 𝔓 := IsArithFrobAt.arithFrobAt (𝓞 K) Gal(M/K) 𝔓 have hconjM : IsConj σM τM := ConjClasses.mk_eq_mk_iff_isConj.mp ((frobeniusClass_eq_mk_of_isArithFrobAt K M 𝔭 _hunrM σM 𝔓 hMfrobσM h𝔓lo).symm.trans _hfr) - haveI : (𝔓.under (𝓞 L)).IsPrime := Ideal.IsPrime.under (𝓞 L) 𝔓 - haveI : (𝔓.under (𝓞 L)).LiesOver 𝔭 := ⟨((Ideal.under_under 𝔓).trans h𝔓lo.over.symm).symm⟩ + have : (𝔓.under (𝓞 L)).IsPrime := Ideal.IsPrime.under (𝓞 L) 𝔓 + have : (𝔓.under (𝓞 L)).LiesOver 𝔭 := ⟨((Ideal.under_under 𝔓).trans h𝔓lo.over.symm).symm⟩ rw [frobeniusClass_eq_mk_of_isArithFrobAt K L 𝔭 _hunrL (σM.restrictNormal L) (𝔓.under (𝓞 L)) (isArithFrobAt_restrictNormal_repl K L M σM 𝔓 hMfrobσM) inferInstance] refine ConjClasses.mk_eq_mk_iff_isConj.mpr ?_ @@ -527,12 +527,12 @@ private theorem frobeniusClass_proj (_hfr : frobeniusClass K M 𝔭 = ConjClasses.mk τM) : frobeniusClass K L 𝔭 = ConjClasses.mk σ := by by_cases hp : 𝔭.IsPrime - · haveI := hp + · have := hp exact frobeniusClass_proj_isPrime_aux K L M σ τM _hτM 𝔭 _hunrM _hunrL _hfr · have hMjunk : frobeniusClass K M 𝔭 = ConjClasses.mk 1 := by - rw [frobeniusClass, dif_neg fun h ↦ hp h.1] + rw [frobeniusClass, dite_eq_right fun h ↦ hp h.1] have hLjunk : frobeniusClass K L 𝔭 = ConjClasses.mk 1 := by - rw [frobeniusClass, dif_neg fun h ↦ hp h.1] + rw [frobeniusClass, dite_eq_right fun h ↦ hp h.1] have hconj : IsConj (1 : Gal(M/K)) τM := ConjClasses.mk_eq_mk_iff_isConj.mp (hMjunk.symm.trans _hfr) have hτM1 : τM = 1 := isConj_one_right.mp hconj @@ -583,16 +583,16 @@ private theorem isGalois_compositum_base [IsScalarTower K L M] [IsCyclotomicExtension {m} L M] : IsGalois K M := by obtain ⟨ζ, hζ⟩ : ∃ r : M, IsPrimitiveRoot r m := IsCyclotomicExtension.exists_isPrimitiveRoot (S := {m}) L M (Set.mem_singleton m) (NeZero.ne m) - haveI : FiniteDimensional K M := inferInstance - haveI hsep : Algebra.IsSeparable K M := inferInstance + have : FiniteDimensional K M := inferInstance + have hsep : Algebra.IsSeparable K M := inferInstance set A : IntermediateField K M := (IsScalarTower.toAlgHom K L M).fieldRange with hA set B : IntermediateField K M := IntermediateField.adjoin K {ζ} with hB - haveI hAnormal : Normal K A := + have hAnormal : Normal K A := Normal.of_algEquiv (AlgEquiv.ofInjectiveField (IsScalarTower.toAlgHom K L M)) - haveI hBcyc : IsCyclotomicExtension {m} K B := + have hBcyc : IsCyclotomicExtension {m} K B := hζ.intermediateField_adjoin_isCyclotomicExtension (K := K) - haveI hBgal : IsGalois K B := IsCyclotomicExtension.isGalois (S := {m}) (K := K) (L := B) - haveI hBnormal : Normal K B := hBgal.to_normal + have hBgal : IsGalois K B := IsCyclotomicExtension.isGalois (S := {m}) (K := K) (L := B) + have hBnormal : Normal K B := hBgal.to_normal have hsup : A ⊔ B = ⊤ := by have hζalg : IsAlgebraic K ζ := Algebra.IsAlgebraic.isAlgebraic ζ have hsubalg : (IsScalarTower.toAlgHom K L M).range ⊔ Algebra.adjoin K {ζ} @@ -606,7 +606,7 @@ private theorem isGalois_compositum_base IntermediateField.adjoin_simple_toSubalgebra_of_isAlgebraic hζalg, AlgHom.fieldRange_toSubalgebra, IntermediateField.top_toSubalgebra] exact hsubalg - haveI hnormal : Normal K M := by + have hnormal : Normal K M := by have h := IntermediateField.normal_sup K M A B rw [hsup] at h exact Normal.of_algEquiv (IntermediateField.topEquiv (F := K) (E := M)) @@ -615,35 +615,38 @@ private theorem isGalois_compositum_base /-- **Unramifiedness descends to an intermediate field.** If a prime `𝔭` of `K` is unramified in the top field `M` of a tower `K ⊆ L ⊆ M`, it is unramified in `L`: for a maximal prime `𝔮` of `𝓞 L` over `𝔭`, pick a prime `𝔓` of `𝓞 M` over `𝔮`; then `e(𝔓/𝔭) = 1` (from the `M`-side -hypothesis) factors as `e(𝔮/𝔭)·e(𝔓/𝔮)` (`Ideal.ramificationIdx_algebra_tower`), forcing +hypothesis) factors as `e(𝔮/𝔭)·e(𝔓/𝔮)` (`Ideal.ramificationIdx'_algebra_tower`), forcing `e(𝔮/𝔭) = 1`. Supplies C4's `_hunrL : UnramifiedIn K L 𝔭` input from `UnramifiedIn K M 𝔭`. -/ private theorem unramifiedIn_tower_descend (K L M : Type*) [Field K] [NumberField K] [Field L] [NumberField L] [Field M] [NumberField M] [Algebra K L] [Algebra K M] [Algebra L M] [IsScalarTower K L M] [IsGalois K L] [IsGalois K M] (𝔭 : Ideal (𝓞 K)) (hunr : UnramifiedIn K M 𝔭) : UnramifiedIn K L 𝔭 := by - haveI : IsScalarTower (𝓞 K) (𝓞 L) (𝓞 M) := inferInstance + have : IsScalarTower (𝓞 K) (𝓞 L) (𝓞 M) := inferInstance refine ⟨hunr.1, fun 𝔮 h𝔮max h𝔮lo ↦ ?_⟩ - haveI := h𝔮max - haveI := h𝔮lo - haveI h𝔮p : 𝔮.IsPrime := h𝔮max.isPrime + have := h𝔮max + have := h𝔮lo + have h𝔮p : 𝔮.IsPrime := h𝔮max.isPrime have h𝔮bot : 𝔮 ≠ ⊥ := Ideal.ne_bot_of_liesOver_of_ne_bot hunr.1 𝔮 obtain ⟨𝔓, _, h𝔓p, h𝔓comap⟩ := Ideal.exists_ideal_over_prime_of_isIntegral (S := 𝓞 M) 𝔮 ⊥ (by simp) - haveI := h𝔓p - haveI h𝔓lo𝔮 : 𝔓.LiesOver 𝔮 := ⟨h𝔓comap.symm⟩ + have := h𝔓p + have h𝔓lo𝔮 : 𝔓.LiesOver 𝔮 := ⟨h𝔓comap.symm⟩ have h𝔓bot : 𝔓 ≠ ⊥ := Ideal.ne_bot_of_liesOver_of_ne_bot h𝔮bot 𝔓 - haveI h𝔓max : 𝔓.IsMaximal := h𝔓p.isMaximal h𝔓bot + have h𝔓max : 𝔓.IsMaximal := h𝔓p.isMaximal h𝔓bot have h𝔮under : Ideal.under (𝓞 L) 𝔓 = 𝔮 := h𝔓lo𝔮.over.symm have h𝔭under : Ideal.under (𝓞 K) 𝔮 = 𝔭 := h𝔮lo.over.symm - haveI h𝔓lo𝔭 : 𝔓.LiesOver 𝔭 := ⟨by rw [← h𝔭under, ← h𝔮under, Ideal.under_under]⟩ + have h𝔓lo𝔭 : 𝔓.LiesOver 𝔭 := ⟨by rw [← h𝔭under, ← h𝔮under, Ideal.under_under]⟩ have hunderP : Ideal.under (𝓞 K) 𝔓 = 𝔭 := h𝔓lo𝔭.over.symm have hP1 : (Ideal.under (𝓞 K) 𝔓).ramificationIdx' 𝔓 = 1 := by rw [Ideal.ramificationIdx'_eq_ramificationIdx _ 𝔓 (hunderP ▸ hunr.1)] exact Ideal.ramificationIdx_eq_one_iff.mpr (hunr.2 𝔓 h𝔓max h𝔓lo𝔭) rw [hunderP] at hP1 - have htower := Ideal.ramificationIdx_algebra_tower (R := 𝓞 K) (S := 𝓞 L) (T := 𝓞 M) + have htower := Ideal.ramificationIdx'_algebra_tower (R := 𝓞 K) (S := 𝓞 L) (T := 𝓞 M) (p := 𝔭) (P := 𝔮) (Q := 𝔓) (Ideal.map_ne_bot_of_ne_bot h𝔮bot) - (Ideal.map_ne_bot_of_ne_bot hunr.1) (by rw [Ideal.map_le_iff_le_comap, h𝔓comap]) + (Ideal.map_ne_bot_of_ne_bot hunr.1) (by + rw [Ideal.map_le_iff_le_comap] + change 𝔮 ≤ 𝔓.under (𝓞 L) + rw [h𝔓comap]) rw [hP1] at htower have he𝔮 : 𝔭.ramificationIdx' 𝔮 = 1 := Nat.eq_one_of_mul_eq_one_right htower.symm rw [← Ideal.ramificationIdx_eq_one_iff, @@ -732,15 +735,15 @@ private theorem density_crossing_fibre_aux frobeniusClass K M 𝔭 = ConjClasses.mk s} ((Nat.card Gal(L/K) * Nat.card ((ZMod m)ˣ) : ℝ)⁻¹) := by set F : IntermediateField K M := IntermediateField.fixedField (Subgroup.zpowers s) with hF - haveI : IsScalarTower K ↥F M := F.isScalarTower_mid' - haveI : IsCyclotomicExtension {m} ↥F M := + have : IsScalarTower K ↥F M := F.isScalarTower_mid' + have : IsCyclotomicExtension {m} ↥F M := compositum_isCyclotomic_over_fixedField K L M m s hgate set σE : Gal(M/↥F) := IntermediateField.subgroupEquivAlgEquiv (Subgroup.zpowers s) ⟨s, Subgroup.mem_zpowers s⟩ have hlift := density_lift_through_fixedField_repl K M s F σE (by ext x; rfl) rfl (chebotarev_cyclotomic (K := ↥F) (L := M) m hm4 σE) have hcarrier : Nat.card (ConjClasses.mk s).carrier = 1 := by - letI : CommMonoid Gal(M/K) := IsMulCommutative.instCommMonoid + let : CommMonoid Gal(M/K) := IsMulCommutative.instCommMonoid have hcar : (ConjClasses.mk s).carrier = {s} := by ext a rw [ConjClasses.mem_carrier_iff_mk_eq, ConjClasses.mk_eq_mk_iff_isConj, @@ -782,11 +785,11 @@ private theorem exists_crossing_family_tagged (∀ τ, HasDirichletDensity (S τ) ((Nat.card Gal(L/K) * Nat.card ((ZMod m)ˣ) : ℝ)⁻¹)) := by classical - haveI : NeZero m := ⟨by lia⟩ + have : NeZero m := ⟨by lia⟩ let M := CyclotomicField m L - haveI : IsGalois K M := isGalois_compositum_base K L m M - haveI : IsGalois L M := IsGalois.tower_top_of_isGalois K L M - haveI : FiniteDimensional K M := inferInstance + have : IsGalois K M := isGalois_compositum_base K L m M + have : IsGalois L M := IsGalois.tower_top_of_isGalois K L M + have : FiniteDimensional K M := inferInstance obtain ⟨ζ, hζ⟩ : ∃ r : M, IsPrimitiveRoot r m := IsCyclotomicExtension.exists_isPrimitiveRoot (S := {m}) L M (Set.mem_singleton m) (NeZero.ne m) set χK : Gal(M/K) →* (ZMod m)ˣ := hζ.autToPow K with hχK @@ -796,10 +799,10 @@ private theorem exists_crossing_family_tagged MulEquiv.ofBijective _ hΦbij with hequivΦ set e2 : Gal(M/L) ≃* (ZMod m)ˣ := MulEquiv.ofBijective (hζ.autToPow L) (autToPow_L_bijective K L M m hcop ζ hζ) with he2 - haveI : IsMulCommutative Gal(M/L) := + have : IsMulCommutative Gal(M/L) := .of_comm fun a b ↦ e2.injective (by rw [map_mul, map_mul]; exact mul_comm (e2 a) (e2 b)) - haveI hGcomm : ∀ x y : Gal(L/K), x * y = y * x := fun x y ↦ mul_comm' x y - haveI : IsMulCommutative Gal(M/K) := + have hGcomm : ∀ x y : Gal(L/K), x * y = y * x := fun x y ↦ mul_comm' x y + have : IsMulCommutative Gal(M/K) := .of_comm fun a b ↦ equivΦ.injective (by rw [map_mul, map_mul, Prod.mul_def, Prod.mul_def, hGcomm, mul_comm ((equivΦ a).2) ((equivΦ b).2)]) @@ -933,8 +936,8 @@ private theorem factorization_ordCompl_mul_pow (E p v : ℕ) (hp : p.Prime) (hE simp only [Finsupp.coe_add, Pi.add_apply, hp.factorization_pow, Finsupp.single_apply, Nat.factorization_ordCompl] by_cases hq : q = p - · subst hq; rw [Finsupp.erase_same, if_pos rfl, if_pos rfl, zero_add] - · rw [Finsupp.erase_ne hq, if_neg fun h ↦ hq h.symm, if_neg hq, add_zero] + · subst hq; rw [Finsupp.erase_same, ite_eq_left rfl, ite_eq_left rfl, zero_add] + · rw [Finsupp.erase_ne hq, ite_eq_right fun h ↦ hq h.symm, ite_eq_right hq, add_zero] /-- If `d ∣ E` and the `p`-adic valuation of `d` is `≤ v - 1`, then `d` divides the "capped" modulus `ordCompl[p] E * p ^ (v - 1)` (which replaces `E`'s `p`-part by @@ -947,8 +950,8 @@ private theorem dvd_capped (E d p v : ℕ) (hp : p.Prime) (hE : E ≠ 0) (hd : d intro q rw [factorization_ordCompl_mul_pow E p v hp hE q] by_cases hq : q = p - · subst hq; rwa [if_pos rfl] - · rw [if_neg hq]; exact (Nat.factorization_le_iff_dvd hdne hE).mpr hd q + · subst hq; rwa [ite_eq_left rfl] + · rw [ite_eq_right hq]; exact (Nat.factorization_le_iff_dvd hdne hE).mpr hd q /-- The capped modulus `ordCompl[p] E * p ^ (v - 1)` divides `E` when `v - 1 ≤ v_p(E)`. -/ private theorem M_dvd_E (E p v : ℕ) (hp : p.Prime) (hE : E ≠ 0) (hle : v - 1 ≤ E.factorization p) : @@ -958,8 +961,8 @@ private theorem M_dvd_E (E p v : ℕ) (hp : p.Prime) (hE : E ≠ 0) (hle : v - 1 intro q rw [factorization_ordCompl_mul_pow E p v hp hE q] by_cases hq : q = p - · subst hq; rwa [if_pos rfl] - · rw [if_neg hq] + · subst hq; rwa [ite_eq_left rfl] + · rw [ite_eq_right hq] /-- Factoring out the complementary `p`-power: `E = (ordCompl[p] E * p ^ (v - 1)) * p ^ (v_p(E) - (v - 1))`, used to compute `E / M = p ^ (v_p(E) - (v - 1))`. -/ @@ -1341,7 +1344,7 @@ theorem liminf_ratio_ge_inv_card_G rw [Nat.coprime_comm, (hmp k).coprime_iff_not_dvd] exact fun hdvd ↦ absurd (Nat.le_of_dvd hdBpos hdvd) (Nat.not_le.mpr (hmgt k)) have hexp : ∀ k, Monoid.exponent (ZMod (m k))ˣ = m k - 1 := fun k ↦ by - haveI : Fact (m k).Prime := ⟨hmp k⟩ + have : Fact (m k).Prime := ⟨hmp k⟩ rw [IsCyclic.exponent_eq_card, Nat.card_eq_fintype_card, ZMod.card_units_eq_totient, Nat.totient_prime (hmp k)] have hbound : ∀ k : ℕ, @@ -1393,7 +1396,7 @@ theorem ratioSum_frobeniusFibres_tendsto_one set R : Set (Ideal (𝓞 K)) := {𝔭 : Ideal (𝓞 K) | 𝔭.IsPrime ∧ 𝔭 ≠ ⊥ ∧ ¬ UnramifiedIn K L 𝔭} with hR set D : ℝ → ℝ := primeIdealZetaSum (Set.univ : Set (Ideal (𝓞 K))) with hD - letI : CommMonoid Gal(L/K) := IsMulCommutative.instCommMonoid + let : CommMonoid Gal(L/K) := IsMulCommutative.instCommMonoid have hmk_inj : Function.Injective (ConjClasses.mk : Gal(L/K) → ConjClasses Gal(L/K)) := ConjClasses.mk_injective have hpd : ((Finset.univ : Finset Gal(L/K)) : Set Gal(L/K)).PairwiseDisjoint S := by @@ -1514,7 +1517,7 @@ theorem tendsto_inv_card_of_liminf_ge_of_sum_tendsto_one {ι : Type*} [Fintype have hFlimsup : limsup F l = 1 := hsum.limsup_eq have hgle : ∀ i, l.IsBoundedUnder (· ≤ ·) (g i) := isBoundedUnder_le_of_isBoundedUnder_le_sum g hFle hbelow - haveI : Nonempty ι := ⟨i₀⟩ + have : Nonempty ι := ⟨i₀⟩ have hNpos : 0 < N := Fintype.card_pos have hNR : (0 : ℝ) < N := by exact_mod_cast hNpos set t : Finset ι := Finset.univ.erase i₀ with ht diff --git a/projects/Chebotarev/CebotarevDensity/AbsoluteDegreeOneDensity.lean b/projects/Chebotarev/CebotarevDensity/AbsoluteDegreeOneDensity.lean new file mode 100644 index 000000000..a484ff648 --- /dev/null +++ b/projects/Chebotarev/CebotarevDensity/AbsoluteDegreeOneDensity.lean @@ -0,0 +1,144 @@ +module + +public import CebotarevDensity.Density +public import CebotarevDensity.ForMathlib.TsumFiberBound +public import Mathlib.RingTheory.RamificationInertia.Basic +public import Mathlib.NumberTheory.RamificationInertia.Inertia +public import Mathlib.Analysis.PSeries +public import Mathlib.RingTheory.Ideal.Int + +/-! +# Discarding primes of absolute residue degree greater than one + +The higher-degree terms are bounded by `[K : ℚ] * ∑ n⁻²`, independently of +`s > 1`. They consequently have zero Dirichlet density, even after intersection +with an arbitrary set of prime ideals. +-/ + +@[expose] public section + +noncomputable section + +open Filter NumberField Topology Set + +namespace Chebotarev + +variable {K : Type*} [Field K] [NumberField K] + +private theorem absNorm_rpow_neg_le_intUnder_sq + (P : Ideal (𝓞 K)) [P.IsPrime] (hP : P ≠ ⊥) + (hdegree : ¬ P.absNorm.Prime) {s : ℝ} (hs : 1 < s) : + (P.absNorm : ℝ) ^ (-s) ≤ ((P.under ℤ).absNorm : ℝ) ^ (-(2 : ℝ)) := by + let : NeZero P := ⟨hP⟩ + have hp : (P.under ℤ).absNorm.Prime := Nat.absNorm_under_prime P + have : P.LiesOver (P.under ℤ) := Ideal.over_under (A := ℤ) (P := P) + have hpow := (Ideal.absNorm_pow_inertiaDeg (P.under ℤ) P).symm + have hdeg : 2 ≤ P.inertiaDeg ℤ := by + have hpos : 0 < P.inertiaDeg ℤ := Ideal.inertiaDeg_pos P ℤ + have hne : P.inertiaDeg ℤ ≠ 1 := by + intro h + apply hdegree + rw [hpow, h, pow_one] + exact hp + omega + rw [hpow, Nat.cast_pow, + ← Real.rpow_natCast ((P.under ℤ).absNorm : ℝ) (P.inertiaDeg ℤ), + ← Real.rpow_mul (by positivity)] + apply Real.rpow_le_rpow_of_exponent_le (by exact_mod_cast hp.one_lt.le) + nlinarith [mul_le_mul (show (2 : ℝ) ≤ (P.inertiaDeg ℤ : ℝ) by exact_mod_cast hdeg) + hs.le (by norm_num) (by positivity : (0 : ℝ) ≤ (P.inertiaDeg ℤ : ℝ))] + +/-- The non-prime-norm part of any set of prime ideals has a uniform Dirichlet-series bound. -/ +theorem primeIdealZetaSum_nonprimeNorm_le (S : Set (Ideal (𝓞 K))) {s : ℝ} (hs : 1 < s) : + primeIdealZetaSum {P | P ∈ S ∧ ¬ P.absNorm.Prime} s ≤ + (Module.finrank ℚ K : ℝ) * ∑' n : ℕ, (n : ℝ) ^ (-(2 : ℝ)) := by + let A := {P : Ideal (𝓞 K) // (P ∈ S ∧ ¬ P.absNorm.Prime) ∧ P.IsPrime ∧ P ≠ ⊥} + let B := {p : Ideal ℤ // p.IsPrime ∧ p ≠ ⊥} + have hunder : ∀ P : A, (P.1.under ℤ).IsPrime ∧ P.1.under ℤ ≠ ⊥ := by + intro P + let := P.2.2.1 + exact ⟨inferInstance, Ideal.IsIntegral.under_ne_bot ℤ P.2.2.2⟩ + let g : A → B := fun P => ⟨P.1.under ℤ, hunder P⟩ + have hfib : ∀ p : B, Finite (g ⁻¹' {p} : Set A) ∧ + Nat.card (g ⁻¹' {p} : Set A) ≤ Module.finrank ℚ K := by + intro p + let := p.2.1 + let : p.1.IsMaximal := p.2.1.isMaximal p.2.2 + have hmem : ∀ P : (g ⁻¹' {p} : Set A), P.1.1.IsPrime ∧ P.1.1.LiesOver p.1 := by + intro P + let := P.1.2.2.1 + refine ⟨P.1.2.2.1, ⟨?_⟩⟩ + exact (congrArg Subtype.val P.2 : P.1.1.under ℤ = p.1) ▸ + (Ideal.over_under (A := ℤ) (P := P.1.1)).over + let f : (g ⁻¹' {p} : Set A) → p.1.primesOver (𝓞 K) := fun P => ⟨P.1.1, hmem P⟩ + have hfinj : Function.Injective f := by + intro P Q h + apply Subtype.ext + apply Subtype.ext + exact congrArg (fun x : p.1.primesOver (𝓞 K) => x.1) h + let : Finite (p.1.primesOver (𝓞 K)) := + (IsDedekindDomain.primesOver_finite p.1 _).to_subtype + have hcard : Nat.card (p.1.primesOver (𝓞 K)) ≤ Module.finrank ℚ K := by + classical + let : Fintype (p.1.primesOver (𝓞 K)) := Fintype.ofFinite _ + calc + Nat.card (p.1.primesOver (𝓞 K)) = ∑ _q : p.1.primesOver (𝓞 K), (1 : ℕ) := by + simp [Nat.card_eq_fintype_card] + _ ≤ ∑ q : p.1.primesOver (𝓞 K), q.1.ramificationIdx ℤ * q.1.inertiaDeg ℤ := by + apply Finset.sum_le_sum + intro q _ + have : q.1.IsPrime := q.2.1 + exact Nat.mul_pos (Ideal.ramificationIdx_pos q.1 ℤ) (Ideal.inertiaDeg_pos q.1 ℤ) + _ = Module.finrank ℤ (𝓞 K) := Ideal.sum_ramification_inertia_eq_finrank p.1 (𝓞 K) + _ = Module.finrank ℚ K := RingOfIntegers.rank K + exact ⟨Finite.of_injective f hfinj, (Nat.card_le_card_of_injective f hfinj).trans hcard⟩ + have hnorminj : Function.Injective (fun p : B => p.1.absNorm) := by + intro p q h + change p.1.absNorm = q.1.absNorm at h + apply Subtype.ext + rw [← Int.ideal_span_absNorm_eq_self p.1, ← Int.ideal_span_absNorm_eq_self q.1, h] + have hnat : Summable (fun n : ℕ => (n : ℝ) ^ (-(2 : ℝ))) := + Real.summable_nat_rpow.mpr (by norm_num) + have hsum : Summable (fun p : B => (p.1.absNorm : ℝ) ^ (-(2 : ℝ))) := + hnat.comp_injective hnorminj + calc + primeIdealZetaSum {P | P ∈ S ∧ ¬ P.absNorm.Prime} s ≤ + (Module.finrank ℚ K : ℝ) * ∑' p : B, (p.1.absNorm : ℝ) ^ (-(2 : ℝ)) := by + apply tsum_real_comp_le_card_fibre_mul g _ _ _ + (summable_prime_absNorm_rpow _ hs) hsum + (fun _ => by positivity) (fun _ => by positivity) + · intro P + let := P.2.2.1 + exact absNorm_rpow_neg_le_intUnder_sq P.1 P.2.2.2 P.2.1.2 hs + · exact fun p => (hfib p).1 + · exact fun p => (hfib p).2 + _ ≤ (Module.finrank ℚ K : ℝ) * ∑' n : ℕ, (n : ℝ) ^ (-(2 : ℝ)) := by + apply mul_le_mul_of_nonneg_left _ (by positivity) + exact hsum.tsum_le_tsum_of_inj _ hnorminj (fun _ _ => by positivity) + (fun _ => le_rfl) hnat + +/-- Removing prime ideals of absolute residue degree greater than one preserves density. -/ +theorem HasDirichletDensity.primeNorm {S : Set (Ideal (𝓞 K))} {δ : ℝ} + (hS : HasDirichletDensity S δ) : + HasDirichletDensity {P | P ∈ S ∧ P.absNorm.Prime} δ := by + let T : Set (Ideal (𝓞 K)) := {P | P ∈ S ∧ P.absNorm.Prime} + let U : Set (Ideal (𝓞 K)) := {P | P ∈ S ∧ ¬ P.absNorm.Prime} + have hzero : HasDirichletDensity U 0 := + tendsto_primeIdealZetaSum_div_univ_zero_of_le_const K U _ + (eventually_nhdsWithin_of_forall fun s hs => primeIdealZetaSum_nonprimeNorm_le S hs) + have hdisjoint : Disjoint T U := by + rw [Set.disjoint_left] + exact fun _ ht hu => hu.2 ht.2 + have hunion : T ∪ U = S := by + ext P + simp only [T, U, Set.mem_union, Set.mem_ofPred_eq] + tauto + have h := hS.sub hzero + simp only [sub_zero] at h + apply h.congr' + filter_upwards [self_mem_nhdsWithin] with s hs + have hsum : primeIdealZetaSum S s = primeIdealZetaSum T s + primeIdealZetaSum U s := by + rw [← hunion, primeIdealZetaSum_union_of_disjoint hdisjoint hs] + rw [hsum, add_div, add_sub_cancel_right] + +end Chebotarev diff --git a/projects/Chebotarev/CebotarevDensity/Cyclotomic.lean b/projects/Chebotarev/CebotarevDensity/Cyclotomic.lean index c0e83f4b7..7a08eb09f 100644 --- a/projects/Chebotarev/CebotarevDensity/Cyclotomic.lean +++ b/projects/Chebotarev/CebotarevDensity/Cyclotomic.lean @@ -205,7 +205,7 @@ theorem character_orthogonality_cyclotomic_eq ConjClasses.mk_eq_mk_iff_isConj.mp (hmk.trans _h) rw [SemiconjBy, mul_comm' (c : Gal(L/K))] at hc rw [mul_right_cancel hc, mul_inv_cancel] - rw [sum_galoisCharacter_mul_inv_eq K L σ τ, if_pos heq] + rw [sum_galoisCharacter_mul_inv_eq K L σ τ, ite_eq_left heq] /-- Sharifi 7.2.1 character orthogonality, **non-matching case**: when `frobeniusClass K L 𝔭 ≠ ConjClasses.mk σ`, the character sum @@ -222,7 +222,7 @@ theorem character_orthogonality_cyclotomic_ne have hmk : ConjClasses.mk τ = frobeniusClass K L 𝔭 := Quotient.out_eq _ have hne : σ * τ⁻¹ ≠ 1 := fun hσ ↦ _h <| hmk.symm.trans (congrArg ConjClasses.mk (mul_inv_eq_one.mp hσ)).symm - rw [sum_galoisCharacter_mul_inv_eq K L σ τ, if_neg hne] + rw [sum_galoisCharacter_mul_inv_eq K L σ τ, ite_eq_right hne] /-! ### Complex-analytic core of the cyclotomic χ≠1 bound @@ -615,7 +615,7 @@ private theorem artinLSeries_prime_sum_bounded_of_analytic_extension set D : Set ℂ := {s : ℂ | 1 - (Module.finrank ℚ K : ℝ)⁻¹ < s.re} with hD have hDopen : IsOpen D := by rw [hD]; exact isOpen_lt continuous_const Complex.continuous_re have hmemD : ∀ s : ℝ, 1 ≤ s → (s : ℂ) ∈ D := fun s hs ↦ by - rw [hD]; simp only [Set.mem_setOf_eq, Complex.ofReal_re] + rw [hD]; simp only [Set.mem_ofPred_eq, Complex.ofReal_re] have hfr : 0 < Module.finrank ℚ K := Module.finrank_pos have : (0 : ℝ) < (Module.finrank ℚ K : ℝ)⁻¹ := by positivity linarith @@ -796,8 +796,8 @@ private theorem sum_charTwist_mul_twistedPrimeSum_eq (Nat.card Gal(L/K) : ℂ) * (Ideal.absNorm 𝔭.1 : ℂ) ^ (-(s : ℂ)) else 0 := fun 𝔭 ↦ by have := 𝔭.2.1 by_cases h : frobeniusClass K L 𝔭.1 = ConjClasses.mk σ - · rw [sum_charTwist_eq K L m σ 𝔭.1 𝔭.2.2 h, if_pos h] - · rw [sum_charTwist_ne K L m σ 𝔭.1 𝔭.2.2 h, if_neg h, zero_mul] + · rw [sum_charTwist_eq K L m σ 𝔭.1 𝔭.2.2 h, ite_eq_left h] + · rw [sum_charTwist_ne K L m σ 𝔭.1 𝔭.2.2 h, ite_eq_right h, zero_mul] have hfinj : Function.Injective (fun 𝔭 : {𝔭 : Ideal (𝓞 K) // 𝔭 ∈ {𝔭 : Ideal (𝓞 K) | 𝔭.IsPrime ∧ UnramifiedIn K L 𝔭 ∧ frobeniusClass K L 𝔭 = ConjClasses.mk σ} ∧ 𝔭.IsPrime ∧ 𝔭 ≠ ⊥} ↦ @@ -812,11 +812,11 @@ private theorem sum_charTwist_mul_twistedPrimeSum_eq (f := fun 𝔭 : {𝔭 : Ideal (𝓞 K) // 𝔭.IsPrime ∧ UnramifiedIn K L 𝔭} ↦ if frobeniusClass K L 𝔭.1 = ConjClasses.mk σ then (Ideal.absNorm 𝔭.1 : ℝ) ^ (-s) else 0) ?_] - · exact tsum_congr fun 𝔭 ↦ (if_pos 𝔭.2.1.2.2).symm + · exact tsum_congr fun 𝔭 ↦ (ite_eq_left 𝔭.2.1.2.2).symm · rintro 𝔭 h𝔭 have h : frobeniusClass K L 𝔭.1 = ConjClasses.mk σ := by by_contra hne - exact h𝔭 (if_neg hne) + exact h𝔭 (ite_eq_right hne) exact ⟨⟨𝔭.1, ⟨𝔭.2.1, 𝔭.2.2, h⟩, 𝔭.2.1, UnramifiedIn.ne_bot K L 𝔭.2.2⟩, rfl⟩ rw [hinterchange, tsum_congr hcollapse, hfibre, Complex.ofReal_tsum, ← tsum_mul_left] refine tsum_congr fun 𝔭 ↦ ?_ diff --git a/projects/Chebotarev/CebotarevDensity/CyclotomicNormResidue.lean b/projects/Chebotarev/CebotarevDensity/CyclotomicNormResidue.lean index 4cf9574ba..1bcb85b86 100644 --- a/projects/Chebotarev/CebotarevDensity/CyclotomicNormResidue.lean +++ b/projects/Chebotarev/CebotarevDensity/CyclotomicNormResidue.lean @@ -56,7 +56,7 @@ theorem cyclotomic_frobenius_acts_as_norm_power haveI : Finite (𝓞 L ⧸ 𝔓) := UnramifiedIn.finite_quotient K L hunr 𝔓 hP ∀ ζ : L, ζ ∈ primitiveRoots m L → arithFrobAt (𝓞 K) Gal(L/K) 𝔓 ζ = ζ ^ Ideal.absNorm 𝔭 := by - haveI : Finite (𝓞 L ⧸ 𝔓) := UnramifiedIn.finite_quotient K L hunr 𝔓 hP + have : Finite (𝓞 L ⧸ 𝔓) := UnramifiedIn.finite_quotient K L hunr 𝔓 hP intro ζ hζmem set φ := arithFrobAt (𝓞 K) Gal(L/K) 𝔓 have hζ : IsPrimitiveRoot ζ m := (mem_primitiveRoots (NeZero.pos m)).mp hζmem @@ -64,9 +64,8 @@ theorem cyclotomic_frobenius_acts_as_norm_power have hzc : (algebraMap (𝓞 L) L) z = ζ := rfl have hzpow : z ^ m = 1 := hζ.toInteger_isPrimitiveRoot.pow_eq_one set q := Ideal.absNorm 𝔭 - have h𝔭ne : 𝔭 ≠ ⊥ := UnramifiedIn.ne_bot K L hunr have hcopP : (Ideal.absNorm 𝔓).Coprime m := by - rw [Ideal.absNorm_eq_pow_inertiaDeg'_of_liesOver 𝔓 𝔭 ‹𝔭.IsPrime› h𝔭ne] + rw [← Ideal.absNorm_pow_inertiaDeg 𝔭 𝔓] exact Nat.Coprime.pow_left _ hcop have hN1 : Ideal.absNorm 𝔓 ≠ 1 := fun h ↦ ‹𝔓.IsPrime›.ne_top (Ideal.absNorm_eq_one_iff.mp h) have hmnotmem : (m : 𝓞 L) ∉ 𝔓 := by @@ -92,7 +91,6 @@ private theorem pow_natModEq_of_pow_eq {S : Type*} [CommRing S] [IsDomain S] {μ [NeZero n] (hμ : IsPrimitiveRoot μ n) {a b : ℕ} (h : μ ^ a = μ ^ b) : a ≡ b [MOD n] := hμ.eq_orderOf ▸ (hμ.isOfFinOrder (NeZero.ne n)).pow_eq_pow_iff_modEq.mp h -set_option backward.isDefEq.respectTransparency false in /-- **The cyclotomic Frobenius is the norm residue** (multiplicative form). For `L = K(μ_m)`, a primitive `m`-th root `ζ` of unity in `L`, and a prime `𝔭` of `K` unramified in `L` with `N𝔭` coprime to `m`, the cyclotomic character `IsPrimitiveRoot.autToPow` sends the Frobenius @@ -105,15 +103,16 @@ theorem autToPow_frobeniusClass_out hζ.autToPow K ((frobeniusClass K L 𝔭).out : L ≃ₐ[K] L) = ZMod.unitOfCoprime (Ideal.absNorm 𝔭) hcop := by obtain ⟨𝔓, h𝔓prime, h𝔓lo, _⟩ := exists_prime_liesOver K L 𝔭 (UnramifiedIn.ne_bot K L hunr) - haveI := h𝔓prime - haveI := h𝔓lo - haveI : Finite (𝓞 L ⧸ 𝔓) := UnramifiedIn.finite_quotient K L hunr 𝔓 h𝔓lo + have := h𝔓prime + have := h𝔓lo + have : Finite (𝓞 L ⧸ 𝔓) := UnramifiedIn.finite_quotient K L hunr 𝔓 h𝔓lo set φ : L ≃ₐ[K] L := arithFrobAt (𝓞 K) Gal(L/K) 𝔓 have hclass : frobeniusClass K L 𝔭 = ConjClasses.mk φ := frobeniusClass_eq_mk_of_isArithFrobAt K L 𝔭 hunr φ 𝔓 (IsArithFrobAt.arithFrobAt (𝓞 K) Gal(L/K) 𝔓) h𝔓lo have hconj : IsConj ((frobeniusClass K L 𝔭).out) φ := by - rw [← ConjClasses.mk_eq_mk_iff_isConj, ← hclass, ConjClasses.mk, Quotient.out_eq] + apply ConjClasses.mk_eq_mk_iff_isConj.mp + exact (Quotient.out_eq (frobeniusClass K L 𝔭)).trans hclass rw [isConj_iff_eq.mp ((hζ.autToPow K).map_isConj hconj)] have hact : φ ζ = ζ ^ Ideal.absNorm 𝔭 := cyclotomic_frobenius_acts_as_norm_power K L m 𝔭 hunr hcop 𝔓 h𝔓lo ζ @@ -145,7 +144,7 @@ private theorem smul_algebraMap_eq (σ : L ≃ₐ[K] L) (y : 𝓞 F) : haveI : IsScalarTower K F L := F.isScalarTower_mid' σ • (algebraMap (𝓞 F) (𝓞 L) y) = algebraMap (𝓞 F) (𝓞 L) ((σ.restrictNormal F) • y) := by - haveI : IsScalarTower K F L := F.isScalarTower_mid' + have : IsScalarTower K F L := F.isScalarTower_mid' have hbridgeL : ∀ (g : L ≃ₐ[K] L) (x : 𝓞 L), ((g • x : 𝓞 L) : L) = g • (x : L) := fun g x ↦ by simpa [Algebra.smul_def] using (smul_distrib_smul (G := L ≃ₐ[K] L) (R := 𝓞 L) (S := L) g x 1).symm @@ -173,7 +172,7 @@ private theorem isArithFrobAt_restrictNormal (𝔓 : Ideal (𝓞 L)) (hσ : IsArithFrobAt (𝓞 K) σ 𝔓) : haveI : IsScalarTower K F L := F.isScalarTower_mid' IsArithFrobAt (𝓞 K) (σ.restrictNormal F) (𝔓.under (𝓞 F)) := by - haveI : IsScalarTower K F L := F.isScalarTower_mid' + have : IsScalarTower K F L := F.isScalarTower_mid' intro y rw [Ideal.under_under 𝔓, Ideal.under, Ideal.mem_comap, map_sub, map_pow, show (MulSemiringAction.toAlgHom (𝓞 K) (𝓞 F) (σ.restrictNormal F)) y @@ -188,21 +187,20 @@ private theorem unramifiedIn_intermediateField (F : IntermediateField K L) [IsGalois K F] (𝔭 : Ideal (𝓞 K)) (hunr : UnramifiedIn K L 𝔭) : UnramifiedIn K (↥F) 𝔭 := by - haveI : IsScalarTower K F L := F.isScalarTower_mid' - haveI : IsScalarTower (𝓞 K) (𝓞 F) (𝓞 L) := inferInstance + have : IsScalarTower K F L := F.isScalarTower_mid' + have : IsScalarTower (𝓞 K) (𝓞 F) (𝓞 L) := inferInstance refine ⟨hunr.1, fun 𝔮 h𝔮max h𝔮lo ↦ ?_⟩ - haveI := h𝔮lo - haveI := h𝔮max.isPrime + have := h𝔮lo + have := h𝔮max.isPrime obtain ⟨𝔓, h𝔓prime, h𝔓lo, -⟩ := exists_prime_liesOver (↥F) L 𝔮 (Ideal.ne_bot_of_liesOver_of_ne_bot hunr.1 𝔮) - haveI := h𝔓prime - haveI := h𝔓lo - haveI : 𝔓.LiesOver 𝔭 := ⟨by rw [← Ideal.under_under (B := 𝓞 F) 𝔓, h𝔓lo.over.symm, h𝔮lo.over.symm]⟩ - haveI : Algebra.IsUnramifiedAt (𝓞 K) 𝔓 := + have := h𝔓prime + have := h𝔓lo + have : 𝔓.LiesOver 𝔭 := ⟨by rw [← Ideal.under_under (B := 𝓞 F) 𝔓, h𝔓lo.over.symm, h𝔮lo.over.symm]⟩ + have : Algebra.IsUnramifiedAt (𝓞 K) 𝔓 := hunr.2 𝔓 (h𝔓prime.isMaximal (Ideal.ne_bot_of_liesOver_of_ne_bot hunr.1 𝔓)) inferInstance exact Algebra.IsUnramifiedAt.of_liesOver (𝓞 K) 𝔮 𝔓 -set_option backward.isDefEq.respectTransparency false in /-- **Step (A): a Frobenius-trivial prime splits completely.** For `F = fixedField H` with `H` abelian (hence normal) and a nonzero prime `𝔭` of `𝓞 K` unramified in `L` whose Frobenius representative lies in `H`, the `F`-Frobenius class of `𝔭` is trivial: `frobeniusClass K F 𝔭 = [1]`. @@ -220,19 +218,20 @@ private theorem frobeniusClass_fixedField_eq_one IsGalois.of_fixedField_normal_subgroup H frobeniusClass K (↥(IntermediateField.fixedField H)) 𝔭 = ConjClasses.mk 1 := by set F := IntermediateField.fixedField H with hF - haveI : IsScalarTower K F L := F.isScalarTower_mid' - haveI : IsGalois K F := IsGalois.of_fixedField_normal_subgroup H - haveI : NumberField F := NumberField.of_intermediateField F + have : IsScalarTower K F L := F.isScalarTower_mid' + have : IsGalois K F := IsGalois.of_fixedField_normal_subgroup H + have : NumberField F := NumberField.of_intermediateField F obtain ⟨𝔓, h𝔓p, h𝔓lo, -⟩ := exists_prime_liesOver K L 𝔭 (UnramifiedIn.ne_bot K L hunr) - haveI := h𝔓p - haveI := h𝔓lo - haveI : Finite (𝓞 L ⧸ 𝔓) := UnramifiedIn.finite_quotient K L hunr 𝔓 h𝔓lo + have := h𝔓p + have := h𝔓lo + have : Finite (𝓞 L ⧸ 𝔓) := UnramifiedIn.finite_quotient K L hunr 𝔓 h𝔓lo set σ : L ≃ₐ[K] L := arithFrobAt (𝓞 K) Gal(L/K) 𝔓 have hclass : frobeniusClass K L 𝔭 = ConjClasses.mk σ := frobeniusClass_eq_mk_of_isArithFrobAt K L 𝔭 hunr σ 𝔓 (IsArithFrobAt.arithFrobAt (𝓞 K) Gal(L/K) 𝔓) h𝔓lo have hconj : IsConj σ ((frobeniusClass K L 𝔭).out) := by - rw [← ConjClasses.mk_eq_mk_iff_isConj, hclass.symm, ConjClasses.mk, Quotient.out_eq] + apply ConjClasses.mk_eq_mk_iff_isConj.mp + exact hclass.symm.trans (Quotient.out_eq (frobeniusClass K L 𝔭)).symm have hσeq : σ = (frobeniusClass K L 𝔭).out := by obtain ⟨c, hc⟩ := hconj rw [SemiconjBy, mul_comm' (c : Gal(L/K)) σ] at hc @@ -244,7 +243,7 @@ private theorem frobeniusClass_fixedField_eq_one MonoidHom.mem_ker.mp <| (IntermediateField.restrictNormalHom_ker F).ge hσfix have h𝔮lo : (𝔓.under (𝓞 F)).LiesOver 𝔭 := ⟨by rw [← Ideal.under_under (B := 𝓞 F) 𝔓]; exact h𝔓lo.over⟩ - haveI := h𝔮lo + have := h𝔮lo have hfrobF : IsArithFrobAt (𝓞 K) (σ.restrictNormal F) (𝔓.under (𝓞 F)) := isArithFrobAt_restrictNormal K L F σ 𝔓 (IsArithFrobAt.arithFrobAt (𝓞 K) Gal(L/K) 𝔓) rw [frobeniusClass_eq_mk_of_isArithFrobAt K (↥F) 𝔭 (unramifiedIn_intermediateField K L F 𝔭 hunr) @@ -267,14 +266,14 @@ private theorem finrank_residue_fixedField_eq_one ∀ 𝔮 : Ideal (𝓞 ↥(IntermediateField.fixedField H)), 𝔮.IsPrime → 𝔮.LiesOver 𝔭 → Module.finrank (𝓞 K ⧸ 𝔮.under (𝓞 K)) (𝓞 ↥(IntermediateField.fixedField H) ⧸ 𝔮) = 1 := by set F := IntermediateField.fixedField H - haveI : IsGalois K F := IsGalois.of_fixedField_normal_subgroup H - haveI : NumberField F := NumberField.of_intermediateField F + have : IsGalois K F := IsGalois.of_fixedField_normal_subgroup H + have : NumberField F := NumberField.of_intermediateField F have hunrF : UnramifiedIn K (↥F) 𝔭 := unramifiedIn_intermediateField K L F 𝔭 hunr have hfc : frobeniusClass K (↥F) 𝔭 = ConjClasses.mk (1 : Gal(↥F/K)) := frobeniusClass_fixedField_eq_one K L H 𝔭 hunr hmem intro 𝔮 h𝔮p h𝔮lo - haveI := h𝔮p - haveI := h𝔮lo + have := h𝔮p + have := h𝔮lo rw [finrank_residue_eq_orderOf K (↥F) (1 : Gal(↥F/K)) (ConjClasses.mk 1) rfl 𝔭 hunrF hfc 𝔮 h𝔮lo, orderOf_one] @@ -291,13 +290,13 @@ private theorem card_primesOver_fixedField_eq_finrank 𝔮.IsPrime ∧ 𝔮.LiesOver 𝔭 ∧ 𝔮 ≠ ⊥} = Module.finrank K ↥(IntermediateField.fixedField H) := by set F := IntermediateField.fixedField H - haveI : IsGalois K F := IsGalois.of_fixedField_normal_subgroup H - haveI : NumberField F := NumberField.of_intermediateField F + have : IsGalois K F := IsGalois.of_fixedField_normal_subgroup H + have : NumberField F := NumberField.of_intermediateField F have hunrF : UnramifiedIn K (↥F) 𝔭 := unramifiedIn_intermediateField K L F 𝔭 hunr have hresdeg := finrank_residue_fixedField_eq_one K L H 𝔭 hunr hmem obtain ⟨𝔮₀, h𝔮₀p, h𝔮₀lo, -⟩ := exists_prime_liesOver K (↥F) 𝔭 (UnramifiedIn.ne_bot K L hunr) - haveI := h𝔮₀p - haveI := h𝔮₀lo + have := h𝔮₀p + have := h𝔮₀lo have hcard := card_primesAbove_mul_finrank_eq K (↥F) 𝔭 hunrF 𝔮₀ h𝔮₀lo rw [hresdeg 𝔮₀ h𝔮₀p h𝔮₀lo, mul_one] at hcard rw [hcard, IsGalois.card_aut_eq_finrank K (↥F)] @@ -318,18 +317,19 @@ private theorem absNorm_eq_of_liesOver_fixedField ∀ 𝔮 : Ideal (𝓞 ↥(IntermediateField.fixedField H)), 𝔮.IsPrime → 𝔮.LiesOver 𝔭 → Ideal.absNorm 𝔮 = Ideal.absNorm 𝔭 := by set F := IntermediateField.fixedField H - haveI : IsGalois K F := IsGalois.of_fixedField_normal_subgroup H - haveI : NumberField F := NumberField.of_intermediateField F + have : IsGalois K F := IsGalois.of_fixedField_normal_subgroup H + have : NumberField F := NumberField.of_intermediateField F have hresdeg := finrank_residue_fixedField_eq_one K L H 𝔭 hunr hmem intro 𝔮 h𝔮p h𝔮lo - haveI := h𝔮p - haveI := h𝔮lo - have hinert : (𝔮.under (𝓞 K)).inertiaDeg' 𝔮 = 1 := by - rw [Ideal.inertiaDeg'_algebraMap] + have := h𝔮p + have := h𝔮lo + have : 𝔭.IsMaximal := ‹𝔭.IsPrime›.isMaximal (UnramifiedIn.ne_bot K L hunr) + have : 𝔮.IsMaximal := Ideal.IsMaximal.of_liesOver_isMaximal 𝔮 𝔭 + have : (𝔮.under (𝓞 K)).IsMaximal := h𝔮lo.over ▸ ‹𝔭.IsMaximal› + have hinert : 𝔮.inertiaDeg (𝓞 K) = 1 := by + rw [Ideal.inertiaDeg_eq_of_isMaximal (𝔮.under (𝓞 K)) 𝔮] exact hresdeg 𝔮 h𝔮p h𝔮lo - have hunder : 𝔮.under (𝓞 K) = 𝔭 := h𝔮lo.over.symm - rw [Ideal.absNorm_eq_pow_inertiaDeg'_of_liesOver 𝔮 (𝔮.under (𝓞 K)) inferInstance - (hunder ▸ UnramifiedIn.ne_bot K L hunr), hinert, pow_one, hunder] + rw [← Ideal.absNorm_pow_inertiaDeg 𝔭 𝔮, hinert, pow_one] /-! ### Coprime-restricted Frobenii generation @@ -409,8 +409,8 @@ private theorem finite_primesLiesOver_ne_bot (F : IntermediateField K L) [IsGalo (𝔭 : Ideal (𝓞 K)) [𝔭.IsMaximal] : haveI : NumberField F := NumberField.of_intermediateField F Finite {𝔮 : Ideal (𝓞 ↥F) // 𝔮.IsPrime ∧ 𝔮.LiesOver 𝔭 ∧ 𝔮 ≠ ⊥} := by - haveI : NumberField F := NumberField.of_intermediateField F - haveI : Finite (𝔭.primesOver (𝓞 ↥F)) := + have : NumberField F := NumberField.of_intermediateField F + have : Finite (𝔭.primesOver (𝓞 ↥F)) := (IsDedekindDomain.primesOver_finite 𝔭 (𝓞 ↥F)).to_subtype refine Finite.of_injective (β := 𝔭.primesOver (𝓞 ↥F)) (fun y ↦ ⟨y.1, y.2.1, y.2.2.1⟩) fun a b hab ↦ Subtype.ext ?_ @@ -436,8 +436,8 @@ private theorem primeIdealZetaSum_under_eq_finrank_mul [IsMulCommutative Gal(L/K = (Module.finrank K ↥(IntermediateField.fixedField H) : ℝ) * primeIdealZetaSum {𝔭 : Ideal (𝓞 K) | 𝔭.IsPrime ∧ UnramifiedIn K L 𝔭 ∧ (Ideal.absNorm 𝔭).Coprime m} s := by set F := IntermediateField.fixedField H - haveI : IsGalois K F := IsGalois.of_fixedField_normal_subgroup H - haveI : NumberField F := NumberField.of_intermediateField F + have : IsGalois K F := IsGalois.of_fixedField_normal_subgroup H + have : NumberField F := NumberField.of_intermediateField F set U : Set (Ideal (𝓞 K)) := {𝔭 | 𝔭.IsPrime ∧ UnramifiedIn K L 𝔭 ∧ (Ideal.absNorm 𝔭).Coprime m} set V : Set (Ideal (𝓞 F)) := @@ -446,9 +446,9 @@ private theorem primeIdealZetaSum_under_eq_finrank_mul [IsMulCommutative Gal(L/K set IV := {𝔮 : Ideal (𝓞 F) // 𝔮 ∈ V ∧ 𝔮.IsPrime ∧ 𝔮 ≠ ⊥} have hφ_mem : ∀ 𝔮 : IV, (𝔮.1.under (𝓞 K)) ∈ U ∧ (𝔮.1.under (𝓞 K)).IsPrime ∧ (𝔮.1.under (𝓞 K)) ≠ ⊥ := fun 𝔮 ↦ by - haveI := 𝔮.2.2.1 + have := 𝔮.2.2.1 exact ⟨⟨inferInstance, 𝔮.2.1.2.1, 𝔮.2.1.2.2⟩, inferInstance, - Ideal.IsIntegral.comap_ne_bot (𝓞 K) 𝔮.2.2.2⟩ + Ideal.IsIntegral.under_ne_bot (𝓞 K) 𝔮.2.2.2⟩ set φ : IV → IU := fun 𝔮 ↦ ⟨𝔮.1.under (𝓞 K), hφ_mem 𝔮⟩ set e := Equiv.sigmaFiberEquiv φ have hsummSig : Summable (fun p : Σ 𝔭 : IU, {𝔮 : IV // φ 𝔮 = 𝔭} ↦ @@ -458,13 +458,13 @@ private theorem primeIdealZetaSum_under_eq_finrank_mul [IsMulCommutative Gal(L/K rw [primeIdealZetaSum_def, ← e.tsum_eq (fun 𝔮 : IV ↦ (Ideal.absNorm (𝔮.1) : ℝ) ^ (-s)), hsummSig.tsum_sigma, primeIdealZetaSum_def, ← tsum_mul_left] refine tsum_congr (fun 𝔭 ↦ ?_) - haveI := 𝔭.2.2.1 + have := 𝔭.2.2.1 have hfibeq : {𝔮 : IV // φ 𝔮 = 𝔭} ≃ {𝔮 : Ideal (𝓞 F) // 𝔮.IsPrime ∧ 𝔮.LiesOver 𝔭.1 ∧ 𝔮 ≠ ⊥} := { toFun := fun x ↦ ⟨x.1.1, x.1.2.2.1, ⟨(Subtype.ext_iff.mp x.2).symm⟩, x.1.2.2.2⟩ invFun := fun y ↦ ⟨⟨y.1, ⟨y.2.1, by - haveI := y.2.1 - haveI := y.2.2.1 + have := y.2.1 + have := y.2.2.1 exact (y.2.2.1.over ▸ 𝔭.2.1.2 : UnramifiedIn K L (y.1.under (𝓞 K)) ∧ (Ideal.absNorm (y.1.under (𝓞 K))).Coprime m)⟩, y.2.1, y.2.2.2⟩, Subtype.ext (haveI := y.2.2.1; y.2.2.1.over.symm)⟩ @@ -474,10 +474,10 @@ private theorem primeIdealZetaSum_under_eq_finrank_mul [IsMulCommutative Gal(L/K = (Ideal.absNorm 𝔭.1 : ℝ) ^ (-s) := fun x ↦ by change (Ideal.absNorm x.1.1 : ℝ) ^ (-s) = (Ideal.absNorm 𝔭.1 : ℝ) ^ (-s) rw [(hsplit 𝔭.1 𝔭.2.2.1 𝔭.2.1.2.1 𝔭.2.1.2.2).2 x.1.1 x.1.2.2.1 ⟨(Subtype.ext_iff.mp x.2).symm⟩] - haveI : 𝔭.1.IsMaximal := 𝔭.2.2.1.isMaximal 𝔭.2.2.2 - haveI : Finite {𝔮 : Ideal (𝓞 F) // 𝔮.IsPrime ∧ 𝔮.LiesOver 𝔭.1 ∧ 𝔮 ≠ ⊥} := + have : 𝔭.1.IsMaximal := 𝔭.2.2.1.isMaximal 𝔭.2.2.2 + have : Finite {𝔮 : Ideal (𝓞 F) // 𝔮.IsPrime ∧ 𝔮.LiesOver 𝔭.1 ∧ 𝔮 ≠ ⊥} := finite_primesLiesOver_ne_bot K L F 𝔭.1 - haveI : Finite {𝔮 : IV // φ 𝔮 = 𝔭} := Finite.of_equiv _ hfibeq.symm + have : Finite {𝔮 : IV // φ 𝔮 = 𝔭} := Finite.of_equiv _ hfibeq.symm rw [tsum_congr hconst, tsum_const, Nat.card_congr hfibeq, (hsplit 𝔭.1 𝔭.2.2.1 𝔭.2.1.2.1 𝔭.2.1.2.2).1, nsmul_eq_mul, mul_comm] @@ -498,8 +498,8 @@ private theorem finrank_mul_unramified_coprime_le_univ {𝔭 : Ideal (𝓞 K) | 𝔭.IsPrime ∧ UnramifiedIn K L 𝔭 ∧ (Ideal.absNorm 𝔭).Coprime m} s ≤ primeIdealZetaSum (Set.univ : Set (Ideal (𝓞 ↥(IntermediateField.fixedField H)))) s := by set F := IntermediateField.fixedField H - haveI : IsGalois K F := IsGalois.of_fixedField_normal_subgroup H - haveI : NumberField F := NumberField.of_intermediateField F + have : IsGalois K F := IsGalois.of_fixedField_normal_subgroup H + have : NumberField F := NumberField.of_intermediateField F have hsplit : ∀ 𝔭 : Ideal (𝓞 K), 𝔭.IsPrime → UnramifiedIn K L 𝔭 → (Ideal.absNorm 𝔭).Coprime m → Nat.card {𝔮 : Ideal (𝓞 F) // 𝔮.IsPrime ∧ 𝔮.LiesOver 𝔭 ∧ 𝔮 ≠ ⊥} = Module.finrank K ↥F ∧ ∀ 𝔮 : Ideal (𝓞 F), 𝔮.IsPrime → 𝔮.LiesOver 𝔭 → Ideal.absNorm 𝔮 = Ideal.absNorm 𝔭 := @@ -522,8 +522,8 @@ private theorem finrank_fixedField_le_one_of_forall_frobenius_mem_of_coprime (Ideal.absNorm 𝔭).Coprime m → ((frobeniusClass K L 𝔭).out : L ≃ₐ[K] L) ∈ H) : Module.finrank K (IntermediateField.fixedField H) ≤ 1 := by set F := IntermediateField.fixedField H - haveI : IsGalois K F := IsGalois.of_fixedField_normal_subgroup H - haveI : NumberField F := NumberField.of_intermediateField F + have : IsGalois K F := IsGalois.of_fixedField_normal_subgroup H + have : NumberField F := NumberField.of_intermediateField F set d : ℕ := Module.finrank K ↥F rw [← Nat.cast_le (α := ℝ), Nat.cast_one] set A : ℝ → ℝ := fun s ↦ primeIdealZetaSum diff --git a/projects/Chebotarev/CebotarevDensity/FixedFieldDensity.lean b/projects/Chebotarev/CebotarevDensity/FixedFieldDensity.lean index 7d40bad6a..33f8b2367 100644 --- a/projects/Chebotarev/CebotarevDensity/FixedFieldDensity.lean +++ b/projects/Chebotarev/CebotarevDensity/FixedFieldDensity.lean @@ -1,8 +1,9 @@ module public import Mathlib.RingTheory.Ideal.Over -public import Mathlib.NumberTheory.RamificationInertia.Basic +public import Mathlib.RingTheory.RamificationInertia.Basic public import CebotarevDensity.Cyclotomic +public import CebotarevDensity.ForMathlib.TsumFiberBound /-! # Density transfer through a fixed-field subextension (Sharifi 7.2.2 Step 1) @@ -65,18 +66,18 @@ theorem frobeniusFibre_card_eq_of_isConj simp only [MulAction.toPerm_apply] constructor · rintro ⟨hp, hP, hne, hfrob⟩ - haveI := hp - haveI := hP + have := hp + have := hP refine ⟨inferInstance, inferInstance, ?_, ?_⟩ · rw [← Ideal.smul_bot c] exact (MulAction.injective c).ne hne · exact hc ▸ hfrob.conj c · rintro ⟨hp, hP, hne, hfrob⟩ - haveI := hp - haveI := hP + have := hp + have := hP have hsmul : c⁻¹ • (c • 𝔓) = 𝔓 := inv_smul_smul c 𝔓 - haveI hp' : 𝔓.IsPrime := hsmul ▸ (inferInstance : (c⁻¹ • (c • 𝔓)).IsPrime) - haveI hP' : 𝔓.LiesOver 𝔭 := hsmul ▸ (inferInstance : (c⁻¹ • (c • 𝔓)).LiesOver 𝔭) + have hp' : 𝔓.IsPrime := hsmul ▸ (inferInstance : (c⁻¹ • (c • 𝔓)).IsPrime) + have hP' : 𝔓.LiesOver 𝔭 := hsmul ▸ (inferInstance : (c⁻¹ • (c • 𝔓)).LiesOver 𝔭) have hne' : 𝔓 ≠ ⊥ := by rw [← hsmul, ← Ideal.smul_bot c⁻¹] exact (MulAction.injective c⁻¹).ne hne @@ -84,7 +85,6 @@ theorem frobeniusFibre_card_eq_of_isConj have hconj := hfrob.conj c⁻¹ rwa [hsmul, ← hc, show c⁻¹ * (c * σ * c⁻¹) * c⁻¹⁻¹ = σ by group] at hconj -set_option backward.isDefEq.respectTransparency false in /-- **Balanced fibre count.** If every prime above `𝔭` has Frobenius in the class `C = [σ]` and conjugate Frobenius values occur equally often (`hequi`), the total number of primes above `𝔭` is `|C|` times the number with `Frob_𝔓 = σ`: partition by the (class-`C`-valued) @@ -103,21 +103,21 @@ theorem card_primesAbove_eq_card_carrier_mul_frobeniusFibre * Nat.card {𝔓 : Ideal (𝓞 L) // ∃ (_ : 𝔓.IsPrime) (_ : 𝔓.LiesOver 𝔭) (_ : 𝔓 ≠ ⊥), IsArithFrobAt (𝓞 K) σ 𝔓} := by have hpbot : 𝔭 ≠ ⊥ := UnramifiedIn.ne_bot K L hunr - haveI : 𝔭.IsMaximal := ‹𝔭.IsPrime›.isMaximal hpbot - haveI : Finite (𝔭.primesOver (𝓞 L)) := (IsDedekindDomain.primesOver_finite 𝔭 (𝓞 L)).to_subtype - haveI : Finite {𝔓 : Ideal (𝓞 L) // 𝔓.IsPrime ∧ 𝔓.LiesOver 𝔭 ∧ 𝔓 ≠ ⊥} := + have : 𝔭.IsMaximal := ‹𝔭.IsPrime›.isMaximal hpbot + have : Finite (𝔭.primesOver (𝓞 L)) := (IsDedekindDomain.primesOver_finite 𝔭 (𝓞 L)).to_subtype + have : Finite {𝔓 : Ideal (𝓞 L) // 𝔓.IsPrime ∧ 𝔓.LiesOver 𝔭 ∧ 𝔓 ≠ ⊥} := Finite.of_injective (fun 𝔓 : {𝔓 : Ideal (𝓞 L) // 𝔓.IsPrime ∧ 𝔓.LiesOver 𝔭 ∧ 𝔓 ≠ ⊥} ↦ (⟨𝔓.1, 𝔓.2.1, 𝔓.2.2.1⟩ : 𝔭.primesOver (𝓞 L))) - fun _ _ hab ↦ Subtype.ext (by simpa using hab) - haveI : Fintype C.carrier := Fintype.ofFinite _ + fun _ _ hab ↦ Subtype.ext (congrArg (fun q : 𝔭.primesOver (𝓞 L) ↦ q.1) hab) + have : Fintype C.carrier := Fintype.ofFinite _ have hfinP : ∀ (𝔓 : Ideal (𝓞 L)) [𝔓.IsPrime] (hP : 𝔓.LiesOver 𝔭), Finite (𝓞 L ⧸ 𝔓) := fun 𝔓 _ hP ↦ UnramifiedIn.finite_quotient K L hunr 𝔓 hP have hmem : ∀ (𝔓 : Ideal (𝓞 L)) [𝔓.IsPrime] (hP : 𝔓.LiesOver 𝔭), haveI := hfinP 𝔓 hP arithFrobAt (𝓞 K) Gal(L/K) 𝔓 ∈ C.carrier := by intro 𝔓 _ hP - haveI := hfinP 𝔓 hP + have := hfinP 𝔓 hP rw [ConjClasses.mem_carrier_iff_mk_eq, ← frobeniusClass_eq_mk_of_isArithFrobAt K L 𝔭 hunr _ 𝔓 (IsArithFrobAt.arithFrobAt (𝓞 K) Gal(L/K) 𝔓) hP, hCfrob] have hconj : ∀ g : C.carrier, IsConj σ g.1 := by @@ -138,18 +138,18 @@ theorem card_primesAbove_eq_card_carrier_mul_frobeniusFibre refine Nat.card_congr ⟨fun x ↦ ⟨x.1.1, x.1.2.1, x.1.2.2.1, x.1.2.2.2, ?_⟩, fun x ↦ ⟨⟨x.1, by obtain ⟨hp, hP, hne, _⟩ := x.2; exact ⟨hp, hP, hne⟩⟩, ?_⟩, fun _ ↦ rfl, fun _ ↦ rfl⟩ - · haveI := x.1.2.1 - haveI := hfinP x.1.1 x.1.2.2.1 + · have := x.1.2.1 + have := hfinP x.1.1 x.1.2.2.1 rw [← Subtype.ext_iff.mp x.2] exact IsArithFrobAt.arithFrobAt (𝓞 K) Gal(L/K) x.1.1 · obtain ⟨hp, hP, hne, hg⟩ := x.2 - haveI := hp - haveI := hP - haveI := hfinP x.1 hP - haveI : Algebra.IsUnramifiedAt (𝓞 K) x.1 := + have := hp + have := hP + have := hfinP x.1 hP + have : Algebra.IsUnramifiedAt (𝓞 K) x.1 := Ideal.ramificationIdx_eq_one_iff.mp ((Ideal.ramificationIdx'_eq_ramificationIdx (x.1.under (𝓞 K)) x.1 - (Ideal.IsIntegral.comap_ne_bot (𝓞 K) hne)).symm.trans + (Ideal.IsIntegral.under_ne_bot (𝓞 K) hne)).symm.trans (UnramifiedIn.ramificationIdx_eq_one K L hunr x.1 hP)) exact Subtype.ext (eq_arithFrobAt_of_isArithFrobAt K L x.1 g.1 hg).symm simp_rw [hfib] @@ -239,11 +239,11 @@ theorem arithFrobAt_restrictScalars_eq (E : IntermediateField K L) Ideal.finiteQuotientOfFreeOfNeBot 𝔓 (ne_bot_of_ramificationIdx_eq_one K L hunrK) haveI : IsGalois (↥E) L := IsGalois.tower_top_intermediateField E (arithFrobAt (𝓞 ↥E) Gal(L/(↥E)) 𝔓).restrictScalars K = arithFrobAt (𝓞 K) Gal(L/K) 𝔓 := by - haveI : IsScalarTower K ↥E L := E.isScalarTower_mid' - haveI : IsGalois (↥E) L := IsGalois.tower_top_intermediateField E - haveI : IsGaloisGroup Gal(L/(↥E)) (↥E) L := IsGaloisGroup.of_isGalois (↥E) L - haveI hPbot : 𝔓 ≠ ⊥ := ne_bot_of_ramificationIdx_eq_one K L hunrK - haveI : Finite (𝓞 L ⧸ 𝔓) := Ideal.finiteQuotientOfFreeOfNeBot 𝔓 hPbot + have : IsScalarTower K ↥E L := E.isScalarTower_mid' + have : IsGalois (↥E) L := IsGalois.tower_top_intermediateField E + have : IsGaloisGroup Gal(L/(↥E)) (↥E) L := IsGaloisGroup.of_isGalois (↥E) L + have hPbot : 𝔓 ≠ ⊥ := ne_bot_of_ramificationIdx_eq_one K L hunrK + have : Finite (𝓞 L ⧸ 𝔓) := Ideal.finiteQuotientOfFreeOfNeBot 𝔓 hPbot set σE := arithFrobAt (𝓞 ↥E) Gal(L/(↥E)) 𝔓 with hσE have hKfrob1 : IsArithFrobAt (𝓞 K) (σE.restrictScalars K) 𝔓 := by intro x @@ -279,28 +279,29 @@ private theorem stabilizer_intermediate_eq_top_of_frobenius (IntermediateField.fixedField (Subgroup.zpowers σ)).isScalarTower_mid' MulAction.stabilizer Gal(L/↥(IntermediateField.fixedField (Subgroup.zpowers σ))) 𝔓 = ⊤ := by - haveI : IsScalarTower K ↥(IntermediateField.fixedField (Subgroup.zpowers σ)) L := + have : IsScalarTower K ↥(IntermediateField.fixedField (Subgroup.zpowers σ)) L := (IntermediateField.fixedField (Subgroup.zpowers σ)).isScalarTower_mid' have hraK := UnramifiedIn.ramificationIdx_eq_one K L hunrK 𝔓 hPK have hPbot : 𝔓 ≠ ⊥ := ne_bot_of_ramificationIdx_eq_one K L hraK have hpbot : 𝔓.under (𝓞 K) ≠ ⊥ := UnramifiedIn.ne_bot K L hunrK - haveI : 𝔓.IsMaximal := ‹𝔓.IsPrime›.isMaximal hPbot - haveI : (𝔓.under (𝓞 K)).IsMaximal := + have : 𝔓.IsMaximal := ‹𝔓.IsPrime›.isMaximal hPbot + have : (𝔓.under (𝓞 K)).IsMaximal := (inferInstance : (𝔓.under (𝓞 K)).IsPrime).isMaximal hpbot - haveI : Finite (𝓞 L ⧸ 𝔓) := Ideal.finiteQuotientOfFreeOfNeBot 𝔓 hPbot - haveI : Algebra.IsSeparable (𝓞 K ⧸ 𝔓.under (𝓞 K)) (𝓞 L ⧸ 𝔓) := by - letI : Field (𝓞 K ⧸ 𝔓.under (𝓞 K)) := Ideal.Quotient.field _ - letI : Field (𝓞 L ⧸ 𝔓) := Ideal.Quotient.field _ + have : Finite (𝓞 L ⧸ 𝔓) := Ideal.finiteQuotientOfFreeOfNeBot 𝔓 hPbot + have : Algebra.IsSeparable (𝓞 K ⧸ 𝔓.under (𝓞 K)) (𝓞 L ⧸ 𝔓) := by + let : Field (𝓞 K ⧸ 𝔓.under (𝓞 K)) := Ideal.Quotient.field _ + let : Field (𝓞 L ⧸ 𝔓) := Ideal.Quotient.field _ exact IsGalois.to_isSeparable have hmem : σ ∈ MulAction.stabilizer Gal(L/K) 𝔓 := hfrob.mem_stabilizer - have hinertK : (𝔓.under (𝓞 K)).inertiaDeg' 𝔓 = orderOf σ := by - rw [Ideal.inertiaDeg'_algebraMap, orderOf_eq_finrank_of_isArithFrobAt K L σ 𝔓 hraK hfrob] + have hinertK : 𝔓.inertiaDeg (𝓞 K) = orderOf σ := by + rw [Ideal.inertiaDeg_eq_of_isMaximal (𝔓.under (𝓞 K)) 𝔓, + orderOf_eq_finrank_of_isArithFrobAt K L σ 𝔓 hraK hfrob] have hcardstab' : Nat.card (MulAction.stabilizer Gal(L/K) 𝔓) = orderOf σ := by rw [Ideal.card_stabilizer_eq (𝔓.under (𝓞 K)) 𝔓, Ideal.ramificationIdxIn_eq_ramificationIdx (𝔓.under (𝓞 K)) 𝔓 Gal(L/K), ← Ideal.ramificationIdx'_eq_ramificationIdx (𝔓.under (𝓞 K)) 𝔓 hpbot, hraK, one_mul, Ideal.inertiaDegIn_eq_inertiaDeg (𝔓.under (𝓞 K)) 𝔓 Gal(L/K), - ← Ideal.inertiaDeg'_eq_inertiaDeg (𝔓.under (𝓞 K)) 𝔓, hinertK] + hinertK] have hstab : Subgroup.zpowers σ = MulAction.stabilizer Gal(L/K) 𝔓 := Subgroup.eq_of_le_of_card_ge (by rwa [Subgroup.zpowers_le]) (by rw [Nat.card_zpowers, hcardstab']) @@ -331,34 +332,33 @@ private theorem inertiaDeg_under_E_eq_one_of_frobenius (IntermediateField.fixedField (Subgroup.zpowers σ)).isScalarTower_mid' Ideal.ramificationIdx' (𝔓.under (𝓞 ↥(IntermediateField.fixedField (Subgroup.zpowers σ)))) 𝔓 = 1 - ∧ (𝔓.under (𝓞 K)).inertiaDeg' - (𝔓.under (𝓞 ↥(IntermediateField.fixedField (Subgroup.zpowers σ)))) = 1 + ∧ (𝔓.under (𝓞 ↥(IntermediateField.fixedField (Subgroup.zpowers σ)))).inertiaDeg (𝓞 K) = 1 ∧ Nat.card (𝓞 ↥(IntermediateField.fixedField (Subgroup.zpowers σ)) ⧸ 𝔓.under (𝓞 ↥(IntermediateField.fixedField (Subgroup.zpowers σ)))) = Nat.card (𝓞 K ⧸ 𝔓.under (𝓞 K)) := by set E := IntermediateField.fixedField (Subgroup.zpowers σ) with hE - haveI : IsScalarTower K ↥E L := E.isScalarTower_mid' - haveI : IsGalois (↥E) L := IsGalois.tower_top_intermediateField _ + have : IsScalarTower K ↥E L := E.isScalarTower_mid' + have : IsGalois (↥E) L := IsGalois.tower_top_intermediateField _ have hraK := UnramifiedIn.ramificationIdx_eq_one K L hunrK 𝔓 hPK have hPbot : 𝔓 ≠ ⊥ := ne_bot_of_ramificationIdx_eq_one K L hraK have hpbot : 𝔓.under (𝓞 K) ≠ ⊥ := UnramifiedIn.ne_bot K L hunrK - haveI : 𝔓.IsMaximal := ‹𝔓.IsPrime›.isMaximal hPbot - haveI : (𝔓.under (𝓞 K)).IsMaximal := + have : 𝔓.IsMaximal := ‹𝔓.IsPrime›.isMaximal hPbot + have : (𝔓.under (𝓞 K)).IsMaximal := (inferInstance : (𝔓.under (𝓞 K)).IsPrime).isMaximal hpbot - haveI : Finite (𝓞 L ⧸ 𝔓) := Ideal.finiteQuotientOfFreeOfNeBot 𝔓 hPbot - haveI hPEp : (𝔓.under (𝓞 ↥E)).IsPrime := inferInstance - haveI hPK' : 𝔓.LiesOver (𝔓.under (𝓞 K)) := Ideal.over_under (A := 𝓞 K) (P := 𝔓) - haveI hPEK : (𝔓.under (𝓞 ↥E)).LiesOver (𝔓.under (𝓞 K)) := inferInstance - haveI hPPE : 𝔓.LiesOver (𝔓.under (𝓞 ↥E)) := Ideal.over_under (A := 𝓞 ↥E) (P := 𝔓) - have hpEbot : 𝔓.under (𝓞 ↥E) ≠ ⊥ := Ideal.IsIntegral.comap_ne_bot (𝓞 ↥E) hPbot - haveI : (𝔓.under (𝓞 ↥E)).IsMaximal := hPEp.isMaximal hpEbot + have : Finite (𝓞 L ⧸ 𝔓) := Ideal.finiteQuotientOfFreeOfNeBot 𝔓 hPbot + have hPEp : (𝔓.under (𝓞 ↥E)).IsPrime := inferInstance + have hPK' : 𝔓.LiesOver (𝔓.under (𝓞 K)) := Ideal.over_under (A := 𝓞 K) (P := 𝔓) + have hPEK : (𝔓.under (𝓞 ↥E)).LiesOver (𝔓.under (𝓞 K)) := inferInstance + have hPPE : 𝔓.LiesOver (𝔓.under (𝓞 ↥E)) := Ideal.over_under (A := 𝓞 ↥E) (P := 𝔓) + have hpEbot : 𝔓.under (𝓞 ↥E) ≠ ⊥ := Ideal.IsIntegral.under_ne_bot (𝓞 ↥E) hPbot + have : (𝔓.under (𝓞 ↥E)).IsMaximal := hPEp.isMaximal hpEbot have hraE : Ideal.ramificationIdx' (𝔓.under (𝓞 ↥E)) 𝔓 = 1 := by have htower := Ideal.ramificationIdx'_algebra_tower' (𝔓.under (𝓞 K)) (𝔓.under (𝓞 ↥E)) 𝔓 rw [hraK] at htower exact Nat.eq_one_of_mul_eq_one_left htower.symm - haveI : Algebra.IsSeparable (𝓞 ↥E ⧸ 𝔓.under (𝓞 ↥E)) (𝓞 L ⧸ 𝔓) := by - letI : Field (𝓞 ↥E ⧸ 𝔓.under (𝓞 ↥E)) := Ideal.Quotient.field _ - letI : Field (𝓞 L ⧸ 𝔓) := Ideal.Quotient.field _ + have : Algebra.IsSeparable (𝓞 ↥E ⧸ 𝔓.under (𝓞 ↥E)) (𝓞 L ⧸ 𝔓) := by + let : Field (𝓞 ↥E ⧸ 𝔓.under (𝓞 ↥E)) := Ideal.Quotient.field _ + let : Field (𝓞 L ⧸ 𝔓) := Ideal.Quotient.field _ exact IsGalois.to_isSeparable have hstabE : MulAction.stabilizer Gal(L/(↥E)) 𝔓 = ⊤ := stabilizer_intermediate_eq_top_of_frobenius σ 𝔓 hunrK hPK hfrob horderE @@ -369,26 +369,25 @@ private theorem inertiaDeg_under_E_eq_one_of_frobenius Ideal.ramificationIdxIn_eq_ramificationIdx (𝔓.under (𝓞 ↥E)) 𝔓 Gal(L/(↥E)), ← Ideal.ramificationIdx'_eq_ramificationIdx (𝔓.under (𝓞 ↥E)) 𝔓 hpEbot, hraE, one_mul, Ideal.inertiaDegIn_eq_inertiaDeg (𝔓.under (𝓞 ↥E)) 𝔓 Gal(L/(↥E)), - ← Ideal.inertiaDeg'_eq_inertiaDeg (𝔓.under (𝓞 ↥E)) 𝔓, - Ideal.inertiaDeg'_algebraMap] at hcardE - have hinertTower : (𝔓.under (𝓞 K)).inertiaDeg' 𝔓 - = (𝔓.under (𝓞 K)).inertiaDeg' (𝔓.under (𝓞 ↥E)) - * (𝔓.under (𝓞 ↥E)).inertiaDeg' 𝔓 := - Ideal.inertiaDeg'_algebra_tower (𝔓.under (𝓞 K)) (𝔓.under (𝓞 ↥E)) 𝔓 - have hinertK : (𝔓.under (𝓞 K)).inertiaDeg' 𝔓 = orderOf σ := by - rw [Ideal.inertiaDeg'_algebraMap, orderOf_eq_finrank_of_isArithFrobAt K L σ 𝔓 hraK hfrob] - have hfPE : (𝔓.under (𝓞 ↥E)).inertiaDeg' 𝔓 = orderOf σ := by - rw [Ideal.inertiaDeg'_algebraMap, ← hcardE, horderE] + Ideal.inertiaDeg_eq_of_isMaximal (𝔓.under (𝓞 ↥E)) 𝔓] at hcardE + have hinertTower : 𝔓.inertiaDeg (𝓞 K) + = (𝔓.under (𝓞 ↥E)).inertiaDeg (𝓞 K) + * 𝔓.inertiaDeg (𝓞 ↥E) := + Ideal.inertiaDeg_tower (R := 𝓞 K) (𝔓.under (𝓞 ↥E)) 𝔓 + have hinertK : 𝔓.inertiaDeg (𝓞 K) = orderOf σ := by + rw [Ideal.inertiaDeg_eq_of_isMaximal (𝔓.under (𝓞 K)) 𝔓, + orderOf_eq_finrank_of_isArithFrobAt K L σ 𝔓 hraK hfrob] + have hfPE : 𝔓.inertiaDeg (𝓞 ↥E) = orderOf σ := by + rw [Ideal.inertiaDeg_eq_of_isMaximal (𝔓.under (𝓞 ↥E)) 𝔓, ← hcardE, horderE] have hpos : 0 < orderOf σ := orderOf_pos_iff.mpr (isOfFinOrder_of_finite σ) - have hinertPK : (𝔓.under (𝓞 K)).inertiaDeg' (𝔓.under (𝓞 ↥E)) = 1 := by + have hinertPK : (𝔓.under (𝓞 ↥E)).inertiaDeg (𝓞 K) = 1 := by rw [hinertK, hfPE] at hinertTower exact Nat.eq_of_mul_eq_mul_right hpos (by rw [one_mul]; exact hinertTower.symm) refine ⟨hraE, hinertPK, ?_⟩ have hnormP : Nat.card (𝓞 ↥E ⧸ 𝔓.under (𝓞 ↥E)) - = Nat.card (𝓞 K ⧸ 𝔓.under (𝓞 K)) ^ (𝔓.under (𝓞 K)).inertiaDeg' (𝔓.under (𝓞 ↥E)) := by + = Nat.card (𝓞 K ⧸ 𝔓.under (𝓞 K)) ^ (𝔓.under (𝓞 ↥E)).inertiaDeg (𝓞 K) := by simpa [Submodule.cardQuot_apply, Ideal.absNorm_apply] using - Ideal.absNorm_eq_pow_inertiaDeg'_of_liesOver (𝔓.under (𝓞 ↥E)) (𝔓.under (𝓞 K)) - inferInstance hpbot + (Ideal.absNorm_pow_inertiaDeg (𝔓.under (𝓞 K)) (𝔓.under (𝓞 ↥E))).symm rw [hnormP, hinertPK, pow_one] open scoped Pointwise in @@ -405,15 +404,15 @@ private theorem eq_of_liesOver_under_E_of_frobenius (IntermediateField.fixedField (Subgroup.zpowers σ)).isScalarTower_mid' 𝔔.LiesOver (𝔓.under (𝓞 ↥(IntermediateField.fixedField (Subgroup.zpowers σ))))) : 𝔔 = 𝔓 := by - haveI : IsScalarTower K ↥(IntermediateField.fixedField (Subgroup.zpowers σ)) L := + have : IsScalarTower K ↥(IntermediateField.fixedField (Subgroup.zpowers σ)) L := (IntermediateField.fixedField (Subgroup.zpowers σ)).isScalarTower_mid' - haveI : IsGalois (↥(IntermediateField.fixedField (Subgroup.zpowers σ))) L := + have : IsGalois (↥(IntermediateField.fixedField (Subgroup.zpowers σ))) L := IsGalois.tower_top_intermediateField _ - haveI : IsGaloisGroup Gal(L/(↥(IntermediateField.fixedField (Subgroup.zpowers σ)))) + have : IsGaloisGroup Gal(L/(↥(IntermediateField.fixedField (Subgroup.zpowers σ)))) (↥(IntermediateField.fixedField (Subgroup.zpowers σ))) L := IsGaloisGroup.of_isGalois _ L set E := IntermediateField.fixedField (Subgroup.zpowers σ) with hE - haveI := hQ - haveI : 𝔓.LiesOver (𝔓.under (𝓞 ↥E)) := Ideal.over_under (A := 𝓞 ↥E) (P := 𝔓) + have := hQ + have : 𝔓.LiesOver (𝔓.under (𝓞 ↥E)) := Ideal.over_under (A := 𝓞 ↥E) (P := 𝔓) have hstabE : MulAction.stabilizer Gal(L/(↥E)) 𝔓 = ⊤ := stabilizer_intermediate_eq_top_of_frobenius σ 𝔓 hunrK hPK hfrob horderE obtain ⟨τ, hτ⟩ := Ideal.exists_smul_eq_of_isGaloisGroup (𝔓.under (𝓞 ↥E)) 𝔓 𝔔 Gal(L/(↥E)) @@ -446,18 +445,18 @@ private theorem arithFrobAt_E_eq_of_isArithFrobAt IsGalois.tower_top_intermediateField _ arithFrobAt (𝓞 ↥(IntermediateField.fixedField (Subgroup.zpowers σ))) Gal(L/(↥(IntermediateField.fixedField (Subgroup.zpowers σ)))) 𝔓 = σE := by - haveI : IsScalarTower K ↥(IntermediateField.fixedField (Subgroup.zpowers σ)) L := + have : IsScalarTower K ↥(IntermediateField.fixedField (Subgroup.zpowers σ)) L := (IntermediateField.fixedField (Subgroup.zpowers σ)).isScalarTower_mid' - haveI : IsGalois (↥(IntermediateField.fixedField (Subgroup.zpowers σ))) L := + have : IsGalois (↥(IntermediateField.fixedField (Subgroup.zpowers σ))) L := IsGalois.tower_top_intermediateField _ have hraK : Ideal.ramificationIdx' (𝔓.under (𝓞 K)) 𝔓 = 1 := UnramifiedIn.ramificationIdx_eq_one K L hunrK 𝔓 hPK have hPbot : 𝔓 ≠ ⊥ := ne_bot_of_ramificationIdx_eq_one K L hraK - haveI : Finite (𝓞 L ⧸ 𝔓) := Ideal.finiteQuotientOfFreeOfNeBot 𝔓 hPbot - haveI : Algebra.IsUnramifiedAt (𝓞 K) 𝔓 := + have : Finite (𝓞 L ⧸ 𝔓) := Ideal.finiteQuotientOfFreeOfNeBot 𝔓 hPbot + have : Algebra.IsUnramifiedAt (𝓞 K) 𝔓 := Ideal.ramificationIdx_eq_one_iff.mp ((Ideal.ramificationIdx'_eq_ramificationIdx (𝔓.under (𝓞 K)) 𝔓 - (Ideal.IsIntegral.comap_ne_bot (𝓞 K) hPbot)).symm.trans hraK) + (Ideal.IsIntegral.under_ne_bot (𝓞 K) hPbot)).symm.trans hraK) have hbridge := arithFrobAt_restrictScalars_eq (IntermediateField.fixedField (Subgroup.zpowers σ)) 𝔓 hraK hraE hnorm rw [(eq_arithFrobAt_of_isArithFrobAt K L 𝔓 σ hfrob).symm] at hbridge @@ -480,49 +479,47 @@ private theorem exists_arithFrobAt_over_fibrePrime (hPunr : UnramifiedIn ↥(IntermediateField.fixedField (Subgroup.zpowers σ)) L P) (hPfrob : frobeniusClass ↥(IntermediateField.fixedField (Subgroup.zpowers σ)) L P = ConjClasses.mk σE) - (hPdeg : (P.under (𝓞 K)).inertiaDeg' P = 1) (hPbot : P ≠ ⊥) : + (hPdeg : P.inertiaDeg (𝓞 K) = 1) (hPbot : P ≠ ⊥) : ∃ (𝔓 : Ideal (𝓞 L)) (_ : 𝔓.IsPrime) (_ : 𝔓.LiesOver P) (_ : 𝔓 ≠ ⊥), 𝔓.under (𝓞 ↥(IntermediateField.fixedField (Subgroup.zpowers σ))) = P ∧ IsArithFrobAt (𝓞 K) σ 𝔓 := by - haveI : IsScalarTower K ↥(IntermediateField.fixedField (Subgroup.zpowers σ)) L := + have : IsScalarTower K ↥(IntermediateField.fixedField (Subgroup.zpowers σ)) L := (IntermediateField.fixedField (Subgroup.zpowers σ)).isScalarTower_mid' - haveI : IsGalois (↥(IntermediateField.fixedField (Subgroup.zpowers σ))) L := + have : IsGalois (↥(IntermediateField.fixedField (Subgroup.zpowers σ))) L := IsGalois.tower_top_intermediateField _ obtain ⟨𝔓, h𝔓p, h𝔓lo, h𝔓bot⟩ := exists_prime_liesOver (↥(IntermediateField.fixedField (Subgroup.zpowers σ))) L P hPbot - haveI := h𝔓p - haveI := h𝔓lo + have := h𝔓p + have := h𝔓lo have hPeq : 𝔓.under (𝓞 ↥(IntermediateField.fixedField (Subgroup.zpowers σ))) = P := h𝔓lo.over.symm - haveI hPPE : 𝔓.LiesOver (𝔓.under (𝓞 ↥(IntermediateField.fixedField (Subgroup.zpowers σ)))) := + have hPPE : 𝔓.LiesOver (𝔓.under (𝓞 ↥(IntermediateField.fixedField (Subgroup.zpowers σ)))) := Ideal.over_under (A := 𝓞 ↥(IntermediateField.fixedField (Subgroup.zpowers σ))) (P := 𝔓) have hunderK : 𝔓.under (𝓞 K) = P.under (𝓞 K) := by rw [← Ideal.under_under (B := 𝓞 ↥(IntermediateField.fixedField (Subgroup.zpowers σ))) 𝔓, hPeq] have hunrK : UnramifiedIn K L (𝔓.under (𝓞 K)) := hunderK ▸ hunrP - haveI : 𝔓.LiesOver (𝔓.under (𝓞 K)) := Ideal.over_under (A := 𝓞 K) (P := 𝔓) - have hinertPK1 : (𝔓.under (𝓞 K)).inertiaDeg' - (𝔓.under (𝓞 ↥(IntermediateField.fixedField (Subgroup.zpowers σ)))) = 1 := by - rw [hPeq, hunderK] + have : 𝔓.LiesOver (𝔓.under (𝓞 K)) := Ideal.over_under (A := 𝓞 K) (P := 𝔓) + have hinertPK1 : (𝔓.under (𝓞 ↥(IntermediateField.fixedField (Subgroup.zpowers σ)))).inertiaDeg (𝓞 K) = 1 := by + rw [hPeq] exact hPdeg have hraE : Ideal.ramificationIdx' (𝔓.under (𝓞 ↥(IntermediateField.fixedField (Subgroup.zpowers σ)))) 𝔓 = 1 := (Ideal.ramificationIdx'_eq_ramificationIdx (𝔓.under (𝓞 ↥(IntermediateField.fixedField (Subgroup.zpowers σ)))) 𝔓 - (Ideal.IsIntegral.comap_ne_bot _ h𝔓bot)).trans + (Ideal.IsIntegral.under_ne_bot _ h𝔓bot)).trans (Ideal.ramificationIdx_eq_one_iff.mpr (hPunr.2 𝔓 (h𝔓p.isMaximal h𝔓bot) (hPeq ▸ hPPE))) have hnorm : Nat.card (𝓞 ↥(IntermediateField.fixedField (Subgroup.zpowers σ)) ⧸ 𝔓.under (𝓞 ↥(IntermediateField.fixedField (Subgroup.zpowers σ)))) = Nat.card (𝓞 K ⧸ 𝔓.under (𝓞 K)) := by - have hnP := Ideal.absNorm_eq_pow_inertiaDeg'_of_liesOver - (𝔓.under (𝓞 ↥(IntermediateField.fixedField (Subgroup.zpowers σ)))) (𝔓.under (𝓞 K)) - inferInstance (UnramifiedIn.ne_bot K L hunrK) + have hnP := (Ideal.absNorm_pow_inertiaDeg (𝔓.under (𝓞 K)) + (𝔓.under (𝓞 ↥(IntermediateField.fixedField (Subgroup.zpowers σ))))).symm simp only [Submodule.cardQuot_apply, Ideal.absNorm_apply] at hnP ⊢ rw [hnP, hinertPK1, pow_one] - haveI : Finite (𝓞 L ⧸ 𝔓) := Ideal.finiteQuotientOfFreeOfNeBot 𝔓 h𝔓bot + have : Finite (𝓞 L ⧸ 𝔓) := Ideal.finiteQuotientOfFreeOfNeBot 𝔓 h𝔓bot have hfrEeqσE : arithFrobAt (𝓞 ↥(IntermediateField.fixedField (Subgroup.zpowers σ))) Gal(L/(↥(IntermediateField.fixedField (Subgroup.zpowers σ)))) 𝔓 = σE := by - letI : CommMonoid Gal(L/(↥(IntermediateField.fixedField (Subgroup.zpowers σ)))) := + let : CommMonoid Gal(L/(↥(IntermediateField.fixedField (Subgroup.zpowers σ)))) := IsMulCommutative.instCommMonoid have hcl := frobeniusClass_eq_mk_of_isArithFrobAt (↥(IntermediateField.fixedField (Subgroup.zpowers σ))) L P hPunr _ 𝔓 @@ -560,40 +557,40 @@ private theorem under_E_mem_fibre_of_isArithFrobAt {P : Ideal (𝓞 ↥(IntermediateField.fixedField (Subgroup.zpowers σ))) | P.IsPrime ∧ UnramifiedIn ↥(IntermediateField.fixedField (Subgroup.zpowers σ)) L P ∧ frobeniusClass ↥(IntermediateField.fixedField (Subgroup.zpowers σ)) L P - = ConjClasses.mk σE ∧ (P.under (𝓞 K)).inertiaDeg' P = 1} + = ConjClasses.mk σE ∧ P.inertiaDeg (𝓞 K) = 1} ∧ (𝔓.under (𝓞 ↥(IntermediateField.fixedField (Subgroup.zpowers σ)))).LiesOver 𝔭 ∧ (𝔓.under (𝓞 ↥(IntermediateField.fixedField (Subgroup.zpowers σ)))) ≠ ⊥ := by - haveI : IsScalarTower K ↥(IntermediateField.fixedField (Subgroup.zpowers σ)) L := + have : IsScalarTower K ↥(IntermediateField.fixedField (Subgroup.zpowers σ)) L := (IntermediateField.fixedField (Subgroup.zpowers σ)).isScalarTower_mid' - haveI : IsGalois (↥(IntermediateField.fixedField (Subgroup.zpowers σ))) L := + have : IsGalois (↥(IntermediateField.fixedField (Subgroup.zpowers σ))) L := IsGalois.tower_top_intermediateField _ - haveI := hP + have := hP have hunderK : 𝔓.under (𝓞 K) = 𝔭 := hP.over.symm have hunrK : UnramifiedIn K L (𝔓.under (𝓞 K)) := hunderK ▸ hunr - haveI : 𝔓.LiesOver (𝔓.under (𝓞 K)) := Ideal.over_under (A := 𝓞 K) (P := 𝔓) - haveI : Finite (𝓞 L ⧸ 𝔓) := Ideal.finiteQuotientOfFreeOfNeBot 𝔓 hPbot + have : 𝔓.LiesOver (𝔓.under (𝓞 K)) := Ideal.over_under (A := 𝓞 K) (P := 𝔓) + have : Finite (𝓞 L ⧸ 𝔓) := Ideal.finiteQuotientOfFreeOfNeBot 𝔓 hPbot obtain ⟨hraE, hinPK, hnorm⟩ := inertiaDeg_under_E_eq_one_of_frobenius σ 𝔓 hunrK inferInstance hfrob horderE have hfrE := arithFrobAt_E_eq_of_isArithFrobAt σ σE hσE 𝔓 hunrK inferInstance hfrob horderE hraE hnorm have hunram : UnramifiedIn ↥(IntermediateField.fixedField (Subgroup.zpowers σ)) L (𝔓.under (𝓞 ↥(IntermediateField.fixedField (Subgroup.zpowers σ)))) := by - refine ⟨Ideal.IsIntegral.comap_ne_bot _ hPbot, fun 𝔔 h𝔔max h𝔔lo ↦ ?_⟩ - haveI := h𝔔max.isPrime + refine ⟨Ideal.IsIntegral.under_ne_bot _ hPbot, fun 𝔔 h𝔔max h𝔔lo ↦ ?_⟩ + have := h𝔔max.isPrime have h𝔔eq : 𝔔 = 𝔓 := eq_of_liesOver_under_E_of_frobenius σ 𝔓 hunrK inferInstance hfrob horderE 𝔔 h𝔔lo subst h𝔔eq exact Ideal.ramificationIdx_eq_one_iff.mp ((Ideal.ramificationIdx'_eq_ramificationIdx (𝔔.under (𝓞 ↥(IntermediateField.fixedField (Subgroup.zpowers σ)))) 𝔔 - (Ideal.IsIntegral.comap_ne_bot _ hPbot)).symm.trans hraE) - haveI hPEK : (𝔓.under (𝓞 ↥(IntermediateField.fixedField (Subgroup.zpowers σ)))).LiesOver 𝔭 := by - haveI : (𝔓.under (𝓞 ↥(IntermediateField.fixedField (Subgroup.zpowers σ)))).LiesOver + (Ideal.IsIntegral.under_ne_bot _ hPbot)).symm.trans hraE) + have hPEK : (𝔓.under (𝓞 ↥(IntermediateField.fixedField (Subgroup.zpowers σ)))).LiesOver 𝔭 := by + have : (𝔓.under (𝓞 ↥(IntermediateField.fixedField (Subgroup.zpowers σ)))).LiesOver (𝔓.under (𝓞 K)) := inferInstance rwa [hunderK] at this - haveI hPPE : 𝔓.LiesOver (𝔓.under (𝓞 ↥(IntermediateField.fixedField (Subgroup.zpowers σ)))) := + have hPPE : 𝔓.LiesOver (𝔓.under (𝓞 ↥(IntermediateField.fixedField (Subgroup.zpowers σ)))) := Ideal.over_under (A := 𝓞 ↥(IntermediateField.fixedField (Subgroup.zpowers σ))) (P := 𝔓) - refine ⟨⟨inferInstance, hunram, ?_, ?_⟩, hPEK, Ideal.IsIntegral.comap_ne_bot _ hPbot⟩ + refine ⟨⟨inferInstance, hunram, ?_, ?_⟩, hPEK, Ideal.IsIntegral.under_ne_bot _ hPbot⟩ · rw [frobeniusClass_eq_mk_of_isArithFrobAt (↥(IntermediateField.fixedField (Subgroup.zpowers σ))) L (𝔓.under (𝓞 ↥(IntermediateField.fixedField (Subgroup.zpowers σ)))) hunram _ 𝔓 @@ -601,9 +598,7 @@ private theorem under_E_mem_fibre_of_isArithFrobAt Gal(L/(↥(IntermediateField.fixedField (Subgroup.zpowers σ)))) 𝔓) hPPE, ConjClasses.mk_eq_mk_iff_isConj] exact isConj_iff.mpr ⟨1, by simp [hfrE]⟩ - · rw [show (𝔓.under (𝓞 ↥(IntermediateField.fixedField (Subgroup.zpowers σ)))).under (𝓞 K) - = 𝔓.under (𝓞 K) from Ideal.under_under 𝔓] - exact hinPK + · exact hinPK /-- **Fibre bijection: degree-one `E`-primes with Frobenius `σ_E` ↔ `L`-primes with Frobenius `σ`** (Sharifi 7.2.2 p. 143). For a prime `𝔭` of `𝓞 K` unramified in `L` with @@ -628,12 +623,12 @@ private theorem card_fibre_E_eq_card_fibre_L P ∈ {P | P.IsPrime ∧ UnramifiedIn ↥(IntermediateField.fixedField (Subgroup.zpowers σ)) L P ∧ frobeniusClass ↥(IntermediateField.fixedField (Subgroup.zpowers σ)) L P = ConjClasses.mk σE - ∧ (P.under (𝓞 K)).inertiaDeg' P = 1} ∧ P.LiesOver 𝔭 ∧ P ≠ ⊥} + ∧ P.inertiaDeg (𝓞 K) = 1} ∧ P.LiesOver 𝔭 ∧ P ≠ ⊥} = Nat.card {𝔓 : Ideal (𝓞 L) // ∃ (_ : 𝔓.IsPrime) (_ : 𝔓.LiesOver 𝔭) (_ : 𝔓 ≠ ⊥), IsArithFrobAt (𝓞 K) σ 𝔓} := by - haveI : IsScalarTower K ↥(IntermediateField.fixedField (Subgroup.zpowers σ)) L := + have : IsScalarTower K ↥(IntermediateField.fixedField (Subgroup.zpowers σ)) L := (IntermediateField.fixedField (Subgroup.zpowers σ)).isScalarTower_mid' - haveI : IsGalois (↥(IntermediateField.fixedField (Subgroup.zpowers σ))) L := + have : IsGalois (↥(IntermediateField.fixedField (Subgroup.zpowers σ))) L := IsGalois.tower_top_intermediateField _ refine (Nat.card_congr (Equiv.ofBijective (fun 𝔓 ↦ ⟨𝔓.1.under (𝓞 ↥(IntermediateField.fixedField (Subgroup.zpowers σ))), @@ -641,37 +636,37 @@ private theorem card_fibre_E_eq_card_fibre_L exact under_E_mem_fibre_of_isArithFrobAt σ σE hσE horderE 𝔭 hunr 𝔓.1 hP hPbot hfrob⟩) ⟨?_, ?_⟩)).symm · rintro ⟨𝔓₁, h𝔓₁, hP₁, hP₁bot, hfrob₁⟩ ⟨𝔓₂, h𝔓₂, hP₂, hP₂bot, hfrob₂⟩ hΦ - haveI := h𝔓₁ - haveI := h𝔓₂ - haveI := hP₁ - haveI := hP₂ + have := h𝔓₁ + have := h𝔓₂ + have := hP₁ + have := hP₂ have hunderK₁ : 𝔓₁.under (𝓞 K) = 𝔭 := hP₁.over.symm have hunrK₁ : UnramifiedIn K L (𝔓₁.under (𝓞 K)) := hunderK₁ ▸ hunr - haveI : 𝔓₁.LiesOver (𝔓₁.under (𝓞 K)) := Ideal.over_under (A := 𝓞 K) (P := 𝔓₁) + have : 𝔓₁.LiesOver (𝔓₁.under (𝓞 K)) := Ideal.over_under (A := 𝓞 K) (P := 𝔓₁) have hΦ' : 𝔓₂.under (𝓞 ↥(IntermediateField.fixedField (Subgroup.zpowers σ))) = 𝔓₁.under (𝓞 ↥(IntermediateField.fixedField (Subgroup.zpowers σ))) := congrArg Subtype.val hΦ |>.symm - haveI hP₂lo : 𝔓₂.LiesOver + have hP₂lo : 𝔓₂.LiesOver (𝔓₁.under (𝓞 ↥(IntermediateField.fixedField (Subgroup.zpowers σ)))) := by - haveI : 𝔓₂.LiesOver + have : 𝔓₂.LiesOver (𝔓₂.under (𝓞 ↥(IntermediateField.fixedField (Subgroup.zpowers σ)))) := Ideal.over_under (A := 𝓞 ↥(IntermediateField.fixedField (Subgroup.zpowers σ))) (P := 𝔓₂) rwa [hΦ'] at this exact Subtype.ext (eq_of_liesOver_under_E_of_frobenius σ 𝔓₁ hunrK₁ inferInstance hfrob₁ horderE 𝔓₂ hP₂lo).symm · rintro ⟨P, ⟨hPp, hPunr, hPfrob, hPdeg⟩, hPlo, hPbot⟩ - haveI := hPp - haveI := hPlo + have := hPp + have := hPlo have hunrP : UnramifiedIn K L (P.under (𝓞 K)) := hPlo.over.symm ▸ hunr obtain ⟨𝔓, h𝔓p, h𝔓lo, h𝔓bot, hPeq, hfrobK⟩ := exists_arithFrobAt_over_fibrePrime σ σE hσE P hunrP hPunr hPfrob hPdeg hPbot - haveI := h𝔓p - haveI := h𝔓lo + have := h𝔓p + have := h𝔓lo have hunderK : 𝔓.under (𝓞 K) = 𝔭 := by rw [← Ideal.under_under (B := 𝓞 ↥(IntermediateField.fixedField (Subgroup.zpowers σ))) 𝔓, hPeq] exact hPlo.over.symm - haveI hPK𝔓 : 𝔓.LiesOver 𝔭 := hunderK ▸ Ideal.over_under (A := 𝓞 K) (P := 𝔓) + have hPK𝔓 : 𝔓.LiesOver 𝔭 := hunderK ▸ Ideal.over_under (A := 𝓞 K) (P := 𝔓) exact ⟨⟨𝔓, h𝔓p, hPK𝔓, h𝔓bot, hfrobK⟩, Subtype.ext hPeq⟩ /-- **A degree-one fibre prime has `K`-Frobenius class `[σ]`** (Sharifi 7.2.2 p. 143). If `P` @@ -690,18 +685,18 @@ private theorem frobeniusClass_under_eq_of_mem_fibre (hPunr : UnramifiedIn ↥(IntermediateField.fixedField (Subgroup.zpowers σ)) L P) (hPfrob : frobeniusClass ↥(IntermediateField.fixedField (Subgroup.zpowers σ)) L P = ConjClasses.mk σE) - (hPdeg : (P.under (𝓞 K)).inertiaDeg' P = 1) (hPbot : P ≠ ⊥) : + (hPdeg : P.inertiaDeg (𝓞 K) = 1) (hPbot : P ≠ ⊥) : frobeniusClass K L (P.under (𝓞 K)) = ConjClasses.mk σ := by - haveI : IsGalois (↥(IntermediateField.fixedField (Subgroup.zpowers σ))) L := + have : IsGalois (↥(IntermediateField.fixedField (Subgroup.zpowers σ))) L := IsGalois.tower_top_intermediateField _ obtain ⟨𝔓, h𝔓p, h𝔓lo, h𝔓bot, hPeq, hfrobK⟩ := exists_arithFrobAt_over_fibrePrime σ σE hσE P hunrP hPunr hPfrob hPdeg hPbot - haveI := h𝔓p - haveI := h𝔓lo + have := h𝔓p + have := h𝔓lo have hunderK : P.under (𝓞 K) = 𝔓.under (𝓞 K) := by rw [← hPeq, Ideal.under_under] have hunrK : UnramifiedIn K L (𝔓.under (𝓞 K)) := hunderK ▸ hunrP - haveI : 𝔓.LiesOver (𝔓.under (𝓞 K)) := Ideal.over_under (A := 𝓞 K) (P := 𝔓) + have : 𝔓.LiesOver (𝔓.under (𝓞 K)) := Ideal.over_under (A := 𝓞 K) (P := 𝔓) rw [hunderK, frobeniusClass_eq_mk_of_isArithFrobAt K L (𝔓.under (𝓞 K)) hunrK _ 𝔓 hfrobK inferInstance] @@ -715,8 +710,8 @@ private theorem tsum_comp_eq_card_fibre_smul {β γ : Type*} (g : β → γ) (h ∑' b, h (g b) = c * ∑' y, h y := by rw [← (hsumm.hasSum.tsum_fiberwise g).tsum_eq, ← tsum_mul_left] refine tsum_congr fun y ↦ ?_ - haveI := hfin y - letI := Fintype.ofFinite (g ⁻¹' {y} : Set β) + have := hfin y + let := Fintype.ofFinite (g ⁻¹' {y} : Set β) rw [tsum_congr fun b : (g ⁻¹' {y} : Set β) ↦ congrArg h b.2, tsum_fintype, Finset.sum_const, Finset.card_univ, ← Nat.card_eq_fintype_card, nsmul_eq_mul, hcard, mul_comm] @@ -738,13 +733,12 @@ private theorem card_fibre_T1_over_prime Nat.card {P : Ideal (𝓞 ↥(IntermediateField.fixedField (Subgroup.zpowers σ))) // P ∈ {P | P.IsPrime ∧ UnramifiedIn ↥(IntermediateField.fixedField (Subgroup.zpowers σ)) L P ∧ frobeniusClass ↥(IntermediateField.fixedField (Subgroup.zpowers σ)) L P - = ConjClasses.mk σE ∧ (P.under (𝓞 K)).inertiaDeg' P = 1} + = ConjClasses.mk σE ∧ P.inertiaDeg (𝓞 K) = 1} ∧ P.LiesOver 𝔭 ∧ P ≠ ⊥} = Nat.card Gal(L/K) := by rw [card_fibre_E_eq_card_fibre_L σ σE hσE horderE 𝔭 hunr𝔭 hfrob𝔭, mul_comm, ← mul_assoc] exact count_primes_above_with_frobenius_eq_sigma K L σ (ConjClasses.mk σ) rfl 𝔭 hunr𝔭 hfrob𝔭 -set_option backward.isDefEq.respectTransparency false in /-- **LEAF A: the degree-one part of `T` carries the main term** (Sharifi 7.2.2 p. 143). For `1 < s`, the partial Dirichlet sum over the set `T₁` of degree-one (over `K`) primes `P` of `𝓞 E` above an unramified-in-`L` prime, with `Frob^E_P = [σ_E]`, equals `|G|/(f·|C|)` times the @@ -767,26 +761,26 @@ private theorem primeIdealZetaSum_fibre_eq_smul {P : Ideal (𝓞 ↥(IntermediateField.fixedField (Subgroup.zpowers σ))) | P.IsPrime ∧ UnramifiedIn ↥(IntermediateField.fixedField (Subgroup.zpowers σ)) L P ∧ frobeniusClass ↥(IntermediateField.fixedField (Subgroup.zpowers σ)) L P - = ConjClasses.mk σE ∧ (P.under (𝓞 K)).inertiaDeg' P = 1 ∧ + = ConjClasses.mk σE ∧ P.inertiaDeg (𝓞 K) = 1 ∧ UnramifiedIn K L (P.under (𝓞 K))} s = ((Nat.card Gal(L/K) : ℝ) / (orderOf σ * Nat.card (ConjClasses.mk σ).carrier)) * primeIdealZetaSum {𝔭 : Ideal (𝓞 K) | 𝔭.IsPrime ∧ UnramifiedIn K L 𝔭 ∧ frobeniusClass K L 𝔭 = ConjClasses.mk σ} s := by - haveI : IsScalarTower K ↥(IntermediateField.fixedField (Subgroup.zpowers σ)) L := + have : IsScalarTower K ↥(IntermediateField.fixedField (Subgroup.zpowers σ)) L := (IntermediateField.fixedField (Subgroup.zpowers σ)).isScalarTower_mid' - haveI : IsGalois (↥(IntermediateField.fixedField (Subgroup.zpowers σ))) L := + have : IsGalois (↥(IntermediateField.fixedField (Subgroup.zpowers σ))) L := IsGalois.tower_top_intermediateField _ set Sset := {𝔭 : Ideal (𝓞 K) | 𝔭.IsPrime ∧ UnramifiedIn K L 𝔭 ∧ frobeniusClass K L 𝔭 = ConjClasses.mk σ} with hSset set T₁set := {P : Ideal (𝓞 ↥(IntermediateField.fixedField (Subgroup.zpowers σ))) | P.IsPrime ∧ UnramifiedIn ↥(IntermediateField.fixedField (Subgroup.zpowers σ)) L P ∧ frobeniusClass ↥(IntermediateField.fixedField (Subgroup.zpowers σ)) L P = ConjClasses.mk σE ∧ - (P.under (𝓞 K)).inertiaDeg' P = 1 ∧ UnramifiedIn K L (P.under (𝓞 K))} with hT₁set + P.inertiaDeg (𝓞 K) = 1 ∧ UnramifiedIn K L (P.under (𝓞 K))} with hT₁set set S' := {𝔭 : Ideal (𝓞 K) // 𝔭 ∈ Sset ∧ 𝔭.IsPrime ∧ 𝔭 ≠ ⊥} with hS' have hgmem : ∀ P : {P // P ∈ T₁set ∧ P.IsPrime ∧ P ≠ ⊥}, P.1.under (𝓞 K) ∈ Sset ∧ (P.1.under (𝓞 K)).IsPrime ∧ P.1.under (𝓞 K) ≠ ⊥ := by rintro ⟨P, ⟨hPp, hPunr, hPfrob, hPdeg, hunrP⟩, _, hPbot⟩ - haveI := hPp + have := hPp refine ⟨⟨inferInstance, hunrP, ?_⟩, inferInstance, UnramifiedIn.ne_bot K L hunrP⟩ exact frobeniusClass_under_eq_of_mem_fibre σ σE hσE horderE P hunrP hPunr hPfrob hPdeg hPbot set g : {P // P ∈ T₁set ∧ P.IsPrime ∧ P ≠ ⊥} → S' := @@ -794,28 +788,28 @@ private theorem primeIdealZetaSum_fibre_eq_smul have hnormeq : ∀ P : {P // P ∈ T₁set ∧ P.IsPrime ∧ P ≠ ⊥}, (Ideal.absNorm P.1 : ℝ) = (Ideal.absNorm (P.1.under (𝓞 K)) : ℝ) := by rintro ⟨P, ⟨hPp, _, _, hPdeg, _⟩, _, hPbot⟩ - haveI := hPp - have hpbot : P.under (𝓞 K) ≠ ⊥ := Ideal.IsIntegral.comap_ne_bot (𝓞 K) hPbot - haveI : P.LiesOver (P.under (𝓞 K)) := Ideal.over_under (A := 𝓞 K) (P := P) - have hpow := Ideal.absNorm_eq_pow_inertiaDeg'_of_liesOver P (P.under (𝓞 K)) inferInstance hpbot + have := hPp + have hpbot : P.under (𝓞 K) ≠ ⊥ := Ideal.IsIntegral.under_ne_bot (𝓞 K) hPbot + have : P.LiesOver (P.under (𝓞 K)) := Ideal.over_under (A := 𝓞 K) (P := P) + have hpow := (Ideal.absNorm_pow_inertiaDeg (P.under (𝓞 K)) P).symm rw [hPdeg, pow_one] at hpow rw [hpow] have hcardfib : ∀ 𝔭 : S', (orderOf σ * Nat.card (ConjClasses.mk σ).carrier) * Nat.card {P : {P // P ∈ T₁set ∧ P.IsPrime ∧ P ≠ ⊥} // g P = 𝔭} = Nat.card Gal(L/K) := by intro 𝔭 obtain ⟨hp𝔭, hunr𝔭, hfrob𝔭⟩ := 𝔭.2.1 - haveI := hp𝔭 + have := hp𝔭 have hreindex : Nat.card {P : {P // P ∈ T₁set ∧ P.IsPrime ∧ P ≠ ⊥} // g P = 𝔭} = Nat.card {P : Ideal (𝓞 ↥(IntermediateField.fixedField (Subgroup.zpowers σ))) // P ∈ {P | P.IsPrime ∧ UnramifiedIn ↥(IntermediateField.fixedField (Subgroup.zpowers σ)) L P ∧ frobeniusClass ↥(IntermediateField.fixedField (Subgroup.zpowers σ)) L P - = ConjClasses.mk σE ∧ (P.under (𝓞 K)).inertiaDeg' P = 1} + = ConjClasses.mk σE ∧ P.inertiaDeg (𝓞 K) = 1} ∧ P.LiesOver 𝔭.1 ∧ P ≠ ⊥} := by refine Nat.card_congr ⟨fun x ↦ ⟨x.1.1, ?_, ?_, x.1.2.2.2⟩, fun y ↦ ⟨⟨y.1, ?_, y.2.1.1, y.2.2.2⟩, ?_⟩, fun _ ↦ rfl, fun _ ↦ rfl⟩ · exact ⟨x.1.2.1.1, x.1.2.1.2.1, x.1.2.1.2.2.1, x.1.2.1.2.2.2.1⟩ · exact ⟨(congrArg Subtype.val x.2).symm ▸ (Ideal.over_under (A := 𝓞 K) (P := x.1.1)).over⟩ - · haveI := y.2.1.1 + · have := y.2.1.1 have hunderK : y.1.under (𝓞 K) = 𝔭.1 := (y.2.2.1).over.symm exact ⟨y.2.1.1, y.2.1.2.1, y.2.1.2.2.1, y.2.1.2.2.2, by rw [hunderK]; exact hunr𝔭⟩ · exact Subtype.ext (y.2.2.1).over.symm @@ -823,18 +817,20 @@ private theorem primeIdealZetaSum_fibre_eq_smul exact card_fibre_T1_over_prime σ σE hσE horderE 𝔭.1 hunr𝔭 hfrob𝔭 have hfibfin : ∀ 𝔭 : S', Finite {P : {P // P ∈ T₁set ∧ P.IsPrime ∧ P ≠ ⊥} // g P = 𝔭} := by intro 𝔭 - haveI := 𝔭.2.2.1 - haveI : 𝔭.1.IsMaximal := 𝔭.2.2.1.isMaximal 𝔭.2.2.2 - haveI : Finite (𝔭.1.primesOver + have := 𝔭.2.2.1 + have : 𝔭.1.IsMaximal := 𝔭.2.2.1.isMaximal 𝔭.2.2.2 + have : Finite (𝔭.1.primesOver (𝓞 ↥(IntermediateField.fixedField (Subgroup.zpowers σ)))) := (IsDedekindDomain.primesOver_finite 𝔭.1 _).to_subtype refine Finite.of_injective (β := 𝔭.1.primesOver (𝓞 ↥(IntermediateField.fixedField (Subgroup.zpowers σ)))) (fun P ↦ ⟨P.1.1, P.1.2.2.1, ?_⟩) ?_ - · haveI := P.1.2.2.1 + · have := P.1.2.2.1 exact ⟨(congrArg Subtype.val P.2).symm ▸ (Ideal.over_under (A := 𝓞 K) (P := P.1.1)).over⟩ · rintro ⟨⟨P, hP⟩, hgP⟩ ⟨⟨Q, hQ⟩, hgQ⟩ hPQ - simpa using hPQ + exact Subtype.ext (Subtype.ext (congrArg + (fun q : 𝔭.1.primesOver + (𝓞 ↥(IntermediateField.fixedField (Subgroup.zpowers σ))) ↦ q.1) hPQ)) have hordC_pos : (0 : ℝ) < orderOf σ * Nat.card (ConjClasses.mk σ).carrier := by have h₁ : 0 < orderOf σ := orderOf_pos_iff.mpr (isOfFinOrder_of_finite σ) have : Nonempty (ConjClasses.mk σ).carrier := ⟨⟨σ, ConjClasses.mem_carrier_mk⟩⟩ @@ -871,83 +867,55 @@ most `[E:K]` primes of `𝓞 E` above it, by `Ideal.card_primesOverFinset_le_fin over `B` is bounded by the finite cardinality of `B`. Both are constants in `s`, so `Σ_{T₂} s ≤ C` for all `s > 1`, whence `Σ_{T₂}/Σ_univ^E → 0` since `Σ_univ^E → ∞`. -/ -/-- **Fibre-counting bound for `ℝ≥0∞`-valued sums.** If every fibre `g ⁻¹' {y}` is finite with at -most `d` elements, then `Σ_b f(g b) ≤ d · Σ_y f y`: group `b` by its image `g b`, on each fibre -the summand is the constant `f y`, and the fibre has `≤ d` terms. -/ -private theorem tsum_comp_le_card_fibre_mul {β γ : Type*} (g : β → γ) (f : γ → ℝ≥0∞) (d : ℕ) - (hfin : ∀ y, Finite (g ⁻¹' {y} : Set β)) (hfib : ∀ y, Nat.card (g ⁻¹' {y} : Set β) ≤ d) : - ∑' b, f (g b) ≤ (d : ℝ≥0∞) * ∑' y, f y := by - rw [← ENNReal.tsum_fiberwise (fun b ↦ f (g b)) g, ← ENNReal.tsum_mul_left] - refine ENNReal.tsum_le_tsum (fun y ↦ ?_) - rw [tsum_congr (fun b : (g ⁻¹' {y} : Set β) ↦ by rw [b.2])] - haveI := hfin y - letI := Fintype.ofFinite (g ⁻¹' {y} : Set β) - rw [tsum_fintype, Finset.sum_const, Finset.card_univ, ← Nat.card_eq_fintype_card, nsmul_eq_mul] - gcongr - exact_mod_cast hfib y - -/-- **Fibre-counting bound for real-valued sums.** The `ℝ`-valued companion of -`tsum_comp_le_card_fibre_mul`: for nonnegative summable `FA, FK` with `FA b ≤ FK (g b)` and every -fibre `g ⁻¹' {y}` finite of size `≤ d`, the sum `Σ_b FA b` is at most `d · Σ_y FK y`. -/ -private theorem tsum_real_comp_le_card_fibre_mul {β γ : Type*} (g : β → γ) (FA : β → ℝ) - (FK : γ → ℝ) (d : ℕ) (hsummA : Summable FA) (hsummK : Summable FK) (hnonnegA : ∀ b, 0 ≤ FA b) - (hnonnegK : ∀ y, 0 ≤ FK y) (hterm : ∀ b, FA b ≤ FK (g b)) - (hfin : ∀ y, Finite (g ⁻¹' {y} : Set β)) (hfib : ∀ y, Nat.card (g ⁻¹' {y} : Set β) ≤ d) : - ∑' b, FA b ≤ (d : ℝ) * ∑' y, FK y := by - have hchain : ∑' b, ENNReal.ofReal (FA b) - ≤ (d : ℝ≥0∞) * ∑' y, ENNReal.ofReal (FK y) := - calc ∑' b, ENNReal.ofReal (FA b) ≤ ∑' b, ENNReal.ofReal (FK (g b)) := - ENNReal.tsum_le_tsum fun b ↦ ENNReal.ofReal_le_ofReal (hterm b) - _ ≤ (d : ℝ≥0∞) * ∑' y, ENNReal.ofReal (FK y) := - tsum_comp_le_card_fibre_mul g (ENNReal.ofReal <| FK ·) d hfin hfib - rw [← ENNReal.ofReal_tsum_of_nonneg hnonnegA hsummA, - ← ENNReal.ofReal_tsum_of_nonneg hnonnegK hsummK] at hchain - rw [← ENNReal.toReal_ofReal (tsum_nonneg hnonnegA), - ← ENNReal.toReal_ofReal (mul_nonneg (Nat.cast_nonneg d) (tsum_nonneg hnonnegK)), - ENNReal.ofReal_mul (Nat.cast_nonneg d), ENNReal.ofReal_natCast] - exact ENNReal.toReal_mono (ENNReal.mul_ne_top (by simp) ENNReal.ofReal_ne_top) hchain - omit [IsGalois K L] in /-- For a degree-`≥ 2` prime `P` of `𝓞 E` over `𝔭 = P ∩ 𝓞 K`, the Dirichlet term is dominated by the square term of `𝔭`: `N P^{-s} ≤ N𝔭^{-2}` for `1 < s`. Here `N P = N𝔭^{f}` with `f ≥ 2` and `N𝔭 ≥ 2`, so the exponent `f·s ≥ 2` dominates. -/ private theorem absNorm_rpow_neg_le_under_sq (σ : Gal(L/K)) (P : Ideal (𝓞 ↥(IntermediateField.fixedField (Subgroup.zpowers σ)))) [P.IsPrime] - (hPb : P ≠ ⊥) {s : ℝ} (hs : 1 < s) (hdeg : 2 ≤ (P.under (𝓞 K)).inertiaDeg' P) : + (hPb : P ≠ ⊥) {s : ℝ} (hs : 1 < s) (hdeg : 2 ≤ P.inertiaDeg (𝓞 K)) : (Ideal.absNorm P : ℝ) ^ (-s) ≤ (Ideal.absNorm (P.under (𝓞 K)) : ℝ) ^ (-(2 : ℝ)) := by have hppr : (P.under (𝓞 K)).IsPrime := inferInstance - have hpbot : P.under (𝓞 K) ≠ ⊥ := Ideal.IsIntegral.comap_ne_bot (𝓞 K) hPb - haveI : P.LiesOver (P.under (𝓞 K)) := Ideal.over_under (A := 𝓞 K) (P := P) - have hpow := Ideal.absNorm_eq_pow_inertiaDeg'_of_liesOver P (P.under (𝓞 K)) hppr hpbot + have hpbot : P.under (𝓞 K) ≠ ⊥ := Ideal.IsIntegral.under_ne_bot (𝓞 K) hPb + have : P.LiesOver (P.under (𝓞 K)) := Ideal.over_under (A := 𝓞 K) (P := P) + have hpow := (Ideal.absNorm_pow_inertiaDeg (P.under (𝓞 K)) P).symm have hn2 : 2 ≤ Ideal.absNorm (P.under (𝓞 K)) := by have h0 : Ideal.absNorm (P.under (𝓞 K)) ≠ 0 := Ideal.absNorm_eq_zero_iff.not.mpr hpbot have h1 : Ideal.absNorm (P.under (𝓞 K)) ≠ 1 := Ideal.absNorm_eq_one_iff.not.mpr hppr.ne_top omega rw [hpow, Nat.cast_pow, - ← Real.rpow_natCast (Ideal.absNorm (P.under (𝓞 K)) : ℝ) ((P.under (𝓞 K)).inertiaDeg' P), + ← Real.rpow_natCast (Ideal.absNorm (P.under (𝓞 K)) : ℝ) (P.inertiaDeg (𝓞 K)), ← Real.rpow_mul (by positivity)] refine Real.rpow_le_rpow_of_exponent_le (by exact_mod_cast Nat.one_le_of_lt hn2) ?_ - nlinarith [mul_le_mul (show (2 : ℝ) ≤ ((P.under (𝓞 K)).inertiaDeg' P : ℝ) by exact_mod_cast hdeg) - hs.le (by norm_num) (by positivity : (0 : ℝ) ≤ ((P.under (𝓞 K)).inertiaDeg' P : ℝ))] + nlinarith [mul_le_mul (show (2 : ℝ) ≤ (P.inertiaDeg (𝓞 K) : ℝ) by exact_mod_cast hdeg) + hs.le (by norm_num) (by positivity : (0 : ℝ) ≤ (P.inertiaDeg (𝓞 K) : ℝ))] omit [IsGalois K L] in /-- The number of primes of `𝓞 E` over a fixed maximal prime `𝔭` of `𝓞 K` is at most `[E : K]`, a `Nat.card` repackaging of `Ideal.card_primesOverFinset_le_finrank`. -/ private theorem card_primesOver_le_finrank (σ : Gal(L/K)) [NoZeroSMulDivisors (𝓞 K) (𝓞 ↥(IntermediateField.fixedField (Subgroup.zpowers σ)))] - (𝔭 : Ideal (𝓞 K)) [𝔭.IsMaximal] (h𝔭 : 𝔭 ≠ ⊥) : + (𝔭 : Ideal (𝓞 K)) [𝔭.IsMaximal] (_h𝔭 : 𝔭 ≠ ⊥) : Nat.card {P : Ideal (𝓞 ↥(IntermediateField.fixedField (Subgroup.zpowers σ))) // P.IsPrime ∧ P.LiesOver 𝔭} ≤ Module.finrank K ↥(IntermediateField.fixedField (Subgroup.zpowers σ)) := by - letI : IsScalarTower K ↥(IntermediateField.fixedField (Subgroup.zpowers σ)) L := - (IntermediateField.fixedField (Subgroup.zpowers σ)).isScalarTower_mid' - rw [show {P : Ideal (𝓞 ↥(IntermediateField.fixedField (Subgroup.zpowers σ))) // - P.IsPrime ∧ P.LiesOver 𝔭} - = ↥(𝔭.primesOver (𝓞 ↥(IntermediateField.fixedField (Subgroup.zpowers σ)))) from rfl, - Nat.card_coe_set_eq, ← IsDedekindDomain.coe_primesOverFinset h𝔭, Set.ncard_coe_finset] - exact Ideal.card_primesOverFinset_le_finrank (R := 𝓞 K) - (S := 𝓞 ↥(IntermediateField.fixedField (Subgroup.zpowers σ))) - (K := K) (L := ↥(IntermediateField.fixedField (Subgroup.zpowers σ))) h𝔭 + classical + let E := IntermediateField.fixedField (Subgroup.zpowers σ) + let : IsScalarTower K ↥E L := E.isScalarTower_mid' + let : Finite (𝔭.primesOver (𝓞 ↥E)) := + (IsDedekindDomain.primesOver_finite 𝔭 (𝓞 ↥E)).to_subtype + let : Fintype (𝔭.primesOver (𝓞 ↥E)) := Fintype.ofFinite _ + change Nat.card (𝔭.primesOver (𝓞 ↥E)) ≤ Module.finrank K ↥E + calc + Nat.card (𝔭.primesOver (𝓞 ↥E)) = ∑ _q : 𝔭.primesOver (𝓞 ↥E), (1 : ℕ) := by + simp [Nat.card_eq_fintype_card] + _ ≤ ∑ q : 𝔭.primesOver (𝓞 ↥E), q.1.ramificationIdx (𝓞 K) * q.1.inertiaDeg (𝓞 K) := by + apply Finset.sum_le_sum + intro q _ + have : q.1.IsPrime := q.2.1 + exact Nat.mul_pos (Ideal.ramificationIdx_pos q.1 (𝓞 K)) (Ideal.inertiaDeg_pos q.1 (𝓞 K)) + _ = Module.finrank (𝓞 K) (𝓞 ↥E) := Ideal.sum_ramification_inertia_eq_finrank 𝔭 (𝓞 ↥E) + _ = Module.finrank K ↥E := (IsFractionRing.finrank_eq (𝓞 K) K (𝓞 ↥E) ↥E).symm /-- **The degree-`≥ 2` part of `T₂` is bounded by a constant.** For `1 < s`, the partial sum over the set `A` of primes `P` of `𝓞 E` whose underlying `K`-prime is unramified in `L` but of inertia @@ -958,13 +926,13 @@ degree `≥ 2` is bounded by `[E:K]·Σ_𝔭 N𝔭^{-2}`. Indeed `N P = N𝔭^{f private theorem primeIdealZetaSum_degTwo_le (σ : Gal(L/K)) {s : ℝ} (hs : 1 < s) (Aset : Set (Ideal (𝓞 ↥(IntermediateField.fixedField (Subgroup.zpowers σ))))) (hA : Aset = {P | P.IsPrime ∧ P ≠ ⊥ ∧ - UnramifiedIn K L (P.under (𝓞 K)) ∧ 2 ≤ (P.under (𝓞 K)).inertiaDeg' P}) : + UnramifiedIn K L (P.under (𝓞 K)) ∧ 2 ≤ P.inertiaDeg (𝓞 K)}) : primeIdealZetaSum Aset s ≤ (Module.finrank K ↥(IntermediateField.fixedField (Subgroup.zpowers σ)) : ℝ) * primeIdealZetaSum (univ : Set (Ideal (𝓞 K))) 2 := by - letI : IsScalarTower K ↥(IntermediateField.fixedField (Subgroup.zpowers σ)) L := + let : IsScalarTower K ↥(IntermediateField.fixedField (Subgroup.zpowers σ)) L := (IntermediateField.fixedField (Subgroup.zpowers σ)).isScalarTower_mid' - haveI : NoZeroSMulDivisors (𝓞 K) + have : NoZeroSMulDivisors (𝓞 K) (𝓞 ↥(IntermediateField.fixedField (Subgroup.zpowers σ))) := ⟨fun {c x} h ↦ by rw [Algebra.smul_def, mul_eq_zero] at h @@ -974,24 +942,24 @@ private theorem primeIdealZetaSum_degTwo_le (σ : Gal(L/K)) {s : ℝ} set KP := {𝔭 : Ideal (𝓞 K) // 𝔭 ∈ (univ : Set (Ideal (𝓞 K))) ∧ 𝔭.IsPrime ∧ 𝔭 ≠ ⊥} with hKP have hunder : ∀ P : AP, (P.1.under (𝓞 K)).IsPrime ∧ P.1.under (𝓞 K) ≠ ⊥ := by rintro ⟨P, hPA, hPp, hPb⟩ - haveI := hPp - exact ⟨inferInstance, Ideal.IsIntegral.comap_ne_bot (𝓞 K) hPb⟩ + have := hPp + exact ⟨inferInstance, Ideal.IsIntegral.under_ne_bot (𝓞 K) hPb⟩ set g : AP → KP := fun P ↦ ⟨P.1.under (𝓞 K), mem_univ _, (hunder P).1, (hunder P).2⟩ with hg have hterm : ∀ P : AP, (Ideal.absNorm P.1 : ℝ) ^ (-s) ≤ (Ideal.absNorm (g P).1 : ℝ) ^ (-(2 : ℝ)) := by rintro ⟨P, hPA, hPp, hPb⟩ - haveI := hPp + have := hPp rw [hA] at hPA exact absNorm_rpow_neg_le_under_sq σ P hPb hs hPA.2.2.2 have hinj : ∀ 𝔭 : KP, Finite (g ⁻¹' {𝔭} : Set AP) ∧ Nat.card (g ⁻¹' {𝔭} : Set AP) ≤ Module.finrank K ↥(IntermediateField.fixedField (Subgroup.zpowers σ)) := by intro 𝔭 - haveI := 𝔭.2.2.1 - haveI : 𝔭.1.IsMaximal := 𝔭.2.2.1.isMaximal 𝔭.2.2.2 + have := 𝔭.2.2.1 + have : 𝔭.1.IsMaximal := 𝔭.2.2.1.isMaximal 𝔭.2.2.2 have hmem : ∀ P : (g ⁻¹' {𝔭} : Set AP), P.1.1.IsPrime ∧ P.1.1.LiesOver 𝔭.1 := by rintro ⟨⟨P, hPA, hPp, hPb⟩, hgP⟩ - haveI := hPp + have := hPp exact ⟨hPp, ⟨(congrArg Subtype.val hgP : P.under (𝓞 K) = 𝔭.1) ▸ (Ideal.over_under (A := 𝓞 K) (P := P)).over⟩⟩ set hmap : (g ⁻¹' {𝔭} : Set AP) → {P : Ideal (𝓞 ↥(IntermediateField.fixedField @@ -999,7 +967,7 @@ private theorem primeIdealZetaSum_degTwo_le (σ : Gal(L/K)) {s : ℝ} have hmapinj : Function.Injective hmap := by rintro ⟨⟨P, hP⟩, hgP⟩ ⟨⟨Q, hQ⟩, hgQ⟩ hPQ exact Subtype.ext (Subtype.ext (by simpa only [hhmap, Subtype.mk.injEq] using hPQ)) - haveI : Finite {P : Ideal (𝓞 ↥(IntermediateField.fixedField (Subgroup.zpowers σ))) // + have : Finite {P : Ideal (𝓞 ↥(IntermediateField.fixedField (Subgroup.zpowers σ))) // P.IsPrime ∧ P.LiesOver 𝔭.1} := (IsDedekindDomain.primesOver_finite 𝔭.1 _).to_subtype exact ⟨Finite.of_injective hmap hmapinj, (Nat.card_le_card_of_injective hmap hmapinj).trans @@ -1021,12 +989,12 @@ private theorem ramifiedBelow_finite (σ : Gal(L/K)) (𝔭.primesOver (𝓞 ↥(IntermediateField.fixedField (Subgroup.zpowers σ))))) ?_) · rw [hB] rintro P ⟨hPp, hPb, hPnu⟩ - haveI := hPp - exact Set.mem_biUnion ⟨inferInstance, Ideal.IsIntegral.comap_ne_bot (𝓞 K) hPb, hPnu⟩ + have := hPp + exact Set.mem_biUnion ⟨inferInstance, Ideal.IsIntegral.under_ne_bot (𝓞 K) hPb, hPnu⟩ ⟨hPp, Ideal.over_under (A := 𝓞 K) (P := P)⟩ · rintro 𝔭 ⟨hp, hb, -⟩ - haveI := hp - haveI : 𝔭.IsMaximal := hp.isMaximal hb + have := hp + have : 𝔭.IsMaximal := hp.isMaximal hb exact IsDedekindDomain.primesOver_finite 𝔭 _ /-- **LEAF B: the degree-`≥ 2` part of `T` vanishes in the density ratio** (Sharifi 7.2.2 @@ -1051,32 +1019,32 @@ private theorem primeIdealZetaSum_T2_div_univ_tendsto_zero P.IsPrime ∧ UnramifiedIn ↥(IntermediateField.fixedField (Subgroup.zpowers σ)) L P ∧ frobeniusClass ↥(IntermediateField.fixedField (Subgroup.zpowers σ)) L P = ConjClasses.mk σE} | - (P.under (𝓞 K)).inertiaDeg' P = 1 ∧ UnramifiedIn K L (P.under (𝓞 K))}) : + P.inertiaDeg (𝓞 K) = 1 ∧ UnramifiedIn K L (P.under (𝓞 K))}) : Tendsto (fun s : ℝ ↦ primeIdealZetaSum T₂set s / primeIdealZetaSum (univ : Set (Ideal (𝓞 ↥(IntermediateField.fixedField (Subgroup.zpowers σ))))) s) (𝓝[>] 1) (𝓝 0) := by - haveI : IsGalois ↥(IntermediateField.fixedField (Subgroup.zpowers σ)) L := + have : IsGalois ↥(IntermediateField.fixedField (Subgroup.zpowers σ)) L := IsGalois.tower_top_intermediateField _ set Aset := {P : Ideal (𝓞 ↥(IntermediateField.fixedField (Subgroup.zpowers σ))) | P.IsPrime ∧ P ≠ ⊥ ∧ UnramifiedIn K L (P.under (𝓞 K)) ∧ - 2 ≤ (P.under (𝓞 K)).inertiaDeg' P} with hAdef + 2 ≤ P.inertiaDeg (𝓞 K)} with hAdef set Bset := {P : Ideal (𝓞 ↥(IntermediateField.fixedField (Subgroup.zpowers σ))) | P.IsPrime ∧ P ≠ ⊥ ∧ ¬ UnramifiedIn K L (P.under (𝓞 K))} with hBdef have hsub : T₂set ⊆ Aset ∪ Bset := by rw [hT₂] rintro P ⟨⟨hPp, hPunr, hPfr⟩, hPnotT1⟩ - haveI := hPp - simp only [Set.mem_setOf_eq, not_and] at hPnotT1 + have := hPp + simp only [Set.mem_ofPred_eq, not_and] at hPnotT1 have hPb : P ≠ ⊥ := UnramifiedIn.ne_bot _ L hPunr by_cases hunrK : UnramifiedIn K L (P.under (𝓞 K)) · refine Or.inl ⟨hPp, hPb, hunrK, ?_⟩ - have hdegne : (P.under (𝓞 K)).inertiaDeg' P ≠ 1 := fun hdeg1 ↦ + have hdegne : P.inertiaDeg (𝓞 K) ≠ 1 := fun hdeg1 ↦ hPnotT1 ⟨hPp, hPunr, hPfr⟩ hdeg1 hunrK have hppr : (P.under (𝓞 K)).IsPrime := inferInstance - haveI : (P.under (𝓞 K)).IsMaximal := - hppr.isMaximal (Ideal.IsIntegral.comap_ne_bot (𝓞 K) hPb) - haveI : P.LiesOver (P.under (𝓞 K)) := Ideal.over_under (A := 𝓞 K) (P := P) - have hpos : 0 < (P.under (𝓞 K)).inertiaDeg' P := Ideal.inertiaDeg_pos' _ _ + have : (P.under (𝓞 K)).IsMaximal := + hppr.isMaximal (Ideal.IsIntegral.under_ne_bot (𝓞 K) hPb) + have : P.LiesOver (P.under (𝓞 K)) := Ideal.over_under (A := 𝓞 K) (P := P) + have hpos : 0 < P.inertiaDeg (𝓞 K) := Ideal.inertiaDeg_pos P (𝓞 K) omega · exact Or.inr ⟨hPp, hPb, hunrK⟩ have hdisj : Disjoint Aset Bset := by @@ -1149,9 +1117,9 @@ theorem density_lift_through_fixedField frobeniusClass K L 𝔭 = ConjClasses.mk σ} ((Nat.card (ConjClasses.mk σ).carrier : ℝ) / Nat.card Gal(L/K)) := by subst _hEfix - haveI : IsScalarTower K ↥(IntermediateField.fixedField (Subgroup.zpowers σ)) L := + have : IsScalarTower K ↥(IntermediateField.fixedField (Subgroup.zpowers σ)) L := (IntermediateField.fixedField (Subgroup.zpowers σ)).isScalarTower_mid' - haveI : IsMulCommutative Gal(L/(↥(IntermediateField.fixedField (Subgroup.zpowers σ)))) := + have : IsMulCommutative Gal(L/(↥(IntermediateField.fixedField (Subgroup.zpowers σ)))) := isMulCommutative_galGroup_fixedField σ have horderE' : orderOf σ = Nat.card Gal(L/(↥(IntermediateField.fixedField (Subgroup.zpowers σ)))) := @@ -1160,7 +1128,7 @@ theorem density_lift_through_fixedField P.IsPrime ∧ UnramifiedIn ↥(IntermediateField.fixedField (Subgroup.zpowers σ)) L P ∧ frobeniusClass ↥(IntermediateField.fixedField (Subgroup.zpowers σ)) L P = ConjClasses.mk σE} with hTset - set T₁set := {P ∈ Tset | (P.under (𝓞 K)).inertiaDeg' P = 1 ∧ UnramifiedIn K L (P.under (𝓞 K))} + set T₁set := {P ∈ Tset | P.inertiaDeg (𝓞 K) = 1 ∧ UnramifiedIn K L (P.under (𝓞 K))} with hT₁set set T₂set := Tset \ T₁set with hT₂set have hT₁sub : T₁set ⊆ Tset := fun x hx ↦ hx.1 @@ -1212,10 +1180,10 @@ theorem density_lift_through_fixedField have hT₁flat : T₁set = {P : Ideal (𝓞 ↥(IntermediateField.fixedField (Subgroup.zpowers σ))) | P.IsPrime ∧ UnramifiedIn ↥(IntermediateField.fixedField (Subgroup.zpowers σ)) L P ∧ frobeniusClass ↥(IntermediateField.fixedField (Subgroup.zpowers σ)) L P = ConjClasses.mk σE ∧ - (P.under (𝓞 K)).inertiaDeg' P = 1 ∧ UnramifiedIn K L (P.under (𝓞 K))} := by + P.inertiaDeg (𝓞 K) = 1 ∧ UnramifiedIn K L (P.under (𝓞 K))} := by rw [hT₁set, hTset] ext P - simp only [Set.mem_setOf_eq] + simp only [Set.mem_ofPred_eq] tauto have hleafA := primeIdealZetaSum_fibre_eq_smul σ σE hσE horderE' hs rw [← hT₁flat] at hleafA diff --git a/projects/Chebotarev/CebotarevDensity/ForMathlib/CharacterOrthogonality.lean b/projects/Chebotarev/CebotarevDensity/ForMathlib/CharacterOrthogonality.lean index a82fed3f7..a4a9a2d72 100644 --- a/projects/Chebotarev/CebotarevDensity/ForMathlib/CharacterOrthogonality.lean +++ b/projects/Chebotarev/CebotarevDensity/ForMathlib/CharacterOrthogonality.lean @@ -78,7 +78,7 @@ theorem card_mul_eq_sum_of_sum_char_mul_eq_zero {G : Type*} [CommGroup G] [Finty intro s by_cases hs : s = u · subst hs; simp - · rw [if_neg hs] + · rw [ite_eq_right hs] exact sum_char_apply_eq_zero_of_ne_one fun h ↦ hs (inv_mul_eq_one.mp h).symm calc (Fintype.card (G →* Rˣ) : R) * f u = ∑ s : G, (if s = u then (Fintype.card (G →* Rˣ) : R) else 0) * f s := by diff --git a/projects/Chebotarev/CebotarevDensity/ForMathlib/IdealCongruenceCount.lean b/projects/Chebotarev/CebotarevDensity/ForMathlib/IdealCongruenceCount.lean index 96f816150..4499927f7 100644 --- a/projects/Chebotarev/CebotarevDensity/ForMathlib/IdealCongruenceCount.lean +++ b/projects/Chebotarev/CebotarevDensity/ForMathlib/IdealCongruenceCount.lean @@ -331,7 +331,7 @@ theorem exists_card_coset_inter_smul_sub_volume_mul_rpow_le set Ts : (ι → ℝ) →L[ℝ] (ι → ℝ) := (T.symm.toContinuousLinearEquiv : (ι → ℝ) →L[ℝ] (ι → ℝ)) with hTs have hTslip : LipschitzWith ‖Ts‖₊ (T.symm : (ι → ℝ) → (ι → ℝ)) := by - simpa [hTs] using Ts.lipschitz + simpa [hTs] using Ts.lipschitzWith have hD'bdd : Bornology.IsBounded D' := hTslip.isBounded_image hbdd have hD'meas : MeasurableSet D' := (T.symm.toContinuousLinearEquiv.toHomeomorph.toMeasurableEquiv).measurableSet_image.mpr hmeas @@ -434,10 +434,10 @@ private theorem norm_eq_prod_real_emb_mul_prod_complex {K : Type*} [Field K] [Nu star_involutive.eq_iff] rw [hfilter] by_cases hw : IsReal w - · rw [dif_pos hw, ComplexEmbedding.isReal_iff.mp (isReal_iff.mp hw), + · rw [dite_eq_left hw, ComplexEmbedding.isReal_iff.mp (isReal_iff.mp hw), Finset.insert_eq_self.mpr (Finset.mem_singleton_self _), Finset.prod_singleton, embedding_of_isReal_apply hw] - · rw [dif_neg hw, Finset.prod_pair] + · rw [dite_eq_right hw, Finset.prod_pair] · rw [ComplexEmbedding.conjugate_coe_eq, Complex.mul_conj] norm_cast rw [Complex.normSq_eq_norm_sq] @@ -452,8 +452,8 @@ private theorem norm_eq_prod_real_emb_mul_prod_complex {K : Type*} [Field K] [Nu simp_rw [hperplace] rw [prod_eq_prod_mul_prod] congr 1 - · rw [Finset.prod_congr rfl (fun w _ ↦ by rw [dif_pos w.2]), Complex.ofReal_prod] - · rw [Finset.prod_congr rfl (fun w _ ↦ by rw [dif_neg (not_isReal_iff_isComplex.mpr w.2)]), + · rw [Finset.prod_congr rfl (fun w _ ↦ by rw [dite_eq_left w.2]), Complex.ofReal_prod] + · rw [Finset.prod_congr rfl (fun w _ ↦ by rw [dite_eq_right (not_isReal_iff_isComplex.mpr w.2)]), Complex.ofReal_prod] exact_mod_cast hcc @@ -520,7 +520,7 @@ open Ideal in /-- **Class split of the residue count.** The number of nonzero integral ideals of norm `≤ N` with norm residue `a (mod c)` is the sum over the (finite) class group of the per-class counts. The class group is a `Fintype`; finiteness of each fibre follows from -`Ideal.finite_setOf_absNorm_le₀`. -/ +`Ideal.finite_setOfPred_absNorm_le₀`. -/ private theorem card_norm_le_residue_eq_sum_class {K : Type*} [Field K] [NumberField K] (c : ℕ) [NeZero c] (a : ZMod c) (N : ℕ) : Nat.card {I : (Ideal (𝓞 K))⁰ // Ideal.absNorm (I : Ideal (𝓞 K)) ≤ N ∧ @@ -530,7 +530,7 @@ private theorem card_norm_le_residue_eq_sum_class {K : Type*} [Field K] [NumberF ((Ideal.absNorm (I : Ideal (𝓞 K)) : ZMod c)) = a) ∧ ClassGroup.mk0 I = C} := by classical have hbase : Finite {I : (Ideal (𝓞 K))⁰ // Ideal.absNorm (I : Ideal (𝓞 K)) ≤ N} := - Ideal.finite_setOf_absNorm_le₀ N + Ideal.finite_setOfPred_absNorm_le₀ N have hfin : Finite {I : (Ideal (𝓞 K))⁰ // Ideal.absNorm (I : Ideal (𝓞 K)) ≤ N ∧ ((Ideal.absNorm (I : Ideal (𝓞 K)) : ZMod c)) = a} := Finite.of_injective (fun I ↦ (⟨I.1, I.2.1⟩ : @@ -660,7 +660,7 @@ private theorem cone_normLe_eq_smul_normLeOne {K : Type*} [Field K] [NumberField have ht0 : (0 : ℝ) < t := lt_of_lt_of_le one_pos ht have htne : t ≠ 0 := ht0.ne' ext x - simp only [Set.mem_setOf_eq, Set.mem_smul_set, normLeOne, Set.mem_inter_iff, Set.mem_setOf_eq] + simp only [Set.mem_ofPred_eq, Set.mem_smul_set, normLeOne, Set.mem_inter_iff, Set.mem_ofPred_eq] constructor · rintro ⟨hcone, hnorm⟩ refine ⟨t⁻¹ • x, ⟨(smul_mem_iff_mem (inv_ne_zero htne)).mpr hcone, ?_⟩, ?_⟩ @@ -736,8 +736,8 @@ private theorem exists_lipschitz_cube_cover_hyperplane_slab {ι : Type*} [Fintyp rw [dist_pi_le_iff (by positivity)] intro i by_cases hij : i = j - · simp only [hφ, dif_pos hij, dist_self]; positivity - · simp only [hφ, dif_neg hij] + · simp only [hφ, dite_eq_left hij, dist_self]; positivity + · simp only [hφ, dite_eq_right hij] have hreorg : (2 * R) * c (σ.symm ⟨i, hij⟩) - R - ((2 * R) * c' (σ.symm ⟨i, hij⟩) - R) = (2 * R) * (c (σ.symm ⟨i, hij⟩) - c' (σ.symm ⟨i, hij⟩)) := by ring rw [Real.dist_eq, hreorg, abs_mul, abs_of_nonneg (by positivity : (0 : ℝ) ≤ 2 * R), @@ -752,8 +752,8 @@ private theorem exists_lipschitz_cube_cover_hyperplane_slab {ι : Type*} [Fintyp refine ⟨0, ⟨le_refl _, zero_le_one⟩, ?_⟩ ext i; simp only [hφ] by_cases hij : i = j - · rw [dif_pos hij, hx0]; rfl - · rw [dif_neg hij, hx0]; simp [← hR0] + · rw [dite_eq_left hij, hx0]; rfl + · rw [dite_eq_right hij, hx0]; simp [← hR0] · refine ⟨fun k ↦ (x (σ k) + R) / (2 * R), ⟨?_, ?_⟩, ?_⟩ · intro k; simp only [Pi.zero_apply] rw [le_div_iff₀ (by positivity)]; have := (abs_le.mp (hxbd (σ k))).1; linarith @@ -761,8 +761,8 @@ private theorem exists_lipschitz_cube_cover_hyperplane_slab {ι : Type*} [Fintyp rw [div_le_one (by positivity)]; have := (abs_le.mp (hxbd (σ k))).2; linarith · ext i by_cases hij : i = j - · rw [hφ]; simp only; rw [dif_pos hij, hij]; exact hxj.symm - · rw [hφ]; simp only [dif_neg hij, Equiv.apply_symm_apply]; field_simp; ring + · rw [hφ]; simp only; rw [dite_eq_left hij, hij]; exact hxj.symm + · rw [hφ]; simp only [dite_eq_right hij, Equiv.apply_symm_apply]; field_simp; ring /-- **Union of two Lipschitz cube covers.** If `A` and `B` are each covered by finitely many `Lipschitz`-images of `[0,1]^(card ι - 1)`, so is `A ∪ B` (concatenate the families, take the max @@ -822,13 +822,13 @@ private theorem frontier_signOrthant_subset {ι κ : Type*} [Finite κ] (g : κ set O : Set (ι → ℝ) := {y | (∀ k ∈ s, y (g k) ≤ 0) ∧ (∀ k ∉ s, 0 ≤ y (g k))} with hO set Os : Set (ι → ℝ) := {y | (∀ k ∈ s, y (g k) < 0) ∧ (∀ k ∉ s, 0 < y (g k))} with hOs have hOclosed : IsClosed O := by - simp only [hO, Set.setOf_and, Set.setOf_forall] + simp only [hO, Set.ofPred_and, Set.ofPred_forall] exact (isClosed_iInter fun k ↦ isClosed_iInter fun _ ↦ isClosed_le (continuous_apply (g k)) continuous_const).inter (isClosed_iInter fun k ↦ isClosed_iInter fun _ ↦ isClosed_le continuous_const (continuous_apply (g k))) have hOsopen : IsOpen Os := by - simp only [hOs, Set.setOf_and, Set.setOf_forall] + simp only [hOs, Set.ofPred_and, Set.ofPred_forall] exact (isOpen_iInter_of_finite fun k ↦ isOpen_iInter_of_finite fun _ ↦ isOpen_lt (continuous_apply (g k)) continuous_const).inter (isOpen_iInter_of_finite fun k ↦ isOpen_iInter_of_finite fun _ ↦ @@ -840,7 +840,7 @@ private theorem frontier_signOrthant_subset {ι κ : Type*} [Finite κ] (g : κ rw [frontier_eq_closure_inter_closure] at hy rw [interior_eq_compl_closure_compl]; exact fun hh ↦ hh hy.2 by_contra hcon - simp only [Set.mem_iUnion, Set.mem_setOf_eq, not_exists] at hcon + simp only [Set.mem_iUnion, Set.mem_ofPred_eq, not_exists] at hcon exact hyni (mem_interior.mpr ⟨Os, hsub, hOsopen, ⟨fun k hk ↦ lt_of_le_of_ne (hyO.1 k hk) (hcon k), fun k hk ↦ lt_of_le_of_ne (hyO.2 k hk) (Ne.symm (hcon k))⟩⟩) @@ -985,14 +985,14 @@ private theorem exists_card_cell_sub_mul_rpow_le_explicit {ι : Type*} [Fintype * t ^ (Fintype.card ι)| ≤ C * t ^ (Fintype.card ι - 1 : ℕ) := by classical - haveI : Fintype κ := Fintype.ofFinite κ + have : Fintype κ := Fintype.ofFinite κ set T' : (ι → ℝ) ≃ₗ[ℝ] (ι → ℝ) := (LinearEquiv.smulOfNeZero ℝ (ι → ℝ) (m : ℝ) hm).trans T set Ds : Set (ι → ℝ) := D₀ ∩ {y : ι → ℝ | (∀ k ∈ s, y (g k) ≤ 0) ∧ (∀ k ∉ s, 0 ≤ y (g k))} have hDsbdd : Bornology.IsBounded Ds := hbdd.subset Set.inter_subset_left have hOclosed : IsClosed {y : ι → ℝ | (∀ k ∈ s, y (g k) ≤ 0) ∧ (∀ k ∉ s, 0 ≤ y (g k))} := by classical - rw [setOf_and] + rw [ofPred_and] refine IsClosed.inter ?_ ?_ · have h : {y : ι → ℝ | ∀ k ∈ s, y (g k) ≤ 0} = ⋂ k ∈ s, {y : ι → ℝ | y (g k) ≤ 0} := by ext y; simp @@ -1514,7 +1514,7 @@ private theorem exists_card_residue_fibre_sub_mul_rpow_le_explicit {K : Type*} [ ((Φ.toHomeomorph.toMeasurableEquiv).measurableSet_image.mpr (measurableSet_normLeOne K)) hcov (Sum.inl : {w : InfinitePlace K // IsReal w} → index K) s refine ⟨cellC, fun t ht ↦ ?_⟩ - rw [if_pos ⟨a₀, horth₀, hcos₀, hres₀⟩] + rw [ite_eq_left ⟨a₀, horth₀, hcos₀, hres₀⟩] have hfibre : Nat.card {a : idealSet K J // (mixedEmbedding.norm (a : mixedSpace K) ≤ t ^ Module.finrank ℚ K ∧ ((intNorm (idealSetEquiv K J a).val : ZMod m) = (b : ZMod m))) ∧ @@ -1538,7 +1538,7 @@ private theorem exists_card_residue_fibre_sub_mul_rpow_le_explicit {K : Type*} [ rw [hpow1, hpow2] exact hcell (T (fun i ↦ ((k i).val : ℝ))) t ht · refine ⟨0, fun t ht ↦ ?_⟩ - rw [if_neg hQ] + rw [ite_eq_right hQ] have hempty : IsEmpty {a : idealSet K J // (mixedEmbedding.norm (a : mixedSpace K) ≤ t ^ Module.finrank ℚ K ∧ ((intNorm (idealSetEquiv K J a).val : ZMod m) = (b : ZMod m))) ∧ @@ -1590,14 +1590,14 @@ private theorem exists_card_residue_fibre_sub_mul_rpow_le {K : Type*} [Field K] open Ideal NumberField.mixedEmbedding NumberField.mixedEmbedding.fundamentalCone Units in /-- **Finiteness of bounded-norm cone points.** The cone points of `idealSet K J` of norm `≤ s` form a finite set: they inject (via `integerSetEquiv ∘ idealSetMap`) into the product of the -finite set of integral ideals of norm `≤ ⌊s⌋` (`Ideal.finite_setOf_absNorm_le₀`) with the finite +finite set of integral ideals of norm `≤ ⌊s⌋` (`Ideal.finite_setOfPred_absNorm_le₀`) with the finite torsion group. -/ private theorem finite_idealSet_norm_le {K : Type*} [Field K] [NumberField K] (J : (Ideal (𝓞 K))⁰) (s : ℝ) : Finite {a : idealSet K J // mixedEmbedding.norm (a : mixedSpace K) ≤ s} := by classical have : Finite {I : (Ideal (𝓞 K))⁰ // Ideal.absNorm (I : Ideal (𝓞 K)) ≤ ⌊s⌋₊} := - (Ideal.finite_setOf_absNorm_le₀ ⌊s⌋₊).to_subtype + (Ideal.finite_setOfPred_absNorm_le₀ ⌊s⌋₊).to_subtype refine Finite.of_injective (β := {I : (Ideal (𝓞 K))⁰ // Ideal.absNorm (I : Ideal (𝓞 K)) ≤ ⌊s⌋₊} × torsion K) (fun a ↦ ⟨⟨(integerSetEquiv K (idealSetMap K J a.1)).1.1, ?_⟩, (integerSetEquiv K (idealSetMap K J a.1)).2⟩) ?_ @@ -1838,7 +1838,7 @@ private theorem exists_card_norm_le_residue_class_eq_sub_mul_rpow_le classical obtain ⟨J, hJ⟩ := ClassGroup.mk0_surjective C⁻¹ have hNJ : 0 < Ideal.absNorm (J : Ideal (𝓞 K)) := absNorm_pos_of_nonZeroDivisors J - haveI : NeZero (c * Ideal.absNorm (J : Ideal (𝓞 K))) := + have : NeZero (c * Ideal.absNorm (J : Ideal (𝓞 K))) := ⟨Nat.mul_ne_zero (NeZero.ne c) hNJ.ne'⟩ obtain ⟨κ, C', hκ⟩ := exists_card_dvd_principal_residue_eq_sub_mul_rpow_le (c * Ideal.absNorm (J : Ideal (𝓞 K))) (a.val * Ideal.absNorm (J : Ideal (𝓞 K))) J @@ -2403,7 +2403,7 @@ private theorem crt_single_coset {ι : Type*} [Finite ι] (L L' : Submodule ℤ = {z | ∃ x ∈ M, z = m • x} := by intro M ext z - simp only [Set.mem_smul_set, SetLike.mem_coe, Set.mem_setOf_eq] + simp only [Set.mem_smul_set, SetLike.mem_coe, Set.mem_ofPred_eq] exact ⟨fun ⟨x, hx, h⟩ ↦ ⟨x, hx, by rw [← h, Nat.cast_smul_eq_nsmul]⟩, fun ⟨x, hx, h⟩ ↦ ⟨x, hx, by rw [h, Nat.cast_smul_eq_nsmul]⟩⟩ have hbij := hcop.nsmul_right_bijective @@ -2429,7 +2429,7 @@ private theorem crt_single_coset {ι : Type*} [Finite ι] (L L' : Submodule ℤ rw [QuotientAddGroup.eq_zero_iff, AddSubgroup.mem_addSubgroupOf] at hq0 simpa using hq0 ext a - simp only [Set.mem_setOf_eq, hmsmul, Set.mem_vadd_set, Set.mem_setOf_eq, vadd_eq_add] + simp only [Set.mem_ofPred_eq, hmsmul, Set.mem_vadd_set, Set.mem_ofPred_eq, vadd_eq_add] constructor · rintro ⟨haL', w, ⟨x, hxL, rfl⟩, hweq⟩ rw [hξeq] at hweq @@ -2578,7 +2578,7 @@ private theorem exists_card_fibre_dvd_eq_card_cell {K : Type*} [Field K] [Number have hrel : L'.toAddSubgroup.relIndex L.toAddSubgroup = Ideal.absNorm (𝔟 : Ideal (𝓞 K)) := relIndex_chart_eq_absNorm J 𝔟 T T' hT hT' have hNB : 0 < Ideal.absNorm (𝔟 : Ideal (𝓞 K)) := absNorm_pos_of_nonZeroDivisors 𝔟 - haveI hfin : Finite (L.toAddSubgroup ⧸ L'.toAddSubgroup.addSubgroupOf L.toAddSubgroup) := by + have hfin : Finite (L.toAddSubgroup ⧸ L'.toAddSubgroup.addSubgroupOf L.toAddSubgroup) := by rw [← AddSubgroup.index_ne_zero_iff_finite] rw [show (L'.toAddSubgroup.addSubgroupOf L.toAddSubgroup).index = L'.toAddSubgroup.relIndex L.toAddSubgroup from rfl, hrel] @@ -2779,7 +2779,7 @@ private theorem exists_card_fibre_dvd_residue_sub_mul_rpow_le {K : Type*} [Field ((fun i ↦ (round ((T.symm (Φ (a : mixedSpace K))) i) : ZMod m)) = k) ∧ ((intNorm (idealSetEquiv K J a).val : ZMod m) = (b : ZMod m)) · obtain ⟨a₀, horth₀, hcos₀, hres₀⟩ := hQ - rw [if_pos ⟨a₀, horth₀, hcos₀, hres₀⟩] + rw [ite_eq_left ⟨a₀, horth₀, hcos₀, hres₀⟩] have hdrop : Nat.card {a : idealSet K (𝔟 * J) // (mixedEmbedding.norm (a : mixedSpace K) ≤ t ^ d ∧ ((intNorm (idealSetEquiv K (𝔟 * J) a).val : ZMod m) = (b : ZMod m))) ∧ @@ -2806,7 +2806,7 @@ private theorem exists_card_fibre_dvd_residue_sub_mul_rpow_le {K : Type*} [Field have hcell'' := hcell' ξ' t ht rw [smul_chart_lattice_eq T' m hm, ← hOs, hdetratio, hcard] at hcell'' exact hcell''.trans (by gcongr; exact le_abs_self _) - · rw [if_neg hQ, zero_div, zero_mul, sub_zero] + · rw [ite_eq_right hQ, zero_div, zero_mul, sub_zero] have : IsEmpty {a : idealSet K (𝔟 * J) // (mixedEmbedding.norm (a : mixedSpace K) ≤ t ^ d ∧ ((intNorm (idealSetEquiv K (𝔟 * J) a).val : ZMod m) = (b : ZMod m))) ∧ @@ -3011,7 +3011,7 @@ private theorem cardNormLeResidueClassDvd_div_density {K : Type*} [Field K] [Num have hNJ : 0 < NJ := absNorm_pos_of_nonZeroDivisors J have hNBc : NB.Coprime c := by rw [hNBdef, ZMod.isUnit_iff_coprime] at hu; exact hu have hcop : NB.Coprime (c * NJ) := Nat.Coprime.mul_right hNBc (hNJdef ▸ hJcop.symm) - haveI : NeZero (c * NJ) := ⟨Nat.mul_ne_zero (NeZero.ne c) hNJ.ne'⟩ + have : NeZero (c * NJ) := ⟨Nat.mul_ne_zero (NeZero.ne c) hNJ.ne'⟩ have hm : ((c * NJ : ℕ) : ℝ) ≠ 0 := Nat.cast_ne_zero.mpr (NeZero.ne (c * NJ)) obtain ⟨κ, C', hJcone, h𝔟Jcone⟩ := exists_card_idealSet_residue_real_le_dvd (c * NJ) hm (y.val * NJ) J 𝔟 hcop diff --git a/projects/Chebotarev/CebotarevDensity/ForMathlib/LatticePointCount.lean b/projects/Chebotarev/CebotarevDensity/ForMathlib/LatticePointCount.lean index d1ed572f5..ad3fc2802 100644 --- a/projects/Chebotarev/CebotarevDensity/ForMathlib/LatticePointCount.lean +++ b/projects/Chebotarev/CebotarevDensity/ForMathlib/LatticePointCount.lean @@ -296,7 +296,7 @@ theorem abs_card_inter_sub_volume_mul_pow_le {s : Set (ι → ℝ)} set Tag : Set (ι → ℤ) := {ν | tag n ν ∈ s} with hTag have himg : index n '' (s ∩ (n : ℝ)⁻¹ • span ℤ (Set.range (Pi.basisFun ℝ ι))) = Tag := by ext ν - simp only [hTag, Set.mem_image, Set.mem_inter_iff, Set.mem_setOf_eq] + simp only [hTag, Set.mem_image, Set.mem_inter_iff, Set.mem_ofPred_eq] constructor · rintro ⟨x, ⟨hxs, hxL⟩, rfl⟩ rwa [tag_index_eq_self_of_mem_smul_span n hxL] diff --git a/projects/Chebotarev/CebotarevDensity/ForMathlib/NormLeOneLipschitz.lean b/projects/Chebotarev/CebotarevDensity/ForMathlib/NormLeOneLipschitz.lean index 8241f43b0..e8d648364 100644 --- a/projects/Chebotarev/CebotarevDensity/ForMathlib/NormLeOneLipschitz.lean +++ b/projects/Chebotarev/CebotarevDensity/ForMathlib/NormLeOneLipschitz.lean @@ -152,19 +152,19 @@ open scoped Classical in theorem contDiff_faceMapZero : ContDiff ℝ 1 (faceMapZero K) := by refine (contDiff_expMapBasis K).comp (contDiff_pi.mpr fun w ↦ ?_) by_cases hw : w = w₀ - · simpa only [dif_pos hw] using contDiff_const - · simpa only [dif_neg hw] using contDiff_apply ℝ ℝ _ + · simpa only [dite_eq_left hw] using contDiff_const + · simpa only [dite_eq_right hw] using contDiff_apply ℝ ℝ _ open scoped Classical in theorem contDiff_faceMapSide (i : {w : InfinitePlace K // w ≠ w₀}) (a : ℝ) : ContDiff ℝ 1 (faceMapSide K i a) := by refine (contDiff_apply ℝ ℝ i).smul ((contDiff_expMapBasis K).comp (contDiff_pi.mpr fun w ↦ ?_)) by_cases hw : w = w₀ - · simpa only [dif_pos hw] using contDiff_const - · simp only [dif_neg hw] + · simpa only [dite_eq_left hw] using contDiff_const + · simp only [dite_eq_right hw] by_cases hi : (⟨w, hw⟩ : {w // w ≠ w₀}) = i - · simpa only [if_pos hi] using contDiff_const - · simpa only [if_neg hi] using contDiff_apply ℝ ℝ _ + · simpa only [ite_eq_left hi] using contDiff_const + · simpa only [ite_eq_right hi] using contDiff_apply ℝ ℝ _ /-- **Abstract topological core.** For an open injective map `f` and a set `s`, if the closure of `f '' s` is contained in `f '' closure s` together with one extra point `p`, then the frontier of @@ -222,12 +222,12 @@ private theorem expMapBasis_mem_iUnion_faceMapSide fun w' ↦ if w' = w₀ then 0 else y w' := by funext w' by_cases hw'₀ : w' = w₀ - · simp only [dif_pos hw'₀, if_pos hw'₀] - · simp only [dif_neg hw'₀, if_neg hw'₀] + · simp only [dite_eq_left hw'₀, ite_eq_left hw'₀] + · simp only [dite_eq_right hw'₀, ite_eq_right hw'₀] by_cases hw'w : (⟨w', hw'₀⟩ : {w // w ≠ w₀}) = i · obtain rfl : w' = w := by rw [hi, Subtype.mk_eq_mk] at hw'w; exact hw'w - simp only [if_pos hw'w] - · simp only [hc, if_neg hw'w] + simp only [ite_eq_left hw'w] + · simp only [hc, ite_eq_right hw'w] rw [faceMapSide, expMapBasis_apply'' y, hci, hfun] refine Set.mem_iUnion.mpr ⟨i, Set.mem_iUnion₂.mpr ⟨y w, ?_, ⟨c, hcmem, hkey⟩⟩⟩ rcases ha with h | h <;> simp [h] @@ -252,16 +252,16 @@ theorem image_boundary_subset_faces : have hIcc : ∀ v : InfinitePlace K, v ≠ w₀ → y v ∈ Icc (0 : ℝ) 1 := fun v hv ↦ by simpa [hv] using hyc v by_cases hwe : w = w₀ - · rw [if_pos hwe, Set.mem_Iio, not_lt, hwe] at hw + · rw [ite_eq_left hwe, Set.mem_Iio, not_lt, hwe] at hw have hy0 : y w₀ = 0 := le_antisymm hw₀ hw refine Or.inl ⟨fun i ↦ y i.1, ⟨fun i ↦ (hIcc i.1 i.2).1, fun i ↦ (hIcc i.1 i.2).2⟩, ?_⟩ rw [faceMapZero] congr 1 funext v by_cases hv : v = w₀ - · rw [dif_pos hv, hv, hy0] - · simp only [dif_neg hv] - · rw [if_neg hwe] at hw + · rw [dite_eq_left hv, hv, hy0] + · simp only [dite_eq_right hv] + · rw [ite_eq_right hwe] at hw have h1 := hIcc w hwe rw [Set.mem_Ioo, not_and_or, not_lt, not_lt] at hw refine Or.inr (expMapBasis_mem_iUnion_faceMapSide K hwe hw₀ hIcc ?_) @@ -598,8 +598,8 @@ theorem mem_iUnion_image_liftToMixed_of_eq refine Prod.ext (funext fun w ↦ ?_) (funext fun w ↦ ?_) · simp only [hε, hmodreal w] by_cases hpos : 0 ≤ x.1 w - · rw [decide_eq_true hpos, if_pos rfl, one_mul, abs_of_nonneg hpos] - · rw [decide_eq_false hpos, if_neg (by simp), abs_of_neg (not_le.mp hpos)] + · rw [decide_eq_true hpos, ite_eq_left rfl, one_mul, abs_of_nonneg hpos] + · rw [decide_eq_false hpos, ite_eq_right (by simp), abs_of_neg (not_le.mp hpos)] ring · simp only [hcph w, hmodcplx w] exact hθeq w @@ -675,7 +675,7 @@ theorem normLeOne_frontier_lipschitz_cover_index : refine ⟨m, ‖(Φ : mixedSpace K →L[ℝ] (index K → ℝ))‖₊ * (M * 1), fun j c ↦ Φ (φ j (fun a ↦ c (g.symm a))), fun j ↦ (Φ : mixedSpace K →L[ℝ] (index K → ℝ)).lipschitzWith.comp ((hφ j).comp - (IsometryEquiv.piCongrLeft' (Y := fun _ ↦ ℝ) g).isometry.lipschitz), ?_⟩ + (IsometryEquiv.piCongrLeft' (Y := fun _ ↦ ℝ) g).isometry.lipschitzWith), ?_⟩ rw [← Φ.coe_toHomeomorph, ← Φ.toHomeomorph.image_frontier] refine (Set.image_mono hcov).trans ?_ rw [Set.image_iUnion] diff --git a/projects/Chebotarev/CebotarevDensity/ForMathlib/TsumFiberBound.lean b/projects/Chebotarev/CebotarevDensity/ForMathlib/TsumFiberBound.lean new file mode 100644 index 000000000..02e8c54a0 --- /dev/null +++ b/projects/Chebotarev/CebotarevDensity/ForMathlib/TsumFiberBound.lean @@ -0,0 +1,51 @@ +module + +public import Mathlib.Topology.Algebra.InfiniteSum.Real +public import Mathlib.Topology.Instances.ENNReal.Lemmas + +/-! Fibre-counting bounds for nonnegative sums. -/ + +@[expose] public section + +open Set +open scoped ENNReal + +namespace Chebotarev + +/-- **Fibre-counting bound for `ℝ≥0∞`-valued sums.** If every fibre `g ⁻¹' {y}` is finite with at +most `d` elements, then `Σ_b f(g b) ≤ d · Σ_y f y`: group `b` by its image `g b`, on each fibre +the summand is the constant `f y`, and the fibre has `≤ d` terms. -/ +private theorem tsum_comp_le_card_fibre_mul {β γ : Type*} (g : β → γ) (f : γ → ℝ≥0∞) (d : ℕ) + (hfin : ∀ y, Finite (g ⁻¹' {y} : Set β)) (hfib : ∀ y, Nat.card (g ⁻¹' {y} : Set β) ≤ d) : + ∑' b, f (g b) ≤ (d : ℝ≥0∞) * ∑' y, f y := by + rw [← ENNReal.tsum_fiberwise (fun b ↦ f (g b)) g, ← ENNReal.tsum_mul_left] + refine ENNReal.tsum_le_tsum (fun y ↦ ?_) + rw [tsum_congr (fun b : (g ⁻¹' {y} : Set β) ↦ by rw [b.2])] + have := hfin y + let := Fintype.ofFinite (g ⁻¹' {y} : Set β) + rw [tsum_fintype, Finset.sum_const, Finset.card_univ, ← Nat.card_eq_fintype_card, nsmul_eq_mul] + gcongr + exact_mod_cast hfib y + +/-- **Fibre-counting bound for real-valued sums.** The `ℝ`-valued companion of +`tsum_comp_le_card_fibre_mul`: for nonnegative summable `FA, FK` with `FA b ≤ FK (g b)` and every +fibre `g ⁻¹' {y}` finite of size `≤ d`, the sum `Σ_b FA b` is at most `d · Σ_y FK y`. -/ +theorem tsum_real_comp_le_card_fibre_mul {β γ : Type*} (g : β → γ) (FA : β → ℝ) + (FK : γ → ℝ) (d : ℕ) (hsummA : Summable FA) (hsummK : Summable FK) (hnonnegA : ∀ b, 0 ≤ FA b) + (hnonnegK : ∀ y, 0 ≤ FK y) (hterm : ∀ b, FA b ≤ FK (g b)) + (hfin : ∀ y, Finite (g ⁻¹' {y} : Set β)) (hfib : ∀ y, Nat.card (g ⁻¹' {y} : Set β) ≤ d) : + ∑' b, FA b ≤ (d : ℝ) * ∑' y, FK y := by + have hchain : ∑' b, ENNReal.ofReal (FA b) + ≤ (d : ℝ≥0∞) * ∑' y, ENNReal.ofReal (FK y) := + calc ∑' b, ENNReal.ofReal (FA b) ≤ ∑' b, ENNReal.ofReal (FK (g b)) := + ENNReal.tsum_le_tsum fun b ↦ ENNReal.ofReal_le_ofReal (hterm b) + _ ≤ (d : ℝ≥0∞) * ∑' y, ENNReal.ofReal (FK y) := + tsum_comp_le_card_fibre_mul g (ENNReal.ofReal <| FK ·) d hfin hfib + rw [← ENNReal.ofReal_tsum_of_nonneg hnonnegA hsummA, + ← ENNReal.ofReal_tsum_of_nonneg hnonnegK hsummK] at hchain + rw [← ENNReal.toReal_ofReal (tsum_nonneg hnonnegA), + ← ENNReal.toReal_ofReal (mul_nonneg (Nat.cast_nonneg d) (tsum_nonneg hnonnegK)), + ENNReal.ofReal_mul (Nat.cast_nonneg d), ENNReal.ofReal_natCast] + exact ENNReal.toReal_mono (ENNReal.mul_ne_top (by simp) ENNReal.ofReal_ne_top) hchain + +end Chebotarev diff --git a/projects/Chebotarev/CebotarevDensity/Frobenius.lean b/projects/Chebotarev/CebotarevDensity/Frobenius.lean index a5556b12b..de813c534 100644 --- a/projects/Chebotarev/CebotarevDensity/Frobenius.lean +++ b/projects/Chebotarev/CebotarevDensity/Frobenius.lean @@ -102,7 +102,7 @@ theorem UnramifiedIn.ramificationIdx_eq_one [IsGalois K L] (hP : 𝔓.LiesOver 𝔭) : Ideal.ramificationIdx' (𝔓.under (𝓞 K)) 𝔓 = 1 := by have := hP have h𝔓 : 𝔓 ≠ ⊥ := Ideal.ne_bot_of_liesOver_of_ne_bot hunr.1 𝔓 - have hpbot : 𝔓.under (𝓞 K) ≠ ⊥ := Ideal.IsIntegral.comap_ne_bot (𝓞 K) h𝔓 + have hpbot : 𝔓.under (𝓞 K) ≠ ⊥ := Ideal.IsIntegral.under_ne_bot (𝓞 K) h𝔓 have : Algebra.IsUnramifiedAt (𝓞 K) 𝔓 := hunr.2 𝔓 (‹𝔓.IsPrime›.isMaximal h𝔓) hP rw [Ideal.ramificationIdx'_eq_ramificationIdx (𝔓.under (𝓞 K)) 𝔓 hpbot] exact Ideal.ramificationIdx_eq_one_of_isUnramifiedAt @@ -120,7 +120,7 @@ theorem inertiaGroup_trivial_of_unramified [IsGalois K L] (hunr : Ideal.ramificationIdx' (𝔓.under (𝓞 K)) 𝔓 = 1) : Ideal.inertia Gal(L/K) 𝔓 = ⊥ := by have hPbot : 𝔓 ≠ ⊥ := ne_bot_of_ramificationIdx_eq_one K L hunr - have hpbot : 𝔓.under (𝓞 K) ≠ ⊥ := Ideal.IsIntegral.comap_ne_bot (𝓞 K) hPbot + have hpbot : 𝔓.under (𝓞 K) ≠ ⊥ := Ideal.IsIntegral.under_ne_bot (𝓞 K) hPbot have : 𝔓.IsMaximal := ‹𝔓.IsPrime›.isMaximal hPbot have : (𝔓.under (𝓞 K)).IsMaximal := (inferInstance : (𝔓.under (𝓞 K)).IsPrime).isMaximal hpbot @@ -129,7 +129,7 @@ theorem inertiaGroup_trivial_of_unramified [IsGalois K L] let : Field (𝓞 K ⧸ 𝔓.under (𝓞 K)) := Ideal.Quotient.field _ let : Field (𝓞 L ⧸ 𝔓) := Ideal.Quotient.field _ exact IsGalois.to_isSeparable - haveI : Finite (𝓞 K ⧸ 𝔓.under (𝓞 K)) := Ideal.finiteQuotientOfFreeOfNeBot _ hpbot + have : Finite (𝓞 K ⧸ 𝔓.under (𝓞 K)) := Ideal.finiteQuotientOfFreeOfNeBot _ hpbot have hcard : Nat.card (Ideal.inertia Gal(L/K) 𝔓) = Ideal.ramificationIdx' (𝔓.under (𝓞 K)) 𝔓 := by @@ -206,7 +206,7 @@ theorem frobeniusClass_eq_mk_of_isArithFrobAt [IsGalois K L] (σ : Gal(L/K)) (𝔓 : Ideal (𝓞 L)) [𝔓.IsPrime] (hσ : IsArithFrobAt (𝓞 K) σ 𝔓) (hP : 𝔓.LiesOver 𝔭) : frobeniusClass K L 𝔭 = ConjClasses.mk σ := by - rw [frobeniusClass, dif_pos ⟨‹𝔭.IsPrime›, hunr⟩] + rw [frobeniusClass, dite_eq_left ⟨‹𝔭.IsPrime›, hunr⟩] exact (exists_frobeniusClass K L 𝔭 hunr).choose_spec σ 𝔓 hσ hP /-- The order of an arithmetic Frobenius at an unramified prime is its residue degree. -/ @@ -218,7 +218,7 @@ theorem orderOf_eq_finrank_of_isArithFrobAt (hσ : IsArithFrobAt (𝓞 K) σ 𝔓) : orderOf σ = Module.finrank (𝓞 K ⧸ 𝔓.under (𝓞 K)) (𝓞 L ⧸ 𝔓) := by have hPbot : 𝔓 ≠ ⊥ := ne_bot_of_ramificationIdx_eq_one K L h - have hpbot : 𝔓.under (𝓞 K) ≠ ⊥ := Ideal.IsIntegral.comap_ne_bot (𝓞 K) hPbot + have hpbot : 𝔓.under (𝓞 K) ≠ ⊥ := Ideal.IsIntegral.under_ne_bot (𝓞 K) hPbot have : 𝔓.IsMaximal := ‹𝔓.IsPrime›.isMaximal hPbot have : (𝔓.under (𝓞 K)).IsMaximal := (inferInstance : (𝔓.under (𝓞 K)).IsPrime).isMaximal hpbot @@ -287,14 +287,13 @@ theorem card_primesAbove_mul_finrank_eq let : Field (𝓞 K ⧸ 𝔓₀.under (𝓞 K)) := Ideal.Quotient.field _ let : Field (𝓞 L ⧸ 𝔓₀) := Ideal.Quotient.field _ exact IsGalois.to_isSeparable - haveI : Finite (𝓞 K ⧸ 𝔓₀.under (𝓞 K)) := + have : Finite (𝓞 K ⧸ 𝔓₀.under (𝓞 K)) := Ideal.finiteQuotientOfFreeOfNeBot _ hp_under_bot have H := Ideal.ncard_primesOver_mul_card_inertia_mul_finrank (G := Gal(L/K)) (𝔓₀.under (𝓞 K)) 𝔓₀ rw [inertiaGroup_trivial_of_unramified K L 𝔓₀ he, Subgroup.card_bot, mul_one, - ← Ideal.inertiaDeg'_eq_inertiaDeg (𝔓₀.under (𝓞 K)) 𝔓₀, - Ideal.inertiaDeg'_algebraMap (𝔓₀.under (𝓞 K)) 𝔓₀] at H + Ideal.inertiaDeg_eq_of_isMaximal (𝔓₀.under (𝓞 K)) 𝔓₀] at H have hset : (𝔓₀.under (𝓞 K)).primesOver (𝓞 L) = {𝔓 : Ideal (𝓞 L) | 𝔓.IsPrime ∧ 𝔓.LiesOver 𝔭 ∧ 𝔓 ≠ ⊥} := by ext 𝔓 @@ -427,7 +426,7 @@ theorem finite_primes_natCast_mem (p : ℕ) (hp : p ≠ 0) : have hfin := Ideal.finite_factors (R := 𝓞 K) hspan apply Set.Finite.ofFinset (hfin.toFinset.image (·.asIdeal)) intro 𝔭 - simp only [Set.Finite.mem_toFinset, Finset.mem_image, Set.mem_setOf_eq] + simp only [Set.Finite.mem_toFinset, Finset.mem_image, Set.mem_ofPred_eq] constructor · rintro ⟨v, hv, rfl⟩ exact diff --git a/projects/Chebotarev/CebotarevDensity/Main.lean b/projects/Chebotarev/CebotarevDensity/Main.lean index 678f99731..5cb630f0a 100644 --- a/projects/Chebotarev/CebotarevDensity/Main.lean +++ b/projects/Chebotarev/CebotarevDensity/Main.lean @@ -90,7 +90,7 @@ so `|C| = 1`. -/ theorem ConjClasses_carrier_card_eq_one_of_comm {G : Type*} [Monoid G] [IsMulCommutative G] [Finite G] (g : G) : Nat.card (ConjClasses.mk g).carrier = 1 := by - letI : CommMonoid G := IsMulCommutative.instCommMonoid + let : CommMonoid G := IsMulCommutative.instCommMonoid have h : (ConjClasses.mk g).carrier = {g} := by ext a simp [ConjClasses.mem_carrier_iff_mk_eq, ConjClasses.mk_eq_mk_iff_isConj, isConj_iff_eq] @@ -260,7 +260,7 @@ private theorem ratPrime_eq_span (𝔭 : Ideal (𝓞 ℚ)) (hp : 𝔭.IsPrime) ( `p`, via the same `𝓞 ℚ ≃+* ℤ` transport (`comap` of the prime `span {(p : ℤ)}`). -/ private theorem span_nat_isPrime {p : ℕ} (hpp : p.Prime) : (Ideal.span {(p : 𝓞 ℚ)}).IsPrime := by - haveI : (Ideal.span {(p : ℤ)}).IsPrime := + have : (Ideal.span {(p : ℤ)}).IsPrime := (Ideal.span_singleton_prime (by exact_mod_cast hpp.ne_zero)).mpr (Nat.prime_iff_prime_int.mp hpp) rw [ratSpan_eq_comap_intSpan] @@ -278,8 +278,8 @@ private theorem unramifiedIn_cyclotomic_of_coprime {K : Type*} [Field K] [Number UnramifiedIn K L 𝔭 := by classical refine ⟨h𝔭, fun 𝔓 h𝔓max h𝔓lo ↦ ?_⟩ - haveI := h𝔓lo - haveI : 𝔓.IsPrime := h𝔓max.isPrime + have := h𝔓lo + have : 𝔓.IsPrime := h𝔓max.isPrime rw [← not_dvd_differentIdeal_iff (A := 𝓞 K) (B := 𝓞 L)] intro hdvd obtain ⟨ζ, hζ⟩ := IsCyclotomicExtension.exists_isPrimitiveRoot K L @@ -337,7 +337,7 @@ private theorem frobeniusClass_eq_iff_residue (𝔭 : Ideal (𝓞 ℚ)) [𝔭.IsPrime] (hunr : UnramifiedIn ℚ L 𝔭) (hcop : (Ideal.absNorm 𝔭).Coprime n) : frobeniusClass ℚ L 𝔭 = ConjClasses.mk σ ↔ (Ideal.absNorm 𝔭 : ZMod n) = a := by - letI : CommMonoid (L ≃ₐ[ℚ] L) := IsMulCommutative.instCommMonoid + let : CommMonoid (L ≃ₐ[ℚ] L) := IsMulCommutative.instCommMonoid have hdict := autToPow_frobeniusClass_out ℚ L n hζ 𝔭 hunr hcop rw [show frobeniusClass ℚ L 𝔭 = ConjClasses.mk (frobeniusClass ℚ L 𝔭).out from (Quotient.out_eq _).symm, ConjClasses.mk_eq_mk_iff_isConj, isConj_iff_eq] @@ -389,7 +389,7 @@ private theorem dirichlet_AP_fibre_diff_image_subset_bad (fun p : ℕ ↦ Ideal.span {(p : 𝓞 ℚ)}) '' {p : ℕ | p.Prime ∧ (p : ZMod n) = a} ⊆ (fun q : ℕ ↦ Ideal.span {(q : 𝓞 ℚ)}) '' {q : ℕ | q.Prime ∧ q ∣ n} := by rintro 𝔭 ⟨⟨hpr, hunr, hfrob⟩, hnotI⟩ - haveI := hpr + have := hpr obtain ⟨q, hqp, hqeq⟩ := ratPrime_eq_span 𝔭 hpr (UnramifiedIn.ne_bot ℚ L hunr) have hnorm : Ideal.absNorm 𝔭 = q := by rw [hqeq, absNorm_span_nat] by_cases hcop : (Ideal.absNorm 𝔭).Coprime n @@ -414,7 +414,7 @@ private theorem dirichlet_AP_image_diff_fibre_subset_bad (fun q : ℕ ↦ Ideal.span {(q : 𝓞 ℚ)}) '' {q : ℕ | q.Prime ∧ q ∣ n} := by rintro 𝔭 ⟨⟨p, ⟨hpp, hpa⟩, rfl⟩, hnotF⟩ have hprime : (Ideal.span {(p : 𝓞 ℚ)}).IsPrime := span_nat_isPrime hpp - haveI := hprime + have := hprime have hp0 : (p : 𝓞 ℚ) ≠ 0 := Nat.cast_ne_zero.mpr hpp.ne_zero by_cases hdvd : p ∣ n · exact ⟨p, ⟨hpp, hdvd⟩, rfl⟩ @@ -438,11 +438,11 @@ private theorem dirichlet_AP_main (n : ℕ) (hn4 : n % 4 ≠ 2) (hn : 1 ≤ n) ((Nat.totient n : ℝ)⁻¹) := by have : NeZero n := ⟨by lia⟩ -- The module system does not auto-synthesise `NeZero (n : ℚ)` for `CyclotomicField n ℚ` here. - haveI : NeZero ((n : ℕ) : ℚ) := ⟨by exact_mod_cast (show n ≠ 0 by lia)⟩ + have : NeZero ((n : ℕ) : ℚ) := ⟨by exact_mod_cast (show n ≠ 0 by lia)⟩ set L := CyclotomicField n ℚ - haveI : IsCyclotomicExtension {n} ℚ L := CyclotomicField.isCyclotomicExtension n ℚ - haveI : IsGalois ℚ L := IsCyclotomicExtension.isGalois {n} ℚ L - haveI : IsMulCommutative (L ≃ₐ[ℚ] L) := + have : IsCyclotomicExtension {n} ℚ L := CyclotomicField.isCyclotomicExtension n ℚ + have : IsGalois ℚ L := IsCyclotomicExtension.isGalois {n} ℚ L + have : IsMulCommutative (L ≃ₐ[ℚ] L) := IsCyclotomicExtension.isMulCommutative (S := {n}) ℚ L have hirr : Irreducible (Polynomial.cyclotomic n ℚ) := Polynomial.cyclotomic.irreducible_rat (by lia) diff --git a/projects/Chebotarev/CebotarevDensity/NumberFieldEulerProduct.lean b/projects/Chebotarev/CebotarevDensity/NumberFieldEulerProduct.lean index 753a2f1ee..28b3b5b8b 100644 --- a/projects/Chebotarev/CebotarevDensity/NumberFieldEulerProduct.lean +++ b/projects/Chebotarev/CebotarevDensity/NumberFieldEulerProduct.lean @@ -2,7 +2,7 @@ module public import Mathlib.Analysis.SpecialFunctions.Pow.Asymptotics public import Mathlib.Analysis.Normed.Ring.InfiniteSum -public import Mathlib.Data.Finite.Vector +public import Mathlib.Data.Fintype.Vector public import Mathlib.Data.Finsupp.Multiset public import Mathlib.Data.Sym.Card public import Mathlib.NumberTheory.NumberField.Cyclotomic.Basic @@ -249,7 +249,7 @@ lemma sum_idealNormMultiplicity_isBigO : classical have h_finite : ∀ (b : ℕ), {I : NonzeroIdeal L | Ideal.absNorm I.1 = b}.Finite := fun b ↦ Set.Finite.preimage (f := fun I : NonzeroIdeal L ↦ I.1) (fun _ _ _ _ ↦ Subtype.ext) - (Ideal.finite_setOf_absNorm_eq (S := 𝓞 L) b) + (Ideal.finite_setOfPred_absNorm_eq (S := 𝓞 L) b) have h_sum_card : ∀ n : ℕ, ∑ k ∈ Finset.Icc 1 n, idealNormMultiplicity L k = Nat.card {I : NonzeroIdeal L // Ideal.absNorm I.1 ≤ n} := fun n ↦ by have key := Finset.card_preimage_eq_sum_card_image_eq (f := fun I : NonzeroIdeal L ↦ @@ -257,7 +257,7 @@ lemma sum_idealNormMultiplicity_isBigO : rw [show ((fun I : NonzeroIdeal L ↦ Ideal.absNorm I.1) ⁻¹' ↑(Finset.Icc 1 n)) = {I : NonzeroIdeal L | Ideal.absNorm I.1 ≤ n} by ext ⟨I, hI⟩ - simp only [Set.mem_preimage, Finset.coe_Icc, Set.mem_Icc, Set.mem_setOf_eq] + simp only [Set.mem_preimage, Finset.coe_Icc, Set.mem_Icc, Set.mem_ofPred_eq] exact ⟨fun h ↦ h.2, fun h ↦ ⟨Nat.one_le_iff_ne_zero.mpr (mt Ideal.absNorm_eq_zero_iff.mp hI), h⟩⟩] at key exact key.symm @@ -501,7 +501,7 @@ eventually captured, so the partial sums tend to `∑_𝔞 N𝔞^{-s} = ζ_K(s)` private instance instFiniteAbsNormFiber (n : ℕ) : Finite {I : NonzeroIdeal L // Ideal.absNorm I.1 = n} := Set.Finite.to_subtype <| Set.Finite.of_finite_image (f := fun I : NonzeroIdeal L ↦ I.1) - ((Ideal.finite_setOf_absNorm_eq (S := 𝓞 L) n).subset (by rintro _ ⟨⟨I, _⟩, rfl, rfl⟩; rfl)) + ((Ideal.finite_setOfPred_absNorm_eq (S := 𝓞 L) n).subset (by rintro _ ⟨⟨I, _⟩, rfl, rfl⟩; rfl)) (fun _ _ _ _ ↦ Subtype.ext) private lemma tsum_absNormFiber {M : Type*} [AddCommGroup M] [TopologicalSpace M] [T2Space M] @@ -583,14 +583,14 @@ private theorem factorization_prod_primePow_eq rw [factorization_prod_primePow_apply L S e 𝔮] simp_rw [factorization_primePow_apply L] by_cases h𝔮 : 𝔮 ∈ S - · rw [if_pos h𝔮, Finset.sum_eq_single (⟨𝔮, h𝔮⟩ : {x // x ∈ S})] - · rw [if_pos rfl] + · rw [ite_eq_left h𝔮, Finset.sum_eq_single (⟨𝔮, h𝔮⟩ : {x // x ∈ S})] + · rw [ite_eq_left rfl] · rintro b _ hb - rw [if_neg (fun h ↦ hb (Subtype.ext h.symm))] + rw [ite_eq_right (fun h ↦ hb (Subtype.ext h.symm))] · exact fun h ↦ absurd (Finset.mem_attach S _) h - · rw [if_neg h𝔮, Finset.sum_eq_zero] + · rw [ite_eq_right h𝔮, Finset.sum_eq_zero] rintro ⟨b, hb⟩ - - rw [if_neg (fun h : 𝔮 = b ↦ h𝔮 (h.symm ▸ hb))] + rw [ite_eq_right (fun h : 𝔮 = b ↦ h𝔮 (h.symm ▸ hb))] open UniqueFactorizationMonoid in /-- The normalized prime factors of `𝔞` as a `Finset` of nonzero prime ideals. -/ @@ -624,9 +624,9 @@ private theorem factorization_idealOfExp_eq classical have hprod : (∏ 𝔭 ∈ S.attach, 𝔭.1.1 ^ (fun q ↦ if h : q ∈ S then f ⟨q, h⟩ else 0) 𝔭.1) = ∏ 𝔭 ∈ S.attach, 𝔭.1.1 ^ f 𝔭 := - Finset.prod_congr rfl fun 𝔭 _ ↦ by simp only [dif_pos 𝔭.2] + Finset.prod_congr rfl fun 𝔭 _ ↦ by simp only [dite_eq_left 𝔭.2] rw [← hprod, factorization_prod_primePow_eq L S - (fun q ↦ if h : q ∈ S then f ⟨q, h⟩ else 0) 𝔮.1, if_pos 𝔮.2, dif_pos 𝔮.2] + (fun q ↦ if h : q ∈ S then f ⟨q, h⟩ else 0) 𝔮.1, ite_eq_left 𝔮.2, dite_eq_left 𝔮.2] open UniqueFactorizationMonoid in private theorem prod_primePow_count_eq (S : Finset {𝔭 : Ideal (𝓞 L) // 𝔭.IsPrime ∧ 𝔭 ≠ ⊥}) diff --git a/projects/Chebotarev/CebotarevDensity/ZetaProduct.lean b/projects/Chebotarev/CebotarevDensity/ZetaProduct.lean index 356695e9a..c67aa3c90 100644 --- a/projects/Chebotarev/CebotarevDensity/ZetaProduct.lean +++ b/projects/Chebotarev/CebotarevDensity/ZetaProduct.lean @@ -172,11 +172,11 @@ private theorem norm_galoisCharacterOnIdeal_le_one (χ : galoisCharacter K L) (𝔞 : Ideal (𝓞 K)) : ‖galoisCharacterOnIdeal K L χ 𝔞‖ ≤ 1 := by rw [galoisCharacterOnIdeal, norm_prod] - refine Finset.prod_le_one (fun i _ ↦ norm_nonneg _) (fun 𝔭 _ ↦ ?_) + refine Finset.prod_le_one₀ (fun i _ ↦ norm_nonneg _) (fun 𝔭 _ ↦ ?_) rw [norm_pow] by_cases h : UnramifiedIn K L 𝔭 - · rw [if_pos h, norm_galoisCharacter_out, one_pow] - · rw [if_neg h, norm_zero] + · rw [ite_eq_left h, norm_galoisCharacter_out, one_pow] + · rw [ite_eq_right h, norm_zero] exact zero_pow_le_one _ /-- Sharifi 7.1.18 (p. 141): Euler product for an abelian Galois @@ -212,18 +212,18 @@ theorem exists_artinLSeries_eulerProduct_abelian have hsupp : Function.mulSupport f ⊆ Set.range g := by intro 𝔭 hmem simp only [Function.mem_mulSupport, hf] at hmem - haveI := 𝔭.2.1 + have := 𝔭.2.1 have hunr : UnramifiedIn K L 𝔭.1 := by by_contra hnr apply hmem - rw [hw, galoisCharacterOnIdeal_apply_prime K L χ 𝔭.1 𝔭.2.2, if_neg hnr, zero_mul, sub_zero, + rw [hw, galoisCharacterOnIdeal_apply_prime K L χ 𝔭.1 𝔭.2.2, ite_eq_right hnr, zero_mul, sub_zero, inv_one] exact ⟨⟨𝔭.1, 𝔭.2.1, hunr⟩, rfl⟩ rw [← hg_inj.tprod_eq hsupp] refine tprod_congr fun 𝔭 ↦ ?_ simp only [hf, hg, hw] - haveI := 𝔭.2.1 - rw [galoisCharacterOnIdeal_apply_prime K L χ 𝔭.1 𝔭.2.2.ne_bot, if_pos 𝔭.2.2] + have := 𝔭.2.1 + rw [galoisCharacterOnIdeal_apply_prime K L χ 𝔭.1 𝔭.2.2.ne_bot, ite_eq_left 𝔭.2.2] /-! ### Sub-lemmas for `dedekindZeta_local_factor_eq_product_artin_local` @@ -350,7 +350,6 @@ private theorem cpow_neg_absNorm_eq_pow {a b : ℕ} (f : ℕ) (s : ℂ) (h : b = a ^ f) : ((b : ℂ)) ^ (-s) = ((a : ℂ) ^ (-s)) ^ f := by rw [h, Nat.cast_pow, ← Complex.natCast_cpow_natCast_mul, Complex.cpow_nat_mul] -set_option backward.isDefEq.respectTransparency false in /-- Sharifi 7.1.16 (p. 141) local step: the local Euler factor at an unramified prime `𝔭` of `K` factors as a product over characters. Source quote (paraphrased identity): the local factor @@ -365,12 +364,12 @@ theorem dedekindZeta_local_factor_eq_product_artin_local (1 - (χ (frobeniusClass K L 𝔭).out : ℂ) * (Ideal.absNorm 𝔭 : ℂ) ^ (-s))⁻¹ := by classical open scoped IsMulCommutative in - letI : CommGroup Gal(L/K) := inferInstance + let : CommGroup Gal(L/K) := inferInstance set σ : Gal(L/K) := (frobeniusClass K L 𝔭).out set Y : ℂ := (Ideal.absNorm 𝔭 : ℂ) ^ (-s) with hY set f : ℕ := orderOf σ with hf - haveI : Fintype Gal(L/K) := Fintype.ofFinite _ - haveI : Fintype (Gal(L/K) →* ℂˣ) := Fintype.ofFinite _ + have : Fintype Gal(L/K) := Fintype.ofFinite _ + have : Fintype (Gal(L/K) →* ℂˣ) := Fintype.ofFinite _ have hfpos : 0 < f := hf ▸ orderOf_pos_iff.mpr (isOfFinOrder_of_finite σ) have hcount : Nat.card {𝔓 : Ideal (𝓞 L) // 𝔓.IsPrime ∧ 𝔓.LiesOver 𝔭 ∧ 𝔓 ≠ ⊥} = Nat.card Gal(L/K) / f := by @@ -383,29 +382,29 @@ theorem dedekindZeta_local_factor_eq_product_artin_local = ((1 - Y ^ f) ^ (Nat.card Gal(L/K) / f))⁻¹ := by rw [tprod_fintype, Finset.prod_inv_distrib, prod_galoisCharacter_one_sub σ Y, hf] have hpbot : 𝔭 ≠ ⊥ := UnramifiedIn.ne_bot K L _hunr - haveI : 𝔭.IsMaximal := ‹𝔭.IsPrime›.isMaximal hpbot - haveI : Finite (𝔭.primesOver (𝓞 L)) := (IsDedekindDomain.primesOver_finite 𝔭 (𝓞 L)).to_subtype - haveI : Finite {𝔓 : Ideal (𝓞 L) // 𝔓.IsPrime ∧ 𝔓.LiesOver 𝔭 ∧ 𝔓 ≠ ⊥} := + have : 𝔭.IsMaximal := ‹𝔭.IsPrime›.isMaximal hpbot + have : Finite (𝔭.primesOver (𝓞 L)) := (IsDedekindDomain.primesOver_finite 𝔭 (𝓞 L)).to_subtype + have : Finite {𝔓 : Ideal (𝓞 L) // 𝔓.IsPrime ∧ 𝔓.LiesOver 𝔭 ∧ 𝔓 ≠ ⊥} := Finite.of_injective (fun 𝔓 : {𝔓 : Ideal (𝓞 L) // 𝔓.IsPrime ∧ 𝔓.LiesOver 𝔭 ∧ 𝔓 ≠ ⊥} ↦ (⟨𝔓.1, 𝔓.2.1, 𝔓.2.2.1⟩ : 𝔭.primesOver (𝓞 L))) - fun _ _ hab ↦ Subtype.ext (by simpa using hab) - haveI : Fintype {𝔓 : Ideal (𝓞 L) // 𝔓.IsPrime ∧ 𝔓.LiesOver 𝔭 ∧ 𝔓 ≠ ⊥} := Fintype.ofFinite _ + fun _ _ hab ↦ Subtype.ext (congrArg (fun q : 𝔭.primesOver (𝓞 L) ↦ q.1) hab) + have : Fintype {𝔓 : Ideal (𝓞 L) // 𝔓.IsPrime ∧ 𝔓.LiesOver 𝔭 ∧ 𝔓 ≠ ⊥} := Fintype.ofFinite _ have hterm : ∀ 𝔓 : {𝔓 : Ideal (𝓞 L) // 𝔓.IsPrime ∧ 𝔓.LiesOver 𝔭 ∧ 𝔓 ≠ ⊥}, (1 - (Ideal.absNorm 𝔓.1 : ℂ) ^ (-s))⁻¹ = (1 - Y ^ f)⁻¹ := by intro 𝔓 - haveI := 𝔓.2.1 - haveI hlo : 𝔓.1.LiesOver 𝔭 := 𝔓.2.2.1 - have hdeg : (𝔓.1.under (𝓞 K)).inertiaDeg' 𝔓.1 = f := by - rw [Ideal.inertiaDeg'_algebraMap, hf] + have := 𝔓.2.1 + have hlo : 𝔓.1.LiesOver 𝔭 := 𝔓.2.2.1 + have : 𝔓.1.IsMaximal := 𝔓.2.1.isMaximal 𝔓.2.2.2 + have : (𝔓.1.under (𝓞 K)).IsMaximal := hlo.over ▸ ‹𝔭.IsMaximal› + have hdeg : 𝔓.1.inertiaDeg (𝓞 K) = f := by + rw [Ideal.inertiaDeg_eq_of_isMaximal (𝔓.1.under (𝓞 K)) 𝔓.1, hf] exact finrank_residue_eq_orderOf K L σ (frobeniusClass K L 𝔭) (Quotient.out_eq _) 𝔭 _hunr rfl 𝔓.1 hlo - haveI : 𝔓.1.LiesOver (𝔓.1.under (𝓞 K)) := Ideal.over_under (A := 𝓞 K) (P := 𝔓.1) - have hpubot : 𝔓.1.under (𝓞 K) ≠ ⊥ := hlo.over ▸ hpbot - haveI : (𝔓.1.under (𝓞 K)).IsPrime := hlo.over ▸ ‹𝔭.IsPrime› + have : 𝔓.1.LiesOver (𝔓.1.under (𝓞 K)) := Ideal.over_under (A := 𝓞 K) (P := 𝔓.1) + have : (𝔓.1.under (𝓞 K)).IsPrime := hlo.over ▸ ‹𝔭.IsPrime› have hnorm : Ideal.absNorm 𝔓.1 = Ideal.absNorm 𝔭 ^ f := by - rw [Ideal.absNorm_eq_pow_inertiaDeg'_of_liesOver 𝔓.1 (𝔓.1.under (𝓞 K)) inferInstance hpubot, - hdeg, ← hlo.over] + rw [← Ideal.absNorm_pow_inertiaDeg 𝔭 𝔓.1, hdeg] rw [cpow_neg_absNorm_eq_pow f s hnorm, hY] rw [tprod_congr hterm, tprod_fintype, Finset.prod_const, Finset.card_univ, ← Nat.card_eq_fintype_card, hcount, hRHS, Nat.card_eq_fintype_card, inv_pow] @@ -460,7 +459,7 @@ open Classical in (K L : Type*) [Field K] [NumberField K] [Field L] [NumberField L] [Algebra K L] [IsGalois K L] [IsMulCommutative Gal(L/K)] (𝔭 : Ideal (𝓞 K)) [𝔭.IsPrime] (h𝔭 : 𝔭 ≠ ⊥) : frobeniusIdeal K L 𝔭 = (frobeniusClass K L 𝔭).out := by - letI : CommGroup Gal(L/K) := { mul_comm := mul_comm' } + let : CommGroup Gal(L/K) := { mul_comm := mul_comm' } rw [frobeniusIdeal, UniqueFactorizationMonoid.normalizedFactors_irreducible (Ideal.prime_of_isPrime h𝔭 ‹_›).irreducible, normalize_eq, Multiset.map_singleton, Multiset.prod_singleton] @@ -470,7 +469,7 @@ theorem frobeniusIdeal_mul (K L : Type*) [Field K] [NumberField K] [Field L] [NumberField L] [Algebra K L] [IsGalois K L] [IsMulCommutative Gal(L/K)] {𝔞 𝔟 : Ideal (𝓞 K)} (h𝔞 : 𝔞 ≠ ⊥) (h𝔟 : 𝔟 ≠ ⊥) : frobeniusIdeal K L (𝔞 * 𝔟) = frobeniusIdeal K L 𝔞 * frobeniusIdeal K L 𝔟 := by - letI : CommGroup Gal(L/K) := { mul_comm := mul_comm' } + let : CommGroup Gal(L/K) := { mul_comm := mul_comm' } rw [frobeniusIdeal, frobeniusIdeal, frobeniusIdeal, UniqueFactorizationMonoid.normalizedFactors_mul h𝔞 h𝔟, Multiset.map_add, Multiset.prod_add] @@ -479,7 +478,7 @@ theorem frobeniusIdeal_mul (K L : Type*) [Field K] [NumberField K] [Field L] [NumberField L] [Algebra K L] [IsGalois K L] [IsMulCommutative Gal(L/K)] : frobeniusIdeal K L ⊤ = 1 := by - letI : CommGroup Gal(L/K) := { mul_comm := mul_comm' } + let : CommGroup Gal(L/K) := { mul_comm := mul_comm' } rw [frobeniusIdeal, ← Ideal.one_eq_top, UniqueFactorizationMonoid.normalizedFactors_one, Multiset.map_zero, Multiset.prod_zero] @@ -495,7 +494,7 @@ theorem galoisCharacterOnIdeal_eq_char_frobeniusIdeal [IsCyclotomicExtension {m} K L] (χ : galoisCharacter K L) {𝔞 : Ideal (𝓞 K)} (hU : ∀ 𝔭 ∈ UniqueFactorizationMonoid.normalizedFactors 𝔞, UnramifiedIn K L 𝔭) : galoisCharacterOnIdeal K L χ 𝔞 = (χ (frobeniusIdeal K L 𝔞) : ℂ) := by - letI : CommGroup Gal(L/K) := { mul_comm := mul_comm' } + let : CommGroup Gal(L/K) := { mul_comm := mul_comm' } have hfrob : (χ (frobeniusIdeal K L 𝔞) : ℂ) = ((UniqueFactorizationMonoid.normalizedFactors 𝔞).map (fun 𝔭 ↦ (χ (frobeniusClass K L 𝔭).out : ℂ))).prod := by @@ -504,7 +503,7 @@ theorem galoisCharacterOnIdeal_eq_char_frobeniusIdeal rfl rw [galoisCharacterOnIdeal_eq_map_prod, hfrob] refine congrArg Multiset.prod (Multiset.map_congr rfl fun 𝔭 h𝔭 ↦ ?_) - rw [if_pos (hU 𝔭 h𝔭)] + rw [ite_eq_left (hU 𝔭 h𝔭)] open Classical in /-- If the ideal character `χ(𝔞)` is nonzero then every prime factor of `𝔞` is unramified in `L` @@ -516,7 +515,7 @@ private theorem unramifiedIn_of_mem_normalizedFactors_of_galoisCharacterOnIdeal_ by_contra hnr refine h ?_ rw [galoisCharacterOnIdeal_eq_map_prod] - exact Multiset.prod_eq_zero (Multiset.mem_map.mpr ⟨𝔭, h𝔭, if_neg hnr⟩) + exact Multiset.prod_eq_zero (Multiset.mem_map.mpr ⟨𝔭, h𝔭, ite_eq_right hnr⟩) open Classical in /-- **Helper 1a (cardinality form) — value-fibre = unramified-supported Frobenius-value-fibre.** For @@ -555,8 +554,8 @@ theorem charFibre_mem_range {G : Type*} [CommGroup G] [Finite G] (χ : G →* (hζ : ζ ^ orderOf χ = 1) : ∃ g : G, χ g = ζ := by classical - haveI : NeZero (orderOf χ) := ⟨(orderOf_pos_iff.mpr (isOfFinOrder_of_finite χ)).ne'⟩ - haveI : Finite (MonoidHom.range χ) := + have : NeZero (orderOf χ) := ⟨(orderOf_pos_iff.mpr (isOfFinOrder_of_finite χ)).ne'⟩ + have : Finite (MonoidHom.range χ) := Finite.of_surjective χ.rangeRestrict χ.rangeRestrict_surjective have hpow : ∀ g : G, (χ g) ^ orderOf χ = 1 := fun g ↦ by rw [← MonoidHom.pow_apply, pow_orderOf_eq_one, MonoidHom.one_apply] @@ -620,8 +619,8 @@ private theorem unramifiedIn_of_coprime_absNorm UnramifiedIn K L 𝔭 := by classical refine ⟨h𝔭, fun 𝔓 h𝔓max h𝔓lo ↦ ?_⟩ - haveI := h𝔓lo - haveI : 𝔓.IsPrime := h𝔓max.isPrime + have := h𝔓lo + have : 𝔓.IsPrime := h𝔓max.isPrime rw [← not_dvd_differentIdeal_iff (A := 𝓞 K) (B := 𝓞 L)] intro hdvd obtain ⟨ζ, hζ⟩ := IsCyclotomicExtension.exists_isPrimitiveRoot K L @@ -697,7 +696,7 @@ private theorem autToPow_frobeniusIdeal intro hpa hcop have hp' : p ≠ ⊥ := hp.ne_zero have ha' : a ≠ ⊥ := ha - haveI : p.IsPrime := Ideal.isPrime_of_prime hp + have : p.IsPrime := Ideal.isPrime_of_prime hp have hsplit : Ideal.absNorm (p * a) = Ideal.absNorm p * Ideal.absNorm a := map_mul Ideal.absNorm p a have hcp : (Ideal.absNorm p).Coprime m := @@ -885,7 +884,7 @@ private theorem card_fibre_eq_card_good_fibre intro 𝔭 h𝔭 rw [normalizedFactors_mul h0 h𝔟, Multiset.mem_add] at h𝔭 rcases h𝔭 with h𝔭 | h𝔭 - · haveI : 𝔭.IsPrime := Ideal.isPrime_of_prime (prime_of_normalized_factor _ h𝔭) + · have : 𝔭.IsPrime := Ideal.isPrime_of_prime (prime_of_normalized_factor _ h𝔭) exact unramifiedIn_of_coprime_absNorm K L m 𝔭 (prime_of_normalized_factor _ h𝔭).ne_zero (coprime_absNorm_of_mem_factors_of_coprime K m hcop h𝔭) @@ -921,18 +920,18 @@ omit [NumberField L] [FiniteDimensional K L] [IsMulCommutative Gal(L/K)] [NeZero /-- The bad-supported ideals of norm `≤ N` form a finite set: they are a subset of the (finitely many) ideals of norm `≤ N`. -/ private theorem finite_isBadPart (N : ℕ) : {𝔟 : Ideal (𝓞 K) | IsBadPart K L m N 𝔟}.Finite := - (Ideal.finite_setOf_absNorm_le (S := 𝓞 K) N).subset fun _ h𝔟 ↦ h𝔟.2.2 + (Ideal.finite_setOfPred_absNorm_le (S := 𝓞 K) N).subset fun _ h𝔟 ↦ h𝔟.2.2 open UniqueFactorizationMonoid in /-- The L2 fibre subtype at `g` is finite (subset of all ideals of norm `≤ N`). -/ private instance finite_L2 (g : Gal(L/K)) (N : ℕ) : Finite {𝔞 : Ideal (𝓞 K) // 𝔞 ≠ ⊥ ∧ Ideal.absNorm 𝔞 ≤ N ∧ (∀ 𝔭 ∈ normalizedFactors 𝔞, UnramifiedIn K L 𝔭) ∧ frobeniusIdeal K L 𝔞 = g} := by - haveI : Finite {I : Ideal (𝓞 K) // Ideal.absNorm I ≤ N} := - (Ideal.finite_setOf_absNorm_le (S := 𝓞 K) N).to_subtype + have : Finite {I : Ideal (𝓞 K) // Ideal.absNorm I ≤ N} := + (Ideal.finite_setOfPred_absNorm_le (S := 𝓞 K) N).to_subtype exact Finite.of_injective (β := {I : Ideal (𝓞 K) // Ideal.absNorm I ≤ N}) (fun 𝔞 ↦ ⟨𝔞.1, 𝔞.2.2.1⟩) - (fun _ _ hab ↦ Subtype.ext (by simpa using hab)) + (fun _ _ hab ↦ Subtype.ext (congrArg (fun q : {I : Ideal (𝓞 K) // Ideal.absNorm I ≤ N} ↦ q.1) hab)) omit [FiniteDimensional K L] [NeZero m] [IsCyclotomicExtension {m} K L] in open UniqueFactorizationMonoid in @@ -1054,7 +1053,7 @@ private theorem autToPow_range_le_realizedResidues have hHtop : H = ⊤ := by refine subgroup_eq_top_of_forall_frobenius_mem_of_coprime K L m H (fun 𝔭 h𝔭p h𝔭ne h𝔭unr h𝔭cop ↦ ?_) - haveI := h𝔭p + have := h𝔭p rw [hH, Subgroup.mem_comap, autToPow_frobeniusClass_out K L m hζ 𝔭 h𝔭unr h𝔭cop] exact ⟨⟨𝔭, mem_nonZeroDivisors_of_ne_zero h𝔭ne⟩, by rw [ZMod.coe_unitOfCoprime]⟩ intro a ha @@ -1203,7 +1202,7 @@ private theorem sum_rpow_le_euler_prod (K : Type*) [Field K] [NumberField K] rw [Finset.prod_sum P (fun _ ↦ Finset.range (Kn + 1)) (fun 𝔭 k ↦ (((Ideal.absNorm 𝔭 : ℝ)) ^ e) ^ k)] _ ≤ ∏ 𝔭 ∈ P, (1 - ((Ideal.absNorm 𝔭 : ℝ)) ^ e)⁻¹ := by - refine Finset.prod_le_prod + refine Finset.prod_le_prod₀ (fun 𝔭 h𝔭 ↦ Finset.sum_nonneg fun k _ ↦ pow_nonneg (hx0 𝔭 h𝔭) k) (fun 𝔭 h𝔭 ↦ ?_) have h1x : 0 < 1 - ((Ideal.absNorm 𝔭 : ℝ)) ^ e := by have := hxlt 𝔭 h𝔭; linarith have hkey := geom_sum_mul (((Ideal.absNorm 𝔭 : ℝ)) ^ e) (Kn + 1) @@ -1658,7 +1657,7 @@ private theorem coprime_absNorm_of_unramified_of_finrank_eq_one by_contra hncop obtain ⟨p, hpm, hpmem𝔭⟩ := exists_primeFactor_natCast_mem_of_not_coprime K m 𝔭 h𝔭 hncop have hp : p.Prime := (Nat.mem_primeFactors.mp hpm).1 - haveI : Fact p.Prime := ⟨hp⟩ + have : Fact p.Prime := ⟨hp⟩ have hpdvd : p ∣ m := Nat.dvd_of_mem_primeFactors hpm have hm0 : m ≠ 0 := (Nat.mem_primeFactors.mp hpm).2.2 set v := m.factorization p with hv @@ -1684,11 +1683,11 @@ private theorem coprime_absNorm_of_unramified_of_finrank_eq_one have hφ2 : 2 ≤ p ^ k * (p - 1) := two_le_pow_mul_pred hp hbad have hspan𝔭 : Ideal.span {(p : 𝓞 K)} = 𝔭 := span_singleton_natCast_eq_of_finrank_eq_one K hd1 p hp 𝔭 hpmem𝔭 - haveI : 𝔭.IsMaximal := ‹𝔭.IsPrime›.isMaximal h𝔭 + have : 𝔭.IsMaximal := ‹𝔭.IsPrime›.isMaximal h𝔭 obtain ⟨𝔓, h𝔓max, h𝔓lo⟩ := Ideal.exists_maximal_ideal_liesOver_of_isIntegral (R := 𝓞 K) (S := 𝓞 L) 𝔭 - haveI : 𝔓.IsPrime := h𝔓max.isPrime - haveI := h𝔓lo + have : 𝔓.IsPrime := h𝔓max.isPrime + have := h𝔓lo have hnotdvd : ¬ 𝔓 ∣ differentIdeal (𝓞 K) (𝓞 L) := by rw [not_dvd_differentIdeal_iff (A := 𝓞 K) (B := 𝓞 L)] exact hunr.2 𝔓 h𝔓max h𝔓lo @@ -1747,7 +1746,7 @@ private theorem card_fibre_bound_eq_one {ζ : L} (hζ : IsPrimitiveRoot ζ m) rw [Ideal.one_eq_top] at this; exact htop this obtain ⟨𝔭, h𝔭⟩ := Multiset.exists_mem_of_ne_zero hfac0 have hprime := prime_of_normalized_factor 𝔭 h𝔭 - haveI : 𝔭.IsPrime := Ideal.isPrime_of_prime hprime + have : 𝔭.IsPrime := Ideal.isPrime_of_prime hprime exact (hfac 𝔭 h𝔭).2 (coprime_absNorm_of_unramified_of_finrank_eq_one K L m hd1 𝔭 hprime.ne_zero (hfac 𝔭 h𝔭).1 hm) rw [card_L2_eq_sum_residue K L m hζ g N, hbadtop, Finset.sum_singleton, @@ -1819,9 +1818,9 @@ private theorem card_unramifiedSupported_frobeniusValueFibre_eq_sum (∀ 𝔭 ∈ UniqueFactorizationMonoid.normalizedFactors 𝔞, UnramifiedIn K L 𝔭) ∧ frobeniusIdeal K L 𝔞 = g.1} := by classical - haveI hfinN : Finite {𝔞 : Ideal (𝓞 K) // Ideal.absNorm 𝔞 ≤ N} := - (Ideal.finite_setOf_absNorm_le (S := 𝓞 K) N).to_subtype - haveI hfin : ∀ g : {g : Gal(L/K) // (χ g : ℂ) = ζ}, + have hfinN : Finite {𝔞 : Ideal (𝓞 K) // Ideal.absNorm 𝔞 ≤ N} := + (Ideal.finite_setOfPred_absNorm_le (S := 𝓞 K) N).to_subtype + have hfin : ∀ g : {g : Gal(L/K) // (χ g : ℂ) = ζ}, Finite {𝔞 : Ideal (𝓞 K) // 𝔞 ≠ ⊥ ∧ Ideal.absNorm 𝔞 ≤ N ∧ (∀ 𝔭 ∈ UniqueFactorizationMonoid.normalizedFactors 𝔞, UnramifiedIn K L 𝔭) ∧ @@ -1916,7 +1915,7 @@ theorem exists_card_galoisCharacterOnIdeal_eq_const_mul_add_pow rw [← hζuval] exact ⟨fun h ↦ Units.ext h, fun h ↦ congrArg Units.val h⟩ rw [heq] - letI : CommGroup Gal(L/K) := { mul_comm := mul_comm' } + let : CommGroup Gal(L/K) := { mul_comm := mul_comm' } exact card_charFibre_eq_card_ker χ ζu hζun have hcardℝ : (Fintype.card {g : Gal(L/K) // (χ g : ℂ) = ζ} : ℝ) = (κ₀ : ℝ) := by rw [← Nat.card_eq_fintype_card, hSκ₀] @@ -1985,7 +1984,7 @@ private theorem galoisCharacterOnIdeal_mem_insert_zero_nthRootsFinset · push Not at hU obtain ⟨𝔭, h𝔭, hram⟩ := hU rw [galoisCharacterOnIdeal_eq_map_prod, - Multiset.prod_eq_zero (Multiset.mem_map.mpr ⟨𝔭, h𝔭, if_neg hram⟩)] + Multiset.prod_eq_zero (Multiset.mem_map.mpr ⟨𝔭, h𝔭, ite_eq_right hram⟩)] exact Finset.mem_insert_self _ _ private theorem sum_galoisCharacterOnIdeal_eq_sum_card_sub_mul @@ -2044,9 +2043,9 @@ many) ideals of norm `≤ N`. -/ private theorem finite_nonzeroIdeal_absNorm_le (K : Type*) [Field K] [NumberField K] (N : ℕ) : Finite {𝔞 : Ideal (𝓞 K) // 𝔞 ≠ ⊥ ∧ Ideal.absNorm 𝔞 ≤ N} := haveI : Finite {𝔞 : Ideal (𝓞 K) // Ideal.absNorm 𝔞 ≤ N} := - (Ideal.finite_setOf_absNorm_le (S := 𝓞 K) N).to_subtype + (Ideal.finite_setOfPred_absNorm_le (S := 𝓞 K) N).to_subtype Finite.of_injective (fun a ↦ (⟨a.1, a.2.2⟩ : {𝔞 : Ideal (𝓞 K) // Ideal.absNorm 𝔞 ≤ N})) - fun _ _ hab ↦ Subtype.ext (by simpa using hab) + fun _ _ hab ↦ Subtype.ext (congrArg (fun q : {I : Ideal (𝓞 K) // Ideal.absNorm I ≤ N} ↦ q.1) hab) /-- Sharifi 7.1.19 step 1 (p. 142): geometry-of-numbers bound. The partial-sum character sum `Σ_{N𝔞≤N} χ(𝔞)` (with `χ(𝔞) = galoisCharacterOnIdeal K L χ 𝔞` the @@ -2067,7 +2066,7 @@ theorem character_sum_geometry_of_numbers_bound refine ⟨(orderOf χ : ℝ) * C', fun N ↦ ?_⟩ have hC' : 0 ≤ C' := (abs_nonneg _).trans (by simpa using hcount 1 (one_pow _) 1 le_rfl) rcases Nat.eq_zero_or_pos N with rfl | hN1 - · haveI : IsEmpty {𝔞 : Ideal (𝓞 K) // 𝔞 ≠ ⊥ ∧ Ideal.absNorm 𝔞 ≤ 0} := + · have : IsEmpty {𝔞 : Ideal (𝓞 K) // 𝔞 ≠ ⊥ ∧ Ideal.absNorm 𝔞 ≤ 0} := ⟨fun 𝔞 ↦ 𝔞.2.1 (Ideal.absNorm_eq_zero_iff.mp (Nat.le_zero.mp 𝔞.2.2))⟩ rw [tsum_empty, norm_zero] positivity @@ -2079,8 +2078,8 @@ theorem character_sum_geometry_of_numbers_bound set R : Finset ℂ := Polynomial.nthRootsFinset (orderOf χ) (1 : ℂ) with hR have hmemR : ∀ {z : ℂ}, z ∈ R ↔ z ^ orderOf χ = 1 := fun {z} ↦ Polynomial.mem_nthRootsFinset (Nat.pos_of_ne_zero hord0) 1 - haveI := finite_nonzeroIdeal_absNorm_le K N - haveI := Fintype.ofFinite {𝔞 : Ideal (𝓞 K) // 𝔞 ≠ ⊥ ∧ Ideal.absNorm 𝔞 ≤ N} + have := finite_nonzeroIdeal_absNorm_le K N + have := Fintype.ofFinite {𝔞 : Ideal (𝓞 K) // 𝔞 ≠ ⊥ ∧ Ideal.absNorm 𝔞 ≤ N} rw [tsum_fintype, sum_galoisCharacterOnIdeal_eq_sum_card_sub_mul K L m χ hord2 C₀ N] calc ‖∑ v ∈ R, (((Nat.card {𝔞 : Ideal (𝓞 K) // 𝔞 ≠ ⊥ ∧ Ideal.absNorm 𝔞 ≤ N ∧ galoisCharacterOnIdeal K L χ 𝔞 = v} : ℝ) @@ -2111,7 +2110,7 @@ private theorem finite_nonzeroIdeal_absNorm_eq (K : Type*) [Field K] [NumberField K] (n : ℕ) : Finite {𝔞 : NonzeroIdeal K // Ideal.absNorm 𝔞.1 = n} := Set.Finite.to_subtype <| Set.Finite.of_finite_image (f := fun I : NonzeroIdeal K ↦ I.1) - ((Ideal.finite_setOf_absNorm_eq (S := 𝓞 K) n).subset (by rintro _ ⟨⟨I, _⟩, rfl, rfl⟩; rfl)) + ((Ideal.finite_setOfPred_absNorm_eq (S := 𝓞 K) n).subset (by rintro _ ⟨⟨I, _⟩, rfl, rfl⟩; rfl)) (fun _ _ _ _ ↦ Subtype.ext) /-- The `0`-th coefficient vanishes: no nonzero ideal has norm `0`, so the fibre is empty. -/ @@ -2128,8 +2127,8 @@ private theorem norm_galoisCharacterCoeff_le (K L : Type*) [Field K] [NumberField K] [Field L] [NumberField L] [Algebra K L] [IsGalois K L] (χ : galoisCharacter K L) (n : ℕ) : ‖galoisCharacterCoeff K L χ n‖ ≤ (idealNormMultiplicity K n : ℝ) := by - haveI := finite_nonzeroIdeal_absNorm_eq K n - haveI := Fintype.ofFinite {𝔞 : NonzeroIdeal K // Ideal.absNorm 𝔞.1 = n} + have := finite_nonzeroIdeal_absNorm_eq K n + have := Fintype.ofFinite {𝔞 : NonzeroIdeal K // Ideal.absNorm 𝔞.1 = n} calc ‖galoisCharacterCoeff K L χ n‖ ≤ ∑' 𝔞 : {𝔞 : NonzeroIdeal K // Ideal.absNorm 𝔞.1 = n}, ‖galoisCharacterOnIdeal K L χ 𝔞.1.1‖ := @@ -2154,8 +2153,8 @@ private theorem sum_galoisCharacterCoeff_eq_tsum_absNorm_le ∑' 𝔞 : {𝔞 : Ideal (𝓞 K) // 𝔞 ≠ ⊥ ∧ Ideal.absNorm 𝔞 ≤ n}, galoisCharacterOnIdeal K L χ 𝔞.1 := by classical - haveI := finite_nonzeroIdeal_absNorm_le K n - haveI := Fintype.ofFinite {𝔞 : Ideal (𝓞 K) // 𝔞 ≠ ⊥ ∧ Ideal.absNorm 𝔞 ≤ n} + have := finite_nonzeroIdeal_absNorm_le K n + have := Fintype.ofFinite {𝔞 : Ideal (𝓞 K) // 𝔞 ≠ ⊥ ∧ Ideal.absNorm 𝔞 ≤ n} rw [tsum_fintype, ← Finset.sum_fiberwise_of_maps_to (t := Finset.Icc 1 n) (g := fun 𝔞 : {𝔞 : Ideal (𝓞 K) // 𝔞 ≠ ⊥ ∧ Ideal.absNorm 𝔞 ≤ n} ↦ Ideal.absNorm 𝔞.1) (fun 𝔞 _ ↦ Finset.mem_Icc.mpr @@ -2163,8 +2162,8 @@ private theorem sum_galoisCharacterCoeff_eq_tsum_absNorm_le (fun 𝔞 ↦ galoisCharacterOnIdeal K L χ 𝔞.1)] refine Finset.sum_congr rfl fun k hk ↦ ?_ rw [galoisCharacterCoeff, ← Finset.sum_subtype_eq_sum_filter, Finset.subtype_univ] - haveI := finite_nonzeroIdeal_absNorm_eq K k - haveI := Fintype.ofFinite {𝔞 : NonzeroIdeal K // Ideal.absNorm 𝔞.1 = k} + have := finite_nonzeroIdeal_absNorm_eq K k + have := Fintype.ofFinite {𝔞 : NonzeroIdeal K // Ideal.absNorm 𝔞.1 = k} rw [tsum_fintype] exact Fintype.sum_equiv { toFun := fun ⟨⟨𝔞, h𝔞ne⟩, hnorm⟩ ↦ @@ -2260,8 +2259,8 @@ private theorem setIntegral_Ioi_one_mul_cpow_eq_mellin (S : ℝ → ℂ) (hS : ae_iff.mpr (by simp : volume {x : ℝ | ¬x ≠ 1} = 0)] with t ht _ rw [indicator_apply] by_cases h1 : t ∈ Ioi (1 : ℝ) - · rw [if_pos h1] - · rw [if_neg h1, hS t (lt_of_le_of_ne (not_lt.mp (by simpa using h1)) ht), smul_zero] + · rw [ite_eq_left h1] + · rw [ite_eq_right h1, hS t (lt_of_le_of_ne (not_lt.mp (by simpa using h1)) ht), smul_zero] open Filter Topology Set MeasureTheory Asymptotics in /-- Sharifi 7.1.19 step 1b (p. 142) — analytic extension of `L(χ,·)`. @@ -2467,7 +2466,7 @@ private theorem norm_one_sub_inv_sub_one_le {y : ℂ} (hy : ‖y‖ ≤ 1 / 2) : /-- A nonzero prime ideal `𝔭` of a number ring has `2 ≤ N𝔭`: its norm is neither `0` (only `⊥` has norm `0`) nor `1` (only `⊤` has norm `1`). -/ -private theorem two_le_absNorm {R : Type*} [CommRing R] [IsDedekindDomain R] +private theorem two_le_absNorm {R : Type*} [CommRing R] [IsDedekindDomain R] [Infinite R] [Module.Free ℤ R] [Module.Finite ℤ R] {𝔭 : Ideal R} (hp : 𝔭.IsPrime) (hb : 𝔭 ≠ ⊥) : 2 ≤ Ideal.absNorm 𝔭 := by have hne0 : Ideal.absNorm 𝔭 ≠ 0 := fun h ↦ hb (Ideal.absNorm_eq_zero_iff.mp h) @@ -2476,7 +2475,7 @@ private theorem two_le_absNorm {R : Type*} [CommRing R] [IsDedekindDomain R] /-- For a nonzero prime `𝔭` of a number ring and `Re s > 1`, `‖N𝔭^{-s}‖ ≤ 1/2` (since `N𝔭 ≥ 2`, `Re s > 1`). The bound that lets the Euler factors enter `norm_one_sub_inv_sub_one_le`. -/ -private theorem norm_absNorm_cpow_neg_le_half {R : Type*} [CommRing R] [IsDedekindDomain R] +private theorem norm_absNorm_cpow_neg_le_half {R : Type*} [CommRing R] [IsDedekindDomain R] [Infinite R] [Module.Free ℤ R] [Module.Finite ℤ R] {s : ℂ} (hs : 1 < s.re) (𝔭 : {𝔭 : Ideal R // 𝔭.IsPrime ∧ 𝔭 ≠ ⊥}) : ‖(Ideal.absNorm 𝔭.1 : ℂ) ^ (-s)‖ ≤ 1 / 2 := by @@ -2581,7 +2580,7 @@ private def underUP (K L : Type*) [Field K] [NumberField K] [Field L] [NumberField L] [Algebra K L] [IsGalois K L] (𝔓 : {𝔓 : Ideal (𝓞 L) // 𝔓.IsPrime ∧ 𝔓 ≠ ⊥ ∧ UnramifiedIn K L (𝔓.under (𝓞 K))}) : {𝔭 : Ideal (𝓞 K) // 𝔭.IsPrime ∧ UnramifiedIn K L 𝔭} := - ⟨𝔓.1.under (𝓞 K), by haveI := 𝔓.2.1; exact inferInstance, 𝔓.2.2.2⟩ + ⟨𝔓.1.under (𝓞 K), by have := 𝔓.2.1; exact inferInstance, 𝔓.2.2.2⟩ @[simp] private theorem underUP_val (K L : Type*) [Field K] [NumberField K] [Field L] [NumberField L] [Algebra K L] [IsGalois K L] @@ -2600,8 +2599,8 @@ private def fiberUnderEquiv toFun 𝔓 := ⟨𝔓.1.1, 𝔓.1.2.1, ⟨by have h := congrArg Subtype.val 𝔓.2; rw [underUP_val] at h; rw [← h]⟩, 𝔓.1.2.2.1⟩ invFun 𝔔 := ⟨⟨𝔔.1, 𝔔.2.1, 𝔔.2.2.2, by - haveI := 𝔔.2.1; haveI := 𝔔.2.2.1; rw [← 𝔔.2.2.1.over]; exact c.2.2⟩, by - haveI := 𝔔.2.1; haveI := 𝔔.2.2.1 + have := 𝔔.2.1; have := 𝔔.2.2.1; rw [← 𝔔.2.2.1.over]; exact c.2.2⟩, by + have := 𝔔.2.1; have := 𝔔.2.2.1 exact Subtype.ext (by rw [underUP_val]; exact 𝔔.2.2.1.over.symm)⟩ left_inv 𝔓 := by ext; rfl right_inv 𝔔 := by ext; rfl @@ -2632,7 +2631,6 @@ private def ramifiedFlattenEquiv left_inv _ := rfl right_inv _ := rfl -set_option backward.isDefEq.respectTransparency false in /-- The unramified part of the prime-ideal Euler product equals `∏_χ L_χ`. Regroup the unramified `L`-primes fibrewise over the `K`-prime below them (`Equiv.sigmaFiberEquiv` + `Multipliable.tprod_sigma`); each fibre product is `∏_χ (1 - χ(σ_𝔭) N𝔭^{-s})^{-1}` @@ -2672,16 +2670,16 @@ private theorem tprod_unramified_eq_prod_artinDirichletSeries HasProd (fun 𝔓 : {𝔓 : {𝔓 : Ideal (𝓞 L) // 𝔓.IsPrime ∧ 𝔓 ≠ ⊥ ∧ UnramifiedIn K L (𝔓.under (𝓞 K))} // underUP K L 𝔓 = c} ↦ F 𝔓.1.1) (G c) := by intro c - haveI : c.1.IsPrime := c.2.1 - haveI : c.1.IsMaximal := c.2.1.isMaximal (UnramifiedIn.ne_bot K L c.2.2) - haveI : Finite (c.1.primesOver (𝓞 L)) := + have : c.1.IsPrime := c.2.1 + have : c.1.IsMaximal := c.2.1.isMaximal (UnramifiedIn.ne_bot K L c.2.2) + have : Finite (c.1.primesOver (𝓞 L)) := (IsDedekindDomain.primesOver_finite c.1 (𝓞 L)).to_subtype - haveI : Finite {𝔓 : Ideal (𝓞 L) // 𝔓.IsPrime ∧ 𝔓.LiesOver c.1 ∧ 𝔓 ≠ ⊥} := + have : Finite {𝔓 : Ideal (𝓞 L) // 𝔓.IsPrime ∧ 𝔓.LiesOver c.1 ∧ 𝔓 ≠ ⊥} := Finite.of_injective (fun 𝔓 : {𝔓 : Ideal (𝓞 L) // 𝔓.IsPrime ∧ 𝔓.LiesOver c.1 ∧ 𝔓 ≠ ⊥} ↦ (⟨𝔓.1, 𝔓.2.1, 𝔓.2.2.1⟩ : c.1.primesOver (𝓞 L))) - (fun _ _ hab ↦ Subtype.ext (by simpa using hab)) - haveI : Finite {𝔓 : {𝔓 : Ideal (𝓞 L) // 𝔓.IsPrime ∧ 𝔓 ≠ ⊥ ∧ + (fun _ _ hab ↦ Subtype.ext (congrArg (fun q : c.1.primesOver (𝓞 L) ↦ q.1) hab)) + have : Finite {𝔓 : {𝔓 : Ideal (𝓞 L) // 𝔓.IsPrime ∧ 𝔓 ≠ ⊥ ∧ UnramifiedIn K L (𝔓.under (𝓞 K))} // underUP K L 𝔓 = c} := Finite.of_equiv _ (fiberUnderEquiv K L c).symm have hval : (∏' 𝔓 : {𝔓 : {𝔓 : Ideal (𝓞 L) // 𝔓.IsPrime ∧ 𝔓 ≠ ⊥ ∧ @@ -2786,12 +2784,12 @@ private instance finite_ramifiedAbove (K L : Type*) [Field K] [NumberField K] [Field L] [NumberField L] [Algebra K L] [IsGalois K L] : Finite {𝔓 : Ideal (𝓞 L) // 𝔓.IsPrime ∧ 𝔓 ≠ ⊥ ∧ ¬ UnramifiedIn K L (𝔓.under (𝓞 K))} := by classical - haveI : Finite {𝔭 : Ideal (𝓞 K) // 𝔭.IsPrime ∧ 𝔭 ≠ ⊥ ∧ ¬ UnramifiedIn K L 𝔭} := + have : Finite {𝔭 : Ideal (𝓞 K) // 𝔭.IsPrime ∧ 𝔭 ≠ ⊥ ∧ ¬ UnramifiedIn K L 𝔭} := (finite_ramifiedIn K L).to_subtype - haveI : ∀ 𝔭 : {𝔭 : Ideal (𝓞 K) // 𝔭.IsPrime ∧ 𝔭 ≠ ⊥ ∧ ¬ UnramifiedIn K L 𝔭}, + have : ∀ 𝔭 : {𝔭 : Ideal (𝓞 K) // 𝔭.IsPrime ∧ 𝔭 ≠ ⊥ ∧ ¬ UnramifiedIn K L 𝔭}, Finite (𝔭.1.primesOver (𝓞 L)) := fun 𝔭 ↦ by - haveI : 𝔭.1.IsPrime := 𝔭.2.1 - haveI : 𝔭.1.IsMaximal := 𝔭.2.1.isMaximal 𝔭.2.2.1 + have : 𝔭.1.IsPrime := 𝔭.2.1 + have : 𝔭.1.IsMaximal := 𝔭.2.1.isMaximal 𝔭.2.2.1 exact (IsDedekindDomain.primesOver_finite 𝔭.1 (𝓞 L)).to_subtype refine Finite.of_injective (fun 𝔓 : {𝔓 : Ideal (𝓞 L) // 𝔓.IsPrime ∧ 𝔓 ≠ ⊥ ∧ ¬ UnramifiedIn K L (𝔓.under (𝓞 K))} ↦ @@ -2834,7 +2832,7 @@ private theorem log_norm_ramified_factor_bounded ¬ UnramifiedIn K L (𝔓.under (𝓞 K))}, (1 - (Ideal.absNorm 𝔓.1 : ℂ) ^ (-(s : ℂ)))⁻¹‖| ≤ C := by classical - haveI : Fintype {𝔓 : Ideal (𝓞 L) // 𝔓.IsPrime ∧ 𝔓 ≠ ⊥ ∧ + have : Fintype {𝔓 : Ideal (𝓞 L) // 𝔓.IsPrime ∧ 𝔓 ≠ ⊥ ∧ ¬ UnramifiedIn K L (𝔓.under (𝓞 K))} := Fintype.ofFinite _ set R : ℝ → ℂ := fun s ↦ ∏ 𝔓 : {𝔓 : Ideal (𝓞 L) // 𝔓.IsPrime ∧ 𝔓 ≠ ⊥ ∧ ¬ UnramifiedIn K L (𝔓.under (𝓞 K))}, (1 - (Ideal.absNorm 𝔓.1 : ℂ) ^ (-(s : ℂ)))⁻¹ with hR @@ -2932,7 +2930,7 @@ private theorem analyticAt_one_of_analyticOn_finrankDomain (K : Type*) [Field K] have hdpos : (0 : ℝ) < (Module.finrank ℚ K : ℝ)⁻¹ := by have : 0 < Module.finrank ℚ K := Module.finrank_pos positivity - simp only [Set.mem_setOf_eq, Complex.one_re]; linarith + simp only [Set.mem_ofPred_eq, Complex.one_re]; linarith exact hLf.analyticAt ((isOpen_lt continuous_const Complex.continuous_re).mem_nhds hmem) open Filter Topology Set in @@ -3034,8 +3032,8 @@ private theorem sum_ite_pole_zero_cancel (if χ' = 1 then a else if χ' = χ then -a else 0) = (if χ' = 1 then a else 0) + (if χ' = χ then -a else 0) := fun χ' ↦ by by_cases h1 : χ' = 1 - · rw [if_pos h1, if_pos h1, if_neg (h1 ▸ Ne.symm hχ), add_zero] - · rw [if_neg h1, if_neg h1]; by_cases hc : χ' = χ <;> simp [hc] + · rw [ite_eq_left h1, ite_eq_left h1, ite_eq_right (h1 ▸ Ne.symm hχ), add_zero] + · rw [ite_eq_right h1, ite_eq_right h1]; by_cases hc : χ' = χ <;> simp [hc] rw [Finset.sum_congr rfl fun χ' _ ↦ hsplit χ', Finset.sum_add_distrib, Finset.sum_ite_eq' Finset.univ (1 : galoisCharacter K L), Finset.sum_ite_eq' Finset.univ χ] simp @@ -3061,14 +3059,14 @@ private theorem log_norm_artinDirichletSeries_le_pole_zero_ite by_cases h1 : χ' = 1 · subst h1 obtain ⟨C1, hC1⟩ := log_norm_artinDirichletSeries_one_le K L - exact ⟨C1, by filter_upwards [hC1] with s hs; rwa [if_pos rfl]⟩ + exact ⟨C1, by filter_upwards [hC1] with s hs; rwa [ite_eq_left rfl]⟩ · by_cases hc : χ' = χ · subst hc - exact ⟨Cχ, by filter_upwards [hCχ] with s hs; rwa [if_neg h1, if_pos rfl]⟩ + exact ⟨Cχ, by filter_upwards [hCχ] with s hs; rwa [ite_eq_right h1, ite_eq_left rfl]⟩ · obtain ⟨C, hC⟩ := artinDirichletSeries_norm_le_of_ne_one K L m hm χ' h1 refine ⟨Real.log (max C 1), ?_⟩ filter_upwards [hC] with s hs - simp only [if_neg h1, if_neg hc, zero_add] + simp only [ite_eq_right h1, ite_eq_right hc, zero_add] have hmax1 : (1 : ℝ) ≤ max C 1 := le_max_right _ _ rcases le_total ‖artinDirichletSeries K L χ' (s : ℂ)‖ 0 with h0 | h0 · have hz : ‖artinDirichletSeries K L χ' (s : ℂ)‖ = 0 := le_antisymm h0 (norm_nonneg _) diff --git a/projects/DedekindResidue/DedekindResidue/AuxiliaryFunction.lean b/projects/DedekindResidue/DedekindResidue/AuxiliaryFunction.lean index 8e22b1de6..f9545f056 100644 --- a/projects/DedekindResidue/DedekindResidue/AuxiliaryFunction.lean +++ b/projects/DedekindResidue/DedekindResidue/AuxiliaryFunction.lean @@ -44,7 +44,7 @@ noncomputable def auxF (s : ℂ) (X t : ℝ) : ℂ := /-- On the plateau `|t| ≤ log X`, `F_{s,X}(t) = 1` — eq. (11). -/ theorem auxF_of_le (s : ℂ) (X : ℝ) {t : ℝ} (h : |t| ≤ Real.log X) : auxF s X t = 1 := by - unfold auxF; exact if_pos h + unfold auxF; exact ite_eq_left h /-- `F_{s,X}(0) = 1` whenever `X ≥ 1` (so `log X ≥ 0`, putting `0` on the plateau). -/ theorem auxF_zero (s : ℂ) {X : ℝ} (hX : 1 ≤ X) : auxF s X 0 = 1 := diff --git a/projects/DedekindResidue/DedekindResidue/CompletedZeta/AnalyticControl.lean b/projects/DedekindResidue/DedekindResidue/CompletedZeta/AnalyticControl.lean index 5c23f3c90..8c56d23e6 100644 --- a/projects/DedekindResidue/DedekindResidue/CompletedZeta/AnalyticControl.lean +++ b/projects/DedekindResidue/DedekindResidue/CompletedZeta/AnalyticControl.lean @@ -228,7 +228,7 @@ theorem exists_re_norm_dedekindZeta_ge_half : · simp rcases eq_or_ne n 0 with rfl | hn0 · simp - rw [if_neg hn1, LSeries.norm_term_eq, LSeries.norm_term_eq, if_neg hn0, if_neg hn0, + rw [ite_eq_right hn1, LSeries.norm_term_eq, LSeries.norm_term_eq, ite_eq_right hn0, ite_eq_right hn0, show ((2:ℂ)).re = (2:ℝ) by norm_num] have hn2 : (2:ℝ) ≤ (n:ℝ) := by exact_mod_cast (by omega : 2 ≤ n) have hnpos : (0:ℝ) < n := by linarith @@ -259,7 +259,7 @@ theorem exists_re_norm_dedekindZeta_ge_half : refine Summable.of_nonneg_of_le (fun n => norm_nonneg _) (fun n => ?_) hsummS.norm rcases eq_or_ne n 1 with rfl | hn1 · simp - · rw [if_neg hn1] + · rw [ite_eq_right hn1] have hcompar : Summable (fun n : ℕ => (1/2:ℝ)^m * ‖LSeries.term f 2 n‖) := (hsum2.norm).mul_left _ have hRbound : ‖∑' n : ℕ, ite (n = 1) 0 (LSeries.term f s n)‖ ≤ T * (1/2)^m := by @@ -463,7 +463,7 @@ theorem norm_dedekindZeta_le_of_two_le_re {s : ℂ} (hs : 2 ≤ s.re) : intro n rcases eq_or_ne n 0 with rfl | hn0 · simp - rw [LSeries.norm_term_eq, LSeries.norm_term_eq, if_neg hn0, if_neg hn0, + rw [LSeries.norm_term_eq, LSeries.norm_term_eq, ite_eq_right hn0, ite_eq_right hn0, show ((2:ℂ)).re = (2:ℝ) by norm_num] have hn1 : (1:ℝ) ≤ (n:ℝ) := by exact_mod_cast Nat.one_le_iff_ne_zero.mpr hn0 gcongr @@ -602,11 +602,10 @@ theorem one_add_abs_im_le_two_norm_sub_four {z : ℂ} (_h1 : -1 ≤ z.re) (h2 : simpa using h linarith -/-- The comparator sine-exponent: `n_K = r₁ + 2r₂`. -/ + noncomputable def gammaExponent : ℕ := nrRealPlaces K + 2 * nrComplexPlaces K -/-- Right boundary bound for the comparator -`G = H⁴·sin(πz)^{n_K}/(z-4)^{4n_K+8}` on `Re z = 2`. -/ + theorem comparator_bound_right : ∃ M : ℝ, 0 < M ∧ ∀ t : ℝ, ‖completedDedekindZetaEntire K (((2:ℝ) : ℂ) + (t : ℂ) * Complex.I)‖^4 @@ -715,8 +714,7 @@ theorem comparator_bound_right : + (B * 25)^4 * Real.exp ((n:ℝ) * (π * 2)) / 2^(4*n+8) := le_add_of_nonneg_left (by positivity) -/-- Left boundary bound for the comparator on `Re z = -1`, by reflecting to the right -boundary through the functional equation. -/ + theorem comparator_bound_left : ∃ M : ℝ, 0 < M ∧ ∀ t : ℝ, ‖completedDedekindZetaEntire K (((-1:ℝ) : ℂ) + (t : ℂ) * Complex.I)‖^4 @@ -794,10 +792,7 @@ theorem comparator_bound_left : (by positivity) (pow_le_pow_left₀ (norm_nonneg _) hden _) _ ≤ M := hM (-t) -/-- Sub-double-exponential growth of the AC-A3 comparator -`completedDedekindZetaEntire K ^ 4 * sin (π z) ^ n / (z - 4) ^ (4 n + 8)` on the strip -`-1 ≤ Re ≤ 2`, from the polynomial strip bound `‖H‖ ≤ B (1 + ‖z‖)²`. Supplies the -growth hypothesis of the Phragmén–Lindelöf step in `comparator_bound_strip`. -/ + private theorem comparator_isBigO_growth {B : ℝ} (hB0 : 0 ≤ B) (hB : ∀ w : ℂ, -1 ≤ w.re → w.re ≤ 2 → ‖completedDedekindZetaEntire K w‖ ≤ B * (1 + ‖w‖) ^ 2) : @@ -904,8 +899,7 @@ private theorem comparator_isBigO_growth {B : ℝ} (hB0 : 0 ≤ B) nlinarith exact mul_le_mul_of_nonneg_left hexp_le (by positivity) -/-- **The comparator is bounded on the whole strip** `-1 ≤ Re z ≤ 2` -(Phragmén–Lindelöf between the two boundary bounds). -/ + theorem comparator_bound_strip : ∃ M : ℝ, 0 < M ∧ ∀ z : ℂ, -1 ≤ z.re → z.re ≤ 2 → ‖completedDedekindZetaEntire K z^4 * Complex.sin (π * z)^(gammaExponent K) @@ -925,7 +919,7 @@ theorem comparator_bound_strip : simp [sub_eq_zero] at this rw [this] at hw norm_num at hw - -- differentiability up to the boundary + have hfd : DiffContOnCl ℂ f (Complex.re ⁻¹' Set.Ioo (-1 : ℝ) 2) := by have hcl : closure (Complex.re ⁻¹' Set.Ioo (-1 : ℝ) 2) ⊆ Complex.re ⁻¹' Set.Icc (-1 : ℝ) 2 := @@ -946,7 +940,7 @@ theorem comparator_bound_strip : fun z => Real.exp (Bg * Real.exp (c * |z.im|)) := by simp only [hf, hn] exact comparator_isBigO_growth K hB0 hB - -- boundary bounds in PL form + have hle_a : ∀ w : ℂ, w.re = -1 → ‖f w‖ ≤ M₁ + M₂ := by intro w hw have hweq : w = ((-1:ℝ) : ℂ) + (w.im : ℂ) * Complex.I := by @@ -995,7 +989,7 @@ theorem exists_H_strip_decay : set t : ℝ := z.im with hts set C₀ : ℝ := (M * 5^(4*n+8) * 3^n) ^ ((1:ℝ)/4) + 1 with hC₀ have hC₀0 : 0 < C₀ := by positivity - -- the comparator bound, cleared of the normalizer + have hcomp := hM z h1 h2 rw [norm_div, norm_mul, norm_pow, norm_pow, norm_pow] at hcomp -- sine lower bound @@ -1041,7 +1035,7 @@ theorem exists_H_strip_decay : rw [abs_sub_comm, abs_of_pos (by linarith : (0:ℝ) < 4 - z.re)] linarith nlinarith [abs_nonneg t] - -- solve the comparator inequality for ‖H‖⁴ + have hsinpos : (0:ℝ) < ‖Complex.sin (π * z)‖ := by have h3 : (0:ℝ) < Real.exp (π * |t|) / 3 := by positivity linarith @@ -1656,8 +1650,7 @@ theorem exists_H_upper_right (σ₁ : ℝ) (hσ₁ : 2 ≤ σ₁) : rw [pow_add] ring -/-- Sphere-sup bound for the Jensen ball: at center `A+iT` with radius `A+1`, every -point of the closed ball satisfies the decaying envelope bound (in terms of `|T|`). -/ + theorem exists_H_ball_sup (A : ℝ) (hA : 2 ≤ A) : ∃ C : ℝ, 0 < C ∧ ∃ P : ℕ, ∀ T : ℝ, A + 5 ≤ |T| → ∀ z ∈ Metric.closedBall ((A : ℂ) + (T : ℂ) * Complex.I) (A + 1), @@ -1743,10 +1736,7 @@ theorem exists_H_ball_sup (A : ℝ) (hA : 2 ≤ A) : rw [mul_pow] ring -/-- **AC-A4: per-height zero counting.** There are an abscissa `A` and a constant `C` -such that for all heights `|T| ≥ A+5`, the number of zeros of `H` (with multiplicity) -in the closed ball of radius `√(A²+1)` around `A+iT` — a ball containing the critical -slab `0 ≤ Re ≤ 1`, `|Im - T| ≤ 1` — is at most `C·log(2+|T|)`. -/ + theorem exists_ball_zero_count : ∃ A : ℝ, 2 ≤ A ∧ ∃ C : ℝ, 0 < C ∧ ∀ T : ℝ, A + 5 ≤ |T| → ((∑ᶠ u, (MeromorphicOn.divisor (completedDedekindZetaEntire K) @@ -1858,7 +1848,7 @@ theorem exists_ball_zero_count : meromorphicOrderAt (fun _ : ℂ => (completedDedekindZetaEntire K c)⁻¹) z ≠ ⊤ := by intro z _ classical - rw [meromorphicOrderAt_const, if_neg (inv_ne_zero hHcne)] + rw [meromorphicOrderAt_const, ite_eq_right (inv_ne_zero hHcne)] exact WithTop.zero_ne_top have hcmem : c ∈ Metric.closedBall c |Real.sqrt (A^2+1)| := by rw [habs_r] @@ -2079,10 +2069,7 @@ theorem exists_H_ball_factorization (c : ℂ) {R : ℝ} congr 1 rw [Function.FactorizedRational.finprod_eq_fun hfinsupp] -/-- Sphere-sup bound for the Landau ball: at center `A+iT` with the larger radius -`A+3`, every point of the closed ball satisfies the decaying envelope bound (in -terms of `|T|`). Left of the critical strip the functional equation reflects the -bound from the right half-plane. -/ + theorem exists_H_ball_sup_big (A : ℝ) (hA : 2 ≤ A) : ∃ C : ℝ, 0 < C ∧ ∃ P : ℕ, ∀ T : ℝ, A + 5 ≤ |T| → ∀ z ∈ Metric.closedBall ((A : ℂ) + (T : ℂ) * Complex.I) (A + 3), @@ -2186,10 +2173,7 @@ theorem exists_H_ball_sup_big (A : ℝ) (hA : 2 ≤ A) : rw [mul_pow] ring -/-- **Per-height zero counting at the Landau radius.** Given the abscissa `A` with the -envelope-matched center lower bound, the number of zeros of `H` (with multiplicity) in -the closed ball of radius `A+2` around `A+iT` is at most `C·log(2+|T|)`. Parametric in -`A` and the center bound so that downstream users can share one `A`. -/ + theorem exists_ball_zero_count_big (A : ℝ) (hA2 : 2 ≤ A) (cL : ℝ) (hcL : 0 < cL) (hlow : ∀ t : ℝ, 2 ≤ |t| → cL * Real.exp (-(((gammaExponent K : ℕ) : ℝ) * (π * |t|)) / 4) @@ -2298,7 +2282,7 @@ theorem exists_ball_zero_count_big (A : ℝ) (hA2 : 2 ≤ A) (cL : ℝ) (hcL : 0 meromorphicOrderAt (fun _ : ℂ => (completedDedekindZetaEntire K c)⁻¹) z ≠ ⊤ := by intro z _ classical - rw [meromorphicOrderAt_const, if_neg (inv_ne_zero hHcne)] + rw [meromorphicOrderAt_const, ite_eq_right (inv_ne_zero hHcne)] exact WithTop.zero_ne_top have hcmem : c ∈ Metric.closedBall c |A + 2| := by rw [habs_r] @@ -2482,11 +2466,7 @@ theorem exists_H_two_radius_factorization (c : ℂ) {r₁ r₂ : ℝ} (h12 : r rw [hfac z hz, hsplit z] ring -/-- **Landau's logarithmic-derivative bound** (A5-ii-c, generic form): if `h` is -holomorphic and zero-free on `ball c r` with `‖h‖ ≤ mS` there and `mL ≤ ‖h c‖` at the -center, then `‖h'/h‖ ≤ 32·r·(log(mS/mL) + 1)` on the concentric closed ball of radius -`r - 3/4`. Chain: holomorphic logarithm on the convex ball, Borel–Carathéodory from the -`Re`-bound `log(mS/mL)`, then the Schwarz derivative estimate on quarter-balls. -/ + theorem norm_logDeriv_le_of_norm_le {h : ℂ → ℂ} {c : ℂ} {r : ℝ} (hr : 3/4 < r) (hd : DifferentiableOn ℂ h (Metric.ball c r)) (h0 : ∀ z ∈ Metric.ball c r, h z ≠ 0) @@ -2535,7 +2515,7 @@ theorem norm_logDeriv_le_of_norm_le {h : ℂ → ℂ} {c : ℂ} {r : ℝ} (hr : intro w hw refine Complex.borelCaratheodory_zero hM0 hGd ?_ hr0 hw ?_ · intro x hx - simp only [Set.mem_setOf_eq] + simp only [Set.mem_ofPred_eq] refine hreG (c + x) ?_ rw [Metric.mem_ball] at hx ⊢ simpa [dist_eq_norm] using hx @@ -2630,7 +2610,7 @@ private theorem pow_sum_toNat_le_norm_prod_sub {F : Finset ℂ} {D : ℂ → ℤ (hzu : ∀ u ∈ F, b ≤ ‖z - u‖) : b ^ (∑ u ∈ F, (D u).toNat) ≤ ‖∏ u ∈ F, (z - u) ^ D u‖ := by rw [norm_prod_sub_zpow hD, ← Finset.prod_pow_eq_pow_sum] - exact Finset.prod_le_prod (fun u _ => by positivity) + exact Finset.prod_le_prod₀ (fun u _ => by positivity) (fun u hu => pow_le_pow_left₀ hb (hzu u hu) _) /-- Upper bound for the norm of a monic-type product: if every factor distance `‖z - u‖` @@ -2640,13 +2620,10 @@ private theorem norm_prod_sub_le_pow {F : Finset ℂ} {D : ℂ → ℤ} (hzu : ∀ u ∈ F, ‖z - u‖ ≤ B) : ‖∏ u ∈ F, (z - u) ^ D u‖ ≤ B ^ (∑ u ∈ F, (D u).toNat) := by rw [norm_prod_sub_zpow hD, ← Finset.prod_pow_eq_pow_sum] - exact Finset.prod_le_prod (fun u _ => by positivity) + exact Finset.prod_le_prod₀ (fun u _ => by positivity) (fun u hu => pow_le_pow_left₀ (norm_nonneg _) (hzu u hu) _) -/-- **Divisor monotonicity from an open ball to its closed ball.** For an everywhere-analytic -`f`, the (nonnegative) zero-count divisor over `ball c r` sums to at most the divisor over -`closedBall c r`, since the local orders agree and the open-ball support is contained in the -closed-ball support. -/ + private theorem finsum_divisor_ball_le_closedBall {f : ℂ → ℂ} (hf : ∀ z : ℂ, AnalyticAt ℂ f z) (c : ℂ) (r : ℝ) : (∑ᶠ u, (MeromorphicOn.divisor f (Metric.ball c r)) u) @@ -2692,9 +2669,7 @@ private theorem finsum_divisor_ball_le_closedBall {f : ℂ → ℂ} exact hu (hfin₁.mem_toFinset.mpr (Function.mem_support.mpr h0))) _ ≤ ∑ u ∈ hfincl.toFinset, Dcl u := Finset.sum_le_sum (fun u _ => hpt u) -/-- **Maximum-modulus sup bound on a closed ball from a bound on its sphere.** If `f` is -analytic on the open ball `ball c R` and `‖f‖ ≤ C` on the sphere `sphere c ρ` (with -`0 < ρ < R`), then `‖f‖ ≤ C` on the whole closed ball `closedBall c ρ`. -/ + private theorem norm_le_of_frontier_ball {f : ℂ → ℂ} {c : ℂ} {ρ R : ℝ} (hρ : 0 < ρ) (hρR : ρ < R) (hanal : AnalyticOnNhd ℂ f (Metric.ball c R)) @@ -2891,7 +2866,7 @@ theorem exists_H_landau_cofactor : _ ≤ ((∑ᶠ u, (MeromorphicOn.divisor (completedDedekindZetaEntire K) (Metric.closedBall c (A+2))) u : ℤ) : ℝ) := by exact_mod_cast hDnatZ_le _ ≤ Cc * Real.log (2 + |T|) := hclosed - -- export the open-ball zero count + have hcount_open : ((∑ᶠ u, D₁ u : ℤ) : ℝ) ≤ (32 * (A+2) * (|Real.log (cB/cL)| + (P+Pn) + Cc * Real.log (2*(A+2)) + 1) + Cc) diff --git a/projects/DedekindResidue/DedekindResidue/CompletedZeta/Existence.lean b/projects/DedekindResidue/DedekindResidue/CompletedZeta/Existence.lean index d305719d4..3dc187db1 100644 --- a/projects/DedekindResidue/DedekindResidue/CompletedZeta/Existence.lean +++ b/projects/DedekindResidue/DedekindResidue/CompletedZeta/Existence.lean @@ -48,7 +48,7 @@ theorem prod_place_gamma (σ : ℝ) : rw [Finset.prod_const, Finset.card_univ]] refine Finset.prod_congr rfl (fun w _ => ?_) rw [show (mult (w : InfinitePlace K) : ℝ) = 1 by - rw [mult, if_pos w.2] + rw [mult, ite_eq_left w.2] norm_num] norm_num · rw [show (π ^ (-(2 * σ)) * Real.Gamma (2 * σ)) ^ (nrComplexPlaces K) @@ -60,7 +60,7 @@ theorem prod_place_gamma (σ : ℝ) : (fun w : InfinitePlace K => not_isReal_iff_isComplex))).trans rfl).symm] refine Finset.prod_congr rfl (fun w _ => ?_) rw [show (mult (w : InfinitePlace K) : ℝ) = 2 by - rw [mult, if_neg w.2] + rw [mult, ite_eq_right w.2] norm_num] open scoped Classical in @@ -231,7 +231,7 @@ theorem analyticOnNhd_completedDedekindZeta : intro h have : z = 0 := by linear_combination (2:ℂ) * h rw [this] at hz - norm_num [Set.mem_setOf_eq] at hz + norm_num [Set.mem_ofPred_eq] at hz have hzk : z / 2 ≠ (((heckeFEPair K).k : ℝ) : ℂ) := by intro h rw [show (heckeFEPair K).k = 1/2 from rfl] at h @@ -239,7 +239,7 @@ theorem analyticOnNhd_completedDedekindZeta : push_cast at h linear_combination (2:ℂ) * h rw [this] at hz - norm_num [Set.mem_setOf_eq] at hz + norm_num [Set.mem_ofPred_eq] at hz have hd := (heckeFEPair K).differentiableAt_Λ (Or.inl hz2) (Or.inl hzk) have hhalf : DifferentiableAt ℂ (fun w : ℂ => w / 2) z := by fun_prop exact DifferentiableAt.comp (𝕜 := ℂ) (g := (heckeFEPair K).Λ) @@ -358,7 +358,7 @@ theorem completedDedekindZeta_eq_of_one_lt_re {s : ℂ} (hs : 1 < s.re) : exact (LSeries_hasDerivAt hz').differentiableAt have hF₂ := analyticOnNhd_completedZetaPrefactor_mul_dedekindZeta K hζat have h2mem : (2:ℂ) ∈ {z : ℂ | 1 < z.re} := by - norm_num [Set.mem_setOf_eq] + norm_num [Set.mem_ofPred_eq] have hfreq := frequently_completedDedekindZeta_eq K have hEq := hF₁.eqOn_of_preconnected_of_frequently_eq hF₂ hUconn h2mem hfreq exact hEq hs diff --git a/projects/DedekindResidue/DedekindResidue/CompletedZeta/FunctionalEquation.lean b/projects/DedekindResidue/DedekindResidue/CompletedZeta/FunctionalEquation.lean index e9cae2b15..8df65b3b9 100644 --- a/projects/DedekindResidue/DedekindResidue/CompletedZeta/FunctionalEquation.lean +++ b/projects/DedekindResidue/DedekindResidue/CompletedZeta/FunctionalEquation.lean @@ -82,10 +82,10 @@ theorem IsCompletedDedekindZeta.eqOn {K : Type*} [Field K] [NumberField K] intro s hs have hs0' : s ≠ 0 := by rintro rfl - norm_num [Set.mem_setOf_eq, Complex.zero_re] at hs + norm_num [Set.mem_ofPred_eq, Complex.zero_re] at hs have hs1' : s ≠ 1 := by rintro rfl - norm_num [Set.mem_setOf_eq, Complex.one_re] at hs + norm_num [Set.mem_ofPred_eq, Complex.one_re] at hs rw [hH₁eq s hs0' hs1', hH₂eq s hs0' hs1', h₁.1 s hs, h₂.1 s hs] have h2mem : (2 : ℂ) ∈ {s : ℂ | 1 < s.re} := by norm_num [Complex.ofReal_re] have := AnalyticOnNhd.eqOn_of_preconnected_of_eventuallyEq diff --git a/projects/DedekindResidue/DedekindResidue/CompletedZeta/HeckeTheta.lean b/projects/DedekindResidue/DedekindResidue/CompletedZeta/HeckeTheta.lean index 372944eb4..ba69d2efb 100644 --- a/projects/DedekindResidue/DedekindResidue/CompletedZeta/HeckeTheta.lean +++ b/projects/DedekindResidue/DedekindResidue/CompletedZeta/HeckeTheta.lean @@ -8,23 +8,6 @@ module public import Mathlib public import DedekindResidue.CompletedZeta.IdealLattice -/-! -# The multivariable Hecke theta of a fractional ideal (SP1-AGE-3) - -Hecke's functional-equation argument for a number field of unit rank `> 0` uses the -**multivariable** theta of an ideal lattice, with one weight per infinite place, averaged -over a fundamental domain of the unit action. This file builds the per-place weight -machinery and the theta function itself: - -* `placeWeights c` — expand per-place weights to the `index K` coordinates (equal on the - `(re, im)` pair of a complex place — the shape preserved by the unit action, since complex - multiplication mixes the pair but preserves `re² + im²`); -* `sum_placeWeights_embeddingCoords_sq` — `∑ᵢ c_i·ζ(x)ᵢ² = ∑_w c_w·w(x)²`: the weighted - square-sum of embedding coordinates is the place-absolute-value form. - -The unit equivariance `Θ(c·w(ε)², L_I) = Θ(c, L_I)` and the box-averaged `g_I` follow -(SP1-AGE-3 continuation), then the Mellin definition of `Λ_K` (AGE-4). --/ namespace DedekindResidue @@ -36,8 +19,7 @@ open scoped nonZeroDivisors Real variable (K : Type*) [Field K] [NumberField K] -/-- The `ℝ`-cast field degree `[K : ℚ]` is positive — the packaged `Module.finrank_pos` used -for the degree denominators throughout the Hecke-weight normalisation. -/ + theorem finrank_pos_real : (0 : ℝ) < (Module.finrank ℚ K : ℝ) := by have := Module.finrank_pos (R := ℚ) (M := K) positivity @@ -198,10 +180,10 @@ theorem placeWeights_dualPlaceWeights (c : InfinitePlace K → ℝ) (i : index K placeWeights K (dualPlaceWeights K c) i = (placeWeights K c i)⁻¹ * (dualityWeights K i) ^ 2 := by rcases i with w | ⟨w, j⟩ - · simp only [placeWeights, Sum.elim_inl, dualPlaceWeights, dualityWeights, if_pos w.2] + · simp only [placeWeights, Sum.elim_inl, dualPlaceWeights, dualityWeights, ite_eq_left w.2] norm_num · simp only [placeWeights, Sum.elim_inr, dualPlaceWeights, dualityWeights] - rw [if_neg (by rw [not_isReal_iff_isComplex]; exact w.2)] + rw [ite_eq_right (by rw [not_isReal_iff_isComplex]; exact w.2)] fin_cases j <;> norm_num <;> ring open scoped Classical in @@ -237,7 +219,6 @@ theorem heckeTheta_inversion (I : (FractionalIdeal (𝓞 K)⁰ K)ˣ) ring - open scoped Classical in /-- Extend hyperplane coordinates `u : logSpace K` (indexed by `w ≠ w₀`) to all infinite places by the trace-zero condition: the `w₀`-component is `-∑_{w ≠ w₀} u_w`. On the image of @@ -268,10 +249,8 @@ theorem fullLog_add (u v : logSpace K) : · rfl open scoped Classical in -/-- **The Hecke weight family**: `c(t,u)_w = t^{1/n}·exp(2·(trace-zero extension of u)_w / mult w)`. -Pinned by two requirements: `∏_w c_w^{mult w} = t` (the norm ray, giving `N(𝔞)^{-s}` under the -Mellin transform) and equivariance under `u ↦ u + logEmbedding ε` matching -`heckeTheta_unit_mul` (making the theta integrand periodic modulo the unit lattice). -/ + + noncomputable def heckeWeights (t : ℝ) (u : logSpace K) : InfinitePlace K → ℝ := fun w => t ^ ((1 : ℝ) / (Module.finrank ℚ K)) * Real.exp (2 * fullLog K u w / mult w) @@ -322,11 +301,11 @@ theorem sum_fullLog (u : logSpace K) : ∑ w : InfinitePlace K, fullLog K u w = have h1 : fullLog K u (w₀ : InfinitePlace K) = -∑ w' : {w : InfinitePlace K // w ≠ (w₀ : InfinitePlace K)}, u w' := by rw [fullLog] - exact dif_pos rfl + exact dite_eq_left rfl have h2 : ∀ w : {w : InfinitePlace K // w ≠ (w₀ : InfinitePlace K)}, fullLog K u (w : InfinitePlace K) = u w := by intro w - rw [fullLog, dif_neg w.2] + rw [fullLog, dite_eq_right w.2] rw [h1, Finset.sum_congr rfl (fun w _ => h2 w)] ring @@ -404,7 +383,7 @@ theorem prod_placeWeights (c : InfinitePlace K → ℝ) : congr 1 · refine Finset.prod_congr rfl (fun w _ => ?_) simp only [placeWeights, Sum.elim_inl] - rw [mult, if_pos w.2, pow_one] + rw [mult, ite_eq_left w.2, pow_one] · have hre : (∏ i : {w : InfinitePlace K // ¬ IsReal w}, c ↑i ^ mult (i : InfinitePlace K)) = ∏ w : {w : InfinitePlace K // IsComplex w}, c ↑w ^ mult (w : InfinitePlace K) := Fintype.prod_equiv (Equiv.subtypeEquivRight @@ -413,7 +392,7 @@ theorem prod_placeWeights (c : InfinitePlace K → ℝ) : refine Finset.prod_congr rfl (fun w _ => ?_) rw [Fin.prod_univ_two] simp only [placeWeights, Sum.elim_inr] - rw [mult, if_neg (by rw [not_isReal_iff_isComplex]; exact w.2)] + rw [mult, ite_eq_right (by rw [not_isReal_iff_isComplex]; exact w.2)] ring open scoped Classical in @@ -471,7 +450,7 @@ theorem fullLog_dualShift (w : InfinitePlace K) : (mult (w : InfinitePlace K) : ℝ) / 2 * (if IsReal (w : InfinitePlace K) then 0 else Real.log 4)) = 0 := by refine Finset.sum_eq_zero (fun w _ => ?_) - rw [if_pos w.2, mul_zero] + rw [ite_eq_left w.2, mul_zero] have hc : (∑ w : {w : InfinitePlace K // ¬ IsReal w}, (mult (w : InfinitePlace K) : ℝ) / 2 * (if IsReal (w : InfinitePlace K) then 0 else Real.log 4)) @@ -480,7 +459,7 @@ theorem fullLog_dualShift (w : InfinitePlace K) : (mult (w : InfinitePlace K) : ℝ) / 2 * (if IsReal (w : InfinitePlace K) then 0 else Real.log 4) = Real.log 4 := by intro w - rw [if_neg w.2, mult, if_neg w.2] + rw [ite_eq_right w.2, mult, ite_eq_right w.2] norm_num rw [Finset.sum_congr rfl (fun w _ => hterm w), Finset.sum_const, nsmul_eq_mul] congr 1 diff --git a/projects/DedekindResidue/DedekindResidue/CompletedZeta/MellinAgreement.lean b/projects/DedekindResidue/DedekindResidue/CompletedZeta/MellinAgreement.lean index c1ddb8fb9..cb30568d9 100644 --- a/projects/DedekindResidue/DedekindResidue/CompletedZeta/MellinAgreement.lean +++ b/projects/DedekindResidue/DedekindResidue/CompletedZeta/MellinAgreement.lean @@ -341,7 +341,7 @@ theorem lintegral_eq_tsum_box_shift (f : logSpace K → ℝ≥0∞) : classical set B := (basisUnitLattice K).ofZLatticeBasis ℝ with hB have hFD := ZSpan.isAddFundamentalDomain B volume - haveI : VAddInvariantMeasure (Submodule.span ℤ (Set.range ⇑B)) (logSpace K) volume := + have : VAddInvariantMeasure (Submodule.span ℤ (Set.range ⇑B)) (logSpace K) volume := inferInstanceAs (VAddInvariantMeasure (Submodule.span ℤ (Set.range ⇑B)).toAddSubgroup (logSpace K) volume) @@ -453,11 +453,11 @@ theorem tsum_ite_eq_tsum_coneUnfold_ennreal (J : (Ideal (𝓞 K))⁰) have hgpr : g ((euclidMixedEquiv K).symm ((∏ i, fundSystem K i ^ (pr.2 i)) • ((pr.1 : mixedSpace K)))) ≠ 0 := by rw [hvw] - rwa [if_neg hvne] at hv + rwa [ite_eq_right hvne] at hv refine ⟨⟨pr, hgpr⟩, ?_⟩ exact Subtype.ext hvw · rintro ⟨p, hp⟩ - rw [if_neg (hne p)] + rw [ite_eq_right (hne p)] open scoped Classical in /-- The canonical algebraic preimage of a cone point. -/ @@ -577,9 +577,9 @@ theorem lintegral_box_theta_tail (J : (Ideal (𝓞 K))⁰) {t : ℝ} (ht : 0 < t rw [lintegral_tsum (fun v => ?_)] swap · by_cases hv : v = 0 - · simp only [if_pos hv] + · simp only [ite_eq_left hv] exact aemeasurable_const - · simp only [if_neg hv] + · simp only [ite_eq_right hv] exact (ENNReal.continuous_ofReal.comp (continuous_gaussTerm K t _)).aemeasurable -- Step 3: the per-v box integral is `ite (v = 0) 0 (G ↑v)` have hstep3 : ∀ v : idealZLattice K (FractionalIdeal.mk0 K J), @@ -589,12 +589,12 @@ theorem lintegral_box_theta_tail (J : (Ideal (𝓞 K))⁰) {t : ℝ} (ht : 0 < t = if v = 0 then 0 else G (v : EuclideanSpace ℝ (index K)) := by intro v by_cases hv : v = 0 - · rw [if_pos hv] + · rw [ite_eq_left hv] rw [setLIntegral_congr_fun (ZSpan.fundamentalDomain_measurableSet _) - (fun u _ => if_pos hv), lintegral_zero] - · rw [if_neg hv, hG] + (fun u _ => ite_eq_left hv), lintegral_zero] + · rw [ite_eq_right hv, hG] exact setLIntegral_congr_fun (ZSpan.fundamentalDomain_measurableSet _) - (fun u _ => if_neg hv) + (fun u _ => ite_eq_right hv) rw [tsum_congr hstep3] -- Step 4: cone reindex (on the G-valued family) rw [tsum_ite_eq_tsum_coneUnfold_ennreal K J G] @@ -692,7 +692,7 @@ theorem heckeLogMap_injective : Function.Injective (heckeLogMap K) := by field_simp at this linarith rw [fullLog] at hfl - rw [dif_neg w'.2] at hfl + rw [dite_eq_right w'.2] at hfl simpa using hfl rw [hτ, hu] rfl @@ -906,7 +906,7 @@ theorem tsum_idealSet_norm_rpow (J : (Ideal (𝓞 K))⁰) (σ : ℝ) : (∑' _ζ : torsion K, ENNReal.ofReal ((((n : ℝ)) ^ 2) ^ (-σ))) = (torsionOrder K) * ENNReal.ofReal ((((n : ℝ)) ^ 2) ^ (-σ)) := by intro I - letI := Fintype.ofFinite (torsion K) + let := Fintype.ofFinite (torsion K) rw [tsum_fintype, Finset.sum_const, nsmul_eq_mul, Units.torsionOrder, Nat.card_eq_fintype_card] norm_cast @@ -1142,8 +1142,8 @@ theorem sum_mult_heckeLogCLE (p : ℝ × logSpace K) : field_simp open scoped Classical in -/-- **The universal Mellin constant in closed form**: the change of variables along the -Hecke substitution factorises the master integral into per-place Gamma integrals. -/ + + theorem lintegral_exp_heckeLog (σ : ℝ) (hσ : 0 < σ) : ∫⁻ p : ℝ × logSpace K, ENNReal.ofReal (Real.exp (σ * p.1 - π * ∑ w : InfinitePlace K, Real.exp ((heckeLogCLE K p) w))) @@ -1367,7 +1367,7 @@ theorem setLIntegral_box_swap (f : logSpace K → ℝ≥0∞) have h2 := ZSpan.isAddFundamentalDomain ((basisUnitLattice K).ofZLatticeBasis ℝ) volume rw [(Module.Free.chooseBasis ℤ (unitLattice K)).ofZLatticeBasis_span ℝ] at h1 rw [(basisUnitLattice K).ofZLatticeBasis_span ℝ] at h2 - haveI : VAddInvariantMeasure (unitLattice K) (logSpace K) volume := + have : VAddInvariantMeasure (unitLattice K) (logSpace K) volume := inferInstanceAs (VAddInvariantMeasure (unitLattice K).toAddSubgroup (logSpace K) volume) refine h1.setLIntegral_eq h2 (f := f) (fun l x => ?_) rw [Submodule.vadd_def, vadd_eq_add] @@ -1774,8 +1774,8 @@ theorem sum_count_eq_card_le (n : ℕ) : ∑ k ∈ Finset.Icc 1 n, (Nat.card {I : Ideal (𝓞 K) // Ideal.absNorm I = k} : ℝ) = (Nat.card {I : (Ideal (𝓞 K))⁰ // Ideal.absNorm (I : Ideal (𝓞 K)) ≤ n} : ℝ) := by - haveI : ∀ k : (Finset.Icc 1 n), Finite {I : Ideal (𝓞 K) // Ideal.absNorm I = (k : ℕ)} := - fun k => (Ideal.finite_setOf_absNorm_eq (S := 𝓞 K) (k : ℕ)).to_subtype + have : ∀ k : (Finset.Icc 1 n), Finite {I : Ideal (𝓞 K) // Ideal.absNorm I = (k : ℕ)} := + fun k => (Ideal.finite_setOfPred_absNorm_eq (S := 𝓞 K) (k : ℕ)).to_subtype rw [show (Nat.card {I : (Ideal (𝓞 K))⁰ // Ideal.absNorm (I : Ideal (𝓞 K)) ≤ n}) = Nat.card (Σ k : (Finset.Icc 1 n), {I : Ideal (𝓞 K) // Ideal.absNorm I = (k : ℕ)}) from @@ -1885,18 +1885,18 @@ theorem summable_ideal_norm_rpow {s : ℝ} (hs : 1 < s) : exact h1.congr (fun n => (h2 n)) refine h3.congr (fun n => ?_) by_cases hn : n = 0 - · rw [if_pos hn, hn] + · rw [ite_eq_left hn, hn] rw [Nat.cast_zero, Real.zero_rpow (by linarith), mul_zero] - · rw [if_neg hn, Real.rpow_neg (Nat.cast_nonneg n), div_eq_mul_inv] + · rw [ite_eq_right hn, Real.rpow_neg (Nat.cast_nonneg n), div_eq_mul_inv] -- transfer to the ideal-indexed sum by fibering over the norm have hnn : ∀ p : (Σ n : ℕ, {b : (Ideal (𝓞 K))⁰ // Ideal.absNorm ((b : (Ideal (𝓞 K))⁰) : Ideal (𝓞 K)) = n}), 0 ≤ ((Ideal.absNorm ((p.2 : (Ideal (𝓞 K))⁰) : Ideal (𝓞 K)) : ℝ)) ^ (-s) := fun p => Real.rpow_nonneg (Nat.cast_nonneg _) _ - haveI hfibfin : ∀ n : ℕ, Finite {b : (Ideal (𝓞 K))⁰ // + have hfibfin : ∀ n : ℕ, Finite {b : (Ideal (𝓞 K))⁰ // Ideal.absNorm ((b : (Ideal (𝓞 K))⁰) : Ideal (𝓞 K)) = n} := fun n => by - haveI : Finite {I : Ideal (𝓞 K) // Ideal.absNorm I = n} := - (Ideal.finite_setOf_absNorm_eq (S := 𝓞 K) n).to_subtype + have : Finite {I : Ideal (𝓞 K) // Ideal.absNorm I = n} := + (Ideal.finite_setOfPred_absNorm_eq (S := 𝓞 K) n).to_subtype exact Finite.of_injective _ (normFiber_forget_injective K n) rw [← Equiv.summable_iff (Equiv.sigmaFiberEquiv (fun b : (Ideal (𝓞 K))⁰ => Ideal.absNorm ((b : (Ideal (𝓞 K))⁰) : Ideal (𝓞 K))))] @@ -1909,7 +1909,7 @@ theorem summable_ideal_norm_rpow {s : ℝ} (hs : 1 < s) : = ((n : ℝ)) ^ (-s) := by intro b rw [b.2] - haveI : Fintype {b : (Ideal (𝓞 K))⁰ // + have : Fintype {b : (Ideal (𝓞 K))⁰ // Ideal.absNorm ((b : (Ideal (𝓞 K))⁰) : Ideal (𝓞 K)) = n} := Fintype.ofFinite _ rw [show (∑' b : {b : (Ideal (𝓞 K))⁰ // Ideal.absNorm ((b : (Ideal (𝓞 K))⁰) : Ideal (𝓞 K)) = n}, @@ -1961,10 +1961,10 @@ theorem dedekindZeta_real_eq {s : ℝ} (hs : 1 < s) : rw [tsum_congr h2, ← Complex.ofReal_tsum] congr 1 -- fiber-glue the real n-sum into the ideal-type sum - haveI hfibfin : ∀ n : ℕ, Finite {b : (Ideal (𝓞 K))⁰ // + have hfibfin : ∀ n : ℕ, Finite {b : (Ideal (𝓞 K))⁰ // Ideal.absNorm ((b : (Ideal (𝓞 K))⁰) : Ideal (𝓞 K)) = n} := fun n => by - haveI : Finite {I : Ideal (𝓞 K) // Ideal.absNorm I = n} := - (Ideal.finite_setOf_absNorm_eq (S := 𝓞 K) n).to_subtype + have : Finite {I : Ideal (𝓞 K) // Ideal.absNorm I = n} := + (Ideal.finite_setOfPred_absNorm_eq (S := 𝓞 K) n).to_subtype exact Finite.of_injective _ (normFiber_forget_injective K n) have hsum := summable_ideal_norm_rpow K hs have hsigma : Summable (fun p : (Σ n : ℕ, {b : (Ideal (𝓞 K))⁰ // @@ -1986,7 +1986,7 @@ theorem dedekindZeta_real_eq {s : ℝ} (hs : 1 < s) : Ideal.absNorm ((b : (Ideal (𝓞 K))⁰) : Ideal (𝓞 K)) = n}, ((Ideal.absNorm ((b.val : (Ideal (𝓞 K))⁰) : Ideal (𝓞 K)) : ℝ)) ^ (-s) = ((n : ℝ)) ^ (-s) := fun b => by rw [b.2] - haveI : Fintype {b : (Ideal (𝓞 K))⁰ // + have : Fintype {b : (Ideal (𝓞 K))⁰ // Ideal.absNorm ((b : (Ideal (𝓞 K))⁰) : Ideal (𝓞 K)) = n} := Fintype.ofFinite _ rw [show (∑' b : {b : (Ideal (𝓞 K))⁰ // Ideal.absNorm ((b : (Ideal (𝓞 K))⁰) : Ideal (𝓞 K)) = n}, @@ -1997,8 +1997,8 @@ theorem dedekindZeta_real_eq {s : ℝ} (hs : 1 < s) : rw [tsum_fintype, Finset.sum_const, nsmul_eq_mul, Finset.card_univ] by_cases hn : n = 0 · subst hn - rw [if_pos rfl, Nat.cast_zero, Real.zero_rpow (by linarith), mul_zero] - · rw [if_neg hn] + rw [ite_eq_left rfl, Nat.cast_zero, Real.zero_rpow (by linarith), mul_zero] + · rw [ite_eq_right hn] congr 2 rw [← Nat.card_eq_fintype_card] exact Nat.card_congr (normFiberEquiv K n hn).symm @@ -2014,8 +2014,7 @@ theorem heckeF_dev_nonneg {t : ℝ} (ht : 0 < t) : rw [hFsum] exact Finset.sum_nonneg (fun C _ => heckeGClass_dev_nonneg K C ht) -/-- Positivity of the Gamma-product factor `∏ w, π^(-mult w·σ)·Γ(mult w·σ)` of the closed -Hecke Λ-form (each factor is positive for `σ > 0`). -/ + theorem prod_pi_rpow_mul_Gamma_nonneg {σ : ℝ} (hσ0 : 0 < σ) : 0 ≤ ∏ w : InfinitePlace K, π ^ (-((mult w : ℝ) * σ)) * Real.Gamma ((mult w : ℝ) * σ) := by @@ -2026,8 +2025,7 @@ theorem prod_pi_rpow_mul_Gamma_nonneg {σ : ℝ} (hσ0 : 0 < σ) : positivity positivity -/-- Nonnegativity of the closed real Λ-form (a `heckeBeta` power times the nonnegative -Gamma-product times a nonnegative ideal-norm `tsum`). -/ + theorem heckeClosedLambdaForm_nonneg {σ : ℝ} (hσ0 : 0 < σ) : (0:ℝ) ≤ (heckeBeta K) ^ (-σ) * ((((heckeJacobian K : ℝ≥0)) : ℝ) @@ -2044,8 +2042,8 @@ theorem heckeClosedLambdaForm_nonneg {σ : ℝ} (hσ0 : 0 < σ) : positivity open scoped Classical in -/-- The `ENNReal.ofReal` of the Mellin integral of the Hecke theta deviation equals the -`ofReal` of the closed Γ–ζ form; the ENNReal core of `heckeFEPair_Λ_real`. -/ + + theorem ennreal_ofReal_integral_heckeF_dev_eq {σ : ℝ} (hσ0 : 0 < σ) (h2σ : 1 < 2 * σ) (hri : IntegrableOn (fun t : ℝ => t ^ (σ - 1) * (heckeF K t - heckeFConst K)) (Set.Ioi (0:ℝ)) volume) @@ -2066,7 +2064,7 @@ theorem ennreal_ofReal_integral_heckeF_dev_eq {σ : ℝ} (hσ0 : 0 < σ) (h2σ : fun t ht => ENNReal.ofReal_mul (Real.rpow_nonneg (le_of_lt ht) _) rw [setLIntegral_congr_fun measurableSet_Ioi hsplit, lintegral_mellin_heckeF_dev K hσ0] - -- identify the closed ENNReal form with ofReal of the real one + have hzsum : (∑' b : (Ideal (𝓞 K))⁰, ENNReal.ofReal ((((Ideal.absNorm ((b : (Ideal (𝓞 K))⁰) : Ideal (𝓞 K)) : ℝ)) ^ 2) ^ (-σ))) @@ -2094,8 +2092,8 @@ theorem ennreal_ofReal_integral_heckeF_dev_eq {σ : ℝ} (hσ0 : 0 < σ) (h2σ : ← ENNReal.ofReal_mul (by positivity)] open scoped Classical in -/-- **The Λ-value identification (e-vi)**: at real `σ > 1/2` the abstract completed -function of the Hecke theta pair is the closed Γ–ζ form. -/ + + theorem heckeFEPair_Λ_real {σ : ℝ} (hσ : 1/2 < σ) : (heckeFEPair K).Λ (σ : ℂ) = (((heckeBeta K) ^ (-σ) diff --git a/projects/DedekindResidue/DedekindResidue/CompletedZeta/PoissonLattice.lean b/projects/DedekindResidue/DedekindResidue/CompletedZeta/PoissonLattice.lean index db7f899ca..d8a411dcb 100644 --- a/projects/DedekindResidue/DedekindResidue/CompletedZeta/PoissonLattice.lean +++ b/projects/DedekindResidue/DedekindResidue/CompletedZeta/PoissonLattice.lean @@ -9,22 +9,6 @@ public import Mathlib public import DedekindResidue.CompletedZeta.DualLattice public import DedekindResidue.CompletedZeta.PoissonSummation -/-! -# Poisson summation over a general `ℤ`-lattice (SP1-AGP, leaf P.3) - -Transport of the `ℤ^ι` Poisson formula (`tsum_eq_tsum_fourier_zpoint`) to an arbitrary -`ℤ`-lattice `L ⊂ EuclideanSpace ℝ ι`: conjugate by the linear equivalence sending the standard -lattice to `L`. The Fourier side transforms by the **`GL` change-of-variables law** -(`fourier_comp_linearEquiv`, new to this development: mathlib only has the isometry case -`Real.fourier_comp_linearIsometry`), the dual lattice appears via `dualZLattice_eq_span` -(P.1), and the covolume factor via `ZLattice.covolume_eq_det_mul_measureReal`. - -## Main results (this file) -* `DedekindResidue.fourier_comp_linearEquiv` — - `𝓕(g ∘ T) w = |det T|⁻¹ • 𝓕 g ((T⁻¹)^* w)` for `T ∈ GL(EuclideanSpace ℝ ι)`. -* `DedekindResidue.tsum_eq_tsum_fourier_zlattice` — **Poisson summation over a `ℤ`-lattice**: - `∑'_{v ∈ L} g(v) = covol(L)⁻¹ • ∑'_{w ∈ L♯} 𝓕g(w)`. --/ namespace DedekindResidue @@ -160,7 +144,7 @@ theorem adjoint_symm_latticeEquiv_zpoint [DecidableEq ι] innerₗ_nondegenerate c i j rw [← innerₗ_apply_apply] exact this - simp only [this, mul_ite, mul_one, mul_zero, Finset.sum_ite_eq, Finset.mem_univ, if_true] + simp only [this, mul_ite, mul_one, mul_zero, Finset.sum_ite_eq, Finset.mem_univ, ite_true] rw [hLHS, hRHS] /-- **P3d.** The determinant of the lattice-basis change of variables is (up to sign) the diff --git a/projects/DedekindResidue/DedekindResidue/CompletedZeta/PoissonSummation.lean b/projects/DedekindResidue/DedekindResidue/CompletedZeta/PoissonSummation.lean index d37431765b6cd844993a19f34fa0da37c8e6c6ad..9e1c836c4e548e89a5aebceddd3da2d4fbff7de7 100644 GIT binary patch delta 148 zcmbQ$!F2Q!m%Xs$<$LWp-SeBP72dKPNxEa`VGL USD5*mwL>O}g0*eln;9zw0CzSwivR!s diff --git a/projects/DedekindResidue/DedekindResidue/CompletedZeta/ThetaEstimates.lean b/projects/DedekindResidue/DedekindResidue/CompletedZeta/ThetaEstimates.lean index c9a2e644c..4c7e21d05 100644 --- a/projects/DedekindResidue/DedekindResidue/CompletedZeta/ThetaEstimates.lean +++ b/projects/DedekindResidue/DedekindResidue/CompletedZeta/ThetaEstimates.lean @@ -91,12 +91,12 @@ theorem tsum_ite_gaussian_tail (L : Submodule ℤ (EuclideanSpace ℝ ι)) rw [← smul_eq_mul, ← tsum_const_smul'' (Real.exp (-π * (a - a₀) * δ ^ 2))] refine Summable.tsum_le_tsum (fun v => ?_) ?_ (hsum₀.const_smul _) · by_cases hv : v = 0 - · rw [if_pos hv] + · rw [ite_eq_left hv] have : (0:ℝ) < Real.exp (-π * (a - a₀) * δ ^ 2) * Real.exp (-π * ∑ i, a₀ * ((v : EuclideanSpace ℝ ι) i) ^ 2) := by positivity exact le_of_lt (by simpa [smul_eq_mul] using this) - · rw [if_neg hv, smul_eq_mul, ← Real.exp_add] + · rw [ite_eq_right hv, smul_eq_mul, ← Real.exp_add] refine Real.exp_le_exp.mpr ?_ have hnorm : δ ^ 2 ≤ ∑ i, ((v : EuclideanSpace ℝ ι) i) ^ 2 := by have h1 : δ ^ 2 ≤ ‖(v : EuclideanSpace ℝ ι)‖ ^ 2 := diff --git a/projects/DedekindResidue/DedekindResidue/CompletedZeta/ThetaLattice.lean b/projects/DedekindResidue/DedekindResidue/CompletedZeta/ThetaLattice.lean index dab1b9d9e..efc5f57f2 100644 --- a/projects/DedekindResidue/DedekindResidue/CompletedZeta/ThetaLattice.lean +++ b/projects/DedekindResidue/DedekindResidue/CompletedZeta/ThetaLattice.lean @@ -10,30 +10,6 @@ public import DedekindResidue.CompletedZeta.DualLattice public import DedekindResidue.CompletedZeta.PoissonSummation public import DedekindResidue.CompletedZeta.PoissonLattice -/-! -# The lattice Gaussian theta function and its transformation law (SP1-AGΘ) - -For a `ℤ`-lattice `L ⊂ EuclideanSpace ℝ ι` the **theta function** -`Θ_L(t) := ∑_{v ∈ L} e^{-π t ‖v‖²}` (`t > 0`) satisfies the **inversion law** - -`Θ_L(t) = covol(L)⁻¹ · t^{-n/2} · Θ_{L♯}(1/t)`, - -the standard lattice theta transformation (Neukirch, *Algebraic Number Theory*, VII §3; -the 1-D case is mathlib's `jacobiTheta` functional equation). It is the Gaussian -instantiation of the lattice Poisson formula `tsum_eq_tsum_fourier_zlattice` (P.3): mathlib's -`fourier_gaussian_innerProductSpace` at `b = πt` gives `𝓕 g_t(w) = t^{-n/2} e^{-π‖w‖²/t}`, -and `summable_gaussian_zlattice` discharges the convergence hypotheses. - -This is the analytic engine of the Hecke functional-equation route (SP1-AGE → SP1-FE): -applied to the ideal lattices of a number field it produces the completed `Λ_K`. - -## Main definitions / results (this file) -* `DedekindResidue.thetaLattice L t` — `Θ_L(t) = ∑'_{v ∈ L} exp(-π t ‖v‖²)` (real-valued). -* `thetaLattice_transform` — **the inversion law** `Θ_L(t) = covol(L)⁻¹·t^{-n/2}·Θ_{L♯}(1/t)` - for `t > 0`, fully proven from the lattice Poisson formula + mathlib's Gaussian Fourier - transform (`fourier_gaussianCM`), with both convergence hypotheses discharged - (`summable_norm_restrict_gaussianCM`, `summable_fourier_gaussianCM`). --/ namespace DedekindResidue @@ -72,12 +48,12 @@ theorem norm_gaussianCM_apply (t : ℝ) (x : EuclideanSpace ℝ ι) : push_cast; ring rw [this, Complex.ofReal_re] -/-- Sub-level sets of a lattice are finite (lattice ∩ closed ball in a proper space). -/ + theorem finite_norm_le_zlattice (L : Submodule ℤ (EuclideanSpace ℝ ι)) [DiscreteTopology L] (R : ℝ) : {v : L | ‖(v : EuclideanSpace ℝ ι)‖ ≤ R}.Finite := by have hcl : IsClosed (L : Set (EuclideanSpace ℝ ι)) := by - rw [← Submodule.coe_toAddSubgroup]; exact AddSubgroup.isClosed_of_discrete + rw [← Submodule.coe_toAddSubgroup]; exact AddSubgroup.isClosed_of_discreteTopology have hfb : (Metric.closedBall 0 R ∩ (L : Set (EuclideanSpace ℝ ι))).Finite := Metric.finite_isBounded_inter_isClosed DiscreteTopology.isDiscrete Metric.isBounded_closedBall hcl @@ -107,7 +83,7 @@ theorem summable_norm_restrict_gaussianCM (L : Submodule ℤ (EuclideanSpace ℝ · exact (summable_gaussian_zlattice L (by positivity)).mul_left _ · rw [Filter.eventually_cofinite] refine (finite_norm_le_zlattice L R').subset (fun v hv => ?_) - simp only [Set.mem_setOf_eq] at hv ⊢ + simp only [Set.mem_ofPred_eq] at hv ⊢ by_contra hnotle rw [not_le] at hnotle refine hv ?_ diff --git a/projects/DedekindResidue/DedekindResidue/ExplicitFormula/FourierJordan.lean b/projects/DedekindResidue/DedekindResidue/ExplicitFormula/FourierJordan.lean index 5171d0c7f..e5f838c02 100644 --- a/projects/DedekindResidue/DedekindResidue/ExplicitFormula/FourierJordan.lean +++ b/projects/DedekindResidue/DedekindResidue/ExplicitFormula/FourierJordan.lean @@ -10,7 +10,7 @@ public import Mathlib.Analysis.Fourier.RiemannLebesgueLemma public import DedekindResidue.ExplicitFormula.PhiTransform /-! -# Fourier–Jordan inversion: the Dirichlet integral (SP2-FJ-c) +# Fourier–Jordan inversion: the Dirichlet integral The classical Dirichlet integral `∫₀^∞ (sin x)/x dx = π/2`, phrased as convergence of the truncated integrals `∫₀^b (sin x)/x dx → π/2` as `b → ∞`. This is the analytic engine of @@ -18,7 +18,7 @@ Jordan's pointwise Fourier-inversion criterion for functions of bounded variatio Poitou's proof of the explicit formula (Poitou, *Sur les petits discriminants*, Séminaire DPP 1976/77, exposé 6, p. 6-03) to invert the transform `Φ` on the prime side. -Not available in mathlib. We follow the Frullani/Fubini route: +The Frullani/Fubini argument uses `1/x = ∫₀^∞ e^{-xy} dy`, so `∫₀^b (sin x)/x dx = ∫₀^∞ (1 - e^{-yb}(cos y + y sin b))/(1+y²) dy` by Fubini and the closed form of the damped sine integral; dominated convergence then gives @@ -181,7 +181,7 @@ theorem integral_sinc_eq {b : ℝ} (hb : 0 < b) : rw [mul_comm x y]; ring)] exact integral_exp_neg_mul_sin y b -/-- **The Dirichlet integral** (SP2-FJ-c): `∫₀^∞ sin x/x dx = π/2`, as a limit of the +/-- **The Dirichlet integral**: `∫₀^∞ sin x/x dx = π/2`, as a limit of the truncated integrals. Fubini against `1/x = ∫ e^{-xy} dy` plus dominated convergence. -/ theorem tendsto_integral_sinc_atTop : Filter.Tendsto (fun b : ℝ => ∫ x in (0:ℝ)..b, Real.sin x / x) @@ -490,7 +490,7 @@ theorem integral_fourier_window_collapse {H : ℝ → ℂ} (hH : Integrable H) { refine MeasureTheory.integral_congr_ae ?_ have h0 : ∀ᵐ (u : ℝ), u ≠ 0 := by rw [MeasureTheory.ae_iff] - simp only [ne_eq, not_not, Set.setOf_eq_eq_singleton] + simp only [ne_eq, not_not, Set.ofPred_eq_eq_singleton] exact MeasureTheory.measure_singleton 0 filter_upwards [h0] with u hu rw [MeasureTheory.integral_const_mul] @@ -740,7 +740,7 @@ theorem abs_integral_monotone_kernel_le {g K : ℝ → ℝ} (hg : Monotone g) { have hcount : Set.Countable {x : ℝ | g x ≠ Function.rightLim g x} := by refine Set.Countable.mono ?_ hg.countable_not_continuousAt intro x hx - simp only [Set.mem_setOf_eq] at hx ⊢ + simp only [Set.mem_ofPred_eq] at hx ⊢ intro hcont exact hx (hcont.continuousWithinAt.rightLim_eq).symm have hnull : volume {x : ℝ | g x ≠ Function.rightLim g x} = 0 := @@ -1023,8 +1023,8 @@ theorem integral_dirichlet_split {H : ℝ → ℂ} (hH : Integrable H) {δ : ℝ funext u simp only [Set.indicator_apply, Set.mem_Ico, Set.mem_Ioc] by_cases hu : -δ ≤ -u ∧ -u < 0 - · rw [if_pos hu, if_pos ⟨by linarith [hu.2], by linarith [hu.1]⟩] - · rw [if_neg hu, if_neg (fun h => hu ⟨by linarith [h.2], by linarith [h.1]⟩)] + · rw [ite_eq_left hu, ite_eq_left ⟨by linarith [hu.2], by linarith [hu.1]⟩] + · rw [ite_eq_right hu, ite_eq_right (fun h => hu ⟨by linarith [h.2], by linarith [h.1]⟩)] rw [h1, h2, h3, MeasureTheory.integral_indicator measurableSet_Ioc] have hK_even : ∀ u : ℝ, f (-u) = H (-u) * ((2 * Real.sin (T * u) / u : ℝ) : ℂ) := by intro u @@ -1122,8 +1122,7 @@ theorem tendsto_integral_dirichlet_plateau {δ : ℝ} (hδ : 0 < δ) : push_cast ring -/-- **Jordan's Fourier inversion criterion, Dirichlet-kernel form** (SP2-FJ-a/g; Poitou -p. 6-03): for integrable `H` whose real and imaginary parts have bounded variation, with +/-- **Jordan's Fourier inversion criterion, Dirichlet-kernel form**: for integrable `H` whose real and imaginary parts have bounded variation, with one-sided limits `Hp` (from the right) and `Hm` (from the left) at `0`, `∫_ℝ H(u) · 2sin(Tu)/u du → π(Hp + Hm)` as `T → ∞`. @@ -1394,7 +1393,7 @@ theorem tendsto_integral_dirichlet_jordan {H : ℝ → ℂ} (hH : Integrable H) (add_lt_add_of_lt_of_lt hfarT hplat_piece) (hRright.trans hδR.le)) (hRleft.trans hδL.le) _ = ε := by ring -/-- **Jordan's Fourier inversion, symmetric-window form** (SP2-FJ-a; Poitou p. 6-03): for +/-- **Jordan's Fourier inversion, symmetric-window form**: for integrable `H` of bounded variation with one-sided limits `Hp`, `Hm` at `0`, `∫_{-T}^{T} (∫_ℝ H(u) e^{itu} du) dt → π(Hp + Hm)` as `T → ∞`. diff --git a/projects/DedekindResidue/DedekindResidue/ExplicitFormula/GammaSide.lean b/projects/DedekindResidue/DedekindResidue/ExplicitFormula/GammaSide.lean index 1f1506cfc..ebf01aa5c 100644 --- a/projects/DedekindResidue/DedekindResidue/ExplicitFormula/GammaSide.lean +++ b/projects/DedekindResidue/DedekindResidue/ExplicitFormula/GammaSide.lean @@ -10,35 +10,13 @@ public import DedekindResidue.ExplicitFormula.RectangleContour public import DedekindResidue.Lemma2 /-! -# The archimedean side: digamma integrals (SP2-Γψ) +Gauss's integral representation of the digamma function supplies the +archimedean part of Poitou's explicit formula. It follows from the +logarithmic derivative of Euler's gamma integral, the Frullani representation +of the logarithm and Fubini's theorem. Taking digamma differences cancels +the counterterms and gives the kernel used on vertical lines. -Poitou's computation of the archimedean part of the explicit formula (Poitou, *Sur les -petits discriminants*, exposé 6, pp. 6-03–6-06) rests on **Gauss's integral formula** -(his eq. (5)) - -`ψ(z) = -∫₀^∞ (e^{-xz}/(1-e^{-x}) - e^{-x}/x) dx`, `Re z > 0`, - -and its consequences for `Re ψ` on vertical lines. Mathlib defines `Complex.digamma` -(as `logDeriv Gamma`) but has no integral representation (explicit TODO in -`Mathlib.Analysis.SpecialFunctions.Gamma.Digamma`), so this file builds it from the -Euler integral: `Γ'(z) = ∫₀^∞ t^{z-1}e^{-t} log t dt` (mathlib's -`hasDerivAt_GammaIntegral`), the Frullani representation of `log`, and Fubini — the -classical Gauss derivation. - -## Main results - -- `integral_frullani_log` : `∫₀^∞ (e^{-x} - e^{-tx})/x dx = log t` for `t > 0`. -- `integrableOn_rpow_mul_exp_neg_mul_abs_log` : the log-weighted Euler integrand is - integrable. -- `abs_frullani_kernel_le` : exponential domination of the Frullani kernel. -- `integral_gauss_inner` : the inner evaluation - `∫₀^∞ t^{z-1}e^{-t}(e^{-x}-e^{-tx})/x dt = Γ(z)(e^{-x} - (1+x)^{-z})/x`. -- `digamma_eq_integral_gauss_one` : **Gauss's first form** - `ψ(z) = ∫₀^∞ (e^{-x} - (1+x)^{-z})/x dx` for `Re z > 0`. -- `integrableOn_gauss_one_integrand` : integrability of that integrand. -- `digamma_sub_digamma_eq_integral` : **Poitou's difference form** - `ψ(w) - ψ(σ) = ∫₀^∞ (e^{-σu} - e^{-wu})/(1-e^{-u}) du` (`x = e^u - 1`), the form his - eq. (5) is used in — both counterterms cancel in the difference. +Reference: Poitou, *Sur les petits discriminants*, exposé 6, pp. 6-03–6-06. -/ @[expose] public section @@ -1216,7 +1194,7 @@ theorem hasDerivAt_gammaFT {F : ℝ → ℂ} (hF : Integrable F) refine h0.congr ?_ refine (MeasureTheory.ae_restrict_iff' measurableSet_Ioc).mpr ?_ filter_upwards [MeasureTheory.ae_iff.mpr (by - simp only [ne_eq, not_not, Set.setOf_eq_eq_singleton] + simp only [ne_eq, not_not, Set.ofPred_eq_eq_singleton] exact MeasureTheory.measure_singleton (0:ℝ) : volume {x : ℝ | ¬ x ≠ 0} = 0)] with x hx _ have hxne : (x:ℂ) ≠ 0 := Complex.ofReal_ne_zero.mpr hx @@ -1364,7 +1342,7 @@ theorem hasDerivAt_gammaFT {F : ℝ → ℂ} (hF : Integrable F) refine MeasureTheory.integral_congr_ae ?_ refine ((MeasureTheory.ae_restrict_iff' measurableSet_Ioc).mpr ?_) filter_upwards [MeasureTheory.ae_iff.mpr (by - simp only [ne_eq, not_not, Set.setOf_eq_eq_singleton] + simp only [ne_eq, not_not, Set.ofPred_eq_eq_singleton] exact MeasureTheory.measure_singleton (0:ℝ) : volume {x : ℝ | ¬ x ≠ 0} = 0)] with x hx _ have hxne : (x:ℂ) ≠ 0 := Complex.ofReal_ne_zero.mpr hx @@ -1518,7 +1496,7 @@ theorem hasDerivAt_rhoFT {k : ℝ → ℂ} (hk : Integrable k) (t : ℝ) : rw [h0, Real.exp_zero, mul_one] · exact hk.norm · filter_upwards [MeasureTheory.ae_iff.mpr (by - simp only [ne_eq, not_not, Set.setOf_eq_eq_singleton] + simp only [ne_eq, not_not, Set.ofPred_eq_eq_singleton] exact MeasureTheory.measure_singleton (0:ℝ) : volume {x : ℝ | ¬ x ≠ 0} = 0)] with x hx intro τ _ @@ -2479,7 +2457,8 @@ theorem tendsto_eLpNorm_indicator_truncation {g : ℝ → ℂ} = (∫⁻ x, ((Set.Ioc (-(n:ℝ)) (n:ℝ))ᶜ.indicator (fun y => ‖g y‖ₑ ^ (2:ℝ)) x)) ^ (1/(2:ℝ)) := by intro n - rw [eLpNorm_eq_lintegral_rpow_enorm_toReal (by norm_num) (by norm_num)] + rw [eLpNorm_eq_lintegral_rpow_enorm_toReal (by norm_num) (by norm_num) + ((hg.aestronglyMeasurable.indicator measurableSet_Ioc).sub hg.aestronglyMeasurable)] rw [show ((2:ℝ≥0∞).toReal) = (2:ℝ) by norm_num] congr 1 refine lintegral_congr (fun x => ?_) @@ -2507,7 +2486,8 @@ theorem tendsto_eLpNorm_indicator_truncation {g : ℝ → ℂ} · rw [Set.indicator_of_notMem hx] exact bot_le · have := hg.eLpNorm_lt_top - rw [eLpNorm_eq_lintegral_rpow_enorm_toReal (by norm_num) (by norm_num), + rw [eLpNorm_eq_lintegral_rpow_enorm_toReal (by norm_num) (by norm_num) + hg.aestronglyMeasurable, show ((2:ℝ≥0∞).toReal) = (2:ℝ) by norm_num] at this have h1 : (∫⁻ x, ‖g x‖ₑ ^ (2:ℝ)) < ⊤ := by by_contra hcon @@ -2615,11 +2595,7 @@ theorem gammaFT_ae_eq_fourierL2 {F : ℝ → ℂ} (hF : Integrable F) exact tendsto_eLpNorm_indicator_truncation hFdiv2 have hmeas : TendstoInMeasure volume (fun n : ℕ => 𝓕 (fun x : ℝ => hn n x)) atTop ((𝓕 (hFdiv2.toLp h) : Lp ℂ 2 (volume : Measure ℝ)) : ℝ → ℂ) := by - refine tendstoInMeasure_of_tendsto_eLpNorm (p := 2) (by norm_num) ?_ ?_ heLp - · intro n - refine Continuous.aestronglyMeasurable ?_ - exact VectorFourier.fourierIntegral_continuous (by fun_prop) (by fun_prop) (hn1 n) - · exact (MeasureTheory.Lp.memLp _).aestronglyMeasurable + exact MeasureTheory.tendstoInMeasure_of_tendsto_eLpNorm (p := 2) (by norm_num) heLp obtain ⟨ns, hns_mono, hns_ae⟩ := hmeas.exists_seq_tendsto_ae have hqmp : Measure.QuasiMeasurePreserving (fun t : ℝ => -t/(2*π)) volume volume := by @@ -2637,7 +2613,7 @@ theorem gammaFT_ae_eq_fourierL2 {F : ℝ → ℂ} (hF : Integrable F) have hae_t := hqmp.ae hns_ae have hne : ∀ᵐ t : ℝ, t ≠ 0 := by rw [MeasureTheory.ae_iff] - simp only [ne_eq, not_not, Set.setOf_eq_eq_singleton] + simp only [ne_eq, not_not, Set.ofPred_eq_eq_singleton] exact MeasureTheory.measure_singleton 0 filter_upwards [hae_t, hne] with t hlim ht have hpt : Tendsto (fun i : ℕ => 𝓕 (fun x : ℝ => hn (ns i) x) (-t/(2*π))) @@ -4275,7 +4251,7 @@ theorem differentiableAt_logDeriv_gammaFactor (K : Type*) [Field K] [NumberField have hU : IsOpen {w : ℂ | 0 < w.re} := isOpen_lt continuous_const Complex.continuous_re have hdiff : DifferentiableOn ℂ (gammaFactor K) {w : ℂ | 0 < w.re} := by intro w hw - rw [Set.mem_setOf_eq] at hw + rw [Set.mem_ofPred_eq] at hw exact (((differentiableAt_Gammaℝ_of_re_pos hw).pow _).mul ((differentiableAt_Gammaℂ_of_re_pos hw).pow _)).differentiableWithinAt have han : AnalyticOnNhd ℂ (gammaFactor K) {w : ℂ | 0 < w.re} := diff --git a/projects/DedekindResidue/DedekindResidue/ExplicitFormula/PrimeSide.lean b/projects/DedekindResidue/DedekindResidue/ExplicitFormula/PrimeSide.lean index 257b1ee8f..bfe4ae128 100644 --- a/projects/DedekindResidue/DedekindResidue/ExplicitFormula/PrimeSide.lean +++ b/projects/DedekindResidue/DedekindResidue/ExplicitFormula/PrimeSide.lean @@ -557,11 +557,11 @@ instance countable_ideal_ringOfIntegers (K : Type*) [Field K] [NumberField K] : Countable (Ideal (𝓞 K)) := by have h0 : (Set.univ : Set (Ideal (𝓞 K))) = ⋃ n : ℕ, {I | Ideal.absNorm I = n} := by ext I - simp only [Set.mem_univ, Set.mem_iUnion, Set.mem_setOf_eq, true_iff] + simp only [Set.mem_univ, Set.mem_iUnion, Set.mem_ofPred_eq, true_iff] exact ⟨Ideal.absNorm I, rfl⟩ have h1 : (Set.univ : Set (Ideal (𝓞 K))).Countable := by rw [h0] - exact Set.countable_iUnion (fun n => (Ideal.finite_setOf_absNorm_eq n).countable) + exact Set.countable_iUnion (fun n => (Ideal.finite_setOfPred_absNorm_eq n).countable) exact Set.countable_univ_iff.mp h1 /-- A pointwise `tsum` of integrable functions with summable `L¹` norms is diff --git a/projects/DedekindResidue/DedekindResidue/ExplicitFormula/ZeroCapture.lean b/projects/DedekindResidue/DedekindResidue/ExplicitFormula/ZeroCapture.lean index 7d31587b8f2e079d6c96c21bf6d5ff6fd91172a5..74884c4ad50c792dfd89f70ce83086df94199c96 100644 GIT binary patch delta 407 zcmY+9u}T9$5Qd3~2&au$3NnRQg&>HHDI?lxV;jO`cP_WMH+$|*5|T!IhU=o0jh4Y! zi4S69?F0A%?h#M}+bsV#|9tcM(0H3Q=B{>o$$$*5AO=rLkO!8UAQ^#jd0|ON!zpRH zHmqSvf{+ebiE#`mDsesl#+MY{>7f$P6qGl8!vio9;)Hhr#N-qqV8$Uw*Fb?qM{npjc3?1+tVA3;Kw& zF7N6)2T`IZ?4(*08 1/2`, `X ≥ 1`). -/ + theorem integrable_auxF_kernel (s : ℂ) {X : ℝ} (hX : 1 ≤ X) (hs : 1/2 < s.re) (γ : ℝ) : Integrable (fun t : ℝ => auxF s X t * Complex.exp (Complex.I * t * γ)) := by refine Integrable.mono' @@ -186,9 +174,7 @@ theorem hasDerivAt_gAux_deriv (h : ℂ) {t : ℝ} (ht : 0 < t) : field_simp ring -/-- Master decay bound: a continuous multiplier `φ` bounded on `(T, ∞)` times the -kernel `e^{-ht}/t` (with `Re h > 0`, `T > 0`) is integrable on `(T, ∞)`, by comparison -with `(C/T)·e^{-Re h · t}`. -/ + theorem integrableOn_bounded_mul_exp_div {h : ℂ} (hh : 0 < h.re) {T : ℝ} (hT : 0 < T) {φ : ℝ → ℂ} (hφc : ContinuousOn φ (Set.Ioi T)) {C : ℝ} (hφb : ∀ t ∈ Set.Ioi T, ‖φ t‖ ≤ C) : @@ -218,7 +204,7 @@ theorem integrableOn_bounded_mul_exp_div {h : ℂ} (hh : 0 < h.re) {T : ℝ} (hT mul_le_mul (hφb t ht) hle (by positivity) hC0 _ = C / T * Real.exp (-h.re * t) := by ring -/-- The kernel `e^{-ht}/t` times an eventually-bounded multiplier tends to `0` at `∞`. -/ + theorem tendsto_exp_div_mul_atTop {h : ℂ} (hh : 0 < h.re) {v : ℝ → ℂ} {C : ℝ} (hv : ∀ᶠ t : ℝ in Filter.atTop, ‖v t‖ ≤ C) : Filter.Tendsto (fun t : ℝ => Complex.exp (-h * t) / t * v t) Filter.atTop (nhds 0) := by @@ -343,7 +329,7 @@ theorem integral_Ioi_gAux_ibp₁ (h : ℂ) (hh : 0 < h.re) {T γ : ℝ} (hT : 0 gcongr exact abs_le.mpr ⟨Real.neg_one_le_sin _, Real.sin_le_one _⟩ -/-- Integrability of the kernel against a bounded continuous real multiplier. -/ + theorem integrableOn_exp_div_mul_real {h : ℂ} (hh : 0 < h.re) {T : ℝ} (hT : 0 < T) {ψ : ℝ → ℝ} (hψc : Continuous ψ) {C : ℝ} (hψb : ∀ t, |ψ t| ≤ C) : IntegrableOn (fun t : ℝ => Complex.exp (-h * t) / t * ((ψ t : ℝ) : ℂ)) @@ -412,9 +398,7 @@ theorem integrableOn_gAux_deriv2_mul_real {h : ℂ} (hh : 0 < h.re) {T : ℝ} (h rw [norm_pow] linarith -/-- Second integration by parts for the Fourier tail: with `g(t) = e^{-ht}/t`, -`∫_T^∞ (g″(t)·(-cos(tγ)/γ²) + g′(t)·sin(tγ)/γ) dt = -(h+1/T)·g(T)·cos(Tγ)/γ²`, stated with the boundary value in raw `-(u(T)·v(T))` form. -/ + theorem integral_Ioi_gAux_ibp₂ (h : ℂ) (hh : 0 < h.re) {T γ : ℝ} (hT : 0 < T) (hγ : γ ≠ 0) : (∫ t in Set.Ioi T, @@ -561,9 +545,7 @@ theorem tail_integral_identity (h : ℂ) (hh : 0 < h.re) {T γ : ℝ} (hT : 0 < field_simp at h2 ⊢ linear_combination (-1 : ℂ) * h2 -/-- On the tail `t > log X`, the auxiliary function factors as a constant times the -exponential kernel: `F_{s,X}(t) = log X · e^{h·log X} · (e^{-h t}/t)` with `h = s - 1/2` -(the `|t| > log X` branch of `auxF`, rearranged). -/ + theorem auxF_of_gt (s : ℂ) {X : ℝ} (hX : 1 < X) {t : ℝ} (ht : Real.log X < t) : auxF s X t = (Real.log X : ℂ) * Complex.exp ((s - 1/2) * (Real.log X : ℂ)) @@ -574,17 +556,13 @@ theorem auxF_of_gt (s : ℂ) {X : ℝ} (hX : 1 < X) {t : ℝ} (ht : Real.log X < rw [abs_of_pos htpos] exact not_le.mpr ht have htc : ((t : ℝ) : ℂ) ≠ 0 := by exact_mod_cast htpos.ne' - rw [auxF, if_neg hnot, abs_of_pos htpos] + rw [auxF, ite_eq_right hnot, abs_of_pos htpos] push_cast rw [show -(s - 1/2) * ((t:ℂ) - (Real.log X : ℂ)) = -(s - 1/2) * (t:ℂ) + (s - 1/2) * (Real.log X : ℂ) by ring, Complex.exp_add] field_simp -/-- **Belabas–Friedman Lemma 2, eq. (8)** (the `γ ≠ 0` case): the paper-convention -Fourier transform of the auxiliary function `F_{s,X}` in closed form. With `h = s - 1/2` -and `T = log X`, -`F̂(γ) = 2h²·sin(Tγ)/((h²+γ²)γ) + 2(h+1/T)·cos(Tγ)/(h²+γ²) - - 4/(h²+γ²)·∫_T^∞ cos(tγ)·F_{s,X}(t)·(ht+1)/t² dt`. -/ + theorem fourier_auxF (s : ℂ) {X : ℝ} (hX : 1 < X) (hs : 1/2 < s.re) {γ : ℝ} (hγ : γ ≠ 0) : paperFourierIntegral (auxF s X) γ @@ -706,9 +684,7 @@ theorem fourier_auxF (s : ℂ) {X : ℝ} (hX : 1 < X) (hs : 1/2 < s.re) {γ : + (4*s - 2)*(Real.log X : ℂ)*(γ:ℂ)*Complex.cos ((Real.log X : ℂ)*(γ:ℂ)) + 4*(γ:ℂ)*Complex.cos ((Real.log X : ℂ)*(γ:ℂ)))) * hEE' -/-- FTC on `(T,∞)` for the second-derivative kernel: with `g(t) = e^{-ht}/t` and `Re h > 0`, -`∫_T^∞ (h² + (2ht+2)/t²)·g(t) dt = (h + 1/T)·g(T)`. The integrand has antiderivative -`-(h + 1/t)·g(t)`, which vanishes at `∞`. -/ + theorem integral_Ioi_gAux_deriv2 {h : ℂ} (hh : 0 < h.re) {T : ℝ} (hT : 0 < T) : (∫ t in Set.Ioi T, (h^2 + (2*h*t + 2)/t^2) * (Complex.exp (-h * t) / t)) = (h + 1/(T:ℂ)) * (Complex.exp (-h * (T:ℂ)) / (T:ℂ)) := by @@ -734,7 +710,7 @@ theorem integral_Ioi_gAux_deriv2 {h : ℂ} (hh : 0 < h.re) {T : ℝ} (hT : 0 < T rw [norm_neg] exact norm_affine_inv_le h hT htT -/-- Integrability on `(T,∞)` of the remainder kernel `g(t)·(ht+1)/t²`, `g(t) = e^{-ht}/t`. -/ + theorem integrableOn_gAux_mul_affine_div_sq {h : ℂ} (hh : 0 < h.re) {T : ℝ} (hT : 0 < T) : IntegrableOn (fun t : ℝ => (Complex.exp (-h * t) / t) * ((h*t + 1)/t^2)) (Set.Ioi T) := by @@ -749,9 +725,7 @@ theorem integrableOn_gAux_mul_affine_div_sq {h : ℂ} (hh : 0 < h.re) {T : ℝ} · intro t ht exact norm_affine_div_sq_le h hT (le_of_lt ht) -/-- Linearity split of the second-derivative-kernel integral into plain and remainder parts: -with `g(t) = e^{-ht}/t`, -`∫_T^∞ (h²+(2ht+2)/t²)·g = h²·∫_T^∞ g + 2·∫_T^∞ g·(ht+1)/t²`. -/ + theorem integral_Ioi_gAux_deriv2_split {h : ℂ} (hh : 0 < h.re) {T : ℝ} (hT : 0 < T) : (∫ t in Set.Ioi T, (h^2 + (2*h*t + 2)/t^2) * (Complex.exp (-h * t) / t)) = h^2 * (∫ t in Set.Ioi T, Complex.exp (-h * t) / t) diff --git a/projects/FltRegularBernoulli/BernoulliRegular/BernoulliGeneralized.lean b/projects/FltRegularBernoulli/BernoulliRegular/BernoulliGeneralized.lean index f626dd2f5..69ea46900 100644 --- a/projects/FltRegularBernoulli/BernoulliRegular/BernoulliGeneralized.lean +++ b/projects/FltRegularBernoulli/BernoulliRegular/BernoulliGeneralized.lean @@ -182,7 +182,7 @@ lemma bernoulliGen_teichmuller_inverse_eq_p_sub_one_div_p_add_padicInt ((p - 1 : ℚ_[p]) / p) + z := by have hp : Nat.Prime p := Fact.out have hp_gt2 : 2 < p := lt_of_le_of_ne hp.two_le (Ne.symm hp_odd) - haveI : NeZero p := ⟨hp.ne_zero⟩ + have : NeZero p := ⟨hp.ne_zero⟩ let ωZ : DirichletCharacter ℤ_[p] p := (teichmullerChar p) ^ (p - 2) let ωQ : DirichletCharacter ℚ_[p] p := (teichmullerCharQp p) ^ (p - 2) let S : ℤ_[p] := ∑ a : ZMod p, ωZ a * (a.val : ℤ_[p]) @@ -206,7 +206,7 @@ lemma bernoulliGen_teichmuller_inverse_eq_p_sub_one_div_p_add_padicInt dsimp [ωZ]; rw [MulChar.pow_apply' _ hpow_ne_zero, map_pow, teichmullerChar_apply, toZMod_teichmuller] have hval : PadicInt.toZMod (a.val : ℤ_[p]) = a := by simp - rw [map_mul, hω, hval, if_neg ha] + rw [map_mul, hω, hval, ite_eq_right ha] calc a ^ (p - 2) * a = a ^ ((p - 2) + 1) := by rw [mul_comm, pow_succ'] _ = a ^ (p - 1) := by congr; omega @@ -215,7 +215,7 @@ lemma bernoulliGen_teichmuller_inverse_eq_p_sub_one_div_p_add_padicInt have hsplit : (∑ a : ZMod p, if a = 0 then 0 else 1) = (Finset.univ.erase (0 : ZMod p)).sum (fun _ ↦ (1 : ZMod p)) := by - rw [← Finset.sum_erase_add _ _ (Finset.mem_univ 0), if_pos rfl, add_zero] + rw [← Finset.sum_erase_add _ _ (Finset.mem_univ 0), ite_eq_left rfl, add_zero] refine Finset.sum_congr rfl fun a ha ↦ ?_ simp [(Finset.mem_erase.mp ha).1] calc @@ -278,7 +278,7 @@ lemma val_add_val_neg_cast [NeZero N] (a : ZMod N) : ((a.val : R) + ((-a).val : R)) = if a = 0 then (0 : R) else (N : R) := by rcases eq_or_ne a 0 with rfl | ha · simp - · rw [if_neg ha, ZMod.neg_val, if_neg ha, Nat.cast_sub (ZMod.val_lt _).le] + · rw [ite_eq_right ha, ZMod.neg_val, ite_eq_right ha, Nat.cast_sub (ZMod.val_lt _).le] ring omit [Algebra ℚ R] in @@ -386,7 +386,7 @@ theorem bernoulli_mem_padicInt_of_lt_sub_one {p : ℕ} [hp : Fact p.Prime] -- `k ≥ 1`. Apply `sum_bernoulli (k + 1) = 0`. have hkp1_lt : k + 1 < p := by omega have h_sum := _root_.sum_bernoulli (k + 1) - rw [if_neg (by omega : k + 1 ≠ 1), Finset.sum_range_succ] at h_sum + rw [ite_eq_right (by omega : k + 1 ≠ 1), Finset.sum_range_succ] at h_sum have h_choose_k : (Nat.choose (k + 1) k : ℚ) = (k + 1 : ℚ) := by rw [Nat.choose_succ_self_right]; push_cast; rfl rw [h_choose_k] at h_sum @@ -399,7 +399,7 @@ theorem bernoulli_mem_padicInt_of_lt_sub_one {p : ℕ} [hp : Fact p.Prime] let z_of : ℕ → ℤ_[p] := fun j ↦ if h : j < k then (hj_wit j h).choose else 0 have hz_of : ∀ j, j < k → (bernoulli j : ℚ_[p]) = ((z_of j : ℤ_[p]) : ℚ_[p]) := by - intro j hj; simp only [z_of, dif_pos hj]; exact (hj_wit j hj).choose_spec + intro j hj; simp only [z_of, dite_eq_left hj]; exact (hj_wit j hj).choose_spec let S : ℤ_[p] := ∑ j ∈ Finset.range k, (Nat.choose (k + 1) j : ℤ_[p]) * z_of j have hS_coe : (S : ℚ_[p]) = ∑ j ∈ Finset.range k, (Nat.choose (k + 1) j : ℚ_[p]) * (bernoulli j : ℚ_[p]) := by @@ -541,7 +541,7 @@ theorem bernoulli_pSubOne_add_inv_p_mem_padicInt -- Step 1: From `sum_bernoulli p = 0` derive -- `p * bernoulli (p - 1) + 1 = -∑ k ∈ range (p - 2), C(p, k+1) * bernoulli (k+1)`. have h_sum := _root_.sum_bernoulli p - rw [if_neg hp.ne_one] at h_sum + rw [ite_eq_right hp.ne_one] at h_sum have hp_eq : p = (p - 1) + 1 := by omega nth_rewrite 1 [hp_eq] at h_sum rw [Finset.sum_range_succ] at h_sum @@ -576,7 +576,7 @@ theorem bernoulli_pSubOne_add_inv_p_mem_padicInt if h : k < p - 2 then (h_wit k h).choose else 0 have hz_of : ∀ k, k < p - 2 → ((_root_.bernoulli (k + 1) : ℚ) : ℚ_[p]) = (z_of k : ℚ_[p]) := by - intro k hk; simp only [z_of, dif_pos hk]; exact (h_wit k hk).choose_spec + intro k hk; simp only [z_of, dite_eq_left hk]; exact (h_wit k hk).choose_spec -- `c k : ℕ := C(p, k + 1) / p`, satisfying `p * c k = C(p, k + 1)` for `k < p - 2`. let c : ℕ → ℕ := fun k ↦ Nat.choose p (k + 1) / p have hc_eq : ∀ k, k < p - 2 → p * c k = Nat.choose p (k + 1) := fun k hk ↦ diff --git a/projects/FltRegularBernoulli/BernoulliRegular/Characters.lean b/projects/FltRegularBernoulli/BernoulliRegular/Characters.lean index 356776bea..c528b5dc6 100644 --- a/projects/FltRegularBernoulli/BernoulliRegular/Characters.lean +++ b/projects/FltRegularBernoulli/BernoulliRegular/Characters.lean @@ -221,16 +221,16 @@ Dirichlet characters mod `p` is (noncanonically) isomorphic to `(ZMod p)ˣ`, hence cyclic of order `p - 1`. -/ lemma dirichletCharacter_mulEquiv_zmodUnits : Nonempty (DirichletCharacter ℤ_[p] p ≃* (ZMod p)ˣ) := by - haveI : NeZero p := ⟨hp.1.ne_zero⟩ - haveI : HasEnoughRootsOfUnity ℤ_[p] (Monoid.exponent (ZMod p)ˣ) := + have : NeZero p := ⟨hp.1.ne_zero⟩ + have : HasEnoughRootsOfUnity ℤ_[p] (Monoid.exponent (ZMod p)ˣ) := exponent_zmod_units (p := p) ▸ inferInstance exact DirichletCharacter.mulEquiv_units ℤ_[p] p /-- The `ℤ_[p]`-valued Dirichlet character group mod `p` has `p - 1` elements. -/ lemma card_dirichletCharacter : Nat.card (DirichletCharacter ℤ_[p] p) = p - 1 := by - haveI : NeZero p := ⟨hp.1.ne_zero⟩ - haveI : HasEnoughRootsOfUnity ℤ_[p] (Monoid.exponent (ZMod p)ˣ) := + have : NeZero p := ⟨hp.1.ne_zero⟩ + have : HasEnoughRootsOfUnity ℤ_[p] (Monoid.exponent (ZMod p)ˣ) := exponent_zmod_units (p := p) ▸ inferInstance rw [DirichletCharacter.card_eq_totient_of_hasEnoughRootsOfUnity, Nat.totient_prime hp.1] @@ -313,7 +313,7 @@ lemma teichmuller_neg_one (hp_odd : p ≠ 2) : teichmuller p (-1) = -1 := by have h_sq : teichmuller p (-1 : ZMod p) ^ 2 = 1 := by rw [sq, ← map_mul, neg_one_mul, neg_neg, map_one] rcases sq_eq_one_iff.mp h_sq with h1 | h_neg - · haveI : Fact (2 < p) := ⟨lt_of_le_of_ne hp.1.two_le (Ne.symm hp_odd)⟩ + · have : Fact (2 < p) := ⟨lt_of_le_of_ne hp.1.two_le (Ne.symm hp_odd)⟩ exact absurd (by simpa using congrArg PadicInt.toZMod h1) ZMod.neg_one_ne_one · exact h_neg diff --git a/projects/FltRegularBernoulli/BernoulliRegular/GaussSum/Basic.lean b/projects/FltRegularBernoulli/BernoulliRegular/GaussSum/Basic.lean index 7733831c9..d24c5d66e 100644 --- a/projects/FltRegularBernoulli/BernoulliRegular/GaussSum/Basic.lean +++ b/projects/FltRegularBernoulli/BernoulliRegular/GaussSum/Basic.lean @@ -54,9 +54,9 @@ prime `p`, paired with the standard additive character `ZMod.stdAddChar : AddChar (ZMod p) ℂ`, evaluates to `-1`. -/ theorem gaussSum_one_stdAddChar : gaussSum (1 : DirichletCharacter ℂ p) (ZMod.stdAddChar (N := p)) = -1 := by - haveI : NeZero p := ⟨hp.out.ne_zero⟩ - haveI : Fact (1 < p) := ⟨hp.out.one_lt⟩ - haveI : Nontrivial (ZMod p) := ZMod.nontrivial p + have : NeZero p := ⟨hp.out.ne_zero⟩ + have : Fact (1 < p) := ⟨hp.out.one_lt⟩ + have : Nontrivial (ZMod p) := ZMod.nontrivial p -- `stdAddChar` is not the trivial additive character, so its values sum to `0`. have h_ne : (ZMod.stdAddChar (N := p)) ≠ 1 := by intro h @@ -83,7 +83,7 @@ theorem gaussSum_one_stdAddChar : MulChar.map_nonunit _ (by simp) simp [h0] · have hu : IsUnit a := ha.isUnit - simp [MulChar.one_apply hu, if_neg ha] + simp [MulChar.one_apply hu, ite_eq_right ha] classical calc gaussSum (1 : DirichletCharacter ℂ p) (ZMod.stdAddChar (N := p)) = ∑ a : ZMod p, (1 : DirichletCharacter ℂ p) a * (ZMod.stdAddChar (N := p)) a := rfl @@ -107,7 +107,7 @@ theorem gaussSum_mul_gaussSum_inv_stdAddChar gaussSum χ (ZMod.stdAddChar (N := p)) * gaussSum χ⁻¹ (ZMod.stdAddChar (N := p)) = χ (-1) * p := by - haveI : NeZero p := ⟨hp.out.ne_zero⟩ + have : NeZero p := ⟨hp.out.ne_zero⟩ have h_prim : (ZMod.stdAddChar : AddChar (ZMod p) ℂ).IsPrimitive := ZMod.isPrimitive_stdAddChar p have h_card : (Fintype.card (ZMod p) : ℂ) = p := by @@ -153,7 +153,7 @@ does not vanish as soon as their product is nontrivial. -/ theorem jacobiSum_ne_zero_stdAddChar {χ φ : DirichletCharacter ℂ p} (hχφ : χ * φ ≠ 1) : jacobiSum χ φ ≠ 0 := by - haveI : NeZero p := ⟨hp.out.ne_zero⟩ + have : NeZero p := ⟨hp.out.ne_zero⟩ by_cases hχ : χ = 1 · subst hχ have hφ : φ ≠ 1 := by simpa using hχφ @@ -187,7 +187,7 @@ character factoring through `1` is the trivial character. -/ theorem DirichletCharacter.isPrimitive_of_ne_one {χ : DirichletCharacter ℂ p} (hχ : χ ≠ 1) : χ.IsPrimitive := by - haveI : NeZero p := ⟨hp.out.ne_zero⟩ + have : NeZero p := ⟨hp.out.ne_zero⟩ rw [DirichletCharacter.isPrimitive_def] rcases (Nat.dvd_prime hp.out).mp χ.conductor_dvd_level with h | h · exact absurd ((DirichletCharacter.factorsThrough_one_iff χ).mp @@ -340,7 +340,7 @@ theorem dft_quadraticCharComplex_eq_gaussSum (hp₂ : p ≠ 2) (k : ZMod p) : ZMod.dft (quadraticCharComplex p) k = quadraticCharComplex p (-k) * gaussSum (quadraticCharComplex p) (ZMod.stdAddChar (N := p)) := by - haveI : NeZero p := ⟨hp.out.ne_zero⟩ + have : NeZero p := ⟨hp.out.ne_zero⟩ have hprim : (quadraticCharComplex p).IsPrimitive := DirichletCharacter.isPrimitive_of_ne_one (p := p) (quadraticCharComplex_ne_one (p := p) hp₂) @@ -352,12 +352,12 @@ theorem dft_quadraticCharComplex_eq_gaussSum (hp₂ : p ≠ 2) (k : ZMod p) : `p` at `0` and `0` away from `0`. -/ theorem dft_const_one (k : ZMod p) : ZMod.dft (fun _ : ZMod p ↦ (1 : ℂ)) k = if k = 0 then p else 0 := by - haveI : NeZero p := ⟨hp.out.ne_zero⟩ + have : NeZero p := ⟨hp.out.ne_zero⟩ by_cases hk : k = 0 · subst hk rw [ZMod.dft_apply_zero] simp - · rw [ZMod.dft_apply, if_neg hk] + · rw [ZMod.dft_apply, ite_eq_right hk] have hne : ((ZMod.stdAddChar : AddChar (ZMod p) ℂ).mulShift (-k)) ≠ 1 := by intro hshift have heval : (ZMod.stdAddChar (N := p)) (-k) = 1 := by @@ -466,7 +466,7 @@ theorem conj_gaussSum_quadraticCharComplex_eq_neg_self_of_mod_four_eq_three theorem gaussSum_quadraticCharComplex_sq (hp₂ : p ≠ 2) : gaussSum (quadraticCharComplex p) (ZMod.stdAddChar (N := p)) ^ 2 = quadraticCharComplex p (-1) * p := by - haveI : NeZero p := ⟨hp.out.ne_zero⟩ + have : NeZero p := ⟨hp.out.ne_zero⟩ simpa [ZMod.card] using gaussSum_sq (χ := quadraticCharComplex p) (quadraticCharComplex_ne_one (p := p) hp₂) @@ -579,7 +579,7 @@ character `χ : DirichletCharacter ℂ p`. Uses `χ^(p-1) = 1` + membership in `Algebra.adjoin ℤ {μ_{p-1}}`, which is contained in the integral closure. -/ theorem DirichletCharacter.isIntegral_apply (χ : DirichletCharacter ℂ p) (a : ZMod p) : IsIntegral ℤ (χ a) := by - haveI : NeZero p := ⟨hp.out.ne_zero⟩ + have : NeZero p := ⟨hp.out.ne_zero⟩ have hp_sub : 0 < p - 1 := by have := hp.out.one_lt; omega set μ : ℂ := Complex.exp (2 * Real.pi * Complex.I / (p - 1 : ℕ)) have hμ : IsPrimitiveRoot μ (p - 1) := @@ -597,7 +597,7 @@ theorem DirichletCharacter.isIntegral_apply (χ : DirichletCharacter ℂ p) (a : integral over `ℤ` (each is a `p`-th root of unity). -/ theorem ZMod.isIntegral_stdAddChar (a : ZMod p) : IsIntegral ℤ ((ZMod.stdAddChar : AddChar (ZMod p) ℂ) a) := by - haveI : NeZero p := ⟨hp.out.ne_zero⟩ + have : NeZero p := ⟨hp.out.ne_zero⟩ have hx_pow : ((ZMod.stdAddChar : AddChar (ZMod p) ℂ) a) ^ p = 1 := by rw [← AddChar.map_nsmul_eq_pow, show ((p : ℕ) • a : ZMod p) = 0 from by rw [show ((p : ℕ) • a : ZMod p) = (p : ZMod p) * a from by ring, @@ -636,7 +636,7 @@ theorem gaussSum_mem_algebraAdjoin_stickelbergerComplexRoot (χ : DirichletCharacter ℂ p) : gaussSum χ (ZMod.stdAddChar : AddChar (ZMod p) ℂ) ∈ Algebra.adjoin ℤ ({stickelbergerComplexRoot p} : Set ℂ) := by - haveI : NeZero p := ⟨hp.out.ne_zero⟩ + have : NeZero p := ⟨hp.out.ne_zero⟩ have hp_one_lt : 1 < p := hp.out.one_lt have hp_sub : 0 < p - 1 := by omega have hp_pos : 0 < p := hp.out.pos @@ -665,7 +665,7 @@ theorem gaussSum_mem_algebraAdjoin_stickelbergerComplexRoot have h_pow : χ ^ (p - 1) = 1 := by have h := MulChar.pow_card_eq_one χ (M := ZMod p) rwa [ZMod.card_units_eq_totient, Nat.totient_prime hp.out] at h - haveI : NeZero (p - 1) := ⟨hp_sub.ne'⟩ + have : NeZero (p - 1) := ⟨hp_sub.ne'⟩ have h_mem : χ a ∈ Algebra.adjoin ℤ ({ζ ^ p} : Set ℂ) := MulChar.apply_mem_algebraAdjoin_of_pow_eq_one h_pow hζ_pm1 a have h_sub : Algebra.adjoin ℤ ({ζ ^ p} : Set ℂ) ≤ Algebra.adjoin ℤ ({ζ} : Set ℂ) := by diff --git a/projects/FltRegularBernoulli/BernoulliRegular/GaussSum/SignInvariant/BlockDeterminant.lean b/projects/FltRegularBernoulli/BernoulliRegular/GaussSum/SignInvariant/BlockDeterminant.lean index c3148c6ba..5764b48d9 100644 --- a/projects/FltRegularBernoulli/BernoulliRegular/GaussSum/SignInvariant/BlockDeterminant.lean +++ b/projects/FltRegularBernoulli/BernoulliRegular/GaussSum/SignInvariant/BlockDeterminant.lean @@ -280,7 +280,7 @@ theorem toMatrix_deltaZeroConstOneDirichletCharacterBasis_normalizedDft : simp [Module.Basis.repr_self, hij] simpa only [Matrix.mul_diagonal, PEquiv.toMatrix_apply, Equiv.toPEquiv_apply, Equiv.Perm.coe_inv, Option.mem_def, Option.some.injEq, ite_mul, one_mul, zero_mul, hneq', - if_false] + ite_false] using hsingle /-- The determinant of that monomial matrix: the sign of the permutation times the diff --git a/projects/FltRegularBernoulli/BernoulliRegular/GaussSum/SignInvariant/BranchChoice.lean b/projects/FltRegularBernoulli/BernoulliRegular/GaussSum/SignInvariant/BranchChoice.lean index 34468899d..419594284 100644 --- a/projects/FltRegularBernoulli/BernoulliRegular/GaussSum/SignInvariant/BranchChoice.lean +++ b/projects/FltRegularBernoulli/BernoulliRegular/GaussSum/SignInvariant/BranchChoice.lean @@ -50,7 +50,7 @@ theorem card_even_eq_card_odd_characters (hp₂ : p ≠ 2) : simp only [E, O, Finset.mem_union, Finset.mem_filter, Finset.mem_univ, true_and, iff_true] exact DirichletCharacter.even_or_odd χ have hneg_ne_one : (-1 : ZMod p) ≠ 1 := by - haveI : Fact (2 < p) := ⟨lt_of_le_of_ne hp.out.two_le (Ne.symm hp₂)⟩ + have : Fact (2 < p) := ⟨lt_of_le_of_ne hp.out.two_le (Ne.symm hp₂)⟩ exact ZMod.neg_one_ne_one have hsum_zero : ∑ χ : DirichletCharacter ℂ p, χ (-1 : ZMod p) = 0 := diff --git a/projects/FltRegularBernoulli/BernoulliRegular/GaussSum/SignInvariant/Operator.lean b/projects/FltRegularBernoulli/BernoulliRegular/GaussSum/SignInvariant/Operator.lean index e01362db2..cdfae2bc9 100644 --- a/projects/FltRegularBernoulli/BernoulliRegular/GaussSum/SignInvariant/Operator.lean +++ b/projects/FltRegularBernoulli/BernoulliRegular/GaussSum/SignInvariant/Operator.lean @@ -172,7 +172,7 @@ noncomputable def zmodEquivFin : ZMod p ≃ Fin p := theorem zmodEquivFin_symm_apply (i : Fin p) : (zmodEquivFin (p := p)).symm i = (i : ZMod p) := by - haveI : NeZero p := ⟨hp.out.ne_zero⟩ + have : NeZero p := ⟨hp.out.ne_zero⟩ change ZMod.finEquiv p i = (i : ZMod p) cases p with | zero => diff --git a/projects/FltRegularBernoulli/BernoulliRegular/GaussSum/SignInvariant/Trace.lean b/projects/FltRegularBernoulli/BernoulliRegular/GaussSum/SignInvariant/Trace.lean index a5de9475f..f41b89788 100644 --- a/projects/FltRegularBernoulli/BernoulliRegular/GaussSum/SignInvariant/Trace.lean +++ b/projects/FltRegularBernoulli/BernoulliRegular/GaussSum/SignInvariant/Trace.lean @@ -49,12 +49,12 @@ theorem dft_deltaZero_eq_constOne : /-- The DFT of the constant-one function is concentrated at `0`. -/ theorem dft_constOne (k : ZMod p) : ZMod.dft (fun _ : ZMod p ↦ (1 : ℂ)) k = if k = 0 then p else 0 := by - haveI : NeZero p := ⟨hp.out.ne_zero⟩ + have : NeZero p := ⟨hp.out.ne_zero⟩ by_cases hk : k = 0 · subst hk rw [ZMod.dft_apply_zero] simp - · rw [ZMod.dft_apply, if_neg hk] + · rw [ZMod.dft_apply, ite_eq_right hk] have hne : ((ZMod.stdAddChar : AddChar (ZMod p) ℂ).mulShift (-k)) ≠ 1 := by intro hshift have heval : (ZMod.stdAddChar (N := p)) (-k) = 1 := by @@ -149,7 +149,7 @@ theorem dft_eq_scalar_smul_inv_character {χ : DirichletCharacter ℂ p} ZMod.dft χ = (χ⁻¹ (-1) * gaussSum χ (ZMod.stdAddChar (N := p))) • ((χ⁻¹ : DirichletCharacter ℂ p) : ZMod p → ℂ) := by - haveI : NeZero p := ⟨hp.out.ne_zero⟩ + have : NeZero p := ⟨hp.out.ne_zero⟩ have hprim : χ.IsPrimitive := DirichletCharacter.isPrimitive_of_ne_one (p := p) hχ ext k simp only [Pi.smul_apply, smul_eq_mul] diff --git a/projects/FltRegularBernoulli/BernoulliRegular/LValueAtOne/Defs.lean b/projects/FltRegularBernoulli/BernoulliRegular/LValueAtOne/Defs.lean index e65342489..e45157576 100644 --- a/projects/FltRegularBernoulli/BernoulliRegular/LValueAtOne/Defs.lean +++ b/projects/FltRegularBernoulli/BernoulliRegular/LValueAtOne/Defs.lean @@ -64,7 +64,7 @@ theorem odd_LFunction_one_eq_oddLValueRhs_of_LFunction_inv_zero (Or.inr hp.out.ne_one), hχinv_odd.gammaFactor_def] simp have hfe := DirichletCharacter.IsPrimitive.completedLFunction_one_sub (χ := χ) hχ_prim (0 : ℂ) - rw [DirichletCharacter.rootNumber, if_neg hχ_odd.not_even, pow_one, + rw [DirichletCharacter.rootNumber, ite_eq_right hχ_odd.not_even, pow_one, ← mul_comm_div, ← mul_comm_div, ← Complex.cpow_sub _ _ (by exact_mod_cast hp.out.ne_zero), sub_sub, add_halves, hL0, hχ0] at hfe have hfe' : DirichletCharacter.completedLFunction χ 1 = diff --git a/projects/FltRegularBernoulli/BernoulliRegular/LValueAtOne/Even.lean b/projects/FltRegularBernoulli/BernoulliRegular/LValueAtOne/Even.lean index da64fd5da..f1e07c897 100644 --- a/projects/FltRegularBernoulli/BernoulliRegular/LValueAtOne/Even.lean +++ b/projects/FltRegularBernoulli/BernoulliRegular/LValueAtOne/Even.lean @@ -96,7 +96,7 @@ private lemma LFunction_dft_inv_eq_gaussSum_mul_LFunction {χ : DirichletCharacter ℂ p} (hχ_even : χ.Even) (hχinv_prim : (χ⁻¹).IsPrimitive) : ZMod.LFunction (ZMod.dft (fun a : ZMod p => χ⁻¹ a)) 1 = gaussSum χ⁻¹ (ZMod.stdAddChar (N := p)) * ZMod.LFunction χ 1 := by - haveI : NeZero p := ⟨hp.out.ne_zero⟩ + have : NeZero p := ⟨hp.out.ne_zero⟩ have hft : ZMod.dft (fun a : ZMod p => χ⁻¹ a) = fun a : ZMod p => gaussSum χ⁻¹ (ZMod.stdAddChar (N := p)) * χ a := by @@ -152,7 +152,7 @@ private lemma sum_mulChar_cosZeta_eq_neg_evenLValueLogSum {χ : DirichletCharacter ℂ p} (hχinv_zero : χ⁻¹ 0 = 0) : ∑ a : ZMod p, χ⁻¹ a * HurwitzZeta.cosZeta (ZMod.toAddCircle a) 1 = -evenLValueLogSum p χ := by - haveI : NeZero p := ⟨hp.out.ne_zero⟩ + have : NeZero p := ⟨hp.out.ne_zero⟩ simp only [evenLValueLogSum] calc ∑ a : ZMod p, χ⁻¹ a * HurwitzZeta.cosZeta (ZMod.toAddCircle a) 1 @@ -176,7 +176,7 @@ theorem even_LFunction_one_eq_evenLValueRhs {χ : DirichletCharacter ℂ p} (hχ_prim : χ.IsPrimitive) (hχ_even : χ.Even) (hχ_ne_one : χ ≠ 1) : DirichletCharacter.LFunction χ 1 = evenLValueRhs p χ := by - haveI : NeZero p := ⟨hp.out.ne_zero⟩ + have : NeZero p := ⟨hp.out.ne_zero⟩ change ZMod.LFunction (fun a : ZMod p => χ a) 1 = evenLValueRhs p χ have hχinv_even : (χ⁻¹).Even := by rw [DirichletCharacter.Even] at hχ_even ⊢ diff --git a/projects/HasseWeil/HasseWeil/FormalGroup/CharP.lean b/projects/HasseWeil/HasseWeil/FormalGroup/CharP.lean index f9dac12ed..b5845ada0 100644 --- a/projects/HasseWeil/HasseWeil/FormalGroup/CharP.lean +++ b/projects/HasseWeil/HasseWeil/FormalGroup/CharP.lean @@ -61,7 +61,7 @@ private theorem exists_expand_of_coeff_vanishing (p : ℕ) (hp : p ≠ 0) vanishes unless `p ∣ n` (or `n = 0`). -/ private theorem coeff_eq_zero_of_derivative_eq_zero_charP {p : ℕ} [Fact p.Prime] [CharP R p] {f : PowerSeries R} - (hf : PowerSeries.derivative R f = 0) + (hf : PowerSeries.derivative (R := R) f = 0) (n : ℕ) (hpn : ¬ p ∣ n) : PowerSeries.coeff n f = 0 := by -- `n ≠ 0` since `p ∣ 0`; write `n = m + 1`. @@ -101,7 +101,7 @@ theorem FormalGroup.mulByP_exists_expand (F : FormalGroup R) (p : ℕ) apply exists_expand_of_coeff_vanishing p hp_prime.out.ne_zero intro n hpn -- `derivative [p] = 0`, from the chain rule and `[p] = 0` in characteristic `p`. - have hder : PowerSeries.derivative R (F.mulByNatHom p).toSeries = 0 := by + have hder : PowerSeries.derivative (R := R) (F.mulByNatHom p).toSeries = 0 := by have chain := FormalGroupHom.invariantDifferential_chain (F.mulByNatHom p) have hp_zero : PowerSeries.C (PowerSeries.coeff 1 (F.mulByNatHom p).toSeries) * diff --git a/projects/HasseWeil/HasseWeil/FormalGroup/Differential.lean b/projects/HasseWeil/HasseWeil/FormalGroup/Differential.lean index 655b8afa6..7d00d2a24 100644 --- a/projects/HasseWeil/HasseWeil/FormalGroup/Differential.lean +++ b/projects/HasseWeil/HasseWeil/FormalGroup/Differential.lean @@ -193,7 +193,7 @@ private theorem coeff_subst_runit_eq (n : ℕ) · simp only [hd0, pow_zero, one_mul, MvPowerSeries.coeff_X_pow] have hne : d 1 ≠ n := fun h ↦ hd (Finsupp.ext (fun i ↦ by fin_cases i <;> simp [*, Finsupp.single_eq_same])) - rw [if_neg (fun h ↦ hne ((Finsupp.single_injective (1 : Fin 2)).eq_iff.mp h).symm)] + rw [ite_eq_right (fun h ↦ hne ((Finsupp.single_injective (1 : Fin 2)).eq_iff.mp h).symm)] · rw [zero_pow hd0, zero_mul, map_zero] -- Helper: coeff at (single 1 m) of F.toSeries equals [m = 1] (from runit: F(0,Y)=Y) @@ -234,11 +234,11 @@ private theorem coeff_one_pow {f : PowerSeries R} (hf : PowerSeries.constantCoef PowerSeries.coeff 1 (f ^ d) = if d = 1 then PowerSeries.coeff 1 f else 0 := by by_cases hd : d = 1 · simp [hd] - · rw [if_neg hd] + · rw [ite_eq_right hd] rcases d with _ | _ | d · simp only [pow_zero] show PowerSeries.coeff 1 (1 : PowerSeries R) = 0 - rw [PowerSeries.coeff_one, if_neg one_ne_zero] + rw [PowerSeries.coeff_one, ite_eq_right one_ne_zero] · omega · exact coeff_one_pow_eq_zero hf (by omega) @@ -258,12 +258,12 @@ private theorem coeff_subst_X0 (g : PowerSeries R) (a b : ℕ) : · simp [MvPowerSeries.coeff_X_pow, smul_eq_mul] · intro d hd simp only [MvPowerSeries.coeff_X_pow, smul_eq_mul] - rw [if_neg (fun h ↦ hd ((Finsupp.single_injective (0 : Fin 2)).eq_iff.mp h).symm), + rw [ite_eq_right (fun h ↦ hd ((Finsupp.single_injective (0 : Fin 2)).eq_iff.mp h).symm), mul_zero] - · rw [if_neg hb] + · rw [ite_eq_right hb] apply finsum_eq_zero_of_forall_eq_zero intro d - rw [MvPowerSeries.coeff_X_pow, if_neg] + rw [MvPowerSeries.coeff_X_pow, ite_eq_right] · exact smul_zero _ · intro h have := DFunLike.congr_fun h 1 @@ -284,12 +284,12 @@ private theorem coeff_subst_X1 (g : PowerSeries R) (a b : ℕ) : · simp [MvPowerSeries.coeff_X_pow, smul_eq_mul] · intro d hd simp only [MvPowerSeries.coeff_X_pow, smul_eq_mul] - rw [if_neg (fun h ↦ hd ((Finsupp.single_injective (1 : Fin 2)).eq_iff.mp h).symm), + rw [ite_eq_right (fun h ↦ hd ((Finsupp.single_injective (1 : Fin 2)).eq_iff.mp h).symm), mul_zero] - · rw [if_neg hab] + · rw [ite_eq_right hab] apply finsum_eq_zero_of_forall_eq_zero intro d - rw [MvPowerSeries.coeff_X_pow, if_neg] + rw [MvPowerSeries.coeff_X_pow, ite_eq_right] · exact smul_zero _ · intro h have := DFunLike.congr_fun h 0 @@ -333,7 +333,7 @@ private lemma coeff_subst_X0_X1_mul_eq_zero_of_ne (g : PowerSeries R) (d0 d1 n : from finsupp_fin2_decompose e2] rw [coeff_subst_X0, coeff_subst_X1] by_cases h1 : e1 1 = 0 - · rw [if_pos h1] + · rw [ite_eq_left h1] by_cases h2 : e2 0 = 0 · -- Both e1 1 = 0 and e2 0 = 0: forces (e1, e2) = (single 0 1, single 1 n) exfalso; apply hne @@ -348,8 +348,8 @@ private lemma coeff_subst_X0_X1_mul_eq_zero_of_ne (g : PowerSeries R) (d0 d1 n : rw [finsupp_fin2_decompose e1, h1, he10]; simp · show e2 = Finsupp.single 1 n rw [finsupp_fin2_decompose e2, h2, he21]; simp - · rw [if_neg h2, mul_zero] - · rw [if_neg h1, zero_mul] + · rw [ite_eq_right h2, mul_zero] + · rw [ite_eq_right h1, zero_mul] -- Orthogonality: coeff_{(1,n)} (f(X_0)^d0 * f(X_1)^d1) = coeff_1(f^d0) * coeff_n(f^d1) private theorem coeff_10_prod_orthogonal (g : PowerSeries R) (d0 d1 n : ℕ) : @@ -424,15 +424,15 @@ private lemma finsum_fin2_reduce_full (p : (Fin 2 →₀ ℕ) → R) : Set.indicator (Set.range ι) (fun d ↦ if d 0 = 1 then p d else 0) d := by intro d; classical rw [Set.indicator_apply] by_cases hd : d ∈ Set.range ι - · rw [if_pos hd] - · rw [if_neg hd, if_neg (mt (hmem d).mpr hd)] + · rw [ite_eq_left hd] + · rw [ite_eq_right hd, ite_eq_right (mt (hmem d).mpr hd)] conv_lhs => arg 1; ext d; rw [key d] rw [← finsum_mem_def, ← finsum_subtype_eq_finsum_cond (· ∈ Set.range ι), ← finsum_comp_equiv (Equiv.ofInjective ι hinj)] congr 1; ext k show (if (ι k : Fin 2 →₀ ℕ) 0 = 1 then p (ι k) else 0) = p (Finsupp.single 0 1 + Finsupp.single 1 k) - rw [if_pos (hι0 k)] + rw [ite_eq_left (hι0 k)] -- Helper: c * finsum f = finsum (c * f ·) when f has finite support. private lemma mul_finsum_of_support_subset {α : Type*} (c : R) (f : α → R) @@ -503,11 +503,11 @@ private theorem antidiag_term_vanish (F : FormalGroup R) (d n : ℕ) rcases Nat.eq_zero_or_pos (e1 0) with he10 | he10 · have he1eq : e1 = Finsupp.single 1 (e1 1) := Finsupp.ext fun i ↦ by fin_cases i <;> simp_all [Finsupp.single_eq_same] - rw [he1eq, coeff_single1_F, if_neg (fun h ↦ hA ⟨he10, h⟩), zero_mul] + rw [he1eq, coeff_single1_F, ite_eq_right (fun h ↦ hA ⟨he10, h⟩), zero_mul] · have he20 : e2 0 = 0 := by omega have he2eq : e2 = Finsupp.single 1 (e2 1) := Finsupp.ext fun i ↦ by fin_cases i <;> simp_all [Finsupp.single_eq_same] - rw [he2eq, coeff_runit_pow, if_neg (fun h ↦ hB ⟨by omega, h⟩), mul_zero] + rw [he2eq, coeff_runit_pow, ite_eq_right (fun h ↦ hB ⟨by omega, h⟩), mul_zero] -- Sub-lemma: the antidiagonal sum for `coeff_{(1,n)} (F^d * F)` collapses to the two -- surviving terms — pair A `(single 1 1, single 0 1 + single 1 (n-1))` and pair B @@ -661,9 +661,9 @@ private theorem coeff_10_FG_pow (F : FormalGroup R) : induction d with | zero => intro n - simp only [pow_zero, Nat.zero_le, le_add_iff_nonneg_left, if_true, + simp only [pow_zero, Nat.zero_le, le_add_iff_nonneg_left, ite_true, Nat.cast_zero, zero_mul, MvPowerSeries.coeff_one] - rw [if_neg]; intro h + rw [ite_eq_right]; intro h exact absurd (DFunLike.congr_fun h 0) (by simp [Finsupp.add_apply, Finsupp.single_eq_same]) | succ d ih => @@ -671,7 +671,7 @@ private theorem coeff_10_FG_pow (F : FormalGroup R) : -- For d+1 > n+1, use direct vanishing from nilpotent coefficient by_cases hdn : d + 1 ≤ n + 1 · -- d + 1 ≤ n + 1, i.e., d ≤ n - rw [if_pos hdn] + rw [ite_eq_left hdn] have hdn' : d ≤ n := by omega rw [pow_succ, mul_comm, MvPowerSeries.coeff_mul] -- The antidiag sum: Σ coeff_e1(F) * coeff_e2(F^d) @@ -703,7 +703,7 @@ private theorem coeff_10_FG_pow (F : FormalGroup R) : (Finsupp.single (0 : Fin 2) 1 + Finsupp.single (1 : Fin 2) (n - 1)) (F.toSeries ^ d) = (d : R) * PowerSeries.coeff (n - d) F.dX_at_zero := by - rw [coeff_single1_F, if_pos rfl, one_mul, ih, if_pos (by omega : d ≤ n - 1 + 1)] + rw [coeff_single1_F, ite_eq_left rfl, one_mul, ih, ite_eq_left (by omega : d ≤ n - 1 + 1)] have : n - 1 + 1 - d = n - d := by omega rw [this] -- Compute pair B value @@ -713,7 +713,7 @@ private theorem coeff_10_FG_pow (F : FormalGroup R) : F.toSeries * MvPowerSeries.coeff (Finsupp.single (1 : Fin 2) d) (F.toSeries ^ d) = PowerSeries.coeff (n - d) F.dX_at_zero := by - rw [coeff_runit_pow, if_pos rfl, mul_one, FormalGroup.dX_at_zero, + rw [coeff_runit_pow, ite_eq_left rfl, mul_one, FormalGroup.dX_at_zero, PowerSeries.coeff_mk] -- The sum = A_val + B_val = (d+1) * coeff_{n-d} dxF -- (the split into the two surviving terms is `coeff_10_FG_pow_antidiag_split`) @@ -725,7 +725,7 @@ private theorem coeff_10_FG_pow (F : FormalGroup R) : · -- A_val + B_val = (d+1) * coeff_{n+1-(d+1)} dxF rw [show n + 1 - (d + 1) = n - d from by omega]; push_cast; ring · -- d + 1 > n + 1: coeff vanishes by nilpotent degree bound - rw [if_neg hdn] + rw [ite_eq_right hdn] exact coeff_10_FG_pow_succ_vanish F hdn /-- The explicit `Finset` sum that both sides of `coeff_10_lhs` reduce to: @@ -770,7 +770,7 @@ private theorem coeff_10_subst_eq_sum (F G : FormalGroup R) (f : FormalGroupHom rw [Function.mem_support, ne_eq] at hd rw [Finset.mem_coe, Finset.mem_range] by_contra h; push Not at h - exact hd (if_neg (by omega : ¬(d ≤ n + 1))))] + exact hd (ite_eq_right (by omega : ¬(d ≤ n + 1))))] -- Kill the d = 0 term (it contributes 0 since d = 0 gives 0 * ... = 0) rw [Finset.sum_range_succ' (n := n + 1)] simp only [Nat.cast_zero, zero_mul, Nat.sub_zero, le_add_iff_nonneg_left, @@ -784,7 +784,7 @@ private theorem coeff_10_subst_eq_sum (F G : FormalGroup R) (f : FormalGroupHom (↑(k + 1) : R) * PowerSeries.coeff (k + 1) f.toSeries * PowerSeries.coeff (n - k) F.dX_at_zero := by intro k hk; rw [Finset.mem_range] at hk - rw [if_pos (by omega : k + 1 ≤ n + 1)] + rw [ite_eq_left (by omega : k + 1 ≤ n + 1)] have : n + 1 - (k + 1) = n - k := by omega rw [this] rw [Finset.sum_congr rfl hsimp] @@ -795,7 +795,7 @@ unfolds (via `coeff_mul` and `coeff_derivative`) to the explicit range sum bijection `k ↦ (k, n - k)`. -/ private theorem coeff_derivative_mul_dX_eq_sum (F G : FormalGroup R) (f : FormalGroupHom F G) (n : ℕ) : - PowerSeries.coeff n (PowerSeries.derivative R f.toSeries * F.dX_at_zero) = + PowerSeries.coeff n (PowerSeries.derivative (R := R) f.toSeries * F.dX_at_zero) = coeff_10_sum F G f n := by rw [coeff_10_sum] -- Expand the RHS via `coeff_mul` and `coeff_derivative`, then match the range sum against @@ -824,11 +824,11 @@ private theorem coeff_derivative_mul_dX_eq_sum (F G : FormalGroup R) private theorem coeff_10_lhs (F G : FormalGroup R) (f : FormalGroupHom F G) (n : ℕ) : MvPowerSeries.coeff (Finsupp.single (0 : Fin 2) 1 + Finsupp.single (1 : Fin 2) n) (PowerSeries.subst F.toSeries f.toSeries) = - PowerSeries.coeff n (PowerSeries.derivative R f.toSeries * F.dX_at_zero) := + PowerSeries.coeff n (PowerSeries.derivative (R := R) f.toSeries * F.dX_at_zero) := (coeff_10_subst_eq_sum F G f n).trans (coeff_derivative_mul_dX_eq_sum F G f n).symm theorem FormalGroup.dX_at_zero_chain (f : FormalGroupHom F G) : - (PowerSeries.derivative R f.toSeries) * F.dX_at_zero = + (PowerSeries.derivative (R := R) f.toSeries) * F.dX_at_zero = PowerSeries.C (PowerSeries.coeff 1 f.toSeries) * PowerSeries.subst f.toSeries G.dX_at_zero := by ext n @@ -882,14 +882,14 @@ invariant differential. Reference: Silverman, *The Arithmetic of Elliptic Curves*, IV.4, Corollary 4.3. -/ theorem FormalGroup.invariantDiff_chain (f : FormalGroupHom F G) : PowerSeries.subst f.toSeries G.invariantDiff * - (PowerSeries.derivative R f.toSeries) = + (PowerSeries.derivative (R := R) f.toSeries) = PowerSeries.C (PowerSeries.coeff 1 f.toSeries) * F.invariantDiff := by -- Set up abbreviations to ensure all terms are in PowerSeries R, avoiding -- MvPowerSeries Unit R / PowerSeries R defeq issues with rw/simp. set c₁ : PowerSeries R := PowerSeries.C (PowerSeries.coeff 1 f.toSeries) set ωG' : PowerSeries R := PowerSeries.subst f.toSeries G.invariantDiff set dG' : PowerSeries R := PowerSeries.subst f.toSeries G.dX_at_zero - set f' : PowerSeries R := PowerSeries.derivative R f.toSeries + set f' : PowerSeries R := PowerSeries.derivative (R := R) f.toSeries set ωF : PowerSeries R := F.invariantDiff set dF : PowerSeries R := F.dX_at_zero -- Two ingredients: the `dX_at_zero` chain identity `f' * dF = c₁ * dG'` and the @@ -1207,7 +1207,7 @@ private lemma coeff_prod_subst_vec_zero_X0 (d e : Fin 2 →₀ ℕ) : simp only [Matrix.cons_val_zero, Matrix.cons_val_one, Matrix.cons_val_zero] by_cases hd0 : d 0 = 0 · simp [hd0] - · rw [zero_pow hd0, zero_mul, map_zero, if_neg hd0] + · rw [zero_pow hd0, zero_mul, map_zero, ite_eq_right hd0] /-- Reindexing: a finsum over `d : Fin 2 →₀ ℕ` of a term that vanishes unless `d 0 = 0` collapses to a finsum over `n : ℕ` along `n ↦ Finsupp.single 1 n`, the @@ -1434,4 +1434,4 @@ theorem invariantDiff_translation (F : FormalGroup R) : end FormalGroup -end HasseWeil.FormalGroup \ No newline at end of file +end HasseWeil.FormalGroup diff --git a/projects/HasseWeil/HasseWeil/FormalGroup/EvalGroup.lean b/projects/HasseWeil/HasseWeil/FormalGroup/EvalGroup.lean index 5d7732dc9..9c4831e16 100644 --- a/projects/HasseWeil/HasseWeil/FormalGroup/EvalGroup.lean +++ b/projects/HasseWeil/HasseWeil/FormalGroup/EvalGroup.lean @@ -9,49 +9,6 @@ import Mathlib.Algebra.Group.MinimalAxioms import Mathlib.RingTheory.AdicCompletion.Topology import Mathlib.RingTheory.PowerSeries.Evaluation -/-! -# The group `F(M)` associated to a formal group over a complete local ring -# (Silverman IV.3, ticket T-IV-3-001) - -Let `R` be a commutative local ring with maximal ideal `M = IsLocalRing.maximalIdeal R`, -equipped with the `M`-adic topology (so that it is both a topological ring with -a linear topology, a uniform ring, etc.), and assume moreover that it is -`M`-adically complete (so `R` is Hausdorff and complete for this topology). - -For a formal group law `F(X, Y) ∈ R[[X, Y]]`, the set `M` acquires a structure of -an abelian group via - `x +_F y := F(x, y) = MvPowerSeries.eval₂ (RingHom.id R) ![x, y] F.toSeries`. - -The convergence of the power series `F(x, y)` is guaranteed by `x, y ∈ M` (they are -topologically nilpotent, as `M^n → 0` in the adic topology) and by completeness. - -## Main definitions - -* `HasseWeil.FormalGroup.FormalGroup.evalAdd F x y` — the binary operation - `x +_F y` on `M`, returning an element of `R`. -* `HasseWeil.FormalGroup.FormalGroup.evalAdd_mem F x y` — the operation is closed - in `M`, i.e. `evalAdd F x y ∈ M`. -* `HasseWeil.FormalGroup.FormalGroup.evalNeg F x` — the formal negation - `-_F x := i(x)` for `x ∈ M`, where `i = F.inverse` is the formal inverse - power series. -* `HasseWeil.FormalGroup.FormalGroup.evalNeg_mem F x` — the negation is closed - in `M`, i.e. `evalNeg F x ∈ M`. - -The formal-group axioms induce the group laws for `evalAdd`; the resulting -operation and `evalNeg` are bundled as an `AddCommGroup` on `F.EvalGroup hAdic`. -The substitution bridge used for associativity and inverses is proved for the -`M`-adic uniformity, where `MvPowerSeries.eval₂_subst` does not apply directly. - -## Assumptions on `R` - -We require `R` to be a `CommRing`, `IsLocalRing`, equipped with topology and uniform -space structure coming from the `M`-adic topology, and `M`-adically complete. - -## References - -* [Silverman, *The Arithmetic of Elliptic Curves*], IV.3 (Definition of the group - `F(M)`, p. 122). --/ set_option linter.dupNamespace false @@ -127,10 +84,8 @@ noncomputable def FormalGroup.evalAdd (F : FormalGroup R) /-! ### Closure under `+_F`: `evalAdd F x y ∈ M` -/ omit [IsUniformAddGroup R] [IsLinearTopology R R] [T2Space R] [CompleteSpace R] in -/-- The maximal ideal is closed in the `M`-adic topology. -`M` is open (as the basis of neighborhoods of 0 at level 1, i.e. `M^1 = M`), -hence closed. -/ + lemma maximalIdeal_isClosed (hAdic : IsAdic (IsLocalRing.maximalIdeal R)) : IsClosed (IsLocalRing.maximalIdeal R : Set R) := by @@ -296,7 +251,7 @@ private lemma coeff_swap_diag (d : Fin 2 →₀ ℕ) : ((MvPowerSeries.X (1 : Fin 2) : MvPowerSeries (Fin 2) R) ^ ((finsupp_swap d) 0) * (MvPowerSeries.X 0) ^ ((finsupp_swap d) 1)) = 1 := by rw [coeff_X_one_pow_mul_X_zero_pow, finsupp_swap_apply_zero, finsupp_swap_apply_one, - if_pos] + ite_eq_left] ext i; fin_cases i <;> simp omit [IsLocalRing R] [UniformSpace R] [IsUniformAddGroup R] [IsTopologicalRing R] @@ -450,7 +405,7 @@ private lemma coeff_single_X_pow_mul_zero_pow_of_ne rw [show ((MvPowerSeries.X (0 : Fin 2) : MvPowerSeries (Fin 2) R) ^ (d 0)) = MvPowerSeries.monomial (R := R) (Finsupp.single 0 (d 0)) 1 from by rw [MvPowerSeries.X_pow_eq]] - rw [MvPowerSeries.coeff_monomial, if_neg] + rw [MvPowerSeries.coeff_monomial, ite_eq_right] intro heq apply hdj have := DFunLike.congr_fun heq 0 @@ -528,9 +483,9 @@ private lemma evalAdd_zero_right_term_eq (F : FormalGroup R) rw [hd_single, HasseWeil.FG.FormalGroup.coeff_10] rw [show (Finsupp.single (0 : Fin 2) 1) 0 = 1 from by simp] - rw [pow_one, one_mul, if_pos rfl] + rw [pow_one, one_mul, ite_eq_left rfl] · - rw [hdeq, F.coeff_j0_of_ne_one (d 0) hd0, zero_mul, if_neg] + rw [hdeq, F.coeff_j0_of_ne_one (d 0) hd0, zero_mul, ite_eq_right] intro hcontra apply hd0 have := DFunLike.congr_fun hcontra 0 @@ -538,7 +493,7 @@ private lemma evalAdd_zero_right_term_eq (F : FormalGroup R) · rw [Finsupp.prod_fintype _ _ (fun i ↦ pow_zero _), Fin.prod_univ_two, Matrix.cons_val_zero, Matrix.cons_val_one, Matrix.cons_val_zero, - zero_pow hd1, mul_zero, mul_zero, if_neg] + zero_pow hd1, mul_zero, mul_zero, ite_eq_right] intro hcontra apply hd1 have := DFunLike.congr_fun hcontra 1 @@ -585,7 +540,7 @@ private lemma coeff_single_zero_pow_mul_X_pow_of_ne rw [show ((MvPowerSeries.X (1 : Fin 2) : MvPowerSeries (Fin 2) R) ^ (d 1)) = MvPowerSeries.monomial (R := R) (Finsupp.single 1 (d 1)) 1 from by rw [MvPowerSeries.X_pow_eq]] - rw [MvPowerSeries.coeff_monomial, if_neg] + rw [MvPowerSeries.coeff_monomial, ite_eq_right] intro heq apply hdj have := DFunLike.congr_fun heq 1 diff --git a/projects/HasseWeil/HasseWeil/FormalGroup/FormalGroup.lean b/projects/HasseWeil/HasseWeil/FormalGroup/FormalGroup.lean index 2febf6bff..953c00c2d 100644 --- a/projects/HasseWeil/HasseWeil/FormalGroup/FormalGroup.lean +++ b/projects/HasseWeil/HasseWeil/FormalGroup/FormalGroup.lean @@ -197,16 +197,16 @@ theorem conv₂_truncate (n : ℕ) : (if n - i < n then formalW_coeff W (n - i) else 0) = formalW_coeff W i * formalW_coeff W (n - i) rcases lt_or_eq_of_le hi with h_lt | h_eq - · rw [if_pos h_lt] + · rw [ite_eq_left h_lt] by_cases h_ni : n - i < n - · rw [if_pos h_ni] + · rw [ite_eq_left h_ni] · have h_i_eq_zero : i = 0 := by omega subst h_i_eq_zero - rw [if_neg h_ni] + rw [ite_eq_right h_ni] rw [show formalW_coeff W 0 = 0 from formalW_coeff_zero W] ring · subst h_eq - rw [if_neg (by omega : ¬ (i < i))] + rw [ite_eq_right (by omega : ¬ (i < i))] rw [show i - i = 0 from Nat.sub_self i] rw [show formalW_coeff W 0 = 0 from formalW_coeff_zero W] ring @@ -223,9 +223,9 @@ theorem conv₂_truncate' (n : ℕ) (hn : 1 ≤ n) : (if n - 1 - i < n then formalW_coeff W (n - 1 - i) else 0) = formalW_coeff W i * formalW_coeff W (n - 1 - i) have h_i_lt_n : i < n := by omega - rw [if_pos h_i_lt_n] + rw [ite_eq_left h_i_lt_n] have h_ni_lt_n : n - 1 - i < n := by omega - rw [if_pos h_ni_lt_n] + rw [ite_eq_left h_ni_lt_n] /-- `coeff n (formalW W * formalW W) = conv₂ (formalW_coeff W) n`. -/ theorem coeff_formalW_sq (n : ℕ) : @@ -287,19 +287,19 @@ private theorem conv₃_truncate_term {n i j : ℕ} (hi : i ≤ n) (hj : j ≤ n (if n - i - j < n then formalW_coeff W (n - i - j) else 0) = formalW_coeff W i * formalW_coeff W j * formalW_coeff W (n - i - j) := by rcases lt_or_eq_of_le hi with h_i_lt | h_i_eq - · rw [if_pos h_i_lt] + · rw [ite_eq_left h_i_lt] rcases lt_or_eq_of_le hj with h_j_lt | h_j_eq · -- j ≤ n - i and j < n - i, so j < n have h_j_lt_n : j < n := by omega - rw [if_pos h_j_lt_n] + rw [ite_eq_left h_j_lt_n] by_cases h_k_lt_n : n - i - j < n - · rw [if_pos h_k_lt_n] + · rw [ite_eq_left h_k_lt_n] · -- n - i - j ≥ n means i + j = 0 have h_i_eq_zero : i = 0 := by omega have h_j_eq_zero : j = 0 := by omega subst h_i_eq_zero subst h_j_eq_zero - rw [if_neg h_k_lt_n] + rw [ite_eq_right h_k_lt_n] rw [show formalW_coeff W 0 = 0 from formalW_coeff_zero W] ring · -- j = n - i @@ -313,7 +313,7 @@ private theorem conv₃_truncate_term {n i j : ℕ} (hi : i ≤ n) (hj : j ≤ n -- j ≤ n - n = 0, so j = 0 have h_j_eq_zero : j = 0 := by omega subst h_j_eq_zero - rw [if_neg (by omega : ¬ (i < i))] + rw [ite_eq_right (by omega : ¬ (i < i))] rw [show formalW_coeff W 0 = 0 from formalW_coeff_zero W] ring @@ -389,7 +389,7 @@ private theorem formalW_step_eq_recurrence_rhs_of_lt_three (n : ℕ) (hn3 : n < unfold formalW_step dsimp only simp only [dite_eq_ite] - rw [if_pos hn3, if_neg (by omega : ¬ (n = 3))] + rw [ite_eq_left hn3, ite_eq_right (by omega : ¬ (n = 3))] interval_cases n all_goals simp [conv₂, conv₃, formalW_coeff_zero, formalW_coeff_one, formalW_coeff_two, @@ -408,11 +408,11 @@ private theorem formalW_step_eq_recurrence_rhs_three (n : ℕ) (hn_eq3 : n = 3) unfold formalW_step dsimp only simp only [dite_eq_ite] - rw [if_neg (by omega : ¬ (n < 3)), if_pos hn_eq3] + rw [ite_eq_right (by omega : ¬ (n < 3)), ite_eq_left hn_eq3] subst hn_eq3 simp only [] - rw [if_pos (by norm_num : (1 : ℕ) ≤ 3), if_pos (by norm_num : (2 : ℕ) ≤ 3), - if_pos (by norm_num : (1 : ℕ) ≤ 3)] + rw [ite_eq_left (by norm_num : (1 : ℕ) ≤ 3), ite_eq_left (by norm_num : (2 : ℕ) ≤ 3), + ite_eq_left (by norm_num : (1 : ℕ) ≤ 3)] rw [show formalW_coeff W (3 - 1) = formalW_coeff W 2 from by norm_num, show formalW_coeff W (3 - 2) = formalW_coeff W 1 from by norm_num, formalW_coeff_one W, formalW_coeff_two W] @@ -434,17 +434,17 @@ private theorem formalW_step_eq_recurrence_rhs_of_four_le (n : ℕ) (hn4 : 4 ≤ dsimp only simp only [dite_eq_ite] -- Clear the step's `n < 3` / `n = 3` guards (LHS) and the `n = 3` term on the RHS. - rw [if_neg (by omega : ¬ (n < 3)), if_neg (by omega : ¬ (n = 3)), - if_neg (by omega : ¬ (n = 3))] - rw [if_pos (show 1 ≤ n from by omega), if_pos (show 2 ≤ n from by omega), - if_pos (show 1 ≤ n from by omega)] + rw [ite_eq_right (by omega : ¬ (n < 3)), ite_eq_right (by omega : ¬ (n = 3)), + ite_eq_right (by omega : ¬ (n = 3))] + rw [ite_eq_left (show 1 ≤ n from by omega), ite_eq_left (show 2 ≤ n from by omega), + ite_eq_left (show 1 ≤ n from by omega)] -- Use conv₂_truncate, conv₃_truncate for the LHS rw [conv₂_truncate W n, conv₂_truncate' W n (by omega), conv₃_truncate W n] -- The truncated w(n-1) and w(n-2) become formalW_coeff (already beta-reduced) rw [show (if n - 1 < n then formalW_coeff W (n - 1) else 0) = formalW_coeff W (n - 1) from - if_pos (by omega)] + ite_eq_left (by omega)] rw [show (if n - 2 < n then formalW_coeff W (n - 2) else 0) = formalW_coeff W (n - 2) from - if_pos (by omega)] + ite_eq_left (by omega)] ring /-- The `formalW_step` recursion equals the recurrence right-hand side from @@ -491,23 +491,5 @@ theorem formalW_recurrence : formalW_coeff_eq_step W n] exact formalW_step_eq_recurrence_rhs W n -/-! ### Uniqueness of `formalW` (Silverman IV.1.1(b)) - -Uniqueness of `formalW` follows the factoring pattern: if `d := w' - formalW W`, -then `d = K · d` for some `K` with zero constant coefficient, hence `d = 0` -by `PowerSeries.eq_zero_of_self_eq_mul_self` -(see `HasseWeil/PowerSeriesHelpers.lean`). - -**Status**: infrastructure ready (`eq_zero_of_self_eq_mul_self`), but the -factoring step `RHS(w') − RHS(formalW W) = K · d` cannot be established by -`ring`/`linear_combination`/`abel` because of a `PowerSeries R` typeclass -gap: `RightDistribClass (PowerSeries R)` and `IsRightCancelAdd (PowerSeries R)` -fail to synthesize in Lean 4.29 / mathlib v4.29.0-rc6, blocking the ring -tactic on distributivity-heavy identities. The factoring works on simple -identities in isolation but stops mid-normalisation on the multi-term -combination needed here. A coefficient-induction route (via -`PowerSeries.ext` and strong induction on `n`, using `coeff_mul`) avoids -the ring issue and is the recommended next step. --/ end HasseWeil diff --git a/projects/HasseWeil/HasseWeil/FormalGroup/FormalGroupAssoc.lean b/projects/HasseWeil/HasseWeil/FormalGroup/FormalGroupAssoc.lean index b2a59710e..f835d413b 100644 --- a/projects/HasseWeil/HasseWeil/FormalGroup/FormalGroupAssoc.lean +++ b/projects/HasseWeil/HasseWeil/FormalGroup/FormalGroupAssoc.lean @@ -122,7 +122,7 @@ theorem formalGroupLaw_coeff_right_unit (n : ℕ) : -- d 0 = n, d 1 = 0, so the definition enters the "j = 0" branch -- and returns "if i = 1 then 1 else 0" = "if n = 1 then 1 else 0". simp only [formalGroupLaw_coeff] - simp only [Finsupp.single_apply, if_true, if_false, show (0 : Fin 2) ≠ 1 from by decide] + simp only [Finsupp.single_apply, ite_true, ite_false, show (0 : Fin 2) ≠ 1 from by decide] split_ifs <;> simp_all /-- `F(0, Y) = Y`: coefficient `F_{0,n} = [n=1]`. -/ @@ -130,7 +130,7 @@ theorem formalGroupLaw_coeff_left_unit (n : ℕ) : formalGroupLaw_coeff W (Finsupp.single 1 n) = if n = 1 then 1 else 0 := by simp only [formalGroupLaw_coeff] - simp only [Finsupp.single_apply, if_true, if_false, show (1 : Fin 2) ≠ 0 from by decide] + simp only [Finsupp.single_apply, ite_true, ite_false, show (1 : Fin 2) ≠ 0 from by decide] /-! ### The ring homomorphism property of the pullback coefficient (Silverman III.5.6) -/ diff --git a/projects/HasseWeil/HasseWeil/FormalGroup/FormalGroupCorrespondence.lean b/projects/HasseWeil/HasseWeil/FormalGroup/FormalGroupCorrespondence.lean index c3196d467..960671107 100644 --- a/projects/HasseWeil/HasseWeil/FormalGroup/FormalGroupCorrespondence.lean +++ b/projects/HasseWeil/HasseWeil/FormalGroup/FormalGroupCorrespondence.lean @@ -5,41 +5,6 @@ import Mathlib.RingTheory.Kaehler.Basic import Mathlib.LinearAlgebra.Dimension.FreeAndStrongRankCondition import Mathlib.LinearAlgebra.Basis.VectorSpace -/-! -# Formal Group ↔ Curve Correspondence (Silverman IV.1–2, IV.4) - -This file establishes the connection between the formal group of an elliptic curve -and the curve's group law. The key results: - -1. **Local parameter**: z = -x/y is a local uniformizer at O (Silverman IV.1). -2. **w(z)**: The power series solving w = f(z,w) (already in FormalGroup.lean). -3. **Formal group law**: z(P+Q) = F(z(P), z(Q)) where F is the formal group law. -4. **Pullback coefficient**: For [m], the formal group series has linear coefficient m. - -## The Key Connection (Silverman IV.4) - -For an endomorphism φ of E, the pullback coefficient a_φ is defined by: - φ*ω = a_φ · ω -where ω = dx/(2y+a₁x+a₃) is the invariant differential. - -Equivalently (via the formal group): φ induces a power series φ_F(T) = a_φ T + O(T²), -and a_φ is the linear coefficient. - -The map φ ↦ a_φ is a ring homomorphism End(E) → K̄ (Silverman Cor. III.5.6). - -## Kähler Module is 1-Dimensional (Silverman III.1.5) - -For an elliptic curve E/K (genus 1), the space Ω_{K(E)/K} of differentials is -1-dimensional over K(E). This means every differential η can be written as c·ω -for a unique c ∈ K(E). - -This follows from the Riemann-Roch theorem (genus = dim Ω) applied to the -function field K(E) of transcendence degree 1 over K. - -## References - -* Silverman, *The Arithmetic of Elliptic Curves*, III.1.5, III.5, IV.1–4 --/ open WeierstrassCurve @@ -286,13 +251,12 @@ private lemma span_invariantDifferential_eq_top : (Set.singleton_subset_iff.mpr (D_coordXFF_mem_span_invariantDifferential E)) (D_mem_derivSpanX E f) --- The Kähler differential module Ω[K(E)/F] is generated by dx/(2y+a₁x+a₃) --- as a K(E)-module. Every element η ∈ Ω is of the form c · ω for some c ∈ K(E). + -- This follows from E having genus 1: by Riemann-Roch, dim_K(E) Ω = g = 1. -- Reference: Silverman III.1.5, Prop. II.4.2(a). theorem kaehler_rank_one : Module.finrank E.FunctionField (KaehlerDifferential F E.FunctionField) = 1 := by - haveI : Module.Free E.FunctionField (KaehlerDifferential F E.FunctionField) := + have : Module.Free E.FunctionField (KaehlerDifferential F E.FunctionField) := Module.Free.of_divisionRing _ _ rw [finrank_eq_one_iff'] refine ⟨invariantDifferential E, invariantDifferential_ne_zero E, fun w ↦ ?_⟩ @@ -309,6 +273,7 @@ section MulByMFormal variable (W : WeierstrassCurve F) [W.toAffine.IsElliptic] +omit [DecidableEq F] [WeierstrassCurve.IsElliptic W.toAffine] in /-- The formal group power series [m]_F(T) = m·T + O(T²) for the multiplication by m map. The linear coefficient is m. @@ -321,6 +286,7 @@ theorem formalMulByInt_linear_coeff (m : ℤ) : formalMulByInt_coeff W.toAffine m 1 = (m : F) := by simp only [formalMulByInt_coeff, one_ne_zero, ↓reduceIte] +omit [DecidableEq F] [WeierstrassCurve.IsElliptic W.toAffine] in /-- The multiplication-by-m on the formal group starts with 0 (no constant term). -/ theorem formalMulByInt_const_zero (m : ℤ) : formalMulByInt_coeff W.toAffine m 0 = 0 := by @@ -352,6 +318,7 @@ section Correspondence variable (W : WeierstrassCurve F) [W.toAffine.IsElliptic] +omit [DecidableEq F] [WeierstrassCurve.IsElliptic W.toAffine] in /-- The formal group ↔ curve correspondence for the pullback coefficient. For the multiplication-by-m endomorphism [m]: diff --git a/projects/HasseWeil/HasseWeil/FormalGroup/FormalGroupLawSpec.lean b/projects/HasseWeil/HasseWeil/FormalGroup/FormalGroupLawSpec.lean index b652da19cfba4c065baf926dcd4db03ff6447aa1..e63da5ebe93847d80c49394dc1eddf0cefbfaea9 100644 GIT binary patch delta 1896 zcmZ3rm~~wz>x9pnrMNmcxJy#wQw!sZGSf3kHZK=i$;br}$Vp8rnXVwkD6%?M78D zyZLJAV|FC5&3kLb7*X`>t(DpQrEVItG_to6lTbW1d3KYPEOIi;KvDn+{bx-xIX5Tu zm9nB3erK`=lI4>%r({bZTVsrB%aSRT_DIr*L<HQ3;uQ@uDKK?#bUTYNPPgFFBy5my}{uPj0Tbv>cY?puvy=R{_dPoAs~# zvEI%n!YFTmWbt+*7seY*(4-30hX`PhzU@-(jK)kl#6|%~%k&IS#%s33>cEIJun{R< zjJ}i^vHiLiBR``b+0KBv3z2rf?uzwgltPY~>1IBRfwZs$DUzmN_hAgBg&oKq* simp [h0, h1] - rw [if_neg this, smul_zero])] + rw [ite_eq_right this, smul_zero])] -- Eval at d = Finsupp.single 1 1: d 0 = 0, d 1 = 1. have hd01 : (Finsupp.single (1 : Fin 2) 1) 0 = 0 := by simp have hd11 : (Finsupp.single (1 : Fin 2) 1) 1 = 1 := by simp - rw [hd01, hd11, if_pos ⟨rfl, rfl⟩] + rw [hd01, hd11, ite_eq_left ⟨rfl, rfl⟩] -- coeff (Finsupp.single 1 1) F.toSeries = 1 by the right-unit axiom. rw [HasseWeil.FG.FormalGroup.coeff_01, one_smul] @@ -460,7 +423,7 @@ private theorem support_finite_coeff_smul_indicator apply hne ext i fin_cases i <;> simp [h0, h1] - rw [if_neg this, smul_zero] + rw [ite_eq_right this, smul_zero] /-- The map `d ↦ coeff d F • coeff k (X^(d 0) * g^(d 1))` has finite support; this is the support of the `![X, g]`-substitution coefficient finsum, finite by diff --git a/projects/HasseWeil/HasseWeil/FormalGroup/Logarithm.lean b/projects/HasseWeil/HasseWeil/FormalGroup/Logarithm.lean index 401695b65..199e735cd 100644 --- a/projects/HasseWeil/HasseWeil/FormalGroup/Logarithm.lean +++ b/projects/HasseWeil/HasseWeil/FormalGroup/Logarithm.lean @@ -6,33 +6,6 @@ Authors: Chris Birkbeck import HasseWeil.FormalGroup.InvariantDiff import Mathlib.Algebra.Module.Rat -/-! -# The formal logarithm of a formal group (Silverman IV.5) - -For a formal group `F` over a `ℚ`-algebra `R` (or more generally a ring with a -`Module ℚ R` structure), the **formal logarithm** - -`log_F(T) := ∫₀^T ω_F(s) ds = T + (c₁/2) T² + (c₂/3) T³ + ⋯` - -is the integral of the normalized invariant differential -`ω_F(T) = 1 + c₁T + c₂T² + ⋯`. It is a power series with -constant term `0` and linear coefficient `1`. - -## Main definition - -* `HasseWeil.FormalGroup.FormalGroup.log F` — the formal logarithm of `F`, - defined over any commutative ring `R` equipped with a `ℚ`-module structure. - -## Main results - -* `FormalGroup.log_coeff_zero` — `constantCoeff (log F) = 0`. -* `FormalGroup.log_coeff_succ` — `coeff (n + 1) (log F) = (1/(n+1)) • coeff n ω_F`. -* `FormalGroup.log_coeff_one` — `coeff 1 (log F) = 1`. - -## References - -* [Silverman, *The Arithmetic of Elliptic Curves*], IV.5. --/ set_option linter.dupNamespace false @@ -40,16 +13,7 @@ namespace HasseWeil.FormalGroup variable {R : Type*} [CommRing R] -/-- The **formal logarithm** of a formal group `F` over a ring `R` with a -`Module ℚ R` structure. - -Concretely, if `ω_F(T) = 1 + c₁T + c₂T² + ⋯`, then -`log_F(T) = T + (c₁/2)T² + (c₂/3)T³ + ⋯ = ∑ (c_{n-1}/n)·T^n`. -The coefficient at `T^n` for `n ≥ 1` is the ℚ-scalar multiple -`((n : ℚ)⁻¹) • (coeff of ω_F at n - 1)`. - -Reference: Silverman, *The Arithmetic of Elliptic Curves*, IV.5. -/ noncomputable def FormalGroup.log (F : FormalGroup R) [Module ℚ R] : PowerSeries R := PowerSeries.mk fun n ↦ @@ -91,24 +55,6 @@ theorem FormalGroup.log_coeff_one (F : FormalGroup R) [Module ℚ R] : rw [PowerSeries.coeff_zero_eq_constantCoeff_apply] exact F.normalizedDifferential_isNormalized -/-! ### The formal exponential - -We construct `exp_F` as the compositional inverse of `log_F` via an iterative -truncation argument. - -Let `f : PowerSeries R` with `coeff 0 f = 0` and `coeff 1 f = 1` -(e.g., `f = log_F`). We build the compositional inverse `g` incrementally: - -* `compInvTrunc f 0 = 0`. -* `compInvTrunc f (n+1) = compInvTrunc f n + c · T^(n+1)` where the correction - `c` is chosen so that `coeff (n+1) (f ∘ compInvTrunc f (n+1)) = [n+1 = 1]` - (Kronecker delta). Since `f = T + O(T²)`, this determines `c` uniquely: - `c = δ_{1, n+1} - coeff (n+1) (f(compInvTrunc f n))`. - -By induction, `compInvTrunc f n` has the correct coefficients up to degree `n`, -and adding a `T^(n+1)` correction doesn't change any lower coefficient. -The compositional inverse is recovered by taking the `n`-th coefficient of -`compInvTrunc f n`. -/ /-- Iterative truncation of the compositional inverse of `f`. At each step we add a correction of the form `c · T^(n+1)` chosen to zero out @@ -205,7 +151,7 @@ theorem compInverse_coeff_one (f : PowerSeries R) : else -PowerSeries.coeff (0 + 1) (PowerSeries.subst (compInvTrunc f 0) f)) * PowerSeries.X ^ (0 + 1)) = 1 - rw [compInvTrunc_zero, if_pos rfl, coeff_one_subst_zero, sub_zero, zero_add] + rw [compInvTrunc_zero, ite_eq_left rfl, coeff_one_subst_zero, sub_zero, zero_add] -- Goal: coeff 1 (C 1 * X^1) = 1. simp @@ -248,7 +194,7 @@ theorem coeff_compInvTrunc_succ_of_le (f : PowerSeries R) (n k : ℕ) (hk : k PowerSeries.C _ * PowerSeries.X ^ (n + 1)) = _ rw [map_add, PowerSeries.coeff_C_mul_X_pow] -- `k ≠ n + 1` since `k ≤ n`. - rw [if_neg (by omega : k ≠ n + 1), add_zero] + rw [ite_eq_right (by omega : k ≠ n + 1), add_zero] open PowerSeries in /-- For `k ≤ n`, the `k`-th coefficient of `compInvTrunc f n` equals the @@ -383,7 +329,7 @@ theorem coeff_monomial_pow_high (n : ℕ) (c : R) (i : ℕ) (hi : 2 ≤ i) : PowerSeries.coeff (n + 1) ((PowerSeries.C c * PowerSeries.X ^ (n + 1)) ^ i) = 0 := by rw [monomial_pow_eq] rw [PowerSeries.coeff_C_mul_X_pow] - rw [if_neg] + rw [ite_eq_right] intro heq -- n + 1 = i * (n + 1) with i ≥ 2 contradicts n + 1 ≥ 1. nlinarith @@ -460,7 +406,7 @@ private theorem coeff_add_monomial_pow_eq_zero (g : PowerSeries R) (n : ℕ) (c PowerSeries.coeff (n + 1) (g ^ 0) + (if (0 : ℕ) = 1 then c else 0) := by rw [coeff_add_monomial_pow_eq_sum, Finset.sum_range_one] simp only [Nat.choose_self, Nat.cast_one, one_mul, pow_zero, Nat.sub_self, mul_one] - rw [if_neg (by decide : (0 : ℕ) ≠ 1), add_zero] + rw [ite_eq_right (by decide : (0 : ℕ) ≠ 1), add_zero] open PowerSeries in /-- The `d = 1` case of `coeff_add_monomial_pow_eq`: the expansion has two terms, @@ -478,11 +424,11 @@ private theorem coeff_add_monomial_pow_eq_one (g : PowerSeries R) (n : ℕ) (c : rw [show (h ^ 0 : PowerSeries R) = 1 from pow_zero _] rw [show (h ^ 1 : PowerSeries R) = h from pow_one _] rw [show (g ^ 0 : PowerSeries R) = 1 from pow_zero _] - rw [if_pos rfl] + rw [ite_eq_left rfl] simp only [Nat.cast_one, one_mul, mul_one] -- Goal: coeff (n+1) g + coeff (n+1) h = coeff (n+1) g + c rw [show PowerSeries.coeff (n + 1) h = c from by - rw [hdef, PowerSeries.coeff_C_mul_X_pow, if_pos rfl]] + rw [hdef, PowerSeries.coeff_C_mul_X_pow, ite_eq_left rfl]] open PowerSeries in /-- The `d + 2` case of `coeff_add_monomial_pow_eq`: split the binomial sum into @@ -517,7 +463,7 @@ private theorem coeff_add_monomial_pow_eq_succ_succ (g : PowerSeries R) rw [Finset.sum_eq_zero (fun m hm ↦ by simp only [Finset.mem_filter, Finset.mem_range] at hm rw [coeff_monomial_pow_mul_eq_zero g n c hm.2 (d + 2 - m), mul_zero]), add_zero] - rw [if_neg (by omega : d + 2 ≠ 1), add_zero] + rw [ite_eq_right (by omega : d + 2 ≠ 1), add_zero] -- The m = 1 term vanishes since g has zero constant coefficient. rw [coeff_monomial_mul_pow_succ_eq_zero g hg n c d, mul_zero, add_zero] @@ -577,8 +523,8 @@ theorem coeff_subst_add_monomial (f g : PowerSeries R) (n : ℕ) (c : R) congr 1 rw [finsum_eq_single _ 1 (by intro d hd - rw [if_neg hd, smul_zero])] - rw [if_pos rfl, smul_eq_mul, mul_comm] + rw [ite_eq_right hd, smul_zero])] + rw [ite_eq_left rfl, smul_eq_mul, mul_comm] /-! ### The core invariant and the compositional-inverse identity -/ @@ -881,15 +827,7 @@ theorem compInverseOfUnit_coeff_one (f : PowerSeries R) (u : R) (hu : IsUnit u) -- Goal: v ^ 1 * coeff 1 (compInverse (v • f)) = v. rw [pow_one, compInverse_coeff_one, mul_one] -/-- The **formal exponential** of a formal group `F` over a ring with a -`ℚ`-module structure. - -Defined as the compositional inverse of `log_F`, via `compInverse`. -The full inverse identity `log_F ∘ exp_F = X` (Silverman IV.5.2) is future -work — this file only establishes the definition and basic coefficient -properties. -Reference: Silverman, *The Arithmetic of Elliptic Curves*, IV.5. -/ noncomputable def FormalGroup.exp (F : FormalGroup R) [Module ℚ R] : PowerSeries R := compInverse F.log @@ -936,14 +874,7 @@ theorem FormalGroup.commutative_of_torsion_free (F : FormalGroup R) F.toSeries = F.toSeries := F.commutative -/-- **Silverman IV.5.4 (coefficient identity)**: for `n ≥ 1`, -`n • log_F.coeff n = ω_F.coeff (n - 1)`. -This is the `ℚ`-module-level identity that, after multiplying by `(n : ℚ)⁻¹`, -recovers the explicit formula `log_F.coeff n = (n : ℚ)⁻¹ • ω_F.coeff (n-1)` -(which is the content of `log_coeff_succ`). Over a torsion-free `ℤ`-algebra -it shows `n · log_F.coeff n` lies in the image of `ω_F`, which is the -`ℤ[a_i]`-containment stated in Silverman. -/ theorem FormalGroup.log_coeff_succ_nsmul (F : FormalGroup R) [Module ℚ R] (n : ℕ) : (n + 1) • PowerSeries.coeff (n + 1) F.log = PowerSeries.coeff n F.normalizedDifferential.toSeries := by @@ -1064,23 +995,23 @@ private theorem FormalGroup.dX_at_zero_additiveFormalGroup [Module ℚ R] : | 0 => -- The LHS: (if pos then 1 else 0) + (if single 0 1 = single 1 1 then 1 else 0) -- = 1 + 0 = 1. - simp only [Finsupp.single_zero, add_zero, if_true] - rw [if_neg (by + simp only [Finsupp.single_zero, add_zero, ite_true] + rw [ite_eq_right (by intro h have := DFunLike.congr_fun h 0 simp [Finsupp.single_eq_same] at this)] rw [add_zero, PowerSeries.coeff_zero_eq_constantCoeff_apply] simp | k + 1 => - rw [if_neg (by + rw [ite_eq_right (by intro h have := DFunLike.congr_fun h 1 simp [Finsupp.add_apply, Finsupp.single_eq_same] at this)] - rw [if_neg (by + rw [ite_eq_right (by intro h have h0 := DFunLike.congr_fun h 0 simp [Finsupp.add_apply, Finsupp.single_eq_same] at h0)] - rw [zero_add, PowerSeries.coeff_one, if_neg (by omega : k + 1 ≠ 0)] + rw [zero_add, PowerSeries.coeff_one, ite_eq_right (by omega : k + 1 ≠ 0)] /-- For the additive formal group, the normalized differential `ω_{Ĝ_a}` is the constant series `1`. This follows from `dX_at_zero = 1` (see @@ -1121,8 +1052,8 @@ theorem FormalGroup.log_additiveFormalGroup [Module ℚ R] : -- so its coefficient at `n + 1 ≥ 1` is `0`. rw [FormalGroup.normalizedDifferential_toSeries_additiveFormalGroup] -- Goal: ((n+2)⁻¹ : ℚ) • coeff (n+1) (1 : PowerSeries R) = coeff (n+2) X - rw [PowerSeries.coeff_one, if_neg (by omega : n + 1 ≠ 0), smul_zero, - PowerSeries.coeff_X, if_neg (by omega : n + 1 + 1 ≠ 1)] + rw [PowerSeries.coeff_one, ite_eq_right (by omega : n + 1 ≠ 0), smul_zero, + PowerSeries.coeff_X, ite_eq_right (by omega : n + 1 + 1 ≠ 1)] /-- **Silverman IV.5.2 for `Ĝ_a`**: the additive formal group's log is the identity, and as a trivial consequence, it preserves addition. -/ @@ -1146,15 +1077,6 @@ theorem FormalGroup.additiveFormalGroup_logPreservesAdd [Module ℚ R] : -- Goal: (additiveFormalGroup R).toSeries = X 0 + X 1. This is rfl by definition. rfl -/-! #### The general case: `LogPreservesAdd F` via Silverman IV.4.2 - -The proof follows Silverman IV.5: differentiate both sides of -`log_F(F(X, Y)) = log_F(X) + log_F(Y)` with respect to `X`. The LHS derivative -(chain rule + IV.4.2 translation invariance) equals `ω_F(X)`; the RHS -derivative is `ω_F(X)` directly. Hence both sides have the same partial -derivative in `X`. Combined with agreement at `X = 0` (via the right unit -`F(0, Y) = Y` and `log_F(0) = 0`), they are equal because `Module ℚ R` -makes `R` torsion-free. -/ /-- **Key derivative identity**: `pderiv' () F.log = F.invariantDiff` (both viewed as `MvPowerSeries Unit R = PowerSeries R`). @@ -1210,9 +1132,7 @@ private theorem pderiv_PowerSeries_subst {τ : Type*} /-! #### Uniqueness: a two-variable series is determined by its derivative in variable 0 and its value at `X 0 = 0`. -/ -/-- Auxiliary: if `h : MvPowerSeries (Fin 2) R` has zero derivative in variable -`0` (over a `Module ℚ R`), then all coefficients with positive 0-degree vanish. --/ + private theorem coeff_zero_of_pderiv_zero_fin2 [Module ℚ R] (h : MvPowerSeries (Fin 2) R) (hd : MvPowerSeries.pderiv' 0 h = 0) (e : Fin 2 →₀ ℕ) (he : e 0 ≠ 0) : @@ -1226,9 +1146,9 @@ private theorem coeff_zero_of_pderiv_zero_fin2 [Module ℚ R] intro i by_cases hi : i = 0 · subst hi - rw [Finsupp.single_apply, if_pos rfl, ha] + rw [Finsupp.single_apply, ite_eq_left rfl, ha] exact Nat.succ_pos a - · rw [Finsupp.single_apply, if_neg (Ne.symm hi)] + · rw [Finsupp.single_apply, ite_eq_right (Ne.symm hi)] exact Nat.zero_le _ have hd_sum : d + Finsupp.single (0 : Fin 2) 1 = e := by rw [hd_def, tsub_add_cancel_of_le hle] @@ -1520,7 +1440,7 @@ private theorem coeff_subst_zero_X1_at_single_1 (h : MvPowerSeries (Fin 2) R) (b rw [finsum_eq_single _ (Finsupp.single (1 : Fin 2) b)] · -- Case d = single 1 b: d.prod _ = (X 1)^b, coeff (single 1 b) ((X 1)^b) = 1. rw [prod_eval_zero_X1_of_fst_eq_zero _ (by simp), coeff_single_1_X1_pow, - if_pos (by simp), smul_eq_mul, mul_one] + ite_eq_left (by simp), smul_eq_mul, mul_one] · -- For d ≠ single 1 b: the contribution is zero. intro d hd -- Two cases: d 0 ≠ 0 OR (d 0 = 0 AND d 1 ≠ b). @@ -1535,7 +1455,7 @@ private theorem coeff_subst_zero_X1_at_single_1 (h : MvPowerSeries (Fin 2) R) (b rw [h0]; simp · change d 1 = (Finsupp.single (1 : Fin 2) b) 1 rw [h1]; simp - rw [prod_eval_zero_X1_of_fst_eq_zero _ h0, coeff_single_1_X1_pow, if_neg hd1, smul_zero] + rw [prod_eval_zero_X1_of_fst_eq_zero _ h0, coeff_single_1_X1_pow, ite_eq_right hd1, smul_zero] · -- d 0 ≠ 0: d.prod = 0. rw [prod_eval_zero_X1_of_fst_ne_zero _ h0, map_zero, smul_zero] @@ -1601,15 +1521,6 @@ theorem FormalGroup.logPreservesAdd (F : FormalGroup R) [Module ℚ R] : exact eq_zero_of_pderiv_zero_and_subst_zero_X1 h (hh ▸ pderiv_zero_LogPreservesAdd_diff F) (hh ▸ subst_zero_X1_LogPreservesAdd_diff F) -/-! #### Packaging `log_F` as a formal group homomorphism - -Assuming `LogPreservesAdd F` (i.e., the target identity of Silverman IV.5.2), -we package `log_F` as a `FormalGroupHom F (additiveFormalGroup R)`. - -The construction only requires the identity of `LogPreservesAdd` plus the -fact that `log_F` has zero constant coefficient (which is `log_coeff_zero`). -The `preserves_add` axiom of the homomorphism is an unfolding of the -`LogPreservesAdd` identity. -/ /-- Under the hypothesis `LogPreservesAdd F`, `log_F` extends to a formal group homomorphism `F → Ĝ_a`. This is the packaging part of the @@ -1663,11 +1574,7 @@ noncomputable def FormalGroup.additiveFormalGroup_logHom [Module ℚ R] : (additiveFormalGroup R).logHomOfLogPreservesAdd (FormalGroup.additiveFormalGroup_logPreservesAdd) -/-- **`log_F` as a `FormalGroupHom`** (Silverman IV.5.2 packaged). -For a formal group `F` over a `ℚ`-module `R`, `log_F : F → Ĝ_a` is a formal -group homomorphism. The underlying series is `F.log`, and the `preserves_add` -axiom is `F.logPreservesAdd`. -/ noncomputable def FormalGroup.logHom (F : FormalGroup R) [Module ℚ R] : FormalGroupHom F (additiveFormalGroup R) := F.logHomOfLogPreservesAdd F.logPreservesAdd diff --git a/projects/HasseWeil/HasseWeil/FormalGroup/PDeriv.lean b/projects/HasseWeil/HasseWeil/FormalGroup/PDeriv.lean index 1cb34befc..a82fdd140 100644 --- a/projects/HasseWeil/HasseWeil/FormalGroup/PDeriv.lean +++ b/projects/HasseWeil/HasseWeil/FormalGroup/PDeriv.lean @@ -9,43 +9,6 @@ import Mathlib.RingTheory.MvPowerSeries.Basic import Mathlib.RingTheory.MvPowerSeries.PiTopology import Mathlib.RingTheory.MvPowerSeries.Substitution -/-! -# Partial derivatives of multivariate formal power series - -This file defines the formal partial derivative `MvPowerSeries.pderiv' s` on -`MvPowerSeries σ R`. Mathlib provides a univariate version -`PowerSeries.derivative` for `PowerSeries R` and a polynomial version -`MvPolynomial.pderiv`, but there is no `pderiv'` for multivariate power series. - -The derivative is defined by the convention - - `pderiv' s f := ∑_d ((d s + 1) • coeff_{d + e_s} f) · X^d`, - -which matches the univariate `PowerSeries.derivativeFun` for `σ = Unit` and -agrees with `MvPolynomial.pderiv` under the coercion -`MvPolynomial σ R → MvPowerSeries σ R` (see `pderiv'_coe`). - -This is used downstream in the proof of Silverman IV.4.2 (translation -invariance of the invariant differential on a formal group). - -## Main definitions and results - -* `MvPowerSeries.pderiv' s f` — partial derivative w.r.t. `s : σ`. -* `MvPowerSeries.coeff_pderiv'` — the coefficient of the derivative. -* `MvPowerSeries.pderiv_add`, `pderiv_zero`, `pderiv_smul`, `pderiv'_C`, - `pderiv'_X_self`, `pderiv'_X_of_ne`, `pderiv_sub`, `pderiv_neg`, `pderiv'_one` - — basic API. -* `MvPowerSeries.pderiv_monomial` — the derivative of a monomial. -* `MvPowerSeries.pderiv_mul` — **Leibniz rule** for the multivariate formal - derivative. -* `MvPowerSeries.pderiv'_coe` — agreement with `MvPolynomial.pderiv`. -* `MvPowerSeries.continuous_pderiv` — continuity of `pderiv'` in the product - topology. -* `MvPowerSeries.pderiv_subst` — **substitution chain rule** for - `MvPowerSeries.pderiv'` over a finite index type. -* `MvPowerSeries.pderiv_subst_fin2` — specialization to `σ = Fin 2`, as used - in Silverman IV.4.2. --/ noncomputable section @@ -106,13 +69,13 @@ private lemma add_single_ne_zero (d : σ →₀ ℕ) (s : σ) : theorem pderiv'_one (s : σ) : pderiv' s (1 : MvPowerSeries σ R) = 0 := by classical ext d - rw [coeff_pderiv', coeff_one, if_neg (add_single_ne_zero d s), smul_zero, coeff_zero] + rw [coeff_pderiv', coeff_one, ite_eq_right (add_single_ne_zero d s), smul_zero, coeff_zero] @[simp] theorem pderiv'_C (s : σ) (r : R) : pderiv' s (C (σ := σ) r) = 0 := by classical ext d - rw [coeff_pderiv', coeff_C, if_neg (add_single_ne_zero d s), smul_zero, coeff_zero] + rw [coeff_pderiv', coeff_C, ite_eq_right (add_single_ne_zero d s), smul_zero, coeff_zero] @[simp] theorem pderiv'_X_self (s : σ) : pderiv' s (X s : MvPowerSeries σ R) = 1 := by @@ -122,14 +85,14 @@ theorem pderiv'_X_self (s : σ) : pderiv' s (X s : MvPowerSeries σ R) = 1 := by by_cases hd : d = 0 · subst hd have h : (0 : σ →₀ ℕ) + Finsupp.single s 1 = Finsupp.single s 1 := by simp - rw [h, if_pos rfl, if_pos rfl, Finsupp.coe_zero, Pi.zero_apply, zero_add, one_smul] + rw [h, ite_eq_left rfl, ite_eq_left rfl, Finsupp.coe_zero, Pi.zero_apply, zero_add, one_smul] · have h : d + Finsupp.single s 1 ≠ Finsupp.single s 1 := by intro heq apply hd have : d + Finsupp.single s 1 = 0 + Finsupp.single s 1 := by rw [heq, zero_add] exact add_right_cancel this - rw [if_neg h, if_neg hd, smul_zero] + rw [ite_eq_right h, ite_eq_right hd, smul_zero] @[simp] theorem pderiv'_X_of_ne {s t : σ} (h : s ≠ t) : @@ -142,9 +105,9 @@ theorem pderiv'_X_of_ne {s t : σ} (h : s ≠ t) : have hs : (d + Finsupp.single s 1 : σ →₀ ℕ) s = (Finsupp.single t (1 : ℕ)) s := by rw [heq] rw [Finsupp.add_apply, single_self_apply, - Finsupp.single_apply, if_neg h.symm] at hs + Finsupp.single_apply, ite_eq_right h.symm] at hs omega - rw [if_neg h', smul_zero] + rw [ite_eq_right h', smul_zero] /-! ### Leibniz rule -/ @@ -161,7 +124,7 @@ private lemma smul_eq_zero_of_not_le {s : σ} {a : σ →₀ ℕ} · subst hi rw [single_self_apply] exact Nat.one_le_iff_ne_zero.mpr hne - · rw [Finsupp.single_apply, if_neg (Ne.symm hi)] + · rw [Finsupp.single_apply, ite_eq_right (Ne.symm hi)] exact Nat.zero_le _ rw [this] simp @@ -342,20 +305,20 @@ private lemma coeff_pderiv_monomial_single_le {s : σ} {n d : σ →₀ ℕ} {a have hdeq : d = n - Finsupp.single s 1 := by rw [← hd] exact (add_tsub_cancel_right d _).symm - rw [if_pos hd, if_pos hdeq] + rw [ite_eq_left hd, ite_eq_left hdeq] -- `(d s + 1) • a = a * n s`. have heq : d s + 1 = n s := by have hds : (d + Finsupp.single s 1 : σ →₀ ℕ) s = n s := by rw [hd] simp only [Finsupp.add_apply, he_s] at hds exact hds rw [heq, nsmul_eq_mul, mul_comm] - · rw [if_neg hd] + · rw [ite_eq_right hd] -- d + single s 1 ≠ n means d ≠ n - single s 1 (when single s 1 ≤ n). have hd' : d ≠ n - Finsupp.single s 1 := by intro heq apply hd rw [heq, tsub_add_cancel_of_le hle] - rw [if_neg hd', smul_zero] + rw [ite_eq_right hd', smul_zero] /-- Per-coefficient identity behind `pderiv_monomial` when `¬ single s 1 ≤ n` (i.e. `single s 1 ⊄ n`): then `n s = 0`, so the right-hand coefficient `a * n s` vanishes, and @@ -376,7 +339,7 @@ private lemma coeff_pderiv_monomial_not_single_le {s : σ} {n d : σ →₀ ℕ} · subst hi rw [he_s] exact Nat.one_le_iff_ne_zero.mpr hne - · rw [Finsupp.single_apply, if_neg (Ne.symm hi)] + · rw [Finsupp.single_apply, ite_eq_right (Ne.symm hi)] exact Nat.zero_le _ rw [hns, Nat.cast_zero, mul_zero] -- and `d + single s 1 = n` is impossible. @@ -385,7 +348,7 @@ private lemma coeff_pderiv_monomial_not_single_le {s : σ} {n d : σ →₀ ℕ} apply hle rw [← heq] exact le_add_self - rw [if_neg hne, smul_zero] + rw [ite_eq_right hne, smul_zero] split_ifs <;> rfl theorem pderiv_monomial (s : σ) (n : σ →₀ ℕ) (a : R) : diff --git a/projects/HasseWeil/HasseWeil/Foundation/AdditionPullback.lean b/projects/HasseWeil/HasseWeil/Foundation/AdditionPullback.lean index 0ec0adda3..569d1317f 100644 --- a/projects/HasseWeil/HasseWeil/Foundation/AdditionPullback.lean +++ b/projects/HasseWeil/HasseWeil/Foundation/AdditionPullback.lean @@ -26,9 +26,7 @@ addition formulas from mathlib. ## References * Silverman, *The Arithmetic of Elliptic Curves*, III.2.3c (explicit addition - formulas) + III.3.6 (`+` is a morphism). Round-13 D-R13-A-04 fix: III.3.6 is - the morphism property; the explicit formula is III.2.3c (referenced inside - III.3.6's proof at book p. 64). + formulas) and III.3.6 (`+` is a morphism). * Mathlib: `WeierstrassCurve.Affine.equation_add` -/ @@ -268,7 +266,7 @@ omit [DecidableEq F] [W.toAffine.IsElliptic] α in private lemma minpoly_F_x_gen_natDegree_le_two (α : KE) (hfin : Module.finrank (FractionRing (Polynomial F)) KE = 2) : (minpoly (FractionRing (Polynomial F)) α).natDegree ≤ 2 := by - haveI : FiniteDimensional (FractionRing (Polynomial F)) KE := + have : FiniteDimensional (FractionRing (Polynomial F)) KE := Module.finite_of_finrank_pos (by rw [hfin]; exact (by decide : 0 < 2)) have h_le := minpoly.natDegree_le (A := FractionRing (Polynomial F)) (B := KE) (x := α) rw [hfin] at h_le @@ -311,7 +309,7 @@ private lemma addPullback_x_quadratic_over_F_case_two rw [Polynomial.aeval_eq_sum_range, h_eq_2_F] at h_aeval simp only [Finset.sum_range_succ, Finset.sum_range_zero, zero_add, pow_zero, pow_one, Algebra.smul_def, mul_one] at h_aeval - rw [h_lc_2, map_one, one_mul] at h_aeval + rw [h_lc_2, map_one (algebraMap F KE), one_mul] at h_aeval rw [map_neg, neg_mul, sub_neg_eq_add] linear_combination h_aeval diff --git a/projects/HasseWeil/HasseWeil/Foundation/AdditionPullback/Differential.lean b/projects/HasseWeil/HasseWeil/Foundation/AdditionPullback/Differential.lean index 35e8ea489..2925f2b5b 100644 --- a/projects/HasseWeil/HasseWeil/Foundation/AdditionPullback/Differential.lean +++ b/projects/HasseWeil/HasseWeil/Foundation/AdditionPullback/Differential.lean @@ -12,27 +12,17 @@ import HasseWeil.HasseBound.QuadraticFormHoleE /-! # Differential pullback for the addition isogeny `1 − π` -Witness #1 of `hasse_bound_via_signed_QF_negFrobenius` needs the omega-pullback -coefficient of `isogOneSub_negFrobenius W hq` to equal `1`. This file assembles the -separability of `1 − π` from that coefficient via the cotangent (T-II-4-004) criterion, -and computes the supporting coefficients for `mulByInt (-1)` and `negFrobeniusIsog`. +The invariant-differential coefficient of `1 − π` is one under the corresponding +additivity hypothesis. The cotangent criterion then gives separability. The supporting +computations identify the coefficients of negation and negative Frobenius as `-1` and zero. -The omega-coefficient identity itself is reduced to a Silverman III.5.2 additivity -hypothesis (the `id + (-1)·π` decomposition); several witness-parametric consumers below -take that hypothesis in different shapes and produce the separability conclusion. +The function-field extension defined by the pullback of `1 − π` is finite-dimensional: +its x-coordinate is transcendental, hence forms a transcendence basis, and the function +field is algebraic over the pullback range. Finite-dimensionality gives the equivalence +between separability and a nonzero invariant-differential coefficient. -## Main results - -* `isogOneSub_negFrobenius_isSeparable_iff_omegaPullbackCoeff_ne_zero`: the T-II-4-004 - separability criterion for `1 − π`, unconditional. -* `omegaPullbackCoeff_mulByInt_neg_one`, `omegaPullbackCoeff_negFrobeniusIsog`: the - supporting omega-coefficient computations. -* `isogOneSub_negFrobenius_finiteDimensional`: Witness #2 (finite-dimensionality). - -## References - -* Silverman, *The Arithmetic of Elliptic Curves*, III.5.2 (additivity), - III.5.3 (`[m]*ω = m·ω`), III.5.5 (Frobenius is purely inseparable). +References: Silverman, *The Arithmetic of Elliptic Curves*, III.5.2 (additivity), +III.5.3 (`[m]*ω = m·ω`), and III.5.5 (Frobenius is purely inseparable). -/ open WeierstrassCurve @@ -44,17 +34,8 @@ variable (W : WeierstrassCurve K) [W.toAffine.IsElliptic] local notation "KE" => W.toAffine.FunctionField -/-- **Witness-parametric Witness #1 omega-coefficient closer**: takes the -Silverman III.5.2 additivity witness for `isogOneSub_negFrobenius` and -produces the deliverable `omegaPullbackCoeff = 1`. - -The additivity hypothesis is exactly the III.5.2 specialization to the -`1 − π = 1·id + (-1)·π` decomposition. Closing it via the witness-parametric -bridge chain (`omegaPullbackCoeff_add_of_leading_witness`, -`FormalIsogenySeries.lean`; the unconditional -`omegaPullbackCoeff_add_via_bridge_of_constCoeff` was deleted 2026-06-11 as -refutable) is the substantive piece — once that's in hand, this lemma fires -the closure axiom-clean. -/ +/-- The additivity identity for `1 − π = id + (-1)·π` implies that its +invariant-differential coefficient is one (Silverman III.5.2). -/ theorem omegaPullbackCoeff_isogOneSub_negFrobenius_eq_one_of_additivity_witness (hq : 2 ≤ Fintype.card K) (h_add : omegaPullbackCoeff W (isogOneSub_negFrobenius W hq) = @@ -64,11 +45,8 @@ theorem omegaPullbackCoeff_isogOneSub_negFrobenius_eq_one_of_additivity_witness simpa using omegaPullbackCoeff_m_plus_n_frob_of_witness W (isogOneSub_negFrobenius W hq) 1 (-1) h_add -/-- **Hom decomposition for `1 − π`**: the rational-point map of -`isogOneSub_negFrobenius W hq` equals the sum of `(Isogeny.id W.toAffine).toAddMonoidHom` -and `(negFrobeniusIsog W).toAddMonoidHom`. (Historically the `h_add` input of the -deleted-2026-06-11 `omegaPullbackCoeff_add_via_bridge_of_constCoeff`; retained as the -group-law decomposition identity in its own right.) -/ +/-- The rational-point map of `1 − π` is the sum of the identity map and negative Frobenius. +-/ theorem isogOneSub_negFrobenius_toAddMonoidHom_decomposition (hq : 2 ≤ Fintype.card K) : (isogOneSub_negFrobenius W hq).toAddMonoidHom = @@ -81,15 +59,8 @@ theorem isogOneSub_negFrobenius_toAddMonoidHom_decomposition rw [Isogeny.id_toAddMonoidHom, AddMonoidHom.id_apply, negFrobeniusIsog_toAddMonoidHom_apply, sub_eq_add_neg] -/-- **Composed Witness #1**: separability of `isogOneSub_negFrobenius W hq`, -taking only the additivity sum hypothesis (Silverman III.5.2 input for the -specific `1 − π = 1·id + (-1)·π` decomposition) and the T-II-4-004 -differential separability criterion. - -Hypothesis count drops from two (omega-coeff + T-II-4-004) to two of a -sharper shape (additivity sum + T-II-4-004) — the additivity sum is the -direct discharge target of the T-DIFFERENTIAL-PULLBACK-ADDITION-MAP -infrastructure, removing one layer of indirection. -/ +/-- The differential additivity identity and the nonzero-coefficient separability +criterion imply that `1 − π` is separable. -/ theorem isogOneSub_negFrobenius_isSeparable_of_additivity_and_T2_4_004 (hq : 2 ≤ Fintype.card K) (h_add : omegaPullbackCoeff W (isogOneSub_negFrobenius W hq) = @@ -103,15 +74,8 @@ theorem isogOneSub_negFrobenius_isSeparable_of_additivity_and_T2_4_004 W hq h_add) h_sep_iff -/-- **Composed Witness #1 (sharper)**: separability of `isogOneSub_negFrobenius W hq`, -taking the additivity sum, Witness #2 (FiniteDim), and the algebra-Kähler bridge -(Subsingleton ↔ pullbackKaehler injective) as inputs. - -Composes Commit 13 (T-II-4-004 full iff witness-parametric) with the existing -additivity-Witness-1 closer. Replaces the iff hypothesis with the two -witnesses underlying it; when the bridge discharges (cotangent-sequence -argument unblocked by Sub-piece A break-through), this becomes an -unconditional consumer of Witness #2 only. -/ +/-- Differential additivity, finite-dimensionality, and the cotangent criterion imply +separability of `1 − π`. -/ theorem isogOneSub_negFrobenius_isSeparable_of_additivity_finiteDim_bridge (hq : 2 ≤ Fintype.card K) (h_add : omegaPullbackCoeff W (isogOneSub_negFrobenius W hq) = @@ -127,9 +91,8 @@ theorem isogOneSub_negFrobenius_isSeparable_of_additivity_finiteDim_bridge (isSeparable_iff_omegaPullbackCoeff_ne_zero_of_witnesses W (isogOneSub_negFrobenius W hq) h_fin h_bridge) -/-- **{addPullback_x_negFrobenius} is alg-indep over K (axiom-clean)**: -the singleton family is algebraically independent over `K`, by transcendentality -(`addPullback_x_transcendental_negFrobenius`). -/ +/-- The singleton consisting of the x-coordinate of `1 − π` is algebraically independent +because that coordinate is transcendental over the base field. -/ theorem addPullback_x_negFrobenius_algebraicIndependent (hq : 2 ≤ Fintype.card K) (hxy : AddNonInverse W (negFrobeniusIsog W)) : @@ -139,9 +102,8 @@ theorem addPullback_x_negFrobenius_algebraicIndependent rw [algebraicIndependent_unique_type_iff] exact addPullback_x_transcendental_negFrobenius W hq hxy -/-- **{addPullback_x_negFrobenius} is a transcendence basis (axiom-clean)**: -combines alg-independence with `trdeg K K(E) = 1` to yield the 1-element -transcendence basis via `AlgebraicIndependent.isTranscendenceBasis_of_lift_trdeg_le_of_finite`. -/ +/-- The x-coordinate of `1 − π` is a transcendence basis, since the function field has +transcendence degree one. -/ theorem addPullback_x_negFrobenius_isTranscendenceBasis (hq : 2 ≤ Fintype.card K) (hxy : AddNonInverse W (negFrobeniusIsog W)) : @@ -153,13 +115,8 @@ theorem addPullback_x_negFrobenius_isTranscendenceBasis rw [weierstrass_functionField_trdeg_eq_one W] simp -/-- **K(E) is algebraic over `Algebra.adjoin K {addPullback_x_negFrobenius}` -(axiom-clean, Path (a) step 4)**: applying `IsTranscendenceBasis.isAlgebraic` -to the trans-basis singleton gives the relative algebraicity over the -adjoin subalgebra. - -@-explicit `Subalgebra.toAlgebra` to bypass typeclass-synthesis flakiness -on the specific Weierstrass term `addPullback_x W (negFrobeniusIsog W)`. -/ +/-- The function field is algebraic over the subalgebra generated by the x-coordinate +of `1 − π`. -/ theorem addPullback_x_negFrobenius_isAlgebraic_subalgebra (hq : 2 ≤ Fintype.card K) (hxy : AddNonInverse W (negFrobeniusIsog W)) : @@ -170,9 +127,8 @@ theorem addPullback_x_negFrobenius_isAlgebraic_subalgebra (Subalgebra.toAlgebra _) := (addPullback_x_negFrobenius_isTranscendenceBasis W hq hxy).isAlgebraic -/-- **addPullback_x is in the negFrobenius pullback's range (axiom-clean)**: -direct identification via the `addPullbackAlgHom` construction — -`x_gen` maps to `addPullback_x`. -/ +/-- The x-coordinate of `1 − π` belongs to its pullback range: it is the image of `x_gen`. +-/ theorem addPullback_x_negFrobenius_mem_range (hq : 2 ≤ Fintype.card K) : addPullback_x W (negFrobeniusIsog W) ∈ @@ -195,11 +151,8 @@ theorem addPullback_x_negFrobenius_mem_range AdjoinRoot.lift_mk] simp [addBaseHom, Polynomial.eval₂_C] -/-- **Algebraicity over α.pullback.range** (Path (a) step 5, witness-parametric): -given `addPullback_x ∈ (isogOneSub_negFrobenius W hq).pullback.range`, -lift the IsAlgebraic from the smaller adjoin subalgebra to α.pullback.range. - -Uses `IsAlgebraic.tower_top_of_subalgebra_le` element-wise. -/ +/-- If the x-coordinate belongs to the pullback range, algebraicity over the subalgebra +it generates implies algebraicity over that range. -/ theorem addPullback_x_negFrobenius_isAlgebraic_range_of_witness (hq : 2 ≤ Fintype.card K) (hxy : AddNonInverse W (negFrobeniusIsog W)) @@ -223,8 +176,7 @@ theorem addPullback_x_negFrobenius_isAlgebraic_range_of_witness exact ((addPullback_x_negFrobenius_isAlgebraic_subalgebra W hq hxy).isAlgebraic y).tower_top_of_subalgebra_le h_le -/-- **Algebraicity over α.pullback.range (UNCONDITIONAL, axiom-clean)**: -discharges Commit 26 by feeding Commit 27's membership witness. -/ +/-- The function field is algebraic over the pullback range of `1 − π`. -/ theorem addPullback_x_negFrobenius_isAlgebraic_range (hq : 2 ≤ Fintype.card K) (hxy : AddNonInverse W (negFrobeniusIsog W)) : @@ -236,12 +188,8 @@ theorem addPullback_x_negFrobenius_isAlgebraic_range (addPullback_x_negFrobenius_mem_range W hq) set_option backward.isDefEq.respectTransparency.types false in -/-- **Algebraicity over the type-synonym wrapper (UNCONDITIONAL, axiom-clean, -Path (a) step 8)**: `K(E)` is algebraic over `IsogenyAlgebraSource W -(isogOneSub_negFrobenius W hq)`. - -Transfers Commit 28's algebraicity-over-`α.pullback.range` to the type-synonym -form via the bijective range iso `α.pullback : K(E) ≃ₐ[K] α.pullback.range`. -/ +/-- Algebraicity over the pullback range transfers to the algebra-source type via the +range isomorphism `K(E) ≃ₐ[K] α.pullback.range`. -/ theorem isogOneSub_negFrobenius_isAlgebraic_synonym (hq : 2 ≤ Fintype.card K) (hxy : AddNonInverse W (negFrobeniusIsog W)) : @@ -265,41 +213,18 @@ theorem isogOneSub_negFrobenius_isAlgebraic_synonym change α.pullback (e.symm z) = (z : W.toAffine.FunctionField) exact congrArg Subtype.val (e.apply_symm_apply z) -/-- **WITNESS #2 UNCONDITIONAL (axiom-clean)**: K(E) is finite-dimensional -over `(isogOneSub_negFrobenius W hq).pullback K(E)` (via `α.toAlgebra.toModule`). - -Composes: -* Commit 18 (`isogeny_finiteDimensional_of_isAlgebraic_synonym`): the - type-synonym Witness #2 producer. -* Commit 19 (`isogenyAlgebraSource_essFiniteType` UNCONDITIONAL): synonym - EssFiniteType from FractionRing localization + `EssFiniteType.of_comp`. -* Commit 29 (`isogOneSub_negFrobenius_isAlgebraic_synonym` UNCONDITIONAL): - synonym IsAlgebraic from trans-deg + IsTranscendenceBasis + range iso. - -This closes the bound's Witness #2 fully unconditional. T-II-4-004's full -iff (Commit 17 = `isSeparable_iff_omegaPullbackCoeff_ne_zero_of_finiteDim`) -chains to fully unconditional `α.IsSeparable ↔ ω-coeff ≠ 0` for the -negFrobenius case. -/ +/-- The pullback function-field extension for `1 − π` is finite-dimensional, since it +is algebraic and essentially of finite type. -/ theorem isogOneSub_negFrobenius_finiteDimensional (hq : 2 ≤ Fintype.card K) : @FiniteDimensional W.toAffine.FunctionField W.toAffine.FunctionField _ _ (isogOneSub_negFrobenius W hq).toAlgebra.toModule := by - haveI := isogOneSub_negFrobenius_isAlgebraic_synonym W hq + have := isogOneSub_negFrobenius_isAlgebraic_synonym W hq (negFrobeniusIsog_addNonInverse W) exact isogeny_finiteDimensional_of_isAlgebraic_synonym W (isogOneSub_negFrobenius W hq) -/-- **T-II-4-004 FULLY UNCONDITIONAL for negFrobenius (axiom-clean)**: -the iff `α.IsSeparable ↔ omegaPullbackCoeff W α ≠ 0` for -`α = isogOneSub_negFrobenius W hq` lands axiom-clean with no remaining -hypotheses (modulo only the `hq : 2 ≤ Fintype.card K` standing on -the bound's signature). - -One-line composition of Commit 17 (witness-parametric iff on FiniteDim) -+ Commit 30 (Witness #2 UNCONDITIONAL). - -This closes T-II-4-004 for the bound's purpose. The bound's deferred- -witness count drops to 2 (Witness #1 unconditional + the additivity -discharge for general α through BRIDGE-001). -/ +/-- The isogeny `1 − π` is separable exactly when its invariant-differential coefficient +is nonzero. -/ theorem isogOneSub_negFrobenius_isSeparable_iff_omegaPullbackCoeff_ne_zero (hq : 2 ≤ Fintype.card K) : (isogOneSub_negFrobenius W hq).IsSeparable ↔ @@ -308,11 +233,8 @@ theorem isogOneSub_negFrobenius_isSeparable_iff_omegaPullbackCoeff_ne_zero (isogOneSub_negFrobenius W hq) (isogOneSub_negFrobenius_finiteDimensional W hq) --- `[Fintype K]` is unused in the statement but needed transitively by the proof's --- instance resolution, so it cannot be `omit`ted. -/-- **`alpha_star_u` for `mulByInt (-1)` equals `-u_gen` (axiom-clean)**: -the negation isogeny pulls `u_gen = 2y + a₁x + a₃` to its negative -(via `mulByInt_pullback_y_neg_one`). -/ +omit [Fintype K] in +/-- Negation pulls `u_gen = 2y + a₁x + a₃` back to `-u_gen`. -/ theorem alpha_star_u_mulByInt_neg_one : alpha_star_u W (mulByInt W.toAffine (-1)) = -u_gen W := by change 2 * (mulByInt W.toAffine (-1)).pullback (y_gen W) + @@ -324,14 +246,9 @@ theorem alpha_star_u_mulByInt_neg_one : rw [mulByInt_pullback_y_neg_one, mulByInt_pullback_x_neg_one] ring --- `[Fintype K]` is unused in the statement but needed transitively by the proof. -/-- **omegaPullbackCoeff for `mulByInt (-1)` equals `-1` (axiom-clean)**: -direct via `omegaPullbackCoeff_unique` + the spec equation, using -`alpha_star_u_mulByInt_neg_one` and `mulByInt_pullback_x_neg_one`. - -This is independent of the Wronskian-based `omegaPullbackCoeff_mulByInt`, -so it lands axiom-clean (`omegaPullbackCoeff_mulByInt` uses `sorryAx` via -the Wronskian derivation). -/ +omit [Fintype K] in +/-- The invariant-differential coefficient of negation is `-1`, by the differential +of the x-coordinate and the negation formula for `u_gen`. -/ theorem omegaPullbackCoeff_mulByInt_neg_one : omegaPullbackCoeff W (mulByInt W.toAffine (-1)) = -1 := by apply omegaPullbackCoeff_unique @@ -342,13 +259,8 @@ theorem omegaPullbackCoeff_mulByInt_neg_one : rw [h_pb_x, alpha_star_u_mulByInt_neg_one, inv_neg, neg_smul, neg_one_smul] rfl -/-- **omegaPullbackCoeff for `negFrobeniusIsog` = 0 (axiom-clean)**: -`negFrobeniusIsog = mulByInt(-1) ∘ frobeniusIsog`, so by the chain rule -`omegaPullbackCoeff_comp_of_base` (with the outer-base coefficient -1 ∈ K), -`omega-coeff(negFrob) = (-1) * omega-coeff(frobenius) = (-1) * 0 = 0`. - -Avoids the Wronskian-tainted `omegaPullbackCoeff_mulByInt`; uses the -direct `omegaPullbackCoeff_mulByInt_neg_one` (Commit 35) instead. -/ +/-- Negative Frobenius has invariant-differential coefficient zero, by the chain rule +for negation composed with Frobenius. -/ theorem omegaPullbackCoeff_negFrobeniusIsog : omegaPullbackCoeff W (negFrobeniusIsog W) = 0 := by simp only [negFrobeniusIsog] @@ -358,13 +270,8 @@ theorem omegaPullbackCoeff_negFrobeniusIsog : push_cast rfl -/-- **Witness #1 (witness-parametric on additivity ONLY, axiom-clean)**: -separability of `isogOneSub_negFrobenius W hq`, taking only the additivity -sum hypothesis. T-II-4-004 iff (Commit 31) + Witness #2 (Commit 30) absorbed. - -When the additivity discharge lands (per-α BRIDGE-001 instances + -`omegaPullbackCoeff_add_of_leading_witness`, `FormalIsogenySeries.lean`), -this fires the unconditional Witness #1 of the bound. -/ +/-- Differential additivity gives coefficient one and hence separability of `1 − π`. +-/ theorem isogOneSub_negFrobenius_isSeparable_of_h_add_only (hq : 2 ≤ Fintype.card K) (h_add : omegaPullbackCoeff W (isogOneSub_negFrobenius W hq) = @@ -374,13 +281,7 @@ theorem isogOneSub_negFrobenius_isSeparable_of_h_add_only isogOneSub_negFrobenius_isSeparable_of_additivity_and_T2_4_004 W hq h_add (isogOneSub_negFrobenius_isSeparable_iff_omegaPullbackCoeff_ne_zero W hq) -/-- **Witness #1 (taking ONLY `omegaPullbackCoeff = 1`, axiom-clean)**: -shorter consumer of the existing chain — takes only the omega-coefficient -identity (= 1), since T-II-4-004 iff (Commit 31) is now unconditional. - -When the omega-coefficient computation lands axiom-clean (via either direct -algebraic computation or BRIDGE-001 + III.5.2), this fires the unconditional -Witness #1 of the bound. -/ +/-- A differential coefficient equal to one implies separability of `1 − π`. -/ theorem isogOneSub_negFrobenius_isSeparable_of_h_coeff_only (hq : 2 ≤ Fintype.card K) (h_coeff : omegaPullbackCoeff W (isogOneSub_negFrobenius W hq) = 1) : @@ -388,9 +289,8 @@ theorem isogOneSub_negFrobenius_isSeparable_of_h_coeff_only isogOneSub_negFrobenius_isSeparable_of_witnesses W hq h_coeff (isogOneSub_negFrobenius_isSeparable_iff_omegaPullbackCoeff_ne_zero W hq) -/-- **Witness #3 (FiniteDim absorbed)**: sepDegree = pointCount for -`isogOneSub_negFrobenius W hq`, taking only IsSeparable, the fiber witness, -and Finite kernel — Witness #2 is absorbed via Commit 30 (unconditional). -/ +/-- Separability and a fiber-cardinality witness identify the separable degree of +`1 − π` with the rational-point count. -/ theorem isogOneSub_negFrobenius_sepDegree_eq_pointCount_of_sep_and_fiber [Fintype W.toAffine.Point] (hq : 2 ≤ Fintype.card K) @@ -423,14 +323,8 @@ theorem isogOneSub_negFrobenius_fiber_witness_of_sepDegree_eq_pointCount (AddMonoidHom.id _) - (frobeniusIsog W).toAddMonoidHom) h_sepDeg -/-- **Witness #1 via leading-coefficient bridge witness (axiom-clean)**: -takes BRIDGE-001 for the three isogenies + leading-coefficient additivity -of formal series, then chains via Commit 46 to derive omega-coeff(γ) = 1 -unconditional, which closes Witness #1 via Commit 38. - -When the leading-coefficient additivity (`h_leading_add`) and BRIDGE-001 for -negFrobeniusIsog and isogOneSub_negFrobenius are discharged, this becomes -the unconditional Witness #1 of the bound. -/ +/-- Leading-coefficient additivity and its equality with the differential coefficients +for negative Frobenius and `1 − π` imply separability of `1 − π`. -/ theorem isogOneSub_negFrobenius_isSeparable_via_leading_witnesses (hq : 2 ≤ Fintype.card K) (h_bridge_negFrob : omegaPullbackCoeff W (negFrobeniusIsog W) = diff --git a/projects/HasseWeil/HasseWeil/Foundation/AdditionPullback/SilvermanIV14.lean b/projects/HasseWeil/HasseWeil/Foundation/AdditionPullback/SilvermanIV14.lean index fa13c9ee6..d6729de59 100644 --- a/projects/HasseWeil/HasseWeil/Foundation/AdditionPullback/SilvermanIV14.lean +++ b/projects/HasseWeil/HasseWeil/Foundation/AdditionPullback/SilvermanIV14.lean @@ -8,50 +8,20 @@ import HasseWeil.Foundation.BridgeFrobenius import HasseWeil.Foundation.HahnSeriesAux /-! -# Silverman IV.1.4 scaffold for the leading-coefficient bridge +# Local expansions and differential pullback for `1 − π` -Substantive computation toward closing BRIDGE-001 / BRIDGE-003 for the -specific case `γ = isogOneSub_negFrobenius`. The deliverable target is -the leading-coefficient identity: +For the addition isogeny `γ = 1 − π`, the x- and y-coordinate pullbacks have orders +`-2` and `-3` at infinity. Thus the pullback of the parameter `t = -x/y` has order one. +Laurent-series leading coefficients relate its linear formal-series coefficient to +the leading coefficient of the y-coordinate. Negative Frobenius has zero linear +coefficient, because its parameter pullback has order `q ≥ 2`. -``` -PowerSeries.coeff 1 (formalIsogenySeries W (isogOneSub_negFrobenius W hq)) = 1 -``` - -which equivalently says: - -``` -(localExpand W (addPullbackAlgHom_negFrobenius W hq (localParam W))).coeff (1 : ℤ) = 1 -``` - -where `localParam W = -x_gen / y_gen` is the local parameter at the point at -infinity `O`. - -## Decomposition - -The substantive piece breaks into: - -1. **Order computation** — `ord (γ.pullback localParam) = 1` at infinity. - Direct from `ord (addPullback_x) = -2` (`ord_addPullback_x_negFrobenius`, - existing) and `ord (addPullback_y) = -3` (analog, this file). -2. **Leading-coefficient computation** — extract the coefficient of `t¹` in - the Laurent expansion. The key formula (at the formal-group leading order): - `coeff 1 (formal γ) = 1 - (coeff q (formal id) * coeff 1 (formal frobeniusIsog))`. - Specializes via `formalIsogenySeries_id = X` (coeff 1 = 1) and - `formalIsogenySeries_frobenius = X^q` (coeff 1 = 0 for q ≥ 2), - giving `coeff 1 = 1 + 0 = 1`. - -## Sub-helpers shipped here - -* `ord_addPullback_y_negFrobenius` — `ord (addPullback_y W (negFrobeniusIsog W)) = -3`. -* `ord_localParam_pullback_negFrobenius` — `ord (γ.pullback localParam) = 1`. -* `formalIsogenySeries_isogOneSub_negFrobenius_constantCoeff` — the - `constantCoeff = 0` fact (genuine isogeny). - -## References +Kähler differentiation of the curve and addition-slope equations proves that the +invariant-differential coefficient of `γ` is one, and hence that `γ` is separable. +The general addition formulas retain the hypotheses relating coordinate pullbacks, +point maps, and formal series. -* Silverman, *The Arithmetic of Elliptic Curves*, IV.1.4 (formal group law - agreement with the addition formula's local expansion). +Reference: Silverman, *The Arithmetic of Elliptic Curves*, IV.1.4 and III.5.2. -/ open WeierstrassCurve PowerSeries LaurentSeries @@ -63,21 +33,8 @@ variable (W : WeierstrassCurve K) [W.toAffine.IsElliptic] local notation "KE" => W.toAffine.FunctionField -/-- **Order of `-addPullback_x / addPullback_y = 1` at infinity (axiom-clean, -witness-parametric)**: given `ord (addPullback_x) = -2` and `ord (addPullback_y) -= -3`, the local-parameter form `-addPullback_x / addPullback_y` (which equals -`γ.pullback (localParam W)` once the addition-pullback γ is realized as a ring -hom) has order `1` at infinity. - -Substantive content of Silverman IV.1.4's leading-order claim: since -`γ.pullback (localParam) = γ.pullback (-x_gen / y_gen) = -γ.pullback(x_gen) / -γ.pullback(y_gen) = -addPullback_x / addPullback_y` for any ring-hom realization -of γ, the order-1 fact reduces to the purely arithmetic -`ord(-a / b) = ord(a) - ord(b) = -2 - (-3) = 1`. - -Witness-parametric: plugs the existing axiom-clean -`ord_addPullback_x_negFrobenius` and the (currently sorry-bearing) -`ord_addPullback_y_negFrobenius` into a closed-form ord computation. -/ +/-- Coordinate orders `-2` and `-3` imply that `-addPullback_x / addPullback_y` has +order one at infinity, by `ord(-a/b) = ord(a) - ord(b)`. -/ theorem ord_neg_addPullback_x_div_y_negFrobenius (h_x : (W_smooth W).ordAtInfty (addPullback_x W (negFrobeniusIsog W)) = ((-2 : ℤ) : WithTop ℤ)) @@ -99,15 +56,8 @@ theorem ord_neg_addPullback_x_div_y_negFrobenius ((W_smooth W).ordAtInfty_neg _).trans h_x exact ((W_smooth W).ord_div_concrete h_y_ne (-2) (-3) h_neg_x h_y).trans rfl -/-- **IV.1.4 step 1 unconditional**: `ord(-addPullback_x / addPullback_y) = 1` -at infinity for the negFrobenius case (q ≥ 2, any characteristic). Combines -the witness-parametric `ord_neg_addPullback_x_div_y_negFrobenius` with the -two axiom-clean witnesses `ord_addPullback_x_negFrobenius` and the new -`ord_addPullback_y_negFrobenius`. - -This is the substantive ord-1 conclusion of Silverman IV.1.4 step 1. The -ord-1 fact for `γ.pullback (localParam W)` follows once the addition-pullback -ring hom γ is realized via `addPullbackAlgHom_negFrobenius W hq`. -/ +/-- The local parameter of `1 − π` has order one at infinity, in every characteristic. +-/ theorem ord_neg_addPullback_x_div_y_negFrobenius_unconditional (hq : 2 ≤ Fintype.card K) : (W_smooth W).ordAtInfty @@ -119,7 +69,7 @@ theorem ord_neg_addPullback_x_div_y_negFrobenius_unconditional (ord_addPullback_y_negFrobenius W hq) /-- **`(negFrob).pullback localParam = ((mulByInt(-1)).pullback localParam)^q`** -(axiom-clean). Direct from `negFrob = mulByInt(-1) ∘ frobenius` and +. Direct from `negFrob = mulByInt(-1) ∘ frobenius` and `frobenius.pullback = (·)^q`. -/ theorem negFrobeniusIsog_pullback_localParam_eq_pow : (negFrobeniusIsog W).pullback (localParam W) = @@ -127,7 +77,8 @@ theorem negFrobeniusIsog_pullback_localParam_eq_pow : simp only [negFrobeniusIsog] rw [Isogeny.comp_algebraMap_eq, frobeniusIsog_pullback_apply] -/-- **Closed form for `(mulByInt(-1)).pullback localParam`** (axiom-clean). +omit [Fintype K] in +/-- **Closed form for `(mulByInt(-1)).pullback localParam`** . The σ-action on the local parameter `t = -x/y` evaluates to `x_gen / (y_gen + a₁·x_gen + a₃)`. From `mulByInt_pullback_x_neg_one` (σ fixes `x_gen`) and `mulByInt_pullback_y_neg_one` (σ sends `y_gen` to @@ -146,10 +97,10 @@ theorem mulByInt_neg_one_pullback_localParam : rw [neg_div_neg_eq] /-- **`ord((negFrobeniusIsog W).pullback (localParam W)) = q`** at infinity -(axiom-clean). Direct from the chain rule on `localParam = -x_gen/y_gen`: +. Direct from the chain rule on `localParam = -x_gen/y_gen`: `(negFrob).pullback localParam = -(negFrob).pullback x_gen / (negFrob).pullback y_gen`, combined with `ord((negFrob).pb x_gen) = -2q` and `ord((negFrob).pb y_gen) = -3q` -(both existing axiom-clean), gives `ord = -2q - (-3q) = q`. +, gives `ord = -2q - (-3q) = q`. This computes the order of the local-parameter image under `−π` directly (i.e., without going through the addition-pullback γ). For q ≥ 2 this gives ord ≥ 2, @@ -185,22 +136,22 @@ theorem ord_negFrobeniusIsog_pullback_localParam (hq : 2 ≤ Fintype.card K) : ring omit [Fintype K] in -/-- **`constantCoeff (formal id) = 0` (axiom-clean, scaffold extraction)**: +/-- **`constantCoeff (formal id) = 0` **: direct from `formalIsogenySeries_id = X`. -/ @[simp] theorem constantCoeff_formalIsogenySeries_id : PowerSeries.constantCoeff (formalIsogenySeries W (Isogeny.id W.toAffine)) = 0 := by rw [formalIsogenySeries_id, PowerSeries.constantCoeff_X] -/-- **`constantCoeff (formal frobenius) = 0` (axiom-clean, scaffold extraction)**: +/-- **`constantCoeff (formal frobenius) = 0` **: direct from `formalIsogenySeries_frobenius = X^q` for `q ≥ 1`. -/ @[simp] theorem constantCoeff_formalIsogenySeries_frobenius (h : 1 ≤ Fintype.card K) : PowerSeries.constantCoeff (formalIsogenySeries W (frobeniusIsog W)) = 0 := by rw [formalIsogenySeries_frobenius, ← PowerSeries.coeff_zero_eq_constantCoeff_apply, PowerSeries.coeff_X_pow] - exact if_neg (by omega) + exact ite_eq_right (by omega) -omit [Fintype K] in +omit [Fintype K] [WeierstrassCurve.IsElliptic W.toAffine] in /-- **Orderbound for denominator's lower terms**: the orderTop of `HahnSeries.C a₁ * formalX + HahnSeries.C a₃` is ≥ -2 in `LaurentSeries K` (since each term has orderTop ≥ -2). -/ @@ -225,7 +176,7 @@ private theorem orderTop_a₁_formalX_plus_a₃_ge_neg_two : · rw [HahnSeries.C_apply, HahnSeries.orderTop_single ha₃] exact_mod_cast (by norm_num : (-2 : ℤ) ≤ 0) -omit [Fintype K] in +omit [Fintype K] [WeierstrassCurve.IsElliptic W.toAffine] in /-- **orderTop of the localExpand of the denominator = -3**: in `LaurentSeries K`, `formalY + C a₁ * formalX + C a₃` has orderTop = -3, since `formalY` (orderTop = -3) strictly dominates the other terms @@ -244,8 +195,9 @@ theorem orderTop_localExpand_y_gen_plus_a₁_x_gen_plus_a₃ : refine lt_of_lt_of_le ?_ (orderTop_a₁_formalX_plus_a₃_ge_neg_two W) exact_mod_cast (by norm_num : (-3 : ℤ) < -2) +omit [Fintype K] in /-- **orderTop of `localExpand((mulByInt(-1)).pullback (localParam W)) = 1`** -(axiom-clean). The σ-image of the local parameter has orderTop = 1 in +. The σ-image of the local parameter has orderTop = 1 in `LaurentSeries K`: from the closed form `σ(t) = formalX / denom` (with `denom = formalY + C(a₁)·formalX + C(a₃)` in LaurentSeries K), and: * `orderTop formalX = -2` @@ -320,14 +272,8 @@ theorem coeff_one_formalIsogenySeries_negFrobeniusIsog_of_orderTop_witness exact_mod_cast (by linarith : (1 : ℤ) < (Fintype.card K : ℤ)) exact HahnSeries.coeff_eq_zero_of_lt_orderTop h_lt -/-- **`constantCoeff (formal negFrob) = 0` (axiom-clean, unconditional)** for q ≥ 1. - -Same orderTop argument as `coeff_one_formalIsogenySeries_negFrobeniusIsog_eq_zero`, -but for `coeff 0` (= constantCoeff). Holds for any q ≥ 1 (since orderTop ≥ q ≥ 1 > 0). - -This discharges the `h_β_const` hypothesis of -`formalIsogenySeries_add_coeff_one_via_FGL` (`FormalIsogenySeries.lean`) -for β = negFrobeniusIsog. -/ +/-- The formal series of negative Frobenius has zero constant coefficient: its order +is at least `q ≥ 1`. -/ @[simp] theorem constantCoeff_formalIsogenySeries_negFrobeniusIsog (hq : 1 ≤ Fintype.card K) : PowerSeries.constantCoeff (formalIsogenySeries W (negFrobeniusIsog W)) = 0 := by @@ -349,35 +295,16 @@ for β = negFrobeniusIsog. -/ exact_mod_cast (by linarith : (0 : ℤ) < (Fintype.card K : ℤ)) exact HahnSeries.coeff_eq_zero_of_lt_orderTop h_lt -/-- **`coeff 1 (formal negFrob) = 0` (axiom-clean, unconditional)** for q ≥ 2. - -Discharges the orderTop witness in -`coeff_one_formalIsogenySeries_negFrobeniusIsog_of_orderTop_witness` using -the axiom-clean `orderTop_localExpand_mulByInt_neg_one_pullback_localParam = 1`. - -This is the cascade collapse: with this `coeff 1 (formal negFrob) = 0` -in hand, the `h_negfrob` hypothesis of -`coeff_one_formalIsogenySeries_isogOneSub_negFrobenius_of_witnesses` -(helper 4 from previous batch) discharges, leaving only the BRIDGE-003 -leading-coefficient additivity to close IV.1.4 step 2 unconditionally. -/ +/-- Negative Frobenius has zero linear formal-series coefficient, since its parameter +pullback has order `q ≥ 2`. -/ theorem coeff_one_formalIsogenySeries_negFrobeniusIsog_eq_zero (hq : 2 ≤ Fintype.card K) : PowerSeries.coeff 1 (formalIsogenySeries W (negFrobeniusIsog W)) = 0 := coeff_one_formalIsogenySeries_negFrobeniusIsog_of_orderTop_witness W hq (orderTop_localExpand_mulByInt_neg_one_pullback_localParam W).symm.le -/-- **BRIDGE-001 for `negFrobeniusIsog` (axiom-clean, UNCONDITIONAL)** for q ≥ 2. - -Both sides equal 0: -* LHS: `omegaPullbackCoeff(negFrob) = 0` (axiom-clean, Differential.lean) -* RHS: `algebraMap (coeff 1 (formal negFrob)) = algebraMap 0 = 0` (axiom-clean, - prior commit `coeff_one_formalIsogenySeries_negFrobeniusIsog_eq_zero`). - -This BRIDGE-001 instance is one of the three needed by the additivity bridge -`omegaPullbackCoeff_add_of_leading_witness` for the -`γ = id + (-π)` case. Combined with `omegaPullbackCoeff_eq_formalIsogenyLeading_id` -(axiom-clean, FormalIsogenySeries.lean), the only remaining BRIDGE-001 is for -`γ = isogOneSub_negFrobenius` itself. -/ +/-- For negative Frobenius, the differential coefficient equals the image of the linear +formal-series coefficient: both are zero. -/ theorem omegaPullbackCoeff_eq_formalIsogenyLeading_negFrobeniusIsog (hq : 2 ≤ Fintype.card K) : omegaPullbackCoeff W (negFrobeniusIsog W) = @@ -386,21 +313,8 @@ theorem omegaPullbackCoeff_eq_formalIsogenyLeading_negFrobeniusIsog rw [coeff_one_formalIsogenySeries_negFrobeniusIsog_eq_zero W hq, map_zero] exact omegaPullbackCoeff_negFrobeniusIsog W -/-- **Leading-coefficient closure for `isogOneSub_negFrobenius` (axiom-clean, -witness-parametric)**: from -* the additivity decomposition `h_add : coeff 1 (formal (id + (-π))) = - coeff 1 (formal id) + coeff 1 (formal (-π))` (Silverman IV.1.4 / formal - group law leading-order additivity), and -* `h_negfrob : coeff 1 (formal (-π)) = 0` (Silverman III.5.5 inseparability - on `−π = mulByInt(-1) ∘ π`), -combine with the existing axiom-clean `coeff_one_formalIsogenySeries_id = 1` -to conclude `coeff 1 (formal (id + (-π))) = 1`. - -This is Silverman IV.1.4's substantive arithmetic content for the -`isogOneSub_negFrobenius` case, factored as a witness consumer that -plumbs the (still-missing) BRIDGE-003 leading-order additivity and the -(also missing but Frobenius-flavored) `(-π)` linear-coeff vanishing into -the closed-form `1 + 0 = 1`. -/ +/-- Linear-coefficient additivity and vanishing for negative Frobenius give linear +coefficient one for `1 − π`. -/ theorem coeff_one_formalIsogenySeries_isogOneSub_negFrobenius_of_witnesses (hq : 2 ≤ Fintype.card K) (h_add : PowerSeries.coeff 1 @@ -413,17 +327,8 @@ theorem coeff_one_formalIsogenySeries_isogOneSub_negFrobenius_of_witnesses (formalIsogenySeries W (isogOneSub_negFrobenius W hq)) = 1 := by rw [h_add, coeff_one_formalIsogenySeries_id, h_negfrob, add_zero] -/-- **IV.1.4 step 2: closer (axiom-clean, witness-parametric on h_add ONLY)**. - -With `coeff_one_formalIsogenySeries_negFrobeniusIsog_eq_zero` (axiom-clean -unconditional from the localExpand → orderTop bridge), `h_negfrob` is -discharged automatically. The remaining hypothesis `h_add` is the -BRIDGE-003 leading-coefficient additivity for the specific -`id + (-π)` decomposition. - -Once BRIDGE-003 is closed for this case, `coeff 1 (formal γ) = 1` ships -unconditionally and feeds directly into the omega-pullback Witness #1 -chain (commits 45-48). -/ +/-- Linear-coefficient additivity implies that the formal series of `1 − π` has linear +coefficient one. -/ theorem coeff_one_formalIsogenySeries_isogOneSub_negFrobenius_of_h_add (hq : 2 ≤ Fintype.card K) (h_add : PowerSeries.coeff 1 @@ -435,15 +340,8 @@ theorem coeff_one_formalIsogenySeries_isogOneSub_negFrobenius_of_h_add coeff_one_formalIsogenySeries_isogOneSub_negFrobenius_of_witnesses W hq h_add (coeff_one_formalIsogenySeries_negFrobeniusIsog_eq_zero W hq) -/-- **`coeff 1 (formal isogOneSub_negFrobenius) = 1` (axiom-clean, -witness-parametric on BRIDGE-003 for our case)**: given the BRIDGE-003 -identity `formal γ = subst F (formal id, formal negFrob)` for our case, -applies `coeff_one_subst_bivariate` (axiom-clean from FormalIsogenySeries.lean) -+ the formal group law's leading coefficients + the axiom-clean constantCoeff -witnesses to conclude. - -Closes IV.1.4 step 2 unconditionally up to one named witness: BRIDGE-003 for -`id + (-π)`. -/ +/-- If the formal series of `1 − π` is obtained by substituting those of the identity +and negative Frobenius into the formal group law, its linear coefficient is one. -/ theorem coeff_one_formalIsogenySeries_isogOneSub_negFrobenius_via_bridge_003 (hq : 2 ≤ Fintype.card K) (h_bridge_003 : @@ -467,21 +365,8 @@ theorem coeff_one_formalIsogenySeries_isogOneSub_negFrobenius_via_bridge_003 rw [coeff_one_formalIsogenySeries_id W, coeff_one_formalIsogenySeries_negFrobeniusIsog_eq_zero W hq, add_zero] -/-- **Witness #1 omega-coefficient closer (axiom-clean, witness-parametric on -BRIDGE-001 for γ + leading-additivity)**: takes BRIDGE-001 for the addition -isogeny γ = `isogOneSub_negFrobenius` and the leading-coefficient additivity -for `id + (-π)`, and produces `omegaPullbackCoeff(γ) = 1`. - -Composes: -* `omegaPullbackCoeff_add_of_leading_witness` (axiom-clean, FormalIsogenySeries.lean) -* `omegaPullbackCoeff_eq_formalIsogenyLeading_id` (axiom-clean) -* `omegaPullbackCoeff_eq_formalIsogenyLeading_negFrobeniusIsog` (axiom-clean, - this file) -* `omegaPullbackCoeff_id`, `omegaPullbackCoeff_negFrobeniusIsog` - (axiom-clean, prior commits) - -Result: `omegaPullbackCoeff(γ) = omegaPullbackCoeff(id) + omegaPullbackCoeff(negFrob) -= 1 + 0 = 1`. -/ +/-- Equality of the differential and linear formal-series coefficients for `1 − π`, +together with linear-coefficient additivity, gives differential coefficient one. -/ theorem omegaPullbackCoeff_isogOneSub_negFrobenius_eq_one_of_bridge_and_leading (hq : 2 ≤ Fintype.card K) (h_bridge_γ : omegaPullbackCoeff W (isogOneSub_negFrobenius W hq) = @@ -500,12 +385,8 @@ theorem omegaPullbackCoeff_isogOneSub_negFrobenius_eq_one_of_bridge_and_leading rw [h_omega_add, omegaPullbackCoeff_id W, omegaPullbackCoeff_negFrobeniusIsog W, add_zero] -/-- **Witness #1 (witness-parametric on BRIDGE-001 for γ + leading-additivity, -axiom-clean)**: separability of `isogOneSub_negFrobenius W hq`, taking only -the BRIDGE-001 for γ + leading-coefficient additivity. T-II-4-004 absorbed. - -Once BRIDGE-001 for γ + the leading-additivity (= BRIDGE-003 specialization) -land, this fires the unconditional Witness #1 of the Hasse-Weil bound. -/ +/-- The differential/formal-series coefficient identity and linear-coefficient +additivity imply separability of `1 − π`. -/ theorem isogOneSub_negFrobenius_isSeparable_of_bridge_and_leading (hq : 2 ≤ Fintype.card K) (h_bridge_γ : omegaPullbackCoeff W (isogOneSub_negFrobenius W hq) = @@ -520,17 +401,8 @@ theorem isogOneSub_negFrobenius_isSeparable_of_bridge_and_leading (omegaPullbackCoeff_isogOneSub_negFrobenius_eq_one_of_bridge_and_leading W hq h_bridge_γ h_leading_add) -/-- **Witness #1 closer (axiom-clean) taking BRIDGE-001 for γ + BRIDGE-003 -for our case**: with both substantive witnesses in hand, produces -`(isogOneSub_negFrobenius W hq).IsSeparable`. - -Chain: -1. BRIDGE-003 for our case → `coeff 1 (formal γ) = 1` - (via `coeff_one_formalIsogenySeries_isogOneSub_negFrobenius_via_bridge_003`). -2. Leading-additivity follows trivially: `1 = 1 + 0`. -3. BRIDGE-001 for γ + leading-additivity → `omegaPullbackCoeff(γ) = 1` - (via the existing `isogOneSub_negFrobenius_isSeparable_of_bridge_and_leading`). -4. T-II-4-004 (axiom-clean) → IsSeparable. -/ +/-- A formal group law substitution identity and equality of the differential and +linear formal-series coefficients imply separability of `1 − π`. -/ theorem isogOneSub_negFrobenius_isSeparable_of_bridge_001_γ_and_bridge_003 (hq : 2 ≤ Fintype.card K) (h_bridge_001_γ : omegaPullbackCoeff W (isogOneSub_negFrobenius W hq) = @@ -557,12 +429,8 @@ theorem isogOneSub_negFrobenius_isSeparable_of_bridge_001_γ_and_bridge_003 exact isogOneSub_negFrobenius_isSeparable_of_bridge_and_leading W hq h_bridge_001_γ h_leading_add -/-- **omegaPullbackCoeff(γ) = 1 axiom-clean given BRIDGE-001 for γ + BRIDGE-003 for our case**. -Direct consequence: derives `coeff 1 (formal γ) = 1` from BRIDGE-003 via the -just-shipped via_bridge_003 closer, then leading-additivity follows trivially -(both sides = 1), then the existing -`omegaPullbackCoeff_isogOneSub_negFrobenius_eq_one_of_bridge_and_leading` -fires. -/ +/-- Formal group law substitution and the differential/formal-series coefficient +identity give differential coefficient one for `1 − π`. -/ theorem omegaPullbackCoeff_isogOneSub_negFrobenius_eq_one_via_bridge_001_γ_and_bridge_003 (hq : 2 ≤ Fintype.card K) (h_bridge_001_γ : omegaPullbackCoeff W (isogOneSub_negFrobenius W hq) = @@ -589,14 +457,15 @@ theorem omegaPullbackCoeff_isogOneSub_negFrobenius_eq_one_via_bridge_001_γ_and_ exact omegaPullbackCoeff_isogOneSub_negFrobenius_eq_one_of_bridge_and_leading W hq h_bridge_001_γ h_leading_add -/-- **Sub-helper 1**: `localExpand(x_gen - π·x_gen) = formalX - formalX^q` -(axiom-clean). Direct from `localExpand` ring hom + `frobeniusIsog_pullback_apply`. -/ +/-- `localExpand(x_gen - π·x_gen) = formalX - formalX^q` +. Direct from `localExpand` ring hom + `frobeniusIsog_pullback_apply`. -/ theorem localExpand_x_gen_sub_frobenius_pullback_x_gen : localExpand W (x_gen W - (frobeniusIsog W).pullback (x_gen W)) = formalX W - (formalX W) ^ Fintype.card K := by rw [frobeniusIsog_pullback_apply, map_sub, map_pow, localExpand_x_gen] -/-- **Sub-helper 2**: `(formalX - formalX^q).orderTop = -2q` for q ≥ 2. +omit [DecidableEq K] [WeierstrassCurve.IsElliptic W.toAffine] in +/-- `(formalX - formalX^q).orderTop = -2q` for q ≥ 2. For q ≥ 2, `formalX^q` strictly dominates `formalX` (orderTop -2q < -2), so by `orderTop_add_eq_right`, the sum's orderTop = orderTop(-formalX^q) = -2q. -/ theorem orderTop_formalX_sub_formalX_pow (hq : 2 ≤ Fintype.card K) : @@ -620,14 +489,15 @@ theorem orderTop_formalX_sub_formalX_pow (hq : 2 ≤ Fintype.card K) : nlinarith rw [HahnSeries.orderTop_add_eq_right h_lt, hX_neg_pow_orderTop] -/-- **Sub-helper 3**: `localExpand((x_gen - π·x_gen)²) = (formalX - formalX^q)²`. +/-- `localExpand((x_gen - π·x_gen)²) = (formalX - formalX^q)²`. Direct from `localExpand` ring hom + `localExpand_x_gen_sub_frobenius_pullback_x_gen`. -/ theorem localExpand_x_gen_sub_frob_pullback_x_gen_sq : localExpand W ((x_gen W - (frobeniusIsog W).pullback (x_gen W)) ^ 2) = (formalX W - (formalX W) ^ Fintype.card K) ^ 2 := by rw [map_pow, localExpand_x_gen_sub_frobenius_pullback_x_gen] -/-- **Sub-helper 4**: `((formalX - formalX^q)²).orderTop = -4q` for q ≥ 2. +omit [DecidableEq K] [WeierstrassCurve.IsElliptic W.toAffine] in +/-- `((formalX - formalX^q)²).orderTop = -4q` for q ≥ 2. By `orderTop_mul` + `orderTop_formalX_sub_formalX_pow`. -/ theorem orderTop_formalX_sub_formalX_pow_sq (hq : 2 ≤ Fintype.card K) : ((formalX W - (formalX W) ^ Fintype.card K) ^ 2 : LaurentSeries K).orderTop = @@ -641,7 +511,7 @@ theorem orderTop_formalX_sub_formalX_pow_sq (hq : 2 ≤ Fintype.card K) : congr 1 ring -/-- **Sub-helper 5**: `localExpand(x_gen · (π·x_gen)²) = formalX^(2q+1)`. +/-- `localExpand(x_gen · (π·x_gen)²) = formalX^(2q+1)`. The dominant term of `addPullbackNumerator_reduced_negFrobenius` at infinity. -/ theorem localExpand_x_gen_mul_frob_pullback_x_gen_sq : localExpand W (x_gen W * (frobeniusIsog W).pullback (x_gen W) ^ 2) = @@ -649,7 +519,8 @@ theorem localExpand_x_gen_mul_frob_pullback_x_gen_sq : rw [frobeniusIsog_pullback_apply, ← pow_mul, map_mul, map_pow, localExpand_x_gen] ring -/-- **Sub-helper 6**: `(formalX^(2q+1)).orderTop = -4q - 2` for q ≥ 1. +omit [DecidableEq K] [WeierstrassCurve.IsElliptic W.toAffine] in +/-- `(formalX^(2q+1)).orderTop = -4q - 2` for q ≥ 1. Direct from `formalX_pow_orderTop`. -/ theorem orderTop_formalX_pow_two_q_plus_one : ((formalX W) ^ (2 * Fintype.card K + 1) : LaurentSeries K).orderTop = @@ -659,13 +530,14 @@ theorem orderTop_formalX_pow_two_q_plus_one : push_cast ring -/-- **Sub-helper 7**: `(formalX^(2q+1)).leadingCoeff = 1`. +omit [DecidableEq K] [WeierstrassCurve.IsElliptic W.toAffine] in +/-- `(formalX^(2q+1)).leadingCoeff = 1`. Direct from `formalX_pow_leadingCoeff`. -/ theorem leadingCoeff_formalX_pow_two_q_plus_one : ((formalX W) ^ (2 * Fintype.card K + 1) : LaurentSeries K).leadingCoeff = 1 := formalX_pow_leadingCoeff W (2 * Fintype.card K + 1) -/-- **Sub-helper 8**: `(localExpand(x_gen · (π·x_gen)²)).orderTop = -2 - 4q`. Composes +/-- `(localExpand(x_gen · (π·x_gen)²)).orderTop = -2 - 4q`. Composes the dominant-term identification with the orderTop computation. -/ theorem orderTop_localExpand_x_gen_mul_frob_pullback_x_gen_sq : (localExpand W (x_gen W * (frobeniusIsog W).pullback (x_gen W) ^ 2)).orderTop = @@ -673,7 +545,7 @@ theorem orderTop_localExpand_x_gen_mul_frob_pullback_x_gen_sq : rw [localExpand_x_gen_mul_frob_pullback_x_gen_sq W] exact orderTop_formalX_pow_two_q_plus_one W -/-- **Sub-helper 9**: `(localExpand(x_gen · (π·x_gen)²)).leadingCoeff = 1`. The +/-- `(localExpand(x_gen · (π·x_gen)²)).leadingCoeff = 1`. The leading coefficient at infinity of the dominant term is 1 (rather than 0 or some other value), which feeds into the leading-coefficient analysis for `addPullback_x` and ultimately `coeff 1 (formal γ) = 1`. -/ @@ -682,8 +554,8 @@ theorem leadingCoeff_localExpand_x_gen_mul_frob_pullback_x_gen_sq : rw [localExpand_x_gen_mul_frob_pullback_x_gen_sq W] exact leadingCoeff_formalX_pow_two_q_plus_one W -omit [Fintype K] in -/-- **Sub-helper 10**: `(formalY^n).orderTop = -3 * n`. +omit [Fintype K] [DecidableEq K] [WeierstrassCurve.IsElliptic W.toAffine] in +/-- `(formalY^n).orderTop = -3 * n`. Mirror of `formalX_pow_orderTop`. -/ theorem formalY_pow_orderTop (n : ℕ) : ((formalY W) ^ n : LaurentSeries K).orderTop = @@ -704,14 +576,15 @@ theorem formalY_pow_orderTop (n : ℕ) : push_cast ring -/-- **Sub-helper 11**: `localExpand(y_gen · π·y_gen) = formalY · formalY^q`. +/-- `localExpand(y_gen · π·y_gen) = formalY · formalY^q`. Direct from `localExpand` ring hom + `frobeniusIsog_pullback_apply`. -/ theorem localExpand_y_gen_mul_frob_pullback_y_gen : localExpand W (y_gen W * (frobeniusIsog W).pullback (y_gen W)) = formalY W * (formalY W) ^ Fintype.card K := by rw [frobeniusIsog_pullback_apply, map_mul, map_pow, localExpand_y_gen] -/-- **Sub-helper 12**: `(formalY · formalY^q).orderTop = -3 - 3q` for q ≥ 1. +omit [DecidableEq K] [WeierstrassCurve.IsElliptic W.toAffine] in +/-- `(formalY · formalY^q).orderTop = -3 - 3q` for q ≥ 1. Direct from `orderTop_mul` + `formalY_orderTop` + `formalY_pow_orderTop`. -/ theorem orderTop_formalY_mul_formalY_pow : (formalY W * (formalY W) ^ Fintype.card K : LaurentSeries K).orderTop = @@ -719,7 +592,7 @@ theorem orderTop_formalY_mul_formalY_pow : rw [HahnSeries.orderTop_mul, formalY_orderTop, formalY_pow_orderTop, ← WithTop.coe_add, show ((-3 : ℤ) + -3 * (Fintype.card K : ℤ)) = -3 - 3 * (Fintype.card K : ℤ) from by ring] -/-- **Sub-helper 13**: `localExpand(x_gen² · π·x_gen) = formalX^(q+2)`. +/-- `localExpand(x_gen² · π·x_gen) = formalX^(q+2)`. The "term 6" of `addPullbackNumerator_reduced_negFrobenius`: `x² · π·x` with orderTop -4 - 2q (sub-dominant). -/ theorem localExpand_x_gen_sq_mul_frob_pullback_x_gen : @@ -729,7 +602,8 @@ theorem localExpand_x_gen_sq_mul_frob_pullback_x_gen : congr 1 ring -/-- **Sub-helper 14**: `(formalX^(q+2)).orderTop = -4 - 2q`. -/ +omit [DecidableEq K] [WeierstrassCurve.IsElliptic W.toAffine] in +/-- `(formalX^(q+2)).orderTop = -4 - 2q`. -/ theorem orderTop_formalX_pow_q_plus_two : ((formalX W) ^ (Fintype.card K + 2) : LaurentSeries K).orderTop = (((-4 - 2 * (Fintype.card K : ℤ)) : ℤ) : WithTop ℤ) := by @@ -738,7 +612,7 @@ theorem orderTop_formalX_pow_q_plus_two : push_cast ring -/-- **Sub-helper 15**: `localExpand(x_gen · π·x_gen) = formalX^(q+1)`. +/-- `localExpand(x_gen · π·x_gen) = formalX^(q+1)`. The "x · π·x" component (used in term 8 of `addPullbackNumerator_reduced`). -/ theorem localExpand_x_gen_mul_frob_pullback_x_gen : localExpand W (x_gen W * (frobeniusIsog W).pullback (x_gen W)) = @@ -746,7 +620,8 @@ theorem localExpand_x_gen_mul_frob_pullback_x_gen : rw [frobeniusIsog_pullback_apply, map_mul, map_pow, localExpand_x_gen, show Fintype.card K + 1 = 1 + Fintype.card K from by ring, pow_add, pow_one] -/-- **Sub-helper 16**: `(formalX^(q+1)).orderTop = -2 - 2q`. -/ +omit [DecidableEq K] [WeierstrassCurve.IsElliptic W.toAffine] in +/-- `(formalX^(q+1)).orderTop = -2 - 2q`. -/ theorem orderTop_formalX_pow_q_plus_one : ((formalX W) ^ (Fintype.card K + 1) : LaurentSeries K).orderTop = (((-2 - 2 * (Fintype.card K : ℤ)) : ℤ) : WithTop ℤ) := by @@ -755,14 +630,15 @@ theorem orderTop_formalX_pow_q_plus_one : push_cast ring -/-- **Sub-helper 17**: `localExpand(x_gen + π·x_gen) = formalX + formalX^q`. +/-- `localExpand(x_gen + π·x_gen) = formalX + formalX^q`. Term 1's "x + π·x" component (used in `a₄ · (x + π·x)`). -/ theorem localExpand_x_gen_add_frob_pullback_x_gen : localExpand W (x_gen W + (frobeniusIsog W).pullback (x_gen W)) = formalX W + (formalX W) ^ Fintype.card K := by rw [frobeniusIsog_pullback_apply, map_add, map_pow, localExpand_x_gen] -/-- **Sub-helper 18**: `(formalX + formalX^q).orderTop ≥ -2q` for q ≥ 1. +omit [DecidableEq K] [WeierstrassCurve.IsElliptic W.toAffine] in +/-- `(formalX + formalX^q).orderTop ≥ -2q` for q ≥ 1. Via `min_orderTop_le_orderTop_add` + `formalX_orderTop` + `formalX_pow_orderTop`. -/ theorem orderTop_formalX_add_formalX_pow_ge_neg_two_q (hq : 2 ≤ Fintype.card K) : (((-2 * (Fintype.card K : ℤ)) : ℤ) : WithTop ℤ) ≤ @@ -777,14 +653,15 @@ theorem orderTop_formalX_add_formalX_pow_ge_neg_two_q (hq : 2 ≤ Fintype.card K · -- -2q ≤ orderTop formalX^q = -2q rw [formalX_pow_orderTop] -/-- **Sub-helper 19**: `localExpand(y_gen + π·y_gen) = formalY + formalY^q`. +/-- `localExpand(y_gen + π·y_gen) = formalY + formalY^q`. Term 3's "y + π·y" component (used in `a₃ · (y + π·y)`). -/ theorem localExpand_y_gen_add_frob_pullback_y_gen : localExpand W (y_gen W + (frobeniusIsog W).pullback (y_gen W)) = formalY W + (formalY W) ^ Fintype.card K := by rw [frobeniusIsog_pullback_apply, map_add, map_pow, localExpand_y_gen] -/-- **Sub-helper 20**: `(formalY + formalY^q).orderTop ≥ -3q` for q ≥ 1. +omit [DecidableEq K] [WeierstrassCurve.IsElliptic W.toAffine] in +/-- `(formalY + formalY^q).orderTop ≥ -3q` for q ≥ 1. Via `min_orderTop_le_orderTop_add` + `formalY_orderTop` + `formalY_pow_orderTop`. -/ theorem orderTop_formalY_add_formalY_pow_ge_neg_three_q (hq : 2 ≤ Fintype.card K) : (((-3 * (Fintype.card K : ℤ)) : ℤ) : WithTop ℤ) ≤ @@ -797,13 +674,14 @@ theorem orderTop_formalY_add_formalY_pow_ge_neg_three_q (hq : 2 ≤ Fintype.card nlinarith · rw [formalY_pow_orderTop] -/-- **Sub-helper 21**: `localExpand(x · π·y) = formalX · formalY^q`. -/ +/-- `localExpand(x · π·y) = formalX · formalY^q`. -/ theorem localExpand_x_gen_mul_frob_pullback_y_gen : localExpand W (x_gen W * (frobeniusIsog W).pullback (y_gen W)) = formalX W * (formalY W) ^ Fintype.card K := by rw [frobeniusIsog_pullback_apply, map_mul, map_pow, localExpand_x_gen, localExpand_y_gen] -/-- **Sub-helper 22**: `(formalX · formalY^q).orderTop = -2 - 3q`. -/ +omit [DecidableEq K] [WeierstrassCurve.IsElliptic W.toAffine] in +/-- `(formalX · formalY^q).orderTop = -2 - 3q`. -/ theorem orderTop_formalX_mul_formalY_pow : (formalX W * (formalY W) ^ Fintype.card K : LaurentSeries K).orderTop = (((-2 - 3 * (Fintype.card K : ℤ)) : ℤ) : WithTop ℤ) := by @@ -811,13 +689,14 @@ theorem orderTop_formalX_mul_formalY_pow : show ((-2 : ℤ) + (-3 : ℤ) * (Fintype.card K : ℤ)) = -2 - 3 * (Fintype.card K : ℤ) from by ring] -/-- **Sub-helper 23**: `localExpand(π·x · y) = formalX^q · formalY`. -/ +/-- `localExpand(π·x · y) = formalX^q · formalY`. -/ theorem localExpand_frob_pullback_x_gen_mul_y_gen : localExpand W ((frobeniusIsog W).pullback (x_gen W) * y_gen W) = (formalX W) ^ Fintype.card K * formalY W := by rw [frobeniusIsog_pullback_apply, map_mul, map_pow, localExpand_x_gen, localExpand_y_gen] -/-- **Sub-helper 24**: `(formalX^q · formalY).orderTop = -3 - 2q`. -/ +omit [DecidableEq K] [WeierstrassCurve.IsElliptic W.toAffine] in +/-- `(formalX^q · formalY).orderTop = -3 - 2q`. -/ theorem orderTop_formalX_pow_mul_formalY : ((formalX W) ^ Fintype.card K * formalY W : LaurentSeries K).orderTop = (((-3 - 2 * (Fintype.card K : ℤ)) : ℤ) : WithTop ℤ) := by @@ -825,7 +704,8 @@ theorem orderTop_formalX_pow_mul_formalY : show ((-2 : ℤ) * (Fintype.card K : ℤ) + (-3 : ℤ)) = -3 - 2 * (Fintype.card K : ℤ) from by ring] -/-- **Sub-helper 25**: `(formalX·formalY^q + formalX^q·formalY).orderTop ≥ -2 - 3q` +omit [DecidableEq K] [WeierstrassCurve.IsElliptic W.toAffine] in +/-- `(formalX·formalY^q + formalX^q·formalY).orderTop ≥ -2 - 3q` for q ≥ 2. Via `min_orderTop_le_orderTop_add`, since `-2-3q ≤ min(-2-3q, -3-2q)` for q ≥ 2. -/ theorem orderTop_formalX_mul_formalY_pow_plus_formalX_pow_mul_formalY_ge (hq : 2 ≤ Fintype.card K) : @@ -841,7 +721,7 @@ theorem orderTop_formalX_mul_formalY_pow_plus_formalX_pow_mul_formalY_ge nlinarith omit [Fintype K] in -/-- **Sub-helper 26**: `(HahnSeries.C c).orderTop ≥ 0` for any `c : K`. +/-- `(HahnSeries.C c).orderTop ≥ 0` for any `c : K`. Helper for term 2 (`2·a₆`) and similar constant-coefficient bounds. -/ theorem orderTop_HahnSeries_C_ge_zero (c : K) : (0 : WithTop ℤ) ≤ (HahnSeries.C c : LaurentSeries K).orderTop := by @@ -851,8 +731,8 @@ theorem orderTop_HahnSeries_C_ge_zero (c : K) : · rw [HahnSeries.C_apply, HahnSeries.orderTop_single hc] rfl -omit [Fintype K] in -/-- **Sub-helper 27**: `localExpand W (algebraMap K KE c) = HahnSeries.C c`. +omit [Fintype K] [WeierstrassCurve.IsElliptic W.toAffine] in +/-- `localExpand W (algebraMap K KE c) = HahnSeries.C c`. Direct from `localExpand_algebraMap` + `HahnSeries.ofPowerSeries_C`. The constant-coefficient bridge: `algebraMap K KE` factors through `localExpand` to give a constant Hahn series. -/ @@ -861,8 +741,8 @@ theorem localExpand_algebraMap_eq_C (c : K) : rw [localExpand_algebraMap] exact HahnSeries.ofPowerSeries_C c -omit [Fintype K] in -/-- **Sub-helper 28**: `(localExpand W (algebraMap K KE c * f)).orderTop ≥ +omit [Fintype K] [WeierstrassCurve.IsElliptic W.toAffine] in +/-- `(localExpand W (algebraMap K KE c * f)).orderTop ≥ (localExpand W f).orderTop`. The constant factor `algebraMap K KE c` has orderTop ≥ 0 in the local expansion (it's a constant Hahn series), so multiplication by it does not decrease the orderTop. Bridge for terms 1, 3, 5 @@ -877,8 +757,8 @@ theorem orderTop_localExpand_algebraMap_mul_ge (c : K) (f : KE) : _ ≤ (HahnSeries.C c : LaurentSeries K).orderTop + (localExpand W f).orderTop := by gcongr -omit [Fintype K] in -/-- **Sub-helper 29**: `(localExpand W (2 * f)).orderTop ≥ (localExpand W f).orderTop`. +omit [Fintype K] [WeierstrassCurve.IsElliptic W.toAffine] in +/-- `(localExpand W (2 * f)).orderTop ≥ (localExpand W f).orderTop`. Bridge for terms 4, 7 of `addPullbackNumerator_reduced_negFrobenius` (the `2·...` terms). Uses `2 * f = f + f` to dodge characteristic-2 considerations. -/ theorem orderTop_localExpand_two_mul_ge (f : KE) : @@ -887,15 +767,14 @@ theorem orderTop_localExpand_two_mul_ge (f : KE) : refine le_trans ?_ HahnSeries.min_orderTop_le_orderTop_add exact le_min (le_refl _) (le_refl _) -omit [Fintype K] in -/-- **Sub-helper 30**: `(localExpand W (-f)).orderTop = (localExpand W f).orderTop`. +omit [Fintype K] [WeierstrassCurve.IsElliptic W.toAffine] in +/-- `(localExpand W (-f)).orderTop = (localExpand W f).orderTop`. Negation preserves orderTop. -/ theorem orderTop_localExpand_neg (f : KE) : (localExpand W (-f)).orderTop = (localExpand W f).orderTop := by rw [map_neg, HahnSeries.orderTop_neg] -/-- **Sub-helper 31**: -`localExpand((negFrob).pullback y_gen) = -formalY^q - C(a₁)·formalX^q - C(a₃)`. +/-- `localExpand((negFrob).pullback y_gen) = -formalY^q - C(a₁)·formalX^q - C(a₃)`. Direct from `negFrobeniusIsog_pullback_y_gen` + ring-hom facts. -/ theorem localExpand_negFrobeniusIsog_pullback_y_gen : localExpand W ((negFrobeniusIsog W).pullback (y_gen W)) = @@ -907,7 +786,8 @@ theorem localExpand_negFrobeniusIsog_pullback_y_gen : localExpand_y_gen, localExpand_x_gen, localExpand_algebraMap_eq_C, localExpand_algebraMap_eq_C] -/-- **Sub-helper 32**: `(C(a₁)·formalX^q + C(a₃)).orderTop ≥ -2q` for q ≥ 1. -/ +omit [WeierstrassCurve.IsElliptic W.toAffine] in +/-- `(C(a₁)·formalX^q + C(a₃)).orderTop ≥ -2q` for q ≥ 1. -/ theorem orderTop_C_a₁_mul_formalX_pow_plus_C_a₃_ge : (((-2 * (Fintype.card K : ℤ)) : ℤ) : WithTop ℤ) ≤ (HahnSeries.C W.a₁ * (formalX W) ^ Fintype.card K + @@ -929,7 +809,7 @@ theorem orderTop_C_a₁_mul_formalX_pow_plus_C_a₃_ge : have : (Fintype.card K : ℤ) ≥ 0 := by positivity nlinarith -/-- **Sub-helper 33**: `(localExpand((negFrob).pullback y_gen)).orderTop = -3q` +/-- `(localExpand((negFrob).pullback y_gen)).orderTop = -3q` for q ≥ 2. The `formalY^q` term dominates strictly. -/ theorem orderTop_localExpand_negFrobeniusIsog_pullback_y_gen (hq : 2 ≤ Fintype.card K) : @@ -962,8 +842,8 @@ theorem orderTop_localExpand_negFrobeniusIsog_pullback_y_gen nlinarith rw [HahnSeries.orderTop_add_eq_left h_lt, h_neg_y_pow] -omit [Fintype K] in -/-- **Sub-helper 34**: `(C(a₃) · formalY).orderTop ≥ -3` for q ≥ 1. -/ +omit [Fintype K] [WeierstrassCurve.IsElliptic W.toAffine] in +/-- `(C(a₃) · formalY).orderTop ≥ -3` for q ≥ 1. -/ theorem orderTop_C_a₃_mul_formalY_ge : (((-3 : ℤ)) : WithTop ℤ) ≤ (HahnSeries.C W.a₃ * formalY W : LaurentSeries K).orderTop := by @@ -974,7 +854,8 @@ theorem orderTop_C_a₃_mul_formalY_ge : · rw [HahnSeries.C_apply, HahnSeries.orderTop_single ha₃, show ((0 : ℤ) : WithTop ℤ) = (0 : WithTop ℤ) from rfl, zero_add] -/-- **Sub-helper 35**: `(C(a₁) · (formalY · formalX^q)).orderTop ≥ -2-3q` +omit [WeierstrassCurve.IsElliptic W.toAffine] in +/-- `(C(a₁) · (formalY · formalX^q)).orderTop ≥ -2-3q` for q ≥ 1. -/ theorem orderTop_C_a₁_mul_formalY_mul_formalX_pow_ge (hq : 1 ≤ Fintype.card K) : (((-2 - 3 * (Fintype.card K : ℤ)) : ℤ) : WithTop ℤ) ≤ @@ -995,7 +876,7 @@ theorem orderTop_C_a₁_mul_formalY_mul_formalX_pow_ge (hq : 1 ≤ Fintype.card have h_q : (1 : ℤ) ≤ (Fintype.card K : ℤ) := by exact_mod_cast hq omega -/-- **Sub-helper 36**: `localExpand(y · negFrob.π·y) = -formalY · formalY^q - +/-- `localExpand(y · negFrob.π·y) = -formalY · formalY^q - C(a₁) · (formalY · formalX^q) - C(a₃) · formalY`. -/ theorem localExpand_y_gen_mul_negFrobeniusIsog_pullback_y_gen : localExpand W (y_gen W * (negFrobeniusIsog W).pullback (y_gen W)) = @@ -1005,11 +886,11 @@ theorem localExpand_y_gen_mul_negFrobeniusIsog_pullback_y_gen : rw [map_mul, localExpand_negFrobeniusIsog_pullback_y_gen, localExpand_y_gen] ring -/-- **Sub-helper 37**: `(localExpand(y · negFrob.π·y)).orderTop ≥ -3-3q` for q ≥ 2. +/-- `(localExpand(y · negFrob.π·y)).orderTop ≥ -3-3q` for q ≥ 2. Each of the three terms has orderTop ≥ -3-3q: -* `-formalY · formalY^q`: = -3-3q (sub-helper 12). -* `-C(a₁) · (formalY · formalX^q)`: ≥ -2-3q ≥ -3-3q (sub-helper 35). -* `-C(a₃) · formalY`: ≥ -3 ≥ -3-3q for q ≥ 0 (sub-helper 34). -/ +* `-formalY · formalY^q`: = -3-3q. +* `-C(a₁) · (formalY · formalX^q)`: ≥ -2-3q ≥ -3-3q. +* `-C(a₃) · formalY`: ≥ -3 ≥ -3-3q for q ≥ 0. -/ theorem orderTop_localExpand_y_gen_mul_negFrobeniusIsog_pullback_y_gen_ge (hq : 2 ≤ Fintype.card K) : (((-3 - 3 * (Fintype.card K : ℤ)) : ℤ) : WithTop ℤ) ≤ @@ -1041,7 +922,7 @@ theorem orderTop_localExpand_y_gen_mul_negFrobeniusIsog_pullback_y_gen_ge have h_q_nn : (0 : ℤ) ≤ (Fintype.card K : ℤ) := by positivity linarith -/-- **Sub-helper 38**: `(localExpand(y_gen + (negFrob).pullback y_gen)).orderTop = -3q` +/-- `(localExpand(y_gen + (negFrob).pullback y_gen)).orderTop = -3q` for q ≥ 2. The `(negFrob).pullback y_gen` part dominates strictly (orderTop -3q < -3 for q ≥ 2). -/ theorem orderTop_localExpand_y_gen_add_negFrobeniusIsog_pullback_y_gen @@ -1063,7 +944,7 @@ theorem orderTop_localExpand_y_gen_add_negFrobeniusIsog_pullback_y_gen nlinarith rw [HahnSeries.orderTop_add_eq_right h_lt, h_negFrob_y] -/-- **Sub-helper 39**: `(localExpand(a₃ · (y_gen + (negFrob).pullback y_gen))).orderTop ≥ -3q`. -/ +/-- `(localExpand(a₃ · (y_gen + (negFrob).pullback y_gen))).orderTop ≥ -3q`. -/ theorem orderTop_localExpand_a₃_mul_y_gen_add_negFrobeniusIsog_pullback_y_gen_ge (hq : 2 ≤ Fintype.card K) : (((-3 * (Fintype.card K : ℤ)) : ℤ) : WithTop ℤ) ≤ @@ -1072,7 +953,7 @@ theorem orderTop_localExpand_a₃_mul_y_gen_add_negFrobeniusIsog_pullback_y_gen_ refine le_trans ?_ (orderTop_localExpand_algebraMap_mul_ge W W.a₃ _) rw [orderTop_localExpand_y_gen_add_negFrobeniusIsog_pullback_y_gen W hq] -/-- **Sub-helper 40**: `(localExpand(x_gen + (negFrob).pullback x_gen)).orderTop ≥ -2q` +/-- `(localExpand(x_gen + (negFrob).pullback x_gen)).orderTop ≥ -2q` for q ≥ 2. Uses the fact that `(negFrob).pullback x_gen = (frob).pullback x_gen`. -/ theorem orderTop_localExpand_x_gen_add_negFrobeniusIsog_pullback_x_gen_ge (hq : 2 ≤ Fintype.card K) : @@ -1082,7 +963,7 @@ theorem orderTop_localExpand_x_gen_add_negFrobeniusIsog_pullback_x_gen_ge rw [negFrobeniusIsog_pullback_x_gen, localExpand_x_gen_add_frob_pullback_x_gen] exact orderTop_formalX_add_formalX_pow_ge_neg_two_q W hq -/-- **Sub-helper 41**: `(localExpand(a₄ · (x_gen + (negFrob).pullback x_gen))).orderTop ≥ -2q`. -/ +/-- `(localExpand(a₄ · (x_gen + (negFrob).pullback x_gen))).orderTop ≥ -2q`. -/ theorem orderTop_localExpand_a₄_mul_x_gen_add_negFrobeniusIsog_pullback_x_gen_ge (hq : 2 ≤ Fintype.card K) : (((-2 * (Fintype.card K : ℤ)) : ℤ) : WithTop ℤ) ≤ @@ -1091,8 +972,8 @@ theorem orderTop_localExpand_a₄_mul_x_gen_add_negFrobeniusIsog_pullback_x_gen_ refine le_trans ?_ (orderTop_localExpand_algebraMap_mul_ge W W.a₄ _) exact orderTop_localExpand_x_gen_add_negFrobeniusIsog_pullback_x_gen_ge W hq -omit [Fintype K] in -/-- **Sub-helper 42**: `(localExpand(2·a₆)).orderTop ≥ 0`. -/ +omit [Fintype K] [WeierstrassCurve.IsElliptic W.toAffine] in +/-- `(localExpand(2·a₆)).orderTop ≥ 0`. -/ theorem orderTop_localExpand_two_mul_a₆_ge : (0 : WithTop ℤ) ≤ (localExpand W ((2 : W.toAffine.FunctionField) * @@ -1101,7 +982,7 @@ theorem orderTop_localExpand_two_mul_a₆_ge : rw [localExpand_algebraMap_eq_C] exact orderTop_HahnSeries_C_ge_zero W.a₆ -/-- **Sub-helper 43**: `(localExpand(2 · y_gen · (negFrob).π·y)).orderTop ≥ -3-3q`. -/ +/-- `(localExpand(2 · y_gen · (negFrob).π·y)).orderTop ≥ -3-3q`. -/ theorem orderTop_localExpand_two_mul_y_gen_mul_negFrob_π_y_ge (hq : 2 ≤ Fintype.card K) : (((-3 - 3 * (Fintype.card K : ℤ)) : ℤ) : WithTop ℤ) ≤ @@ -1114,7 +995,7 @@ theorem orderTop_localExpand_two_mul_y_gen_mul_negFrob_π_y_ge refine le_trans ?_ (orderTop_localExpand_two_mul_ge W _) exact orderTop_localExpand_y_gen_mul_negFrobeniusIsog_pullback_y_gen_ge W hq -/-- **Sub-helper 44**: `(localExpand(x_gen² · (negFrob).π·x)).orderTop = -4 - 2q`. -/ +/-- `(localExpand(x_gen² · (negFrob).π·x)).orderTop = -4 - 2q`. -/ theorem orderTop_localExpand_x_gen_sq_mul_negFrobeniusIsog_pullback_x_gen : (localExpand W (x_gen W ^ 2 * (negFrobeniusIsog W).pullback (x_gen W))).orderTop = @@ -1122,7 +1003,7 @@ theorem orderTop_localExpand_x_gen_sq_mul_negFrobeniusIsog_pullback_x_gen : rw [negFrobeniusIsog_pullback_x_gen, localExpand_x_gen_sq_mul_frob_pullback_x_gen] exact orderTop_formalX_pow_q_plus_two W -/-- **Sub-helper 45**: `(localExpand(x_gen · ((negFrob).π·x)²)).orderTop = -2 - 4q`. +/-- `(localExpand(x_gen · ((negFrob).π·x)²)).orderTop = -2 - 4q`. The DOMINANT term of `addPullbackNumerator_reduced_negFrobenius`. -/ theorem orderTop_localExpand_x_gen_mul_negFrobeniusIsog_pullback_x_gen_sq : (localExpand W (x_gen W * @@ -1131,7 +1012,7 @@ theorem orderTop_localExpand_x_gen_mul_negFrobeniusIsog_pullback_x_gen_sq : rw [negFrobeniusIsog_pullback_x_gen] exact orderTop_localExpand_x_gen_mul_frob_pullback_x_gen_sq W -/-- **Sub-helper 46**: `(localExpand(2 · a₂ · x_gen · (negFrob).π·x)).orderTop ≥ -2 - 2q`. -/ +/-- `(localExpand(2 · a₂ · x_gen · (negFrob).π·x)).orderTop ≥ -2 - 2q`. -/ theorem orderTop_localExpand_two_mul_a₂_mul_x_gen_mul_negFrob_π_x_ge : (((-2 - 2 * (Fintype.card K : ℤ)) : ℤ) : WithTop ℤ) ≤ (localExpand W ((2 : W.toAffine.FunctionField) * @@ -1149,7 +1030,7 @@ theorem orderTop_localExpand_two_mul_a₂_mul_x_gen_mul_negFrob_π_x_ge : localExpand_x_gen_mul_frob_pullback_x_gen] exact (orderTop_formalX_pow_q_plus_one W).symm.le -/-- **Sub-helper 47**: `(localExpand(x · (negFrob).π·y)).orderTop = -2 - 3q` for q ≥ 2. -/ +/-- `(localExpand(x · (negFrob).π·y)).orderTop = -2 - 3q` for q ≥ 2. -/ theorem orderTop_localExpand_x_gen_mul_negFrob_pullback_y_gen (hq : 2 ≤ Fintype.card K) : (localExpand W (x_gen W * (negFrobeniusIsog W).pullback (y_gen W))).orderTop = @@ -1159,16 +1040,16 @@ theorem orderTop_localExpand_x_gen_mul_negFrob_pullback_y_gen show ((-2 : ℤ) + (-3 : ℤ) * (Fintype.card K : ℤ)) = -2 - 3 * (Fintype.card K : ℤ) from by ring] -/-- **Sub-helper 48**: `(localExpand((negFrob).π·x · y)).orderTop = -3 - 2q`. -/ +/-- `(localExpand((negFrob).π·x · y)).orderTop = -3 - 2q`. -/ theorem orderTop_localExpand_negFrob_pullback_x_gen_mul_y_gen : (localExpand W ((negFrobeniusIsog W).pullback (x_gen W) * y_gen W)).orderTop = (((-3 - 2 * (Fintype.card K : ℤ)) : ℤ) : WithTop ℤ) := by rw [negFrobeniusIsog_pullback_x_gen, localExpand_frob_pullback_x_gen_mul_y_gen] exact orderTop_formalX_pow_mul_formalY W -/-- **Sub-helper 49** (Term 5 inner): `(localExpand(x · negFrob.π·y + +/-- Term 5 inner: `(localExpand(x · negFrob.π·y + negFrob.π·x · y)).orderTop ≥ -3-3q` for q ≥ 2. The `min_orderTop_le_orderTop_add` -extracts both summands. Sub-helper 47 = -2-3q ≥ -3-3q, sub-helper 48 = -3-2q ≥ -3-3q. -/ +The summands have orders `-2-3q` and `-3-2q`, both at least `-3-3q`. -/ theorem orderTop_localExpand_x_gen_mul_negFrob_π_y_plus_negFrob_π_x_mul_y_gen_ge (hq : 2 ≤ Fintype.card K) : (((-3 - 3 * (Fintype.card K : ℤ)) : ℤ) : WithTop ℤ) ≤ @@ -1185,8 +1066,8 @@ theorem orderTop_localExpand_x_gen_mul_negFrob_π_y_plus_negFrob_π_x_mul_y_gen_ refine WithTop.coe_le_coe.mpr ?_ linarith -/-- **Sub-helper 50** (Term 5 outer): `(localExpand(a₁ · (x · negFrob.π·y + -negFrob.π·x · y))).orderTop ≥ -3-3q` for q ≥ 2. Composition of sub-helpers 28 + 49. -/ +/-- Term 5 outer: `(localExpand(a₁ · (x · negFrob.π·y + +negFrob.π·x · y))).orderTop ≥ -3-3q` for q ≥ 2. Multiplication by a base-field constant preserves the lower order bound. -/ theorem orderTop_localExpand_a₁_mul_x_negFrob_π_y_plus_negFrob_π_x_y_ge (hq : 2 ≤ Fintype.card K) : (((-3 - 3 * (Fintype.card K : ℤ)) : ℤ) : WithTop ℤ) ≤ @@ -1196,8 +1077,8 @@ theorem orderTop_localExpand_a₁_mul_x_negFrob_π_y_plus_negFrob_π_x_y_ge refine le_trans ?_ (orderTop_localExpand_algebraMap_mul_ge W W.a₁ _) exact orderTop_localExpand_x_gen_mul_negFrob_π_y_plus_negFrob_π_x_mul_y_gen_ge W hq -/-- **Sub-helper 51** (Term 1 promoted): `(localExpand(a₄ · (x_gen + -negFrob.π·x))).orderTop ≥ -3-3q` for q ≥ 1. From sub-helper 41 (≥ -2q). -/ +/-- Term 1 promoted: `(localExpand(a₄ · (x_gen + +negFrob.π·x))).orderTop ≥ -3-3q` for q ≥ 1. The sharper lower bound is `-2q`. -/ theorem orderTop_localExpand_a₄_mul_x_gen_add_negFrob_π_x_promoted (hq : 2 ≤ Fintype.card K) : (((-3 - 3 * (Fintype.card K : ℤ)) : ℤ) : WithTop ℤ) ≤ @@ -1208,7 +1089,8 @@ theorem orderTop_localExpand_a₄_mul_x_gen_add_negFrob_π_x_promoted refine WithTop.coe_le_coe.mpr ?_ linarith -/-- **Sub-helper 52** (Term 2 promoted): `(localExpand(2·a₆)).orderTop ≥ -3-3q`. -/ +omit [WeierstrassCurve.IsElliptic W.toAffine] in +/-- Term 2 promoted: `(localExpand(2·a₆)).orderTop ≥ -3-3q`. -/ theorem orderTop_localExpand_two_mul_a₆_promoted (hq : 2 ≤ Fintype.card K) : (((-3 - 3 * (Fintype.card K : ℤ)) : ℤ) : WithTop ℤ) ≤ @@ -1219,8 +1101,8 @@ theorem orderTop_localExpand_two_mul_a₆_promoted refine WithTop.coe_le_coe.mpr ?_ linarith -/-- **Sub-helper 53** (Term 3 promoted): `(localExpand(a₃ · (y_gen + -negFrob.π·y))).orderTop ≥ -3-3q`. From sub-helper 39 (≥ -3q). -/ +/-- Term 3 promoted: `(localExpand(a₃ · (y_gen + +negFrob.π·y))).orderTop ≥ -3-3q`. The sharper lower bound is `-3q`. -/ theorem orderTop_localExpand_a₃_mul_y_gen_add_negFrob_π_y_promoted (hq : 2 ≤ Fintype.card K) : (((-3 - 3 * (Fintype.card K : ℤ)) : ℤ) : WithTop ℤ) ≤ @@ -1231,8 +1113,8 @@ theorem orderTop_localExpand_a₃_mul_y_gen_add_negFrob_π_y_promoted refine WithTop.coe_le_coe.mpr ?_ linarith -/-- **Sub-helper 54** (Term 6 promoted): `(localExpand(x² · negFrob.π·x)).orderTop ≥ -3-3q`. -From sub-helper 44 (= -4-2q). -/ +/-- Term 6 promoted: `(localExpand(x² · negFrob.π·x)).orderTop ≥ -3-3q`. +The exact order is `-4-2q`. -/ theorem orderTop_localExpand_x_gen_sq_mul_negFrob_π_x_promoted (hq : 2 ≤ Fintype.card K) : (((-3 - 3 * (Fintype.card K : ℤ)) : ℤ) : WithTop ℤ) ≤ @@ -1243,8 +1125,8 @@ theorem orderTop_localExpand_x_gen_sq_mul_negFrob_π_x_promoted refine WithTop.coe_le_coe.mpr ?_ linarith -/-- **Sub-helper 55** (Term 8 promoted): `(localExpand(2·a₂·x·negFrob.π·x)).orderTop ≥ -3-3q`. -From sub-helper 46 (≥ -2-2q). -/ +/-- Term 8 promoted: `(localExpand(2·a₂·x·negFrob.π·x)).orderTop ≥ -3-3q`. +The sharper lower bound is `-2-2q`. -/ theorem orderTop_localExpand_two_a₂_x_negFrob_π_x_promoted (hq : 2 ≤ Fintype.card K) : (((-3 - 3 * (Fintype.card K : ℤ)) : ℤ) : WithTop ℤ) ≤ @@ -1257,14 +1139,14 @@ theorem orderTop_localExpand_two_a₂_x_negFrob_π_x_promoted linarith omit [Fintype K] [DecidableEq K] in -/-- **Sub-helper 56**: `add_ge_of_both_ge` — addition preserves orderTop bounds. -/ +/-- `add_ge_of_both_ge` — addition preserves orderTop bounds. -/ theorem orderTop_add_ge_of_both_ge {a b : LaurentSeries K} {n : WithTop ℤ} (ha : n ≤ a.orderTop) (hb : n ≤ b.orderTop) : n ≤ (a + b).orderTop := le_trans (le_min ha hb) HahnSeries.min_orderTop_le_orderTop_add omit [Fintype K] [DecidableEq K] in -/-- **Sub-helper 57**: `sub_ge_of_both_ge` — subtraction preserves orderTop bounds. +/-- `sub_ge_of_both_ge` — subtraction preserves orderTop bounds. Uses `HahnSeries.orderTop_neg` to convert `b` ↔ `-b`. -/ theorem orderTop_sub_ge_of_both_ge {a b : LaurentSeries K} {n : WithTop ℤ} (ha : n ≤ a.orderTop) (hb : n ≤ b.orderTop) : @@ -1274,7 +1156,7 @@ theorem orderTop_sub_ge_of_both_ge {a b : LaurentSeries K} {n : WithTop ℤ} rw [HahnSeries.orderTop_neg] exact hb -/-- **Sub-helper 58** (Cumulative sum): `(localExpand(rest)).orderTop ≥ -3-3q`, +/-- Cumulative sum: `(localExpand(rest)).orderTop ≥ -3-3q`, where `rest` is `addPullbackNumerator_reduced_negFrobenius` minus the dominant term `x · (negFrob.π·x)²`. Sequential `add/sub_ge_of_both_ge` chain over the 7 sub-dominant term bounds. -/ @@ -1339,7 +1221,7 @@ private theorem addPullbackNumerator_reduced_negFrobenius_split_eq : /-- The dominant term `localExpand(x_gen · (negFrob.π·x)²)` has strictly smaller `orderTop` than the `rest` (for `q ≥ 2`): `-2-4q < -3-3q`. Combines the dominant -order (sub-helper 45) with the `rest ≥ -3-3q` bound (sub-helper 58). -/ +order with the `rest ≥ -3-3q` bound. -/ private theorem orderTop_localExpand_dominant_lt_rest_negFrobenius (hq : 2 ≤ Fintype.card K) : (localExpand W (x_gen W * @@ -1374,8 +1256,8 @@ private theorem orderTop_localExpand_dominant_lt_rest_negFrobenius for q ≥ 2. Algebraic decomposition: the full expression is `rest + dominant`, where -* `dominant = x_gen · (negFrob.π·x)²` has orderTop = -2-4q (sub-helper 45) -* `rest` (the other 7 terms) has orderTop ≥ -3-3q (sub-helper 58) +* `dominant = x_gen · (negFrob.π·x)²` has orderTop = -2-4q +* `rest` (the other 7 terms) has orderTop ≥ -3-3q For q ≥ 2: -2-4q < -3-3q, so `orderTop_add_eq_right` extracts the dominant orderTop. -/ @@ -1442,7 +1324,7 @@ private lemma orderTop_localExpand_dominant_lt_rest (hq : 2 ≤ Fintype.card K) /-- **Leading coefficient companion**: `(localExpand(addPullbackNumerator_reduced_negFrobenius)).leadingCoeff = 1` for q ≥ 2. The leading coefficient of the dominant term `x_gen · (negFrob.π·x)²` -is 1 (sub-helper 9 / `leadingCoeff_localExpand_x_gen_mul_frob_pullback_x_gen_sq`), +is 1 by `leadingCoeff_localExpand_x_gen_mul_frob_pullback_x_gen_sq`, which propagates through the strict-non-arch via `leadingCoeff_add_eq_right`. -/ theorem leadingCoeff_localExpand_addPullbackNumerator_reduced_negFrobenius_eq (hq : 2 ≤ Fintype.card K) : @@ -1454,7 +1336,8 @@ theorem leadingCoeff_localExpand_addPullbackNumerator_reduced_negFrobenius_eq negFrobeniusIsog_pullback_x_gen] exact leadingCoeff_localExpand_x_gen_mul_frob_pullback_x_gen_sq W -/-- **Sub-helper 61**: `(formalX - formalX^q).leadingCoeff = -1` for q ≥ 2. +omit [DecidableEq K] [WeierstrassCurve.IsElliptic W.toAffine] in +/-- `(formalX - formalX^q).leadingCoeff = -1` for q ≥ 2. The dominant term `-formalX^q` (orderTop -2q < -2) determines the leading coefficient via `leadingCoeff_add_eq_right`. -/ theorem leadingCoeff_formalX_sub_formalX_pow (hq : 2 ≤ Fintype.card K) : @@ -1469,16 +1352,16 @@ theorem leadingCoeff_formalX_sub_formalX_pow (hq : 2 ≤ Fintype.card K) : rw [HahnSeries.leadingCoeff_add_eq_right h_lt, HahnSeries.leadingCoeff_neg, formalX_pow_leadingCoeff] -/-- **Sub-helper 62**: `((formalX - formalX^q)²).leadingCoeff = 1` for q ≥ 2. -Direct from `HahnSeries.leadingCoeff_mul` (squared) and sub-helper 61 -(`(-1)² = 1`). -/ +omit [DecidableEq K] [WeierstrassCurve.IsElliptic W.toAffine] in +/-- Squaring `formalX - formalX^q`, whose leading coefficient is `-1`, gives leading +coefficient one. -/ theorem leadingCoeff_formalX_sub_formalX_pow_sq (hq : 2 ≤ Fintype.card K) : ((formalX W - (formalX W) ^ Fintype.card K) ^ 2 : LaurentSeries K).leadingCoeff = 1 := by rw [sq, HahnSeries.leadingCoeff_mul, leadingCoeff_formalX_sub_formalX_pow W hq] ring -/-- **Sub-helper 63**: `(localExpand((x_gen - negFrob.π·x)²)).orderTop = -4q` for q ≥ 2. -Bridges via `negFrobeniusIsog_pullback_x_gen` to the frobenius-side sub-helper 4. -/ +/-- `(localExpand((x_gen - negFrob.π·x)²)).orderTop = -4q` for q ≥ 2. +Negative Frobenius has the same x-coordinate pullback as Frobenius. -/ theorem orderTop_localExpand_x_gen_sub_negFrobeniusIsog_pullback_x_gen_sq (hq : 2 ≤ Fintype.card K) : (localExpand W ((x_gen W - @@ -1487,7 +1370,7 @@ theorem orderTop_localExpand_x_gen_sub_negFrobeniusIsog_pullback_x_gen_sq rw [negFrobeniusIsog_pullback_x_gen, localExpand_x_gen_sub_frob_pullback_x_gen_sq] exact orderTop_formalX_sub_formalX_pow_sq W hq -/-- **Sub-helper 64**: `(localExpand((x_gen - negFrob.π·x)²)).leadingCoeff = 1` for q ≥ 2. -/ +/-- `(localExpand((x_gen - negFrob.π·x)²)).leadingCoeff = 1` for q ≥ 2. -/ theorem leadingCoeff_localExpand_x_gen_sub_negFrobeniusIsog_pullback_x_gen_sq (hq : 2 ≤ Fintype.card K) : (localExpand W ((x_gen W - @@ -1495,7 +1378,7 @@ theorem leadingCoeff_localExpand_x_gen_sub_negFrobeniusIsog_pullback_x_gen_sq rw [negFrobeniusIsog_pullback_x_gen, localExpand_x_gen_sub_frob_pullback_x_gen_sq] exact leadingCoeff_formalX_sub_formalX_pow_sq W hq -/-- **Sub-helper 65**: `(localExpand((x_gen - negFrob.π·x)²)) ≠ 0` for q ≥ 2. +/-- `(localExpand((x_gen - negFrob.π·x)²)) ≠ 0` for q ≥ 2. Direct from orderTop being a finite value. -/ theorem localExpand_x_gen_sub_negFrobeniusIsog_pullback_x_gen_sq_ne_zero (hq : 2 ≤ Fintype.card K) : @@ -1508,7 +1391,7 @@ theorem localExpand_x_gen_sub_negFrobeniusIsog_pullback_x_gen_sq_ne_zero rw [orderTop_localExpand_x_gen_sub_negFrobeniusIsog_pullback_x_gen_sq W hq] at h_top exact WithTop.coe_ne_top h_top -/-- **Sub-helper 65b**: `(x_gen - negFrob.π·x) ≠ 0` in K(E). Derived from the +/-- `(x_gen - negFrob.π·x) ≠ 0` in K(E). Derived from the LaurentSeries-side fact `(formalX - formalX^q).orderTop = -2q ≠ ⊤`. -/ private theorem x_gen_sub_negFrob_pullback_x_gen_ne_zero_local (hq : 2 ≤ Fintype.card K) : @@ -1569,7 +1452,7 @@ theorem leadingCoeff_localExpand_addPullback_x_negFrobenius_eq leadingCoeff_localExpand_x_gen_sub_negFrobeniusIsog_pullback_x_gen_sq W hq] ring -/-- **Sub-helper 66**: `localExpand(addPullback_x_negFrobenius) ≠ 0` for q ≥ 2. +/-- `localExpand(addPullback_x_negFrobenius) ≠ 0` for q ≥ 2. Direct from orderTop being a finite value. -/ theorem localExpand_addPullback_x_negFrobenius_ne_zero (hq : 2 ≤ Fintype.card K) : @@ -1580,11 +1463,11 @@ theorem localExpand_addPullback_x_negFrobenius_ne_zero rw [orderTop_localExpand_addPullback_x_negFrobenius_eq W hq] at h_top exact WithTop.coe_ne_top h_top -/-- **Sub-helper 67**: `(localExpand(addPullback_x_negFrobenius)).coeff (-2) = 1` for q ≥ 2. +/-- `(localExpand(addPullback_x_negFrobenius)).coeff (-2) = 1` for q ≥ 2. Direct extraction of the leading coefficient at the leading exponent via `HahnSeries.coeff_untop_eq_leadingCoeff` (when orderTop = -2 finite). -This is the ACTUAL coefficient value at the most-negative exponent, the +This is the coefficient value at the most-negative exponent, the LaurentSeries-side input for the IV.1.4 step 2 leading-coefficient computation. -/ theorem coeff_neg_two_localExpand_addPullback_x_negFrobenius_eq @@ -1602,7 +1485,7 @@ theorem coeff_neg_two_localExpand_addPullback_x_negFrobenius_eq rw [← h_untop, HahnSeries.coeff_untop_eq_leadingCoeff] exact h_leadingCoeff -/-- **Sub-helper 68**: `((localExpand addPullback_x)^2).orderTop = -4`. -/ +/-- `((localExpand addPullback_x)^2).orderTop = -4`. -/ theorem orderTop_localExpand_addPullback_x_negFrobenius_sq (hq : 2 ≤ Fintype.card K) : ((localExpand W (addPullback_x W (negFrobeniusIsog W))) ^ 2 : @@ -1612,7 +1495,7 @@ theorem orderTop_localExpand_addPullback_x_negFrobenius_sq orderTop_localExpand_addPullback_x_negFrobenius_eq W hq, ← WithTop.coe_add] congr 1 -/-- **Sub-helper 69**: `((localExpand addPullback_x)^3).orderTop = -6`. -/ +/-- `((localExpand addPullback_x)^3).orderTop = -6`. -/ theorem orderTop_localExpand_addPullback_x_negFrobenius_cube (hq : 2 ≤ Fintype.card K) : ((localExpand W (addPullback_x W (negFrobeniusIsog W))) ^ 3 : @@ -1623,7 +1506,7 @@ theorem orderTop_localExpand_addPullback_x_negFrobenius_cube orderTop_localExpand_addPullback_x_negFrobenius_eq W hq, ← WithTop.coe_add] congr 1 -/-- **Sub-helper 70**: `localExpand(addPullback_y)` is nonzero for q ≥ 2. +/-- `localExpand(addPullback_y)` is nonzero for q ≥ 2. Direct from `localExpand` being a ring hom to a field + addPullback_y ≠ 0 (via `ord_addPullback_y_negFrobenius`). -/ theorem localExpand_addPullback_y_negFrobenius_ne_zero @@ -1638,7 +1521,7 @@ theorem localExpand_addPullback_y_negFrobenius_ne_zero rw [h_y_eq_zero] at h_y_ord exact WithTop.top_ne_coe ((W_smooth W).ordAtInfty_zero.symm.trans h_y_ord) -/-- **Sub-helper 71**: localExpand of the curve equation +/-- localExpand of the curve equation `Y² + a₁·X·Y + a₃·Y = X³ + a₂·X² + a₄·X + a₆` applied to the addPullback coordinates. Direct from `addPullback_equation` + `localExpand` ring hom. @@ -1675,7 +1558,7 @@ theorem localExpand_addPullback_curve_equation : rw [ha₁, ha₂, ha₃, ha₄, ha₆] at h_le exact h_le -/-- **Sub-helper 72**: `(localExpand(a₂·X² + a₄·X + a₆)).orderTop ≥ -4` for q ≥ 2. +/-- `(localExpand(a₂·X² + a₄·X + a₆)).orderTop ≥ -4` for q ≥ 2. The non-cubic RHS terms have orderTop bounded by -4 (since `a₂·X²` has orderTop ≥ -4 = orderTop X² when a₂ ≠ 0, and `a₄·X` has orderTop ≥ -2 ≥ -4, and `a₆` has orderTop ≥ 0 ≥ -4). -/ @@ -1713,7 +1596,7 @@ theorem orderTop_localExpand_RHS_lower_terms_ge refine le_trans ?_ (orderTop_HahnSeries_C_ge_zero W.a₆) exact_mod_cast (by norm_num : (-4 : ℤ) ≤ 0) -/-- **Sub-helper 73**: `(localExpand(X³ + a₂·X² + a₄·X + a₆)).orderTop = -6` +/-- `(localExpand(X³ + a₂·X² + a₄·X + a₆)).orderTop = -6` for q ≥ 2. Strict non-arch with `X³` dominating (orderTop -6) and the other terms bounded ≥ -4. -/ theorem orderTop_localExpand_addPullback_RHS_eq @@ -1751,8 +1634,7 @@ theorem orderTop_localExpand_addPullback_RHS_eq exact (HahnSeries.orderTop_add_eq_left h_lt).trans (orderTop_localExpand_addPullback_x_negFrobenius_cube W hq) -/-- **Sub-helper 74** (Y-side LHS orderTop = -6): direct from sub-helper 73 + -the curve equation (sub-helper 71). -/ +/-- Y-side LHS orderTop = -6: the curve equation identifies its order with the cubic right-hand side. -/ theorem orderTop_localExpand_addPullback_LHS_eq (hq : 2 ≤ Fintype.card K) : ((localExpand W (addPullback_y W (negFrobeniusIsog W)))^2 + @@ -1766,8 +1648,8 @@ theorem orderTop_localExpand_addPullback_LHS_eq rw [localExpand_addPullback_curve_equation W] exact orderTop_localExpand_addPullback_RHS_eq W hq -/-- **Sub-helper 75** (extract m): `localExpand(addPullback_y).orderTop = (m : ℤ)` -for some integer `m`. Uses sub-helper 70 (≠ 0). -/ +/-- extract m: `localExpand(addPullback_y).orderTop = (m : ℤ)` +for some integer `m`. The series is nonzero, so its order is finite. -/ theorem exists_m_orderTop_localExpand_addPullback_y_negFrobenius (hq : 2 ≤ Fintype.card K) : ∃ m : ℤ, (localExpand W (addPullback_y W (negFrobeniusIsog W))).orderTop = @@ -1779,7 +1661,7 @@ theorem exists_m_orderTop_localExpand_addPullback_y_negFrobenius obtain ⟨m, hm⟩ := WithTop.ne_top_iff_exists.mp h_ne_top exact ⟨m, hm.symm⟩ -/-- **Sub-helper 76** (Y² orderTop = 2m): with `m = orderTop(Y)`, `Y²` has orderTop `2m`. -/ +/-- Y² orderTop = 2m: with `m = orderTop(Y)`, `Y²` has orderTop `2m`. -/ theorem orderTop_localExpand_addPullback_y_negFrobenius_sq_eq_two_m (_hq : 2 ≤ Fintype.card K) (m : ℤ) (hm : (localExpand W (addPullback_y W (negFrobeniusIsog W))).orderTop = @@ -1790,7 +1672,7 @@ theorem orderTop_localExpand_addPullback_y_negFrobenius_sq_eq_two_m rw [sq, HahnSeries.orderTop_mul, hm, ← WithTop.coe_add] congr 1; ring -/-- **Sub-helper 77** (X·Y orderTop = -2 + m): -/ +/-- X·Y orderTop = -2 + m: -/ theorem orderTop_localExpand_addPullback_x_mul_y_negFrobenius_eq (hq : 2 ≤ Fintype.card K) (m : ℤ) (hm : (localExpand W (addPullback_y W (negFrobeniusIsog W))).orderTop = @@ -1858,7 +1740,7 @@ private theorem orderTop_a3_mul_y_negFrobenius_ge (m : ℤ) (h_m_ge : -2 ≤ m) rw [zero_add] refine WithTop.coe_le_coe.mpr ?_; linarith -/-- **Sub-helper 78** (rule out m ≥ -2): if `m ≥ -2`, then LHS orderTop ≥ -4, +/-- rule out m ≥ -2: if `m ≥ -2`, then LHS orderTop ≥ -4, contradicting LHS orderTop = -6. -/ theorem m_le_neg_three_orderTop_localExpand_addPullback_y_negFrobenius (hq : 2 ≤ Fintype.card K) (m : ℤ) @@ -1876,7 +1758,7 @@ theorem m_le_neg_three_orderTop_localExpand_addPullback_y_negFrobenius have h46 : (-4 : ℤ) ≤ -6 := by exact_mod_cast h_lhs_ge omega -/-- **Sub-helper 79** (Y² strictly dominates a₁·X·Y, given m ≤ -3): for `m ≤ -3`, +/-- Y² strictly dominates a₁·X·Y, given m ≤ -3: for `m ≤ -3`, `Y²` has orderTop = `2m ≤ -6 < -2 + m = orderTop(a₁·X·Y)`. -/ theorem orderTop_y_sq_lt_a1xy_negFrobenius (hq : 2 ≤ Fintype.card K) (m : ℤ) (h_m_le : m ≤ -3) @@ -1907,7 +1789,7 @@ theorem orderTop_y_sq_lt_a1xy_negFrobenius refine WithTop.coe_lt_coe.mpr ?_ linarith -/-- **Sub-helper 80** (Y² strictly dominates a₃·Y, given m ≤ -3): for `m ≤ -3`, +/-- Y² strictly dominates a₃·Y, given m ≤ -3: for `m ≤ -3`, `Y²` has orderTop = `2m ≤ -6 < m = orderTop(a₃·Y)` (since `2m < m` for `m ≤ -3`). -/ theorem orderTop_y_sq_lt_a3y_negFrobenius (hq : 2 ≤ Fintype.card K) (m : ℤ) (h_m_le : m ≤ -3) @@ -1976,8 +1858,8 @@ theorem orderTop_localExpand_addPullback_y_negFrobenius_eq congr 1 omega -/-- **Sub-helper 84**: leadingCoeff of `(localExpand X)^3 = 1`, derived from -sub-helper main companion (`leadingCoeff(localExpand X) = 1`) + leadingCoeff_mul. -/ +/-- leadingCoeff of `(localExpand X)^3 = 1`, derived from +`leadingCoeff(localExpand X) = 1` and multiplicativity of leading coefficients. -/ theorem leadingCoeff_localExpand_addPullback_x_negFrobenius_cube_eq (hq : 2 ≤ Fintype.card K) : ((localExpand W (addPullback_x W (negFrobeniusIsog W))) ^ 3 : @@ -1987,7 +1869,7 @@ theorem leadingCoeff_localExpand_addPullback_x_negFrobenius_cube_eq leadingCoeff_localExpand_addPullback_x_negFrobenius_eq W hq] ring -/-- **Sub-helper 85**: leadingCoeff of RHS = 1. +/-- leadingCoeff of RHS = 1. Strict-dominance of `X³` on RHS (orderTop -6 < -4 of other terms) gives `leadingCoeff(RHS) = leadingCoeff(X³) = 1` via `leadingCoeff_add_eq_left`. -/ @@ -2025,7 +1907,7 @@ theorem leadingCoeff_localExpand_addPullback_RHS_eq rw [HahnSeries.leadingCoeff_add_eq_left h_lt] exact leadingCoeff_localExpand_addPullback_x_negFrobenius_cube_eq W hq -/-- **Sub-helper 86**: leadingCoeff of LHS = 1. +/-- leadingCoeff of LHS = 1. LHS = RHS (curve equation), so leadingCoeff equal. -/ theorem leadingCoeff_localExpand_addPullback_LHS_eq @@ -2040,7 +1922,7 @@ theorem leadingCoeff_localExpand_addPullback_LHS_eq rw [localExpand_addPullback_curve_equation W] exact leadingCoeff_localExpand_addPullback_RHS_eq W hq -/-- **Sub-helper 87**: leadingCoeff of `Y²` extracted from LHS via strict-dominance. +/-- leadingCoeff of `Y²` extracted from LHS via strict-dominance. For the actual y-orderTop = -3, `Y²` (orderTop = -6) strictly dominates `a₁·X·Y` (orderTop = -5) and `a₃·Y` (orderTop = -3). So `leadingCoeff(LHS) = leadingCoeff(Y²)`. -/ @@ -2080,7 +1962,7 @@ theorem leadingCoeff_localExpand_addPullback_y_negFrobenius_sq_eq_one exact h_lhs_lc /-- **MAIN Y-SIDE LEADING-COEFFICIENT**: `(leadingCoeff(localExpand addPullback_y))² = 1` -for q ≥ 2. From `leadingCoeff(Y²) = 1` (sub-helper 87) + `leadingCoeff_mul`. -/ +for q ≥ 2. From `leadingCoeff(Y²) = 1` + `leadingCoeff_mul`. -/ theorem leadingCoeff_localExpand_addPullback_y_negFrobenius_sq (hq : 2 ≤ Fintype.card K) : ((localExpand W (addPullback_y W (negFrobeniusIsog W))).leadingCoeff)^2 = 1 := by @@ -2089,7 +1971,7 @@ theorem leadingCoeff_localExpand_addPullback_y_negFrobenius_sq rw [sq] exact h -/-- **Sub-helper 89**: `leadingCoeff(localExpand addPullback_y) ≠ 0` for q ≥ 2. +/-- `leadingCoeff(localExpand addPullback_y) ≠ 0` for q ≥ 2. Direct from the squared identity = 1 (so leadingCoeff = ±1). -/ theorem leadingCoeff_localExpand_addPullback_y_negFrobenius_ne_zero (hq : 2 ≤ Fintype.card K) : @@ -2099,7 +1981,7 @@ theorem leadingCoeff_localExpand_addPullback_y_negFrobenius_ne_zero rw [h, sq, mul_zero] at h_sq exact zero_ne_one h_sq -/-- **Sub-helper 89b**: `addPullbackAlgHom_negFrobenius (x_gen) = addPullback_x`. -/ +/-- `addPullbackAlgHom_negFrobenius (x_gen) = addPullback_x`. -/ theorem addPullbackAlgHom_negFrobenius_x_gen_eq (hq : 2 ≤ Fintype.card K) : addPullbackAlgHom_negFrobenius W hq (x_gen W) = @@ -2119,7 +2001,7 @@ theorem addPullbackAlgHom_negFrobenius_x_gen_eq rw [AdjoinRoot.lift_mk] simp [addBaseHom, Polynomial.eval₂_C] -/-- **Sub-helper 89c**: `addPullbackAlgHom_negFrobenius (y_gen) = addPullback_y`. -/ +/-- `addPullbackAlgHom_negFrobenius (y_gen) = addPullback_y`. -/ theorem addPullbackAlgHom_negFrobenius_y_gen_eq (hq : 2 ≤ Fintype.card K) : addPullbackAlgHom_negFrobenius W hq (y_gen W) = @@ -2141,8 +2023,7 @@ theorem addPullbackAlgHom_negFrobenius_y_gen_eq rw [AdjoinRoot.lift_mk] simp [addBaseHom, Polynomial.eval₂_X] -/-- **Sub-helper 90**: -`localExpand(γ.pullback localParam) = -localExpand(addPullback_x) / localExpand(addPullback_y)` +/-- `localExpand(γ.pullback localParam) = -localExpand(addPullback_x) / localExpand(addPullback_y)` for γ = isogOneSub_negFrobenius. Direct ring-hom + AlgHom.commutes_div + map_div₀. -/ theorem localExpand_isogOneSub_negFrobenius_pullback_localParam (hq : 2 ≤ Fintype.card K) : @@ -2155,7 +2036,7 @@ theorem localExpand_isogOneSub_negFrobenius_pullback_localParam addPullbackAlgHom_negFrobenius_x_gen_eq W hq, addPullbackAlgHom_negFrobenius_y_gen_eq W hq] -/-- **Sub-helper 91**: `(localExpand(γ.pullback localParam)).orderTop = 1` for +/-- `(localExpand(γ.pullback localParam)).orderTop = 1` for γ = isogOneSub_negFrobenius. Via `orderTop_div`: `-2 - (-3) = 1`. -/ theorem orderTop_localExpand_isogOneSub_negFrobenius_pullback_localParam (hq : 2 ≤ Fintype.card K) : @@ -2169,7 +2050,7 @@ theorem orderTop_localExpand_isogOneSub_negFrobenius_pullback_localParam orderTop_localExpand_addPullback_y_negFrobenius_eq W hq] rfl -/-- **Sub-helper 92**: `(localExpand(γ.pullback localParam)).leadingCoeff = -1 / leadingCoeff(Y)` +/-- `(localExpand(γ.pullback localParam)).leadingCoeff = -1 / leadingCoeff(Y)` for γ = isogOneSub_negFrobenius. Via `leadingCoeff_div` + `leadingCoeff_neg`. -/ theorem leadingCoeff_localExpand_isogOneSub_negFrobenius_pullback_localParam (hq : 2 ≤ Fintype.card K) : @@ -2181,7 +2062,7 @@ theorem leadingCoeff_localExpand_isogOneSub_negFrobenius_pullback_localParam rw [HahnSeries.leadingCoeff_neg, leadingCoeff_localExpand_addPullback_x_negFrobenius_eq W hq] -/-- **Sub-helper 93**: `coeff 1 (formal γ) = -1 / leadingCoeff(Y)` for γ = isogOneSub_negFrobenius. +/-- `coeff 1 (formal γ) = -1 / leadingCoeff(Y)` for γ = isogOneSub_negFrobenius. Via `formalIsogenySeries_coeff` + `coeff_untop_eq_leadingCoeff` at orderTop = 1. This is the LaurentSeries-side computation of `coeff 1 (formal γ)` modulo @@ -2209,8 +2090,8 @@ theorem coeff_one_formalIsogenySeries_isogOneSub_negFrobenius_eq_neg_one_div_lea HahnSeries.coeff_untop_eq_leadingCoeff] exact h_Z_lc -/-- **Sub-helper 94** (witness-parametric coeff 1 = 1): with `leadingCoeff(Y) = -1` -witness, `coeff 1 (formalIsogenySeries γ) = 1` axiom-clean. -/ +/-- witness-parametric coeff 1 = 1: with `leadingCoeff(Y) = -1` +witness, `coeff 1 (formalIsogenySeries γ) = 1`. -/ theorem coeff_one_formalIsogenySeries_isogOneSub_negFrobenius_eq_one_of_y_lc (hq : 2 ≤ Fintype.card K) (h_y_lc : (localExpand W (addPullback_y W (negFrobeniusIsog W))).leadingCoeff = -1) : @@ -2220,9 +2101,8 @@ theorem coeff_one_formalIsogenySeries_isogOneSub_negFrobenius_eq_one_of_y_lc -- Goal: -1 / -1 = 1 norm_num -/-- **Sub-helper 95** (Witness #1 closer via leadingCoeff(Y) witness + BRIDGE-001 γ): -takes `leadingCoeff(Y) = -1` as the LaurentSeries-side witness and BRIDGE-001 -for γ as the K(E)-side witness, fires Witness #1 unconditional. -/ +/-- A y-coordinate Laurent leading coefficient of `-1`, together with equality of the +differential and linear formal-series coefficients, implies separability of `1 − π`. -/ theorem isogOneSub_negFrobenius_isSeparable_via_y_lc_and_bridge_001 (hq : 2 ≤ Fintype.card K) (h_y_lc : (localExpand W (addPullback_y W (negFrobeniusIsog W))).leadingCoeff = -1) @@ -2241,8 +2121,8 @@ theorem isogOneSub_negFrobenius_isSeparable_via_y_lc_and_bridge_001 exact isogOneSub_negFrobenius_isSeparable_of_bridge_and_leading W hq h_bridge_001_γ h_leading_add -/-- **Sub-helper 96** (omegaPullbackCoeff = 1 via leadingCoeff(Y) + BRIDGE-001 γ): -companion to 95 producing `omegaPullbackCoeff(γ) = 1`. -/ +/-- A y-coordinate Laurent leading coefficient of `-1` and the differential/formal-series +coefficient identity give differential coefficient one for `1 − π`. -/ theorem omegaPullbackCoeff_isogOneSub_negFrobenius_eq_one_via_y_lc_and_bridge_001 (hq : 2 ≤ Fintype.card K) (h_y_lc : (localExpand W (addPullback_y W (negFrobeniusIsog W))).leadingCoeff = -1) @@ -2261,12 +2141,8 @@ theorem omegaPullbackCoeff_isogOneSub_negFrobenius_eq_one_via_y_lc_and_bridge_00 exact omegaPullbackCoeff_isogOneSub_negFrobenius_eq_one_of_bridge_and_leading W hq h_bridge_001_γ h_leading_add -/-- **Sub-helper 96b** (sign determination — char 2 case axiom-clean): -in characteristic 2, `(localExpand addPullback_y).leadingCoeff = -1` -because `c_y² = 1` (sub-helper 88) and `1 = -1` in char 2 (via `CharTwo.neg_eq`). - -This pins the sign for characteristic 2 axiom-clean, closing the -sign-determination work for q = 2^k case. -/ +/-- In characteristic two the y-coordinate Laurent leading coefficient is `-1`, +since its square is one and `1 = -1`. -/ theorem leadingCoeff_localExpand_addPullback_y_negFrobenius_eq_neg_one_char_two [CharP K 2] (hq : 2 ≤ Fintype.card K) : @@ -2294,8 +2170,8 @@ theorem leadingCoeff_localExpand_addPullback_y_negFrobenius_eq_neg_one_char_two pow_eq_zero_iff (n := 2) (by norm_num : 2 ≠ 0) |>.mp h_c_plus_one_sq exact eq_neg_of_add_eq_zero_left h_c_plus_one -/-- **Sub-helper 98** (Witness #1 char 2): in characteristic 2, the y-side -sign pin is automatic via 96b. Witness #1 fires with only BRIDGE-001 for γ. -/ +/-- In characteristic two, equality of the differential and linear formal-series +coefficients implies separability of `1 − π`. -/ theorem isogOneSub_negFrobenius_isSeparable_char_two [CharP K 2] (hq : 2 ≤ Fintype.card K) @@ -2307,7 +2183,7 @@ theorem isogOneSub_negFrobenius_isSeparable_char_two (leadingCoeff_localExpand_addPullback_y_negFrobenius_eq_neg_one_char_two W hq) h_bridge_001_γ -/-- **Sub-helper 99** (omegaPullbackCoeff(γ) = 1 char 2). -/ +/-- omegaPullbackCoeff(γ) = 1 char 2. -/ theorem omegaPullbackCoeff_isogOneSub_negFrobenius_eq_one_char_two [CharP K 2] (hq : 2 ≤ Fintype.card K) @@ -2319,10 +2195,8 @@ theorem omegaPullbackCoeff_isogOneSub_negFrobenius_eq_one_char_two (leadingCoeff_localExpand_addPullback_y_negFrobenius_eq_neg_one_char_two W hq) h_bridge_001_γ -/-- **Sub-helper 101** (BRIDGE-001 for γ char-2 from omega witness): takes -`omegaPullbackCoeff(γ) = 1` directly and discharges BRIDGE-001 for γ -axiom-clean. The LaurentSeries side gives `coeff 1 (formal γ) = 1` via -y-lc (sub-helper 96b) + ratio chain. -/ +/-- In characteristic two, differential coefficient one implies its equality with the +linear formal-series coefficient, which is also one. -/ theorem bridge_001_γ_isogOneSub_negFrobenius_char_two [CharP K 2] (hq : 2 ≤ Fintype.card K) @@ -2336,7 +2210,7 @@ theorem bridge_001_γ_isogOneSub_negFrobenius_char_two exact (map_one _).symm omit [DecidableEq K] [WeierstrassCurve.IsElliptic W.toAffine] in -/-- **Sub-helper 104** (Frobenius D vanishing): for finite K with characteristic +/-- Frobenius D vanishing: for finite K with characteristic p (and `q = #K` a power of p), the Kähler differential of `x_gen^q` vanishes. Proof: `D(x^q) = q · x^(q-1) · D(x)` (Leibniz pow), and `(q : K) = 0` since @@ -2355,9 +2229,8 @@ theorem kaehler_D_x_gen_pow_card_eq_zero rw [Nat.cast_smul_eq_nsmul, smul_assoc]] rw [h_card_zero, zero_smul, zero_smul] -/-- **Sub-helper 105** (Frobenius D pullback vanishing): the Kähler differential -of `(frobeniusIsog).pullback x_gen` vanishes. Direct from sub-helper 104 + -`frobeniusIsog_pullback_apply` (= `x_gen^q`). -/ +/-- The Kähler differential of the Frobenius pullback of `x_gen` vanishes, because that +pullback is a q-th power. -/ theorem kaehler_D_frobeniusIsog_pullback_x_gen (p : ℕ) [Fact p.Prime] [CharP K p] : KaehlerDifferential.D K W.toAffine.FunctionField @@ -2365,7 +2238,7 @@ theorem kaehler_D_frobeniusIsog_pullback_x_gen rw [frobeniusIsog_pullback_apply] exact kaehler_D_x_gen_pow_card_eq_zero W p -/-- **Sub-helper 106** (Frobenius D pullback y vanishing): the Kähler differential +/-- Frobenius D pullback y vanishing: the Kähler differential of `(frobeniusIsog).pullback y_gen` vanishes. Same proof shape as 105. -/ theorem kaehler_D_frobeniusIsog_pullback_y_gen (p : ℕ) [Fact p.Prime] [CharP K p] : @@ -2382,13 +2255,13 @@ theorem kaehler_D_frobeniusIsog_pullback_y_gen rw [Nat.cast_smul_eq_nsmul, smul_assoc]] rw [h_card_zero, zero_smul, zero_smul] -/-- **Sub-helper 107** (negFrobenius D pullback x vanishing): the Kähler differential +/-- negFrobenius D pullback x vanishing: the Kähler differential of `(negFrobeniusIsog).pullback x_gen` vanishes. `negFrobeniusIsog = mulByInt(-1) ∘ frobeniusIsog`, so `(negFrob).pullback x_gen = frobenius.pullback ((mulByInt(-1)).pullback x_gen) = frobenius.pullback x_gen = x_gen^q` (since `[-1]` fixes `x_gen`). -Then by sub-helper 104, `D(x_gen^q) = 0`. -/ +The differential of a q-th power vanishes. -/ theorem kaehler_D_negFrobeniusIsog_pullback_x_gen (p : ℕ) [Fact p.Prime] [CharP K p] : KaehlerDifferential.D K W.toAffine.FunctionField @@ -2396,13 +2269,13 @@ theorem kaehler_D_negFrobeniusIsog_pullback_x_gen rw [negFrobeniusIsog_pullback_x_gen] exact kaehler_D_frobeniusIsog_pullback_x_gen W p -/-- **Sub-helper 108** (negFrobenius D pullback y vanishing): the Kähler differential +/-- negFrobenius D pullback y vanishing: the Kähler differential of `(negFrobeniusIsog).pullback y_gen` vanishes. `(negFrob).pullback y_gen = -π·y_gen - a₁·π·x_gen - a₃` (where π·· = frobeniusIsog.pullback). The differential operator `D` is a K-derivation, so `D(constant) = 0` for `a₃ ∈ K`, and `D(a₁ · f) = a₁ · D(f)` for `a₁ ∈ K`, -and `D(-f) = -D(f)`. Combined with sub-helpers 105-106, all three terms +and `D(-f) = -D(f)`. Vanishing of both Frobenius coordinate differentials shows that all three terms vanish. -/ theorem kaehler_D_negFrobeniusIsog_pullback_y_gen (p : ℕ) [Fact p.Prime] [CharP K p] : @@ -2419,7 +2292,7 @@ theorem kaehler_D_negFrobeniusIsog_pullback_y_gen simp omit [Fintype K] in -/-- **Sub-helper 109** (D(addPullback_x) formula via slope). +/-- D(addPullback_x) formula via slope. For any α : Isogeny W W with `D((α).pullback x_gen) = 0` (i.e., α has its x-pullback Kähler-flat, true for Frobenius / negFrobenius in characteristic @@ -2452,9 +2325,9 @@ theorem kaehler_D_addPullback_x_via_slope_witness (Nat.cast_smul_eq_nsmul (R := KE) 2 _).symm] rw [smul_smul] -/-- **Sub-helper 110** (D(addPullback_x) for negFrobenius — specialized). +/-- D(addPullback_x) for negFrobenius — specialized. -Direct from sub-helper 109 + sub-helper 107: for the addition-pullback +Differentiating the addition formula and using the vanishing Frobenius differential gives, for the addition-pullback under negFrobenius, `D(addPullback_x) = (2·ℓ + a₁) • D(ℓ) - D(x_gen)` where ℓ = addSlope W (negFrobeniusIsog W). @@ -2473,7 +2346,7 @@ theorem kaehler_D_addPullback_x_negFrobenius (kaehler_D_negFrobeniusIsog_pullback_x_gen W p) omit [Fintype K] in -/-- **Route B core (III.5.2), general slope-differential formula** (no `D(α*x)=0` +/-- **General slope-differential formula** (no `D(α*x)=0` hypothesis): for any `α`, the Kähler differential of the `id + α` addition-pullback x-coordinate is the slope term minus `D(x_gen)` minus `D(α*x)`. Generalizes `kaehler_D_addPullback_x_via_slope_witness` (which drops the last term under the @@ -2502,19 +2375,8 @@ theorem kaehler_D_addPullback_x_general rw [show (2 : ℕ) • (ℓ • D ℓ) = ((2 : KE)) • (ℓ • D ℓ) from (Nat.cast_smul_eq_nsmul (R := KE) 2 _).symm, smul_smul] -/-- **Sub-helper 111** (ω(γ) = 1 via Kähler witness). - -Closing-arc witness consumer: given that - `(α*(u))⁻¹ • D(addPullback_x) = invariantDifferential` -(equivalently, `α*(u) • ω = D(addPullback_x)` for ω = invariantDifferential), -conclude `omegaPullbackCoeff(γ) = 1`. Direct from -`omegaPullbackCoeff_spec` + `omegaPullbackCoeff_unique`. - -The hypothesis is the SUBSTANTIVE Kähler identity in K(E) that III.5.2 / IV.1.4 -carries out: relating the slope's differential to the addition-pullback's -differential. Once this identity is closed (via, e.g., the curve equation -matching at orderTop -6 and the slope-of-formal-identity lemma), `ω(γ) = 1` -follows axiom-clean and the Hasse-Weil bound discharges via sub-helper 103. -/ +/-- The Kähler identity `(α*u)⁻¹ • D(α*x) = ω` gives differential coefficient one. +This follows from the defining identity and uniqueness of the coefficient. -/ theorem omegaPullbackCoeff_isogOneSub_negFrobenius_eq_one_via_kaehler_witness (hq : 2 ≤ Fintype.card K) (h_kaehler : @@ -2528,12 +2390,8 @@ theorem omegaPullbackCoeff_isogOneSub_negFrobenius_eq_one_via_kaehler_witness simp only [x_gen] at h_kaehler exact h_kaehler -/-- **Sub-helper 113** (Kähler ω(γ) = 1 via pullbackKaehler witness — closing-arc). - -The cleaner reformulation of sub-helper 111 using `pullbackKaehler` directly: -given `γ.pullbackKaehler ω = ω`, conclude `omegaPullbackCoeff(γ) = 1`. - -Direct from `pullbackKaehler_invariantDifferential` + `omegaPullbackCoeff_unique`. -/ +/-- An isogeny fixing the invariant differential has differential coefficient one. +-/ theorem omegaPullbackCoeff_isogOneSub_negFrobenius_eq_one_via_pullbackKaehler_witness (hq : 2 ≤ Fintype.card K) (h_pK : (isogOneSub_negFrobenius W hq).pullbackKaehler @@ -2544,7 +2402,7 @@ theorem omegaPullbackCoeff_isogOneSub_negFrobenius_eq_one_via_pullbackKaehler_wi exact h_pK omit [Fintype K] in -/-- **Sub-helper 114** (id.pullbackKaehler ω = ω, axiom-clean). +/-- id.pullbackKaehler ω = ω. The identity isogeny acts trivially on the invariant differential. Direct from `pullbackKaehler_invariantDifferential (Isogeny.id W.toAffine)` + @@ -2554,28 +2412,15 @@ theorem pullbackKaehler_invariantDifferential_id : invariantDifferential W.toAffine := by rw [Isogeny.pullbackKaehler_invariantDifferential, omegaPullbackCoeff_id, one_smul] -/-- **Sub-helper 115** ((-π).pullbackKaehler ω = 0, axiom-clean). - -The negation-of-Frobenius isogeny annihilates the invariant differential -(at the cotangent level). Direct from `pullbackKaehler_invariantDifferential -(negFrobeniusIsog W)` + `omegaPullbackCoeff_negFrobeniusIsog = 0` -(Differential.lean line 430, axiom-clean). -/ +/-- Negative Frobenius annihilates the invariant differential, because its +invariant-differential coefficient is zero. -/ theorem pullbackKaehler_invariantDifferential_negFrobeniusIsog : (negFrobeniusIsog W).pullbackKaehler (invariantDifferential W.toAffine) = 0 := by rw [Isogeny.pullbackKaehler_invariantDifferential, omegaPullbackCoeff_negFrobeniusIsog, zero_smul] -/-- **Sub-helper 116** (γ.pullbackKaehler ω = ω via III.5.2 additivity witness — axiom-clean). - -Given the III.5.2 additivity at the differential level for our specific -decomposition `γ = id + (-π)`: - `γ.pullbackKaehler ω = id.pullbackKaehler ω + (-π).pullbackKaehler ω`, -combine with sub-helpers 114-115 (axiom-clean: `id.pullbackKaehler ω = ω` and -`(-π).pullbackKaehler ω = 0`) to conclude `γ.pullbackKaehler ω = ω + 0 = ω`. - -This is the closing-arc commit: the only remaining substantive input is the -III.5.2 differential additivity for our specific case, which is the III.5.2 -content for elliptic curve isogenies. -/ +/-- Differential additivity for `id + (-π)` gives pullback of the invariant differential +equal to itself, since the identity fixes it and negative Frobenius annihilates it. -/ theorem pullbackKaehler_invariantDifferential_isogOneSub_negFrobenius_via_additivity_witness (hq : 2 ≤ Fintype.card K) (h_add : (isogOneSub_negFrobenius W hq).pullbackKaehler @@ -2587,11 +2432,8 @@ theorem pullbackKaehler_invariantDifferential_isogOneSub_negFrobenius_via_additi rw [h_add, pullbackKaehler_invariantDifferential_id W, pullbackKaehler_invariantDifferential_negFrobeniusIsog W, add_zero] -/-- **Sub-helper 117** (ω(γ) = 1 via III.5.2 additivity witness — closing-arc). - -Composes sub-helper 113 (Kähler witness → ω(γ) = 1) with sub-helper 116 -(III.5.2 additivity → γ.pullbackKaehler ω = ω). The single substantive -input is the III.5.2 differential additivity for our specific decomposition. -/ +/-- Additivity of the pullback of the invariant differential for `id + (-π)` gives +differential coefficient one. -/ theorem omegaPullbackCoeff_isogOneSub_negFrobenius_eq_one_via_additivity_witness (hq : 2 ≤ Fintype.card K) (h_add : (isogOneSub_negFrobenius W hq).pullbackKaehler @@ -2603,20 +2445,9 @@ theorem omegaPullbackCoeff_isogOneSub_negFrobenius_eq_one_via_additivity_witness (pullbackKaehler_invariantDifferential_isogOneSub_negFrobenius_via_additivity_witness W hq h_add) -/-- **Sub-helper 119** (Kähler witness via slope-derivative witness — closing-arc). - -Given `D(addSlope W (negFrobeniusIsog W)) = c • D(x_gen)` for some `c : K(E)` -(derived from differentiating the slope formula `(y_gen - π·y) / (x_gen - π·x)` -with the Frobenius differential vanishing — sub-helpers 107, 108) and the -algebraic identity in K(E): - `(2ℓ + a₁) · c - 1 = (alpha_star_u γ) · u_gen⁻¹` -(equivalently, after clearing denominators: the K(E) identity that the III.5.2 -content carries out), conclude the Kähler witness needed by sub-helper 111. - -This factors the III.5.2 differential additivity through an explicit K(E) -identity. The slope-derivative witness is the Kähler-differential form of -the curve-tangent calculation; the K(E) identity is the substantive arithmetic -content of III.5.2 for our `id + (-π)` decomposition. -/ +/-- A slope derivative `D(ℓ) = c • D(x)` and the coefficient identity +`((2ℓ + a₁)c - 1)u = α*u` imply `(α*u)⁻¹ • D(α*x) = ω` for `α = 1 − π`. +This expresses differential additivity through an identity in the function field. -/ theorem kaehler_witness_via_slope_deriv_witness (p : ℕ) [Fact p.Prime] [CharP K p] (hq : 2 ≤ Fintype.card K) @@ -2665,14 +2496,8 @@ theorem kaehler_witness_via_slope_deriv_witness linear_combination h_KE_identity omit [Fintype K] [DecidableEq K] [WeierstrassCurve.IsElliptic W.toAffine] in -/-- **Sub-helper 120** (Weierstrass equation in K(E), axiom-clean): -`y_gen² + a₁·x_gen·y_gen + a₃·y_gen = x_gen³ + a₂·x_gen² + a₄·x_gen + a₆` -in K(E). Direct from the affine equation `Affine.Equation` for the generic -point on `W_KE`, with W_KE coefficients lifted to algebraMap form. - -This is the foundational K(E) identity that the curve-equation Kähler -differential identity (sub-helper 121) builds upon. No derivation involved -yet — purely the equation in K(E). -/ +/-- The generic coordinates satisfy the Weierstrass equation in the function field. +-/ theorem weierstrass_equation_in_KE : y_gen W ^ 2 + algebraMap K KE W.a₁ * x_gen W * y_gen W + algebraMap K KE W.a₃ * y_gen W = @@ -2684,14 +2509,8 @@ theorem weierstrass_equation_in_KE : exact h_gen omit [Fintype K] [DecidableEq K] [WeierstrassCurve.IsElliptic W.toAffine] in -/-- **Sub-helper 121** (Kähler form of curve equation, axiom-clean foundation): -literal D-application of the Weierstrass equation in K(E): -`D(y² + a₁xy + a₃y) = D(x³ + a₂x² + a₄x + a₆)` in `Ω[K(E)/K]`. - -Direct from `congrArg D` applied to `weierstrass_equation_in_KE` (sub-helper -120). The substantive Kähler identity `(a₃ + 2y + a₁x)·Dy = (3x² + 2a₂x + -a₄ - a₁y)·Dx` follows by Leibniz expansion; the explicit ℕ-smul ↔ KE-smul -conversion in that expansion is technical and deferred. -/ +/-- Applying the universal derivation to the generic Weierstrass equation gives +`D(y² + a₁xy + a₃y) = D(x³ + a₂x² + a₄x + a₆)` in `Ω[K(E)/K]`. -/ theorem kaehler_D_weierstrass_equation_K_E : KaehlerDifferential.D K W.toAffine.FunctionField (y_gen W ^ 2 + @@ -2706,9 +2525,8 @@ theorem kaehler_D_weierstrass_equation_K_E : (weierstrass_equation_in_KE W) omit [Fintype K] [DecidableEq K] [WeierstrassCurve.IsElliptic W.toAffine] in -/-- **Sub-helper 122** (D(y²) via pow_two — axiom-clean KE-smul-only): -`D(y_gen²) = y_gen • D(y_gen) + y_gen • D(y_gen)`. Wall-break: avoids -`Derivation.leibniz_pow`'s ℕ-smul. -/ +/-- D(y²) via pow_two — KE-smul-only: +`D(y_gen²) = y_gen • D(y_gen) + y_gen • D(y_gen)`. The product rule expresses both summands using function-field scalar multiplication. -/ theorem kaehler_D_y_gen_sq : KaehlerDifferential.D K W.toAffine.FunctionField (y_gen W ^ 2) = y_gen W • KaehlerDifferential.D K W.toAffine.FunctionField (y_gen W) + @@ -2717,7 +2535,7 @@ theorem kaehler_D_y_gen_sq : (KaehlerDifferential.D K W.toAffine.FunctionField).leibniz (y_gen W) (y_gen W)] omit [Fintype K] [DecidableEq K] [WeierstrassCurve.IsElliptic W.toAffine] in -/-- **Sub-helper 123** (D(x²) via pow_two — axiom-clean): +/-- D(x²) via pow_two —: `D(x_gen²) = x_gen • D(x_gen) + x_gen • D(x_gen)`. -/ theorem kaehler_D_x_gen_sq : KaehlerDifferential.D K W.toAffine.FunctionField (x_gen W ^ 2) = @@ -2727,7 +2545,7 @@ theorem kaehler_D_x_gen_sq : (KaehlerDifferential.D K W.toAffine.FunctionField).leibniz (x_gen W) (x_gen W)] omit [Fintype K] [DecidableEq K] [WeierstrassCurve.IsElliptic W.toAffine] in -/-- **Sub-helper 124** (D(x³) via pow expansion + leibniz — axiom-clean): +/-- D(x³) via pow expansion + leibniz —: `D(x_gen³) = x_gen² • D(x_gen) + x_gen • D(x_gen²)`. -/ theorem kaehler_D_x_gen_cube : KaehlerDifferential.D K W.toAffine.FunctionField (x_gen W ^ 3) = @@ -2739,9 +2557,8 @@ theorem kaehler_D_x_gen_cube : (KaehlerDifferential.D K W.toAffine.FunctionField).leibniz (x_gen W ^ 2) (x_gen W)] omit [Fintype K] [DecidableEq K] [WeierstrassCurve.IsElliptic W.toAffine] in -/-- **Sub-helper 125** (D-distribution of Weierstrass equation LHS, axiom-clean): -fully Leibniz-expanded LHS in KE-smul-only form. Uses sub-helper 122 (D(y²) -bypass) + Derivation.leibniz + D.map_algebraMap. -/ +/-- Applying the product rule to the left-hand side of the Weierstrass equation gives +its expansion using function-field scalar multiplication. -/ theorem kaehler_D_weierstrass_LHS_expanded : KaehlerDifferential.D K W.toAffine.FunctionField (y_gen W ^ 2 + @@ -2770,8 +2587,8 @@ theorem kaehler_D_weierstrass_LHS_expanded : simp only [smul_zero, add_zero] omit [Fintype K] [DecidableEq K] [WeierstrassCurve.IsElliptic W.toAffine] in -/-- **Sub-helper 126** (D-distribution of Weierstrass equation RHS, axiom-clean): -fully Leibniz-expanded RHS. Uses sub-helpers 123, 124. -/ +/-- D-distribution of Weierstrass equation RHS: +fully Leibniz-expanded RHS. The product rule expands the square and cube. -/ theorem kaehler_D_weierstrass_RHS_expanded : KaehlerDifferential.D K W.toAffine.FunctionField (x_gen W ^ 3 + @@ -2803,17 +2620,10 @@ theorem kaehler_D_weierstrass_RHS_expanded : (KaehlerDifferential.D K W.toAffine.FunctionField).map_algebraMap W.a₆] simp only [smul_zero, add_zero] -/-- **Sub-helper 127** (curve-equation Kähler identity, axiom-clean): - +omit [Fintype K] [DecidableEq K] [WeierstrassCurve.IsElliptic W.toAffine] in +/-- Differentiating the Weierstrass equation gives `(a₃ + 2y + a₁x) • D(y) = (3x² + 2a₂x + a₄ - a₁y) • D(x)` in `Ω[K(E)/K]`. - -Combines sub-helper 121 (D(LHS) = D(RHS) via congrArg) + 125 (LHS expansion) -+ 126 (RHS expansion) + `linear_combination`. All KE-smul throughout — -ℕ-smul wall bypassed via sub-helpers 122-124. - -This is the SUBSTANTIVE K(E) Kähler identity. NO witnesses. Foundational -for sub-helper 128 (D(slope)) and the III.5.2 invariant-differential -additivity. -/ +-/ theorem kaehler_curve_equation_K_E : (algebraMap K KE W.a₃ + (2 : KE) * y_gen W + algebraMap K KE W.a₁ * x_gen W) • @@ -2823,10 +2633,7 @@ theorem kaehler_curve_equation_K_E : algebraMap K KE W.a₄ - algebraMap K KE W.a₁ * y_gen W) • KaehlerDifferential.D K W.toAffine.FunctionField (x_gen W) := by - -- Sixth wall-break attempt: pre-rewrite goal `(2 : KE) * y_gen` to - -- `y_gen + y_gen` using ring identities BEFORE expansion, eliminating the - -- (2 : KE) literal at the source. Then both sides use only +-additive - -- composition + KE-smul, no `(2 : ℕ)` casts anywhere. + -- Expand the integer coefficients as sums in the function field before differentiating. set Dx := KaehlerDifferential.D K W.toAffine.FunctionField (x_gen W) set Dy := KaehlerDifferential.D K W.toAffine.FunctionField (y_gen W) -- Substitute literals with explicit sums in K(E). @@ -2851,24 +2658,9 @@ theorem kaehler_curve_equation_K_E : -- Now both sides are sums of (KE-coefficient) • (Dx or Dy). Match via abel. linear_combination (norm := abel) h_eq -/-- **Sub-helper 128** (D(addSlope) for negFrobenius — substantive K(E) identity, axiom-clean): - -The Kähler derivative of `addSlope W (negFrobeniusIsog W) = -(y_gen - π·y) / (x_gen - π·x)` satisfies the closed-form identity: - -``` -(x_gen - π·x)² • D(addSlope) = (x_gen - π·x) • D(y_gen) - (y_gen - π·y) • D(x_gen) -``` - -where π·x = (negFrob).pullback x_gen, π·y = (negFrob).pullback y_gen. - -Proof: apply `Derivation.leibniz_div` to `addSlope_negFrobeniusIsog_eq`, -simplify via `D(π·x) = 0` (sub-helper 107), `D(π·y) = 0` (sub-helper 108), -cancel Den² · Den⁻² = 1. - -This is the SUBSTANTIVE K(E) Kähler identity for the addition slope — -NO witnesses, NO hypotheses beyond Mathlib's quotient rule and the -existing Frobenius-differential vanishing (axiom-clean). -/ +/-- The quotient rule and vanishing of Frobenius differentials give +`Den² • D(ℓ) = Den • D(y) - N • D(x)` for the addition slope, where +`Den = x - (-π)*x` and `N = y - (-π)*y`. -/ theorem kaehler_D_addSlope_negFrobenius (p : ℕ) [Fact p.Prime] [CharP K p] : (x_gen W - (negFrobeniusIsog W).pullback (x_gen W)) ^ 2 • @@ -2902,7 +2694,7 @@ theorem kaehler_D_addSlope_negFrobenius rw [one_smul] omit [Fintype K] in -/-- **Route B core (III.5.2), general slope differential** (no Frobenius flatness): for any `α` +/-- **General slope differential** (no Frobenius flatness): for any `α` with `x_gen ≠ α*x_gen` (non-doubling), the Kähler derivative of `addSlope = (y−α*y)/(x−α*x)` satisfies `Den²·D(addSlope) = Den·(D(y)−D(α*y)) − N·(D(x)−D(α*x))` where `N = y−α*y`, `Den = x−α*x`. Generalizes `kaehler_D_addSlope_negFrobenius` (which used `D(π*x)=D(π*y)=0`). -/ @@ -2931,10 +2723,9 @@ theorem kaehler_D_addSlope_general show Den ^ 2 * Den⁻¹ ^ 2 = 1 from by rw [← mul_pow, mul_inv_cancel₀ hDen_ne, one_pow], one_smul] -/-- **Sub-helper 129** (D(γ.pullback x_gen) cleared form, axiom-clean): +/-- D(γ.pullback x_gen) cleared form: -Combines sub-helper 110 (`D(addPullback_x) = (2ℓ + a₁) • D(ℓ) - D(x_gen)`) -with sub-helper 128 (`Den² • D(addSlope) = Den • D(y_gen) - N • D(x_gen)`) +Combines the differentiated addition formula with the denominator-cleared slope derivative to give a single closed-form identity for D(γ.pullback x_gen) involving D(y_gen) and D(x_gen) (with Den² as the multiplier). @@ -2949,7 +2740,7 @@ where ℓ = addSlope, Den = x_gen - π·x, N = y_gen - π·y. This is the substantive D(γ.pullback x_gen) reduction in K(E), expressed purely in terms of the curve generators' Kähler differentials and Den, N -without any inverses. Foundational for the III.5.2 cascade closure. -/ +without any inverses. This is a differential form of Silverman III.5.2. -/ theorem kaehler_D_addPullback_x_negFrobenius_cleared (p : ℕ) [Fact p.Prime] [CharP K p] : (x_gen W - (negFrobeniusIsog W).pullback (x_gen W)) ^ 2 • @@ -2963,14 +2754,14 @@ theorem kaehler_D_addPullback_x_negFrobenius_cleared KaehlerDifferential.D K W.toAffine.FunctionField (x_gen W)) - (x_gen W - (negFrobeniusIsog W).pullback (x_gen W)) ^ 2 • KaehlerDifferential.D K W.toAffine.FunctionField (x_gen W) := by - -- Multiply sub-helper 110 by Den² and use sub-helper 128. + -- Multiply the x-coordinate differential by Den² and substitute the slope derivative. rw [kaehler_D_addPullback_x_negFrobenius W p, smul_sub, smul_smul] rw [mul_comm ((x_gen W - (negFrobeniusIsog W).pullback (x_gen W)) ^ 2) (2 * addSlope W (negFrobeniusIsog W) + algebraMap K KE W.a₁)] rw [← smul_smul, kaehler_D_addSlope_negFrobenius W p, smul_sub] omit [Fintype K] in -/-- **Route B core (III.5.2), general cleared form**: combines `kaehler_D_addPullback_x_general` +/-- **General cleared form**: combines `kaehler_D_addPullback_x_general` with `kaehler_D_addSlope_general` to clear the `Den²` denominator from `D(addPullback_x)` for arbitrary `α` (non-doubling). Generalizes `kaehler_D_addPullback_x_negFrobenius_cleared`. -/ theorem kaehler_D_addPullback_x_general_cleared @@ -3004,8 +2795,9 @@ theorem kaehler_D_x_gen_eq_u_smul_omega : (u_gen W)⁻¹ • KaehlerDifferential.D K W.toAffine.FunctionField (x_gen W) from rfl, smul_smul, mul_inv_cancel₀ (u_gen_ne_zero W), one_smul] +omit [Fintype K] [DecidableEq K] in /-- **RB-ω2 leaf**: `D(y_gen) = (3x²+2a₂x+a₄−a₁y) • ω`. From the curve-equation differential -`u_gen·D(y) = (3x²+2a₂x+a₄−a₁y)·D(x)` (Sub-helper 121 chain) and `D(x) = u_gen·ω` (RB-ω1), +`u_gen·D(y) = (3x²+2a₂x+a₄−a₁y)·D(x)` from the differentiated curve equation and `D(x) = u_gen·ω` , dividing through by `u_gen ≠ 0`. Silverman III.5: the relation `(2y+a₁x+a₃)dy = (3x²+2a₂x+a₄−a₁y)dx` from differentiating the Weierstrass equation. -/ theorem kaehler_D_y_gen_eq_num_smul_omega : @@ -3032,7 +2824,7 @@ omit [Fintype K] in /-- **RB-ω3 leaf** (α-image differentials): for the omega coefficient `a_α = omegaPullbackCoeff W α`, `D(α*x) = (α*u)·a_α·ω` and `D(α*y) = (α*num)·a_α·ω`. From `omegaPullbackCoeff_spec` (`a_α•ω = (α*u)⁻¹•D(α*x)`) and the α-image curve-equation differential -(Sub-helper 121 at the pulled-back point `(α*x, α*y)`, also on the curve by `pullback_equation`). -/ +(the differentiated curve equation at the pulled-back point `(α*x, α*y)`, also on the curve by `pullback_equation`). -/ theorem kaehler_D_alpha_pullback_x_eq_smul_omega (α : Isogeny W.toAffine W.toAffine) : KaehlerDifferential.D K W.toAffine.FunctionField (α.pullback (x_gen W)) = @@ -3049,6 +2841,7 @@ theorem kaehler_D_alpha_pullback_x_eq_smul_omega rw [hspec, smul_smul, mul_inv_cancel₀ h_au_ne, one_smul] rw [← key, smul_smul] +omit [Fintype K] in /-- **RB-ω3b leaf** (α-image `D(y)`): `D(α*y) = (α*num)·a_α·ω`. From the α-image curve-equation differential (apply `Isogeny.pullbackKaehler` to `kaehler_curve_equation_K_E` — `pullbackKaehler` is α-semilinear and sends `D g ↦ D(α*g)`) + `kaehler_D_alpha_pullback_x_eq_smul_omega` (RB-ω3a), cancel @@ -3094,6 +2887,7 @@ theorem kaehler_D_alpha_pullback_y_eq_smul_omega congr 1 ring +omit [Fintype K] in /-- **RB-ω4 leaf (the III.5.2 ring collapse)**: for genuine α (x≠α*x), the differential of the addition-pullback x-coordinate equals `addPullback_u • (1 + a_α) • ω`, where `addPullback_u = 2·addPullback_y + a₁·addPullback_x + a₃` is the u-coordinate at the sum point. @@ -3151,23 +2945,11 @@ theorem kaehler_D_addPullback_x_eq_one_add_smul_omega (-(2 * (Y - PY) + c1 * (X - PX)) * (1 - omegaPullbackCoeff W α)) * hP + ((2 * (Y - PY) + c1 * (X - PX)) * (1 - omegaPullbackCoeff W α)) * hαP -/-- **Sub-helper 130** (D(addSlope) reduced to D(x_gen) via curve equation, axiom-clean): - -Combines sub-helper 127 (curve equation Kähler identity) with sub-helper 128 -(D(slope) identity) to express D(addSlope) entirely in terms of D(x_gen): - -``` -(u_gen · Den²) • D(addSlope) = (Den · num - u_gen · N) • D(x_gen) -``` - -where: -- u_gen = a₃ + 2y + a₁x -- Den = x - π·x -- N = y - π·y -- num = 3x² + 2a₂x + a₄ - a₁y - -Substantive K(E) Kähler identity — combines axiom-clean Path A sub-helpers -127 + 128. Foundational for ω(γ) = 1 via the Kähler-witness route. -/ +/-- The differential of the addition slope satisfies +`(u · Den²) • D(ℓ) = (Den · num - u · N) • D(x)`, where +`u = a₃ + 2y + a₁x`, `num = 3x² + 2a₂x + a₄ - a₁y`, +`Den = x - (-π)*x`, and `N = y - (-π)*y`. +This combines the quotient rule with the differentiated curve equation. -/ theorem kaehler_D_addSlope_via_curve_equation_negFrobenius (p : ℕ) [Fact p.Prime] [CharP K p] : ((algebraMap K KE W.a₃ + (2 : KE) * y_gen W + @@ -3184,7 +2966,7 @@ theorem kaehler_D_addSlope_via_curve_equation_negFrobenius algebraMap K KE W.a₁ * x_gen W) * (y_gen W - (negFrobeniusIsog W).pullback (y_gen W))) • KaehlerDifferential.D K W.toAffine.FunctionField (x_gen W) := by - -- Multiply sub-helper 128 by u_gen' on the left, then substitute via 127. + -- Multiply the slope derivative by u, then substitute the differentiated curve equation. have h_slope := kaehler_D_addSlope_negFrobenius W p have h_curve := kaehler_curve_equation_K_E W -- Step 1: multiply h_slope by u_gen' (smul-distribute). @@ -3203,13 +2985,8 @@ theorem kaehler_D_addSlope_via_curve_equation_negFrobenius -- Now collect smul forms. rw [smul_smul, smul_smul, ← sub_smul] -/-- **Sub-helper 131** (`alpha_star_u` computed explicitly for γ, axiom-clean): -the explicit form of `alpha_star_u (isogOneSub_negFrobenius W hq)` in K(E): -`α*(u) = 2·addPullback_y + a₁·addPullback_x + a₃`. - -Direct from `alpha_star_u_eq` + sub-helpers 89b, 89c (axiom-clean -`γ.pullback x_gen = addPullback_x` and `γ.pullback y_gen = addPullback_y`) -+ `u_gen` definition. -/ +/-- For `γ = 1 − π`, the pulled-back differential denominator is +`α*u = 2·addPullback_y + a₁·addPullback_x + a₃`. -/ theorem alpha_star_u_isogOneSub_negFrobenius (hq : 2 ≤ Fintype.card K) : alpha_star_u W (isogOneSub_negFrobenius W hq) = @@ -3233,13 +3010,13 @@ theorem alpha_star_u_isogOneSub_negFrobenius rw [(isogOneSub_negFrobenius W hq).pullback.commutes W.a₁, (isogOneSub_negFrobenius W hq).pullback.commutes W.a₃] -/-- **Sub-helper 132** (α*(u) + u_gen identity in K(E), axiom-clean): +/-- α*(u) + u_gen identity in K(E): `α*(u) + u_gen = -(2ℓ + a₁) · (addPullback_x - x_gen)` in K(E) where ℓ = addSlope W (negFrobeniusIsog W). -Proof: substitute α*(u) = 2·addPullback_y + a₁·addPullback_x + a₃ (sub-helper 131) +Proof: substitute α*(u) = 2·addPullback_y + a₁·addPullback_x + a₃ and addPullback_y via Affine.addY/negY/negAddY definitional unfoldings, then verify by ring algebra in K(E). @@ -3247,8 +3024,7 @@ This is the substantive K(E) identity that simplifies the RHS of the target Kähler-witness identity to: `(α*(u) + u_gen) · Den² = -(2ℓ + a₁) · (addPullback_x - x_gen) · Den²`. -Combined with sub-helper 130 (LHS reduction), the target K(E) identity -becomes a sub-divisible polynomial identity. -/ +Together with the slope derivative formula, this reduces differential additivity to a polynomial identity. -/ theorem alpha_star_u_plus_u_gen_negFrobenius (hq : 2 ≤ Fintype.card K) : alpha_star_u W (isogOneSub_negFrobenius W hq) + u_gen W = @@ -3266,7 +3042,7 @@ theorem alpha_star_u_plus_u_gen_negFrobenius rw [h_a1, h_a2, h_a3] ring -/-- **Sub-helper 133** (curve equation for π·(x_gen, y_gen) in K(E), axiom-clean): +/-- curve equation for π·(x_gen, y_gen) in K(E): The π-shifted Weierstrass equation in K(E): `(π·y)² + a₁(π·x)(π·y) + a₃(π·y) = (π·x)³ + a₂(π·x)² + a₄(π·x) + a₆` @@ -3274,7 +3050,7 @@ The π-shifted Weierstrass equation in K(E): where π·x = (negFrob).pullback x_gen, π·y = (negFrob).pullback y_gen. Proof: apply `(negFrobeniusIsog W).pullback` (a K-algebra hom) to -`weierstrass_equation_in_KE` (sub-helper 120). The hom respects + and * +`weierstrass_equation_in_KE`. The hom respects + and * and fixes algebraMap-images of K, so the equation transforms term-by-term. -/ theorem weierstrass_equation_pi_negFrobenius : (negFrobeniusIsog W).pullback (y_gen W) ^ 2 + @@ -3296,7 +3072,7 @@ theorem weierstrass_equation_pi_negFrobenius : AlgHom.commutes (negFrobeniusIsog W).pullback] at h_pi exact h_pi -/-- **Sub-helper 134** (substantive K(E) polynomial identity for III.5.2, axiom-clean): +/-- substantive K(E) polynomial identity for III.5.2: The K(E) ring identity that closes the Kähler-witness route to ω(γ) = 1: @@ -3316,7 +3092,7 @@ where: Proof: substitute the slope formula `ℓ = (y - π·y)/(x - π·x)` (squared and multiplied by Den² gives the polynomial form), then close via -`linear_combination` with the two curve equations (sub-helpers 120 + 133) +`linear_combination` with the two curve equations as multipliers. The identity holds because γ = id - π is a curve isogeny, which respects the curve equation. @@ -3342,7 +3118,7 @@ theorem kaehler_witness_polynomial_identity_negFrobenius : have h_curve_pi := weierstrass_equation_pi_negFrobenius W linear_combination -h_curve + h_curve_pi -/-- **Sub-helper 135** ((addPullback_x - x_gen) · Den² polynomial form, axiom-clean): +/-- (addPullback_x - x_gen) · Den² polynomial form: ``` (addPullback_x - x_gen) · Den² = @@ -3355,7 +3131,7 @@ slope formula `ℓ = (y - π·y) / (x - π·x)` giving `ℓ · (x - π·x) = (y hence `ℓ² · (x - π·x)² = (y - π·y)²` and `ℓ · (x - π·x)² = (y - π·y) · (x - π·x)`. Substantive polynomial-form bridge between the slope-divisor identity -and the curve-equation polynomial identity (sub-helper 134). -/ +and the curve-equation polynomial identity. -/ theorem addPullback_x_sub_x_gen_mul_Den_sq_negFrobenius : (addPullback_x W (negFrobeniusIsog W) - x_gen W) * (x_gen W - (negFrobeniusIsog W).pullback (x_gen W)) ^ 2 = @@ -3394,18 +3170,8 @@ theorem addPullback_x_sub_x_gen_mul_Den_sq_negFrobenius : algebraMap K KE W.a₁ * (x_gen W - (negFrobeniusIsog W).pullback (x_gen W))) * h_slope_lin -/-- **Sub-helper 136** (curve-equation form of K(E) Kähler-witness identity, axiom-clean): - -``` -Den · num - u_gen · N + (addPullback_x - x_gen) · Den² = 0 -``` - -Combines sub-helper 134 (polynomial form identity) with sub-helper 135 -(`(addPullback_x - x_gen) · Den² = polynomial form`) to give the K(E) -identity in the form needed by the Kähler-witness consumer. - -This is THE identity that closes ω(γ) = 1 / Witness #1 / III.5.2 via -the Kähler witness route. -/ +/-- The two curve equations and the addition formula give +`Den · num - u · N + (addPullback_x - x) · Den² = 0` in the function field. -/ theorem kaehler_witness_curve_form_negFrobenius : (x_gen W - (negFrobeniusIsog W).pullback (x_gen W)) * ((3 : KE) * x_gen W ^ 2 + @@ -3420,14 +3186,8 @@ theorem kaehler_witness_curve_form_negFrobenius : rw [addPullback_x_sub_x_gen_mul_Den_sq_negFrobenius W] exact kaehler_witness_polynomial_identity_negFrobenius W -/-- **Sub-helper 137** (K(E) coefficient identity for Kähler witness, axiom-clean): -the K(E) coefficient identity that closes the Kähler-witness chain: - -``` -(2ℓ + a₁) · (Den · num - u_gen · N) = (α*(u) + u_gen) · Den² -``` - -Combines sub-helpers 132 + 136 axiom-clean. -/ +/-- The addition formulas and curve equations give the coefficient identity +`(2ℓ + a₁)(Den · num - u · N) = (α*u + u) · Den²`. -/ theorem kaehler_witness_coefficient_identity_negFrobenius (hq : 2 ≤ Fintype.card K) : ((2 : KE) * addSlope W (negFrobeniusIsog W) + @@ -3443,7 +3203,7 @@ theorem kaehler_witness_coefficient_identity_negFrobenius (alpha_star_u W (isogOneSub_negFrobenius W hq) + u_gen W) * (x_gen W - (negFrobeniusIsog W).pullback (x_gen W)) ^ 2 := by rw [alpha_star_u_plus_u_gen_negFrobenius W hq] - -- Use sub-helper 136 (curve-form K(E) identity, axiom-clean): + -- The curve-form identity gives: -- Den·num - u_gen·N + (addPullback_x - x_gen)·Den² = 0. -- Multiply by (2ℓ+a₁) to get: (2ℓ+a₁)·(Den·num - u_gen·N + (addPullback_x - x_gen)·Den²) = 0. -- Rearrange to: (2ℓ+a₁)·(Den·num - u_gen·N) = -(2ℓ+a₁)·(addPullback_x - x_gen)·Den². @@ -3451,16 +3211,9 @@ theorem kaehler_witness_coefficient_identity_negFrobenius linear_combination (2 * addSlope W (negFrobeniusIsog W) + algebraMap K KE W.a₁) * h_136 -/-- **Sub-helper 138** (ω(γ) = 1 axiom-clean — Witness #1 omega-coefficient). - -Instantiates `kaehler_witness_via_slope_deriv_witness` with the explicit -witness `c := (Den · num - u · N) / (u · Den²)`, where `u = a₃ + 2y + a₁x`, -`Den = x - π·x`, `N = y - π·y`, `num = 3x² + 2a₂x + a₄ - a₁y`. - -The slope-deriv witness `D(addSlope) = c • D(x_gen)` follows from sub-helper -130 by smul-cancelling `u · Den²`. The K(E) coefficient identity -`((2ℓ + a₁) · c - 1) · u_gen = α*(u)` follows from sub-helper 137 by -field-simplification + linear_combination. -/ +/-- The invariant-differential coefficient of `1 − π` is one. +The slope derivative has coefficient `c = (Den · num - u · N)/(u · Den²)` relative +to `D(x)`, and the two curve equations give `((2ℓ + a₁)c - 1)u = α*u`. -/ theorem omegaPullbackCoeff_isogOneSub_negFrobenius_eq_one (p : ℕ) [Fact p.Prime] [CharP K p] (hq : 2 ≤ Fintype.card K) : @@ -3496,11 +3249,8 @@ theorem omegaPullbackCoeff_isogOneSub_negFrobenius_eq_one sub_eq_iff_eq_add, div_eq_iff huDen_ne] linear_combination u * h_137 -/-- **Sub-helper 139** (Witness #1 axiom-clean — IsSeparable γ). - -Composes sub-helper 138 (ω(γ) = 1 axiom-clean) with -`isogOneSub_negFrobenius_isSeparable_of_h_coeff_only` (T-II-4-004 absorbed, -axiom-clean) to produce the unconditional Witness #1 of the Hasse-Weil bound. -/ +/-- The isogeny `1 − π` is separable, because its invariant-differential coefficient +is one. -/ theorem isogOneSub_negFrobenius_isSeparable (p : ℕ) [Fact p.Prime] [CharP K p] (hq : 2 ≤ Fintype.card K) : @@ -3607,7 +3357,7 @@ rule (`kaehler_D_addSlopePair_clearDenomSq`) with the `addX` Leibniz expansion (`kaehler_D_addPullback_x_pair_via_slope`) into a single denominator-free expression for `(X₁ - X₂)² • D(addPullback_x_pair)`. A leaf of `kaehler_D_addPullback_x_pair_eq_smul_omega`. -/ -private theorem kaehler_D_addPullback_x_pair_clearDenomSq +theorem kaehler_D_addPullback_x_pair_clearDenomSq (α₁ α₂ : Isogeny W.toAffine W.toAffine) (h_ne : α₁.pullback (x_gen W) ≠ α₂.pullback (x_gen W)) : (α₁.pullback (x_gen W) - α₂.pullback (x_gen W)) ^ 2 • @@ -3641,7 +3391,7 @@ unfolding `addPullback_x/y_pair` and `alpha_star_u`, substituting the two pullba equations (`pullback_equation α₁/α₂`), clearing the denominator, and closing with the free-variable algebra core `kaehler_D_addPullback_x_pair_ring_identity`. The scalar half of `kaehler_D_addPullback_x_pair_eq_smul_omega`. -/ -private theorem kaehler_D_addPullback_x_pair_coeff_collapse +theorem kaehler_D_addPullback_x_pair_coeff_collapse (α₁ α₂ : Isogeny W.toAffine W.toAffine) (h_ne : α₁.pullback (x_gen W) ≠ α₂.pullback (x_gen W)) : (2 * addSlopePair α₁ α₂ + algebraMap K KE W.a₁) * @@ -3691,6 +3441,7 @@ private theorem kaehler_D_addPullback_x_pair_coeff_collapse (omegaPullbackCoeff W α₁) (omegaPullbackCoeff W α₂) (algebraMap K KE W.a₂) (algebraMap K KE W.a₃) (algebraMap K KE W.a₄) (algebraMap K KE W.a₆) hα₁ hα₂ +omit [Fintype K] in /-- **General-pair III.5.2 differential collapse**: for genuine pairs (`α₁*x ≠ α₂*x`), the differential of the pair addition `x`-coordinate is `u₃ • ((a_{α₁} + a_{α₂}) • ω)`, where `u₃ = 2·addPullback_y_pair + a₁·addPullback_x_pair + a₃` diff --git a/projects/HasseWeil/HasseWeil/Foundation/Auxiliary/DiffQuotientRule.lean b/projects/HasseWeil/HasseWeil/Foundation/Auxiliary/DiffQuotientRule.lean index 218313002..5de8144cd 100644 --- a/projects/HasseWeil/HasseWeil/Foundation/Auxiliary/DiffQuotientRule.lean +++ b/projects/HasseWeil/HasseWeil/Foundation/Auxiliary/DiffQuotientRule.lean @@ -22,6 +22,7 @@ variable (E : Affine F) [E.IsElliptic] local notation "KE" => E.FunctionField omit [DecidableEq F] in +omit [WeierstrassCurve.IsElliptic E] in /-- `D(f⁻¹) = -f⁻² • D(f)` for nonzero `f ∈ K(E)`. -/ theorem D_inv_smul (f : KE) (hf : f ≠ 0) : KaehlerDifferential.D F KE f⁻¹ = @@ -36,7 +37,7 @@ theorem D_inv_smul (f : KE) (hf : f ≠ 0) : _ = f⁻¹ • (-(f⁻¹ • D f)) := by rw [h3] _ = -(f⁻¹ ^ 2 • D f) := by rw [smul_neg, smul_smul, ← sq] -omit [DecidableEq F] in +omit [DecidableEq F] [WeierstrassCurve.IsElliptic E] in /-- `D(f * g⁻¹) = g⁻¹ • D(f) + (stuff involving D(g))`. Leibniz + inverse rule. -/ theorem D_mul_inv_smul (f g : KE) (hg : g ≠ 0) : KaehlerDifferential.D F KE (f * g⁻¹) = diff --git a/projects/HasseWeil/HasseWeil/Foundation/Auxiliary/EllipticDivisibilitySequence.lean b/projects/HasseWeil/HasseWeil/Foundation/Auxiliary/EllipticDivisibilitySequence.lean index b07632812..bf6d0816a 100644 --- a/projects/HasseWeil/HasseWeil/Foundation/Auxiliary/EllipticDivisibilitySequence.lean +++ b/projects/HasseWeil/HasseWeil/Foundation/Auxiliary/EllipticDivisibilitySequence.lean @@ -12,21 +12,6 @@ import Mathlib.NumberTheory.EllipticDivisibilitySequence import Mathlib.Tactic.IntervalCases import Mathlib.Tactic.LinearCombination -/-! -# Additional lemmas for elliptic divisibility sequences - -This file provides definitions and lemmas about normalised elliptic divisibility sequences -that are not yet in mathlib. These are needed for the division polynomial / ZSMul development. - -The key results are: -* `IsEllipticSequence.normEDS`: a normalised EDS is an elliptic sequence. -* `IsEllipticSequence.ext`: two elliptic sequences with the same first four terms are equal. -* `normEDS_two_three_two`: when `b = 2, c = 3, d = 2`, the normalised EDS is the identity. -* `complEDSAux₂`: auxiliary complement used in the `ω` definition. -* `redInvarDenom`, `redInvarNum`: reduced invariant decomposition. - -Ported from the LutzNagell project (`LutzNagell/EllipticDivisibilitySequence.lean`). --/ open scoped nonZeroDivisors @@ -417,12 +402,12 @@ theorem rel₄_of_anti_oddRec_evenRec (one : W 1 ∈ R⁰) (two : W 2 ∈ R⁰) linarith only [hba] obtain ⟨m, rfl|rfl⟩ := b.even_or_odd' · have ea : Even a := by rw [← ha']; exact (even_two_mul _).add even_two - simp_rw [cMin, dMin, if_pos ea] + simp_rw [cMin, dMin, ite_eq_left ea] convert (rel₃_iff₄ W (m + 1) m 1).mp ((rel₃_iff_oddRec W m).mpr <| oddRec _ ?_) using 2 all_goals linarith only [h6, ha'] · have nea : ¬ Even a := by rw [← ha', not_even_iff_odd]; convert odd_two_mul_add_one (m + 1) using 1; ring - simp_rw [cMin, dMin, if_neg nea] + simp_rw [cMin, dMin, ite_eq_right nea] convert (rel₄_iff_evenRec W (m + 1)).mpr (evenRec _ ?_) using 2 all_goals linarith only [h6, ha'] @@ -623,9 +608,9 @@ lemma invarDenom_normEDS_two : simp [EllSequence.invarDenom] lemma normEDS_six_eq_mul : normEDS b c d 6 = (normEDS b c d 5 - d ^ 2) * b * c := by - rw [show (6 : ℤ) = 2 * 3 by rfl, ← normEDS_mul_complEDS₂, complEDS₂, if_neg (by decide)] + rw [show (6 : ℤ) = 2 * 3 by rfl, ← normEDS_mul_complEDS₂, complEDS₂, ite_eq_right (by decide)] simp_rw [Int.reduceAdd, Int.reduceSub, normEDS_three, normEDS] - rw [preNormEDS_one, preNormEDS_two, preNormEDS_four, if_neg (by decide)] + rw [preNormEDS_one, preNormEDS_two, preNormEDS_four, ite_eq_right (by decide)] ring end NormEDSLemmas diff --git a/projects/HasseWeil/HasseWeil/Foundation/Basic.lean b/projects/HasseWeil/HasseWeil/Foundation/Basic.lean index b2c035a234ea01cc215b69064d795adea7e2c888..31b9bd23d3724605cf874fab7e45adf87d019f61 100644 GIT binary patch delta 149 zcmbPop6UH6rVT$CCl|9>Y+k}C%(OXyr;2fNDc?hu$>G9oljni4;^dor0+Yo=6egRC zv~1oZGLdKV1C51(j9inqSSoH#v0iP*%B8ETkT5y1LUD3$)xyn<)vAn>m)E3j=B;(* z0x}dQm$b`I=B?G7yrIiz^ZWK@=FQ8yrCGR3QsYw#7%Q6xKL#el{&hlaS!J&=&}hShiD#91=AxstSRUrY%Y-qEZ!)y<=zSdS^Sk zwv%v3kOHd20ii82Q2rziQ6*4IS7-%-OAq{r1CRq!PlbRKQ9w$l1ch>7b{xkct$o_r zH}k&t-Z$TSv+z~D`%(SHIy7ejwt$)}P4pQsvYM8_$y27H9GfDbu_V@jOdD7?Dbr10 zDX@e+ImNgdv9K zJuUO48AGE_Tr0B9NNQ_rYHAnT-R^F{+xN(i|1Fq`fK#2317M zVTNDH@B$Bv*1d7zV?LLM%4C zJa5Mab~`ULkN6u|YEoy`ILSDlxBpxp@I;ZK(?pFJj0#C?NXEIa^E&F3+foUzk)9BP zvv^NKO)bk%tAO7^J+|BZO%p8DtY>p(AG-?_R$UIxDm)u0DR02V5(d#ZNdoa{A=TM_(O}k;Xxa3X4I^Fl4;MS^ulF?BpIvWvzMOnR z>8cnsY=4^A=`1|k)nFf4xy$~xq0Twa2k%?|X|V5KZGP|XSKIowCL%j?qr=Nwm<~FB zV4raBtPwrnjIX@nt0<;Ryjusf5Clt*G6-u^k<) zsS0>_2O30$4_i=&4|)sTZK%zCrxjf-n%o!L(bD=d-hra18dTwIC;Gh*3?NIwxrG4w zwZ58zd!`$m^H)95_aK_Ct9oKFg5FiCo){lO{}xFtzBvDzGtduldo9@Jo_P!{*EEsS zS*%6Gb3%B*7(+u6c-@WaIl@h{F+AN5#t=fSWx simp | tmul x y => simp [KaehlerDifferential.mapBaseChange_tmul, h_map_zero] | add x y hx hy => simp [map_add, hx, hy] -/-- **T-II-4-004 forward direction (axiom-clean)**: if `α` is separable, -then `omegaPullbackCoeff W α ≠ 0`. - -Pipeline: `IsSeparable → Subsingleton Ω[K(E)/K(E)_α]` → -`mapBaseChange surjective` (via the type synonym) → in particular, -`invariantDifferential ∈ image(mapBaseChange)` (cotangent exact sequence). -A nonzero image element forces `α.pullbackKaehler` not-identically-zero, -which (with the 1-dim Ω structure) forces `omegaPullbackCoeff ≠ 0`. -/ theorem isogeny_omegaCoeff_ne_zero_of_isSeparable (α : Isogeny W.toAffine W.toAffine) (h_sep : α.IsSeparable) : @@ -761,7 +556,7 @@ theorem isogeny_omegaCoeff_ne_zero_of_isSeparable have h_pK_zero : ∀ ω' : Ω[W.toAffine.FunctionField⁄F], α.pullbackKaehler ω' = 0 := pullbackKaehler_eq_zero_of_omegaPullbackCoeff_eq_zero W α h_zero - haveI : Subsingleton (Ω[W.toAffine.FunctionField⁄IsogenyAlgebraSource W α]) := + have : Subsingleton (Ω[W.toAffine.FunctionField⁄IsogenyAlgebraSource W α]) := (isogeny_subsingleton_via_synonym_eq W α).mpr (isogeny_subsingleton_kaehler_of_isSeparable W α h_sep) have h_surj : Function.Surjective (KaehlerDifferential.mapBaseChange F @@ -779,12 +574,6 @@ theorem isogeny_omegaCoeff_ne_zero_of_isSeparable rw [h_mbc_zero, LinearMap.zero_apply] at ht exact (invariantDifferential_ne_zero W.toAffine) ht.symm -/-- **T-II-4-004 reverse direction (witness-parametric on FiniteDim only, -axiom-clean)**: if `omegaPullbackCoeff W α ≠ 0` and `K(E)` is finite-dimensional -over `K(E)_α` (Witness #2), then `α` is separable. - -Combines the cotangent-sequence bridge (omega-coeff ≠ 0 → Subsingleton) with the -algebra-Kähler reverse direction (Subsingleton + FiniteDim → IsSeparable). -/ theorem isogeny_isSeparable_of_omegaCoeff_ne_zero_finiteDim (α : Isogeny W.toAffine W.toAffine) (h_coeff : omegaPullbackCoeff W α ≠ 0) @@ -796,14 +585,6 @@ theorem isogeny_isSeparable_of_omegaCoeff_ne_zero_finiteDim (isogeny_subsingleton_kaehler_of_omegaCoeff_ne_zero W α h_coeff)) h_fin -/-- **T-II-4-004 full iff (witness-parametric on FiniteDim only, axiom-clean)**: -the deliverable iff `α.IsSeparable ↔ omegaPullbackCoeff W α ≠ 0` modulo only -the Witness #2 hypothesis (FiniteDimensional). - -Combines the forward direction (no extra hypothesis) and the reverse direction -(needs FiniteDim). - -Once Witness #2 discharges unconditionally, the full T-II-4-004 lands. -/ theorem isSeparable_iff_omegaPullbackCoeff_ne_zero_of_finiteDim (α : Isogeny W.toAffine W.toAffine) (h_fin : @FiniteDimensional W.toAffine.FunctionField W.toAffine.FunctionField @@ -812,16 +593,6 @@ theorem isSeparable_iff_omegaPullbackCoeff_ne_zero_of_finiteDim ⟨isogeny_omegaCoeff_ne_zero_of_isSeparable W α, fun h ↦ isogeny_isSeparable_of_omegaCoeff_ne_zero_finiteDim W α h h_fin⟩ -/-- **T-II-4-004 reverse direction (axiom-clean, unconditional)**: if the -differential pullback `α.pullbackKaehler` is injective on `Ω[K(E)/F]`, then `α` -is separable. - -Discharge path: -* Witness #2 (`FiniteDimensional` of `K(E)/(image)`) — gives `EssFiniteType`. -* Connection from `omegaPullbackCoeff ≠ 0` (the scalar form of injectivity) - to `Subsingleton Ω[K(E)/(image)]` (the algebra-side condition). -* Mathlib's `Algebra.FormallyUnramified.iff_isSeparable` for the final - conclusion. -/ theorem isogeny_isSeparable_of_pullbackKaehler_injective (α : Isogeny W.toAffine W.toAffine) (h_inj : Function.Injective α.pullbackKaehler) : @@ -830,14 +601,6 @@ theorem isogeny_isSeparable_of_pullbackKaehler_injective ((pullbackKaehler_injective_iff_omegaPullbackCoeff_ne_zero W α).mp h_inj) (isogeny_finiteDimensional W α) -/-- **T-II-4-004 algebra-Kähler half (axiom-clean)**: an isogeny `α` is separable -(in the `Algebra.IsSeparable` sense) iff its differential pullback -`α.pullbackKaehler` is injective on `Ω[K(E)/F]`. - -This is the substantive Silverman II.4.2(c) algebra-Kähler glue. -The forward direction: `Algebra.IsSeparable → FormallyUnramified -→ Ω[K(E)/(image)] = 0 → cotangent surjective → pullbackKaehler injective`. -The reverse: the converse chain via `FormallyUnramified.iff_isSeparable`. -/ theorem isSeparable_iff_pullbackKaehler_injective (α : Isogeny W.toAffine W.toAffine) : α.IsSeparable ↔ Function.Injective α.pullbackKaehler := @@ -845,12 +608,6 @@ theorem isSeparable_iff_pullbackKaehler_injective (isogeny_omegaCoeff_ne_zero_of_isSeparable W α h), isogeny_isSeparable_of_pullbackKaehler_injective W α⟩ -/-- **T-II-4-004 (elliptic curve form, deliverable target)**: separability of -an isogeny `α` is equivalent to its omega-pullback coefficient being nonzero -(equivalently, to the differential pullback `α*` being injective on -`Ω[K(E)/F]`). - -Reference: Silverman II.4.2(c). -/ theorem isSeparable_iff_omegaPullbackCoeff_ne_zero (α : Isogeny W.toAffine W.toAffine) : α.IsSeparable ↔ omegaPullbackCoeff W α ≠ 0 := diff --git a/projects/HasseWeil/HasseWeil/Foundation/Curves/Divisor/Divisors.lean b/projects/HasseWeil/HasseWeil/Foundation/Curves/Divisor/Divisors.lean index 272a5d45e..77de07569 100644 --- a/projects/HasseWeil/HasseWeil/Foundation/Curves/Divisor/Divisors.lean +++ b/projects/HasseWeil/HasseWeil/Foundation/Curves/Divisor/Divisors.lean @@ -16,9 +16,6 @@ The divisor group `Div C` of a smooth plane curve `C` is the free abelian group on its smooth points: a formal sum `Σ nₚ (P)` with integer coefficients that are zero for all but finitely many points. -This closes tickets `T-II-3-001` (`Divisor`) and `T-II-3-002` -(`Divisor.degree`, `Divisor.degreeHom`). - ## References * [Silverman, *The Arithmetic of Elliptic Curves*], II.3 (definition) @@ -95,7 +92,7 @@ end Divisor noncomputable abbrev Divisor₀ (C : SmoothPlaneCurve F) : AddSubgroup (Divisor C) := Divisor.degZero C -/-! ### `divisorOf f`: the principal divisor (T-II-3-005) -/ + namespace SmoothPlaneCurve @@ -116,7 +113,7 @@ noncomputable def divisorOf (C : SmoothPlaneCurve F) (f : C.FunctionField) : rw [this]; exact Set.finite_empty · refine (C.finite_setOf_ord_P_nonzero hf).subset ?_ intro P hP - simp only [Set.mem_setOf_eq] + simp only [Set.mem_ofPred_eq] intro h0 apply hP simp [h0] @@ -184,7 +181,7 @@ noncomputable def divisorHom (C : SmoothPlaneCurve F) : congr 1 exact C.divisorOf_mul u.ne_zero v.ne_zero -/-! ### Principal divisors and linear equivalence (T-II-3-006) -/ + /-- A divisor `D` on `C` is **principal** if `D = div(f)` for some nonzero rational function `f ∈ F(C)`. Equivalently, `D` lies in the image of the @@ -244,7 +241,7 @@ theorem LinearlyEquiv.trans {C : SmoothPlaneCurve F} {D₁ D₂ D₃ : Divisor C rw [show D₁ - D₃ = (D₁ - D₂) + (D₂ - D₃) by abel] exact h₁.add h₂ -/-! ### T-II-3-008: constants have zero divisor -/ + /-- `ord_P` of an `F`-constant `c ≠ 0` is zero: a nonzero constant is a unit at every smooth point (image of the F-subfield, which lives in the local @@ -289,15 +286,11 @@ zeros or poles. -/ refine Finsupp.ext fun P ↦ ?_ rw [divisorOf_apply, C.ord_P_algebraMap_F_of_ne_zero hc P]; rfl -/-! ### T-II-3-008 (⇒): `divisorOf = 0 ⇒ const` (prime-indexed via IC-006) -/ -/-- **T-II-3-008 (⇒), prime-indexed**: if `f ∈ F(C)` has valuation at most 1 -at every nonzero prime of `C.CoordinateRing` **and** has nonnegative order at -infinity, then `f` is the image of a constant from `F`. This is the content -of Silverman II.3.1(a) `⇒` in the prime-indexed reformulation made available -by IC-006; the SmoothPoint-indexed statement follows once every nonzero -prime is in the image of `SmoothPoint.toHeightOneSpectrum` (the surjection -step under `[IsAlgClosed F]`, tracked separately). -/ + +/-- If a function has valuation at most one at every nonzero prime of the +coordinate ring and has nonnegative order at infinity, it is constant. +This is the prime-indexed form of Silverman II.3.1(a). -/ theorem const_of_valuation_le_one_of_ordAtInfty_nonneg [IsIntegrallyClosed C.CoordinateRing] (f : C.FunctionField) (h_primes : ∀ v : IsDedekindDomain.HeightOneSpectrum C.CoordinateRing, @@ -306,7 +299,7 @@ theorem const_of_valuation_le_one_of_ordAtInfty_nonneg ∃ c : F, f = algebraMap F C.FunctionField c := C.const_of_no_poles_of_valuation_of_ordAtInfty f h_primes h_inf -/-! ### Pic and Pic₀ (T-II-3-007) -/ + /-- The **Picard group** of `C`: divisors modulo principal divisors. Silverman II.3 (definition). -/ @@ -314,8 +307,7 @@ abbrev Pic (C : SmoothPlaneCurve F) : Type _ := Divisor C ⧸ C.principalSubgroup /-- The **degree-zero Picard group** `Pic⁰(C)`: degree-zero divisors modulo -principal divisors (principal divisors automatically have degree zero by -Silverman II.3.1(b), tracked as T-II-3-009). -/ +principal divisors (principal divisors have degree zero by Silverman II.3.1(b)). -/ abbrev Pic₀ (C : SmoothPlaneCurve F) : Type _ := (Divisor.degZero C) ⧸ (C.principalSubgroup.addSubgroupOf (Divisor.degZero C)) diff --git a/projects/HasseWeil/HasseWeil/Foundation/Curves/Divisor/EffectiveSumReduce.lean b/projects/HasseWeil/HasseWeil/Foundation/Curves/Divisor/EffectiveSumReduce.lean index 03a560829..5a38ff39d 100644 --- a/projects/HasseWeil/HasseWeil/Foundation/Curves/Divisor/EffectiveSumReduce.lean +++ b/projects/HasseWeil/HasseWeil/Foundation/Curves/Divisor/EffectiveSumReduce.lean @@ -92,6 +92,7 @@ omit [W.IsElliptic] in @[simp] theorem listSum_cons (P : W.Point) (Ps : List W.Point) : listSum W (P :: Ps) = P + listSum W Ps := rfl +omit [W.IsElliptic] in /-- σ on the list-divisor equals the list sum. -/ theorem projectiveDivisorSum_listToDivisor (Ps : List W.Point) : projectiveDivisorSum W (listToDivisor W Ps) = listSum W Ps := by diff --git a/projects/HasseWeil/HasseWeil/Foundation/Curves/Divisor/Miller.lean b/projects/HasseWeil/HasseWeil/Foundation/Curves/Divisor/Miller.lean index 0cca33fbbad2caeffd72dbaa7a093fb8e19faddd..746ea1a153571d3a8d47b2d1a9b99a29dd929f72 100644 GIT binary patch delta 2890 zcmai0+iw(A7|&@5mm#SrY$F%pD^_fEce%8PDFKAE)EdohfrOw5%<0V8og*{n3^TJ^ zN@5nGCK^qMjyN$<6Z``Vu_XJVk!XDIi4dMmOcUdS58{LRz>D8GGuxe(Hok2;=X|%{ zi?0$z;a|@gA9y_iaHY!xLh#&639l~$poK~mO*-S`}3w0128iLK6JjCo~77Z^B zm9pRI{R8TLn!}_6iH6 znpAxKiT>DIx4y+$ST>AtRu32}>91KuAy`s`>{0_GxpNROyJ6v6B$z{Y-yTm(QSX+DxO}#=EgT~Z;e~Gx988rw6ZOE562E zmj%y;I2o5lT#7Lqc7U^;!*+@=4P$V&TvhZm7unca&c?G26TomVETeM9N`rR*)SO8< z0!=D-=&gQ3c^M#? zR*^ycVejUC<1}M%n!A|SqawrSVEp)oEy?B0WK&Y#LEf4F{ojjEubIFjN#A}lnC#y~ zwzUlNA{Ir*v%WN;um>F9GIA-}Bc(D{**TUfDImo(-BGqEJ-4H!l&cDoGL-hJ6Ea|) z`uaMu{}i*^=Xa2|2&p9f17x&i^O|N_q*Y=Z&_*(nPBaC15#l21>Jg!I(-qZKL&#E% z3m&nOFI|+YA4ng8nL~jh5Xg?>C#QtpK-W5JB9Mf|H_bvpDTl&1v)M(CMrKQoa?w7t zi%b%7Ci!U(89W9lDQbu%CIaTV+(*2@Y6MND@N^80QS&9Dt|+=&9Z~d?EdylF5yNt5 zK&^-cJXDvLb`M$iWmpN?(F7*R&i0kvWFu*v(Pq}2Mm|-heV9RzN|+Fh)m~mNS``|f zCj;NXGSF94?YdBPJM#>QywTLAZk^2pRIwXJXt^>e50DLMJ@*F5!!^2|uI*$2ifCdD z5n=Wf+y~R3iFQ_lfjGU%tcc?*GYeF_Qrd(ERhNTDaN8mz#D(tT(otszoK z&YvUelj|k&u&gwvMn%=G`@a}ra_?nQ*kvdSQ$Q>&qeb|YTm(TqhM;9(bLc*TN&D~pq%VbXksF~0Gc1~AXn1P4tBygfe|11p z$jDJhuc2k^TZP}+FGTyh7f26j9T$kdL~p^;QE;}+H8+qZO%$T7`|%s0gCm<&BJ%?l zGE`#jxnX21LGM-AE^`xYH2Hp(aH^#YtRwk3?Q=^Nj}HO0QL$%S{`oL@C5G90Hu9Bf zt8q|!sro{1rE&C*mS1e28zbNJK0Q@KU(Q3UpISrHIna}@j*@3il#RSybCK#vy+e?M zYB^y?h|KbpF|xSQN897a$QRW?HLax-R7&XVzf=-2y|ZOs<}~PP=__u@`oh_y>noa- znIXhCuWoOnmJ3HH--XKr)wkj$4EQwjv9B`(Vz);{Za3G{)54jxI5qP+c8KGcbv>>=XJ28v$$=Sfk z(+Ii;C!of*Ay!gvUVt(e|6fjgZy-wM<1FQFU!21V6rlU-5Q^CC{%D&8>C_9gi?Jt{ zQV*3WLY5Lg#k;=47}#bp2i@O?V6Nrt*q9-3C;}x@*MX#niye+U*vB7uCEmy|dA?Pq zq!vnd=29GTOadUKc#nKv4P3*mQF(HY^PT4FgZy<~)<5UKGRMh-uR(O=b z#tz^>z!2+$oe>=?E&dMO>1tZ-S4mw~{$*NR4mbPYXT;BuKYj6EMsH2cZVa)o^g7zi zQ3epmfM^q(#{M3&jNiO diff --git a/projects/HasseWeil/HasseWeil/Foundation/Curves/Divisor/ProjectiveDivisor.lean b/projects/HasseWeil/HasseWeil/Foundation/Curves/Divisor/ProjectiveDivisor.lean index 42df6e4ba..40dbf3639 100644 --- a/projects/HasseWeil/HasseWeil/Foundation/Curves/Divisor/ProjectiveDivisor.lean +++ b/projects/HasseWeil/HasseWeil/Foundation/Curves/Divisor/ProjectiveDivisor.lean @@ -233,7 +233,7 @@ theorem projectiveDivisorOf_apply_affine (f : C.FunctionField) (P : C.SmoothPoin (ProjectiveSmoothPoint.infinity : ProjectiveSmoothPoint C) := by intro h; nomatch h rw [Finsupp.add_apply, Finsupp.single_eq_of_ne h_ne, add_zero, - Finsupp.mapDomain_apply ProjectiveSmoothPoint.affine_injective + Finsupp.mapDomain_apply_of_injective ProjectiveSmoothPoint.affine_injective (C.divisorOf f) P, C.divisorOf_apply] theorem projectiveDivisorOf_apply_infinity (f : C.FunctionField) : diff --git a/projects/HasseWeil/HasseWeil/Foundation/Curves/Divisor/PushforwardDivisor.lean b/projects/HasseWeil/HasseWeil/Foundation/Curves/Divisor/PushforwardDivisor.lean index 37f06f385..9d556ad1d 100644 --- a/projects/HasseWeil/HasseWeil/Foundation/Curves/Divisor/PushforwardDivisor.lean +++ b/projects/HasseWeil/HasseWeil/Foundation/Curves/Divisor/PushforwardDivisor.lean @@ -8,40 +8,17 @@ import HasseWeil.Foundation.Curves.Map.CoordHomFinite import HasseWeil.Foundation.Curves.Valuation.NormValuation /-! -# The divisor pushforward of a finite curve map preserves principal divisors +# Divisor pushforward and principal divisors -For a (nonconstant) curve map `φ : C₁ → C₂` between smooth plane curves, the -**divisor pushforward** `φ_∗ : Div(C₁) → Div(C₂)` sends `Σ nᵢ (Pᵢ)` to -`Σ nᵢ (φ Pᵢ)`. Silverman II.3.6 / II.3.7 says it carries *principal* divisors -to *principal* divisors, via the **norm–conorm identity** +For a finite curve map `φ : C₁ → C₂` over an algebraically closed field, the +divisor pushforward sends `Σ nᵢ(Pᵢ)` to `Σ nᵢ(φ(Pᵢ))`. The norm–conorm identity +`div(N_φ f) = φ_∗(div f)` shows that principal divisors remain principal. +Here `N_φ` is the field norm from `K(C₁)` to `φ*K(C₂)`. - `div(N_φ f) = φ_∗(div f)` (Silverman II.3.6) - -where `N_φ f = Norm_{K(C₁)/φ*K(C₂)}(f) ∈ K(C₂)` is the field norm (already -defined as `CurveMap.pushforward`). This is the only deep input to Silverman -III.4.8 (every isogeny is a group homomorphism, proved at the divisor/σ level in -`HasseWeil/EC/IsogenyAG/GroupHom.lean`). - -## The valuation-theoretic pushforward - -We realise the divisor pushforward as `Finsupp.mapDomain` along the place-image -map `P ↦ φ(P)` (affine smooth point `↦` affine smooth point, `∞ ↦ ∞`), supplied -by a coordinate-ring witness `cd : φ.CoordHom`. This is definitionally the -point-map pushforward `pushforwardProjectiveDivisor`, so the compatibility -sub-leaf NEW-1(iii) is `rfl`; the mathematical content is concentrated in the -norm–conorm identity NEW-1(ii). - -## Main definitions - -* `CurveMap.pushforwardDivisorVal` — the valuation-theoretic divisor pushforward - (= `pushforwardProjectiveDivisor`, via the place-image map). - -## Main results - -* `CurveMap.projectiveDivisorOf_pushforward_eq_pushforwardDivisorVal` — the - norm–conorm identity `div(N_φ f) = φ_∗(div f)` (Silverman II.3.6). -* `EC.Isogeny.pushforward_preserves_principal` — the gap `h_pres`: the - pushforward of a principal projective divisor is principal (Silverman II.3.7). +The pushforward is realized by `Finsupp.mapDomain` along the projective +place-image map. Its coefficients are sums over the fibres. The local +norm formula, together with residue degree one, identifies these coefficients +with the orders of the norm. ## References @@ -50,7 +27,6 @@ norm–conorm identity NEW-1(ii). open WeierstrassCurve -set_option linter.unusedSectionVars false namespace HasseWeil.Curves.CurveMap @@ -58,7 +34,7 @@ variable {F : Type*} [Field F] variable {C₁ C₂ : SmoothPlaneCurve F} [C₁.toAffine.IsElliptic] [C₂.toAffine.IsElliptic] -/-! ### NEW-1(i): the valuation-theoretic divisor pushforward -/ +/-! ### the valuation-theoretic divisor pushforward -/ /-- The place-image map on the projective closure induced by a curve map `φ` together with a coordinate-ring witness: an affine smooth point `P` is sent to @@ -96,7 +72,7 @@ theorem degree_pushforwardDivisorVal (φ : CurveMap C₁ C₂) (cd : φ.CoordHom simp only [ProjectiveDivisor.degree] rw [Finsupp.sum_mapDomain_index (h := fun _ n ↦ n) (fun _ ↦ rfl) (fun _ _ _ ↦ rfl)] -/-! ### NEW-1(ii): the norm–conorm identity `div(N_φ f) = φ_∗(div f)` +/-! ### the norm–conorm identity `div(N_φ f) = φ_∗(div f)` The mathematical content is the per-place identity (Silverman II.3.6) @@ -107,7 +83,7 @@ by generalising the `F[X] → F[C]` machinery of `NormValuation.lean` to the coordinate-ring extension `F[C₂] → F[C₁]` supplied by a `CoordHom`. The generic ideal/localisation lemmas (`count_preservation_localization`, `count_finset_prod_factors`, `map_eq_localRing_max_pow_count`, …) are reused -verbatim; the curve-specific inputs are `inertiaDeg' = 1`, `relNorm m_P = m_{φP}`, +verbatim; the curve-specific inputs are `inertiaDeg = 1`, `relNorm m_P = m_{φP}`, and the fibre bijection `maximalIdealAt_toPointMap`. -/ section NormConorm @@ -129,8 +105,8 @@ theorem coordHom_injective : Function.Injective cd.toAlgHom := by injective into a domain). -/ theorem isTorsionFree_coordHom : @Module.IsTorsionFree C₂.CoordinateRing C₁.CoordinateRing _ _ cd.toAlgebra.toModule := by - letI : Algebra C₂.CoordinateRing C₁.CoordinateRing := cd.toAlgebra - haveI : FaithfulSMul C₂.CoordinateRing C₁.CoordinateRing := + let : Algebra C₂.CoordinateRing C₁.CoordinateRing := cd.toAlgebra + have : FaithfulSMul C₂.CoordinateRing C₁.CoordinateRing := (faithfulSMul_iff_algebraMap_injective C₂.CoordinateRing C₁.CoordinateRing).mpr (CurveMap.coordHom_injective φ cd) infer_instance @@ -146,8 +122,8 @@ private theorem isScalarTower_residueField_maximalIdealAt (P : C₁.SmoothPoint) ⟨maximalIdealAt_toPointMap cd P⟩ IsScalarTower F (C₂.CoordinateRing ⧸ C₂.maximalIdealAt (toPointMap cd P)) (C₁.CoordinateRing ⧸ C₁.maximalIdealAt P) := by - letI : Algebra C₂.CoordinateRing C₁.CoordinateRing := cd.toAlgebra - haveI : (C₁.maximalIdealAt P).LiesOver (C₂.maximalIdealAt (toPointMap cd P)) := + let : Algebra C₂.CoordinateRing C₁.CoordinateRing := cd.toAlgebra + have : (C₁.maximalIdealAt P).LiesOver (C₂.maximalIdealAt (toPointMap cd P)) := ⟨maximalIdealAt_toPointMap cd P⟩ set Q := toPointMap cd P with hQ refine IsScalarTower.of_algebraMap_eq fun c ↦ ?_ @@ -177,15 +153,15 @@ private theorem finrank_residueField_maximalIdealAt_le_one (P : C₁.SmoothPoint ⟨maximalIdealAt_toPointMap cd P⟩ Module.finrank (C₂.CoordinateRing ⧸ C₂.maximalIdealAt (toPointMap cd P)) (C₁.CoordinateRing ⧸ C₁.maximalIdealAt P) ≤ 1 := by - letI : Algebra C₂.CoordinateRing C₁.CoordinateRing := cd.toAlgebra - haveI : (C₁.maximalIdealAt P).LiesOver (C₂.maximalIdealAt (toPointMap cd P)) := + let : Algebra C₂.CoordinateRing C₁.CoordinateRing := cd.toAlgebra + have : (C₁.maximalIdealAt P).LiesOver (C₂.maximalIdealAt (toPointMap cd P)) := ⟨maximalIdealAt_toPointMap cd P⟩ set Q := toPointMap cd P with hQ - haveI hQmax : (C₂.maximalIdealAt Q).IsMaximal := C₂.maximalIdealAt_isMaximal Q - haveI hPmax : (C₁.maximalIdealAt P).IsMaximal := C₁.maximalIdealAt_isMaximal P - haveI : Field (C₂.CoordinateRing ⧸ C₂.maximalIdealAt Q) := Ideal.Quotient.field _ - haveI : Field (C₁.CoordinateRing ⧸ C₁.maximalIdealAt P) := Ideal.Quotient.field _ - haveI htower := isScalarTower_residueField_maximalIdealAt φ cd P + have hQmax : (C₂.maximalIdealAt Q).IsMaximal := C₂.maximalIdealAt_isMaximal Q + have hPmax : (C₁.maximalIdealAt P).IsMaximal := C₁.maximalIdealAt_isMaximal P + have : Field (C₂.CoordinateRing ⧸ C₂.maximalIdealAt Q) := Ideal.Quotient.field _ + have : Field (C₁.CoordinateRing ⧸ C₁.maximalIdealAt P) := Ideal.Quotient.field _ + have htower := isScalarTower_residueField_maximalIdealAt φ cd P have hbijSP := C₁.algebraMap_bijective_quotient_of_maximal hPmax refine finrank_le_one (1 : C₁.CoordinateRing ⧸ C₁.maximalIdealAt P) fun w ↦ ?_ obtain ⟨c, hc⟩ := hbijSP.2 w @@ -212,16 +188,17 @@ theorem inertiaDeg_maximalIdealAt_toPointMap (P : C₁.SmoothPoint) : letI : Algebra C₂.CoordinateRing C₁.CoordinateRing := cd.toAlgebra haveI : (C₁.maximalIdealAt P).LiesOver (C₂.maximalIdealAt (toPointMap cd P)) := ⟨(maximalIdealAt_toPointMap cd P)⟩ - Ideal.inertiaDeg' (C₂.maximalIdealAt (toPointMap cd P)) (C₁.maximalIdealAt P) = 1 := by - letI : Algebra C₂.CoordinateRing C₁.CoordinateRing := cd.toAlgebra - haveI hLies : (C₁.maximalIdealAt P).LiesOver (C₂.maximalIdealAt (toPointMap cd P)) := + (C₁.maximalIdealAt P).inertiaDeg C₂.CoordinateRing = 1 := by + let : Algebra C₂.CoordinateRing C₁.CoordinateRing := cd.toAlgebra + have hLies : (C₁.maximalIdealAt P).LiesOver (C₂.maximalIdealAt (toPointMap cd P)) := ⟨maximalIdealAt_toPointMap cd P⟩ set Q := toPointMap cd P with hQ - haveI hPmax : (C₁.maximalIdealAt P).IsMaximal := C₁.maximalIdealAt_isMaximal P - rw [Ideal.inertiaDeg'_algebraMap] + have hQmax : (C₂.maximalIdealAt Q).IsMaximal := C₂.maximalIdealAt_isMaximal Q + have hPmax : (C₁.maximalIdealAt P).IsMaximal := C₁.maximalIdealAt_isMaximal P + rw [Ideal.inertiaDeg_eq_of_isMaximal (C₂.maximalIdealAt Q) (C₁.maximalIdealAt P)] -- The residue field `F[C₁]/m_P` is `F` (alg-closed), hence nontrivial. - haveI : Field (C₁.CoordinateRing ⧸ C₁.maximalIdealAt P) := Ideal.Quotient.field _ - haveI : Nontrivial (C₁.CoordinateRing ⧸ C₁.maximalIdealAt P) := + have : Field (C₁.CoordinateRing ⧸ C₁.maximalIdealAt P) := Ideal.Quotient.field _ + have : Nontrivial (C₁.CoordinateRing ⧸ C₁.maximalIdealAt P) := (Ideal.Quotient.nontrivial_iff).mpr hPmax.ne_top -- Squeeze the residue rank between `1` (`finrank_pos`) and `1` (alg-closed surjectivity). have hSP : Module.finrank F (C₁.CoordinateRing ⧸ C₁.maximalIdealAt P) = 1 := @@ -229,9 +206,9 @@ theorem inertiaDeg_maximalIdealAt_toPointMap (P : C₁.SmoothPoint) : have h_le : Module.finrank (C₂.CoordinateRing ⧸ C₂.maximalIdealAt Q) (C₁.CoordinateRing ⧸ C₁.maximalIdealAt P) ≤ 1 := finrank_residueField_maximalIdealAt_le_one φ cd P - haveI : Module.Finite F (C₁.CoordinateRing ⧸ C₁.maximalIdealAt P) := + have : Module.Finite F (C₁.CoordinateRing ⧸ C₁.maximalIdealAt P) := Module.finite_of_finrank_pos (by rw [hSP]; norm_num) - haveI : Module.Finite (C₂.CoordinateRing ⧸ C₂.maximalIdealAt Q) + have : Module.Finite (C₂.CoordinateRing ⧸ C₂.maximalIdealAt Q) (C₁.CoordinateRing ⧸ C₁.maximalIdealAt P) := Module.Finite.of_restrictScalars_finite F _ _ have h_ge : 1 ≤ Module.finrank (C₂.CoordinateRing ⧸ C₂.maximalIdealAt Q) @@ -244,22 +221,17 @@ packaged as a `LiesOver` instance for the `cd`-induced algebra. -/ theorem maximalIdealAt_liesOver_toPointMap (P : C₁.SmoothPoint) : letI : Algebra C₂.CoordinateRing C₁.CoordinateRing := cd.toAlgebra (C₁.maximalIdealAt P).LiesOver (C₂.maximalIdealAt (toPointMap cd P)) := - letI : Algebra C₂.CoordinateRing C₁.CoordinateRing := cd.toAlgebra + let : Algebra C₂.CoordinateRing C₁.CoordinateRing := cd.toAlgebra ⟨maximalIdealAt_toPointMap cd P⟩ end NormConorm -/-! ### NEW-1(ii) — structural sub-lemmas of the norm–conorm identity +/-! ### Coordinate-ring norms -The norm–conorm identity is assembled below from three sub-lemmas, each carrying its -own elaboration budget so the assembling theorem stays light: -* `relNorm_maximalIdealAt_eq` — the **`s = 1` core** `relNorm(m_R) = m_{φR}`; -* `count_relNorm_eq_sum_fiber` — the **affine count identity** matching - `count_{m_Q}(relNorm(span{w}))` to the fibre sum `Σ_{φP=Q} count_{m_P}(span{w})`; -* `projectiveDivisorOf_pushforward_algebraMap_eq` — the **`algebraMap` case** of the - norm–conorm identity (affine coefficients via the count identity, infinity - coefficient forced by degree). -The `f = u/v` reduction is then a short additivity argument in the main theorem. -/ +The prime-ideal identity `relNorm(m_P) = m_{φP}` gives the corresponding +valuation count as a sum over the fibre. Equality of affine coefficients, +together with degree zero, determines the projective divisor. Additivity +then extends the identity to quotients of coordinate-ring elements. -/ section NormConormSteps @@ -276,8 +248,8 @@ finiteness/degree arguments. -/ private theorem faithfulSMul_coordinateRing_functionField : letI : Algebra C₂.CoordinateRing C₁.CoordinateRing := cd.toAlgebra FaithfulSMul C₂.CoordinateRing C₁.FunctionField := by - letI algCR : Algebra C₂.CoordinateRing C₁.CoordinateRing := cd.toAlgebra - haveI tower2 : IsScalarTower C₂.CoordinateRing C₁.CoordinateRing C₁.FunctionField := by + let algCR : Algebra C₂.CoordinateRing C₁.CoordinateRing := cd.toAlgebra + have tower2 : IsScalarTower C₂.CoordinateRing C₁.CoordinateRing C₁.FunctionField := by refine IsScalarTower.of_algebraMap_eq fun x ↦ ?_ rw [RingHom.algebraMap_toAlgebra] rfl @@ -300,9 +272,9 @@ private theorem isScalarTower_coordinateRing_functionField : letI : Algebra C₂.CoordinateRing C₁.CoordinateRing := cd.toAlgebra letI : Algebra C₂.FunctionField C₁.FunctionField := φ.toAlgebra IsScalarTower C₂.CoordinateRing C₂.FunctionField C₁.FunctionField := by - letI algCR : Algebra C₂.CoordinateRing C₁.CoordinateRing := cd.toAlgebra - letI algFF : Algebra C₂.FunctionField C₁.FunctionField := φ.toAlgebra - haveI tower2 : IsScalarTower C₂.CoordinateRing C₁.CoordinateRing C₁.FunctionField := by + let algCR : Algebra C₂.CoordinateRing C₁.CoordinateRing := cd.toAlgebra + let algFF : Algebra C₂.FunctionField C₁.FunctionField := φ.toAlgebra + have tower2 : IsScalarTower C₂.CoordinateRing C₁.CoordinateRing C₁.FunctionField := by refine IsScalarTower.of_algebraMap_eq fun x ↦ ?_ rw [RingHom.algebraMap_toAlgebra] rfl @@ -321,23 +293,23 @@ to `K(C₂)`). This is the algebraicity input to the localisation-finiteness st private theorem isAlgebraic_functionField : letI : Algebra C₂.FunctionField C₁.FunctionField := φ.toAlgebra Algebra.IsAlgebraic C₂.FunctionField C₁.FunctionField := by - letI algCR : Algebra C₂.CoordinateRing C₁.CoordinateRing := cd.toAlgebra - haveI tower2 : IsScalarTower C₂.CoordinateRing C₁.CoordinateRing C₁.FunctionField := by + let algCR : Algebra C₂.CoordinateRing C₁.CoordinateRing := cd.toAlgebra + have tower2 : IsScalarTower C₂.CoordinateRing C₁.CoordinateRing C₁.FunctionField := by refine IsScalarTower.of_algebraMap_eq fun x ↦ ?_ rw [RingHom.algebraMap_toAlgebra] rfl - haveI hfin' : @Module.Finite C₂.CoordinateRing C₁.CoordinateRing _ _ algCR.toModule := + have hfin' : @Module.Finite C₂.CoordinateRing C₁.CoordinateRing _ _ algCR.toModule := cd.module_finite - haveI hint : Algebra.IsIntegral C₂.CoordinateRing C₁.CoordinateRing := + have hint : Algebra.IsIntegral C₂.CoordinateRing C₁.CoordinateRing := Algebra.IsIntegral.of_finite C₂.CoordinateRing C₁.CoordinateRing - haveI faith : FaithfulSMul C₂.CoordinateRing C₁.FunctionField := + have faith : FaithfulSMul C₂.CoordinateRing C₁.FunctionField := faithfulSMul_coordinateRing_functionField φ cd - letI algFF : Algebra C₂.FunctionField C₁.FunctionField := φ.toAlgebra - haveI tower1 : IsScalarTower C₂.CoordinateRing C₂.FunctionField C₁.FunctionField := + let algFF : Algebra C₂.FunctionField C₁.FunctionField := φ.toAlgebra + have tower1 : IsScalarTower C₂.CoordinateRing C₂.FunctionField C₁.FunctionField := isScalarTower_coordinateRing_functionField φ cd - haveI hab : Algebra.IsAlgebraic C₂.CoordinateRing C₁.CoordinateRing := + have hab : Algebra.IsAlgebraic C₂.CoordinateRing C₁.CoordinateRing := Algebra.IsIntegral.isAlgebraic - haveI halgAB : Algebra.IsAlgebraic C₂.CoordinateRing C₁.FunctionField := + have halgAB : Algebra.IsAlgebraic C₂.CoordinateRing C₁.FunctionField := (IsFractionRing.isAlgebraic_iff' C₂.CoordinateRing C₁.CoordinateRing C₁.FunctionField).mp hab exact (IsFractionRing.comap_isAlgebraic_iff (A := C₂.CoordinateRing) (K := C₂.FunctionField) (C := C₁.FunctionField)).mp halgAB @@ -352,25 +324,25 @@ theorem finiteDimensional_functionField : have hfin : @Module.Finite C₂.CoordinateRing C₁.CoordinateRing _ _ cd.toAlgebra.toModule := by exact cd.module_finite - letI algCR : Algebra C₂.CoordinateRing C₁.CoordinateRing := cd.toAlgebra - haveI tower2 : IsScalarTower C₂.CoordinateRing C₁.CoordinateRing C₁.FunctionField := by + let algCR : Algebra C₂.CoordinateRing C₁.CoordinateRing := cd.toAlgebra + have tower2 : IsScalarTower C₂.CoordinateRing C₁.CoordinateRing C₁.FunctionField := by refine IsScalarTower.of_algebraMap_eq fun x ↦ ?_ rw [RingHom.algebraMap_toAlgebra] rfl - letI modCR : Module C₂.CoordinateRing C₁.CoordinateRing := algCR.toModule - haveI hfin' : @Module.Finite C₂.CoordinateRing C₁.CoordinateRing _ _ modCR := hfin - haveI hint : Algebra.IsIntegral C₂.CoordinateRing C₁.CoordinateRing := + let modCR : Module C₂.CoordinateRing C₁.CoordinateRing := algCR.toModule + have hfin' : @Module.Finite C₂.CoordinateRing C₁.CoordinateRing _ _ modCR := hfin + have hint : Algebra.IsIntegral C₂.CoordinateRing C₁.CoordinateRing := Algebra.IsIntegral.of_finite C₂.CoordinateRing C₁.CoordinateRing - haveI faith : FaithfulSMul C₂.CoordinateRing C₁.FunctionField := + have faith : FaithfulSMul C₂.CoordinateRing C₁.FunctionField := faithfulSMul_coordinateRing_functionField φ cd - letI algFF : Algebra C₂.FunctionField C₁.FunctionField := φ.toAlgebra - haveI tower1 : IsScalarTower C₂.CoordinateRing C₂.FunctionField C₁.FunctionField := + let algFF : Algebra C₂.FunctionField C₁.FunctionField := φ.toAlgebra + have tower1 : IsScalarTower C₂.CoordinateRing C₂.FunctionField C₁.FunctionField := isScalarTower_coordinateRing_functionField φ cd - haveI halgFF : Algebra.IsAlgebraic C₂.FunctionField C₁.FunctionField := + have halgFF : Algebra.IsAlgebraic C₂.FunctionField C₁.FunctionField := isAlgebraic_functionField φ cd - haveI hicl : IsIntegralClosure C₁.CoordinateRing C₂.CoordinateRing C₁.FunctionField := + have hicl : IsIntegralClosure C₁.CoordinateRing C₂.CoordinateRing C₁.FunctionField := IsIntegralClosure.of_isIntegrallyClosed C₁.CoordinateRing C₂.CoordinateRing _ - haveI hloc : IsLocalization + have hloc : IsLocalization (Algebra.algebraMapSubmonoid C₁.CoordinateRing (nonZeroDivisors C₂.CoordinateRing)) C₁.FunctionField := IsIntegralClosure.isLocalization C₂.CoordinateRing C₂.FunctionField C₁.FunctionField @@ -394,12 +366,12 @@ private theorem finrank_functionField_eq_degree : faithfulSMul_coordinateRing_functionField φ cd @Module.finrank C₂.FunctionField C₁.FunctionField _ _ (FractionRing.liftAlgebra C₂.CoordinateRing C₁.FunctionField).toModule = φ.degree := by - letI algCR : Algebra C₂.CoordinateRing C₁.CoordinateRing := cd.toAlgebra - haveI tower2 : IsScalarTower C₂.CoordinateRing C₁.CoordinateRing C₁.FunctionField := by + let algCR : Algebra C₂.CoordinateRing C₁.CoordinateRing := cd.toAlgebra + have tower2 : IsScalarTower C₂.CoordinateRing C₁.CoordinateRing C₁.FunctionField := by refine IsScalarTower.of_algebraMap_eq fun x ↦ ?_ rw [RingHom.algebraMap_toAlgebra] rfl - haveI faith : FaithfulSMul C₂.CoordinateRing C₁.FunctionField := + have faith : FaithfulSMul C₂.CoordinateRing C₁.FunctionField := faithfulSMul_coordinateRing_functionField φ cd have halgmap : IsFractionRing.lift (A := C₂.CoordinateRing) (K := C₂.FunctionField) @@ -436,13 +408,13 @@ private theorem one_le_of_relNorm_eq_pow isTorsionFree_coordHom φ cd Ideal.relNorm C₂.CoordinateRing P' = q ^ t) : 1 ≤ t := by - letI algCR : Algebra C₂.CoordinateRing C₁.CoordinateRing := cd.toAlgebra - letI modCR : Module C₂.CoordinateRing C₁.CoordinateRing := algCR.toModule - haveI hfin' : @Module.Finite C₂.CoordinateRing C₁.CoordinateRing _ _ modCR := + let algCR : Algebra C₂.CoordinateRing C₁.CoordinateRing := cd.toAlgebra + let modCR : Module C₂.CoordinateRing C₁.CoordinateRing := algCR.toModule + have hfin' : @Module.Finite C₂.CoordinateRing C₁.CoordinateRing _ _ modCR := cd.module_finite - haveI htf : @Module.IsTorsionFree C₂.CoordinateRing C₁.CoordinateRing _ _ modCR := + have htf : @Module.IsTorsionFree C₂.CoordinateRing C₁.CoordinateRing _ _ modCR := isTorsionFree_coordHom φ cd - haveI : P'.LiesOver q := hlies + have : P'.LiesOver q := hlies rcases Nat.eq_zero_or_pos t with ht0 | ht0 · exfalso have hcomap : P'.comap (algebraMap C₂.CoordinateRing C₁.CoordinateRing) = q := @@ -468,35 +440,26 @@ private theorem inertiaDeg_eq_one_of_liesOver_maximalIdealAt (Q : C₂.SmoothPoi cd.module_finite haveI : @Module.IsTorsionFree C₂.CoordinateRing C₁.CoordinateRing _ _ modCR := isTorsionFree_coordHom φ cd - Ideal.inertiaDeg' (C₂.maximalIdealAt Q) P' = 1 := by - letI algCR : Algebra C₂.CoordinateRing C₁.CoordinateRing := cd.toAlgebra - letI modCR : Module C₂.CoordinateRing C₁.CoordinateRing := algCR.toModule - haveI hfin' : @Module.Finite C₂.CoordinateRing C₁.CoordinateRing _ _ modCR := + P'.inertiaDeg C₂.CoordinateRing = 1 := by + let algCR : Algebra C₂.CoordinateRing C₁.CoordinateRing := cd.toAlgebra + let modCR : Module C₂.CoordinateRing C₁.CoordinateRing := algCR.toModule + have hfin' : @Module.Finite C₂.CoordinateRing C₁.CoordinateRing _ _ modCR := cd.module_finite - haveI htf : @Module.IsTorsionFree C₂.CoordinateRing C₁.CoordinateRing _ _ modCR := + have htf : @Module.IsTorsionFree C₂.CoordinateRing C₁.CoordinateRing _ _ modCR := isTorsionFree_coordHom φ cd - haveI hP'prime' : P'.IsPrime := hP'prime - haveI hP'lies' : P'.LiesOver (C₂.maximalIdealAt Q) := hP'lies - haveI hQmax : (C₂.maximalIdealAt Q).IsMaximal := C₂.maximalIdealAt_isMaximal Q + have hP'prime' : P'.IsPrime := hP'prime + have hP'lies' : P'.LiesOver (C₂.maximalIdealAt Q) := hP'lies + have hQmax : (C₂.maximalIdealAt Q).IsMaximal := C₂.maximalIdealAt_isMaximal Q have hQ0 : C₂.maximalIdealAt Q ≠ ⊥ := C₂.maximalIdealAt_ne_bot Q have hP'_ne_bot : P' ≠ ⊥ := by intro h apply hQ0 have hh : C₂.maximalIdealAt Q = P'.under C₂.CoordinateRing := hP'lies.over rw [hh, h, Ideal.under_bot] - haveI hP'max : P'.IsMaximal := Ideal.IsPrime.isMaximal hP'prime hP'_ne_bot + have hP'max : P'.IsMaximal := Ideal.IsPrime.isMaximal hP'prime hP'_ne_bot obtain ⟨P'', hP''⟩ := C₁.exists_smoothPoint_of_isMaximal hP'max - haveI hlies'' : (C₁.maximalIdealAt P'').LiesOver - (C₂.maximalIdealAt (toPointMap cd P'')) := - maximalIdealAt_liesOver_toPointMap φ cd P'' - have h1 : C₂.maximalIdealAt (toPointMap cd P'') = - (C₁.maximalIdealAt P'').under C₂.CoordinateRing := hlies''.over - have h2 : C₂.maximalIdealAt Q = P'.under C₂.CoordinateRing := hP'lies.over - rw [hP''] at h1 - have hpeq : C₂.maximalIdealAt (toPointMap cd P'') = C₂.maximalIdealAt Q := h1.trans h2.symm - have hid := inertiaDeg_maximalIdealAt_toPointMap φ cd P'' - rw [← hP'', ← hpeq] - exact hid + rw [← hP''] + exact inertiaDeg_maximalIdealAt_toPointMap φ cd P'' include φ cd in /-- **Sum of ramification indices equals `φ.degree`**: over a smooth point `Q` of @@ -514,12 +477,12 @@ private theorem sum_ramificationIdx_eq_degree (Q : C₂.SmoothPoint) isTorsionFree_coordHom φ cd ∑ P' ∈ IsDedekindDomain.primesOverFinset (C₂.maximalIdealAt Q) C₁.CoordinateRing, (C₂.maximalIdealAt Q).ramificationIdx' P' = φ.degree := by - letI algCR : Algebra C₂.CoordinateRing C₁.CoordinateRing := cd.toAlgebra - letI modCR : Module C₂.CoordinateRing C₁.CoordinateRing := algCR.toModule - haveI hfin' : @Module.Finite C₂.CoordinateRing C₁.CoordinateRing _ _ modCR := hfin - haveI htf : @Module.IsTorsionFree C₂.CoordinateRing C₁.CoordinateRing _ _ modCR := + let algCR : Algebra C₂.CoordinateRing C₁.CoordinateRing := cd.toAlgebra + let modCR : Module C₂.CoordinateRing C₁.CoordinateRing := algCR.toModule + have hfin' : @Module.Finite C₂.CoordinateRing C₁.CoordinateRing _ _ modCR := hfin + have htf : @Module.IsTorsionFree C₂.CoordinateRing C₁.CoordinateRing _ _ modCR := isTorsionFree_coordHom φ cd - haveI hQmax : (C₂.maximalIdealAt Q).IsMaximal := C₂.maximalIdealAt_isMaximal Q + have hQmax : (C₂.maximalIdealAt Q).IsMaximal := C₂.maximalIdealAt_isMaximal Q have hQ0 : C₂.maximalIdealAt Q ≠ ⊥ := C₂.maximalIdealAt_ne_bot Q have hsumef := φ.sum_ramificationIdx_mul_inertiaDeg_eq_degree cd hfin hQmax hQ0 rw [← hsumef] @@ -557,12 +520,12 @@ private theorem degree_eq_sum_relNormExp_mul_ramificationIdx (Q : C₂.SmoothPoi haveI : (C₂.maximalIdealAt Q).IsMaximal := C₂.maximalIdealAt_isMaximal Q φ.degree = ∑ P' ∈ ((C₂.maximalIdealAt Q).primesOver C₁.CoordinateRing).toFinset, sfn P' * (C₂.maximalIdealAt Q).ramificationIdx' P' := by - letI algCR : Algebra C₂.CoordinateRing C₁.CoordinateRing := cd.toAlgebra - letI modCR : Module C₂.CoordinateRing C₁.CoordinateRing := algCR.toModule - haveI hfin' : @Module.Finite C₂.CoordinateRing C₁.CoordinateRing _ _ modCR := hfin - haveI htf : @Module.IsTorsionFree C₂.CoordinateRing C₁.CoordinateRing _ _ modCR := + let algCR : Algebra C₂.CoordinateRing C₁.CoordinateRing := cd.toAlgebra + let modCR : Module C₂.CoordinateRing C₁.CoordinateRing := algCR.toModule + have hfin' : @Module.Finite C₂.CoordinateRing C₁.CoordinateRing _ _ modCR := hfin + have htf : @Module.IsTorsionFree C₂.CoordinateRing C₁.CoordinateRing _ _ modCR := isTorsionFree_coordHom φ cd - haveI hQmax : (C₂.maximalIdealAt Q).IsMaximal := C₂.maximalIdealAt_isMaximal Q + have hQmax : (C₂.maximalIdealAt Q).IsMaximal := C₂.maximalIdealAt_isMaximal Q set p : Ideal C₂.CoordinateRing := C₂.maximalIdealAt Q with hp_def have hp0 : p ≠ ⊥ := C₂.maximalIdealAt_ne_bot Q have hpNotUnit : ¬ IsUnit p := by rw [Ideal.isUnit_iff]; exact hQmax.ne_top @@ -571,11 +534,11 @@ private theorem degree_eq_sum_relNormExp_mul_ramificationIdx (Q : C₂.SmoothPoi finrank_functionField_eq_degree φ cd -- `relNorm_algebraMap`'s exponent is the *coordinate-ring* `finrank`, so pull `hcoh` down the -- fraction-field tower with `IsFractionRing.finrank_eq`. - letI algFF : Algebra C₂.FunctionField C₁.FunctionField := + let algFF : Algebra C₂.FunctionField C₁.FunctionField := FractionRing.liftAlgebra C₂.CoordinateRing C₁.FunctionField - haveI towerFF : IsScalarTower C₂.CoordinateRing C₂.FunctionField C₁.FunctionField := + have towerFF : IsScalarTower C₂.CoordinateRing C₂.FunctionField C₁.FunctionField := FractionRing.isScalarTower_liftAlgebra C₂.CoordinateRing C₁.FunctionField - haveI towerCR : IsScalarTower C₂.CoordinateRing C₁.CoordinateRing C₁.FunctionField := by + have towerCR : IsScalarTower C₂.CoordinateRing C₁.CoordinateRing C₁.FunctionField := by refine IsScalarTower.of_algebraMap_eq fun x ↦ ?_ rw [RingHom.algebraMap_toAlgebra] rfl @@ -619,14 +582,14 @@ private theorem one_le_ramificationIdx_of_liesOver_maximalIdealAt (Q : C₂.Smoo haveI : @Module.IsTorsionFree C₂.CoordinateRing C₁.CoordinateRing _ _ modCR := isTorsionFree_coordHom φ cd 1 ≤ (C₂.maximalIdealAt Q).ramificationIdx' P' := by - letI algCR : Algebra C₂.CoordinateRing C₁.CoordinateRing := cd.toAlgebra - letI modCR : Module C₂.CoordinateRing C₁.CoordinateRing := algCR.toModule - haveI hfin' : @Module.Finite C₂.CoordinateRing C₁.CoordinateRing _ _ modCR := + let algCR : Algebra C₂.CoordinateRing C₁.CoordinateRing := cd.toAlgebra + let modCR : Module C₂.CoordinateRing C₁.CoordinateRing := algCR.toModule + have hfin' : @Module.Finite C₂.CoordinateRing C₁.CoordinateRing _ _ modCR := cd.module_finite - haveI htf : @Module.IsTorsionFree C₂.CoordinateRing C₁.CoordinateRing _ _ modCR := + have htf : @Module.IsTorsionFree C₂.CoordinateRing C₁.CoordinateRing _ _ modCR := isTorsionFree_coordHom φ cd - haveI : P'.IsPrime := hP'prime - haveI : P'.LiesOver (C₂.maximalIdealAt Q) := hP'lies + have : P'.IsPrime := hP'prime + have : P'.LiesOver (C₂.maximalIdealAt Q) := hP'lies have hp0 : C₂.maximalIdealAt Q ≠ ⊥ := C₂.maximalIdealAt_ne_bot Q rw [Nat.one_le_iff_ne_zero] exact Ideal.IsDedekindDomain.ramificationIdx'_ne_zero_of_liesOver P' hp0 @@ -664,17 +627,17 @@ theorem relNorm_maximalIdealAt_eq have hfin : @Module.Finite C₂.CoordinateRing C₁.CoordinateRing _ _ cd.toAlgebra.toModule := by exact cd.module_finite - letI algCR : Algebra C₂.CoordinateRing C₁.CoordinateRing := cd.toAlgebra - letI modCR : Module C₂.CoordinateRing C₁.CoordinateRing := algCR.toModule - haveI hfin' : @Module.Finite C₂.CoordinateRing C₁.CoordinateRing _ _ modCR := hfin - haveI htf : @Module.IsTorsionFree C₂.CoordinateRing C₁.CoordinateRing _ _ modCR := + let algCR : Algebra C₂.CoordinateRing C₁.CoordinateRing := cd.toAlgebra + let modCR : Module C₂.CoordinateRing C₁.CoordinateRing := algCR.toModule + have hfin' : @Module.Finite C₂.CoordinateRing C₁.CoordinateRing _ _ modCR := hfin + have htf : @Module.IsTorsionFree C₂.CoordinateRing C₁.CoordinateRing _ _ modCR := isTorsionFree_coordHom φ cd set Q := toPointMap cd R with hQ - haveI hLies : (C₁.maximalIdealAt R).LiesOver (C₂.maximalIdealAt Q) := + have hLies : (C₁.maximalIdealAt R).LiesOver (C₂.maximalIdealAt Q) := maximalIdealAt_liesOver_toPointMap φ cd R - haveI hQmax : (C₂.maximalIdealAt Q).IsMaximal := C₂.maximalIdealAt_isMaximal Q - haveI hRmax : (C₁.maximalIdealAt R).IsMaximal := C₁.maximalIdealAt_isMaximal R - haveI hRprime : (C₁.maximalIdealAt R).IsPrime := hRmax.isPrime + have hQmax : (C₂.maximalIdealAt Q).IsMaximal := C₂.maximalIdealAt_isMaximal Q + have hRmax : (C₁.maximalIdealAt R).IsMaximal := C₁.maximalIdealAt_isMaximal R + have hRprime : (C₁.maximalIdealAt R).IsPrime := hRmax.isPrime have hQ0 : C₂.maximalIdealAt Q ≠ ⊥ := C₂.maximalIdealAt_ne_bot Q obtain ⟨s, hs⟩ := Ideal.exists_relNorm_eq_pow_of_isPrime (C₁.maximalIdealAt R) (C₂.maximalIdealAt Q) @@ -683,14 +646,14 @@ theorem relNorm_maximalIdealAt_eq have hge1 : 1 ≤ s := one_le_of_relNorm_eq_pow φ cd hQmax s hLies hs set p : Ideal C₂.CoordinateRing := C₂.maximalIdealAt Q with hp_def -- Every residue degree over `m_Q` is `1`. - have hinertia : ∀ P' ∈ p.primesOver C₁.CoordinateRing, Ideal.inertiaDeg' p P' = 1 := by + have hinertia : ∀ P' ∈ p.primesOver C₁.CoordinateRing, P'.inertiaDeg C₂.CoordinateRing = 1 := by intro P' hP' obtain ⟨hP'prime, hP'lies⟩ := hP' exact inertiaDeg_eq_one_of_liesOver_maximalIdealAt φ cd Q P' hP'prime hP'lies have hp0 : p ≠ ⊥ := hQ0 have hpNotUnit : ¬ IsUnit p := by rw [Ideal.isUnit_iff]; exact hQmax.ne_top - haveI hpMax : p.IsMaximal := hQmax + have hpMax : p.IsMaximal := hQmax -- Each relative norm over `m_Q` is a positive power of `m_Q`. have hexp : ∀ P' ∈ p.primesOver C₁.CoordinateRing, ∃ t : ℕ, 1 ≤ t ∧ Ideal.relNorm C₂.CoordinateRing P' = p ^ t := by @@ -753,16 +716,16 @@ private theorem primesOverFinset_ne_bot {p : Ideal C₂.CoordinateRing} (hpMax : p.IsMaximal) (hp_ne : p ≠ ⊥) : letI : Algebra C₂.CoordinateRing C₁.CoordinateRing := cd.toAlgebra ∀ Q' ∈ IsDedekindDomain.primesOverFinset p C₁.CoordinateRing, Q' ≠ ⊥ := by - letI algCR : Algebra C₂.CoordinateRing C₁.CoordinateRing := cd.toAlgebra - letI modCR : Module C₂.CoordinateRing C₁.CoordinateRing := algCR.toModule - haveI hfin' : @Module.Finite C₂.CoordinateRing C₁.CoordinateRing _ _ modCR := + let algCR : Algebra C₂.CoordinateRing C₁.CoordinateRing := cd.toAlgebra + let modCR : Module C₂.CoordinateRing C₁.CoordinateRing := algCR.toModule + have hfin' : @Module.Finite C₂.CoordinateRing C₁.CoordinateRing _ _ modCR := cd.module_finite - haveI htf : @Module.IsTorsionFree C₂.CoordinateRing C₁.CoordinateRing _ _ modCR := + have htf : @Module.IsTorsionFree C₂.CoordinateRing C₁.CoordinateRing _ _ modCR := isTorsionFree_coordHom φ cd - haveI faithCR : FaithfulSMul C₂.CoordinateRing C₁.CoordinateRing := + have faithCR : FaithfulSMul C₂.CoordinateRing C₁.CoordinateRing := (faithfulSMul_iff_algebraMap_injective C₂.CoordinateRing C₁.CoordinateRing).mpr (CurveMap.coordHom_injective φ cd) - haveI hpMax' : p.IsMaximal := hpMax + have hpMax' : p.IsMaximal := hpMax intro Q' hQ' rw [IsDedekindDomain.mem_primesOverFinset_iff (B := C₁.CoordinateRing) hp_ne] at hQ' intro h_eq @@ -790,15 +753,15 @@ private theorem exists_smoothPoint_relNorm_maximalIdealAt_eq ∃ P' : C₁.SmoothPoint, C₁.maximalIdealAt P' = Q' ∧ Ideal.relNorm C₂.CoordinateRing Q' = C₂.maximalIdealAt (toPointMap cd P') ∧ Q'.LiesOver (C₂.maximalIdealAt (toPointMap cd P')) := by - letI algCR : Algebra C₂.CoordinateRing C₁.CoordinateRing := cd.toAlgebra - letI modCR : Module C₂.CoordinateRing C₁.CoordinateRing := algCR.toModule - haveI hfin' : @Module.Finite C₂.CoordinateRing C₁.CoordinateRing _ _ modCR := + let algCR : Algebra C₂.CoordinateRing C₁.CoordinateRing := cd.toAlgebra + let modCR : Module C₂.CoordinateRing C₁.CoordinateRing := algCR.toModule + have hfin' : @Module.Finite C₂.CoordinateRing C₁.CoordinateRing _ _ modCR := cd.module_finite - haveI htf : @Module.IsTorsionFree C₂.CoordinateRing C₁.CoordinateRing _ _ modCR := + have htf : @Module.IsTorsionFree C₂.CoordinateRing C₁.CoordinateRing _ _ modCR := isTorsionFree_coordHom φ cd - haveI hQ'max' : Q'.IsMaximal := hQ'max + have hQ'max' : Q'.IsMaximal := hQ'max obtain ⟨P', hP'⟩ := C₁.exists_smoothPoint_of_isMaximal hQ'max - haveI hlies' : (C₁.maximalIdealAt P').LiesOver + have hlies' : (C₁.maximalIdealAt P').LiesOver (C₂.maximalIdealAt (toPointMap cd P')) := maximalIdealAt_liesOver_toPointMap φ cd P' refine ⟨P', hP', ?_, hP' ▸ hlies'⟩ @@ -822,15 +785,15 @@ private theorem count_maximalIdealAt_relNorm_pow_self (Q : C₂.SmoothPoint) isTorsionFree_coordHom φ cd (Associates.mk (C₂.maximalIdealAt Q)).count (Associates.mk ((Ideal.relNorm C₂.CoordinateRing Q') ^ k)).factors = k := by - letI algCR : Algebra C₂.CoordinateRing C₁.CoordinateRing := cd.toAlgebra - letI modCR : Module C₂.CoordinateRing C₁.CoordinateRing := algCR.toModule - haveI hfin' : @Module.Finite C₂.CoordinateRing C₁.CoordinateRing _ _ modCR := + let algCR : Algebra C₂.CoordinateRing C₁.CoordinateRing := cd.toAlgebra + let modCR : Module C₂.CoordinateRing C₁.CoordinateRing := algCR.toModule + have hfin' : @Module.Finite C₂.CoordinateRing C₁.CoordinateRing _ _ modCR := cd.module_finite - haveI htf : @Module.IsTorsionFree C₂.CoordinateRing C₁.CoordinateRing _ _ modCR := + have htf : @Module.IsTorsionFree C₂.CoordinateRing C₁.CoordinateRing _ _ modCR := isTorsionFree_coordHom φ cd - haveI hQ'lies' : Q'.LiesOver (C₂.maximalIdealAt Q) := hQ'lies + have hQ'lies' : Q'.LiesOver (C₂.maximalIdealAt Q) := hQ'lies set p : Ideal C₂.CoordinateRing := C₂.maximalIdealAt Q with hp_def - haveI hpMax : p.IsMaximal := C₂.maximalIdealAt_isMaximal Q + have hpMax : p.IsMaximal := C₂.maximalIdealAt_isMaximal Q have hp_ne : p ≠ ⊥ := C₂.maximalIdealAt_ne_bot Q have h_vp_irr : Irreducible (Associates.mk p) := (⟨p, hpMax.isPrime, hp_ne⟩ : @@ -862,14 +825,14 @@ private theorem count_maximalIdealAt_relNorm_pow_of_not_liesOver (Q : C₂.Smoot isTorsionFree_coordHom φ cd (Associates.mk (C₂.maximalIdealAt Q)).count (Associates.mk ((Ideal.relNorm C₂.CoordinateRing Q') ^ k)).factors = 0 := by - letI algCR : Algebra C₂.CoordinateRing C₁.CoordinateRing := cd.toAlgebra - letI modCR : Module C₂.CoordinateRing C₁.CoordinateRing := algCR.toModule - haveI hfin' : @Module.Finite C₂.CoordinateRing C₁.CoordinateRing _ _ modCR := + let algCR : Algebra C₂.CoordinateRing C₁.CoordinateRing := cd.toAlgebra + let modCR : Module C₂.CoordinateRing C₁.CoordinateRing := algCR.toModule + have hfin' : @Module.Finite C₂.CoordinateRing C₁.CoordinateRing _ _ modCR := cd.module_finite - haveI htf : @Module.IsTorsionFree C₂.CoordinateRing C₁.CoordinateRing _ _ modCR := + have htf : @Module.IsTorsionFree C₂.CoordinateRing C₁.CoordinateRing _ _ modCR := isTorsionFree_coordHom φ cd set p : Ideal C₂.CoordinateRing := C₂.maximalIdealAt Q with hp_def - haveI hpMax : p.IsMaximal := C₂.maximalIdealAt_isMaximal Q + have hpMax : p.IsMaximal := C₂.maximalIdealAt_isMaximal Q have hp_ne : p ≠ ⊥ := C₂.maximalIdealAt_ne_bot Q have h_vp_irr : Irreducible (Associates.mk p) := (⟨p, hpMax.isPrime, hp_ne⟩ : @@ -880,7 +843,7 @@ private theorem count_maximalIdealAt_relNorm_pow_of_not_liesOver (Q : C₂.Smoot rw [hrel] intro hpe exact hQ'not (hpe ▸ hlies') - haveI hP'max2 : (Ideal.relNorm C₂.CoordinateRing Q').IsMaximal := + have hP'max2 : (Ideal.relNorm C₂.CoordinateRing Q').IsMaximal := hrel ▸ C₂.maximalIdealAt_isMaximal _ have hP'_ne_bot2 : Ideal.relNorm C₂.CoordinateRing Q' ≠ ⊥ := hrel ▸ C₂.maximalIdealAt_ne_bot _ have h_vP'_irr : Irreducible (Associates.mk (Ideal.relNorm C₂.CoordinateRing Q')) := @@ -915,14 +878,14 @@ private theorem count_factors_relNorm_pow_eq_ite (Q : C₂.SmoothPoint) (Associates.mk ((Ideal.relNorm C₂.CoordinateRing Q') ^ k)).factors = if Q' ∈ IsDedekindDomain.primesOverFinset (C₂.maximalIdealAt Q) C₁.CoordinateRing then k else 0 := by - letI algCR : Algebra C₂.CoordinateRing C₁.CoordinateRing := cd.toAlgebra - letI modCR : Module C₂.CoordinateRing C₁.CoordinateRing := algCR.toModule - haveI hfin' : @Module.Finite C₂.CoordinateRing C₁.CoordinateRing _ _ modCR := + let algCR : Algebra C₂.CoordinateRing C₁.CoordinateRing := cd.toAlgebra + let modCR : Module C₂.CoordinateRing C₁.CoordinateRing := algCR.toModule + have hfin' : @Module.Finite C₂.CoordinateRing C₁.CoordinateRing _ _ modCR := cd.module_finite - haveI htf : @Module.IsTorsionFree C₂.CoordinateRing C₁.CoordinateRing _ _ modCR := + have htf : @Module.IsTorsionFree C₂.CoordinateRing C₁.CoordinateRing _ _ modCR := isTorsionFree_coordHom φ cd have hp_ne : C₂.maximalIdealAt Q ≠ ⊥ := C₂.maximalIdealAt_ne_bot Q - haveI hpMax : (C₂.maximalIdealAt Q).IsMaximal := C₂.maximalIdealAt_isMaximal Q + have hpMax : (C₂.maximalIdealAt Q).IsMaximal := C₂.maximalIdealAt_isMaximal Q by_cases h_over : Q' ∈ IsDedekindDomain.primesOverFinset (C₂.maximalIdealAt Q) C₁.CoordinateRing · rw [if_pos h_over] haveI hQ'lies : Q'.LiesOver (C₂.maximalIdealAt Q) := @@ -979,11 +942,11 @@ private theorem associates_relNorm_pow_ne_zero haveI : @Module.IsTorsionFree C₂.CoordinateRing C₁.CoordinateRing _ _ modCR := isTorsionFree_coordHom φ cd Associates.mk ((Ideal.relNorm C₂.CoordinateRing Q'.asIdeal) ^ k) ≠ 0 := by - letI algCR : Algebra C₂.CoordinateRing C₁.CoordinateRing := cd.toAlgebra - letI modCR : Module C₂.CoordinateRing C₁.CoordinateRing := algCR.toModule - haveI hfin' : @Module.Finite C₂.CoordinateRing C₁.CoordinateRing _ _ modCR := + let algCR : Algebra C₂.CoordinateRing C₁.CoordinateRing := cd.toAlgebra + let modCR : Module C₂.CoordinateRing C₁.CoordinateRing := algCR.toModule + have hfin' : @Module.Finite C₂.CoordinateRing C₁.CoordinateRing _ _ modCR := cd.module_finite - haveI htf : @Module.IsTorsionFree C₂.CoordinateRing C₁.CoordinateRing _ _ modCR := + have htf : @Module.IsTorsionFree C₂.CoordinateRing C₁.CoordinateRing _ _ modCR := isTorsionFree_coordHom φ cd rw [Associates.mk_ne_zero] apply pow_ne_zero @@ -1018,14 +981,14 @@ private theorem count_relNorm_span_eq_sum_support (Q : C₂.SmoothPoint) (Associates.mk ((Ideal.relNorm C₂.CoordinateRing Q'.asIdeal) ^ ((Associates.mk Q'.asIdeal).count (Associates.mk (Ideal.span ({w} : Set _))).factors))).factors := by - letI algCR : Algebra C₂.CoordinateRing C₁.CoordinateRing := cd.toAlgebra - letI modCR : Module C₂.CoordinateRing C₁.CoordinateRing := algCR.toModule - haveI hfin' : @Module.Finite C₂.CoordinateRing C₁.CoordinateRing _ _ modCR := + let algCR : Algebra C₂.CoordinateRing C₁.CoordinateRing := cd.toAlgebra + let modCR : Module C₂.CoordinateRing C₁.CoordinateRing := algCR.toModule + have hfin' : @Module.Finite C₂.CoordinateRing C₁.CoordinateRing _ _ modCR := cd.module_finite - haveI htf : @Module.IsTorsionFree C₂.CoordinateRing C₁.CoordinateRing _ _ modCR := + have htf : @Module.IsTorsionFree C₂.CoordinateRing C₁.CoordinateRing _ _ modCR := isTorsionFree_coordHom φ cd set p : Ideal C₂.CoordinateRing := C₂.maximalIdealAt Q with hp_def - haveI hpMax : p.IsMaximal := C₂.maximalIdealAt_isMaximal Q + have hpMax : p.IsMaximal := C₂.maximalIdealAt_isMaximal Q have hp_ne : p ≠ ⊥ := C₂.maximalIdealAt_ne_bot Q have h_vp_irr : Irreducible (Associates.mk p) := (⟨p, hpMax.isPrime, hp_ne⟩ : @@ -1070,15 +1033,15 @@ theorem count_relNorm_eq_sum_fiber : ∑ Q' ∈ IsDedekindDomain.primesOverFinset (C₂.maximalIdealAt Q) C₁.CoordinateRing, (Associates.mk Q').count (Associates.mk (Ideal.span ({w} : Set _))).factors := by classical - letI algCR : Algebra C₂.CoordinateRing C₁.CoordinateRing := cd.toAlgebra - letI modCR : Module C₂.CoordinateRing C₁.CoordinateRing := algCR.toModule - haveI hfin' : @Module.Finite C₂.CoordinateRing C₁.CoordinateRing _ _ modCR := + let algCR : Algebra C₂.CoordinateRing C₁.CoordinateRing := cd.toAlgebra + let modCR : Module C₂.CoordinateRing C₁.CoordinateRing := algCR.toModule + have hfin' : @Module.Finite C₂.CoordinateRing C₁.CoordinateRing _ _ modCR := cd.module_finite - haveI htf : @Module.IsTorsionFree C₂.CoordinateRing C₁.CoordinateRing _ _ modCR := + have htf : @Module.IsTorsionFree C₂.CoordinateRing C₁.CoordinateRing _ _ modCR := isTorsionFree_coordHom φ cd intro w hw Q set p : Ideal C₂.CoordinateRing := C₂.maximalIdealAt Q with hp_def - haveI hpMax : p.IsMaximal := C₂.maximalIdealAt_isMaximal Q + have hpMax : p.IsMaximal := C₂.maximalIdealAt_isMaximal Q have hp_ne : p ≠ ⊥ := C₂.maximalIdealAt_ne_bot Q have hI_ne : Ideal.span ({w} : Set C₁.CoordinateRing) ≠ 0 := by rw [Ne, Ideal.zero_eq_bot, Ideal.span_singleton_eq_bot]; exact hw @@ -1185,28 +1148,28 @@ private theorem pushforward_algebraMap_eq_algebraMap_intNorm (w : C₁.Coordinat algebraMap C₂.CoordinateRing C₂.FunctionField (Algebra.intNorm C₂.CoordinateRing C₁.CoordinateRing w) := by classical - letI algCR : Algebra C₂.CoordinateRing C₁.CoordinateRing := cd.toAlgebra - letI modCR : Module C₂.CoordinateRing C₁.CoordinateRing := algCR.toModule - haveI hfin' : @Module.Finite C₂.CoordinateRing C₁.CoordinateRing _ _ modCR := + let algCR : Algebra C₂.CoordinateRing C₁.CoordinateRing := cd.toAlgebra + let modCR : Module C₂.CoordinateRing C₁.CoordinateRing := algCR.toModule + have hfin' : @Module.Finite C₂.CoordinateRing C₁.CoordinateRing _ _ modCR := cd.module_finite - haveI htf : @Module.IsTorsionFree C₂.CoordinateRing C₁.CoordinateRing _ _ modCR := + have htf : @Module.IsTorsionFree C₂.CoordinateRing C₁.CoordinateRing _ _ modCR := isTorsionFree_coordHom φ cd - haveI hint : Algebra.IsIntegral C₂.CoordinateRing C₁.CoordinateRing := + have hint : Algebra.IsIntegral C₂.CoordinateRing C₁.CoordinateRing := Algebra.IsIntegral.of_finite C₂.CoordinateRing C₁.CoordinateRing - haveI tower2 : IsScalarTower C₂.CoordinateRing C₁.CoordinateRing C₁.FunctionField := by + have tower2 : IsScalarTower C₂.CoordinateRing C₁.CoordinateRing C₁.FunctionField := by refine IsScalarTower.of_algebraMap_eq fun x ↦ ?_ rw [RingHom.algebraMap_toAlgebra] rfl - haveI faith : FaithfulSMul C₂.CoordinateRing C₁.FunctionField := + have faith : FaithfulSMul C₂.CoordinateRing C₁.FunctionField := faithfulSMul_coordinateRing_functionField φ cd - letI algFF : Algebra C₂.FunctionField C₁.FunctionField := φ.toAlgebra - haveI tower1 : IsScalarTower C₂.CoordinateRing C₂.FunctionField C₁.FunctionField := by + let algFF : Algebra C₂.FunctionField C₁.FunctionField := φ.toAlgebra + have tower1 : IsScalarTower C₂.CoordinateRing C₂.FunctionField C₁.FunctionField := by refine IsScalarTower.of_algebraMap_smul fun r x ↦ ?_ rw [Algebra.smul_def] show φ.pullback ((algebraMap C₂.CoordinateRing C₂.FunctionField) r) * x = r • x rw [cd.compat r, ← IsScalarTower.algebraMap_smul C₁.CoordinateRing r x, ← Algebra.smul_def] rfl - haveI hfd : FiniteDimensional C₂.FunctionField C₁.FunctionField := + have hfd : FiniteDimensional C₂.FunctionField C₁.FunctionField := finiteDimensional_functionField φ cd rw [Algebra.algebraMap_intNorm (A := C₂.CoordinateRing) (B := C₁.CoordinateRing) (K := C₂.FunctionField) (L := C₁.FunctionField) w] @@ -1226,11 +1189,11 @@ private theorem intNorm_ne_zero_of_ne_zero (w : C₁.CoordinateRing) (hw : w ≠ isTorsionFree_coordHom φ cd Algebra.intNorm C₂.CoordinateRing C₁.CoordinateRing w ≠ 0 := by classical - letI algCR : Algebra C₂.CoordinateRing C₁.CoordinateRing := cd.toAlgebra - letI modCR : Module C₂.CoordinateRing C₁.CoordinateRing := algCR.toModule - haveI hfin' : @Module.Finite C₂.CoordinateRing C₁.CoordinateRing _ _ modCR := + let algCR : Algebra C₂.CoordinateRing C₁.CoordinateRing := cd.toAlgebra + let modCR : Module C₂.CoordinateRing C₁.CoordinateRing := algCR.toModule + have hfin' : @Module.Finite C₂.CoordinateRing C₁.CoordinateRing _ _ modCR := cd.module_finite - haveI htf : @Module.IsTorsionFree C₂.CoordinateRing C₁.CoordinateRing _ _ modCR := + have htf : @Module.IsTorsionFree C₂.CoordinateRing C₁.CoordinateRing _ _ modCR := isTorsionFree_coordHom φ cd have hw_FF : algebraMap C₁.CoordinateRing C₁.FunctionField w ≠ 0 := by intro h @@ -1283,25 +1246,25 @@ private theorem exists_smoothPoint_maximalIdealAt_eq_of_mem_primesOverFinset (hQ' : letI : Algebra C₂.CoordinateRing C₁.CoordinateRing := cd.toAlgebra Q' ∈ IsDedekindDomain.primesOverFinset (C₂.maximalIdealAt Q) C₁.CoordinateRing) : ∃ P' : C₁.SmoothPoint, C₁.maximalIdealAt P' = Q' ∧ toPointMap cd P' = Q := by - letI algCR : Algebra C₂.CoordinateRing C₁.CoordinateRing := cd.toAlgebra - letI modCR : Module C₂.CoordinateRing C₁.CoordinateRing := algCR.toModule - haveI hfin' : @Module.Finite C₂.CoordinateRing C₁.CoordinateRing _ _ modCR := + let algCR : Algebra C₂.CoordinateRing C₁.CoordinateRing := cd.toAlgebra + let modCR : Module C₂.CoordinateRing C₁.CoordinateRing := algCR.toModule + have hfin' : @Module.Finite C₂.CoordinateRing C₁.CoordinateRing _ _ modCR := cd.module_finite - haveI htf : @Module.IsTorsionFree C₂.CoordinateRing C₁.CoordinateRing _ _ modCR := + have htf : @Module.IsTorsionFree C₂.CoordinateRing C₁.CoordinateRing _ _ modCR := isTorsionFree_coordHom φ cd - haveI hpMax : (C₂.maximalIdealAt Q).IsMaximal := C₂.maximalIdealAt_isMaximal Q + have hpMax : (C₂.maximalIdealAt Q).IsMaximal := C₂.maximalIdealAt_isMaximal Q have hp_ne : C₂.maximalIdealAt Q ≠ ⊥ := C₂.maximalIdealAt_ne_bot Q rw [IsDedekindDomain.mem_primesOverFinset_iff (B := C₁.CoordinateRing) hp_ne] at hQ' obtain ⟨hQ'prime, hQ'lies⟩ := hQ' - haveI : Q'.IsPrime := hQ'prime - haveI : Q'.LiesOver (C₂.maximalIdealAt Q) := hQ'lies - haveI hQ'max : Q'.IsMaximal := Ideal.IsPrime.isMaximal hQ'prime (by + have : Q'.IsPrime := hQ'prime + have : Q'.LiesOver (C₂.maximalIdealAt Q) := hQ'lies + have hQ'max : Q'.IsMaximal := Ideal.IsPrime.isMaximal hQ'prime (by intro h; apply hp_ne have : C₂.maximalIdealAt Q = Q'.under C₂.CoordinateRing := hQ'lies.over rw [this, h, Ideal.under_bot]) obtain ⟨P', hP'⟩ := C₁.exists_smoothPoint_of_isMaximal hQ'max refine ⟨P', hP', ?_⟩ - haveI hlies' : (C₁.maximalIdealAt P').LiesOver + have hlies' : (C₁.maximalIdealAt P').LiesOver (C₂.maximalIdealAt (toPointMap cd P')) := maximalIdealAt_liesOver_toPointMap φ cd P' have h1 : C₂.maximalIdealAt (toPointMap cd P') = @@ -1333,11 +1296,11 @@ private theorem affine_section_injOn_attach (Q : C₂.SmoothPoint) : (_ : b ∈ (IsDedekindDomain.primesOverFinset (C₂.maximalIdealAt Q) C₁.CoordinateRing).attach), ProjectiveSmoothPoint.affine (g a.1 a.2) = ProjectiveSmoothPoint.affine (g b.1 b.2) → a = b := by - letI algCR : Algebra C₂.CoordinateRing C₁.CoordinateRing := cd.toAlgebra - letI modCR : Module C₂.CoordinateRing C₁.CoordinateRing := algCR.toModule - haveI hfin' : @Module.Finite C₂.CoordinateRing C₁.CoordinateRing _ _ modCR := + let algCR : Algebra C₂.CoordinateRing C₁.CoordinateRing := cd.toAlgebra + let modCR : Module C₂.CoordinateRing C₁.CoordinateRing := algCR.toModule + have hfin' : @Module.Finite C₂.CoordinateRing C₁.CoordinateRing _ _ modCR := cd.module_finite - haveI htf : @Module.IsTorsionFree C₂.CoordinateRing C₁.CoordinateRing _ _ modCR := + have htf : @Module.IsTorsionFree C₂.CoordinateRing C₁.CoordinateRing _ _ modCR := isTorsionFree_coordHom φ cd intro g hg a _ b _ hab simp only [ProjectiveSmoothPoint.affine.injEq] at hab @@ -1373,11 +1336,11 @@ private theorem sum_filter_support_eq_sum_image_section ∑ x ∈ (IsDedekindDomain.primesOverFinset (C₂.maximalIdealAt Q) C₁.CoordinateRing).attach.image (fun Q' ↦ ProjectiveSmoothPoint.affine (g Q'.1 Q'.2)), D x := by - letI algCR : Algebra C₂.CoordinateRing C₁.CoordinateRing := cd.toAlgebra - letI modCR : Module C₂.CoordinateRing C₁.CoordinateRing := algCR.toModule - haveI hfin' : @Module.Finite C₂.CoordinateRing C₁.CoordinateRing _ _ modCR := + let algCR : Algebra C₂.CoordinateRing C₁.CoordinateRing := cd.toAlgebra + let modCR : Module C₂.CoordinateRing C₁.CoordinateRing := algCR.toModule + have hfin' : @Module.Finite C₂.CoordinateRing C₁.CoordinateRing _ _ modCR := cd.module_finite - haveI htf : @Module.IsTorsionFree C₂.CoordinateRing C₁.CoordinateRing _ _ modCR := + have htf : @Module.IsTorsionFree C₂.CoordinateRing C₁.CoordinateRing _ _ modCR := isTorsionFree_coordHom φ cd intro g hg_ideal hg_Q have hp_ne : C₂.maximalIdealAt Q ≠ ⊥ := C₂.maximalIdealAt_ne_bot Q @@ -1439,11 +1402,11 @@ private theorem sum_image_section_eq_sum_primesOver (C₁.projectiveDivisorOf (algebraMap C₁.CoordinateRing C₁.FunctionField w)) x) = ∑ Q' ∈ IsDedekindDomain.primesOverFinset (C₂.maximalIdealAt Q) C₁.CoordinateRing, ((Associates.mk Q').count (Associates.mk (Ideal.span ({w} : Set _))).factors : ℤ) := by - letI algCR : Algebra C₂.CoordinateRing C₁.CoordinateRing := cd.toAlgebra - letI modCR : Module C₂.CoordinateRing C₁.CoordinateRing := algCR.toModule - haveI hfin' : @Module.Finite C₂.CoordinateRing C₁.CoordinateRing _ _ modCR := + let algCR : Algebra C₂.CoordinateRing C₁.CoordinateRing := cd.toAlgebra + let modCR : Module C₂.CoordinateRing C₁.CoordinateRing := algCR.toModule + have hfin' : @Module.Finite C₂.CoordinateRing C₁.CoordinateRing _ _ modCR := cd.module_finite - haveI htf : @Module.IsTorsionFree C₂.CoordinateRing C₁.CoordinateRing _ _ modCR := + have htf : @Module.IsTorsionFree C₂.CoordinateRing C₁.CoordinateRing _ _ modCR := isTorsionFree_coordHom φ cd intro g hg_ideal rw [Finset.sum_image (affine_section_injOn_attach φ cd Q g hg_ideal)] @@ -1480,11 +1443,11 @@ private theorem pushforwardDivisorVal_projectiveDivisorOf_affine_eq_sum_fiber ∑ Q' ∈ IsDedekindDomain.primesOverFinset (C₂.maximalIdealAt Q) C₁.CoordinateRing, ((Associates.mk Q').count (Associates.mk (Ideal.span ({w} : Set _))).factors : ℤ) := by classical - letI algCR : Algebra C₂.CoordinateRing C₁.CoordinateRing := cd.toAlgebra - letI modCR : Module C₂.CoordinateRing C₁.CoordinateRing := algCR.toModule - haveI hfin' : @Module.Finite C₂.CoordinateRing C₁.CoordinateRing _ _ modCR := + let algCR : Algebra C₂.CoordinateRing C₁.CoordinateRing := cd.toAlgebra + let modCR : Module C₂.CoordinateRing C₁.CoordinateRing := algCR.toModule + have hfin' : @Module.Finite C₂.CoordinateRing C₁.CoordinateRing _ _ modCR := cd.module_finite - haveI htf : @Module.IsTorsionFree C₂.CoordinateRing C₁.CoordinateRing _ _ modCR := + have htf : @Module.IsTorsionFree C₂.CoordinateRing C₁.CoordinateRing _ _ modCR := isTorsionFree_coordHom φ cd -- Choose a section `pt` of the fibre `{primes over m_Q} → {smooth points P'}`, with -- `m_{pt Q'} = Q'` and `φ (pt Q') = Q`, via the existence lemma. @@ -1532,11 +1495,11 @@ private theorem projectiveDivisorOf_pushforward_algebraMap_apply_affine φ.pushforwardDivisorVal cd (C₁.projectiveDivisorOf (algebraMap C₁.CoordinateRing C₁.FunctionField w)) (ProjectiveSmoothPoint.affine Q) := by classical - letI algCR : Algebra C₂.CoordinateRing C₁.CoordinateRing := cd.toAlgebra - letI modCR : Module C₂.CoordinateRing C₁.CoordinateRing := algCR.toModule - haveI hfin' : @Module.Finite C₂.CoordinateRing C₁.CoordinateRing _ _ modCR := + let algCR : Algebra C₂.CoordinateRing C₁.CoordinateRing := cd.toAlgebra + let modCR : Module C₂.CoordinateRing C₁.CoordinateRing := algCR.toModule + have hfin' : @Module.Finite C₂.CoordinateRing C₁.CoordinateRing _ _ modCR := cd.module_finite - haveI htf : @Module.IsTorsionFree C₂.CoordinateRing C₁.CoordinateRing _ _ modCR := + have htf : @Module.IsTorsionFree C₂.CoordinateRing C₁.CoordinateRing _ _ modCR := isTorsionFree_coordHom φ cd have hnw : Algebra.intNorm C₂.CoordinateRing C₁.CoordinateRing w ≠ 0 := intNorm_ne_zero_of_ne_zero φ cd w hw @@ -1585,10 +1548,10 @@ theorem projectiveDivisorOf_pushforward_algebraMap_eq end NormConormSteps -/-! ### NEW-1(ii): the `f = u/v` reduction +/-! ### the `f = u/v` reduction The deep per-place arithmetic is the `algebraMap` case -`projectiveDivisorOf_pushforward_algebraMap_eq` (in `section NormConormSteps`). +`projectiveDivisorOf_pushforward_algebraMap_eq`. The norm–conorm identity for a *general* `f ∈ K(C₁)` follows from it by the multiplicativity of both sides together with `IsFractionRing.div_surjective`. The next four `private` helpers package that reduction: @@ -1606,8 +1569,8 @@ private theorem projectiveDivisorOf_pushforward_zero (φ : CurveMap C₁ C₂) FiniteDimensional C₂.FunctionField C₁.FunctionField) : C₂.projectiveDivisorOf (φ.pushforward (0 : C₁.FunctionField)) = φ.pushforwardDivisorVal cd (C₁.projectiveDivisorOf (0 : C₁.FunctionField)) := by - letI algFF : Algebra C₂.FunctionField C₁.FunctionField := φ.toAlgebra - haveI : FiniteDimensional C₂.FunctionField C₁.FunctionField := hfd + let algFF : Algebra C₂.FunctionField C₁.FunctionField := φ.toAlgebra + have : FiniteDimensional C₂.FunctionField C₁.FunctionField := hfd rw [show φ.pushforward (0 : C₁.FunctionField) = 0 from Algebra.norm_zero, C₂.projectiveDivisorOf_zero, C₁.projectiveDivisorOf_zero, map_zero] @@ -1690,44 +1653,16 @@ private theorem projectiveDivisorOf_pushforward_eq_of_algebraMap (φ : CurveMap pushforwardDivisorVal_projectiveDivisorOf_eq_sub_of_mul_eq φ cd hf hav_ne hf_av, hau, hav, key u hu_ne, key v hv_ne] -/-- **NEW-1(ii) — Silverman II.3.6, norm–conorm identity** `div(N_φ f) = φ_∗(div f)`. -For a curve map `φ : C₁ → C₂` with coordinate-ring witness `cd` and a function -`f ∈ K(C₁)`, the projective divisor of the conorm `N_φ f = φ.pushforward f` -equals the valuation-theoretic pushforward of the projective divisor of `f`. - -The content is the per-place identity `ord_Q(N_φ f) = Σ_{P ↦ Q} f_{P/Q}·ord_P(f)` -(with inertia degrees `f_{P/Q} = 1` over an algebraically closed field), proved -via `Ideal.sum_ramification_inertia`, `Ideal.relNorm`, and `Algebra.intNorm`. - -The proof is the generalisation of the `F[X] → F[C]` machinery of -`NormValuation.lean` (`count_relNorm_singleton_eq_sum_count_fiber`, -`relNorm_maximalIdealAt`) to the *coordinate-ring extension* `F[C₂] → F[C₁]` -induced by `cd`. The instance-heavy steps are factored into the sub-lemmas of -`section NormConormSteps`, each re-establishing the `cd`-induced algebra and its -`Module.Finite`/`IsTorsionFree` structure internally (a `relNorm`/`intNorm` -statement only typechecks with those instances in scope, so the sub-lemmas state -them via `letI`/`haveI`-in-type and re-derive them in the body): -* `finiteDimensional_functionField` — the finite extension `K(C₂) → K(C₁)` - (needed only for the `f = 0` branch below); -* the degree/`finrank` coherence `finrank_{liftAlgebra} = φ.degree` - (`IsFractionRing.lift_unique` + `cd.compat`, so `relNorm_algebraMap` yields - `m_Q ^ φ.degree`), computed inside `relNorm_maximalIdealAt_eq`; -* `relNorm_maximalIdealAt_eq` — the **`s = 1` core** `relNorm_{F[C₂]}(m_P) = m_{φP}` - from the global balance `relNorm(m_Q·F[C₁]) = m_Q^{φ.degree} = - ∏ relNorm(m_{P'})^{e_{P'}}` together with `Σ e_{P'}·f_{P'} = φ.degree` - (`sum_ramificationIdx_mul_inertiaDeg_eq_degree`) and `f_{P'} = 1` - (`inertiaDeg_maximalIdealAt_toPointMap`), forcing each exponent to 1; -* `count_relNorm_eq_sum_fiber` — the affine count identity - `count_{m_Q}(relNorm (span{u})) = Σ_{Q' over m_Q} count_{Q'}(span{u})`; -* `projectiveDivisorOf_pushforward_algebraMap_eq` — the `algebraMap` case, matching - the affine coefficients to the `mapDomain` fibre sum of `pushforwardDivisorVal` - via the bijection `{P : φP = Q} ≃ {primes over m_Q}` (`maximalIdealAt_toPointMap` - + `exists_smoothPoint_of_isMaximal`), the place at infinity being forced by - `projectiveDivisorOf_degree_eq_zero` (both projective divisors have degree `0`, - and `pushforwardDivisorVal` preserves degree). -Here the general `f = u/v` reduces to `f = algebraMap u`, `u ∈ F[C₁]` nonzero, via -`IsFractionRing.div_surjective` and the additivity of both sides -(`projectiveDivisorOf_mul`, `pushforward_mul`, `pushforwardDivisorVal` a hom). -/ +/-- **Silverman II.3.6, norm–conorm identity** `div(N_φ f) = φ_∗(div f)`. + +For a curve map with a coordinate-ring witness over an algebraically closed field, +the local norm formula is `ord_Q(N_φ f) = Σ_{P ↦ Q} ord_P(f)`, since the residue +degrees are one. The prime-ideal norm formula follows from the fundamental +ramification identity and the degree of the function-field extension. The +bijection between points over `Q` and primes over its maximal ideal then gives +the affine coefficients; degree zero determines the coefficient at infinity. +The quotient representation `f = u/v` and additivity extend the identity from +nonzero coordinate-ring elements to all rational functions. -/ theorem projectiveDivisorOf_pushforward_eq_pushforwardDivisorVal [IsAlgClosed F] [IsDedekindDomain C₁.CoordinateRing] [IsDedekindDomain C₂.CoordinateRing] (φ : CurveMap C₁ C₂) (cd : φ.CoordHom) @@ -1746,7 +1681,7 @@ theorem projectiveDivisorOf_pushforward_eq_pushforwardDivisorVal [IsAlgClosed F] end HasseWeil.Curves.CurveMap -/-! ### NEW-1(iii)/(iv): compatibility + the gap `h_pres` -/ +/-! ### Compatibility of divisor pushforwards -/ namespace HasseWeil.EC.Isogeny @@ -1755,7 +1690,7 @@ open HasseWeil.Curves variable {F : Type*} [Field F] [DecidableEq F] variable {W₁ W₂ : Affine F} [W₁.IsElliptic] [W₂.IsElliptic] -/-- **NEW-1(iii)**: the point-map pushforward `pushforwardProjectiveDivisor` +/-- the point-map pushforward `pushforwardProjectiveDivisor` agrees with the valuation-theoretic pushforward `pushforwardDivisorVal`. By construction the two `mapDomain` place-image maps coincide, so this is `rfl` up to the `(φP).toProjectiveSmoothPoint = affine (toPointMap cd P)` identity. -/ @@ -1776,10 +1711,10 @@ theorem pushforwardProjectiveDivisor_eq_pushforwardDivisorVal (φ : Isogeny W₁ -- `affine (toPointMap cd P')` after the round-trip. rfl -/-- **NEW-1(iv) / `h_pres` — Silverman II.3.7**: the pushforward `φ_∗` carries +/-- **Silverman II.3.7**: the pushforward `φ_∗` carries principal projective divisors to principal ones. This is the sole deep input to Silverman III.4.8 (`EC.Isogeny.addHomProperty`); it falls out of the norm–conorm -identity (NEW-1 ii) since the pushforward of `div f` is `div(N_φ f)`, again +identity since the pushforward of `div f` is `div(N_φ f)`, again principal. -/ theorem pushforward_preserves_principal [IsAlgClosed F] [IsDedekindDomain (⟨W₁⟩ : SmoothPlaneCurve F).CoordinateRing] diff --git a/projects/HasseWeil/HasseWeil/Foundation/Curves/Fiber/AFConditional.lean b/projects/HasseWeil/HasseWeil/Foundation/Curves/Fiber/AFConditional.lean index d56788426..bb5320f8d 100644 --- a/projects/HasseWeil/HasseWeil/Foundation/Curves/Fiber/AFConditional.lean +++ b/projects/HasseWeil/HasseWeil/Foundation/Curves/Fiber/AFConditional.lean @@ -3,27 +3,16 @@ import HasseWeil.Foundation.Curves.Ramification.PoleOrderParity import HasseWeil.Isogeny.GroupHom.PicZero /-! -# AF unified package: conditional witnesses +# Divisor witnesses for additivity of isogenies -Wires together the shipped infrastructure into the witnesses needed by -`AddHomProperty_of_picZero_witnesses` (the universal Silverman III.4.8 -theorem). Each witness is parametrized over the remaining outstanding -hypotheses, making the dependency chain explicit: +The reduction `D ~ (σD) − (O)` of degree-zero divisors identifies their +Picard classes with point classes. Combined with the assertion that +`(P) − (O)` is principal only when `P = O`, it shows that the sum of +points vanishes on principal divisors. These two identities give the +Picard-group witnesses for additivity of an isogeny whose pushforward +preserves principal divisors. -* `h_inj` (`κ ∘ σ̄ = id`): `DivZeroReduce W` (= reduction lemma). -* `h_van` (`σ` vanishes on principal): `DivZeroReduce W` AND a - `point_minus_O_principal_eq_zero` over arbitrary functions - (= the no-finite-poles bridge). - -Once `DivZeroReduce W` lands (which itself decomposes into the -list-induction `effective_sum_reduce` + Finsupp-to-list bridge for -multiplicities) and the no-finite-poles bridge, the AF unified package -fully closes B-4-003 conditionally on Miller (the geometric chord/tangent -construction, the only remaining genuinely-new mathematical piece). - -## References - -* `T-PIC-AF-UNIFIED.md` for the full plan. +Reference: Silverman, *The Arithmetic of Elliptic Curves*, III.3–III.4. -/ open WeierstrassCurve @@ -33,19 +22,14 @@ namespace HasseWeil.Curves variable {F : Type*} [Field F] [DecidableEq F] (W : Affine F) [W.IsElliptic] -/-- The full divisor reduction property: every degree-zero divisor is -linearly equivalent to `(σD) − (O)`. The proof requires Miller (via -`effective_sum_reduce`) plus a Finsupp-to-list bridge for handling -multiplicities. Both are outstanding tickets. -/ +/-- Every degree-zero divisor is linearly equivalent to `(σD) − (O)`, +where `σD` is its sum of points with multiplicity. -/ def DivZeroReduce : Prop := ∀ D : ProjectiveDivisor.degZero (⟨W⟩ : SmoothPlaneCurve F), SmoothPlaneCurve.ProjLinearlyEquiv (⟨W⟩ : SmoothPlaneCurve F) D.val (kappaDivisor W (projectiveDivisorSum W D.val)) -/-- The unconditional `point_minus_O` property: if `(P) − (O)` is -principal, then `P = 0`. The proof requires the parity lemma (shipped -as `point_minus_O_principal_eq_zero_of_coord`) plus the no-finite-poles -→ CR-image bridge (outstanding ticket: `T-PIC-AF-UNIFIED.md` piece (a)). -/ +/-- A point divisor `(P) − (O)` is principal only when `P = O`. -/ def PointMinusOPrincipalEqZero : Prop := ∀ P : W.Point, SmoothPlaneCurve.ProjIsPrincipal (⟨W⟩ : SmoothPlaneCurve F) @@ -112,11 +96,8 @@ theorem h_van_degZero_of_divZeroReduce_and_pointMinusO /-! ### `PointMinusOPrincipalEqZero` from the no-finite-poles bridge -/ -/-- The no-finite-poles → CR-image bridge: any nonzero function with all -local orders nonneg lies in the coordinate-ring image. The proof composes -worker-I's `pointValuation_algebraMap_le_one`, `smoothPointEquivMaxIdeal` -(under `[IsAlgClosed F] [IsElliptic]`), and mathlib's -`mem_coordinateRing_of_valuation_le_one`. ~80-150 LOC follow-up ticket. -/ +/-- A nonzero function with nonnegative order at every affine point +lies in the image of the coordinate ring. -/ def NoFinitePolesBridge : Prop := ∀ (f : (⟨W⟩ : SmoothPlaneCurve F).FunctionField), f ≠ 0 → (∀ P : (⟨W⟩ : SmoothPlaneCurve F).SmoothPoint, @@ -151,9 +132,9 @@ theorem pointMinusO_of_bridge ((ProjectiveSmoothPoint.infinity : ProjectiveSmoothPoint (⟨W⟩ : SmoothPlaneCurve F))) ≠ ProjectiveSmoothPoint.affine Q := by nofun - rw [if_neg h_inf_ne, sub_zero] at h_eq + rw [ite_eq_right h_inf_ne, sub_zero] at h_eq by_cases h_eq_pt : P.toProjectiveSmoothPoint = ProjectiveSmoothPoint.affine Q - · rw [if_pos h_eq_pt] at h_eq + · rw [ite_eq_left h_eq_pt] at h_eq cases h_top : (⟨W⟩ : SmoothPlaneCurve F).ord_P Q f with | top => rw [h_top, WithTop.untopD_top] at h_eq @@ -163,7 +144,7 @@ theorem pointMinusO_of_bridge have hn : n = 1 := h_eq.symm subst hn exact_mod_cast (by decide : (0 : ℤ) ≤ 1) - · rw [if_neg h_eq_pt] at h_eq + · rw [ite_eq_right h_eq_pt] at h_eq cases h_top : (⟨W⟩ : SmoothPlaneCurve F).ord_P Q f with | top => exact absurd (((⟨W⟩ : SmoothPlaneCurve F).ord_P_eq_top_iff (P := Q) f).mp h_top) hf_ne @@ -174,17 +155,10 @@ theorem pointMinusO_of_bridge /-! ### Bundled AFInputs structure -/ -/-- The three input Props needed for the AF unified package on a single -elliptic curve `W`: - -* `miller`: chord/tangent geometric identity at the divisor level. -* `divZeroReduce`: combinatorial reduction `D ~ (σD) − (O)` for D ∈ Div⁰. -* `noFinitePolesBridge`: the algebraic bridge from "no finite poles" to - "in coordinate-ring image". - -Each is its own outstanding ticket; once all three are discharged for a -specific `W`, both witnesses needed by `AddHomProperty_of_picZero_witnesses` -(restricted to that curve's side of the isogeny) follow immediately. -/ +/-- The divisor identities needed to identify an elliptic curve with +its degree-zero Picard group: the Miller relation, reduction of +degree-zero divisors to point divisors, and the coordinate-ring +characterization of functions with no finite poles. -/ structure AFInputs (W : Affine F) [W.IsElliptic] where miller : MillerHypothesis W divZeroReduce : DivZeroReduce W @@ -217,12 +191,9 @@ theorem h_van_degZero {W : Affine F} [W.IsElliptic] (a : AFInputs W) end AFInputs -/-! ### Final B-4-003 wrapper -/ +/-! ### Additivity from divisor witnesses -/ -/-- The "principal divisors lie in degZero" predicate. Proved by -worker-K's T-II-3-009 (`projectiveDivisorOf_degree_zero`) under -`[IsAlgClosed F]`. We take it as a hypothesis here to keep the wrapper -conditional. -/ +/-- Principal projective divisors have degree zero. -/ def PrincipalImpliesDegZero (W : Affine F) [W.IsElliptic] : Prop := ∀ D : ProjectiveDivisor (⟨W⟩ : SmoothPlaneCurve F), D ∈ (⟨W⟩ : SmoothPlaneCurve F).projPrincipalSubgroup → @@ -230,8 +201,8 @@ def PrincipalImpliesDegZero (W : Affine F) [W.IsElliptic] : Prop := namespace AFInputs -/-- The full h_van witness, given `AFInputs` + the principal-implies-degZero -bridge (worker-K's T-II-3-009). -/ +/-- The sum of points vanishes on principal divisors, given the divisor +identities in `AFInputs` and the degree-zero property of principal divisors. -/ theorem h_van {W : Affine F} [W.IsElliptic] (a : AFInputs W) (h_pdz : PrincipalImpliesDegZero W) (D : ProjectiveDivisor (⟨W⟩ : SmoothPlaneCurve F)) @@ -241,20 +212,9 @@ theorem h_van {W : Affine F} [W.IsElliptic] (a : AFInputs W) end AFInputs -/-- **Final conditional B-4-003** for an isogeny: given `AFInputs` for -both curves, the principal-degZero bridge for both curves, and the -pushforward-preserves-principal hypothesis (T-PIC-C-003), the universal -hom property holds. - -This closes B-4-003 over `[IsAlgClosed F]` modulo: -- `MillerHypothesis` for both W₁ and W₂ (geometric chord/tangent — the BIG remaining piece) -- `DivZeroReduce` for both W₁ and W₂ (Finsupp decomposition + miller corollaries) -- `NoFinitePolesBridge` for both W₁ and W₂ (valuation bridge) -- `PrincipalImpliesDegZero` for both W₁ and W₂ (worker-K's T-II-3-009) -- `h_pres` (T-PIC-C-003 = norm-divisor identity) - -All the structural plumbing is here; the remaining work is to prove -each of these Props for elliptic curves. -/ +/-- An isogeny is additive given the divisor identities on both curves, +the degree-zero property of principal divisors, and preservation of +principal divisors by its pushforward. See Silverman III.4.8. -/ theorem AddHomProperty_of_AFInputs {W₁ W₂ : Affine F} [W₁.IsElliptic] [W₂.IsElliptic] (φ : HasseWeil.EC.Isogeny W₁ W₂) diff --git a/projects/HasseWeil/HasseWeil/Foundation/Curves/Fiber/GenericFiber.lean b/projects/HasseWeil/HasseWeil/Foundation/Curves/Fiber/GenericFiber.lean index 7a21963e5..91c992b49 100644 --- a/projects/HasseWeil/HasseWeil/Foundation/Curves/Fiber/GenericFiber.lean +++ b/projects/HasseWeil/HasseWeil/Foundation/Curves/Fiber/GenericFiber.lean @@ -12,38 +12,13 @@ import Mathlib.RingTheory.DedekindDomain.Different import Mathlib.RingTheory.DedekindDomain.Factorization /-! -# Generic fiber cardinality (T-II-2-009, Silverman II.2.6(b)) +For a coordinate-ring morphism, if a nonzero prime is unramified and all residue +field degrees above it are one, its number of primes above equals the +function-field degree. For a separable morphism this is the separable degree. +The algebraic support also identifies finite ramification loci through the +different ideal and constructs smooth points over algebraically closed fields. -For a nonconstant morphism `φ : C₁ → C₂` of smooth curves, for almost all -points `Q ∈ C₂`, the fiber `φ⁻¹(Q)` has cardinality equal to the -separable degree `deg_s(φ)`. - -This file provides the **algebraic-geometric content** of T-II-2-009 at -the Dedekind-domain level, building on the `CurveMap` + `CoordHom` -infrastructure: if we can exhibit a maximal ideal `p ⊂ C₂.CoordinateRing` -that is **unramified** and has **trivial residue-field degrees**, then -the number of primes above it equals the function-field degree `deg(φ)` -(which coincides with `deg_s(φ)` for separable `φ`). - -This is one side of Silverman's II.2.6(b): the fibre-cardinality statement -in terms of the discrete-prime count. The other direction — **exhibiting** -such an unramified prime `p` — requires the primitive-element-plus- -discriminant construction over a base that sees "almost all" `Q` (i.e. -the unramified locus is a dense open). Over arbitrary `F`, this is the -main piece still missing; see the progress note at the end. - -## Main results - -* `CurveMap.primesOverFinset_card_eq_degree_of_unramified` — given an - unramified prime `p` with every residue-field degree `f_P = 1`, the - number of primes above `p` equals `φ.degree`. -* `CurveMap.primesOverFinset_card_eq_sepDegree_of_separable_and_unramified` - — same conclusion in terms of `sepDegree` under the separability - hypothesis (which forces `deg = sepDeg`). - -## References - -* [Silverman, *The Arithmetic of Elliptic Curves*], II.2.6(b). +Reference: Silverman, *The Arithmetic of Elliptic Curves*, II.2.6(b). -/ namespace HasseWeil.Curves @@ -52,12 +27,6 @@ namespace CurveMap variable {F : Type*} [Field F] {C₁ C₂ : SmoothPlaneCurve F} -/-- **T-II-2-009, algebraic direction** (unramified + trivial residue -degrees ⇒ fiber count = degree). Given a `CurveMap` with `CoordHom` -witness and a maximal ideal `p ⊂ C₂.CoordinateRing` that is -(i) non-zero, (ii) has every ramification index = 1 on the primes above it, -and (iii) has every inertia (residue) degree = 1, the number of primes -above `p` equals `φ.degree`. -/ theorem primesOverFinset_card_eq_degree_of_unramified [IsIntegrallyClosed C₂.CoordinateRing] [IsIntegrallyClosed C₁.CoordinateRing] @@ -67,10 +36,10 @@ theorem primesOverFinset_card_eq_degree_of_unramified letI : Algebra C₂.CoordinateRing C₁.CoordinateRing := coordHom.toAlgebra ∀ P ∈ IsDedekindDomain.primesOverFinset p C₁.CoordinateRing, Ideal.ramificationIdx' p P * - Ideal.inertiaDeg' p P = 1) : + P.inertiaDeg C₂.CoordinateRing = 1) : letI : Algebra C₂.CoordinateRing C₁.CoordinateRing := coordHom.toAlgebra (IsDedekindDomain.primesOverFinset p C₁.CoordinateRing).card = φ.degree := by - letI : Algebra C₂.CoordinateRing C₁.CoordinateRing := coordHom.toAlgebra + let : Algebra C₂.CoordinateRing C₁.CoordinateRing := coordHom.toAlgebra have hsum := φ.sum_ramificationIdx_mul_inertiaDeg_eq_degree coordHom coordHom.module_finite hpMax hp0 -- Σ_{P ∈ S} (e · f) = deg. With each e·f = 1, LHS = S.card. @@ -80,10 +49,6 @@ theorem primesOverFinset_card_eq_degree_of_unramified rw [Finset.sum_const, Nat.smul_one_eq_cast] at hsum' exact_mod_cast hsum' -/-- **T-II-2-009 (separable case)**: for a separable `CurveMap` with an -unramified + trivial-residue-degree prime, the fiber count equals -`sepDegree`. Uses the fact that `sepDegree = degree` for separable -extensions (via `Field.finSepDegree_eq_finrank_iff`). -/ theorem primesOverFinset_card_eq_sepDegree_of_separable_and_unramified [IsIntegrallyClosed C₂.CoordinateRing] [IsIntegrallyClosed C₁.CoordinateRing] @@ -94,11 +59,11 @@ theorem primesOverFinset_card_eq_sepDegree_of_separable_and_unramified letI : Algebra C₂.CoordinateRing C₁.CoordinateRing := coordHom.toAlgebra ∀ P ∈ IsDedekindDomain.primesOverFinset p C₁.CoordinateRing, Ideal.ramificationIdx' p P * - Ideal.inertiaDeg' p P = 1) : + P.inertiaDeg C₂.CoordinateRing = 1) : letI : Algebra C₂.CoordinateRing C₁.CoordinateRing := coordHom.toAlgebra (IsDedekindDomain.primesOverFinset p C₁.CoordinateRing).card = φ.separableDegree := by -- separable + finite-dim ⇒ sepDegree = degree. - letI : Algebra C₂.FunctionField C₁.FunctionField := φ.toAlgebra + let : Algebra C₂.FunctionField C₁.FunctionField := φ.toAlgebra have hsep_eq : φ.degree = φ.separableDegree := by change φ.degree = @Field.finSepDegree _ _ _ _ φ.toAlgebra have hinsep : φ.inseparableDegree = 1 := hsep @@ -112,17 +77,6 @@ theorem primesOverFinset_card_eq_sepDegree_of_separable_and_unramified exact φ.primesOverFinset_card_eq_degree_of_unramified coordHom hpMax hp0 h_ef_one -/-! ### Piece 1 — bad locus `{p : p ∣ differentIdeal}` is finite - -For a finite separable extension of Dedekind domains `A → B`, the set of -maximal ideals `p ⊂ A` that ramify (i.e. divide `differentIdeal A B`) -is **finite**. Direct consequence of `differentIdeal_ne_bot` + -`Ideal.finite_factors`. -/ - -/-- **T-II-2-009 Piece 1**: the set of height-one primes of `B` that -divide `differentIdeal A B` is finite. These are the "ramified primes" -in the `A → B` extension (primes above which at least one prime of `B` -has `e_P ≥ 2`). Silverman II.2.6(b) "finitely many bad Q". -/ theorem _root_.IsDedekindDomain.finite_ramified_primes {A : Type*} [CommRing A] [IsDedekindDomain A] {B : Type*} [CommRing B] [IsDedekindDomain B] @@ -132,20 +86,13 @@ theorem _root_.IsDedekindDomain.finite_ramified_primes (FractionRing.liftAlgebra A (FractionRing B))) : {P : IsDedekindDomain.HeightOneSpectrum B | P.asIdeal ∣ differentIdeal A B}.Finite := by - letI : Algebra (FractionRing A) (FractionRing B) := + let : Algebra (FractionRing A) (FractionRing B) := FractionRing.liftAlgebra A (FractionRing B) - haveI : IsScalarTower A (FractionRing A) (FractionRing B) := + have : IsScalarTower A (FractionRing A) (FractionRing B) := FractionRing.isScalarTower_liftAlgebra A (FractionRing B) - haveI := hsep + have := hsep exact Ideal.finite_factors (differentIdeal_ne_bot (A := A) (B := B)) -/-! ### Piece 2 — `¬ P ∣ differentIdeal ⇒ IsUnramifiedAt A P` - -Direct corollary of mathlib's `not_dvd_differentIdeal_iff`. Packages the -easier direction as a standalone lemma for use in Pieces 3–5. -/ - -/-- **T-II-2-009 Piece 2**: a prime of `B` that does not divide the -different ideal is unramified over `A`. -/ theorem _root_.IsDedekindDomain.isUnramifiedAt_of_not_dvd_differentIdeal {A : Type*} [CommRing A] [IsDedekindDomain A] {B : Type*} [CommRing B] [IsDedekindDomain B] @@ -155,50 +102,27 @@ theorem _root_.IsDedekindDomain.isUnramifiedAt_of_not_dvd_differentIdeal (FractionRing.liftAlgebra A (FractionRing B))) {P : Ideal B} [P.IsPrime] (hnd : ¬ P ∣ differentIdeal A B) : Algebra.IsUnramifiedAt A P := by - letI : Algebra (FractionRing A) (FractionRing B) := + let : Algebra (FractionRing A) (FractionRing B) := FractionRing.liftAlgebra A (FractionRing B) - haveI : IsScalarTower A (FractionRing A) (FractionRing B) := + have : IsScalarTower A (FractionRing A) (FractionRing B) := FractionRing.isScalarTower_liftAlgebra A (FractionRing B) - haveI := hsep + have := hsep exact not_dvd_differentIdeal_iff.mp hnd -/-! ### Piece 3 — `IsUnramifiedAt P ⇒ e_{P|A} = 1` - -Corollary of mathlib's `Ideal.ramificationIdx_eq_one_of_isUnramifiedAt`. -Packages the ramification-index side of unramifiedness; the inertia-degree -side (`f_P = 1`) requires the residue field to be trivial over the base, -which is **automatic over algebraically closed `F`** but must be supplied -externally over arbitrary base fields. -/ - -/-- **T-II-2-009 Piece 3 (ramification half)**: a prime `P` of `B` that is -unramified over `A` has ramification index `1` (at its image in `A`). -Direct corollary of mathlib's `Ideal.ramificationIdx_eq_one_of_isUnramifiedAt`. -/ theorem _root_.IsDedekindDomain.ramificationIdx_eq_one_of_isUnramifiedAt_of_ne_bot {A : Type*} [CommRing A] [IsDomain A] {B : Type*} [CommRing B] [IsDomain B] [IsNoetherianRing B] [Algebra A B] [Algebra.EssFiniteType A B] {P : Ideal B} [P.IsPrime] [Algebra.IsUnramifiedAt A P] (hP : P ≠ ⊥) : Ideal.ramificationIdx' (P.under A) P = 1 := by - haveI : P.LiesOver (P.under A) := ⟨rfl⟩ - letI := Localization.AtPrime.algebraOfLiesOver (P.under A) P + have : P.LiesOver (P.under A) := ⟨rfl⟩ + let := Localization.AtPrime.algebraOfLiesOver (P.under A) P have hmap : (P.under A).map (algebraMap A (Localization.AtPrime P)) = IsLocalRing.maximalIdeal _ := ((Algebra.isUnramifiedAt_iff_map_eq A (P.under A) P).mp ‹_›).2 exact Ideal.ramificationIdx'_eq_one_of_map_localization Ideal.map_comap_le hP (Ideal.primeCompl_le_nonZeroDivisors P) hmap -/-! ### Piece 4 — existence of an unramified prime - -Given Piece 1 (bad locus finite) and the assumption that `B` has -infinitely many height-one primes (a genuine curve-theory input, since a -Dedekind domain of infinite F-dimension has infinite spectrum), there -exists a prime `P` of `B` outside the ramified locus. Piece 2 then turns -"not in bad locus" into `IsUnramifiedAt A P`. -/ - -/-- **T-II-2-009 Piece 4**: combining Piece 1 (bad locus finite) + Piece 2 -(not-in-bad-locus ⇒ IsUnramifiedAt), plus the hypothesis that `B` has -infinitely many height-one primes, we extract a specific prime -`P : HeightOneSpectrum B` that is unramified over `A`. -/ theorem _root_.IsDedekindDomain.exists_unramified_prime {A : Type*} [CommRing A] [IsDedekindDomain A] {B : Type*} [CommRing B] [IsDedekindDomain B] @@ -229,30 +153,9 @@ theorem _root_.IsDedekindDomain.exists_unramified_prime exact hfin_bad.subset this obtain ⟨P, hP⟩ := hgood_nonempty refine ⟨P, ?_⟩ - haveI : P.asIdeal.IsPrime := P.isPrime + have : P.asIdeal.IsPrime := P.isPrime exact IsDedekindDomain.isUnramifiedAt_of_not_dvd_differentIdeal hsep hP -/-! ### Piece 5 — composed theorem at the abstract Dedekind level - -Combining Pieces 1–4 yields: for a finite separable extension of Dedekind -domains `A → B` with `B` having infinitely many height-one primes, there -exists a specific prime `P` of `B` for which the ramification index is -exactly `1`. - -Specialised to `CurveMap + CoordHom` + `[IsAlgClosed F]` (where residue -field degrees are automatically `1`), this gives `(primesOverFinset).card -= φ.degree` — the full Silverman II.2.6(b) content. -/ - -/-- **T-II-2-009 Piece 5 (composed at A → B level)**: assembles Pieces -1–4 into a single witness. For `A → B` Dedekind + finite separable + -`B` infinite in primes, there exists a `P ∈ HeightOneSpectrum B`, -nonzero, with `ramificationIdx' (P.under A → P) = 1`. - -The inertia degree `f_P = 1` is NOT concluded here — it depends on the -residue-field extension being trivial, which is automatic over -algebraically closed base (or for F-rational smooth points), and -supplied as a separate hypothesis when needed (see -`primesOverFinset_card_eq_degree_of_unramified`). -/ theorem _root_.IsDedekindDomain.exists_unramifiedPrime_ramificationIdx_eq_one {A : Type*} [CommRing A] [IsDedekindDomain A] {B : Type*} [CommRing B] [IsDedekindDomain B] @@ -265,31 +168,17 @@ theorem _root_.IsDedekindDomain.exists_unramifiedPrime_ramificationIdx_eq_one ∃ P : IsDedekindDomain.HeightOneSpectrum B, Ideal.ramificationIdx' (P.asIdeal.under A) P.asIdeal = 1 := by obtain ⟨P, hunram⟩ := IsDedekindDomain.exists_unramified_prime hsep hinf - haveI : P.asIdeal.IsPrime := P.isPrime - haveI := hunram + have : P.asIdeal.IsPrime := P.isPrime + have := hunram refine ⟨P, ?_⟩ exact IsDedekindDomain.ramificationIdx_eq_one_of_isUnramifiedAt_of_ne_bot P.ne_bot end CurveMap -/-! ### Piece 6 — HeightOneSpectrum infinite over alg-closed base - -Over an algebraically closed base `F` with `[IsElliptic]`, the coordinate -ring `C.CoordinateRing` has infinitely many height-one primes. The proof -goes via the `smoothPointEquivHeightOneSpectrum` bijection -(in `HasseWeil/Curves/SmoothPointPrime.lean`), reducing to showing -`C.SmoothPoint` is infinite. This follows because for each `x ∈ F`, the -Weierstrass equation in `y` is a quadratic over an algebraically closed -field and hence has a root — giving an injection `F → C.SmoothPoint`. -/ - namespace SmoothPlaneCurve variable {F : Type*} [Field F] -/-- **T-II-2-009 Piece 6 (smooth points)**: for every `x ∈ F` over an -algebraically closed field, there exists `y : F` with `(x, y)` a -nonsingular point on the elliptic curve (any point on an elliptic curve -is automatically nonsingular since `Δ ≠ 0`). -/ theorem exists_smoothPoint_of_x [IsAlgClosed F] (C : SmoothPlaneCurve F) [C.toAffine.IsElliptic] (x : F) : ∃ P : C.SmoothPoint, P.x = x := by @@ -320,9 +209,6 @@ theorem exists_smoothPoint_of_x (W := C.toAffine)).mp heq exact ⟨⟨x, y, hns⟩, rfl⟩ -/-- **T-II-2-009 Piece 6**: `C.SmoothPoint` is infinite over an -algebraically closed base. Via the injection `x ↦ (smooth point with -that x-coordinate)`. -/ theorem smoothPoint_infinite [IsAlgClosed F] (C : SmoothPlaneCurve F) [C.toAffine.IsElliptic] : Infinite C.SmoothPoint := by @@ -338,17 +224,13 @@ theorem smoothPoint_infinite rw [h₁, h₂] at this exact this -/-- **T-II-2-009 Piece 6 (main)**: the height-one spectrum of -`C.CoordinateRing` is infinite over an algebraically closed elliptic -curve, via the bijection `SmoothPoint ≃ HeightOneSpectrum` from -`HasseWeil/Curves/SmoothPointPrime.lean`. -/ theorem heightOneSpectrum_infinite [IsAlgClosed F] (C : SmoothPlaneCurve F) [C.toAffine.IsElliptic] [IsIntegrallyClosed C.CoordinateRing] : Set.Infinite ({_P : IsDedekindDomain.HeightOneSpectrum C.CoordinateRing | True}) := by - haveI : Infinite C.SmoothPoint := C.smoothPoint_infinite - haveI : Infinite (IsDedekindDomain.HeightOneSpectrum C.CoordinateRing) := + have : Infinite C.SmoothPoint := C.smoothPoint_infinite + have : Infinite (IsDedekindDomain.HeightOneSpectrum C.CoordinateRing) := Infinite.of_injective C.smoothPointEquivHeightOneSpectrum C.smoothPointEquivHeightOneSpectrum.injective exact Set.infinite_univ @@ -358,52 +240,11 @@ end SmoothPlaneCurve namespace CurveMap variable {F : Type*} [Field F] {C₁ C₂ : SmoothPlaneCurve F} -/-! ### Piece 7 — residue fields at smooth points are `F` - -The residue-field-degree-one content (f_P = 1) of T-II-2-009 Piece 7. -Rather than prove `inertiaDeg' = 1` directly — which hits a diamond -between `Module.Free` from `Ideal.Quotient` vs `DivisionRing` paths — -we package the residue-field F-rank: `finrank F (C.CoordinateRing / -maximalIdealAt P) = 1`. Any consumer wanting `inertiaDeg' = 1` over an -F-rational SmoothPoint combines this (for source + target) with the -tower `finrank_mul_finrank`; the direct -`inertiaDeg_maximalIdealAt` covers the specific `F[X] → F[C]` case. -/ - -/-- **T-II-2-009 Piece 7 (residue field)**: the residue field of -`C.CoordinateRing` at a smooth point `P` equals `F` (as `F`-module of -rank 1). Direct re-export of `finrank_quotientMaximalIdealAt` -for use in the Piece 8 chain. -/ theorem finrank_quotientMaximalIdealAt_eq_one (C : SmoothPlaneCurve F) (P : C.SmoothPoint) : Module.finrank F (C.CoordinateRing ⧸ C.maximalIdealAt P) = 1 := C.finrank_quotientMaximalIdealAt P -/-! ### Piece 8 — final assembly: T-II-2-009 for CurveMap - -Combines Pieces 1–7: given a CurveMap with CoordHom, separable, -and ([IsAlgClosed F] providing infinite spectrum + residue-degree=1), -there's a maximal ideal of `C₂.CoordinateRing` whose fiber (primes above -it in `C₁.CoordinateRing`) has cardinality equal to `φ.separableDegree`. - -The `f_P = 1` side of the inertia -computation is supplied as a **witness hypothesis** (`h_inertia_one`) -rather than proven in-line, due to the `Module.Free` diamond between -`Ideal.Quotient.semiring` and `DivisionRing.toDivisionSemiring.toSemiring` -paths. Under `[IsAlgClosed F]`, the hypothesis is always satisfied -(both residue fields are `F`); the caller supplies it via -`SmoothPlaneCurve.finrank_quotientMaximalIdealAt_eq_one` (Piece 7) for -each prime in their specific setting. -/ - -/-- **T-II-2-009 Piece 8 (full assembly, witness form)**: given the -witness hypotheses for unramified existence + trivial residue degrees, -produce a prime of `C₂.CoordinateRing` whose fiber in `C₁.CoordinateRing` -has cardinality `φ.separableDegree`. - -The existence of an unramified Q (via Pieces 1–6 for alg-closed base) is -bundled as `h_unramified_Q`. The trivial residue degree is bundled as -`h_inertia_one` (follows from Piece 7 over [IsAlgClosed F] via the -`maximalIdealAt` ↔ `HeightOneSpectrum` bijection from -`smoothPointEquivHeightOneSpectrum`). -/ theorem exists_heightOneSpectrum_fiber_card_eq_sepDegree [IsIntegrallyClosed C₂.CoordinateRing] [IsIntegrallyClosed C₁.CoordinateRing] @@ -414,94 +255,15 @@ theorem exists_heightOneSpectrum_fiber_card_eq_sepDegree letI : Algebra C₂.CoordinateRing C₁.CoordinateRing := coordHom.toAlgebra ∀ P ∈ IsDedekindDomain.primesOverFinset Q.asIdeal C₁.CoordinateRing, Ideal.ramificationIdx' Q.asIdeal P * - Ideal.inertiaDeg' Q.asIdeal P = 1) : + P.inertiaDeg C₂.CoordinateRing = 1) : letI : Algebra C₂.CoordinateRing C₁.CoordinateRing := coordHom.toAlgebra (IsDedekindDomain.primesOverFinset Q.asIdeal C₁.CoordinateRing).card = φ.separableDegree := by - haveI : Q.asIdeal.IsPrime := Q.isPrime - haveI hQmax : Q.asIdeal.IsMaximal := + have : Q.asIdeal.IsPrime := Q.isPrime + have hQmax : Q.asIdeal.IsMaximal := Q.isPrime.isMaximal Q.ne_bot exact φ.primesOverFinset_card_eq_sepDegree_of_separable_and_unramified coordHom hsep hQmax Q.ne_bot h_ef_one_Q -/-! ### Piece 9 — `inertiaDeg' = 1` at smooth points: diamond-blocked - -**Status**: blocked by the `Module.Free (C₂.CR/Q) (C₁.CR/P)` typeclass -diamond. The attempted workaround — using `F` as outer ring in -`Module.finrank_mul_finrank F _ _` — does **not** bypass the problem, -because `finrank_mul_finrank` still requires `Module.Free` on the -intermediate extension. Specifically: - -- `Module.Free.of_divisionRing` produces `Module.Free` via - `DivisionRing.toDivisionSemiring.toSemiring`. -- The expected instance on `(C₂.CR/Q)`-module `(C₁.CR/P)` goes through - `Ideal.Quotient.semiring` and `Algebra.toModule`. -- These two `Semiring` parent-paths do not unify — the same `Module.Free` - diamond between the two `Semiring` structures. - -The narrower witness form (`exists_heightOneSpectrum_fiber_card_eq_sepDegree`, -Piece 8 above) takes the `e_P · f_P = 1` hypothesis as input and is the -shippable deliverable. Closing `inertiaDeg' = 1` without the diamond -requires either: - -1. A mathlib-level change to make `Ideal.Quotient.semiring` and - `Field`-derived `Semiring` agree definitionally, OR -2. A residue-field algebra isomorphism `C.CR/(maximalIdealAt P) ≃ₐ[F] F` - (under `[IsAlgClosed F]`), expressed without passing through - `Module.Free` synthesis on the intermediate quotient, OR -3. A direct computation of `Ideal.inertiaDeg'` from the algebra-map - surjectivity at smooth points on an algebraically closed base. - -The second route is the most promising — a dedicated file -`HasseWeil/Curves/ResidueFieldAtSmoothPoint.lean` building an explicit -`AlgEquiv` at each smooth point and then transporting `inertiaDeg'` -through it would sidestep `finrank_mul_finrank` entirely. Estimated -~100 LOC. Deferred. -/ - -/-! ### Progress note — the remaining piece (existence of unramified p) - -The full T-II-2-009 statement **`∃ Q, #φ⁻¹(Q) = sepDeg(φ)`** reduces (via -the theorems above) to exhibiting a maximal `p ⊂ C₂.CoordinateRing` with -the ramification + inertia witnesses. Over an algebraically-closed base -field `F`, such a `p` always exists because: - -1. **Primitive element**: the separable closure `L ⊂ C₁.FunctionField` - of `φ*(C₂.FunctionField)` is generated by a primitive element `α` - with minimal polynomial `m(T) ∈ (φ*C₂.FunctionField)[T]` of degree - `sepDeg(φ)`. - -2. **Discriminant**: `m` is separable (primitive-element condition), so - `discriminant(m)` is a nonzero element of `φ*C₂.FunctionField`. - Viewed in `C₂.FunctionField`, it has finitely many zeros (as an element - of a function field with a degree structure). - -3. **Dense open**: at any `p ⊂ C₂.CoordinateRing` outside the zero locus - of `discriminant(m)`, the specialisation `m̄ ∈ (C₂.CoordinateRing/p)[T]` - has `sepDeg(φ)` distinct roots in `C₁.CoordinateRing/P` for each `P` - above `p`. This gives the ramification + inertia witnesses. - -The formalisation gap: -- Mathlib has `Field.exists_primitive_element` (step 1) and - `Polynomial.discriminant_ne_zero_of_separable` (step 2). -- Step 3 requires the algebraic-geometric bridge between "discriminant - nonzero at `p`" and "unramified at `p` with trivial residue - extensions". For Dedekind extensions this is - `Algebra.IsUnramifiedAt ↔ ¬ p ∣ differentIdeal`, and over alg-closed - base the residue fields all equal `F`, making `inertiaDeg' = 1` - automatic. - -This last step is ~200 lines of algebraic-geometric infrastructure -following Silverman + Neukirch (*Algebraic Number Theory*, III.2). The -algebraic core (steps 1–2) is immediate in mathlib; step 3 is the -substantive remaining content. Tracked under T-II-2-009's progress log. - -The **alternative path** `#ker β_pc = sepDeg β_pc` (for the specific -β_pc = 1 − π) can be closed *without* the full T-II-2-009 once -`AdditionPullback.lean` replaces the `isogOneSub` placeholder — that -gives the real function-field pullback, from which `deg β_pc = -[K(E) : φ*K(E)] = q + 1 − t` follows via explicit computation, and -`#ker β_pc = pointCount = q + 1 − t` then furnishes `#ker β_pc = deg -β_pc` directly. -/ - end CurveMap end HasseWeil.Curves diff --git a/projects/HasseWeil/HasseWeil/Foundation/Curves/Frobenius/FrobeniusFixedPoint.lean b/projects/HasseWeil/HasseWeil/Foundation/Curves/Frobenius/FrobeniusFixedPoint.lean index 758285749..d4ec75e01 100644 --- a/projects/HasseWeil/HasseWeil/Foundation/Curves/Frobenius/FrobeniusFixedPoint.lean +++ b/projects/HasseWeil/HasseWeil/Foundation/Curves/Frobenius/FrobeniusFixedPoint.lean @@ -9,60 +9,12 @@ import Mathlib.FieldTheory.Finite.Basic import Mathlib.FieldTheory.IsAlgClosed.AlgebraicClosure /-! -# Geometric Frobenius on points over the algebraic closure (Route B, Step 2) +For a finite field `K` of cardinality `q`, the map `(x, y) ↦ (x ^ q, y ^ q)` +on the algebraic-closure points of a Weierstrass curve fixes exactly the +`K`-rational points. Consequently the kernel of the identity minus Frobenius +has cardinality equal to the number of `K`-rational points. -For a finite field `K` with `q = Fintype.card K` and a Weierstrass curve `W` over `K`, -base-changed to `L = AlgebraicClosure K`, this file builds the **geometric Frobenius** -endomorphism on the `L`-points, - -``` -geomFrobeniusPoint : (W.baseChange L).toAffine.Point →+ (W.baseChange L).toAffine.Point -``` - -acting as `(x, y) ↦ (x ^ q, y ^ q)` (and `0 ↦ 0`), via mathlib's `FiniteField.frobeniusAlgHom` -(`x ↦ x ^ q`, a `K`-algebra hom on `L`) transported to points by the project's -`HasseWeil.Affine.Point.map`. The codomain identification - -``` -(W.baseChange L).map (frobeniusAlgHom K L) = W.baseChange L -``` - -(`WeierstrassCurve.map_baseChange`, because the `q`-power map is a `K`-algebra hom and so -fixes the `algebraMap K L` image) makes this an *endomorphism* of the same point type. - -It also packages the base-change inclusion of `K`-points - -``` -includePointBC : W.toAffine.Point →+ (W.baseChange L).toAffine.Point -``` - -via `HasseWeil.Affine.Point.map (algebraMap K L)`. - -## Main result (Step 2 = S2) - -* `HasseWeil.geomFrobeniusPoint_fixed_iff_mem_range_includePointBC`: - `geomFrobeniusPoint P = P ↔ P ∈ Set.range includePointBC`, - the *point-level* fixed-locus theorem. Proof by cases on `P`: - - `P = 0` is fixed and `0 = includePointBC 0`; - - `P = (x, y)` is fixed iff `x ^ q = x ∧ y ^ q = y`, iff (by Step 1 - `frobenius_fixed_iff_mem_baseField`) both coordinates lie in `range (algebraMap K L)`, - iff `P = includePointBC (x₀, y₀)`. - -## Further results (S3/S4 and the `1 − π` kernel) - -* `fixedLocus_geomFrobenius_eq_range_includePointBC` (S3): the `Set`-form of S2 — the - geometric-Frobenius fixed locus equals `Set.range (includePointBC W)`. -* `ncard_fixedLocus_geomFrobenius_eq_pointCount` (S4): that fixed locus has cardinality - `Fintype.card W.toAffine.Point` (`= pointCount W`), using injectivity of `includePointBC`. -* `ncard_ker_oneSubGeomFrobHom_eq_pointCount`: the same count for the kernel of the - `AddMonoidHom` `id − geomFrobeniusPoint`. - -## References - -* Silverman, *The Arithmetic of Elliptic Curves*, V.1.1. -* Step 1: `HasseWeil.frobenius_fixed_iff_mem_baseField` (`Curves/FrobeniusFixedLocus.lean`). -* mathlib: `FiniteField.frobeniusAlgHom`, `WeierstrassCurve.map_baseChange`, - `WeierstrassCurve.Affine.Point.map`. +Reference: Silverman, *The Arithmetic of Elliptic Curves*, V.1.1. -/ open WeierstrassCurve @@ -76,8 +28,6 @@ local notation "L" => AlgebraicClosure K noncomputable local instance : DecidableEq (AlgebraicClosure K) := Classical.decEq _ -/-! ### The geometric Frobenius `K`-algebra hom and the codomain identification -/ - /-- The geometric Frobenius `K`-algebra hom `x ↦ x ^ q` on `L = AlgebraicClosure K`, as a ring hom. This is `FiniteField.frobeniusAlgHom K L`, coerced to a `RingHom`. -/ noncomputable def geomFrobRingHom : AlgebraicClosure K →+* AlgebraicClosure K := @@ -106,13 +56,11 @@ fixes `algebraMap K L`). -/ rw [AlgHom.toRingHom_eq_coe] exact W.map_baseChange (FiniteField.frobeniusAlgHom K (AlgebraicClosure K)) -/-! ### Geometric Frobenius on points and the base-change inclusion -/ - /-- The geometric Frobenius on `L`-points as a raw map: mathlib's `WeierstrassCurve.Affine.Point.map` of the geometric Frobenius `K`-algebra hom `frobeniusAlgHom K L : L →ₐ[K] L`. Its codomain `W⟮L⟯ = Point (W.baseChange L)` is **definitionally** `(W.baseChange L).toAffine.Point`, so no cast is needed. -This mirrors `frobeniusW_KE` in `Hasse/IsogOneSubXyFamily.lean`. -/ +-/ noncomputable def geomFrobeniusPointFun : (W.baseChange (AlgebraicClosure K)).toAffine.Point → (W.baseChange (AlgebraicClosure K)).toAffine.Point := @@ -184,17 +132,9 @@ theorem includePointBC_injective : Function.Injective (includePointBC W) := by subst hx' hy' rfl -/-! ### S2 — the point-level fixed-locus theorem - -We work directly with the raw functions to keep the rewriting along -`map_geomFrob_baseChange_eq_self` explicit. The `0` case is reflexivity; the affine case -reduces, via `HasseWeil.Affine.Point.map_some` and `some.injEq`, to the conjunction -`x ^ q = x ∧ y ^ q = y`, which Step 1 (`frobenius_fixed_iff_mem_baseField`) turns into -membership of both coordinates in `range (algebraMap K L)`. -/ - omit [DecidableEq K] in set_option backward.isDefEq.respectTransparency false in -/-- **S2 (point fixed-locus)**: a point `P` over the algebraic closure is fixed by the +/-- a point `P` over the algebraic closure is fixed by the geometric Frobenius iff it is the base-change inclusion of a `K`-rational point. `geomFrobeniusPointFun P = P ↔ P ∈ Set.range (includePointBC W)`. @@ -202,7 +142,7 @@ geometric Frobenius iff it is the base-change inclusion of a `K`-rational point. Proof by cases on `P`: * `P = 0`: fixed, and `0 = includePointBC 0`. * `P = some x y h`: `Frob P = P ↔ x ^ q = x ∧ y ^ q = y` (coordinatewise, by - `Affine.Point.map_some` + `some.injEq`), and by Step 1 each coordinate is fixed iff it + `Affine.Point.map_some` + `some.injEq`), and each coordinate is fixed iff it lies in `range (algebraMap K L)`; assembling the two `K`-rational coordinates back into a nonsingular `K`-point gives `P ∈ range includePointBC`. @@ -217,7 +157,7 @@ theorem geomFrobeniusPoint_fixed_iff_mem_range_includePointBC · -- `P = 0`: fixed (`map_zero` is `rfl`), and `0 = includePointBC 0`. exact iff_of_true rfl ⟨0, includePointBC_zero W⟩ · -- `P = some x y h`. LHS reduces to `x ^ q = x ∧ y ^ q = y` (coordinatewise), - -- each equivalent by Step 1 to membership in `range (algebraMap K L)`. + -- each equivalent to membership in `range (algebraMap K L)`. rw [geomFrobeniusPointFun_some, Affine.Point.some.injEq] show (FiniteField.frobeniusAlgHom K (AlgebraicClosure K)) x = x ∧ (FiniteField.frobeniusAlgHom K (AlgebraicClosure K)) y = y ↔ _ @@ -242,37 +182,18 @@ theorem geomFrobeniusPoint_fixed_iff_mem_range_includePointBC rw [Affine.Point.some.injEq] at hQ exact ⟨⟨x₀, hQ.1⟩, ⟨y₀, hQ.2⟩⟩ -/-! ### S3 — kernel of `1 − π` over `L` = image of `E(K)` - -The forward inclusion `range includePointBC ⊆ -{P | geomFrobeniusPointFun P = P}` is the "rational ⇒ fixed" direction (a rational `P` -has `(1 − π)P = P − πP = P − P = 0`); the reverse is the substantive S2 content. As an -*equality of sets* this is literally S2 (`geomFrobeniusPoint_fixed_iff_mem_range_includePointBC`) -repackaged, so we state it that way and reduce to S2. -/ - omit [DecidableEq K] in -/-- **S3 (set form)**: the fixed locus of the geometric Frobenius equals the image of the -`K`-rational points. This is S2 in `Set` form. -/ +/-- the fixed locus of the geometric Frobenius equals the image of the +`K`-rational points. -/ theorem fixedLocus_geomFrobenius_eq_range_includePointBC : {P : (W.baseChange (AlgebraicClosure K)).toAffine.Point | geomFrobeniusPointFun W P = P} = Set.range (includePointBC W) := by ext P exact geomFrobeniusPoint_fixed_iff_mem_range_includePointBC W P -/-! ### S4 — cardinality glue - -The final glue: `# ker(id − geomFrobeniusPoint) = pointCount W`. S2/S3 identify the -fixed locus with `range includePointBC`, and `includePointBC` is injective (it is -`Affine.Point.map` of an injective ring hom, see `WeierstrassCurve.Affine.Point.map_injective`), -so the fixed locus is in bijection with `W.toAffine.Point`, whose cardinality is `pointCount W`. -Combined with the algebraic-closed fibre count -(`CurveMap.exists_heightOneSpectrum_fiber_card_eq_sepDegree_unconditional`) this yields -`deg(1 − π) = pointCount`. -/ - omit [DecidableEq K] in -/-- **S4 (cardinality)**: the number of geometric-Frobenius-fixed `L`-points equals -the `K`-rational point count `Fintype.card W.toAffine.Point` (= `pointCount`). Reduces to S3 -(`fixedLocus … = range includePointBC`) plus injectivity of `includePointBC`. -/ +/-- the number of geometric-Frobenius-fixed `L`-points equals +the `K`-rational point count `Fintype.card W.toAffine.Point` (= `pointCount`). -/ theorem ncard_fixedLocus_geomFrobenius_eq_pointCount [Fintype W.toAffine.Point] : {P : (W.baseChange (AlgebraicClosure K)).toAffine.Point | geomFrobeniusPointFun W P = P}.ncard = Fintype.card W.toAffine.Point := by @@ -280,15 +201,6 @@ theorem ncard_fixedLocus_geomFrobenius_eq_pointCount [Fintype W.toAffine.Point] Set.ncard_range_of_injective (includePointBC_injective W), Nat.card_eq_fintype_card] -/-! ### PRIORITY 1 — kernel of `id − geomFrobenius` over `L` - -The geometric Frobenius on `L`-points is already mathlib's -`WeierstrassCurve.Affine.Point.map (frobeniusAlgHom K L)`, an `AddMonoidHom` -`(W.baseChange L)⟮L⟯ →+ (W.baseChange L)⟮L⟯` whose `.toFun` is definitionally -`geomFrobeniusPointFun W` (mirroring `frobeniusW_KE` in -`Hasse/IsogOneSubXyFamily.lean`). We bundle it, form `1 − π` as an -`AddMonoidHom`, and identify its kernel with the fixed locus. -/ - /-- **Geometric Frobenius on `L`-points as an `AddMonoidHom`**: mathlib's `Affine.Point.map (frobeniusAlgHom K L)`. Its `.toFun` is definitionally `geomFrobeniusPointFun W`. -/ @@ -317,19 +229,19 @@ omit [DecidableEq K] in oneSubGeomFrobHom W P = P - geomFrobeniusPointFun W P := rfl omit [DecidableEq K] in -/-- **PRIORITY 1 (kernel = fixed locus)**: `P ∈ ker(id − geomFrob) ⟺ +/-- `P ∈ ker(id − geomFrob) ⟺ geomFrob P = P`. Direct from `sub_eq_zero`. -/ theorem ker_oneSubGeomFrobHom_eq_fixedLocus : ((oneSubGeomFrobHom W).ker : Set (W.baseChange (AlgebraicClosure K)).toAffine.Point) = {P | geomFrobeniusPointFun W P = P} := by ext P - rw [SetLike.mem_coe, AddMonoidHom.mem_ker, Set.mem_setOf_eq, oneSubGeomFrobHom_apply, + rw [SetLike.mem_coe, AddMonoidHom.mem_ker, Set.mem_ofPred_eq, oneSubGeomFrobHom_apply, sub_eq_zero, eq_comm] omit [DecidableEq K] in -/-- **PRIORITY 1 (cardinality)**: the geometric-Frobenius fixed locus, i.e. +/-- the geometric-Frobenius fixed locus, i.e. `ker(id − geomFrob)`, has cardinality `pointCount W`. Composes -`ker_oneSubGeomFrobHom_eq_fixedLocus` with S4 +`ker_oneSubGeomFrobHom_eq_fixedLocus` with (`ncard_fixedLocus_geomFrobenius_eq_pointCount`). -/ theorem ncard_ker_oneSubGeomFrobHom_eq_pointCount [Fintype W.toAffine.Point] : ((oneSubGeomFrobHom W).ker : diff --git a/projects/HasseWeil/HasseWeil/Foundation/Curves/IntegralClosure.lean b/projects/HasseWeil/HasseWeil/Foundation/Curves/IntegralClosure.lean index b3c5b8f64e3264fafd4ab131a093d258bbd32966..e257fed368990ece1c76792d0f26d887b83c989d 100644 GIT binary patch delta 353 zcmYjMy-EW?5QaljTx|5TH6vK4gcKrzQN(~xU}9kv*1O5w;O%VO-HWCY?JTTTC8f0p z5w7wfYF8~CqW>#7;BLNURz{Cib3_j7D!*ELspUs zOcTct(*O;)+fEQcL~=^@g$1dM1;yBaQ;twi#H>3 zt#Xz-sH}VYetuP1T$s5zn l`4E)ESU?jPzVBaPd$SHSLviD5wL0_XU)k?k-Ws*%{sE*_f>{6n diff --git a/projects/HasseWeil/HasseWeil/Foundation/Curves/Map/CoordHomFinite.lean b/projects/HasseWeil/HasseWeil/Foundation/Curves/Map/CoordHomFinite.lean index 5456f6e64..33637b28c 100644 --- a/projects/HasseWeil/HasseWeil/Foundation/Curves/Map/CoordHomFinite.lean +++ b/projects/HasseWeil/HasseWeil/Foundation/Curves/Map/CoordHomFinite.lean @@ -6,70 +6,20 @@ Authors: Chris Birkbeck import HasseWeil.Foundation.Curves.Map.CurveMap /-! -# Module-finiteness along a coordinate-ring witness (the standing `hfin`, DERIVED) - -For a curve map `φ : C₁ → C₂` with a coordinate-ring pullback witness -`cd : φ.CoordHom`, the coordinate ring `F[C₁]` is a **finite module** over -`F[C₂]` via `cd.toAlgebra` — *unconditionally*. This derives the standing -`Module.Finite` hypothesis (`hfin`) carried throughout the isogeny theory by -`CurveMap.sum_ramificationIdx_mul_inertiaDeg_eq_degree`, -`EC.Isogeny.addHomProperty` / `toBasicIsogeny` (K̄-level), -`EC.Isogeny.addHomProperty_descend` / `toBasicIsogenyDescend` -(K-level), `Isogeny.pushforward` (`Curves/PushforwardDivisor.lean`), -`EC/KernelCount.lean`, and friends. - -## The proof (no separability, no places classification) - -Write `u := ψ(x₂) ∈ F[C₁]` for the image of the coordinate generator of `C₂` -under an injective `F`-algebra map `ψ : F[C₂] →ₐ[F] F[C₁]`, and decompose -`u = p•1 + q•Y` in the `{1, Y}` basis of `F[C₁]` over `F[x₁] = F[X]`. Then -`u` satisfies the quadratic relation of its conjugate pair over `F[X]`: - -`u² − t(x₁)·u + n(x₁) = 0`, where `t := 2p − q·(a₁X + a₃)` and -`n := p² − pq·(a₁X + a₃) − q²·(X³ + a₂X² + a₄X + a₆)` - -(`n` is mathlib's `Algebra.norm F[X] u`; the difference of the two sides is -`q²·W(X, Y)`, which vanishes mod the Weierstrass polynomial). Reading the -relation backwards as a polynomial in `x₁` with coefficients in the image of -`ψ` gives `n(T) − u·t(T) + u² = 0` at `T = x₁`. - -**The parity trick**: `deg(p²) = 2 deg p` is even while -`deg(q²·(X³ + ⋯)) = 2 deg q + 3` is odd, so the two leading terms never -cancel: `deg n = max(2 deg p, 2 deg q + 3)` with leading coefficient a -**unit of `F`** (`WeierstrassCurve.Affine.CoordinateRing.degree_norm_smul_basis`), -and `deg t < deg n`. Hence the displayed `T`-polynomial is monic after -scaling by that unit's inverse, with coefficients in the image of `F[C₂]`: -the generator `x₁` is **integral** over `F[C₂]`. (`u ∉ F·1` because `ψ` is -injective, ruling out the degenerate `q = 0 ∧ p constant` case.) Since -`F[C₁]` is spanned by `F[x₁]·{1, Y}`, module-finiteness follows from -`IsIntegral.fg_adjoin_singleton`. - -This argument works in **any characteristic and for inseparable maps** (for -the Frobenius comorphism `u = x₁^p` it produces the monic witness -`(T^p − u)²`-style relation), so no separability hypothesis, no AKLB -machinery, and no Nagata-style finiteness of integral closures is needed. -The classical "places of `K(C₁)` over affine places of `C₂` are point -places" wall is bypassed entirely by the explicit Weierstrass presentation. - -## Main results - -* `algHom_coordinateRing_isIntegralElem_X` — the keystone: the coordinate - generator `x₁` is integral over `F[C₂]` along any injective `F`-algebra - hom `F[C₂] →ₐ[F] F[C₁]`. -* `algHom_coordinateRing_module_finite` — `F[C₁]` is a finite module over - `F[C₂]` along any injective `F`-algebra hom. -* `CurveMap.CoordHom.toAlgHom_injective` — a `CoordHom` is automatically - injective (from `compat` plus injectivity of the function-field pullback). -* `CurveMap.CoordHom.module_finite` — **the deliverable**: the standing - `hfin` hypothesis holds for every `(φ, cd)`, with no further assumptions. -* `CurveMap.sum_ramificationIdx_mul_inertiaDeg_eq_degree'` — Silverman - II.2.6(a) `Σ e·f = deg φ` with `hfin` discharged. - -## References - -* [Silverman, *The Arithmetic of Elliptic Curves*], II.2.6, II.3 (finiteness - of morphisms of smooth curves) — obtained here by direct - Weierstrass-presentation algebra instead of valuation theory. +An injective homomorphism between Weierstrass coordinate rings makes the target +a finite module over the source. Writing the image of the source coordinate as +`u = p + qY`, its trace and norm give a quadratic relation in `u` with +polynomial coefficients in the target coordinate. The terms of the norm have +opposite degree parity, so its leading coefficient is a unit and the trace +has smaller degree. Reading this relation as a polynomial in the target +coordinate gives a monic integral relation after scaling. + +A compatible function-field pullback makes the coordinate-ring homomorphism +injective. Thus the finite-module hypothesis in the weighted ramification +sum follows for every coordinate-ring pullback witness, without separability +or characteristic assumptions. + +Reference: Silverman, *The Arithmetic of Elliptic Curves*, II.2.6 and II.3. -/ namespace HasseWeil.Curves @@ -413,9 +363,9 @@ theorem algHom_coordinateRing_module_finite (ψ : C₂.CoordinateRing →ₐ[F] C₁.CoordinateRing) (hψ : Function.Injective ψ) : @Module.Finite C₂.CoordinateRing C₁.CoordinateRing _ _ ψ.toRingHom.toAlgebra.toModule := by - letI : Algebra C₂.CoordinateRing C₁.CoordinateRing := ψ.toRingHom.toAlgebra - letI : Module C₂.CoordinateRing C₁.CoordinateRing := Algebra.toModule - haveI : IsScalarTower F C₂.CoordinateRing C₁.CoordinateRing := + let : Algebra C₂.CoordinateRing C₁.CoordinateRing := ψ.toRingHom.toAlgebra + let : Module C₂.CoordinateRing C₁.CoordinateRing := Algebra.toModule + have : IsScalarTower F C₂.CoordinateRing C₁.CoordinateRing := IsScalarTower.of_algebraMap_eq fun c ↦ (ψ.commutes c).symm have hx : IsIntegral C₂.CoordinateRing (algebraMap (Polynomial F) C₁.CoordinateRing Polynomial.X) := @@ -487,12 +437,7 @@ namespace CurveMap -- Instance synthesis and unification at curve-indexed coordinate-ring types -- (`AdjoinRoot`-quotients) need a higher budget; same settings as -- `CurveMap.sum_ramificationIdx_mul_inertiaDeg_eq_degree`. -/-- **Silverman II.2.6(a), Σ e·f form, `hfin`-free** (T-II-2-008): for a -`CurveMap φ : C₁ → C₂` with coordinate-ring pullback witness `coordHom`, the -sum `Σ_{P over p} e_P · f_P` equals the function-field degree `φ.degree`. -The module-finiteness input of -`sum_ramificationIdx_mul_inertiaDeg_eq_degree` is supplied by -`CoordHom.module_finite`. -/ + theorem sum_ramificationIdx_mul_inertiaDeg_eq_degree' {C₁ C₂ : SmoothPlaneCurve F} [IsIntegrallyClosed C₂.CoordinateRing] @@ -502,7 +447,7 @@ theorem sum_ramificationIdx_mul_inertiaDeg_eq_degree' letI : Algebra C₂.CoordinateRing C₁.CoordinateRing := coordHom.toAlgebra ∑ P ∈ IsDedekindDomain.primesOverFinset p C₁.CoordinateRing, Ideal.ramificationIdx' p P * - Ideal.inertiaDeg' p P = φ.degree := + P.inertiaDeg C₂.CoordinateRing = φ.degree := φ.sum_ramificationIdx_mul_inertiaDeg_eq_degree coordHom coordHom.module_finite hpMax hp0 diff --git a/projects/HasseWeil/HasseWeil/Foundation/Curves/Map/CurveMap.lean b/projects/HasseWeil/HasseWeil/Foundation/Curves/Map/CurveMap.lean index aae9d4fe3..67470605c 100644 --- a/projects/HasseWeil/HasseWeil/Foundation/Curves/Map/CurveMap.lean +++ b/projects/HasseWeil/HasseWeil/Foundation/Curves/Map/CurveMap.lean @@ -1,6 +1,6 @@ import HasseWeil.Foundation.Curves.Valuation.Valuation import HasseWeil.Foundation.Curves.IntegralClosure -import Mathlib.NumberTheory.RamificationInertia.Basic +import Mathlib.RingTheory.RamificationInertia.Basic /-! # Curve maps via function-field pullback @@ -14,10 +14,6 @@ injective). The **degree** of `φ` is the dimension of `K(C₁)` as a `K(C₂)`-module via the pullback: `deg φ = [K(C₁) : φ*K(C₂)]`. -This closes tickets T-II-INFRA-B-006/007 of the Stream-A infrastructure plan -and provides the foundational object for T-II-2-002..011 (which will add -surjectivity, ramification, and the fiber-card formula). - ## References * [Silverman, *The Arithmetic of Elliptic Curves*], II.2.4 (curves-fields @@ -79,8 +75,6 @@ theorem comp_assoc {C₄ : SmoothPlaneCurve F} @[simp] theorem comp_id (φ : CurveMap C₁ C₂) : φ.comp (id C₁) = φ := CurveMap.ext (AlgHom.id_comp _) -/-! ### Degree -/ - /-- The algebra structure on `K(C₁)` induced by the pullback of `φ`. -/ @[reducible] noncomputable def toAlgebra (φ : CurveMap C₁ C₂) : @@ -110,12 +104,12 @@ theorem comp_algebraMap_eq (ψ : CurveMap C₂ C₃) (φ : CurveMap C₁ C₂) theorem degree_comp (ψ : CurveMap C₂ C₃) (φ : CurveMap C₁ C₂) : (ψ.comp φ).degree = φ.degree * ψ.degree := by simp only [degree] - letI : Algebra C₂.FunctionField C₁.FunctionField := φ.toAlgebra - letI : Algebra C₃.FunctionField C₂.FunctionField := ψ.toAlgebra - letI : Algebra C₃.FunctionField C₁.FunctionField := (ψ.comp φ).toAlgebra - haveI : IsScalarTower C₃.FunctionField C₂.FunctionField C₁.FunctionField := + let : Algebra C₂.FunctionField C₁.FunctionField := φ.toAlgebra + let : Algebra C₃.FunctionField C₂.FunctionField := ψ.toAlgebra + let : Algebra C₃.FunctionField C₁.FunctionField := (ψ.comp φ).toAlgebra + have : IsScalarTower C₃.FunctionField C₂.FunctionField C₁.FunctionField := IsScalarTower.of_algebraMap_eq fun _ ↦ rfl - haveI : Module.Free C₂.FunctionField C₁.FunctionField := + have : Module.Free C₂.FunctionField C₁.FunctionField := Module.Free.of_divisionRing _ _ rw [mul_comm] exact (Module.finrank_mul_finrank @@ -138,27 +132,11 @@ def IsSeparable (φ : CurveMap C₁ C₂) : Prop := φ.inseparableDegree = 1 /-- A curve map is **purely inseparable** if its separable degree is 1. -/ def IsPurelyInseparable (φ : CurveMap C₁ C₂) : Prop := φ.separableDegree = 1 --- **Silverman II.2.4.1** (pullback half, deferred): if `φ : C₁ → C₂` has --- degree 1, its pullback is surjective. --- Proof sketch: `finrank_eq_one_iff'` gives `v ≠ 0` with `K(C₁) = K(C₂) • v`. --- From `c₀ • v = 1` in a field, `v = (algebraMap c₀)⁻¹`, so every `x ∈ K(C₁)` --- is `c_x • v = algebraMap c_x / algebraMap c₀ = algebraMap (c_x / c₀)`. --- The Lean proof needs `algebraMap C₂.FunctionField C₁.FunctionField` to --- resolve to `φ.pullback.toRingHom` via `haveI : Algebra ... := φ.toAlgebra`, --- but instance synthesis tends to pick unrelated `Algebra` instances. --- Deferred for future cleanup. - -/-! ### Ramification order -/ - /-- The order of the pullback of a function `t ∈ K(C₂)` at a smooth point `P ∈ C₁`: `ord_P (φ* t)`. When `t` is a uniformizer at the image point `φ(P) ∈ C₂`, this equals Silverman's ramification index `e_φ(P)` of II.2.5. -Our formulation takes the test function `t` as an explicit argument rather -than deriving it from an intrinsic "image point" `φ(P)`, since the -point-image correspondence (Silverman II.2.4(c)) is deferred to later -infrastructure. Downstream users supply a uniformizer at the intended -image point. +The test function `t` is an explicit uniformizer at the intended image point. Reference: Silverman II.2.5 (definition). -/ noncomputable def ramificationIndex (φ : CurveMap C₁ C₂) (P : C₁.SmoothPoint) (t : C₂.FunctionField) : WithTop ℤ := @@ -239,8 +217,6 @@ theorem one_le_ramificationIndex_of_pullback_pointValuation_lt_one (1 : WithTop ℤ) ≤ φ.ramificationIndex P t := (C₁.one_le_ord_P_iff_pointValuation_lt_one (φ.pullback_ne_zero ht)).mpr h -/-! ### Pushforward / Norm map (T-II-2-005) -/ - /-- The **pushforward** (norm map) `φ_* : K(C₁) →* K(C₂)` for a curve map `φ : C₁ → C₂`, defined as the `K(C₂)`-algebra norm on `K(C₁)` via `φ.toAlgebra`. Silverman's `φ_* = (φ*)⁻¹ ∘ N_{K(C₁)/φ*K(C₂)}` simplifies to the direct @@ -255,7 +231,7 @@ noncomputable def pushforward (φ : CurveMap C₁ C₂) : Reference: Silverman II.2 (after definition of `φ_*`). -/ theorem pushforward_pullback (φ : CurveMap C₁ C₂) (g : C₂.FunctionField) : φ.pushforward (φ.pullback g) = g ^ φ.degree := by - letI : Algebra C₂.FunctionField C₁.FunctionField := φ.toAlgebra + let : Algebra C₂.FunctionField C₁.FunctionField := φ.toAlgebra exact Algebra.norm_algebraMap g /-- The pushforward is multiplicative. -/ @@ -268,18 +244,6 @@ theorem pushforward_pullback (φ : CurveMap C₁ C₂) (g : C₂.FunctionField) φ.pushforward (1 : C₁.FunctionField) = 1 := φ.pushforward.map_one -/-! ### Fiber cardinality (T-II-2-011): Silverman II.2.7 - -The classical Silverman II.2.7 asserts that a nonconstant curve map `φ` is -unramified iff every geometric fiber has cardinality `deg(φ)`. Since our -`CurveMap` models the function-field side only (no explicit `fiber` type), -we record the combinatorial content as a **witness-parametric** statement: -given a `Finset` of points, their ramification indices, and the sum formula -II.2.6(a) (`Σ e_φ(P) = deg(φ)` witness), the fiber-count equals `deg(φ)` iff -every index is `1`. Once II.2.6(a) is formalized, this immediately gives -T-II-2-011 for every image point `Q`. --/ - /-- **Combinatorial lemma**: if `e : α → ℤ` is ≥ 1 on every element of a finset `S`, then `∑ P ∈ S, e P = #S` iff each `e P = 1`. @@ -298,7 +262,7 @@ theorem _root_.Finset.sum_eq_card_iff_forall_eq_one_of_one_le linarith · exact (Finset.sum_congr rfl h).trans hconst -/-- **Witness-parametric Silverman II.2.7** (T-II-2-011): given a finite +/-- **Witness-parametric Silverman II.2.7**: given a finite fiber `S` with ramification indices ≥ 1 summing to `deg(φ)`, the fiber count equals `deg(φ)` iff every ramification index equals `1`. @@ -321,15 +285,13 @@ theorem fiber_card_eq_degree_iff_all_ramificationIndexℤ_one rw [← hsum, eq_comm] exact Finset.sum_eq_card_iff_forall_eq_one_of_one_le hle -/-! ### Degree-one morphisms are isomorphisms on function fields (T-II-2-006) -/ - /-- **Silverman II.2.4.1 (pullback-surjectivity form)**: if a curve map `φ` has degree 1, its pullback `φ*` is surjective. Combined with the automatic injectivity of pullbacks, `φ*` is then a bijection of function fields. -/ theorem pullback_surjective_of_degree_one (φ : CurveMap C₁ C₂) (h : φ.degree = 1) : Function.Surjective φ.pullback := by - letI : Algebra C₂.FunctionField C₁.FunctionField := φ.toAlgebra - haveI : Module.Free C₂.FunctionField C₁.FunctionField := + let : Algebra C₂.FunctionField C₁.FunctionField := φ.toAlgebra + have : Module.Free C₂.FunctionField C₁.FunctionField := Module.Free.of_divisionRing _ _ have hfr : Module.finrank C₂.FunctionField C₁.FunctionField = 1 := h obtain ⟨v, _hv_ne, hv⟩ := finrank_eq_one_iff'.mp hfr @@ -345,17 +307,6 @@ theorem pullback_surjective_of_degree_one (φ : CurveMap C₁ C₂) rw [map_div₀, div_eq_mul_inv, ← hv_eq, ← Algebra.smul_def] exact hcv -/-! ### Silverman II.2.6(a): `Σ e_φ(P) · f_φ(P) = deg(φ)` (T-II-2-008 via -coordinate-ring algebra witness) - -`CurveMap` stores only the function-field pullback; a generic Dedekind-style -sum-of-ramification-indices formula requires the pullback to restrict to a -ring hom `C₂.CoordinateRing → C₁.CoordinateRing`. We expose this as an -**auxiliary data bundle** (`CurveMap.CoordHom`) together with a compatibility -condition. For the specific coordinate function `x : C → A¹` -(`algebraMap F[X] → F[C]`), see `HasseWeil/Curves/NormValuation.lean`'s -`sum_ramificationIdx_over_fiber` for the unconditional instance. -/ - /-- **Coordinate-ring pullback witness**: for a `CurveMap φ : C₁ → C₂`, a ring hom `C₂.CoordinateRing → C₁.CoordinateRing` compatible with the function-field pullback. Not every function-field pullback restricts to @@ -378,7 +329,7 @@ noncomputable def CoordHom.toAlgebra {φ : CurveMap C₁ C₂} (coordHom : φ.Co Algebra C₂.CoordinateRing C₁.CoordinateRing := coordHom.toAlgHom.toRingHom.toAlgebra -/-- **Silverman II.2.6(a), Σ e·f form** (T-II-2-008, generic `CurveMap`): +/-- **Silverman II.2.6(a), Σ e·f form**: for a `CurveMap φ : C₁ → C₂` with coordinate-ring pullback witness `coordHom` and finite-module structure, the sum `Σ_{P over p} e_P · f_P` equals the function-field degree `φ.degree`. @@ -402,16 +353,16 @@ theorem sum_ramificationIdx_mul_inertiaDeg_eq_degree letI : Algebra C₂.CoordinateRing C₁.CoordinateRing := coordHom.toAlgebra ∑ P ∈ IsDedekindDomain.primesOverFinset p C₁.CoordinateRing, Ideal.ramificationIdx' p P * - Ideal.inertiaDeg' p P = φ.degree := by - letI algCR : Algebra C₂.CoordinateRing C₁.CoordinateRing := + P.inertiaDeg C₂.CoordinateRing = φ.degree := by + let algCR : Algebra C₂.CoordinateRing C₁.CoordinateRing := coordHom.toAlgebra - letI : Algebra C₂.FunctionField C₁.FunctionField := φ.toAlgebra - haveI : IsScalarTower C₂.CoordinateRing C₁.CoordinateRing + let : Algebra C₂.FunctionField C₁.FunctionField := φ.toAlgebra + have : IsScalarTower C₂.CoordinateRing C₁.CoordinateRing C₁.FunctionField := by refine IsScalarTower.of_algebraMap_eq fun x ↦ ?_ rw [RingHom.algebraMap_toAlgebra] rfl - haveI : IsScalarTower C₂.CoordinateRing C₂.FunctionField + have : IsScalarTower C₂.CoordinateRing C₂.FunctionField C₁.FunctionField := by refine IsScalarTower.of_algebraMap_smul fun r x ↦ ?_ rw [Algebra.smul_def] @@ -420,12 +371,44 @@ theorem sum_ramificationIdx_mul_inertiaDeg_eq_degree rw [coordHom.compat r, ← IsScalarTower.algebraMap_smul C₁.CoordinateRing r x, ← Algebra.smul_def] rfl - haveI : p.IsMaximal := hpMax - letI modCR : Module C₂.CoordinateRing C₁.CoordinateRing := algCR.toModule - haveI : @Module.Finite C₂.CoordinateRing C₁.CoordinateRing _ _ + have : p.IsMaximal := hpMax + let modCR : Module C₂.CoordinateRing C₁.CoordinateRing := algCR.toModule + have : @Module.Finite C₂.CoordinateRing C₁.CoordinateRing _ _ modCR := hfin - exact Ideal.sum_ramification_inertia (R := C₂.CoordinateRing) - (S := C₁.CoordinateRing) C₂.FunctionField C₁.FunctionField hp0 + have : Module.IsTorsionFree C₂.CoordinateRing C₁.CoordinateRing := by + apply Module.isTorsionFree_iff_algebraMap_injective.mpr + intro a b hab + apply IsFractionRing.injective C₂.CoordinateRing C₂.FunctionField + apply φ.pullback.injective + change φ.pullback (algebraMap C₂.CoordinateRing C₂.FunctionField a) = + φ.pullback (algebraMap C₂.CoordinateRing C₂.FunctionField b) + rw [coordHom.compat a, coordHom.compat b] + exact congrArg (algebraMap C₁.CoordinateRing C₁.FunctionField) hab + classical + let : Fintype (p.primesOver C₁.CoordinateRing) := Fintype.ofFinite _ + calc + _ = ∑ P : p.primesOver C₁.CoordinateRing, + P.1.ramificationIdx C₂.CoordinateRing * P.1.inertiaDeg C₂.CoordinateRing := by + apply Finset.sum_bij (fun P hP ↦ + ⟨P, (IsDedekindDomain.mem_primesOverFinset_iff hp0 C₁.CoordinateRing).mp hP⟩) + · intro P hP + exact Finset.mem_univ _ + · intro P hP Q hQ h + exact congrArg Subtype.val h + · intro P _ + exact ⟨P.1, + (IsDedekindDomain.mem_primesOverFinset_iff hp0 C₁.CoordinateRing).mpr P.2, rfl⟩ + · intro P hP + obtain ⟨hprime, hover⟩ := + (IsDedekindDomain.mem_primesOverFinset_iff hp0 C₁.CoordinateRing).mp hP + let := hprime + let := hover + rw [Ideal.ramificationIdx'_eq_ramificationIdx p P hp0] + _ = Module.finrank C₂.CoordinateRing C₁.CoordinateRing := + Ideal.sum_ramification_inertia_eq_finrank p C₁.CoordinateRing + _ = φ.degree := + (IsFractionRing.finrank_eq C₂.CoordinateRing C₂.FunctionField + C₁.CoordinateRing C₁.FunctionField).symm end CurveMap diff --git a/projects/HasseWeil/HasseWeil/Foundation/Curves/Map/CurveMapBaseChange.lean b/projects/HasseWeil/HasseWeil/Foundation/Curves/Map/CurveMapBaseChange.lean index e1c402904..2537c2d15 100644 --- a/projects/HasseWeil/HasseWeil/Foundation/Curves/Map/CurveMapBaseChange.lean +++ b/projects/HasseWeil/HasseWeil/Foundation/Curves/Map/CurveMapBaseChange.lean @@ -16,33 +16,14 @@ import Mathlib.RingTheory.TensorProduct.Free /-! # Base change of curves and curve maps -For a smooth plane curve `C / F` and an `F`-algebra extension `L`, this file builds the -natural scalar-extension maps and identifies the scalar extension of the coordinate ring -and function field with the base-changed curve. These are foundations for the -Galois-descent route to the unconditional `AddHomProperty` (Phase G of the Pic⁰ roadmap). +Scalar extension identifies the coordinate ring of a smooth plane curve with the +coordinate ring of its base change. The corresponding function-field tensor product +is a localization of the coordinate-ring tensor product. For algebraic field extensions, +this gives the natural isomorphism between scalar extension and the fraction field +of the extended coordinate ring. -## Main definitions - -* `SmoothPlaneCurve.coordRingMap` — the include of coordinate rings. -* `SmoothPlaneCurve.functionFieldMap` — the include of function fields. -* `SmoothPlaneCurve.coordRingScalarExt` — the scalar-extension iso - `L ⊗[F] C.CoordinateRing ≃ₐ[L] (C.baseChange L).CoordinateRing`. -* `CurveMap.CoordHom.baseChangeAlgHom` — the base-changed coordinate-ring alg hom of a `CoordHom`. - -## Main results - -* `SmoothPlaneCurve.isDomain_tensorCoordRing` — `L ⊗[F] C.CoordinateRing` is a domain. -* `SmoothPlaneCurve.tensor_functionField_isFractionRing` — `L ⊗[F] C.FunctionField` is the - fraction ring of `L ⊗[F] C.CoordinateRing`. -* `SmoothPlaneCurve.functionField_tensor_locBaseChange` — localization commutes with the base - change `L/F`: `L ⊗[F] C.FunctionField ≃ₐ[L] FractionRing (L ⊗[F] C.CoordinateRing)`. - -## Implementation notes - -The `Algebra F` / `Algebra F[X]` instances on `AdjoinRoot W.polynomial` form a typeclass -diamond that blocks synthesis of the tensor-product algebra/module structures. Section -`PhaseGInstances` pins the F-route instances at high priority so signatures mentioning -`L ⊗[F] C.CoordinateRing` (and its function-field analogue) elaborate diamond-free. +The algebra and module structures are chosen compatibly with the scalar tower through +the polynomial ring. ## References @@ -179,7 +160,6 @@ theorem baseChange_inner_comp_mapRingHom_eq {φ : CurveMap C₁ C₂} C₁.coordRingMap L (cd.toAlgHom (algebraMap (Polynomial F) C₂.CoordinateRing (Polynomial.C a))) rw [Polynomial.map_C] - change (cd.baseChangeInnerAlgHom L) (Polynomial.C (algebraMap F L a)) = _ simp only [baseChangeInnerAlgHom] rw [Polynomial.aeval_C, show (algebraMap (Polynomial F) C₂.CoordinateRing) (Polynomial.C a) = algebraMap F C₂.CoordinateRing a from @@ -262,8 +242,8 @@ noncomputable instance (priority := 100000) coordRingModuleBase : /-- `CommRing` on the scalar-extension tensor `L ⊗[F] C.CR`, pinned at high priority. The default synthesis loses to the `Algebra F` / `Algebra F[X]` diamond on `AdjoinRoot W.polynomial` (it tries the `F[X]`-route algebra on -`C.CR`); pinning the F-route `CommRing` here unblocks any signature that -mentions `L ⊗[F] C.CR` (e.g. `FractionRing (L ⊗[F] C.CR)`). -/ +`C.CR`). This instance uses the algebra over `F` in the tensor product +and its fraction field. -/ noncomputable instance (priority := 100000) tensorCoordRingCommRing (L : Type*) [Field L] [Algebra F L] : CommRing (L ⊗[F] C.toAffine.CoordinateRing) := @@ -310,8 +290,8 @@ noncomputable instance (priority := 100000) tensorFunctionFieldFLScalarTower pinned at high priority. The same `Algebra F` / `Algebra F[X]` diamond on `AdjoinRoot W.polynomial` that taints `L ⊗[F] C.CR` recurs at the function-field level (since `C.FF = FractionRing C.CR` carries the `C.CR`-algebra, which routes -back through the diamond). Pinning the F-route `CommRing` unblocks any signature -mentioning `L ⊗[F] C.FF`. -/ +back through the diamond). This instance uses the algebra over `F` +in the function-field tensor product. -/ noncomputable instance (priority := 100000) tensorFunctionFieldCommRing (L : Type*) [Field L] [Algebra F L] : CommRing (L ⊗[F] C.toAffine.FunctionField) := @@ -693,8 +673,7 @@ theorem tensorFunctionFieldStructureHom_injective (L : Type*) [Field L] [Algebra Module.Flat.lTensor_preserves_injective_linearMap gF hg have hfun : ⇑(C.tensorFunctionFieldStructureHom L) = ⇑(LinearMap.lTensor L gF) := by funext x - induction x using TensorProduct.induction_on with - | zero => simp + induction x using TensorProduct.inductionOn with | tmul l u => rw [LinearMap.lTensor_tmul] change Algebra.TensorProduct.map (AlgHom.id L L) @@ -707,12 +686,12 @@ theorem tensorFunctionFieldStructureHom_injective (L : Type*) [Field L] [Algebra exact hlin /-- `C.CoordinateRing ⊗[F] L` is a domain, for any field extension `L/F`. Obtained from the -sibling `isDomain_tensorCoordRing` (which gives the `L`-on-the-left orientation +`isDomain_tensorCoordRing` (which gives the `L`-on-the-left orientation `L ⊗[F] C.CoordinateRing`) by transporting the domain structure across the commutativity ring-iso `Algebra.TensorProduct.comm`. -/ private theorem tensorCoordRing_comm_isDomain (L : Type*) [Field L] [Algebra F L] : IsDomain (C.toAffine.CoordinateRing ⊗[F] L) := by - letI := C.isDomain_tensorCoordRing L + let := C.isDomain_tensorCoordRing L exact (Algebra.TensorProduct.comm F L C.toAffine.CoordinateRing).symm.toRingEquiv.toMulEquiv.isDomain (L ⊗[F] C.toAffine.CoordinateRing) @@ -727,9 +706,9 @@ private theorem tensorCoordRing_algebraMapSubmonoid_le_nonZeroDivisors Algebra.algebraMapSubmonoid (C.toAffine.CoordinateRing ⊗[F] L) (nonZeroDivisors C.toAffine.CoordinateRing) ≤ nonZeroDivisors (C.toAffine.CoordinateRing ⊗[F] L) := by - haveI hflatCR : Module.Flat F C.toAffine.CoordinateRing := Module.Flat.of_free - letI := C.tensorCoordRing_comm_isDomain L - haveI hnzdCR : NoZeroDivisors (C.toAffine.CoordinateRing ⊗[F] L) := + have hflatCR : Module.Flat F C.toAffine.CoordinateRing := Module.Flat.of_free + let := C.tensorCoordRing_comm_isDomain L + have hnzdCR : NoZeroDivisors (C.toAffine.CoordinateRing ⊗[F] L) := isCancelMulZero_iff_noZeroDivisors.mp ‹IsDomain _›.toIsCancelMulZero have hinjL : Function.Injective (Algebra.TensorProduct.includeLeft : @@ -758,11 +737,11 @@ private theorem tensorFunctionField_isLocalization (L : Type*) [Field L] [Algebr (Algebra.algebraMapSubmonoid (C.toAffine.CoordinateRing ⊗[F] L) (nonZeroDivisors C.toAffine.CoordinateRing)) (C.toAffine.FunctionField ⊗[F] L) := by - letI algBC : Algebra (C.toAffine.CoordinateRing ⊗[F] L) (C.toAffine.FunctionField ⊗[F] L) := + let algBC : Algebra (C.toAffine.CoordinateRing ⊗[F] L) (C.toAffine.FunctionField ⊗[F] L) := (Algebra.TensorProduct.map (IsScalarTower.toAlgHom F C.toAffine.CoordinateRing C.toAffine.FunctionField) (AlgHom.id F L)).toRingHom.toAlgebra - haveI tower : IsScalarTower C.toAffine.CoordinateRing (C.toAffine.CoordinateRing ⊗[F] L) + have tower : IsScalarTower C.toAffine.CoordinateRing (C.toAffine.CoordinateRing ⊗[F] L) (C.toAffine.FunctionField ⊗[F] L) := IsScalarTower.of_algebraMap_eq fun _ ↦ rfl exact @IsLocalization.tensorProduct_tensorProduct F L _ _ _ C.toAffine.CoordinateRing _ _ @@ -786,14 +765,14 @@ the function field on the **left** (`FunctionField ⊗[F] L`) to match that cons private theorem tensorFunctionField_isDomain (L : Type*) [Field L] [Algebra F L] : IsDomain (C.toAffine.FunctionField ⊗[F] L) := by -- `C.CoordinateRing ⊗[F] L` is a domain (the base ring of the localization below). - letI := C.tensorCoordRing_comm_isDomain L + let := C.tensorCoordRing_comm_isDomain L -- The natural `lTensor`-of-localization algebra structure exhibiting the function field -- tensor as a localization of the coordinate-ring tensor. - letI _algBC : Algebra (C.toAffine.CoordinateRing ⊗[F] L) (C.toAffine.FunctionField ⊗[F] L) := + let _algBC : Algebra (C.toAffine.CoordinateRing ⊗[F] L) (C.toAffine.FunctionField ⊗[F] L) := (Algebra.TensorProduct.map (IsScalarTower.toAlgHom F C.toAffine.CoordinateRing C.toAffine.FunctionField) (AlgHom.id F L)).toRingHom.toAlgebra - haveI := C.tensorFunctionField_isLocalization L + have := C.tensorFunctionField_isLocalization L -- A localization of a domain at a submonoid of nonzerodivisors is again a domain. exact IsLocalization.isDomain_of_le_nonZeroDivisors (C.toAffine.FunctionField ⊗[F] L) (C.tensorCoordRing_algebraMapSubmonoid_le_nonZeroDivisors L) @@ -805,7 +784,7 @@ when consumed by `tensor_functionField_isFractionRing`. -/ theorem tensor_functionField_isField (L : Type*) [Field L] [Algebra F L] [Algebra.IsAlgebraic F L] : IsField (L ⊗[F] C.toAffine.FunctionField) := by - haveI := C.tensorFunctionField_isDomain L + have := C.tensorFunctionField_isDomain L have hF : IsField (C.toAffine.FunctionField ⊗[F] L) := Algebra.TensorProduct.isField_of_isAlgebraic F C.toAffine.FunctionField L (Or.inr (inferInstance : Algebra.IsAlgebraic F L)) @@ -842,7 +821,7 @@ private theorem oneTmul_mem_nonZeroDivisors (L : Type*) [Field L] [Algebra F L] (hb : b ∈ nonZeroDivisors C.toAffine.CoordinateRing) : (1 ⊗ₜ b : L ⊗[F] C.toAffine.CoordinateRing) ∈ nonZeroDivisors (L ⊗[F] C.toAffine.CoordinateRing) := by - letI := C.isDomain_tensorCoordRing L + let := C.isDomain_tensorCoordRing L rw [mem_nonZeroDivisors_iff_ne_zero] have hb0 : b ≠ 0 := mem_nonZeroDivisors_iff_ne_zero.mp hb intro hc @@ -861,17 +840,15 @@ theorem tensor_functionField_surj (L : Type*) [Field L] [Algebra F L] : (L ⊗[F] C.toAffine.FunctionField) x.2 = algebraMap (L ⊗[F] C.toAffine.CoordinateRing) (L ⊗[F] C.toAffine.FunctionField) x.1 := by - letI alg := C.tensorFunctionFieldAlgebra L - letI := C.isDomain_tensorCoordRing L - haveI hflatL : Module.Flat F L := Module.Flat.of_free + let alg := C.tensorFunctionFieldAlgebra L + let := C.isDomain_tensorCoordRing L + have hflatL : Module.Flat F L := Module.Flat.of_free have halg : ∀ (l : L) (u : C.toAffine.CoordinateRing), algebraMap (L ⊗[F] C.toAffine.CoordinateRing) (L ⊗[F] C.toAffine.FunctionField) (l ⊗ₜ u) = l ⊗ₜ algebraMap C.toAffine.CoordinateRing C.toAffine.FunctionField u := fun l u ↦ rfl refine fun z ↦ ?_ - induction z using TensorProduct.induction_on with - | zero => - exact ⟨(0, 1), by rw [zero_mul, map_zero]⟩ + induction z using TensorProduct.inductionOn with | tmul l f => obtain ⟨a, b, hbmem, hab⟩ := IsFractionRing.div_surjective (A := C.toAffine.CoordinateRing) f refine ⟨(l ⊗ₜ a, ⟨1 ⊗ₜ b, C.oneTmul_mem_nonZeroDivisors L b hbmem⟩), ?_⟩ @@ -895,8 +872,8 @@ theorem tensor_functionField_isFractionRing (L : Type*) [Field L] [Algebra F L] [Algebra.IsAlgebraic F L] : @IsFractionRing (L ⊗[F] C.toAffine.CoordinateRing) _ (L ⊗[F] C.toAffine.FunctionField) _ (C.tensorFunctionFieldAlgebra L) := by - letI alg := C.tensorFunctionFieldAlgebra L - letI := C.isDomain_tensorCoordRing L + let alg := C.tensorFunctionFieldAlgebra L + let := C.isDomain_tensorCoordRing L have hinj : Function.Injective (algebraMap (L ⊗[F] C.toAffine.CoordinateRing) (L ⊗[F] C.toAffine.FunctionField)) := C.tensorFunctionFieldStructureHom_injective L diff --git a/projects/HasseWeil/HasseWeil/Foundation/Curves/Ramification/InseparableDegree.lean b/projects/HasseWeil/HasseWeil/Foundation/Curves/Ramification/InseparableDegree.lean index ebd777c8c..9132c544f 100644 --- a/projects/HasseWeil/HasseWeil/Foundation/Curves/Ramification/InseparableDegree.lean +++ b/projects/HasseWeil/HasseWeil/Foundation/Curves/Ramification/InseparableDegree.lean @@ -8,29 +8,13 @@ import Mathlib.FieldTheory.PurelyInseparable.Basic import Mathlib.FieldTheory.SeparableClosure /-! -# Inseparable degree API for isogenies (Silverman II.2.10-12) +For an elliptic-curve isogeny, the separable degree times the inseparable degree +equals the function-field degree. In positive characteristic the inseparable +degree is a power of the characteristic. The separable closure of the pullback +field gives the maximal intermediate field over which the extension is purely +inseparable. -This file builds the inseparable-degree / separable-closure API for -elliptic-curve isogenies, building on mathlib's -`Mathlib.FieldTheory.SeparableClosure` (`Field.sepDegree`, -`Field.finInsepDegree`, `separableClosure`) and -`Mathlib.FieldTheory.PurelyInseparable.Basic` (`IsPurelyInseparable`, -`isPurelyInseparable_iff_pow_mem`, `IsPurelyInseparable.pow_mem`). - -## Main results - -* `Isogeny.inseparableDegree_dvd_degree` — the inseparable degree - divides the degree (consequence of `finSepDegree · finInsepDegree = - finrank`, mathlib `PurelyInseparable/Basic.lean:595`). -* `Isogeny.inseparableDegree_eq_one_iff_separable` — direct from the - project's definition `IsSeparable := inseparableDegree = 1`. -* `Isogeny.inseparableDegree_isPow_of_charP` — in characteristic `p`, - the inseparable degree is a power of `p`. Uses - `isPurelyInseparable_iff_pow_mem` (mathlib). - -## References - -* [Silverman, *The Arithmetic of Elliptic Curves*], II.2.10-12. +Reference: Silverman, *The Arithmetic of Elliptic Curves*, II.2.10–12. -/ open WeierstrassCurve @@ -70,7 +54,7 @@ theorem separableDegree_mul_finInsepDegree (α : Isogeny W W) : α.separableDegree * Field.finInsepDegree W.FunctionField W.FunctionField = α.degree := by - letI : Algebra W.FunctionField W.FunctionField := α.toAlgebra + let : Algebra W.FunctionField W.FunctionField := α.toAlgebra rw [separableDegree_eq_finSepDegree, degree_eq_finrank] exact Field.finSepDegree_mul_finInsepDegree W.FunctionField W.FunctionField @@ -83,7 +67,7 @@ theorem inseparableDegree_eq_finInsepDegree (α : Isogeny W W) letI : Algebra W.FunctionField W.FunctionField := α.toAlgebra α.inseparableDegree = Field.finInsepDegree W.FunctionField W.FunctionField := by - letI : Algebra W.FunctionField W.FunctionField := α.toAlgebra + let : Algebra W.FunctionField W.FunctionField := α.toAlgebra -- inseparableDegree = degree / separableDegree -- = (separableDegree * finInsepDegree) / separableDegree -- = finInsepDegree (since separableDegree > 0) @@ -102,7 +86,7 @@ theorem inseparableDegree_dvd_degree (α : Isogeny W W) : α.inseparableDegree ∣ α.degree := by -- inseparableDegree = degree / separableDegree; degree = separableDegree * finInsepDegree. -- So separableDegree | degree, hence (degree / separableDegree) | degree. - letI : Algebra W.FunctionField W.FunctionField := α.toAlgebra + let : Algebra W.FunctionField W.FunctionField := α.toAlgebra have h_mul := separableDegree_mul_finInsepDegree α show α.degree / α.separableDegree ∣ α.degree rw [show α.degree = α.separableDegree * @@ -130,15 +114,15 @@ theorem inseparableDegree_isPow_of_charP (α : Isogeny W.toAffine W.toAffine) (h_deg_pos : 0 < α.degree) : ∃ e : ℕ, α.inseparableDegree = p ^ e := by - letI alg : Algebra W.toAffine.FunctionField W.toAffine.FunctionField := α.toAlgebra + let alg : Algebra W.toAffine.FunctionField W.toAffine.FunctionField := α.toAlgebra -- CharP transports along the algebraMap (it's a ringHom into a field of char p) - haveI : CharP W.toAffine.FunctionField p := + have : CharP W.toAffine.FunctionField p := charP_of_injective_algebraMap (algebraMap K W.toAffine.FunctionField).injective p -- ExpChar from CharP + Prime - haveI : ExpChar W.toAffine.FunctionField p := ExpChar.prime Fact.out + have : ExpChar W.toAffine.FunctionField p := ExpChar.prime Fact.out -- From h_deg_pos: FiniteDimensional via the matching finrank - haveI hfin : @FiniteDimensional W.toAffine.FunctionField + have hfin : @FiniteDimensional W.toAffine.FunctionField W.toAffine.FunctionField _ _ alg.toModule := @FiniteDimensional.of_finrank_pos _ _ _ _ alg.toModule h_deg_pos -- Pull down the mathlib lemma with explicit instances @@ -155,7 +139,7 @@ theorem inseparableDegree_isPow_of_charP rw [inseparableDegree_eq_finInsepDegree α h_sep_pos] exact he -/-! ### P0-B — `Isogeny.separableSubfield` +/-! The separable subfield The maximal intermediate field over which `K(E)` is purely inseparable. Direct specialisation of `Mathlib.FieldTheory.separableClosure` to diff --git a/projects/HasseWeil/HasseWeil/Foundation/Curves/Ramification/PoleOrderParity.lean b/projects/HasseWeil/HasseWeil/Foundation/Curves/Ramification/PoleOrderParity.lean index 07d5e7569..e5fe1c773 100644 --- a/projects/HasseWeil/HasseWeil/Foundation/Curves/Ramification/PoleOrderParity.lean +++ b/projects/HasseWeil/HasseWeil/Foundation/Curves/Ramification/PoleOrderParity.lean @@ -183,7 +183,7 @@ theorem point_minus_O_principal_eq_zero_of_coord have := congr_arg ProjectiveSmoothPoint.toAffinePoint h rwa [P.toProjectiveSmoothPoint_toAffinePoint, ProjectiveSmoothPoint.toAffinePoint_infinity] at this - rw [if_neg h_ne, if_pos rfl] + rw [ite_eq_right h_ne, ite_eq_left rfl] decide -- Use projectiveDivisorOf_apply_infinity to convert: -1 = (ordAtInfty f).untopD 0 rw [SmoothPlaneCurve.projectiveDivisorOf_apply_infinity] at h_inf diff --git a/projects/HasseWeil/HasseWeil/Foundation/Curves/Ramification/RamificationAtInfinity.lean b/projects/HasseWeil/HasseWeil/Foundation/Curves/Ramification/RamificationAtInfinity.lean index c09705086..7142cc012 100644 --- a/projects/HasseWeil/HasseWeil/Foundation/Curves/Ramification/RamificationAtInfinity.lean +++ b/projects/HasseWeil/HasseWeil/Foundation/Curves/Ramification/RamificationAtInfinity.lean @@ -3,82 +3,21 @@ Copyright (c) 2026 Chris Birkbeck. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Birkbeck -/ -import Mathlib.NumberTheory.RamificationInertia.Basic +import Mathlib.RingTheory.RamificationInertia.Basic +import Mathlib.LinearAlgebra.Dimension.Localization +import Mathlib.NumberTheory.RamificationInertia.Ramification import Mathlib.RingTheory.DedekindDomain.IntegralClosure /-! -# Abstract ramification at infinity (Worker A Action 1) - -For a smooth plane curve `C` over a field `k` and a nonconstant function -`f ∈ K(C)`, this file establishes the **function-field-degree-equals-pole- -divisor-degree identity**: - -``` -[K(C) : k(f)] = Σ_{P pole of f} (- ord_P f) · [κ(P) : k]. -``` - -This is *not* Riemann–Roch. It is the degree formula for the finite morphism -`f : C → ℙ¹`, scoped to the fibre at `∞`. The proof goes via Mathlib's -`Ideal.sum_ramification_inertia` applied at the `(u)`-prime of `k[u]`, where -`u = 1/f` is the uniformizer at infinity on `ℙ¹`: - - * `e_P = ord_P(u) = -ord_P(f)` (ramification index), - * `f_P = [κ(P) : κ((u))] = [κ(P) : k]` (inertia degree). - -## Strategy - -The proof packages Mathlib's abstract ramification–inertia machinery: pick -the integral closure `S` of `k[u]` in `K(C)` (via the algebra structure -`u ↦ 1/f`), observe `S` is Dedekind, then `Ideal.sum_ramification_inertia` -at the `(u)` prime gives the sum directly. The curve-specific notation -(`poleSupport`, `ordAt`, `kappa`) is bookkeeping over the resulting finset. - -This is the deliverable for "Worker A — Action 1 abstract ramification-at- -infinity setup". Worker B's closing application combines this with their -Action 2 (translation valuation transport) plus Action 3 (a small closed- -point lemma) to discharge the project's `pc_sepDeg_eq_pointCount` witness. - -## Main definitions - -* `polyToFieldOfInv f`, `ratFunToFieldOfInv hf` — the `k`-algebra maps - `Polynomial k →ₐ[k] L` and `FractionRing (Polynomial k) →ₐ[k] L` sending the - indeterminate to `f⁻¹` (the uniformizer `u = 1/f`). -* `LinfAt f` — `L` as a type synonym carrying the `X ↦ f⁻¹` polynomial-algebra - structure, so it does not clash with the project's pre-existing `X ↦ coordX` - instance. -* `Sinf f` — structural package of "an integral closure of `Polynomial k` in - `LinfAt f`": the carrier plus every typeclass instance the closing theorem - needs as an honest field. -* `xIdeal`, `Sinf.ordAt`, `Sinf.kappa` — the prime `(X)` at infinity, the order - `-(ramificationIdx' …)`, and the residue field `carrier ⧸ P`. - -## Main results - -* `finrank_eq_sum_ramificationIdx_mul_inertiaDeg` — the abstract fundamental - identity `Σ e(P) · f(P) = [LinfAt f : k(f)]` from `Ideal.sum_ramification_inertia`. -* `finrank_eq_weighted_poleDegree_of_nonconstant` — the closing corollary - `[L : k(f)] = Σ_P (−ord_P f) · inertiaDeg' P`. -* `Sinf.inertiaDeg_eq_one_of_algebraMap_surjective` — `inertiaDeg' (X) P = 1` - when the residue map `k → κ(P)` is surjective. - -## Implementation notes - -`LinfAt` and `Sinf` exist to dodge two Lean-elaboration hazards. `LinfAt f` -isolates the `X ↦ f⁻¹` algebra structure from the project's `X ↦ coordX` one; -transcendence is carried as `Fact (Transcendental k f⁻¹)` (use sites declare -`haveI : Fact (Transcendental k f⁻¹) := ⟨_⟩` once and the algebra instances -resolve). `Sinf` bundles the integral-closure instances as record fields so they -resolve by projection, sidestepping the `Meta.SynthInstance.tryResolve` -negative-cache anomaly that the `↥(integralClosure …)` Subalgebra coercion -triggers under `Ideal.sum_ramification_inertia` (commit 538ff64). - -## References - -* Silverman, *The Arithmetic of Elliptic Curves*, II.2 (degree of a - morphism between curves; formula II.2.6.a as the sum over preimages of - one point). -* Mathlib's `Ideal.sum_ramification_inertia` provides the abstract - fundamental identity `Σ e · f = [Frac S : Frac R]`. +# Ramification at infinity + +For a nonconstant function on a smooth curve, the degree of the function-field +extension equals the degree of its pole divisor. Applying the fundamental +ramification–inertia identity to the prime `(X)` of `k[X]`, embedded by +`X ↦ f⁻¹`, identifies its ramification indices with pole orders and its +inertia degrees with residue-field degrees. + +See Silverman, *The Arithmetic of Elliptic Curves*, II.2. -/ namespace HasseWeil.Curves @@ -144,11 +83,7 @@ theorem ratFunToFieldOfInv_injective {L : Type*} [Field L] [Algebra k L] Function.Injective (ratFunToFieldOfInv hf) := (ratFunToFieldOfInv hf).toRingHom.injective -/-- The function field viewed as a type-synonym, used to install a -`Polynomial k`-algebra structure via `X ↦ f⁻¹` that does not conflict with -the project's existing `X ↦ coordX` instance. -The unused argument `_f` indexes the algebra structure intended for the -synonym. -/ + @[nolint unusedArguments] def LinfAt {L : Type*} [Field L] [Algebra k L] (_f : L) : Type _ := L @@ -238,12 +173,7 @@ instance isScalarTower_k_fractionRing end LinfAt -/-- Structural package of "an integral closure of `Polynomial k` inside -`LinfAt f`": carrier type plus every typeclass instance the closing -`Ideal.sum_ramification_inertia` invocation requires, bundled as record -fields so `letI` can install them at the use site. Sidesteps the Lean 4 -synthesis anomaly that affects the `↥(integralClosure …)` Subalgebra -coercion (commit 538ff64). -/ + structure Sinf.{u} {L : Type*} [Field L] [Algebra k L] (f : L) where /-- Carrier type — canonically `↥(integralClosure (Polynomial k) (LinfAt f))`. -/ carrier : Type u @@ -262,18 +192,14 @@ structure Sinf.{u} {L : Type*} [Field L] [Algebra k L] (f : L) where [isFractionRing : IsFractionRing carrier (LinfAt (k := k) f)] /-- Compatible scalar tower with the ambient `Polynomial k → LinfAt f`. -/ [isScalarTower : IsScalarTower (Polynomial k) carrier (LinfAt (k := k) f)] - /-- Finite as a `Polynomial k`-module. -/ + [moduleFinite : Module.Finite (Polynomial k) carrier] - /-- Torsion-free as a `Polynomial k`-module (algebraMap injective). -/ + [isTorsionFree : Module.IsTorsionFree (Polynomial k) carrier] section SinfConstruction -/-- Canonical construction of `Sinf` from Mathlib's `integralClosure` -Subalgebra. Given the ambient finite-separability hypotheses, all the -required instances are synthesised once here; downstream code consumes -them only by field projection. -/ noncomputable def Sinf.ofIntegralClosure {L : Type*} [Field L] [Algebra k L] (f : L) [Fact (Transcendental k f⁻¹)] [Module.Finite (FractionRing (Polynomial k)) (LinfAt (k := k) f)] @@ -288,13 +214,13 @@ noncomputable def Sinf.ofIntegralClosure (integralClosure (Polynomial k) (LinfAt (k := k) f)) := IsIntegralClosure.finite (Polynomial k) (FractionRing (Polynomial k)) (LinfAt (k := k) f) (integralClosure (Polynomial k) (LinfAt (k := k) f)) - haveI : FaithfulSMul (Polynomial k) (LinfAt (k := k) f) := by + have : FaithfulSMul (Polynomial k) (LinfAt (k := k) f) := by rw [faithfulSMul_iff_algebraMap_injective] exact polyToFieldOfInv_injective_of_transcendental (Fact.out (p := Transcendental k f⁻¹)) - haveI : Module.IsTorsionFree (Polynomial k) (LinfAt (k := k) f) := + have : Module.IsTorsionFree (Polynomial k) (LinfAt (k := k) f) := inferInstance - haveI : Module.IsTorsionFree (Polynomial k) + have : Module.IsTorsionFree (Polynomial k) (integralClosure (Polynomial k) (LinfAt (k := k) f)) := Subalgebra.instIsTorsionFree (integralClosure (Polynomial k) (LinfAt (k := k) f)) @@ -316,13 +242,7 @@ theorem xIdeal_ne_bot : (xIdeal (k := k)) ≠ ⊥ := by rw [xIdeal, Ne, Ideal.span_singleton_eq_bot] exact Polynomial.X_ne_zero -/-- **Abstract fundamental ramification–inertia identity at infinity.** -For a function `f` realising `LinfAt f` as a finite separable extension of -`FractionRing (Polynomial k) = k(f)` and an integral-closure package -`data : Sinf k f`, the sum over primes of the carrier lying over `(X)` of -`e(P) · f(P)` equals `[LinfAt f : k(f)]`. This is the abstract content of -the `[K(C):k(f)] = Σ (pole degree)` identity, before specialisation to -`LinfAt f = K(C)` for a smooth curve `C`. -/ + theorem finrank_eq_sum_ramificationIdx_mul_inertiaDeg {L : Type*} [Field L] [Algebra k L] (f : L) [Fact (Transcendental k f⁻¹)] [Module.Finite (FractionRing (Polynomial k)) (LinfAt (k := k) f)] @@ -332,18 +252,42 @@ theorem finrank_eq_sum_ramificationIdx_mul_inertiaDeg letI := data.algPoly ∑ P ∈ IsDedekindDomain.primesOverFinset (xIdeal (k := k)) data.carrier, Ideal.ramificationIdx' (xIdeal (k := k)) P * - Ideal.inertiaDeg' (xIdeal (k := k)) P = + P.inertiaDeg (Polynomial k) = Module.finrank (FractionRing (Polynomial k)) (LinfAt (k := k) f) := by - letI := data.commRing - letI := data.isDomain - letI := data.isDedekindDomain - letI := data.algPoly - letI := data.algLinfAt - letI := data.isFractionRing - letI := data.isScalarTower - letI := data.moduleFinite - exact Ideal.sum_ramification_inertia (R := Polynomial k) data.carrier - (FractionRing (Polynomial k)) (LinfAt (k := k) f) xIdeal_ne_bot + let := data.commRing + let := data.isDomain + let := data.isDedekindDomain + let := data.algPoly + let := data.algLinfAt + let := data.isFractionRing + let := data.isScalarTower + let := data.moduleFinite + classical + let := data.isTorsionFree + let : Fintype ((xIdeal (k := k)).primesOver data.carrier) := Fintype.ofFinite _ + calc + _ = ∑ P : (xIdeal (k := k)).primesOver data.carrier, + P.1.ramificationIdx (Polynomial k) * P.1.inertiaDeg (Polynomial k) := by + apply Finset.sum_bij (fun P hP ↦ + ⟨P, (IsDedekindDomain.mem_primesOverFinset_iff xIdeal_ne_bot data.carrier).mp hP⟩) + · intro P hP + exact Finset.mem_univ _ + · intro P hP Q hQ h + exact congrArg Subtype.val h + · intro P _ + exact ⟨P.1, + (IsDedekindDomain.mem_primesOverFinset_iff xIdeal_ne_bot data.carrier).mpr P.2, rfl⟩ + · intro P hP + obtain ⟨hprime, hover⟩ := + (IsDedekindDomain.mem_primesOverFinset_iff xIdeal_ne_bot data.carrier).mp hP + let := hprime + let := hover + rw [Ideal.ramificationIdx'_eq_ramificationIdx (xIdeal (k := k)) P xIdeal_ne_bot] + _ = Module.finrank (Polynomial k) data.carrier := + Ideal.sum_ramification_inertia_eq_finrank (xIdeal (k := k)) data.carrier + _ = Module.finrank (FractionRing (Polynomial k)) (LinfAt (k := k) f) := + (IsFractionRing.finrank_eq (Polynomial k) (FractionRing (Polynomial k)) + data.carrier (LinfAt (k := k) f)).symm /-- The `R[X] ⧸ (X) ≃ₐ[R] R`-style algebra equivalence specialised to `R = k`, given by evaluation at `0`. -/ @@ -374,8 +318,8 @@ theorem Sinf.toNat_neg_ordAt_eq_ramificationIdx ∀ P : Ideal data.carrier, (-(data.ordAt P)).toNat = Ideal.ramificationIdx' (xIdeal (k := k)) P := by - letI := data.commRing - letI := data.algPoly + let := data.commRing + let := data.algPoly intro P simp [Sinf.ordAt] @@ -415,16 +359,34 @@ theorem Sinf.inertiaDeg_eq_finrank_kappa letI := data.commRing letI := data.algPoly ∀ (P : Ideal data.carrier) [P.LiesOver (xIdeal (k := k))], - Ideal.inertiaDeg' (xIdeal (k := k)) P = - Module.finrank (Polynomial k ⧸ xIdeal (k := k)) (data.kappa P) := by - letI := data.commRing - letI := data.algPoly + (if h : P.comap (algebraMap (Polynomial k) data.carrier) = xIdeal (k := k) then + letI : Algebra (Polynomial k ⧸ xIdeal (k := k)) (data.carrier ⧸ P) := + Ideal.Quotient.algebraQuotientOfLEComap h.ge + Module.finrank (Polynomial k ⧸ xIdeal (k := k)) (data.kappa P) + else 0) = Module.finrank (Polynomial k ⧸ xIdeal (k := k)) (data.kappa P) := by + let := data.commRing + let := data.algPoly intro P _ - exact Ideal.inertiaDeg'_algebraMap _ _ + simp only [dite_eq_left (Ideal.over_def P (xIdeal (k := k))).symm] + +/-- For a prime above `(X)`, the inertia degree is its residue-field degree. -/ +theorem Sinf.prime_inertiaDeg_eq_finrank_kappa + {L : Type*} [Field L] [Algebra k L] {f : L} + (data : Sinf (k := k) f) : + letI := data.commRing + letI := data.algPoly + ∀ (P : Ideal data.carrier) [P.IsPrime] [P.LiesOver (xIdeal (k := k))], + P.inertiaDeg (Polynomial k) = + Module.finrank (Polynomial k ⧸ xIdeal (k := k)) (data.kappa P) := by + let := data.commRing + let := data.algPoly + let := data.moduleFinite + intro P _ _ + let : P.IsMaximal := Ideal.isMaximal_of_isIntegral_of_isMaximal_under (R := Polynomial k) P (by + simpa only [← Ideal.over_def P (xIdeal (k := k))] using (xIdeal_isMaximal (k := k))) + exact Ideal.inertiaDeg_eq_of_isMaximal (xIdeal (k := k)) P + -/-- The `Polynomial k ⧸ xIdeal`-finrank of a module agrees with its -`k`-finrank, given a compatible scalar tower `k → (Polynomial k ⧸ xIdeal) -→ M`. Uses `quotientXAlgEquiv` plus the tower formula. -/ theorem finrank_residue_eq_finrank_k {M : Type*} [AddCommGroup M] [Module (Polynomial k ⧸ xIdeal (k := k)) M] [Module k M] [IsScalarTower k (Polynomial k ⧸ xIdeal (k := k)) M] @@ -439,7 +401,7 @@ theorem finrank_residue_eq_finrank_k /-- **Abstract inertia-degree-one criterion at `(X)`.** For an *arbitrary* prime `P` of the `Sinf` carrier lying over `xIdeal := (X)`, if the structure algebra map `(Polynomial k ⧸ (X)) → (carrier ⧸ P)` (`≅ k → κ(P)`) is surjective, then the inertia -degree `inertiaDeg' (X) P` equals `1`. This is the field-agnostic, `CoordinateRing`-free, +degree `P.inertiaDeg (Polynomial k)` equals `1`. This is the field-agnostic, `CoordinateRing`-free, `IsAlgClosed`-free criterion for any prime over `(X)`. -/ theorem Sinf.inertiaDeg_eq_one_of_algebraMap_surjective {L : Type*} [Field L] [Algebra k L] {f : L} @@ -455,31 +417,26 @@ theorem Sinf.inertiaDeg_eq_one_of_algebraMap_surjective (algebraMap (Polynomial k ⧸ xIdeal (k := k)) (data.carrier ⧸ P))) : letI := data.commRing letI := data.algPoly - Ideal.inertiaDeg' (xIdeal (k := k)) P = 1 := by - letI := data.commRing - letI := data.algPoly - letI := data.isDomain - letI := data.moduleFinite - haveI hmax : (xIdeal (k := k)).IsMaximal := xIdeal_isMaximal - letI : Algebra (Polynomial k ⧸ xIdeal (k := k)) (data.carrier ⧸ P) := + P.inertiaDeg (Polynomial k) = 1 := by + let := data.commRing + let := data.algPoly + let := data.isDomain + let := data.moduleFinite + have hmax : (xIdeal (k := k)).IsMaximal := xIdeal_isMaximal + let : Algebra (Polynomial k ⧸ xIdeal (k := k)) (data.carrier ⧸ P) := Ideal.Quotient.algebraQuotientOfLEComap (Ideal.LiesOver.over (p := xIdeal (k := k)) (P := P)).le - rw [Ideal.inertiaDeg'_algebraMap] + let : P.IsMaximal := Ideal.isMaximal_of_isIntegral_of_isMaximal_under (R := Polynomial k) P (by + simpa only [← Ideal.over_def P (xIdeal (k := k))] using (xIdeal_isMaximal (k := k))) + rw [Ideal.inertiaDeg_eq_of_isMaximal (xIdeal (k := k)) P] refine le_antisymm ?_ ?_ · refine finrank_le_one (1 : data.carrier ⧸ P) fun w ↦ ?_ obtain ⟨c, hc⟩ := h_surj w exact ⟨c, by rwa [Algebra.algebraMap_eq_smul_one] at hc⟩ - · have hpos := Ideal.inertiaDeg'_pos (xIdeal (k := k)) P - rwa [Ideal.inertiaDeg'_algebraMap] at hpos - -/-- **Closing corollary (abstract form).** The function-field degree -`[L : k(f)]` over the Sinf data equals the weighted pole-divisor degree -`Σ_P (−ord_P f) · f_P` (with `f_P = inertiaDeg' xIdeal P`). This is the -abstract form of the `[K(C) : k(f)] = Σ_{P pole of f} (−ord_P f) · [κ(P) : -k]` identity; Worker B's PoleDivisorFallback specialisation substitutes -`L = K(E)`, `f = γ*x_gen`, and converts `inertiaDeg'` to `[κ(P) : k]` -using `inertiaDeg_eq_finrank_kappa` plus the `quotientXAlgEquiv` -`Polynomial k ⧸ xIdeal ≃ k`. -/ + · exact Nat.succ_le_of_lt (Module.finrank_pos : + 0 < Module.finrank (Polynomial k ⧸ xIdeal (k := k)) (data.carrier ⧸ P)) + + theorem finrank_eq_weighted_poleDegree_of_nonconstant {L : Type*} [Field L] [Algebra k L] (f : L) [Fact (Transcendental k f⁻¹)] [Module.Finite (FractionRing (Polynomial k)) (LinfAt (k := k) f)] @@ -490,16 +447,16 @@ theorem finrank_eq_weighted_poleDegree_of_nonconstant Module.finrank (FractionRing (Polynomial k)) (LinfAt (k := k) f) = ∑ P ∈ IsDedekindDomain.primesOverFinset (xIdeal (k := k)) data.carrier, (-(data.ordAt P)).toNat * - Ideal.inertiaDeg' (xIdeal (k := k)) P := by - letI := data.commRing - letI := data.algPoly - letI := data.isDomain - letI := data.isDedekindDomain - letI := data.algLinfAt - letI := data.isFractionRing - letI := data.isScalarTower - letI := data.moduleFinite - letI := data.isTorsionFree + P.inertiaDeg (Polynomial k) := by + let := data.commRing + let := data.algPoly + let := data.isDomain + let := data.isDedekindDomain + let := data.algLinfAt + let := data.isFractionRing + let := data.isScalarTower + let := data.moduleFinite + let := data.isTorsionFree have h := finrank_eq_sum_ramificationIdx_mul_inertiaDeg (k := k) (L := L) f data rw [← h] diff --git a/projects/HasseWeil/HasseWeil/Foundation/Curves/Transcendence.lean b/projects/HasseWeil/HasseWeil/Foundation/Curves/Transcendence.lean index bdce413c5..a6490d166 100644 --- a/projects/HasseWeil/HasseWeil/Foundation/Curves/Transcendence.lean +++ b/projects/HasseWeil/HasseWeil/Foundation/Curves/Transcendence.lean @@ -16,19 +16,6 @@ that a nonconstant curve map `φ : C₁ → C₂` induces a finite extension `K(C₁) / φ*(K(C₂))`: the range of `φ.pullback` is an intermediate ring containing the algebraic structure of `F[x]`, and transitivity does the rest. -This closes the *first piece* of the infrastructure needed for -T-II-INFRA-B-009 (Silverman II.2.4(a), `CurveMap.pullback_image_finite_codim`). -The full finiteness still requires transcendence-degree theory, which -mathlib provides via `IsTranscendenceBasis`/`trdeg` but whose bridge to our -subalgebra setting (`Algebra.adjoin F {C.coordX}`) needs additional -typeclass-plumbing. That bridge is tracked as a follow-up. - -## Main results - -- `SmoothPlaneCurve.isAlgebraic_polynomialX_functionField`: `F(C)` is - algebraic over `F[X]` (instance). Consequence of - `IsLocalization.isAlgebraic` + `Algebra.IsAlgebraic.of_finite` + transitivity. - ## References * [Silverman, *The Arithmetic of Elliptic Curves*], II.1, II.2.4 @@ -49,29 +36,19 @@ algebraic over the base), `F(x) → F(C)` is algebraic (finite of rank 2), and algebraicness is transitive. -/ instance isAlgebraic_polynomialX_functionField : Algebra.IsAlgebraic (Polynomial F) C.FunctionField := by - haveI : Algebra.IsAlgebraic (Polynomial F) (FractionRing (Polynomial F)) := + have : Algebra.IsAlgebraic (Polynomial F) (FractionRing (Polynomial F)) := IsLocalization.isAlgebraic _ (nonZeroDivisors _) - haveI : Algebra.IsAlgebraic (FractionRing (Polynomial F)) C.FunctionField := + have : Algebra.IsAlgebraic (FractionRing (Polynomial F)) C.FunctionField := Algebra.IsAlgebraic.of_finite _ _ exact Algebra.IsAlgebraic.trans (R := Polynomial F) (S := FractionRing (Polynomial F)) (A := C.FunctionField) -/-- Every element of `F(C)` is integral over `F[X]`: since `F[X]` is a field -(well, an integral domain), integrality and algebraicness coincide over it -only for the algebraic case when the ring is a field. Here, since `F[X]` -is an ID and `F(C)` is a domain, we can state integrality directly. - -**Remark**: `F[X]` is NOT a field, so `IsAlgebraic` and `IsIntegral` over -`F[X]` are distinct notions in general; however, an element of `F(C)` that -is a root of any nonzero polynomial over `F[X]` is a root of SOME monic -polynomial (divide by the leading coefficient after clearing denominators -in the fraction field). We don't need this strengthening for the main -application. -/ +/-- The function field is integral over the fraction field of the polynomial ring. -/ instance isIntegral_fracPolynomialX_functionField : Algebra.IsIntegral (FractionRing (Polynomial F)) C.FunctionField := by exact (Algebra.IsAlgebraic.of_finite (FractionRing (Polynomial F)) C.FunctionField).isIntegral -/-! ### T-II-1-005: Uniformizer is not a `p`-th power in char `p > 0` -/ + /-- **Silverman Exercise II.2.15 (⇐), char-`p` half**: if `t ∈ F(C)` is a uniformizer at some smooth point `P`, then `t` is not a `p`-th power in @@ -103,7 +80,7 @@ theorem notMem_pthPowers_of_uniformizer {p : ℕ} (hp : 1 < p) `F(C)` is finite over `Frac(F[X]) = F(x)`, so trdeg = 1 by additivity of transcendence degree across the tower `F → F[X] → F(x) → F(C)`. -/ -/-- **trdeg F K(E) = 1 (axiom-clean)**: the function field of a smooth +/-- **trdeg F K(E) = 1**: the function field of a smooth plane curve has transcendence degree 1 over the base field. Tower computation: `trdeg F (Polynomial F) = 1` (mathlib's @@ -113,11 +90,11 @@ Tower computation: `trdeg F (Polynomial F) = 1` (mathlib's `FiniteOverKx`). Apply `trdeg_add_eq` twice. -/ theorem functionField_trdeg_eq_one : Algebra.trdeg F C.FunctionField = 1 := by have h_fund : Algebra.trdeg F (FractionRing (Polynomial F)) = 1 := by - haveI : Algebra.IsAlgebraic (Polynomial F) (FractionRing (Polynomial F)) := + have : Algebra.IsAlgebraic (Polynomial F) (FractionRing (Polynomial F)) := IsLocalization.isAlgebraic _ (nonZeroDivisors _) rw [← trdeg_add_eq F (Polynomial F) (A := FractionRing (Polynomial F)), Polynomial.trdeg_of_isDomain, trdeg_eq_zero, add_zero] - haveI : Algebra.IsAlgebraic (FractionRing (Polynomial F)) C.FunctionField := + have : Algebra.IsAlgebraic (FractionRing (Polynomial F)) C.FunctionField := Algebra.IsAlgebraic.of_finite _ _ rw [← trdeg_add_eq F (FractionRing (Polynomial F)) (A := C.FunctionField), h_fund, trdeg_eq_zero, add_zero] diff --git a/projects/HasseWeil/HasseWeil/Foundation/Curves/Valuation/AlgebraicNonNegOrd.lean b/projects/HasseWeil/HasseWeil/Foundation/Curves/Valuation/AlgebraicNonNegOrd.lean index c599cad55..ad80470ae 100644 --- a/projects/HasseWeil/HasseWeil/Foundation/Curves/Valuation/AlgebraicNonNegOrd.lean +++ b/projects/HasseWeil/HasseWeil/Foundation/Curves/Valuation/AlgebraicNonNegOrd.lean @@ -84,7 +84,7 @@ theorem ord_P_nonneg_of_isAlgebraic · rw [hf, ord_P_zero]; exact le_top · have hv : C.pointValuation P f ≠ 0 := (C.pointValuation P).ne_zero_iff.mpr hf simp only [ord_P] - rw [dif_neg hv, show (0 : WithTop ℤ) = ((0 : ℤ) : WithTop ℤ) from rfl, + rw [dite_eq_right hv, show (0 : WithTop ℤ) = ((0 : ℤ) : WithTop ℤ) from rfl, WithTop.coe_le_coe] -- The order is `-toAdd (unzero hv)`, so `≤ 1` for the valuation becomes -- `toAdd (unzero hv) ≤ toAdd 1 = 0`, giving `0 ≤ -toAdd (unzero hv)`. diff --git a/projects/HasseWeil/HasseWeil/Foundation/Curves/Valuation/Infinity.lean b/projects/HasseWeil/HasseWeil/Foundation/Curves/Valuation/Infinity.lean index bf9827ace..e8e5e12b2 100644 --- a/projects/HasseWeil/HasseWeil/Foundation/Curves/Valuation/Infinity.lean +++ b/projects/HasseWeil/HasseWeil/Foundation/Curves/Valuation/Infinity.lean @@ -22,25 +22,21 @@ with the classical values ordAtInfty(x) = -2, ordAtInfty(y) = -3. ``` -Rather than building a local ring at infinity and extracting the valuation -from its DVR structure (the approach outlined in the Phase-D ticket -`T-II-INFRA-D-001`), this file defines `ordAtInfty` algebraically via the -algebra norm `N : F(C) → F(x)`: +The order at infinity is defined algebraically using the norm +`N : F(C) → F(x)`: ``` ordAtInfty(f) := - intDegree (N(f)) ∈ ℤ ∪ {∞}. ``` -The rationale is that for a degree-2 extension of `F(x)`, ramified only at -the place at infinity of `ℙ¹_F` with ramification index 2 and residue +The rationale is that when the unique place of a degree-2 extension of `F(x)` above +the place at infinity of `ℙ¹_F` has ramification index 2 and residue degree 1, the valuation at the unique place of `F(C)` above infinity is related to the ℙ¹-valuation of the norm by the classical formula `v_K(N(f)) = f_w · w(f)` with `f_w = 1`. Concretely, `ordAtInfty(f) = ordAtInfty(N(f))` where the right-hand side is the order at infinity on `F(x)`, computed by `- intDegree`. -This closes (partial form) ticket `T-II-INFRA-D-002`. - ## References * [Silverman, *The Arithmetic of Elliptic Curves*], IV.1 (for @@ -87,7 +83,7 @@ noncomputable def ordAtInfty (f : C.FunctionField) : WithTop ℤ := if f = 0 then ⊤ else ((- RatFunc.intDegree (C.normAsRatFunc f) : ℤ) : WithTop ℤ) -@[simp] theorem ordAtInfty_zero : C.ordAtInfty 0 = ⊤ := if_pos rfl +@[simp] theorem ordAtInfty_zero : C.ordAtInfty 0 = ⊤ := ite_eq_left rfl theorem ordAtInfty_eq_top_iff (f : C.FunctionField) : C.ordAtInfty f = ⊤ ↔ f = 0 := by @@ -98,7 +94,7 @@ theorem ordAtInfty_eq_top_iff (f : C.FunctionField) : theorem ordAtInfty_of_ne {f : C.FunctionField} (hf : f ≠ 0) : C.ordAtInfty f = (- RatFunc.intDegree (C.normAsRatFunc f) : ℤ) := - if_neg hf + ite_eq_right hf /-- Multiplicativity of `ordAtInfty`: for nonzero `f, g`, `ordAtInfty(f · g) = ordAtInfty(f) + ordAtInfty(g)`. -/ @@ -950,7 +946,7 @@ private theorem degree_sub_C_leadingCoeff_div_mul_lt {n d : Polynomial F} have h_deg : n.degree = (Polynomial.C lam * d).degree := by rw [Polynomial.degree_C_mul hlam_ne, Polynomial.degree_eq_natDegree hn, Polynomial.degree_eq_natDegree hd, h_eq] - exact Polynomial.degree_sub_lt h_deg hn h_lc + exact Polynomial.degree_sub_lt_left h_deg hn h_lc private theorem ratFunc_exists_C_sub_intDegree_neg {r : RatFunc F} (hr : r.intDegree ≤ 0) : @@ -1056,13 +1052,13 @@ theorem ordAtInftyVal_eq_exp_neg_ordAtInfty {f : C.FunctionField} (hf : f ≠ 0) have : (n : WithTop ℤ) = ((- RatFunc.intDegree (C.normAsRatFunc f) : ℤ) : WithTop ℤ) := hn.symm.trans hN have hni : n = - RatFunc.intDegree (C.normAsRatFunc f) := by exact_mod_cast this - rw [ordAtInftyVal, if_neg hf, hni, neg_neg] + rw [ordAtInftyVal, ite_eq_right hf, hni, neg_neg] -@[simp] theorem ordAtInftyVal_zero : C.ordAtInftyVal 0 = 0 := if_pos rfl +@[simp] theorem ordAtInftyVal_zero : C.ordAtInftyVal 0 = 0 := ite_eq_left rfl theorem ordAtInftyVal_ne_zero {f : C.FunctionField} (hf : f ≠ 0) : C.ordAtInftyVal f ≠ 0 := by - rw [ordAtInftyVal, if_neg hf]; exact WithZero.exp_ne_zero + rw [ordAtInftyVal, ite_eq_right hf]; exact WithZero.exp_ne_zero @[simp] theorem ordAtInftyVal_one : C.ordAtInftyVal (1 : C.FunctionField) = 1 := by rw [C.ordAtInftyVal_eq_exp_neg_ordAtInfty one_ne_zero C.ordAtInfty_one, neg_zero, @@ -1325,7 +1321,7 @@ theorem smoothPoint_x_preimage_finite (a : F) : (t := {y : F | (C.fiberQuadratic a).IsRoot y}) (fun _ hP ↦ C.fiberQuadratic_isRoot_of_smoothPoint hP) (fun _ hP₁ _ hP₂ hy ↦ SmoothPoint.ext (hP₁.trans hP₂.symm) hy) - (Polynomial.finite_setOf_isRoot (C.fiberQuadratic_ne_zero a)) + (Polynomial.finite_setOfPred_isRoot (C.fiberQuadratic_ne_zero a)) /-- The x-projection preimage of a finite set of `x`-values is finite. In particular, `{P : C.SmoothPoint | P.x ∈ roots f}` is finite for any nonzero @@ -1460,7 +1456,7 @@ theorem pointValuation_algebraMap_le_one (u : C.CoordinateRing) exact IsDedekindDomain.HeightOneSpectrum.valuation_le_one (IsDiscreteValuationRing.maximalIdeal (C.localRingAt P)) _ -/-- **Step (B'') foundational structural lemma (one direction)**: every +/-- every element of `C.localRingAt P` (after embedding into `K(C)`) has valuation ≤ 1 at `P`. Direct from `IsDedekindDomain.HeightOneSpectrum.valuation_le_one` applied at the localRingAt level (the localRing is a DVR, hence a Dedekind @@ -1472,7 +1468,7 @@ theorem pointValuation_algebraMap_localRingAt_le_one exact IsDedekindDomain.HeightOneSpectrum.valuation_le_one (IsDiscreteValuationRing.maximalIdeal (C.localRingAt P)) x -/-- **Step (B'') foundational structural lemma (converse direction)**: every +/-- every element of `K(C)` with valuation ≤ 1 at `P` lifts to an element of `C.localRingAt P`. Together with the easy direction, this characterises the `algebraMap (localRingAt P) → KE` image as exactly @@ -1533,7 +1529,7 @@ theorem exists_mul_algebraMap_eq_of_pointValuation_le_one exact h2 -/-- **Step (B'') foundational structural identification (biconditional)**: +/-- combines `pointValuation_algebraMap_localRingAt_le_one` and `mem_localRingAt_image_of_pointValuation_le_one` into the canonical iff form. This characterises the `algebraMap (localRingAt P) → KE` image as exactly @@ -1552,7 +1548,7 @@ theorem ord_P_eq_zero_iff_pointValuation_eq_one (C : SmoothPlaneCurve F) C.ord_P P f = 0 ↔ C.pointValuation P f = 1 := by have hv : C.pointValuation P f ≠ 0 := (C.pointValuation P).ne_zero_iff.mpr hf simp only [ord_P] - rw [dif_neg hv] + rw [dite_eq_right hv] constructor · intro h have h_nat : -((WithZero.unzero hv).toAdd : ℤ) = 0 := by exact_mod_cast h @@ -1599,7 +1595,7 @@ theorem finite_setOf_mem_maximalIdealAt {u : C.CoordinateRing} (hu : u ≠ 0) : hu ((Algebra.norm_eq_zero_iff (R := Polynomial F)).mp h) refine (C.smoothPoint_x_preimage_finite_of_set {a : F | (Algebra.norm (Polynomial F) u).IsRoot a} - (Polynomial.finite_setOf_isRoot hNu_ne)).subset ?_ + (Polynomial.finite_setOfPred_isRoot hNu_ne)).subset ?_ intro P (hP : u ∈ C.maximalIdealAt P) rw [← hpq, C.mem_maximalIdealAt_iff_eval_zero P p q] at hP change (Algebra.norm (Polynomial F) u).IsRoot P.x @@ -1647,7 +1643,7 @@ theorem finite_setOf_ord_P_nonzero {f : C.FunctionField} (hf : f ≠ 0) : (C.finite_setOf_ord_P_nonzero_of_coordinateRing hv_ne)).subset ?_ intro P hP by_contra h_both - simp only [Set.mem_union, Set.mem_setOf_eq, not_or, not_not] at h_both + simp only [Set.mem_union, Set.mem_ofPred_eq, not_or, not_not] at h_both obtain ⟨hu0, hv0⟩ := h_both have hord : C.ord_P P (algebraMap C.CoordinateRing C.FunctionField u) = @@ -1658,8 +1654,7 @@ theorem finite_setOf_ord_P_nonzero {f : C.FunctionField} (hf : f ≠ 0) : exact hP hord.symm /-- **Silverman II.1.2, Part 1**: a nonzero function on a smooth plane curve -has zeros and poles at only finitely many smooth points. This is an alias -for `finite_setOf_ord_P_nonzero` matching the ticket statement. -/ +has zeros and poles at only finitely many smooth points. -/ theorem finite_zeros_poles (f : C.FunctionField) (hf : f ≠ 0) : {P : C.SmoothPoint | C.ord_P P f ≠ 0}.Finite := C.finite_setOf_ord_P_nonzero hf @@ -1668,16 +1663,6 @@ theorem finite_zeros_poles (f : C.FunctionField) (hf : f ≠ 0) : if `f ∈ F(C)` has nonnegative order at infinity AND lies in the coordinate ring, then `f` is the image of a constant from `F`. -This is the best form provable with our current infrastructure. The full -"no-affine-poles ⟹ in CoordinateRing" step is the integral-closure -property of smooth curves: for a smooth Weierstrass curve `[C.toAffine.IsElliptic]`, -`C.CoordinateRing` is a Dedekind domain, hence integrally closed, and any -`f ∈ F(C)` with `ord_P f ≥ 0` at every closed point is automatically in -`C.CoordinateRing`. Without the `IsElliptic` hypothesis (or an equivalent -smoothness assumption), singular points can have local rings that don't -align with the global coordinate ring structure, and the integral-closure -step requires genuinely new algebra-of-curves infrastructure. - Reference: Silverman II.1.2, second part; Hartshorne I.6.12. -/ theorem const_of_no_poles_of_coordinateRing (f : C.FunctionField) (h_coord : ∃ u : C.CoordinateRing, @@ -1691,9 +1676,9 @@ theorem const_of_no_poles_of_coordinateRing (f : C.FunctionField) exact (IsScalarTower.algebraMap_apply F C.CoordinateRing C.FunctionField c).symm -/-- **IC-006 (Silverman II.1.2, Part 2, prime-indexed)**: if `f ∈ F(C)` has +/-- **Silverman II.1.2, Part 2, prime-indexed**: if `f ∈ F(C)` has nonnegative valuation at every nonzero prime of `C.CoordinateRing` **and** at -infinity, then `f` is constant. Combines IC-006's Dedekind-Liouville bridge +infinity, then `f` is constant. Combines the Dedekind-Liouville bridge `mem_coordinateRing_of_valuation_le_one` with the CoordinateRing-form algebraic Liouville `const_of_no_poles_of_coordinateRing`. -/ theorem const_of_no_poles_of_valuation_of_ordAtInfty @@ -1705,7 +1690,7 @@ theorem const_of_no_poles_of_valuation_of_ordAtInfty C.const_of_no_poles_of_coordinateRing f (C.mem_coordinateRing_of_valuation_le_one f h_primes) h_inf -/-- **IC-006 (integrality-based Liouville)**: if `f ∈ F(C)` is integral over +/-- **Integrality-based Liouville**: if `f ∈ F(C)` is integral over `F[X]` **and** has nonnegative order at infinity, then `f` is constant. This is the cleanest consequence of `IsIntegrallyClosed C.CoordinateRing`: integrality over `F[X]` lifts `f` into `C.CoordinateRing`, and then diff --git a/projects/HasseWeil/HasseWeil/Foundation/Curves/Valuation/NoFinitePolesBridge.lean b/projects/HasseWeil/HasseWeil/Foundation/Curves/Valuation/NoFinitePolesBridge.lean index 0b44dea28cc6d4c4dd158920e7563ca5babef0db..966395e5596ce0a1deb52980a2031a07e846aa7d 100644 GIT binary patch delta 3411 zcmb7G&yN&E6wdAge5EE9}B};;=g2BWeOl^0~bYXW_Q`NJ} zaG7{9o}G(&(UVt6CZ3IFPnvk)WQc!)Cr^H_s;B4Yq8_KG>ect&_r34EzrR}grg(U5 z>C9F)k4mL;OZ%!!DA&|hxhf?UI+ZpEwzMIU4|dM4Ez#iDCF)<1vHVo!aS&;3VwDS= zH7f5kNRSa6N~F}TqEaI4Y)mSQjFgpWFW66HPO79`nd-b_snk>^lE#sn9GO%mIx?i2 znbu`LA<+gz2B`AV0){ct7CMjldLmUPDVv)AH!71hq+9rA{At<~Y1d)2BsxY)mvq2y zPW+?WjKYp009_=y__?c5puRAYkbXCkG41voUMn&gq&h<4v9ghoC`ld96(^+YGTW8L zCaS>gnJnEAMv+rnr>Wkz)HXVEr^a!jL>Lh@OKH>tmjeN)pb;Mw>rALT41)J$TN;^1 z@*)j>e=2;YLEGEm`S3zGJa+icL!WH!Nzukpe6DoQeBjAte<{kp}Kz z%XB2Zup!+*R0xGN@?6xQ$vzs6cFmJ6}M2xN6^pJf{sF?x@c z)bt+K^d43iT}V^*E&^R`OqJV>Q}DQ5BG%c~7^1l90S0U<04o=EPy;=MrX!d4;vOG9 zq!*X}HJM7f|3ORKj(Mpd9^a)kWDBS>?Oa>wUG~!3MwQ$)=vZNPRcQn~Va~n-xVNBt zU0o`?L-Kwp^VmNnM|!M0dq2Uv7?;=SIUM{DY;gB1?8C8fGmwKjGVo4aCFEwos0n7w zDkL|pYAcbc%;Zr3XXj?~7<~Kk=~KP|otf{6Tv;?gNo+j>b?SxT@iTv}EQZYUqMDNI zS5JmNA@DLWy4y)~w{(ou3iKtSabwqvU8?4)qb%?l*R|I*AC~9ORA0d#IElgWGpmF3 zwIf4n^bZYApMPnI2l&aU@jYww4F;D}Ylq&X8?7+d;L(^%3y*rzEUygJNVpp&N%(J?SMZk40ddm*Kd*jDLeH@zzULB?mwfxf8+63XZlD-7stf|}ZOMYI^x@f^bM*L&FX`-!b06dGO>9y(Rf=O73}qYZ#%tm0m|W{Yu-7%Q6qZBOG^-Sq(k3PS$%8!_bAN2q`w#WA1_0BT0 zwreCX5)$gAT!sU;@^b|VWF)vzkT{3t!hs8dE241d8Qz=Ob=Igtimb?rM@h=`j%%lplD1#bX63`LxXDpWhF z%RzQIE{lML4PH@9R9P7Ip&ClfYhGROuvUabu}Ft35i){GA6i^RJcL+^DA6ElJW2$v z)DYk=u=#!fJ&`maX>z#8LMb#fls~N>d1-AKj^nDM^k3k^Mzf>AEX*7-*C%!j zHgHqi3BwAjwx}d`3$$4bB7&f-B^J~VfGLh&)OgJCBTB#`)kV+}Ypya?6A=qV(kB#B z@wTVg9i&NRoy+wTDI=C^ zTvv%kSvU7q_8kle9|L7uj%f28H*fElJ6VLI1ZP!YquZR+BlSk%{^88Gbp~O8`rYSAV4+wUOD}Ue^ zy{wbSwp4Lb=yu79(95m$;mU|LIxX#-u)0ZQZ3P6V{RHXD?S8Z-RH7x=T$?#u96R#?*wZ6f;$a^?nSAsW$QR(Ih(M#-Nf!|{J`*uc z8UCdzuR$I4oM74cdcksoLt%c}b8vX);ky%$tfs=rY7b3u;Xs+lXm=9SDO!Pu&>?iz zqEb#f9^xeoD0-4U1dCV`PByHN^vMX!=TrNKTYJ_XDr}hRvj?Z`I_x8uujUtCpx%O@ z*}Z{BpbWgxh@s&$xRZQN#ACG*LC;W~ZEGxe?Qb_ff~6n6fn(5GMhs*`L_^TRUv83C z=qrDCb^oh7uASc=4U}Noi(GBUCRzcRT8`^6u{v}aV$b*sj}5Q`Zh5ID+C0)|m@IS? zMk=o}9G7|rr$1+?tV+J>@pgsRob*#P=&lm!$&P%07GP;zgxH-n`ZtZ5x&Qb-b8wnU z_Y=A59NhzGvMx8f7MIO)i}%lL}$4$InfcRxyuqqYJ_2djUC2@SpS`;M!b!a^DlK8>v=37lGE4owFgc=C75# z&;OsX`S6l8Nee19L~mPiMYB0MceRM~@CHYUx)d&{Ae?^_C9c{Ldej0g10%jIh z6uBd!G{g#{7tFg)9UlI2>gP#w@lwhBdgjBydMA!Cd@XqmF40|S=XS~j4NO0}KySxv zrb1vzy3gHbcX`wbtz}iPgrl(Nm;g;HN=GIm*wK_oFR&QV3PwUL<0RP>4Ev<@3e!9lxs%$o ziwR`P42~Sy+48$A41906bs;GXFJ8J;xPIBadve2@iMQ@zA|2dOGK^_Bdjr`9xg7Jd zw*tEE{BC@9pd@e_YQP!307$S)K^o0eXFig>^e$U4ir?IwoE=z6IS W.toAffine.FunctionField omit [DecidableEq F] in -/-- `pointValuation P f = exp (-n)` from `ord_P P f = n` (for `f ≠ 0`). Curve-side -mirror of `ordAtInftyValuation_eq_exp_neg_of_ordAtInfty_eq`, kept local to avoid an -import of `Hasse.L6Witnesses`. -/ +/-- `pointValuation P f = exp (-n)` follows from `ord_P P f = n` for `f ≠ 0`. -/ theorem pointValuation_eq_exp_neg_of_ord_P_eq {C : Curves.SmoothPlaneCurve F} {P : C.SmoothPoint} {f : C.FunctionField} {n : ℤ} (hf : f ≠ 0) (hn : C.ord_P P f = (n : WithTop ℤ)) : C.pointValuation P f = WithZero.exp (-n) := by have hv : C.pointValuation P f ≠ 0 := (C.pointValuation P).ne_zero_iff.mpr hf have hord : C.ord_P P f = ((-(WithZero.unzero hv).toAdd : ℤ) : WithTop ℤ) := by simp only [Curves.SmoothPlaneCurve.ord_P] - rw [dif_neg hv] + rw [dite_eq_right hv] have hneq : n = -(WithZero.unzero hv).toAdd := by exact_mod_cast (hord.symm.trans hn).symm rw [hneq, neg_neg, WithZero.exp, ofAdd_toAdd, WithZero.coe_unzero] @@ -84,8 +62,8 @@ theorem valuation_aeval_eq_exp (w : Valuation KE (WithZero (Multiplicative ℤ)) intro i rw [Algebra.smul_def, map_mul, map_pow, hu, ← WithZero.exp_nsmul] by_cases hci : p.coeff i = 0 - · rw [if_pos hci, hci, RingHom.map_zero, map_zero, zero_mul] - · rw [if_neg hci, hc _ hci, one_mul] + · rw [ite_eq_left hci, hci, RingHom.map_zero, map_zero, zero_mul] + · rw [ite_eq_right hci, hc _ hci, one_mul] congr 1 rw [nsmul_eq_mul] ring @@ -97,13 +75,13 @@ theorem valuation_aeval_eq_exp (w : Valuation KE (WithZero (Multiplicative ℤ)) refine (Valuation.map_sum_eq_of_lt w (Finset.self_mem_range_succ n) ?_).trans ?_ · intro i hi rw [Finset.mem_sdiff, Finset.mem_range, Finset.mem_singleton] at hi - rw [h_term i, h_term n, if_neg h_lead_ne] + rw [h_term i, h_term n, ite_eq_right h_lead_ne] by_cases hci : p.coeff i = 0 - · rw [if_pos hci] + · rw [ite_eq_left hci] exact lt_of_le_of_ne zero_le (Ne.symm WithZero.exp_ne_zero) - · rw [if_neg hci, WithZero.exp_lt_exp] + · rw [ite_eq_right hci, WithZero.exp_lt_exp] omega - · rw [h_term n, if_neg h_lead_ne] + · rw [h_term n, ite_eq_right h_lead_ne] omit [DecidableEq F] [W.toAffine.IsElliptic] in /-- `algebraMap (Polynomial F) K(E)` is `aeval x_gen` (both are the F-algebra hom @@ -277,10 +255,11 @@ theorem ordAtInftyValuation_basis_summands_distinct {r₁ r₂ : FractionRing (P intro h_eq omega +omit [DecidableEq F] [W.toAffine.IsElliptic] in set_option backward.isDefEq.respectTransparency.types false in /-- **Value on the coordinate function `y`.** A valuation `w` with `w y_gen = exp 3` agrees with `ordAtInftyValuation` on `coordYInFunctionField` (which is `y_gen`): -both equal `exp (-3)`. -/ +both equal `exp 3`. -/ private theorem valuation_coordYInFunctionField_eq_ordAtInftyValuation (w : Valuation KE (WithZero (Multiplicative ℤ))) (hy : w (y_gen W) = WithZero.exp 3) : w (W_smooth W).coordYInFunctionField = @@ -359,6 +338,7 @@ private theorem eq_ordAtInftyValuation_of_agree_fracPolyX_coordY exact valuation_eq_add_of_eq_of_eq_of_distinct W w (W_smooth W).ordAtInftyValuation (h_rat p) hβc_agree (ordAtInftyValuation_basis_summands_distinct W h_not_both) +omit [W.toAffine.IsElliptic] in /-- **Valuation determined by `x_gen`, `y_gen`.** A `ℤᵐ⁰`-valued valuation `w` on `K(E)` with `w x_gen = exp 2`, `w y_gen = exp 3`, and trivial on `F^×` equals `ordAtInftyValuation`. The decomposition `f = α + β·coordY` (`α, β ∈ F(x)`) plus @@ -372,8 +352,9 @@ theorem eq_ordAtInftyValuation_of_x_y (w : Valuation KE (WithZero (Multiplicativ (valuation_algebraMap_fracPolyX_eq_ordAtInftyValuation W w hx hc) (valuation_coordYInFunctionField_eq_ordAtInftyValuation W w hy) +omit [W.toAffine.IsElliptic] in /-- `ord_P (-T) (τ_T x_gen) = -2`, uniformly across 2-torsion and non-2-torsion -`T = (xk, yk)`. Dispatches to the two shipped cases. -/ +`T = (xk, yk)`. -/ theorem ord_P_negSmoothPoint_translateX_xy_eq_neg_two (xk yk : F) (h_ns : W.toAffine.Nonsingular xk yk) : (W_smooth W).ord_P (negSmoothPoint W xk yk h_ns) @@ -382,6 +363,7 @@ theorem ord_P_negSmoothPoint_translateX_xy_eq_neg_two · exact ord_P_translateX_xy_eq_neg_two_at_2tor W xk yk h_ns h · exact ord_P_translateX_xy_eq_neg_two_of_non_2_tor W xk yk h_ns h +omit [W.toAffine.IsElliptic] in /-- `ord_P (-T) (τ_T y_gen) = -3`, uniformly across 2-torsion and non-2-torsion. -/ theorem ord_P_negSmoothPoint_translateY_xy_eq_neg_three (xk yk : F) (h_ns : W.toAffine.Nonsingular xk yk) : @@ -461,11 +443,8 @@ theorem ord_P_negSmoothPoint_translateAlgEquivOfPoint_eq_ordAtInfty_some rw [hm, hn] exact_mod_cast neg_injective h_at_f -/-- **Unconditional discharge of `IsTranslateOrdAtInftyCompatible`.** For a finite -smooth point `P` and a group element `k` with `P + k = O` (so `P = -k`), the -translation pullback `τ_k` carries the order at `P` to the order at infinity: -`ord_P P (τ_k f) = ordAtInfty f` for all `f`. Gates the Weil-pairing divisor -transport. -/ +/-- For a finite smooth point `P` and a group element `k` with `P + k = O`, +translation pullback satisfies `ord_P P (τ_k f) = ordAtInfty f` for every `f`. -/ theorem isTranslateOrdAtInftyCompatible_translateAlgEquivOfPoint (P : (W_smooth W).SmoothPoint) (k : (W_smooth W).toAffine.Point) (h_zero : P.toAffinePoint + k = Affine.Point.zero) : diff --git a/projects/HasseWeil/HasseWeil/Foundation/EC/TranslateValuation.lean b/projects/HasseWeil/HasseWeil/Foundation/EC/TranslateValuation.lean index 0fbf76569d790458fadca970039cf32598f16d3b..8fbe28c64fdb18776583e7ad48fb72d1d909f59c 100644 GIT binary patch delta 113 zcmcckfaA%1jt!d_H~(RbV>B!+PAyhQ&d)7KEXhpD%*iaNRLDr=YRz^_cI$YZ+^qJR))JIH9oa4z9=(2qojGB^7eVkjK8Xo1-H+g$GBx8 E0DZwO_W%F@ diff --git a/projects/HasseWeil/HasseWeil/Foundation/EC/Translation.lean b/projects/HasseWeil/HasseWeil/Foundation/EC/Translation.lean index c135cb1b2..798b434d7 100644 --- a/projects/HasseWeil/HasseWeil/Foundation/EC/Translation.lean +++ b/projects/HasseWeil/HasseWeil/Foundation/EC/Translation.lean @@ -6,43 +6,17 @@ Authors: Chris Birkbeck import HasseWeil.Foundation.AdditionPullback /-! -# Translation by a base-field point on K(E) +# Translation by a base-field point on the function field -For an elliptic curve `W` over `F` and a point `(xk, yk) ∈ W(F)` (= a base-field -solution of the Weierstrass equation), translation by `k = (xk, yk)` lifts -to a K-algebra automorphism `τ_k : K(E) ≃ₐ[F] K(E)` defined by: +Translation by a point `k = (xk, yk)` of an elliptic curve acts on its +function field through the addition formulas. The slope is +`(y_gen − yk) / (x_gen − xk)`, and the translated coordinate functions +are obtained from this slope by `addX` and `addY`. The coordinate-ring +homomorphism extends to the function field when the evaluation map is +injective. Kernel translations preserve pullbacks along isogenies, +relating the point kernel to function-field automorphisms. -* `τ_k(x_gen) = (W_KE).addX(x_gen, xk, slope_k)` where - `slope_k = (y_gen - yk) / (x_gen - xk)`. -* `τ_k(y_gen) = (W_KE).addY(x_gen, xk, y_gen, slope_k)`. - -This is the substantive Galois-correspondence content for elliptic -isogenies (Silverman III.4.10(a)): for an isogeny `α : E → E`, the kernel -of `α` (as an additive subgroup of `E.Point`) acts on `K(E₁)/α*K(E₂)` as -the Galois group, and the bijection `α.kernel ≃ Aut(K(E)/α*K(E))` sends -each kernel element `k` to the translation automorphism `τ_k`. - -This file constructs the translation algebra hom directly via the addition -formula on coordinates, paralleling -`HasseWeil/AdditionPullback.lean`'s `addPullbackAlgHom_negFrobenius` -construction. - -## Foundational definitions - -The translation construction is parallel to `addPullback_x` / `addPullback_y` -but with the second point a base-field constant rather than `α.pullback`. - -* `translateSlope_xy xk yk` — slope from `(x_gen, y_gen)` to `(xk, yk)`. -* `translateX_xy xk yk` — x-coord of `P_gen + (xk, yk)`. -* `translateY_xy xk yk` — y-coord of `P_gen + (xk, yk)`. - -These are foundational K(E)-elements; the algebra-hom construction (analog -of `addPullbackAlgHom`) requires the `AddNonInverse` and injectivity -witnesses. - -## References - -* Silverman, *The Arithmetic of Elliptic Curves*, III.4.10(a). +Reference: Silverman, *The Arithmetic of Elliptic Curves*, III.4.10(a). -/ open WeierstrassCurve @@ -293,6 +267,7 @@ noncomputable def translateAlgHom (xk yk : F) (h_eq : W.toAffine.Equation xk yk) (translateCoordAlgHom_injective_of_baseHom_inj W xk yk h_eq hxy hxinj) omit [DecidableEq F] in +omit [W.toAffine.IsElliptic] in /-- A pole of `translateX_xy` at infinity forces non-constancy: if `ordAtInfty (translateX_xy) < 0` then `translateX_xy` is not `algebraMap F KE c` for any `c : F`. -/ @@ -329,6 +304,7 @@ theorem translateBaseHom_injective_of_transcendental (xk yk : F) exact transcendental_iff_injective.mp h_trans omit [DecidableEq F] in +omit [W.toAffine.IsElliptic] in private theorem ordAtInfty_sub_const_of_neg_aux {g : KE} {n : ℤ} (hn : n < 0) (hg : (W_smooth W).ordAtInfty g = ((n : ℤ) : WithTop ℤ)) (c : F) : (W_smooth W).ordAtInfty (g - algebraMap F KE c) = ((n : ℤ) : WithTop ℤ) := by @@ -339,7 +315,7 @@ private theorem ordAtInfty_sub_const_of_neg_aux {g : KE} {n : ℤ} (hn : n < 0) rw [hg, ordAtInfty_algebraMap_F_nonzero W hc] exact_mod_cast hn -omit [DecidableEq F] in +omit [DecidableEq F] [W.toAffine.IsElliptic] in /-- For any `xk ∈ F`, `ord(x_gen - xk) = -2`, since the constant `xk` has nonnegative order while `x_gen` has order `-2`. -/ theorem ord_x_gen_sub_const (xk : F) : @@ -370,7 +346,7 @@ theorem translateSlope_xy_eq (xk yk : F) : intro h_eq exact x_gen_sub_const_ne_zero W xk (sub_eq_zero.mpr h_eq) -omit [DecidableEq F] in +omit [DecidableEq F] [W.toAffine.IsElliptic] in /-- `ord(y_gen - yk) = -3` for any `yk : F`. -/ theorem ord_y_gen_sub_const (yk : F) : (W_smooth W).ordAtInfty (y_gen W - algebraMap F KE yk) = @@ -378,9 +354,9 @@ theorem ord_y_gen_sub_const (yk : F) : classical exact ordAtInfty_sub_const_of_neg_aux W (by norm_num) (ordAtInfty_y_gen W) yk -omit [DecidableEq F] in -/-- `ord(translateSlope_xy) = -1` for non-zero `xk` (so the slope is in secant -form). -/ +omit [DecidableEq F] [W.toAffine.IsElliptic] in +/-- The translation slope has order `−1` at infinity, as the quotient +of coordinate differences of orders `−3` and `−2`. -/ theorem ord_translateSlope_xy (xk yk : F) : (W_smooth W).ordAtInfty (translateSlope_xy W xk yk) = ((-1 : ℤ) : WithTop ℤ) := by diff --git a/projects/HasseWeil/HasseWeil/Foundation/EC/TranslationOrd.lean b/projects/HasseWeil/HasseWeil/Foundation/EC/TranslationOrd.lean index cea73bd37ab5ea56657974cbcf2551bdc8ca43c8..d6dda63fd0bbf1363e9aa0b34f4b582268277efa 100644 GIT binary patch delta 10891 zcmbta4U8PuUDxc4-DVn_#<9c2ahzu*jh$rooJ-U;y@WJQAi*W>ozqi-DAn!U?%TVG zXJ^hcv%b5Mu#E&X6;!3U&{4yO+Nx@men5&zhSCyb2_ZFw8X<&S2~;%#3JMS+N}xm$ z{Qm#<-hAxtotq*>if?w_d;gE$|M&lR^P9i6=i9$>*)yNFK5&23@d6RWT^T205aNF# zjlD1lyws0Ef&aWv$RO}nQ@_6xa;sw|ODN_fwIs$XGT-64Ad%mtmny5=5&~taynV%4O(xMyg|{#e#a3 z-;`ak-s(g!i645Y6rCtc#`NLVgR$&zQtg4k}!OQh)e zG8lHJUAKAw+0`4QQ9p`TSNx=p9RrB#b^8!MV1JzPf`M`XoxuhH+Y+%*4Lap} zx4mA3!a70$PTzdx(W#~~B}W27q;4rUkO^5C(TzYObNu(SH@>yz;lqFSZMy~0RK#xW z;Zmwi@5`6(O(qMpe^_%=?f9mqXU4B0iSd&(x4%W#_$g? zPsU7F{FnpOV_ujRn~g8*Kl|xFf9g<8$-DmTJ&m_6jDR5f-TB59Ckg;v#NA>9G9^wc zxXF&~vo1fo{>py{dok=~r}kK%rhnv@UT(ea{ul{Rq1`M$Xx+E-eH;{~U7 zXysR|S^qG#dG^(V+0!3wyd}T%*R8Kw`13&a+LPAR`9FT#y3F2mF6_(x^2)}WayzSO)Litn&_$eeTt0<^i{z1}He1N~!;U&&c z!sIgsxq8GY#MCi5#VGimqyhq-M-BviFUv0H6ZdGV#dXYt+*7>CrW=;F>4ck~{6l+}HBn8N)}!Xet7)s<**hMw4`tJTZST)-{kpxY zVa;b>KkOVhUVRFynR~ zkAZ4kXh_Q#n(`4Lr=&uIG1=7s(KHtgQM93Y4HVd?#ZOap$1YHwD!j7|j?|lQCDpqq zCrg(akB%#(MRpIB2S8{F)>2d*fPmah`NMx|U&F>)MYX%+8}N*rmxwhV^_$rOhIicu zix`BQmDNd#nw`j=&aDgBMsd{f;+Sa`s4y}PQI4a^nHM(+yuo!J{^m#Rrr|@-Q6(9p1#--`hM+!i!EWa7_zSybU9*+3b&O>n|CYUXrXKa~#X~fkdBnb+ zV)0P^$LHuAuk80Wh7U+sjeA-0Y~4SmD^iYe z-Fs?KT8V-#T#U^}mQfH+i+QA3ZVR{})2)UAL}dZMrO*rr#S)vL0WtZR_f~>0$I)OF zeYWg_082d81*+(&+Ptb<>J;q}q(vPRa~xCU%E}Vcc2yo3->c+A74;})pSxi1YlI7A zN6vfThtZamnx*6-)V2zOm6#<^q*lwaWU$1`O_9n~WF}l^YD)BO5HEh@vtow3{W4u- zr(dx5X5ah+`;s~Hd#P@_hf#y60LwLqa$y8D1>5Ej578=2!aG(o*5STq1I{sFfOd^ zjUsdlgwMKlr#AgENkiN^gu_MRk@%jBsYt zf!m9MAX)gKjI$bk6O*3e~MKIsZ$h}jH8b0RP-*Dbs=`7A!&cltNHhtlykzFfBDw$km)*@c0g{Y-GnjV&K z8)Fu)70C|xQT8FD;%r!jnFv!N;EvN4Q?SVR~Kn#^>pGZjkH0Z?xU| zHo|uqzvEDTDLZ;fJu&yG(0;0j7)xNHnHOVBub(b>>SW>0D=93vrCri`B zdLo563foX78(*WrQL$ICU`q-nT&s%;sG@MajQfe|^s_F;SQ}bqwjWibTaC+A52C2a zw9%ysH8~I|N3)MkJC|m^I^#T=@4mvh!n&Uv%{s6xRTe5NTC-o-c9(^DS-Vo
  • nO zIpus!ryoV9U72)Zx{?A5R5w(GH&q>&O3;v`94O&6Me|)BYb6qHsgf!=xo0f7PnQAI zW}s#f>Cn`?iYssfllp32NDXBdJH~xAmju@Q7_ zW7^Oc-FHgLIpMO~#!-tPqn<86#P(`3 zWIu4kk@mz98X!Ar-Wrb-<|ADZm)q~0rxG$T-6vwDRgi)CR>H7*uUnU!U z-HK;sL%xQt6#Ecq=!a*36AxoCeQ7>2aN-*cec__FuU#Z_9H}8a1DSkMIS<8+7eixQ zQN+!1aL++`O2*+(>e-&4dv%I(W;+xQ8#r0ZhE6~U*G6&h3n&^E9&MM`$co13DqCBD zf{d7Z5CpQ@TJk!l>Nlede=TEs!-d6hc9X{$;7EPzR`PgD=~eS_!B>KZD~7dNV$5UN zEB|HhJyCTVGG1kZ$K+F3Zq$2qYXaq%iHYpwZ5WE}zQe(6`&bnbEn_fLkcRN+GK;K1 zmkcFJ%)m>d6vz_|41;@u(_zf{z1?v1yJ9!@Uh#m-8#yCIP+^v_0xYR;-o%_BZSw z&+gr4?at5L>9iWR-eaaZW>8u^hG(ROMGTg*>yJ6_+&wlOo60|R%vrZ8B@d_sUm_Ty z<;J}hQxu$A_!98|I9I0k%=`61D(b0VNN%S>JsHr&olJ&gjDpbE;6;L|a9iOPAAMqse^>Jwi2N#uXusa;?cZOfkZ0K<6r0<{do*D(34q)COlb>-0UlhPBZ`Tob#GJ zd%_fUx`v7I(GaK@k%{0?w&Ac-RVIanX&bZuJ>eY6{`q~*t|7<@V_up(pX7dzxWXP-&3^%M)oI2^4C9%8lz=d-B;O;-qls6mk#K5b~Rc^{eb5hRA93Vo6Y2Zx9GfTAAch|cKtKH*>JLr@^^KeXB)vA z*;M%wMF=C5ScrUS45q(gK!<`hpo8Lxe9E)lg3bx3*{2?HuFVez&X=wHkne|wnq z&VS~#^WAOBL6r?KHAi<=WlY{#dL3LWqI07tEl3X4HL9`l0=bBA-V5iVy-NoDvi2G3 z>mOQ3l@K=M4_uNo_W4^IbTXLn0^}T}K)G=!VO|YCjetcVkFt|){J6<24TRH6UDS3< z8`m)btJ4VkEidk@_Q`$KUaP W.toAffine.FunctionField noncomputable def formalU : PowerSeries F := PowerSeries.mk (fun n ↦ formalW_coeff W (n + 3)) +omit [DecidableEq F] [WeierstrassCurve.IsElliptic W.toAffine] in /-- The constant coefficient of `formalU` is 1. -/ @[simp] theorem formalU_constantCoeff : @PowerSeries.constantCoeff F _ (formalU W) = 1 := by rw [← PowerSeries.coeff_zero_eq_constantCoeff_apply, formalU, PowerSeries.coeff_mk, zero_add, formalW_coeff_three] +omit [DecidableEq F] [WeierstrassCurve.IsElliptic W.toAffine] in /-- `formalU W` is a unit in `F⟦X⟧`. -/ theorem formalU_isUnit : IsUnit (formalU W) := by rw [PowerSeries.isUnit_iff_constantCoeff] @@ -92,16 +46,19 @@ theorem formalU_isUnit : IsUnit (formalU W) := by noncomputable def formalU_inv : PowerSeries F := PowerSeries.invOfUnit (formalU W) 1 +omit [DecidableEq F] [WeierstrassCurve.IsElliptic W.toAffine] in /-- `formalU * formalU_inv = 1` in `F⟦X⟧`. -/ @[simp] theorem formalU_mul_inv : formalU W * formalU_inv W = 1 := PowerSeries.mul_invOfUnit (formalU W) 1 (by rw [formalU_constantCoeff]; rfl) +omit [DecidableEq F] [WeierstrassCurve.IsElliptic W.toAffine] in /-- `formalU_inv * formalU = 1` in `F⟦X⟧`. -/ @[simp] theorem formalU_inv_mul : formalU_inv W * formalU W = 1 := PowerSeries.invOfUnit_mul (formalU W) 1 (by rw [formalU_constantCoeff]; rfl) +omit [DecidableEq F] [WeierstrassCurve.IsElliptic W.toAffine] in /-- The constant coefficient of `formalU_inv` is 1. -/ @[simp] theorem formalU_inv_constantCoeff : @PowerSeries.constantCoeff F _ (formalU_inv W) = 1 := by @@ -131,6 +88,7 @@ In `LaurentSeries F`, `formalX W` has order `-2` and `formalY W` has order `-3`. These follow because `formalU_inv W` has order `0` (constant coeff = 1) and `single (-2) 1` resp. `single (-3) 1` have orders `-2` resp. `-3`. -/ +omit [DecidableEq F] [WeierstrassCurve.IsElliptic W.toAffine] in /-- `ofPowerSeries ℤ F (formalU_inv W)` is nonzero in `LaurentSeries F`. -/ theorem ofPowerSeries_formalU_inv_ne_zero : (HahnSeries.ofPowerSeries ℤ F (formalU_inv W) : LaurentSeries F) ≠ 0 := by @@ -144,12 +102,14 @@ theorem ofPowerSeries_formalU_inv_ne_zero : rw [h] at h_nonzero exact one_ne_zero h_nonzero.symm +omit [DecidableEq F] [WeierstrassCurve.IsElliptic W.toAffine] in /-- `formalX W ≠ 0`. -/ theorem formalX_ne_zero : formalX W ≠ 0 := by rw [formalX] exact mul_ne_zero (HahnSeries.single_ne_zero one_ne_zero) (ofPowerSeries_formalU_inv_ne_zero W) +omit [DecidableEq F] [WeierstrassCurve.IsElliptic W.toAffine] in /-- `formalY W ≠ 0`. -/ theorem formalY_ne_zero : formalY W ≠ 0 := by rw [formalY] @@ -157,6 +117,7 @@ theorem formalY_ne_zero : formalY W ≠ 0 := by rw [ne_eq, neg_eq_zero] exact HahnSeries.single_ne_zero one_ne_zero +omit [DecidableEq F] [WeierstrassCurve.IsElliptic W.toAffine] in /-- `ofPowerSeries ℤ F (formalU_inv W)` has `orderTop = 0`. This is because the series has constant coefficient 1, so its order is ≤ 0; and all coefficients at negative indices vanish (since `ofPowerSeries` embeds `ℕ ↪ ℤ`), so its order @@ -177,10 +138,11 @@ theorem ofPowerSeries_formalU_inv_orderTop : rw [HahnSeries.le_orderTop_iff_forall] intro n hn have : ((formalU_inv W : PowerSeries F) : LaurentSeries F).coeff n = 0 := by - rw [PowerSeries.coeff_coe, if_pos]; exact_mod_cast hn + rw [PowerSeries.coeff_coe, ite_eq_left]; exact_mod_cast hn exact this exact le_antisymm h_le h_ge +omit [DecidableEq F] [W.toAffine.IsElliptic] in /-- `formalX W` has `orderTop = -2` in `LaurentSeries F`. -/ theorem formalX_orderTop : (formalX W).orderTop = ((-2 : ℤ) : WithTop ℤ) := by @@ -188,6 +150,7 @@ theorem formalX_orderTop : ofPowerSeries_formalU_inv_orderTop] rfl +omit [DecidableEq F] [W.toAffine.IsElliptic] in /-- `formalY W` has `orderTop = -3` in `LaurentSeries F`. -/ theorem formalY_orderTop : (formalY W).orderTop = ((-3 : ℤ) : WithTop ℤ) := by @@ -204,6 +167,7 @@ has leading coefficient `-1`. These come from expanding the definitions: `formalX = single(-2,1) · (lifted u_inv)` with `(lifted u_inv).leadingCoeff = 1` (since `u_inv` has constant coefficient `1`). -/ +omit [DecidableEq F] [W.toAffine.IsElliptic] in /-- The leading coefficient of the lifted `formalU_inv` is `1` (its constant coefficient as a power series). -/ theorem ofPowerSeries_formalU_inv_leadingCoeff : @@ -222,12 +186,14 @@ theorem ofPowerSeries_formalU_inv_leadingCoeff : rw [hS, this, PowerSeries.coeff_zero_eq_constantCoeff_apply] exact formalU_inv_constantCoeff W +omit [DecidableEq F] [W.toAffine.IsElliptic] in /-- `formalX W` has leading coefficient `1`. -/ theorem formalX_leadingCoeff : (formalX W).leadingCoeff = 1 := by rw [formalX, HahnSeries.leadingCoeff_mul, HahnSeries.leadingCoeff_of_single, ofPowerSeries_formalU_inv_leadingCoeff, mul_one] +omit [DecidableEq F] [W.toAffine.IsElliptic] in /-- `formalY W` has leading coefficient `-1`. -/ theorem formalY_leadingCoeff : (formalY W).leadingCoeff = -1 := by @@ -244,9 +210,8 @@ Weierstrass equation `y² + a₁xy + a₃y - x³ - ... - a₆ = 0` after substit So the proof of `formalXY_weierstrass` is essentially: state the recurrence, clear denominators in the field `LaurentSeries F`, and conclude via the recurrence. -/ --- The Silverman IV.1.1 recurrence `formalW_recurrence` is now proved in --- `HasseWeil/FormalGroup.lean` and used directly here. +omit [DecidableEq F] [WeierstrassCurve.IsElliptic W.toAffine] in /-- `formalW W ≠ 0` because its coefficient at index 3 is 1. -/ theorem formalW_ne_zero : formalW W ≠ 0 := by intro h @@ -258,6 +223,7 @@ theorem formalW_ne_zero : formalW W ≠ 0 := by rw [this] at h3 exact one_ne_zero h3 +omit [DecidableEq F] [WeierstrassCurve.IsElliptic W.toAffine] in /-- `HahnSeries.ofPowerSeries ℤ F (formalW W) ≠ 0` in `LaurentSeries F`. -/ theorem lifted_formalW_ne_zero : HahnSeries.ofPowerSeries ℤ F (formalW W) ≠ 0 := by @@ -265,6 +231,7 @@ theorem lifted_formalW_ne_zero : exact formalW_ne_zero W (HahnSeries.ofPowerSeries_injective (h.trans (map_zero _).symm)) +omit [DecidableEq F] [WeierstrassCurve.IsElliptic W.toAffine] in /-- `formalW = X^3 * formalU` as `PowerSeries F`. -/ theorem formalW_eq_X3_mul_U : formalW W = PowerSeries.X ^ 3 * formalU W := by @@ -282,7 +249,7 @@ theorem formalW_eq_X3_mul_U : rw [hLHS] -- RHS: (X^3 * formalU).coeff n = 0 for n < 3 rw [PowerSeries.coeff_X_pow_mul'] - rw [if_neg (by omega : ¬ 3 ≤ n)] + rw [ite_eq_right (by omega : ¬ 3 ≤ n)] · push Not at hn obtain ⟨m, rfl⟩ := Nat.exists_eq_add_of_le hn rw [add_comm 3 m, PowerSeries.coeff_X_pow_mul] @@ -290,11 +257,12 @@ theorem formalW_eq_X3_mul_U : rw [show formalU W = PowerSeries.mk (fun n ↦ formalW_coeff W (n + 3)) from rfl, PowerSeries.coeff_mk] +omit [DecidableEq F] [WeierstrassCurve.IsElliptic W.toAffine] in /-- `formalW W` has `PowerSeries.order` equal to 3 (since `formalW = X^3 * formalU` and `formalU` is a unit). -/ theorem formalW_ps_order : (formalW W).order = 3 := by rw [formalW_eq_X3_mul_U, PowerSeries.order_mul, PowerSeries.order_X_pow, - PowerSeries.order_zero_of_unit (formalU_isUnit W)] + PowerSeries.order_zero_of_isUnit (formalU_isUnit W)] rfl omit [DecidableEq F] in @@ -335,6 +303,7 @@ private theorem formalW_recurrence_lift : HahnSeries.ofPowerSeries_X] at h exact h +omit [DecidableEq F] [WeierstrassCurve.IsElliptic W.toAffine] in /-- Helper: `formalY W * lifted_formalW W = -1` in `LaurentSeries F`. -/ private theorem formalY_mul_formalW : formalY W * HahnSeries.ofPowerSeries ℤ F (formalW W) = -1 := by @@ -355,6 +324,7 @@ private theorem formalY_mul_formalW : _ = -(1 : LaurentSeries F) * 1 := by rw [h1, h2] _ = -1 := by ring +omit [DecidableEq F] [WeierstrassCurve.IsElliptic W.toAffine] in /-- Helper: `formalX W * lifted_formalW W = single 1 1` in `LaurentSeries F`. -/ private theorem formalX_mul_formalW : formalX W * HahnSeries.ofPowerSeries ℤ F (formalW W) = @@ -377,12 +347,14 @@ private theorem formalX_mul_formalW : _ = HahnSeries.single (1 : ℤ) (1 : F) * 1 := by rw [h1, h2] _ = HahnSeries.single (1 : ℤ) (1 : F) := mul_one _ +omit [DecidableEq F] [W.toAffine.IsElliptic] in /-- `formalY W = -1 / lifted_formalW W` in `LaurentSeries F`. -/ theorem formalY_eq_div : formalY W = -1 / HahnSeries.ofPowerSeries ℤ F (formalW W) := by rw [eq_div_iff (lifted_formalW_ne_zero W)] exact formalY_mul_formalW W +omit [DecidableEq F] [W.toAffine.IsElliptic] in /-- `formalX W = (single 1 1) / lifted_formalW W` in `LaurentSeries F`. -/ theorem formalX_eq_div : formalX W = HahnSeries.single (1 : ℤ) (1 : F) / @@ -390,6 +362,7 @@ theorem formalX_eq_div : rw [eq_div_iff (lifted_formalW_ne_zero W)] exact formalX_mul_formalW W +omit [DecidableEq F] [W.toAffine.IsElliptic] in /-- `(formalX W, formalY W)` satisfies the Weierstrass equation of `W` over `F`, interpreted as an identity in `LaurentSeries F`. @@ -445,6 +418,7 @@ noncomputable def localParam : KE := /- `x_gen_ne_zero` HOISTED to `Foundation/MulByIntPullback.lean` (#7621). -/ +omit [DecidableEq F] [WeierstrassCurve.IsElliptic W.toAffine] in /-- The local parameter is nonzero in `K(E)`. -/ theorem localParam_ne_zero : localParam W ≠ 0 := by simp only [localParam] @@ -470,16 +444,19 @@ through `AdjoinRoot.lift` and `IsLocalization.lift`. -/ noncomputable def localExpand_inner : Polynomial F →+* LaurentSeries F := Polynomial.eval₂RingHom (algebraMap F (LaurentSeries F)) (formalX W) +omit [DecidableEq F] [WeierstrassCurve.IsElliptic W.toAffine] in /-- The inner ring hom sends `Polynomial.X` to `formalX W`. -/ @[simp] theorem localExpand_inner_X : localExpand_inner W Polynomial.X = formalX W := by simp [localExpand_inner] +omit [DecidableEq F] [WeierstrassCurve.IsElliptic W.toAffine] in /-- The inner ring hom sends constants to their algebra image. -/ @[simp] theorem localExpand_inner_C (a : F) : localExpand_inner W (Polynomial.C a) = algebraMap F (LaurentSeries F) a := by simp [localExpand_inner] +omit [DecidableEq F] [W.toAffine.IsElliptic] in /-- The Weierstrass polynomial, evaluated via the inner ring hom at `formalY W`, vanishes. This is `formalXY_weierstrass` expressed in terms of `Polynomial.eval₂`. -/ private theorem localExpand_weierstrass_eval : @@ -505,11 +482,13 @@ private noncomputable def localExpand_coordHom : W.toAffine.CoordinateRing →+* LaurentSeries F := AdjoinRoot.lift (localExpand_inner W) (formalY W) (localExpand_weierstrass_eval W) +omit [DecidableEq F] [W.toAffine.IsElliptic] in /-- The coordinate ring lift sends `AdjoinRoot.root` to `formalY W`. -/ @[simp] private theorem localExpand_coordHom_root : localExpand_coordHom W (AdjoinRoot.root W.toAffine.polynomial) = formalY W := by simp [localExpand_coordHom, AdjoinRoot.lift_root] +omit [DecidableEq F] [W.toAffine.IsElliptic] in /-- `(formalX W ^ n).orderTop = -2 * n` in `LaurentSeries F` (for `n : ℕ`). -/ theorem formalX_pow_orderTop (n : ℕ) : ((formalX W) ^ n).orderTop = ((-2 * n : ℤ) : WithTop ℤ) := by @@ -526,6 +505,7 @@ theorem formalX_pow_orderTop (n : ℕ) : push_cast ring +omit [DecidableEq F] [W.toAffine.IsElliptic] in /-- `(formalX W ^ n).leadingCoeff = 1` in `LaurentSeries F` (for `n : ℕ`). -/ theorem formalX_pow_leadingCoeff (n : ℕ) : ((formalX W) ^ n).leadingCoeff = 1 := by @@ -536,6 +516,7 @@ theorem formalX_pow_leadingCoeff (n : ℕ) : | succ k ih => rw [pow_succ, HahnSeries.leadingCoeff_mul, ih, formalX_leadingCoeff, mul_one] +omit [W.toAffine.IsElliptic] in /-- Auxiliary: for a polynomial `p : F[X]` with `p ≠ 0`, the image `localExpand_inner W p` has `orderTop = -2 * p.natDegree` in `LaurentSeries F`. @@ -588,6 +569,7 @@ theorem localExpand_inner_orderTop_eq {p : Polynomial F} (hp : p ≠ 0) : nlinarith exact (HahnSeries.orderTop_add_eq_right h_lt).trans hB_ord +omit [W.toAffine.IsElliptic] in /-- Auxiliary: for a nonzero polynomial `p : F[X]`, `localExpand_inner W p ≠ 0`. -/ theorem localExpand_inner_ne_zero_of_ne_zero {p : Polynomial F} (hp : p ≠ 0) : localExpand_inner W p ≠ 0 := by @@ -596,6 +578,7 @@ theorem localExpand_inner_ne_zero_of_ne_zero {p : Polynomial F} (hp : p ≠ 0) : rw [h, HahnSeries.orderTop_zero] at horder exact absurd horder WithTop.top_ne_coe +omit [W.toAffine.IsElliptic] in /-- Auxiliary: for a polynomial `p : F[X]` with `p ≠ 0`, the image `localExpand_inner W p` has leading coefficient equal to `p.leadingCoeff`. @@ -653,6 +636,7 @@ theorem localExpand_inner_leadingCoeff {p : Polynomial F} (hp : p ≠ 0) : nlinarith rw [HahnSeries.leadingCoeff_add_eq_right h_lt, hB_lead, ← hDecomp] +omit [W.toAffine.IsElliptic] in /-- Auxiliary: `(localExpand_inner W q) * formalY W` has odd `orderTop` (`= -2 * natDegree q - 3`) when `q ≠ 0`. -/ theorem localExpand_inner_mul_formalY_orderTop @@ -663,6 +647,7 @@ theorem localExpand_inner_mul_formalY_orderTop ← WithTop.coe_add] rfl +omit [W.toAffine.IsElliptic] in /-- The coordinate ring lift is injective. **Proof (Silverman IV.1)**: We use `exists_smul_basis_eq` to write any @@ -738,20 +723,11 @@ private theorem localExpand_coordHom_injective : rw [Affine.CoordinateRing.smul, Polynomial.C_0, map_zero, zero_mul, zero_add, Affine.CoordinateRing.smul, Polynomial.C_0, map_zero, zero_mul] -/-- The **local expansion** ring hom `K(E) → LaurentSeries F`, sending `x_gen ↦ - formalX W` and `y_gen ↦ formalY W`. - -The construction: -1. Build the inner ring hom `i : F[X] →+* LaurentSeries F` sending `X ↦ formalX W`. -2. Lift to `R = AdjoinRoot W.polynomial = F[X][Y]/(W) →+* LaurentSeries F` via - `AdjoinRoot.lift` with root `formalY W`, using `formalXY_weierstrass` for - the evaluation condition. -3. Extend to `K(E) = FractionRing R →+* LaurentSeries F` via `IsFractionRing.lift`, - using that the coordinate ring lift is injective (source is a domain, target - is a field, and the map is nonzero — sends `1` to `1`). -/ + noncomputable def localExpand : KE →+* LaurentSeries F := IsFractionRing.lift (localExpand_coordHom_injective W) +omit [W.toAffine.IsElliptic] in /-- `localExpand` sends `x_gen` to `formalX W`. -/ @[simp] theorem localExpand_x_gen : localExpand W (x_gen W) = formalX W := by simp only [localExpand, x_gen] @@ -761,11 +737,13 @@ noncomputable def localExpand : KE →+* LaurentSeries F := ((AdjoinRoot.of W.toAffine.polynomial) Polynomial.X) = formalX W simp [localExpand_coordHom, AdjoinRoot.lift_of, localExpand_inner] +omit [W.toAffine.IsElliptic] in /-- `localExpand` sends `y_gen` to `formalY W`. -/ @[simp] theorem localExpand_y_gen : localExpand W (y_gen W) = formalY W := by simp only [localExpand, y_gen] rw [IsFractionRing.lift_algebraMap, localExpand_coordHom_root] +omit [W.toAffine.IsElliptic] in /-- `localExpand` is an `F`-algebra hom. -/ theorem localExpand_algebraMap (a : F) : localExpand W (algebraMap F KE a) = @@ -781,6 +759,7 @@ theorem localExpand_algebraMap (a : F) : simp [localExpand_coordHom, AdjoinRoot.lift_of, localExpand_inner, LaurentSeries.algebraMap_apply, HahnSeries.ofPowerSeries_C] +omit [W.toAffine.IsElliptic] in /-- `localExpand` agrees with the inner ring hom `localExpand_inner` on the image of `F[X]` in `K(E)`: `localExpand (algebraMap (Polynomial F) KE p) = localExpand_inner W p`. Both factor the algebra map through the coordinate ring @@ -795,6 +774,7 @@ theorem localExpand_algebraMap_polynomial (p : Polynomial F) : localExpand_inner W p simp [localExpand_coordHom, AdjoinRoot.lift_of] +omit [W.toAffine.IsElliptic] in /-- The `orderTop` of the local expansion of `algebraMap (Polynomial F) KE p` for a nonzero polynomial `p` is `-2 · natDegree p`. This is `localExpand_inner_orderTop_eq` transported through `localExpand_algebraMap_polynomial`. -/ @@ -804,6 +784,7 @@ theorem orderTop_localExpand_algebraMap_polynomial {p : Polynomial F} (hp : p rw [localExpand_algebraMap_polynomial] exact localExpand_inner_orderTop_eq W hp +omit [W.toAffine.IsElliptic] in /-- `localExpand` sends `localParam W` to the variable `t` of `LaurentSeries F`. This is the key compatibility: the local parameter expands to the formal variable. -/ theorem localExpand_localParam : diff --git a/projects/HasseWeil/HasseWeil/Foundation/MulByIntPullback.lean b/projects/HasseWeil/HasseWeil/Foundation/MulByIntPullback.lean index f41767ca5..e2383c638 100644 --- a/projects/HasseWeil/HasseWeil/Foundation/MulByIntPullback.lean +++ b/projects/HasseWeil/HasseWeil/Foundation/MulByIntPullback.lean @@ -368,7 +368,7 @@ private lemma aeval_x_gen (p : Polynomial F) : Polynomial.aeval_X_left_apply] -- The `Subalgebra F KE` scalar-tower instances and the `aeval` defeq steps below need the --- relaxed transparency; this is a defeq setting, not a heartbeat budget. + /- `mulByInt_x W n = Φ_n(x_gen) / ΨSq_n(x_gen)` is transcendental over `F` for `n ≠ 0`. The proof uses the integral closure approach: if `mulByInt_x` were algebraic over `F`, @@ -382,7 +382,7 @@ private lemma mulByInt_x_transcendental (n : ℤ) (hn : n ≠ 0) : intro h_alg apply x_gen_transcendental W set S : Subalgebra F KE := Algebra.adjoin F ({mulByInt_x W n} : Set KE) with hS_def - haveI hS_alg : Algebra.IsAlgebraic F S := + have hS_alg : Algebra.IsAlgebraic F S := (Subalgebra.isAlgebraic_iff S).mp (Algebra.isAlgebraic_adjoin_singleton_iff.mpr h_alg) have hmem : mulByInt_x W n ∈ S := Algebra.subset_adjoin (Set.mem_singleton _) @@ -448,10 +448,8 @@ private lemma norm_smul_basis_ne_zero (p q : Polynomial F) (hq : q ≠ 0) : (not_le.mpr (WithBot.bot_lt_iff_ne_bot.mpr this)) omit [W.toAffine.IsElliptic] in -/-- The image in `R = F[C]` of the `F[X]`-norm of the basis element `r' = p•1 + q•Y` -factors as `r' * conj_r`, where `conj_r` is the `F[X]`-conjugate class. Extracted as its -own lemma so it elaborates in a light context (the `coe_norm_smul_basis` rewrite and the -ring-hom bookkeeping are heartbeat-heavy inside the main injectivity proof). -/ + + private lemma algebraMap_norm_smul_basis_eq (p q : Polynomial F) : algebraMap (Polynomial F) R (Algebra.norm (Polynomial F) (p • (1 : R) + q • Affine.CoordinateRing.mk W.toAffine Polynomial.X)) = diff --git a/projects/HasseWeil/HasseWeil/Foundation/OmegaCoeffMulByIntFiniteField.lean b/projects/HasseWeil/HasseWeil/Foundation/OmegaCoeffMulByIntFiniteField.lean index a61618eea..51a6ac743 100644 --- a/projects/HasseWeil/HasseWeil/Foundation/OmegaCoeffMulByIntFiniteField.lean +++ b/projects/HasseWeil/HasseWeil/Foundation/OmegaCoeffMulByIntFiniteField.lean @@ -8,35 +8,35 @@ import HasseWeil.HasseBound.Primitives import HasseWeil.Foundation.EC.MulByIntAddRecurrence /-! -# Silverman III.5.3: `a_{[m]} = m` via curve-side additivity (Route B assembly) +# Pullback coefficients of integer multiplication -Builds on **RB-ω4** (`kaehler_D_addPullback_x_eq_one_add_smul_omega`, the Silverman III.5.2 -collapse) to assemble `omegaPullbackCoeff (mulByInt m) = m` WITHOUT the EDS Wronskian and WITHOUT -the formal-group correspondence. +The addition formula for the invariant differential gives +`a_{id+α} = 1 + a_α` and `a_{α+β} = a_α + a_β`. The multiplication-coordinate +recurrence then proves `a_{[m]} = m` for nonzero integers by induction and +negation. In positive characteristic, multiplication by the characteristic +has zero differential coefficient. Over a finite field, the same holds for +multiplication by its cardinality and supplies the differential input to +Verschiebung factorization. -* **RB-ADD** (`omegaPullbackCoeff_addIsog_id`): - `omegaPullbackCoeff (id ⊞ α) = 1 + omegaPullbackCoeff α`. -* **RB-ID/SUM/IND**: `id ⊞ [m] = [m+1]`, induction → `omegaPullbackCoeff (mulByInt m) = m`. - -This is Silverman III.5.2 `(φ+ψ)*ω = φ*ω + ψ*ω` specialised to `φ = id`, then III.5.3's induction. +References: Silverman, *The Arithmetic of Elliptic Curves*, III.5.2–3. -/ open WeierstrassCurve namespace HasseWeil -variable {K : Type*} [Field K] [Fintype K] [DecidableEq K] +variable {K : Type*} [Field K] [DecidableEq K] (W : WeierstrassCurve K) [W.toAffine.IsElliptic] local notation "KE" => W.toAffine.FunctionField local notation "R" => W.toAffine.CoordinateRing -/-- **RB-ADD** (Silverman III.5.2, `φ = id` case): for the genuine sum isogeny `σ = id ⊞ α` +/-- Silverman III.5.2 for addition with the identity: for the genuine sum isogeny `σ = id ⊞ α` (built via `addIsog` on the pair `(id, α)`), the omega-pullback coefficient is `1 + a_α`. Proof: by uniqueness in the 1-dimensional Kähler module. `omegaPullbackCoeff_spec` gives `a_σ • ω = (α*u of σ)⁻¹ • D(σ*x)`. Now `σ*x = addPullback_x α` and `α*u of σ = u₃ := -2·addPullback_y + a₁·addPullback_x + a₃`, while RB-ω4 says `D(addPullback_x α) = u₃ · (1+a_α) · ω`. +2·addPullback_y + a₁·addPullback_x + a₃`, while the addition identity says `D(addPullback_x α) = u₃ · (1+a_α) · ω`. So `a_σ • ω = u₃⁻¹ · u₃ · (1+a_α) · ω = (1+a_α) · ω`, hence `a_σ = 1 + a_α`. -/ theorem omegaPullbackCoeff_addIsog_id (α : Isogeny W.toAffine W.toAffine) @@ -115,21 +115,16 @@ theorem omegaPullbackCoeff_addIsog_pair kaehler_D_addPullback_x_pair_eq_smul_omega W α₁ α₂ h_ne, smul_smul, inv_mul_cancel₀ hu3_ne, one_smul] --- **RB-ID core** (`addPullback_xy_mulByInt_eq_succ`, the Silverman III.5.3 addition recurrence --- `P ⊞ [m]P = [m+1]P`) lives in `HasseWeil.EC.MulByIntAddRecurrence` (minimal imports, to skirt the --- `(W_KE W).toAffine.Point` ℤ-smul instance diamond — see `SK-ROUTEB-SMUL-DIAMOND` there). It is --- imported above and consumed by RB-IND below. - -/-- **RB chord step** (Silverman III.5.3 recurrence at the differential level): for `k ≥ 2`, +/-- The Silverman III.5.3 recurrence at the differential level: for `k ≥ 2`, `a_{[k+1]} = 1 + a_{[k]}`. Proof. By uniqueness in the 1-dimensional Kähler module. `omegaPullbackCoeff_spec` gives `a_{[k+1]} • ω = (α*u of [k+1])⁻¹ • D([k+1]*x)`. Now: -* `[k+1]*x = mulByInt_x (k+1) = addPullback_x [k]` (RB-ID), so `D([k+1]*x) = D(addPullback_x [k])`. -* RB-ω4 (α = `[k]`, with `x_gen ≠ [k]*x` since `k ≥ 2`): +* `[k+1]*x = mulByInt_x (k+1) = addPullback_x [k]` (the multiplication-coordinate recurrence), so `D([k+1]*x) = D(addPullback_x [k])`. +* The differential addition identity (α = `[k]`, with `x_gen ≠ [k]*x` since `k ≥ 2`): `D(addPullback_x [k]) = u₃ • ((1 + a_{[k]}) • ω)` where `u₃ = 2·addPullback_y [k] + a₁·addPullback_x [k] + a₃`. -* RB-ID rewrites `addPullback_x/y [k] = mulByInt_x/y (k+1)`, so `u₃ = α*u of [k+1]` (definitionally, +* The coordinate recurrence rewrites `addPullback_x/y [k] = mulByInt_x/y (k+1)`, so `u₃ = α*u of [k+1]` (definitionally, via `alpha_star_u_mulByInt`). Hence `a_{[k+1]} • ω = u₃⁻¹ • (u₃ • (1 + a_{[k]}) • ω) = (1 + a_{[k]}) • ω`. -/ @@ -142,15 +137,15 @@ theorem omegaPullbackCoeff_mulByInt_succ (k : ℤ) (hk2 : 2 ≤ k) : have hx_ne : x_gen W ≠ mulByInt_x W k := by rw [← mulByInt_x_one W] exact mulByInt_x_ne_mulByInt_x W 1 k one_ne_zero hk0 (by omega) (by omega) - -- `[k]*x = mulByInt_x k`, so RB-ω4's hypothesis `x_gen ≠ [k]*x` is `hx_ne`. + -- `[k]*x = mulByInt_x k`, so the differential addition hypothesis `x_gen ≠ [k]*x` is `hx_ne`. have hkx : (mulByInt W.toAffine k).pullback (x_gen W) = mulByInt_x W k := mulByInt_pullback_x W k hk0 have hx_ne_pb : x_gen W ≠ (mulByInt W.toAffine k).pullback (x_gen W) := by rw [hkx]; exact hx_ne - -- RB-ID: `addPullback_x/y [k] = mulByInt_x/y (k+1)`. + -- The coordinate recurrence: `addPullback_x/y [k] = mulByInt_x/y (k+1)`. obtain ⟨hAx, hAy⟩ := addPullback_xy_mulByInt_eq_succ W k hk0 hk1 hx_ne -- `α*u of [k+1] = u₃ := 2·addPullback_y [k] + a₁·addPullback_x [k] + a₃` - -- (def + RB-ID + alpha_star_u_mulByInt). + -- (by the coordinate recurrence and alpha_star_u_mulByInt). have hu : alpha_star_u W (mulByInt W.toAffine (k + 1)) = 2 * addPullback_y W (mulByInt W.toAffine k) + algebraMap K KE W.a₁ * addPullback_x W (mulByInt W.toAffine k) @@ -159,7 +154,7 @@ theorem omegaPullbackCoeff_mulByInt_succ (k : ℤ) (hk2 : 2 ≤ k) : have hu3_ne : 2 * addPullback_y W (mulByInt W.toAffine k) + algebraMap K KE W.a₁ * addPullback_x W (mulByInt W.toAffine k) + algebraMap K KE W.a₃ ≠ 0 := hu ▸ alpha_star_u_ne_zero W (mulByInt W.toAffine (k + 1)) - -- `[k+1]*x = addPullback_x [k]` (mulByInt_pullback_x + RB-ID). + -- `[k+1]*x = addPullback_x [k]` (by mulByInt_pullback_x and the coordinate recurrence). have hpx : (mulByInt W.toAffine (k + 1)).pullback (algebraMap R KE (algebraMap (Polynomial K) R Polynomial.X)) = addPullback_x W (mulByInt W.toAffine k) := by @@ -169,7 +164,7 @@ theorem omegaPullbackCoeff_mulByInt_succ (k : ℤ) (hk2 : 2 ≤ k) : kaehler_D_addPullback_x_eq_one_add_smul_omega W (mulByInt W.toAffine k) hx_ne_pb, smul_smul, inv_mul_cancel₀ hu3_ne, one_smul] -/-- `a_{[n]} = n` for all `n ≥ 2`, by `Int.leInduction` from the axiom-clean base case `n = 2` +/-- `a_{[n]} = n` for all `n ≥ 2`, by `Int.leInduction` from the base case `n = 2` (`omegaPullbackCoeff_mulByInt_two`), with step `k ≥ 2 ⟹ k+1` via the chord step `omegaPullbackCoeff_mulByInt_succ`. -/ theorem omegaPullbackCoeff_mulByInt_ge_two (n : ℤ) (hn : 2 ≤ n) : @@ -180,7 +175,7 @@ theorem omegaPullbackCoeff_mulByInt_ge_two (n : ℤ) (hn : 2 ≤ n) : rw [omegaPullbackCoeff_mulByInt_succ W k hk2, ih, Int.cast_add, Int.cast_one, map_add, map_one, add_comm] -/-- **RB-IND** (Silverman III.5.3, positive case): `a_{[n]} = n` for all `n ≥ 1`. Combines the +/-- Silverman III.5.3 for positive integers: `a_{[n]} = n` for all `n ≥ 1`. Combines the `n = 1` case (`[1] = id`, `a_id = 1`) with `omegaPullbackCoeff_mulByInt_ge_two`. -/ theorem omegaPullbackCoeff_mulByInt_pos (n : ℤ) (hn : 1 ≤ n) : omegaPullbackCoeff W (mulByInt W.toAffine n) = algebraMap K KE n := by @@ -188,8 +183,7 @@ theorem omegaPullbackCoeff_mulByInt_pos (n : ℤ) (hn : 1 ≤ n) : · subst h1; rw [mulByInt_one_eq_id, omegaPullbackCoeff_id, Int.cast_one, map_one] · exact omegaPullbackCoeff_mulByInt_ge_two W n (by omega) -omit [Fintype K] in -/-- **RB negation**: `a_{[-n]} = -a_{[n]}` for `n ≠ 0`. The `[-n]`-pullback of `x_gen` +/-- Negation of the multiplication differential coefficient: `a_{[-n]} = -a_{[n]}` for `n ≠ 0`. The `[-n]`-pullback of `x_gen` agrees with the `[n]`-pullback (`mulByInt_x_neg`), while `α*u` flips sign (`negY`-symmetry of `mulByInt_y`), so the spec equation flips sign and uniqueness gives the result. -/ @@ -219,9 +213,9 @@ theorem omegaPullbackCoeff_mulByInt_neg (n : ℤ) (hn : n ≠ 0) : congr 1 exact (omegaPullbackCoeff_spec W (mulByInt W.toAffine n)).symm -/-- **RB-IND (Silverman III.5.3)**, integer form: `a_{[n]} = n` for all `n ≠ 0`, by the chord-step -induction (positive `n`) and the negation symmetry (negative `n`). Reroutes -`omegaPullbackCoeff_mulByInt` off the (still partial) EDS Wronskian. -/ +/-- Silverman III.5.3 for all nonzero integers: `a_{[n]} = n`. +Positive integers follow by the chord recurrence and negative integers by +negation symmetry. -/ theorem omegaPullbackCoeff_mulByInt_routeB (n : ℤ) (hn : n ≠ 0) : omegaPullbackCoeff W (mulByInt W.toAffine n) = algebraMap K KE n := by rcases lt_or_gt_of_ne hn with hneg | hpos @@ -233,21 +227,17 @@ theorem omegaPullbackCoeff_mulByInt_routeB (n : ℤ) (hn : n ≠ 0) : · -- n > 0: direct from the positive induction. exact omegaPullbackCoeff_mulByInt_pos W n (by omega) -/-- **Pillar B endpoint (wronskian-free, formal-group-free)**: in characteristic `p`, `[p]*ω = 0`, -i.e. `a_{[p]} = (p : K) = 0`. The axiom-clean Route B replacement for the formal-group -`omegaPullbackCoeff_mulByInt_p_eq_zero_via_formalGroup` and the wronskian -`omegaPullbackCoeff_mulByInt`. Direct from `omegaPullbackCoeff_mulByInt_routeB` -+ `CharP.cast_eq_zero`. -/ +/-- In characteristic `p`, multiplication by `p` has zero differential +coefficient, since its coefficient is the image of `p` in the base field. -/ theorem omegaPullbackCoeff_mulByInt_p_eq_zero_routeB (p : ℕ) [CharP K p] (hp : p ≠ 0) : omegaPullbackCoeff W (mulByInt W.toAffine (p : ℤ)) = 0 := by rw [omegaPullbackCoeff_mulByInt_routeB W (p : ℤ) (by exact_mod_cast hp), show ((p : ℤ) : K) = 0 from by rw [Int.cast_natCast]; exact CharP.cast_eq_zero K p, map_zero] -/-- **Pillar B endpoint at `q = #K`** (`[q]*ω = 0`): over the finite field `K`, the ω-pullback -coefficient of `[q]` vanishes, since `a_{[q]} = (q : K) = 0` (`#K = char^n`). Axiom-clean via -`omegaPullbackCoeff_mulByInt_routeB`; this is the `q`-th-root input to the Verschiebung -factorisation `[q] = V ∘ Frob`. -/ -theorem omegaPullbackCoeff_mulByInt_card_eq_zero : +/-- Over a finite field, multiplication by its cardinality has zero +differential coefficient. This is the differential input to the Verschiebung +factorization `[q] = V ∘ Frob`. -/ +theorem omegaPullbackCoeff_mulByInt_card_eq_zero [Fintype K] : omegaPullbackCoeff W (mulByInt W.toAffine (Fintype.card K : ℤ)) = 0 := by rw [omegaPullbackCoeff_mulByInt_routeB W (Fintype.card K : ℤ) (by exact_mod_cast Fintype.card_ne_zero), diff --git a/projects/HasseWeil/HasseWeil/Foundation/OmegaPullbackCoeff.lean b/projects/HasseWeil/HasseWeil/Foundation/OmegaPullbackCoeff.lean index 61150a90c..a51582216 100644 --- a/projects/HasseWeil/HasseWeil/Foundation/OmegaPullbackCoeff.lean +++ b/projects/HasseWeil/HasseWeil/Foundation/OmegaPullbackCoeff.lean @@ -24,7 +24,7 @@ With `a_α ∈ F`: - Additivity: `a_{α+β} = a_α + a_β` (from Silverman III.5.2) - `a_{[n]} = n` (from Silverman III.5.3) -## Implementation +## Kähler differential construction The pullback `α*(ω)` in the Kähler differential module Ω[K(E)/F] is computed as: `α*(ω) = D(α*(x)) · α*(u)⁻¹` @@ -98,11 +98,9 @@ theorem omegaPullbackCoeff_spec (α : Isogeny W.toAffine W.toAffine) : (α.pullback (algebraMap R KE (algebraMap (Polynomial F) R Polynomial.X))))).choose_spec --- Chain rule for `omegaPullbackCoeff`. The chain rule `a_{α∘β} = a_α · a_β` holds when `a_α` --- is in the base field `F` (so that `β*(a_α) = a_α`); for the Silverman convention `a_α ∈ F` --- always holds (Silverman III.5.5). It is proved abstractly as `omegaPullbackCoeff_comp_of_base` --- in `HasseWeil/InvariantDifferentialPullback.lean`; not restated here to avoid a naming clash. --- For `α = [n]` we get `a_{[n]} = n ∈ F`, which is what the Hasse bound needs. +-- The chain rule `a_{α∘β} = a_α · a_β` holds when `a_α` lies in the base +-- field, so that the pullback by `β` fixes it. For multiplication by `n`, the +-- differential coefficient is `n`, as in Silverman III.5.3. /-- Uniqueness of the omega-based pullback coefficient: in the 1-dimensional Kähler module, if `c₁ • ω = c₂ • ω` then `c₁ = c₂` (since `ω ≠ 0` and `KE` is a field). -/ @@ -124,7 +122,7 @@ theorem mulByInt_pullback_x (n : ℤ) (hn : n ≠ 0) : (mulByInt W.toAffine n).pullback (algebraMap R KE (algebraMap (Polynomial F) R Polynomial.X)) = mulByInt_x W n := by - have hpb : (mulByInt W.toAffine n).pullback = mulByInt_pullbackAlgHom W n hn := dif_neg hn + have hpb : (mulByInt W.toAffine n).pullback = mulByInt_pullbackAlgHom W n hn := dite_eq_right hn rw [hpb] change mulByInt_pullbackRingHom W n hn (algebraMap R KE (algebraMap (Polynomial F) R Polynomial.X)) = _ @@ -140,7 +138,7 @@ theorem mulByInt_pullback_y (n : ℤ) (hn : n ≠ 0) : (mulByInt W.toAffine n).pullback (algebraMap R KE (AdjoinRoot.root W.toAffine.polynomial)) = mulByInt_y W n := by - have hpb : (mulByInt W.toAffine n).pullback = mulByInt_pullbackAlgHom W n hn := dif_neg hn + have hpb : (mulByInt W.toAffine n).pullback = mulByInt_pullbackAlgHom W n hn := dite_eq_right hn rw [hpb] change mulByInt_pullbackRingHom W n hn (algebraMap R KE (AdjoinRoot.root W.toAffine.polynomial)) = _ @@ -331,11 +329,6 @@ private lemma wronskian_X_mul_sub (f q : Polynomial F) : simp [Polynomial.derivative_sub, Polynomial.derivative_mul, Polynomial.derivative_X] ring --- The auxiliary ring identity `wronskian_aux_three` has been moved to --- `HasseWeil/WronskianAux.lean` (together with `wronskian_aux_four`) to isolate --- its expensive elaboration. It is reused unchanged from there. - --- Case m=3: proved via `wronskian_aux_three` from `HasseWeil/WronskianAux.lean`. -- The key insight: both LHS and RHS factor through Ψ₃, and after cancellation -- the identity reduces to wronskian_aux_three (a tractable ring computation). omit [DecidableEq F] [W.toAffine.IsElliptic] in @@ -371,10 +364,7 @@ private lemma wronskian_Φ_ΨSq_three : -- Silverman III.3.7 auxiliary: verified ring identity for m=4. -- Only expands to b₂, b₄, b₆, b₈ (not a₁..a₆) keeping the ring computation tractable. --- The auxiliary ring identity `wronskian_aux_four` has been moved to --- `HasseWeil/WronskianAux.lean` to isolate its ~57 GB ring elaboration. --- Case m=4: proved via `wronskian_aux_four` from `HasseWeil/WronskianAux.lean`. -- After applying wronskian_X_mul_sub to restructure the Wronskian, -- and expanding preΨ(8) via preΨ_even(4)/preΨ_odd(2)/preΨ_even(3), -- the goal matches wronskian_aux_four exactly (up to 1-simplification). @@ -420,96 +410,6 @@ private lemma wronskian_Φ_ΨSq_four : simp only [Polynomial.C_ofNat] at haux ⊢ linear_combination haux -omit [DecidableEq F] [W.toAffine.IsElliptic] in -/-- The polynomial Wronskian identity for non-negative integers, by **strong induction**. - - Base cases `m = 0,1,2` use direct computation; `m = 3,4` use the factored ring identities - (`wronskian_aux_three`, `wronskian_aux_four`). For `m = n+5` the proof is by strong induction: - the induction hypothesis `ih` provides the identity at **all** smaller indices `k < m`. - - ## Status of the `m ≥ 5` inductive step - - The inductive step is the elliptic-divisibility-sequence (EDS) Wronskian recursion. Writing - `p k := W.preΨ k` and `s := W.Ψ₂Sq`, and `W(k) := Φ_k' ΨSq_k − Φ_k ΨSq_k'`, the target is - `W(k) = k · p(2k)`. The two halving recursions that drive the induction are (both verified by - computer algebra against the actual division polynomials): - - * **Even step.** `W(2m) = 2 · complEDS₂(2m) · W(m)`, where - `complEDS₂(2m) = p(2m-1)² p(2m+2) − p(2m-2) p(2m+1)²`. Combined with the induction hypothesis - `W(m) = m · p(2m)` and `p(4m) = complEDS₂(2m) · p(2m)` (mathlib's `preNormEDS_mul_complEDS₂`) - this collapses to `W(2m) = 2m · p(4m)`, i.e. the claim at `2m`. Both `m` and `m±1 < 2m`. - * **Odd step.** The analogous reduction of `W(2m+1)` to `W(m)` and `W(m+1)`. - - The irreducible algebraic content of *each* halving step is the **EDS addition formula** - (Ward's relation), verified by CAS in the exact form - `p(i+j) p(i-j) = Aᵢ · p(i+1) p(i-1) p(j)² − Aⱼ · p(j+1) p(j-1) p(i)²`, - with `Aᵢ = s²` iff (`i` odd and `j` even) else `1`, and `Aⱼ = s²` iff (`i` even and `j` odd) - else `1`. Its `j = 2` specialisation is the Somos‑4 relation - `p(m+2) p(m-2) = (Even m ? 1 : s²) · p(m+1) p(m-1) − Ψ₃ · p(m)²`. - - The even step `W(2m) = 2·complEDS₂(2m)·W(m)` is **not** a free-ring identity in the consecutive - `preΨ` values alone — it is provably *false* without further relations, and is *not* closed by - Somos‑4 together with the Weierstrass `b`-relation either: it genuinely requires the addition - formula at general index `j`. Mathlib does not currently provide the EDS addition formula - (only the duplication recursions `preΨ_even`/`preΨ_odd`), so closing this step needs that - formula to be developed first. The `WronskianAux` `m = 3,4` proofs avoid it only because, at - fixed small index, the difference factors through the single `b`-relation with an explicitly - computed multiplier; - that multiplier grows with the index, so the same device does not generalise. - - An **axiom-clean** alternative is available downstream of this file via the function field: - the field-general Route-B chord induction `omegaCoeff_mulByInt` - (`HasseWeil/RouteBGeneral.lean`) proves the differential statement `[n]*ω = n·ω` - (Silverman III.5.3) over any field, with no EDS Wronskian; it cannot be imported here (it - depends transitively on this file), but every former geometric consumer of the Wronskian - (`Hasse/Separability.lean`, `PullbackCoeff.lean`) now routes through it, so this `sorry` is - **consumer-free**. The polynomial identity itself also has an axiom-clean downstream proof: - `wronskian_Φ_ΨSq_general` (`EC/WronskianGeneral.lean`). -/ -private lemma wronskian_Φ_ΨSq_nat (m : ℕ) : - Polynomial.derivative (W.Φ (m : ℤ)) * W.ΨSq (m : ℤ) - - W.Φ (m : ℤ) * Polynomial.derivative (W.ΨSq (m : ℤ)) = - Polynomial.C ((m : ℤ) : F) * W.preΨ (2 * (m : ℤ)) := by - induction m using Nat.strong_induction_on with - | _ m ih => - -- `ih : ∀ k < m, (the identity at k)` — the strong induction hypothesis. - match m, ih with - | 0, _ => exact wronskian_Φ_ΨSq_zero W - | 1, _ => exact_mod_cast wronskian_Φ_ΨSq_one W - | 2, _ => exact_mod_cast wronskian_Φ_ΨSq_two W - | 3, _ => exact_mod_cast wronskian_Φ_ΨSq_three W - | 4, _ => exact_mod_cast wronskian_Φ_ΨSq_four W - | (n + 5), ih => - -- General case `m = n+5 ≥ 5`. The induction hypothesis `ih k hk` gives the identity at - -- every `k < n+5`, in particular at the halves `⌊(n+5)/2⌋`, `⌈(n+5)/2⌉` needed by the EDS - -- Wronskian recursion (even/odd halving step). The single missing ingredient is the EDS - -- addition formula (see the docstring above); supplying it closes this step via - -- `linear_combination` of the induction hypothesis at the halves with the - -- addition-formula / Somos‑4 instances. - sorry - -omit [DecidableEq F] [W.toAffine.IsElliptic] in -/-- The division polynomial Wronskian identity: - `Φ_n' · ΨSq_n - Φ_n · ΨSq_n' = n · preΨ(2n)` as polynomials in `F[X]`. - - Reference: Silverman Exercise III.3.7. - - Proved by reducing to the natural number case via `wronskian_Φ_ΨSq_neg_of` - (negation symmetry) and `wronskian_Φ_ΨSq_nat` (positive case by induction). -/ -theorem wronskian_Φ_ΨSq (n : ℤ) : - Polynomial.derivative (W.Φ n) * W.ΨSq n - W.Φ n * Polynomial.derivative (W.ΨSq n) = - Polynomial.C (n : F) * W.preΨ (2 * n) := by - rcases lt_or_ge n 0 with hneg | hpos - · -- n < 0: use negation symmetry on the positive case - have hm : (0 : ℤ) ≤ -n := by omega - obtain ⟨m, hm_eq⟩ := Int.eq_ofNat_of_zero_le hm - have hn_eq : n = -(m : ℤ) := by omega - rw [hn_eq] - exact wronskian_Φ_ΨSq_neg_of W (wronskian_Φ_ΨSq_nat W m) - · -- n ≥ 0: directly from wronskian_Φ_ΨSq_nat - obtain ⟨m, hm_eq⟩ := Int.eq_ofNat_of_zero_le hpos - subst hm_eq - exact wronskian_Φ_ΨSq_nat W m - omit [DecidableEq F] [W.toAffine.IsElliptic] in /-- `Φ_ff` and `ΨSq_ff` factor through `algebraMap (Polynomial F) KE`. -/ private lemma Φ_ff_eq_algebraMap_poly (n : ℤ) : @@ -527,7 +427,7 @@ private lemma ΨSq_ff_eq_algebraMap_poly (n : ℤ) : This is the polynomial shadow of the third division polynomial `ω_n` and follows from the geometric facts `preΨ(2n)·u = ψ_n·ψc_n` (i.e. `ψ_{2n} = ψ_n·ψc_n`, `ψc_spec_ff`) and `α*(u) = ψc_n/ψ_n³` (`ω_spec_ff`), together with `ΨSq_ff = ψ_n²` (`ψ_ff_sq_eq`). It does **not** - use the division-polynomial Wronskian, so it is axiom-clean and can be combined with the + use the division-polynomial Wronskian, and can be combined with the chord-recursion `omegaPullbackCoeff_mulByInt_routeB` downstream to recover the polynomial Wronskian. -/ theorem preΨ_two_mul_u_eq_ΨSq_sq_mul_alpha_star_u (n : ℤ) (hn : n ≠ 0) : @@ -543,7 +443,7 @@ theorem preΨ_two_mul_u_eq_ΨSq_sq_mul_alpha_star_u (n : ℤ) (hn : n ≠ 0) : have h_preΨ_u : algebraMap (Polynomial F) KE (W.preΨ (2 * n)) * u_gen W = ψn * ψcn := by rw [hψn_def, hψcn_def, ψc_spec_ff W n, Affine.CoordinateRing.mk_ψ (W := W.toAffine) (2 * n)] have hΨ_eq : W.Ψ (2 * n) = Polynomial.C (W.preΨ (2 * n)) * W.ψ₂ := by - rw [WeierstrassCurve.Ψ, if_pos (even_two_mul n)] + rw [WeierstrassCurve.Ψ, ite_eq_left (even_two_mul n)] rw [hΨ_eq, map_mul, map_mul, show W.ψ₂ = W.toAffine.polynomialY from rfl, mk_polynomialY_eq_u_gen W] rfl @@ -578,8 +478,7 @@ theorem preΨ_two_mul_u_eq_ΨSq_sq_mul_alpha_star_u (n : ℤ) (hn : n ≠ 0) : - mk(polynomialY) = u_gen in K(E) Taking `hpoly` as a hypothesis lets specific values of `n` (e.g. `n = 2`) be - discharged from the axiom-clean per-value polynomial lemmas - (`wronskian_Φ_ΨSq_two`, …), independently of the general `wronskian_Φ_ΨSq`. + discharged from the per-value polynomial identities such as `wronskian_Φ_ΨSq_two`. Reference: Silverman Exercise III.3.7, III.5.3 -/ theorem divPoly_wronskian_identity_of_poly (n : ℤ) (hn : n ≠ 0) (hpoly : Polynomial.derivative (W.Φ n) * W.ΨSq n - @@ -618,7 +517,7 @@ theorem divPoly_wronskian_identity_of_poly (n : ℤ) (hn : n ≠ 0) have h_preΨ_u : algebraMap (Polynomial F) KE (W.preΨ (2 * n)) * u_gen W = ψn * ψcn := by rw [hψn_def, hψcn_def, ψc_spec_ff W n, Affine.CoordinateRing.mk_ψ (W := W.toAffine) (2 * n)] have hΨ_eq : W.Ψ (2 * n) = Polynomial.C (W.preΨ (2 * n)) * W.ψ₂ := by - rw [WeierstrassCurve.Ψ, if_pos (even_two_mul n)] + rw [WeierstrassCurve.Ψ, ite_eq_left (even_two_mul n)] rw [hΨ_eq, map_mul, map_mul, show W.ψ₂ = W.toAffine.polynomialY from rfl, mk_polynomialY_eq_u_gen W] rfl @@ -646,20 +545,6 @@ theorem divPoly_wronskian_identity_of_poly (n : ℤ) (hn : n ≠ 0) h_preΨ_u, h_alpha_u, show ΨSq_ff W n = ψn ^ 2 from (ψ_ff_sq_eq W n).symm] field_simp -/-- The division polynomial Wronskian identity in K(E) (general `n`), via the - general polynomial-level identity `wronskian_Φ_ΨSq`. - Reference: Silverman Exercise III.3.7, III.5.3 -/ -theorem divPoly_wronskian_identity (n : ℤ) (hn : n ≠ 0) : - (algebraMap (Polynomial F) KE (Polynomial.derivative (W.Φ n)) * - ΨSq_ff W n - - Φ_ff W n * - algebraMap (Polynomial F) KE (Polynomial.derivative (W.ΨSq n))) * - u_gen W = - algebraMap F KE n * - ΨSq_ff W n ^ 2 * - alpha_star_u W (mulByInt W.toAffine n) := - divPoly_wronskian_identity_of_poly W n hn (wronskian_Φ_ΨSq (W := W) n) - -- Chain rule for `D` on polynomial images in K(E), using `Derivation.comp_aeval_eq`: for -- `p : F[X]` and `a ∈ KE`, `D(aeval a p) = aeval a (derivative p) • D(a)`. @@ -695,8 +580,7 @@ theorem D_poly_eval (p : Polynomial F) : via the quotient rule and chain rule for the universal derivation. Taking `hpoly` as a hypothesis lets specific values of `n` be discharged from - the axiom-clean per-value polynomial lemmas (`wronskian_Φ_ΨSq_two`, …), - independently of the general `wronskian_Φ_ΨSq`. -/ + the per-value polynomial identities such as `wronskian_Φ_ΨSq_two`. -/ theorem omegaPullbackCoeff_mulByInt_of_poly (n : ℤ) (hn : n ≠ 0) (hpoly : Polynomial.derivative (W.Φ n) * W.ΨSq n - W.Φ n * Polynomial.derivative (W.ΨSq n) = @@ -768,7 +652,7 @@ theorem omegaPullbackCoeff_mulByInt_of_poly (n : ℤ) (hn : n ≠ 0) This is the converse of `omegaPullbackCoeff_mulByInt_of_poly`'s final algebra: the spec `a • ω = α*(u)⁻¹ • D(α*x)` together with `a = n` and the chain/quotient rule for `D` gives the - scalar identity `(Φ' Ψ − Φ Ψ') · u = n · Ψ² · α*u` in K(E). Fed the axiom-clean + scalar identity `(Φ' Ψ − Φ Ψ') · u = n · Ψ² · α*u` in K(E). Given the `omegaPullbackCoeff_mulByInt_routeB` (downstream), it recovers the K(E) Wronskian — and then, via the bridge `preΨ_two_mul_u_eq_ΨSq_sq_mul_alpha_star_u` and injectivity of `algebraMap (Polynomial F) KE`, the **polynomial** Wronskian — without the EDS addition @@ -843,30 +727,10 @@ theorem divPoly_wronskian_identity_of_omega (n : ℤ) (hn : n ≠ 0) -- Goal is already in the `set` names `Φ, Ψ, Φ', Ψ', u, αu`; `hfin` matches up to symmetry. linear_combination -hfin -/-- For [n], the omega-based pullback coefficient is n (general `n`, via the - general polynomial-level Wronskian identity `wronskian_Φ_ΨSq`). - Silverman III.5.3, IV.2.3. - - NOTE: this routing through `wronskian_Φ_ΨSq` inherits its `sorryAx` taint - (the `m ≥ 5` branch of `wronskian_Φ_ΨSq_nat`). The **axiom-clean, field-general** - proof of the same statement, via the Route-B chord recurrence (Silverman - III.5.2/3 at the differential level), is `HasseWeil.omegaCoeff_mulByInt` in - `HasseWeil/RouteBGeneral.lean`. That module cannot be imported here (its chord - step lives downstream of this file), so the replacement cannot be applied in - place — instead all former consumers (`Hasse/Separability.lean`, - `PullbackCoeff.lean`) now route through `omegaCoeff_mulByInt`, leaving this - theorem (and its Wronskian `sorry`) **consumer-free**. -/ -theorem omegaPullbackCoeff_mulByInt (n : ℤ) (hn : n ≠ 0) : - omegaPullbackCoeff W (mulByInt W.toAffine n) = algebraMap F KE n := - omegaPullbackCoeff_mulByInt_of_poly W n hn (wronskian_Φ_ΨSq (W := W) n) - -/-- **Axiom-clean base case `[2]`**: `omegaPullbackCoeff W (mulByInt 2) = 2`. - - Uses the per-value polynomial Wronskian lemma `wronskian_Φ_ΨSq_two` (a direct - `ring` computation, axiom-clean) through `omegaPullbackCoeff_mulByInt_of_poly`, - so it does NOT depend on the general `wronskian_Φ_ΨSq` (whose `m ≥ 5` branch - is unproved). Seeds the Route-B chord induction (`m ≥ 3` follows from the - chord step `omegaPullbackCoeff_mulByInt_succ`). -/ +/-- The differential coefficient of multiplication by two is two. + + The per-value polynomial identity `wronskian_Φ_ΨSq_two` gives the base case + for the differential chord recurrence. -/ theorem omegaPullbackCoeff_mulByInt_two : omegaPullbackCoeff W (mulByInt W.toAffine 2) = algebraMap F KE (2 : ℤ) := omegaPullbackCoeff_mulByInt_of_poly W 2 (by norm_num) diff --git a/projects/HasseWeil/HasseWeil/Foundation/OrdAtInftyBridge.lean b/projects/HasseWeil/HasseWeil/Foundation/OrdAtInftyBridge.lean index 78be88908..b82e10035 100644 --- a/projects/HasseWeil/HasseWeil/Foundation/OrdAtInftyBridge.lean +++ b/projects/HasseWeil/HasseWeil/Foundation/OrdAtInftyBridge.lean @@ -8,28 +8,13 @@ import HasseWeil.Foundation.OmegaPullbackCoeff import HasseWeil.Foundation.Curves.Valuation.Infinity /-! -# Bridge from `W.toAffine` to `SmoothPlaneCurve` for `ordAtInfty` +# Orders at infinity of generic Weierstrass coordinates -This file provides the minimal bridge needed to apply worker-I's -`ordAtInfty` infrastructure (in `HasseWeil/Curves/Infinity.lean`) to the -generic-point framework used by `MulByIntPullback.lean` and -`AdditionPullback.lean`. - -Concretely: given `W : WeierstrassCurve F` with `W.toAffine.IsElliptic`, -we wrap `W.toAffine` as a `SmoothPlaneCurve F` and re-export the -`ordAtInfty` results for `x_gen W` and `y_gen W` (and the -basefield-algebraMap) in a directly usable form. - -The downstream consumer is the witness-parametric pole argument -`addPullback_x_ne_const_of_pole` (`AdditionPullback.lean`), whose pole -witnesses are supplied per-isogeny (e.g. in `AdditionPullback/Frobenius.lean`). - -## Main results - -* `W_smooth W : SmoothPlaneCurve F` — the bridge wrapper. -* `ordAtInfty_x_gen` — `ord_∞(x_gen) = -2`. -* `ordAtInfty_y_gen` — `ord_∞(y_gen) = -3`. -* `ordAtInfty_algebraMap_F_nonzero` — constants from `F` have `ord_∞ = 0`. +For an elliptic Weierstrass curve `W`, the generic coordinates have orders +`ord_∞(x_gen W) = -2` and `ord_∞(y_gen W) = -3`. Nonzero base-field constants +have order zero. Scalar-tower identities relate the division polynomials in +the coordinate ring and function field, giving the pole orders of the +multiplication-by-integer pullbacks, including the inseparable case. ## References @@ -45,19 +30,21 @@ variable (W : WeierstrassCurve F) [W.toAffine.IsElliptic] local notation "KE" => W.toAffine.FunctionField -/-- Wrap `W.toAffine` as a `SmoothPlaneCurve F` so that worker-I's -`ordAtInfty` infrastructure applies. -/ +/-- The smooth plane curve associated to the affine Weierstrass equation. -/ noncomputable def W_smooth : SmoothPlaneCurve F := ⟨W.toAffine⟩ +omit [DecidableEq F] [W.toAffine.IsElliptic] in /-- The affine curve underlying the `SmoothPlaneCurve` wrapper is `W`. -/ @[simp] theorem W_smooth_toAffine : (W_smooth W).toAffine = W.toAffine := rfl +omit [DecidableEq F] [W.toAffine.IsElliptic] in /-- The function field of the SmoothPlaneCurve wrapper equals `KE` definitionally (both are `W.toAffine.FunctionField`). -/ @[simp] theorem W_smooth_functionField : (W_smooth W).FunctionField = KE := rfl +omit [DecidableEq F] [W.toAffine.IsElliptic] in /-- The `coordX` of the wrapper matches our `x_gen W` at the function-field level. Both are `algebraMap (Polynomial F) KE Polynomial.X`. -/ theorem coordX_W_smooth_eq_x_gen : (W_smooth W).coordX = x_gen W := by @@ -67,12 +54,14 @@ theorem coordX_W_smooth_eq_x_gen : (W_smooth W).coordX = x_gen W := by rw [← IsScalarTower.algebraMap_apply (Polynomial F) W.toAffine.CoordinateRing KE] rfl +omit [DecidableEq F] [W.toAffine.IsElliptic] in /-- `ord_∞(x_gen W) = -2` — Silverman II.1 / IV.1 for the generic x. -/ theorem ordAtInfty_x_gen : (W_smooth W).ordAtInfty (x_gen W) = ((-2 : ℤ) : WithTop ℤ) := by rw [← coordX_W_smooth_eq_x_gen] exact (W_smooth W).ordAtInfty_coordX +omit [DecidableEq F] [W.toAffine.IsElliptic] in /-- The `coordY` of the wrapper matches our `y_gen W` at the function-field level. Both are the image of `AdjoinRoot.root W.polynomial` under the algebraMap to `KE`. The `basis_one` lemma identifies @@ -82,12 +71,14 @@ theorem coordY_W_smooth_eq_y_gen : (W_smooth W).coordY = y_gen W := by rw [Affine.CoordinateRing.basis_one] rfl +omit [DecidableEq F] [W.toAffine.IsElliptic] in /-- `ord_∞(y_gen W) = -3` — Silverman II.1 / IV.1 for the generic y. -/ theorem ordAtInfty_y_gen : (W_smooth W).ordAtInfty (y_gen W) = ((-3 : ℤ) : WithTop ℤ) := by rw [← coordY_W_smooth_eq_y_gen] exact (W_smooth W).ordAtInfty_coordY +omit [DecidableEq F] [W.toAffine.IsElliptic] in /-- `ord_∞(algebraMap F KE c) = 0` for nonzero `c : F`. Direct corollary of `SmoothPlaneCurve.ordAtInfty_algebraMap_F_nonzero` applied to `W_smooth W`. -/ theorem ordAtInfty_algebraMap_F_nonzero {c : F} (hc : c ≠ 0) : @@ -96,9 +87,7 @@ theorem ordAtInfty_algebraMap_F_nonzero {c : F} (hc : c ≠ 0) : /-! ### Powers of generators -/ -/- `x_gen_ne_zero` / `y_gen_ne_zero` HOISTED to `Foundation/MulByIntPullback.lean` next to -the defs (#7621) — they were declared BOTH here and in `LocalExpansion.lean` (same names, -same namespace), so no module could import both files without an environment clash. -/ + omit [DecidableEq F] [W.toAffine.IsElliptic] in /-- `y_gen W` and `(W_smooth W).coordYInFunctionField` are the same element of @@ -110,12 +99,13 @@ theorem y_gen_eq_coordYInFunctionField : /-- `mulByInt_y W n ≠ 0` for `n ≠ 0`: it is the image of `y_gen ≠ 0` under the field embedding `[n]^*`. -/ theorem mulByInt_y_ne_zero (n : ℤ) (hn : n ≠ 0) : mulByInt_y W n ≠ 0 := by - have hpb : (mulByInt W.toAffine n).pullback = mulByInt_pullbackAlgHom W n hn := dif_neg hn + have hpb : (mulByInt W.toAffine n).pullback = mulByInt_pullbackAlgHom W n hn := dite_eq_right hn have h : mulByInt_pullbackAlgHom W n hn (y_gen W) = mulByInt_y W n := hpb ▸ mulByInt_pullback_y W n hn rw [← h] exact (map_ne_zero (mulByInt_pullbackAlgHom W n hn)).mpr (y_gen_ne_zero W) +omit [DecidableEq F] [W.toAffine.IsElliptic] in /-- `ord_∞(x_gen^n) = n • (-2)`. -/ theorem ordAtInfty_x_gen_pow (n : ℕ) : (W_smooth W).ordAtInfty (x_gen W ^ n) = n • ((-2 : ℤ) : WithTop ℤ) := by @@ -124,6 +114,7 @@ theorem ordAtInfty_x_gen_pow (n : ℕ) : rw [ordAtInfty_x_gen] at h exact h +omit [DecidableEq F] [W.toAffine.IsElliptic] in /-- `ord_∞(y_gen^n) = n • (-3)`. -/ theorem ordAtInfty_y_gen_pow (n : ℕ) : (W_smooth W).ordAtInfty (y_gen W ^ n) = n • ((-3 : ℤ) : WithTop ℤ) := by @@ -140,6 +131,7 @@ Both `Φ_ff W n` and `ΨSq_ff W n` are defined as This bridges to `ordAtInfty_algebraMap_polynomial_of_ne_zero` for the ord computation. -/ +omit [DecidableEq F] [W.toAffine.IsElliptic] in /-- `Φ_ff W n = algebraMap (Polynomial F) KE (W.Φ n)` via the scalar tower `F[X] → CoordinateRing → FunctionField`. -/ theorem Φ_ff_eq_algebraMap_polynomial (n : ℤ) : @@ -147,6 +139,7 @@ theorem Φ_ff_eq_algebraMap_polynomial (n : ℤ) : (IsScalarTower.algebraMap_apply (Polynomial F) W.toAffine.CoordinateRing KE (W.Φ n)).symm +omit [DecidableEq F] [W.toAffine.IsElliptic] in /-- `ΨSq_ff W n = algebraMap (Polynomial F) KE (W.ΨSq n)` via the scalar tower `F[X] → CoordinateRing → FunctionField`. -/ theorem ΨSq_ff_eq_algebraMap_polynomial (n : ℤ) : @@ -159,6 +152,7 @@ theorem ΨSq_ff_eq_algebraMap_polynomial (n : ℤ) : Direct from the tower bridge + `ordAtInfty_algebraMap_polynomial_of_ne_zero` + mathlib's `natDegree_Φ` / `natDegree_ΨSq`. -/ +omit [DecidableEq F] [W.toAffine.IsElliptic] in /-- `ord_∞(Φ_ff W n) = -2 · n.natAbs²`. -/ theorem ordAtInfty_Φ_ff (n : ℤ) : (W_smooth W).ordAtInfty (Φ_ff W n) = @@ -171,6 +165,7 @@ theorem ordAtInfty_Φ_ff (n : ℤ) : push_cast ring_nf +omit [DecidableEq F] [W.toAffine.IsElliptic] in /-- `ord_∞(ΨSq_ff W n) = -2 · (n.natAbs² - 1)` for `(n : F) ≠ 0`. -/ theorem ordAtInfty_ΨSq_ff (n : ℤ) (hnF : (n : F) ≠ 0) : (W_smooth W).ordAtInfty (ΨSq_ff W n) = @@ -203,6 +198,7 @@ private theorem algebraMap_polynomial_KE_injective : Affine.CoordinateRing.algebraMap_poly_injective omit [DecidableEq F] in +omit [W.toAffine.IsElliptic] in /-- `Φ_ff W n ≠ 0` for any n. Direct from `W.Φ_ne_zero` + algebraMap injectivity. -/ theorem Φ_ff_ne_zero (n : ℤ) : Φ_ff W n ≠ 0 := by classical @@ -211,12 +207,14 @@ theorem Φ_ff_ne_zero (n : ℤ) : Φ_ff W n ≠ 0 := by exact W.Φ_ne_zero n (algebraMap_polynomial_KE_injective W (h.trans (map_zero _).symm)) +omit [DecidableEq F] in /-- `mulByInt_x W n ≠ 0` for `n ≠ 0`. Direct from `Φ_ff_ne_zero` and `ΨSq_ff_ne_zero`. -/ theorem mulByInt_x_ne_zero (n : ℤ) (hn : n ≠ 0) : mulByInt_x W n ≠ 0 := by simp only [mulByInt_x] exact div_ne_zero (Φ_ff_ne_zero W n) (ΨSq_ff_ne_zero W hn) +omit [DecidableEq F] in /-- `ord_∞(mulByInt_x W n) = -2` for `n ≠ 0` and `(n : F) ≠ 0`. Direct from `ordAtInfty_Φ_ff`, `ordAtInfty_ΨSq_ff`, and division: the @@ -250,6 +248,7 @@ theorem ordAtInfty_mulByInt_x (n : ℤ) (hn : n ≠ 0) (hnF : (n : F) ≠ 0) : congr 1 ring] +omit [DecidableEq F] in /-- **Unconditional pole of `mulByInt_x W n`**: `ord_∞(mulByInt_x W n) < 0` for every `n ≠ 0`, with **no** `(n : F) ≠ 0` hypothesis. @@ -262,8 +261,7 @@ numerator therefore strictly out-degrees the denominator, so the ratio `Φ_ff / ΨSq_ff` has a pole at `O`: `ord = -2·natAbs² - (-2·natDegree (ΨSq n)) ≤ -2·natAbs² + 2(natAbs² - 1) = -2 < 0`. -This is exactly the brick needed for the V-side "summand reduces to `O`" facts, -where the Frobenius factor `r·q` lands in the inseparable regime. -/ +-/ theorem ordAtInfty_mulByInt_x_neg (n : ℤ) (hn : n ≠ 0) : (W_smooth W).ordAtInfty (mulByInt_x W n) < 0 := by classical @@ -304,6 +302,7 @@ theorem ordAtInfty_mulByInt_x_neg (n : ℤ) (hn : n ≠ 0) : -- Transport `h_int` across the `WithTop ℤ` coercions. exact_mod_cast h_int +omit [DecidableEq F] in /-- **`ord_∞(mulByInt_x W n)` is an explicit even value `≤ -2`** for every `n ≠ 0`, with **no** `(n : F) ≠ 0` hypothesis — so it holds in the *inseparable* case `(n : F) = 0` (e.g. `n = r` with `p ∣ r`). diff --git a/projects/HasseWeil/HasseWeil/Foundation/Ramification.lean b/projects/HasseWeil/HasseWeil/Foundation/Ramification.lean index 8a1dfaa9c..d72959809 100644 --- a/projects/HasseWeil/HasseWeil/Foundation/Ramification.lean +++ b/projects/HasseWeil/HasseWeil/Foundation/Ramification.lean @@ -6,7 +6,9 @@ Authors: Chris Birkbeck import Mathlib.Algebra.Polynomial.SpecificDegree import Mathlib.FieldTheory.IntermediateField.Algebraic import Mathlib.FieldTheory.SeparableDegree -import Mathlib.NumberTheory.RamificationInertia.Basic +import Mathlib.RingTheory.RamificationInertia.Basic +import Mathlib.NumberTheory.RamificationInertia.Inertia +import Mathlib.NumberTheory.RamificationInertia.Ramification import Mathlib.RingTheory.Algebraic.Integral import Mathlib.RingTheory.Artinian.Ring import Mathlib.RingTheory.DedekindDomain.Basic @@ -25,61 +27,6 @@ import Mathlib.RingTheory.Polynomial.GaussLemma import HasseWeil.Isogeny.FunctionField import HasseWeil.Foundation.Valuation -/-! -# Ramification Theory for Elliptic Curve Isogenies - -We connect mathlib's `Ideal.ramificationIdx'` and `Ideal.inertiaDeg'` to the -theory of elliptic curve isogenies, specializing the general framework from -`Mathlib.NumberTheory.RamificationInertia` to coordinate ring extensions. - -For an isogeny `φ : E₁ → E₂`, the pullback `φ* : K(E₂) →ₐ[F] K(E₁)` restricts to -a ring homomorphism on coordinate rings. The ramification index `e_P(φ)` at a -prime `P` of `R₁ = K[E₁]` is `Ideal.ramificationIdx' (φ*.restrict) p P` where -`p = φ*⁻¹(P)` is the prime of `R₂ = K[E₂]` below `P`. - -## Main results - -* `HasseWeil.coordinateRing_isDedekindDomain`: the coordinate ring of an elliptic curve - is a Dedekind domain. Proved via `IsIntegralClosure.isDedekindDomain`: the coordinate - ring `R = F[X][Y]/(W)` is the integral closure of the PID `F[X]` in the function field - `K(E) = Frac(R)`, and `K(E)/F(X)` is a finite separable extension of degree 2. -* `HasseWeil.coordinateRing_isIntegrallyClosed`: the coordinate ring is integrally closed - in its fraction field, via `IsIntegrallyClosed.of_localization_maximal` together with - principality of the maximal ideal at every localization. -* `HasseWeil.coordinateRing_dimensionLEOne`: the coordinate ring has Krull dimension at - most 1 (every nonzero prime is maximal), from the principal ideal theorem. - -## Strategy - -The `IsIntegralClosure.isDedekindDomain` route shows that `CoordinateRing` is the integral -closure of the PID `F[X]` in the function field. The key steps: - -1. **`F[X]` is Dedekind**: it is a PID, hence Dedekind (automatic from mathlib). -2. **`CoordinateRing` is integrally closed**: via `IsIntegrallyClosed.of_localization_maximal`, - each localization at a nonzero maximal ideal `P` is a DVR (hence integrally closed). The - DVR property follows from the TFAE for Noetherian local domains of dimension `≤ 1` with a - principal maximal ideal; principality (`maximalIdeal_isPrincipal_of_nonsingular`) uses - nonsingularity at each closed point (`Δ ≠ 0`), via the Jacobian identity and a case split - on the characteristic. -3. **`CoordinateRing` is the integral closure of `F[X]` in `FunctionField`**: elements - integral over `F[X]` are integral over `CoordinateRing` (by `tower_top`), hence lie in - `CoordinateRing` (by step 2 and `isIntegrallyClosed_iff`). -4. **`FunctionField / FractionRing(F[X])` is finite** of degree 2. -5. **`FunctionField / FractionRing(F[X])` is separable**: from `finSepDegree` dividing 2 and - the existence of a separable root (the Weierstrass polynomial has nonzero Y-derivative). -6. **Apply `IsIntegralClosure.isDedekindDomain`**: combines all the above. - -## Implementation notes - -This file is open infrastructure for the full isogeny ramification theory (the degree-sum -formula `deg φ = Σ e_P · f_P`, unramifiedness of separable isogenies, and equal fibre sizes -from translation invariance are not yet formalised here). The Dedekind-domain results it -provides are complete and axiom-clean. - -## References - -* [Silverman, *The Arithmetic of Elliptic Curves*], II.2, III.4.10 --/ open WeierstrassCurve Polynomial Ideal IntermediateField open scoped Polynomial.Bivariate nonZeroDivisors IntermediateField @@ -157,8 +104,8 @@ private lemma nonsingular_at_maximal (E : Affine F) [E.IsElliptic] (P : Ideal E.CoordinateRing) (hPmax : P.IsMaximal) : AdjoinRoot.mk E.polynomial E.polynomialX ∉ P ∨ AdjoinRoot.mk E.polynomial E.polynomialY ∉ P := by - letI : P.IsPrime := hPmax.isPrime - haveI : Field (E.CoordinateRing ⧸ P) := Ideal.Quotient.field P + let : P.IsPrime := hPmax.isPrime + have : Field (E.CoordinateRing ⧸ P) := Ideal.Quotient.field P let φ : F →+* (E.CoordinateRing ⧸ P) := (Ideal.Quotient.mk P).comp ((AdjoinRoot.of E.polynomial).comp C) let x₀ := (Ideal.Quotient.mk P) (AdjoinRoot.mk E.polynomial (C X)) @@ -178,8 +125,8 @@ private lemma nonsingular_at_maximal (E : Affine F) [E.IsElliptic] exact Ideal.Quotient.eq_zero_iff_mem.mpr hmem) -- The mathlib `Algebra (Polynomial F) E.CoordinateRing` instance is `noncomputable`, so the --- synthesizer cannot derive `Module` within `maxSynthPendingDepth = 3`. These explicit `Module`, --- `Module.Finite`, and `Module.IsTorsionFree` instances let downstream synthesis find them. + + noncomputable instance instModulePolynomialCoordinateRing (E : Affine F) : Module (Polynomial F) E.CoordinateRing := @Algebra.toModule _ _ _ _ (Affine.CoordinateRing.instAlgebraPolynomial) @@ -190,7 +137,7 @@ noncomputable instance instModuleFinitePolynomialCoordinateRing (E : Affine F) : noncomputable instance instIsTorsionFreePolynomialCoordinateRing (E : Affine F) [E.IsElliptic] : Module.IsTorsionFree (Polynomial F) E.CoordinateRing := - @AdjoinRoot.noZeroSMulDivisors_of_prime_of_degree_ne_zero (Polynomial F) _ E.polynomial _ + @AdjoinRoot.isTorsionFree_of_prime_of_degree_ne_zero (Polynomial F) _ E.polynomial _ (Irreducible.prime Affine.irreducible_polynomial) (by rw [Affine.degree_polynomial]; exact two_ne_zero) @@ -455,11 +402,11 @@ private lemma isReduced_quotient_of_polyY_notMem (E : Affine F) [E.IsElliptic] (P.comap (algebraMap (Polynomial F) E.CoordinateRing))) rw [h_rad.radical] at h; exact h ▸ Ideal.radical_isRadical _ rw [Ideal.isRadical_iff_quotient_reduced] - haveI : (P.comap (algebraMap (Polynomial F) E.CoordinateRing)).IsMaximal := + have : (P.comap (algebraMap (Polynomial F) E.CoordinateRing)).IsMaximal := Ideal.IsPrime.isMaximal (Ideal.IsPrime.comap _) hp_ne_bot set p := P.comap (algebraMap (Polynomial F) E.CoordinateRing) with hp_def - letI kfield : Field (F[X] ⧸ p) := Ideal.Quotient.field p - haveI : IsDomain (F[X] ⧸ p) := kfield.isDomain + let kfield : Field (F[X] ⧸ p) := Ideal.Quotient.field p + have : IsDomain (F[X] ⧸ p) := kfield.isDomain set φ : F[X] →+* (F[X] ⧸ p) := Ideal.Quotient.mk p with hφ_def set Wbar := E.polynomial.map φ with hWbar_def have hequiv := AdjoinRoot.quotAdjoinRootEquivQuotPolynomialQuot p E.polynomial @@ -485,11 +432,11 @@ private theorem maximalIdeal_isPrincipal_case_polyY_notMem (E : Affine F) [E.IsE (P : Ideal E.CoordinateRing) (hPbot : P ≠ ⊥) (hPmax : P.IsMaximal) (hY : AdjoinRoot.mk E.polynomial E.polynomialY ∉ P) : (Ideal.map (algebraMap E.CoordinateRing (Localization.AtPrime P)) P).IsPrincipal := by - letI := hPmax.isPrime - haveI := IsLocalization.isNoetherianRing P.primeCompl (Localization.AtPrime P) inferInstance + let := hPmax.isPrime + have := IsLocalization.isNoetherianRing P.primeCompl (Localization.AtPrime P) inferInstance set g := algebraMap (Polynomial F) E.CoordinateRing with hg_def set p := P.comap g with hp_def - haveI : Algebra.IsIntegral (Polynomial F) E.CoordinateRing := + have : Algebra.IsIntegral (Polynomial F) E.CoordinateRing := Algebra.IsIntegral.of_finite (Polynomial F) E.CoordinateRing suffices h : Ideal.map (algebraMap E.CoordinateRing (Localization.AtPrime P)) P = Ideal.map (algebraMap E.CoordinateRing (Localization.AtPrime P)) (Ideal.map g p) by @@ -502,7 +449,7 @@ private theorem maximalIdeal_isPrincipal_case_polyY_notMem (E : Affine F) [E.IsE have hg_inj : Function.Injective g := coordinateRing_algebraMap_injective E have hp_ne_bot : p ≠ ⊥ := by intro hp_bot; rw [hp_def] at hp_bot - exact hPbot (eq_bot_of_comap_eq_bot hp_bot) + exact hPbot (eq_bot_of_under_eq_bot (R := Polynomial F) hp_bot) have hJ_ne_top : J ≠ ⊤ := by intro hJ_top have : Ideal.map f P = ⊤ := @@ -510,16 +457,16 @@ private theorem maximalIdeal_isPrincipal_case_polyY_notMem (E : Affine F) [E.IsE rw [Localization.AtPrime.map_eq_maximalIdeal] at this exact (IsLocalRing.maximalIdeal.isMaximal (R := Localization.AtPrime P)).ne_top this - haveI : Nontrivial (Localization.AtPrime P ⧸ J) := + have : Nontrivial (Localization.AtPrime P ⧸ J) := Ideal.Quotient.nontrivial_iff.mpr hJ_ne_top - haveI : IsLocalRing (Localization.AtPrime P ⧸ J) := + have : IsLocalRing (Localization.AtPrime P ⧸ J) := IsLocalRing.of_surjective' (Ideal.Quotient.mk J) Ideal.Quotient.mk_surjective - haveI : Ring.DimensionLEOne (Localization.AtPrime P) := + have : Ring.DimensionLEOne (Localization.AtPrime P) := Ring.DimensionLEOne.localization (Localization.AtPrime P) P.primeCompl_le_nonZeroDivisors - haveI : Ring.KrullDimLE 0 (Localization.AtPrime P ⧸ J) := + have : Ring.KrullDimLE 0 (Localization.AtPrime P ⧸ J) := krullDimLE_zero_quotient_of_polyY_notMem E P J g hg_inj p hp_ne_bot hJ_def - haveI : IsReduced (Localization.AtPrime P ⧸ J) := + have : IsReduced (Localization.AtPrime P ⧸ J) := isReduced_quotient_of_polyY_notMem E P J g hg_def p hp_def hp_ne_bot hY hJ_def exact @Ring.KrullDimLE.isField_of_isReduced _ _ ‹_› ‹_› ‹_› · -- `J ≤ P.map f` follows from `p.map g ≤ P` (`map_comap_le`). @@ -584,8 +531,8 @@ private lemma YminusAlpha_sq_mem_of_char2_square (E : Affine F) [E.IsElliptic] (h_cubic_factor : X ^ 3 + C E.a₂ * X ^ 2 + C E.a₄ * X + C E.a₆ - C δ = (X - C x₀) * w₃) (hα : α ^ 2 = δ) : (AdjoinRoot.mk E.polynomial (Y - C (C α))) ^ 2 ∈ P := by - haveI hCharP_FX : CharP F[X] 2 := Polynomial.charP - haveI hCharP_FXY : CharP F[X][Y] 2 := Polynomial.charP + have hCharP_FX : CharP F[X] 2 := Polynomial.charP + have hCharP_FXY : CharP F[X][Y] 2 := Polynomial.charP have h_two_FX : (2 : F[X]) = 0 := by exact_mod_cast CharP.cast_eq_zero F[X] 2 have h_two_FXY : (2 : F[X][Y]) = 0 := by exact_mod_cast CharP.cast_eq_zero F[X][Y] 2 have h_step : (AdjoinRoot.mk E.polynomial (Y - C (C α))) ^ 2 = @@ -649,7 +596,7 @@ private theorem maximalIdeal_isPrincipal_case_char2_ordinary_square (E : Affine (h_cubic_factor : X ^ 3 + C E.a₂ * X ^ 2 + C E.a₄ * X + C E.a₆ - C δ = (X - C x₀) * w₃) (hα : α ^ 2 = δ) : (Ideal.map (algebraMap E.CoordinateRing (Localization.AtPrime P)) P).IsPrincipal := by - letI := hPmax.isPrime + let := hPmax.isPrime -- `(x₀, α)` satisfies `E.Equation` (α² + (a₁x₀+a₃)α = δ = α²) and is smooth (`Δ ≠ 0`). have h_eq : E.Equation x₀ α := by rw [Affine.equation_iff] @@ -674,7 +621,7 @@ private theorem maximalIdeal_isPrincipal_case_char2_ordinary_square (E : Affine have h_P_eq : P = pointIdeal E x₀ α := (Ideal.IsMaximal.eq_of_le (pointIdeal_isMaximal E h_ns) hPmax.ne_top h_pointIdeal_le).symm subst h_P_eq - haveI : IsDiscreteValuationRing (Localization.AtPrime (pointIdeal E x₀ α)) := + have : IsDiscreteValuationRing (Localization.AtPrime (pointIdeal E x₀ α)) := HasseWeil.localRing_isDVR E h_ns rw [Localization.AtPrime.map_eq_maximalIdeal] exact IsDiscreteValuationRing.toIsPrincipalIdealRing.principal _ @@ -931,10 +878,10 @@ private theorem maximalIdeal_isPrincipal_case_char2_ordinary_nonsquare (hc_in_p : c ∈ P.comap (algebraMap (Polynomial F) E.CoordinateRing)) (h_sq : ∀ α : F, α ^ 2 ≠ δ) : (Ideal.map (algebraMap E.CoordinateRing (Localization.AtPrime P)) P).IsPrincipal := by - letI := hPmax.isPrime - -- `f_quad = X² + C δ` is irreducible (δ not a square); build `proj = lift i_hom (root f_quad)`. + let := hPmax.isPrime + set f_quad : Polynomial F := (Polynomial.X : Polynomial F) ^ 2 + Polynomial.C δ with hf_quad_def - haveI hFact : Fact (Irreducible f_quad) := + have hFact : Fact (Irreducible f_quad) := ⟨X_sq_add_C_irreducible_of_not_square δ h2 h_sq⟩ set i_hom : F[X] →+* AdjoinRoot f_quad := (AdjoinRoot.of f_quad).comp (Polynomial.evalRingHom x₀) with hi_hom_def @@ -985,7 +932,7 @@ private lemma comap_eq_span_c_of_char2_ordinary (E : Affine F) [E.IsElliptic] exact h_a1 h_coeff_1.symm have hp_ne_bot : p ≠ ⊥ := fun hbot ↦ hc_ne_zero (by rw [hbot, Ideal.mem_bot] at hc_in_p; exact hc_in_p) - haveI : p.IsMaximal := Ring.DimensionLEOne.maximalOfPrime hp_ne_bot (Ideal.IsPrime.comap _) + have : p.IsMaximal := Ring.DimensionLEOne.maximalOfPrime hp_ne_bot (Ideal.IsPrime.comap _) exact maximal_eq_span_of_mem_linear p (IsPrincipalIdealRing.principal p) c hc_ne_zero (by rw [hc_def]; exact Polynomial.natDegree_linear h_a1) hc_in_p @@ -1032,9 +979,9 @@ private theorem maximalIdeal_isPrincipal_case_char2_ordinary (E : Affine F) [E.I (h4 : (4 : F) = 0) (h_a1 : E.a₁ ≠ 0) (hY : AdjoinRoot.mk E.polynomial E.polynomialY ∈ P) : (Ideal.map (algebraMap E.CoordinateRing (Localization.AtPrime P)) P).IsPrincipal := by - letI := hPmax.isPrime + let := hPmax.isPrime have h2 : (2 : F) = 0 := two_eq_zero_of_four_eq_zero h4 - haveI hCharP : CharP F 2 := + have hCharP : CharP F 2 := (CharP.charP_iff_prime_eq_zero Nat.prime_two).mpr h2 -- `polyY = C c` with `c = a₁X + a₃`, so `c ∈ p`, and `p = span {c}`. set c : F[X] := C E.a₁ * X + C E.a₃ with hc_def @@ -1088,7 +1035,7 @@ private theorem polynomialY_notMem_of_char2_a1_eq_zero (E : Affine F) [E.IsEllip have h2sq_eq : (2 : F) ^ 2 = 4 := by ring rw [h2sq_eq]; exact h4 exact pow_eq_zero_iff (by omega : 2 ≠ 0) |>.mp h2sq - haveI hCharP : CharP F 2 := + have hCharP : CharP F 2 := (CharP.charP_iff_prime_eq_zero Nat.prime_two).mpr h2 have hΔ : E.Δ ≠ 0 := fun h ↦ not_isUnit_zero (h ▸ IsElliptic.isUnit (W := E)) have ha3_ne : E.a₃ ≠ 0 := by @@ -1256,14 +1203,14 @@ private theorem maximalIdeal_isPrincipal_case_charNe2 (E : Affine F) [E.IsEllipt (hY : AdjoinRoot.mk E.polynomial E.polynomialY ∈ P) (hX : AdjoinRoot.mk E.polynomial E.polynomialX ∉ P) : (Ideal.map (algebraMap E.CoordinateRing (Localization.AtPrime P)) P).IsPrincipal := by - letI := hPmax.isPrime + let := hPmax.isPrime set g := algebraMap (Polynomial F) E.CoordinateRing with hg_def set p := P.comap g with hp_def set f := algebraMap E.CoordinateRing (Localization.AtPrime P) with hf_def - have hp_ne_bot : p ≠ ⊥ := fun hp_bot ↦ hPbot (eq_bot_of_comap_eq_bot hp_bot) - haveI hp_maximal : p.IsMaximal := + have hp_ne_bot : p ≠ ⊥ := fun hp_bot ↦ hPbot (eq_bot_of_under_eq_bot (R := Polynomial F) hp_bot) + have hp_maximal : p.IsMaximal := Ring.DimensionLEOne.maximalOfPrime hp_ne_bot (Ideal.IsPrime.comap _) - haveI hp_principal : p.IsPrincipal := IsPrincipalIdealRing.principal p + have hp_principal : p.IsPrincipal := IsPrincipalIdealRing.principal p have h2 : (2 : F) ≠ 0 := fun h2zero ↦ h4 (by have : (4 : F) = 2 * 2 := by norm_num rw [this, h2zero]; ring) @@ -1302,15 +1249,15 @@ private theorem maximalIdeal_isPrincipal_case_charNe2 (E : Affine F) [E.IsEllipt rw [map_eq_span_of_charNe2 E P π hY hmkCπ_in_span hP_le_span] exact ⟨⟨_, rfl⟩⟩ --- Reduces to a clean case-dispatch over the closed-point geometry: each branch is a leaf lemma + -- above (`..._case_polyY_notMem`, char-2 supersingular/ordinary, char-≠2 Jacobian). private theorem maximalIdeal_isPrincipal_of_nonsingular (E : Affine F) [E.IsElliptic] (P : Ideal E.CoordinateRing) (_ : P ≠ ⊥) (hPmax : P.IsMaximal) : (IsLocalRing.maximalIdeal (Localization.AtPrime P)).IsPrincipal := by - letI := hPmax.isPrime + let := hPmax.isPrime -- The maximal ideal `m = P.map f` (`f = algebraMap R R_P`); reduce to principality of `P.map f`. rw [← Localization.AtPrime.map_eq_maximalIdeal] - -- Dispatch on the closed-point geometry. Each leaf lemma handles one configuration. + by_cases hY : AdjoinRoot.mk E.polynomial E.polynomialY ∉ P · -- `mk(polynomialY) ∉ P`: the squarefree-quotient leaf lemma. exact maximalIdeal_isPrincipal_case_polyY_notMem E P ‹P ≠ ⊥› hPmax hY @@ -1325,21 +1272,21 @@ private theorem maximalIdeal_isPrincipal_of_nonsingular (E : Affine F) [E.IsElli · -- Char ≠ 2: Jacobian factorisation of the Y-discriminant. exact maximalIdeal_isPrincipal_case_charNe2 E P ‹P ≠ ⊥› hPmax h4 hY hX -/-- The coordinate ring of an elliptic curve is integrally closed in its fraction field. -/ + instance coordinateRing_isIntegrallyClosed (E : Affine F) [E.IsElliptic] : IsIntegrallyClosed E.CoordinateRing := by apply IsIntegrallyClosed.of_localization_maximal intro P hP0 hPmax - haveI := IsLocalization.isNoetherianRing P.primeCompl (Localization.AtPrime P) inferInstance - haveI : Ring.DimensionLEOne (Localization.AtPrime P) := + have := IsLocalization.isNoetherianRing P.primeCompl (Localization.AtPrime P) inferInstance + have : Ring.DimensionLEOne (Localization.AtPrime P) := Ring.DimensionLEOne.localization (Localization.AtPrime P) P.primeCompl_le_nonZeroDivisors - haveI : IsPrincipalIdealRing (Localization.AtPrime P) := + have : IsPrincipalIdealRing (Localization.AtPrime P) := ((tfae_of_isNoetherianRing_of_isLocalRing_of_isDomain (Localization.AtPrime P)).out 5 1).mp (maximalIdeal_isPrincipal_of_nonsingular E P hP0 hPmax) exact UniqueFactorizationMonoid.instIsIntegrallyClosed --- Typeclass synthesis over the tower F[X] → CoordinateRing → FunctionField needs more budget. + noncomputable instance coordinateRing_isIntegralClosure (E : Affine F) [E.IsElliptic] : IsIntegralClosure E.CoordinateRing (Polynomial F) E.FunctionField where algebraMap_injective _ _ h := @@ -1385,24 +1332,24 @@ private theorem root_aeval_polynomial_map (E : Affine F) [E.IsElliptic] : simp [IsScalarTower.algebraMap_apply (Polynomial F) E.CoordinateRing E.FunctionField] } -- The separability proof reasons over two cases via finSepDegree; typeclass --- synthesis for the tower through FractionRing F[X] needs more budget. + noncomputable instance functionField_isSeparable (E : Affine F) [E.IsElliptic] : Algebra.IsSeparable (FractionRing (Polynomial F)) E.FunctionField := by set K := FractionRing (Polynomial F) -- `finSepDegree K L ∣ finrank K L = 2` and `≠ 1` (as `y` is separable), so it equals `finrank`. have h_dvd := Field.finSepDegree_dvd_finrank K E.FunctionField - haveI : FiniteDimensional K E.FunctionField := functionField_finiteDimensional E + have : FiniteDimensional K E.FunctionField := functionField_finiteDimensional E have h_fr : Module.finrank K E.FunctionField = 2 := by - haveI : Algebra.IsAlgebraic (Polynomial F) E.CoordinateRing := + have : Algebra.IsAlgebraic (Polynomial F) E.CoordinateRing := (Algebra.IsIntegral.of_finite (Polynomial F) E.CoordinateRing).isAlgebraic change Module.finrank (FractionRing (Polynomial F)) E.FunctionField = 2 - rw [Algebra.IsAlgebraic.finrank_of_isFractionRing (Polynomial F) + rw [IsFractionRing.finrank_eq (Polynomial F) (FractionRing (Polynomial F)) E.CoordinateRing E.FunctionField, Module.finrank_eq_card_basis (Affine.CoordinateRing.basis E), Fintype.card_fin] rw [h_fr] at h_dvd have h_not_1 : Field.finSepDegree K E.FunctionField ≠ 1 := by intro h1 - haveI := isPurelyInseparable_of_finSepDegree_eq_one h1 + have := isPurelyInseparable_of_finSepDegree_eq_one h1 set y : E.FunctionField := algebraMap E.CoordinateRing E.FunctionField (AdjoinRoot.root E.polynomial) have hy_int : IsIntegral K y := IsIntegral.of_finite _ _ @@ -1446,8 +1393,7 @@ instance coordinateRing_isDedekindDomain (E : Affine F) [E.IsElliptic] : IsIntegralClosure.isDedekindDomain (Polynomial F) (FractionRing (Polynomial F)) E.FunctionField E.CoordinateRing -/-- The coordinate ring of an elliptic curve is integrally closed (consequence of being -a Dedekind domain). -/ + instance isIntegrallyClosed_coordinateRing (E : Affine F) [E.IsElliptic] : IsIntegrallyClosed E.CoordinateRing := inferInstance diff --git a/projects/HasseWeil/HasseWeil/Foundation/Valuation.lean b/projects/HasseWeil/HasseWeil/Foundation/Valuation.lean index 7750f062d..5ec611dcc 100644 --- a/projects/HasseWeil/HasseWeil/Foundation/Valuation.lean +++ b/projects/HasseWeil/HasseWeil/Foundation/Valuation.lean @@ -239,7 +239,7 @@ theorem localRing_isDVR {x₀ y₀ : F} (h : W.Nonsingular x₀ y₀) : let P := pointIdeal W x₀ y₀ haveI : P.IsPrime := (pointIdeal_isMaximal W h).isPrime IsDiscreteValuationRing (Localization.AtPrime P) := by - intro P; letI : P.IsPrime := (pointIdeal_isMaximal W h).isPrime + intro P; let : P.IsPrime := (pointIdeal_isMaximal W h).isPrime let f := algebraMap W.CoordinateRing (Localization.AtPrime P) -- Nonsingularity: WLOG polynomialY.evalEval x₀ y₀ ≠ 0 -- (The other case swaps X↔Y roles; we handle the Y case.) @@ -274,7 +274,7 @@ theorem localRing_isDVR {x₀ y₀ : F} (h : W.Nonsingular x₀ y₀) : (M := P.primeCompl) _ P.primeCompl_le_nonZeroDivisors)] at hbot exact (Affine.CoordinateRing.XClass_ne_zero (W' := W) (x := x₀)) (eq_bot_iff.mp hbot (subset_span (Set.mem_insert _ _))) - haveI : IsPrincipalIdealRing (Localization.AtPrime P) := + have : IsPrincipalIdealRing (Localization.AtPrime P) := ((tfae_of_isNoetherianRing_of_isLocalRing_of_isDomain (Localization.AtPrime P)).out 5 1).mp hprincipal exact ⟨hne⟩ @@ -306,7 +306,7 @@ theorem localRing_isDVR {x₀ y₀ : F} (h : W.Nonsingular x₀ y₀) : (M := P.primeCompl) _ P.primeCompl_le_nonZeroDivisors)] at hbot exact (Affine.CoordinateRing.XClass_ne_zero (W' := W) (x := x₀)) (eq_bot_iff.mp hbot (subset_span (Set.mem_insert _ _))) - haveI : IsPrincipalIdealRing (Localization.AtPrime P) := + have : IsPrincipalIdealRing (Localization.AtPrime P) := ((tfae_of_isNoetherianRing_of_isLocalRing_of_isDomain (Localization.AtPrime P)).out 5 1).mp hprincipal exact ⟨hne⟩ diff --git a/projects/HasseWeil/HasseWeil/Foundation/Verschiebung/Genuine.lean b/projects/HasseWeil/HasseWeil/Foundation/Verschiebung/Genuine.lean index 16c9844e05e8a3a4e84977c4344686797b691a85..cdf52885c82d916e7b1c8e267acd875b4c7fe0ab 100644 GIT binary patch delta 6150 zcma)Ae~c7o8P42M3e$opJt$z?uLb3f-tBRu5kp%Q3WW2l0$wRdC^I|z?e14*XZB`h zx!d~3wp1(H)*npb5)+#y))W0Rj;;;kBRMKHuNjfQ!*4~Kd8x)C4wZh8wB6s~kI0zGs^ARVm7LO}WkZ%f=lo;rLz{1q~;{N{vwA z+hMa-lTpwVei={wprkxIlA_*l-Jao0-;z`QI!@1q$*01_XC|So_R8)y#pE9$^%k}X)b$hlGzmh{=!%*$5*CvNre$MkMfBn)yz24L#H5Sqfpo-3J&zlr)4Tl zys%MA0n0xoL`w~48+cqy0Qe`kfW%TRB<^`GLSMg^R5>AtF5^nc zWKhQ6ecwItiO1K+{)b*)b2RY%a$(o5&an?)GH1}0kvM%&I;uqcKeQm`&LCcMdTL5M z;!3n6YFLugy^sVy2s`i0zPx7BV>+=MW=iGpCiMb{q(W*MvF?7s>(o`AQ0Dh z5F4RW6^mdQ?FYj2%N%4dt(OWkRm)1ch_7Z>z-K#tzx#f-(&*5MIhtkVlmoIA72ivPNJ7pt>w0NWK%Z)D6l_1H^8fWCuo=yZAo$gtH} zFHAwV>i!}SVu?1brL*Xg1mULsKR)2_xt8U14Ri#{1?70<(-&?%N1FR67?P6}^ND9JZH|AqZcV)Vi_`IoFMO->o6o#xbi(KS(Y2<4z>*TgKldbuTIKJtFn9NN_HTYfp=Z1@N{I z0k}X~PkNdlHKoaxvKmN-K4Z!BBV9zTS}0Z@I{c7}f9+|ikSArH8(*Sa6s(hGhw5ZcoS9w)*)<+ef&nH%Ao-hoUd@w!fJeuLrPBpWt3=Xx`}M9 zMg7|hej^8goHJV11L;UAHHivV*9S#11b&&lNZ5kQP1*~^J?|?zLkU|rDsUREjqz2l zOFgv+)?9Vc7QI(&-@aWOmoUX_H2_Qzhb7dtR>R0ZG!bu~YN#f3wCF<_l-IfISKk|n zugz}j{QTE{+Suw_hJq#+PRAkIJa446tY{Jl8brbxKY12!PoAQ`CoB=7XkocY>Ci%t zONC(%nGZu&V?LCa7QYR>e;IU~6k9WT@>=-(75*F%#9#W`rgu%Ji_>6kn(eO~FgEVc zwoTV5IZ^=NG+jQigzab68=D?AUEcwgbUMWW9j(lorE3!eGOW{S3Gvqbkk2Jknn4MY zy+bgLv{TdZo3mS6q_Z`BqD_^$nLBPwl2uMu1Ae@o7PRzJ9n(}VCcS4BjgIzT26@7; zaYo`yLT3Nx(w zi>PqIGQhDj6oWWZHt9-Q8g$W4tppm6j1_R>qldm0fbwF+Y^GGCPZuumSJ_2D{MOs| zwx>@Tx3!-zjSZd4?~JV4NQKssW!D+)ua6p+2#Jr*CuApGL2qFHDdn+0MdVN~x{*MO zF`a#3eS!?gvJ%mVlI{IRa4$sQ>05>goh$AGuy*cV#SS8vSRBSnc4SkNndfb{!BU4* zaY=%llv5D<$%E0p)^2VH5Ja53e&JbIU}>YjVacEuJqrb;G|ldxZ#Nz=4C|{~jIsFI ze>QYy*Bf)AvHi|_yWfAeaqH^#8=H-9uY^d~z0-&$GI9{TZypkx{43)`n&+EGJZ7?U;*Gb8(yOS!CZa49fMZjuHdQoM1-xTSmRVdM6ZZAfs1 zN}}kxk{i4B5u-NR{q3CL81YYz-nojH(thJnV=J5-hLwv8D%|{eWDU}3WR8DQxgZY& zIK5v23l3vA4dE7hy=5Tb^n+Z?!7DiGI2tMU_j+z<3e+cyn4nqnZ|z<@ZG6fYNpjdW zG>3v2KQl4b23yv)AAG{NXZURc5oGW}Ne9Fz(f}eNmSB2qmG@pdE+&~ 1` — Silverman III.6.2 step - -The substantive content is the **Frobenius factorisation** of `[p^k]`: -`[p^k] = π_{p^k} ∘ V_{p^k}` on the curve, pulled back to -`[p^k]^* = V_{p^k}^* ∘ π_{p^k}^*` on the function field, where -`π_{p^k}^* x = x^{p^k}`. This forces `[p^k]^* x = (V_{p^k}^* x)^{p^k}`, -i.e., `[p^k]^* x` is a `p^k`-th power in `K(E)`. Equivalently -`Φ_{p^k}, Ψ_{p^k}² ∈ R[X^{p^k}]`. - -### Polynomial-side recurrence approach (Worker C's stream) - -The polynomial-side argument avoids constructing `V_{p^k}`. The chain: -1. Base case `k = 1`: `Φ_p, Ψ_p² ∈ R[X^p]` — shipped (`Φ_two_mem_expand_two_charP`, - `Φ_three_mem_expand_three_charP`, etc.) for `p = 2, 3`. -2. Sub-step (function-field level): `[p^k]^* x ∈ R(x^{p^k})` — derivable - inductively from base + ring-hom properties of `[p]^*`. -3. Polynomial extraction: from `[p^k]^* x = Φ_{p^k}/Ψ_{p^k}² ∈ R(x^{p^k})`, - conclude `Φ_{p^k}, Ψ_{p^k}² ∈ R[X^{p^k}]`. - -Step 3 requires **coprimality of `Φ_{p^k}` and `Ψ_{p^k}²`** as polynomials -in `R[X]`. Mathlib provides this for the curve case via -`WeierstrassCurve.Φ.coprime_ΨSq` or analogous (Silverman III.6 background). -Step 2 is reasonable to formalise from the base case via induction on `k`. - -### The missing recurrence - -Direct propagation `Φ_{p^k} → Φ_{p^{k+1}}` via division-polynomial recurrence -needs the **multiplication-by-p formula**: -`preΨ (p · m) = F(preΨ_{m-?}, ..., preΨ_{m+?})` for prime `p` and any `m`. - -Mathlib provides the **doubling+adding-one** recurrences: -* `WeierstrassCurve.preΨ_even (m) : preΨ (2m) = ...` -* `WeierstrassCurve.preΨ_odd (m) : preΨ (2m+1) = ...` - -For `p = 2`, `2m` is `p · m`, so the doubling formula is the multiplication-by-2 -recurrence directly. For `p ≥ 3`, multiplication-by-`p` is **not** doubling -and requires a derived formula. The classical derivation iterates the -doubling+add-one chain `p` times, but the resulting polynomial identity is -sympy-territory complexity for each odd prime. - -The general formula is in Silverman §III.6 / Sutherland Lecture 6 (modern -treatment) but is not in mathlib. Shipping it for arbitrary prime `p` -requires either: -* A general recurrence proof from `preΨ_even`/`preΨ_odd` via induction - on the binary expansion of `p · m` (~200 LOC of polynomial manipulation - + sympy-verified per-prime multipliers). -* A direct port of the bivariate recurrence `Ψ_{m+n} Ψ_{m-n} = ...` - (Silverman Exercise 3.7) — ~50 LOC of polynomial identities, then derive - multiplication-by-`p` as `m + (p-1)·m`. - -### What's shipped here - -The polynomial-side propagation building blocks are in place: -* `pow_mem_expand_charP`, `pow_pow_mem_expand_pow_charP` — `f^(p^n) ∈ expand`-range. -* `pow_pow_mem_expand_pow_succ_of_expand_charP` — `f ∈ expand p` → - `f^(p^k) ∈ expand (p^(k+1))`. Used in the inductive step's - Frobenius-cycle argument. -* `expand_pow_map_iterateFrobenius` — equational form - `expand (p^n) (f.map iterateFrobenius) = f^(p^n)`. - -The next concrete sub-piece (deferred to the multiplication-by-p recurrence -port): the full propagation theorem -`Φ_p_pow_mul_p_mem_expand_charP : Φ_{p^k} ∈ expand (p^k) → Φ_{p^{k+1}} ∈ expand (p^{k+1})`. -/ +/-! ### Propagation to powers of the characteristic + +The Frobenius factorization of multiplication by `p^k` implies that the +pulled-back coordinates are `p^k`-th powers. On the polynomial side this +corresponds to membership of the coprime division-polynomial numerator and +denominator in `R[X^(p^k)]`. Powers and iterated Frobenius give the expansion +identities used to propagate this membership. +-/ end GenericExpand diff --git a/projects/HasseWeil/HasseWeil/Foundation/Verschiebung/UniversalQthRootWitness.lean b/projects/HasseWeil/HasseWeil/Foundation/Verschiebung/UniversalQthRootWitness.lean index c7790ab47..43c07c0ea 100644 --- a/projects/HasseWeil/HasseWeil/Foundation/Verschiebung/UniversalQthRootWitness.lean +++ b/projects/HasseWeil/HasseWeil/Foundation/Verschiebung/UniversalQthRootWitness.lean @@ -8,50 +8,26 @@ import HasseWeil.Foundation.Verschiebung.VerschiebungIsDualOfFrobenius import HasseWeil.Foundation.Verschiebung.Route2Universal /-! -# The universal q-th-root witness (general characteristic) — Route B - -This file discharges, for an arbitrary finite field `K` (`q = #K = p^k`, -`p = char K`), the **universal q-th-root witness** - -``` -h_qth_root : ∀ z, ∃ g, g ^ q = [q]* z -``` - -(`[q]*` the pullback of the multiplication-by-q isogeny on `K(E)`), and feeds -it through the proven reducer `verschiebungIsog_isDualOf_frobenius_of_qth_root_witness` -to obtain `verschiebung_isDualOf_frobenius_general` — the GAP-QF keystone. - -## Strategy (uniform in `p`, no per-prime polynomial witnesses) - -The keystone reduces (via `mulByInt_q_pullback_fieldRange_subset_frobenius_of_xy_witness` -and `functionField_eq_intermediateField_adjoin_xy`) to two generator facts: - -* `[q]* x_gen ∈ R` and `[q]* y_gen ∈ R`, where `R = (frobeniusIsog W).pullback.range = K(E)^q`. - -Both are obtained from the **Kähler differential** kernel theorem -`kaehlerD_eq_zero_iff_mem_pth_powers` (`ker D = K(E)^p`, char `p`) and the -**separability** of `K(E)/K(x_gen)` (`functionField_isSeparable`), with no -characteristic-specific polynomial computation: - -* **x-side base** `[p]* x_gen ∈ adjoin K {x_gen^p}`: `[p]* x_gen` is rational in - `x_gen` (so lies in `K(x_gen)`) and has `D([p]* x_gen) = 0` - (`D_mulByInt_p_pullback_x_gen_eq_zero`), hence is a `p`-th power `g^p` with - `g ∈ K(E)`; since `K(E)/K(x_gen)` is separable, the purely-inseparable element - `g` lies in `K(x_gen)`, so `[p]* x_gen = g^p ∈ adjoin K {x_gen^p}`. The - existing induction `mulByInt_pow_pullback_x_gen_mem_adjoin_pow_of_base`-style - bootstrap (re-derived here taking the Kähler base) lifts this to - `[q]* x_gen ∈ adjoin K {x_gen^q} ⊆ R`. -* **y-side** `[q]* y_gen ∈ R`: `y_gen` satisfies the separable Weierstrass - quadratic over `K(x_gen)`; applying `[q]*` gives that `[q]* y_gen` is a root of - a **separable** quadratic over `R` (its discriminant is `([q]*(2y+a₁x+a₃))² ≠ 0`, - using injectivity of `[q]*` and `2y+a₁x+a₃ ≠ 0`), with coefficients in `R` - (because `[q]* x_gen ∈ R`). So `[q]* y_gen` is separable over `R`; as `K(E)/R` - is purely inseparable (`frobeniusIsog_intermediateField_isPurelyInseparable`), - `[q]* y_gen ∈ R`. +# Universal `q`-th roots of multiplication pullbacks + +For a finite field `K` of cardinality `q = p^k`, every multiplication pullback +`[q]* z` on `K(E)` is a `q`-th power. The resulting image inclusion in Frobenius +pullback constructs the dual of Frobenius. + +It suffices to show that `[q]* x` and `[q]* y` lie in the Frobenius image +`R = K(E)^q`. The Kähler differential of `[p]* x` vanishes, so it is a `p`-th +power `g^p`. Since `K(E)/K(x)` is separable and `[p]* x ∈ K(x)`, the purely +inseparable element `g` lies in `K(x)`. Induction gives +`[q]* x ∈ K(x^q) ⊆ R`. + +The Weierstrass equation then makes `[q]* y` separable over `R`: the pulled-back +quadratic has nonzero derivative at `[q]* y`, since `[q]*` is injective and +`2y + a₁x + a₃ ≠ 0`. As `K(E)/R` is purely inseparable, `[q]* y` belongs to `R`. +The argument applies in every characteristic. ## References -* Silverman, *The Arithmetic of Elliptic Curves*, II.2.12, III.5.5, III.6.2. +* Silverman, *The Arithmetic of Elliptic Curves*, II.2.12, III.5.5, and III.6.2. -/ open WeierstrassCurve @@ -71,10 +47,10 @@ omit [Fintype K] [DecidableEq K] in theorem mem_fractionRing_range_of_pow_mem (p : ℕ) [Fact p.Prime] [CharP K p] (g : KE) (hg : g ^ p ∈ (algebraMap Mff KE).range) : g ∈ (algebraMap Mff KE).range := by - haveI : Algebra.IsSeparable Mff KE := functionField_isSeparable W.toAffine - haveI : CharP (Polynomial K) p := inferInstance - haveI : CharP Mff p := inferInstance - haveI : ExpChar Mff p := ExpChar.prime Fact.out + have : Algebra.IsSeparable Mff KE := functionField_isSeparable W.toAffine + have : CharP (Polynomial K) p := inferInstance + have : CharP Mff p := inferInstance + have : ExpChar Mff p := ExpChar.prime Fact.out have hsep : IsSeparable Mff g := Algebra.IsSeparable.isSeparable Mff g have hsd1 : (minpoly Mff g).natSepDegree = 1 := by rw [minpoly.natSepDegree_eq_one_iff_pow_mem p] @@ -93,7 +69,7 @@ the scalar-tower factoring of the structure map through `M = FractionRing K[X]`. theorem algebraMap_polynomial_eq_fractionRing (q : Polynomial K) : algebraMap (Polynomial K) KE q = algebraMap Mff KE (algebraMap (Polynomial K) Mff q) := by - haveI : IsScalarTower (Polynomial K) Mff KE := functionField_isScalarTower W.toAffine + have : IsScalarTower (Polynomial K) Mff KE := functionField_isScalarTower W.toAffine rw [← IsScalarTower.algebraMap_apply] omit [Fintype K] [DecidableEq K] in @@ -158,7 +134,7 @@ theorem mulByInt_p_pullback_x_gen_mem_adjoin_pow_routeB (p : ℕ) [Fact p.Prime] [CharP K p] : (mulByInt W.toAffine (p : ℤ)).pullback (x_gen W) ∈ IntermediateField.adjoin K ({x_gen W ^ p} : Set KE) := by - haveI : CharP KE p := charP_of_injective_algebraMap (algebraMap K KE).injective p + have : CharP KE p := charP_of_injective_algebraMap (algebraMap K KE).injective p have hp_ne : (p : ℤ) ≠ 0 := by exact_mod_cast (Fact.out : p.Prime).pos.ne' have hD := D_mulByInt_p_pullback_x_gen_eq_zero W p obtain ⟨g, hg⟩ := (kaehlerD_eq_zero_iff_mem_pth_powers W p _).mp hD @@ -175,8 +151,8 @@ theorem mulByInt_p_pullback_x_gen_mem_adjoin_pow_routeB exact adjoin_simple_pow_le_adjoin_simple_pow p (x_gen W) g hg_mem omit [Fintype K] in -/-- `[p ^ (k+1)]` factors as `[p ^ k] ∘ [p]` (shared scaffolding for the x- and -y-side `p^k`-power inductions). -/ +/-- `[p ^ (k+1)]` factors as `[p ^ k] ∘ [p]` (the common composition identity in the x- and +y-coordinate `p^k`-power inductions). -/ private theorem mulByInt_pow_succ_comp (p : ℕ) [Fact p.Prime] (k : ℕ) : mulByInt W.toAffine ((p ^ (k + 1) : ℕ) : ℤ) = (mulByInt W.toAffine ((p ^ k : ℕ) : ℤ)).comp @@ -195,7 +171,7 @@ theorem mulByInt_pow_pullback_x_gen_mem_adjoin_pow_routeB (p : ℕ) [Fact p.Prime] [CharP K p] : ∀ k, (mulByInt W.toAffine ((p ^ k : ℕ) : ℤ)).pullback (x_gen W) ∈ IntermediateField.adjoin K ({x_gen W ^ (p ^ k : ℕ)} : Set KE) := by - haveI : CharP KE p := charP_of_injective_algebraMap (algebraMap K KE).injective p + have : CharP KE p := charP_of_injective_algebraMap (algebraMap K KE).injective p intro k induction k with | zero => exact mulByInt_pow_zero_pullback_x_gen_mem_adjoin_pow W p @@ -355,7 +331,7 @@ theorem mulByInt_p_pullback_y_gen_mem_adjoin_pair_pow (p : ℕ) [Fact p.Prime] [CharP K p] : (mulByInt W.toAffine (p : ℤ)).pullback (y_gen W) ∈ IntermediateField.adjoin K ({x_gen W ^ p, y_gen W ^ p} : Set KE) := by - haveI : CharP KE p := charP_of_injective_algebraMap (algebraMap K KE).injective p + have : CharP KE p := charP_of_injective_algebraMap (algebraMap K KE).injective p obtain ⟨h, hh⟩ := (kaehlerD_eq_zero_iff_mem_pth_powers W p _).mp (D_mulByInt_p_pullback_y_gen_eq_zero W p) have hh_mem : h ∈ IntermediateField.adjoin K ({x_gen W, y_gen W} : Set KE) := by @@ -369,7 +345,7 @@ theorem mulByInt_pow_pullback_y_gen_mem_adjoin_pair_pow (p : ℕ) [Fact p.Prime] [CharP K p] : ∀ k, (mulByInt W.toAffine ((p ^ k : ℕ) : ℤ)).pullback (y_gen W) ∈ IntermediateField.adjoin K ({x_gen W ^ (p ^ k : ℕ), y_gen W ^ (p ^ k : ℕ)} : Set KE) := by - haveI : CharP KE p := charP_of_injective_algebraMap (algebraMap K KE).injective p + have : CharP KE p := charP_of_injective_algebraMap (algebraMap K KE).injective p intro k induction k with | zero => @@ -450,8 +426,8 @@ theorem qth_root_witness_general : g ^ Fintype.card K = (mulByInt W.toAffine ((Fintype.card K : ℕ) : ℤ)).pullback z := by obtain ⟨p, hCharP, ⟨n, _⟩, hp_prime, _⟩ := FiniteField.card' K - haveI : Fact p.Prime := ⟨hp_prime⟩ - haveI := hCharP + have : Fact p.Prime := ⟨hp_prime⟩ + have := hCharP exact qth_root_witness_of_charP W p /-- **The GAP-QF keystone (general characteristic)**: the Verschiebung is the dual of diff --git a/projects/HasseWeil/HasseWeil/Foundation/WallA/VSideDual.lean b/projects/HasseWeil/HasseWeil/Foundation/WallA/VSideDual.lean index e5247f095..049bee4e1 100644 --- a/projects/HasseWeil/HasseWeil/Foundation/WallA/VSideDual.lean +++ b/projects/HasseWeil/HasseWeil/Foundation/WallA/VSideDual.lean @@ -8,47 +8,16 @@ import HasseWeil.HasseBound.SumTrace import HasseWeil.Foundation.Verschiebung.Genuine /-! -# Wall A — the V-side dual route to the signed III.6.3 degree identity - -This file assembles the **V-side genuine isogeny** `β_dual = r·V − s` (built on the -Verschiebung `V`, mirroring the π-side genuine `β = r·π − s`) into the pivot-chain scaffold -shipped in `HasseWeil.GapSpines`, in order to drive - - `deg(r·π − s) = q·r² − t·r·s + s²` (the Wall-A keystone; its unconditional sorried form - `genuineIsogSmulSub_degree_eq_signed` was retired 2026-06-11 — the witness-parametric - `genuineIsogSmulSub_degree_eq_signed_via_walls` is the shipped form). - -## What is proved here, unconditionally - -* `isogeny_isGenuineWith_pointMap` — **any** isogeny `φ` is `IsGenuineWith` the geometric action - `Affine.Point.map φ.pullback` on `(W_KE).Point`. This is the clean, general form of the - "the pullback is the comorphism of a geometric map" non-vacuity check (`map_some`). -* `betaDualV` — the V-side genuine isogeny `r·V − s`, constructed via the genuine-sum combinator - `addIsog` applied to the Verschiebung (so **`addIsog` does generalise to `V`** — the V-side - pole/injectivity bricks already live in `Verschiebung/Genuine.lean`). -* `betaDualV_toAddMonoidHom_sub` — the point-map of `betaDualV` is `r·V − s·id` - (`h_beta_dual_hom`), using `V.toAddMonoidHom = [q]` (`verschiebungIsog_of_witness`). -* `betaDualV_isDual_pi` — `IsDualOf V π` (`h_isDual_V_pi`), from `verschiebung_dual_exists`'s - underlying witness. -* `genuineIsogSmulSub_degree_eq_signed_closed` — the **closing lemma**: it constructs `V` and - `β_dual = r·V − s` internally, discharges `h_isDual_V_pi`, `h_beta_dual_hom`, `h_beta_pos`, and - reduces the Wall-A keystone to exactly the three *standing dual residuals* (the genuine III.6.1 / - III.6.2 content the project has not yet shipped unconditionally): - - 1. `h_sum_trace` : `π + V = [t]` (the trace relation, Silverman III.6.2(b); itself the - output of `sum_trace_frobenius_witness` modulo `IsDualOf (1−V) (1−π)`); - 2. `h_pullback_eq`: the full-isogeny **comorphism** identity `(β_dual ∘ β)* = [N]*` (the - "double-Vieta" pullback match — the geometrically irreducible content); - 3. `h_isDual_pair`: `IsDualOf β_dual β` (Silverman III.6.1 for the genuine pair). - - Everything else is internal; this is the honest reduction of Wall A to the standing dual - residuals, composed through `genuineIsogSmulSub_degree_eq_signed_of_full_pivot_chain`. - -The unconditional statement (the former bare-`sorry` -`GapSpines.genuineIsogSmulSub_degree_eq_signed`, deleted 2026-06-11 with the legacy skeleton -chain) would require the three residuals above unconditionally (the project has not -shipped `IsDualOf (1−V) (1−π)` nor the double-Vieta pullback identity); this -witness-parametric closing lemma is the live form. +# Verschiebung and the signed degree identity + +Let `π` be Frobenius, `V` its dual, and `t` its trace. The isogeny `r V - s` +provides the dual candidate for `r π - s`. Their point maps, a trace relation, +a composition pullback identity, and a duality witness imply the signed degree +formula `deg(r π - s) = q r² - t r s + s²`, under the stated nonvanishing hypotheses. + +The trace, pullback, and duality identities remain explicit mathematical inputs. +The construction also identifies the geometric action associated with any isogeny +pullback at the generic point. ## References @@ -64,14 +33,11 @@ namespace WallA variable {K : Type*} [Field K] [Fintype K] [DecidableEq K] variable (W : WeierstrassCurve K) [W.toAffine.IsElliptic] [Fintype W.toAffine.Point] -/-! ### A general genuineness witness: any isogeny is genuine with `map pullback` +/-! ### Geometric action of an isogeny pullback -`IsGenuineWith φ g` (`GapSpines`) only constrains the geometric action `g` at the generic point -`P_gen = (x_gen, y_gen)`: it asks `g P_gen = some (φ.pullback x_gen) (φ.pullback y_gen)`. For the -**canonical** action `Affine.Point.map (W' := W) φ.pullback` this is exactly `Affine.Point.map_some` -applied to `genericPoint = some x_gen y_gen _`. So genuineness with the canonical action holds for -*every* isogeny, with no hypotheses — this is the clean non-vacuity form (it confirms `IsGenuine` -is satisfied by any genuine geometric isogeny, the pullback being its comorphism). -/ +For the canonical action `Affine.Point.map φ.pullback`, evaluation at the generic +point is `some (φ* x) (φ* y)`. This supplies `IsGenuineWith` for every isogeny. +-/ omit [Fintype K] [Fintype W.toAffine.Point] in theorem isogeny_isGenuineWith_pointMap (φ : Isogeny W.toAffine W.toAffine) : IsGenuineWith W φ (WeierstrassCurve.Affine.Point.map (W' := W) φ.pullback) := by @@ -86,14 +52,14 @@ omit [Fintype K] [Fintype W.toAffine.Point] in theorem isogeny_isGenuine (φ : Isogeny W.toAffine W.toAffine) : IsGenuine W φ := ⟨_, isogeny_isGenuineWith_pointMap W φ⟩ -/-! ### The Verschiebung as a concrete `V` with `IsDualOf V π` +/-! ### Verschiebung duality -We pin a single concrete Verschiebung witness, `verschiebungV`, from the connected (axiom-clean -modulo the upstream `[q] = V ∘ π` factorisation) inclusion `mulByInt_q_pullback_subset_frobenius`. -Its `IsDualOf V π` is `verschiebung_dual_exists`'s underlying witness, and its point map is the -`[q]`-point map (`verschiebungIsog_of_witness.toAddMonoidHom = (mulByInt q).toAddMonoidHom`). -/ +The image inclusion `Im([q]*) ⊆ Im(π*)` constructs a Verschiebung `V` dual to +Frobenius. On rational points over the finite field, Frobenius is the identity, +so the point map of `V` is multiplication by `q`. +-/ -/-- The inclusion `Im([q]*) ⊆ Im(π*)` (Silverman II.2.11/III.6.2), the connected witness. -/ +/-- The image inclusion `Im([q]*) ⊆ Im(π*)`. See Silverman II.2.11 and III.6.2. -/ noncomputable abbrev hSubset (hq : 2 ≤ Fintype.card K) : (mulByInt W.toAffine ((Fintype.card K : ℕ) : ℤ)).pullback.range ≤ (frobeniusIsog W).pullback.range := @@ -104,11 +70,13 @@ noncomputable def verschiebungV (hq : 2 ≤ Fintype.card K) : Isogeny W.toAffine W.toAffine := verschiebungIsog_of_witness W (hSubset W hq) -/-- `IsDualOf V π` for the concrete Verschiebung (`h_isDual_V_pi`, Silverman III.6.1 Case 2). -/ +omit [Fintype W.toAffine.Point] in +/-- The concrete Verschiebung is dual to Frobenius. See Silverman III.6.1. -/ theorem verschiebungV_isDual (hq : 2 ≤ Fintype.card K) : IsDualOf W.toAffine (verschiebungV W hq) (frobeniusIsog W) := verschiebungIsog_of_witness_isDualOf_frobenius W (hSubset W hq) +omit [Fintype W.toAffine.Point] in /-- The point map of the concrete Verschiebung is the `[q]`-point map (`= q • ·`). Frobenius on `F_q`-rational points is the identity, so the dual `V` (`V ∘ π = [q]`) must carry the `[q]`-point map. -/ @@ -117,12 +85,12 @@ map. -/ (mulByInt W.toAffine ((Fintype.card K : ℕ) : ℤ)).toAddMonoidHom := rfl -/-! ### The V-side genuine isogeny `β_dual = r·V − s` +/-! ### The isogeny `r V - s` -This is `addIsog` of the genuine pair `(V.zsmul r, [−s])` — the **exact mirror** of the π-side -`genuineIsogSmulSub = addIsog (π.zsmul r, [−s])`. So `addIsog` *does* generalise to `V`: the V-side -non-inverse / injectivity / pole bricks are the ones shipped in `Verschiebung/Genuine.lean` -(`genuineIsogSmulSubV_universal_unconditional`). Its point map is `r·V + (−s) = r·V − s`. -/ +The addition construction applied to `(V.zsmul r, [-s])` gives an isogeny with +point map `r V - s id`, using the distinct-coordinate and pole identities for +Verschiebung. +-/ /-- The V-side genuine isogeny `r·V − s` on the concrete Verschiebung `V`. -/ noncomputable def betaDualV (hq : 2 ≤ Fintype.card K) @@ -131,6 +99,7 @@ noncomputable def betaDualV (hq : 2 ≤ Fintype.card K) genuineIsogSmulSubV_universal_unconditional W (verschiebungV W hq) (verschiebungV_isDual W hq) r s hr hs hrK hsK +omit [Fintype W.toAffine.Point] in /-- The point map of `betaDualV` is `r·V − s·id` (`h_beta_dual_hom`). `betaDualV.toAddMonoidHom = (V.zsmul r) + [−s]`, and `(V.zsmul r) = [r] ∘ V`, so pointwise this is @@ -150,28 +119,19 @@ theorem betaDualV_toAddMonoidHom_sub (hq : 2 ≤ Fintype.card K) AddMonoidHom.id_apply, Isogeny.zsmul_apply, mulByInt_apply] rw [neg_smul, sub_eq_add_neg] -/-! ### The Wall-A keystone, reduced to the standing dual residuals - -`genuineIsogSmulSub_degree_eq_signed_closed` is the live, witness-parametric form of the Wall-A -keystone (whose unconditional sorried form was deleted 2026-06-11). It constructs the concrete -Verschiebung -`V` and the V-side genuine isogeny `β_dual = r·V − s` internally, discharges the three *structural* -pivot inputs (`h_isDual_V_pi`, `h_beta_dual_hom`, `h_beta_pos`), and reduces the keystone to exactly -the three **standing dual residuals** plus the nonvanishing of `N`: - -* `h_sum_trace` — the trace relation `π + V = [t]` (Silverman III.6.2(b); the output of - `sum_trace_frobenius_witness` once `IsDualOf (1−V) (1−π)` ships); -* `h_pullback_eq` — the comorphism identity `(β_dual ∘ β)* = [N]*` (the double-Vieta pullback match, - the geometrically irreducible content of Wall A — equivalently, that `β_dual ∘ β` is genuine with - the `[N]` action; see `GapSpines.genuine_dual_comp_eq_mulByInt_of_isGenuineWith`); -* `h_isDual_pair` — `IsDualOf β_dual β` (Silverman III.6.1 for the genuine pair); -* `h_N_ne` — `N = q·r² − t·r·s + s² ≠ 0` (automatic in the Hasse assembly: `β_dual ∘ β = [N]` - forces `deg β · deg β_dual = N²`, so `N ≠ 0`; carried here as a hypothesis). - -The composition is `genuineIsogSmulSub_degree_eq_signed_of_full_pivot_chain` (GapSpines), with the -internally-built `V = verschiebungV`, `β_dual = betaDualV`. This is the honest reduction of Wall A: -the only inputs are the genuine III.6.1/III.6.2 facts the project has not yet shipped -unconditionally. -/ +/-! ### The signed degree identity + +For `β = r π - s` and `β_dual = r V - s`, assume: + +* the trace relation `π + V = [t]` on points; +* the pullback identity `(β_dual ∘ β)* = [N]*`, where `N = q r² - t r s + s²`; +* the duality relation `IsDualOf β_dual β`; +* `N ≠ 0`. + +These inputs, together with the constructed point map of `β_dual` and positivity +of the degree of `β`, give `deg β = N`. See Silverman III.6.1–III.6.3. +-/ +omit [Fintype W.toAffine.Point] in theorem genuineIsogSmulSub_degree_eq_signed_closed (hq : 2 ≤ Fintype.card K) (r s : ℤ) (hr : r ≠ 0) (hs : s ≠ 0) (hrK : (r : K) ≠ 0) (hsK : (s : K) ≠ 0) (h_sum_trace : (frobeniusIsog W).toAddMonoidHom + (verschiebungV W hq).toAddMonoidHom = diff --git a/projects/HasseWeil/HasseWeil/Foundation/WronskianAux.lean b/projects/HasseWeil/HasseWeil/Foundation/WronskianAux.lean index 2c92295af..6cd2db847 100644 --- a/projects/HasseWeil/HasseWeil/Foundation/WronskianAux.lean +++ b/projects/HasseWeil/HasseWeil/Foundation/WronskianAux.lean @@ -1,120 +1,32 @@ +import HasseWeil.Foundation.WronskianAux.Prefix /- Copyright (c) 2026 Chris Birkbeck. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Birkbeck -/ -import Mathlib.AlgebraicGeometry.EllipticCurve.DivisionPolynomial.Basic -import Mathlib.Algebra.Polynomial.Derivation -import HasseWeil.Foundation.WronskianAux.CNorm - -/-! -# Wronskian identities for Weierstrass division polynomials - -Two auxiliary polynomial identities used in the proof of the division-polynomial -Wronskian identity (Silverman III.3 Exercise 3.7): - -* `wronskian_aux_three` — the `m = 3` case. -* `wronskian_aux_four` — the `m = 4` case. - -## Strategy - -Both identities are pure polynomial identities in `R[X]` that hold because of -`b_relation : 4·b₈ = b₂·b₆ - b₄²`. Concretely, `LHS - RHS` factors as -`M(X) · (4b₈ - b₂b₆ + b₄²)` in `ℤ[b₂,b₄,b₆,b₈,X]` for an explicit polynomial -`M`. The multipliers `M` were computed by dividing the expanded difference by -`(4b₈ - b₂b₆ + b₄²)` over `ℤ[b₂,b₄,b₆,b₈]` (with `b₈` as the leading variable); -see `scripts/compute_multipliers.py`. - -The proof uses `linear_combination M · h_P` where `h_P` is `b_relation` lifted -to `R[X]`. The `C`-normalization lemmas imported from `CNorm.lean` handle the -`C (Nat.cast n : R)` vs `C (OfNat.ofNat n : R)` atomization issue that -otherwise blocks `ring` from closing the residual. - -Resource usage (vs original): - -* `wronskian_aux_three`: default `maxHeartbeats 200000` (was 32M, 160× reduction). -* `wronskian_aux_four`: `maxHeartbeats 350000` (was 64M, ~180× reduction; measured - minimum — 300000 fails). See TODO below for reducing to default. - -TODO (cleanup): reduce `wronskian_aux_four` `maxHeartbeats` to 200K (default). - -The 350K is required because `ring` must normalize a single degree-30 polynomial -identity against the degree-26 multiplier `M`; the `evalMulProd` step in ring's -normalization exceeds 300K heartbeats. Options to fit default: - -* Coefficient-wise approach via `Polynomial.ext_iff_natDegree_le`: works for - `coeff 0` at default (using `eval 0` trick, which is a ring hom), but - `Polynomial.coeff_mul` on nested products (`Ψ₃^3`, `preΨ₄ * Ψ₂Sq^2`, etc.) - makes simp hit `max_steps` for `coeff i > 0`. Over arbitrary `CommRing R`, - `(derivative^i p).eval 0 = i! · coeff i p` can't be inverted (no division). -* New tactic: bounded-degree coefficient extraction avoiding simp's antidiagonal - explosion — doesn't exist in mathlib yet. -* Formalize in the quotient ring `ℤ[b₂,b₄,b₆,b₈] / (4b₈ - b₂b₆ + b₄²)` where - `b_relation` becomes a ring identity — would work on 3 atoms instead of 4, - smaller ring work, likely fits default. Requires building the quotient. -* Manual algebraic split of m=4 into smaller sub-identities — research-level - mathematical work. - -RAM usage: ~1-2 GB (was ~57 GB, ~30× reduction). - -## References - -* Silverman, *The Arithmetic of Elliptic Curves*, III.3 Exercise 3.7. --/ - open WeierstrassCurve Polynomial - namespace HasseWeil - variable {R : Type*} [CommRing R] (W : WeierstrassCurve R) --- `b_relation` lifted to an equality in `R[X]`. The `C`-distributed statement shape is --- load-bearing: the `wronskian_aux_*` proofs below pass this to `linear_combination`, --- whose `ring` normalization treats each `C _` application as an atom. -private lemma b_relation_poly : - ((4 : R[X]) * Polynomial.C W.b₈ : R[X]) = - Polynomial.C W.b₂ * Polynomial.C W.b₆ - Polynomial.C W.b₄ ^ 2 := by - simpa [Polynomial.C_ofNat] using congrArg Polynomial.C W.b_relation - -/-- Wronskian auxiliary identity, `m = 3` case (Silverman III.3.7). -`4·Ψ₃³ + 2·preΨ₄·Ψ₂Sq·Ψ₃' − (preΨ₄·Ψ₂Sq)'·Ψ₃ -= 3·preΨ₄·Ψ₂Sq² − 3·preΨ₄²`. +lemma wronskian_derivative_three : Polynomial.derivative W.Ψ₃ = 3 * W.Ψ₂Sq := by + simp only [Ψ₃, Ψ₂Sq, Polynomial.derivative_add, Polynomial.derivative_mul, + Polynomial.derivative_pow, Polynomial.derivative_X, Polynomial.derivative_C, + Polynomial.derivative_ofNat, Polynomial.C_mul, + Polynomial.C_ofNat, Nat.cast_ofNat] + ring -Multiplier: `M = b₈² + 4b₆b₈·X + 6b₄b₈·X² + 4b₂b₈·X³ + (b₂b₆ + 34b₈)·X⁴ - + 36b₆·X⁵ + 18b₄·X⁶ + 4b₂·X⁷ + 9·X⁸`. -/ -lemma wronskian_aux_three : - 4 * W.Ψ₃ ^ 3 + 2 * W.preΨ₄ * W.Ψ₂Sq * Polynomial.derivative W.Ψ₃ - - Polynomial.derivative (W.preΨ₄ * W.Ψ₂Sq) * W.Ψ₃ = - Polynomial.C 3 * W.preΨ₄ * W.Ψ₂Sq ^ 2 - Polynomial.C 3 * W.preΨ₄ ^ 2 := by +lemma wronskian_three_derivative_two : + W.Ψ₃ * Polynomial.derivative W.Ψ₂Sq = 2 * W.preΨ₄ + 2 * W.Ψ₂Sq ^ 2 := by linear_combination (norm := ( - simp only [Ψ₃, preΨ₄, Ψ₂Sq, - Polynomial.derivative_add, Polynomial.derivative_sub, - Polynomial.derivative_mul, Polynomial.derivative_pow, Polynomial.derivative_X, - Polynomial.derivative_C, Polynomial.derivative_ofNat, - Polynomial.C_add, Polynomial.C_sub, Polynomial.C_mul, Polynomial.C_pow, - Polynomial.C_ofNat, Nat.cast_ofNat] - ring)) - (Polynomial.C (W.b₈ ^ 2) - + Polynomial.C (4 * W.b₆ * W.b₈) * Polynomial.X - + Polynomial.C (6 * W.b₄ * W.b₈) * Polynomial.X ^ 2 - + Polynomial.C (4 * W.b₂ * W.b₈) * Polynomial.X ^ 3 - + Polynomial.C (W.b₂ * W.b₆ + 34 * W.b₈) * Polynomial.X ^ 4 - + Polynomial.C (36 * W.b₆) * Polynomial.X ^ 5 - + Polynomial.C (18 * W.b₄) * Polynomial.X ^ 6 - + Polynomial.C (4 * W.b₂) * Polynomial.X ^ 7 - + Polynomial.C 9 * Polynomial.X ^ 8) * b_relation_poly W - --- Measured minimum (2026-07-16, #7205): 300000 fails at `synthesize pending MVars` --- (ring's normalization of the degree-30 residual), 350000 passes. Removal attempts: --- default budget and a type-ascribed multiplier both time out — the structural fix is the --- quotient-ring route documented above (producer/decompose work). -set_option maxHeartbeats 350000 in -/-- Wronskian auxiliary identity, `m = 4` case (Silverman III.3.7). - -Multiplier `M(X)` is a degree-26 polynomial in `W.b₂, W.b₄, W.b₆, W.b₈` with -integer coefficients, computed offline by polynomial division of `LHS - RHS` -by `(4b₈ - b₂b₆ + b₄²)` over `ℤ[b₂, b₄, b₆, b₈]`. See -`scripts/compute_multipliers.py` for the derivation. -/ + simp only [Ψ₃, preΨ₄, Ψ₂Sq, Polynomial.derivative_add, Polynomial.derivative_mul, + Polynomial.derivative_pow, Polynomial.derivative_X, Polynomial.derivative_C, + Polynomial.derivative_ofNat, Polynomial.C_sub, + Polynomial.C_mul, Polynomial.C_pow, Polynomial.C_ofNat, Nat.cast_ofNat] + ring)) (-2 * Polynomial.X ^ 2) * wronskian_b_relation_poly W + +/-- The fourth Wronskian identity follows from the third identity and the two +small derivative relations above. This factorization avoids expansion of the +original degree-26 multiplier. -/ lemma wronskian_aux_four : (W.preΨ₄ ^ 2 * W.Ψ₂Sq) ^ 2 - (Polynomial.derivative (W.Ψ₃ * (W.preΨ₄ * W.Ψ₂Sq ^ 2 - W.Ψ₃ ^ 3)) * @@ -126,315 +38,12 @@ lemma wronskian_aux_four : (W.Ψ₃ * ((W.preΨ₄ * W.Ψ₂Sq ^ 2 - W.Ψ₃ ^ 3) - W.preΨ₄ ^ 2)) - W.preΨ₄ * (W.preΨ₄ * W.Ψ₂Sq ^ 2 - W.Ψ₃ ^ 3) ^ 2) := by linear_combination (norm := ( - simp only [Ψ₃, preΨ₄, Ψ₂Sq, - Polynomial.derivative_mul, Polynomial.derivative_pow, - Polynomial.derivative_add, Polynomial.derivative_sub, - Polynomial.derivative_X, Polynomial.derivative_C, Polynomial.derivative_ofNat, - Polynomial.C_mul, Polynomial.C_sub, Polynomial.C_add, Polynomial.C_pow, - Polynomial.C_neg, Polynomial.C_ofNat, Nat.cast_ofNat] + simp only [Polynomial.derivative_mul, Polynomial.derivative_sub, + Polynomial.derivative_pow, Polynomial.C_ofNat, Nat.cast_ofNat] ring)) - (Polynomial.C (-W.b₆ ^ 6 * W.b₈ ^ 2 + (-2 * W.b₆ ^ 2 * W.b₈ ^ 5) - + 2 * W.b₄ * W.b₈ ^ 6 - + (-W.b₄ ^ 2 * W.b₆ ^ 2 * W.b₈ ^ 4) - + 2 * W.b₄ * W.b₆ ^ 4 * W.b₈ ^ 3) - + Polynomial.C (-26 * W.b₆ ^ 3 * W.b₈ ^ 4 + (-4 * W.b₆ ^ 7 * W.b₈) - + 2 * W.b₂ * W.b₈ ^ 6 - + (-4 * W.b₄ ^ 3 * W.b₆ * W.b₈ ^ 4) - + 2 * W.b₂ * W.b₆ ^ 4 * W.b₈ ^ 3 - + 2 * W.b₄ * W.b₆ ^ 5 * W.b₈ ^ 2 - + 6 * W.b₄ ^ 2 * W.b₆ ^ 3 * W.b₈ ^ 3 - + 24 * W.b₄ * W.b₆ * W.b₈ ^ 5 - + (-2 * W.b₂ * W.b₄ * W.b₆ ^ 2 * W.b₈ ^ 4)) * Polynomial.X - + Polynomial.C (-4 * W.b₆ ^ 8 + 20 * W.b₈ ^ 6 + (-108 * W.b₆ ^ 4 * W.b₈ ^ 3) - + (-4 * W.b₄ ^ 4 * W.b₈ ^ 4) + 28 * W.b₄ ^ 2 * W.b₈ ^ 5 - + (-W.b₂ ^ 2 * W.b₆ ^ 2 * W.b₈ ^ 4) - + (-18 * W.b₄ * W.b₆ ^ 6 * W.b₈) - + (-2 * W.b₄ ^ 3 * W.b₆ ^ 2 * W.b₈ ^ 3) - + 6 * W.b₂ * W.b₆ ^ 5 * W.b₈ ^ 2 - + 26 * W.b₂ * W.b₆ * W.b₈ ^ 5 - + 27 * W.b₄ ^ 2 * W.b₆ ^ 4 * W.b₈ ^ 2 - + 54 * W.b₄ * W.b₆ ^ 2 * W.b₈ ^ 4 - + (-10 * W.b₂ * W.b₄ ^ 2 * W.b₆ * W.b₈ ^ 4) - + 6 * W.b₂ * W.b₄ * W.b₆ ^ 3 * W.b₈ ^ 3) * Polynomial.X ^ 2 - + Polynomial.C (-196 * W.b₆ ^ 5 * W.b₈ ^ 2 + (-28 * W.b₄ * W.b₆ ^ 7) - + 280 * W.b₆ * W.b₈ ^ 5 - + (-96 * W.b₄ * W.b₆ ^ 3 * W.b₈ ^ 3) - + (-16 * W.b₄ ^ 4 * W.b₆ * W.b₈ ^ 3) - + (-16 * W.b₄ ^ 2 * W.b₆ ^ 5 * W.b₈) - + (-12 * W.b₂ * W.b₄ ^ 3 * W.b₈ ^ 4) - + 40 * W.b₂ * W.b₄ * W.b₈ ^ 5 - + 52 * W.b₄ ^ 3 * W.b₆ ^ 3 * W.b₈ ^ 2 - + 96 * W.b₂ * W.b₆ ^ 2 * W.b₈ ^ 4 - + 156 * W.b₄ ^ 2 * W.b₆ * W.b₈ ^ 4 - + (-16 * W.b₂ * W.b₄ ^ 2 * W.b₆ ^ 2 * W.b₈ ^ 3) - + (-8 * W.b₂ ^ 2 * W.b₄ * W.b₆ * W.b₈ ^ 4) - + 44 * W.b₂ * W.b₄ * W.b₆ ^ 4 * W.b₈ ^ 2) * Polynomial.X ^ 3 - + Polynomial.C (-136 * W.b₆ ^ 6 * W.b₈ + (-76 * W.b₄ ^ 2 * W.b₆ ^ 6) - + (-9 * W.b₂ * W.b₆ ^ 7) - + (-8 * W.b₄ ^ 5 * W.b₈ ^ 3) + 12 * W.b₂ ^ 2 * W.b₈ ^ 5 - + 48 * W.b₄ ^ 3 * W.b₈ ^ 4 + 356 * W.b₄ * W.b₈ ^ 5 - + 1374 * W.b₆ ^ 2 * W.b₈ ^ 4 + (-508 * W.b₄ * W.b₆ ^ 4 * W.b₈ ^ 2) - + (-13 * W.b₂ ^ 2 * W.b₄ ^ 2 * W.b₈ ^ 4) - + (-2 * W.b₂ ^ 3 * W.b₆ * W.b₈ ^ 4) - + 11 * W.b₂ ^ 2 * W.b₆ ^ 4 * W.b₈ ^ 2 - + 28 * W.b₄ ^ 4 * W.b₆ ^ 2 * W.b₈ ^ 2 - + 30 * W.b₄ ^ 3 * W.b₆ ^ 4 * W.b₈ - + 128 * W.b₂ * W.b₆ ^ 3 * W.b₈ ^ 3 - + 216 * W.b₄ ^ 2 * W.b₆ ^ 2 * W.b₈ ^ 3 - + (-52 * W.b₂ * W.b₄ ^ 3 * W.b₆ * W.b₈ ^ 3) - + (-20 * W.b₂ ^ 2 * W.b₄ * W.b₆ ^ 2 * W.b₈ ^ 3) - + 30 * W.b₂ * W.b₄ * W.b₆ ^ 5 * W.b₈ - + 81 * W.b₂ * W.b₄ ^ 2 * W.b₆ ^ 3 * W.b₈ ^ 2 - + 240 * W.b₂ * W.b₄ * W.b₆ * W.b₈ ^ 4) * Polynomial.X ^ 4 - + Polynomial.C (-2 * W.b₆ ^ 7 + (-100 * W.b₄ ^ 3 * W.b₆ ^ 5) + 188 * W.b₂ * W.b₈ ^ 5 - + 3056 * W.b₆ ^ 3 * W.b₈ ^ 3 + (-468 * W.b₄ * W.b₆ ^ 5 * W.b₈) - + (-410 * W.b₄ ^ 2 * W.b₆ ^ 3 * W.b₈ ^ 2) - + (-46 * W.b₂ * W.b₄ * W.b₆ ^ 6) - + (-28 * W.b₂ * W.b₆ ^ 4 * W.b₈ ^ 2) - + (-24 * W.b₂ * W.b₄ ^ 4 * W.b₈ ^ 3) - + (-6 * W.b₂ ^ 3 * W.b₄ * W.b₈ ^ 4) - + (-6 * W.b₂ ^ 3 * W.b₆ ^ 2 * W.b₈ ^ 3) - + 14 * W.b₂ ^ 2 * W.b₆ ^ 5 * W.b₈ - + 56 * W.b₄ ^ 4 * W.b₆ ^ 3 * W.b₈ - + 64 * W.b₂ * W.b₄ ^ 2 * W.b₈ ^ 4 - + 68 * W.b₂ ^ 2 * W.b₆ * W.b₈ ^ 4 - + 248 * W.b₄ ^ 3 * W.b₆ * W.b₈ ^ 3 + 3168 * W.b₄ * W.b₆ * W.b₈ ^ 4 - + (-58 * W.b₂ ^ 2 * W.b₄ ^ 2 * W.b₆ * W.b₈ ^ 3) - + 24 * W.b₂ * W.b₄ ^ 3 * W.b₆ ^ 2 * W.b₈ ^ 2 - + 24 * W.b₂ ^ 2 * W.b₄ * W.b₆ ^ 3 * W.b₈ ^ 2 - + 122 * W.b₂ * W.b₄ ^ 2 * W.b₆ ^ 4 * W.b₈ - + 528 * W.b₂ * W.b₄ * W.b₆ ^ 2 * W.b₈ ^ 3) * Polynomial.X ^ 5 - + Polynomial.C (664 * W.b₈ ^ 5 + (-W.b₂ ^ 4 * W.b₈ ^ 4) + (-64 * W.b₄ ^ 4 * W.b₆ ^ 4) - + (-6 * W.b₂ ^ 2 * W.b₆ ^ 6) + 116 * W.b₄ * W.b₆ ^ 6 - + 116 * W.b₄ ^ 4 * W.b₈ ^ 3 + 1500 * W.b₄ ^ 2 * W.b₈ ^ 4 - + 2572 * W.b₆ ^ 4 * W.b₈ ^ 2 + (-W.b₂ ^ 3 * W.b₆ ^ 3 * W.b₈ ^ 2) - + (-758 * W.b₄ ^ 2 * W.b₆ ^ 4 * W.b₈) - + (-110 * W.b₂ * W.b₆ ^ 5 * W.b₈) - + (-106 * W.b₄ ^ 3 * W.b₆ ^ 2 * W.b₈ ^ 2) - + (-85 * W.b₂ * W.b₄ ^ 2 * W.b₆ ^ 5) - + (-26 * W.b₂ ^ 2 * W.b₄ ^ 3 * W.b₈ ^ 3) - + 12 * W.b₂ ^ 2 * W.b₄ * W.b₈ ^ 4 - + 24 * W.b₄ ^ 5 * W.b₆ ^ 2 * W.b₈ - + 168 * W.b₂ ^ 2 * W.b₆ ^ 2 * W.b₈ ^ 3 - + 1610 * W.b₂ * W.b₆ * W.b₈ ^ 4 - + 10544 * W.b₄ * W.b₆ ^ 2 * W.b₈ ^ 3 - + (-27 * W.b₂ ^ 2 * W.b₄ ^ 2 * W.b₆ ^ 2 * W.b₈ ^ 2) - + (-26 * W.b₂ ^ 3 * W.b₄ * W.b₆ * W.b₈ ^ 3) - + (-20 * W.b₂ * W.b₄ ^ 4 * W.b₆ * W.b₈ ^ 2) - + 76 * W.b₂ ^ 2 * W.b₄ * W.b₆ ^ 4 * W.b₈ - + 78 * W.b₂ * W.b₄ * W.b₆ ^ 3 * W.b₈ ^ 2 - + 156 * W.b₂ * W.b₄ ^ 3 * W.b₆ ^ 3 * W.b₈ - + 484 * W.b₂ * W.b₄ ^ 2 * W.b₆ * W.b₈ ^ 3) * Polynomial.X ^ 6 - + Polynomial.C (-336 * W.b₆ ^ 5 * W.b₈ + (-16 * W.b₄ ^ 5 * W.b₆ ^ 3) - + (-4 * W.b₂ ^ 3 * W.b₈ ^ 4) + 48 * W.b₂ * W.b₆ ^ 6 - + 516 * W.b₄ ^ 2 * W.b₆ ^ 5 + 6552 * W.b₆ * W.b₈ ^ 4 - + (-1032 * W.b₄ ^ 3 * W.b₆ ^ 3 * W.b₈) - + (-68 * W.b₂ * W.b₄ ^ 3 * W.b₆ ^ 4) - + (-20 * W.b₂ ^ 2 * W.b₄ * W.b₆ ^ 5) - + (-12 * W.b₂ ^ 3 * W.b₄ ^ 2 * W.b₈ ^ 3) - + (-4 * W.b₂ ^ 4 * W.b₆ * W.b₈ ^ 3) - + 12 * W.b₂ ^ 3 * W.b₆ ^ 4 * W.b₈ - + 80 * W.b₂ ^ 2 * W.b₆ ^ 3 * W.b₈ ^ 2 - + 212 * W.b₄ ^ 4 * W.b₆ * W.b₈ ^ 2 - + 304 * W.b₂ * W.b₄ ^ 3 * W.b₈ ^ 3 + 1272 * W.b₂ * W.b₄ * W.b₈ ^ 4 - + 5552 * W.b₂ * W.b₆ ^ 2 * W.b₈ ^ 3 - + 11312 * W.b₄ ^ 2 * W.b₆ * W.b₈ ^ 3 - + 12336 * W.b₄ * W.b₆ ^ 3 * W.b₈ ^ 2 - + (-472 * W.b₂ * W.b₄ * W.b₆ ^ 4 * W.b₈) - + (-44 * W.b₂ ^ 2 * W.b₄ ^ 3 * W.b₆ * W.b₈ ^ 2) - + (-28 * W.b₂ ^ 3 * W.b₄ * W.b₆ ^ 2 * W.b₈ ^ 2) - + 64 * W.b₂ * W.b₄ ^ 4 * W.b₆ ^ 2 * W.b₈ - + 108 * W.b₂ * W.b₄ ^ 2 * W.b₆ ^ 2 * W.b₈ ^ 2 - + 116 * W.b₂ ^ 2 * W.b₄ ^ 2 * W.b₆ ^ 3 * W.b₈ - + 240 * W.b₂ ^ 2 * W.b₄ * W.b₆ * W.b₈ ^ 3) * Polynomial.X ^ 7 - + Polynomial.C (-883 * W.b₆ ^ 6 + (-W.b₂ ^ 3 * W.b₆ ^ 5) + 198 * W.b₄ ^ 5 * W.b₈ ^ 2 - + 216 * W.b₂ ^ 2 * W.b₈ ^ 4 + 790 * W.b₄ ^ 3 * W.b₆ ^ 4 - + 4720 * W.b₄ ^ 3 * W.b₈ ^ 3 + 5526 * W.b₄ * W.b₈ ^ 4 - + 26236 * W.b₆ ^ 2 * W.b₈ ^ 3 + (-918 * W.b₄ ^ 4 * W.b₆ ^ 2 * W.b₈) - + (-270 * W.b₄ * W.b₆ ^ 4 * W.b₈) - + (-70 * W.b₂ ^ 2 * W.b₆ ^ 4 * W.b₈) - + (-22 * W.b₂ ^ 2 * W.b₄ ^ 2 * W.b₆ ^ 4) - + (-20 * W.b₂ * W.b₄ ^ 4 * W.b₆ ^ 3) - + (-6 * W.b₂ ^ 4 * W.b₆ ^ 2 * W.b₈ ^ 2) - + (-2 * W.b₂ ^ 4 * W.b₄ * W.b₈ ^ 3) - + 32 * W.b₂ ^ 3 * W.b₆ * W.b₈ ^ 3 - + 300 * W.b₂ ^ 2 * W.b₄ ^ 2 * W.b₈ ^ 3 - + 354 * W.b₂ * W.b₄ * W.b₆ ^ 5 + 7316 * W.b₂ * W.b₆ ^ 3 * W.b₈ ^ 2 - + 21030 * W.b₄ ^ 2 * W.b₆ ^ 2 * W.b₈ ^ 2 - + (-1346 * W.b₂ * W.b₄ ^ 2 * W.b₆ ^ 3 * W.b₈) - + (-33 * W.b₂ ^ 3 * W.b₄ ^ 2 * W.b₆ * W.b₈ ^ 2) - + 30 * W.b₂ ^ 3 * W.b₄ * W.b₆ ^ 3 * W.b₈ - + 54 * W.b₂ ^ 2 * W.b₄ ^ 3 * W.b₆ ^ 2 * W.b₈ - + 72 * W.b₂ ^ 2 * W.b₄ * W.b₆ ^ 2 * W.b₈ ^ 2 - + 588 * W.b₂ * W.b₄ ^ 3 * W.b₆ * W.b₈ ^ 2 - + 10848 * W.b₂ * W.b₄ * W.b₆ * W.b₈ ^ 3) * Polynomial.X ^ 8 - + Polynomial.C (-4494 * W.b₄ * W.b₆ ^ 5 + 62 * W.b₂ ^ 2 * W.b₆ ^ 5 - + 506 * W.b₄ ^ 4 * W.b₆ ^ 3 - + 1870 * W.b₂ * W.b₈ ^ 4 + 47004 * W.b₆ ^ 3 * W.b₈ ^ 2 - + (-312 * W.b₄ ^ 5 * W.b₆ * W.b₈) - + (-8 * W.b₂ ^ 2 * W.b₄ ^ 3 * W.b₆ ^ 3) - + (-2 * W.b₂ ^ 3 * W.b₄ * W.b₆ ^ 4) - + (-2 * W.b₂ ^ 3 * W.b₆ ^ 2 * W.b₈ ^ 2) - + 2 * W.b₂ ^ 4 * W.b₆ ^ 3 * W.b₈ - + 136 * W.b₂ ^ 3 * W.b₄ * W.b₈ ^ 3 - + 550 * W.b₂ * W.b₄ ^ 4 * W.b₈ ^ 2 - + 706 * W.b₂ * W.b₄ ^ 2 * W.b₆ ^ 4 - + 1610 * W.b₄ ^ 2 * W.b₆ ^ 3 * W.b₈ - + 2042 * W.b₂ * W.b₆ ^ 4 * W.b₈ - + 2344 * W.b₂ ^ 2 * W.b₆ * W.b₈ ^ 3 - + 7136 * W.b₂ * W.b₄ ^ 2 * W.b₈ ^ 3 - + 18064 * W.b₄ ^ 3 * W.b₆ * W.b₈ ^ 2 - + 49456 * W.b₄ * W.b₆ * W.b₈ ^ 3 - + (-1592 * W.b₂ * W.b₄ ^ 3 * W.b₆ ^ 2 * W.b₈) - + (-600 * W.b₂ ^ 2 * W.b₄ * W.b₆ ^ 3 * W.b₈) - + (-10 * W.b₂ ^ 4 * W.b₄ * W.b₆ * W.b₈ ^ 2) - + 18 * W.b₂ ^ 3 * W.b₄ ^ 2 * W.b₆ ^ 2 * W.b₈ - + 546 * W.b₂ ^ 2 * W.b₄ ^ 2 * W.b₆ * W.b₈ ^ 2 - + 21708 * W.b₂ * W.b₄ * W.b₆ ^ 2 * W.b₈ ^ 2) * Polynomial.X ^ 9 - + Polynomial.C (3532 * W.b₈ ^ 4 + (-9537 * W.b₄ ^ 2 * W.b₆ ^ 4) - + (-936 * W.b₂ * W.b₆ ^ 5) - + 24 * W.b₂ ^ 4 * W.b₈ ^ 3 + 114 * W.b₄ ^ 5 * W.b₆ ^ 2 - + 6304 * W.b₄ ^ 4 * W.b₈ ^ 2 + 27864 * W.b₄ ^ 2 * W.b₈ ^ 3 - + 35644 * W.b₆ ^ 4 * W.b₈ + (-W.b₂ ^ 5 * W.b₆ * W.b₈ ^ 2) - + (-W.b₂ ^ 3 * W.b₄ ^ 2 * W.b₆ ^ 3) - + (-98 * W.b₂ ^ 3 * W.b₆ ^ 3 * W.b₈) - + 192 * W.b₂ ^ 2 * W.b₄ * W.b₆ ^ 4 - + 532 * W.b₂ * W.b₄ ^ 3 * W.b₆ ^ 3 - + 578 * W.b₂ ^ 2 * W.b₄ ^ 3 * W.b₈ ^ 2 - + 3608 * W.b₂ ^ 2 * W.b₄ * W.b₈ ^ 3 - + 4818 * W.b₂ ^ 2 * W.b₆ ^ 2 * W.b₈ ^ 2 - + 5778 * W.b₄ ^ 3 * W.b₆ ^ 2 * W.b₈ - + 19028 * W.b₂ * W.b₆ * W.b₈ ^ 3 - + 131228 * W.b₄ * W.b₆ ^ 2 * W.b₈ ^ 2 - + (-966 * W.b₂ ^ 2 * W.b₄ ^ 2 * W.b₆ ^ 2 * W.b₈) - + (-598 * W.b₂ * W.b₄ ^ 4 * W.b₆ * W.b₈) - + 2 * W.b₂ ^ 4 * W.b₄ * W.b₆ ^ 2 * W.b₈ - + 222 * W.b₂ ^ 3 * W.b₄ * W.b₆ * W.b₈ ^ 2 - + 6986 * W.b₂ * W.b₄ * W.b₆ ^ 3 * W.b₈ - + 26712 * W.b₂ * W.b₄ ^ 2 * W.b₆ * W.b₈ ^ 2) * Polynomial.X ^ 10 - + Polynomial.C (8884 * W.b₆ ^ 5 + (-9916 * W.b₄ ^ 3 * W.b₆ ^ 3) - + 12 * W.b₂ ^ 3 * W.b₆ ^ 4 - + 640 * W.b₂ ^ 3 * W.b₈ ^ 3 + 36848 * W.b₆ * W.b₈ ^ 3 - + (-4596 * W.b₂ * W.b₄ * W.b₆ ^ 4) - + 36 * W.b₂ ^ 4 * W.b₆ * W.b₈ ^ 2 - + 132 * W.b₂ * W.b₄ ^ 4 * W.b₆ ^ 2 - + 180 * W.b₂ ^ 2 * W.b₄ ^ 2 * W.b₆ ^ 3 - + 288 * W.b₂ ^ 3 * W.b₄ ^ 2 * W.b₈ ^ 2 - + 1968 * W.b₂ ^ 2 * W.b₆ ^ 3 * W.b₈ - + 6096 * W.b₄ ^ 4 * W.b₆ * W.b₈ - + 11592 * W.b₂ * W.b₄ ^ 3 * W.b₈ ^ 2 - + 24400 * W.b₂ * W.b₄ * W.b₈ ^ 3 - + 49728 * W.b₂ * W.b₆ ^ 2 * W.b₈ ^ 2 - + 124416 * W.b₄ * W.b₆ ^ 3 * W.b₈ - + 134568 * W.b₄ ^ 2 * W.b₆ * W.b₈ ^ 2 - + (-408 * W.b₂ ^ 2 * W.b₄ ^ 3 * W.b₆ * W.b₈) - + (-240 * W.b₂ ^ 3 * W.b₄ * W.b₆ ^ 2 * W.b₈) - + 12480 * W.b₂ ^ 2 * W.b₄ * W.b₆ * W.b₈ ^ 2 - + 13560 * W.b₂ * W.b₄ ^ 2 * W.b₆ ^ 2 * W.b₈) * Polynomial.X ^ 11 - + Polynomial.C (-4902 * W.b₄ ^ 4 * W.b₆ ^ 2 + (-545 * W.b₂ ^ 2 * W.b₆ ^ 4) - + 1932 * W.b₄ ^ 5 * W.b₈ + 5736 * W.b₂ ^ 2 * W.b₈ ^ 3 - + 35344 * W.b₄ * W.b₆ ^ 4 + 45144 * W.b₄ * W.b₈ ^ 3 - + 46752 * W.b₄ ^ 3 * W.b₈ ^ 2 + 105356 * W.b₆ ^ 2 * W.b₈ ^ 2 - + (-7315 * W.b₂ * W.b₄ ^ 2 * W.b₆ ^ 3) - + (-18 * W.b₂ ^ 4 * W.b₆ ^ 2 * W.b₈) - + 18 * W.b₂ ^ 3 * W.b₄ * W.b₆ ^ 3 - + 50 * W.b₂ ^ 2 * W.b₄ ^ 3 * W.b₆ ^ 2 - + 68 * W.b₂ ^ 4 * W.b₄ * W.b₈ ^ 2 - + 1960 * W.b₂ ^ 3 * W.b₆ * W.b₈ ^ 2 - + 7602 * W.b₂ ^ 2 * W.b₄ ^ 2 * W.b₈ ^ 2 - + 45016 * W.b₂ * W.b₆ ^ 3 * W.b₈ - + 173648 * W.b₄ ^ 2 * W.b₆ ^ 2 * W.b₈ - + (-118 * W.b₂ ^ 3 * W.b₄ ^ 2 * W.b₆ * W.b₈) - + 7284 * W.b₂ ^ 2 * W.b₄ * W.b₆ ^ 2 * W.b₈ - + 12548 * W.b₂ * W.b₄ ^ 3 * W.b₆ * W.b₈ - + 107360 * W.b₂ * W.b₄ * W.b₆ * W.b₈ ^ 2) * Polynomial.X ^ 12 - + Polynomial.C (-912 * W.b₄ ^ 5 * W.b₆ + 6 * W.b₂ ^ 5 * W.b₈ ^ 2 - + 12024 * W.b₂ * W.b₆ ^ 4 - + 20232 * W.b₂ * W.b₈ ^ 3 + 59770 * W.b₄ ^ 2 * W.b₆ ^ 3 - + 112576 * W.b₆ ^ 3 * W.b₈ + (-4656 * W.b₂ * W.b₄ ^ 3 * W.b₆ ^ 2) - + (-1600 * W.b₂ ^ 2 * W.b₄ * W.b₆ ^ 3) - + 6 * W.b₂ ^ 3 * W.b₄ ^ 2 * W.b₆ ^ 2 - + 1206 * W.b₂ ^ 3 * W.b₆ ^ 2 * W.b₈ - + 2124 * W.b₂ ^ 3 * W.b₄ * W.b₈ ^ 2 - + 3892 * W.b₂ * W.b₄ ^ 4 * W.b₈ - + 22208 * W.b₂ ^ 2 * W.b₆ * W.b₈ ^ 2 - + 54192 * W.b₂ * W.b₄ ^ 2 * W.b₈ ^ 2 - + 108840 * W.b₄ ^ 3 * W.b₆ * W.b₈ - + 217088 * W.b₄ * W.b₆ * W.b₈ ^ 2 - + (-12 * W.b₂ ^ 4 * W.b₄ * W.b₆ * W.b₈) - + 8514 * W.b₂ ^ 2 * W.b₄ ^ 2 * W.b₆ * W.b₈ - + 128256 * W.b₂ * W.b₄ * W.b₆ ^ 2 * W.b₈) * Polynomial.X ^ 13 - + Polynomial.C (24720 * W.b₈ ^ 3 + 39812 * W.b₆ ^ 4 + (-69 * W.b₂ ^ 3 * W.b₆ ^ 3) - + 210 * W.b₂ ^ 4 * W.b₈ ^ 2 + 24836 * W.b₄ ^ 4 * W.b₈ - + 51722 * W.b₄ ^ 3 * W.b₆ ^ 2 + 101464 * W.b₄ ^ 2 * W.b₈ ^ 2 - + (-1395 * W.b₂ ^ 2 * W.b₄ ^ 2 * W.b₆ ^ 2) - + (-1026 * W.b₂ * W.b₄ ^ 4 * W.b₆) - + 2946 * W.b₂ ^ 2 * W.b₄ ^ 3 * W.b₈ - + 20544 * W.b₂ ^ 2 * W.b₄ * W.b₈ ^ 2 - + 24296 * W.b₂ ^ 2 * W.b₆ ^ 2 * W.b₈ - + 40930 * W.b₂ * W.b₄ * W.b₆ ^ 3 - + 85700 * W.b₂ * W.b₆ * W.b₈ ^ 2 + 308736 * W.b₄ * W.b₆ ^ 2 * W.b₈ - + 2394 * W.b₂ ^ 3 * W.b₄ * W.b₆ * W.b₈ - + 116300 * W.b₂ * W.b₄ ^ 2 * W.b₆ * W.b₈) * Polynomial.X ^ 14 - + Polynomial.C (2472 * W.b₂ ^ 3 * W.b₈ ^ 2 + 7232 * W.b₂ ^ 2 * W.b₆ ^ 3 - + 22172 * W.b₄ ^ 4 * W.b₆ + 108016 * W.b₆ * W.b₈ ^ 2 - + 132592 * W.b₄ * W.b₆ ^ 3 + (-380 * W.b₂ ^ 2 * W.b₄ ^ 3 * W.b₆) - + (-100 * W.b₂ ^ 3 * W.b₄ * W.b₆ ^ 2) - + 236 * W.b₂ ^ 4 * W.b₆ * W.b₈ - + 1060 * W.b₂ ^ 3 * W.b₄ ^ 2 * W.b₈ - + 33232 * W.b₂ * W.b₄ ^ 3 * W.b₈ - + 50972 * W.b₂ * W.b₄ ^ 2 * W.b₆ ^ 2 - + 72816 * W.b₂ * W.b₄ * W.b₈ ^ 2 - + 110896 * W.b₂ * W.b₆ ^ 2 * W.b₈ - + 263536 * W.b₄ ^ 2 * W.b₆ * W.b₈ - + 40912 * W.b₂ ^ 2 * W.b₄ * W.b₆ * W.b₈) * Polynomial.X ^ 15 - + Polynomial.C (3710 * W.b₄ ^ 5 + 8 * W.b₂ ^ 4 * W.b₆ ^ 2 - + 12320 * W.b₂ ^ 2 * W.b₈ ^ 2 - + 43908 * W.b₂ * W.b₆ ^ 3 + 70896 * W.b₄ ^ 3 * W.b₈ - + 85422 * W.b₄ * W.b₈ ^ 2 - + 149190 * W.b₆ ^ 2 * W.b₈ + 157539 * W.b₄ ^ 2 * W.b₆ ^ 2 - + (-37 * W.b₂ ^ 3 * W.b₄ ^ 2 * W.b₆) - + 182 * W.b₂ ^ 4 * W.b₄ * W.b₈ - + 4632 * W.b₂ ^ 3 * W.b₆ * W.b₈ - + 16268 * W.b₂ ^ 2 * W.b₄ ^ 2 * W.b₈ - + 16744 * W.b₂ ^ 2 * W.b₄ * W.b₆ ^ 2 - + 27268 * W.b₂ * W.b₄ ^ 3 * W.b₆ - + 175520 * W.b₂ * W.b₄ * W.b₆ * W.b₈) * Polynomial.X ^ 16 - + Polynomial.C (65230 * W.b₆ ^ 3 + 12 * W.b₂ ^ 5 * W.b₈ + 1794 * W.b₂ ^ 3 * W.b₆ ^ 2 - + 5302 * W.b₂ * W.b₄ ^ 4 + 27230 * W.b₂ * W.b₈ ^ 2 - + 79828 * W.b₄ ^ 3 * W.b₆ - + 6 * W.b₂ ^ 4 * W.b₄ * W.b₆ + 3432 * W.b₂ ^ 3 * W.b₄ * W.b₈ - + 12422 * W.b₂ ^ 2 * W.b₄ ^ 2 * W.b₆ - + 27992 * W.b₂ ^ 2 * W.b₆ * W.b₈ - + 66496 * W.b₂ * W.b₄ ^ 2 * W.b₈ + 97734 * W.b₂ * W.b₄ * W.b₆ ^ 2 - + 223992 * W.b₄ * W.b₆ * W.b₈) * Polynomial.X ^ 17 - + Polynomial.C (14684 * W.b₄ ^ 4 + 21868 * W.b₈ ^ 2 + W.b₂ ^ 5 * W.b₆ - + 264 * W.b₂ ^ 4 * W.b₈ - + 2982 * W.b₂ ^ 2 * W.b₄ ^ 3 + 14687 * W.b₂ ^ 2 * W.b₆ ^ 2 - + 81548 * W.b₄ ^ 2 * W.b₈ + 139902 * W.b₄ * W.b₆ ^ 2 - + 2466 * W.b₂ ^ 3 * W.b₄ * W.b₆ + 20136 * W.b₂ ^ 2 * W.b₄ * W.b₈ - + 67922 * W.b₂ * W.b₆ * W.b₈ - + 70114 * W.b₂ * W.b₄ ^ 2 * W.b₆) * Polynomial.X ^ 18 - + Polynomial.C (180 * W.b₂ ^ 4 * W.b₆ + 824 * W.b₂ ^ 3 * W.b₄ ^ 2 - + 1984 * W.b₂ ^ 3 * W.b₈ - + 16324 * W.b₂ * W.b₄ ^ 3 + 40320 * W.b₂ * W.b₆ ^ 2 - + 57464 * W.b₆ * W.b₈ - + 97500 * W.b₄ ^ 2 * W.b₆ + 20040 * W.b₂ ^ 2 * W.b₄ * W.b₆ - + 47624 * W.b₂ * W.b₄ * W.b₈) * Polynomial.X ^ 19 - + Polynomial.C (22160 * W.b₄ ^ 3 + 36374 * W.b₆ ^ 2 + 112 * W.b₂ ^ 4 * W.b₄ - + 1874 * W.b₂ ^ 3 * W.b₆ + 6675 * W.b₂ ^ 2 * W.b₄ ^ 2 - + 6828 * W.b₂ ^ 2 * W.b₈ - + 39492 * W.b₄ * W.b₈ - + 54192 * W.b₂ * W.b₄ * W.b₆) * Polynomial.X ^ 20 - + Polynomial.C (6 * W.b₂ ^ 5 + 1194 * W.b₂ ^ 3 * W.b₄ + 7420 * W.b₂ ^ 2 * W.b₆ - + 11068 * W.b₂ * W.b₈ + 17840 * W.b₂ * W.b₄ ^ 2 - + 48224 * W.b₄ * W.b₆) * Polynomial.X ^ 21 - + Polynomial.C (79 * W.b₂ ^ 4 + 6872 * W.b₈ + 15692 * W.b₄ ^ 2 - + 4724 * W.b₂ ^ 2 * W.b₄ - + 12978 * W.b₂ * W.b₆) * Polynomial.X ^ 22 - + Polynomial.C (412 * W.b₂ ^ 3 + 8440 * W.b₆ + 8216 * W.b₂ * W.b₄) * Polynomial.X ^ 23 - + Polynomial.C (1064 * W.b₂ ^ 2 + 5306 * W.b₄) * Polynomial.X ^ 24 - + Polynomial.C (1362 * W.b₂) * Polynomial.X ^ 25 - + Polynomial.C 692 * Polynomial.X ^ 26) * b_relation_poly W + (2 * W.Ψ₃ ^ 3 * W.preΨ₄ - W.preΨ₄ ^ 2 * W.Ψ₂Sq ^ 2) * wronskian_aux_three W + + (W.preΨ₄ ^ 3 * W.Ψ₂Sq ^ 3) * wronskian_derivative_three W + + (W.Ψ₃ ^ 3 * W.preΨ₄ ^ 2 - 2 * W.preΨ₄ ^ 3 * W.Ψ₂Sq ^ 2) * + wronskian_three_derivative_two W end HasseWeil diff --git a/projects/HasseWeil/HasseWeil/Foundation/WronskianAux/CNorm.lean b/projects/HasseWeil/HasseWeil/Foundation/WronskianAux/CNorm.lean index 4dee067bc..528b604a5 100644 --- a/projects/HasseWeil/HasseWeil/Foundation/WronskianAux/CNorm.lean +++ b/projects/HasseWeil/HasseWeil/Foundation/WronskianAux/CNorm.lean @@ -1,25 +1,11 @@ import Mathlib.Algebra.Polynomial.Basic /-! -# C-normalization simp set for polynomial ring tactics +# Normalization of polynomial coefficients -`Polynomial.derivative_pow` produces `C ((n : ℕ) : R) * p^(n-1) * derivative p`, -where `((n : ℕ) : R)` is `Nat.cast n`. On the other side of an identity, -`Polynomial.C` is often applied to literals `(n : R)` which use `OfNat.ofNat`. -`ring` sees `C (Nat.cast n : R)` and `C (OfNat.ofNat n : R)` as distinct atoms, -blocking cancellation. - -The pair `Nat.cast_ofNat` (already `@[simp]` in mathlib) plus -`Polynomial.C_ofNat` (not `@[simp]`) normalizes every `C k` for numeric `k` to -the polynomial literal `(k : Polynomial R)`. `Polynomial.C_ofNat` must be -explicitly included in `simp only` at call sites; this file just documents the -intended usage. - -Typical use: -``` -simp only [..., Polynomial.C_ofNat, Polynomial.C_mul, Polynomial.C_sub, - Polynomial.C_pow, Polynomial.C_add, ...] -``` -(`Nat.cast_ofNat` fires automatically since it is `@[simp]` — `simp only` -actually does not pick it up, so include it too for safety.) +`Polynomial.derivative_pow` introduces coefficients of the form +`Polynomial.C (Nat.cast n : R)`. Numerical coefficients may instead be written +with `OfNat.ofNat`, which polynomial ring normalization can treat as a distinct +atom. Explicit simplification by `Nat.cast_ofNat` and `Polynomial.C_ofNat` +identifies both forms with the corresponding polynomial numeral. -/ diff --git a/projects/HasseWeil/HasseWeil/Foundation/WronskianAux/Prefix.lean b/projects/HasseWeil/HasseWeil/Foundation/WronskianAux/Prefix.lean new file mode 100644 index 000000000..b1df73ddd --- /dev/null +++ b/projects/HasseWeil/HasseWeil/Foundation/WronskianAux/Prefix.lean @@ -0,0 +1,62 @@ +import Mathlib.AlgebraicGeometry.EllipticCurve.DivisionPolynomial.Basic +import Mathlib.Algebra.Polynomial.Derivation +import Mathlib.Tactic.LinearCombination +import HasseWeil.Foundation.WronskianAux.CNorm + + +/- +Copyright (c) 2026 Chris Birkbeck. All rights reserved. +Released under Apache 2.0 license as described in the file LICENSE. +Authors: Chris Birkbeck +-/ + +/-! +# Third Wronskian identity + +The third division-polynomial Wronskian identity follows from the Weierstrass +coefficient relation. Its polynomial multiplier has degree eight. +-/ + +open WeierstrassCurve Polynomial + +namespace HasseWeil + +variable {R : Type*} [CommRing R] (W : WeierstrassCurve R) + +-- The Weierstrass coefficient relation lifted to the polynomial ring, with +-- coefficient maps distributed for polynomial normalization. +lemma wronskian_b_relation_poly : + ((4 : R[X]) * Polynomial.C W.b₈ : R[X]) = + Polynomial.C W.b₂ * Polynomial.C W.b₆ - Polynomial.C W.b₄ ^ 2 := by + simpa [Polynomial.C_ofNat] using congrArg Polynomial.C W.b_relation + +/-- Wronskian auxiliary identity, `m = 3` case (Silverman III.3.7). +`4·Ψ₃³ + 2·preΨ₄·Ψ₂Sq·Ψ₃' − (preΨ₄·Ψ₂Sq)'·Ψ₃ += 3·preΨ₄·Ψ₂Sq² − 3·preΨ₄²`. + +Multiplier: `M = b₈² + 4b₆b₈·X + 6b₄b₈·X² + 4b₂b₈·X³ + (b₂b₆ + 34b₈)·X⁴ + + 36b₆·X⁵ + 18b₄·X⁶ + 4b₂·X⁷ + 9·X⁸`. -/ +lemma wronskian_aux_three : + 4 * W.Ψ₃ ^ 3 + 2 * W.preΨ₄ * W.Ψ₂Sq * Polynomial.derivative W.Ψ₃ - + Polynomial.derivative (W.preΨ₄ * W.Ψ₂Sq) * W.Ψ₃ = + Polynomial.C 3 * W.preΨ₄ * W.Ψ₂Sq ^ 2 - Polynomial.C 3 * W.preΨ₄ ^ 2 := by + linear_combination (norm := ( + simp only [Ψ₃, preΨ₄, Ψ₂Sq, + Polynomial.derivative_add, Polynomial.derivative_sub, + Polynomial.derivative_mul, Polynomial.derivative_pow, Polynomial.derivative_X, + Polynomial.derivative_C, Polynomial.derivative_ofNat, + Polynomial.C_add, Polynomial.C_sub, Polynomial.C_mul, Polynomial.C_pow, + Polynomial.C_ofNat, Nat.cast_ofNat] + ring)) + (Polynomial.C (W.b₈ ^ 2) + + Polynomial.C (4 * W.b₆ * W.b₈) * Polynomial.X + + Polynomial.C (6 * W.b₄ * W.b₈) * Polynomial.X ^ 2 + + Polynomial.C (4 * W.b₂ * W.b₈) * Polynomial.X ^ 3 + + Polynomial.C (W.b₂ * W.b₆ + 34 * W.b₈) * Polynomial.X ^ 4 + + Polynomial.C (36 * W.b₆) * Polynomial.X ^ 5 + + Polynomial.C (18 * W.b₄) * Polynomial.X ^ 6 + + Polynomial.C (4 * W.b₂) * Polynomial.X ^ 7 + + Polynomial.C 9 * Polynomial.X ^ 8) * wronskian_b_relation_poly W + + +end HasseWeil diff --git a/projects/HasseWeil/HasseWeil/HasseBound/Infrastructure.lean b/projects/HasseWeil/HasseWeil/HasseBound/Infrastructure.lean index 9facfb997176c5ac380d29e70848729672edc3fd..8c198b73959a7180a7e5398bfbe82ea2777afe6b 100644 GIT binary patch delta 2643 zcmaJ@ZHN_B7-sHj!hk6$mLKUG;^Nw!yRH*r>&*IHM1?##LO9-Dj4?3|gq zd#$*d1x3);5sJcemo&-BWd8J{K&U_Vp(|}vWGF&lko}ShEa*KmcV_QOiXxZs%=^CQ zd7qCt_HoPEliDZR9rbmNLtUR*Pz;#mQ_hScC61j1n^vjd9+=Dq{81vT2Gl0Zr#>Y@ z*LRf3P49ppuIZTt>QKK1rdJ9ocsvVRsN)b1T#qt~x~7wq7FfG(>q&8oS6nWzI%iPi zUL|l$0U~f+rv^SYqs*q3=@T0^m_iU3qCO)+G!2#0yEqcF7)ecO@kQdI*nn^@X*SC`*@d&esSS9O=9^9CP?(Xi~iYxo&%B-%SP?NYG z=S9H3y}6EDhiVZ$UhnY&VKflna>{(e;sNuM@oI7iURy+c0iGETXhf%=%q#fEbIVjz z!fW?EqitL_>=P!UODG_*PYe;lj(t2Hl*)~3xPjvoOzWv=NpaJP=|Y4gL+ryRmQ2rt z*Ve#P9C>tnwj6E0OU_u9t3w`KC=cp-yAikZ`4HAjm%3h505x^abrfoZG3EU<~fhm~;UPK{xC z#I=mPWt{CJ9>@RpXcbRZ$tu;-Dx*LwA0GRXP}qkuyfB$ZJG`^ca_Nf1J~2vpP47*se;&T zz~h0pm!LgV8-!FSdt@-69yT4hQK0W0ZBaNu)D z)e`=@o>WOc(qKX$Tz!v4an@};fXmg+I1X}d!zz# zY;d8xNaxFyrB->-8xMc=AI^jy4fSa9>b^blcr8B_AqS8jj)Q!1-#ksn=by`~Pv4MR zpIyC75f%E@qm9&D0-O4q`HH$k@*q?WMVZRWFScnA(wE=Q$OEsu8G5hI(L(L@F)e$$ z8dezv0?N3Q0+}zLm#s6D@>7@2L3sVpzoE=ab-&qla5F zSmn=mLA&Qx@5#rG&dWBpH599=rlU*=Su(Kn{K2Jb+uG2YmTqesz;dTY7HeI%D%XuR zwzMZXJ?TDKWep4ldf*Y*hK1zldxz!GV=twi@BsAXb3X4xPh=$5Es|tRvF}V(O&p@4 z4S6Sz9AD57yppTyU^;O8$3)t&$U18{^T>&RwZ*rZSur1-D)3B4!pS+ylzk}vS|*x^ z+A~)2NePYABd&)6V18sMc!fjZh`C;6bZpN`2bLKbU&P}9ceghX-5WLPMqZrC2{A`J zz%z>6!3;)ALbFr_)Kj-{8p8yqH$Lsv>YWV7h&=#r7i&~yvgHISs??ito|Q15TueDq zbkH$S{;8f(8*zA@b$iJ=&S(-3?u zJK;Hz6({+r3tW$AxYKPM1Buae(Pa4W%()gVO4vAE@0=3ZvNJwc&cATHBl%cLnkkAm z?uM-UpU9S@-<@p=>oq+wekl*|QWLe99pINw8v2G!k>>H2$j#q+B>6~@zkUC=oc6=Q F{{V?d-7EkA diff --git a/projects/HasseWeil/HasseWeil/HasseBound/PointCount.lean b/projects/HasseWeil/HasseWeil/HasseBound/PointCount.lean index e004de056..c8fa5b0d3 100644 --- a/projects/HasseWeil/HasseWeil/HasseBound/PointCount.lean +++ b/projects/HasseWeil/HasseWeil/HasseBound/PointCount.lean @@ -149,7 +149,7 @@ theorem card_kernel_eq_pointCount_of_kernel_eq_top /-- **Sub-helper III-4-015-S3** (fiber witness via degree = pointCount): under separability + `β.degree = pointCount`, the fiber witness for the -Hasse bound consumer ships axiom-clean. +Hasse bound consumer exists. Proof chain: 1. `β.degree = pointCount` (input). @@ -215,7 +215,7 @@ omit [Fintype K] in given `Aut(K(E₁)/α*K(E₂)) ≃ α.kernel` (the substantive Galois-correspondence content for elliptic isogenies) and a witness for `Nat.card Aut = α.degree` (the IsGalois card_aut_eq_finrank applied to our specific algebra), derive -`Nat.card α.kernel = α.degree` axiom-clean. +`Nat.card α.kernel = α.degree` . Reduces the III.4.10(a) wall to two named witnesses: 1. `Nat.card Aut = α.degree` (IsGalois + finrank). @@ -263,9 +263,9 @@ theorem card_aut_eq_degree_of_isGalois W.toAffine.FunctionField _ _ β.toAlgebra.toModule) : Nat.card (@AlgEquiv W.toAffine.FunctionField W.toAffine.FunctionField W.toAffine.FunctionField _ _ _ β.toAlgebra β.toAlgebra) = β.degree := by - letI := β.toAlgebra - haveI := hgal - haveI := hfin + let := β.toAlgebra + have := hgal + have := hfin exact IsGalois.card_aut_eq_finrank W.toAffine.FunctionField W.toAffine.FunctionField /-- **Sub-helper III-4-015-S9** (full chain: IsGalois + bijection → fiber witness): @@ -275,7 +275,7 @@ final closing-arc consumer. Takes: - Aut ≃ β.kernel bijection (the substantive Galois-correspondence content). Produces the fiber witness used by the historical witness-parametric -Hasse-bound route, axiom-clean. +Hasse-bound route, . The cascade reduces T-III-4-015 to two named witnesses via this consumer: 1. `IsGalois (α*K(E₂)) K(E₁)` (Mathlib has the structure; needs Normal). @@ -346,7 +346,7 @@ theorem fiber_witness_via_inverse_witnesses (aut_kernel_equiv_of_inverse_witnesses W β _ forward inverse h_left_inv h_right_inv) -/-- **Forward map at k = 0** (axiom-clean): the translation by 0 is the identity +/-- **Forward map at k = 0** (): the translation by 0 is the identity algebra automorphism. -/ noncomputable def aut_of_kernel_zero {F : Type*} [Field F] [DecidableEq F] @@ -354,7 +354,7 @@ noncomputable def aut_of_kernel_zero W.toAffine.FunctionField ≃ₐ[F] W.toAffine.FunctionField := AlgEquiv.refl -/-- **Forward map at k = 0 is the identity** (axiom-clean). -/ +/-- **Forward map at k = 0 is the identity** (). -/ @[simp] theorem aut_of_kernel_zero_apply {F : Type*} [Field F] [DecidableEq F] (W : WeierstrassCurve F) [W.toAffine.IsElliptic] @@ -362,21 +362,9 @@ noncomputable def aut_of_kernel_zero aut_of_kernel_zero W f = f := rfl -/-- **Substantive partial forward-map construction** (Sub-helper III-4-015-S12): -the forward map for the substantive cases requires the curve-translation -algebra automorphism `τ_k : K(E) ≃ₐ[F] K(E)` defined by -`τ_k(x_gen) = x-coord(P_gen + k)` and `τ_k(y_gen) = y-coord(P_gen + k)`. - -Construction parallels Worker A's `addPullbackAlgHom_negFrobenius`: -1. Define `τ_k` via the addition formula (`addX`, `addY`). -2. Show it's a K-algebra hom (well-defined modulo Weierstrass). -3. Show it has inverse `τ_(-k)` (since τ is a group action). -4. For k ∈ β.kernel, show `τ_k` fixes `β.pullback`'s image. - -This sub-helper takes the substantive `τ_k` AS A WITNESS — a precise -statement of what's needed beyond what's currently in mathlib. The -construction itself is ~200-300 LOC of `addCoordAlgHom`-style infrastructure -applied to the translation map. -/ +/-- A kernel-indexed family of translation algebra automorphisms. +For a kernel point `k`, translation by `k` fixes the image of the pullback; +the family is supplied as an explicit witness. -/ noncomputable def aut_of_kernel_construction_witness (β : Isogeny W.toAffine W.toAffine) (translation_at : β.kernel → @@ -400,7 +388,7 @@ noncomputable def kernelTranslateForward kernelTranslateForward W β ⟨0, h_zero_mem⟩ = AlgEquiv.refl := rfl /-- **Layer 2 forward map under `β.toAlgebra`** (witness-parametric). -Takes Worker A's `translateAlgEquivOfPoint W k.val` (an F-AlgEquiv) and +Takes `translateAlgEquivOfPoint W k.val` (an F-AlgEquiv) and the covariance identity `τ_k ∘ β.pullback = β.pullback` (provided as hypothesis), and produces the `K(E)`-AlgEquiv (under `β.toAlgebra`) consumed by the S10 bijection. -/ @@ -425,7 +413,7 @@ noncomputable def kernelTranslateForwardAsAut W.toAffine.FunctionField _ _ _ β.toAlgebra β.toAlgebra) := fun k ↦ kernelTranslateAsAut W β k (h_invariance_family k) -/-- **`kernelTranslateAsAut` at `k = 0`** is the identity AlgEquiv (axiom-clean). +/-- **`kernelTranslateAsAut` at `k = 0`** is the identity AlgEquiv (). The `h_invariance` hypothesis at k = 0 is automatic since `τ_0 = refl`. -/ @[simp] theorem kernelTranslateAsAut_zero (β : Isogeny W.toAffine W.toAffine) @@ -436,7 +424,7 @@ The `h_invariance` hypothesis at k = 0 is automatic since `τ_0 = refl`. -/ kernelTranslateAsAut W β ⟨0, h_zero_mem⟩ h_invariance = @AlgEquiv.refl W.toAffine.FunctionField W.toAffine.FunctionField _ _ β.toAlgebra := by - letI := β.toAlgebra + let := β.toAlgebra apply AlgEquiv.ext intro f change translateAlgEquivOfPoint W (0 : W.toAffine.Point) f = f @@ -474,6 +462,7 @@ omit [DecidableEq F] [W.toAffine.IsElliptic] in (x : W.toAffine.FunctionField) : x ∈ algHomFieldEqualizer W f g ↔ f x = g x := Iff.rfl +omit [DecidableEq F] in /-- **Two `F`-AlgHoms `K(E) → K(E)` agreeing on `x_gen`, `y_gen` are equal**: `K(E)` is generated over `F` by `x_gen` and `y_gen`. -/ theorem algHom_ext_of_eq_on_xy [Fintype F] @@ -553,7 +542,7 @@ theorem kernel_pullback_invariance_id rw [translateAlgEquivOfPoint_zero] rfl -/-- **`SMulCommClass` for Worker A's master action**: the translation +/-- **Commuting scalar multiplication for the translation action**: the translation action commutes with `F`-scalar multiplication because every `translateAlgEquivOfPoint W k` is an F-AlgEquiv (hence F-linear). -/ instance translateMulSemiringAction_smulCommClass : @@ -564,7 +553,7 @@ instance translateMulSemiringAction_smulCommClass : rw [Algebra.smul_def, Algebra.smul_def, map_mul, AlgEquiv.commutes] /-- **Restricted action**: `Multiplicative β.kernel` acts on `K(E)` via -the inclusion `β.kernel → E.Point` composed with Worker A's master action +the inclusion `β.kernel → E.Point` composed with the translation action `translateMulSemiringAction`. -/ noncomputable instance kernelMulSemiringAction (β : Isogeny W.toAffine W.toAffine) : @@ -632,12 +621,12 @@ theorem xy_family_zero (β.pullback (y_gen W)) = β.pullback (y_gen W)) := ⟨rfl, rfl⟩ -/-- **Layer 2 closure (witness-parametric on finrank match)**: under the +/-- **Fixed-field equality from a rank equality**: under the xy-covariance family + finrank equality, `β.pullback.fieldRange = FixedPoints.intermediateField (Multiplicative β.kernel)`. Direct application of `IntermediateField.eq_of_le_of_finrank_eq'` to the -forward inclusion (just shipped) plus the finrank-match witness. -/ +forward inclusion plus the finrank-match witness. -/ theorem pullback_fieldRange_eq_fixedField_of_finrank_match [Fintype F] (β : Isogeny W.toAffine W.toAffine) [hfindim : FiniteDimensional ↥β.pullback.fieldRange W.toAffine.FunctionField] @@ -659,11 +648,11 @@ theorem pullback_fieldRange_eq_fixedField_of_finrank_match [Fintype F] (pullback_fieldRange_le_fixedField_of_xy_family W β h_xy_family) h_finrank_match -/-- **Layer 2 closure (Artin-machinery sourced)**: the finrank match +/-- **Fixed-field equality from Artin's theorem**: the finrank match witness can be sourced from Mathlib's `FixedPoints.finrank_eq_card` (which -gives `[K(E) : FixedPoints] = |G|` axiom-clean from Faithful + Fintype) and +gives `[K(E) : FixedPoints] = |G|` from Faithful + Fintype) and the cardinality match `|β.kernel| = β.degree` (Silverman III.4.10(b), -T-V-1-003 / V.1.3) plus the intrinsic relation +V.1.3) plus the intrinsic relation `[K(E) : β.pullback.fieldRange] = β.degree` (witness-parametric below). This is the **packaged Artin-route closure**: takes the Hasse-content card @@ -707,11 +696,10 @@ theorem faithfulSMul_kernel_of_translate_inj /-- **`FaithfulSMul` (UNCONDITIONAL)**: discharges the witness in `faithfulSMul_kernel_of_translate_inj` using -`translateAlgEquivOfPoint_injective` (just shipped in `EC/TranslationOrd`). +`translateAlgEquivOfPoint_injective` . Direct corollary: for any isogeny β over a finite field, the restricted -action `kernelMulSemiringAction β` is faithful axiom-clean. This collapses -the FaithfulSMul witness in the Layer-2 cascade — combined with finiteness +action `kernelMulSemiringAction β` is faithful . Combined with finiteness of β.kernel (over finite F), Mathlib's Artin machinery (`FixedPoints.finrank_eq_card`) applies unconditionally. -/ instance faithfulSMul_kernel @@ -730,10 +718,10 @@ closure given the cardinality match `Fintype.card β.kernel = β.degree` theorem finrank_pullback_fieldRange_eq_degree (β : Isogeny W.toAffine W.toAffine) : Module.finrank ↥β.pullback.fieldRange W.toAffine.FunctionField = β.degree := by - letI inst1 : Algebra W.toAffine.FunctionField W.toAffine.FunctionField := β.toAlgebra - letI inst_im : Algebra ↥β.pullback.fieldRange W.toAffine.FunctionField := + let inst1 : Algebra W.toAffine.FunctionField W.toAffine.FunctionField := β.toAlgebra + let inst_im : Algebra ↥β.pullback.fieldRange W.toAffine.FunctionField := IntermediateField.toAlgebra _ - letI mod_im : Module ↥β.pullback.fieldRange W.toAffine.FunctionField := + let mod_im : Module ↥β.pullback.fieldRange W.toAffine.FunctionField := inst_im.toModule change @Module.finrank ↥β.pullback.fieldRange W.toAffine.FunctionField _ _ mod_im = β.degree @@ -758,7 +746,7 @@ theorem finrank_pullback_fieldRange_eq_degree exact (Algebra.finrank_eq_of_equiv_equiv i j h_compat).symm /-- **Layer 2 closure (UNCONDITIONAL on the intrinsic part)**: combines -`pullback_fieldRange_eq_fixedField_of_finrank_match` with the just-shipped +`pullback_fieldRange_eq_fixedField_of_finrank_match` with the intrinsic finrank relation, leaving only the Hasse-content cardinality match `Nat.card β.kernel = β.degree` as a witness. diff --git a/projects/HasseWeil/HasseWeil/HasseBound/PoleDivisorFallback.lean b/projects/HasseWeil/HasseWeil/HasseBound/PoleDivisorFallback.lean index 6c96651f4795880dc78a3532568e069e75c9f7d2..cc60cff7787880be5b3c3d19acf7c586481df8fa 100644 GIT binary patch delta 1398 zcmaize{54#6vuP!>)P%i;@HNvI?EjcWp-m@#vX|aO7X*9>aTvBwdElvf41^%Bu^{&2kRwp!B?Qr$%Y#4-*{HxlMOve zVJ^zVwn`cbl=4GQY;)1>!}au+mSr3_Kj&CN?d9)m|J{|_QR8eGO-oyaT`O${KoENeo4kz6A6TaT6=^v$1*)~t#uBT3~p_kQ%kd>S(Hjo z9W6S(*Ga=xF~!ZBcwJ=5A^Y>wJ3R&RV34M!r)_g?dMy6uk|lbrEBD_ewN9?(J9|yw z-G|SwqEoLF(i8I@mRbf*erWa}(Ef9)S?WcQm$3o7^vxev(($*vnRxX_z6Ys2oojt- zdEc3sl4bJN$u&wAg=ycJ;q2JHXVF1$@bPn-opu@@y;zbb7n^wM;%h+1zI~KU6oHS8 zRY4Vlic^h`NuV!Da8+$T)ae@-!?L@ev5Q@19j3ze3XkeP|S-?7Dz2 zn9T8rYoCMPA^N|B&z$113-GCveKQSJqWm)a4MHw^5qo|HNY>xH8ps5C&57y zG6})Peqv%v?mNOH62u{*6H~KD5Vv<>4O^zB#{)zU65Y}wxFewltgxYD5=&^2xN7J9 zmm{;KLW|V=E6$KLnW=|x(&{vgM5q&ot+@POvU;3sP`9TSHaTjNI5GE=c-quGJ84KY z*7RUH5HL(Bj2e2-hH8-zX*V@BZkdUIm5>pvWxCVT>ZlRv(&g)yE#zmBhADbgC0t}2~@5`h{X~C^j$8k=nJBuyqpoqcYxTp4;{%}zs^7iiS`&8{-6AJ5gYm$z83Gl Hfdc3sx_cCT diff --git a/projects/HasseWeil/HasseWeil/HasseBound/PoleDivisorTwoTorsion.lean b/projects/HasseWeil/HasseWeil/HasseBound/PoleDivisorTwoTorsion.lean index 25f0c6948..31fbb612c 100644 --- a/projects/HasseWeil/HasseWeil/HasseBound/PoleDivisorTwoTorsion.lean +++ b/projects/HasseWeil/HasseWeil/HasseBound/PoleDivisorTwoTorsion.lean @@ -6,49 +6,20 @@ Authors: Chris Birkbeck import HasseWeil.HasseBound.PoleDivisorFallback /-! -# Bridge at `addPullbackNumerator_negFrobenius` for 2-torsion (T-T21-2TORSION-BRIDGE) - -The non-2-torsion bridge `bridge_at_addPullbackNumerator_negFrobenius_of_non_2_tor` -(`PoleDivisorFallback.lean:2353`) goes through `bridge_at_x_gen_of_non_2_tor` -(`PoleDivisorFallback.lean:606`), which uses -`ord_P_translateX_xy_eq_neg_two_of_non_2_tor` (`EC/TranslationOrd.lean:1379`) -as the substantive `= -2` identity at `−T` (with `T` non-2-torsion). - -This file ships the **2-torsion analogue**: -`ord_P (translateX_xy W xT yT) = -2` at the smooth point `−T = T` (where -`−T = T` modulo `Nonsingular`-prop-irrelevance for 2-torsion), and -propagates it to the base bridges and the full -`bridge_at_addPullbackNumerator_negFrobenius` at 2-torsion. - -The chain is: - -* `ord_P_x_gen_sub_const_ge_two_at_2tor` — `ord_P (x_gen − xk) ≥ 2` from the - curve identity `(y − yk)·A = (x − xk)·(B − a₁·yk)` at 2-torsion T with - `ord_P (y − yk) = 1`, `ord_P A ≥ 1`, `ord_P (B − a₁·yk) = 0`. -* `ord_P_A_eq_one_at_2tor` — `ord_P A = 1` exactly via strict comparison - `ord_P (y − yk) = 1 < 2 ≤ ord_P (a₁·(x − xk))` in `A = (y − yk) + a₁·(x − xk)`. -* `ord_P_translateSlope_xy_eq_neg_one_at_2tor` — `ord_P slope = −1` exactly - via `slope = (B − a₁·yk) / A` with `ord = 0 − 1 = −1`. -* `ord_P_translateX_xy_eq_neg_two_at_2tor` — `ord_P translateX_xy = −2` - exactly via `translateX_xy = slope² + rest` with strict comparison. -* `bridge_at_x_gen_of_2_tor` — bridge `ord_P (τ_{−T} x_gen) = ord_∞ x_gen`. -* `bridge_at_x_gen_pow_card_of_2_tor` — bridge for `x_gen^q`. -* `bridge_at_y_gen_of_2_tor` and `bridge_at_y_gen_pow_card_of_2_tor` — - y-side analogues, derived via `translateY_xy` analysis. -* `bridge_at_addPullbackNumerator_negFrobenius_of_2_tor` — the full Num - bridge at 2-torsion via the dominant-T7 strict comparison. - -After this lands, the chain `T21 → T22 → T23 → T24` (L6 closer) is -unblocked: `support_card_eq_pointCount_of_two_torsion_ord_witness` -(`L6Witnesses.lean:497`) consumes the 2-torsion ord witness, and the -T22 composer becomes unconditional. - -## References - -* Silverman, *The Arithmetic of Elliptic Curves*, II.1, III.2. -* `tickets/hasse/T-T21-2TORSION-BRIDGE.md` — the spawned sub-ticket. -* `EC/TranslationOrd.lean:2566+` — the 2-torsion `A`-factorisation and - per-piece order bounds. +# Orders of translated coordinates at smooth two-torsion points + +At a smooth two-torsion point `T`, the curve identity +`(y − y_T)A = (x − x_T)(B − a₁y_T)` gives `ord_T(x − x_T) ≥ 2`. +The factorization `A = (y − y_T) + a₁(x − x_T)` then gives `ord_T A = 1`, +so the translation slope has order `-1`. Strict comparison in the addition +formulas yields orders `-2` and `-3` for the translated x- and y-coordinates. + +These coordinate orders identify local orders after translation with orders at +infinity, including powers, products, and the reduced addition numerator for +negative Frobenius. In that numerator the term `x · (π*x)²`, of order `-2-4q`, +strictly dominates the other terms. + +References: Silverman, *The Arithmetic of Elliptic Curves*, II.1 and III.2. -/ open WeierstrassCurve HasseWeil.Curves @@ -76,7 +47,7 @@ private lemma pi_y_gen_ne_zero_aux (hq : 2 ≤ Fintype.card K) : rw [ordAtInfty_negFrobeniusIsog_pullback_y_gen W hq] at h_top exact WithTop.coe_ne_top h_top -omit [Fintype K] in +omit [Fintype K] [WeierstrassCurve.IsElliptic W.toAffine] in /-- **`ord_P (x_gen − xk) ≥ 2` at smooth 2-torsion `T`** via the curve identity `(y − yk)·A = (x − xk)·(B − a₁·yk)` and the ord facts at 2-torsion. -/ @@ -117,7 +88,9 @@ theorem ord_P_x_gen_sub_const_ge_two_at_2tor (xk yk : K) (y_gen W + algebraMap K KE yk + algebraMap K KE W.a₁ * x_gen W + algebraMap K KE W.a₃)) := by rw [h_LHS_mul, h_yd_ord] - exact add_le_add (le_refl _) h_A_ge + calc + ((2 : ℤ) : WithTop ℤ) = ((1 : ℤ) : WithTop ℤ) + ((1 : ℤ) : WithTop ℤ) := by norm_num + _ ≤ _ := add_le_add le_rfl h_A_ge have h_RHS_ord : ((2 : ℤ) : WithTop ℤ) ≤ (W_smooth W).ord_P P ((x_gen W - algebraMap K KE xk) * (x_gen W ^ 2 + x_gen W * algebraMap K KE xk + @@ -143,7 +116,7 @@ theorem ord_P_x_gen_sub_const_ge_two_at_2tor (xk yk : K) rw [h_mul_eq, h_Bma_ord, add_zero] at h_RHS_ord exact h_RHS_ord -omit [Fintype K] in +omit [Fintype K] [WeierstrassCurve.IsElliptic W.toAffine] in /-- **`ord_P A = 1` exactly at smooth 2-torsion `T`** via strict comparison `ord_P (y − yk) = 1 < 2 ≤ ord_P (a₁·(x − xk))` in the factorisation `A = (y − yk) + a₁·(x − xk)`. -/ @@ -185,7 +158,7 @@ theorem ord_P_A_eq_one_at_2tor (xk yk : K) have h_add := SmoothPlaneCurve.ord_P_add_eq_of_lt h_strict exact h_add.trans h_yd_ord -omit [Fintype K] in +omit [Fintype K] [WeierstrassCurve.IsElliptic W.toAffine] in /-- **`ord_P slope = -1` exactly at smooth 2-torsion `T`** via `slope = (B − a₁·yk) / A` with `ord = 0 − 1 = −1` (using the sharpened `ord_P A = 1`). -/ @@ -233,7 +206,7 @@ theorem ord_P_translateSlope_xy_eq_neg_one_at_2tor (xk yk : K) rw [h_mul, h_inv, h_Bma_ord, h_A_ord, zero_add] rfl -omit [Fintype K] in +omit [Fintype K] [WeierstrassCurve.IsElliptic W.toAffine] in /-- **`ord_P (translateX_xy) = -2` exactly at smooth 2-torsion `T`**: `translateX_xy = slope² + (a₁·slope − a₂ − x_gen − xk)`. With `ord_P slope = −1` exactly, `ord_P (slope²) = −2`, and the rest has @@ -383,7 +356,7 @@ theorem ord_T_translateAlgEquivOfPoint_neg_x_gen_eq_neg_two_at_2tor (xT yT : K) omit [Fintype K] in /-- **Bridge at `f = x_gen` for 2-torsion `T`** (clean version): the analog of `bridge_at_x_gen_of_non_2_tor` for 2-torsion. Composes the 2-torsion `ord_T` -value with the shipped `ordAtInfty_x_gen = -2`. -/ +value with the `ordAtInfty_x_gen = -2`. -/ theorem bridge_at_x_gen_of_2_tor (xT yT : K) (h_ns : W.toAffine.Nonsingular xT yT) (h_2_tor : yT = W.toAffine.negY xT yT) : (W_smooth W).ord_P (⟨xT, yT, h_ns⟩ : (W_smooth W).SmoothPoint) @@ -474,7 +447,7 @@ theorem bridge_at_x_gen_sub_negFrobeniusIsog_pullback_x_gen_of_2_tor (xT yT : K) exact bridge_at_x_gen_sub_x_gen_pow_card_of_2_tor W xT yT h_ns h_2_tor hq /-- **Bridge at `(x_gen - (negFrob).pullback x_gen)^2` (slope-denominator squared)** -for 2-torsion `T`. Pow on the just-shipped bridge for `x_gen - negFrob.pullback x_gen`. +for 2-torsion `T`. Pow on the bridge for `x_gen - negFrob.pullback x_gen`. Mirrors `bridge_at_x_gen_sub_negFrobeniusIsog_pullback_x_gen_sq_of_non_2_tor`. -/ theorem bridge_at_x_gen_sub_negFrobeniusIsog_pullback_x_gen_sq_of_2_tor (xT yT : K) (h_ns : W.toAffine.Nonsingular xT yT) (h_2_tor : yT = W.toAffine.negY xT yT) @@ -492,7 +465,7 @@ theorem bridge_at_x_gen_sub_negFrobeniusIsog_pullback_x_gen_sq_of_2_tor (xT yT : W xT yT h_ns h_2_tor hq) 2 /-- **Bridge at `((negFrob).pullback x_gen)^2` for 2-torsion `T`**: pow on -the just-shipped bridge for `(negFrob).pullback x_gen`. Mirrors the non-2-tor +the bridge for `(negFrob).pullback x_gen`. Mirrors the non-2-tor version (`bridge_at_negFrobeniusIsog_pullback_x_gen_sq_of_non_2_tor`). -/ theorem bridge_at_negFrobeniusIsog_pullback_x_gen_sq_of_2_tor (xT yT : K) (h_ns : W.toAffine.Nonsingular xT yT) (h_2_tor : yT = W.toAffine.negY xT yT) : @@ -525,7 +498,7 @@ theorem bridge_at_x_gen_mul_negFrobeniusIsog_pullback_x_gen_sq_of_2_tor (xT yT : (bridge_at_negFrobeniusIsog_pullback_x_gen_sq_of_2_tor W xT yT h_ns h_2_tor) /-- **Bridge at T6 = `x_gen² · (negFrob).pullback x_gen`** for 2-torsion `T`: -mul on bridges for `x_gen²` (pow) and `(negFrob).pullback x_gen` (shipped). -/ +mul on bridges for `x_gen²` (pow) and `(negFrob).pullback x_gen` . -/ theorem bridge_at_x_gen_sq_mul_negFrobeniusIsog_pullback_x_gen_of_2_tor (xT yT : K) (h_ns : W.toAffine.Nonsingular xT yT) (h_2_tor : yT = W.toAffine.negY xT yT) : (W_smooth W).ord_P (⟨xT, yT, h_ns⟩ : (W_smooth W).SmoothPoint) @@ -563,11 +536,10 @@ theorem bridge_at_x_gen_mul_negFrobeniusIsog_pullback_x_gen_of_2_tor (xT yT : K) (bridge_at_x_gen_of_2_tor W xT yT h_ns h_2_tor) (bridge_at_negFrobeniusIsog_pullback_x_gen_of_2_tor W xT yT h_ns h_2_tor) -omit [Fintype K] in +omit [Fintype K] [WeierstrassCurve.IsElliptic W.toAffine] in /-- **`ord_P (x_gen − xk) = 2` EXACTLY at smooth 2-torsion `T`** via the curve identity `(y − yk)·A = (x − xk)·(B − a₁·yk)` with the EXACT `ord_P A = 1` -(shipped at `ord_P_A_eq_one_at_2tor`) and `ord_P (B − a₁·yk) = 0` (shipped at -`ord_P_B_minus_a1_yk_eq_zero_at_2tor`). Tightens the shipped `≥ 2` to equality. -/ +(given by `ord_P_A_eq_one_at_2tor`) and `ord_P (B − a₁·yk) = 0` (given by `ord_P_B_minus_a1_yk_eq_zero_at_2tor`). Tightens the `≥ 2` to equality. -/ theorem ord_P_x_gen_sub_const_eq_two_at_2tor (xk yk : K) (h_ns : W.toAffine.Nonsingular xk yk) (h_2_tor : yk = W.toAffine.negY xk yk) : (W_smooth W).ord_P (negSmoothPoint W xk yk h_ns) @@ -631,10 +603,9 @@ theorem ord_P_x_gen_sub_const_eq_two_at_2tor (xk yk : K) rw [h_mul_eq, h_Bma_ord, add_zero] at h_RHS_ord exact h_RHS_ord -omit [Fintype K] in +omit [Fintype K] [WeierstrassCurve.IsElliptic W.toAffine] in /-- Nonnegativity of `ord_P` of the `T3` coefficient `yd·(a₂ + 2x + xk') − a₁²·yd`, given the basic -order data. Extracted from `ord_P_translateY_xy_eq_neg_three_at_2tor` to keep its per-term `ord_P` -bound bookkeeping under the default heartbeat budget. -/ +order data. -/ theorem ord_P_translateY_T3_coef_nonneg {P : (W_smooth W).SmoothPoint} {yd a1 a2 xk' : KE} (h_yd_ord : (W_smooth W).ord_P P yd = ((1 : ℤ) : WithTop ℤ)) @@ -717,8 +688,7 @@ theorem ord_P_translateY_T3_coef_nonneg omit [Fintype K] [DecidableEq K] [W.toAffine.IsElliptic] in /-- Nonnegativity of `ord_P` of the `T4` coefficient `−y + a₁·(a₂ + x + xk') − a₃`, given the basic -order data. Extracted from `ord_P_translateY_xy_eq_neg_three_at_2tor` to keep its per-term `ord_P` -bound bookkeeping under the default heartbeat budget. -/ +order data. -/ theorem ord_P_translateY_T4_coef_nonneg {P : (W_smooth W).SmoothPoint} {a1 a2 a3 xk' : KE} (h_xg_nn : (0 : WithTop ℤ) ≤ (W_smooth W).ord_P P (x_gen W)) @@ -779,9 +749,9 @@ theorem ord_P_translateY_T4_coef_nonneg SmoothPlaneCurve.ord_P_add_le (P := P) _ _ exact (le_min h12' h_neg_a3_nn).trans h123 -omit [Fintype K] in +omit [Fintype K] [DecidableEq K] [WeierstrassCurve.IsElliptic W.toAffine] in /-- Nonnegativity of `ord_P (y_gen)`: the generic `y`-coordinate has no pole at any smooth point, -since its `pointValuation` is `≤ 1`. Extracted from `ord_P_translateY_xy_eq_neg_three_at_2tor`. -/ +since its `pointValuation` is `≤ 1`. -/ private theorem ord_P_y_gen_nonneg {P : (W_smooth W).SmoothPoint} : (0 : WithTop ℤ) ≤ (W_smooth W).ord_P P (y_gen W) := by by_cases hf : y_gen W = 0 @@ -794,7 +764,7 @@ private theorem ord_P_y_gen_nonneg {P : (W_smooth W).SmoothPoint} : have hv : (W_smooth W).pointValuation P (y_gen W) ≠ 0 := ((W_smooth W).pointValuation P).ne_zero_iff.mpr hf simp only [SmoothPlaneCurve.ord_P] - rw [dif_neg hv] + rw [dite_eq_right hv] rw [show (0 : WithTop ℤ) = ((0 : ℤ) : WithTop ℤ) from rfl, WithTop.coe_le_coe] have h_unz_le : WithZero.unzero hv ≤ 1 := by @@ -807,9 +777,9 @@ private theorem ord_P_y_gen_nonneg {P : (W_smooth W).SmoothPoint} : rw [h1] at h2; exact h2 omega -omit [Fintype K] in +omit [Fintype K] [WeierstrassCurve.IsElliptic W.toAffine] in /-- The `T2` term `-(2·a₁·yd²·xd)` has `ord_P ≥ 4` at 2-torsion, given `ord_P yd = 1`, -`ord_P xd = 2` and `ord_P a₁ ≥ 0`. Extracted from `ord_P_translateY_xy_eq_neg_three_at_2tor`. -/ +`ord_P xd = 2` and `ord_P a₁ ≥ 0`. -/ private theorem ord_P_translateY_T2_term_ge_four {P : (W_smooth W).SmoothPoint} {a1 yd xd : KE} (h_yd_sq : (W_smooth W).ord_P P (yd ^ 2) = ((2 : ℤ) : WithTop ℤ)) @@ -857,10 +827,9 @@ private theorem ord_P_translateY_T2_term_ge_four (((2 : ℤ) : WithTop ℤ) + ((2 : ℤ) : WithTop ℤ)) := add_le_add h_2a1_nn (le_refl _) -omit [Fintype K] in +omit [Fintype K] [WeierstrassCurve.IsElliptic W.toAffine] in /-- The `T3` term `(yd·(a₂ + 2x + xk') - a₁²·yd)·xd²` has `ord_P ≥ 4` at 2-torsion: the -coefficient is nonnegative (`ord_P_translateY_T3_coef_nonneg`) and `ord_P xd² = 4`. Extracted from -`ord_P_translateY_xy_eq_neg_three_at_2tor`. -/ +coefficient is nonnegative (`ord_P_translateY_T3_coef_nonneg`) and `ord_P xd² = 4`. -/ private theorem ord_P_translateY_T3_term_ge_four {P : (W_smooth W).SmoothPoint} {a1 a2 yd xd xk' : KE} (h_yd_ord : (W_smooth W).ord_P P yd = ((1 : ℤ) : WithTop ℤ)) @@ -889,8 +858,7 @@ private theorem ord_P_translateY_T3_term_ge_four omit [Fintype K] [DecidableEq K] [W.toAffine.IsElliptic] in /-- The `T4` term `(-y + a₁·(a₂ + x + xk') - a₃)·xd³` has `ord_P ≥ 6` at 2-torsion: the -coefficient is nonnegative (`ord_P_translateY_T4_coef_nonneg`) and `ord_P xd³ = 6`. Extracted from -`ord_P_translateY_xy_eq_neg_three_at_2tor`. -/ +coefficient is nonnegative (`ord_P_translateY_T4_coef_nonneg`) and `ord_P xd³ = 6`. -/ private theorem ord_P_translateY_T4_term_ge_six {P : (W_smooth W).SmoothPoint} {a1 a2 a3 xd xk' : KE} (h_xd_cube_eq : (W_smooth W).ord_P P (xd ^ 3) = ((6 : ℤ) : WithTop ℤ)) @@ -920,8 +888,7 @@ private theorem ord_P_translateY_T4_term_ge_six omit [Fintype K] [DecidableEq K] [W.toAffine.IsElliptic] in /-- Extract `ord_P f = -3` from `ord_P (f · g) = 3` and `ord_P g = 6`: since `f · g` has finite -order, `f ≠ 0`, so `ord_P f` is a finite integer `k` with `k + 6 = 3`. Extracted from -`ord_P_translateY_xy_eq_neg_three_at_2tor` (with `g = xd³`). -/ +order, `f ≠ 0`, so `ord_P f` is a finite integer `k` with `k + 6 = 3`. -/ private theorem ord_P_eq_neg_three_of_mul_eq_three {P : (W_smooth W).SmoothPoint} {f g : KE} (h_LHS_ord : (W_smooth W).ord_P P (f * g) = ((3 : ℤ) : WithTop ℤ)) @@ -949,8 +916,7 @@ private theorem ord_P_eq_neg_three_of_mul_eq_three omit [Fintype K] [DecidableEq K] [W.toAffine.IsElliptic] in /-- A four-term sum `d + (A + (B + C))` has `ord_P` equal to that of its dominant term `d` when -`ord_P d = 3` and each of `A`, `B`, `C` has `ord_P ≥ 4`. Extracted from -`ord_P_translateY_xy_eq_neg_three_at_2tor`. -/ +`ord_P d = 3` and each of `A`, `B`, `C` has `ord_P ≥ 4`. -/ private theorem ord_P_dominant_sum_eq_three {P : (W_smooth W).SmoothPoint} {d A B C : KE} (h_d : (W_smooth W).ord_P P d = ((3 : ℤ) : WithTop ℤ)) @@ -969,15 +935,14 @@ private theorem ord_P_dominant_sum_eq_three exact lt_of_lt_of_le (by exact_mod_cast (show (3 : ℤ) < 4 by norm_num)) h_ABC exact (SmoothPlaneCurve.ord_P_add_eq_of_lt h_strict).trans h_d -omit [Fintype K] in +omit [Fintype K] [WeierstrassCurve.IsElliptic W.toAffine] in /-- **`ord_P (translateY_xy) = -3` at smooth 2-torsion `T`** via the algebraic identity `translateY_xy_mul_cube_eq` and the 2-tor ord values -`ord_P (yd) = 1` (shipped at `ord_P_y_gen_sub_negY_const_eq_one_of_2_tor`) -+ `ord_P (xd) = 2` exactly (shipped at `ord_P_x_gen_sub_const_eq_two_at_2tor`). +`ord_P (yd) = 1` (given by `ord_P_y_gen_sub_negY_const_eq_one_of_2_tor`) ++ `ord_P (xd) = 2` exactly (given by `ord_P_x_gen_sub_const_eq_two_at_2tor`). At 2-tor the RHS dominant is `-yd³` with ord = 3, all other RHS terms have ord ≥ 4 (strict); LHS = `translateY · xd³` has ord = `ord(translateY) + 6`, -forcing `ord(translateY) = -3`. Mirrors the non-2-tor proof at -`EC/TranslationOrd.lean:1536`. -/ +forcing `ord(translateY) = -3`. Mirrors the non-2-tor proof at -/ theorem ord_P_translateY_xy_eq_neg_three_at_2tor (xk yk : K) (h_ns : W.toAffine.Nonsingular xk yk) (h_2_tor : yk = W.toAffine.negY xk yk) : (W_smooth W).ord_P (negSmoothPoint W xk yk h_ns) @@ -1072,11 +1037,7 @@ theorem ord_P_translateY_xy_eq_neg_three_at_2tor (xk yk : K) -- ord_P translateY + 6 = 3 ⟹ ord_P translateY = -3. exact ord_P_eq_neg_three_of_mul_eq_three W h_LHS_ord h_xd_cube_eq -/-- **Type abbreviation for the y-side substantive value at 2-torsion T**: -`ord_P (translateY_xy) = -3` at the negated point. This is the single -substantive witness the y-side chain reduces to. - -⟶ Now DISCHARGEABLE via `ord_P_translateY_xy_eq_neg_three_at_2tor` (just shipped). -/ +/-- The y-coordinate after translation has order `-3` at the negated point. -/ abbrev TwoTorYValueWitness (xT yT : K) (h_ns : W.toAffine.Nonsingular xT yT) : Prop := (W_smooth W).ord_P (negSmoothPoint W xT (W.toAffine.negY xT yT) @@ -1084,7 +1045,7 @@ abbrev TwoTorYValueWitness (xT yT : K) (h_ns : W.toAffine.Nonsingular xT yT) : P (translateY_xy W xT (W.toAffine.negY xT yT)) = ((-3 : ℤ) : WithTop ℤ) -omit [Fintype K] in +omit [Fintype K] [WeierstrassCurve.IsElliptic W.toAffine] in /-- **Discharge `TwoTorYValueWitness` from the substantive y-side lemma**: at smooth 2-torsion `T`, the y-side ord = -3 value follows directly from `ord_P_translateY_xy_eq_neg_three_at_2tor` applied at the negated coordinates. -/ @@ -1222,7 +1183,7 @@ theorem bridge_at_y_gen_of_2_tor (xT yT : K) (twoTorYValueWitness_discharge W xT yT h_ns h_2_tor) /-- **Bridge at `f = y_gen^q` for 2-torsion `T` (UNCONDITIONAL)**: pow on the -just-shipped unconditional y-side base bridge. -/ +the y-coordinate order identity. -/ theorem bridge_at_y_gen_pow_card_of_2_tor (xT yT : K) (h_ns : W.toAffine.Nonsingular xT yT) (h_2_tor : yT = W.toAffine.negY xT yT) : (W_smooth W).ord_P (⟨xT, yT, h_ns⟩ : (W_smooth W).SmoothPoint) @@ -1246,7 +1207,7 @@ theorem bridge_at_y_gen_sub_y_gen_pow_card_of_2_tor (xT yT : K) (twoTorYValueWitness_discharge W xT yT h_ns h_2_tor) hq /-- **Bridge at `(negFrob).pullback y_gen` for 2-torsion `T` (UNCONDITIONAL)**: -mirrors `bridge_at_negFrobeniusIsog_pullback_y_gen_of_non_2_tor` (`PoleDivisorFallback.lean:1034`) +mirrors `bridge_at_negFrobeniusIsog_pullback_y_gen_of_non_2_tor` using the now-unconditional 2-tor y-side bridges. The pullback expands as `-y_gen^q - a₁·x_gen^q - a₃`; strict-comparison isolates `-y_gen^q` with ord `-3q` as the dominant term. -/ @@ -1393,7 +1354,7 @@ theorem bridge_at_negFrobeniusIsog_pullback_y_gen_of_2_tor (xT yT : K) (Conditional.ordAtInfty_neg_y_gen_pow_card_lt_rest W hq) /-- **Bridge at T1 = `a₄ · (x_gen + (negFrob).pullback x_gen)` for 2-torsion `T` (UNCONDITIONAL)**: -const_mul on the strict-add bridge (already shipped). -/ +const_mul on the strict-add bridge (proved). -/ theorem bridge_at_T1_a4_x_add_pi_x_of_2_tor (xT yT : K) (h_ns : W.toAffine.Nonsingular xT yT) (h_2_tor : yT = W.toAffine.negY xT yT) (hq : 2 ≤ Fintype.card K) : @@ -1719,7 +1680,7 @@ under `hq`, **UNCONDITIONAL**. Mirror of `bridge_at_addPullbackNumerator_negFrobenius_of_non_2_tor`: apply `ord_P_translateAlgEquivOfPoint_sum_dominant` with dom = T7 (x · π·x², ord = -2-4q) and the same seven other terms; the per-term bridges are the -2-torsion versions just shipped, and the strict-comparison framework is +2-torsion versions proved, and the strict-comparison framework is identical because the `ordAtInfty_T*_ge` bounds are universal in T. -/ theorem bridge_at_addPullbackNumerator_negFrobenius_of_2_tor (xT yT : K) (h_ns : W.toAffine.Nonsingular xT yT) (h_2_tor : yT = W.toAffine.negY xT yT) @@ -1811,7 +1772,7 @@ theorem bridge_at_addPullbackNumerator_negFrobenius_of_2_tor (xT yT : K) /-- **Bridge at `addPullback_x W (negFrobeniusIsog W)`** for 2-torsion T under `hq`, **UNCONDITIONAL**. Discharges the `bridge_at_addPullback_x_negFrobenius_of_bridge_at_Num` Conditional consumer -with the just-shipped 2-tor Num bridge. +with the 2-tor Num bridge. Note: `bridge_at_addPullback_x_negFrobenius_of_bridge_at_Num` requires a non-2-torsion hypothesis only for its appeal to diff --git a/projects/HasseWeil/HasseWeil/HasseBound/Primitives.lean b/projects/HasseWeil/HasseWeil/HasseBound/Primitives.lean index 7b7c9f9bdd2de81fd56ed1658ddd95a0088e6cef..bc3351f74e8f72d1c306fa97c7af59533db0a65e 100644 GIT binary patch delta 9240 zcmb_iZH!!18P0ACttZiz#2Q*kIZYdxS!QN;+foo%bSVWEO1o+6R^+4i&diyeL+{)> zz4y-UPNUocNdXOrxtOR41pFicJ#+nBf)OVl1*P$ij|hTAh_dJh3ggg4X#rbwrqL4 z+A=Naw+q~~tGp@~r02N2Vws*NJjM>z1$TwlvV0FeEz^%haMR~Uglh|nHyvr?w(sz! zD;t8#sxU2&OB*5s{P4xRYg&-$cr8~H81CD?thITwWm#pja>V0KP3e(QYf<`jJ_lVZ zbt%d%dp=T7xDwl_ICfR~(y<}ecg>23g!)o=B~D65J1G>^R+2rK&8F2R)x?5u+q_aY z@wN}49xw_&z539G?L0SK7S{6d@Mg2(lx4oaIG>rBDeVZ4ub$kmP|}d)3+nn6xSz{v zitF^$TxqfdVLp`cL=)?jEvN-71Td^|W0Dv7nd3%2-21U_1pAa-)O!j7A+xTqD?&pFrCeW{Bo^wyF|igGOHE5wq|fW^rUQj=xx~UJKhX)MZ7qx& z#cc+UUg9+k9|1++_CPfcK;VaD25#UjJk2CDlr|j26B@aB;WUKr%1Yw8^jxE5ncQm% z?A?;bgcndK_;r9EFTGe7HiPMM2lFu2J{XDsbj^mW$%;vSjCHDFi40~;k{#hc29!Cx zFSkUmU>_xR0FHA&TF|Fq+Hk$nq zGVBXjL&+#NDu|-M9uht!-fdq>ACqBm%lAJ+rtDDywv0`}6+&cL#I8hsE}K}lCWTcE zf4=n(yQ5W895b@Cqmm~^xpatGO5w!#mEmtc{k?#6iK4Nnb6Js)j2)d~ELt$tm|`9g z(X$APputv}NHhY~saoPU#t~*(7HX2$s?;fksk%}(5n6auR$I{qxj2ec9PNUo8z;j- zZo@nRTN5-<+Kq$NSbp&9TpXU|HT;|6wgIu#7K{rulY4Z%H|WmOR=KJ0)Jj4koG7ka zP5x#=&2S{QuJgO%H6!bI?#u~}P|wXeR@-(O$P4_IPHueDkXzy5iLr6U#*3TzmMxhY z7?oxf<*Le2X+`OzDi^NV`PG2lDe`GvLk)9Wc}%AgI3H4yFDX6hE9Evfjv7G1bz1ZF z%nD7{S%6Fg1j7SG#Ifr*zDkukhJ>XuHEgbM?3Q~$nn7g4oEIh58NcfHBkc1wlBw%q z*WszD3-?0XY)NU+OkG+L-5lsZ*# zk(F&Rudg6SI97{pMpbjp(EI}SP2_U})wjSc;p5Z&1}`I8BSOLfSS(B@0mXeto-xOl zAN*#3$_>Z4{pg(r*BQ^q&5iM6`MZwl%lM4CH%)AV+@BUG@RmoPDGgOp^>wZ6238k< z=y6*m(gkp|6rOQnZi%*D-B~0*H+_bMNIwo`rszNVjJ3m`)i#Dd*tfp(%ylE@Uq74K zrm2C+0v~AytLe0rc{%}wh0pEZ*qONbmGf0fh_6$*jF9KB4B51p0$y=Y(xi>*4`$hC z!9)gJ-S%p5Amwsk3wG6Xt69-$81Py^Wqrv|mBVPm$*J}Vi9D3B%NA-Y9-2cqqe`ln zq3BH(%qU%xOW3yoyxIr$YP!<2eGmacB?f`L?`Cxh0%raqSU!Li)neIPUpd0Fs{tihgW*8KHXk1A z+;e+4ddEz(9+GSKg1l*gw`&`J;2xNf?g1vb1*{0h>})>#&PV{Q(6h`78%d6c@tmQ9 zKJsj`U)H-3Tb|cKn?f0*TYEfa$ST+&v9BWK47DBQTH2=uC>mtYMumzAx9P)SRYh)> zcrOSnMm+@qE|w95bQ^6_H8YCB>pY`^qXMr|nG>1@Om=4o+E<31nby20yC$zY4g7JN zD2$DQX8Niy_rq6WGe}V=DU@9CH!ajaM**Bo%^%lflydX7T%~iW_MKI?QZx*JDzia? zIwz|IUi<*RRKBz+e0^z6__@}a@ZsBK_)1`ePd>XUyylMS@R2WH+SzclJn~WanNx$C zr8*@hAa5oOHgp=^zej>;-BD!>oFN*DgJhwOA}}LXr*jlbLP=S+>>xB$vxdI3x2uup zYEo{`&5pD1?y6v>-{$>GYmXV=9;qSN`{>%eZne6L()YAAf0NVbTpK(yiXv=#zT2w! zDwcYJkk?$NfoM>Pvp)zm>8|)J8-kgfO-wSihAxOvFB_B1OX!*IxQyE|1#WoT{hQGu z4eVRpMk14l~AS0#LgP1doUSZo@UB3MM^fLjD~o zwWGiTZK3*Bppv84C+8!v6%<+&Xc`Dn(xginR^8Wu&Xle|eBScJC7n0FR>m&%a6{>+ zhBC^<)lfmt7YyG;9;b$Ol3zxoT>Vy5pY%)vMM`-sGw5z~t?zj)1_Z0CWm=7q%eK;X zV7~LQwIjid9y7%pSaF%T%s?q|Hr-doHlcl+s3imamYX!biHH%QGgu&6LoZN~fi7Fc zfics_5$t)s{FM_Nzrb!NVf;EwF4T^@ydcKjGf}4^3XU|;6Z9#uN^~ba5A~=m3bYZC z#c19^6|D`6NB-jpjC~R^#!);4+B01fYb{$lzUm=+FxC^VZXQKQk;B9s8O{gZIR@gH zaAet_@d1d?Ko~l2e|t)k84{HtjHK;Agi)UK98GPnKzu!u=BWKn!9fLsr9cREvlvBN z(^-TsWKvw`;1latDn|8Tlpt(B3MD4KyME>TZt7}P2zFU7$~G{IrlT345(kKTA=U-k zz#Par7d`!`qEB(DPO=Im))YXp0yQm!i>6j_@=mE>FB8-gu2}F;Zpw@xC3bL+Jug3x z#GttG9!-qz!;d9&Rp51*oW+biND8@je50M`<2;u>N1>%g0D9`^=^&(l^#rCqs>4-d zJF{R{S-RC2$01&?Xzj(%-m`LdYNA?_N1|2Iz>3QQ48|CSlF9+euF*&=e962hAauLC zzeFJHK{Hd2)u@zeCyoYK+NtBfB_fwD3mnss*X^sI*HlTNSvw61frzS9pS6oB&bcLP zer60pkE9}ty)=QqQ_&Ot<0l)g+^xmy{LyFhXr-=&s6;Ip;j1UNbRK@8z2ZYkXd9hZ zPg*O2TTLIw1OQm6c}Ou_)Usa9vuc^vMH z{o?Ua>O;`h>)|@gW2ovihlGz7Jg#JDO%CF@0T~lvkekg@X*|kj5(VHhFlSd;xXYm@q-|P^qG2jYBSaOobCck{18q1$uZS24(Lrp7jzmyGumwV zIAB!gA8ndKYi1e6Ud+aT4#`l9W9<#J_$+Q>L-QC?Hj|+q3%8z~3@2W@IT*g1x-qYOj6x5Inqn`eW|RZR z3be{N9zuGN&`AL%ueHeiXnCdPIEG)!vQ-(5y}owr zYQ?{{moCqoT;jxu2IO`{HZehsOznkN{^{}X)SIiqEq|W9diMeycE(_53>_tWWpA`< ziN$G`+Th`D{&?YS@#r!!L6;-p=n6exG%SeM?{#^~HhRO#`Sh=shfghkOKJJw8+(fx zf9Q1woi?*}3b&ozawIhtjth$2hq+8Eo5V!w^IBD$IIDK0+wq6k30=-3Z}WAt3CyWK z@o>%A%SKpu_1O*6yl&!fTFd1spoTeRUn>Q0kPpJse|x%f>dk+Rg#Y>bTO$XUIq+lUh~< zJwgLRkN8*wp6&|JO`zt0CE+-ZVhx8pI5J4}ZP}6o;j_By_^A(+*cVUKjY zPX+n(V|@9cC;3ENT{8;|!7b^R;#k(E(7jWjCfOV=ftkL?Z7673gZyW*v?H#tbilI( zhg{TdSv;$B!>I}@YXA2L#C#Q)sEcUaz>25%QjTWDlX>;y^vQgHwoXklk#xGg#*oA@ zXfB8&gCR9YklMFy7A&5EMcM!Jmfb}39TQ|5q(4n7flT7KVhNNJ zMpUC_)lp=8kSPppikiaEWxE@GK65^ug5#SRTmSoFu&WD%B2B8bO;lSGL5uC)9rw3J zPBj`+d;%Qphtzf4511#2u|3V>dz0PwFcXHKLa-0AhkY^}!y@;?2QCI9#usP$l~ACB zzj|lu-t_Q(8fW*>JeMj>^3{j|uV?pg6=P$3pBmA)?QqAri3>`&a3EHJGzi=0Cf1>* Rs55!BCGGRbU?={!^Zyl&|9Joa diff --git a/projects/HasseWeil/HasseWeil/HasseBound/SepDegreeEqPointCount.lean b/projects/HasseWeil/HasseWeil/HasseBound/SepDegreeEqPointCount.lean index b0f7c26f8594ff8704015e2653ececd9d147c830..fcdb5384128782484b7f84f20c3c1e14fb287923 100644 GIT binary patch delta 1421 zcmaKs&x;gC6vvs-_@fCT5z&jwOJ>CxogNt!4I38^>jq&^7M0B@acX+rOqX_7HC5H~ z10j=BPTuO6z3R!3NRvYX@#t~If5U@E&v{kdGhs!9fuXyr-uu?)eZTc$v3L8=Ms0B) zGp5)eK^Wp#Ap#RaFfoG2(*Y`wBT&q6DOduTDCX6;y;f}`amRHuN z9iLa$2_BGeZD?zXq!b32$SFiJ&7?-aS(fmKo3e8oGR4ztNNU_UoeU=-lxm17i07Fk z3L14AxG3dIl|rtOEao}|Nx0}EGi49Ef8w1zeDX>0>g3-w`~0hW zi{Nq?dM=;xUPXoQjL32aOx$*6QK;RtbIrw=Y)WG{s8SqqN4)efVM2-rts2a|%H;ve zDV;btCcAg~S+RR|z5c(h(iqe~%@gJ=DI%V+BwQw;LSL;|*_2G33lmgxEqhZ^4n~>g z)nBI4PuTg!<@)p|gKeL!{ZZ_;KGf~|Z;sgQ#+`Gp0b4OsJJ5p+HZ~#lPXR#8CTL$a zp4+GEZ|%?LCwEt%S0chnc`4C(@Z%U&$Zj*j>>MbFHwbsAO$- zLHKm~OrkQJRnF9_oJ7n=B5|g#g5q}vKIL=|(TznEROxufgR)!Zr0P(CZ^If-v!t4; zyZ9(?gnVThqSY-PbbqTCjjKoMr=WSy5!#W-T*#EuZP_cLYsYKFzt?}Q6VBC~YRN{2)9t6}5oq#TK<0dw!* z$w@b_e4e>OqNg$-ou2H13_AS)rb<2~Ocx3v$4Ji2K~`eCo11F>w1&WVFR#gbp8Yyu zKv=0%mR0Jiw>E4}yE6;T6-E2O^pCpMZ?MyH$R3)h2Evh`!e&2gY@9yAY@N{IyxDQ> zloChEH*L+0)AuA&?g`8=j{G>wY?=N2^r5`~twfHyufl&9b{Cj;s23ANN&KU7jH;q6 zvooloz1OI6rI`((pk&p|Y+G(7m{V4^C7B0St#laoJ-@~*Sz83=Ryv8|-&phZO`b&a z*;lp=F<4W9x&N(K2ZGbgKl(<0n3q1B2j=F^H3Q?0XnO`M zH&1;!ILSQt`PsgL&oooMbf)pvG&p@DMlQC_89-t&ix(8Y6S2+lUfG?q8b-$!zzh7< zBB8bwKUTmC(Fm#cJ}&l+lLoO8HY+qO;`XU-R!9{Em`kq3@C?1V z7~Z3npTHiPvjlc0Im5MzrYn9r9f6U2rwq+~2c)fs;k-iuS0b=wF=XfWp%2qc$h~JKOl!yEx^kv(ho5c`1~?-06#njm-Tq(sFmv# z?w^MnCBAMk&P=4vrFft9mBpu3qL{a*9>t0kf)`BnSX39(jVekFG2PaU>~m`Mip~`A z6=4?N1rrsYXA}!*ObrV&C8T=lVyi-*Hob4yx!6?Z)7%24E}#k?`_<(FO_)_Rj*e7K zwyYNjSAMldb;l$g@F`B6lmcr`zZiafeKNET>eu2}e09gIdVWpmh^|1ol(g zOE?_q>uq>|#qI~w6}Re_?*`<0wn(dU+)u-=I+9_RQnLHr+;iVYc-U=3sbY%qAIJiQJM+{dRTQNYFtI{ z?!sZTVGj<1Dmu0s|N5;ya*dY`4dLcqOEmfK;NPO%o_GlJ>{>a>i&!aLco7R`6c^ip z)ToV$r&w^fuG_s(iCe1+2=aRs&98)YabgEGpP1X#k+^KSM|4sLc2dJ*$Y|SnOyh;e z@oH=W_M|1rCvl;5m77n&e_|p}`3nwC;OsQ+=^!8ReA=ge_xwgUlYXXRA%@ zN*aCyvmH#l=FfEDKIB~&u?bRH;e3mZ<(e-N5a+ZwEN9ck%lM-k(xZV_L|T hf ?_, hc⟩ simpa [h] using hc +omit [DecidableEq F] in /-- If `τ g / g` has trivial projective divisor, then `τ g` is a nonzero scalar multiple of `g`. -/ theorem pairing_const_of_transport [IsAlgClosed F] [W.IsElliptic] diff --git a/projects/HasseWeil/HasseWeil/HasseBound/WeilPairing/DivisorPullback.lean b/projects/HasseWeil/HasseWeil/HasseBound/WeilPairing/DivisorPullback.lean index aa75199b4..8789a8842 100644 --- a/projects/HasseWeil/HasseWeil/HasseBound/WeilPairing/DivisorPullback.lean +++ b/projects/HasseWeil/HasseWeil/HasseBound/WeilPairing/DivisorPullback.lean @@ -10,55 +10,23 @@ import HasseWeil.HasseBound.WeilPairing.SigmaBridge import HasseWeil.HasseBound.WeilPairing.TorsionGeometric /-! -# Divisor-pullback functoriality for the separable multiplication-by-`ℓ` isogeny +# Divisor pullback for multiplication by `ℓ` -For a separable isogeny `φ = [ℓ]` (`(ℓ : F) ≠ 0`, `[IsAlgClosed F]`) and a nonzero rational -function `h ∈ K(E)`, the divisor of the pulled-back function `φ.pullback h` equals the geometric -pullback of `div h`: -``` -divisorOf (φ.pullback h) = pullback-of-divisor (divisorOf h). -``` -Because `[ℓ]` is **separable** (unramified — every fibre is étale, multiplicity `1`), the pullback -of a single place `(Q)` is the multiplicity-free fibre sum `Σ_{φP=Q} (P)` (the repo's -`pullbackDiv`, `WeilPairing/Pullback.lean`). The geometric heart is the per-place -**unramified order-transport** -``` -ord_P (φ.pullback h) = ord_{φ(P)} (h) (no ramification factor `e_P > 1`), -``` -which, summed over all places, yields the divisor identity. This is Silverman III.4.10c / -III.8.1–2 in divisor language: the geometric content of the separability of `[ℓ]`. - -## Architecture - -* **Item 1 — the core (`OrdTransport` / `ordTransport_mulByInt`).** The per-place transport - `ord_P P (φ.pullback h) = (ord of h at φ(P))` is the deep geometric unramifiedness statement. - It is the exact isogeny analogue of the translation order-transport proven in - `EC/TranslateValuation.lean` + `EC/TranslateOrdInfty.lean` (≈5000 lines): a valuation on `K(E)` - pinned by its values on `x_gen`, `y_gen`. For an isogeny the base values - `ord_P P (φ.pullback x_gen)`, `ord_P P (φ.pullback y_gen)` are the `ℓ`-division-polynomial orders, - whose computation is the genuine ramification content. We **isolate** this as the named predicate - `OrdTransport` (a per-`(P, φ)` hypothesis bundling the projective place transport) and prove the - full divisor assembly on top of it. - -* **Item 2 — the assembly (`projectiveDivisorOf_pullback_eq_pullbackDivisor`).** Given the core - for every place, the projective divisor of `φ.pullback h` equals the fibre-pullback of the - projective divisor of `h`. This is a pure `Finsupp` computation: every coefficient matches by - the core, and the supports are related by the (finite) fibre structure. Fully proven modulo the - core. - -* **Item 3 — the pairing-facing corollaries.** `pullback_divisorOf_eq_of_divisorOf_eq` (the - shape bilinearity-in-`T` and nondegeneracy consume) and the III.8.1 relation - `weilFunction_pow_mem_pullback_range`-style statement, parametric on the core. - -Reference: Silverman, *The Arithmetic of Elliptic Curves*, III.4.10c, III.8.1, III.8.2. +For a separable multiplication-by-`ℓ` isogeny over an algebraically closed field, +the geometric pullback of a place is the multiplicity-free fiber sum. +The per-place hypothesis `OrdTransport` expresses the unramified order identity +`ord_P (φ*h) = ord_{φ(P)} h`, including the projective place at infinity. +Summing these identities over all places identifies the projective divisor of +`φ*h` with the fiber pullback of the divisor of `h`. + +References: Silverman, *The Arithmetic of Elliptic Curves*, III.4.10c, +III.8.1, and III.8.2. -/ open WeierstrassCurve HasseWeil.Curves namespace HasseWeil.WeilPairing.DivisorPullback -set_option linter.unusedSectionVars false - variable {F : Type*} [Field F] [DecidableEq F] {W : WeierstrassCurve.Affine F} [W.IsElliptic] /-- Local abbreviation for the function field `K(E)` (`= (⟨W⟩ : SmoothPlaneCurve F).FunctionField`), @@ -70,6 +38,7 @@ local notation3 "KE" => W.toAffine.FunctionField noncomputable def projOrdAt (f : (⟨W⟩ : SmoothPlaneCurve F).FunctionField) (Q : W.Point) : ℤ := (⟨W⟩ : SmoothPlaneCurve F).projectiveDivisorOf f Q.toProjectiveSmoothPoint +omit [DecidableEq F] [WeierstrassCurve.IsElliptic W] in theorem projOrdAt_some (f : (⟨W⟩ : SmoothPlaneCurve F).FunctionField) {x y : F} (h : W.Nonsingular x y) : projOrdAt f (Affine.Point.some x y h) = @@ -77,6 +46,7 @@ theorem projOrdAt_some (f : (⟨W⟩ : SmoothPlaneCurve F).FunctionField) {x y : rw [projOrdAt, Affine.Point.toProjectiveSmoothPoint_some, (⟨W⟩ : SmoothPlaneCurve F).projectiveDivisorOf_apply_affine f ⟨x, y, h⟩] +omit [DecidableEq F] [WeierstrassCurve.IsElliptic W] in theorem projOrdAt_zero (f : (⟨W⟩ : SmoothPlaneCurve F).FunctionField) : projOrdAt f (0 : W.Point) = ((⟨W⟩ : SmoothPlaneCurve F).ordAtInfty f).untopD 0 := by rw [projOrdAt, Affine.Point.toProjectiveSmoothPoint_zero, @@ -107,7 +77,7 @@ theorem coeff_affine_pullback_eq {φ : Isogeny W W} /-- **The fibre-pullback of a projective divisor** under a point-map endomorphism with finite kernel: `φ*(D) = Σ_v D(v) · pullbackDiv(v)`, the `ℤ`-linear extension of the multiplicity-free -fibre pullback `pullbackDiv` (`WeilPairing/Pullback.lean`) over the (projective) places of `D`. +fibre pullback `pullbackDiv` over the (projective) places of `D`. The place at infinity pulls back to `pullbackDiv f h 0 = Σ_{φP=O}(P)` (the kernel). -/ noncomputable def pullbackDivisor (f : W.Point →+ W.Point) (hf : Finite f.ker) (D : ProjectiveDivisor (⟨W⟩ : SmoothPlaneCurve F)) : @@ -154,10 +124,10 @@ theorem pullbackDiv_apply (f : W.Point →+ W.Point) (hf : Finite f.ker) (Q : W.Point) (w : ProjectiveSmoothPoint (⟨W⟩ : SmoothPlaneCurve F)) : pullbackDiv f hf Q w = if f w.toAffinePoint = Q then 1 else 0 := by classical - letI : Fintype {R : W.Point // f R = Q} := @Fintype.ofFinite _ (fiber_finite f hf Q) + let : Fintype {R : W.Point // f R = Q} := @Fintype.ofFinite _ (fiber_finite f hf Q) rw [pullbackDiv, Finsupp.finsetSum_apply] by_cases hwQ : f w.toAffinePoint = Q - · rw [if_pos hwQ] + · rw [ite_eq_left hwQ] have hwproj : (⟨w.toAffinePoint, hwQ⟩ : {R : W.Point // f R = Q}).val.toProjectiveSmoothPoint = w := Affine.Point.toAffinePoint_toProjectiveSmoothPoint w rw [Finset.sum_eq_single (⟨w.toAffinePoint, hwQ⟩ : {R : W.Point // f R = Q})] @@ -173,7 +143,7 @@ theorem pullbackDiv_apply (f : W.Point →+ W.Point) (hf : Finite f.ker) exact Subtype.ext hRval · intro hni exact absurd (Finset.mem_univ _) hni - · rw [if_neg hwQ] + · rw [ite_eq_right hwQ] refine Finset.sum_eq_zero (fun R _ ↦ ?_) rw [Finsupp.single_eq_of_ne] intro hcontra @@ -209,9 +179,9 @@ theorem pullbackDivisor_apply (f : W.Point →+ W.Point) (hf : Finite f.ker) intro v _ rw [Finsupp.coe_smul, Pi.smul_apply, pullbackDiv_apply, smul_eq_mul] by_cases hv : f w.toAffinePoint = v.toAffinePoint - · rw [if_pos hv, mul_one, if_pos] + · rw [ite_eq_left hv, mul_one, ite_eq_left] rw [hv, Affine.Point.toAffinePoint_toProjectiveSmoothPoint] - · rw [if_neg hv, mul_zero, if_neg] + · rw [ite_eq_right hv, mul_zero, ite_eq_right] intro hcontra apply hv have := congrArg ProjectiveSmoothPoint.toAffinePoint hcontra @@ -219,8 +189,8 @@ theorem pullbackDivisor_apply (f : W.Point →+ W.Point) (hf : Finite f.ker) rw [Finset.sum_congr rfl hterm, Finset.sum_ite_eq D.support (f w.toAffinePoint).toProjectiveSmoothPoint (fun v ↦ D v)] by_cases hmem : (f w.toAffinePoint).toProjectiveSmoothPoint ∈ D.support - · rw [if_pos hmem] - · rw [if_neg hmem, Finsupp.notMem_support_iff.mp hmem] + · rw [ite_eq_left hmem] + · rw [ite_eq_right hmem, Finsupp.notMem_support_iff.mp hmem] /-- **The per-place core, projective form.** For the isogeny `φ`, the coefficient of `projectiveDivisorOf (φ.pullback h)` at the projective place `w` equals the coefficient of @@ -336,7 +306,7 @@ theorem inftyOrdTransport_mulByInt (ℓ : ℤ) (hℓ : ℓ ≠ 0) (hℓF : (ℓ rw [hm, hn, WithTop.untopD_coe, WithTop.untopD_coe] omega -/-- **Comap-valuation identity, affine-image case** (proven, axiom-clean). The comap of +/-- **Comap-valuation identity, affine-image case** . The comap of `pointValuation P` along `[ℓ].pullback` equals `pointValuation` at the affine image smooth point `⟨x, y, h_ns⟩`. This is the unramifiedness of `[ℓ]` at an affine image (Silverman III.4.10c). -/ theorem comap_pointValuation_mulByInt_eq_affine [IsAlgClosed F] (ℓ : ℤ) (hℓ : (ℓ : F) ≠ 0) @@ -529,8 +499,7 @@ Hence `φ.pullback f_T` and `g_T^ℓ` have the *same* divisor, so they differ by (`Constancy`): the relation `f_T ∘ [ℓ] = c · g_T^ℓ` that nondegeneracy consumes. Parametric on the per-place core `ProjOrdTransport [ℓ]` (`= projOrdTransport_mulByInt`), and on the -finiteness of `ker[ℓ]` (the caller supplies `mulByInt_ker_finite`, keeping this file decoupled from -`Pairing.lean`/`TorsionCardEll`). The conclusion's right side is exactly `ℓ • (div g_T)`. -/ +finiteness of `ker[ℓ]`. The conclusion's right side is exactly `ℓ • (div g_T)`. -/ theorem projectiveDivisorOf_pullback_weilFunction (ℓ : ℤ) [hker : Finite (mulByInt W ℓ).toAddMonoidHom.ker] (hcore : ProjOrdTransport (mulByInt W ℓ)) (T : W.Point) {fT : (⟨W⟩ : SmoothPlaneCurve F).FunctionField} @@ -573,7 +542,7 @@ divisor the Abel–Jacobi divisor `D = (T₁+T₂) − (T₁) − (T₂) + (O)`, they differ by a constant. Parametric on the per-place core `ProjOrdTransport [ℓ]` (`= projOrdTransport_mulByInt`) and the -finiteness of `ker[ℓ]` (caller-supplied, decoupling this file from `Pairing.lean`). -/ +finiteness of `ker[ℓ]`. -/ theorem projectiveDivisorOf_pullback_bilinFunction (ℓ : ℤ) [hker : Finite (mulByInt W ℓ).toAddMonoidHom.ker] (hcore : ProjOrdTransport (mulByInt W ℓ)) (T₁ T₂ : W.Point) {k : (⟨W⟩ : SmoothPlaneCurve F).FunctionField} diff --git a/projects/HasseWeil/HasseWeil/HasseBound/WeilPairing/DivisorTranslate.lean b/projects/HasseWeil/HasseWeil/HasseBound/WeilPairing/DivisorTranslate.lean index 5aa369762..ba8eced54 100644 --- a/projects/HasseWeil/HasseWeil/HasseBound/WeilPairing/DivisorTranslate.lean +++ b/projects/HasseWeil/HasseWeil/HasseBound/WeilPairing/DivisorTranslate.lean @@ -11,7 +11,7 @@ import HasseWeil.HasseBound.WeilPairing.WeilFunction /-! # Divisor transport under translation -This file proves the projective divisor transport facts for translation by a +We prove the projective divisor transport facts for translation by a point on a Weierstrass curve, as used in the Weil pairing construction. ## Main definitions @@ -38,8 +38,6 @@ namespace HasseWeil open HasseWeil.WeilPairing -set_option linter.unusedSectionVars false - variable {F : Type*} [Field F] [DecidableEq F] variable (W : WeierstrassCurve F) [W.toAffine.IsElliptic] @@ -53,6 +51,7 @@ noncomputable def placeTranslate (S : W.toAffine.Point) : ((Equiv.addRight S).trans (WeierstrassCurve.Affine.Point.equivProjectiveSmoothPoint (W := W.toAffine))) +omit [WeierstrassCurve.IsElliptic W.toAffine] in theorem placeTranslate_apply (S : W.toAffine.Point) (v : ProjectiveSmoothPoint (W_smooth W)) : placeTranslate W S v = @@ -60,6 +59,7 @@ theorem placeTranslate_apply (S : W.toAffine.Point) (v.toAffinePoint + S) := by rfl +omit [WeierstrassCurve.IsElliptic W.toAffine] in @[simp] theorem placeTranslate_affine (S : W.toAffine.Point) (P : (W_smooth W).SmoothPoint) : placeTranslate W S (ProjectiveSmoothPoint.affine P) = @@ -68,6 +68,7 @@ theorem placeTranslate_apply (S : W.toAffine.Point) rw [placeTranslate_apply] rfl +omit [WeierstrassCurve.IsElliptic W.toAffine] in @[simp] theorem placeTranslate_infinity (S : W.toAffine.Point) : placeTranslate W S ProjectiveSmoothPoint.infinity = S.toProjectiveSmoothPoint := by @@ -75,6 +76,7 @@ theorem placeTranslate_apply (S : W.toAffine.Point) change (((0 : W.toAffine.Point) + S)).toProjectiveSmoothPoint = _ rw [zero_add] +omit [WeierstrassCurve.IsElliptic W.toAffine] in /-- Translation by `O` is the identity place permutation. -/ @[simp] theorem placeTranslate_zero : placeTranslate W (0 : W.toAffine.Point) = Equiv.refl _ := by @@ -89,13 +91,16 @@ noncomputable def ordProj (v : ProjectiveSmoothPoint (W_smooth W)) | ProjectiveSmoothPoint.affine P => (W_smooth W).ord_P P f | ProjectiveSmoothPoint.infinity => (W_smooth W).ordAtInfty f +omit [DecidableEq F] [WeierstrassCurve.IsElliptic W.toAffine] in @[simp] theorem ordProj_affine (P : (W_smooth W).SmoothPoint) (f : KE) : ordProj W (ProjectiveSmoothPoint.affine P) f = (W_smooth W).ord_P P f := rfl +omit [DecidableEq F] [WeierstrassCurve.IsElliptic W.toAffine] in @[simp] theorem ordProj_infinity (f : KE) : ordProj W ProjectiveSmoothPoint.infinity f = (W_smooth W).ordAtInfty f := rfl set_option backward.isDefEq.respectTransparency.types false in +omit [DecidableEq F] [WeierstrassCurve.IsElliptic W.toAffine] in /-- The coefficient of `projectiveDivisorOf f` at `v` is `(ordProj v f).untopD 0`. -/ theorem projectiveDivisorOf_apply_ordProj (f : KE) (v : ProjectiveSmoothPoint (W_smooth W)) : @@ -119,6 +124,7 @@ theorem ord_P_translate (P : (W_smooth W).SmoothPoint) · exact translate_ord_eq_all_nonzero W P xk yk h_ns h f hf set_option backward.isDefEq.respectTransparency.types false in +omit [WeierstrassCurve.IsElliptic W.toAffine] in /-- If `P + S` is finite, `placeTranslate W S (affine P)` is the translated affine place. -/ theorem placeTranslate_affine_of_isSome (S : (W_smooth W).toAffine.Point) (P : (W_smooth W).SmoothPoint) @@ -132,6 +138,7 @@ theorem placeTranslate_affine_of_isSome (S : (W_smooth W).toAffine.Point) P S h).symm set_option backward.isDefEq.respectTransparency.types false in +omit [WeierstrassCurve.IsElliptic W.toAffine] in /-- When `P + S = O` (the translate hits infinity), the place `placeTranslate W S (affine P)` is the place at infinity. -/ theorem placeTranslate_affine_eq_infinity (S : (W_smooth W).toAffine.Point) @@ -283,6 +290,7 @@ theorem projectiveDivisorOf_translate_div_eq_zero_of_invariant _ = 0 := by rw [hself, sub_self] set_option backward.isDefEq.respectTransparency.types false in +omit [WeierstrassCurve.IsElliptic W.toAffine] in /-- The `toAffinePoint` of a translated place is `w.toAffinePoint + S`. -/ theorem placeTranslate_toAffinePoint (S : (W_smooth W).toAffine.Point) (w : ProjectiveSmoothPoint (W_smooth W)) : @@ -299,7 +307,7 @@ theorem pullbackDiv_apply (f : W.toAffine.Point →+ W.toAffine.Point) (w : ProjectiveSmoothPoint (W_smooth W)) : pullbackDiv (W := W.toAffine) f hker Q w = if f w.toAffinePoint = Q then (1 : ℤ) else 0 := by - letI : Fintype {P : W.toAffine.Point // f P = Q} := + let : Fintype {P : W.toAffine.Point // f P = Q} := @Fintype.ofFinite _ (fiber_finite f hker Q) rw [pullbackDiv, Finset.sum_apply'] simp only [Finsupp.single_apply] @@ -314,19 +322,19 @@ theorem pullbackDiv_apply (f : W.toAffine.Point →+ W.toAffine.Point) rw [hPeq, WeierstrassCurve.Affine.Point.toAffinePoint_toProjectiveSmoothPoint] by_cases hQ : f w.toAffinePoint = Q - · rw [if_pos hQ, Finset.sum_eq_single (⟨w.toAffinePoint, hQ⟩ : + · rw [ite_eq_left hQ, Finset.sum_eq_single (⟨w.toAffinePoint, hQ⟩ : {P : W.toAffine.Point // f P = Q})] - · rw [if_pos ((hkey w.toAffinePoint).mpr rfl)] + · rw [ite_eq_left ((hkey w.toAffinePoint).mpr rfl)] · rintro ⟨P, hP⟩ _ hne - rw [if_neg] + rw [ite_eq_right] intro hPw exact hne (Subtype.ext ((hkey P).mp hPw)) · intro h exact absurd (Finset.mem_univ _) h - · rw [if_neg hQ] + · rw [ite_eq_right hQ] apply Finset.sum_eq_zero rintro ⟨P, hP⟩ _ - rw [if_neg] + rw [ite_eq_right] intro hPw exact hQ (by rw [← (hkey P).mp hPw] @@ -366,6 +374,7 @@ theorem equivMapDomain_placeTranslate_pullbackDiv (S : (W_smooth W).toAffine.Poi rw [Finsupp.equivMapDomain_symm_apply] exact pullbackDiv_placeTranslate_apply_general W S f hker Q w +omit [WeierstrassCurve.IsElliptic W.toAffine] in /-- `equivMapDomain` fixes a divisor invariant under `placeTranslate W S`. -/ theorem equivMapDomain_placeTranslate_symm_eq_self (S : (W_smooth W).toAffine.Point) diff --git a/projects/HasseWeil/HasseWeil/HasseBound/WeilPairing/Fiber.lean b/projects/HasseWeil/HasseWeil/HasseBound/WeilPairing/Fiber.lean index 2d0e9d56e..5a54b5281 100644 --- a/projects/HasseWeil/HasseWeil/HasseBound/WeilPairing/Fiber.lean +++ b/projects/HasseWeil/HasseWeil/HasseBound/WeilPairing/Fiber.lean @@ -6,20 +6,6 @@ Authors: Chris Birkbeck import Mathlib.AlgebraicGeometry.EllipticCurve.Affine.Point import Mathlib.Tactic -/-! -# Route 2A — fibres of point-map endomorphisms as kernel cosets (keystone foundation) - -The multiplicity-free geometric divisor pullback `β*((Q)) = Σ_{βP=Q} (P)` (separable case, used by -both the Weil-pairing construction and the separable adjoint, Silverman III.8) is summed over the -**fibre** `{P : βP = Q}`. This file ships the group-theoretic foundation: a fibre of a point-map -endomorphism is a coset of the kernel, hence finite when the kernel is finite. - -This is the point-map (`AddMonoidHom`) form of the project's `EC.Isogeny` fibre machinery — the -level at which the Weil pairing and the pullback divisor operate. - -Reference: Silverman, *The Arithmetic of Elliptic Curves*, III.4 (fibres of an isogeny are cosets of -the kernel). --/ namespace HasseWeil.WeilPairing @@ -29,8 +15,7 @@ open WeierstrassCurve variable {F : Type*} [Field F] [DecidableEq F] {W : WeierstrassCurve.Affine F} [W.IsElliptic] -/-- **Fibre as a kernel coset.** Given `f P₀ = Q`, the fibre `{P : f P = Q}` is in canonical -bijection with `ker f` via `P ↦ P − P₀`. -/ + def fiberEquivKer (f : W.Point →+ W.Point) {P₀ Q : W.Point} (hP₀ : f P₀ = Q) : {P : W.Point // f P = Q} ≃ f.ker where toFun := fun ⟨P, hP⟩ => ⟨P - P₀, by rw [AddMonoidHom.mem_ker, map_sub, hP, hP₀, sub_self]⟩ @@ -38,16 +23,15 @@ def fiberEquivKer (f : W.Point →+ W.Point) {P₀ Q : W.Point} (hP₀ : f P₀ left_inv := fun ⟨P, hP⟩ => by simp right_inv := fun ⟨T, hT⟩ => by simp -/-- **Fibres are finite when the kernel is.** -/ + theorem fiber_finite (f : W.Point →+ W.Point) (h : Finite f.ker) (Q : W.Point) : Finite {P : W.Point // f P = Q} := by rcases Classical.em (∃ P₀, f P₀ = Q) with ⟨P₀, hP₀⟩ | hempty · exact Finite.of_equiv _ (fiberEquivKer f hP₀).symm - · haveI : IsEmpty {P : W.Point // f P = Q} := ⟨fun ⟨P, hP⟩ => hempty ⟨P, hP⟩⟩ + · have : IsEmpty {P : W.Point // f P = Q} := ⟨fun ⟨P, hP⟩ => hempty ⟨P, hP⟩⟩ infer_instance -/-- **Fibre cardinality = kernel cardinality** (for a nonempty fibre). The constant fibre size that -makes `deg = #ker` for a separable isogeny (Silverman III.4.10c). -/ + theorem fiber_card_eq_ker_card (f : W.Point →+ W.Point) {P₀ Q : W.Point} (hP₀ : f P₀ = Q) : Nat.card {P : W.Point // f P = Q} = Nat.card f.ker := Nat.card_eq_of_bijective _ (fiberEquivKer f hP₀).bijective diff --git a/projects/HasseWeil/HasseWeil/HasseBound/WeilPairing/FrobMatrixData.lean b/projects/HasseWeil/HasseWeil/HasseBound/WeilPairing/FrobMatrixData.lean index 30cf18d00..7da5769f2 100644 --- a/projects/HasseWeil/HasseWeil/HasseBound/WeilPairing/FrobMatrixData.lean +++ b/projects/HasseWeil/HasseWeil/HasseBound/WeilPairing/FrobMatrixData.lean @@ -9,7 +9,7 @@ import HasseWeil.Isogeny.BaseChange.Basic /-! # Frobenius matrix data over the algebraic closure -This file supplies the per-`ℓ` Frobenius-matrix determinant data used by +The per-`ℓ` Frobenius-matrix determinant data give the hypotheses of `hasse_bound_via_weil_pairing`, after base-changing `E/K` to `AlgebraicClosure K`. ## Main definitions @@ -29,10 +29,6 @@ This file supplies the per-`ℓ` Frobenius-matrix determinant data used by * Silverman, *The Arithmetic of Elliptic Curves*, III.8.1 (the pairing + Galois equivariance), III.8.6 (`det φ_ℓ = deg φ`), V.1.1 / V.2.3.1 (the Hasse bound assembly). -## Name-clash note - -`pullbackDivisor_kappaDivisor` is declared in both `HfactLemma.lean` and `PairingNondeg.lean`. -This file imports neither directly, so no clash arises and no rename is needed. -/ open WeierstrassCurve Real Matrix @@ -155,7 +151,7 @@ theorem frob_det_residual_baseChange (1 - M).det = ((Fintype.card K + 1 - isogTrace (frobeniusIsog W) (isogOneSub_negFrobenius W hq) : ℤ) : ZMod ℓ) ∧ ((r' : ZMod ℓ) • M - (s' : ZMod ℓ) • 1).det = (deg r' s' : ZMod ℓ) := by - letI : Fact ℓ.Prime := ⟨hℓp⟩ + let : Fact ℓ.Prime := ⟨hℓp⟩ obtain ⟨hπ, h1, hrs⟩ := hsc have hDd : ((deg r' s').toNat : ℤ) = deg r' s' := Int.toNat_of_nonneg (hdeg_nonneg r' s') exact frob_det_residual_of_weil_scaling (W.baseChange L) ℓ hℓF @@ -193,7 +189,7 @@ theorem hres_of_baseChange_scalings (1 - M).det = ((Fintype.card K + 1 - isogTrace (frobeniusIsog W) (isogOneSub_negFrobenius W hq) : ℤ) : ZMod ℓ) ∧ ((r' : ZMod ℓ) • M - (s' : ZMod ℓ) • 1).det = (deg r' s' : ZMod ℓ) := by - haveI : CharP L p := charP_of_injective_algebraMap (FaithfulSMul.algebraMap_injective K L) p + have : CharP L p := charP_of_injective_algebraMap (FaithfulSMul.algebraMap_injective K L) p obtain ⟨hFrob, hOneSub, hPencil⟩ := hscale intro r' s' hps ℓ hℓp hℓne have hℓF : (ℓ : L) ≠ 0 := @@ -218,7 +214,7 @@ theorem hres_of_baseChange_scalings_coprime (1 - M).det = ((Fintype.card K + 1 - isogTrace (frobeniusIsog W) (isogOneSub_negFrobenius W hq) : ℤ) : ZMod ℓ) ∧ ((r' : ZMod ℓ) • M - (s' : ZMod ℓ) • 1).det = (deg r' s' : ZMod ℓ) := by - haveI : CharP L p := charP_of_injective_algebraMap (FaithfulSMul.algebraMap_injective K L) p + have : CharP L p := charP_of_injective_algebraMap (FaithfulSMul.algebraMap_injective K L) p obtain ⟨hFrob, hOneSub, hPencil⟩ := hscale intro r' s' hpr hps ℓ hℓp hℓne have hℓF : (ℓ : L) ≠ 0 := @@ -238,16 +234,16 @@ theorem hasse_bound_unconditional_of_baseChange_scalings |(↑(pointCount W.toAffine) - ↑(Fintype.card K) - 1 : ℝ)| ≤ 2 * Real.sqrt (Fintype.card K : ℝ) := by obtain ⟨p, hCharP, ⟨n, _hn⟩, hp_prime, hcard⟩ := FiniteField.card' K - haveI : Fact p.Prime := ⟨hp_prime⟩ - haveI : CharP K p := hCharP - haveI : Fact (Fintype.card K = p ^ (n : ℕ)) := ⟨hcard⟩ + have : Fact p.Prime := ⟨hp_prime⟩ + have : CharP K p := hCharP + have : Fact (Fintype.card K = p ^ (n : ℕ)) := ⟨hcard⟩ have hpchar : ringChar K = p := by rw [ringChar.eq_iff]; exact hCharP - haveI : ExpChar (AlgebraicClosure K) p := + have : ExpChar (AlgebraicClosure K) p := haveI : CharP (AlgebraicClosure K) p := charP_of_injective_algebraMap (FaithfulSMul.algebraMap_injective K (AlgebraicClosure K)) p ExpChar.prime hp_prime - haveI : (W.baseChange (AlgebraicClosure K)).toAffine.IsElliptic := inferInstance + have : (W.baseChange (AlgebraicClosure K)).toAffine.IsElliptic := inferInstance exact hasse_bound_via_weil_pairing W hq deg hdeg_nonneg (hres_of_baseChange_scalings W p (n : ℕ) (AlgebraicClosure K) hq deg hdeg_nonneg hpchar (hscale p (n : ℕ) ⟨hp_prime⟩ hCharP ⟨hcard⟩)) @@ -261,16 +257,16 @@ theorem hasse_bound_unconditional_of_baseChange_scalings_coprime |(↑(pointCount W.toAffine) - ↑(Fintype.card K) - 1 : ℝ)| ≤ 2 * Real.sqrt (Fintype.card K : ℝ) := by obtain ⟨p, hCharP, ⟨n, _hn⟩, hp_prime, hcard⟩ := FiniteField.card' K - haveI : Fact p.Prime := ⟨hp_prime⟩ - haveI : CharP K p := hCharP - haveI : Fact (Fintype.card K = p ^ (n : ℕ)) := ⟨hcard⟩ + have : Fact p.Prime := ⟨hp_prime⟩ + have : CharP K p := hCharP + have : Fact (Fintype.card K = p ^ (n : ℕ)) := ⟨hcard⟩ have hpchar : ringChar K = p := by rw [ringChar.eq_iff]; exact hCharP - haveI : ExpChar (AlgebraicClosure K) p := + have : ExpChar (AlgebraicClosure K) p := haveI : CharP (AlgebraicClosure K) p := charP_of_injective_algebraMap (FaithfulSMul.algebraMap_injective K (AlgebraicClosure K)) p ExpChar.prime hp_prime - haveI : (W.baseChange (AlgebraicClosure K)).toAffine.IsElliptic := inferInstance + have : (W.baseChange (AlgebraicClosure K)).toAffine.IsElliptic := inferInstance exact hasse_bound_via_weil_pairing_both W hq deg hdeg_nonneg (hres_of_baseChange_scalings_coprime W p (n : ℕ) (AlgebraicClosure K) hq deg hdeg_nonneg hpchar diff --git a/projects/HasseWeil/HasseWeil/HasseBound/WeilPairing/FrobeniusDivisorGalois.lean b/projects/HasseWeil/HasseWeil/HasseBound/WeilPairing/FrobeniusDivisorGalois.lean index a5cecf0c5..2cc3630be 100644 --- a/projects/HasseWeil/HasseWeil/HasseBound/WeilPairing/FrobeniusDivisorGalois.lean +++ b/projects/HasseWeil/HasseWeil/HasseBound/WeilPairing/FrobeniusDivisorGalois.lean @@ -14,7 +14,7 @@ import HasseWeil.Foundation.Curves.Valuation.NoFinitePolesBridge /-! # Divisor Galois descent for the arithmetic Frobenius `σ` of `K̄(E)` -This file applies the abstract divisor-Galois-descent engine (`DivisorGalois.lean`) to the concrete +Divisor Galois descent for the concrete arithmetic Frobenius `σ = frobeniusFunctionFieldEquiv W` of the function field `K̄(E)`, proving the affine order transport @@ -112,19 +112,19 @@ theorem pointValuation_frobeniusFunctionFieldEquiv (frobeniusFunctionFieldEquiv W g) = (⟨(W.baseChange (AlgebraicClosure K)).toAffine⟩ : SmoothPlaneCurve (AlgebraicClosure K)).pointValuation Q g := by - haveI hMell : ((W.baseChange (AlgebraicClosure K)).map + have hMell : ((W.baseChange (AlgebraicClosure K)).map (coeffFrobEquiv (K := K) : AlgebraicClosure K →+* AlgebraicClosure K)).toAffine.IsElliptic := by rw [map_coeffFrobEquiv_eq W]; infer_instance - haveI hMic : IsIntegrallyClosed (⟨((W.baseChange (AlgebraicClosure K)).map + have hMic : IsIntegrallyClosed (⟨((W.baseChange (AlgebraicClosure K)).map (coeffFrobEquiv (K := K) : AlgebraicClosure K →+* AlgebraicClosure K)).toAffine⟩ : SmoothPlaneCurve (AlgebraicClosure K)).CoordinateRing := by rw [map_coeffFrobEquiv_eq W]; infer_instance - haveI hMdd : IsDedekindDomain (⟨((W.baseChange (AlgebraicClosure K)).map + have hMdd : IsDedekindDomain (⟨((W.baseChange (AlgebraicClosure K)).map (coeffFrobEquiv (K := K) : AlgebraicClosure K →+* AlgebraicClosure K)).toAffine⟩ : SmoothPlaneCurve (AlgebraicClosure K)).CoordinateRing := SmoothPlaneCurve.isDedekindDomain_coordinateRing _ - haveI hEdd : IsDedekindDomain (⟨(W.baseChange (AlgebraicClosure K)).toAffine⟩ : + have hEdd : IsDedekindDomain (⟨(W.baseChange (AlgebraicClosure K)).toAffine⟩ : SmoothPlaneCurve (AlgebraicClosure K)).CoordinateRing := SmoothPlaneCurve.isDedekindDomain_coordinateRing _ rw [frobeniusFunctionFieldEquiv, RingEquiv.trans_apply, ffFrobCast, @@ -144,9 +144,8 @@ theorem pointValuation_frobeniusFunctionFieldEquiv (by rw [pointOnMapped_x, hPx]) (by rw [pointOnMapped_y, hPy])).symm) g /- The order-at-infinity transport `ordAtInfty (σ g) = ordAtInfty g`: the arithmetic Frobenius `σ` -fixes the place at infinity. Mirrors `OrdAtInftyBaseChange.lean` (the base-change `ord_∞` -transport), replacing the injective `algebraMap K L` by the coefficient Frobenius `coeffFrobEquiv` -(also injective). -/ +fixes the place at infinity. Injectivity of the coefficient Frobenius identifies the +orders of the corresponding norm polynomials. -/ /-- `crFrobEquiv` (= `CoordinateRing.map e`) on the `K̄[X]`-basis decomposition `p • 1 + q • y`: it sends the coefficients `p, q` through `Polynomial.map e` and fixes the basis `{1, y}`. @@ -305,7 +304,7 @@ omit [DecidableEq K] [W.toAffine.IsElliptic] ((FiniteField.frobeniusAlgEquivOfAlgebraic K (AlgebraicClosure K)).symm P.y) = P.y rw [AlgEquiv.coe_ringEquiv, AlgEquiv.apply_symm_apply] -omit [W.toAffine.IsElliptic] [(W.baseChange (AlgebraicClosure K)).toAffine.IsElliptic] in +omit [W.toAffine.IsElliptic] [(W.baseChange (AlgebraicClosure K)).toAffine.IsElliptic] [DecidableEq K] in /-- **`π̄` recovers `P` from its inverse-Frobenius point** (at the affine-point level): `geomFrobeniusPointFun (geomFrobSmoothPointInv P).toAffinePoint = P.toAffinePoint`. -/ theorem geomFrobeniusPointFun_geomFrobSmoothPointInv @@ -341,6 +340,7 @@ open HasseWeil omit [W.toAffine.IsElliptic] in set_option backward.isDefEq.respectTransparency false in +omit [DecidableEq K] in /-- **The fibre-divisor place comparison** (the combinatorial heart of σ-naturality). The coefficient of the fibre divisor `[ℓ]^*(π̄T)` at an affine place `P` equals the coefficient of `[ℓ]^*(T)` at the inverse-Frobenius place `geomFrobSmoothPointInv P`, because @@ -382,6 +382,7 @@ theorem pullbackDiv_geomFrobInv_eq (ℓ : ℤ) (hℓ : (ℓ : AlgebraicClosure K omit [W.toAffine.IsElliptic] in set_option backward.isDefEq.respectTransparency false in +omit [DecidableEq K] in /-- **The fibre-divisor place comparison at infinity**: `pullbackDiv [ℓ] (π̄T) ∞ = pullbackDiv [ℓ] T ∞` (both equal `if 0 = Q`, and `0 = π̄T ⟺ 0 = T` since π̄ is injective with `π̄ 0 = 0`). -/ @@ -500,7 +501,7 @@ theorem frobeniusFunctionFieldEquiv_weilFunction_eq_smul (W.baseChange (AlgebraicClosure K)).toAffine.FunctionField c * weilFunction (W.baseChange (AlgebraicClosure K)) ℓ hℓ (HasseWeil.geomFrobeniusPoint W T) hπT := by - haveI hEdd : IsDedekindDomain (⟨(W.baseChange (AlgebraicClosure K)).toAffine⟩ : + have hEdd : IsDedekindDomain (⟨(W.baseChange (AlgebraicClosure K)).toAffine⟩ : SmoothPlaneCurve (AlgebraicClosure K)).CoordinateRing := SmoothPlaneCurve.isDedekindDomain_coordinateRing _ set gT := weilFunction (W.baseChange (AlgebraicClosure K)) ℓ hℓ T hT with hgT diff --git a/projects/HasseWeil/HasseWeil/HasseBound/WeilPairing/FrobeniusGenericCovariance.lean b/projects/HasseWeil/HasseWeil/HasseBound/WeilPairing/FrobeniusGenericCovariance.lean index 2e94ad5e465c6dada76ce68439b6c5d25480b4c3..86c212da5910eadae69fd7f1828430aaa2ee4c24 100644 GIT binary patch delta 1209 zcmb7E&1(}u6eq1;EL8eQOKs)RT1+t6QYk70LHr~Zv6$RS+nwxAvIDy_o0-|Py%>dF zyeWJ0YPT-f7?!fp8C)21U82(&hoHYY=sCDh_CIqQtbq*&?JGr&}397Lo?F;Xzx3VXPT% zAZ8&w#t9CK#4eQzcA54;OTtw^G!xu3mb5M;(qS#CEa&iGrvmvp@`jBaq*#EvkbS`o zWP`}^hp(VgaBRzZLF?E7Wm$s?3y^o1ER2;#R#Qsla@oFP-|V~`d!Ng71$sI$+dfvu zw#wQlBxximlGoJhYImkgP@^u1Q8crfaVw?VAS97>EOx&OTGdxL(7uQpKFT}~oZ=uZ zGl5CTd?hAAz zjgVoWfJ9NS4+TR}k&s%_80m`;9~t>fg(eOed6kSVLA5xcjq!!ReO<3Q8 z&1B{JVsbP-m3$~(8m{^@*|;*>J{>VKkftt>GXi%iW>v&utUKuiFb`d1df#&LBxul@ zB+p0$dxh;L<_Ig7`=$KecC+B5=vS_OI@e3bg~d7Bs>j?l;Vh-rb;VIOJm-VFac~MC z`F?G-GrIKd;>_Rt8Ml^8C3up&9-2<SBl89v}V#6%nlU diff --git a/projects/HasseWeil/HasseWeil/HasseBound/WeilPairing/HfactLemma.lean b/projects/HasseWeil/HasseWeil/HasseBound/WeilPairing/HfactLemma.lean index 66737344a..5d4f80a0a 100644 --- a/projects/HasseWeil/HasseWeil/HasseBound/WeilPairing/HfactLemma.lean +++ b/projects/HasseWeil/HasseWeil/HasseBound/WeilPairing/HfactLemma.lean @@ -9,57 +9,21 @@ import HasseWeil.HasseBound.WeilPairing.Constancy import HasseWeil.Pic0.PicDual /-! -# The separable divisor factorisation `hfact` (Silverman III.8.2 / III.6.1b) +# Divisor factorization for the separable Weil-pairing adjoint -This file discharges the **divisor factorisation hypothesis** `hfact` of -`HasseWeil.WeilPairing.weilPairing_adjoint_core` (the separable adjoint, Silverman III.8.2): for a -separable isogeny `φ : E → E`, the Weil functions `g_T = weilFunction W ℓ T`, `g_U = weilFunction -W ℓ U` (with `U = picDual φ T = φ̂ T`), and an appropriate `k ∈ K(E)`, -``` -φ^* g_T = c · (g_U · ([ℓ]^* k)) for some c ∈ Fˣ. -``` +Let `g_T` and `g_U` be Weil functions, and suppose the projective-divisor class +identity `φ*((T) − (O)) ∼ (U) − (O)` holds. Divisor pullback functoriality and +commutation with multiplication by `ℓ` then give +`div(φ*g_T) = div(g_U · ([ℓ]*k))` for a suitable function `k`. +Functions with the same projective divisor differ by a nonzero base-field +constant, so `φ*g_T = c · g_U · ([ℓ]*k)`. -## The mathematics (Silverman III.8.2 proof, divisor language) - -Write `div g_T = [ℓ]^*((T) − (O))` (`weilFunction_divisor`, the fibre-difference divisor). Then - -* `div(φ^* g_T) = φ^*(div g_T) = φ^*([ℓ]^*((T) − (O)))` — the divisor-pullback functoriality - `div(φ^* h) = φ^*(div h)` for the separable `φ` (`DivisorPullback.ProjOrdTransport φ`, the - analogue of `projOrdTransport_mulByInt` for `[ℓ]`); -* `φ^* ∘ [ℓ]^* = [ℓ]^* ∘ φ^*` on divisors (the function-field shadow of `[ℓ] ∘ φ = φ ∘ [ℓ]`, which - holds for *any* additive point maps: `[ℓ]` commutes with every homomorphism) — proven here as - `pullbackDivisor_comm`; -* the **`picDual` divisor-class identity** (Silverman III.6.1b, the genuine separability content) - `φ^*((T) − (O)) ∼ (U) − (O)` with `U = φ̂ T`, i.e. `φ^*(kappaDivisor T) − kappaDivisor U` is - principal `= div k₀` — isolated below as the single minimal hypothesis `PicDualDivisorClass φ` - (a projective-divisor avatar of `PicDual.Naturality`, see the residual note). - -Combining: `div(φ^* g_T) = [ℓ]^*(φ^*(kappaDivisor T)) = [ℓ]^*(kappaDivisor U + div k₀) = div(g_U) + -div([ℓ]^* k₀) = div(g_U · [ℓ]^* k₀)`. Two functions with the same projective divisor differ by a -nonzero constant `c ∈ Fˣ` (`Constancy.const_unit_of_projectiveDivisorOf_eq_zero`), which is exactly -`hfact`. - -## The isolated minimal residual `PicDualDivisorClass` - -The decisive ingredient is the divisor-class identity `φ^*((T) − (O)) ∼ (φ̂ T) − (O)` *expressed in -the projective-divisor model* `ProjectiveDivisor` (where `weilFunction_divisor`/`hfact` speak), -namely `(⟨W⟩).ProjIsPrincipal (pullbackDivisor φ (kappaDivisor T) − kappaDivisor (φ̂ T))`. - -This is the **honest frontier**: `picDual = κ⁻¹ ∘ classMap ∘ κ` is defined in the *affine ideal -class group* model `ClassGroup R` (`PicDual.lean`), where `classMap = ClassGroup.map` is the ideal -extension `𝔪 ↦ 𝔪·𝒪` — Silverman's divisor pullback `φ^*`. But `hfact` lives in the *projective -divisor* model `PicProj₀`/`projectiveDivisorOf`. The two `Pic⁰(E)` models are connected by `κ` -(the canonical `E ≅ Pic⁰(E)` of III.3.4), but the repo carries no bridge `ClassGroup.map ↔ -pullbackDivisor`; building it is exactly the `comap`-vs-`relNorm` (residue-degree) bookkeeping that -`PicDual.Naturality` documents as carried per-isogeny data. We therefore isolate the divisor-class -identity as the one minimal hypothesis `PicDualDivisorClass φ ch hinj hfin`, dischargeable per -isogeny just as `ProjOrdTransport`/`Naturality` are throughout the project, and prove the *entire* -`hfact` factorisation on top of it. - -## References - -* Silverman, *The Arithmetic of Elliptic Curves*, III.6.1 (the dual isogeny, `φ̂ = κ⁻¹ ∘ φ^* ∘ κ`), - III.8.2 (Prop 8.2, the separable adjoint via the multiplicity-free pullback). +The projective-divisor class identity is an explicit hypothesis. The ideal-class +definition of `picDual` uses extension of ideals in the affine coordinate ring; +identifying it with projective divisor pullback requires compatibility of those +two models of `Pic⁰`. The factorization proofs retain this compatibility input. + +References: Silverman, *The Arithmetic of Elliptic Curves*, III.6.1 and III.8.2. -/ open WeierstrassCurve HasseWeil.Curves @@ -68,8 +32,6 @@ namespace HasseWeil.WeilPairing open HasseWeil HasseWeil.WeilPairing.DivisorPullback -set_option linter.unusedSectionVars false - variable {F : Type*} [Field F] [DecidableEq F] variable (W : WeierstrassCurve F) [W.toAffine.IsElliptic] [IsIntegrallyClosed (⟨W.toAffine⟩ : SmoothPlaneCurve F).CoordinateRing] @@ -78,13 +40,14 @@ local notation "KE" => W.toAffine.FunctionField /-! ### Commutation of fibre-pullback divisors `φ^* ∘ ψ^* = (ψ ∘ φ)^*` -The fibre-pullback `pullbackDivisor f` (`DivisorPullback.lean`) transports a coefficient along the +The fibre-pullback `pullbackDivisor f` transports a coefficient along the point map `f`: `(pullbackDivisor f D) w = D (f w)` (`pullbackDivisor_apply`). Hence two such pullbacks compose by composing the point maps in the *opposite* order: `pullbackDivisor f (pullbackDivisor g D) w = D (g (f w))`. We only need the special case where the two maps **commute** as point endomorphisms (`g ∘ f = f ∘ g`), which is automatic when one of them is `[ℓ]` (multiplication-by-`ℓ` commutes with every additive hom). -/ +omit [IsIntegrallyClosed (⟨W.toAffine⟩ : SmoothPlaneCurve F).CoordinateRing] in /-- **Fibre-pullback divisors of commuting point maps commute.** If `f g : E.Point →+ E.Point` commute (`g.comp f = f.comp g` — automatic when one is `[ℓ]`), then their fibre-pullback divisor operators commute: `pullbackDivisor f (pullbackDivisor g D) = pullbackDivisor g (pullbackDivisor f @@ -110,11 +73,10 @@ theorem pullbackDivisor_comm {f g : W.toAffine.Point →+ W.toAffine.Point} `pullbackDivisor [ℓ] (kappaDivisor T)` of the Abel–Jacobi divisor `(T) − (O) = kappaDivisor T` (`pullbackDivisor` distributes over the difference of the two `single`s; `∞.toAffinePoint = O`). -/ +omit [IsIntegrallyClosed (⟨W.toAffine⟩ : SmoothPlaneCurve F).CoordinateRing] in /-- **The fibre-pullback of `(T) − (O)` is `[ℓ]^*(T) − [ℓ]^*(O)`** (= `div g_T`). The fibre-pullback `pullbackDivisor [ℓ]` of `kappaDivisor T = (T) − (O)` equals `pullbackDiv [ℓ] T − pullbackDiv [ℓ] -O`. (Local copy of `PairingNondeg.pullbackDivisor_kappaDivisor`, kept here to avoid the import; -named `…_local` to avoid the cross-file name clash with the `PairingNondeg` copy, so that downstream -files importing both `HfactLemma` and `DetDeg`/`PairingNondeg` — e.g. `SeparableScaling` — compile.) +O`. -/ theorem pullbackDivisor_kappaDivisor_local (ℓ : ℤ) [hker : Finite (mulByInt W.toAffine ℓ).toAddMonoidHom.ker] (T : W.toAffine.Point) : @@ -135,7 +97,7 @@ theorem weilFunction_divisor_eq_pullbackDivisor_kappaDivisor [IsAlgClosed F] (⟨W.toAffine⟩ : SmoothPlaneCurve F).projectiveDivisorOf (weilFunction W ℓ hℓ T hT) = pullbackDivisor (W := W.toAffine) (mulByInt W.toAffine ℓ).toAddMonoidHom (mulByInt_ker_finite W ℓ hℓ) (Curves.kappaDivisor W.toAffine T) := by - haveI : Finite (mulByInt W.toAffine ℓ).toAddMonoidHom.ker := mulByInt_ker_finite W ℓ hℓ + have : Finite (mulByInt W.toAffine ℓ).toAddMonoidHom.ker := mulByInt_ker_finite W ℓ hℓ rw [show (⟨W.toAffine⟩ : SmoothPlaneCurve F).projectiveDivisorOf (weilFunction W ℓ hℓ T hT) = (W_smooth W).projectiveDivisorOf (weilFunction W ℓ hℓ T hT) from rfl, weilFunction_divisor W ℓ hℓ T hT, pullbackDivisor_kappaDivisor_local W ℓ T] @@ -146,7 +108,7 @@ theorem weilFunction_divisor_eq_pullbackDivisor_kappaDivisor [IsAlgClosed F] fibre-pullback `φ^*((T) − (O))` is *linearly equivalent* to `(φ̂ T) − (O)` (with `φ̂ = picDual φ`), i.e. their difference `pullbackDivisor φ (kappaDivisor T) − kappaDivisor (φ̂ T)` is principal. This is the one ingredient that cannot be assembled from the project's *projective*-model API: `picDual` -is built from the *affine* ideal-class-group divisor pullback `classMap` (`PicDual.lean`), and the +is built from the *affine* ideal-class-group divisor pullback `classMap`, and the ClassGroup↔ProjectiveDivisor bridge is the carried `PicDual.Naturality` data (the `comap`-vs- `relNorm`/residue-degree bookkeeping). Everything else in `hfact` is proven on top of this. -/ @@ -209,7 +171,7 @@ theorem hfact_projectiveDivisorOf_eq (ℓ : ℤ) (hℓ : (ℓ : F) ≠ 0) (φ.pullback (weilFunction W ℓ hℓ T hT)) = (⟨W.toAffine⟩ : SmoothPlaneCurve F).projectiveDivisorOf (weilFunction W ℓ hℓ U hU * (mulByInt W.toAffine ℓ).pullback k₀) := by - haveI hker : Finite (mulByInt W.toAffine ℓ).toAddMonoidHom.ker := mulByInt_ker_finite W ℓ hℓ + have hker : Finite (mulByInt W.toAffine ℓ).toAddMonoidHom.ker := mulByInt_ker_finite W ℓ hℓ have hcoreℓ : ProjOrdTransport (mulByInt W.toAffine ℓ) := projOrdTransport_mulByInt ℓ hℓ set κT := Curves.kappaDivisor W.toAffine T set κU := Curves.kappaDivisor W.toAffine U with hκU @@ -274,7 +236,7 @@ theorem hfact_of_picDualDivisorClass (ℓ : ℤ) (hℓ : (ℓ : F) ≠ 0) (weilFunction W ℓ hℓ ((φ.picDual ch hinj hfin) T) (by rw [← map_zsmul, hT, map_zero]) * (mulByInt W.toAffine ℓ).pullback k) := by - haveI : IsDedekindDomain (⟨W.toAffine⟩ : SmoothPlaneCurve F).CoordinateRing := inferInstance + have : IsDedekindDomain (⟨W.toAffine⟩ : SmoothPlaneCurve F).CoordinateRing := inferInstance have hU : ℓ • (φ.picDual ch hinj hfin) T = 0 := by rw [← map_zsmul, hT, map_zero] -- The Abel–Jacobi function `k₀` of the `picDual` divisor-class identity, and its divisor. obtain ⟨k₀, hk₀_ne, hk₀_div⟩ := hpd T diff --git a/projects/HasseWeil/HasseWeil/HasseBound/WeilPairing/OneSubDualDivisor.lean b/projects/HasseWeil/HasseWeil/HasseBound/WeilPairing/OneSubDualDivisor.lean index d3000b32d30e10c2b46fc50f6a717384d41259f1..4a6db4566facbd1bd32e68b7dfa22044d93fa66b 100644 GIT binary patch delta 1573 zcmah}&5ImG6lXU0vBl!9n;17SA1|6U)7smxCJt^e=w(9&1Xr^dNKEXS?waW`-BoQ> z^@KUdBqRm}5wvpfAd89@5g}wedGL@wAREDpm!Ny|;vXOcebv3QnZywRe)+a`{kxid?Ab^BxS%P>Hc-$kr;4^x23*Sy6FowXOEvnzc7w*#K2Q-uuH?Hc zGQ7(`s+cKa6csv`%J^U}9ouQQ2anr3hxWW(?#_zT@I2*AlbCfBV;WjL2%kC66s%tj z185pB2~(^s6<#mmBEl_H028syq{{=R-d$ZEo%&0C5s=pq9iGhw*tK?eb82-h#y*RP&? zu8zO3;=#s;pF#a~&-36IxSsJfzP$J~tb{&jNy1w{;GWMB3T`;FiRvtN==eii(4v|_ zlu*$@y4r6*xLDR)zZim%4kt}JtfeTAAWEe!6!Y;M*HEgXSV|3-!Y8g)Mc`J;r5yIt z<+(o3^0Zf87fGcUiXmbyI&g~dbRnl)xd$E56#s*gfJh2$RDm)|0fk27BeKT4i#||J z29#TJVIZTqh6~&zvM}h2NTT#yP{S6mwtabWcIr*mMim9BM~I!BJ_3h>BR({n&7cu1 z)?40i{X(7M8Y|nI(?8W#2OrOTGGVX1c+h^Z{hFN)o)|3c_wo`{=2+UkI=^FoUZg3~8l86p=6HR?b2Rd>>A`RQjY+J#*0?e;$d~?@oU3pH8f=7p zbh!Qd#BTfO>HYo9qZQ>2GdCI`X1Ub7BxooDL6W-Yn3C#JpqLt3Rvt?=IIktWT%vl8 zV~Q3Z;kg_iFbB5ghoJt|Y&l1wG9~%iN0Fc0T}|H@9}xTJnSC=SdD>+vLr1+8ECz?Y z!R+yq6T8N>1+Hm(_rzSktz=eVsT406AoY8t#>?m70NxKw7x~bE|1#-=fbZqSUL2wE zfJ=WM=xuJ)*BVc~f~t`JQpHJyBR$08{88Ei`P&SQaPZA*zfK)+O^+pH7y^!zoe#i& z$@$kiYL`wo`_4k>xXcB`#ubY>^CjeAHBtAOs0tIO)i@jZa3SFswqb%~y~EzaC simp only [hax, hay] -/-- **The base-changed `(1 − π)_{K̄}` point map is `id − geomFrobenius`** (= `oneSubGeomFrobHom`), -over `L = AlgebraicClosure K`. Combines the constructional `toAddMonoidHom = id − π̄` -(`oneSubFrobeniusIsogBaseChange_toAddMonoidHom`) with the linchpin `π̄ = geomFrobeniusPoint`. -/ +omit [DecidableEq K] in +/-- The base-changed `1 − π` point map is the difference of the identity and geometric +Frobenius over the algebraic closure. -/ theorem oneSubFrobeniusIsogBaseChange_toAddMonoidHom_eq_oneSubGeomFrobHom [(W.baseChange (AlgebraicClosure K)).toAffine.IsElliptic] (pullback_L : (W.baseChange (AlgebraicClosure K)).toAffine.FunctionField →ₐ[AlgebraicClosure K] @@ -260,13 +205,9 @@ variable (p r : ℕ) [Fact p.Prime] [CharP K p] [Fact (Fintype.card K = p ^ r)] noncomputable local instance instDecEqAC' : DecidableEq (AlgebraicClosure K) := Classical.decEq _ -/-- **Witness 1 — `finiteKer`** (PROVED, axiom-clean): the kernel of `(1 − π)_{K̄}` is finite. - -Via the linchpin, `ker(id − π̄) = ker(oneSubGeomFrobHom)`, whose underlying set is the -geometric-Frobenius fixed locus `= range(includePointBC)` (Step S2/S3 of -`FrobeniusFixedPoint.lean`), -i.e. the image of the **finite** point set `E(𝔽_q) = W.toAffine.Point` under the base-change -inclusion — hence finite. -/ +omit [DecidableEq K] in +/-- The kernel of base-changed `1 − π` is finite: it is the geometric-Frobenius fixed locus, +which is the image of the finite rational point set under base change. -/ theorem oneSubFrobeniusIsogBaseChange_finiteKer [(W.baseChange (AlgebraicClosure K)).toAffine.IsElliptic] (pullback_L : (W.baseChange (AlgebraicClosure K)).toAffine.FunctionField →ₐ[AlgebraicClosure K] @@ -281,9 +222,9 @@ theorem oneSubFrobeniusIsogBaseChange_finiteKer rw [← hset] at hfin exact hfin.to_subtype -/-- **`#ker(1 − π)_{K̄} = pointCount W`** (PROVED, axiom-clean). Via the linchpin the kernel is the -geometric-Frobenius fixed locus, whose cardinality is the `𝔽_q`-rational point count -(`ncard_ker_oneSubGeomFrobHom_eq_pointCount`). This is the *clean half* of `hkerdeg`. -/ +omit [DecidableEq K] in +/-- The cardinality of the kernel of base-changed `1 − π` equals the rational point count, +by its identification with the geometric-Frobenius fixed locus. -/ theorem oneSubFrobeniusIsogBaseChange_nat_card_ker_eq_pointCount [(W.baseChange (AlgebraicClosure K)).toAffine.IsElliptic] (pullback_L : (W.baseChange (AlgebraicClosure K)).toAffine.FunctionField →ₐ[AlgebraicClosure K] @@ -299,16 +240,9 @@ theorem oneSubFrobeniusIsogBaseChange_nat_card_ker_eq_pointCount rw [hcard, ncard_ker_oneSubGeomFrobHom_eq_pointCount] rfl -/-- **Witness 3 — `hkerdeg`, reduced to V.1.3** (axiom-clean reduction). Given the degree identity -`φ_L.degree = pointCount W` (Silverman V.1.3, `isogOneSub_negFrobenius_degree_eq_pointCount` -base-changed through `hdeg_bc` — the project's known sharp residual), the separable degree match -`#ker(1 − π)_{K̄} = φ_L.degree` follows from the *proved* clean count -`#ker = pointCount`. - -The V.1.3 degree identity is taken as a hypothesis so this reduction is itself axiom-clean and the -V.1.3 dependence is explicit (the caller supplies `hdeg_eq` from -`(oneSubFrobeniusIsogBaseChange_degree_eq_of_finrankBaseChange W p r L hq).trans - (isogOneSub_negFrobenius_degree_eq_pointCount W hq)` once `hq` is available). -/ +omit [DecidableEq K] in +/-- The degree identity of Silverman V.1.3, supplied as a hypothesis, identifies the +kernel cardinality with the degree of the base-changed `1 − π` isogeny. -/ theorem oneSubFrobeniusIsogBaseChange_hkerdeg_of_degree_eq_pointCount [(W.baseChange (AlgebraicClosure K)).toAffine.IsElliptic] (pullback_L : (W.baseChange (AlgebraicClosure K)).toAffine.FunctionField →ₐ[AlgebraicClosure K] @@ -321,11 +255,9 @@ theorem oneSubFrobeniusIsogBaseChange_hkerdeg_of_degree_eq_pointCount (oneSubFrobeniusIsogBaseChange W p r (AlgebraicClosure K) pullback_L).degree := by rw [oneSubFrobeniusIsogBaseChange_nat_card_ker_eq_pointCount, hdeg_eq] -omit [Fintype W.toAffine.Point] in -/-- **Witness 2 — `hsurj` from the dual composition `φ ∘ δ = [N]`** (axiom-clean reduction). For -any `N` with `(N : K̄) ≠ 0`, surjectivity of `[N]` on `E(K̄)`-points (`mulByInt_point_surjective`) -turns the dual composition `φ ∘ δ = [N]` into surjectivity of `φ`. This is the second consequence -(alongside `hdc`) of bundling the divisor-pushforward dual as an `IsDualOf`. -/ +omit [Fintype W.toAffine.Point] [DecidableEq K] in +/-- A dual composition `φ ∘ δ = [N]`, with `N` nonzero in the algebraic closure, implies +surjectivity of `φ` by surjectivity of multiplication by `N` (Silverman III.4.10). -/ theorem oneSubFrobeniusIsogBaseChange_hsurj_of_self_comp_dual [(W.baseChange (AlgebraicClosure K)).toAffine.IsElliptic] (pullback_L : (W.baseChange (AlgebraicClosure K)).toAffine.FunctionField →ₐ[AlgebraicClosure K] @@ -363,14 +295,10 @@ variable [(W.baseChange (AlgebraicClosure K)).toAffine.IsElliptic] (⟨(W.baseChange (AlgebraicClosure K)).toAffine⟩ : SmoothPlaneCurve (AlgebraicClosure K)).CoordinateRing] -/-- **Assemble `OneSubScalingData` over `K̄` from only the still-open witnesses.** - -Discharges `pullback_L` (concrete `oneSubFrobeniusPullback_L`), `hdeg_bc` (proved, no hypothesis), -`finiteKer` (proved), `hkerdeg` (from the V.1.3 identity `hdeg_eq`), and `hsurj` (from the -dual composition -`hself` + `mulByInt_point_surjective`). The caller supplies only the genuinely-deep divisor-level -residuals: the dual `δ` with *both* composition identities `hdc`/`hself` (an `IsDualOf`), the -divisor-pullback functoriality `hproj`, and the translation covariance `hcomm'`. -/ +/-- Scaling data over the algebraic closure constructed from the degree identity, both dual +composition identities, divisor-pullback functoriality, and translation covariance. The +geometric-Frobenius fixed locus supplies the finite kernel and its cardinality; the second +dual composition supplies surjectivity. -/ noncomputable def mkOneSubScalingDataConcrete_of_witnesses (hq : 2 ≤ Fintype.card K) (hdeg_eq : (oneSubFrobeniusIsogBaseChange W p r (AlgebraicClosure K) diff --git a/projects/HasseWeil/HasseWeil/HasseBound/WeilPairing/PairingNondeg.lean b/projects/HasseWeil/HasseWeil/HasseBound/WeilPairing/PairingNondeg.lean index 18c4b2749..327e9d223 100644 --- a/projects/HasseWeil/HasseWeil/HasseBound/WeilPairing/PairingNondeg.lean +++ b/projects/HasseWeil/HasseWeil/HasseBound/WeilPairing/PairingNondeg.lean @@ -13,7 +13,7 @@ import HasseWeil.HasseBound.WeilPairing.TorsionCardEll /-! # Nondegeneracy of the Weil pairing -This file proves that the finite-level Weil pairing over an algebraically closed field is +We prove that the finite-level Weil pairing over an algebraically closed field is nondegenerate in its second argument. The proof uses surjectivity of multiplication on curve points, injectivity of divisor pullback, the Galois fixed-field description, and Abel--Jacobi. @@ -154,7 +154,7 @@ theorem aut_eq_translate (ℓ : ℤ) (hℓ0 : ℓ ≠ 0) (mulByInt W.toAffine ℓ).toAlgebra (mulByInt W.toAffine ℓ).toAlgebra) : ∃ k : W.toAffine.Point, ℓ • k = 0 ∧ ∀ z : KE, σ z = translateAlgEquivOfPoint W k z := by - letI := (mulByInt W.toAffine ℓ).toAlgebra + let := (mulByInt W.toAffine ℓ).toAlgebra have hcov := hcov_mulByInt_of_xy W ℓ hℓ0 (hxy_mulByInt W ℓ hℓ0) set forward := kernelTranslateForwardAut W (mulByInt W.toAffine ℓ) hcov with hfwd_def obtain ⟨k, hk_mem, hk_lift⟩ := hdesc_mulByInt W ℓ hℓ0 σ @@ -183,10 +183,10 @@ theorem mem_pullback_range_of_translate_fixed (ℓ : ℤ) (hℓ : (ℓ : F) ≠ translateAlgEquivOfPoint W S g = g) : ∃ h : KE, (mulByInt W.toAffine ℓ).pullback h = g := by have hℓ0 : ℓ ≠ 0 := by rintro rfl; norm_num at hℓ - letI := (mulByInt W.toAffine ℓ).toAlgebra - haveI hfin : @FiniteDimensional KE KE _ _ (mulByInt W.toAffine ℓ).toAlgebra.toModule := + let := (mulByInt W.toAffine ℓ).toAlgebra + have hfin : @FiniteDimensional KE KE _ _ (mulByInt W.toAffine ℓ).toAlgebra.toModule := isogeny_finiteDimensional W (mulByInt W.toAffine ℓ) - haveI hgal : @IsGalois KE _ KE _ (mulByInt W.toAffine ℓ).toAlgebra := + have hgal : @IsGalois KE _ KE _ (mulByInt W.toAffine ℓ).toAlgebra := Isogeny.isGalois_of_isSeparable_and_normal (mulByInt W.toAffine ℓ) (mulByInt_isSeparable W ℓ hℓ) (h_normal_mulByInt W ℓ hℓ0) have hfix : ∀ σ : @AlgEquiv KE KE KE _ _ _ @@ -217,7 +217,7 @@ theorem weilPairing_nondegenerate (ℓ : ℤ) (hℓ : (ℓ : F) ≠ 0) (h_deg : ∀ S : W.toAffine.Point, (hS : ℓ • S = 0) → weilPairing W ℓ hℓ S T hS hT = 1) : T = 0 := by - haveI hker : Finite (mulByInt W.toAffine ℓ).toAddMonoidHom.ker := mulByInt_ker_finite W ℓ hℓ + have hker : Finite (mulByInt W.toAffine ℓ).toAddMonoidHom.ker := mulByInt_ker_finite W ℓ hℓ obtain ⟨h, hh⟩ := mem_pullback_range_of_translate_fixed W ℓ hℓ (fun S hS ↦ by rw [weilPairing_translate W ℓ hℓ S T hS hT, h_deg S hS, map_one, one_mul]) apply eq_zero_of_kappaDivisor_principal W diff --git a/projects/HasseWeil/HasseWeil/HasseBound/WeilPairing/PairingProps.lean b/projects/HasseWeil/HasseWeil/HasseBound/WeilPairing/PairingProps.lean index 403c142bc..70880d716 100644 --- a/projects/HasseWeil/HasseWeil/HasseBound/WeilPairing/PairingProps.lean +++ b/projects/HasseWeil/HasseWeil/HasseBound/WeilPairing/PairingProps.lean @@ -9,9 +9,9 @@ import HasseWeil.HasseBound.WeilPairing.Pairing /-! # Weil-pairing properties: bilinearity in the second slot and alternating (Silverman III.8.1) -This file proves the two remaining structural properties of the finite-level Weil pairing -`e_ℓ : E[ℓ] × E[ℓ] → F` (ticket `T-R2-PAIRING-PROPS`), over an algebraically closed field `F`, -extending the slot-1 bilinearity `weilPairing_mul_left` from `Pairing.lean`: +We prove bilinearity and alternation of the finite-level Weil pairing +`e_ℓ : E[ℓ] × E[ℓ] → F`, over an algebraically closed field `F`, +extending the slot-1 bilinearity `weilPairing_mul_left`: * `weilPairing_mul_right` — **bilinearity in the second slot** (Silverman III.8.1b): `e_ℓ(S, T₁ + T₂) = e_ℓ(S, T₁) · e_ℓ(S, T₂)`. @@ -112,7 +112,7 @@ theorem weilPairing_mul_right (ℓ : ℤ) (hℓ : (ℓ : F) ≠ 0) weilPairing W ℓ hℓ S (T₁ + T₂) hS h₁₂ = weilPairing W ℓ hℓ S T₁ hS hT₁ * weilPairing W ℓ hℓ S T₂ hS hT₂ := by have hℓ0 : ℓ ≠ 0 := by rintro rfl; simp at hℓ - haveI hker : Finite (mulByInt W.toAffine ℓ).toAddMonoidHom.ker := mulByInt_ker_finite W ℓ hℓ + have hker : Finite (mulByInt W.toAffine ℓ).toAddMonoidHom.ker := mulByInt_ker_finite W ℓ hℓ obtain ⟨k, hk_ne, hk_div⟩ := bilinDivisor_isPrincipal W T₁ T₂ set u : KE := (mulByInt W.toAffine ℓ).pullback k have hu_ne : u ≠ 0 := diff --git a/projects/HasseWeil/HasseWeil/HasseBound/WeilPairing/PencilDualDivisor.lean b/projects/HasseWeil/HasseWeil/HasseBound/WeilPairing/PencilDualDivisor.lean index 5f516ab8e619e3cdfcf79eb728f53efdfb81a2c5..4401ef64fd20246d7f73d595ce01960cce1b673b 100644 GIT binary patch delta 2332 zcmbVOzi%8x7}b$LF@+rj*nx1)hb%>V(%u>$k!`>fHjX7L6oIoq5sI_p-MPCVyR(~_ zT^lQ)3z7u_M1iKEp`f5dLb?VzXebcE4ODdb188U|_-1zRhtFpdMOWNuc6R1{?|bik z_sbWRuiyT@Uh(Uod_p!82^17dsieCRgOrJYN5ECmX5s*Rd2}DlP8WElV3#TeL5GSq zgAP@YCR}6?)0FrUj_&_6PdZ7a#=j%*#Y1&ZI;9=lRPNORW7i* zIl?zjTX2U-!6FE#47n&)sR#+8lZ?55zX8wI-!47XMN&Ep2^=2Sq5-lhSxmVA_I?`i zfM>u3@o(5ZGz*$GXhsdCSRign1Vhq!!K%tre2ax3XqHPl>|6l=X_=pgw^)lwrazxr z?^-}xTU*|e*KlZ!05~Dv!*)wZbJb}javv)xVB>Wm7K->HY6z{lVBWmyExzbbH>iPg zj4D$$j7X_KP`jg*Mz0RJhGK3O{>pdws!_eoFivD}R^i_d(UK%o&x8VFFv5!A12~uU_sJ7C6njuV5ggc@*u^ z;11BJ&2}Y)P7>osrX8+g7mC)Ri%`yT&x*r+XivG$B-2<=p-aoNtwi)UOS20eX)*>) z9_=w1Q(yCbzyROoVmtn6@!2a%CAcfknWyXVJFD zWM5e`vKZ$P_249`!Wg}2=aa{~rwErU)a%yA1K$o?HE5C%Pd|r^1RfzJmoZe!nDh|% zbrX?3YX?snSJ`OoE@xJr|IejGGX%ioh_A<2)6uHDn6oi}y<2T;RP;wL{RAhGfq(Sz8-5=ew&uB>zWV87-5bXziZuv@7L9pi^SK~W z5wbS2I3&H~*>XS7#PRgS*=G$ih+ZpIf>K45%=eXaS^}dl^&cyr>BA@A)W5#``y4q- z85??SdA4gNOEEXcX)qRM=!1iSK7^I(Ku!I+agQCkrG0UB1yO=&%}!1cqwQnEV^tgs z#+PJm90%wL9QNqFGHcFgp~R diff --git a/projects/HasseWeil/HasseWeil/HasseBound/WeilPairing/Pullback.lean b/projects/HasseWeil/HasseWeil/HasseBound/WeilPairing/Pullback.lean index 6a6379829..9fe8fdd6a 100644 --- a/projects/HasseWeil/HasseWeil/HasseBound/WeilPairing/Pullback.lean +++ b/projects/HasseWeil/HasseWeil/HasseBound/WeilPairing/Pullback.lean @@ -7,22 +7,16 @@ import HasseWeil.HasseBound.WeilPairing.Fiber import HasseWeil.Foundation.Curves.Divisor.PicZero /-! -# Route 2A — the multiplicity-free geometric divisor pullback (keystone) +# Multiplicity-free geometric divisor pullback -For a **separable** point-map endomorphism `f` (étale fibres, `e = 1`), the pullback divisor is -the mult-1 fibre sum `f*((Q)) = Σ_{fP=Q} (P)`. This is the central new object of the Weil-pairing -route — the same divisor pullback Route 1 lacked, now in the multiplicity-free regime — used by -both the pairing construction (`div g = [ℓ]*((T)) − [ℓ]*((O))`) and the separable adjoint -(Silverman III.8.2's function `h`). - -This file ships the definition and its **degree**: `deg(f*((Q))) = #fibre = #ker f` (Silverman -III.4.10c, the separable case). The `σ`-bridge and the addition-formula linkage are downstream. +For a separable point-map endomorphism `f`, the pullback of `(Q)` is the sum +of the points in its finite fibre, each with multiplicity one. Its degree +is the cardinality of the kernel, as in Silverman III.4.10(c). This divisor +also gives the geometric group sum used in the dual isogeny formula. -/ namespace HasseWeil.WeilPairing -set_option linter.unusedSectionVars false - open WeierstrassCurve variable {F : Type*} [Field F] [DecidableEq F] {W : WeierstrassCurve.Affine F} [W.IsElliptic] @@ -44,7 +38,7 @@ noncomputable def pullbackDiv (f : W.Point →+ W.Point) (h : Finite f.ker) (Q : /-- **Degree of the mult-1 pullback** (Silverman III.4.10c, separable): `deg(f*((Q))) = #ker f`. -/ theorem degree_pullbackDiv (f : W.Point →+ W.Point) (h : Finite f.ker) {P₀ Q : W.Point} (hP₀ : f P₀ = Q) : (pullbackDiv f h Q).degree = Nat.card f.ker := by - letI : Fintype {P : W.Point // f P = Q} := @Fintype.ofFinite _ (fiber_finite f h Q) + let : Fintype {P : W.Point // f P = Q} := @Fintype.ofFinite _ (fiber_finite f h Q) rw [pullbackDiv, ← Curves.ProjectiveDivisor.degreeHom_apply, map_sum] simp only [Curves.ProjectiveDivisor.degreeHom_apply, degree_single, Finset.sum_const, Finset.card_univ, nsmul_eq_mul, mul_one] @@ -55,7 +49,7 @@ fibre). The start of the III.6.1(b) `σ`-bridge `σ(f*((Q))−f*((O))) = f̂(Q)` theorem projectiveDivisorSum_pullbackDiv (f : W.Point →+ W.Point) (h : Finite f.ker) (Q : W.Point) : letI : Fintype {P : W.Point // f P = Q} := @Fintype.ofFinite _ (fiber_finite f h Q) Curves.projectiveDivisorSum W (pullbackDiv f h Q) = ∑ P : {P : W.Point // f P = Q}, P.val := by - letI : Fintype {P : W.Point // f P = Q} := @Fintype.ofFinite _ (fiber_finite f h Q) + let : Fintype {P : W.Point // f P = Q} := @Fintype.ofFinite _ (fiber_finite f h Q) rw [pullbackDiv, ← Curves.projectiveDivisorSumHom_apply, map_sum] refine Finset.sum_congr rfl (fun P _ => ?_) rw [Curves.projectiveDivisorSumHom_apply, Curves.projectiveDivisorSum_single, one_zsmul, diff --git a/projects/HasseWeil/HasseWeil/HasseBound/WeilPairing/Scaling/FrobeniusGalois.lean b/projects/HasseWeil/HasseWeil/HasseBound/WeilPairing/Scaling/FrobeniusGalois.lean index ef66a86e649eed9ded1a96df6f25baa29b62948a..8e90832e3d316d0e2eae1846034a1632be1da6fb 100644 GIT binary patch delta 2327 zcmai0%WoS+7?(qM4Si7ML87McMJahG_NEaRNK>JZ5EKGPRV@ld(4EZA+Cz7DoY}EM zs8FcNg(I3P0>qg^B};HbJyhxesr(Jxd*c97k@#lD-r7l;+~SRQzVG)O|MqL?Ve8J) zz#t*jx>;Etordti?GR)Py3Th8bXGHRvL|D*TQm4YUws>P@(YIOl}rWjh%O=Fq$!*B%T1O5wSmo*vUDV zf6J4D)w$2M&GRST8<>sS%@Z4^=L>|;IT3P3-5IfxDZE1yiCjcfQ(}HterY&w;x+=0 zqtJy|F}I!?+S?JxwzfPZ)bdK0Y*8ibPUU@+prlQOL-Z~*8-Rc)WHS4bD_QJZ_Pn5m zUO=xEL9M!|P{b-as{7F_ojN`3INqn+ep~@*e+>6aXL^u9EYVcv_p{^gF1f!sW#}Aa z*!dR4vp(_8D3c!G-gs6ApiM1PsTy^Wr%B5E)shRC?71k)jKoiDER-&8f|=FxAM4 z!d)vERGUlB6u}Jm2a$+lt}t=n%w*SOb*c~pS0dMf9kr;Lyf$Gzc=@E63I1&V6U+~q z_t(jpKBBuNL;Afq??^g?mwo=RC17RRL(!8&?&N+=zTNcZ>~$M)^@0FuJmU%-j+*xr z6q>QO0xZ%)YXI^(&LO&v!V23nDXsC7;ED3{t?uO>-L1d}1LA~qBDorR)8(aqWKYbT z!Eq-Hq^@Jt2}X+GFWFwPrL_0NQo?e&>0OATyP$^*{`&SOxPbL!Q)tcC8&vCzZZch& zc4{NSJT%Y%nxmIG0u{-b#^?m(IOl?a)v-3a^!H%NA)h%Cc^OSv<0ywRcV8JX-!GAK zzDoKwETfHOOGF&ZkIN$i0YUE#w;!$kTq>;?`r7d4Or~km-b4Fa4rq*Cc2@}+0#RF0 zT~lCD;DzMlPn{VGlOC7)aa12yek_r<33|-lIFH>L3B{R4CW~|x*sy(l`D0Pz8vRZ^ zU`|AyXL##D|;ro*VE#1s3|U z3&l-h!*ZaF5x%)I0TahG#ISj^`ht1!ji=39AKt%Fc-mcJD3?9jhN8Fx&~xF`=98Ms aLUGMSj%_Y;>+00`ZV?{k+VPiq@T6vr6iG88ur20KlN->H_wY89K*NgZ4$Y7ZuaKy5HIX`|83(`uaEna#|s zTLoP8;6pEk(k(gWBZPnsfk3~3X+J{2&|44jDdg5SE6bK3%1Nu8x9|7o{ocI&b>AJ;#vrE?lW^=QL1hg+*FMvmA6ee{mpI~Fy7w|ECTOM*H zia$3N`ynIlM-+j`GJ`F;gsV!|2(vXIv7eZ5$e5ts@Gsi6Ra!Gwct+)f;=}3jA zQirBkP)LJR+5wsCjEtNgIEfooN9TR}K2IULnPrF!22fAmPw`QfjWC3{Pg)&xJDr%GXCI}FB`01{P)75 zP6_e;R~Sj*H|6WcaOXRasyJ9`6c6X-2fK?aGt-I&2TNbfO+9?I{NTd!l=iGquS2cY zDxNbKY<~LF>}I5u<5JmjAd_J@i~Uf5&pBmvESju1sV)@9!9sDl_HlE#b|ZVGposbM zSni``-snghnnR`)g(!x1-5`TEwWAMbwu`?Sm#<8}4xl(`T=}*dGN475v>-$BG3pe3 zzF>Us&gfDVja-n&L_|>#bJ|Se;h9aY@ZjF(uRrMT(EIm?hwiNL?3Bf~C&3BSr=MW8 oq9vY+?Kdridc*sq4W^)rXIJNo-)bKf(0p3FY_1IcX?`;MKVysjBLDyZ diff --git a/projects/HasseWeil/HasseWeil/HasseBound/WeilPairing/Scaling/Separable.lean b/projects/HasseWeil/HasseWeil/HasseBound/WeilPairing/Scaling/Separable.lean index af497faf2bb3780fc6a0ffbb0e47d99a5a4bc929..887cec98266c9fc13bfc5a472077ef8e615afbe0 100644 GIT binary patch delta 850 zcmY+C!E4k&6vk-}1p{h9gx1rez3g_=1*;UX6j|`#LQ&|Z2QQjw<|UanI}>LnyIn!H z2U)x+2Jz%UFZEc7c&mEzBJTgtf55v4`jWM!-ZGQ-zVCa#H%DKme;rI8-k!=grxx!B zqau_7jpKMR0^>VMNDG3aw89R+$A`yH^V)dSalJaM!{pd;x9UEGDoIq|K&VwWfBSlF zfk_UQRJiDou7;2WR%!8=S)nBO^`Xc*YV)E9Wjt!BB$< z2SP^q&kOTIlci}w5y9W01V27{Ww!+;L3CM!{~Af&^WDlH_ozM)7E+Cq65sP75CCQ^FXrm_`!%0i&comMHy@c_; zzeY%dn8=>ZB#c868c7QQ_ktwj$gB5NNymd!(SJj0BrO{Y112EKG6JTftb|0^HZdd# z8KAid9g*}<=U*;fUvQmvyWL!EuGCoFh4TAGbH%LyP7bTZr`cCmijBs1C*Nqi&p+Rt nDZZ^ P.val) (fun T => P₀ + (T : W.Point)) (fun P => ?_) simp only [fiberEquivKer, Equiv.coe_fn_mk] @@ -41,7 +39,7 @@ theorem sigma_pullbackDiv_sub (f : W.Point →+ W.Point) (h : Finite f.ker) {P (hP₀ : f P₀ = Q) : Curves.projectiveDivisorSum W (pullbackDiv f h Q) - Curves.projectiveDivisorSum W (pullbackDiv f h 0) = Nat.card f.ker • P₀ := by - letI : Fintype f.ker := @Fintype.ofFinite _ h + let : Fintype f.ker := @Fintype.ofFinite _ h have hQ := projectiveDivisorSum_pullbackDiv f h Q have hO := projectiveDivisorSum_pullbackDiv f h 0 rw [hQ, hO, fiber_sum_eq_ker_sum f h hP₀, diff --git a/projects/HasseWeil/HasseWeil/HasseBound/WeilPairing/TorsionKernelRational.lean b/projects/HasseWeil/HasseWeil/HasseBound/WeilPairing/TorsionKernelRational.lean index 378e2e72b..f1d4ef6ca 100644 --- a/projects/HasseWeil/HasseWeil/HasseBound/WeilPairing/TorsionKernelRational.lean +++ b/projects/HasseWeil/HasseWeil/HasseBound/WeilPairing/TorsionKernelRational.lean @@ -11,26 +11,19 @@ import HasseWeil.Foundation.EC.GenericPointZsmul import HasseWeil.Foundation.EC.SeparableKernelTorsor /-! -# Kernel-rationality of `[ℓ]` over `K̄` (Silverman III.4.10c) +# Rationality of torsion kernels over an algebraically closed field -For the multiplication-by-`ℓ` isogeny `[ℓ] = mulByInt W.toAffine ℓ` over an algebraically closed -field `F = K̄`, we discharge the two genuine-isogeny coherence inputs of the capstone -`HasseWeil.card_kernel_eq_degree_of_separable_concrete` (`SeparableKernelTorsor.lean`): +For a nonzero integer `ℓ`, every point in the kernel of multiplication +by `ℓ` over an extension of an algebraically closed base field already +comes from a torsion point over that base field. The division-polynomial +identity makes its x-coordinate algebraic, and the Weierstrass equation +then makes its y-coordinate algebraic. -* `hdesc_mulByInt` — the inverse-witness descent: every fibre `σ(P_gen) − P_gen` (`σ` an - automorphism of `K(E)/[ℓ]*K(E)`) is an `F`-rational kernel point of `[ℓ]`. -* `h_normal_mulByInt` — the function-field extension `K(E)/[ℓ]*K(E)` is normal. +Consequently, automorphisms of `K(E)/[ℓ]*K(E)` differ from the generic +point by rational kernel points. The minimal polynomials of the generic +coordinates split in `K(E)`, proving normality of this extension. -Both rest on **kernel-rationality** (`kernelDescends_general`, specialised to -`kernelOverKE_descends` at `L = K(E)`): over `K̄`, every point `Q` of `E` with coordinates in a -field extension `L` that is killed by `[ℓ]` already descends to a `K̄`-rational `ℓ`-torsion point. -The reason is the division-polynomial connection `[ℓ]Q = O ⟹ ψ_ℓ(x(Q), y(Q)) = 0 ⟹ Ψ²_ℓ(x(Q)) = 0`: -the `x`-coordinate of `Q` is a root of the `ℓ`-division polynomial `Ψ²_ℓ`, whose coefficients lie -in `K̄` (not just `L`); since `K̄` is algebraically closed, `Ψ²_ℓ` splits over `K̄`, so `x(Q)` is -the image of a `K̄`-element. The `y`-coordinate then descends via the Weierstrass -equation over `K̄`. - -Reference: Silverman, *The Arithmetic of Elliptic Curves*, III.4.10c. +Reference: Silverman, *The Arithmetic of Elliptic Curves*, III.4.10(c). -/ open WeierstrassCurve Polynomial @@ -228,7 +221,7 @@ of `[ℓ]`. The geometric action `g` of `[ℓ]` on `(W_KE).Point` is multiplication-by-`ℓ` (`zsmulAddGroupHom ℓ`), whose value at the generic point is `(mulByInt_x ℓ, mulByInt_y ℓ) = ([ℓ]*x_gen, [ℓ]*y_gen)` -(`zsmul_genericPoint_eq` + `mulByInt_pullback_x/y`); this is the genuine data. The shipped +(`zsmul_genericPoint_eq` + `mulByInt_pullback_x/y`); the generic-point identity. The lemma `genericPointAct_mem_ker_g` then yields `g(σ P_gen) = g(P_gen)` — using `σ.commutes` (it fixes the pullback range) and the equivariance `g ∘ (Point.map σ) = (Point.map σ) ∘ g`, which here is just `map_zsmul`. Thus `ℓ • (σ P_gen − P_gen) = 0`, and `kernelOverKE_descends` produces the descended @@ -241,7 +234,7 @@ theorem hdesc_mulByInt [IsAlgClosed F] (ℓ : ℤ) (hℓ : ℓ ≠ 0) : liftPointToKE W k = genericPointAct W (mulByInt W.toAffine ℓ) σ - genericPoint W := by intro σ - letI := (mulByInt W.toAffine ℓ).toAlgebra + let := (mulByInt W.toAffine ℓ).toAlgebra set g : (W_KE W).toAffine.Point →+ (W_KE W).toAffine.Point := zsmulAddGroupHom ℓ obtain ⟨hns, hsmul⟩ := zsmul_genericPoint_eq W ℓ hℓ have hsmul' : ℓ • genericPoint W = @@ -449,16 +442,15 @@ theorem minpoly_gen_splits_of_mem_range [IsAlgClosed F] (ℓ : ℤ) (_hℓ : ℓ letI := (mulByInt W.toAffine ℓ).toAlgebra Polynomial.Splits ((minpoly W.toAffine.FunctionField a).map (algebraMap W.toAffine.FunctionField W.toAffine.FunctionField)) := by - letI algB := (mulByInt W.toAffine ℓ).toAlgebra - -- Re-pin the canonical `Algebra K(E) Ω` to use `Algebra.id` for the `[Algebra K(E) K(E)]` slot - -- of `AlgebraicClosure.instAlgebra` (otherwise the ambient `letI := pullback` poisons it, making - -- the proof's `algebraMap K(E) Ω` disagree with the one baked into `hmem`). - letI stdΩ : Algebra W.toAffine.FunctionField (AlgebraicClosure W.toAffine.FunctionField) := + let algB := (mulByInt W.toAffine ℓ).toAlgebra + -- Use the standard embedding into the algebraic closure for the coordinate field, + -- while the base-field action on that coordinate field is the isogeny pullback. + let stdΩ : Algebra W.toAffine.FunctionField (AlgebraicClosure W.toAffine.FunctionField) := @AlgebraicClosure.instAlgebra W.toAffine.FunctionField _ W.toAffine.FunctionField _ (Algebra.id W.toAffine.FunctionField) - haveI hfin : @FiniteDimensional W.toAffine.FunctionField W.toAffine.FunctionField + have hfin : @FiniteDimensional W.toAffine.FunctionField W.toAffine.FunctionField _ _ algB.toModule := isogeny_finiteDimensional W (mulByInt W.toAffine ℓ) - haveI halg : Algebra.IsAlgebraic W.toAffine.FunctionField W.toAffine.FunctionField := + have halg : Algebra.IsAlgebraic W.toAffine.FunctionField W.toAffine.FunctionField := Algebra.IsAlgebraic.of_finite _ _ -- `Ω = AlgebraicClosure K(E)` is made a *base*-algebra via the ring hom `algebraMap ∘ pullback`, -- supplied *inline* to the abstract criterion (never a scope instance, so the standard @@ -486,7 +478,7 @@ theorem minpoly_gen_splits_of_mem_range [IsAlgClosed F] (ℓ : ℤ) (_hℓ : ℓ rfl -- Build the `F`-algHom `g` by restricting scalars along `F → B`, using the inline scalar tower -- `F → B → Ω` (`of_algHom` for `(algebraMap) ∘ pullback`); supplied `@`-explicitly. - haveI htower : @IsScalarTower F W.toAffine.FunctionField + have htower : @IsScalarTower F W.toAffine.FunctionField (AlgebraicClosure W.toAffine.FunctionField) _ (((algebraMap W.toAffine.FunctionField (AlgebraicClosure W.toAffine.FunctionField)).comp (mulByInt W.toAffine ℓ).pullback.toRingHom).toAlgebra).toSMul _ := @@ -537,11 +529,11 @@ once the two generator minimal polynomials do (`mulByInt_genCoords_minpoly_split theorem h_normal_mulByInt [IsAlgClosed F] (ℓ : ℤ) (hℓ : ℓ ≠ 0) : letI := (mulByInt W.toAffine ℓ).toAlgebra Normal W.toAffine.FunctionField W.toAffine.FunctionField := by - letI := (mulByInt W.toAffine ℓ).toAlgebra - haveI hfin : @FiniteDimensional W.toAffine.FunctionField W.toAffine.FunctionField + let := (mulByInt W.toAffine ℓ).toAlgebra + have hfin : @FiniteDimensional W.toAffine.FunctionField W.toAffine.FunctionField _ _ (mulByInt W.toAffine ℓ).toAlgebra.toModule := isogeny_finiteDimensional W (mulByInt W.toAffine ℓ) - haveI halg : Algebra.IsAlgebraic W.toAffine.FunctionField W.toAffine.FunctionField := + have halg : Algebra.IsAlgebraic W.toAffine.FunctionField W.toAffine.FunctionField := Algebra.IsAlgebraic.of_finite _ _ obtain ⟨hsx, hsy⟩ := mulByInt_genCoords_minpoly_splits W ℓ hℓ refine normal_iff.mpr fun z ↦ ⟨(halg.isAlgebraic z).isIntegral, ?_⟩ diff --git a/projects/HasseWeil/HasseWeil/HasseBound/WeilPairing/TorsionModule.lean b/projects/HasseWeil/HasseWeil/HasseBound/WeilPairing/TorsionModule.lean index e011591e1..dcc33eba4 100644 --- a/projects/HasseWeil/HasseWeil/HasseBound/WeilPairing/TorsionModule.lean +++ b/projects/HasseWeil/HasseWeil/HasseBound/WeilPairing/TorsionModule.lean @@ -10,27 +10,16 @@ import Mathlib.FieldTheory.Finiteness import Mathlib.LinearAlgebra.Dimension.Free /-! -# `E[ℓ] ≅ (ZMod ℓ)²` — the geometric `ℓ`-torsion as a 2-dimensional `ZMod ℓ`-vector space +# The two-dimensional module of prime torsion points -For `ℓ` prime and `F` algebraically closed with `(ℓ : F) ≠ 0` (i.e. `ℓ ≠ char F`), the geometric -`ℓ`-torsion `E[ℓ] = W.toAffine[(ℓ : ℤ)]` is a 2-dimensional vector space over the field `ZMod ℓ`. +For a prime `ℓ` different from the characteristic of an algebraically +closed field, the geometric torsion subgroup `E[ℓ]` has cardinality +`ℓ²`. Since every element is killed by `ℓ`, it is a vector space over +`ZMod ℓ`. The finite-vector-space cardinality formula gives dimension +two, hence a basis indexed by `Fin 2` and an identification with +`Fin 2 → ZMod ℓ`. -This builds on the axiom-clean cardinality theorem -`HasseWeil.WeilPairing.TorsionGeometric.card_torsion_ell` (`#E[ℓ] = ℓ²`, Silverman III.6.4(a)) -and packages the structure-theoretic consequences: - -* `card_torsion_ell_nat` — `Nat.card E[ℓ] = ℓ²` (no `ℤ`-coercion); -* `torsion_ell_finite` — `E[ℓ]` is finite; -* the `Module (ZMod ℓ)` structure on `E[ℓ]` (every element is killed by `ℓ`), via - `AddCommGroup.zmodModule`; -* `finrank_torsion_ell` — `finrank (ZMod ℓ) E[ℓ] = 2`, via `Module.natCard_eq_pow_finrank`; -* `torsion_ell_basis` — a `Basis (Fin 2) (ZMod ℓ) E[ℓ]`, via `Module.finBasisOfFinrankEq`; -* `torsion_ell_linearEquiv` — `E[ℓ] ≃ₗ[ZMod ℓ] (Fin 2 → ZMod ℓ)`, via `Basis.equivFun`. - -These are the structures the downstream mod-`ℓ` Galois representation -`ρ_ℓ : End(E) → GL₂(ZMod ℓ)` consumes. - -Reference: Silverman III.6.4(a), III.7. +Reference: Silverman, *The Arithmetic of Elliptic Curves*, III.6.4(a), III.7. -/ open WeierstrassCurve @@ -97,13 +86,13 @@ theorem torsion_ell_finite : Finite W.toAffine[(ℓ : ℤ)] := by forces `ℓ^finrank = ℓ²`, hence `finrank = 2` since `ℓ ≥ 2`. -/ theorem finrank_torsion_ell : Module.finrank (ZMod ℓ) W.toAffine[(ℓ : ℤ)] = 2 := by - haveI := torsion_ell_finite W ℓ hℓF + have := torsion_ell_finite W ℓ hℓF have hcard : Nat.card W.toAffine[(ℓ : ℤ)] = Nat.card (ZMod ℓ) ^ Module.finrank (ZMod ℓ) W.toAffine[(ℓ : ℤ)] := Module.natCard_eq_pow_finrank rw [card_torsion_ell_nat W ℓ hℓF] at hcard have hZcard : Nat.card (ZMod ℓ) = ℓ := by - haveI : NeZero ℓ := ⟨hℓ.out.pos.ne'⟩ + have : NeZero ℓ := ⟨hℓ.out.pos.ne'⟩ rw [Nat.card_eq_fintype_card, ZMod.card] rw [hZcard] at hcard -- `ℓ ^ 2 = ℓ ^ finrank`, and `ℓ ≥ 2`, so the exponents agree. diff --git a/projects/HasseWeil/HasseWeil/Isogeny/BaseChange/Basic.lean b/projects/HasseWeil/HasseWeil/Isogeny/BaseChange/Basic.lean index 5e7b88094453689a80fefbc79c4a6dcb9032a838..e2365c39fcec4a07f8b7e2aac47dfbd1ec0b90ad 100644 GIT binary patch delta 481 zcmX^2mhsOf#tjvWlTF!QZ@$9$o-sB*H?u?`+9fqPGbJ%8C)Kr3!7WxHIy^NqwWzqH zD6zQMxwNP(RnN27H76&tpd>R{A^cHOBVi>?u?m@alN)&DHb3BANMma@H}GC(+$=39 z!8Ey1v}W^jNllK;b}DHCo1d8f;1b95VK&HZn{PWkXT&La&?Sa>bGz4C7Mv=K{jam( zl;jLkV!|n@6)}ZRo(qSwxb$^(6|}S_CuGZP*2>v~+mxqy0!+*bRtl2^!=)#S6mHu5 Iw)i0v0F`R9Hvj+t diff --git a/projects/HasseWeil/HasseWeil/Isogeny/BaseChange/Concrete.lean b/projects/HasseWeil/HasseWeil/Isogeny/BaseChange/Concrete.lean index a56daff33..930b5c5e6 100644 --- a/projects/HasseWeil/HasseWeil/Isogeny/BaseChange/Concrete.lean +++ b/projects/HasseWeil/HasseWeil/Isogeny/BaseChange/Concrete.lean @@ -6,72 +6,23 @@ Authors: Chris Birkbeck import HasseWeil.HasseBound.WeilPairing.Scaling.OneSub /-! -# Concrete base-change of a function-field pullback (CoordHom-free) +# Base change of function-field pullbacks -For a smooth plane curve `C / F` and an `F`-algebra extension `L` with `L/F` algebraic, the -function-field scalar-extension iso `K(C_L) ≅ L ⊗_F K(C)` is **already** available, axiom-clean, in -`HasseWeil/Curves/CurveMapBaseChange.lean`: +For an algebraic field extension `L/F`, the canonical scalar-extension +isomorphism `Φ : L ⊗[F] K(C) ≃ₐ[L] K(C_L)` transports a function-field +endomorphism `f` to `Φ ∘ (id_L ⊗ f) ∘ Φ⁻¹`. -* `functionField_tensor_locBaseChange L : (L ⊗ K(C)) ≃ₐ[L] FractionRing (L ⊗ C.CR)`, -* `functionField_baseChange_fracEquiv L : FractionRing (L ⊗ C.CR) ≃ₐ[L] K(C_L)`. +The type synonym `Twist f` carries the scalar action through `f`. An +explicit tensor-product linear equivalence identifies its base change +with `Twist (id_L ⊗ f)`, proving preservation of the twisted module rank +and hence of the degree of the pullback. -Composing them gives the iso `Φ : (L ⊗ K(C)) ≃ₐ[L] K(C_L)` (`tensorFunctionFieldEquiv`). +For `1 - π`, this constructs the base-changed pullback and its degree +identity. The scaling data retain explicit hypotheses for the geometric +kernel, divisor transport, duality, surjectivity and translation covariance. -This file uses `Φ` to **construct** the base-change of an arbitrary function-field `F`-algebra hom -`f : K(C) →ₐ[F] K(C)` — *no `CoordHom` required* — as the conjugate - - `baseChangePullback f := Φ ∘ (id_L ⊗ f) ∘ Φ⁻¹ : K(C_L) →ₐ[L] K(C_L)`, - -an honest `L`-algebra hom (`Algebra.TensorProduct.map (AlgHom.id L) f` is the `L`-linear scalar -extension of the `F`-linear `f`, conjugated by the `L`-algebra equiv `Φ`). - -The payoff (`oneSubFrobeniusPullback_L`) is the concrete `pullback_L` field of `OneSubScalingData` -for the separable genuine isogeny `1 − π`, whose pullback has poles at the affine kernel so admits -**no** `CoordHom` — hence the whole CoordHom-free route. - -## Degree preservation - -`finrank_baseChangePullback_eq_finrank_lTensorMap` reduces the degree of the conjugate -`baseChangePullback f` (as an `Isogeny`, via `Isogeny.degree_eq_of_finrank_eq`) to the `finrank` of -the *scalar extension* `id_L ⊗ f` over `L ⊗ K(C)`, by transporting the finrank along the `L`-algebra -equiv `Φ` (`Algebra.finrank_eq_of_equiv_equiv`). This **conjugation step is proved here in full**. - -The remaining equality `finrank_{L ⊗ K(C), via id_L ⊗ f}(L ⊗ K(C)) = finrank_{K(C), via f} K(C)` -is the curve-free **base-change-of-finrank** content; it is **proved here in full** as -`finrankBaseChange`, by realizing the `f`-twisted self-module `K(C)` as the type synonym `Twist f` -and exhibiting `(L ⊗ K(C)) ⊗_{K(C)} Twist f ≃ₗ[L ⊗ K(C)] Twist (id_L ⊗ f)` (so -`Module.finrank_baseChange` applies). Hence `baseChangePullback_finrank_eq` (and the degree -preservation it feeds) carries **no** finrank hypothesis. - -## What this file discharges for `OneSubScalingData` - -`mkOneSubScalingDataConcrete` assembles a full `OneSubScalingData` for the genuine `1 − π` base -change in which: - -* `pullback_L` is **constructed** as the concrete `oneSubFrobeniusPullback_L` (the conjugate - `Φ ∘ (id_L ⊗ (1−π).pullback) ∘ Φ⁻¹`) — *no longer a raw input* (axiom-clean); -* `hdeg_bc` is **fully discharged** by the proved conjugation step - `finrank_baseChangePullback_eq_finrank_lTensorMap` chained with the proved curve-free - `finrankBaseChange` — no carried hypothesis. - -The remaining inputs are exactly the genuinely-deep **K̄-level geometric** residuals, each stated -against the concrete pullback: - -* `finiteKer` — finiteness of `ker(1 − π)_{K̄}` (a separable isogeny has finite kernel over `K̄`); -* `hproj` — `ProjOrdTransport` (multiplicity-free divisor pullback); -* `δ`/`hdc` — the divisor-pushforward dual `1 − V̄` and Silverman III.6.2(a) `δ ∘ φ = [#ker φ]`; -* `hsurj` — surjectivity over `K̄` (Silverman III.4.10a); -* `hkerdeg` — the separable degree match `#ker = deg` (Silverman III.4.10c); -* `hcomm'` — the translation covariance (Silverman III.8.2). - -These are the genuine geometric content of the base-changed separable isogeny; the project ships no -concrete base-change of a non-Frobenius isogeny's *point map* (only the witness-parametric -`mkBaseChange`), so they remain carried (cf. `ProjOrdTransport`/`Naturality` elsewhere). - -## References - -* Silverman, *The Arithmetic of Elliptic Curves*, II.2.11 (degree under base change), - III.4.10a/c, III.6.2(a), III.8.2, III.8.6.1. +References: Silverman, *The Arithmetic of Elliptic Curves*, II.2.11, +III.4.10, III.6.2(a), and III.8.2–6. -/ open WeierstrassCurve HasseWeil.Curves @@ -149,8 +100,7 @@ local notation "lTM" => Algebra.TensorProduct.map (AlgHom.id L L) f attribute [local instance] Algebra.TensorProduct.rightAlgebra /-- `eFwd` is surjective, from its action on pure tensors (`heFwd`) and the section `eInv` -(`heInv`). Stated with the forward/inverse maps as opaque parameters so it elaborates within the -default heartbeat budget. -/ +(`heInv`). The forward and inverse maps are explicit parameters. -/ private theorem twistLTensor_surjective [Module A (Twist (lTM))] [IsScalarTower A (L ⊗[F] A) (Twist (lTM))] (eFwd : ((L ⊗[F] A) ⊗[A] (Twist f)) →ₗ[L ⊗[F] A] (Twist (lTM))) @@ -164,7 +114,6 @@ private theorem twistLTensor_surjective [Module A (Twist (lTM))] refine ⟨eInv (Twist.toB (lTM) z), ?_⟩ apply Twist.toB_injective (lTM) induction (Twist.toB (lTM) z) with - | zero => simp only [map_zero]; rfl | add x y hx hy => rw [map_add, map_add, Twist.toB_add] rw [show Twist.toB (lTM) (eFwd (eInv x)) = x from hx, @@ -176,7 +125,7 @@ private theorem twistLTensor_surjective [Module A (Twist (lTM))] Algebra.TensorProduct.tmul_mul_tmul, mul_one, one_mul] /-- `eInv ∘ toB ∘ eFwd = id`, from the action on pure tensors. The left inverse, giving -injectivity of `eFwd`. Forward/inverse maps are opaque parameters for heartbeat budget. -/ +injectivity of `eFwd`. The forward and inverse maps are explicit parameters. -/ private theorem twistLTensor_leftInverse [Module A (Twist (lTM))] [IsScalarTower A (L ⊗[F] A) (Twist (lTM))] (eFwd : ((L ⊗[F] A) ⊗[A] (Twist f)) →ₗ[L ⊗[F] A] (Twist (lTM))) @@ -188,14 +137,9 @@ private theorem twistLTensor_leftInverse [Module A (Twist (lTM))] ∀ t : (L ⊗[F] A) ⊗[A] (Twist f), eInv (Twist.toB (lTM) (eFwd t)) = t := by intro t induction t with - | zero => rw [map_zero (f := eFwd), show Twist.toB (lTM) 0 = 0 from rfl, - map_zero (f := eInv)] | add x y hx hy => rw [map_add (f := eFwd), Twist.toB_add, map_add (f := eInv), hx, hy] | tmul w m => induction w with - | zero => - rw [TensorProduct.zero_tmul, map_zero (f := eFwd), - show Twist.toB (lTM) 0 = 0 from rfl, map_zero (f := eInv)] | add x y hx hy => rw [TensorProduct.add_tmul, map_add (f := eFwd), Twist.toB_add, map_add (f := eInv), hx, hy] @@ -222,9 +166,9 @@ equals the `A`-module finrank of `A` via `f`. Proved by exhibiting the `L ⊗ A private theorem finrank_lTensorMap_eq_finrank : @Module.finrank (L ⊗[F] A) (L ⊗[F] A) _ _ (lTM).toRingHom.toAlgebra.toModule = @Module.finrank A A _ _ f.toRingHom.toAlgebra.toModule := by - letI iA_TwL : Module A (Twist (lTM)) := + let iA_TwL : Module A (Twist (lTM)) := Module.compHom (Twist (lTM)) (algebraMap A (L ⊗[F] A)) - haveI iA_TwL_tower : IsScalarTower A (L ⊗[F] A) (Twist (lTM)) := + have iA_TwL_tower : IsScalarTower A (L ⊗[F] A) (Twist (lTM)) := SMul.comp.isScalarTower (algebraMap A (L ⊗[F] A)) let l : (Twist f) →ₗ[A] (Twist (lTM)) := { toFun := fun m ↦ Twist.ofB (lTM) (1 ⊗ₜ[F] Twist.toB f m) @@ -292,8 +236,7 @@ variable (L : Type*) [Field L] [Algebra F L] [Algebra.IsAlgebraic F L] /-- **The function-field scalar-extension iso** `Φ : (L ⊗_F K(C)) ≃ₐ[L] K(C_L)`, the composite of `functionField_tensor_locBaseChange` (`L ⊗ K(C) ≅ FractionRing (L ⊗ C.CR)`) and -`functionField_baseChange_fracEquiv` (`FractionRing (L ⊗ C.CR) ≅ K(C_L)`). Both are shipped -axiom-clean in `CurveMapBaseChange.lean`. -/ +`functionField_baseChange_fracEquiv` (`FractionRing (L ⊗ C.CR) ≅ K(C_L)`). These are the canonical tensor and fraction-field identifications. -/ noncomputable def tensorFunctionFieldEquiv : letI := C.isDomain_tensorCoordRing L (L ⊗[F] C.toAffine.FunctionField) ≃ₐ[L] (C.baseChange L).toAffine.FunctionField := @@ -307,7 +250,7 @@ noncomputable def lTensorMap (f : C.toAffine.FunctionField →ₐ[F] C.toAffine. (L ⊗[F] C.toAffine.FunctionField) →ₐ[L] (L ⊗[F] C.toAffine.FunctionField) := Algebra.TensorProduct.map (AlgHom.id L L) f -set_option linter.unusedSectionVars false in +omit [Algebra.IsAlgebraic F L] in @[simp] theorem lTensorMap_tmul (f : C.toAffine.FunctionField →ₐ[F] C.toAffine.FunctionField) (l : L) (u : C.toAffine.FunctionField) : @@ -355,10 +298,10 @@ theorem finrank_baseChangePullback_eq_finrank_lTensorMap (baseChangePullback C L f).toRingHom.toAlgebra.toModule = @Module.finrank (L ⊗[F] C.toAffine.FunctionField) (L ⊗[F] C.toAffine.FunctionField) _ _ (lTensorMap C L f).toRingHom.toAlgebra.toModule := by - letI := C.isDomain_tensorCoordRing L - letI algBcp : Algebra (C.baseChange L).toAffine.FunctionField + let := C.isDomain_tensorCoordRing L + let algBcp : Algebra (C.baseChange L).toAffine.FunctionField (C.baseChange L).toAffine.FunctionField := (baseChangePullback C L f).toRingHom.toAlgebra - letI algLt : Algebra (L ⊗[F] C.toAffine.FunctionField) (L ⊗[F] C.toAffine.FunctionField) := + let algLt : Algebra (L ⊗[F] C.toAffine.FunctionField) (L ⊗[F] C.toAffine.FunctionField) := (lTensorMap C L f).toRingHom.toAlgebra refine Algebra.finrank_eq_of_equiv_equiv (tensorFunctionFieldEquiv C L).symm.toRingEquiv (tensorFunctionFieldEquiv C L).symm.toRingEquiv ?_ @@ -380,7 +323,7 @@ def FinrankBaseChange (f : C.toAffine.FunctionField →ₐ[F] C.toAffine.Functio @Module.finrank C.toAffine.FunctionField C.toAffine.FunctionField _ _ f.toRingHom.toAlgebra.toModule -set_option linter.unusedSectionVars false in +omit [Algebra.IsAlgebraic F L] in /-- **The base-change-of-finrank fact, proved (curve-free).** For an `F`-algebra endomorphism `f` of the field `K(C)`, base change along `F → L` preserves the degree of the (injective) field endomorphism: `[L ⊗ K(C) : (id_L ⊗ f)(L ⊗ K(C))] = [K(C) : f(K(C))]`. -/ @@ -422,7 +365,7 @@ noncomputable def oneSubFrobeniusPullback_L (hq : 2 ≤ Fintype.card K) : /-- **Degree preservation for the concrete `1 − π` base change** (curve-free, fully discharged). Chains the proved conjugation step (inside `baseChangePullback_finrank_eq`, which now invokes the -proved `finrankBaseChange`) into the shipped witness-parametric +proved `finrankBaseChange`) into the corresponding `oneSubFrobeniusIsogBaseChange_degree_eq_of_finrank`. This **discharges the `hdeg_bc` field** of `OneSubScalingData` with no carried `FinrankBaseChange` hypothesis. -/ theorem oneSubFrobeniusIsogBaseChange_degree_eq_of_finrankBaseChange (hq : 2 ≤ Fintype.card K) : diff --git a/projects/HasseWeil/HasseWeil/Isogeny/Basic.lean b/projects/HasseWeil/HasseWeil/Isogeny/Basic.lean index 01ae90e29..fc74956a0 100644 --- a/projects/HasseWeil/HasseWeil/Isogeny/Basic.lean +++ b/projects/HasseWeil/HasseWeil/Isogeny/Basic.lean @@ -45,7 +45,7 @@ image of `x` has poles at the `n`-torsion). The current `pullback_ordAtInfty_nonneg` field captures "morphism is defined at the basepoint" (regular functions pull back to regular functions). It does not strictly capture `φ(O) = O` — that would require the strict-positive form -`0 < ord_∞ f → 0 < ord_∞ pullback f`. A future refinement may strengthen this. +`0 < ord_∞ f → 0 < ord_∞ pullback f`. ## References @@ -296,6 +296,7 @@ noncomputable def Isogeny.frobenius : Isogeny W W where · rw [(⟨W⟩ : Curves.SmoothPlaneCurve K).ordAtInfty_pow hf] exact nsmul_nonneg h _ +omit [DecidableEq K] in @[simp] theorem Isogeny.frobenius_pullback (f : W.FunctionField) : (Isogeny.frobenius W).toCurveMap.pullback f = f ^ Fintype.card K := congr_fun (FiniteField.coe_frobeniusAlgHom (K := K) (R := W.FunctionField)) f @@ -313,12 +314,14 @@ noncomputable def Isogeny.frobeniusCoordHom : (FiniteField.frobeniusAlgHom K W.CoordinateRing u) simp only [FiniteField.coe_frobeniusAlgHom, map_pow] +omit [DecidableEq K] in /-- The Frobenius isogeny has degree `q := #K`. Inherits from `HasseWeil.frobenius_finrank_functionField`. Reference: Silverman III.4.6. -/ @[simp] theorem Isogeny.frobenius_degree : (Isogeny.frobenius W).degree = Fintype.card K := HasseWeil.frobenius_finrank_functionField K W +omit [DecidableEq K] in /-- **Frobenius coordinate-evaluation step.** Evaluating a pulled-back coordinate-ring element `r` through the Frobenius coordinate hom at a smooth point `(x, y)` equals the `q`-th power (`q := #K`) of the plain evaluation: @@ -336,6 +339,7 @@ private theorem Isogeny.frobenius_evalAtPullback {x y : K} ⟨x, y, h⟩ (FiniteField.frobeniusAlgHom K W.CoordinateRing r) = _ simp only [FiniteField.coe_frobeniusAlgHom, map_pow] +omit [DecidableEq K] in /-- The Frobenius isogeny acts as the **identity** on `K`-rational points: for any `(x, y) ∈ W(K)`, Frobenius sends `(x, y) ↦ (x^q, y^q) = (x, y)` since `x^q = x` for all `x ∈ K` by `FiniteField.pow_card`. The basepoint is @@ -383,23 +387,17 @@ end Frobenius /-! ### Multiplication-by-`n` isogeny -The endomorphism `[n] : E → E` is constructed via the function-field pullback -`mulByInt_pullbackAlgHom` from `HasseWeil/MulByIntPullback.lean` (built from -division polynomials). +The endomorphism `[n] : E → E` is constructed from the division-polynomial +function-field pullback `mulByInt_pullbackAlgHom`. -The basepoint condition `pullback_ordAtInfty_nonneg` for `[n]` is genuinely -non-trivial — it requires the ramification-theoretic fact that -`ord_∞([n]*f) = e · ord_∞(f)` for some positive integer `e` (the local -ramification index of `[n]` at `O`). For now we expose this as an explicit -hypothesis (`mulByIntOfBasepoint`); a follow-up ticket will discharge it via -the existing `mulByInt_finrank` infrastructure or a dedicated valuation -extension argument. +The construction `mulByIntOfBasepoint` takes an explicit hypothesis that the +pullback preserves functions regular at infinity. The corresponding local +ramification formula is `ord_∞([n]*f) = e · ord_∞(f)` with positive ramification +index `e`. -Note that `[n]` does *not* admit a `coordHom` witness in the affine model — -its pullback of `x` is `Φ_n / Ψ_n²`, a fraction with poles at the -`n`-torsion. Hence `Isogeny.toPointMap` cannot be invoked for `mulByInt` -directly via the affine route; this is the design reason for separating -`coordHom` from the structure. -/ +For `n ≥ 2`, the pullback of `x` is `Φ_n / Ψ_n²`, with poles at the `n`-torsion. +Thus this projective morphism does not generally induce a map of affine +coordinate rings. -/ section MulByInt @@ -428,6 +426,7 @@ noncomputable def Isogeny.mulByIntOfBasepoint {n : ℤ} (hn : n ≠ 0) toCurveMap := { pullback := HasseWeil.mulByInt_pullbackAlgHom W n hn } pullback_ordAtInfty_nonneg := h_basepoint +omit [DecidableEq F] in @[simp] theorem Isogeny.mulByIntOfBasepoint_pullback {n : ℤ} (hn : n ≠ 0) (h_basepoint : MulByIntBasepoint W hn) (f : W.FunctionField) : (Isogeny.mulByIntOfBasepoint W hn h_basepoint).toCurveMap.pullback f = @@ -435,48 +434,14 @@ noncomputable def Isogeny.mulByIntOfBasepoint {n : ℤ} (hn : n ≠ 0) end MulByInt -/-! ### Universal group-homomorphism property: bundled `WithHom` isogenies +/-! ### Bundled group-homomorphism property -This is the working framework for **Silverman III.4.8** (every isogeny is a -group homomorphism). Silverman's argument uses `Pic⁰(E) ≅ E` and the -contravariant functoriality of the Picard variety on morphisms; alternative -routes go via the formal group of `E` or direct addition-formula computation. +The `WithHom` structure bundles an isogeny with an affine coordinate-ring map +and a proof of `AddHomProperty`. Identity, composition and Frobenius preserve +this data, yielding additive homomorphisms on rational points. -In our setup, the unconditional theorem is genuinely hard — it reduces to one -of those upstream infrastructures, none of which are fully in the project yet. -Instead, we package the **closure under standard constructions**: any isogeny -built from `id`, `compose`, and `frobenius` automatically carries an -`AddHomProperty`, hence a bundled `AddMonoidHom` on points. - -The `WithHom` bundle below is the canonical recipient of these closure -operations. Future extensions (mulByInt, neg, dual, factor-through-Frobenius, -…) should provide their own `WithHom` instances by discharging the -`AddHomProperty` witness. - -## Proof routes for the universal version - -Silverman's three known routes for the universal Silverman III.4.8: - -1. **Pic⁰ route** (Silverman III.4.8 proper). Uses - `σ : Pic⁰(E) ≅ E` (Silverman III.3.4) — gated on `T-III-3-004` in this - project. The induced pullback `φ_* : Pic⁰(E₁) → Pic⁰(E₂)` is a hom by - functoriality, and the diagram with σ commutes when `φ(O) = O`. - -2. **Formal-group route** (deformation argument). An isogeny pulls back to a - formal-group hom on `Ê`. The hom property holds on the formal neighborhood - of `O`, then extends to all of `E` by translation invariance and density. - Requires the bridge `HasseWeil.Isogeny → HasseWeil.FormalGroupHom`, not yet - built. - -3. **Addition-formula route** (direct computation). Use the explicit - `Affine.addX/addY` formulas; show that any `F`-algebra hom on `K(E)` that - restricts to coord rings preserves these (an algebra-homs-respect-rational- - functions argument). Requires `addPullbackAlgHom` from - `HasseWeil/AdditionPullback.lean` (currently has 3 transcendence sorries). - -All three reduce the universal claim to upstream infrastructure that is -modular: once any one route's gates are filled, `silvermanIII48_via_` -can be added as a one-liner taking the upstream output as a witness. -/ +Silverman III.4.8 proves the group-homomorphism property for isogenies using +`Pic⁰(E) ≅ E` and the functoriality of the Picard variety. -/ namespace Isogeny @@ -627,23 +592,6 @@ noncomputable def Isogeny.WithHom.frobenius show (Isogeny.frobenius W).toPointMap (Isogeny.frobeniusCoordHom W) P = P exact Isogeny.frobenius_toPointMap W P -/-! ### Future extensions (mulByInt, neg, dual) - -For each of the following, providing a `WithHom` instance requires both a -coord-ring lift (often non-trivial) and the `AddHomProperty` proof: - -* `mulByInt n` for `n ≥ 2`: the affine coord-ring lift doesn't naturally - exist (image of `x` is `Φₙ/Ψₙ²`, with poles at the `n`-torsion). Resolution - requires a localization-based `CoordHom` or a projective coord model. - -* `neg` (the `[-1]` isogeny): `(x, y) ↦ (x, -y - a₁x - a₃)`. Has a clean - affine coord-ring lift via `Affine.negY`. The `AddHomProperty` is - `-(P+Q) = -P + -Q`, which holds by `neg_add` on the abelian group `W.Point`. - Construction is straightforward in principle but requires explicit - `AlgHom` building from the negY formula on the function field. -* `dual α`: requires the existence-uniqueness of the dual isogeny - (Silverman III.6.1), gated on either Pic⁰ or kernel/factorization - infrastructure (`T-III-6-001` in the project ticket board). -/ end HasseWeil.EC diff --git a/projects/HasseWeil/HasseWeil/Isogeny/ClassGroup.lean b/projects/HasseWeil/HasseWeil/Isogeny/ClassGroup.lean index 9b2003a2e..5d5eaceb9 100644 --- a/projects/HasseWeil/HasseWeil/Isogeny/ClassGroup.lean +++ b/projects/HasseWeil/HasseWeil/Isogeny/ClassGroup.lean @@ -8,59 +8,12 @@ import HasseWeil.Foundation.Ramification import HasseWeil.Pic0.ClassGroupNorm /-! -# The isogeny ↔ class-group bridge (reusable Pic⁰ infrastructure) +An injective finite coordinate-ring pullback associated to an elliptic-curve +endomorphism induces extension and relative-norm maps on the ideal class group. +Their composite raises each class to the coordinate-ring extension degree. +A compatible fraction-field tower identifies this degree with the isogeny degree. -This file packages, for an endomorphism `α : Isogeny E E` of an elliptic curve `E`, the data and -lemmas needed to push `α` down to the ideal class group `ClassGroup E.CoordinateRing` and recover -the dual relation `α̂ ∘ α = [deg α]` at the level of `ClassGroup`. - -The function-field pullback `α.pullback : E.FunctionField →ₐ[F] E.FunctionField` does **not** in -general restrict to the coordinate ring `R := E.CoordinateRing` (this is the -integrality-preservation content of Silverman III.3.4, deliberately *not* discharged here). We -therefore carry the restriction as **data**, an `Isogeny.CoordHom`, mirroring -`Curves.CurveMap.CoordHom`. - -The deep obligations are carried as **hypotheses** (witness-parametric), not discharged universally: - -* injectivity of the coordinate-ring restriction (`hinj`), giving `FaithfulSMul`/`IsTorsionFree`; -* finiteness of `R` over itself through the restriction (`Module.Finite`), giving the `ClassGroup` - norm/extension maps and matching `α.degree` to the coordinate-ring `finrank`. - -These are instantiable per isogeny (e.g. Frobenius, multiplication-by-`n`); the universal versions -are separate, flagged-deep tickets. - -## Main definitions - -* `HasseWeil.Isogeny.CoordHom`: the coordinate-ring restriction witness for `α : Isogeny E E`. -* `HasseWeil.Isogeny.CoordHom.toAlgebra`: the induced `R`-algebra structure on `R`. -* `HasseWeil.Isogeny.classNorm` / `Isogeny.classMap`: the relative norm / extension maps on - `ClassGroup R` induced by a `CoordHom`. - -## Main results - -* `HasseWeil.Isogeny.degree_eq_finrank_coordinateRing_of_tower_eq`: `α.degree` equals the - coordinate-ring `finrank` of `ch.toAlgebra`, given a fraction-field tower witness for the - `ch`-twisted coordinate ring (witness-parametric, to sidestep a same-type instance diamond — see - the lemma's docstring). -* `HasseWeil.Isogeny.classNorm_comp_classMap`: `classNorm (classMap c) = c ^ (finrank R R)` — the - class-group shadow of `α̂ ∘ α = [deg α]`, exponent as the coordinate-ring degree. -* `HasseWeil.Isogeny.classNorm_comp_classMap_degree`: the same with exponent `α.degree` (combines - the previous two; carries the tower witness as hypotheses). - -## Design note - -The function-field pullback restricted to coordinate rings and lifted back to the fraction field -gives, on the *same* carriers `R` and `FF`, a *non-identity* algebra structure. Several would-be -"auto-derived" scalar towers (`R → R → FF`, `R → FF → FF`) are therefore **false** as stated with -the canonical base action, and `finrank_of_isFractionRing` cannot be applied with `S = R`, -`S' = FF` literally (the `IsFractionRing` typeclass cannot distinguish the canonical inclusion from -the twisted map). The deep obligations (injectivity `hinj`, finiteness `Module.Finite`, and the -fraction-field tower witness for the degree bridge) are consequently carried as **hypotheses**; -they are instantiable per isogeny (Frobenius, multiplication-by-`n`). - -## References - -* [Silverman, *The Arithmetic of Elliptic Curves*], III.3.4, III.4, III.6. +Reference: Silverman, *The Arithmetic of Elliptic Curves*, III.3.4. -/ open WeierstrassCurve Polynomial @@ -146,7 +99,7 @@ noncomputable def classNorm (ch : α.CoordHom) (hinj : Function.Injective ch.toA haveI hfinI : @Module.Finite E.CoordinateRing E.CoordinateRing _ _ ch.toAlgebra.toModule := hfin haveI htfI : @Module.IsTorsionFree E.CoordinateRing E.CoordinateRing _ _ ch.toAlgebra.toModule := ch.isTorsionFree hinj - @ClassGroup.relNorm E.CoordinateRing E.CoordinateRing _ _ _ _ _ _ _ _ ch.toAlgebra hfinI htfI + @ClassGroup.relNorm E.CoordinateRing E.CoordinateRing _ _ _ _ ch.toAlgebra hfinI htfI /-- The **extension map on the class group** induced by `α : Isogeny E E` and a coordinate-ring restriction witness `ch`, with the finiteness obligation carried as a hypothesis. @@ -160,7 +113,7 @@ noncomputable def classMap (ch : α.CoordHom) (hinj : Function.Injective ch.toAl haveI : @Module.Finite E.CoordinateRing E.CoordinateRing _ _ ch.toAlgebra.toModule := hfin haveI htfI : @Module.IsTorsionFree E.CoordinateRing E.CoordinateRing _ _ ch.toAlgebra.toModule := ch.isTorsionFree hinj - @ClassGroup.map E.CoordinateRing E.CoordinateRing _ _ _ _ _ _ ch.toAlgebra htfI + @ClassGroup.map E.CoordinateRing E.CoordinateRing _ _ _ _ ch.toAlgebra htfI /-- **Function-field ↔ coordinate-ring degree bridge (witness-parametric `_of_tower_eq` form).** @@ -168,23 +121,11 @@ The function-field degree `α.degree` equals the coordinate-ring degree `Module.finrank R R` (with `R` carrying `ch.toAlgebra`), *given* a fraction-field tower witness for the `ch`-twisted coordinate ring. -The deep obstruction (see the file-level note and the round report) is a genuine **same-type -instance diamond**: `Algebra.IsAlgebraic.finrank_of_isFractionRing` needs the source/target rings -`R, S` and their fraction fields `R', S'` to be *distinguishable type pairs* so that -`IsFractionRing R R'` and `IsFractionRing S S'` can coexist with the canonical inclusion (for `R'`) -and the `ch`-twisted map (for the `S → S'` tower) respectively. With `S = R` and `S' = R' = FF` -*literally*, Lean's instance resolution cannot keep the two `Algebra R FF` structures apart, even -though the required equation `α.pullback (algebraMap R FF r) = algebraMap R FF (ch.toAlgHom r)` is -exactly `ch.compat`. - -We therefore expose the bridge witness-parametrically: the caller supplies a *distinct nominal copy* -`S` of the `ch`-twisted coordinate ring together with its fraction field `S'` (a copy of -`E.FunctionField` carrying `α.toAlgebra`), the standard fraction-field tower instances, and the two -`Module.finrank`-transfer equalities `hSR`, `hS'FF` (each a `LinearEquiv.finrank_eq` away once the -copies are chosen). These are dischargeable per isogeny (Frobenius, multiplication-by-`n`). - -The conclusion is then a one-line application of `finrank_of_isFractionRing` between the four -distinct type slots `R, FF, S, S'`. -/ +The coordinate-ring algebra induced by the endomorphism differs from the +canonical algebra on the same carrier. Distinct nominal copies `S` and `S'` +represent the twisted coordinate ring and its fraction field. Compatible +scalar towers and the rank-transfer equalities `hSR` and `hS'FF` allow the +fraction-field rank theorem to compare their degrees. -/ theorem degree_eq_finrank_coordinateRing_of_tower_eq (ch : α.CoordHom) (S : Type*) [CommRing S] [Algebra E.CoordinateRing S] [FaithfulSMul E.CoordinateRing S] [Algebra.IsAlgebraic E.CoordinateRing S] [NoZeroDivisors S] @@ -197,7 +138,7 @@ theorem degree_eq_finrank_coordinateRing_of_tower_eq (ch : α.CoordHom) (hS'FF : @Module.finrank E.FunctionField S' _ _ _ = α.degree) : α.degree = @Module.finrank E.CoordinateRing E.CoordinateRing _ _ ch.toAlgebra.toModule := by rw [← hSR, ← hS'FF] - exact Algebra.IsAlgebraic.finrank_of_isFractionRing E.CoordinateRing E.FunctionField S S' + exact IsFractionRing.finrank_eq E.CoordinateRing E.FunctionField S S' /-- **The class-group dual relation (coordinate-ring `finrank` form).** @@ -209,17 +150,17 @@ the `ch.toAlgebra` structure): This is the class-group shadow of `α̂ ∘ α = [deg α]`, with the exponent expressed as the coordinate-ring degree. To express the exponent as `α.degree` (the function-field degree), compose with `degree_eq_finrank_coordinateRing_of_tower_eq` (the function-field ↔ coordinate-ring degree -bridge, separately flagged). -/ +bridge). -/ theorem classNorm_comp_classMap (ch : α.CoordHom) (hinj : Function.Injective ch.toAlgHom) (hfin : @Module.Finite E.CoordinateRing E.CoordinateRing _ _ ch.toAlgebra.toModule) (c : ClassGroup E.CoordinateRing) : α.classNorm ch hinj hfin (α.classMap ch hinj hfin c) = c ^ @Module.finrank E.CoordinateRing E.CoordinateRing _ _ ch.toAlgebra.toModule := by - letI := ch.toAlgebra - haveI hfinI : @Module.Finite E.CoordinateRing E.CoordinateRing _ _ ch.toAlgebra.toModule := hfin - haveI htfI : @Module.IsTorsionFree E.CoordinateRing E.CoordinateRing _ _ ch.toAlgebra.toModule := + let := ch.toAlgebra + have hfinI : @Module.Finite E.CoordinateRing E.CoordinateRing _ _ ch.toAlgebra.toModule := hfin + have htfI : @Module.IsTorsionFree E.CoordinateRing E.CoordinateRing _ _ ch.toAlgebra.toModule := ch.isTorsionFree hinj - exact @ClassGroup.relNorm_comp_map E.CoordinateRing E.CoordinateRing _ _ _ _ _ _ _ _ + exact @ClassGroup.relNorm_comp_map E.CoordinateRing E.CoordinateRing _ _ _ _ ch.toAlgebra hfinI htfI c /-- **The class-group dual relation (`α.degree` form).** diff --git a/projects/HasseWeil/HasseWeil/Isogeny/FormalSeries.lean b/projects/HasseWeil/HasseWeil/Isogeny/FormalSeries.lean index 0cabc394abc4ca7608ba92b737cb85363078b59b..dcd6e5526f0503f078f119bafd1bb4a80e1148f6 100644 GIT binary patch delta 8683 zcmbtaZHygN8P06CYnk#T+wHc1a7x>-OLuQ6ZH*SIEv2gq3oUdhl&0y-z4zREN9NAl z&dlBI@-=`MP=in==KdgjC{Z!~K`+UM!~`VP9~u=CqyJP0nt)M(A8H~oKJRn zS`@;^%sq3?`}w@@`<(vdxq*kDU-@Ex-=yQs*nwkvk*GSgnhc~DIkp>`=5#}fnjbW6 zSA;TfWGMWausz{~eqDNV_^OdeY?yar30C^TDb*Dc$XyXccBdHq6> z{IlzI*~IYg&$P$ z%J!=KO(4Uz8#!Jb3ua|trlQgpcgw&R72gXZ(k_y5&@3snD!#1MoQi|v^r56*AYD6> z>hN@*$mdhSitXBgD9?%6hEr+KyIe=R62TN6FI?K1B>`j3Z4q`Lg*@4U%pr`{4oPf0 zyAUNZGf7Fc#F!o&lwnC6YL`RUq#Zdp!SRxJ-Jw|2VTaJPt5vcH48~@L0bMu)Viwh- z%^a`VuJ8u%r)ZMB=uDemK_}ZY9WRn~8Km~f97JEYeEcYyb_@HkjTd z8`_bEI8L@C{^dm_b06$4Pqgv>F8rGNt|((;uI0m`AzaXGhY|U#A_H}p7Uf!#y#p(R zu_()ER!T1yEfluvds0+=;rWoO*>dMt)`}m%+AZI!lC9GKgRfIX)A*jUAv=_uvE8<^ zid_#R#F=#>cD5EATYI(G@i<6fxr*OJlp-TMGYtT1V&sldYrJfSh+u2mn3%KJ`;gTo z^VHi-oJ6rksY5b4K^6l7pGmg2ncD=S-YPjUD>B?A4mrt$Io1u$odd(lJ;l7>_)h-N zw=Q}2!gFKnu62g-SsCR4*s3JWFe)4_>d^7`mlZKNI#TF4VXD{%8pCHuDuVS$uwX*$Rd>`Yx&o) zwDbvl0p!Y3O&gaW3;;!;mr6dK=DjPMO&d|tom{hXMV}LPli{7K&Lg}+j49!||GK<3 z)YtZs*3)ZOh7G$V6MyKEiq%auUX$^+k=~XP0uFhVpT2eP@Q{Fkb=gQmAd(bwFtiE^JC+Rm3haVU4jB zt%@a(v8VyO>0(SVlLx2P0L;mWH77vAB2HXMCDb&f2R4mnf`RRaN2X_3gw zOtb8GjF-ri@vWx0b$lGCf^2QV6=@tqggX@Zsb@!)c5Oii1}ak|^{G;F%OfH=FtM)t z_1jv;Sr~rR?R{sl?D;i!oW-i-vLl<$;>f8ZGb{E^s6I)1m1B;gS6467EX3tugyoI} zah}|H?BbD11L!=C+(Ca8iLl*NmI!-WfXL@2fbd(F#0(NM1k?r52~pa^w(fRz6^nBw z9gEAKj#HV3gWM`@;QF)pDXSoP#{-YXsxD>+5|%9PEC5id=_91lQEoyrBxp6HJ`aEj zwVjF-vwqvHGV%ZyR2|WcC+B^Z7aV`F9TWo?ozgVyt$`hRR+c0_oRAi=uq7)_O?3sj zpY3Ut%wotlWHXdNk}R+_nrkH8p2aoJB1BIm)*)b;`w2sf^~&x%ai1~#WZ$afWbNFf z^{4(g@9Zk*!OBtqx*V9lisaD;Mbvc`9+je5a#0Jg7@|Y7=Ck{#F=rfYqi4|`AQZZiIwXX z#EzD2E;$i?W!WFQ{n1YcmjCrPci*@&Mja@W0f^FDPYW(G%}M2&IUY)E3_08yp$%U4 zn?irw(`TD$K-OXfi-ltZ1_uxQcmQwpXw72`DovK<7(xpZj*9v;ZwrZ1CHVVRaR9g@+n<( zG3=^3&H69Ki?knMCp3Jw+P&qGm-@C&Eiq2!0fmEDH9(i|VSkt4ZS7tbf(9@`8I_^M z5%tUpqUK+j{O5rSx-Wk1_XB1mkINIsU0I8gWyStMW#%=i;5!Bpc zst;jnru|&*OX3C2ECQNT$*srcZ~Qi%NcGg^OHaLw2|e-JxhQOhER3urrw#qkdR12 zDiJ-osN2#7FEdyY)=_WEwqpq4iIJn;u`zLU+p$qh4OIV&ou$gfdG+1YIXWD^=J$?S+(lw>+Blak@_YXc(+O?e6c~`&O zitaC-xp&q7@qJSN?zg*ZUbw$03?&(h zQy>en)V53vFmj|zP35f{z(|gPo$${10q;%JgA1Z003bMltd_)WGyx*HoiI6dddL{- zobrwJDX9lRt5^kYEwiVoNh4h;R7xMtxT+Nc9(OE^bFVhL0SlVK^3l*Sx{qC%1x2%jV2!?4b)e2)|Tb-WuZ*`sm8CazkAS z+9CjN#h|QJ7}Z!z5`BotoTw{a`MJ^WH=QW?!KI@6_g4qbiFG#$zFdzXL;*IA6RBru z{}ZpZbmZ`ORg6kxwspW#{dq=~S(A!>w?t05G9z_f&X>XB-4}lL&ia+iVs$%j{i?qo z1O7~M*V`MfCZWaAf(iB!1yh;~_q(psieR?eOOd}96Qd`OA$yX?-v04Ld9dkV?B4Uv z>AvL6A6?un|8>^||I4nMyRUxGzI5!P$di10!{DHGw>6GDN*QfdG3mTDIv=k$`UgJh zc0--ya^rV&ZL!EL$=*M&nSWFmj~iFz>BQ8srp{4D78cIVjaL{qD!X@{y23cPPN#h# z7#WH>ug)0j=Fi_~JigYL?wk_Fa7>*YF@$^pQxXRNm~*fF5Eb;~Yh7*?(Q#1s>~g-L zNSfBj)nnU6t(2fGT&$2}*-gb6E>dtcg4xEYqFJWP7g28WnG@WIhC#m_nRHhogBeXus}8(S z@-!YOOx#PwiuiR6^qL?fM5#+qoe|+e2CV?c>!|JG7l-L!BIc1;4geU#2%*k3;EVA!PE1asQz)P&+MMV5hdZH73))wM={;~)9cbBBy?o@aZwd#Sg%xLO_Ki^lN$ z!_&q~tM#%?^Ls4gjXwP-<~LW2%Bt*f4Xz=mG^dwKsx?batr$E+l~esj;Y{YsUC6d! z@Gb%GYgV}AX3P`fKO(Y~yb?QjYLUrY%hauCPz`7hC!_HIdjZJ7I@`j5W zEES`uH7GzgKSH6{d{f>ih^U$DA(|5VB;wgraUu}r!b z*$2L2rpps;!Op4sjG*$^1au z*kGJLO=<-`Bt;(^cHRpSh*LAh&a_yRB4hjf%QMEa{ppKi_ZZt3e3U%#^4iYs`;1G5 zEptoJu^RT0c>c=yf8S$F^{Gwfr|vh*{=qE#a|oC}@{sYDzH|KAabU?!ve}vZvhhKD zu*bfXL3XMl1%kS(Scb@^OSWEaFTa#Yz0*T)6A4^!Gn0SAJ?vll74nyPQ#6MZ8Xz|L zk0jIszugk9JzElsr6$Me$jw3tgFj&**AuXrD4!exJ!ev=E6xshRB>@b52r#9{MmvL zM62eX=Z+Yx%aDR=V>P$u4(KnArZ~R3Q87Po^)UnRv~P!v6hIkj4qH( R2C9z#kg;-JJZ5ZK@n1s&V=w>! diff --git a/projects/HasseWeil/HasseWeil/Isogeny/Frobenius/FunctionField.lean b/projects/HasseWeil/HasseWeil/Isogeny/Frobenius/FunctionField.lean index 6c27d435c..f83025581 100644 --- a/projects/HasseWeil/HasseWeil/Isogeny/Frobenius/FunctionField.lean +++ b/projects/HasseWeil/HasseWeil/Isogeny/Frobenius/FunctionField.lean @@ -15,43 +15,6 @@ import Mathlib.RingTheory.IsTensorProduct import HasseWeil.Foundation.Auxiliary.Universal import HasseWeil.Isogeny.FunctionField -/-! -# The Frobenius Isogeny via Function Fields - -We construct the q-th power Frobenius as a concrete isogeny `π : E → E` using the -function field pullback `π* : K(E) →ₐ[K] K(E)` given by `x ↦ x^q`. - -## Main Definitions - -* `HasseWeil.frobeniusIsogeny`: The Frobenius as a `PullbackIsogeny K W W`, with pullback - given by `frobeniusAlgHom K K(E)`. - -## Main Results - -* `HasseWeil.frobeniusIsogeny_degree`: The Frobenius isogeny has degree `q = #K`. -* `HasseWeil.frobeniusIsogeny_pow_mem_fieldRange`: pure inseparability of `K(E) / K(E)^q` - (Silverman II.2.11(b)), stated as a power-membership fact. -* `HasseWeil.frobeniusIsogeny_pullback_range`: the pullback image is exactly the `q`-th - powers in `K(E)` (Silverman II.2.11(a)). - -## Implementation notes - -The degree `[K(E) : K(E)^q] = q` is obtained from the tower law. Writing `x` for the image -of `X` in the coordinate ring, so `K(E) = K(x, y)`: - -* `[K(E) : K(x)] = 2` and `[K(E)^q : K(x^q)] = 2` (the Weierstrass equation is the minimal - polynomial of `y` over `K(x)`, and of `y^q` over `K(x^q)`); -* `[K(x) : K(x^q)] = q` (computed via `RatFunc.finrank_eq_max_natDegree`, after identifying - the Frobenius range in `RatFunc K` with `K⟮X^q⟯`); -* the tower law gives `[K(E) : K(E)^q] · 2 = 2 · q`, hence `[K(E) : K(E)^q] = q`. - -The Frobenius-twisted `Module.finrank` is reduced to the plain field extension `[K(E) : K(E)^q]` -via `Algebra.finrank_eq_of_equiv_equiv`. - -## References - -* [Silverman, *The Arithmetic of Elliptic Curves*][silverman2009], III.4.6, II.2.11 --/ open WeierstrassCurve FiniteField open scoped Polynomial @@ -98,7 +61,7 @@ private theorem frobenius_finrank_eq_fieldRange_finrank : (frobeniusAlgHom K W.toAffine.FunctionField).toRingHom x simp [AlgEquiv.ofInjective_apply] -/-- Explicit module instance: `K[X]` acts on `CoordinateRing` via the algebra structure. -/ + noncomputable instance coordinateRing_module : Module K[X] W.toAffine.CoordinateRing := @Algebra.toModule K[X] W.toAffine.CoordinateRing _ _ inferInstance @@ -107,7 +70,7 @@ instance coordinateRing_finite : Module.Finite K[X] W.toAffine.CoordinateRing := Module.Finite.of_basis (Affine.CoordinateRing.basis W.toAffine) omit [DecidableEq K] [Fintype K] [W.toAffine.IsElliptic] in -/-- The coordinate ring `K[x, y]/(W)` is a free `K[X]`-module of rank `2` (Silverman II.2). -/ + theorem finrank_coordinateRing_eq_two : Module.finrank K[X] W.toAffine.CoordinateRing = 2 := (Module.finrank_eq_card_basis (Affine.CoordinateRing.basis W.toAffine)).trans @@ -206,7 +169,7 @@ private theorem frobenius_fieldRange_ratFunc : obtain ⟨p, r, _hr, rfl⟩ : ∃ p r : K[X], algebraMap K[X] (RatFunc K) r ≠ 0 ∧ g = algebraMap K[X] (RatFunc K) p / algebraMap K[X] (RatFunc K) r := ⟨g.num, g.denom, RatFunc.algebraMap_ne_zero g.denom_ne_zero, g.num_div_denom.symm⟩ - simp only [div_pow, ← map_pow, ← FiniteField.expand_card (K := K)] + simp only [div_pow, ← map_pow, ← FiniteField.Polynomial.expand_card (K := K)] have hmem : ∀ f : K[X], algebraMap K[X] (RatFunc K) (Polynomial.expand K q f) ∈ A := by intro f have h_amap : ∀ g : K[X], @@ -340,8 +303,8 @@ private theorem finrank_over_frobenius_image : lia omit [DecidableEq K] [W.toAffine.IsElliptic] in -/-- **Core algebraic fact**: `[K(E) : K(E)^q] = q`, where the module structure on `K(E)` over -itself is via the `q`-th power Frobenius (Silverman II.2.11(a)). -/ + + theorem frobenius_finrank_functionField : @Module.finrank W.toAffine.FunctionField W.toAffine.FunctionField _ _ (frobeniusAlgHom K W.toAffine.FunctionField).toRingHom.toAlgebra.toModule = diff --git a/projects/HasseWeil/HasseWeil/Isogeny/Frobenius/OrdAtInfty.lean b/projects/HasseWeil/HasseWeil/Isogeny/Frobenius/OrdAtInfty.lean index 166040c82..a3a20a730 100644 --- a/projects/HasseWeil/HasseWeil/Isogeny/Frobenius/OrdAtInfty.lean +++ b/projects/HasseWeil/HasseWeil/Isogeny/Frobenius/OrdAtInfty.lean @@ -10,23 +10,19 @@ import HasseWeil.Foundation.EC.GenericPointZsmul import HasseWeil.Foundation.EC.MulByIntBaseCase /-! -# Frobenius-specialized addition-pullback ord-at-infinity computations +# Orders at infinity for Frobenius addition -For `α = frobeniusIsog W` (the Frobenius endomorphism over a finite field -`K` with `q = #K ≥ 2`), we compute the order at infinity of the addition- -formula slope and related quantities. These are the building blocks for the -pole bound `ord_∞(addPullback_x W (frobeniusIsog W)) ≤ -2`, which closes -Sorry 1 of `HasseWeil/AdditionPullback.lean` for the case actually used by -HOLE D in the unconditional Hasse-Weil bound. +For Frobenius `π` over a finite field of size `q`, the coordinate differences +have orders `−2q` and `−3q`, so their slope has order `−q`. Clearing the +addition-formula denominator and reducing by the Weierstrass equation gives +the precise coordinate pole orders. -## Main lemmas +The same arguments apply to negative Frobenius and the pencil `r·π − s·id`. +Curve-negation invariance places the summed x-coordinate in `K(x)`; its pole +then proves transcendence and the injectivity required for the function-field +pullback. -* `ordAtInfty_addSlope_frobenius`: `ord_∞(L) = -q` where `L = addSlope W π`. -* `ordAtInfty_addSlope_sq_frobenius`: `ord_∞(L²) = -2q`. - -## References - -* Silverman, *The Arithmetic of Elliptic Curves*, IV.1 (orders at infinity). +Reference: Silverman, *The Arithmetic of Elliptic Curves*, IV.1. -/ open WeierstrassCurve HasseWeil.Curves @@ -64,7 +60,7 @@ theorem addSlope_frobenius_eq : simp only [addSlope] exact Affine.slope_of_X_ne (x_gen_ne_frobeniusIsog_pullback_x_gen W) -/-- `ord_∞(x_gen − π·x) = -2q` (sign-flipped form of the previously-shipped +/-- `ord_∞(x_gen − π·x) = -2q` (sign-flipped form of the corresponding `ordAtInfty_frobeniusIsog_pullback_x_gen_sub_x_gen`). -/ theorem ordAtInfty_x_gen_sub_frobeniusIsog_pullback_x_gen : (W_smooth W).ordAtInfty (x_gen W - (frobeniusIsog W).pullback (x_gen W)) = @@ -98,7 +94,7 @@ theorem x_gen_sub_frobeniusIsog_pullback_x_gen_ne_zero : exact WithTop.coe_ne_top h_top /-- **`ord_∞(addSlope W π) = -q`** where `q = #K`. Direct from -`ordAtInfty_div_of_ord_eq` with the shipped sub-ord lemmas. -/ +`ordAtInfty_div_of_ord_eq` with the sub-ord lemmas. -/ theorem ordAtInfty_addSlope_frobenius : (W_smooth W).ordAtInfty (addSlope W (frobeniusIsog W)) = ((-(Fintype.card K : ℤ)) : WithTop ℤ) := by @@ -131,9 +127,8 @@ theorem ordAtInfty_addSlope_sq_frobenius : push_cast ring -/-- **Witness-parametric Sorry 1 closure for the Frobenius case** (Path Y): -given a pole hypothesis on `addPullback_x W (frobeniusIsog W)`, derive False -from `addPullback_x = algebraMap K _ c`. -/ +/-- A pole of the Frobenius addition x-coordinate rules out every constant + value in the base field. -/ theorem addPullback_x_ne_const_frobenius_of_pole (hxy : AddNonInverse W (frobeniusIsog W)) (h_pole : @@ -142,7 +137,7 @@ theorem addPullback_x_ne_const_frobenius_of_pole False := addPullback_x_ne_const_of_pole hxy c h_pole hc -/-! ### Path X-prime: pole bound for q ≥ 3 with cancellation witness +/-! ### pole bound for q ≥ 3 with cancellation witness `addPullback_x = L² + a₁L - a₂ - x_gen - π·x`. Regroup as `(L² - π·x) + (a₁L - a₂ - x_gen)`. The right group has ord exactly `-q` @@ -231,26 +226,14 @@ private theorem ordAtInfty_add_le_neg_two {A B : KE} (hq : 3 ≤ Fintype.card K) have : (3 : ℤ) ≤ (Fintype.card K : ℤ) := by exact_mod_cast hq linarith -/-- **Pole bound for q ≥ 3 with cancellation witness** (Path X-prime, -**SUPERSEDED**): `ord_∞(addPullback_x W π) ≤ -2`, given the structural -witness `ord(L² - π·x) ≠ -q`. - -**Status: SUPERSEDED.** The hypothesised witness is unprovable when -`a₁ ≠ 0`. Direct term-by-term ord arithmetic on the `(y - π·y)² -- π·x · (x - π·x)²` numerator shows that the term `-a₁·π·x·π·y` at -ord `-5q` is the unique smallest (when `a₁ ≠ 0`), forcing -`ord(L² - π·x) = -q` exactly. So `lt_or_gt_of_ne h_witness` cannot -be applied: the witness is false in the case it is supposed to discharge. - -The replacement is the direct numerator-of-`addPullback_x` analysis -shipped below as `addPullbackNumerator_frobenius`, which sidesteps the -`L² - π·x` regrouping entirely. The lemmas immediately below are kept -for now to preserve a stable API in case downstream callers reference -them, but should not be used to close Sorry 1. - -The witness-parametric form remains formally true (vacuously, since -the witness premise is unsatisfiable in the relevant case) but yields -no usable closure. -/ +/-- A pole bound under the additional cancellation witness + `ord(L² − π·x) ≠ −q`. + + When `a₁ ≠ 0`, direct numerator comparison forces + `ord(L² − π·x) = −q`: the term `−a₁·π·x·π·y` has uniquely minimal + order `−5q`. Thus the extra witness excludes that situation. The + reduced-numerator argument gives the coordinate pole without this + witness. -/ theorem addPullback_x_pole_frobenius_of_lc_witness (hq : 3 ≤ Fintype.card K) (ha1 : W.toAffine.a₁ ≠ 0) (ha2 : W.toAffine.a₂ ≠ 0) @@ -286,7 +269,7 @@ theorem addPullback_x_pole_frobenius_of_lc_witness ordAtInfty_a1L_minus_a2_minus_xgen_frobenius W hq ha1 ha2 exact ordAtInfty_add_le_neg_two W hq h_ord_B h_witness -/-- **Sorry 1 closure for Frobenius case (q ≥ 3)** with leading-coefficient +/-- **Nonconstancy from the coordinate pole for Frobenius case (q ≥ 3)** with leading-coefficient witness. Composes the pole bound with `addPullback_x_ne_const_frobenius_of_pole`. -/ theorem addPullback_x_ne_const_frobenius_q_ge_3_of_witness (hq : 3 ≤ Fintype.card K) @@ -305,36 +288,19 @@ theorem addPullback_x_ne_const_frobenius_q_ge_3_of_witness exact_mod_cast (by norm_num : (-2 : ℤ) < 0) exact addPullback_x_ne_const_frobenius_of_pole W hxy h_pole c hc -/-! ### Direct numerator approach (replaces the broken `_lc_witness` path) - -The witness `ord(L² - π·x) ≠ -q` is unprovable because `ord(L² - π·x) = -q` -exactly when `a₁ ≠ 0` (the case of interest). Instead we work directly with -the numerator of `addPullback_x · (x - π·x)²`. - -Multiplying the addition formula `addPullback_x = L² + a₁·L - a₂ - x_gen - π·x` -through by `(x - π·x)²` (using `L = (y - π·y)/(x - π·x)`) yields the polynomial- -shaped element - -``` -T₁ + T₂ - T₃ - with T₁ = (y_gen - π·y)², - T₂ = a₁ · (x_gen - π·x) · (y_gen - π·y), - T₃ = (x_gen - π·x)² · (a₂ + x_gen + π·x). -``` +/-! ### Clearing the addition denominator -The `ord_∞` values, for `q ≥ 2`: +Multiplying `L² + a₁L − a₂ − x − π·x` by `(x − π·x)²` gives +`T₁ + T₂ − T₃`, with +`T₁ = (y − π·y)²`, `T₂ = a₁(x − π·x)(y − π·y)` and +`T₃ = (x − π·x)²(a₂ + x + π·x)`. +Their orders are `−6q`, `−5q` (when `a₁ ≠ 0`) and `−6q`. -| term | ord | -|------|------| -| `T₁` | `-6q` | -| `T₂` | `-5q` (when `a₁ ≠ 0`) | -| `T₃` | `-6q` | - -The leading-coefficient analysis at `-6q` (deferred to a follow-up session) -gives `lc(T₁) + lc(-T₃) = 2·c_x^{3q} ≠ 0` in characteristic `≠ 2`, hence -`ord(T₁ + T₂ - T₃) = -6q` and `ord(addPullback_x) = -6q + 4q = -2q < 0`. - -These lemmas ship the term-ord half of the analysis. -/ +The Weierstrass equation reduces this numerator so that `x(π·x)²`, of +order `−2 − 4q`, strictly dominates the remaining terms. Since the +squared denominator has order `−4q`, the summed x-coordinate has order +`−2`, in every characteristic. +-/ /-- The denominator `y_gen − π·y` is nonzero (its ord is finite). -/ theorem y_gen_sub_frobeniusIsog_pullback_y_gen_ne_zero : @@ -396,7 +362,7 @@ theorem addPullbackNumerator_frobenius_eq : ring /-- **`ord_∞(T₁) = -6q`** where `T₁ = (y_gen − π·y)²` and `q = #K`. -Direct from `ordAtInfty_pow_of_ord_eq` applied to the shipped +Direct from `ordAtInfty_pow_of_ord_eq` applied to `ordAtInfty_y_gen_sub_frobeniusIsog_pullback_y_gen`. -/ theorem ordAtInfty_T1_frobenius : (W_smooth W).ordAtInfty @@ -411,7 +377,7 @@ theorem ordAtInfty_T1_frobenius : ring /-- **`ord_∞(T₂) = -5q`** where `T₂ = a₁·(x_gen − π·x)·(y_gen − π·y)` -and `a₁ ≠ 0`. Multiplicativity of `ord_∞` plus the shipped sub-ord lemmas. -/ +and `a₁ ≠ 0`. Multiplicativity of `ord_∞` plus the sub-ord lemmas. -/ theorem ordAtInfty_T2_frobenius (ha₁ : W.toAffine.a₁ ≠ 0) : (W_smooth W).ordAtInfty (algebraMap K KE W.toAffine.a₁ * @@ -551,7 +517,7 @@ a polynomial-shaped expression whose unique smallest-order term is `x_gen · (π·x)²` at order `-2 - 4q`. This reduction yields `ord_∞(addPullback_x) = -2` (independent of q!), -which immediately closes Sorry 1 for `q ≥ 3` in **any characteristic** +which immediately closes the nonconstancy condition for `q ≥ 3` in **any characteristic** (the `x_gen · (π·x)²` term has coefficient `1`, never vanishing). -/ /-- The Weierstrass-reduced form of `addPullbackNumerator_frobenius`. @@ -651,7 +617,7 @@ than `x_gen · (π·x)²` has `ord_∞ ≥ -3 - 3q`. The dominant term has `ord_∞ = -2 - 4q`. Since `-3 - 3q > -2 - 4q` for `q ≥ 2`, strict non-archimedean additivity gives `ord(reduced) = -2 - 4q`. -/ -omit [Fintype K] in +omit [Fintype K] [WeierstrassCurve.IsElliptic W.toAffine] in /-- Helper: `ord(algebraMap c · f) ≥ ord(f)`. The `algebraMap K KE c` factor never makes the order more negative — when `c = 0` the product is zero (ord `⊤`), and when `c ≠ 0` the algebraMap value has ord 0. -/ @@ -860,6 +826,7 @@ private lemma ord_a4_mul_x_add_pi_x_ge (hq : 2 ≤ Fintype.card K) : rw [ord_x_gen_add_pi_x_eq W hq] exact WithTop.coe_le_coe.mpr h_int +omit [WeierstrassCurve.IsElliptic W.toAffine] in /-- Helper: `ord_∞(2 · a₆) ≥ -3 - 3q` for `q ≥ 2`. -/ private lemma ord_two_mul_a6_ge (hq : 2 ≤ Fintype.card K) : (((-3 - 3 * (Fintype.card K : ℤ)) : ℤ) : WithTop ℤ) ≤ @@ -1020,7 +987,7 @@ theorem ordAtInfty_addPullbackNumerator_reduced_frobenius_eq ((W_smooth W).ordAtInfty_add_eq_of_lt (ord_dom_lt_rest W hq)).trans (ord_x_gen_mul_pi_x_sq_eq W) -/-! ### Sorry 1 closure for Frobenius case (q ≥ 2, any characteristic) -/ +/-! ### Nonconstancy from the coordinate pole for Frobenius case (q ≥ 2, any characteristic) -/ /-- **`ord_∞(addPullback_x W π) = -2`** for `q ≥ 2` (any characteristic). @@ -1061,7 +1028,7 @@ theorem ord_addPullback_x_frobenius (hq : 2 ≤ Fintype.card K) : congr 1 ring -/-- **Sorry 1 closure for the Frobenius case** (`q ≥ 2`, any characteristic): +/-- **Nonconstancy from the coordinate pole for the Frobenius case** (`q ≥ 2`, any characteristic): `addPullback_x W (frobeniusIsog W)` is not the image of any constant `c ∈ K`. Direct from `ord_addPullback_x_frobenius` (which gives `ord = -2 < 0`, @@ -1074,44 +1041,21 @@ theorem addPullback_x_ne_const_frobenius rw [ord_addPullback_x_frobenius W hq] exact_mod_cast (by norm_num : (-2 : ℤ) < 0) -/-- **Inequality wrapper** for `ord_addPullback_x_frobenius`. - -Some downstream consumers (CLOSE-A-1 ticket spec) want the `≤ -2` form -rather than the equality. Trivial corollary. -/ +/-- The Frobenius addition x-coordinate has order at most minus two. -/ theorem ordAtInfty_addPullback_x_frobenius_le_neg_two (hq : 2 ≤ Fintype.card K) : (W_smooth W).ordAtInfty (addPullback_x W (frobeniusIsog W)) ≤ ((-2 : ℤ) : WithTop ℤ) := (ord_addPullback_x_frobenius W hq).le -/-! ### `negFrobeniusIsog`: the `−π` isogeny (HOLE-D-bound work, Day 1) - -For HOLE D, we ultimately need the addition-pullback for `1 − π`, which -is `id + α` with `α = −π`. The `−π` isogeny is constructed as the -composition `[-1] ∘ π` via the existing `Isogeny.comp` and `mulByInt _ (-1)`. - -By `Isogeny.comp_algebraMap_eq`, the resulting pullback is -`f ↦ frobeniusIsog.pullback (mulByInt _ (-1)).pullback f`. For the two -generators: -* `(negFrobeniusIsog W).pullback (x_gen W)` reduces to - `(frobeniusIsog W).pullback (x_gen W) = π·x_gen` (since `[-1]` fixes - `x_gen`). -* `(negFrobeniusIsog W).pullback (y_gen W)` reduces to - `(frobeniusIsog W).pullback (negY x_gen y_gen) = - (frobeniusIsog W).pullback (-y_gen - a₁·x_gen - a₃)`. By Frobenius - being a ring hom and `a_i^q = a_i` in `K = F_q`, this equals - `-π·y_gen - a₁·π·x_gen - a₃` in any characteristic (in char 2 the - signs are no-ops). - -Both pullbacks have the same `ord_∞` as the Frobenius case (`-2q` and -`-3q` respectively), so the term-ord chain shipped earlier in this file -templates over to `negFrobeniusIsog` with name-prefix swaps. The reduced- -numerator analysis (Weierstrass identity certificate) also carries -forward, since `(π·x_gen, negY π·x π·y)` is on the curve by `equation_neg`. - -This file ships only the structural definition tonight. The Day 2 work -(ord lemmas + pullback formulas + Sorry 1 closure for `α = -π`) is -factored separately and reuses the existing helpers verbatim. -/ +/-! ### Negative Frobenius + +The isogeny `−π` is the composition `[-1] ∘ π`. Its pullback sends +`x` to `π·x` and `y` to `−π·y − a₁·π·x − a₃`, in every characteristic. +These coordinates have orders `−2q` and `−3q`. The Weierstrass equation +for the negated point gives the corresponding reduced-numerator pole +calculation for `1 − π`. +-/ /-- The `-π` isogeny as `[-1] ∘ π`, via `Isogeny.comp` of the existing `mulByInt _ (-1)` and `frobeniusIsog W` isogenies. -/ @@ -1131,6 +1075,7 @@ theorem negFrobeniusIsog_toAddMonoidHom_apply (P : W.toAffine.Point) : rw [mulByInt_apply] exact (neg_one_zsmul _).trans rfl +omit [Fintype K] in /-- The `[-1]`-pullback sends `y_gen` to `negY x_gen y_gen = -y_gen − a₁·x_gen − a₃` (the curve-negation formula). @@ -1188,7 +1133,7 @@ theorem negFrobeniusIsog_pullback_y_gen : simp only [map_sub, map_neg, map_mul, AlgHom.commutes (frobeniusIsog W).pullback] -/-! ### `ord_∞` lemmas for the negFrobeniusIsog pullbacks (Day 2 first half) +/-! ### `ord_∞` lemmas for the negFrobeniusIsog pullbacks With the pullback formulas in place, the ord values match the Frobenius case: @@ -1265,7 +1210,7 @@ theorem ordAtInfty_negFrobeniusIsog_pullback_y_gen exact ordAtInfty_sub_eq_of_coe_lt_le W h_lt_q h_neg_πy (a1_pi_x_plus_a3_ge_neg_two_q W hq) -/-! ### addPullbackNumerator for negFrobenius (Day 2 second half opener) +/-! ### addPullbackNumerator for negFrobenius Mirrors the Frobenius numerator + reduction identity, with `α = negFrobeniusIsog W` instead of `α = frobeniusIsog W`. The (u, v) point used in the reduction is @@ -1640,7 +1585,7 @@ theorem ordAtInfty_addPullbackNumerator_reduced_negFrobenius_eq ((W_smooth W).ordAtInfty_add_eq_of_lt (ord_dom_lt_negFrob_rest W hq)).trans (ord_x_gen_mul_negFrob_pi_x_sq_eq W) -/-! ### Sorry 1 closure for the negFrobenius case (Day 2 final) +/-! ### Nonconstancy from the coordinate pole for the negFrobenius case `ord(addPullback_x W (-π)) = -2` follows by dividing the reduced numerator (ord = -2 - 4q) through `(x_gen − negFrob.pb x_gen)²` (ord = -4q). Then @@ -1740,12 +1685,11 @@ theorem ord_addPullback_x_negFrobenius (hq : 2 ≤ Fintype.card K) : congr 1 ring -/-- **Sorry 1 closure for the negFrobenius case** (`q ≥ 2`, any characteristic): +/-- **Nonconstancy from the coordinate pole for the negFrobenius case** (`q ≥ 2`, any characteristic): `addPullback_x W (negFrobeniusIsog W)` is not the image of any constant `c ∈ K`. Direct from `ord_addPullback_x_negFrobenius` (which gives `ord = -2 < 0`, -a pole) plus `addPullback_x_ne_const_of_pole`. This is the closure needed -for HOLE D's `1 − π` use case (since `1 − π = id + (-π)`). -/ +a pole) plus `addPullback_x_ne_const_of_pole`. For `1 − π`, the addition formula is `id + (−π)`. -/ theorem addPullback_x_ne_const_negFrobenius (hq : 2 ≤ Fintype.card K) (hxy : AddNonInverse W (negFrobeniusIsog W)) (c : K) @@ -1754,11 +1698,7 @@ theorem addPullback_x_ne_const_negFrobenius rw [ord_addPullback_x_negFrobenius W hq] exact_mod_cast (by norm_num : (-2 : ℤ) < 0) -/-- **Inequality wrapper** for `ord_addPullback_x_negFrobenius`. - -Companion to `ordAtInfty_addPullback_x_frobenius_le_neg_two` for the -`−π` (negFrobenius) case — the load-bearing case for HOLE D's `1 − π` -analysis. Trivial corollary of the equality form. -/ +/-- The Frobenius addition x-coordinate has order at most minus two. -/ theorem ordAtInfty_addPullback_x_negFrobenius_le_neg_two (hq : 2 ≤ Fintype.card K) : (W_smooth W).ordAtInfty (addPullback_x W (negFrobeniusIsog W)) ≤ @@ -1838,7 +1778,7 @@ private theorem ord_RHS_lower_ge_neg_four_negFrobenius exact ord_add_ge_of_both_ge W (ord_add_ge_of_both_ge W h_a₂_term h_a₄_term) h_a₆_term -omit [Fintype K] in +omit [Fintype K] [WeierstrassCurve.IsElliptic W.toAffine] in /-- Helper: `ord(a₆) ≥ 0` (where `a₆` is a constant in K, viewed in KE). -/ private theorem ord_a₆_ge_zero : (0 : WithTop ℤ) ≤ (W_smooth W).ordAtInfty @@ -2181,66 +2121,25 @@ theorem ord_addPullback_y_negFrobenius (hq : 2 ≤ Fintype.card K) : have h_m_eq : m = -3 := by omega exact_mod_cast h_m_eq -/-! ### Day 3a: addPullbackAlgHom for the negFrobenius case - -The existing `addPullbackAlgHom W α hxy hinj` construction -(`HasseWeil.AdditionPullback`) is generic over `α`. For HOLE D we want -this for `α = negFrobeniusIsog W`. The injectivity input -`hinj : Function.Injective (addCoordAlgHom hxy)` was generically -provided by a sorry-bearing `addCoordAlgHom_injective` chain (general-`α` -transcendence of `addPullback_x` resting on an open III.3.6 pole witness) — -that chain has since been **removed**; only the witness-parametric and -negFrobenius forms remain. - -We ship `addPullbackAlgHom_negFrobenius_of_inj` as a **witness-parametric -form** taking the (axiom-clean) injectivity proof as a hypothesis. -Discharging this hypothesis axiom-clean for `α = negFrobeniusIsog W` -requires one of: - -1. Closing Sorry 2 + Sorry 3 generically (~350 LOC, mathlib `minpoly` - machinery). - -2. A negFrobenius-specific σ-invariance argument: prove - `(mulByInt W (-1)).pullback (addPullback_x W (negFrobeniusIsog W)) - = addPullback_x W (negFrobeniusIsog W)`. This says addPullback_x is - fixed by the curve-negation involution `σ : K(E) → K(E)`. By Galois - theory (K(E) over K(x) is degree-2, σ generates the Galois group), - σ-fixed elements lie in `K(x) = F(x_gen)`, which discharges the - `px ∉ F(x_gen)` case of the transcendence argument for the - negFrobenius case. Then `addPullback_x_ne_const_negFrobenius` - closes Case 1, completing the chain. - -Path 2 is more focused (~100-200 LOC) and closes only what HOLE D -needs. The σ-invariance lemma proof structure: apply -`(mulByInt W (-1)).pullback` to the addX formula -`addPullback_x = L² + a₁L − a₂ − x_gen − π·x`, distribute the AlgHom -over operations, substitute known values: -* `(mulByInt W (-1)).pullback x_gen = x_gen` (`mulByInt_pullback_x_neg_one`). -* `(mulByInt W (-1)).pullback y_gen = −y_gen − a₁·x_gen − a₃` - (`mulByInt_pullback_y_neg_one`). -* `(mulByInt W (-1)).pullback (π·x_gen) = π·x_gen` (since `π·x_gen - = x_gen^q` and AlgHom preserves powers and fixes `x_gen`). -* `(mulByInt W (-1)).pullback (π·y_gen) = -π·y - a₁·π·x - a₃` (via - Frobenius distributing over `−y − a₁·x − a₃` in char p, with - `a^q = a` in `K = F_q`). - -Substituting and using `(σ(L_neg)+L_neg) = -a₁` (a curve-arithmetic -identity, computable via `field_simp; ring` after the algebra-hom -rewrites), we get `σ(L_neg² + a₁·L_neg) = L_neg² + a₁·L_neg`. The -remaining terms in addPullback_x (`a₂`, `x_gen`, `π·x_gen`) are all -σ-fixed. So addPullback_x is σ-invariant. ∎ -/ - -/-- Witness-parametric `addPullbackAlgHom` for `α = negFrobeniusIsog W`, -parametric on the `addCoordAlgHom hxy`-injectivity hypothesis. Once -that hypothesis is dischargeable axiom-clean (via Path 2 above or -Sorry 2 + Sorry 3 closure), the resulting algebra-hom feeds the -`isogOneSub` placeholder replacement and closes HOLE D. -/ +/-! ### Injectivity of the negative-Frobenius addition pullback + +Curve negation fixes `x` and sends `y` to `−y − a₁x − a₃`. Applying it to +the negative-Frobenius slope gives `σ(L) + L = −a₁`, hence fixes +`L² + a₁L` and the summed x-coordinate. The fixed field is `K(x)`. +An algebraic element of this rational function field is constant, whereas +the summed x-coordinate has a pole. It is therefore transcendental over +`K`, which proves injectivity of its polynomial evaluation homomorphism +and then of the coordinate-ring homomorphism. +-/ + +/-- The function-field addition pullback for negative Frobenius, given + injectivity of the coordinate-ring homomorphism. -/ noncomputable def addPullbackAlgHom_negFrobenius_of_inj (hxy : AddNonInverse W (negFrobeniusIsog W)) (hinj : Function.Injective (addCoordAlgHom hxy)) : KE →ₐ[K] KE := addPullbackAlgHom hxy hinj -/-! ### σ-invariance lemmas (Path 2 to discharge `hinj` axiom-clean) -/ +/-! ### Curve-negation invariance -/ /-- **σ-invariance Step 1**: `σ(π·y_gen) = (negFrobeniusIsog W).pullback (y_gen W)` where @@ -2360,7 +2259,7 @@ theorem addPullback_x_negFrobenius_sigma_invariant : /-! ### Galois group identification: {1, σ} on K(E)/K(x) -Day 3a-final opener. To deduce that σ-fixed elements lie in K(x), we +To deduce that σ-fixed elements lie in K(x), we need to know that {1, σ} is the full Galois group of K(E)/K(x). The two structural facts: @@ -2370,6 +2269,7 @@ The two structural facts: Combined with `[K(E) : K(x)] = 2`, this is the full Galois group. -/ +omit [Fintype K] in /-- **σ has order 2**: `(mulByInt W (-1)).pullback.comp (mulByInt W (-1)).pullback = AlgHom.id`. The Galois-group order-2 statement, derived from the isogeny identity `[-1] ∘ [-1] = [1]` (`mulByInt_comp_eq_mul`) plus @@ -2395,6 +2295,7 @@ theorem mulByInt_neg_one_pullback_comp_self : from rfl] at h_pb rw [h_pb, mulByInt_one_pullback_eq_id] +omit [Fintype K] in /-- **σ ∘ σ = id pointwise**: for any `z ∈ KE`, `(mulByInt W (-1)).pullback ((mulByInt W (-1)).pullback z) = z`. -/ theorem mulByInt_neg_one_pullback_pow_two_apply (z : KE) : @@ -2413,6 +2314,7 @@ forces non-triviality). In characteristic 2 we need the discriminant: a curve with `a₁ = a₃ = 0` would have `Δ = 0` (by `Δ_of_char_two`), contradicting `[IsElliptic]`. -/ +omit [Fintype K] in /-- **σ ≠ id in characteristic 2**: the curve-negation involution `σ = (mulByInt W (-1)).pullback` does not fix `y_gen`. @@ -2481,6 +2383,7 @@ private lemma two_K_eq_zero_of_two_fractionRing rw [map_zero, map_ofNat] exact h +omit [Fintype K] in /-- **σ ≠ id in characteristic ≠ 2**: in char ≠ 2, the curve-negation involution σ does not fix `y_gen`. @@ -2515,6 +2418,7 @@ theorem mulByInt_neg_one_pullback_y_gen_ne_y_gen_char_ne_two obtain ⟨_, hq_zero⟩ := (W_smooth W).decomp_zero_iff h_zero_smul exact h2 (two_K_eq_zero_of_two_fractionRing hq_zero) +omit [Fintype K] in /-- **σ ≠ id (unified)**: in any characteristic, the curve-negation involution `σ = (mulByInt W (-1)).pullback` does not fix `y_gen`. @@ -2525,7 +2429,7 @@ theorem mulByInt_neg_one_pullback_y_gen_ne_y_gen : (mulByInt W.toAffine (-1)).pullback (y_gen W) ≠ y_gen W := by by_cases h2 : (2 : K) = 0 · -- Char 2 case via `[CharP K 2]` derived from `h2`. - haveI : CharP K 2 := CharTwo.of_one_ne_zero_of_two_eq_zero one_ne_zero h2 + have : CharP K 2 := CharTwo.of_one_ne_zero_of_two_eq_zero one_ne_zero h2 exact mulByInt_neg_one_pullback_y_gen_ne_y_gen_char_two W · -- Char ≠ 2 case directly. exact mulByInt_neg_one_pullback_y_gen_ne_y_gen_char_ne_two W h2 @@ -2535,6 +2439,7 @@ theorem mulByInt_neg_one_pullback_y_gen_ne_y_gen : A small first piece toward σ-fixed → K(x): σ commutes with the constant embedding `K → K(E)`. -/ +omit [Fintype K] in /-- σ fixes the image of `K → K(E)`: for any `c : K`, `σ(algebraMap c) = algebraMap c`. Immediate from σ being a `K`-algebra hom. -/ @[simp] theorem mulByInt_neg_one_pullback_algebraMap_K (c : K) : @@ -2542,6 +2447,7 @@ embedding `K → K(E)`. -/ algebraMap K KE c := AlgHom.commutes (mulByInt W.toAffine (-1)).pullback c +omit [Fintype K] in /-- σ fixes `algebraMap (Polynomial K) KE p` for any polynomial `p`. Using `algebraMap p = aeval x_gen p` (via algebra-hom uniqueness on the generator `X ↦ x_gen`) plus σ commutes with `aeval` and σ fixes `x_gen`. -/ @@ -2566,6 +2472,7 @@ theorem mulByInt_neg_one_pullback_algebraMap_polyK (p : Polynomial K) : simpa using this rw [h_eval, ← Polynomial.aeval_algHom_apply, mulByInt_pullback_x_neg_one] +omit [Fintype K] in /-- σ fixes the image of `Frac(K[X]) → K(E)`: for any `r ∈ Frac(K[X])`, `σ(algebraMap r) = algebraMap r`. Lifts `mulByInt_neg_one_pullback_algebraMap_polyK` via `IsLocalization.surj` denominator clearing. -/ @@ -2598,6 +2505,7 @@ theorem mulByInt_neg_one_pullback_algebraMap_kx /-! ### Path 2 Step 3 Piece 3b: σ acts on coordY -/ +omit [Fintype K] in /-- σ acts on `y_gen` as `-y_gen - a₁·x - a₃`. (Re-statement of `mulByInt_pullback_y_neg_one` for use with the basis decomposition machinery.) -/ theorem mulByInt_neg_one_pullback_y_gen_eq : @@ -2608,6 +2516,7 @@ theorem mulByInt_neg_one_pullback_y_gen_eq : /-! ### Path 2 Step 3 Piece 3c helpers -/ +omit [Fintype K] [DecidableEq K] in /-- The polynomial `a₁ X + a₃` is nonzero in characteristic 2 for an elliptic curve. If it were zero, then `a₁ = a₃ = 0`, and `Δ_of_char_two` would give `Δ = 0`, contradicting `[IsElliptic]`. -/ @@ -2625,6 +2534,7 @@ theorem a₁X_plus_a₃_ne_zero_char_two [CharP K 2] : rw [WeierstrassCurve.Δ_of_char_two, h_a1, h_a3]; ring exact W.toAffine.isUnit_Δ.ne_zero h_delta +omit [Fintype K] [DecidableEq K] [WeierstrassCurve.IsElliptic W.toAffine] in /-- Image of the polynomial `a₁ X + a₃` under `K[X] → KE`: equals `a₁ · x_gen + a₃` in `KE`. -/ theorem algebraMap_a₁X_plus_a₃ : @@ -2642,6 +2552,7 @@ theorem algebraMap_a₁X_plus_a₃ : intro c; rw [Polynomial.C_eq_algebraMap, ← IsScalarTower.algebraMap_apply] rw [map_add, map_mul, h_C, h_C, h_x_alg] +omit [Fintype K] [DecidableEq K] [WeierstrassCurve.IsElliptic W.toAffine] in /-- The image of `a₁ X + a₃` under the composite `K[X] → Frac(K[X]) → KE` equals `a₁ · x_gen + a₃` in `KE`. Lifts `algebraMap_a₁X_plus_a₃` along the scalar tower `K[X] → Frac(K[X]) → KE`. -/ @@ -2665,6 +2576,7 @@ private lemma smul_one_add_smul_y_gen_eq_algebraMap algebraMap (FractionRing (Polynomial K)) KE b * y_gen W := by simp only [Algebra.smul_def, mul_one] +omit [Fintype K] in /-- σ acting on an `algebraMap`-decomposition: applying `σ = (mulByInt W (-1)).pullback` to `algebraMap a + (algebraMap b) · y_gen` gives `algebraMap a + (algebraMap b) · (-y_gen - a₁·x - a₃)`, since σ fixes the @@ -2684,6 +2596,7 @@ private lemma mulByInt_neg_one_pullback_algebraMap_add_algebraMap_mul_y_gen mulByInt_neg_one_pullback_algebraMap_kx, mulByInt_neg_one_pullback_y_gen_eq] +omit [Fintype K] in /-- Helper for Piece 3c: the σ-equation as a vanishing `{1, Y}`-decomposition. If `f = a • 1 + b • Y` is fixed by `σ = (mulByInt W (-1)).pullback`, then applying @@ -2719,6 +2632,7 @@ private lemma sigma_fixed_decomp_coeffs_vanish {a b : FractionRing (Polynomial K map_mul, map_mul, algebraMap_fractionRing_a₁X_plus_a₃ W, map_ofNat] linear_combination -h_combine +omit [Fintype K] in /-- Helper for Piece 3c: char-split forcing `b = 0`. From the two vanishing coefficients of `sigma_fixed_decomp_coeffs_vanish`, @@ -2733,7 +2647,7 @@ private lemma eq_zero_of_mul_a₁X_plus_a₃_and_two_mul_eq_zero (hqb : 2 * b = 0) : b = 0 := by by_cases h2 : (2 : K) = 0 · -- Char 2: `a₁ X + a₃ ≠ 0`, so `b · (a₁X+a₃) = 0` forces `b = 0`. - haveI : CharP K 2 := CharTwo.of_one_ne_zero_of_two_eq_zero one_ne_zero h2 + have : CharP K 2 := CharTwo.of_one_ne_zero_of_two_eq_zero one_ne_zero h2 have h_bXf_ne : algebraMap (Polynomial K) (FractionRing (Polynomial K)) (Polynomial.C W.toAffine.a₁ * Polynomial.X + Polynomial.C W.toAffine.a₃) ≠ 0 := fun h_eq ↦ a₁X_plus_a₃_ne_zero_char_two W @@ -2756,6 +2670,7 @@ the image of `Frac(K[X]) → K(E)`. Combines the σ-action on the basis decomposition `{1, Y}` (Pieces 0/1/2/3b) with `decomp_zero_iff` and a char-split. -/ +omit [Fintype K] in /-- **Path 2 Step 3 Piece 3c**: If `f ∈ KE` is fixed by `σ`, then `f` is in the image of `algebraMap (Frac K[X]) KE`. @@ -2796,18 +2711,18 @@ theorem addPullback_x_negFrobenius_in_KX_image : sigma_fixed_implies_in_KX_image W _ (addPullback_x_negFrobenius_sigma_invariant W) -/-! ### Path 2 Steps 4+5: addPullback_x_negFrobenius is transcendental +/-! ### addPullback_x_negFrobenius is transcendental -The consumer of `addPullback_x_negFrobenius_in_KX_image`. Combines that +Apply `addPullback_x_negFrobenius_in_KX_image`. Combines that witness with `algebraic_in_fracRing_eq_const` (algebraic-closure-of-K-in-K(x)) and `addPullback_x_ne_const_negFrobenius` (the non-constancy lemma) to -discharge transcendence axiom-clean for the `α = -π` case. -/ +prove transcendence for the `α = -π` case. -/ -/-- **Path 2 Step 4+5 (axiom-clean closure of Sorry 2 for α = -π)**: +/-- **Transcendence for negative Frobenius**: `addPullback_x W (negFrobeniusIsog W)` is transcendental over `K`. Proof outline: -* By `addPullback_x_negFrobenius_in_KX_image` (Piece 3d): there exists +* By `addPullback_x_negFrobenius_in_KX_image`: there exists `r : Frac(K[X])` with `addPullback_x = algebraMap _ KE r`. * If `addPullback_x` were algebraic over `K`, so would `r` be (since `algebraMap _ KE` is injective and pulls back transcendence). @@ -2836,18 +2751,15 @@ theorem addPullback_x_transcendental_negFrobenius rw [hr, hc, ← IsScalarTower.algebraMap_apply K (FractionRing (Polynomial K)) KE] exact addPullback_x_ne_const_negFrobenius W hq hxy c hc' -/-! ### Day 3b: addCoordAlgHom injectivity for the negFrobenius case +/-! ### Coordinate-ring injectivity from transcendence -Consumer of `addPullback_x_transcendental_negFrobenius` (Steps 4+5). Uses the -witness-parametric `addCoordAlgHom_injective_of_baseHom_inj` with the -unconditional base-hom injectivity below (the sorry-bearing generic -`addBaseHom_injective` has been removed). -/ +Transcendence of the summed x-coordinate gives injectivity of polynomial +evaluation, and the integral coordinate-ring extension gives injectivity +of the coordinate homomorphism. +-/ -/-- **Day 3b helper**: `addBaseHom W (negFrobeniusIsog W)` is injective. -Axiom-clean negFrobenius base-hom injectivity: rewrites the base-hom as -`Polynomial.aeval (addPullback_x W (negFrob W))` (`addBaseHom_eq_aeval`) -and applies `transcendental_iff_injective` to the unconditional -`addPullback_x_transcendental_negFrobenius`. -/ +/-- Transcendence of the negative-Frobenius addition x-coordinate makes its + polynomial evaluation homomorphism injective. -/ theorem addBaseHom_injective_negFrobenius (hq : 2 ≤ Fintype.card K) (hxy : AddNonInverse W (negFrobeniusIsog W)) : @@ -2856,15 +2768,8 @@ theorem addBaseHom_injective_negFrobenius exact transcendental_iff_injective.mp (addPullback_x_transcendental_negFrobenius W hq hxy) -/-- **Day 3b**: `addCoordAlgHom` for `α = negFrobeniusIsog W` is injective. -One-line consumer of `addCoordAlgHom_injective_of_baseHom_inj` and -`addBaseHom_injective_negFrobenius`. Closes one of the three sorries in HOLE D's -downstream chain axiom-clean. - -Together with `addPullback_x_transcendental_negFrobenius` and Path 2 Step 3, -the negFrobenius `addCoordAlgHom`-injectivity is now fully -unconditional — the input needed by `addPullbackAlgHom_negFrobenius_of_inj` -to build a non-witness-parametric `addPullbackAlgHom_negFrobenius`. -/ +/-- The negative-Frobenius addition coordinate-ring homomorphism is + injective, by injectivity of its polynomial restriction. -/ theorem addCoordAlgHom_injective_negFrobenius (hq : 2 ≤ Fintype.card K) (hxy : AddNonInverse W (negFrobeniusIsog W)) : @@ -2872,15 +2777,14 @@ theorem addCoordAlgHom_injective_negFrobenius addCoordAlgHom_injective_of_baseHom_inj hxy (addBaseHom_injective_negFrobenius W hq hxy) -/-! ### Day 3c Piece A: AddNonInverse witness + specialized addPullbackAlgHom +/-! ### The function-field pullback of `1 − π` -The negFrobenius variant of `addPullbackAlgHom` requires both -`AddNonInverse W (negFrobeniusIsog W)` and the corresponding injectivity -of `addCoordAlgHom`. Both are dischargeable axiom-clean: the non-inverse -condition reduces to `x_gen ≠ π·x_gen` (different orders at infinity), -and injectivity is `addCoordAlgHom_injective_negFrobenius` (c8b4b66). -/ +The identity and negative-Frobenius x-coordinates differ because their +orders differ. Together with coordinate-ring injectivity, this constructs +the addition pullback on the function field. +-/ -/-- **Day 3c Piece A.1**: `AddNonInverse W (negFrobeniusIsog W)` holds +/-- **Non-inverse coordinates**: `AddNonInverse W (negFrobeniusIsog W)` holds unconditionally. The negation hypothesis would require `x_gen W = π·x_gen` (the first conjunct), which contradicts `x_gen_ne_frobeniusIsog_pullback_x_gen` (their orders at infinity differ). -/ @@ -2890,11 +2794,8 @@ theorem negFrobeniusIsog_addNonInverse : rw [negFrobeniusIsog_pullback_x_gen] at h_x exact x_gen_ne_frobeniusIsog_pullback_x_gen W h_x -/-- **Day 3c Piece A.2**: Specialized `addPullbackAlgHom` for `α = negFrobenius`, -discharging both `AddNonInverse` (via `negFrobeniusIsog_addNonInverse`) and -`addCoordAlgHom`-injectivity (via `addCoordAlgHom_injective_negFrobenius`) -axiom-clean. The unconditional algebra hom corresponding to the rational -map `P ↦ P + (-π)(P) = P - π(P)` (i.e., `1 - π` on rational points). -/ +/-- The function-field pullback of `P ↦ P − π(P)`, constructed from the + non-inverse coordinate witness and the injective coordinate map. -/ noncomputable def addPullbackAlgHom_negFrobenius (hq : 2 ≤ Fintype.card K) : KE →ₐ[K] KE := addPullbackAlgHom_negFrobenius_of_inj W @@ -2902,22 +2803,14 @@ noncomputable def addPullbackAlgHom_negFrobenius (addCoordAlgHom_injective_negFrobenius W hq (negFrobeniusIsog_addNonInverse W)) -/-! ### Day 3c Piece B: isogOneSub_negFrobenius (replacement for the placeholder) +/-! ### The isogeny `1 − π` -The unconditional `1 − π` isogeny: pullback from `addPullbackAlgHom_negFrobenius` -(real addition pullback for `id + (-π)`), rational-point map from -`(AddMonoidHom.id _) - (frobeniusIsog W).toAddMonoidHom`. Replaces the -`isogOneSub (frobeniusIsog W)` placeholder (whose pullback was `AlgHom.id`) -with the mathematically correct pullback. -/ - -/-- **Day 3c Piece B**: The isogeny `1 − π` with the unconditional addition-formula -pullback. Built from `addPullbackAlgHom_negFrobenius` (the pullback for -`id + (−π) = 1 − π`) and the standard rational-point map -`(AddMonoidHom.id _) - (frobeniusIsog W).toAddMonoidHom`. +Its function-field pullback is the addition-formula pullback for +`id + (−π)`, and its point map is `id − π`. +-/ -Mathematically this is `1 − π` with the correct pullback that the placeholder -`isogOneSub (frobeniusIsog W)` lacks (it uses `AlgHom.id` as a stub). HOLE D -wire-up consumes this directly via `Isogeny.toAlgebra`/`degree`. -/ +/-- The isogeny `1 − π` with its addition-formula function-field pullback + and the point map `id − π`. -/ noncomputable def isogOneSub_negFrobenius (hq : 2 ≤ Fintype.card K) : Isogeny W.toAffine W.toAffine where pullback := addPullbackAlgHom_negFrobenius W hq @@ -2932,20 +2825,12 @@ noncomputable def isogOneSub_negFrobenius (isogOneSub_negFrobenius W hq).toAddMonoidHom = (AddMonoidHom.id _) - (frobeniusIsog W).toAddMonoidHom := rfl -/-! ### Day 3c Piece C — REMOVED (2026-05-28 placeholder grind) -The bridge lemma `isogOneSub_negFrobenius_toAddMonoidHom_eq_oneSubFrobeniusIsog` -(genuine `1−π` and the placeholder agree on `toAddMonoidHom`) existed only to -transfer the placeholder's rational-point API to the genuine isogeny. All -consumers now prove their kernel/point-map facts directly on -`isogOneSub_negFrobenius` (its `toAddMonoidHom = id − frob`, frob's point map -is the identity), so the bridge is no longer needed and has been deleted as -part of removing the placeholder `oneSubFrobeniusIsog`. -/ -/-! ### D3b base: `AddNonInversePair` for `(zsmul 1 π, mulByInt (-1))` +/-! ### `AddNonInversePair` for `(zsmul 1 π, mulByInt (-1))` The `(r, s) = (1, 1)` specialisation of the genuine `(zsmul r π, mulByInt (-s))` -family that D3b/D4 will assemble into `genuineIsogSmulSub r s`. Both pullbacks +family defining `genuineIsogSmulSub r s`. Both pullbacks reduce on x-coord to `x_gen W` and `x_gen W ^ q` respectively via `mulByInt_x_one` / `mulByInt_x_neg` / `frobeniusIsog_pullback_apply`; the mismatch is `x_gen_ne_frobeniusIsog_pullback_x_gen`. -/ @@ -2977,12 +2862,12 @@ theorem AddNonInversePair_zsmul_one_frobenius_mulByInt_neg_one : rw [frobeniusIsog_pullback_apply] at hne exact hne h.symm -/-! ### D3b general consumer: AddNonInversePair for `(zsmul r π, mulByInt -s)` +/-! ### Non-inverse coordinate pairs: AddNonInversePair for `(zsmul r π, mulByInt -s)` Generalises the (1, 1) base case to arbitrary `(r, s) ≠ 0` (with `(r : K) ≠ 0` and `(s : K) ≠ 0`). The x-coord pullbacks are `(mulByInt_x r)^q` (LHS) and `mulByInt_x (-s)` (RHS); their orders at infinity are `-2q` and `-2` respectively -(via `ordAtInfty_mulByInt_x` from `OrdAtInftyBridge.lean:207` and +(via `ordAtInfty_mulByInt_x` for the coordinate pole and `ordAtInfty_pow`). For `q ≥ 2`, these are unequal, so the pullbacks are unequal — Silverman III.6 reflection of Frobenius pole-multiplication. -/ @@ -3043,7 +2928,7 @@ theorem AddNonInversePair_zsmul_frobenius_mulByInt_neg exact_mod_cast Fintype.one_lt_card_iff_nontrivial.mpr inferInstance linarith -/-! ### D3c step 1: σ-action on `(mulByInt n)` pullbacks (generic in `n ≠ 0`) +/-! ### σ-action on `(mulByInt n)` pullbacks (generic in `n ≠ 0`) For any nonzero `n`, σ commutes with `(mulByInt n).pullback`: their composition on `x_gen` is `(mulByInt (-n)).pullback x_gen = mulByInt_x W (-n) = mulByInt_x W n`, @@ -3064,6 +2949,7 @@ private theorem mulByInt_comp_mulByInt_neg_one (by simpa using neg_ne_zero.mpr hn) rw [h]; congr 1; ring +omit [Fintype K] in /-- **σ.pb fixes `(mulByInt n).pb x_gen`** for `n ≠ 0`. By `mulByInt` commutativity, `σ.pb ([n].pb x_gen) = ([n].comp σ).pb x_gen = (mulByInt (-n)).pb x_gen = mulByInt_x W (-n) = mulByInt_x W n` (the last by @@ -3080,6 +2966,7 @@ theorem sigma_mulByInt_pullback_x_eq (n : ℤ) (hn : n ≠ 0) : rw [mulByInt_pullback_x W (-n) (neg_ne_zero.mpr hn), mulByInt_x_neg] exact (mulByInt_pullback_x W n hn).symm +omit [Fintype K] in /-- **σ.pb on `(mulByInt n).pb y_gen`** for `n ≠ 0`. Same composition path as the x-version but using `mulByInt_y_neg`: the σ-image is `negY (mulByInt_x n) (mulByInt_y n) = -mulByInt_y n - a₁·mulByInt_x n - a₃`. -/ @@ -3117,7 +3004,7 @@ theorem sigma_mulByInt_pullback_y_eq (n : ℤ) (hn : n ≠ 0) : simp only [WeierstrassCurve.Affine.negY] rfl -/-! ### D3c step 2: σ-action on `(zsmul r π).pb` +/-! ### σ-action on `(zsmul r π).pb` For `α₁ = (frobeniusIsog W).zsmul r = (mulByInt r).comp π`, the σ-action follows from `sigma_mulByInt_pullback_x_eq` / `_y_eq` plus σ commuting @@ -3176,13 +3063,14 @@ theorem sigma_zsmul_frobenius_pullback_y_eq (r : ℤ) (hr : r ≠ 0) : simp only [map_sub, map_neg, map_mul, AlgHom.commutes (frobeniusIsog W).pullback] -/-! ### D3c step 3: x-ne mismatch witness for `(zsmul r π, mulByInt -s)` +/-! ### x-ne mismatch witness for `(zsmul r π, mulByInt -s)` Extracted from `AddNonInversePair_zsmul_frobenius_mulByInt_neg`'s internal proof: the x-coord pullbacks differ at `ord_∞` (`-2q` vs `-2`). Used directly as the `h_x_ne` argument to the generic `addPullback_x_pair_sigma_invariant`. -/ +omit [DecidableEq K] in /-- The `ord_∞` contradiction behind the `x`-coord mismatch: `(mulByInt_x W r)^|K|` (order `-2q`) cannot equal `mulByInt_x W (-s)` (order `-2`), since `|K|·(-2) = -2` would force `|K| ≤ 1`. -/ @@ -3224,16 +3112,16 @@ theorem zsmul_frobenius_pullback_x_ne_mulByInt_neg_pullback_x rw [zsmul_frobenius_pullback_x_gen W r hr, mulByInt_neg_pullback_x_gen W s hs] exact mulByInt_x_pow_card_ne_mulByInt_x_neg W r s hr hrK hs hsK -/-! ### D3c step 4: σ-invariance specialised + K(x) image +/-! ### σ-invariance specialised + K(x) image Specialise `addPullback_x_pair_sigma_invariant` to `(α₁, α₂) = (zsmul r π, mulByInt -s)` using the four σ-symmetry helpers -shipped above, then chain with `sigma_fixed_implies_in_KX_image` to extract +above, then chain with `sigma_fixed_implies_in_KX_image` to extract the K(x) image. -/ /-- **σ-invariance of `addPullback_x_pair (zsmul r π, mulByInt -s)`**. Specialisation of the generic `addPullback_x_pair_sigma_invariant` for -the family used by D3c/D4. -/ +this pencil family. -/ theorem addPullback_x_pair_zsmul_frobenius_mulByInt_neg_sigma_invariant (r s : ℤ) (hr : r ≠ 0) (hs : s ≠ 0) (hrK : (r : K) ≠ 0) (hsK : (s : K) ≠ 0) : @@ -3262,7 +3150,7 @@ theorem addPullback_x_pair_zsmul_frobenius_mulByInt_neg_in_KX_image (addPullback_x_pair_zsmul_frobenius_mulByInt_neg_sigma_invariant W r s hr hs hrK hsK) -/-! ### D3c step 5: ord helpers for `(zsmul r π).pb x_gen` and +/-! ### ord helpers for `(zsmul r π).pb x_gen` and `(mulByInt -s).pb x_gen` Concrete ord values needed by the pole-bound argument: `(zsmul r π).pb x_gen @@ -3302,6 +3190,7 @@ theorem ordAtInfty_zsmul_frobenius_pullback_x_gen push_cast rfl +omit [Fintype K] in /-- `ord_∞((mulByInt (-s)).pb x_gen) = -2` for `s ≠ 0` with `(s : K) ≠ 0`. Direct from `(mulByInt -s).pb x_gen = mulByInt_x W (-s)` plus `ordAtInfty_mulByInt_x`. -/ @@ -3361,7 +3250,7 @@ private lemma ordAtInfty_mulByInt_x_mul_y (r : ℤ) {M m : ℤ} refine ((W_smooth W).ordAtInfty_mul hX_ne hY_ne).trans ?_ rw [hX_ord, hm]; push_cast; rfl -omit [Fintype K] in +omit [Fintype K] [WeierstrassCurve.IsElliptic W.toAffine] in /-- For `M < 0` the right-hand side of the Weierstrass equation is dominated by `X³`, so `ord_∞(X³ + a₂·X² + a₄·X + a₆) = 3M` where `M = ord_∞(mulByInt_x W r)`. Repeated strict non-archimedean additivity: `3M < 2M < M < 0`, so each successive `aᵢ·Xⁱ` term has strictly larger @@ -3434,7 +3323,7 @@ private lemma mulByInt_y_ne_zero_of_weierstrass_lhs_ord (r : ℤ) {M : ℤ} (congrArg (W_smooth W).ordAtInfty h_zero).trans (W_smooth W).ordAtInfty_zero exact WithTop.top_ne_coe (h_ord_eq.symm.trans h_lhs_ord) -omit [Fintype K] in +omit [Fintype K] [WeierstrassCurve.IsElliptic W.toAffine] in /-- The halving lower bound `2m ≤ 3M`, where `m = ord_∞(mulByInt_y W r)` and `M = ord_∞(mulByInt_x W r)`. If instead `2m ≥ 3M + 1`, every Weierstrass LHS term (`Y²`, `a₁·X·Y`, `a₃·Y`) would have order `≥ 3M + 1`, so the LHS order would be `≥ 3M + 1`, contradicting `ord(LHS) = 3M`. -/ @@ -3477,7 +3366,7 @@ private lemma two_mul_ordAtInfty_mulByInt_y_le (r : ℤ) {M m : ℤ} (hM_neg : M have : (3 * M + 1 : ℤ) ≤ 3 * M := by exact_mod_cast h_lhs_ge omega -omit [Fintype K] in +omit [Fintype K] [WeierstrassCurve.IsElliptic W.toAffine] in /-- When `m < M` and `m < 0` (which hold once `2m ≤ 3M` with `M < 0`), the term `Y²` strictly dominates the other two Weierstrass LHS terms, so `ord_∞(Y² + a₁·X·Y + a₃·Y) = 2m`, where `m = ord_∞(mulByInt_y W r)`. -/ @@ -3520,6 +3409,7 @@ private lemma ordAtInfty_mulByInt_weierstrass_lhs_eq (r : ℤ) {M m : ℤ} refine (((W_smooth W).ordAtInfty_add_eq_of_lt h_a3y_gt').trans h_inner_eq).trans ?_ exact hY_sq_ord +omit [Fintype K] in /-- **`ord_∞(mulByInt_y W r) = 3M/2`** for `r ≠ 0`, where `M = ord_∞(mulByInt_x W r)` is the (even, `≤ -2`) `x`-order — **no** `(r : K) ≠ 0` hypothesis. The curve point `(mulByInt_x W r, mulByInt_y W r)` satisfies the Weierstrass equation @@ -3563,13 +3453,14 @@ theorem ordAtInfty_mulByInt_y_eq_of_x rw [hm, h_target] exact_mod_cast (by omega : m = 3 * M₂) -/-! ### D3c step 6: ord helpers for `mulByInt_y` and the y-pullbacks +/-! ### ord helpers for `mulByInt_y` and the y-pullbacks To compute `ord_∞` of the pair `addPullback_x`, we need ord values for the y-coordinate pullbacks: `ord((zsmul r π).pb y_gen) = -3q` and `ord((mulByInt -s).pb y_gen) = -3`. These chain through `ord(mulByInt_y W r) = -3` (curve-equation argument with x-ord = -2). -/ +omit [Fintype K] in /-- **`ord_∞(mulByInt_y W r) = -3`** for `r ≠ 0` with `(r : K) ≠ 0`. The `(mulByInt_x W r, mulByInt_y W r)` curve point has `ord(mulByInt_x) = -2`, so the curve equation `Y² + a₁·X·Y + a₃·Y = X³ + ...` forces @@ -3624,6 +3515,7 @@ theorem ordAtInfty_zsmul_frobenius_pullback_y_gen push_cast rfl +omit [Fintype K] in /-- `ord_∞((mulByInt -s).pb y_gen) = -3` for `s ≠ 0` with `(s : K) ≠ 0`. Direct from `(mulByInt -s).pb y_gen = mulByInt_y W (-s)` plus `ordAtInfty_mulByInt_y_eq_neg_three`. -/ @@ -3701,7 +3593,7 @@ theorem ordAtInfty_zsmul_frobenius_pullback_y_gen_of_x rw [h_eq] exact ((W_smooth W).ord_pow_concrete hY_ne ((3 * M) / 2) (Fintype.card K) hY_ord) -/-! ### D3c step 7: ord helpers for the pair differences +/-! ### ord helpers for the pair differences The slope `L = (Y₁ - Y₂) / (X₁ - X₂)` requires ord of the differences: `ord(α₁(x) - α₂(x)) = -2q` (α₁(x) dominates, ord = -2q < -2 = ord(α₂(x))), @@ -3754,7 +3646,7 @@ theorem zsmul_frobenius_sub_mulByInt_neg_x_ne_zero rw [ordAtInfty_zsmul_frobenius_sub_mulByInt_neg_x W r s hr hs hrK hsK] at h_top exact WithTop.coe_ne_top h_top -/-! ### D3c step 8: numerator + reduced form for the pair (zsmul r π, mulByInt -s) +/-! ### numerator + reduced form for the pair (zsmul r π, mulByInt -s) Mirror of `addPullbackNumerator_negFrobenius` and `_reduced` for the pair version. The numerator is `(X₁-X₂)² · addPullback_x_pair` (cleared of the @@ -3830,7 +3722,7 @@ private theorem weierstrass_relation_pullback (α : Isogeny W.toAffine W.toAffin `addPullbackNumerator_negFrobenius_eq_reduced`, with both Weierstrass equations applied via `linear_combination h_α₁ + h_α₂`. -/ theorem addPullbackNumerator_pair_zsmul_frobenius_mulByInt_neg_eq_reduced - (r s : ℤ) (hr : r ≠ 0) (hs : s ≠ 0) : + (r s : ℤ) (_hr : r ≠ 0) (_hs : s ≠ 0) : addPullbackNumerator_pair_zsmul_frobenius_mulByInt_neg W r s = addPullbackNumerator_reduced_pair_zsmul_frobenius_mulByInt_neg W r s := by have h_α₁ := weierstrass_relation_pullback W ((frobeniusIsog W).zsmul r) @@ -3885,7 +3777,7 @@ theorem addPullbackNumerator_pair_zsmul_frobenius_mulByInt_neg_eq field_simp ring -/-! ### D3c step 9: `ord(reduced_pair) = -4q - 2` +/-! ### `ord(reduced_pair) = -4q - 2` Mirror of `ordAtInfty_addPullbackNumerator_reduced_negFrobenius_eq` for the pair version. Dominant term: `α₁(x)² · α₂(x)` (ord = -4q-2). All @@ -3914,6 +3806,7 @@ private lemma zsmul_frobenius_pullback_x_gen_ne_zero rw [ordAtInfty_zsmul_frobenius_pullback_x_gen W r hr hrK] at h_top exact WithTop.coe_ne_top h_top +omit [Fintype K] in /-- `(mulByInt -s).pb y_gen ≠ 0` for `s ≠ 0` with `(s : K) ≠ 0`. -/ private lemma mulByInt_neg_pullback_y_gen_ne_zero (s : ℤ) (hs : s ≠ 0) (hsK : (s : K) ≠ 0) : @@ -3925,6 +3818,7 @@ private lemma mulByInt_neg_pullback_y_gen_ne_zero rw [ordAtInfty_mulByInt_neg_pullback_y_gen W s hs hsK] at h_top exact WithTop.coe_ne_top h_top +omit [Fintype K] in /-- `(mulByInt -s).pb x_gen ≠ 0` for `s ≠ 0` with `(s : K) ≠ 0`. -/ private lemma mulByInt_neg_pullback_x_gen_ne_zero (s : ℤ) (hs : s ≠ 0) (hsK : (s : K) ≠ 0) : @@ -4120,6 +4014,7 @@ private lemma ord_zsmul_frobenius_mulByInt_neg_rest_term_a₄_ge exact_mod_cast (by linarith : (-3 * (Fintype.card K : ℤ) - 3 : ℤ) ≤ -2 * (Fintype.card K : ℤ)) +omit [WeierstrassCurve.IsElliptic W.toAffine] in /-- Rest term 2: `ord(2 · a₆) ≥ -3q - 3`. The constant `a₆` has order `≥ 0` (or `⊤` if zero), which clears `-3q - 3`; `ord_two_mul_ge` handles the `2·` factor in any characteristic. -/ @@ -4385,7 +4280,7 @@ theorem ord_addPullback_x_pair_zsmul_frobenius_mulByInt_neg (-4 * (Fintype.card K : ℤ)) h_num_ord h_den_ord).trans ?_ congr 1; ring -/-! ### D3c: the `y`-coordinate `∞`-order for the pair `(zsmul r π, mulByInt -s)` +/-! ### the `y`-coordinate `∞`-order for the pair `(zsmul r π, mulByInt -s)` The pair analogue of `ord_addPullback_y_negFrobenius = -3`. The proof is the *same* Weierstrass-equation argument: from `ord_∞(addPullback_x_pair) = -2` and the curve equation @@ -4400,7 +4295,7 @@ private theorem ord_addPullback_x_sq_pair_zsmul_frobenius_mulByInt_neg (W_smooth W).ordAtInfty (addPullback_x_pair ((frobeniusIsog W).zsmul r) (mulByInt W.toAffine (-s)) ^ 2) = ((-4 : ℤ) : WithTop ℤ) := by - haveI : (W_smooth W).toAffine.IsElliptic := inferInstanceAs W.toAffine.IsElliptic + have : (W_smooth W).toAffine.IsElliptic := inferInstanceAs W.toAffine.IsElliptic have hX_ne : addPullback_x_pair ((frobeniusIsog W).zsmul r) (mulByInt W.toAffine (-s)) ≠ 0 := fun h ↦ WithTop.coe_ne_top (((W_smooth W).ordAtInfty_eq_top_iff _).mpr h ▸ @@ -4415,7 +4310,7 @@ private theorem ord_addPullback_x_cube_pair_zsmul_frobenius_mulByInt_neg (W_smooth W).ordAtInfty (addPullback_x_pair ((frobeniusIsog W).zsmul r) (mulByInt W.toAffine (-s)) ^ 3) = ((-6 : ℤ) : WithTop ℤ) := by - haveI : (W_smooth W).toAffine.IsElliptic := inferInstanceAs W.toAffine.IsElliptic + have : (W_smooth W).toAffine.IsElliptic := inferInstanceAs W.toAffine.IsElliptic have hX_ne : addPullback_x_pair ((frobeniusIsog W).zsmul r) (mulByInt W.toAffine (-s)) ≠ 0 := fun h ↦ WithTop.coe_ne_top (((W_smooth W).ordAtInfty_eq_top_iff _).mpr h ▸ @@ -4435,7 +4330,7 @@ private theorem ord_RHS_pair_zsmul_frobenius_mulByInt_neg addPullback_x_pair ((frobeniusIsog W).zsmul r) (mulByInt W.toAffine (-s)) + algebraMap K KE W.toAffine.a₆) = ((-6 : ℤ) : WithTop ℤ) := by - haveI : (W_smooth W).toAffine.IsElliptic := inferInstanceAs W.toAffine.IsElliptic + have : (W_smooth W).toAffine.IsElliptic := inferInstanceAs W.toAffine.IsElliptic set X := addPullback_x_pair ((frobeniusIsog W).zsmul r) (mulByInt W.toAffine (-s)) with hX have h_X3 : (W_smooth W).ordAtInfty (X ^ 3) = ((-6 : ℤ) : WithTop ℤ) := ord_addPullback_x_cube_pair_zsmul_frobenius_mulByInt_neg W r s hr hs hrK hsK @@ -4525,7 +4420,7 @@ private theorem addPullback_y_pair_zsmul_frobenius_mulByInt_neg_ne_zero (h_ord_eq.symm.trans (ord_weierstrass_lhs_pair_zsmul_frobenius_mulByInt_neg W r s hr hs hrK hsK)) -omit [Fintype K] in +omit [Fintype K] [WeierstrassCurve.IsElliptic W.toAffine] in /-- Order-arithmetic helper (step (a)): if `ord(LHS) = -6`, the y-order `m` of the Weierstrass LHS satisfies `m ≤ -3`. Otherwise all three summands would have order `≥ -4`, forcing `ord(LHS) ≥ -4`, contradicting `-6`. Purely generic in `X`, `Y`, `m` and the per-term order data. -/ @@ -4558,7 +4453,7 @@ private theorem ord_y_le_neg_three_of_weierstrass_lhs_ord {X Y : KE} {m : ℤ} have h46 : (-4 : ℤ) ≤ -6 := by exact_mod_cast h_lhs_ge omega -omit [Fintype K] in +omit [Fintype K] [WeierstrassCurve.IsElliptic W.toAffine] in /-- Order-arithmetic helper (step (b)): when `m ≤ -3`, the `Y²` term strictly dominates both the `a₁·X·Y` and `a₃·Y` terms (`2m < -2 + m` and `2m < m`), so the order of the Weierstrass LHS equals `ord(Y²)`. Purely generic in `X`, `Y`, `m` and the per-term order data. -/ @@ -4603,7 +4498,7 @@ theorem ord_addPullback_y_pair_zsmul_frobenius_mulByInt_neg (W_smooth W).ordAtInfty ((addPullback_y_pair ((frobeniusIsog W).zsmul r) (mulByInt W.toAffine (-s))) : KE) = ((-3 : ℤ) : WithTop ℤ) := by - haveI : (W_smooth W).toAffine.IsElliptic := inferInstanceAs W.toAffine.IsElliptic + have : (W_smooth W).toAffine.IsElliptic := inferInstanceAs W.toAffine.IsElliptic set X := addPullback_x_pair ((frobeniusIsog W).zsmul r) (mulByInt W.toAffine (-s)) with hX set Y := addPullback_y_pair ((frobeniusIsog W).zsmul r) (mulByInt W.toAffine (-s)) with hY have hX_ne : X ≠ 0 := @@ -4633,21 +4528,13 @@ theorem ord_addPullback_y_pair_zsmul_frobenius_mulByInt_neg have h_2m : (2 * m : ℤ) = -6 := by exact_mod_cast h_lhs_ord rw [hm]; exact_mod_cast (by omega : m = -3) -/-! ### D4: pole-bound-parametric `genuineIsogSmulSub` +/-! ### The pencil `r·π − s·id` -Worker D consumes `genuineIsogSmulSub r s` for the genuine `r·π - s·id` -isogeny. The constructor needs: -1. The `AddNonInversePair` witness — shipped axiom-clean as - `AddNonInversePair_zsmul_frobenius_mulByInt_neg`. -2. `addCoordAlgHomPair`-injectivity — reducible (via base-hom + transcendence - chain) to a pole bound `ord_∞ < 0` on the pair pullback x-coord. - -We ship the **pole-bound-parametric** form. The pole bound discharges -axiom-clean via the same numerator/denominator/Weierstrass-reduction -chain as `ord_addPullback_x_negFrobenius` (the (1,1) base case here), -mirrored to the pair version with α₁(x)²·α₂(x) as the dominant term -(ord = -4q-2). Worker D supplies the pole bound (or waits for the -follow-up axiom-clean discharge). -/ +Different coordinate orders provide the non-inverse-pair witness. +A pole of the summed x-coordinate gives polynomial and coordinate-ring +injectivity through curve-negation invariance and its `K(x)` image. +These facts construct the pencil isogeny's function-field pullback. +-/ /-- **Witness-parametric base-hom injectivity** for the `(zsmul r π, mulByInt -s)` family: takes the pole bound hypothesis @@ -4713,17 +4600,9 @@ theorem addCoordAlgHomPair_injective_zsmul_frobenius_mulByInt_neg_of_pole (addBaseHomPair_injective_zsmul_frobenius_mulByInt_neg_of_pole W r s hr hs hrK hsK h_pole) -/-- **D4: genuine `r·π - s·id` isogeny constructor (pole-bound-parametric)**. - -The genuine `r·π - s·id` isogeny with the *real* function-field pullback -(replacing the `AlgHom.id` placeholder of `Endomorphism.lean`'s -`isogSmulSub`). On rational points equals -`(zsmul r π).toAddMonoidHom + (mulByInt -s).toAddMonoidHom`. - -Worker D in `DegreeQuadraticForm.lean` consumes this as the `r·π - s·id` -isogeny family. The pole bound discharges axiom-clean via the same -numerator chain as `ord_addPullback_x_negFrobenius` (the (1,1) base -case), mirrored to the pair version. -/ +/-- The isogeny `r·π − s·id`, given the pole of its addition x-coordinate. + Its function-field pullback comes from the addition formulas, and its + point map is `(r·π) + (−s·id)`. -/ noncomputable def genuineIsogSmulSub_of_pole (r s : ℤ) (hr : r ≠ 0) (hs : s ≠ 0) (hrK : (r : K) ≠ 0) (hsK : (s : K) ≠ 0) @@ -4747,12 +4626,11 @@ noncomputable def genuineIsogSmulSub_of_pole (mulByInt W.toAffine (-s)).toAddMonoidHom := rfl -/-! ### D4 unconditional: `genuineIsogSmulSub` +/-! ### Constructing the pencil from its coordinate pole -With `ord_addPullback_x_pair_zsmul_frobenius_mulByInt_neg = -2 < 0` -discharged axiom-clean, the witness-parametric `genuineIsogSmulSub_of_pole` -becomes unconditional. The unconditional form is what Worker D consumes -in `DegreeQuadraticForm.lean` for the polarisation. -/ +The addition x-coordinate has order `−2`, hence a pole. This supplies +the injectivity witness for the function-field pullback of `r·π − s·id`. +-/ /-- The pole bound `ord_∞ < 0` discharges from `ord_addPullback_x_pair_zsmul_frobenius_mulByInt_neg = -2`. -/ @@ -4765,11 +4643,9 @@ private theorem h_pole_discharge rw [ord_addPullback_x_pair_zsmul_frobenius_mulByInt_neg W r s hr hs hrK hsK] exact_mod_cast (by norm_num : (-2 : ℤ) < 0) -/-- **D4 (unconditional)**: the genuine `r·π - s·id` isogeny for -`r, s ≠ 0` with `(r : K), (s : K) ≠ 0`. Pullback is the *real* -function-field pullback; on rational points equals -`r · π + (-s) · id = r · π - s · id`. Worker D in -`DegreeQuadraticForm.lean` consumes this directly. -/ +/-- The isogeny `r·π − s·id` when the two integers and their base-field + images are nonzero. Its pullback is the addition-formula pullback, + and its point map is `r·π − s·id`. -/ noncomputable def genuineIsogSmulSub (r s : ℤ) (hr : r ≠ 0) (hs : s ≠ 0) (hrK : (r : K) ≠ 0) (hsK : (s : K) ≠ 0) : @@ -4785,7 +4661,7 @@ noncomputable def genuineIsogSmulSub (mulByInt W.toAffine (-s)).toAddMonoidHom := rfl -/-! ### D4 inseparable: the `p ∣ r` pole bound `ord_∞(addPullback_x_pair) = -2` +/-! ### Inseparable pencil: the `p ∣ r` pole bound `ord_∞(addPullback_x_pair) = -2` For the **inseparable** pencil summand `r·π` (when `p ∣ r`, so `(r : K) = 0`), the `x`-pole of `α₁ = (frobeniusIsog).zsmul r` is `ord_∞(α₁^* x_gen) = q·M` with diff --git a/projects/HasseWeil/HasseWeil/Isogeny/FunctionField.lean b/projects/HasseWeil/HasseWeil/Isogeny/FunctionField.lean index 390492635..fba307a06 100644 --- a/projects/HasseWeil/HasseWeil/Isogeny/FunctionField.lean +++ b/projects/HasseWeil/HasseWeil/Isogeny/FunctionField.lean @@ -7,30 +7,6 @@ import Mathlib.AlgebraicGeometry.EllipticCurve.Affine.Point import Mathlib.LinearAlgebra.Dimension.Finrank import Mathlib.LinearAlgebra.Basis.VectorSpace -/-! -# Isogenies via Function Field Extensions - -We define isogenies between elliptic curves as injective `K`-algebra homomorphisms -on function fields, following Silverman III.4. The degree of an isogeny is the degree -of the corresponding field extension. - -## Main Definitions - -* `HasseWeil.Isogeny`: An isogeny from `E₁` to `E₂`, represented as an injective - `K`-algebra homomorphism `K(E₂) →ₐ[K] K(E₁)` on function fields. -* `HasseWeil.Isogeny.degree`: The degree `[K(E₁) : φ*K(E₂)]`. - -## Design Note - -The degree is defined as `Module.finrank K(E₂) K(E₁)` where `K(E₁)` is given a -`K(E₂)`-algebra structure via the pullback `φ* : K(E₂) →ₐ[F] K(E₁)`. This avoids -working with subalgebra ranges and makes the tower law (degree multiplicativity) -a direct application of `Module.finrank_mul_finrank`. - -## References - -* [Silverman, *The Arithmetic of Elliptic Curves*], III.4 --/ open WeierstrassCurve Polynomial @@ -49,8 +25,7 @@ namespace PullbackIsogeny variable {F : Type*} [Field F] variable {W₁ W₂ W₃ : Affine F} [W₁.IsElliptic] [W₂.IsElliptic] [W₃.IsElliptic] -/-- The pullback of an isogeny is injective: any algebra homomorphism from a field - is injective because the kernel of a ring homomorphism from a field is trivial. -/ + theorem pullback_injective (φ : PullbackIsogeny F W₁ W₂) : Function.Injective φ.pullback := φ.pullback.toRingHom.injective @@ -61,8 +36,7 @@ noncomputable def toAlgebra (φ : PullbackIsogeny F W₁ W₂) : Algebra W₂.FunctionField W₁.FunctionField := φ.pullback.toRingHom.toAlgebra -/-- The degree of an isogeny, defined as `[K(E₁) : K(E₂)]` where `K(E₁)` is - a `K(E₂)`-module via the pullback. -/ + noncomputable def degree (φ : PullbackIsogeny F W₁ W₂) : ℕ := @Module.finrank W₂.FunctionField W₁.FunctionField _ _ φ.toAlgebra.toModule @@ -81,12 +55,12 @@ theorem comp_algebraMap_eq (ψ : PullbackIsogeny F W₂ W₃) (φ : PullbackIsog theorem comp_degree (ψ : PullbackIsogeny F W₂ W₃) (φ : PullbackIsogeny F W₁ W₂) : (ψ.comp φ).degree = φ.degree * ψ.degree := by simp only [degree] - letI inst₁ : Algebra W₂.FunctionField W₁.FunctionField := φ.toAlgebra - letI inst₂ : Algebra W₃.FunctionField W₂.FunctionField := ψ.toAlgebra - letI inst₃ : Algebra W₃.FunctionField W₁.FunctionField := (ψ.comp φ).toAlgebra - haveI : IsScalarTower W₃.FunctionField W₂.FunctionField W₁.FunctionField := + let inst₁ : Algebra W₂.FunctionField W₁.FunctionField := φ.toAlgebra + let inst₂ : Algebra W₃.FunctionField W₂.FunctionField := ψ.toAlgebra + let inst₃ : Algebra W₃.FunctionField W₁.FunctionField := (ψ.comp φ).toAlgebra + have : IsScalarTower W₃.FunctionField W₂.FunctionField W₁.FunctionField := IsScalarTower.of_algebraMap_eq fun x => rfl - haveI : Module.Free W₂.FunctionField W₁.FunctionField := + have : Module.Free W₂.FunctionField W₁.FunctionField := Module.Free.of_divisionRing _ _ rw [mul_comm] exact (Module.finrank_mul_finrank diff --git a/projects/HasseWeil/HasseWeil/Isogeny/GroupHom/PicZero.lean b/projects/HasseWeil/HasseWeil/Isogeny/GroupHom/PicZero.lean index 1b98e70eec533a4bac61cd0a445abb7372a63eea..603d41e1f0ecdaf549903d24babfdd67af8baf36 100644 GIT binary patch delta 1063 zcmaKr&x#X45XO;}tTYJXNkOGBxBnCWi2d$O*V=*_F< z0mL^5Nnq?e||E*d~UkuOl_es6@Sha9z!S)C`TQ*wF|cP z#mKnBsA{yxc);@Abe;iuP^Pjn(6B@}q)?>JyF)COZ)cCBGDCt&TFAbB$@;Kg)V`6{ zd95%{Pb}zIz-U>5HKc=&vJ%Gs*oy*bibn5yQ!AaUFgP~A%T;xmRD{DINqfN8wj@QN zJW3-cQj;&DH+CNFx!*$1f&&NS&G%OXZKAkNj)~NYHsts$3;@-Kzf4C zBdptRW9$p@3`gitE4&4>$DRJ{P3PNw8sCfKV@|w6lkPn0LXKXc&N-)a)^-@wesv;I z99hF&JO>sE8ImuSntj-S#m~*bg@eJ`Gj}@T_a&t9hlEk`MQ$;>&ERUc+ukc z*EY?O+mmNogKb#8{|H-8x3k6Gl}{VfNLC`Qck+kgTN{gxeZ}SDlCh3f^fsdLY!TQz zr$7^a9ko~-qvfH&FaAA$5NpdKVzX=4Z$9ioq=@e+)}dha7Oh~?jn@fVfy0g9P3;se J&fhq=_!|#HjPn2h diff --git a/projects/HasseWeil/HasseWeil/Isogeny/Kernel.lean b/projects/HasseWeil/HasseWeil/Isogeny/Kernel.lean index 2b2b0f7f5..f46fb56a6 100644 --- a/projects/HasseWeil/HasseWeil/Isogeny/Kernel.lean +++ b/projects/HasseWeil/HasseWeil/Isogeny/Kernel.lean @@ -7,36 +7,6 @@ import HasseWeil.Foundation.Basic import Mathlib.FieldTheory.Galois.Basic import Mathlib.FieldTheory.SeparableDegree -/-! -# Kernel of an Isogeny - -For an isogeny `φ : E₁ → E₂`, we collect the structural facts about `ker φ` -as an `AddSubgroup` of `E₁.Point`. These are foundational for the dual -isogeny construction (Silverman III.6) and the Hasse bound (V.1). - -## Main definitions - -* `Isogeny.kernel φ` — the kernel of `φ.toAddMonoidHom`, viewed as an - `AddSubgroup` of `W₁.Point`. A thin wrapper around `AddMonoidHom.ker`. -* `Isogeny.IsSeparable φ` — separability of the induced field extension. - -## Deep results (not yet proved) - -The following correspond to tickets `T-III-4-011/012/015`; they require -substantial infrastructure (finiteness of fibers for finite morphisms of -smooth curves, and the Galois theory of `K(E₁)/φ*K(E₂)`) and are deferred. - -* **Silverman III.4.10(a)** — nonzero isogeny has finite kernel. -* **Silverman III.4.10(b)** — `#ker φ ≤ deg_s φ ≤ deg φ`. -* **Silverman III.4.10(c)** — equality when `φ` is separable. - -Once available, these unblock the dual isogeny chain (T-III-6-001 etc.). - -## References - -* [J Silverman, *The Arithmetic of Elliptic Curves*][silverman2009], III.4.10. - --/ open WeierstrassCurve @@ -47,7 +17,7 @@ variable {W₁ W₂ : Affine F} [W₁.IsElliptic] [W₂.IsElliptic] namespace Isogeny -/-- The kernel of an isogeny `φ`, as an `AddSubgroup` of `W₁.Point`. -/ + noncomputable def kernel (φ : Isogeny W₁ W₂) : AddSubgroup W₁.Point := φ.toAddMonoidHom.ker @@ -58,25 +28,20 @@ noncomputable def kernel (φ : Isogeny W₁ W₂) : AddSubgroup W₁.Point := @[simp] theorem zero_mem_kernel (φ : Isogeny W₁ W₂) : (0 : W₁.Point) ∈ φ.kernel := (φ.kernel).zero_mem -/-- The kernel is preserved by composition (fiberwise): `ker φ ⊆ ker (ψ ∘ φ)`. -/ + theorem kernel_comp_le {W₃ : Affine F} [W₃.IsElliptic] (ψ : Isogeny W₂ W₃) (φ : Isogeny W₁ W₂) : φ.kernel ≤ (ψ.comp φ).kernel := by intro P hP simp only [mem_kernel_iff, comp_apply] at hP ⊢ rw [hP, map_zero] -/-- **T-III-4-011 witness form**: If the fiber `φ⁻¹({0})` (as a subtype - of `W₁.Point`) is finite, then `φ.kernel` is a finite additive subgroup. - The hypothesis `h_fiber` is a specific case of T-II-2-002 (finite fibers - for nonconstant morphisms of smooth curves) applied to the fiber over `0`. - Full unconditional version awaits that foundational curve-theory result. -/ theorem kernel_finite_of_fiber_finite (φ : Isogeny W₁ W₂) (h_fiber : Finite {P : W₁.Point // φ.toAddMonoidHom P = 0}) : Finite φ.kernel := Finite.of_equiv _ (Equiv.subtypeEquivRight (mem_kernel_iff φ)).symm -/-- `ker [1] = ⊥` (trivial kernel, since [1] is the identity on points). -/ + @[simp] theorem kernel_mulByInt_one {W : WeierstrassCurve F} [W.toAffine.IsElliptic] : (mulByInt W.toAffine 1).kernel = ⊥ := by ext P @@ -108,8 +73,7 @@ theorem mem_kernel_comp_of_mem_kernel {W₃ : Affine F} [W₃.IsElliptic] (hP : P ∈ φ.kernel) : P ∈ (ψ.comp φ).kernel := kernel_comp_le ψ φ hP -/-- If `ψ` has trivial kernel, `ker (ψ ∘ φ) = ker φ`: applying a "monomorphic" - post-composition doesn't enlarge the kernel. -/ + theorem kernel_comp_of_kernel_eq_bot {W₃ : Affine F} [W₃.IsElliptic] {ψ : Isogeny W₂ W₃} (hψ : ψ.kernel = ⊥) (φ : Isogeny W₁ W₂) : (ψ.comp φ).kernel = φ.kernel := by @@ -123,9 +87,7 @@ theorem kernel_comp_of_kernel_eq_bot {W₃ : Affine F} [W₃.IsElliptic] · intro h rw [h, map_zero] -/-- **Kernel finiteness over finite fields (unconditional)**: when `W₁.Point` - is finite (e.g., for an elliptic curve over a finite field), every kernel - is automatically finite. -/ + instance kernel_finite_of_point_finite [Finite W₁.Point] (φ : Isogeny W₁ W₂) : Finite φ.kernel := inferInstance @@ -135,15 +97,12 @@ theorem kernel_card_le_point_card [Finite W₁.Point] (φ : Isogeny W₁ W₂) : Nat.card φ.kernel ≤ Nat.card W₁.Point := Nat.card_le_card_of_injective _ (Subtype.val_injective) -/-- **Lagrange for kernel**: over a finite field, `#ker φ ∣ #W₁.Point` - (subgroup cardinality divides group cardinality). -/ + theorem kernel_card_dvd_point_card [Finite W₁.Point] (φ : Isogeny W₁ W₂) : Nat.card φ.kernel ∣ Nat.card W₁.Point := AddSubgroup.card_addSubgroup_dvd_card φ.kernel -/-- **Kernel of sum** (for AddSubgroup inclusion): `ker φ ∩ ker ψ ≤ ker (φ + ψ)`, - where `(φ + ψ)` is a hypothetical isogeny with summed action. - (Purely algebraic: if φ(P) = 0 and ψ(P) = 0, then φ(P) + ψ(P) = 0.) -/ + theorem kernel_inf_le_kernel_of_sum (φ ψ : Isogeny W₁ W₂) (σ : Isogeny W₁ W₂) (hσ : σ.toAddMonoidHom = φ.toAddMonoidHom + ψ.toAddMonoidHom) : φ.kernel ⊓ ψ.kernel ≤ σ.kernel := by @@ -151,7 +110,7 @@ theorem kernel_inf_le_kernel_of_sum (φ ψ : Isogeny W₁ W₂) simp only [AddSubgroup.mem_inf, mem_kernel_iff] at hP simp only [mem_kernel_iff, hσ, AddMonoidHom.add_apply, hP.1, hP.2, add_zero] -/-- An isogeny has trivial kernel iff its toAddMonoidHom is injective. -/ + theorem kernel_eq_bot_iff_injective (φ : Isogeny W₁ W₂) : φ.kernel = ⊥ ↔ Function.Injective φ.toAddMonoidHom := AddMonoidHom.ker_eq_bot_iff φ.toAddMonoidHom @@ -161,23 +120,20 @@ theorem id_toAddMonoidHom_injective : Function.Injective (Isogeny.id W₁).toAddMonoidHom := Function.injective_id -/-- `ker (ψ ∘ φ) = φ⁻¹(ker ψ)` (as an AddSubgroup): the kernel of a composition - is the preimage of the outer kernel. -/ + theorem kernel_comp_eq_comap {W₃ : Affine F} [W₃.IsElliptic] (ψ : Isogeny W₂ W₃) (φ : Isogeny W₁ W₂) : (ψ.comp φ).kernel = ψ.kernel.comap φ.toAddMonoidHom := by ext P simp [mem_kernel_iff] -/-- For a nonzero isogeny with finite kernel, the action of the kernel on - any nonempty fiber is transitive. I.e., `φ⁻¹(Q) = P₀ + ker φ` as sets - (when `φ(P₀) = Q`). -/ + theorem fiber_eq_coset (φ : Isogeny W₁ W₂) {P₀ : W₁.Point} {Q : W₂.Point} (hP₀ : φ.toAddMonoidHom P₀ = Q) : {P : W₁.Point | φ.toAddMonoidHom P = Q} = {P : W₁.Point | ∃ T ∈ φ.kernel, P = P₀ + T} := by ext P - simp only [Set.mem_setOf_eq] + simp only [Set.mem_ofPred_eq] constructor · intro hP refine ⟨P - P₀, ?_, by abel⟩ @@ -193,10 +149,7 @@ theorem mem_fiber_iff_sub_mem_kernel (φ : Isogeny W₁ W₂) φ.toAddMonoidHom P = Q ↔ P - P₀ ∈ φ.kernel := by rw [mem_kernel_iff, map_sub, hP₀, sub_eq_zero] -/-- **Fiber cardinality = kernel cardinality** (via coset structure): the - fiber `φ⁻¹(Q)` of a nonempty fiber (with `P₀ ∈ φ⁻¹(Q)`) has the same - cardinality as `ker φ`. This is the group-theoretic content of the - fiber-cardinality formula (before invoking any ramification theory). -/ + noncomputable def fiberEquivKernel (φ : Isogeny W₁ W₂) {P₀ : W₁.Point} {Q : W₂.Point} (hP₀ : φ.toAddMonoidHom P₀ = Q) : {P : W₁.Point // φ.toAddMonoidHom P = Q} ≃ φ.kernel where @@ -213,12 +166,11 @@ theorem fiber_finite_of_kernel_finite (φ : Isogeny W₁ W₂) Finite {P : W₁.Point // φ.toAddMonoidHom P = Q} := by rcases Classical.em (∃ P₀, φ.toAddMonoidHom P₀ = Q) with ⟨P₀, hP₀⟩ | h_empty · exact Finite.of_equiv _ (fiberEquivKernel φ hP₀).symm - · haveI : IsEmpty {P : W₁.Point // φ.toAddMonoidHom P = Q} := + · have : IsEmpty {P : W₁.Point // φ.toAddMonoidHom P = Q} := ⟨fun ⟨P, hP⟩ ↦ h_empty ⟨P, hP⟩⟩ infer_instance -/-- **Bijection of nonempty fibers**: any two nonempty fibers of `φ` are in - bijection. (They're both cosets of the kernel, hence have the same size.) -/ + noncomputable def fiberEquivFiber (φ : Isogeny W₁ W₂) {P₀ : W₁.Point} {Q : W₂.Point} (hP₀ : φ.toAddMonoidHom P₀ = Q) {P₁ : W₁.Point} {Q' : W₂.Point} (hP₁ : φ.toAddMonoidHom P₁ = Q') : @@ -226,21 +178,12 @@ noncomputable def fiberEquivFiber (φ : Isogeny W₁ W₂) {P : W₁.Point // φ.toAddMonoidHom P = Q'} := (fiberEquivKernel φ hP₀).trans (fiberEquivKernel φ hP₁).symm -/-- **T-III-4-015 step 1** (kernel-as-fiber-over-zero): the kernel of an - isogeny is in canonical bijection with the fiber over the identity point. - Direct specialization of `fiberEquivKernel` to `Q = 0` (image of `P₀ = 0`). - This is the foundational set-theoretic identification: `φ.kernel ≃ φ⁻¹(0)`. - Combined with `fiber_card_eq_kernel_card` (which generalizes to any `Q` in - image), this gives the standard isogeny-fiber result that connects the - kernel cardinality to the fiber structure. -/ noncomputable def kernel_equiv_fiber_zero (φ : Isogeny W₁ W₂) : φ.kernel ≃ {P : W₁.Point // φ.toAddMonoidHom P = 0} := (fiberEquivKernel φ (by simp : φ.toAddMonoidHom 0 = 0)).symm -/-- **Corollary** (kernel-cardinality = fiber-zero-cardinality): when the kernel - is finite, the cardinality of the fiber over zero equals the cardinality of - the kernel. Direct from `kernel_equiv_fiber_zero`. -/ + theorem kernel_card_eq_fiber_zero_card (φ : Isogeny W₁ W₂) [Finite φ.kernel] : Nat.card φ.kernel = Nat.card {P : W₁.Point // φ.toAddMonoidHom P = 0} := @@ -253,7 +196,7 @@ theorem fiber_card_eq_kernel_card (φ : Isogeny W₁ W₂) Nat.card {P : W₁.Point // φ.toAddMonoidHom P = Q} = Nat.card φ.kernel := Nat.card_congr (fiberEquivKernel φ hP₀) -/-- The kernel of the identity isogeny is trivial. -/ + @[simp] theorem kernel_id : (Isogeny.id W₁).kernel = ⊥ := by ext P simp [mem_kernel_iff, id_toAddMonoidHom] @@ -308,15 +251,7 @@ theorem fiber_card_eq_sepDegree_of_witness (φ : Isogeny W₁ W₂) rw [← fiber_card_eq_kernel_card φ rfl (P₀ := P₀_wit)] exact h_wit -/-- **Hasse-bound shortcut**: if `|ker φ| = φ.sepDegree` (a finite-field - fact that can be proved directly without going through the generic - II.2.6(b) fiber-size theorem), then the fiber over `φ(0)` (i.e. the - kernel) provides the fiber witness used by the historical witness-parametric - Hasse-bound route. - Reduces T-II-2-009's "existential fiber-size = sepDegree" witness to the - simpler `|ker| = sepDegree` fact, which is directly accessible for - separable isogenies over finite fields via the V.1 chain. -/ theorem fiber_witness_of_ker_card_eq_sepDegree (φ : Isogeny W₁ W₂) [Finite φ.kernel] (h_ker_sep : Nat.card φ.kernel = φ.sepDegree) : @@ -327,13 +262,7 @@ theorem fiber_witness_of_ker_card_eq_sepDegree (φ : Isogeny W₁ W₂) rw [fiber_card_eq_kernel_card φ (P₀ := 0) (Q := φ.toAddMonoidHom 0) rfl, h_ker_sep] -/-- **T-III-4-015 step 2 closer** (witness-parametric): given a witness that -the fiber over zero has cardinality `φ.sepDegree`, the kernel cardinality -equals `φ.sepDegree`. Direct from `kernel_card_eq_fiber_zero_card`. -The witness `h_fiber_card_zero` is the SUBSTANTIVE content of Silverman -III.4.10/12 specialized to fiber over zero: for separable isogenies, every -fiber has cardinality = sepDegree. -/ theorem kernel_card_eq_sepDegree_of_fiber_zero_witness (φ : Isogeny W₁ W₂) [h_ker : Finite φ.kernel] (h_fiber_card_zero : @@ -341,9 +270,7 @@ theorem kernel_card_eq_sepDegree_of_fiber_zero_witness (φ : Isogeny W₁ W₂) Nat.card φ.kernel = φ.sepDegree := by rw [kernel_card_eq_fiber_zero_card φ, h_fiber_card_zero] -/-- **T-III-4-015 witness form for separable isogenies**: If `φ` is - separable and has a finite kernel, and at least one fiber has - cardinality = `sepDegree`, then `#ker φ = deg φ`. -/ + theorem card_kernel_eq_degree_of_separable_witness (φ : Isogeny W₁ W₂) [h_ker : Finite φ.kernel] (hsep : φ.IsSeparable) (hfin : @FiniteDimensional W₂.FunctionField W₁.FunctionField _ _ @@ -385,16 +312,7 @@ theorem sepDegree_eq_card_emb (φ : Isogeny W₁ W₂) : AlgebraicClosure W₁.FunctionField) := rfl -/-- **R2 reduction brick** (Silverman III.4.10c, embeddings half): for a -separable, finite-dimensional isogeny `φ`, if the **embedding count equals the -kernel count** — `φ.sepDegree = #ker φ`, i.e. -`#(K(E₁) →ₐ[φ*K(E₂)] Ω) = #ker φ` — then `#ker φ = deg φ`. -This is the clean compositional consumer for the embeddings-classification -route: `#ker φ = sepDegree φ` (hypothesis) `= deg φ` (separability, via -`isSeparable_iff_sepDegree_eq_degree`). The substantive content is delegated -to the hypothesis `h_count`, which is exactly the embedding↔kernel bijection -`Emb ≃ ker φ`. -/ theorem card_kernel_eq_degree_of_sepDegree_eq_card_kernel (φ : Isogeny W₁ W₂) (hsep : φ.IsSeparable) (hfin : @FiniteDimensional W₂.FunctionField W₁.FunctionField _ _ @@ -491,9 +409,9 @@ theorem card_aut_eq_degree_of_isGalois (φ : Isogeny W₁ W₂) (hgal : @IsGalois W₂.FunctionField _ W₁.FunctionField _ φ.toAlgebra) : Nat.card (@AlgEquiv W₂.FunctionField W₁.FunctionField W₁.FunctionField _ _ _ φ.toAlgebra φ.toAlgebra) = φ.degree := by - letI := φ.toAlgebra - haveI := hfin - haveI := hgal + let := φ.toAlgebra + have := hfin + have := hgal exact IsGalois.card_aut_eq_finrank W₂.FunctionField W₁.FunctionField /-- **T-III-4-015 step 4** (IsGalois from Separable + Normal): given the @@ -510,7 +428,7 @@ theorem isGalois_of_separable_and_normal (φ : Isogeny W₁ W₂) (h_normal : letI := φ.toAlgebra Normal W₂.FunctionField W₁.FunctionField) : @IsGalois W₂.FunctionField _ W₁.FunctionField _ φ.toAlgebra := by - letI := φ.toAlgebra + let := φ.toAlgebra exact isGalois_iff.mpr ⟨h_sep, h_normal⟩ /-- **T-III-4-015 step 4b** (IsGalois from Isogeny.IsSeparable + Normal): diff --git a/projects/HasseWeil/HasseWeil/Isogeny/OmegaCoeffViaFormalGroup.lean b/projects/HasseWeil/HasseWeil/Isogeny/OmegaCoeffViaFormalGroup.lean index b4f3c844a3d84552f61642e618d4c4c2e3ea997f..ee9bf1a49bf89477daa167de9f0698966a7944f9 100644 GIT binary patch delta 6076 zcmaJ_3v?9K89x7pfD9!Vfq;T=Av}_hT?h~L1ffMFCGrXq6h+KVcJJnV~qaRa|Lk=&EPeaL;?f429`E^~RjYaDxGP0r(Bd=1)Q$58kDx<436OCh$K%21hNRMJ= z?Bz>goPBo()Lce-GE@@^@zpdL1UDVL1%3UP@tWY&c5L>yZ zm639K4??!t`z5a>1gg-exP-ePNz(?UB%X^CR1;N1eE1RpA@G-@kxam!6u^lwaBAzevDtR^VR zUksy0($J3E78q#DEJcHGRTrtMlH<<{^9Ekp&`4TaTVrzstT61FPV}+aPFgyz;#$7f zL+|M~`|)5Rrp;6@iLdRN*0ipph0G%@b!)rusc|iTuRlvnw=;d%r~==%t}QMuj^qDm z2JfJ@cueAV2f+|v2|ZvYsFp4-;kRzM@2y=dASD0-}$698%%*HdkL#VWxwcwh^H zGTwy}HpPX5E!pRfPK?4tro=87*il782b+|bD!Pr7LVT`p1s-$a&YfhYcThN1yf8>| z@F9HIgm;Fs&nHx|r>+?0JYT(R!1-LOoU9lnAX^!#8#L=Q)Vx$#ST0BlVa&1K4`(5H z-~p$hz~eEDOtHb|voEDH-)a&!_!`gt9LuV0cEEXU_!Vh};}SuQ;+3&S(G><=pH~cO zO7ScjV;h+fj}dNSk9SdpAOkeA*T+w&5jf%j%T<#C$FdlysT9~}Rdr)mqYi$IaRG#` zUi9<8meCz4T~+lSlc2jjTt-FeDOt0h46^+nBqCX~gRbvTY06^%ocLk*_0P4&h2F1* zlFnEpqpg#q>Cq@z;2E@$bLD8+Gm1zHXETX}BAxD=gsf>g9;zdSa6;4bmN4m=$%DZoLZyH(fk`6kjh+<5F$TFd{ z$5|>!u+0+YUv9puse*KY>D)wY%2*0`iAQY4Xi5b>4>n?c6(Qam&B>VkF}rkANzWC8 z8#qHCVT&>bVJ`rL|0SpzBYw)oC4Qk24o;7JG8kZ($0dvrx`EeQid7bTJa|xM z>vgA9QdmyJ2znLcVFIbGtqrnW-t>s5n6CR3hg*tMQX|0%BSD3M8_^ijm)h4WZvsPk z)te|dXw=KZXybeq^A{pnF|o{}Nx$OYjwnf_m^xO6y+p8Mpan$P(FZ25lMghrO$X;N zi|wwA%NMw8XDNW4{YZtbfX?HeRwxAz%lHLqidyX<7AnoWJ^5w0iU~a_n%XJw zj}mwc^0*MSDR(|@4oE9iR^f_9t8fNo_#O^{y^;5L0Y6G-@+0?*AHE5!#CW01CGcXH zvtzOF4I%=qvsPQjGnF&t$6LX9-yL1SrW_dOv>j-JQcYBhZO&NqE(r>W2_4tos5Q4}Mjj`!27z0m4 z+>bAW-wd*65@@hLoD5?})_E(hCRf+jlLnGJar5Tn8oPE1d|s8Rmk9o;^S?Dsg+=a$ zsW5(6s3f(wUIf1#5~@kv?u+5+$e2mnop125p0V(^n%YnEv z20iw_m%)tD@m4R1#sX@Id+F4jzZ{OjBo*eYX4BV5L1{ zB^>YPrVFlw{WjE~5+7X&V=80q$P)>b;v|8SduRe-P}Q3n#WyT{!EMJ(yeb}Zo7cc> zs10ulS9+oS_Knv-18RKa8mO!+w0h-Opi?*xau@`qhbYiEbMb}!%|#^MYMnV3;iVte zi^XGn238df6~oW=bxWZ->6slnFt1AS`{{5zUKN`in}y-X^;7i(B5%pz9T^qrR8>;g zMdS_545(yi+%zz#-AtEqf%4abo7qbtUQ0vaz)+XgG#_j+M< zg}eNl@F2MF-UK_qez*@NxQF`SS+IBC2t({$x4`>it$kt>6x>@j!w7FL4#m2u{rB78 zV!QTsxYUl{4sW`b-T_AkxzTUKsR3eBg-R{^8xKLV?LGu6-N9Qx8pPl0?Rk$tpMCHV z__h1k_rW;h$VVT8mtEy?7y&h_LYyix=#oX#m&Wa1ZHJrOD|WzA?Pc81JRf-yRtL{h_CTBe?B2Ks?u``C;@s4xoJG(XN|r|bZrBo|4%tZO zd8fibDys&SlfBp}B)V|w*1eI^(gVjSKgG$Kav}rWQ1^}nJkyBSQ{6V)Y-3ZgPDbT(mW5#RDUrcMh{t= z!OY*0TUY!>H{g7ZwBSE6?1uf%-p9JS){wj{eDD@i%vDM@r_vR?5$nK=g2&;&rmI5; zQ9Sj;Z9D7g?DQrWAM?bkk72{#saqYo!CQYz&yi*IF=QqkN6a05ufI&A?jN230Q(aM z=DQdD5bg@9Z$8oFc1}~A4@LR37H>^sAkb_l_Ieow2j1LUXRhF(jgt<)L*WIu(k-jp yaelL1tZoC2D656B?$&UMTvcAm+OQu++M`@}%f+X`Al}{RPv9K?am}+ZEb@O<2dy*! diff --git a/projects/HasseWeil/HasseWeil/Isogeny/OrdTransport.lean b/projects/HasseWeil/HasseWeil/Isogeny/OrdTransport.lean index 25e8c912a..3e6fa927e 100644 --- a/projects/HasseWeil/HasseWeil/Isogeny/OrdTransport.lean +++ b/projects/HasseWeil/HasseWeil/Isogeny/OrdTransport.lean @@ -6,34 +6,25 @@ Authors: Chris Birkbeck import HasseWeil.Foundation.EC.TranslateOrdInfty /-! -# General DVR order-transport along a field hom (Silverman II.2.5, the unramified case) +# Unramified order transport along a field homomorphism -This file isolates the *purely valuation-theoretic* core of the order-transport -`ord_P (φ g) = ord_Q g` for an injective field homomorphism `φ : K(C) → K(C)` and a pair of smooth -points `P` (source) and `Q` (target). It is the abstract DVR-transport step (Step 1 of the -divisor-pullback brief): once one knows +Let `φ : E → K(C)` be a field homomorphism and `P` a smooth point of `C`. +Suppose the comap of the point valuation at `P` is equivalent to a surjective +integer-valued valuation `v_Q` on `E`. If `ord_P (φ t) = 1` for one element `t`, +the comap is also surjective, and the equivalent normalized valuations are equal. -* **(same place)** the comap valuation `(pointValuation Q).comap φ` is `Valuation.IsEquiv` to - `pointValuation P` — i.e. `φ` carries the valuation ring of `Q` onto that of `P`; and -* **(unramified, `e = 1`)** `ord_P (φ t) = 1` for a *single* uniformizer `t` at `Q`, +The equivalence expresses equality of places, or valuation rings; the order-one +condition fixes the ramification index to `1`. Together these give +`ord_P (φ g) = ord_Q g` for every `g`. -the value-precise identity `ord_P (φ g) = ord_Q g` holds for **all** `g` (no ramification factor). -The two inputs are genuinely independent: the first is "same place / same valuation ring", the -second is the normalization `e = 1` (the ramification index), which for `[ℓ]` is the geometric -content of separability. - -The main export is `comap_pointValuation_eq_of_isEquiv_of_ord_eq_one`, plus the small valuation glue -lemmas it rests on (`Fintype`-free; the `[Fintype K]`-scoped versions they were derived from lived -in `Hasse/L6Witnesses.lean`, which no longer exists, so these are now the only copies). - -Reference: Silverman, *The Arithmetic of Elliptic Curves*, II.2.5–2.6, III.4.10c. +Reference: Silverman, *The Arithmetic of Elliptic Curves*, II.2.5–2.6 and III.4.10c. -/ open WeierstrassCurve HasseWeil.Curves namespace HasseWeil -variable {F : Type*} [Field F] [DecidableEq F] +variable {F : Type*} [Field F] /-- A `ℤᵐ⁰`-valued valuation on a field is surjective as soon as some element takes the value `exp (-1)`: the negative powers of that element realise every `exp (-n)`, and `0 ↦ 0`. Shared core @@ -143,8 +134,7 @@ Let `φ : E → K(C)` be a ring hom from a field `E`, `P` a smooth point of `C`, then `(pointValuation P).comap φ = v_Q` *as valuations* (not merely equivalent). Reading off `ord`, this yields `ord_P (φ g) = ord_Q g` for all `g` with no ramification factor. -This packages Step 1 of the divisor-pullback brief: the entire affine/infinity order-transport for -a separable isogeny reduces to discharging the two displayed inputs. -/ +The two hypotheses separate equality of valuation rings from the order normalization. -/ theorem comap_pointValuation_eq_of_isEquiv_of_ord_eq_one {E : Type*} [Field E] (φ : E →+* C.FunctionField) (P : C.SmoothPoint) (v_Q : _root_.Valuation E (WithZero (Multiplicative ℤ))) (hv_Q : Function.Surjective v_Q) diff --git a/projects/HasseWeil/HasseWeil/Isogeny/SeparableWitnessReductions.lean b/projects/HasseWeil/HasseWeil/Isogeny/SeparableWitnessReductions.lean index a8ca2af446a345ac435d9f954c6af5b621ff0cba..7f04d3fd4cc31b5fb8d41b6bcd3ca5f5abba841c 100644 GIT binary patch delta 2578 zcmb_e&u<$=6qb`BwG&W5B_X0x`brgIBYT^KHX;!@K~jZCEszKVRp^d)$Ig)58E0lU zjg63VsG|1Da)3jnUbw&oVZSbwl^dMkb3fZcK7}G-uHcP zzxlQB;BMjDy+Zp9xkVMH!eeFFU`nt6G;cAW!Ur9zkC_+oEgm&N)2EOxg&6=;Nb3Ou)pKlD6ZPyu?N}(xy2M70uAb{swnr`-~|%%FcY6bjSC(z z{9%D#CYXXL?o}F+iwGh`g$`)Mr2wy2HSn+zU?KS<48<@}6Kb)*@};QQfWQJ4G7&js zDbk>rjuda(`w+=)^SLY<0cfPbZG)nV6vUeOz=iGm8Vw}Z#G`>1XVqbT^FjuvN0rY7 z4G=^JR#FJL`Bw%Z+bXnoEK)SzVd~TcOJ{HewO$^Sl-+oxQ&7<|)5Srk# zx?&8|m128dtSkUGtD-0;IVh&ZC*r4y(&aa=-*7E=-qANel% z@`Zb=s|aA7$&lfYJfP{A3`aypzNV=-j3XR<+J2566xm|mxBLOipE=?t17{}M4w%r? zH=u6eMH<4&(7yIR7*5>%JGWM#xWD_+E6^&zJlLxuo_?~w3oD=E zp=%PJNPcizE-9|?00j~bA)00^IEPX)H12eMzxYF;u$p{zshGSxc6OpnsMc|4dg3UV z!+Pv%FnMS6T%pt%8Xp>Huja;JIg+U$)o_h(r|?1}4uUH6HUOWmGl#4iPUjh#7j%_* z6g3Af_PK$LPo~b2(<)#tL&ay29jOwmSfXaAwnSLxyBso@f-Eu`k5R9KX+a01e6&9&{c#KcBuLLmt7+H<`zM+`>63~yx;g4;2}0P025KG~M(_<{sr}^GlWmTk?R8x* zQ&Jbhu1{}AOlaft#)#M^+EccHj4+Ru05A0nFm>ZfUCFp{$Rd-o%fp?*!q-nd;TB`7 z_W&a0*5ku%(R{R468>HP9BEE!9U7(&``z4dB#0IY*$;B zv1k9u!?n>7>@9Px%(SjJQKF{KPj&tX<4Qw^J9^sm7eSMTeHU zi=QT6z~k=`hMU*dTx;gZgf~8G|J89tn9qR2-$D3R-$V1&;BKp?0POgs!S+dFIHs?SMns6v} zn-IvP#C8lM&Z(d3riKD?i9=1zqYuZCAx)scx}EA~R(~MJ zRq71upnQ)Y*MPH4q>p*Y0N3@<4ud49ouZzDp~0Z3a3!;88(CcH#v&0^)1^dn5}6cg zhLN>R)9xeRWo9pRQkvC7Iyz#rV{L6in`ZO2+3K|;HaFJRntPfTn?1CN-zj#^GJ;uSd!l7J%o{`Slhk^t zoU-^T@H=mLSngc>^!4-4BSuzhBAVns*tBMrrE9OkE&RDQ9Quppco>uzFD_XHkJjZU_&7a zByeX`u35P+%%8fxUha-R8j_Xwdmz8v`62MV`gy*?Xb|YSm3%y%FPGDIK^$m+$)c(S zCWcMwiN|k&+8TTy3l|ChoD#Y=jUz<&Pz5`F8y7OU&n=B$h|W0g)5`ZJ+xY|R=mgSmuR>Hv7DgJ&V3l08_C(3l5iX)6P8Oj& zG1veN{HR$aH``S(BE+%uxX?%!KXH$Zbj&ZiMTy2=*KgvBcU8+%+m|Wl5OH-Z)bR8A z41R9cUi8$>@~vmWVa`uakPp6C163+T$wN!2&J3;Fq<5?n?+?HX>HO>@-1vWYWYr^B znGv~o_vd9Ra<_R;sheVy;JuSF>@uFCxo*4ajj;~*j(oEuoiWc|(t~}EiVp{XNcQvc z@F+w6`oIUpIKOC0v(={-< zD)G8AljZmRylu2CoqVP`v~a{|J@ge~z|WqWByT_a!YDw=v*-R^^7S>6zxnu$(l1KU zEf@Y(9NvwWR+dit(wxj?_Q_BG0sQj6_hTv?lE3=Azrx>94!gp_84G)$UBt%0)G2B} zxugq+AQ}3>3%Tjmt|oey-!%@N4+@K4cyOX0p9Ir@$Bh-LviMuijQ7Xf2q#10Z?*8J zpe=ne4TiSW!EOHcZ-T#q_(eS|^`D#te}qXRHi>)qzymYIdo!RcXk0-XQ{8LI$lXiz z_G_JQuJ~aT>cz{AP${Y#VUU08_FDeR+J*f5+T~*FH(;R;G5Bc2mLqCf;pIX})c50L zB*8|3(>HCqIJEPtj+;p}V>#=T6istAB64d@VVpdM?!_0nc|~$(CTmMgNdMKrnqnrYW>5H!@I-4Id1>O&9EKH zn@MA1S7MFWGzhc&El;zeSW4;Pef8cr8Q3USe;VUKn zhCR?zRHGswJ+u!h%L=;I`Dn$0qIaciy=XoGr-y0OS*zdqOE_LE7#W+ynh&7Dzw|rU zQ7W#ShD+kE_hCyB<1o$LLolmY%;8ID>)^-mo^nw%)a8gn7vTnf!aw1;kbmGJRENdW N7opyde+tJ#{{ctriJ1TZ diff --git a/projects/HasseWeil/HasseWeil/Pic0/ClassGroupNorm.lean b/projects/HasseWeil/HasseWeil/Pic0/ClassGroupNorm.lean index a3e70337f..dec8deca0 100644 --- a/projects/HasseWeil/HasseWeil/Pic0/ClassGroupNorm.lean +++ b/projects/HasseWeil/HasseWeil/Pic0/ClassGroupNorm.lean @@ -4,7 +4,11 @@ Released under Apache 2.0 license as described in the file LICENSE. Authors: Chris Birkbeck -/ import Mathlib.LinearAlgebra.FreeModule.Norm -import Mathlib.NumberTheory.RamificationInertia.Basic +import Mathlib.RingTheory.RamificationInertia.Basic +import Mathlib.NumberTheory.RamificationInertia.Inertia +import Mathlib.NumberTheory.RamificationInertia.Ramification +import Mathlib.RingTheory.Ideal.Norm.AbsNorm +import Mathlib.RingTheory.SimpleModule.Basic import Mathlib.RingTheory.ClassGroup.Basic import Mathlib.RingTheory.Ideal.Norm.RelNorm import Mathlib.RingTheory.Localization.AtPrime.Extension @@ -33,8 +37,8 @@ open scoped nonZeroDivisors namespace HasseWeil variable {R S : Type*} -variable [CommRing R] [IsDomain R] [IsIntegrallyClosed R] [IsDedekindDomain R] -variable [CommRing S] [IsDomain S] [IsIntegrallyClosed S] [IsDedekindDomain S] +variable [CommRing R] [IsDedekindDomain R] +variable [CommRing S] [IsDedekindDomain S] variable [Algebra R S] [Module.Finite R S] [Module.IsTorsionFree R S] /-- The relative norm of an integral ideal, packaged as a homomorphism of `nonZeroDivisors` @@ -74,14 +78,14 @@ theorem mk0CompRelNorm0_eq_of_mk0_eq {I J : (Ideal S)⁰} -- Provide the (deliberately non-instance) lift algebra on the fraction fields, so that -- `Algebra.intNorm_ne_zero` (which assumes `FiniteDimensional (FractionRing R) (FractionRing S)`) -- is available. - letI : Algebra (FractionRing R) (FractionRing S) := + let : Algebra (FractionRing R) (FractionRing S) := FractionRing.liftAlgebra R (FractionRing S) - haveI : IsScalarTower R (FractionRing R) (FractionRing S) := + have : IsScalarTower R (FractionRing R) (FractionRing S) := FractionRing.isScalarTower_liftAlgebra R (FractionRing S) - haveI : IsLocalization (Algebra.algebraMapSubmonoid S R⁰) (FractionRing S) := + have : IsLocalization (Algebra.algebraMapSubmonoid S R⁰) (FractionRing S) := IsIntegralClosure.isLocalization R (FractionRing R) (FractionRing S) S - haveI : IsScalarTower R S (FractionRing S) := IsScalarTower.of_algebraMap_eq fun _ ↦ rfl - haveI : FiniteDimensional (FractionRing R) (FractionRing S) := + have : IsScalarTower R S (FractionRing S) := IsScalarTower.of_algebraMap_eq fun _ ↦ rfl + have : FiniteDimensional (FractionRing R) (FractionRing S) := Module.Finite.of_isLocalization R S R⁰ rw [ClassGroup.mk0_eq_mk0_iff] at h obtain ⟨x, y, hx, hy, hxy⟩ := h @@ -177,30 +181,21 @@ transports `e`, `f` across the localisation, leaving only the relative-norm/loca compatibility — see the residual note after `Ideal.relNorm_eq_under_of_inertiaDeg_one`.) -/ -- The `S/R` fraction-field tower + residue-degree `finrank` bookkeeping need elaboration room. -/-- **`relNorm 𝔪 = p ^ inertiaDeg' p 𝔪` over a local base extension, unconditionally** (no -`PerfectField`). For a **local** Dedekind domain `S` (a DVR) module-finite over a Dedekind domain -`R`, with `𝔪 = IsLocalRing.maximalIdeal S` lying over a maximal `p ≠ ⊥` of `R`, the relative norm -of `𝔪` is `p ^ inertiaDeg' p 𝔪`. - -Proof (see the section note): `p · S = 𝔪^e` (unique prime, via -`Ideal.map_algebraMap_eq_finset_prod_pow` + `IsLocalRing.primesOver_eq`); applying `relNorm` and -`Ideal.relNorm_algebraMap` gives `(relNorm 𝔪)^e = p^{e·f}` using -`Ideal.ramificationIdx_mul_inertiaDeg_of_isLocalRing` (`e·f = [Frac S : Frac R]`); writing -`relNorm 𝔪 = p^s` (`Ideal.exists_relNorm_eq_pow_of_isPrime`) and cancelling the prime power -(`pow_injective_of_not_isUnit`) pins `s = f`. **No separability / Galois / `PerfectField`.** -/ + + theorem Ideal.relNorm_maximalIdeal_eq_pow_inertiaDeg_of_isLocalRing {R S : Type*} - [CommRing R] [IsDomain R] [IsIntegrallyClosed R] [IsDedekindDomain R] - [CommRing S] [IsDomain S] [IsIntegrallyClosed S] [IsDedekindDomain S] [IsLocalRing S] + [CommRing R] [IsDedekindDomain R] + [CommRing S] [IsDedekindDomain S] [IsLocalRing S] [Algebra R S] [Module.Finite R S] [Module.IsTorsionFree R S] {p : Ideal R} [p.IsMaximal] (hp0 : p ≠ ⊥) [(IsLocalRing.maximalIdeal S).LiesOver p] : Ideal.relNorm R (IsLocalRing.maximalIdeal S) = - p ^ p.inertiaDeg' (IsLocalRing.maximalIdeal S) := by + p ^ (IsLocalRing.maximalIdeal S).inertiaDeg R := by set m := IsLocalRing.maximalIdeal S with hm set e := Ideal.ramificationIdx' p m with he_def - set f := p.inertiaDeg' m with hf_def - haveI : m.IsMaximal := IsLocalRing.maximalIdeal.isMaximal S + set f := m.inertiaDeg R with hf_def + have : m.IsMaximal := IsLocalRing.maximalIdeal.isMaximal S have he0 : e ≠ 0 := Ideal.IsDedekindDomain.ramificationIdx'_ne_zero_of_liesOver m hp0 -- `p · S = 𝔪^e` (the *unique* prime over `p`, so the factorisation is a single term). have hmap : Ideal.map (algebraMap R S) p = m ^ e := by @@ -217,15 +212,23 @@ theorem Ideal.relNorm_maximalIdeal_eq_pow_inertiaDeg_of_isLocalRing (by rw [← IsLocalRing.primesOver_eq S hp0, ← Set.mem_toFinset]; exact hb)) hne · intro h exact absurd (by rw [Set.mem_toFinset, IsLocalRing.primesOver_eq S hp0]; rfl) h - -- `e · f = [Frac S : Frac R]` (the fundamental identity; *no* separability hypothesis). - letI : Algebra (FractionRing R) (FractionRing S) := FractionRing.liftAlgebra R _ - haveI : IsScalarTower R (FractionRing R) (FractionRing S) := - FractionRing.isScalarTower_liftAlgebra R _ - haveI : IsScalarTower R S (FractionRing S) := IsScalarTower.of_algebraMap_eq fun _ ↦ rfl - -- `relNorm_algebraMap`'s exponent is `finrank R S`, so transport `e·f` down the fraction fields. - have hef : e * f = Module.finrank R S := - (Ideal.ramificationIdx_mul_inertiaDeg_of_isLocalRing S (FractionRing R) (FractionRing S) - hp0).trans (IsFractionRing.finrank_eq R (FractionRing R) S (FractionRing S)) + have hef : e * f = Module.finrank R S := by + classical + let : Unique (p.primesOver S) := + { default := ⟨m, by + rw [IsLocalRing.primesOver_eq S hp0] + exact Set.mem_singleton m⟩ + uniq q := Subtype.ext (by + have hq : (q : Ideal S) ∈ ({m} : Set (Ideal S)) := by + simpa only [IsLocalRing.primesOver_eq S hp0] using q.2 + exact Set.mem_singleton_iff.mp hq) } + have h := Ideal.sum_ramification_inertia_eq_finrank p S + have hd : ((default : p.primesOver S) : Ideal S) = m := by + have hq : ((default : p.primesOver S) : Ideal S) ∈ ({m} : Set (Ideal S)) := by + simpa only [IsLocalRing.primesOver_eq S hp0] using (default : p.primesOver S).2 + exact Set.mem_singleton_iff.mp hq + simpa only [Fintype.sum_unique, hd, + ← Ideal.ramificationIdx'_eq_ramificationIdx p m hp0] using h -- `(relNorm 𝔪)^e = relNorm(𝔪^e) = relNorm(p · S) = p^{[Frac S:Frac R]} = p^{e·f}`. have h3 : (Ideal.relNorm R m) ^ e = p ^ (e * f) := by rw [← map_pow, ← hmap, Ideal.relNorm_algebraMap, hef] @@ -233,7 +236,7 @@ theorem Ideal.relNorm_maximalIdeal_eq_pow_inertiaDeg_of_isLocalRing obtain ⟨s, hs⟩ := Ideal.exists_relNorm_eq_pow_of_isPrime m p rw [hs, ← pow_mul] at h3 have hpr : Prime p := (Ideal.prime_iff_isPrime hp0).mpr inferInstance - have hse : s * e = e * f := pow_injective_of_not_isUnit hpr.not_unit hpr.ne_zero h3 + have hse : s * e = e * f := pow_injective_of_not_isUnit hpr.not_isUnit hpr.ne_zero h3 have hsf : s = f := Nat.eq_of_mul_eq_mul_right (Nat.pos_of_ne_zero he0) (by rw [hse]; ring) rw [hs, hsf] @@ -245,16 +248,15 @@ collapses (`pow_one`) and `p = 𝔪.under R`, giving `relNorm R 𝔪 = 𝔪.unde S) 𝔪`) with **no** separability hypothesis. -/ theorem Ideal.relNorm_maximalIdeal_eq_under_of_inertiaDeg_one_of_isLocalRing {R S : Type*} - [CommRing R] [IsDomain R] [IsIntegrallyClosed R] [IsDedekindDomain R] - [CommRing S] [IsDomain S] [IsIntegrallyClosed S] [IsDedekindDomain S] [IsLocalRing S] + [CommRing R] [IsDedekindDomain R] + [CommRing S] [IsDedekindDomain S] [IsLocalRing S] [Algebra R S] [Module.Finite R S] [Module.IsTorsionFree R S] (hp0 : (IsLocalRing.maximalIdeal S).under R ≠ ⊥) - (hf : Ideal.inertiaDeg' ((IsLocalRing.maximalIdeal S).under R) - (IsLocalRing.maximalIdeal S) = 1) : + (hf : (IsLocalRing.maximalIdeal S).inertiaDeg R = 1) : Ideal.relNorm R (IsLocalRing.maximalIdeal S) = (IsLocalRing.maximalIdeal S).under R := by - haveI : ((IsLocalRing.maximalIdeal S).under R).IsMaximal := + have : ((IsLocalRing.maximalIdeal S).under R).IsMaximal := Ideal.IsMaximal.under R (IsLocalRing.maximalIdeal S) - haveI : (IsLocalRing.maximalIdeal S).LiesOver ((IsLocalRing.maximalIdeal S).under R) := + have : (IsLocalRing.maximalIdeal S).LiesOver ((IsLocalRing.maximalIdeal S).under R) := Ideal.over_under _ rw [Ideal.relNorm_maximalIdeal_eq_pow_inertiaDeg_of_isLocalRing hp0, hf, pow_one] @@ -271,19 +273,10 @@ The key observation is that `Algebra.intNorm A B x` is defined as the restrictio `B`, not on the integral model `B`. Hence two integral models `B`, `B'` of the same field extension have the same `intNorm`, and therefore the same `relNorm` on corresponding ideals. -/ -/-- **`intNorm` depends only on the common fraction field.** If `B` and `B'` are integrally closed -domains, both integral over `A` and both having `L` as a common fraction field over `K = Frac A` -(with `B → B'` compatible), then `intNorm A B x = intNorm A B' (algebraMap B B' x)`. -This is `Algebra.algebraMap_intNorm` (`algebraMap A K (intNorm A B x) = norm K (algebraMap B L x)`) -applied to both `B` and `B'` with the **same** ambient field `L`: the two field norms coincide -because `algebraMap B L = algebraMap B' L ∘ algebraMap B B'` (the scalar tower `B → B' → L`). -No module-finiteness of `B'` over `A` is required (only finiteness at the fraction-field level -`[FiniteDimensional K L]`), which is why this survives the passage to a non-finite localisation. -/ theorem intNorm_eq_intNorm_of_common_fractionField {A K L B B' : Type*} - [CommRing A] [IsDomain A] [IsIntegrallyClosed A] - [Field K] [Algebra A K] [IsFractionRing A K] + [CommRing A] [IsDomain A] [IsIntegrallyClosed A] [Field K] [Algebra A K] [IsFractionRing A K] [Field L] [Algebra K L] [Algebra A L] [IsScalarTower A K L] [FiniteDimensional K L] [CommRing B] [IsDomain B] [IsIntegrallyClosed B] [Algebra A B] [Algebra.IsIntegral A B] [Module.IsTorsionFree A B] [Algebra B L] [IsScalarTower A B L] [IsIntegralClosure B A L] @@ -297,32 +290,17 @@ theorem intNorm_eq_intNorm_of_common_fractionField congr 1 rw [← IsScalarTower.algebraMap_apply B B' L] -/-- **`relNorm` is unchanged under top-localisation of a principal prime.** If `B` is a Dedekind -**PID** (e.g. the semilocal localisation `Sₚ`), `Q` a principal ideal of `B`, and `B'` an -integrally closed domain sharing the fraction field `L = Frac B`, then -`relNorm A Q = relNorm A (Q.map (B → B'))`. - -The proof writes `Q = span{π}` (principal), so `relNorm A Q = span{intNorm A B π}` and -`relNorm A (Q.map) = span{intNorm A B' (algebraMap π)}` (`relNorm_singleton`, `Ideal.map_span`), -and the two generators agree by `intNorm_eq_intNorm_of_common_fractionField`. - -**Caveat.** `Ideal.relNorm A B'` is only well-typed under `[Module.Finite A B']` (mathlib's -`relNorm`/`spanNorm` carry this in their definition). This is exactly why this bridge does **not** -discharge the general-base residual: the intended `B' = Localization.AtPrime Q` (a DVR isolating one -of several primes over `p`) is **not** module-finite over `A = Rₚ` when several primes lie over `p`, -so the right-hand side is ill-typed there. It applies when finiteness is preserved — e.g. when `Q` -is the *unique* prime over `p` (`finite_of_primesOver_eq_singleton`), which is the already-handled -local case `Ideal.relNorm_maximalIdeal_eq_pow_inertiaDeg_of_isLocalRing`. -/ + theorem relNorm_eq_relNorm_localization {A K L B B' : Type*} - [CommRing A] [IsDomain A] [IsIntegrallyClosed A] [IsDedekindDomain A] + [CommRing A] [IsDedekindDomain A] [Field K] [Algebra A K] [IsFractionRing A K] [Field L] [Algebra K L] [Algebra A L] [IsScalarTower A K L] [FiniteDimensional K L] - [CommRing B] [IsDomain B] [IsIntegrallyClosed B] [IsDedekindDomain B] + [CommRing B] [IsDedekindDomain B] [Algebra A B] [Algebra.IsIntegral A B] [Module.Finite A B] [Module.IsTorsionFree A B] [Algebra B L] [IsScalarTower A B L] [IsIntegralClosure B A L] [IsPrincipalIdealRing B] - [CommRing B'] [IsDomain B'] [IsIntegrallyClosed B'] [IsDedekindDomain B'] + [CommRing B'] [IsDedekindDomain B'] [Algebra A B'] [Algebra.IsIntegral A B'] [Module.Finite A B'] [Module.IsTorsionFree A B'] [Algebra B' L] [IsScalarTower A B' L] [IsIntegralClosure B' A L] [Algebra B B'] [IsScalarTower A B B'] [IsScalarTower B B' L] @@ -351,8 +329,7 @@ This reduces the `PerfectField` gate to the **single** residual stated in hypothesis `hlocal` — the per-prime relative norm over a DVR base (see the residual note after `Ideal.relNorm_eq_under_of_inertiaDeg_one`). -/ -omit [IsDomain R] [IsIntegrallyClosed R] [IsDedekindDomain R] [IsDomain S] - [IsIntegrallyClosed S] [IsDedekindDomain S] [Module.IsTorsionFree R S] in +omit [IsDedekindDomain R] [IsDedekindDomain S] [Module.IsTorsionFree R S] in /-- **The extension of `𝔭` to a localisation away from `𝔭.under` is `⊤`.** If the maximal prime `q` of `R` differs from `p = P.under R`, then `p ⊄ q`, so an element `a ∈ p ⊆ P` lands outside `q`, hence becomes a unit in `Sₚ = Localization (algebraMapSubmonoid S q.primeCompl)`; since @@ -361,7 +338,7 @@ of `relNorm_eq_under_of_localized`.) -/ theorem map_eq_top_of_under_ne (P : Ideal S) (q : Ideal R) [hq : q.IsMaximal] [P.IsMaximal] (hne : P.under R ≠ q) : P.map (algebraMap S (Localization (Algebra.algebraMapSubmonoid S q.primeCompl))) = ⊤ := by - haveI : (P.under R).IsMaximal := Ideal.IsMaximal.under R P + have : (P.under R).IsMaximal := Ideal.IsMaximal.under R P obtain ⟨a, hap, haq⟩ : ∃ a, a ∈ P.under R ∧ a ∉ q := by by_contra h; push Not at h exact hne (((Ideal.IsMaximal.under R P).eq_of_le hq.ne_top h)) @@ -374,7 +351,7 @@ theorem map_eq_top_of_under_ne (P : Ideal S) (q : Ideal R) [hq : q.IsMaximal] [P exact (P.map _).eq_top_of_isUnit_mem (Ideal.mem_map_of_mem _ haP) hunit ▸ Submodule.mem_top -- The semilocal `Sₚ` Dedekind/finite/torsion-free instance bundle over the DVR `Rₚ` pushes instance --- synthesis (e.g. `IsDomain Sₚ`) past the default budget at statement elaboration. + /-- **The relative norm localises (top + bottom) at a maximal prime `q` of `R`.** Pushing `relNorm R P` along `R → Rₚ := Localization.AtPrime q` equals the relative norm over `Rₚ` of the extension of `P` to the semilocal `Sₚ = Localization (algebraMapSubmonoid S q.primeCompl)`. @@ -417,8 +394,8 @@ theorem relNorm_eq_under_of_localized (P : Ideal S) [P.IsMaximal] (hP : P ≠ (P.map (algebraMap S (Localization (Algebra.algebraMapSubmonoid S (P.under R).primeCompl)))) = IsLocalRing.maximalIdeal (Localization.AtPrime (P.under R))) : Ideal.relNorm R P = P.under R := by - haveI : (P.under R).IsMaximal := Ideal.IsMaximal.under R P - haveI hpne : NeZero (P.under R) := ⟨Ideal.under_ne_bot R hP⟩ + have : (P.under R).IsMaximal := Ideal.IsMaximal.under R P + have hpne : NeZero (P.under R) := ⟨Ideal.under_ne_bot R hP⟩ have hnotfield : ¬ IsField R := Ring.not_isField_of_ne_of_ne (Ideal.under_ne_bot R hP) (Ideal.IsMaximal.ne_top inferInstance) refine Ideal.eq_of_localization_maximal (fun q hq ↦ ?_) @@ -426,39 +403,15 @@ theorem relNorm_eq_under_of_localized (P : Ideal S) [P.IsMaximal] (hP : P ≠ · subst hqp rw [relNorm_map_localization P (P.under R), hlocal, Localization.AtPrime.map_eq_maximalIdeal] - · haveI : NeZero q := ⟨Ring.ne_bot_of_isMaximal_of_not_isField hq hnotfield⟩ + · have : NeZero q := ⟨Ring.ne_bot_of_isMaximal_of_not_isField hq hnotfield⟩ rw [relNorm_map_localization P q, map_eq_top_of_under_ne P q hqp, Ideal.relNorm_top, IsLocalization.AtPrime.map_eq_top_of_not_le _ (fun hle ↦ hqp ((Ideal.IsMaximal.under R P).eq_of_le hq.ne_top hle))] -/-! #### The per-prime relative norm over a DVR base — the `PerfectField`-free residual, **CLOSED** - -The single remaining input of `relNorm_eq_under_of_localized` — the per-prime relative norm -`relNorm Rₚ 𝔮 = maximalIdeal Rₚ` over a **DVR** base `Rₚ` at residue degree one — is discharged -here, -**without `PerfectField`**, via the **module-length** route (no residue *field* structure on the -base, -so no `Field (Rₚ ⧸ m)` instance diamond). - -The engine is the `Rₚ`-module-length identity over a **PID** base (`Rₚ` is a DVR, hence a PID): -for a nonzero principal `Q = (π)` of a free-finite `Rₚ`-algebra `Sₚ`, - - `length_{Rₚ}(Sₚ ⧸ Q) = length_{Rₚ}(Rₚ ⧸ relNorm Rₚ Q)` (`relNorm_length_eq_span`), - -proved by Smith normal form (`Ideal.quotientEquivPiSpan` is `Rₚ`-linear) + additivity of the order -of -vanishing (`Ring.ord_mul`, `Ideal.relNorm_singleton`, `Algebra.intNorm_eq_norm`, -`associated_norm_prod_smith`). When `f = inertiaDeg' = 1`, `Sₚ ⧸ Q` is a **simple** `Rₚ`-module -(`isSimpleModule_quot_of_inertiaDeg_one`: the residue algebra map `Rₚ → Sₚ ⧸ Q` is onto, so -`Sₚ ⧸ Q ≃ₗ[Rₚ] Rₚ ⧸ m`), hence `length = 1`; the identity then forces `Rₚ ⧸ relNorm Rₚ Q` to be -simple, -i.e. `relNorm Rₚ Q` maximal, i.e. `= m` (`IsLocalRing.eq_maximalIdeal`). **No Galois, no -`PerfectField`.** -/ /-- **Additivity of the order of vanishing over a finite product** (`Ring.ord_mul`, iterated). For nonzero `cᵢ` in a commutative domain, `ord (∏ cᵢ) = ∑ ord cᵢ`. -/ -theorem Ring.ord_finset_prod {A : Type*} [CommRing A] [IsDomain A] - {ι : Type*} (s : Finset ι) (c : ι → A) (hc : ∀ i ∈ s, c i ≠ 0) : +theorem Ring.ord_finset_prod {A : Type*} [CommRing A] [IsDomain A] {ι : Type*} (s : Finset ι) (c : ι → A) (hc : ∀ i ∈ s, c i ≠ 0) : Ring.ord A (∏ i ∈ s, c i) = ∑ i ∈ s, Ring.ord A (c i) := by classical induction s using Finset.induction with @@ -469,18 +422,11 @@ theorem Ring.ord_finset_prod {A : Type*} [CommRing A] [IsDomain A] rw [mem_nonZeroDivisors_iff_ne_zero] exact Finset.prod_ne_zero_iff.mpr (fun i hi ↦ hc i (Finset.mem_insert_of_mem hi)) -/-- **Norm–length identity over a PID base.** For a free-finite algebra `Sₚ` over a PID `Rₚ` -(integrally closed domains), and a nonzero element `π`, the `Rₚ`-module length of `Sₚ ⧸ (π)` equals -the `Rₚ`-module length of `Rₚ ⧸ relNorm Rₚ (π)`. -Proof: `relNorm Rₚ (π) = (Algebra.norm Rₚ π)` (`relNorm_singleton`, `intNorm_eq_norm`), whose order -of vanishing is `∑ᵢ length(Rₚ ⧸ (cᵢ))` for the Smith coefficients `cᵢ` -(`associated_norm_prod_smith`, `Ring.ord_finset_prod`, `Ring.ord = length(·⧸·)`); the same sum is -`length(Sₚ ⧸ (π))` by the `Rₚ`-linear `Ideal.quotientEquivPiSpan` + `length_pi_of_fintype`. -/ theorem relNorm_length_eq_span {Rp Sp : Type*} [CommRing Rp] [IsDomain Rp] [IsPrincipalIdealRing Rp] [IsIntegrallyClosed Rp] - [CommRing Sp] [IsDomain Sp] [IsIntegrallyClosed Sp] [IsDedekindDomain Sp] + [CommRing Sp] [IsDedekindDomain Sp] [Algebra Rp Sp] [Module.Finite Rp Sp] [Module.IsTorsionFree Rp Sp] (π : Sp) (hπ0 : π ≠ 0) : Module.length Rp (Rp ⧸ Ideal.relNorm Rp (Ideal.span {π})) = @@ -510,30 +456,23 @@ theorem relNorm_length_eq_span -- The explicit residue-field algebra structure (built on the `Ideal.Quotient.field`-derived -- semiring -- via `algebraQuotientOfLEComap`) keeps the surjectivity/`finrank` bookkeeping in elaboration --- budget + -- *without* the `algebraOfLiesOver` instance-diamond (which carries free metavariables). -/-- **`Sₚ ⧸ Q` is a simple `Rₚ`-module at residue degree one** (the diamond-free `f = 1` input). For -a maximal ideal `Q` of `Sₚ` lying over a maximal `m` of `Rₚ` with `inertiaDeg' m Q = 1`, the residue -algebra map `Rₚ → Sₚ ⧸ Q` is **surjective** with kernel `m` (the residue extension is trivial), so -`Sₚ ⧸ Q ≃ₗ[Rₚ] Rₚ ⧸ m`, a simple `Rₚ`-module. - -Diamond-free: the residue `Field (Rₚ ⧸ m)` and the residue algebra `Algebra (Rₚ ⧸ m) (Sₚ ⧸ Q)` are -introduced together by `algebraQuotientOfLEComap` on the **same** field-derived semiring, so the -`FiniteDimensional`/`finrank` synthesis never disagrees with `inertiaDeg'`'s -`Module (Rₚ ⧸ m) (Sₚ ⧸ Q)`. -/ + + theorem isSimpleModule_quot_of_inertiaDeg_one {Rp Sp : Type*} [CommRing Rp] [CommRing Sp] [Algebra Rp Sp] (Q : Ideal Sp) [hQ : Q.IsMaximal] (m : Ideal Rp) [hm : m.IsMaximal] - [hlo : Q.LiesOver m] (hf : Ideal.inertiaDeg' m Q = 1) : + [hlo : Q.LiesOver m] (hf : Q.inertiaDeg Rp = 1) : IsSimpleModule Rp (Sp ⧸ Q) := by - letI : Field (Rp ⧸ m) := Ideal.Quotient.field m - letI alg : Algebra (Rp ⧸ m) (Sp ⧸ Q) := + let : Field (Rp ⧸ m) := Ideal.Quotient.field m + let alg : Algebra (Rp ⧸ m) (Sp ⧸ Q) := Ideal.Quotient.algebraQuotientOfLEComap (le_of_eq (Q.over_def m)) - haveI hst : IsScalarTower Rp (Rp ⧸ m) (Sp ⧸ Q) := IsScalarTower.of_algebraMap_eq' rfl + have hst : IsScalarTower Rp (Rp ⧸ m) (Sp ⧸ Q) := IsScalarTower.of_algebraMap_eq' rfl have hfr : Module.finrank (Rp ⧸ m) (Sp ⧸ Q) = 1 := by - rw [← Ideal.inertiaDeg'_algebraMap m Q]; exact hf - haveI : Nontrivial (Sp ⧸ Q) := Ideal.Quotient.nontrivial_iff.mpr hQ.ne_top - haveI : FiniteDimensional (Rp ⧸ m) (Sp ⧸ Q) := Module.finite_of_finrank_eq_succ hfr + rw [← Ideal.inertiaDeg_eq_of_isMaximal m Q]; exact hf + have : Nontrivial (Sp ⧸ Q) := Ideal.Quotient.nontrivial_iff.mpr hQ.ne_top + have : FiniteDimensional (Rp ⧸ m) (Sp ⧸ Q) := Module.finite_of_finrank_eq_succ hfr have hsurj' : Function.Surjective (algebraMap (Rp ⧸ m) (Sp ⧸ Q)) := by have hinj : Function.Injective (Algebra.linearMap (Rp ⧸ m) (Sp ⧸ Q)) := (algebraMap (Rp ⧸ m) (Sp ⧸ Q)).injective @@ -556,32 +495,23 @@ theorem isSimpleModule_quot_of_inertiaDeg_one exact ⟨m, hm, ⟨(LinearMap.quotKerEquivOfSurjective _ hsurjRp).symm.trans (Submodule.quotEquivOfEq _ _ hker)⟩⟩ --- The module-length chain over the DVR base (Smith + `Ring.ord` additivity + simplicity) needs + -- room. -/-- **The per-prime relative norm over a DVR base at residue degree one** (the `PerfectField`-free -residual, **CLOSED**). For a DVR `Rₚ` (a local PID), a Dedekind PID `Sₚ` free-finite torsion-free -over `Rₚ`, and a nonzero maximal ideal `Q` of `Sₚ` lying over `m = maximalIdeal Rₚ` with -`inertiaDeg' m Q = 1`, the relative norm `relNorm Rₚ Q = m`. - -Proof (module-length, **no** residue-field instance, **no** Galois/`PerfectField`): -`Sₚ ⧸ Q` is `Rₚ`-simple (`isSimpleModule_quot_of_inertiaDeg_one`), so `length_{Rₚ}(Sₚ ⧸ Q) = 1`; the -norm–length identity `relNorm_length_eq_span` transports this to -`length_{Rₚ}(Rₚ ⧸ relNorm Rₚ Q) = 1`, -making `Rₚ ⧸ relNorm Rₚ Q` simple, i.e. `relNorm Rₚ Q` maximal, hence `= m` -(`IsLocalRing.eq_maximalIdeal`). -/ + + theorem relNorm_eq_maximalIdeal_of_inertiaDeg_one {Rp Sp : Type*} [CommRing Rp] [IsDomain Rp] [IsPrincipalIdealRing Rp] [IsIntegrallyClosed Rp] [IsLocalRing Rp] - [CommRing Sp] [IsDomain Sp] [IsIntegrallyClosed Sp] [IsDedekindDomain Sp] + [CommRing Sp] [IsDedekindDomain Sp] [IsPrincipalIdealRing Sp] [Algebra Rp Sp] [Module.Finite Rp Sp] [Module.IsTorsionFree Rp Sp] (Q : Ideal Sp) [hQ : Q.IsMaximal] (hQ0 : Q ≠ ⊥) [hlo : Q.LiesOver (IsLocalRing.maximalIdeal Rp)] - (hf : Ideal.inertiaDeg' (IsLocalRing.maximalIdeal Rp) Q = 1) : + (hf : Q.inertiaDeg Rp = 1) : Ideal.relNorm Rp Q = IsLocalRing.maximalIdeal Rp := by set m := IsLocalRing.maximalIdeal Rp with hm - haveI : m.IsMaximal := IsLocalRing.maximalIdeal.isMaximal Rp - haveI hsimp : IsSimpleModule Rp (Sp ⧸ Q) := isSimpleModule_quot_of_inertiaDeg_one Q m hf + have : m.IsMaximal := IsLocalRing.maximalIdeal.isMaximal Rp + have hsimp : IsSimpleModule Rp (Sp ⧸ Q) := isSimpleModule_quot_of_inertiaDeg_one Q m hf have hlen1 : Module.length Rp (Sp ⧸ Q) = 1 := Module.length_eq_one Rp (Sp ⧸ Q) obtain ⟨π, hπ⟩ := (IsPrincipalIdealRing.principal Q).principal have hπ0 : π ≠ 0 := by rintro rfl; apply hQ0; rw [hπ]; simp @@ -595,8 +525,7 @@ theorem relNorm_eq_maximalIdeal_of_inertiaDeg_one exact IsLocalRing.eq_maximalIdeal hmax -- The abstract `Rₚ`/`Sₚ` localisation instance bundle (in the binders) needs synthesis room. -omit [IsIntegrallyClosed R] [IsDedekindDomain R] [IsDomain S] [IsIntegrallyClosed S] - [IsDedekindDomain S] [Module.Finite R S] [Module.IsTorsionFree R S] in +omit [IsDedekindDomain S] [Module.Finite R S] [Module.IsTorsionFree R S] in /-- **The per-prime relative norm at residue degree one, general semilocal `Rₚ`/`Sₚ`.** The hypothesis `hlocal` of `relNorm_eq_under_of_localized`, stated over abstract localisation data `Rₚ`/`Sₚ` (so the expensive concrete-`Localization` instances are deferred): for a maximal `P` of @@ -608,83 +537,58 @@ The prime/maximal/`LiesOver`/`inertiaDeg'`-transport facts for `P·Sₚ` come fr `relNorm_eq_maximalIdeal_of_inertiaDeg_one`. -/ theorem relNorm_map_eq_maximalIdeal_general (p : Ideal R) [hp : p.IsMaximal] (hp0 : p ≠ ⊥) - (Rp : Type*) [CommRing Rp] [IsDomain Rp] [IsIntegrallyClosed Rp] [IsDedekindDomain Rp] + (Rp : Type*) [CommRing Rp] [IsDedekindDomain Rp] [IsPrincipalIdealRing Rp] [Algebra R Rp] [IsLocalization.AtPrime Rp p] [IsLocalRing Rp] [Module.IsTorsionFree R Rp] - (Sp : Type*) [CommRing Sp] [IsDomain Sp] [IsIntegrallyClosed Sp] [IsDedekindDomain Sp] + (Sp : Type*) [CommRing Sp] [IsDedekindDomain Sp] [IsPrincipalIdealRing Sp] [Algebra S Sp] [IsLocalization (Algebra.algebraMapSubmonoid S p.primeCompl) Sp] [Algebra Rp Sp] [Module.Finite Rp Sp] [Module.IsTorsionFree Rp Sp] [Algebra R Sp] [IsScalarTower R S Sp] [IsScalarTower R Rp Sp] (P : Ideal S) [hPmax : P.IsMaximal] [hPp : P.LiesOver p] - (hf : Ideal.inertiaDeg' p P = 1) : + (hf : P.inertiaDeg R = 1) : Ideal.relNorm Rp (P.map (algebraMap S Sp)) = IsLocalRing.maximalIdeal Rp := by - haveI hQprime : (P.map (algebraMap S Sp)).IsPrime := + have hQprime : (P.map (algebraMap S Sp)).IsPrime := IsLocalization.AtPrime.isPrime_map_of_liesOver S p Sp P - haveI hQlo : (P.map (algebraMap S Sp)).LiesOver (IsLocalRing.maximalIdeal Rp) := + have hQlo : (P.map (algebraMap S Sp)).LiesOver (IsLocalRing.maximalIdeal Rp) := IsLocalization.AtPrime.liesOver_map_of_liesOver p Rp Sp P have hm0 : IsLocalRing.maximalIdeal Rp ≠ ⊥ := by rw [← IsLocalization.AtPrime.map_eq_maximalIdeal p Rp] exact Ideal.map_ne_bot_of_ne_bot hp0 have hQ0 : (P.map (algebraMap S Sp)) ≠ ⊥ := Ideal.ne_bot_of_liesOver_of_ne_bot hm0 _ - haveI hQmax : (P.map (algebraMap S Sp)).IsMaximal := + have hQmax : (P.map (algebraMap S Sp)).IsMaximal := Ring.DimensionLEOne.maximalOfPrime hQ0 hQprime - rw [Ideal.inertiaDeg'_eq_inertiaDeg] at hf - have hfQ : Ideal.inertiaDeg' (IsLocalRing.maximalIdeal Rp) (P.map (algebraMap S Sp)) = 1 := by - rw [Ideal.inertiaDeg'_eq_inertiaDeg, - IsLocalization.AtPrime.inertiaDeg_map_eq_inertiaDeg p Rp Sp P] + have hfQ : (P.map (algebraMap S Sp)).inertiaDeg Rp = 1 := by + rw [IsLocalization.AtPrime.inertiaDeg_map_eq_inertiaDeg p Rp Sp P] exact hf exact relNorm_eq_maximalIdeal_of_inertiaDeg_one (P.map (algebraMap S Sp)) hQ0 hfQ -- The concrete semilocal `Sₚ` / DVR `Rₚ` localisation instance bundle is expensive to synthesise. -/-- **`relNorm 𝔭 = comap 𝔭` for a maximal prime of residue degree one** (Silverman III.4.10(a), -`f = 1`; ideal form). For a maximal ideal `P` of `S` with `inertiaDeg' (P.under R) P = 1`, the -relative norm `Ideal.relNorm R P` equals the contraction `P.under R = comap (algebraMap R S) P`. - -This is reduced (no `PerfectField`) to the per-prime DVR-base norm via the global→semilocal -`relNorm_eq_under_of_localized`; see the body and `relNorm_map_eq_maximalIdeal_general`. - -**Unconditional — no `PerfectField`.** Mathlib's `Ideal.relNorm_eq_pow_of_isMaximal` -(`relNorm 𝔭 = 𝔭.under^f`) is gated on `[PerfectField (FractionRing R)]` (its proof reduces to the -**Galois** case), which fails for a function field over a finite base. That hypothesis is *not* -mathematically necessary at `f = 1` (standard `e · f` theory, Silverman III.4.10), and is now -removed: the global→semilocal reduction `relNorm_eq_under_of_localized` reduces -`relNorm R P = P.under R` to the **single** semilocal per-prime input - - `relNorm Rₚ (P·Sₚ) = maximalIdeal Rₚ` (`Rₚ = Localization.AtPrime p`, `Sₚ = semilocal loc. S`), - -which `relNorm_map_eq_maximalIdeal_general` discharges via the **module-length** route over the DVR -base (`relNorm_eq_maximalIdeal_of_inertiaDeg_one` ← `relNorm_length_eq_span` + -`isSimpleModule_quot_of_inertiaDeg_one`) — no Galois, no `PerfectField`, and **no** `Field (Rₚ ⧸ m)` -instance diamond (the length is taken over the DVR `Rₚ`, never the residue field). The inertia -degree transports across the localisation via `IsLocalization.AtPrime.inertiaDeg_map_eq_inertiaDeg`. - -(The shipped local-base specialisation -`Ideal.relNorm_maximalIdeal_eq_under_of_inertiaDeg_one_of_isLocalRing` is now subsumed for the -general base; it is retained as a lighter-weight `IsLocalRing` form.) -/ + + theorem Ideal.relNorm_eq_under_of_inertiaDeg_one {P : Ideal S} [hPmax : P.IsMaximal] (hP : P ≠ ⊥) - (hf : Ideal.inertiaDeg' (P.under R) P = 1) : + (hf : P.inertiaDeg R = 1) : Ideal.relNorm R P = P.under R := by - letI hnz := NeZero.mk (Ideal.under_ne_bot R hP) - haveI hpmax : (P.under R).IsMaximal := Ideal.IsMaximal.under R P - haveI : P.LiesOver (P.under R) := Ideal.over_under P - -- Pre-establish the heavy semilocal `Sₚ` / DVR `Rₚ` instances so the discharge stays in budget. - haveI iDed : IsDedekindDomain + let hnz := NeZero.mk (Ideal.under_ne_bot R hP) + have hpmax : (P.under R).IsMaximal := Ideal.IsMaximal.under R P + have : P.LiesOver (P.under R) := Ideal.over_under P + + have iDed : IsDedekindDomain (Localization (Algebra.algebraMapSubmonoid S (P.under R).primeCompl)) := inferInstance - haveI iPID : IsPrincipalIdealRing + have iPID : IsPrincipalIdealRing (Localization (Algebra.algebraMapSubmonoid S (P.under R).primeCompl)) := inferInstance - haveI iFin : Module.Finite (Localization.AtPrime (P.under R)) + have iFin : Module.Finite (Localization.AtPrime (P.under R)) (Localization (Algebra.algebraMapSubmonoid S (P.under R).primeCompl)) := inferInstance - haveI iTF : Module.IsTorsionFree (Localization.AtPrime (P.under R)) + have iTF : Module.IsTorsionFree (Localization.AtPrime (P.under R)) (Localization (Algebra.algebraMapSubmonoid S (P.under R).primeCompl)) := inferInstance - haveI iIC : IsIntegrallyClosed + have iIC : IsIntegrallyClosed (Localization (Algebra.algebraMapSubmonoid S (P.under R).primeCompl)) := inferInstance - haveI iST2 : IsScalarTower R (Localization.AtPrime (P.under R)) + have iST2 : IsScalarTower R (Localization.AtPrime (P.under R)) (Localization (Algebra.algebraMapSubmonoid S (P.under R).primeCompl)) := inferInstance - haveI iST3 : IsScalarTower R S + have iST3 : IsScalarTower R S (Localization (Algebra.algebraMapSubmonoid S (P.under R).primeCompl)) := inferInstance - haveI iTFr : Module.IsTorsionFree R (Localization.AtPrime (P.under R)) := inferInstance + have iTFr : Module.IsTorsionFree R (Localization.AtPrime (P.under R)) := inferInstance refine relNorm_eq_under_of_localized P hP ?_ exact relNorm_map_eq_maximalIdeal_general (P.under R) (Ideal.under_ne_bot R hP) (Localization.AtPrime (P.under R)) @@ -696,81 +600,47 @@ contraction `comap (algebraMap R S) P` (which is nonzero by `Ideal.under_ne_bot` `(Ideal R)⁰`. -/ theorem relNorm0_eq_comap_of_inertiaDeg_one (P : (Ideal S)⁰) [hPmax : (P : Ideal S).IsMaximal] - (hf : Ideal.inertiaDeg' ((P : Ideal S).under R) (P : Ideal S) = 1) : + (hf : (P : Ideal S).inertiaDeg R = 1) : (relNorm0 (R := R) (S := S) P : Ideal R) = Ideal.comap (algebraMap R S) (P : Ideal S) := Ideal.relNorm_eq_under_of_inertiaDeg_one (R := R) (S := S) (mem_nonZeroDivisors_iff_ne_zero.mp P.2) hf -/-- **`class(relNorm 𝔭) = class(comap 𝔭)` for a maximal prime of residue degree one** -(Silverman III.4.10(a), `f = 1`; class-group form). The `ClassGroup.mk0` class of `relNorm0 P` is -the class of the contraction `comap (algebraMap R S) P`. -This is the residue-degree-`1` content that bridges the divisor pushforward `φ_* = relNorm` -(`classNorm`) with the set-theoretic point image `comap` (the shipped `toClass_toPointMap`), pinning -the `Pic⁰` naturality `hnat` at a rational point. The `comap`-nonzero membership proof is supplied -via `Ideal.under_ne_bot`. -/ theorem ClassGroup.mk0_relNorm0_eq_mk0_comap_of_inertiaDeg_one (P : (Ideal S)⁰) [hPmax : (P : Ideal S).IsMaximal] - (hf : Ideal.inertiaDeg' ((P : Ideal S).under R) (P : Ideal S) = 1) + (hf : (P : Ideal S).inertiaDeg R = 1) (hcomap : Ideal.comap (algebraMap R S) (P : Ideal S) ∈ (Ideal R)⁰) : ClassGroup.mk0 (relNorm0 (R := R) (S := S) P) = ClassGroup.mk0 (⟨Ideal.comap (algebraMap R S) (P : Ideal S), hcomap⟩ : (Ideal R)⁰) := congrArg ClassGroup.mk0 (Subtype.ext (relNorm0_eq_comap_of_inertiaDeg_one (R := R) (S := S) P hf)) -/-! ### `inertiaDeg' = 1` at a residue-degree-one prime, for an `F`-algebra self-map `R →ₐ[F] R` -The residue/inertia degree `f = inertiaDeg' (M.under R) M = finrank (R ⧸ M.under R) (R ⧸ M)` is `1` -whenever the residue field `R ⧸ M` is *one-dimensional over the ground field `F`* (an `F`-rational -point: `R ⧸ M ≅ F`). This is Silverman III.4.10(a) `f = 1`: at a rational point the inseparability -of an `F`-algebra self-map `g : R →ₐ[F] R` (e.g. Frobenius) lives entirely in the **ramification** -`e`, never in `f`. - -The proof is **diamond-free** (it does *not* invoke `finrank_mul_finrank`, which is what blocks the -`Module.Free` "Piece 9" route in `Curves/GenericFiber.lean`): it bounds -`finrank (R ⧸ M.under R) (R ⧸ M) ≤ 1` directly by surjectivity of the residue-field algebra map. -That surjectivity holds because `g` is an `F`-algebra hom — so it fixes the image of `F`, and -`algebraMap F (R ⧸ M)` is already surjective when `finrank F (R ⧸ M) = 1`; hence every residue class -is hit by a *constant* `algebraMap F (R ⧸ M.under R) c`. Positivity (`finrank ≥ 1`) is -`Module.finrank_pos` (the residue extension is finite + nontrivial). +-- The residue-field `finrank` bookkeeping (surjectivity bound + tower) needs more elaboration room. -`g` need only be *module-finite over itself through `g`* (`hfin`) for `M.under R` to be maximal -(going-up / `Algebra.IsIntegral.of_finite`); this is exactly the `Module.Finite` witness an -`Isogeny.CoordHom` already carries. -/ --- The twisted self-algebra `R →[g] R` pushes instance synthesis past the default budget. --- The residue-field `finrank` bookkeeping (surjectivity bound + tower) needs more elaboration room. -/-- **`inertiaDeg' = 1` at a rational point, for an `F`-algebra self-map** (Silverman III.4.10(a), -`f = 1`). For an `F`-algebra `R`, an `F`-algebra hom `g : R →ₐ[F] R` that is module-finite over -itself through `g`, and a maximal ideal `M` whose residue field is one-dimensional over `F` -(`finrank F (R ⧸ M) = 1`, the `F`-rational condition), the inertia degree of `M.under R` (the -contraction `comap g M`) under `M` is `1`. - -Diamond-free (no `finrank_mul_finrank`): see the section note. This is the missing `f = 1` input -that, via `Ideal.relNorm_eq_under_of_inertiaDeg_one`, collapses `relNorm 𝔪 = comap 𝔪` at rational -points — the residue-degree content of the `Pic⁰` naturality `hnat`. -/ theorem Ideal.inertiaDeg_under_eq_one_of_algHom_of_residueField_finrank_one {F : Type*} [Field F] {R : Type*} [CommRing R] [Algebra F R] (g : R →ₐ[F] R) (hfin : @Module.Finite R R _ _ g.toRingHom.toAlgebra.toModule) (M : Ideal R) [hM : M.IsMaximal] (hres : Module.finrank F (R ⧸ M) = 1) : letI : Algebra R R := g.toRingHom.toAlgebra - Ideal.inertiaDeg' (M.under R) M = 1 := by - letI inst : Algebra R R := g.toRingHom.toAlgebra - haveI instFin : @Module.Finite R R _ _ inst.toModule := hfin - haveI : @Algebra.IsIntegral R R _ _ inst := + M.inertiaDeg R = 1 := by + let inst : Algebra R R := g.toRingHom.toAlgebra + have instFin : @Module.Finite R R _ _ inst.toModule := hfin + have : @Algebra.IsIntegral R R _ _ inst := @Algebra.IsIntegral.of_finite R R _ _ inst instFin -- The twisted self-algebra is a scalar tower over `F`: `g` fixes the image of `F`. - haveI hst : @IsScalarTower F R R _ inst.toSMul _ := + have hst : @IsScalarTower F R R _ inst.toSMul _ := @IsScalarTower.of_algebraMap_eq F R R _ _ _ _ inst _ fun c ↦ by change algebraMap F R c = g.toRingHom (algebraMap F R c) rw [show g.toRingHom (algebraMap F R c) = g (algebraMap F R c) from rfl, AlgHom.commutes] - haveI : M.LiesOver (M.under R) := Ideal.over_under M - haveI hmax : (M.under R).IsMaximal := Ideal.IsMaximal.under R M - haveI : Field (R ⧸ M.under R) := Ideal.Quotient.field _ - rw [Ideal.inertiaDeg'_algebraMap] - haveI : Nontrivial (R ⧸ M) := Ideal.Quotient.nontrivial_iff.mpr hM.ne_top - haveI : FiniteDimensional F (R ⧸ M) := Module.finite_of_finrank_eq_succ hres + have : M.LiesOver (M.under R) := Ideal.over_under M + have hmax : (M.under R).IsMaximal := Ideal.IsMaximal.under R M + have : Field (R ⧸ M.under R) := Ideal.Quotient.field _ + rw [Ideal.inertiaDeg_eq_of_isMaximal (M.under R) M] + have : Nontrivial (R ⧸ M) := Ideal.Quotient.nontrivial_iff.mpr hM.ne_top + have : FiniteDimensional F (R ⧸ M) := Module.finite_of_finrank_eq_succ hres -- `algebraMap F (R ⧸ M)` is surjective: injective `F`-linear map between equal (= 1) finrank. have hFsurj : Function.Surjective (algebraMap F (R ⧸ M)) := by have hinj : Function.Injective (Algebra.linearMap F (R ⧸ M)) := @@ -785,7 +655,7 @@ theorem Ideal.inertiaDeg_under_eq_one_of_algHom_of_residueField_finrank_one obtain ⟨c₀, hc₀⟩ := hFsurj w exact ⟨algebraMap F (R ⧸ M.under R) c₀, by rw [← IsScalarTower.algebraMap_apply F (R ⧸ M.under R) (R ⧸ M), hc₀]⟩ - haveI hfinMod : Module.Finite (R ⧸ M.under R) (R ⧸ M) := + have hfinMod : Module.Finite (R ⧸ M.under R) (R ⧸ M) := Module.Finite.of_surjective (Algebra.linearMap (R ⧸ M.under R) (R ⧸ M)) (by intro w; obtain ⟨c, hc⟩ := hsurj w; exact ⟨c, hc⟩) have h_le : Module.finrank (R ⧸ M.under R) (R ⧸ M) ≤ 1 := @@ -805,23 +675,6 @@ theorem ClassGroup.relNorm_mul (a b : ClassGroup S) : ClassGroup.relNorm (R := R) a * ClassGroup.relNorm (R := R) b := map_mul _ a b -/-! -## The class-group extension (pullback) map and the dual relation - -We now build the *extension* direction `ClassGroup R →* ClassGroup S`, induced by -`Ideal.map (algebraMap R S)` (extend an ideal of `R` to `S`), by exactly the same descent -technique used for `relNorm`. Composing the relative norm with the extension recovers raising to -the `n`-th power, where `n = [Frac S : Frac R] = Module.finrank R S` -(`ClassGroup.relNorm_comp_map`). This is the class-group shadow of the dual-isogeny relation -`α̂ ∘ α = [deg α]`. - -The whole arithmetic core -`Ideal.relNorm R (Ideal.map (algebraMap R S) I) = I ^ n` -is already available in mathlib as `Ideal.relNorm_algebraMap` (proved by localising at maximal -ideals and reducing to `Algebra.norm_algebraMap`); in particular it needs **no** -separability/Galois/`PerfectField` hypothesis, so the ramification–inertia route is not needed -here. --/ /-- The extension of an integral ideal, packaged as a homomorphism of `nonZeroDivisors` monoids `(Ideal R)⁰ →* (Ideal S)⁰`, using that `Ideal.map (algebraMap R S)` sends nonzero ideals to nonzero @@ -844,12 +697,12 @@ noncomputable def map0 : (Ideal R)⁰ →* (Ideal S)⁰ where noncomputable def mk0CompMap0 : (Ideal R)⁰ →* ClassGroup S := (ClassGroup.mk0 (R := S)).comp map0 -omit [IsIntegrallyClosed R] [IsDedekindDomain R] [IsIntegrallyClosed S] [Module.Finite R S] in +omit [Module.Finite R S] in @[simp] theorem mk0CompMap0_apply (I : (Ideal R)⁰) : mk0CompMap0 (S := S) I = ClassGroup.mk0 (map0 I) := rfl -omit [IsIntegrallyClosed R] [IsIntegrallyClosed S] [Module.Finite R S] in +omit [Module.Finite R S] in /-- Well-definedness of the descent: if two integral ideals of `R` have the same class in `ClassGroup R`, their extensions have the same class in `ClassGroup S`. @@ -893,7 +746,7 @@ noncomputable def ClassGroup.map : ClassGroup R →* ClassGroup S where Function.surjInv_eq ClassGroup.mk0_surjective, Function.surjInv_eq ClassGroup.mk0_surjective] -omit [IsIntegrallyClosed R] [IsIntegrallyClosed S] [Module.Finite R S] in +omit [Module.Finite R S] in /-- The defining computation of `ClassGroup.map` on an integral representative: the extension of the class of `I` is the class of `Ideal.map (algebraMap R S) I` (which lies in `(Ideal S)⁰` by `Ideal.map_eq_bot_iff_of_injective`, here packaged as `map0 I`). -/ @@ -903,39 +756,24 @@ theorem ClassGroup.map_mk0 (I : (Ideal R)⁰) : refine (mk0CompMap0_eq_of_mk0_eq ?_).trans (mk0CompMap0_apply I) rw [Function.surjInv_eq ClassGroup.mk0_surjective] -omit [IsIntegrallyClosed R] [IsIntegrallyClosed S] [Module.Finite R S] in +omit [Module.Finite R S] in /-- `map_one` sanity check: the extension of the trivial class is trivial. -/ theorem ClassGroup.map_one : ClassGroup.map (R := R) (S := S) 1 = 1 := _root_.map_one _ -omit [IsIntegrallyClosed R] [IsIntegrallyClosed S] [Module.Finite R S] in +omit [Module.Finite R S] in /-- `map_mul` sanity check: the extension map is multiplicative. -/ theorem ClassGroup.map_mul (a b : ClassGroup R) : ClassGroup.map (S := S) (a * b) = ClassGroup.map (S := S) a * ClassGroup.map (S := S) b := _root_.map_mul _ a b -/-- The **ideal-level arithmetic core** of the dual relation: the relative norm of the extension of -an integral ideal `I` of `R` is `I ^ n`, where `n = Module.finrank R S`. -Since mathlib moved `Ideal.relNorm_algebraMap`'s exponent from -`Module.finrank (FractionRing R) (FractionRing S)` to `Module.finrank R S`, this is now *literally* -that lemma — the fraction-field transport it used to perform is gone. Kept as the name the -class-group descent below cites; a cleanup pass can inline it. -/ theorem Ideal.relNorm_map_algebraMap (I : Ideal R) : Ideal.relNorm R (Ideal.map (algebraMap R S) I) = I ^ Module.finrank R S := Ideal.relNorm_algebraMap S I -/-- **The target: the dual relation at the class-group level.** - -The composite of the class-group extension map with the relative norm is raising to the `n`-th -power, where `n = Module.finrank R S = [Frac S : Frac R]`: -`relNorm (map c) = c ^ n` for every `c : ClassGroup R`. This is the arithmetic core, on ideal -classes, of `α̂ ∘ α = [deg α]`. -The proof picks an integral representative `c = mk0 I` (`ClassGroup.mk0_surjective`), computes both -descents with `ClassGroup.map_mk0` and `ClassGroup.relNorm_mk0`, and reduces to the ideal-level -identity `Ideal.relNorm_map_algebraMap`. Compatibility of `mk0` with `(· ^ n)` is `map_pow`. -/ theorem ClassGroup.relNorm_comp_map (c : ClassGroup R) : ClassGroup.relNorm (ClassGroup.map (S := S) c) = c ^ Module.finrank R S := by obtain ⟨I, rfl⟩ := ClassGroup.mk0_surjective c diff --git a/projects/HasseWeil/HasseWeil/Pic0/PicDual.lean b/projects/HasseWeil/HasseWeil/Pic0/PicDual.lean index d0543c22f..40854d96f 100644 --- a/projects/HasseWeil/HasseWeil/Pic0/PicDual.lean +++ b/projects/HasseWeil/HasseWeil/Pic0/PicDual.lean @@ -8,68 +8,22 @@ import HasseWeil.Pic0.ToClassSurjective import HasseWeil.Foundation.Basic /-! -# The Pic⁰ dual isogeny and the dual relation `α ∘ α̂ = [deg α]` (Silverman III.6.1) - -For an endomorphism `α : Isogeny E E` of an elliptic curve `E`, equipped with a coordinate-ring -restriction witness `ch : α.CoordHom` (the comorphism `α* : R → R` on `R := E.CoordinateRing`), -this file builds the **Pic⁰ dual** as a point endomorphism and proves the dual relation, following -**Silverman, *The Arithmetic of Elliptic Curves*, III.6.1** *to the letter*. - -## Silverman III.6.1 (verified against the in-repo PDF, book p.80–82) - -Let `κ : E ≅ Pic⁰(E)`, `P ↦ class of `(P) − (O)``. Silverman III.6.1(b) **defines** the dual via -the **divisor pullback** `φ*` (II.3.6/II.3.7): - -``` - κ φ* κ⁻¹ - φ̂ : E ───→ Pic⁰(E) ───→ Pic⁰(E) ───→ E , -``` - -i.e. `φ̂ = κ⁻¹ ∘ φ* ∘ κ`, where `φ* : Pic⁰(E) → Pic⁰(E)` is the **pullback** of divisor classes -`(Q) ↦ Σ_{P ↦ Q} e_φ(P)·(P)` (Silverman II.3, book p.29). At the level of the affine ideal class -group `Pic⁰(E) ≅ ClassGroup R`, this pullback is the **ideal extension** `𝔪_Q ↦ 𝔪_Q·𝒪 = ∏ 𝔓^{e}`, -which is exactly the shipped `HasseWeil.Isogeny.classMap` (= `HasseWeil.ClassGroup.map`). - -The companion **divisor pushforward** `φ_*` (II.3.6/II.3.7), `(P) ↦ (φP)`, is at the ideal level the -**relative norm** `𝔓 ↦ 𝔮^{f}`, the shipped `HasseWeil.Isogeny.classNorm` (= `ClassGroup.relNorm`). -Silverman II.3.6(e) gives `φ_* ∘ φ* = [deg φ]` on `Pic⁰`; its shipped shadow is -`HasseWeil.Isogeny.classNorm_comp_classMap` (`classNorm (classMap c) = c ^ finrank R R`). - -## Main definitions - -* `HasseWeil.Isogeny.picDual` — `φ̂ = κ⁻¹ ∘ classMap ∘ κ` as a point endomorphism `E.Point →+ - E.Point` (the III.6.1(b) construction; `classMap` = extension = the divisor pullback `φ*`). -* `HasseWeil.Isogeny.picPushforward` — `κ⁻¹ ∘ classNorm ∘ κ`, the κ-transport of the divisor - pushforward `φ_*` (= `classNorm` = relative norm). - -## Main results - -* `HasseWeil.Isogeny.picPushforward_comp_picDual` / `..._degree` — **unconditional** (modulo the - carried `CoordHom`/`Module.Finite`/tower witnesses): the κ-transport of Silverman II.3.6(e), - `picPushforward ∘ picDual = [finrank R R]` (resp. `= [α.degree]`), as `AddMonoidHom`s. -* `HasseWeil.Isogeny.toAddMonoidHom_comp_picDual` — **the III.6.1 target** `α ∘ α̂ = [deg α]` - (`α.toAddMonoidHom.comp α.picDual = [α.degree]`), carrying the III.3.4 **naturality** of `κ` on - the point map (`hnat : κ ∘ α = classNorm ∘ κ`) as a witness-parametric hypothesis. -* `HasseWeil.Isogeny.picDual_comp_toAddMonoidHom` — the companion `α̂ ∘ α = [deg α]` - (III.6.2(a) order), under the same naturality witness. - -## Why the III.3.4 naturality is a *carried hypothesis*, not derived - -The unconditional results above tie `picDual` to `picPushforward` (both κ-transports), with **no** -extra input. Identifying `picPushforward` with the *actual* point map `α.toAddMonoidHom` is the -**III.3.4 naturality** `κ ∘ α = classNorm ∘ κ` (i.e. `κ₂(αP) = φ_*κ₁(P)`). As documented in -`HasseWeil/Pic0/ToClassFunctorial.lean`, the point-map ↔ ideal-map link the shipped API exposes is -the **`comap`** (set-theoretic point image), which on a prime `𝔓 / 𝔮` gives `𝔮`, whereas the -pushforward `φ_* = relNorm` gives `𝔮^{f}` — they differ by the **inertia/residue degree** `f`. -Bridging them is exactly the ramification bookkeeping `relNorm (comap …) = (·)^?` -(`relNorm_eq_pow_of_isMaximal`, needing `PerfectField (FractionRing R)`), the III.3.4 content the -`Isogeny` carries as *independent data*. It is therefore taken as a hypothesis here (dischargeable -per isogeny: Frobenius, multiplication-by-`n`), keeping every theorem `#print axioms`-clean. +# The Picard dual isogeny + +For an elliptic-curve endomorphism `α` with a coordinate-ring comorphism, +transporting ideal extension along `κ : E ≃ Pic⁰(E)` defines the Picard dual. +Transporting the relative ideal norm defines the point-group pushforward. +The norm–extension identity gives `picPushforward ∘ picDual = [deg α]`. +Under the naturality relation between the point map and `κ`, this yields +`α ∘ α̂ = [deg α]`; surjectivity gives the companion relation by cancellation. + +At rational points, residue degree one identifies the relative ideal norm +with contraction. This proves the corresponding naturality reduction +without a perfectness assumption on the function field. ## References -* [Silverman, *The Arithmetic of Elliptic Curves*], II.3.6–3.7 (divisor pullback/pushforward, - `φ_*φ* = [deg]`), III.3.4 (functoriality of `E ≅ Pic⁰(E)`), III.6.1 (the dual isogeny). +* [Silverman, *The Arithmetic of Elliptic Curves*], II.3.6–3.7, III.3.4, III.6.1. -/ open WeierstrassCurve Polynomial @@ -114,7 +68,7 @@ Silverman's **divisor pullback** `φ* : Pic⁰(E) → Pic⁰(E)`. This is *exac definition `φ̂ = κ₁⁻¹ ∘ φ* ∘ κ₂`. The `CoordHom` witness `ch`, injectivity `hinj`, and finiteness `hfin` are the data/hypotheses the -shipped `classMap` requires (carried, not discharged universally — instantiable per isogeny). -/ +`classMap` requires (carried, not discharged universally — instantiable per isogeny). -/ noncomputable def picDual (ch : α.CoordHom) (hinj : Function.Injective ch.toAlgHom) (hfin : @Module.Finite E.CoordinateRing E.CoordinateRing _ _ ch.toAlgebra.toModule) : E.Point →+ E.Point := @@ -188,7 +142,7 @@ theorem classTransport_comp_eq /-! ### The dual relation `φ_* ∘ φ* = [deg]`, transported to the point group -Silverman II.3.6(e): `φ_* ∘ φ* = [deg φ]` on `Pic⁰(E)`. Its shipped class-group shadow is +Silverman II.3.6(e): `φ_* ∘ φ* = [deg φ]` on `Pic⁰(E)`. Its class-group shadow is `classNorm_comp_classMap` (`classNorm (classMap c) = c ^ finrank R R`). We transport it across `κ` to obtain `picPushforward ∘ picDual = [finrank R R]` as point endomorphisms — **unconditionally** (beyond the carried `CoordHom`/`Module.Finite` witnesses the `classMap`/`classNorm` already need). @@ -196,7 +150,7 @@ The `α.degree` form follows from the degree bridge `classNorm_comp_classMap_deg /-- **κ-transport of `φ_* ∘ φ* = [deg]` (coordinate-ring `finrank` form).** -`picPushforward ∘ picDual = [finrank R R]` as point endomorphisms, the κ-conjugate of the shipped +`picPushforward ∘ picDual = [finrank R R]` as point endomorphisms, the κ-conjugate of the class-group identity `classNorm (classMap c) = c ^ finrank R R` (= Silverman II.3.6(e) `φ_* ∘ φ* = [deg]`). Unconditional beyond the carried `CoordHom`/`Module.Finite` witnesses. @@ -210,7 +164,7 @@ theorem picPushforward_comp_picDual (ch : α.CoordHom) (hinj : Function.Injectiv ((@Module.finrank E.CoordinateRing E.CoordinateRing _ _ ch.toAlgebra.toModule : ℕ) : ℤ))).toAddMonoidHom := -- `picPushforward ∘ picDual = classTransport classNorm ∘ classTransport classMap`, and - -- `classNorm (classMap c) = c ^ finrank` is the shipped `classNorm_comp_classMap`. + -- `classNorm (classMap c) = c ^ finrank` is the `classNorm_comp_classMap`. classTransport_comp_eq (α.classMap ch hinj hfin) (α.classNorm ch hinj hfin) _ (α.classNorm_comp_classMap ch hinj hfin) @@ -238,19 +192,12 @@ theorem picPushforward_comp_picDual_degree (ch : α.CoordHom) congr 2 exact_mod_cast (α.degree_eq_finrank_coordinateRing_of_tower_eq ch S S' hSR hS'FF).symm -/-! ### The III.6.1 target `α ∘ α̂ = [deg α]` on the point group +/-! ### The dual relation on the point group -The unconditional `picPushforward_comp_picDual` ties `picDual` to `picPushforward`. To reach the -brief's target `α ∘ α̂ = [deg α]` — with the *actual* point map `α.toAddMonoidHom` — we additionally -need the **Silverman III.3.4 naturality** of `κ` on the point map: that under `κ`, the point map -`α.toAddMonoidHom` corresponds to the divisor pushforward `φ_*` (= `classNorm`). In the κ-conjugate -form, this is exactly `α.toAddMonoidHom = α.picPushforward …`. - -As documented in `HasseWeil/Pic0/ToClassFunctorial.lean`, the shipped point-map ↔ ideal-map link is -the **`comap`** (set-theoretic point image), which differs from `φ_* = relNorm` by the residue -degree; bridging them is the III.3.4 ramification bookkeeping the `Isogeny` carries as independent -data. We therefore take the naturality as a witness-parametric hypothesis (dischargeable per -isogeny), keeping the result `#print axioms`-clean. -/ +The relation between the Picard dual and Picard pushforward yields the +point-group dual relation under the naturality condition +`κ (α P) = classNorm (κ P)`. The relative norm differs from contraction by the +residue degree; for rational points this degree is one. -/ /-- **The III.3.4 naturality witness, raw form**: under `κ = toClassEquiv'`, the point map of `α` corresponds to the relative-norm class map `classNorm` (the divisor pushforward `φ_*`): @@ -279,44 +226,14 @@ theorem toAddMonoidHom_eq_picPushforward_iff (ch : α.CoordHom) rw [picPushforward_apply, ← h P, (WeierstrassCurve.Affine.Point.toClassEquiv' (W := E)).symm_apply_apply] -/-! #### Isolating the `hnat` residual to the rational-point ideal identity (`comap = relNorm`) - -`Naturality` is structurally a **carried datum**: an abstract `Isogeny E E` stores its `pullback` -and `toAddMonoidHom` as *independent* fields (`HasseWeil/Basic.lean`), with no derivation linking -the point map to the comorphism `ch` — so `hnat` cannot be proved in general, only verified per -isogeny where both fields are explicit (Frobenius, mult-by-`n`). - -What we *can* ship axiom-clean is the exact reduction of the **right-hand side** of `Naturality` to -a concrete ideal class. The RHS `classNorm (κ P)` for a rational point `P = (x, y)` is the `mk0` -class of the **relative norm** `relNorm (maximalIdealAt P) = relNorm ⟨X − x, Y − y⟩` (Silverman's -divisor pushforward `φ_*`). Combined with the shipped `ToClassFunctorial.toClass_toPointMap` -(whose ideal is the **`comap`** `α*⁻¹(maximalIdealAt P)`), this pins the *entire* remaining content -of `hnat` to the single residue-degree identity - -``` -class (relNorm (maximalIdealAt P)) = class (comap α* (maximalIdealAt P)) (rational P) -``` - -which holds because a rational point has residue degree `f = 1`, so `relNorm 𝔪_P = 𝔪_P ∩ R = -comap α* 𝔪_P` (for `f = 1`, `relNorm 𝔭 = (comap 𝔭)^f = comap 𝔭`). Mathlib has no -`relNorm = (comap)^{inertiaDeg'}` lemma (and the project's `inertiaDeg' = 1`-at-smooth-points -computation is `Module.Free`-diamond-blocked, see `Curves/GenericFiber.lean` Piece 9), so this last -step stays a per-isogeny obligation; the lemma below is the bridge that *reduces to it*. -/ - -/-- **The `classNorm`/`κ` side of `Naturality`, evaluated at a rational point (axiom-clean -bridge).** - -For a rational point `P = (x, y)` (a mathlib `Point.some`), the value of the relative-norm class map -`classNorm` on `κ P = toClassEquiv' P` is the `mk0` class of the **relative ideal norm** of the -maximal ideal `XYIdeal E x (C y) = ⟨X − x, Y − y⟩` at `P` (= Silverman's divisor pushforward `φ_*`, -packaged as `relNorm0`). This unfolds the *right-hand side* of the III.3.4 naturality predicate -`Naturality` at `Point.some`, reducing the whole `hnat` obligation to the ideal-class identity -`class (relNorm 𝔪_P) = class (comap α* 𝔪_P)` against the shipped `toClass_toPointMap` (the -`comap` form) — exactly the residue-degree-`1` content (see the section note). - -Proof: `κ (some) = toClass (some) = mk (XYIdeal' h) = mk0 ⟨XYIdeal, _⟩` (the project's -`mk0_eq_mk_XYIdeal'` bridge), then `ClassGroup.relNorm_mk0` computes the norm on the integral -representative. -/ +/-! #### Naturality at rational points + +For a rational point `P`, `classNorm (κ P)` is represented by the relative +norm of its maximal ideal. Residue degree one identifies this norm with the +contraction under the coordinate-ring comorphism. Thus naturality reduces +to agreement between the given point map and the contracted ideal class. -/ + +/-- The relative-norm class map on a rational point is represented by the relative norm of its maximal ideal. -/ theorem classNorm_toClassEquiv'_some (ch : α.CoordHom) (hinj : Function.Injective ch.toAlgHom) (hfin : @Module.Finite E.CoordinateRing E.CoordinateRing _ _ ch.toAlgebra.toModule) {x y : F} (h : E.Nonsingular x y) @@ -331,9 +248,9 @@ theorem classNorm_toClassEquiv'_some (ch : α.CoordHom) (hinj : Function.Injecti ch.isTorsionFree hinj ClassGroup.mk0 (HasseWeil.relNorm0 (R := E.CoordinateRing) (S := E.CoordinateRing) ⟨WeierstrassCurve.Affine.CoordinateRing.XYIdeal E x (Polynomial.C y), hmem⟩) := by - letI := ch.toAlgebra - haveI : @Module.Finite E.CoordinateRing E.CoordinateRing _ _ ch.toAlgebra.toModule := hfin - haveI : @Module.IsTorsionFree E.CoordinateRing E.CoordinateRing _ _ ch.toAlgebra.toModule := + let := ch.toAlgebra + have : @Module.Finite E.CoordinateRing E.CoordinateRing _ _ ch.toAlgebra.toModule := hfin + have : @Module.IsTorsionFree E.CoordinateRing E.CoordinateRing _ _ ch.toAlgebra.toModule := ch.isTorsionFree hinj rw [WeierstrassCurve.Affine.Point.toClassEquiv'_apply, WeierstrassCurve.Affine.Point.toClass_some, @@ -341,23 +258,11 @@ theorem classNorm_toClassEquiv'_some (ch : α.CoordHom) (hinj : Function.Injecti show HasseWeil.ClassGroup.relNorm (ClassGroup.mk0 _) = _ rw [HasseWeil.ClassGroup.relNorm_mk0] -/-! #### Discharging `hnat`: the residue-degree-`1` (`comap = relNorm`) step at rational points - -Combining the shipped `classNorm_toClassEquiv'_some` (the `relNorm0` form of the `Naturality` RHS) -with the residue-degree bridge of `ClassGroupNorm` (`relNorm 𝔪 = comap 𝔪` at `inertiaDeg' = 1`, the -`inertiaDeg' = 1` itself supplied **diamond-free** by -`Ideal`.`inertiaDeg_under_eq_one_of_algHom_…`), -we reduce the entire `hnat`/`Naturality` obligation to the **point-map ↔ `comap` agreement** — that -the actual point map `α.toAddMonoidHom` sends `(x, y)` to a point whose `κ`-class is the contraction -`comap α* 𝔪_{(x,y)}` (Silverman III.3.4, the `comap` form shipped as `toClass_toPointMap`). +/-! #### The residue-degree-one norm identity -The residue-degree step needs `PerfectField (FractionRing R) = PerfectField K(E)` (the hypothesis of -mathlib's `Ideal.relNorm_eq_pow_of_isMaximal`). This holds for perfect base fields (e.g. `char 0`, -or algebraically closed of characteristic `0`). **Honest residual:** for a function field over a -*finite* field `K(E)` is *imperfect*, so this last `relNorm = comap` step is not covered by the -mathlib lemma there; pinning the exponent without `PerfectField`/Galois would require a degree-count -adaptation of the project's `relNorm_maximalIdealAt` (`Curves/NormValuation.lean`) to the twisted -`R →[α*] R` extension. Everything *below* the `PerfectField` hypothesis is unconditional. -/ +The rational-point residue field has rank one over the base field. The +class-group norm identity at residue degree one then identifies relative +norm with contraction, without assuming the function field is perfect. -/ /-- **The `comap α* 𝔪_P` ideal is a nonzero divisor** (carried side condition for the `mk0` class). For a rational point `P = (x, y)`, the contraction `comap α* (XYIdeal E x (C y))` of the (nonzero) @@ -371,36 +276,16 @@ theorem comap_XYIdeal_mem_nonZeroDivisors (ch : α.CoordHom) Ideal.comap ch.toAlgHom.toRingHom (WeierstrassCurve.Affine.CoordinateRing.XYIdeal E x (Polynomial.C y)) ∈ (Ideal E.CoordinateRing)⁰ := by - letI := ch.toAlgebra - haveI : @Module.Finite E.CoordinateRing E.CoordinateRing _ _ ch.toAlgebra.toModule := hfin - haveI : Algebra.IsIntegral E.CoordinateRing E.CoordinateRing := + let := ch.toAlgebra + have : @Module.Finite E.CoordinateRing E.CoordinateRing _ _ ch.toAlgebra.toModule := hfin + have : Algebra.IsIntegral E.CoordinateRing E.CoordinateRing := Algebra.IsIntegral.of_finite _ _ have hbot : WeierstrassCurve.Affine.CoordinateRing.XYIdeal E x (Polynomial.C y) ≠ ⊥ := mem_nonZeroDivisors_iff_ne_zero.mp hmem exact mem_nonZeroDivisors_iff_ne_zero.mpr (Ideal.under_ne_bot (A := E.CoordinateRing) (B := E.CoordinateRing) hbot) -/-- **The `classNorm`/`comap` identity at a rational point (residue degree `1`) — UNCONDITIONAL.** - -For a rational point `P = (x, y)` and a coordinate-ring restriction `ch`, the relative-norm class -`classNorm0 (XYIdeal E x (C y))` (the `Naturality` RHS, via `classNorm_toClassEquiv'_some`) equals -the class of the **contraction** `comap α* (XYIdeal E x (C y))` — Silverman's divisor pushforward -`φ_*` collapses to the set-theoretic point image at a rational point, where the residue degree -`f = 1`. - -**`PerfectField`-free.** Mathlib's `Ideal.relNorm_eq_pow_of_isMaximal` is gated on -`[PerfectField (FractionRing R)]` (its proof reduces to the Galois case, which fails for a function -field over a finite base), but that hypothesis is *not* needed at `f = 1`: the shipped -`ClassGroup.mk0_relNorm0_eq_mk0_comap_of_inertiaDeg_one` (`ClassGroupNorm.lean`) discharges -`relNorm 𝔪 = comap 𝔪` from `inertiaDeg' = 1` alone via the module-length / DVR-base route, with -**no** -`PerfectField`. This removes the previous `[PerfectField E.FunctionField]` hypothesis. - -Proof: `XYIdeal` is maximal (`quotientXYIdealEquiv`) with residue field `F` (so `finrank F (R/𝔪) = -1`), hence `inertiaDeg' (𝔪.under R) 𝔪 = 1` -(`Ideal.inertiaDeg_under_eq_one_of_algHom_of_residueField_finrank_one`, diamond-free); then -`ClassGroup.mk0_relNorm0_eq_mk0_comap_of_inertiaDeg_one` (`relNorm 𝔪 = comap 𝔪` under `f = 1`, -unconditional) finishes. -/ +/-- At a rational point, residue degree one identifies the relative-norm ideal class with the contracted ideal class. -/ theorem mk0_relNorm0_XYIdeal_eq_mk0_comap (ch : α.CoordHom) (hinj : Function.Injective ch.toAlgHom) (hfin : @Module.Finite E.CoordinateRing E.CoordinateRing _ _ ch.toAlgebra.toModule) @@ -419,18 +304,16 @@ theorem mk0_relNorm0_XYIdeal_eq_mk0_comap ClassGroup.mk0 (⟨Ideal.comap ch.toAlgHom.toRingHom (WeierstrassCurve.Affine.CoordinateRing.XYIdeal E x (Polynomial.C y)), hcomap⟩ : (Ideal E.CoordinateRing)⁰) := by - letI := ch.toAlgebra - haveI : @Module.Finite E.CoordinateRing E.CoordinateRing _ _ ch.toAlgebra.toModule := hfin - haveI : @Module.IsTorsionFree E.CoordinateRing E.CoordinateRing _ _ ch.toAlgebra.toModule := + let := ch.toAlgebra + have : @Module.Finite E.CoordinateRing E.CoordinateRing _ _ ch.toAlgebra.toModule := hfin + have : @Module.IsTorsionFree E.CoordinateRing E.CoordinateRing _ _ ch.toAlgebra.toModule := ch.isTorsionFree hinj - haveI hMmax : (WeierstrassCurve.Affine.CoordinateRing.XYIdeal E x (Polynomial.C y)).IsMaximal := + have hMmax : (WeierstrassCurve.Affine.CoordinateRing.XYIdeal E x (Polynomial.C y)).IsMaximal := Ideal.Quotient.maximal_of_isField _ ((WeierstrassCurve.Affine.CoordinateRing.quotientXYIdealEquiv h.1).toRingEquiv.isField (Field.toIsField F)) - have hf : Ideal.inertiaDeg' - ((WeierstrassCurve.Affine.CoordinateRing.XYIdeal E x (Polynomial.C y)).under - E.CoordinateRing) - (WeierstrassCurve.Affine.CoordinateRing.XYIdeal E x (Polynomial.C y)) = 1 := + have hf : (WeierstrassCurve.Affine.CoordinateRing.XYIdeal E x + (Polynomial.C y)).inertiaDeg E.CoordinateRing = 1 := Ideal.inertiaDeg_under_eq_one_of_algHom_of_residueField_finrank_one ch.toAlgHom hfin _ (WeierstrassCurve.Affine.Point.finrank_quotient_XYIdeal_eq_one h.1) exact ClassGroup.mk0_relNorm0_eq_mk0_comap_of_inertiaDeg_one @@ -484,21 +367,7 @@ theorem Naturality_of_toClassEquiv'_some_eq_relNorm0 rw [classNorm_toClassEquiv'_some ch hinj hfin h hmem] exact hpoint x y h hmem -/-- **Discharging `hnat` from point-map ↔ `comap` agreement (residue degree `1`) — UNCONDITIONAL.** - -The `Naturality` predicate `hnat` holds whenever, for every rational point `P = (x, y)`, the actual -point map `α.toAddMonoidHom` sends `(x, y)` to a point whose `κ`-class is the contraction -`comap α* 𝔪_{(x,y)}` (the `comap` form of Silverman III.3.4 — exactly what `toClass_toPointMap` -supplies for a *geometric* isogeny whose point map is `toPointMap`). This is the precise reduction -of `hnat` to its remaining content: the `relNorm`-vs-`comap` gap is closed here by the residue -identity `mk0_relNorm0_XYIdeal_eq_mk0_comap`, which is now **`PerfectField`-free** (it routes -through -the shipped `ClassGroup.mk0_relNorm0_eq_mk0_comap_of_inertiaDeg_one`, valid at `f = 1` with no -`PerfectField`). **No `PerfectField E.FunctionField` hypothesis** — the only residual is the -point-map ↔ `comap` agreement `hpoint`, i.e. Silverman III.3.4 for the *actual* point map (supplied -per isogeny by `toClass_toPointMap` whenever the point map is the geometric `toPointMap`). - -The basepoint case is automatic (`κ 0 = 0 = ofMul (classNorm 1)`). -/ +/-- Agreement of the point map with contracted rational-point ideal classes implies naturality of the Picard identification. -/ theorem Naturality_of_toClassEquiv'_some_eq_comap (ch : α.CoordHom) (hinj : Function.Injective ch.toAlgHom) (hfin : @Module.Finite E.CoordinateRing E.CoordinateRing _ _ ch.toAlgebra.toModule) @@ -536,25 +405,7 @@ theorem Naturality_of_toClassEquiv'_some_eq_comap mk0_relNorm0_XYIdeal_eq_mk0_comap ch hinj hfin h hmem hcomap] exact hpoint x y h hcomap -/-- **UNCONDITIONAL `Naturality` from a `CoordHom` (Silverman III.3.4) — the `hnat` discharge.** - -Given a coordinate-ring restriction `ch : α.CoordHom` and the **single genuine residual** that the -actual point map `α.toAddMonoidHom` realises the III.3.4 *set-theoretic point image* — i.e. for each -rational `(x, y)` the `κ`-class of `α.toAddMonoidHom (x, y)` is the contraction `comap α* 𝔪_{(x,y)}` -(`hpoint`, exactly what the shipped `toClass_toPointMap` supplies for an isogeny whose point map is -the geometric `toPointMap`) — the full naturality `α.Naturality ch hinj hfin` holds. - -This is the **unconditional** wiring requested for the Route-C `hnat` discharge: it threads the -divisor-pushforward RHS (`classNorm_toClassEquiv'_some`) through the residue-degree-`1` -identity `relNorm 𝔪 = comap 𝔪`, now **`PerfectField`-free** (`mk0_relNorm0_XYIdeal_eq_mk0_comap` → -`ClassGroup.mk0_relNorm0_eq_mk0_comap_of_inertiaDeg_one`, `inertiaDeg' = 1` from -`Ideal.inertiaDeg_under_eq_one_of_algHom_of_residueField_finrank_one`). The `relNorm`-vs-`comap` -residue bookkeeping is *fully discharged*; the only carried datum is `hpoint`, the point-map ↔ -`comap` agreement (Silverman III.3.4 for the actual point map), which is the genuine per-isogeny / -base-change content (CoordHom data) — **not** a `PerfectField`/Galois obligation. - -Identical statement to `Naturality_of_toClassEquiv'_some_eq_comap`; provided under the -`naturality_of_coordHom` name the Route-C assembly consumes. -/ +/-- Naturality follows from the coordinate-ring comorphism and its agreement with the rational-point map. -/ theorem naturality_of_coordHom (ch : α.CoordHom) (hinj : Function.Injective ch.toAlgHom) (hfin : @Module.Finite E.CoordinateRing E.CoordinateRing _ _ ch.toAlgebra.toModule) @@ -617,7 +468,7 @@ for `β = φ + ψ`. At the point level, with the III.3.4 naturality composite `picDual ∘ α.toAddMonoidHom` is `κ⁻¹ ∘ (classMap ∘ classNorm) ∘ κ`. **Honest scope note.** This is `φ* ∘ φ_*` (extension after norm) — the **opposite** order to the -shipped `classNorm_comp_classMap` (`classNorm ∘ classMap = φ_* ∘ φ*`). The two orders are *not* +`classNorm_comp_classMap` (`classNorm ∘ classMap = φ_* ∘ φ*`). The two orders are *not* interchangeable from commutativity of `ClassGroup` alone (`f(g c) = g(f c)` needs `f ∘ g = g ∘ f` as maps, not a commutative codomain), and mathlib provides only `relNorm_algebraMap` (`relNorm ∘ map`), **not** `map ∘ relNorm = (·)^n`. The reverse-order class identity @@ -664,6 +515,7 @@ theorem comp_eq_mulByInt_of_comp_eq_of_surjective -- `g (f (g Q)) = g (m • Q) = m • g Q`, and the RHS `[m] (g Q) = m • g Q`. rw [hf, g.map_zsmul, mulByInt_apply] +omit [WeierstrassCurve.IsElliptic E] in /-- **Right-cancellation of a surjective additive point endomorphism (Silverman II.2.3, equality form).** If `g : E.Point →+ E.Point` is **surjective** and two maps `f₁, f₂` agree after post-composition with `g` (i.e. `f₁ ∘ g = f₂ ∘ g`), then `f₁ = f₂`. This is the abstract content of @@ -730,9 +582,9 @@ theorem picDual_comp_toAddMonoidHom_of_surjective_degree (ch : α.CoordHom) Silverman III.6.1(a)/III.6.2 states the dual is **unique**: `φ̂` is the *only* `δ` with `δφ = [deg φ]`. The proof is right-cancellation of the surjective (nonconstant) `φ`. We give the point-map form: -from `(picDual α) ∘ α = [deg α]` (the shipped `picDual_comp_toAddMonoidHom_of_surjective`) and any +from `(picDual α) ∘ α = [deg α]` (the `picDual_comp_toAddMonoidHom_of_surjective`) and any hypothetical `β` with `β ∘ α = [deg α]`, the surjection `α` cancels on the right to force -`picDual α = β`. Specialising `β` to the κ-transport of a *shipped* dual isogeny (e.g. the +`picDual α = β`. Specialising `β` to the κ-transport of a dual isogeny (e.g. the Verschiebung `V` of Frobenius `π`, with `V ∘ π = [q]` from `IsDualOf V π`) **identifies `picDual π` with `V`** — the milestone "Pic⁰ dual of Frobenius = Verschiebung". -/ @@ -796,26 +648,23 @@ theorem picDual_eq_of_comp_toAddMonoidHom_eq_degree (ch : α.CoordHom) ((picDual_comp_toAddMonoidHom_of_surjective_degree ch hinj hfin hnat hsurjDual S S' hSR hS'FF).trans hβ.symm) -/-! #### Non-circular `picDual` of a *single* isogeny whose degree is independently known +/-! #### Duals of isogenies with independently known degrees -The III.6.1(a) uniqueness `picDual_eq_of_comp_toAddMonoidHom_eq_degree` identifies `picDual α` with -any point map `δ` satisfying `δ ∘ α = [deg α]` — **non-circularly whenever `deg α` is known -independently** of the Pic⁰ chain. Two such cases, used to seed the dual algebra for `rπ − s`: +The uniqueness statement in Silverman III.6.1(a) identifies `picDual α` with +any point map `δ` satisfying `δ ∘ α = [deg α]`. For Frobenius, its degree +is the field cardinality `q` and the composition with Verschiebung is `[q]`. +For scalar multiplication `[n]`, the degree is `n²` and self-composition is +`[n²]`. -* **`picDual π = V`** (Frobenius dual = Verschiebung), where `deg π = #K = q` is shipped - (`frobeniusIsog_degree`) and `V ∘ π = [q]` comes from `IsDualOf V π`. -* **`picDual [n] = [n]`** (scalar self-dual, III.6.2(b)/(d)), where `deg [n] = n²` and - `[n] ∘ [n] = [n²]` are shipped (`mulByInt_degree`, `mulByInt_comp_eq_mul`). - -Both are genuinely non-circular: the degree of a *single* Frobenius / scalar is shipped, unlike -`deg(rπ − s)` (which is the Route-C conclusion). They are the seeds for the dual-additivity step -`picDual(rπ − s) = rV − s` — whose *combination* nonetheless needs III.6.2(c) (see the note in -`RouteCGeometric.lean`). -/ +These degree calculations identify the individual duals without assuming +the degree formula for `rπ − s`. The further formula +`picDual(rπ − s) = rV − s` requires dual additivity, Silverman III.6.2(c). +-/ /-- **`picDual α = δ` when `δ ∘ α = [d]` and `α.degree = d` (degree given as data, non-circular).** -The III.6.1(a) uniqueness specialised to an *explicit integer degree* `d`: if `α.degree = d` (an -**independently-shipped** degree, e.g. `frobeniusIsog_degree`, `mulByInt_degree`) and a point map +The III.6.1(a) uniqueness specialised to an *explicit integer degree* `d`: if `α.degree = d` (a +**known** degree, e.g. `frobeniusIsog_degree`, `mulByInt_degree`) and a point map `δ` satisfies `δ ∘ α = [d]`, then `picDual α = δ`. This is the non-circular seed form (it does not route through the Pic⁰ push-pull degree, only through the *given* `d`). -/ theorem picDual_eq_of_comp_toAddMonoidHom_eq_of_degree_eq (ch : α.CoordHom) @@ -847,11 +696,11 @@ The III.6.2(b) dual-of-composition `(φ∘ψ)^ = ψ̂∘φ̂` specialised to `r `picDual_eq_of_comp_toAddMonoidHom_eq_of_degree_eq` with the **independently-known** degree `deg(r • α) = deg α · r²` (`Isogeny.zsmul_degree` / `mulByInt_degree`) and the composite `(r • δ) ∘ (r • α) = r² • (δ ∘ α) = r² • [deg α] = [r² · deg α]`, where `δ` is the dual value of `α` -(any point map with `δ ∘ α = [deg α]`, e.g. the κ-transport of a shipped `IsDualOf` partner). +(any point map with `δ ∘ α = [deg α]`, e.g. the κ-transport of a `IsDualOf` partner). -This is **non-circular**: it routes only through the *given* degree `deg α` (independently shipped +This is **non-circular**: it routes only through the *given* degree `deg α` (independently for a single Frobenius / scalar / `α`), never through the Pic⁰ push-pull degree of `r • α`. It is -the generic engine behind the Route-C seed `picDual(rπ) = rV` (take `α = π`, `δ = V`, +the generic engine behind the dual-additivity seed `picDual(rπ) = rV` (take `α = π`, `δ = V`, `deg π = #K = q`). Residuals: the per-`(r • α)` CoordHom data (`chr` + the two surjectivities + tower `(S, S')`), @@ -898,10 +747,10 @@ theorem picDual_zsmul_eq_zsmul_of_comp_eq exact picDual_eq_of_comp_toAddMonoidHom_eq_of_degree_eq chr hinjr hfinr hnatr hsurjDualr hsurjr S S' hSR hS'FF hdeg hcomp -/-- **`picDual(r • α) = r • α̂` from a shipped `IsDualOf` partner (route-2 seed, `IsDualOf` form).** +/-- **`picDual(r • α) = r • α̂` from a `IsDualOf` partner (route-2 seed, `IsDualOf` form).** As `picDual_zsmul_eq_zsmul_of_comp_eq`, but taking the dual value of `α` in the *full-isogeny* -`IsDualOf δ_isog α` form (`δ_isog ∘ α = [deg α]`), which is how the Route-C Vieta bundle supplies it +`IsDualOf δ_isog α` form (`δ_isog ∘ α = [deg α]`), which is how the dual-additivity Vieta bundle supplies it (e.g. `IsDualOf V π`). Concludes `picDual(r • α) = r • δ_isog` at the point-map level. -/ theorem picDual_zsmul_eq_zsmul_of_isDual {α δ_isog : Isogeny E E} (r : ℤ) (hr : r ≠ 0) @@ -932,10 +781,10 @@ The Silverman III.8 trace relation `α + α̂ = [tr α]` *determines* `α̂` onc `δ` satisfies the *same* relation `α + δ = [tr α]`: subtract `α` to get `α̂ = [tr α] − α = δ`. This is a pure point-group cancellation (no degree, no uniqueness, **non-circular**). -It is the final algebraic step of the Route-C dual-additivity output `picDual(rπ−s) = rV − s`: with +It is the final algebraic step of the dual-additivity dual-additivity output `picDual(rπ−s) = rV − s`: with `α = rπ − s`, the irreducible input `htrace_dual` is III.8 for `α` (equivalently III.6.2(c) additivity, since `tr(rπ−s) = r·t − 2s`), while the candidate identity `htrace_delta` -(`α + (rV − s) = [r·t − 2s]`) is derived *non-circularly* from the shipped `π + V = [t]`. This +(`α + (rV − s) = [r·t − 2s]`) is derived *non-circularly* from the `π + V = [t]`. This lemma performs the subtraction generically. -/ theorem picDual_eq_of_trace_relations (ch : α.CoordHom) (hinj : Function.Injective ch.toAlgHom) @@ -958,7 +807,7 @@ maps).** The point-map identity `(r·π − s) + (r·V − s) = [r·t − 2s]` for abstract endomorphisms `π, V` of `E.Point` satisfying `π + V = [t]` (the Frobenius trace relation). This is the **non-circular** half -of the Route-C dual-additivity output: pointwise +of the dual-additivity dual-additivity output: pointwise `r·π P − s·P + r·V P − s·P = r·(π P + V P) − 2s·P = r·(t·P) − 2s·P = (r·t − 2s)·P`. It carries no `picDual` and no degree — pure point-group algebra from `hsum` — and is the candidate @@ -990,8 +839,8 @@ Pic⁰ dual `picDual α` equals `r·V − s` — *provided* the Silverman III.8 `htrace_dual` is the **single irreducible residual** (Silverman III.8 for `α`, equivalently III.6.2(c) additivity since `tr α = r·t − 2s`); everything else — the candidate trace half `smul_sub_add_smul_sub_eq_mulByInt` — is **non-circular** from `hsum`. This is the engine that -discharges the Route-C `hpicval` (take `α = rπ − s`, `π = π.toAddMonoidHom`, `V = V.toAddMonoidHom`; -`hbeta` is the `rfl`-true `genuineIsogSmulSub_toAddMonoidHom`-shape and `hsum` the shipped +discharges the dual-additivity `hpicval` (take `α = rπ − s`, `π = π.toAddMonoidHom`, `V = V.toAddMonoidHom`; +`hbeta` is the `rfl`-true `genuineIsogSmulSub_toAddMonoidHom`-shape and `hsum` the `π + V = [t]`). The per-piece `picDual` values `picDual π = V`, `picDual(rπ) = rV`, `picDual [n] = [n]` (the non-circular seeds) are exactly what `htrace_dual` decomposes into. -/ theorem picDual_eq_smul_sub_of_sum_trace (ch : α.CoordHom) diff --git a/projects/HasseWeil/HasseWeil/Pic0/ToClassSurjective.lean b/projects/HasseWeil/HasseWeil/Pic0/ToClassSurjective.lean index 31ceaa04d..e7193a4aa 100644 --- a/projects/HasseWeil/HasseWeil/Pic0/ToClassSurjective.lean +++ b/projects/HasseWeil/HasseWeil/Pic0/ToClassSurjective.lean @@ -9,88 +9,6 @@ import Mathlib.RingTheory.OrderOfVanishing.Basic import Mathlib.RingTheory.Polynomial.DegreeLT import HasseWeil.Foundation.Ramification -/-! -# Surjectivity of `Point.toClass` and the isomorphism `E ≅ Pic⁰(E)` (affine model) - -For a Weierstrass curve `W : WeierstrassCurve.Affine F` over a field `F`, mathlib provides the -group homomorphism - -``` -WeierstrassCurve.Affine.Point.toClass : W.Point →+ Additive (ClassGroup W.CoordinateRing) -``` - -(`Mathlib/AlgebraicGeometry/EllipticCurve/Affine/Point.lean`) sending the point at infinity to `0` -and an affine point `P = (x, y)` to the class of the fractional ideal `⟨X - x, Y - y⟩`. Mathlib -proves this is **injective** (`WeierstrassCurve.Affine.Point.toClass_injective`), realising -`W.Point` as a subgroup of the affine ideal class group. It does **not** prove surjectivity. - -This file packages the surjectivity. The statement that every ideal class is the class of some -`XYIdeal'` (or trivial) is the genus-1 divisor-reduction theorem: on a smooth genus-1 curve every -degree-0 divisor class is represented by `(P) - (O)`. We isolate that statement as the -predicate `ClassRepresentableByPoints W` and prove that it is *equivalent* to surjectivity of -`toClass`, and that surjectivity packages into the group isomorphism -`W.Point ≃+ Additive (ClassGroup W.CoordinateRing)`. - -## Main definitions - -* `WeierstrassCurve.Affine.Point.ClassRepresentableByPoints`: the predicate that every element of - `ClassGroup W.CoordinateRing` is trivial or the class of `XYIdeal' h` for a nonsingular point. -* `WeierstrassCurve.Affine.Point.ClassReducesToCodimLEOne`: the genus-1 reduction input — every - nonzero integral ideal class has a representative of `F`-codimension `≤ 1`. This is now **proved - unconditionally** (`classReducesToCodimLEOne_holds`). -* `WeierstrassCurve.Affine.Point.toClassEquiv'`: the **unconditional** group isomorphism - `W.Point ≃+ Additive (ClassGroup W.CoordinateRing)` for `[W.IsElliptic]`, built from injectivity + - the unconditional surjectivity `toClass_surjective'`. - -## Main results - -The **norm-degree dictionary** (the surjectivity counterpart of mathlib's `natDegree_norm_ne_one`, -which powers `toClass_injective`), all axiom-clean: - -* `eq_XYIdeal_of_finrank_quotient_eq_one`: every nonzero ideal `I` with `finrank F (R/I) = 1` is - the point ideal `XYIdeal W x (C y)` of a (necessarily nonsingular, under `[W.IsElliptic]`) point. -* `mk0_eq_one_of_finrank_quotient_eq_zero` and - `mk0_eq_mk_XYIdeal'_of_finrank_quotient_eq_one`: the two codimension endpoints, identifying - codimension `0` (resp. `1`) ideals with the trivial class (resp. a point class). -* `integralIdealRepresentableByPoints_of_classReducesToCodimLEOne` and - `toClass_surjective_of_classReducesToCodimLEOne`: the codimension reduction predicate implies the - integral-ideal reduction, hence surjectivity of `toClass` (using the now axiom-clean Dedekind - instance `HasseWeil.coordinateRing_isDedekindDomain`). - -and the unconditional headline results: - -* `toClass_surjective'`: **unconditional** surjectivity of `toClass` for `[W.IsElliptic]`. -* `toClassEquiv'`: the **unconditional** isomorphism `W.Point ≃+ Pic⁰(E)`. - -## Implementation notes - -The full unconditional surjectivity reduces, via three landed and axiom-clean ingredients, to the -genus-1 codimension reduction `ClassReducesToCodimLEOne`, which is **now also proved**. - -1. `IsDedekindDomain W.CoordinateRing` is **available and axiom-clean** via - `HasseWeil.coordinateRing_isDedekindDomain` (imported here), which fires under `[W.IsElliptic]`. - -2. **The ring-theoretic codimension infrastructure** (field-agnostic, no `[Fintype F]`): - * `finiteDimensional_quotient_of_ne_bot`: every nonzero ideal has finite `F`-codimension. - * `finrank_quotient_smul`: codimension additivity for multiplication by a *principal* ideal. - * `finrank_quotient_mul`: the **general** codimension additivity - `finrank F (R ⧸ I·J) = finrank F (R ⧸ I) + finrank F (R ⧸ J)` for arbitrary nonzero `I, J`, - via the short exact sequence `0 → I/(I·J) → R/(I·J) → R/I → 0` - (`Submodule.quotientQuotientEquivQuotient` + `Submodule.finrank_quotient_add_finrank`) and the - invertible-ideal kernel isomorphism `quotIdealMulEquiv : I/(I·J) ≃ R/J` built from mathlib's - `FractionalIdeal.quotientEquiv`. - -3. **The genus-1 reduction proper**, `classReducesToCodimLEOne_holds`: every nonzero integral ideal - class has a representative of `F`-codimension `≤ 1` (Riemann–Roch for `g = 1`). Proved from the - concrete Riemann–Roch inequality `exists_mem_norm_natDegree_le` (every nonzero ideal `I` has a - nonzero element of norm degree `≤ finrank F (R ⧸ I) + 1`, by an exact `F`-dimension count using - `CoordinateRing.degree_norm_smul_basis` and rank–nullity) plus the general additivity (2): from a - small-norm element of a representative of the inverse class, the Dedekind factorisation - `(a) = I'·J` yields a codimension-`≤ 1` representative of the class. - -Everything in this file is `#print axioms`-clean (`[propext, Classical.choice, Quot.sound]`), -including the unconditional `toClass_surjective'` and `toClassEquiv'`. --/ open Polynomial Module @@ -240,10 +158,8 @@ theorem eq_of_le_of_finrank_quotient_eq {I J : Ideal W.CoordinateRing} (hJI : J exact (Submodule.Quotient.mk_eq_zero _).mp hr0 omit [DecidableEq F] in -/-- **An `F`-algebra hom `R → F` from a codimension-1 quotient.** If `R/I` is 1-dimensional over the -field `F`, then `algebraMap F (R/I)` is an isomorphism, and composing its inverse with the quotient -map gives an `F`-algebra hom `φ : R →ₐ[F] F` whose kernel is exactly `I`. Evaluating `φ` at the -images of `X` and `Y` will produce the point. -/ + + theorem exists_algHom_ker_eq_of_finrank_quotient_eq_one (I : Ideal W.CoordinateRing) [Nontrivial (W.CoordinateRing ⧸ I)] (hfin : Module.finrank F (W.CoordinateRing ⧸ I) = 1) : @@ -289,8 +205,8 @@ theorem equation_of_algHom (φ : W.CoordinateRing →ₐ[F] F) : exact heq.symm omit [DecidableEq F] in -/-- The images of `X - x` and `Y - y` in `R` lie in the kernel of `φ` whenever -`x = φ(X̄)` and `y = φ(Ȳ)`. -/ + + theorem algHom_XClass_eq_zero (φ : W.CoordinateRing →ₐ[F] F) : φ (CoordinateRing.XClass W (φ (CoordinateRing.mk W (C X)))) = 0 := by set x := φ (CoordinateRing.mk W (C X)) with hx @@ -303,7 +219,7 @@ theorem algHom_XClass_eq_zero (φ : W.CoordinateRing →ₐ[F] F) : rw [Algebra.algebraMap_self_apply, sub_self] omit [DecidableEq F] in -/-- The image of `Y - y` in `R` lies in the kernel of `φ` whenever `y = φ(Ȳ)`. -/ + theorem algHom_YClass_eq_zero (φ : W.CoordinateRing →ₐ[F] F) : φ (CoordinateRing.YClass W (C (φ (CoordinateRing.mk W Y)))) = 0 := by set y := φ (CoordinateRing.mk W Y) with hy @@ -328,9 +244,9 @@ theorem eq_XYIdeal_of_finrank_quotient_eq_one [W.IsElliptic] (I : Ideal W.Coordi set y := φ (CoordinateRing.mk W Y) with hy have hEq : W.Equation x y := equation_of_algHom φ have hNS : W.Nonsingular x y := (equation_iff_nonsingular).mp hEq - haveI : FiniteDimensional F (W.CoordinateRing ⧸ CoordinateRing.XYIdeal W x (C y)) := + have : FiniteDimensional F (W.CoordinateRing ⧸ CoordinateRing.XYIdeal W x (C y)) := finiteDimensional_quotient_XYIdeal hEq - haveI : FiniteDimensional F (W.CoordinateRing ⧸ I) := + have : FiniteDimensional F (W.CoordinateRing ⧸ I) := Module.finite_of_finrank_eq_succ hfin refine ⟨x, y, hNS, ?_⟩ have hsub : CoordinateRing.XYIdeal W x (C y) ≤ I := by @@ -352,9 +268,7 @@ theorem finiteDimensional_quotient_of_ne_bot [W.IsElliptic] (I : Ideal W.Coordin classical exact Module.Finite.equiv (Ideal.quotientEquivDirectSum F (CoordinateRing.basis W) hI).symm -/-- **The degree of an ideal of `F[X]`.** For an ideal `J` of the PID `F[X]`, the natural degree of -its monic generator. On `⊥` it is `0`; on a nonzero ideal `⟨g⟩` it is `g.natDegree`. This packages -the codimension `finrank F (F[X] ⧸ J)` purely polynomially. -/ + noncomputable def idealNatDegree (J : Ideal F[X]) : ℕ := (Submodule.IsPrincipal.generator J).natDegree @@ -422,10 +336,10 @@ theorem finrank_quotient_eq_sum_smithCoeffs [W.IsElliptic] (I : Ideal W.Coordina Module.finrank F (W.CoordinateRing ⧸ I) = ∑ i, (Ideal.smithCoeffs (CoordinateRing.basis W) I hI i).natDegree := by classical - haveI hFree : ∀ i, Module.Free F + have hFree : ∀ i, Module.Free F (F[X] ⧸ Ideal.span ({Ideal.smithCoeffs (CoordinateRing.basis W) I hI i} : Set F[X])) := fun i ↦ inferInstance - haveI hFin : ∀ i, Module.Finite F + have hFin : ∀ i, Module.Finite F (F[X] ⧸ Ideal.span ({Ideal.smithCoeffs (CoordinateRing.basis W) I hI i} : Set F[X])) := fun i ↦ inferInstance rw [Ideal.finrank_quotient_eq_sum (I := I) (hI := hI) F (CoordinateRing.basis W)] @@ -443,12 +357,8 @@ theorem smul_ideal_eq_span_mul (a : W.CoordinateRing) (I : Ideal W.CoordinateRin · rintro ⟨z, hz, rfl⟩; exact ⟨z, hz, by rw [smul_eq_mul]⟩ omit [DecidableEq F] in -/-- **Codimension additivity for multiplication by a principal ideal.** For a nonzero `a ∈ R` and a -nonzero ideal `I`, `finrank F (R ⧸ ⟨a⟩·I) = finrank F (R ⧸ I) + finrank F (R ⧸ ⟨a⟩)`. This is the -additivity of `F`-codimension along the multiplication-by-`a` short exact sequence -`R ⧸ I → R ⧸ (a•I) → R ⧸ ⟨a⟩` (`Ideal.mulQuot`/`Ideal.quotOfMul`, restricted to `F`-linear maps and -fed to `Module.length_eq_add_of_exact`, with `Module.length F = finrank F` over the field `F`). -It is the special case of the genus-1 norm-degree additivity for a principal factor. -/ + + theorem finrank_quotient_smul [W.IsElliptic] {a : W.CoordinateRing} (ha : a ≠ 0) (I : Ideal W.CoordinateRing) (hI : I ≠ ⊥) : Module.finrank F (W.CoordinateRing ⧸ (a • I)) = @@ -459,17 +369,17 @@ theorem finrank_quotient_smul [W.IsElliptic] {a : W.CoordinateRing} (ha : a ≠ have haspan : Ideal.span ({a} : Set W.CoordinateRing) ≠ ⊥ := by rwa [Ne, Ideal.span_singleton_eq_bot] have haI : a • I ≠ ⊥ := by rw [smul_ideal_eq_span_mul]; exact mul_ne_zero haspan hI - haveI : FiniteDimensional F (W.CoordinateRing ⧸ I) := finiteDimensional_quotient_of_ne_bot _ hI - haveI : FiniteDimensional F (W.CoordinateRing ⧸ Ideal.span ({a} : Set W.CoordinateRing)) := + have : FiniteDimensional F (W.CoordinateRing ⧸ I) := finiteDimensional_quotient_of_ne_bot _ hI + have : FiniteDimensional F (W.CoordinateRing ⧸ Ideal.span ({a} : Set W.CoordinateRing)) := finiteDimensional_quotient_of_ne_bot _ haspan - haveI : FiniteDimensional F (W.CoordinateRing ⧸ (a • I)) := + have : FiniteDimensional F (W.CoordinateRing ⧸ (a • I)) := finiteDimensional_quotient_of_ne_bot _ haI have hlen := Module.length_eq_add_of_exact ((Ideal.mulQuot a I).restrictScalars F) ((Ideal.quotOfMul a I).restrictScalars F) (Ideal.mulQuot_injective I hanz) (Ideal.quotOfMul_surjective I) (Ideal.exact_mulQuot_quotOfMul I) rw [Module.length_eq_finrank, Module.length_eq_finrank, Module.length_eq_finrank, - ← Nat.cast_add, ENat.coe_inj] at hlen + ← Nat.cast_add, ENat.natCast_inj] at hlen exact hlen omit [DecidableEq F] in @@ -554,10 +464,8 @@ private noncomputable def quotEquivOneCoeIdealQuot_aux [W.IsElliptic] {J : Ideal exact hry omit [DecidableEq F] in -/-- **The invertible-ideal quotient isomorphism `I/(I·J) ≃ R/J`.** For nonzero ideals `I, J` of the -(Dedekind) coordinate ring `R`, the `R`-module quotient of the ideal `I` (viewed as a submodule of -`R`) by its submodule `I·J` is `R`-linearly isomorphic to `R/J`; this holds because `I` is -invertible. -/ + + noncomputable def quotIdealMulEquiv [W.IsElliptic] {I J : Ideal W.CoordinateRing} (hI : I ≠ ⊥) (hJ : J ≠ ⊥) : ((I : Submodule W.CoordinateRing W.CoordinateRing) ⧸ @@ -582,23 +490,17 @@ noncomputable def quotIdealMulEquiv [W.IsElliptic] {I J : Ideal W.CoordinateRing (eqe.trans (quotEquivOneCoeIdealQuot_aux hinj).symm) omit [DecidableEq F] in -/-- **General codimension additivity.** For arbitrary nonzero ideals `I, J` of -`R := W.CoordinateRing`, -`finrank F (R ⧸ I·J) = finrank F (R ⧸ I) + finrank F (R ⧸ J)`. This upgrades `finrank_quotient_smul` -(the principal-factor case) to all factors, via the short exact sequence -`0 → I/(I·J) → R/(I·J) → R/I → 0` (`Submodule.quotientQuotientEquivQuotient` + -`Submodule.finrank_quotient_add_finrank`) together with the invertible-ideal kernel identification -`I/(I·J) ≃ R/J` (`quotIdealMulEquiv`). It is the genus-1 norm-degree additivity in `F`-codimension -form. -/ + + theorem finrank_quotient_mul [W.IsElliptic] {I J : Ideal W.CoordinateRing} (hI : I ≠ ⊥) (hJ : J ≠ ⊥) : Module.finrank F (W.CoordinateRing ⧸ (I * J)) = Module.finrank F (W.CoordinateRing ⧸ I) + Module.finrank F (W.CoordinateRing ⧸ J) := by have hIJ : I * J ≠ ⊥ := mul_ne_zero hI hJ - haveI : FiniteDimensional F (W.CoordinateRing ⧸ (I * J)) := + have : FiniteDimensional F (W.CoordinateRing ⧸ (I * J)) := finiteDimensional_quotient_of_ne_bot _ hIJ - haveI : FiniteDimensional F (W.CoordinateRing ⧸ I) := finiteDimensional_quotient_of_ne_bot _ hI - haveI : FiniteDimensional F (W.CoordinateRing ⧸ J) := finiteDimensional_quotient_of_ne_bot _ hJ + have : FiniteDimensional F (W.CoordinateRing ⧸ I) := finiteDimensional_quotient_of_ne_bot _ hI + have : FiniteDimensional F (W.CoordinateRing ⧸ J) := finiteDimensional_quotient_of_ne_bot _ hJ have hIJ_le : I * J ≤ I := Ideal.mul_le_left set M : Submodule (W.CoordinateRing) (W.CoordinateRing ⧸ (I * J)) := Submodule.map (Submodule.mkQ (I * J)) @@ -620,7 +522,7 @@ theorem finrank_quotient_mul [W.IsElliptic] {I J : Ideal W.CoordinateRing} have e3 : (LinearMap.range g) ≃ₗ[R] M := LinearEquiv.ofEq _ _ hrange exact ((Submodule.quotEquivOfEq _ _ hker.symm).trans (g.quotKerEquivRange.trans e3)).symm have eM : M ≃ₗ[W.CoordinateRing] (W.CoordinateRing ⧸ J) := e2a.trans (quotIdealMulEquiv hI hJ) - haveI : FiniteDimensional F M := (eM.restrictScalars F).symm.finiteDimensional + have : FiniteDimensional F M := (eM.restrictScalars F).symm.finiteDimensional have key : Module.finrank F ((W.CoordinateRing ⧸ (I * J)) ⧸ (M.restrictScalars F)) + Module.finrank F (M.restrictScalars F) = Module.finrank F (W.CoordinateRing ⧸ (I * J)) := Submodule.finrank_quotient_add_finrank (M.restrictScalars F) @@ -666,7 +568,7 @@ theorem mk0_eq_mk_XYIdeal'_of_finrank_quotient_eq_one [W.IsElliptic] (J : Ideal (hfin : Module.finrank F (W.CoordinateRing ⧸ J) = 1) : ∃ (x y : F) (h : W.Nonsingular x y), ClassGroup.mk0 ⟨J, hmem⟩ = ClassGroup.mk W.FunctionField (CoordinateRing.XYIdeal' h) := by - haveI : Nontrivial (W.CoordinateRing ⧸ J) := Module.nontrivial_of_finrank_eq_succ hfin + have : Nontrivial (W.CoordinateRing ⧸ J) := Module.nontrivial_of_finrank_eq_succ hfin obtain ⟨x, y, h, hJ⟩ := eq_XYIdeal_of_finrank_quotient_eq_one J hfin have hmem' : CoordinateRing.XYIdeal W x (C y) ∈ (Ideal W.CoordinateRing)⁰ := hJ ▸ hmem refine ⟨x, y, h, ?_⟩ @@ -723,10 +625,7 @@ private theorem two_nsmul_degree_le' {p : F[X]} {n : ℕ} (hp : p.degree < (n : rw [nsmul_eq_mul]; push_cast; ring, Nat.cast_le] lia -/-- **The basis-combination map** `(p, q) ↦ p · 1 + q · Ȳ`, restricted to polynomials of bounded -degree (`degreeLT F a × degreeLT F b`), as an `F`-linear map into `R`. Its image is the space of -elements whose norm degree we can control; its kernel intersected with the codimension count gives -the Riemann–Roch element. -/ + noncomputable def basisCombMap (W : WeierstrassCurve.Affine F) (a b : ℕ) : (Polynomial.degreeLT F a × Polynomial.degreeLT F b) →ₗ[F] W.CoordinateRing where toFun pq := (pq.1 : F[X]) • (1 : W.CoordinateRing) + (pq.2 : F[X]) • (CoordinateRing.basis W 1) @@ -780,19 +679,15 @@ theorem basisCombMap_ne_zero {a b : ℕ} (pq : Polynomial.degreeLT F a × Polyno exact Prod.ext (Subtype.ext hp) (Subtype.ext hq) omit [DecidableEq F] in -/-- **The genus-1 Riemann–Roch inequality (concrete form).** Every nonzero ideal `I` of -`R := W.CoordinateRing` contains a nonzero element `a` with `(Algebra.norm F[X] a).natDegree ≤ -finrank F (R ⧸ I) + 1`. This is `ℓ(D) ≥ deg D` for `g = 1` made explicit, proved by the exact -`F`-dimension count: the bounded-degree basis combinations form an `F`-subspace of dimension -`ℓ + 1 > ℓ = finrank F (R ⧸ I)`, so rank–nullity for its composite into `R ⧸ I` forces a nonzero -kernel element. No finiteness of `F` is needed (`F[X]` is Euclidean). -/ + + theorem exists_mem_norm_natDegree_le [W.IsElliptic] (I : Ideal W.CoordinateRing) (hI : I ≠ ⊥) : ∃ a ∈ I, a ≠ 0 ∧ (Algebra.norm F[X] a).natDegree ≤ Module.finrank F (W.CoordinateRing ⧸ I) + 1 := by classical set R := W.CoordinateRing set ℓ := Module.finrank F (R ⧸ I) with hℓ - haveI : FiniteDimensional F (R ⧸ I) := finiteDimensional_quotient_of_ne_bot _ hI + have : FiniteDimensional F (R ⧸ I) := finiteDimensional_quotient_of_ne_bot _ hI obtain ⟨da, hda⟩ : ∃ da, da = (ℓ + 1) / 2 + 1 := ⟨_, rfl⟩ obtain ⟨db, hdb⟩ : ∃ db, db = ℓ / 2 := ⟨_, rfl⟩ set ψ : (Polynomial.degreeLT F da × Polynomial.degreeLT F db) →ₗ[F] (R ⧸ I) := @@ -809,7 +704,7 @@ theorem exists_mem_norm_natDegree_le [W.IsElliptic] (I : Ideal W.CoordinateRing) have hrange_le : Module.finrank F (LinearMap.range ψ) ≤ ℓ := le_trans (Submodule.finrank_le _) (le_of_eq hℓ.symm) have hker_pos : 0 < Module.finrank F (LinearMap.ker ψ) := by lia - haveI : Nontrivial (LinearMap.ker ψ) := Module.nontrivial_of_finrank_pos hker_pos + have : Nontrivial (LinearMap.ker ψ) := Module.nontrivial_of_finrank_pos hker_pos obtain ⟨z, hz⟩ := exists_ne (0 : LinearMap.ker ψ) set pq := (z : Polynomial.degreeLT F da × Polynomial.degreeLT F db) with hpq have hpq_ne : pq ≠ 0 := fun h ↦ hz (Subtype.ext h) @@ -873,7 +768,7 @@ theorem classReducesToCodimLEOne_holds [W.IsElliptic] : rw [hI', inv_inv] at hmk0 rcases Nat.le_one_iff_eq_zero_or_eq_one.mp hfinle with h0 | h1 · left - haveI : FiniteDimensional F (W.CoordinateRing ⧸ J) := + have : FiniteDimensional F (W.CoordinateRing ⧸ J) := finiteDimensional_quotient_of_ne_bot _ (mem_nonZeroDivisors_iff_ne_zero.mp hJmem) have hone : ClassGroup.mk0 ⟨J, hJmem⟩ = 1 := mk0_eq_one_of_finrank_quotient_eq_zero J hJmem h0