Skip to content

Commit 47535dd

Browse files
feat: port Algebra.Module.DedekindDomain (#4705)
1 parent b895b18 commit 47535dd

File tree

2 files changed

+90
-0
lines changed

2 files changed

+90
-0
lines changed

Mathlib.lean

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -224,6 +224,7 @@ import Mathlib.Algebra.Module.Algebra
224224
import Mathlib.Algebra.Module.Basic
225225
import Mathlib.Algebra.Module.BigOperators
226226
import Mathlib.Algebra.Module.Bimodule
227+
import Mathlib.Algebra.Module.DedekindDomain
227228
import Mathlib.Algebra.Module.Equiv
228229
import Mathlib.Algebra.Module.GradedModule
229230
import Mathlib.Algebra.Module.Hom
Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
/-
2+
Copyright (c) 2022 Pierre-Alexandre Bazin. All rights reserved.
3+
Released under Apache 2.0 license as described in the file LICENSE.
4+
Authors: Pierre-Alexandre Bazin
5+
6+
! This file was ported from Lean 3 source module algebra.module.dedekind_domain
7+
! leanprover-community/mathlib commit cdc34484a07418af43daf8198beaf5c00324bca8
8+
! Please do not edit these lines, except to modify the commit id
9+
! if you have ported upstream changes.
10+
-/
11+
import Mathlib.Algebra.Module.Torsion
12+
import Mathlib.RingTheory.DedekindDomain.Ideal
13+
14+
/-!
15+
# Modules over a Dedekind domain
16+
17+
Over a Dedekind domain, a `I`-torsion module is the internal direct sum of its `p i ^ e i`-torsion
18+
submodules, where `I = ∏ i, p i ^ e i` is its unique decomposition in prime ideals.
19+
Therefore, as any finitely generated torsion module is `I`-torsion for some `I`, it is an internal
20+
direct sum of its `p i ^ e i`-torsion submodules for some prime ideals `p i` and numbers `e i`.
21+
-/
22+
23+
24+
universe u v
25+
26+
open scoped BigOperators
27+
28+
variable {R : Type u} [CommRing R] [IsDomain R] {M : Type v} [AddCommGroup M] [Module R M]
29+
30+
open scoped DirectSum
31+
32+
namespace Submodule
33+
34+
variable [IsDedekindDomain R]
35+
36+
open UniqueFactorizationMonoid
37+
38+
open scoped Classical
39+
40+
/-- Over a Dedekind domain, a `I`-torsion module is the internal direct sum of its `p i ^ e i`-
41+
torsion submodules, where `I = ∏ i, p i ^ e i` is its unique decomposition in prime ideals.-/
42+
theorem isInternal_prime_power_torsion_of_is_torsion_by_ideal {I : Ideal R} (hI : I ≠ ⊥)
43+
(hM : Module.IsTorsionBySet R M I) :
44+
DirectSum.IsInternal fun p : (factors I).toFinset =>
45+
torsionBySet R M ((p : Ideal R) ^ (factors I).count ↑p) := by
46+
let P := factors I
47+
have prime_of_mem := fun p (hp : p ∈ P.toFinset) =>
48+
prime_of_factor p (Multiset.mem_toFinset.mp hp)
49+
apply @torsionBySet_isInternal _ _ _ _ _ _ _ _ (fun p => p ^ P.count p) _
50+
· convert hM
51+
rw [← Finset.inf_eq_iInf, IsDedekindDomain.inf_prime_pow_eq_prod, ← Finset.prod_multiset_count,
52+
← associated_iff_eq]
53+
· exact factors_prod hI
54+
· exact prime_of_mem
55+
· exact fun _ _ _ _ ij => ij
56+
· intro p hp q hq pq; dsimp
57+
rw [irreducible_pow_sup]
58+
· suffices (normalizedFactors _).count p = 0 by rw [this, zero_min, pow_zero, Ideal.one_eq_top]
59+
· rw [Multiset.count_eq_zero,
60+
normalizedFactors_of_irreducible_pow (prime_of_mem q hq).irreducible,
61+
Multiset.mem_replicate]
62+
exact fun H => pq <| H.2.trans <| normalize_eq q
63+
· rw [← Ideal.zero_eq_bot]; apply pow_ne_zero; exact (prime_of_mem q hq).ne_zero
64+
· exact (prime_of_mem p hp).irreducible
65+
#align submodule.is_internal_prime_power_torsion_of_is_torsion_by_ideal Submodule.isInternal_prime_power_torsion_of_is_torsion_by_ideal
66+
67+
/-- A finitely generated torsion module over a Dedekind domain is an internal direct sum of its
68+
`p i ^ e i`-torsion submodules where `p i` are factors of `(⊤ : Submodule R M).annihilator` and
69+
`e i` are their multiplicities. -/
70+
theorem isInternal_prime_power_torsion [Module.Finite R M] (hM : Module.IsTorsion R M) :
71+
DirectSum.IsInternal fun p : (factors (⊤ : Submodule R M).annihilator).toFinset =>
72+
torsionBySet R M ((p : Ideal R) ^ (factors (⊤ : Submodule R M).annihilator).count ↑p) := by
73+
have hM' := Module.isTorsionBySet_annihilator_top R M
74+
have hI := Submodule.annihilator_top_inter_nonZeroDivisors hM
75+
refine' isInternal_prime_power_torsion_of_is_torsion_by_ideal _ hM'
76+
rw [← Set.nonempty_iff_ne_empty] at hI ; rw [Submodule.ne_bot_iff]
77+
obtain ⟨x, H, hx⟩ := hI; exact ⟨x, H, nonZeroDivisors.ne_zero hx⟩
78+
#align submodule.is_internal_prime_power_torsion Submodule.isInternal_prime_power_torsion
79+
80+
/-- A finitely generated torsion module over a Dedekind domain is an internal direct sum of its
81+
`p i ^ e i`-torsion submodules for some prime ideals `p i` and numbers `e i`.-/
82+
theorem exists_isInternal_prime_power_torsion [Module.Finite R M] (hM : Module.IsTorsion R M) :
83+
∃ (P : Finset <| Ideal R) (_ : DecidableEq P) (_ : ∀ p ∈ P, Prime p) (e : P → ℕ),
84+
DirectSum.IsInternal fun p : P => torsionBySet R M ((p : Ideal R) ^ e p) :=
85+
⟨_, _, fun p hp => prime_of_factor p (Multiset.mem_toFinset.mp hp), _,
86+
isInternal_prime_power_torsion hM⟩
87+
#align submodule.exists_is_internal_prime_power_torsion Submodule.exists_isInternal_prime_power_torsion
88+
89+
end Submodule

0 commit comments

Comments
 (0)