Skip to content

Commit 4092480

Browse files
committed
feat(RingTheory/Ideal): the inertia degree and ramification index are less than the rank (#30646)
Also prove that `primesOverFinset` is less than the rank. These are all easy consequences of [Ideal.sum_ramification_inertia](https://leanprover-community.github.io/mathlib4_docs/Mathlib/NumberTheory/RamificationInertia/Basic.html#Ideal.sum_ramification_inertia)
1 parent 28ac543 commit 4092480

File tree

2 files changed

+50
-9
lines changed

2 files changed

+50
-9
lines changed

Mathlib/NumberTheory/RamificationInertia/Basic.lean

Lines changed: 46 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -312,6 +312,15 @@ lemma inertiaDeg_map_eq [p.IsMaximal] (P : Ideal S)
312312
rw [show P.map e = _ from map_comap_of_equiv (e : S ≃+* S₁)]
313313
exact p.inertiaDeg_comap_eq (e : S ≃ₐ[R] S₁).symm P
314314

315+
theorem inertiaDeg_bot [Nontrivial R] [IsDomain S] [Algebra.IsIntegral R S]
316+
[hP : P.LiesOver (⊥ : Ideal R)] :
317+
(⊥ : Ideal R).inertiaDeg P = finrank R S := by
318+
rw [inertiaDeg, dif_pos (over_def P (⊥ : Ideal R)).symm]
319+
replace hP : P = ⊥ := eq_bot_of_liesOver_bot _ P (h := hP)
320+
rw [Algebra.finrank_eq_of_equiv_equiv (RingEquiv.quotientBot R).symm
321+
((quotEquivOfEq hP).trans (RingEquiv.quotientBot S)).symm]
322+
rfl
323+
315324
end DecEq
316325

317326

@@ -872,15 +881,16 @@ noncomputable def Factors.piQuotientLinearEquiv (p : Ideal R) (hp : map (algebra
872881
RingHomCompTriple.comp_apply, Pi.mul_apply, Pi.algebraMap_apply]
873882
congr }
874883

884+
variable (K L : Type*) [Field K] [Field L] [IsDedekindDomain R] [Algebra R K] [IsFractionRing R K]
885+
[Algebra S L] [IsFractionRing S L] [Algebra K L] [Algebra R L] [IsScalarTower R S L]
886+
[IsScalarTower R K L] [Module.Finite R S]
887+
875888
open scoped Classical in
876889
/-- The **fundamental identity** of ramification index `e` and inertia degree `f`:
877890
for `P` ranging over the primes lying over `p`, `∑ P, e P * f P = [Frac(S) : Frac(R)]`;
878891
here `S` is a finite `R`-module (and thus `Frac(S) : Frac(R)` is a finite extension) and `p`
879892
is maximal. -/
880-
theorem sum_ramification_inertia (K L : Type*) [Field K] [Field L] [IsDedekindDomain R]
881-
[Algebra R K] [IsFractionRing R K] [Algebra S L] [IsFractionRing S L] [Algebra K L]
882-
[Algebra R L] [IsScalarTower R S L] [IsScalarTower R K L] [Module.Finite R S]
883-
{p : Ideal R} [p.IsMaximal] (hp0 : p ≠ ⊥) :
893+
theorem sum_ramification_inertia {p : Ideal R} [p.IsMaximal] (hp0 : p ≠ ⊥) :
884894
∑ P ∈ primesOverFinset p S,
885895
ramificationIdx (algebraMap R S) p P * inertiaDeg p P = finrank K L := by
886896
set e := ramificationIdx (algebraMap R S) p
@@ -902,12 +912,39 @@ theorem sum_ramification_inertia (K L : Type*) [Field K] [Field L] [IsDedekindDo
902912
algebraMap_injective_of_field_isFractionRing R S K L, le_bot_iff]
903913
· exact finrank_quotient_map p K L
904914

915+
theorem inertiaDeg_le_finrank [NoZeroSMulDivisors R S] {p : Ideal R} [p.IsMaximal]
916+
(P : Ideal S) [hP₁ : P.IsPrime] [hP₂ : P.LiesOver p] (hp0 : p ≠ ⊥) :
917+
p.inertiaDeg P ≤ Module.finrank K L := by
918+
classical
919+
have hP : P ∈ primesOverFinset p S := (mem_primesOverFinset_iff hp0 _).mpr ⟨hP₁, hP₂⟩
920+
rw [← sum_ramification_inertia S K L hp0, ← Finset.add_sum_erase _ _ hP]
921+
refine le_trans (Nat.le_mul_of_pos_left _ ?_) (Nat.le_add_right _ _)
922+
exact Nat.pos_iff_ne_zero.mpr <| IsDedekindDomain.ramificationIdx_ne_zero_of_liesOver _ hp0
923+
924+
theorem ramificationIdx_le_finrank [NoZeroSMulDivisors R S] {p : Ideal R} [p.IsMaximal]
925+
(P : Ideal S) [hP₁ : P.IsPrime] [hP₂ : P.LiesOver p] :
926+
p.ramificationIdx (algebraMap R S) P ≤ Module.finrank K L := by
927+
classical
928+
by_cases hp0 : p = ⊥
929+
· simp [hp0]
930+
have hP : P ∈ primesOverFinset p S := (mem_primesOverFinset_iff hp0 _).mpr ⟨hP₁, hP₂⟩
931+
rw [← sum_ramification_inertia S K L hp0, ← Finset.add_sum_erase _ _ hP]
932+
refine le_trans (Nat.le_mul_of_pos_right _ ?_) (Nat.le_add_right _ _)
933+
exact Nat.pos_iff_ne_zero.mpr <| inertiaDeg_ne_zero p P
934+
935+
theorem card_primesOverFinset_le_finrank [NoZeroSMulDivisors R S] {p : Ideal R} [p.IsMaximal]
936+
(hp0 : p ≠ ⊥) : Finset.card (primesOverFinset p S) ≤ Module.finrank K L := by
937+
rw [← sum_ramification_inertia S K L hp0, Finset.card_eq_sum_ones]
938+
refine Finset.sum_le_sum fun P hP ↦ ?_
939+
have : P.IsPrime := ((mem_primesOverFinset_iff hp0 _).mp hP).1
940+
have : P.LiesOver p := ((mem_primesOverFinset_iff hp0 _).mp hP).2
941+
refine Right.one_le_mul ?_ ?_
942+
· exact Nat.pos_iff_ne_zero.mpr <| IsDedekindDomain.ramificationIdx_ne_zero_of_liesOver _ hp0
943+
· exact Nat.pos_iff_ne_zero.mpr <| inertiaDeg_ne_zero p P
944+
905945
/-- `Ideal.sum_ramification_inertia`, in the local (DVR) case. -/
906-
lemma ramificationIdx_mul_inertiaDeg_of_isLocalRing
907-
(K L : Type*) [Field K] [Field L] [IsLocalRing S]
908-
[IsDedekindDomain R] [Algebra R K] [IsFractionRing R K] [Algebra S L]
909-
[IsFractionRing S L] [Algebra K L] [Algebra R L] [IsScalarTower R S L]
910-
[IsScalarTower R K L] [Module.Finite R S] {p : Ideal R} [p.IsMaximal] (hp0 : p ≠ ⊥) :
946+
lemma ramificationIdx_mul_inertiaDeg_of_isLocalRing [IsLocalRing S] {p : Ideal R} [p.IsMaximal]
947+
(hp0 : p ≠ ⊥) :
911948
ramificationIdx (algebraMap R S) p (IsLocalRing.maximalIdeal S) *
912949
p.inertiaDeg (IsLocalRing.maximalIdeal S) = Module.finrank K L := by
913950
have := FaithfulSMul.of_field_isFractionRing R S K L

Mathlib/RingTheory/DedekindDomain/Ideal/Lemmas.lean

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1008,6 +1008,10 @@ theorem coe_primesOverFinset : primesOverFinset p B = primesOver p B := by
10081008
(fun ⟨hPp, h⟩ => ⟨hPp, ⟨hpm.eq_of_le (comap_ne_top _ hPp.ne_top) (le_comap_of_map_le h)⟩⟩)
10091009
(fun ⟨hPp, h⟩ => ⟨hPp, map_le_of_le_comap h.1.le⟩)
10101010

1011+
include hpb in
1012+
theorem mem_primesOverFinset_iff {P : Ideal B} : P ∈ primesOverFinset p B ↔ P ∈ primesOver p B := by
1013+
rw [← Finset.mem_coe, coe_primesOverFinset hpb]
1014+
10111015
variable {R} (A) in
10121016
theorem IsLocalRing.primesOverFinset_eq [IsLocalRing A] [IsDedekindDomain A]
10131017
[Algebra R A] [FaithfulSMul R A] [Module.Finite R A] {p : Ideal R} [p.IsMaximal] (hp0 : p ≠ ⊥) :

0 commit comments

Comments
 (0)