File: Mathlib/RingTheory/PrincipalIdealDomain.lean

full_name: bot_isPrincipal
code: instance bot_isPrincipal : (⊥ : Submodule R M).IsPrincipal 
goal: ⊥.IsPrincipal

full_name: top_isPrincipal
code: instance top_isPrincipal : (⊤ : Submodule R R).IsPrincipal 
goal: ⊤.IsPrincipal

full_name: IsBezout.isPrincipal_of_FG
code: /-- A Bézout ring is a ring whose finitely generated ideals are principal. -/
class IsBezout : Prop where
  /-- Any finitely generated ideal is principal. -/
  isPrincipal_of_FG : ∀ I : Ideal R, I.FG → I.IsPrincipal
goal: I.FG → Submodule.IsPrincipal I

full_name: IsBezout
code: /-- A Bézout ring is a ring whose finitely generated ideals are principal. -/
class IsBezout : Prop where
  /-- Any finitely generated ideal is principal. -/
  isPrincipal_of_FG : ∀ I : Ideal R, I.FG → I.IsPrincipal
goal: Prop

full_name: IsBezout.of_isPrincipalIdealRing
code: instance (priority := 100) IsBezout.of_isPrincipalIdealRing [IsPrincipalIdealRing R] : IsBezout R 
goal: IsBezout R

full_name: DivisionRing.isPrincipalIdealRing
code: instance (priority := 100) DivisionRing.isPrincipalIdealRing (K : Type u) [DivisionRing K] :
    IsPrincipalIdealRing K 
goal: IsPrincipalIdealRing K

full_name: Submodule.IsPrincipal.generator
code: /-- `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 
goal: M

full_name: Submodule.IsPrincipal.span_singleton_generator
code: theorem span_singleton_generator (S : Submodule R M) [S.IsPrincipal] : span R {generator S} = S 
goal: Submodule.span R {Submodule.IsPrincipal.generator S} = S

full_name: Ideal.span_singleton_generator
code: @[simp]
theorem _root_.Ideal.span_singleton_generator (I : Ideal R) [I.IsPrincipal] :
    Ideal.span ({generator I} : Set R) = I 
goal: Ideal.span {Submodule.IsPrincipal.generator I} = I

full_name: Submodule.IsPrincipal.generator_mem
code: @[simp]
theorem generator_mem (S : Submodule R M) [S.IsPrincipal] : generator S ∈ S 
goal: Submodule.IsPrincipal.generator S ∈ S

full_name: Submodule.IsPrincipal.mem_iff_eq_smul_generator
code: theorem mem_iff_eq_smul_generator (S : Submodule R M) [S.IsPrincipal] {x : M} :
    x ∈ S ↔ ∃ s : R, x = s • generator S 
goal: x ∈ S ↔ ∃ s, x = s • Submodule.IsPrincipal.generator S

full_name: Submodule.IsPrincipal.eq_bot_iff_generator_eq_zero
code: theorem eq_bot_iff_generator_eq_zero (S : Submodule R M) [S.IsPrincipal] :
    S = ⊥ ↔ generator S = 0 
goal: S = ⊥ ↔ Submodule.IsPrincipal.generator S = 0

full_name: Submodule.IsPrincipal.associated_generator_span_self
code: theorem associated_generator_span_self [IsPrincipalIdealRing R] [IsDomain R] (r : R) :
    Associated (generator <| Ideal.span {r}) r 
goal: Associated (Submodule.IsPrincipal.generator (Ideal.span {r})) r

full_name: Submodule.IsPrincipal.mem_iff_generator_dvd
code: theorem mem_iff_generator_dvd (S : Ideal R) [S.IsPrincipal] {x : R} : x ∈ S ↔ generator S ∣ x 
goal: x ∈ S ↔ Submodule.IsPrincipal.generator S ∣ x

full_name: Submodule.IsPrincipal.prime_generator_of_isPrime
code: theorem prime_generator_of_isPrime (S : Ideal R) [S.IsPrincipal] [is_prime : S.IsPrime]
    (ne_bot : S ≠ ⊥) : Prime (generator S) 
goal: Prime (Submodule.IsPrincipal.generator S)

full_name: Submodule.IsPrincipal.generator_map_dvd_of_mem
code: theorem generator_map_dvd_of_mem {N : Submodule R M} (ϕ : M →ₗ[R] R) [(N.map ϕ).IsPrincipal] {x : M}
    (hx : x ∈ N) : generator (N.map ϕ) ∣ ϕ x 
goal: Submodule.IsPrincipal.generator (Submodule.map ϕ N) ∣ ϕ x

full_name: Submodule.IsPrincipal.generator_submoduleImage_dvd_of_mem
code: theorem generator_submoduleImage_dvd_of_mem {N O : Submodule R M} (hNO : N ≤ O) (ϕ : O →ₗ[R] R)
    [(ϕ.submoduleImage N).IsPrincipal] {x : M} (hx : x ∈ N) :
    generator (ϕ.submoduleImage N) ∣ ϕ ⟨x, hNO hx⟩ 
goal: Submodule.IsPrincipal.generator (ϕ.submoduleImage N) ∣ ϕ ⟨x, ⋯⟩

full_name: IsBezout.span_pair_isPrincipal
code: instance span_pair_isPrincipal [IsBezout R] (x y : R) : (Ideal.span {x, y}).IsPrincipal 
goal: Submodule.IsPrincipal (Ideal.span {x, y})

full_name: IsBezout.gcd
code: /-- A choice of gcd of two elements in a Bézout domain.

Note that the choice is usually not unique. -/
noncomputable def gcd : R 
goal: R

full_name: IsBezout.span_gcd
code: theorem span_gcd : Ideal.span {gcd x y} = Ideal.span {x, y} 
goal: Ideal.span {IsBezout.gcd x y} = Ideal.span {x, y}

full_name: IsBezout.gcd_dvd_left
code: theorem gcd_dvd_left : gcd x y ∣ x 
goal: IsBezout.gcd x y ∣ x

full_name: IsBezout.gcd_dvd_right
code: theorem gcd_dvd_right : gcd x y ∣ y 
goal: IsBezout.gcd x y ∣ y

full_name: IsBezout.dvd_gcd
code: theorem dvd_gcd (hx : z ∣ x) (hy : z ∣ y) : z ∣ gcd x y 
goal: z ∣ IsBezout.gcd x y

full_name: IsBezout.gcd_eq_sum
code: theorem gcd_eq_sum : ∃ a b : R, a * x + b * y = gcd x y 
goal: ∃ a b, a * x + b * y = IsBezout.gcd x y

full_name: IsRelPrime.isCoprime
code: theorem _root_.IsRelPrime.isCoprime (h : IsRelPrime x y) : IsCoprime x y 
goal: IsCoprime x y

full_name: isRelPrime_iff_isCoprime
code: theorem _root_.isRelPrime_iff_isCoprime : IsRelPrime x y ↔ IsCoprime x y 
goal: IsRelPrime x y ↔ IsCoprime x y

full_name: IsBezout.toGCDDomain
code: /-- Any Bézout domain is a GCD domain. This is not an instance since `GCDMonoid` contains data,
and this might not be how we would like to construct it. -/
noncomputable def toGCDDomain [IsBezout R] [IsDomain R] [DecidableEq R] : GCDMonoid R 
goal: GCDMonoid R

full_name: IsBezout.nonemptyGCDMonoid
code: instance nonemptyGCDMonoid [IsBezout R] [IsDomain R] : Nonempty (GCDMonoid R) 
goal: Nonempty (GCDMonoid R)

full_name: IsBezout.associated_gcd_gcd
code: theorem associated_gcd_gcd [IsDomain R] [GCDMonoid R] :
    Associated (IsBezout.gcd x y) (GCDMonoid.gcd x y) 
goal: Associated (IsBezout.gcd x y) (gcd x y)

full_name: IsPrime.to_maximal_ideal
code: theorem to_maximal_ideal [CommRing R] [IsDomain R] [IsPrincipalIdealRing R] {S : Ideal R}
    [hpi : IsPrime S] (hS : S ≠ ⊥) : IsMaximal S 
goal: S.IsMaximal

full_name: mod_mem_iff
code: theorem mod_mem_iff {S : Ideal R} {x y : R} (hy : y ∈ S) : x % y ∈ S ↔ x ∈ S 
goal: x % y ∈ S ↔ x ∈ S

full_name: EuclideanDomain.to_principal_ideal_domain
code: instance (priority := 100) EuclideanDomain.to_principal_ideal_domain : IsPrincipalIdealRing R 
goal: IsPrincipalIdealRing R

full_name: IsField.isPrincipalIdealRing
code: theorem IsField.isPrincipalIdealRing {R : Type*} [CommRing R] (h : IsField R) :
    IsPrincipalIdealRing R 
goal: IsPrincipalIdealRing R

full_name: PrincipalIdealRing.isNoetherianRing
code: instance (priority := 100) isNoetherianRing [Ring R] [IsPrincipalIdealRing R] :
    IsNoetherianRing R 
goal: IsNoetherianRing R

full_name: PrincipalIdealRing.isMaximal_of_irreducible
code: theorem isMaximal_of_irreducible [CommRing R] [IsPrincipalIdealRing R] {p : R}
    (hp : Irreducible p) : Ideal.IsMaximal (span R ({p} : Set R)) 
goal: Ideal.IsMaximal (Submodule.span R {p})

full_name: PrincipalIdealRing.factors
code: /-- `factors a` is a multiset of irreducible elements whose product is `a`, up to units -/
noncomputable def factors (a : R) : Multiset R 
goal: Multiset R

full_name: PrincipalIdealRing.factors_spec
code: theorem factors_spec (a : R) (h : a ≠ 0) :
    (∀ b ∈ factors a, Irreducible b) ∧ Associated (factors a).prod a 
goal: (∀ b ∈ PrincipalIdealRing.factors a, Irreducible b) ∧ Associated (PrincipalIdealRing.factors a).prod a

full_name: PrincipalIdealRing.ne_zero_of_mem_factors
code: theorem ne_zero_of_mem_factors {R : Type v} [CommRing R] [IsDomain R] [IsPrincipalIdealRing R]
    {a b : R} (ha : a ≠ 0) (hb : b ∈ factors a) : b ≠ 0 
goal: b ≠ 0

full_name: PrincipalIdealRing.mem_submonoid_of_factors_subset_of_units_subset
code: theorem mem_submonoid_of_factors_subset_of_units_subset (s : Submonoid R) {a : R} (ha : a ≠ 0)
    (hfac : ∀ b ∈ factors a, b ∈ s) (hunit : ∀ c : Rˣ, (c : R) ∈ s) : a ∈ s 
goal: a ∈ s

full_name: PrincipalIdealRing.ringHom_mem_submonoid_of_factors_subset_of_units_subset
code: /-- 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. -/
theorem ringHom_mem_submonoid_of_factors_subset_of_units_subset {R S : Type*} [CommRing R]
    [IsDomain R] [IsPrincipalIdealRing R] [Semiring S] (f : R →+* S) (s : Submonoid S) (a : R)
    (ha : a ≠ 0) (h : ∀ b ∈ factors a, f b ∈ s) (hf : ∀ c : Rˣ, f c ∈ s) : f a ∈ s 
goal: f a ∈ s

full_name: PrincipalIdealRing.to_uniqueFactorizationMonoid
code: /-- A principal ideal domain has unique factorization -/
instance (priority := 100) to_uniqueFactorizationMonoid : UniqueFactorizationMonoid R 
goal: UniqueFactorizationMonoid R

full_name: Submodule.IsPrincipal.of_comap
code: theorem Submodule.IsPrincipal.of_comap (f : M →ₗ[R] N) (hf : Function.Surjective f)
    (S : Submodule R N) [hI : IsPrincipal (S.comap f)] : IsPrincipal S 
goal: S.IsPrincipal

full_name: Ideal.IsPrincipal.of_comap
code: theorem Ideal.IsPrincipal.of_comap (f : R →+* S) (hf : Function.Surjective f) (I : Ideal S)
    [hI : IsPrincipal (I.comap f)] : IsPrincipal I 
goal: Submodule.IsPrincipal I

full_name: IsPrincipalIdealRing.of_surjective
code: /-- The surjective image of a principal ideal ring is again a principal ideal ring. -/
theorem IsPrincipalIdealRing.of_surjective [IsPrincipalIdealRing R] (f : R →+* S)
    (hf : Function.Surjective f) : IsPrincipalIdealRing S 
goal: IsPrincipalIdealRing S

full_name: IsBezout.span_gcd_eq_span_gcd
code: theorem IsBezout.span_gcd_eq_span_gcd (x y : R) :
    span {GCDMonoid.gcd x y} = span {IsBezout.gcd x y} 
goal: Ideal.span {gcd x y} = Ideal.span {IsBezout.gcd x y}

full_name: span_gcd
code: theorem span_gcd (x y : R) : span {gcd x y} = span {x, y} 
goal: Ideal.span {gcd x y} = Ideal.span {x, y}

full_name: gcd_dvd_iff_exists
code: theorem gcd_dvd_iff_exists (a b : R) {z} : gcd a b ∣ z ↔ ∃ x y, z = a * x + b * y 
goal: gcd a b ∣ z ↔ ∃ x y, z = a * x + b * y

full_name: exists_gcd_eq_mul_add_mul
code: /-- **Bézout's lemma** -/
theorem exists_gcd_eq_mul_add_mul (a b : R) : ∃ x y, gcd a b = a * x + b * y 
goal: ∃ x y, gcd a b = a * x + b * y

full_name: gcd_isUnit_iff
code: theorem gcd_isUnit_iff (x y : R) : IsUnit (gcd x y) ↔ IsCoprime x y 
goal: IsUnit (gcd x y) ↔ IsCoprime x y

full_name: isCoprime_of_dvd
code: theorem isCoprime_of_dvd (x y : R) (nonzero : ¬(x = 0 ∧ y = 0))
    (H : ∀ z ∈ nonunits R, z ≠ 0 → z ∣ x → ¬z ∣ y) : IsCoprime x y 
goal: IsCoprime x y

full_name: dvd_or_coprime
code: theorem dvd_or_coprime (x y : R) (h : Irreducible x) : x ∣ y ∨ IsCoprime x y 
goal: x ∣ y ∨ IsCoprime x y

full_name: Irreducible.coprime_iff_not_dvd
code: /-- See also `Irreducible.isRelPrime_iff_not_dvd`. -/
theorem Irreducible.coprime_iff_not_dvd {p n : R} (hp : Irreducible p) :
    IsCoprime p n ↔ ¬p ∣ n 
goal: IsCoprime p n ↔ ¬p ∣ n

full_name: Prime.coprime_iff_not_dvd
code: theorem Prime.coprime_iff_not_dvd {p n : R} (hp : Prime p) : IsCoprime p n ↔ ¬p ∣ n 
goal: IsCoprime p n ↔ ¬p ∣ n

full_name: Irreducible.dvd_iff_not_coprime
code: /-- See also `Irreducible.coprime_iff_not_dvd'`. -/
theorem Irreducible.dvd_iff_not_coprime {p n : R} (hp : Irreducible p) : p ∣ n ↔ ¬IsCoprime p n 
goal: p ∣ n ↔ ¬IsCoprime p n

full_name: Irreducible.coprime_pow_of_not_dvd
code: theorem Irreducible.coprime_pow_of_not_dvd {p a : R} (m : ℕ) (hp : Irreducible p) (h : ¬p ∣ a) :
    IsCoprime a (p ^ m) 
goal: IsCoprime a (p ^ m)

full_name: Irreducible.coprime_or_dvd
code: theorem Irreducible.coprime_or_dvd {p : R} (hp : Irreducible p) (i : R) : IsCoprime p i ∨ p ∣ i 
goal: IsCoprime p i ∨ p ∣ i

full_name: exists_associated_pow_of_mul_eq_pow'
code: theorem exists_associated_pow_of_mul_eq_pow' {a b c : R} (hab : IsCoprime a b) {k : ℕ}
    (h : a * b = c ^ k) : ∃ d : R, Associated (d ^ k) a 
goal: ∃ d, Associated (d ^ k) a

full_name: exists_associated_pow_of_associated_pow_mul
code: theorem exists_associated_pow_of_associated_pow_mul {a b c : R} (hab : IsCoprime a b) {k : ℕ}
    (h : Associated (c ^ k) (a * b)) : ∃ d : R, Associated (d ^ k) a 
goal: ∃ d, Associated (d ^ k) a

full_name: isCoprime_of_irreducible_dvd
code: theorem isCoprime_of_irreducible_dvd {x y : R} (nonzero : ¬(x = 0 ∧ y = 0))
    (H : ∀ z : R, Irreducible z → z ∣ x → ¬z ∣ y) : IsCoprime x y 
goal: IsCoprime x y

full_name: isCoprime_of_prime_dvd
code: theorem isCoprime_of_prime_dvd {x y : R} (nonzero : ¬(x = 0 ∧ y = 0))
    (H : ∀ z : R, Prime z → z ∣ x → ¬z ∣ y) : IsCoprime x y 
goal: IsCoprime x y

full_name: nonPrincipals
code: /-- `nonPrincipals R` is the set of all ideals of `R` that are not principal ideals. -/
def nonPrincipals 
goal: Set (Ideal R)

full_name: nonPrincipals_def
code: theorem nonPrincipals_def {I : Ideal R} : I ∈ nonPrincipals R ↔ ¬I.IsPrincipal 
goal: I ∈ nonPrincipals R ↔ ¬Submodule.IsPrincipal I

full_name: nonPrincipals_eq_empty_iff
code: theorem nonPrincipals_eq_empty_iff : nonPrincipals R = ∅ ↔ IsPrincipalIdealRing R 
goal: nonPrincipals R = ∅ ↔ IsPrincipalIdealRing R

full_name: nonPrincipals_zorn
code: /-- 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 nonPrincipals_zorn (c : Set (Ideal R)) (hs : c ⊆ nonPrincipals R)
    (hchain : IsChain (· ≤ ·) c) {K : Ideal R} (hKmem : K ∈ c) :
    ∃ I ∈ nonPrincipals R, ∀ J ∈ c, J ≤ I 
goal: ∃ I ∈ nonPrincipals R, ∀ J ∈ c, J ≤ I

full_name: IsPrincipalIdealRing.of_prime
code: /-- If all prime ideals in a commutative ring are principal, so are all other ideals. -/
theorem IsPrincipalIdealRing.of_prime (H : ∀ P : Ideal R, P.IsPrime → P.IsPrincipal) :
    IsPrincipalIdealRing R 
goal: IsPrincipalIdealRing R