mathlib documentation

ring_theory.​ideal.​basic

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

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

Ideal in a commutative ring is an additive subgroup s such that a * b ∈ s whenever b ∈ s.

Equations
theorem ideal.​zero_mem {α : Type u} [comm_ring α] (I : ideal α) :
0 ∈ I

theorem ideal.​add_mem {α : Type u} [comm_ring α] (I : ideal α) {a b : α} :
a ∈ I → b ∈ I → a + b ∈ I

theorem ideal.​neg_mem_iff {α : Type u} [comm_ring α] (I : ideal α) {a : α} :
-a ∈ I ↔ a ∈ I

theorem ideal.​add_mem_iff_left {α : Type u} [comm_ring α] (I : ideal α) {a b : α} :
b ∈ I → (a + b ∈ I ↔ a ∈ I)

theorem ideal.​add_mem_iff_right {α : Type u} [comm_ring α] (I : ideal α) {a b : α} :
a ∈ I → (a + b ∈ I ↔ b ∈ I)

theorem ideal.​sub_mem {α : Type u} [comm_ring α] (I : ideal α) {a b : α} :
a ∈ I → b ∈ I → a - b ∈ I

theorem ideal.​mul_mem_left {α : Type u} [comm_ring α] (I : ideal α) {a b : α} :
b ∈ I → a * b ∈ I

theorem ideal.​mul_mem_right {α : Type u} [comm_ring α] (I : ideal α) {a b : α} :
a ∈ I → a * b ∈ I

@[ext]
theorem ideal.​ext {α : Type u} [comm_ring α] {I J : ideal α} :
(∀ (x : α), x ∈ I ↔ x ∈ J) → I = J

theorem ideal.​eq_top_of_unit_mem {α : Type u} [comm_ring α] (I : ideal α) (x y : α) :
x ∈ I → y * x = 1 → I = ⊤

theorem ideal.​eq_top_of_is_unit_mem {α : Type u} [comm_ring α] (I : ideal α) {x : α} :
x ∈ I → is_unit x → I = ⊤

theorem ideal.​eq_top_iff_one {α : Type u} [comm_ring α] (I : ideal α) :
I = ⊤ ↔ 1 ∈ I

theorem ideal.​ne_top_iff_one {α : Type u} [comm_ring α] (I : ideal α) :
I ≠ ⊤ ↔ 1 ∉ I

@[simp]
theorem ideal.​unit_mul_mem_iff_mem {α : Type u} [comm_ring α] (I : ideal α) {x y : α} :
is_unit y → (y * x ∈ I ↔ x ∈ I)

@[simp]
theorem ideal.​mul_unit_mem_iff_mem {α : Type u} [comm_ring α] (I : ideal α) {x y : α} :
is_unit y → (x * y ∈ I ↔ x ∈ I)

def ideal.​span {α : Type u} [comm_ring α] :
set α → ideal α

The ideal generated by a subset of a ring

Equations
theorem ideal.​subset_span {α : Type u} [comm_ring α] {s : set α} :

theorem ideal.​span_le {α : Type u} [comm_ring α] {s : set α} {I : ideal α} :

theorem ideal.​span_mono {α : Type u} [comm_ring α] {s t : set α} :

@[simp]
theorem ideal.​span_eq {α : Type u} [comm_ring α] (I : ideal α) :

@[simp]
theorem ideal.​span_singleton_one {α : Type u} [comm_ring α] :

theorem ideal.​mem_span_insert {α : Type u} [comm_ring α] {s : set α} {x y : α} :
x ∈ ideal.span (has_insert.insert y s) ↔ ∃ (a z : α) (H : z ∈ ideal.span s), x = a * y + z

theorem ideal.​mem_span_insert' {α : Type u} [comm_ring α] {s : set α} {x y : α} :
x ∈ ideal.span (has_insert.insert y s) ↔ ∃ (a : α), x + a * y ∈ ideal.span s

theorem ideal.​mem_span_singleton' {α : Type u} [comm_ring α] {x y : α} :
x ∈ ideal.span {y} ↔ ∃ (a : α), a * y = x

theorem ideal.​mem_span_singleton {α : Type u} [comm_ring α] {x y : α} :
x ∈ ideal.span {y} ↔ y ∣ x

theorem ideal.​span_singleton_le_span_singleton {α : Type u} [comm_ring α] {x y : α} :

theorem ideal.​span_eq_bot {α : Type u} [comm_ring α] {s : set α} :
ideal.span s = ⊥ ↔ ∀ (x : α), x ∈ s → x = 0

@[simp]
theorem ideal.​span_singleton_eq_bot {α : Type u} [comm_ring α] {x : α} :
ideal.span {x} = ⊥ ↔ x = 0

@[simp]
theorem ideal.​span_zero {α : Type u} [comm_ring α] :

theorem ideal.​span_singleton_eq_top {α : Type u} [comm_ring α] {x : α} :

theorem ideal.​span_singleton_mul_right_unit {α : Type u} [comm_ring α] {a : α} (h2 : is_unit a) (x : α) :

theorem ideal.​span_singleton_mul_left_unit {α : Type u} [comm_ring α] {a : α} (h2 : is_unit a) (x : α) :

@[class]
def ideal.​is_prime {α : Type u} [comm_ring α] :
ideal α → Prop

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

Equations
Instances
theorem ideal.​is_prime.​mem_or_mem {α : Type u} [comm_ring α] {I : ideal α} (hI : I.is_prime) {x y : α} :
x * y ∈ I → x ∈ I ∨ y ∈ I

theorem ideal.​is_prime.​mem_or_mem_of_mul_eq_zero {α : Type u} [comm_ring α] {I : ideal α} (hI : I.is_prime) {x y : α} :
x * y = 0 → x ∈ I ∨ y ∈ I

theorem ideal.​is_prime.​mem_of_pow_mem {α : Type u} [comm_ring α] {I : ideal α} (hI : I.is_prime) {r : α} (n : ℕ) :
r ^ n ∈ I → r ∈ I

theorem ideal.​zero_ne_one_of_proper {α : Type u} [comm_ring α] {I : ideal α} :
I ≠ ⊤ → 0 ≠ 1

theorem ideal.​span_singleton_prime {α : Type u} [comm_ring α] {p : α} :
p ≠ 0 → ((ideal.span {p}).is_prime ↔ prime p)

@[class]
def ideal.​is_maximal {α : Type u} [comm_ring α] :
ideal α → Prop

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

Equations
Instances
theorem ideal.​is_maximal_iff {α : Type u} [comm_ring α] {I : ideal α} :
I.is_maximal ↔ 1 ∉ I ∧ ∀ (J : ideal α) (x : α), I ≤ J → x ∉ I → x ∈ J → 1 ∈ J

theorem ideal.​is_maximal.​eq_of_le {α : Type u} [comm_ring α] {I J : ideal α} :
I.is_maximal → J ≠ ⊤ → I ≤ J → I = J

theorem ideal.​is_maximal.​exists_inv {α : Type u} [comm_ring α] {I : ideal α} (hI : I.is_maximal) {x : α} :
x ∉ I → (∃ (y : α), y * x - 1 ∈ I)

theorem ideal.​is_maximal.​is_prime {α : Type u} [comm_ring α] {I : ideal α} :

@[instance]
def ideal.​is_maximal.​is_prime' {α : Type u} [comm_ring α] (I : ideal α) [H : I.is_maximal] :

Equations
theorem ideal.​exists_le_maximal {α : Type u} [comm_ring α] (I : ideal α) :
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} [comm_ring α] [nontrivial α] :
∃ (M : ideal α), M.is_maximal

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

theorem ideal.​maximal_of_no_maximal {R : Type u} [comm_ring R] {P : ideal R} (hmax : ∀ (m : ideal R), P < m → ¬m.is_maximal) (J : ideal R) :
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} [comm_ring α] {x y z : α} :
z ∈ ideal.span {x, y} ↔ ∃ (a b : α), a * x + b * y = z

theorem ideal.​span_singleton_lt_span_singleton {β : Type v} [integral_domain β] {x y : β} :
ideal.span {x} < ideal.span {y} ↔ y ≠ 0 ∧ ∃ (d : β), ¬is_unit d ∧ x = y * d

theorem ideal.​factors_decreasing {β : Type v} [integral_domain β] (b₁ b₂ : β) :
b₁ ≠ 0 → ¬is_unit b₂ → ideal.span {b₁ * b₂} < ideal.span {b₁}

def ideal.​quotient {α : Type u} [comm_ring α] :
ideal α → Type u

The quotient R/I of a ring R by an ideal 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
@[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} {a : α} [comm_ring α] {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 α} :

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

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

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} {a : α} [comm_ring α] [comm_ring β] (S : ideal α) (f : α →+* β) (H : ∀ (a : α), a ∈ S → ⇑f a = 0) :

theorem ideal.​mem_sup_left {R : Type u} [comm_ring R] {S T : ideal R} {x : R} :
x ∈ S → x ∈ S ⊔ T

theorem ideal.​mem_sup_right {R : Type u} [comm_ring R] {S T : ideal R} {x : R} :
x ∈ T → x ∈ S ⊔ T

theorem ideal.​mem_supr_of_mem {R : Type u} [comm_ring R] {ι : Type u_1} {S : ι → ideal R} (i : ι) {x : R} :
x ∈ S i → x ∈ supr S

theorem ideal.​mem_Sup_of_mem {R : Type u} [comm_ring R] {S : set (ideal R)} {s : ideal R} (hs : s ∈ S) {x : R} :
x ∈ s → x ∈ has_Sup.Sup S

theorem ideal.​mem_Inf {R : Type u} [comm_ring R] {s : set (ideal R)} {x : R} :
x ∈ has_Inf.Inf s ↔ ∀ ⦃I : ideal R⦄, I ∈ s → x ∈ I

@[simp]
theorem ideal.​mem_inf {R : Type u} [comm_ring R] {I J : ideal R} {x : R} :
x ∈ I ⊓ J ↔ x ∈ I ∧ x ∈ J

@[simp]
theorem ideal.​mem_infi {R : Type u} [comm_ring R] {ι : Type u_1} {I : ι → ideal R} {x : R} :
x ∈ infi I ↔ ∀ (i : ι), x ∈ I i

theorem ideal.​eq_bot_or_top {K : Type u} [field K] (I : ideal K) :
I = ⊥ ∨ I = ⊤

All ideals in a field are trivial.

theorem ideal.​eq_bot_of_prime {K : Type u} [field K] (I : ideal K) [h : I.is_prime] :
I = ⊥

theorem ideal.​bot_is_maximal {K : Type u} [field K] :

def ideal.​pi {α : Type u} [comm_ring α] (I : ideal α) (ι : Type v) :
ideal (ι → α)

I^n as an ideal of R^n.

Equations
theorem ideal.​mem_pi {α : Type u} [comm_ring α] (I : ideal α) (ι : Type v) (x : ι → α) :
x ∈ I.pi ι ↔ ∀ (i : ι), x i ∈ I

@[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.

def nonunits (α : Type u) [monoid α] :
set α

The set of non-invertible elements of a monoid.

Equations
@[simp]
theorem mem_nonunits_iff {α : Type u} {a : α} [comm_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} [comm_ring α] {I : ideal α} :
I ≠ ⊤ → ↑I ⊆ nonunits α

theorem exists_max_ideal_of_mem_nonunits {α : Type u} {a : α} [comm_ring α] :
a ∈ nonunits α → (∃ (I : ideal α), I.is_maximal ∧ a ∈ I)

@[class]
structure local_ring (α : Type u) [comm_ring α] :
Prop

A commutative ring is local if it has a unique maximal ideal. Note that local_ring is a predicate.

Instances
theorem local_ring.​is_unit_or_is_unit_one_sub_self {α : Type u} [comm_ring α] [local_ring α] (a : α) :

theorem local_ring.​is_unit_of_mem_nonunits_one_sub_self {α : Type u} [comm_ring α] [local_ring α] (a : α) :
1 - a ∈ nonunits α → is_unit a

theorem local_ring.​is_unit_one_sub_self_of_mem_nonunits {α : Type u} [comm_ring α] [local_ring α] (a : α) :
a ∈ nonunits α → is_unit (1 - a)

theorem local_ring.​nonunits_add {α : Type u} [comm_ring α] [local_ring α] {x y : α} :
x ∈ nonunits α → y ∈ nonunits α → x + y ∈ nonunits α

def local_ring.​maximal_ideal (α : Type u) [comm_ring α] [local_ring α] :

The ideal of elements that are not units.

Equations
@[instance]

Equations
  • _ = _
theorem local_ring.​maximal_ideal_unique (α : Type u) [comm_ring α] [local_ring α] :
∃! (I : ideal α), I.is_maximal

theorem local_ring.​eq_maximal_ideal {α : Type u} [comm_ring α] [local_ring α] {I : ideal α} :

theorem local_ring.​le_maximal_ideal {α : Type u} [comm_ring α] [local_ring α] {J : ideal α} :

@[simp]
theorem local_ring.​mem_maximal_ideal {α : Type u} [comm_ring α] [local_ring α] (x : α) :

theorem local_of_nonunits_ideal {α : Type u} [comm_ring α] :
0 ≠ 1 → (∀ (x y : α), x ∈ nonunits α → y ∈ nonunits α → x + y ∈ nonunits α) → local_ring α

theorem local_of_unique_max_ideal {α : Type u} [comm_ring α] :
(∃! (I : ideal α), I.is_maximal) → local_ring α

theorem local_of_unique_nonzero_prime (R : Type u) [comm_ring R] :
(∃! (P : ideal R), P ≠ ⊥ ∧ P.is_prime) → local_ring R

@[class]
structure is_local_ring_hom {α : Type u} {β : Type v} [semiring α] [semiring β] :
(α →+* β) → Prop

A local ring homomorphism is a homomorphism between local rings such that the image of the maximal ideal of the source is contained within the maximal ideal of the target.

Instances
@[simp]
theorem is_unit_of_map_unit {α : Type u} {β : Type v} [semiring α] [semiring β] (f : α →+* β) [is_local_ring_hom f] (a : α) :
is_unit (⇑f a) → is_unit a

theorem of_irreducible_map {α : Type u} {β : Type v} [semiring α] [semiring β] (f : α →+* β) [h : is_local_ring_hom f] {x : α} :

theorem map_nonunit {α : Type u} {β : Type v} [comm_ring α] [local_ring α] [comm_ring β] [local_ring β] (f : α →+* β) [is_local_ring_hom f] (a : α) :

def local_ring.​residue_field (α : Type u) [comm_ring α] [local_ring α] :
Type u

The residue field of a local ring is the quotient of the ring by its maximal ideal.

Equations
@[instance]

Equations

The quotient map from a local ring to its residue field.

Equations

The map on residue fields induced by a local homomorphism between local rings

Equations
@[instance]
def field.​local_ring {α : Type u} [field α] :

Equations