|
| 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 |
0 commit comments