Skip to content

Commit 30a7c42

Browse files
xroblotkckennylau
andcommitted
feat(DedekindDomain): Monoid of ideals is torsion-free (#28169)
We prove that an unique factorization monoid `M` that can be equipped with a `NormalizationMonoid` structure and such that `Mˣ` is torsion-free, is torsion-free. As consequence, we get the instance ``` import Mathlib.Algebra.GroupWithZero.Torsion import Mathlib.RingTheory.DedekindDomain.Ideal.Basic variable {R : Type*} [CommRing R] [IsDedekindDomain R] instance : IsMulTorsionFree (Ideal R) := inferInstance ``` Note: the lemma `Associated.pow_iff` comes with a previous version of the proof and is not used in the current proof but was left since it may be useful anyway Co-authored-by: Kenny Lau <kc_kennylau@yahoo.com.hk> Co-authored-by: Kenny Lau <kc_kennylau@yahoo.com.hk>
1 parent f47dc94 commit 30a7c42

File tree

7 files changed

+69
-0
lines changed

7 files changed

+69
-0
lines changed

Mathlib.lean

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -497,6 +497,7 @@ import Mathlib.Algebra.GroupWithZero.Shrink
497497
import Mathlib.Algebra.GroupWithZero.Subgroup
498498
import Mathlib.Algebra.GroupWithZero.Submonoid.Pointwise
499499
import Mathlib.Algebra.GroupWithZero.Submonoid.Primal
500+
import Mathlib.Algebra.GroupWithZero.Torsion
500501
import Mathlib.Algebra.GroupWithZero.TransferInstance
501502
import Mathlib.Algebra.GroupWithZero.ULift
502503
import Mathlib.Algebra.GroupWithZero.Units.Basic

Mathlib/Algebra/BigOperators/Group/Multiset/Basic.lean

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -227,4 +227,8 @@ theorem sum_map_tsub [AddCommMonoid M] [PartialOrder M] [ExistsAddOfLE M]
227227

228228
end OrderedSub
229229

230+
instance {M : Type*} : IsAddTorsionFree (Multiset M) :=
231+
fun n hn x y h ↦ open Classical in Multiset.ext' fun _ ↦
232+
(Nat.mul_right_inj hn).mp <| by simp only [← Multiset.count_nsmul, h]⟩
233+
230234
end Multiset

Mathlib/Algebra/Group/Torsion.lean

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,10 @@ lemma pow_left_injective (hn : n ≠ 0) : Injective fun a : M ↦ a ^ n :=
3535
@[to_additive nsmul_right_inj]
3636
lemma pow_left_inj (hn : n ≠ 0) : a ^ n = b ^ n ↔ a = b := (pow_left_injective hn).eq_iff
3737

38+
@[to_additive]
39+
lemma IsMulTorsionFree.pow_eq_one_iff (hn : n ≠ 0) : a ^ n = 1 ↔ a = 1 :=
40+
fun h ↦ by rwa [← pow_left_inj hn, one_pow], fun h ↦ by rw [h, one_pow]⟩
41+
3842
end Monoid
3943

4044
section Group

Mathlib/Algebra/GroupWithZero/Associated.lean

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,9 @@ end Associated
7272

7373
attribute [local instance] Associated.setoid
7474

75+
theorem Associated.of_eq [Monoid M] {a b : M} (h : a = b) : a ~ᵤ b :=
76+
1, by rwa [Units.val_one, mul_one]⟩
77+
7578
theorem unit_associated_one [Monoid M] {u : Mˣ} : (u : M) ~ᵤ 1 :=
7679
⟨u⁻¹, Units.mul_inv u⟩
7780

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
/-
2+
Copyright (c) 2025 Xavier Roblot. All rights reserved.
3+
Released under Apache 2.0 license as described in the file LICENSE.
4+
Authors: Kenny Lau, Xavier Roblot
5+
-/
6+
import Mathlib.Algebra.Regular.Basic
7+
import Mathlib.RingTheory.UniqueFactorizationDomain.NormalizedFactors
8+
9+
/-!
10+
# Torsion-free monoids with zero
11+
12+
We prove that if `M` is an `UniqueFactorizationMonoid` that can be equipped with a
13+
`NormalizationMonoid` structure and such that `Mˣ` is torsion-free, then `M` is torsion-free.
14+
15+
Note. You need to import this file to get that the monoid of ideals of a Dedekind domain is
16+
torsion-free.
17+
-/
18+
19+
variable {M : Type*} [CancelCommMonoidWithZero M]
20+
21+
theorem IsMulTorsionFree.mk' (ih : ∀ x ≠ 0, ∀ y ≠ 0, ∀ n ≠ 0, (x ^ n : M) = y ^ n → x = y) :
22+
IsMulTorsionFree M := by
23+
refine ⟨fun n hn x y hxy ↦ ?_⟩
24+
by_cases h : x ≠ 0 ∧ y ≠ 0
25+
· exact ih x h.1 y h.2 n hn hxy
26+
grind [pow_eq_zero, zero_pow]
27+
28+
variable [UniqueFactorizationMonoid M] [NormalizationMonoid M] [IsMulTorsionFree Mˣ]
29+
30+
namespace UniqueFactorizationMonoid
31+
32+
instance : IsMulTorsionFree M := by
33+
refine .mk' fun x hx y hy n hn hxy ↦ ?_
34+
obtain ⟨u, hu⟩ : Associated x y := by
35+
have := (Associated.of_eq hxy).normalizedFactors_eq
36+
rwa [normalizedFactors_pow, normalizedFactors_pow, nsmul_right_inj hn,
37+
← associated_iff_normalizedFactors_eq_normalizedFactors hx hy] at this
38+
replace hx : IsLeftRegular (x ^ n) := (IsLeftCancelMulZero.mul_left_cancel_of_ne_zero hx).pow n
39+
rw [← hu, mul_pow, eq_comm, IsLeftRegular.mul_left_eq_self_iff hx, ← Units.val_pow_eq_pow_val,
40+
Units.val_eq_one, IsMulTorsionFree.pow_eq_one_iff hn] at hxy
41+
rwa [hxy, Units.val_one, mul_one] at hu
42+
43+
end UniqueFactorizationMonoid

Mathlib/Algebra/Regular/Basic.lean

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -209,4 +209,12 @@ lemma IsRightRegular.pow_iff (n0 : 0 < n) : IsRightRegular (a ^ n) ↔ IsRightRe
209209
mp h := ⟨(IsLeftRegular.pow_iff n0).mp h.left, (IsRightRegular.pow_iff n0).mp h.right⟩
210210
mpr h := ⟨.pow n h.left, .pow n h.right⟩
211211

212+
@[to_additive (attr := simp)] lemma IsLeftRegular.mul_left_eq_self_iff (ha : IsLeftRegular a) :
213+
a * b = a ↔ b = 1 :=
214+
fun h ↦ by rwa [← ha.eq_iff, mul_one], fun h ↦ by rw [h, mul_one]⟩
215+
216+
@[to_additive (attr := simp)] lemma IsRightRegular.mul_right_eq_self_iff (ha : IsRightRegular a) :
217+
b * a = a ↔ b = 1 :=
218+
fun h ↦ by rwa [← ha.eq_iff, one_mul], fun h ↦ by rw [h, one_mul]⟩
219+
212220
end Monoid

Mathlib/RingTheory/IntegralClosure/IntegrallyClosed.lean

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -258,6 +258,12 @@ theorem pow_dvd_pow_iff [IsDomain R] [IsIntegrallyClosed R]
258258
refine ⟨k, IsFractionRing.injective R K ?_⟩
259259
rw [map_mul, hk, mul_div_cancel₀ _ ha]
260260

261+
@[simp]
262+
theorem _root_.Associated.pow_iff [IsDomain R] [IsIntegrallyClosed R] {n : ℕ} (hn : n ≠ 0)
263+
{a b : R} :
264+
Associated (a ^ n) (b ^ n) ↔ Associated a b := by
265+
simp_rw [← dvd_dvd_iff_associated, pow_dvd_pow_iff hn]
266+
261267
variable (R)
262268

263269
/-- This is almost a duplicate of `IsIntegrallyClosedIn.integralClosure_eq_bot`,

0 commit comments

Comments
 (0)