File: Mathlib/RingTheory/Ideal/Basic.lean

full_name: Ideal
code: /-- A (left) ideal in a semiring `R` is an additive submonoid `s` such that
`a * b ∈ s` whenever `b ∈ s`. If `R` is a ring, then `s` is an additive subgroup.  -/
abbrev Ideal (R : Type u) [Semiring R] 
goal: Type u

full_name: IsPrincipalIdealRing
code: /-- A ring is a principal ideal ring if all (left) ideals are principal. -/
@[mk_iff]
class IsPrincipalIdealRing (R : Type u) [Semiring R] : Prop where
  principal : ∀ S : Ideal R, S.IsPrincipal
goal: Prop

full_name: IsPrincipalIdealRing.principal
code: /-- A ring is a principal ideal ring if all (left) ideals are principal. -/
@[mk_iff]
class IsPrincipalIdealRing (R : Type u) [Semiring R] : Prop where
  principal : ∀ S : Ideal R, S.IsPrincipal
goal: Submodule.IsPrincipal S

full_name: isPrincipalIdealRing_iff
code: /-- A ring is a principal ideal ring if all (left) ideals are principal. -/
@[mk_iff]
class IsPrincipalIdealRing (R : Type u) [Semiring R] : Prop where
  principal : ∀ S : Ideal R, S.IsPrincipal
goal: IsPrincipalIdealRing R ↔ ∀ (S : Ideal R), Submodule.IsPrincipal S

full_name: Ideal.zero_mem
code: protected theorem zero_mem : (0 : α) ∈ I 
goal: 0 ∈ I

full_name: Ideal.add_mem
code: protected theorem add_mem : a ∈ I → b ∈ I → a + b ∈ I 
goal: a ∈ I → b ∈ I → a + b ∈ I

full_name: Ideal.mul_mem_left
code: theorem mul_mem_left : b ∈ I → a * b ∈ I 
goal: b ∈ I → a * b ∈ I

full_name: Ideal.ext
code: @[ext]
theorem ext {I J : Ideal α} (h : ∀ x, x ∈ I ↔ x ∈ J) : I = J 
goal: I = J

full_name: Ideal.sum_mem
code: theorem sum_mem (I : Ideal α) {ι : Type*} {t : Finset ι} {f : ι → α} :
    (∀ c ∈ t, f c ∈ I) → (∑ i ∈ t, f i) ∈ I 
goal: (∀ c ∈ t, f c ∈ I) → ∑ i ∈ t, f i ∈ I

full_name: Ideal.eq_top_of_unit_mem
code: theorem eq_top_of_unit_mem (x y : α) (hx : x ∈ I) (h : y * x = 1) : I = ⊤ 
goal: I = ⊤

full_name: Ideal.eq_top_of_isUnit_mem
code: theorem eq_top_of_isUnit_mem {x} (hx : x ∈ I) (h : IsUnit x) : I = ⊤ 
goal: I = ⊤

full_name: Ideal.eq_top_iff_one
code: theorem eq_top_iff_one : I = ⊤ ↔ (1 : α) ∈ I 
goal: I = ⊤ ↔ 1 ∈ I

full_name: Ideal.ne_top_iff_one
code: theorem ne_top_iff_one : I ≠ ⊤ ↔ (1 : α) ∉ I 
goal: I ≠ ⊤ ↔ 1 ∉ I

full_name: Ideal.unit_mul_mem_iff_mem
code: @[simp]
theorem unit_mul_mem_iff_mem {x y : α} (hy : IsUnit y) : y * x ∈ I ↔ x ∈ I 
goal: y * x ∈ I ↔ x ∈ I

full_name: Ideal.span
code: /-- The ideal generated by a subset of a ring -/
def span (s : Set α) : Ideal α 
goal: Ideal α

full_name: Ideal.submodule_span_eq
code: @[simp]
theorem submodule_span_eq {s : Set α} : Submodule.span α s = Ideal.span s 
goal: Submodule.span α s = Ideal.span s

full_name: Ideal.span_empty
code: @[simp]
theorem span_empty : span (∅ : Set α) = ⊥ 
goal: Ideal.span ∅ = ⊥

full_name: Ideal.span_univ
code: @[simp]
theorem span_univ : span (Set.univ : Set α) = ⊤ 
goal: Ideal.span Set.univ = ⊤

full_name: Ideal.span_union
code: theorem span_union (s t : Set α) : span (s ∪ t) = span s ⊔ span t 
goal: Ideal.span (s ∪ t) = Ideal.span s ⊔ Ideal.span t

full_name: Ideal.span_iUnion
code: theorem span_iUnion {ι} (s : ι → Set α) : span (⋃ i, s i) = ⨆ i, span (s i) 
goal: Ideal.span (⋃ i, s i) = ⨆ i, Ideal.span (s i)

full_name: Ideal.mem_span
code: theorem mem_span {s : Set α} (x) : x ∈ span s ↔ ∀ p : Ideal α, s ⊆ p → x ∈ p 
goal: x ∈ Ideal.span s ↔ ∀ (p : Ideal α), s ⊆ ↑p → x ∈ p

full_name: Ideal.subset_span
code: theorem subset_span {s : Set α} : s ⊆ span s 
goal: s ⊆ ↑(Ideal.span s)

full_name: Ideal.span_le
code: theorem span_le {s : Set α} {I} : span s ≤ I ↔ s ⊆ I 
goal: Ideal.span s ≤ I ↔ s ⊆ ↑I

full_name: Ideal.span_mono
code: theorem span_mono {s t : Set α} : s ⊆ t → span s ≤ span t 
goal: s ⊆ t → Ideal.span s ≤ Ideal.span t

full_name: Ideal.span_eq
code: @[simp]
theorem span_eq : span (I : Set α) = I 
goal: Ideal.span ↑I = I

full_name: Ideal.span_singleton_one
code: @[simp]
theorem span_singleton_one : span ({1} : Set α) = ⊤ 
goal: Ideal.span {1} = ⊤

full_name: Ideal.isCompactElement_top
code: theorem isCompactElement_top : CompleteLattice.IsCompactElement (⊤ : Ideal α) 
goal: CompleteLattice.IsCompactElement ⊤

full_name: Ideal.mem_span_insert
code: theorem mem_span_insert {s : Set α} {x y} :
    x ∈ span (insert y s) ↔ ∃ a, ∃ z ∈ span s, x = a * y + z 
goal: x ∈ Ideal.span (insert y s) ↔ ∃ a, ∃ z ∈ Ideal.span s, x = a * y + z

full_name: Ideal.mem_span_singleton'
code: theorem mem_span_singleton' {x y : α} : x ∈ span ({y} : Set α) ↔ ∃ a, a * y = x 
goal: x ∈ Ideal.span {y} ↔ ∃ a, a * y = x

full_name: Ideal.span_singleton_le_iff_mem
code: theorem span_singleton_le_iff_mem {x : α} : span {x} ≤ I ↔ x ∈ I 
goal: Ideal.span {x} ≤ I ↔ x ∈ I

full_name: Ideal.span_singleton_mul_left_unit
code: theorem span_singleton_mul_left_unit {a : α} (h2 : IsUnit a) (x : α) :
    span ({a * x} : Set α) = span {x} 
goal: Ideal.span {a * x} = Ideal.span {x}

full_name: Ideal.span_insert
code: theorem span_insert (x) (s : Set α) : span (insert x s) = span ({x} : Set α) ⊔ span s 
goal: Ideal.span (insert x s) = Ideal.span {x} ⊔ Ideal.span s

full_name: Ideal.span_eq_bot
code: theorem span_eq_bot {s : Set α} : span s = ⊥ ↔ ∀ x ∈ s, (x : α) = 0 
goal: Ideal.span s = ⊥ ↔ ∀ x ∈ s, x = 0

full_name: Ideal.span_singleton_eq_bot
code: @[simp]
theorem span_singleton_eq_bot {x} : span ({x} : Set α) = ⊥ ↔ x = 0 
goal: Ideal.span {x} = ⊥ ↔ x = 0

full_name: Ideal.span_singleton_ne_top
code: theorem span_singleton_ne_top {α : Type*} [CommSemiring α] {x : α} (hx : ¬IsUnit x) :
    Ideal.span ({x} : Set α) ≠ ⊤ 
goal: Ideal.span {x} ≠ ⊤

full_name: Ideal.span_zero
code: @[simp]
theorem span_zero : span (0 : Set α) = ⊥ 
goal: Ideal.span 0 = ⊥

full_name: Ideal.span_one
code: @[simp]
theorem span_one : span (1 : Set α) = ⊤ 
goal: Ideal.span 1 = ⊤

full_name: Ideal.span_eq_top_iff_finite
code: theorem span_eq_top_iff_finite (s : Set α) :
    span s = ⊤ ↔ ∃ s' : Finset α, ↑s' ⊆ s ∧ span (s' : Set α) = ⊤ 
goal: Ideal.span s = ⊤ ↔ ∃ s', ↑s' ⊆ s ∧ Ideal.span ↑s' = ⊤

full_name: Ideal.mem_span_singleton_sup
code: theorem mem_span_singleton_sup {S : Type*} [CommSemiring S] {x y : S} {I : Ideal S} :
    x ∈ Ideal.span {y} ⊔ I ↔ ∃ a : S, ∃ b ∈ I, a * y + b = x 
goal: x ∈ Ideal.span {y} ⊔ I ↔ ∃ a, ∃ b ∈ I, a * y + b = x

full_name: Ideal.ofRel
code: /-- The ideal generated by an arbitrary binary relation.
-/
def ofRel (r : α → α → Prop) : Ideal α 
goal: Ideal α

full_name: Ideal.IsPrime.mem_or_mem'
code: /-- An ideal `P` of a ring `R` is prime if `P ≠ R` and `xy ∈ P → x ∈ P ∨ y ∈ P` -/
class IsPrime (I : Ideal α) : Prop where
  /-- The prime ideal is not the entire ring. -/
  ne_top' : I ≠ ⊤
  /-- If a product lies in the prime ideal, then at least one element lies in the prime ideal. -/
  mem_or_mem' : ∀ {x y : α}, x * y ∈ I → x ∈ I ∨ y ∈ I
goal: x * y ∈ I → x ∈ I ∨ y ∈ I

full_name: Ideal.IsPrime.ne_top'
code: /-- An ideal `P` of a ring `R` is prime if `P ≠ R` and `xy ∈ P → x ∈ P ∨ y ∈ P` -/
class IsPrime (I : Ideal α) : Prop where
  /-- The prime ideal is not the entire ring. -/
  ne_top' : I ≠ ⊤
  /-- If a product lies in the prime ideal, then at least one element lies in the prime ideal. -/
  mem_or_mem' : ∀ {x y : α}, x * y ∈ I → x ∈ I ∨ y ∈ I
goal: I ≠ ⊤

full_name: Ideal.IsPrime
code: /-- An ideal `P` of a ring `R` is prime if `P ≠ R` and `xy ∈ P → x ∈ P ∨ y ∈ P` -/
class IsPrime (I : Ideal α) : Prop where
  /-- The prime ideal is not the entire ring. -/
  ne_top' : I ≠ ⊤
  /-- If a product lies in the prime ideal, then at least one element lies in the prime ideal. -/
  mem_or_mem' : ∀ {x y : α}, x * y ∈ I → x ∈ I ∨ y ∈ I
goal: Prop

full_name: Ideal.isPrime_iff
code: theorem isPrime_iff {I : Ideal α} : IsPrime I ↔ I ≠ ⊤ ∧ ∀ {x y : α}, x * y ∈ I → x ∈ I ∨ y ∈ I 
goal: I.IsPrime ↔ I ≠ ⊤ ∧ ∀ {x y : α}, x * y ∈ I → x ∈ I ∨ y ∈ I

full_name: Ideal.IsPrime.ne_top
code: theorem IsPrime.ne_top {I : Ideal α} (hI : I.IsPrime) : I ≠ ⊤ 
goal: I ≠ ⊤

full_name: Ideal.IsPrime.mem_or_mem
code: theorem IsPrime.mem_or_mem {I : Ideal α} (hI : I.IsPrime) {x y : α} : x * y ∈ I → x ∈ I ∨ y ∈ I 
goal: x * y ∈ I → x ∈ I ∨ y ∈ I

full_name: Ideal.IsPrime.mem_or_mem_of_mul_eq_zero
code: theorem IsPrime.mem_or_mem_of_mul_eq_zero {I : Ideal α} (hI : I.IsPrime) {x y : α} (h : x * y = 0) :
    x ∈ I ∨ y ∈ I 
goal: x ∈ I ∨ y ∈ I

full_name: Ideal.IsPrime.mem_of_pow_mem
code: theorem IsPrime.mem_of_pow_mem {I : Ideal α} (hI : I.IsPrime) {r : α} (n : ℕ) (H : r ^ n ∈ I) :
    r ∈ I 
goal: r ∈ I

full_name: Ideal.not_isPrime_iff
code: theorem not_isPrime_iff {I : Ideal α} :
    ¬I.IsPrime ↔ I = ⊤ ∨ ∃ (x : α) (_hx : x ∉ I) (y : α) (_hy : y ∉ I), x * y ∈ I 
goal: ¬I.IsPrime ↔ I = ⊤ ∨ ∃ x, ∃ (_ : x ∉ I), ∃ y, ∃ (_ : y ∉ I), x * y ∈ I

full_name: Ideal.zero_ne_one_of_proper
code: theorem zero_ne_one_of_proper {I : Ideal α} (h : I ≠ ⊤) : (0 : α) ≠ 1 
goal: 0 ≠ 1

full_name: Ideal.bot_prime
code: theorem bot_prime [IsDomain α] : (⊥ : Ideal α).IsPrime 
goal: ⊥.IsPrime

full_name: Ideal.IsMaximal
code: /-- An ideal is maximal if it is maximal in the collection of proper ideals. -/
class IsMaximal (I : Ideal α) : Prop where
  /-- The maximal ideal is a coatom in the ordering on ideals; that is, it is not the entire ring,
  and there are no other proper ideals strictly containing it. -/
  out : IsCoatom I
goal: Prop

full_name: Ideal.IsMaximal.out
code: /-- An ideal is maximal if it is maximal in the collection of proper ideals. -/
class IsMaximal (I : Ideal α) : Prop where
  /-- The maximal ideal is a coatom in the ordering on ideals; that is, it is not the entire ring,
  and there are no other proper ideals strictly containing it. -/
  out : IsCoatom I
goal: IsCoatom I

full_name: Ideal.isMaximal_def
code: theorem isMaximal_def {I : Ideal α} : I.IsMaximal ↔ IsCoatom I 
goal: I.IsMaximal ↔ IsCoatom I

full_name: Ideal.IsMaximal.ne_top
code: theorem IsMaximal.ne_top {I : Ideal α} (h : I.IsMaximal) : I ≠ ⊤ 
goal: I ≠ ⊤

full_name: Ideal.isMaximal_iff
code: theorem isMaximal_iff {I : Ideal α} :
    I.IsMaximal ↔ (1 : α) ∉ I ∧ ∀ (J : Ideal α) (x), I ≤ J → x ∉ I → x ∈ J → (1 : α) ∈ J 
goal: I.IsMaximal ↔ 1 ∉ I ∧ ∀ (J : Ideal α) (x : α), I ≤ J → x ∉ I → x ∈ J → 1 ∈ J

full_name: Ideal.IsMaximal.eq_of_le
code: theorem IsMaximal.eq_of_le {I J : Ideal α} (hI : I.IsMaximal) (hJ : J ≠ ⊤) (IJ : I ≤ J) : I = J 
goal: I = J

full_name: Ideal.instIsCoatomic
code: instance : IsCoatomic (Ideal α) 
goal: IsCoatomic (Ideal α)

full_name: Ideal.IsMaximal.coprime_of_ne
code: theorem IsMaximal.coprime_of_ne {M M' : Ideal α} (hM : M.IsMaximal) (hM' : M'.IsMaximal)
    (hne : M ≠ M') : M ⊔ M' = ⊤ 
goal: M ⊔ M' = ⊤

full_name: Ideal.exists_le_maximal
code: /-- **Krull's theorem**: if `I` is an ideal that is not the whole ring, then it is included in some
    maximal ideal. -/
theorem exists_le_maximal (I : Ideal α) (hI : I ≠ ⊤) : ∃ M : Ideal α, M.IsMaximal ∧ I ≤ M 
goal: ∃ M, M.IsMaximal ∧ I ≤ M

full_name: Ideal.exists_maximal
code: /-- Krull's theorem: a nontrivial ring has a maximal ideal. -/
theorem exists_maximal [Nontrivial α] : ∃ M : Ideal α, M.IsMaximal 
goal: ∃ M, M.IsMaximal

full_name: Ideal.instNontrivial
code: instance [Nontrivial α] : Nontrivial (Ideal α) 
goal: Nontrivial (Ideal α)

full_name: Ideal.maximal_of_no_maximal
code: /-- If P is not properly contained in any maximal ideal then it is not properly contained
  in any proper ideal -/
theorem maximal_of_no_maximal {P : Ideal α}
    (hmax : ∀ m : Ideal α, P < m → ¬IsMaximal m) (J : Ideal α) (hPJ : P < J) : J = ⊤ 
goal: J = ⊤

full_name: Ideal.span_pair_comm
code: theorem span_pair_comm {x y : α} : (span {x, y} : Ideal α) = span {y, x} 
goal: Ideal.span {x, y} = Ideal.span {y, x}

full_name: Ideal.mem_span_pair
code: theorem mem_span_pair {x y z : α} : z ∈ span ({x, y} : Set α) ↔ ∃ a b, a * x + b * y = z 
goal: z ∈ Ideal.span {x, y} ↔ ∃ a b, a * x + b * y = z

full_name: Ideal.span_pair_add_mul_left
code: @[simp]
theorem span_pair_add_mul_left {R : Type u} [CommRing R] {x y : R} (z : R) :
    (span {x + y * z, y} : Ideal R) = span {x, y} 
goal: Ideal.span {x + y * z, y} = Ideal.span {x, y}

full_name: Ideal.span_pair_add_mul_right
code: @[simp]
theorem span_pair_add_mul_right {R : Type u} [CommRing R] {x y : R} (z : R) :
    (span {x, y + x * z} : Ideal R) = span {x, y} 
goal: Ideal.span {x, y + x * z} = Ideal.span {x, y}

full_name: Ideal.IsMaximal.exists_inv
code: theorem IsMaximal.exists_inv {I : Ideal α} (hI : I.IsMaximal) {x} (hx : x ∉ I) :
    ∃ y, ∃ i ∈ I, y * x + i = 1 
goal: ∃ y, ∃ i ∈ I, y * x + i = 1

full_name: Ideal.mem_sup_left
code: theorem mem_sup_left {S T : Ideal R} : ∀ {x : R}, x ∈ S → x ∈ S ⊔ T 
goal: x ∈ S → x ∈ S ⊔ T

full_name: Ideal.mem_sup_right
code: theorem mem_sup_right {S T : Ideal R} : ∀ {x : R}, x ∈ T → x ∈ S ⊔ T 
goal: x ∈ T → x ∈ S ⊔ T

full_name: Ideal.mem_iSup_of_mem
code: theorem mem_iSup_of_mem {ι : Sort*} {S : ι → Ideal R} (i : ι) : ∀ {x : R}, x ∈ S i → x ∈ iSup S 
goal: x ∈ S i → x ∈ iSup S

full_name: Ideal.mem_sSup_of_mem
code: theorem mem_sSup_of_mem {S : Set (Ideal R)} {s : Ideal R} (hs : s ∈ S) :
    ∀ {x : R}, x ∈ s → x ∈ sSup S 
goal: x ∈ s → x ∈ sSup S

full_name: Ideal.mem_sInf
code: theorem mem_sInf {s : Set (Ideal R)} {x : R} : x ∈ sInf s ↔ ∀ ⦃I⦄, I ∈ s → x ∈ I 
goal: x ∈ sInf s ↔ ∀ ⦃I : Ideal R⦄, I ∈ s → x ∈ I

full_name: Ideal.mem_inf
code: @[simp 1001] -- Porting note: increased priority to appease `simpNF`
theorem mem_inf {I J : Ideal R} {x : R} : x ∈ I ⊓ J ↔ x ∈ I ∧ x ∈ J 
goal: x ∈ I ⊓ J ↔ x ∈ I ∧ x ∈ J

full_name: Ideal.mem_iInf
code: @[simp 1001] -- Porting note: increased priority to appease `simpNF`
theorem mem_iInf {ι : Sort*} {I : ι → Ideal R} {x : R} : x ∈ iInf I ↔ ∀ i, x ∈ I i 
goal: x ∈ iInf I ↔ ∀ (i : ι), x ∈ I i

full_name: Ideal.mem_bot
code: @[simp 1001] -- Porting note: increased priority to appease `simpNF`
theorem mem_bot {x : R} : x ∈ (⊥ : Ideal R) ↔ x = 0 
goal: x ∈ ⊥ ↔ x = 0

full_name: Ideal.pi
code: /-- `I^n` as an ideal of `R^n`. -/
def pi : Ideal (ι → α) 
goal: Ideal (ι → α)

full_name: Ideal.mem_pi
code: theorem mem_pi (x : ι → α) : x ∈ I.pi ι ↔ ∀ i, x i ∈ I 
goal: x ∈ I.pi ι ↔ ∀ (i : ι), x i ∈ I

full_name: Ideal.sInf_isPrime_of_isChain
code: theorem sInf_isPrime_of_isChain {s : Set (Ideal α)} (hs : s.Nonempty) (hs' : IsChain (· ≤ ·) s)
    (H : ∀ p ∈ s, Ideal.IsPrime p) : (sInf s).IsPrime 
goal: (sInf s).IsPrime

full_name: Ideal.mul_unit_mem_iff_mem
code: @[simp]
theorem mul_unit_mem_iff_mem {x y : α} (hy : IsUnit y) : x * y ∈ I ↔ x ∈ I 
goal: x * y ∈ I ↔ x ∈ I

full_name: Ideal.mem_span_singleton
code: theorem mem_span_singleton {x y : α} : x ∈ span ({y} : Set α) ↔ y ∣ x 
goal: x ∈ Ideal.span {y} ↔ y ∣ x

full_name: Ideal.mem_span_singleton_self
code: theorem mem_span_singleton_self (x : α) : x ∈ span ({x} : Set α) 
goal: x ∈ Ideal.span {x}

full_name: Ideal.span_singleton_le_span_singleton
code: theorem span_singleton_le_span_singleton {x y : α} :
    span ({x} : Set α) ≤ span ({y} : Set α) ↔ y ∣ x 
goal: Ideal.span {x} ≤ Ideal.span {y} ↔ y ∣ x

full_name: Ideal.span_singleton_eq_span_singleton
code: theorem span_singleton_eq_span_singleton {α : Type u} [CommRing α] [IsDomain α] {x y : α} :
    span ({x} : Set α) = span ({y} : Set α) ↔ Associated x y 
goal: Ideal.span {x} = Ideal.span {y} ↔ Associated x y

full_name: Ideal.span_singleton_mul_right_unit
code: theorem span_singleton_mul_right_unit {a : α} (h2 : IsUnit a) (x : α) :
    span ({x * a} : Set α) = span {x} 
goal: Ideal.span {x * a} = Ideal.span {x}

full_name: Ideal.span_singleton_eq_top
code: @[simp]
theorem span_singleton_eq_top {x} : span ({x} : Set α) = ⊤ ↔ IsUnit x 
goal: Ideal.span {x} = ⊤ ↔ IsUnit x

full_name: Ideal.span_singleton_prime
code: theorem span_singleton_prime {p : α} (hp : p ≠ 0) : IsPrime (span ({p} : Set α)) ↔ Prime p 
goal: (Ideal.span {p}).IsPrime ↔ Prime p

full_name: Ideal.IsMaximal.isPrime
code: theorem IsMaximal.isPrime {I : Ideal α} (H : I.IsMaximal) : I.IsPrime 
goal: I.IsPrime

full_name: Ideal.IsMaximal.isPrime'
code: instance (priority := 100) IsMaximal.isPrime' (I : Ideal α) : ∀ [_H : I.IsMaximal], I.IsPrime 
goal: I.IsPrime

full_name: Ideal.span_singleton_lt_span_singleton
code: theorem span_singleton_lt_span_singleton [IsDomain α] {x y : α} :
    span ({x} : Set α) < span ({y} : Set α) ↔ DvdNotUnit y x 
goal: Ideal.span {x} < Ideal.span {y} ↔ DvdNotUnit y x

full_name: Ideal.factors_decreasing
code: theorem factors_decreasing [IsDomain α] (b₁ b₂ : α) (h₁ : b₁ ≠ 0) (h₂ : ¬IsUnit b₂) :
    span ({b₁ * b₂} : Set α) < span {b₁} 
goal: Ideal.span {b₁ * b₂} < Ideal.span {b₁}

full_name: Ideal.mul_mem_right
code: theorem mul_mem_right (h : a ∈ I) : a * b ∈ I 
goal: a * b ∈ I

full_name: Ideal.pow_mem_of_mem
code: theorem pow_mem_of_mem (ha : a ∈ I) (n : ℕ) (hn : 0 < n) : a ^ n ∈ I 
goal: a ^ n ∈ I

full_name: Ideal.pow_mem_of_pow_mem
code: theorem pow_mem_of_pow_mem {m n : ℕ} (ha : a ^ m ∈ I) (h : m ≤ n) : a ^ n ∈ I 
goal: a ^ n ∈ I

full_name: Ideal.add_pow_mem_of_pow_mem_of_le
code: theorem add_pow_mem_of_pow_mem_of_le {m n k : ℕ}
    (ha : a ^ m ∈ I) (hb : b ^ n ∈ I) (hk : m + n ≤ k + 1) :
    (a + b) ^ k ∈ I 
goal: (a + b) ^ k ∈ I

full_name: Ideal.add_pow_add_pred_mem_of_pow_mem
code: theorem add_pow_add_pred_mem_of_pow_mem  {m n : ℕ}
    (ha : a ^ m ∈ I) (hb : b ^ n ∈ I) :
    (a + b) ^ (m + n - 1) ∈ I 
goal: (a + b) ^ (m + n - 1) ∈ I

full_name: Ideal.IsPrime.mul_mem_iff_mem_or_mem
code: theorem IsPrime.mul_mem_iff_mem_or_mem {I : Ideal α} (hI : I.IsPrime) :
    ∀ {x y : α}, x * y ∈ I ↔ x ∈ I ∨ y ∈ I 
goal: x * y ∈ I ↔ x ∈ I ∨ y ∈ I

full_name: Ideal.IsPrime.pow_mem_iff_mem
code: theorem IsPrime.pow_mem_iff_mem {I : Ideal α} (hI : I.IsPrime) {r : α} (n : ℕ) (hn : 0 < n) :
    r ^ n ∈ I ↔ r ∈ I 
goal: r ^ n ∈ I ↔ r ∈ I

full_name: Ideal.pow_multiset_sum_mem_span_pow
code: theorem pow_multiset_sum_mem_span_pow [DecidableEq α] (s : Multiset α) (n : ℕ) :
    s.sum ^ (Multiset.card s * n + 1) ∈
    span ((s.map fun (x : α) ↦ x ^ (n + 1)).toFinset : Set α) 
goal: s.sum ^ (Multiset.card s * n + 1) ∈ Ideal.span ↑(Multiset.map (fun x => x ^ (n + 1)) s).toFinset

full_name: Ideal.sum_pow_mem_span_pow
code: theorem sum_pow_mem_span_pow {ι} (s : Finset ι) (f : ι → α) (n : ℕ) :
    (∑ i ∈ s, f i) ^ (s.card * n + 1) ∈ span ((fun i => f i ^ (n + 1)) '' s) 
goal: (∑ i ∈ s, f i) ^ (s.card * n + 1) ∈ Ideal.span ((fun i => f i ^ (n + 1)) '' ↑s)

full_name: Ideal.span_pow_eq_top
code: theorem span_pow_eq_top (s : Set α) (hs : span s = ⊤) (n : ℕ) :
    span ((fun (x : α) => x ^ n) '' s) = ⊤ 
goal: Ideal.span ((fun x => x ^ n) '' s) = ⊤

full_name: Ideal.isPrime_of_maximally_disjoint
code: lemma isPrime_of_maximally_disjoint (I : Ideal α)
    (S : Submonoid α)
    (disjoint : Disjoint (I : Set α) S)
    (maximally_disjoint : ∀ (J : Ideal α), I < J → ¬ Disjoint (J : Set α) S) :
    I.IsPrime 
goal: I.IsPrime

full_name: Ideal.neg_mem_iff
code: protected theorem neg_mem_iff : -a ∈ I ↔ a ∈ I 
goal: -a ∈ I ↔ a ∈ I

full_name: Ideal.add_mem_iff_left
code: protected theorem add_mem_iff_left : b ∈ I → (a + b ∈ I ↔ a ∈ I) 
goal: b ∈ I → (a + b ∈ I ↔ a ∈ I)

full_name: Ideal.add_mem_iff_right
code: protected theorem add_mem_iff_right : a ∈ I → (a + b ∈ I ↔ b ∈ I) 
goal: a ∈ I → (a + b ∈ I ↔ b ∈ I)

full_name: Ideal.sub_mem
code: protected theorem sub_mem : a ∈ I → b ∈ I → a - b ∈ I 
goal: a ∈ I → b ∈ I → a - b ∈ I

full_name: Ideal.mem_span_insert'
code: theorem mem_span_insert' {s : Set α} {x y} : x ∈ span (insert y s) ↔ ∃ a, x + a * y ∈ span s 
goal: x ∈ Ideal.span (insert y s) ↔ ∃ a, x + a * y ∈ Ideal.span s

full_name: Ideal.span_singleton_neg
code: @[simp]
theorem span_singleton_neg (x : α) : (span {-x} : Ideal α) = span {x} 
goal: Ideal.span {-x} = Ideal.span {x}

full_name: Ideal.eq_bot_or_top
code: /-- All ideals in a division (semi)ring are trivial. -/
theorem eq_bot_or_top : I = ⊥ ∨ I = ⊤ 
goal: I = ⊥ ∨ I = ⊤

full_name: Ideal.equivFinTwo
code: /-- A bijection between (left) ideals of a division ring and `{0, 1}`, sending `⊥` to `0`
and `⊤` to `1`. -/
def equivFinTwo [DecidableEq (Ideal K)] : Ideal K ≃ Fin 2 
goal: Ideal K ≃ Fin 2

full_name: Ideal.instFinite
code: instance : Finite (Ideal K) 
goal: Finite (Ideal K)

full_name: Ideal.isSimpleOrder
code: /-- Ideals of a `DivisionSemiring` are a simple order. Thanks to the way abbreviations work,
this automatically gives an `IsSimpleModule K` instance. -/
instance isSimpleOrder : IsSimpleOrder (Ideal K) 
goal: IsSimpleOrder (Ideal K)

full_name: Ideal.eq_bot_of_prime
code: theorem eq_bot_of_prime [h : I.IsPrime] : I = ⊥ 
goal: I = ⊥

full_name: Ideal.bot_isMaximal
code: theorem bot_isMaximal : IsMaximal (⊥ : Ideal K) 
goal: ⊥.IsMaximal

full_name: Ideal.mul_sub_mul_mem
code: theorem mul_sub_mul_mem {R : Type*} [CommRing R] (I : Ideal R) {a b c d : R} (h1 : a - b ∈ I)
    (h2 : c - d ∈ I) : a * c - b * d ∈ I 
goal: a * c - b * d ∈ I

full_name: Ring.exists_not_isUnit_of_not_isField
code: theorem exists_not_isUnit_of_not_isField [Nontrivial R] (hf : ¬IsField R) :
    ∃ (x : R) (_hx : x ≠ (0 : R)), ¬IsUnit x 
goal: ∃ x, ∃ (_ : x ≠ 0), ¬IsUnit x

full_name: Ring.not_isField_iff_exists_ideal_bot_lt_and_lt_top
code: theorem not_isField_iff_exists_ideal_bot_lt_and_lt_top [Nontrivial R] :
    ¬IsField R ↔ ∃ I : Ideal R, ⊥ < I ∧ I < ⊤ 
goal: ¬IsField R ↔ ∃ I, ⊥ < I ∧ I < ⊤

full_name: Ring.not_isField_iff_exists_prime
code: theorem not_isField_iff_exists_prime [Nontrivial R] :
    ¬IsField R ↔ ∃ p : Ideal R, p ≠ ⊥ ∧ p.IsPrime 
goal: ¬IsField R ↔ ∃ p, p ≠ ⊥ ∧ p.IsPrime

full_name: Ring.isField_iff_isSimpleOrder_ideal
code: /-- Also see `Ideal.isSimpleOrder` for the forward direction as an instance when `R` is a
division (semi)ring.

This result actually holds for all division semirings, but we lack the predicate to state it. -/
theorem isField_iff_isSimpleOrder_ideal : IsField R ↔ IsSimpleOrder (Ideal R) 
goal: IsField R ↔ IsSimpleOrder (Ideal R)

full_name: Ring.ne_bot_of_isMaximal_of_not_isField
code: /-- When a ring is not a field, the maximal ideals are nontrivial. -/
theorem ne_bot_of_isMaximal_of_not_isField [Nontrivial R] {M : Ideal R} (max : M.IsMaximal)
    (not_field : ¬IsField R) : M ≠ ⊥ 
goal: M ≠ ⊥

full_name: Ideal.bot_lt_of_maximal
code: theorem bot_lt_of_maximal (M : Ideal R) [hm : M.IsMaximal] (non_field : ¬IsField R) : ⊥ < M 
goal: ⊥ < M

full_name: nonunits
code: /-- The set of non-invertible elements of a monoid. -/
def nonunits (α : Type u) [Monoid α] : Set α 
goal: Set α

full_name: mem_nonunits_iff
code: @[simp]
theorem mem_nonunits_iff [Monoid α] : a ∈ nonunits α ↔ ¬IsUnit a 
goal: a ∈ nonunits α ↔ ¬IsUnit a

full_name: mul_mem_nonunits_right
code: theorem mul_mem_nonunits_right [CommMonoid α] : b ∈ nonunits α → a * b ∈ nonunits α 
goal: b ∈ nonunits α → a * b ∈ nonunits α

full_name: mul_mem_nonunits_left
code: theorem mul_mem_nonunits_left [CommMonoid α] : a ∈ nonunits α → a * b ∈ nonunits α 
goal: a ∈ nonunits α → a * b ∈ nonunits α

full_name: zero_mem_nonunits
code: theorem zero_mem_nonunits [Semiring α] : 0 ∈ nonunits α ↔ (0 : α) ≠ 1 
goal: 0 ∈ nonunits α ↔ 0 ≠ 1

full_name: one_not_mem_nonunits
code: @[simp 1001] -- increased priority to appease `simpNF`
theorem one_not_mem_nonunits [Monoid α] : (1 : α) ∉ nonunits α 
goal: 1 ∉ nonunits α

full_name: coe_subset_nonunits
code: theorem coe_subset_nonunits [Semiring α] {I : Ideal α} (h : I ≠ ⊤) : (I : Set α) ⊆ nonunits α 
goal: ↑I ⊆ nonunits α

full_name: exists_max_ideal_of_mem_nonunits
code: theorem exists_max_ideal_of_mem_nonunits [CommSemiring α] (h : a ∈ nonunits α) :
    ∃ I : Ideal α, I.IsMaximal ∧ a ∈ I 
goal: ∃ I, I.IsMaximal ∧ a ∈ I