Skip to content

Commit

Permalink
chore(RingTheory/PrincipalIdealDomain): PID implies Noetherian (#18382)
Browse files Browse the repository at this point in the history
Also, generalize `IsPrincipal.generator` to `Semiring R` and `AddCommMonoid M`




Co-authored-by: Yakov Pechersky <[email protected]>
  • Loading branch information
pechersky and pechersky committed Oct 30, 2024
1 parent e15c6eb commit 72cd706
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 18 deletions.
2 changes: 1 addition & 1 deletion Mathlib/RingTheory/Bezout.lean
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ theorem TFAE [IsBezout R] [IsDomain R] :
[IsNoetherianRing R, IsPrincipalIdealRing R, UniqueFactorizationMonoid R, WfDvdMonoid R] := by
classical
tfae_have 12
| H => fun I => isPrincipal_of_FG _ (IsNoetherian.noetherian _)⟩
| _ => inferInstance
tfae_have 23
| _ => inferInstance
tfae_have 34
Expand Down
4 changes: 3 additions & 1 deletion Mathlib/RingTheory/LocalRing/Quotient.lean
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ Authors: Andrew Yang, Riccardo Brasca
import Mathlib.LinearAlgebra.Dimension.DivisionRing
import Mathlib.LinearAlgebra.FreeModule.PID
import Mathlib.LinearAlgebra.FreeModule.StrongRankCondition
import Mathlib.RingTheory.DiscreteValuationRing.TFAE
import Mathlib.RingTheory.Ideal.Over
import Mathlib.RingTheory.Nakayama
import Mathlib.RingTheory.Valuation.ValuationRing

/-!
Expand Down
34 changes: 19 additions & 15 deletions Mathlib/RingTheory/PrincipalIdealDomain.lean
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Theorems about PID's are in the `principal_ideal_ring` namespace.
- `IsPrincipalIdealRing`: a predicate on rings, saying that every left ideal is principal.
- `IsBezout`: the predicate saying that every finitely generated left ideal is principal.
- `generator`: a generator of a principal ideal (or more generally submodule)
- `to_unique_factorization_monoid`: a PID is a unique factorization domain
- `to_uniqueFactorizationMonoid`: a PID is a unique factorization domain
# Main results
Expand All @@ -43,7 +43,7 @@ open Submodule

section

variable [Ring R] [AddCommGroup M] [Module R M]
variable [Semiring R] [AddCommGroup M] [Module R M]

instance bot_isPrincipal : (⊥ : Submodule R M).IsPrincipal :=
⟨⟨0, by simp⟩⟩
Expand Down Expand Up @@ -72,11 +72,11 @@ end

namespace Submodule.IsPrincipal

variable [AddCommGroup M]
variable [AddCommMonoid M]

section Ring
section Semiring

variable [Ring R] [Module R M]
variable [Semiring R] [Module R M]

/-- `generator I`, if `I` is a principal submodule, is an `x ∈ M` such that `span R {x} = I` -/
noncomputable def generator (S : Submodule R M) [S.IsPrincipal] : M :=
Expand All @@ -103,7 +103,20 @@ theorem mem_iff_eq_smul_generator (S : Submodule R M) [S.IsPrincipal] {x : M} :
theorem eq_bot_iff_generator_eq_zero (S : Submodule R M) [S.IsPrincipal] :
S = ⊥ ↔ generator S = 0 := by rw [← @span_singleton_eq_bot R M, span_singleton_generator]

end Ring
protected lemma fg {S : Submodule R M} (h : S.IsPrincipal) : S.FG :=
⟨{h.generator}, by simp only [Finset.coe_singleton, span_singleton_generator]⟩

-- See note [lower instance priority]
instance (priority := 100) _root_.PrincipalIdealRing.isNoetherianRing [IsPrincipalIdealRing R] :
IsNoetherianRing R where
noetherian S := (IsPrincipalIdealRing.principal S).fg

-- See note [lower instance priority]
instance (priority := 100) _root_.IsPrincipalIdealRing.of_isNoetherianRing_of_isBezout
[IsNoetherianRing R] [IsBezout R] : IsPrincipalIdealRing R where
principal S := IsBezout.isPrincipal_of_FG S (IsNoetherian.noetherian S)

end Semiring

section CommRing

Expand Down Expand Up @@ -278,15 +291,6 @@ namespace PrincipalIdealRing

open IsPrincipalIdealRing

-- see Note [lower instance priority]
instance (priority := 100) isNoetherianRing [Ring R] [IsPrincipalIdealRing R] :
IsNoetherianRing R :=
isNoetherianRing_iff.2
fun s : Ideal R => by
rcases (IsPrincipalIdealRing.principal s).principal with ⟨a, rfl⟩
rw [← Finset.coe_singleton]
exact ⟨{a}, SetLike.coe_injective rfl⟩⟩

theorem isMaximal_of_irreducible [CommRing R] [IsPrincipalIdealRing R] {p : R}
(hp : Irreducible p) : Ideal.IsMaximal (span R ({p} : Set R)) :=
⟨⟨mt Ideal.span_singleton_eq_top.1 hp.1, fun I hI => by
Expand Down
1 change: 0 additions & 1 deletion Mathlib/RingTheory/UniqueFactorizationDomain.lean
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,6 @@ class UniqueFactorizationMonoid (α : Type*) [CancelCommMonoidWithZero α] exten
IsWellFounded α DvdNotUnit : Prop where
protected irreducible_iff_prime : ∀ {a : α}, Irreducible a ↔ Prime a

/-- Can't be an instance because it would cause a loop `ufm → WfDvdMonoid → ufm → ...`. -/
instance (priority := 100) ufm_of_decomposition_of_wfDvdMonoid
[CancelCommMonoidWithZero α] [WfDvdMonoid α] [DecompositionMonoid α] :
UniqueFactorizationMonoid α :=
Expand Down

0 comments on commit 72cd706

Please sign in to comment.