mathlib documentation

ring_theory.ideal.basic

Ideals over a ring #

This file defines ideal R, the type of ideals over a commutative ring R.

Implementation notes #

ideal R is implemented using submodule R R, where is interpreted as *.

TODO #

Support one-sided ideals, and ideals over non-commutative rings.

See algebra.ring_quot for quotients of non-commutative rings.

def ideal (R : Type u) [semiring R] :
Type u

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.

Equations
theorem ideal.zero_mem {α : Type u} [semiring α] (I : ideal α) :
0 I
theorem ideal.add_mem {α : Type u} [semiring α] (I : ideal α) {a b : α} :
a Ib Ia + b I
theorem ideal.mul_mem_left {α : Type u} [semiring α] (I : ideal α) (a : α) {b : α} :
b Ia * b I
@[ext]
theorem ideal.ext {α : Type u} [semiring α] {I J : ideal α} (h : ∀ (x : α), x I x J) :
I = J
theorem ideal.eq_top_of_unit_mem {α : Type u} [semiring α] (I : ideal α) (x y : α) (hx : x I) (h : y * x = 1) :
I =
theorem ideal.eq_top_of_is_unit_mem {α : Type u} [semiring α] (I : ideal α) {x : α} (hx : x I) (h : is_unit x) :
I =
theorem ideal.eq_top_iff_one {α : Type u} [semiring α] (I : ideal α) :
I = 1 I
theorem ideal.ne_top_iff_one {α : Type u} [semiring α] (I : ideal α) :
I 1 I
@[simp]
theorem ideal.unit_mul_mem_iff_mem {α : Type u} [semiring α] (I : ideal α) {x y : α} (hy : is_unit y) :
y * x I x I
def ideal.span {α : Type u} [semiring α] (s : set α) :

The ideal generated by a subset of a ring

Equations
@[simp]
theorem ideal.submodule_span_eq {α : Type u} [semiring α] {s : set α} :
theorem ideal.subset_span {α : Type u} [semiring α] {s : set α} :
theorem ideal.span_le {α : Type u} [semiring α] {s : set α} {I : ideal α} :
theorem ideal.span_mono {α : Type u} [semiring α] {s t : set α} :
@[simp]
theorem ideal.span_eq {α : Type u} [semiring α] (I : ideal α) :
@[simp]
theorem ideal.span_singleton_one {α : Type u} [semiring α] :
theorem ideal.mem_span_insert {α : Type u} [semiring α] {s : set α} {x y : α} :
x ideal.span (insert y s) ∃ (a z : α) (H : z ideal.span s), x = a * y + z
theorem ideal.mem_span_singleton' {α : Type u} [semiring α] {x y : α} :
x ideal.span {y} ∃ (a : α), a * y = x
theorem ideal.span_eq_bot {α : Type u} [semiring α] {s : set α} :
ideal.span s = ∀ (x : α), x sx = 0
@[simp]
theorem ideal.span_singleton_eq_bot {α : Type u} [semiring α] {x : α} :
ideal.span {x} = x = 0
@[simp]
theorem ideal.span_zero {α : Type u} [semiring α] :
@[simp]
theorem ideal.span_one {α : Type u} [semiring α] :
def ideal.of_rel {α : Type u} [semiring α] (r : α → α → Prop) :

The ideal generated by an arbitrary binary relation.

Equations
@[class]
structure ideal.is_prime {α : Type u} [semiring α] (I : ideal α) :
Prop

An ideal P of a ring R is prime if P ≠ R and xy ∈ P → x ∈ P ∨ y ∈ P

Instances
theorem ideal.is_prime_iff {α : Type u} [semiring α] {I : ideal α} :
I.is_prime I ∀ {x y : α}, x * y Ix I y I
theorem ideal.is_prime.ne_top {α : Type u} [semiring α] {I : ideal α} (hI : I.is_prime) :
theorem ideal.is_prime.mem_or_mem {α : Type u} [semiring α] {I : ideal α} (hI : I.is_prime) {x y : α} :
x * y Ix I y I
theorem ideal.is_prime.mem_or_mem_of_mul_eq_zero {α : Type u} [semiring α] {I : ideal α} (hI : I.is_prime) {x y : α} (h : x * y = 0) :
x I y I
theorem ideal.is_prime.mem_of_pow_mem {α : Type u} [semiring α] {I : ideal α} (hI : I.is_prime) {r : α} (n : ) (H : r ^ n I) :
r I
theorem ideal.not_is_prime_iff {α : Type u} [semiring α] {I : ideal α} :
¬I.is_prime I = ∃ (x : α) (H : x I) (y : α) (H : y I), x * y I
theorem ideal.zero_ne_one_of_proper {α : Type u} [semiring α] {I : ideal α} (h : I ) :
0 1
theorem ideal.bot_prime {R : Type u_1} [integral_domain R] :
@[class]
structure ideal.is_maximal {α : Type u} [semiring α] (I : ideal α) :
Prop

An ideal is maximal if it is maximal in the collection of proper ideals.

Instances
theorem ideal.is_maximal_def {α : Type u} [semiring α] {I : ideal α} :
theorem ideal.is_maximal.ne_top {α : Type u} [semiring α] {I : ideal α} (h : I.is_maximal) :
theorem ideal.is_maximal_iff {α : Type u} [semiring α] {I : ideal α} :
I.is_maximal 1 I ∀ (J : ideal α) (x : α), I Jx Ix J1 J
theorem ideal.is_maximal.eq_of_le {α : Type u} [semiring α] {I J : ideal α} (hI : I.is_maximal) (hJ : J ) (IJ : I J) :
I = J
@[instance]
def ideal.is_coatomic {α : Type u} [semiring α] :
theorem ideal.exists_le_maximal {α : Type u} [semiring α] (I : ideal α) (hI : I ) :
∃ (M : ideal α), M.is_maximal I M

Krull's theorem: if I is an ideal that is not the whole ring, then it is included in some maximal ideal.

theorem ideal.exists_maximal (α : Type u) [semiring α] [nontrivial α] :
∃ (M : ideal α), M.is_maximal

Krull's theorem: a nontrivial ring has a maximal ideal.

@[instance]
def ideal.nontrivial {α : Type u} [semiring α] [nontrivial α] :
theorem ideal.maximal_of_no_maximal {R : Type u} [comm_semiring R] {P : ideal R} (hmax : ∀ (m : ideal R), P < m¬m.is_maximal) (J : ideal R) (hPJ : P < J) :
J =

If P is not properly contained in any maximal ideal then it is not properly contained in any proper ideal

theorem ideal.mem_span_pair {α : Type u} [semiring α] {x y z : α} :
z ideal.span {x, y} ∃ (a b : α), a * x + b * y = z
theorem ideal.is_maximal.exists_inv {α : Type u} [semiring α] {I : ideal α} (hI : I.is_maximal) {x : α} (hx : x I) :
∃ (y i : α) (H : i I), y * x + i = 1
theorem ideal.mem_sup_left {R : Type u} [semiring R] {S T : ideal R} {x : R} :
x Sx S T
theorem ideal.mem_sup_right {R : Type u} [semiring R] {S T : ideal R} {x : R} :
x Tx S T
theorem ideal.mem_supr_of_mem {R : Type u} [semiring R] {ι : Type u_1} {S : ι → ideal R} (i : ι) {x : R} :
x S ix supr S
theorem ideal.mem_Sup_of_mem {R : Type u} [semiring R] {S : set (ideal R)} {s : ideal R} (hs : s S) {x : R} :
x sx Sup S
theorem ideal.mem_Inf {R : Type u} [semiring R] {s : set (ideal R)} {x : R} :
x Inf s ∀ ⦃I : ideal R⦄, I sx I
@[simp]
theorem ideal.mem_inf {R : Type u} [semiring R] {I J : ideal R} {x : R} :
x I J x I x J
@[simp]
theorem ideal.mem_infi {R : Type u} [semiring R] {ι : Type u_1} {I : ι → ideal R} {x : R} :
x infi I ∀ (i : ι), x I i
@[simp]
theorem ideal.mem_bot {R : Type u} [semiring R] {x : R} :
x x = 0
def ideal.pi {α : Type u} [semiring α] (I : ideal α) (ι : Type v) :
ideal (ι → α)

I^n as an ideal of R^n.

Equations
theorem ideal.mem_pi {α : Type u} [semiring α] (I : ideal α) (ι : Type v) (x : ι → α) :
x I.pi ι ∀ (i : ι), x i I
@[simp]
theorem ideal.mul_unit_mem_iff_mem {α : Type u} [comm_semiring α] (I : ideal α) {x y : α} (hy : is_unit y) :
x * y I x I
theorem ideal.mem_span_singleton {α : Type u} [comm_semiring α] {x y : α} :
x ideal.span {y} y x
theorem ideal.span_singleton_le_span_singleton {α : Type u} [comm_semiring α] {x y : α} :
theorem ideal.span_singleton_eq_span_singleton {α : Type u} [integral_domain α] {x y : α} :
theorem ideal.span_singleton_mul_right_unit {α : Type u} [comm_semiring α] {a : α} (h2 : is_unit a) (x : α) :
theorem ideal.span_singleton_mul_left_unit {α : Type u} [comm_semiring α] {a : α} (h2 : is_unit a) (x : α) :
theorem ideal.span_singleton_eq_top {α : Type u} [comm_semiring α] {x : α} :
theorem ideal.span_singleton_prime {α : Type u} [comm_semiring α] {p : α} (hp : p 0) :
theorem ideal.is_maximal.is_prime {α : Type u} [comm_semiring α] {I : ideal α} (H : I.is_maximal) :
@[instance]
def ideal.is_maximal.is_prime' {α : Type u} [comm_semiring α] (I : ideal α) [H : I.is_maximal] :
theorem ideal.factors_decreasing {β : Type v} [integral_domain β] (b₁ b₂ : β) (h₁ : b₁ 0) (h₂ : ¬is_unit b₂) :
ideal.span {b₁ * b₂} < ideal.span {b₁}
theorem ideal.mul_mem_right {α : Type u} {a : α} (b : α) [comm_semiring α] (I : ideal α) (h : a I) :
a * b I
theorem ideal.pow_mem_of_mem {α : Type u} {a : α} [comm_semiring α] (I : ideal α) (ha : a I) (n : ) (hn : 0 < n) :
a ^ n I
theorem ideal.is_prime.mul_mem_iff_mem_or_mem {α : Type u} [comm_semiring α] {I : ideal α} (hI : I.is_prime) {x y : α} :
x * y I x I y I
theorem ideal.is_prime.pow_mem_iff_mem {α : Type u} [comm_semiring α] {I : ideal α} (hI : I.is_prime) {r : α} (n : ) (hn : 0 < n) :
r ^ n I r I
theorem ideal.neg_mem_iff {α : Type u} [ring α] (I : ideal α) {a : α} :
-a I a I
theorem ideal.add_mem_iff_left {α : Type u} [ring α] (I : ideal α) {a b : α} :
b I(a + b I a I)
theorem ideal.add_mem_iff_right {α : Type u} [ring α] (I : ideal α) {a b : α} :
a I(a + b I b I)
theorem ideal.sub_mem {α : Type u} [ring α] (I : ideal α) {a b : α} :
a Ib Ia - b I
theorem ideal.mem_span_insert' {α : Type u} [ring α] {s : set α} {x y : α} :
x ideal.span (insert y s) ∃ (a : α), x + a * y ideal.span s
theorem ideal.eq_bot_or_top {K : Type u} [division_ring K] (I : ideal K) :
I = I =

All ideals in a division ring are trivial.

theorem ideal.eq_bot_of_prime {K : Type u} [division_ring K] (I : ideal K) [h : I.is_prime] :
I =
theorem ideal.mul_sub_mul_mem {R : Type u_1} [comm_ring R] (I : ideal R) {a b c d : R} (h1 : a - b I) (h2 : c - d I) :
a * c - b * d I
def ideal.quotient {α : Type u} [comm_ring α] (I : ideal α) :
Type u

The quotient R/I of a ring R by an ideal I.

The ideal quotient of I is defined to equal the quotient of I as an R-submodule of R. This definition is marked reducible so that typeclass instances can be shared between ideal.quotient I and submodule.quotient I.

Equations
@[instance]
def ideal.quotient.has_one {α : Type u} [comm_ring α] (I : ideal α) :
Equations
@[instance]
def ideal.quotient.has_mul {α : Type u} [comm_ring α] (I : ideal α) :
Equations
def ideal.quotient.mk {α : Type u} [comm_ring α] (I : ideal α) :

The ring homomorphism from a ring R to a quotient ring R/I.

Equations
@[ext]
theorem ideal.quotient.ring_hom_ext {α : Type u} {β : Type v} [comm_ring α] {I : ideal α} [non_assoc_semiring β] ⦃f g : I.quotient →+* β⦄ (h : f.comp (ideal.quotient.mk I) = g.comp (ideal.quotient.mk I)) :
f = g
@[instance]
def ideal.quotient.inhabited {α : Type u} [comm_ring α] {I : ideal α} :
Equations
theorem ideal.quotient.eq {α : Type u} [comm_ring α] {I : ideal α} {x y : α} :
@[simp]
theorem ideal.quotient.mk_eq_mk {α : Type u} [comm_ring α] {I : ideal α} (x : α) :
theorem ideal.quotient.eq_zero_iff_mem {α : Type u} [comm_ring α] {a : α} {I : ideal α} :
theorem ideal.quotient.zero_eq_one_iff {α : Type u} [comm_ring α] {I : ideal α} :
0 = 1 I =
theorem ideal.quotient.zero_ne_one_iff {α : Type u} [comm_ring α] {I : ideal α} :
0 1 I
theorem ideal.quotient.nontrivial {α : Type u} [comm_ring α] {I : ideal α} (hI : I ) :
theorem ideal.quotient.quotient_ring_saturate {α : Type u} [comm_ring α] (I : ideal α) (s : set α) :
(ideal.quotient.mk I) ⁻¹' ((ideal.quotient.mk I) '' s) = ⋃ (x : I), (λ (y : α), x.val + y) '' s

If I is an ideal of a commutative ring R, if q : R → R/I is the quotient map, and if s ⊆ R is a subset, then q⁻¹(q(s)) = ⋃ᵢ(i + s), the union running over all i ∈ I.

theorem ideal.quotient.exists_inv {α : Type u} [comm_ring α] {I : ideal α} [hI : I.is_maximal] {a : I.quotient} :
a 0(∃ (b : I.quotient), a * b = 1)
def ideal.quotient.field {α : Type u} [comm_ring α] (I : ideal α) [hI : I.is_maximal] :

quotient by maximal ideal is a field. def rather than instance, since users will have computable inverses in some applications. See note [reducible non-instances].

Equations
theorem ideal.quotient.maximal_of_is_field {α : Type u} [comm_ring α] (I : ideal α) (hqf : is_field I.quotient) :

If the quotient by an ideal is a field, then the ideal is maximal.

The quotient of a ring by an ideal is a field iff the ideal is maximal.

def ideal.quotient.lift {α : Type u} {β : Type v} [comm_ring α] [comm_ring β] (S : ideal α) (f : α →+* β) (H : ∀ (a : α), a Sf a = 0) :

Given a ring homomorphism f : α →+* β sending all elements of an ideal to zero, lift it to the quotient by this ideal.

Equations
@[simp]
theorem ideal.quotient.lift_mk {α : Type u} {β : Type v} [comm_ring α] {a : α} [comm_ring β] (S : ideal α) (f : α →+* β) (H : ∀ (a : α), a Sf a = 0) :
def ideal.quotient.factor {α : Type u} [comm_ring α] (S T : ideal α) (H : S T) :

The ring homomorphism from the quotient by a smaller ideal to the quotient by a larger ideal.

This is the ideal.quotient version of quot.factor

Equations
@[simp]
theorem ideal.quotient.factor_mk {α : Type u} [comm_ring α] (S T : ideal α) (H : S T) (x : α) :
@[simp]
theorem ideal.quotient.factor_comp_mk {α : Type u} [comm_ring α] (S T : ideal α) (H : S T) :
def ideal.quot_equiv_of_eq {R : Type u_1} [comm_ring R] {I J : ideal R} (h : I = J) :

Quotienting by equal ideals gives equivalent rings.

See also submodule.quot_equiv_of_eq.

Equations
@[simp]
theorem ideal.quot_equiv_of_eq_mk {R : Type u_1} [comm_ring R] {I J : ideal R} (h : I = J) (x : R) :
@[instance]
def ideal.module_pi {α : Type u} [comm_ring α] (I : ideal α) (ι : Type v) :

R^n/I^n is a R/I-module.

Equations
def ideal.pi_quot_equiv {α : Type u} [comm_ring α] (I : ideal α) (ι : Type v) :

R^n/I^n is isomorphic to (R/I)^n as an R/I-module.

Equations
theorem ideal.map_pi {α : Type u} [comm_ring α] (I : ideal α) {ι : Type u_1} [fintype ι] {ι' : Type w} (x : ι → α) (hi : ∀ (i : ι), x i I) (f : (ι → α) →ₗ[α] ι' → α) (i : ι') :
f x i I

If f : R^n → R^m is an R-linear map and I ⊆ R is an ideal, then the image of I^n is contained in I^m.

theorem ring.exists_not_is_unit_of_not_is_field {R : Type u_1} [comm_ring R] [nontrivial R] (hf : ¬is_field R) :
∃ (x : R) (H : x 0), ¬is_unit x
theorem ring.not_is_field_iff_exists_prime {R : Type u_1} [comm_ring R] [nontrivial R] :
¬is_field R ∃ (p : ideal R), p p.is_prime
theorem ring.ne_bot_of_is_maximal_of_not_is_field {R : Type u_1} [comm_ring R] [nontrivial R] {M : ideal R} (max : M.is_maximal) (not_field : ¬is_field R) :

When a ring is not a field, the maximal ideals are nontrivial.

theorem ideal.bot_lt_of_maximal {R : Type u} [comm_ring R] [nontrivial R] (M : ideal R) [hm : M.is_maximal] (non_field : ¬is_field R) :
< M
def nonunits (α : Type u) [monoid α] :
set α

The set of non-invertible elements of a monoid.

Equations
@[simp]
theorem mem_nonunits_iff {α : Type u} {a : α} [monoid α] :
theorem mul_mem_nonunits_right {α : Type u} {a b : α} [comm_monoid α] :
b nonunits αa * b nonunits α
theorem mul_mem_nonunits_left {α : Type u} {a b : α} [comm_monoid α] :
a nonunits αa * b nonunits α
theorem zero_mem_nonunits {α : Type u} [semiring α] :
0 nonunits α 0 1
@[simp]
theorem one_not_mem_nonunits {α : Type u} [monoid α] :
theorem coe_subset_nonunits {α : Type u} [semiring α] {I : ideal α} (h : I ) :
theorem exists_max_ideal_of_mem_nonunits {α : Type u} {a : α} [comm_semiring α] (h : a nonunits α) :
∃ (I : ideal α), I.is_maximal a I