77
88public import Mathlib.Algebra.Module.Torsion.Basic
99public import Mathlib.RingTheory.DedekindDomain.Ideal.Lemmas
10+ public import Mathlib.RingTheory.DedekindDomain.Factorization
1011
1112/-!
1213# I-Primary Components of modules
@@ -15,7 +16,7 @@ Let `A` be a commutative ring and `I`, an ideal of `A`.
1516Given an `A`-Module `M` it's `I`-primary component is defined as
1617 $$M(I) := \bigcup_{i : \mathbb{N}} \text{torsionBySet A M } I ^ i.$$
1718
18- For `P : HeightOneSpectrum A`, the main result of this file (TODO) is that
19+ For `P : HeightOneSpectrum A`, the main result of this file is that
1920 $$M \cong \bigoplus_{P} M(P).$$
2021
2122## Main definitions
@@ -28,6 +29,8 @@ For `P : HeightOneSpectrum A`, the main result of this file (TODO) is that
2829
2930variable {A M M₁ M₂ : Type *} [CommRing A]
3031
32+ open IsDedekindDomain Submodule Module HeightOneSpectrum Set Function
33+
3134namespace Ideal
3235
3336variable (I : Ideal A)
@@ -127,6 +130,64 @@ theorem primaryComponent_sup (N₁ N₂ : Submodule A M) (hD : Disjoint N₁ N
127130 aesop
128131 · use y, hymem, z, hzmem
129132
133+ section IsDedekindDomain
134+
135+ variable [IsDedekindDomain A]
136+
137+ open scoped nonZeroDivisors
138+
139+ theorem iSup_primaryComponent_eq_top (h : IsTorsion A M) :
140+ ⨆ P : HeightOneSpectrum A, primaryComponent M (P : Ideal A) = ⊤ := by
141+ rw [eq_top_iff']
142+ intro x
143+ obtain ⟨⟨a : A, ha : a ∈ A⁰⟩, hmem : a • x = 0 ⟩ := h (x := x)
144+ replace hmem : x ∈ torsionBySet A M (span {a}) := by
145+ simp_all [← torsionBySet_eq_torsionBySet_span {a}]
146+ have ha0 : span {a} ≠ ⊥ := by simpa using nonZeroDivisors.ne_zero ha
147+ rw [← iInf_maxPowDividing_eq ha0] at hmem
148+ let : Fintype (mulSupport fun v : HeightOneSpectrum A => v.maxPowDividing (span {a})) :=
149+ Finite.fintype (hasFiniteMulSupport ha0)
150+ let S := (mulSupport fun v : HeightOneSpectrum A => v.maxPowDividing (span {a})).toFinset
151+ have : (⨅ i : HeightOneSpectrum A, i.maxPowDividing (span {a})) =
152+ (⨅ i ∈ S, i.maxPowDividing (span {a})) := by
153+ ext x
154+ constructor
155+ · aesop
156+ · simp only [mem_iInf]
157+ intro h i
158+ by_cases htop : i.maxPowDividing (span {a}) = ⊤ <;> simp_all [S]
159+ have hPairwise : (S : Set (HeightOneSpectrum _)).Pairwise
160+ fun i j ↦ i.maxPowDividing (span {a}) ⊔ j.maxPowDividing (span {a}) = ⊤ :=
161+ fun r hr s hs hrs ↦ (isCoprime_pow_of_ne _ _ hrs _ _).sup_eq
162+ rw [this, ← iSup_torsionBySet_ideal_eq_torsionBySet_iInf hPairwise] at hmem
163+ revert x
164+ rw [← SetLike.le_def]
165+ refine iSup_mono (fun P x hxmem ↦ ?_)
166+ by_cases hPS : P ∈ S
167+ · simp_all only [mem_nonZeroDivisors_iff_ne_zero, ne_eq, mem_toFinset, mem_mulSupport,
168+ one_eq_top, primaryComponent_mem, mem_torsionBySet_iff, SetLike.coe_sort_coe,
169+ Subtype.forall, iSup_pos, S]
170+ exact ⟨(Associates.mk P.asIdeal).count (Associates.mk (span {a})).factors, fun _ b ↦ hxmem _ b⟩
171+ · simp_all
172+
173+ variable (A M) in
174+ theorem iSupIndep_primaryComponent :
175+ iSupIndep fun P : HeightOneSpectrum A => primaryComponent M (P : Ideal A) := by
176+ rw [iSupIndep_iff_finset_sum_eq_zero_imp_eq_zero]
177+ intro s p hmem hsum
178+ simp only [primaryComponent_mem] at hmem
179+ choose! f hmem using hmem
180+ let m := s.sup f
181+ have hSupIndep : iSupIndep fun i : HeightOneSpectrum A ↦ torsionBySet A M ↑(i.asIdeal ^ m) := by
182+ rw [iSupIndep_iff_supIndep]
183+ exact fun _ ↦ supIndep_torsionBySet_ideal
184+ fun _ _ _ _ hPQ ↦ (isCoprime_pow_of_ne _ _ hPQ _ _).sup_eq
185+ rw [iSupIndep_iff_finset_sum_eq_zero_imp_eq_zero] at hSupIndep
186+ apply hSupIndep _ _ ?_ hsum
187+ exact fun P hP ↦ torsionBySet_le_torsionBySet_pow _ _ (Finset.le_sup hP) _ (hmem P hP)
188+
189+ end IsDedekindDomain
190+
130191end AddCommGroup
131192
132193end CommRing
0 commit comments