# Documentation

Mathlib.RingTheory.PrincipalIdealDomain

# Principal ideal rings and principal ideal domains #

A principal ideal ring (PIR) is a ring in which all left ideals are principal. A principal ideal domain (PID) is an integral domain which is a principal ideal ring.

# Main definitions #

Note that for principal ideal domains, one should use [IsDomain R] [IsPrincipalIdealRing R]. There is no explicit definition of a PID. Theorems about PID's are in the principal_ideal_ring namespace.

• IsPrincipalIdealRing: a predicate on rings, saying that every 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

# Main results #

• to_maximal_ideal: a non-zero prime ideal in a PID is maximal.
• EuclideanDomain.to_principal_ideal_domain : a Euclidean domain is a PID.
theorem Submodule.IsPrincipal_iff {R : Type u} {M : Type v} [Ring R] [] [Module R M] (S : ) :
a, S = Submodule.span R {a}
class Submodule.IsPrincipal {R : Type u} {M : Type v} [Ring R] [] [Module R M] (S : ) :

An R-submodule of M is principal if it is generated by one element.

Instances
theorem Submodule.IsPrincipal.principal {R : Type u} {M : Type v} [Ring R] [] [Module R M] (S : ) :
a, S = Submodule.span R {a}
instance bot_isPrincipal {R : Type u} {M : Type v} [Ring R] [] [Module R M] :
instance top_isPrincipal {R : Type u} [Ring R] :
theorem isPrincipalIdealRing_iff (R : Type u) [Ring R] :
∀ (S : ),
class IsPrincipalIdealRing (R : Type u) [Ring R] :
• principal : ∀ (S : ),

A ring is a principal ideal ring if all (left) ideals are principal.

Instances
noncomputable def Submodule.IsPrincipal.generator {R : Type u} {M : Type v} [] [Ring R] [Module R M] (S : ) :
M

generator I, if I is a principal submodule, is an x ∈ M such that span R {x} = I

Instances For
theorem Submodule.IsPrincipal.span_singleton_generator {R : Type u} {M : Type v} [] [Ring R] [Module R M] (S : ) :
theorem Ideal.span_singleton_generator {R : Type u} [Ring R] (I : ) :
@[simp]
theorem Submodule.IsPrincipal.generator_mem {R : Type u} {M : Type v} [] [Ring R] [Module R M] (S : ) :
theorem Submodule.IsPrincipal.mem_iff_eq_smul_generator {R : Type u} {M : Type v} [] [Ring R] [Module R M] (S : ) {x : M} :
x S s,
theorem Submodule.IsPrincipal.eq_bot_iff_generator_eq_zero {R : Type u} {M : Type v} [] [Ring R] [Module R M] (S : ) :
theorem Submodule.IsPrincipal.mem_iff_generator_dvd {R : Type u} [] (S : ) {x : R} :
x S
theorem Submodule.IsPrincipal.prime_generator_of_isPrime {R : Type u} [] (S : ) [is_prime : ] (ne_bot : S ) :
theorem Submodule.IsPrincipal.generator_map_dvd_of_mem {R : Type u} {M : Type v} [] [] [Module R M] {N : } (ϕ : M →ₗ[R] R) [] {x : M} (hx : x N) :
theorem Submodule.IsPrincipal.generator_submoduleImage_dvd_of_mem {R : Type u} {M : Type v} [] [] [Module R M] {N : } {O : } (hNO : N O) (ϕ : { x // x O } →ₗ[R] R) {x : M} (hx : x N) :
ϕ { val := x, property := hNO x hx }
theorem IsPrime.to_maximal_ideal {R : Type u} [] [] {S : } [hpi : ] (hS : S ) :
theorem mod_mem_iff {R : Type u} [] {S : } {x : R} {y : R} (hy : y S) :
x % y S x S
theorem IsField.isPrincipalIdealRing {R : Type u_1} [] (h : ) :
noncomputable def PrincipalIdealRing.factors {R : Type u} [] [] (a : R) :

factors a is a multiset of irreducible elements whose product is a, up to units

Instances For
theorem PrincipalIdealRing.factors_spec {R : Type u} [] [] (a : R) (h : a 0) :
(∀ (b : R), )
theorem PrincipalIdealRing.ne_zero_of_mem_factors {R : Type v} [] [] {a : R} {b : R} (ha : a 0) (hb : ) :
b 0
theorem PrincipalIdealRing.mem_submonoid_of_factors_subset_of_units_subset {R : Type u} [] [] (s : ) {a : R} (ha : a 0) (hfac : ∀ (b : R), b s) (hunit : ∀ (c : Rˣ), c s) :
a s
theorem PrincipalIdealRing.ringHom_mem_submonoid_of_factors_subset_of_units_subset {R : Type u_1} {S : Type u_2} [] [] [] (f : R →+* S) (s : ) (a : R) (ha : a 0) (h : ∀ (b : R), f b s) (hf : ∀ (c : Rˣ), f c s) :
f a s

If a RingHom maps all units and all factors of an element a into a submonoid s, then it also maps a into that submonoid.

A principal ideal domain has unique factorization

theorem Submodule.IsPrincipal.of_comap {R : Type u} {M : Type v} {N : Type u_2} [Ring R] [] [] [Module R M] [Module R N] (f : M →ₗ[R] N) (hf : ) (S : ) [hI : ] :
theorem Ideal.IsPrincipal.of_comap {R : Type u} {S : Type u_1} [Ring R] [Ring S] (f : R →+* S) (hf : ) (I : ) [hI : ] :
theorem IsPrincipalIdealRing.of_surjective {R : Type u} {S : Type u_1} [Ring R] [Ring S] (f : R →+* S) (hf : ) :

The surjective image of a principal ideal ring is again a principal ideal ring.

theorem span_gcd {R : Type u} [] [] [] (x : R) (y : R) :
Ideal.span {gcd x y} = Ideal.span {x, y}
theorem gcd_dvd_iff_exists {R : Type u} [] [] [] (a : R) (b : R) {z : R} :
gcd a b z x y, z = a * x + b * y
theorem exists_gcd_eq_mul_add_mul {R : Type u} [] [] [] (a : R) (b : R) :
x y, gcd a b = a * x + b * y

Bézout's lemma

theorem gcd_isUnit_iff {R : Type u} [] [] [] (x : R) (y : R) :
IsUnit (gcd x y)
theorem isCoprime_of_dvd {R : Type u} [] [] [] (x : R) (y : R) (nonzero : ¬(x = 0 y = 0)) (H : ∀ (z : R), z z 0z x¬z y) :
theorem dvd_or_coprime {R : Type u} [] [] [] (x : R) (y : R) (h : ) :
x y
theorem isCoprime_of_irreducible_dvd {R : Type u} [] [] [] {x : R} {y : R} (nonzero : ¬(x = 0 y = 0)) (H : ∀ (z : R), z x¬z y) :
theorem isCoprime_of_prime_dvd {R : Type u} [] [] [] {x : R} {y : R} (nonzero : ¬(x = 0 y = 0)) (H : ∀ (z : R), z x¬z y) :
theorem Irreducible.coprime_iff_not_dvd {R : Type u} [] [] [] {p : R} {n : R} (pp : ) :
¬p n
theorem Prime.coprime_iff_not_dvd {R : Type u} [] [] [] {p : R} {n : R} (pp : ) :
¬p n
theorem Irreducible.dvd_iff_not_coprime {R : Type u} [] [] [] {p : R} {n : R} (hp : ) :
p n ¬
theorem Irreducible.coprime_pow_of_not_dvd {R : Type u} [] [] [] {p : R} {a : R} (m : ) (hp : ) (h : ¬p a) :
IsCoprime a (p ^ m)
theorem Irreducible.coprime_or_dvd {R : Type u} [] [] [] {p : R} (hp : ) (i : R) :
p i
theorem exists_associated_pow_of_mul_eq_pow' {R : Type u} [] [] [] {a : R} {b : R} {c : R} (hab : ) {k : } (h : a * b = c ^ k) :
d, Associated (d ^ k) a
def nonPrincipals (R : Type u) [] :
Set ()

nonPrincipals R is the set of all ideals of R that are not principal ideals.

Instances For
theorem nonPrincipals_def (R : Type u) [] {I : } :
theorem nonPrincipals_zorn {R : Type u} [] (c : Set ()) (hs : ) (hchain : IsChain (fun x x_1 => x x_1) c) {K : } (hKmem : K c) :
I, ∀ (J : ), J cJ I

Any chain in the set of non-principal ideals has an upper bound which is non-principal. (Namely, the union of the chain is such an upper bound.)

theorem IsPrincipalIdealRing.of_prime {R : Type u} [] (H : ∀ (P : ), ) :

If all prime ideals in a commutative ring are principal, so are all other ideals.