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
The ideal generated by a subset of a ring
Equations
- ideal.span s = submodule.span α s
An ideal P
of a ring R
is prime if P ≠ R
and xy ∈ P → x ∈ P ∨ y ∈ P
An ideal is maximal if it is maximal in the collection of proper ideals.
Equations
Krull's theorem: if I
is an ideal that is not the whole ring, then it is included in some
maximal ideal.
Krull's theorem: a nontrivial ring has a maximal ideal.
The quotient R/I
of a ring R
by an ideal I
.
Equations
Equations
Equations
- ideal.quotient.has_mul I = {mul := λ (a b : I.quotient), quotient.lift_on₂' a b (λ (a b : α), submodule.quotient.mk (a * b)) _}
Equations
- ideal.quotient.comm_ring I = {add := add_comm_group.add (submodule.quotient.add_comm_group I), add_assoc := _, zero := add_comm_group.zero (submodule.quotient.add_comm_group I), zero_add := _, add_zero := _, neg := add_comm_group.neg (submodule.quotient.add_comm_group I), add_left_neg := _, add_comm := _, mul := has_mul.mul (ideal.quotient.has_mul I), mul_assoc := _, one := 1, one_mul := _, mul_one := _, left_distrib := _, right_distrib := _, mul_comm := _}
The ring homomorphism from a ring R
to a quotient ring R/I
.
Equations
- ideal.quotient.mk I = {to_fun := λ (a : α), submodule.quotient.mk a, map_one' := _, map_mul' := _, map_zero' := _, map_add' := _}
Equations
- ideal.quotient.inhabited = {default := ⇑(ideal.quotient.mk I) 37}
Equations
- ideal.quotient.integral_domain I = {add := comm_ring.add (ideal.quotient.comm_ring I), add_assoc := _, zero := comm_ring.zero (ideal.quotient.comm_ring I), zero_add := _, add_zero := _, neg := comm_ring.neg (ideal.quotient.comm_ring I), add_left_neg := _, add_comm := _, mul := comm_ring.mul (ideal.quotient.comm_ring I), mul_assoc := _, one := comm_ring.one (ideal.quotient.comm_ring I), one_mul := _, mul_one := _, left_distrib := _, right_distrib := _, mul_comm := _, exists_pair_ne := _, eq_zero_or_eq_zero_of_mul_eq_zero := _}
quotient by maximal ideal is a field. def rather than instance, since users will have computable inverses in some applications
Equations
- ideal.quotient.field I = {add := integral_domain.add (ideal.quotient.integral_domain I), add_assoc := _, zero := integral_domain.zero (ideal.quotient.integral_domain I), zero_add := _, add_zero := _, neg := integral_domain.neg (ideal.quotient.integral_domain I), add_left_neg := _, add_comm := _, mul := integral_domain.mul (ideal.quotient.integral_domain I), mul_assoc := _, one := integral_domain.one (ideal.quotient.integral_domain I), one_mul := _, mul_one := _, left_distrib := _, right_distrib := _, mul_comm := _, inv := λ (a : I.quotient), dite (a = 0) (λ (ha : a = 0), 0) (λ (ha : ¬a = 0), classical.some _), exists_pair_ne := _, mul_inv_cancel := _, inv_zero := _}
Given a ring homomorphism f : α →+* β
sending all elements of an ideal to zero,
lift it to the quotient by this ideal.
R^n/I^n
is a R/I
-module.
Equations
- I.module_pi ι = {to_distrib_mul_action := {to_mul_action := {to_has_scalar := {smul := λ (c : I.quotient) (m : (I.pi ι).quotient), quotient.lift_on₂' c m (λ (r : α) (m : ι → α), submodule.quotient.mk (r • m)) _}, one_smul := _, mul_smul := _}, smul_add := _, smul_zero := _}, add_smul := _, zero_smul := _}
R^n/I^n
is isomorphic to (R/I)^n
as an R/I
-module.
Equations
- I.pi_quot_equiv ι = {to_fun := λ (x : (I.pi ι).quotient), quotient.lift_on' x (λ (f : ι → α) (i : ι), ⇑(ideal.quotient.mk I) (f i)) _, map_add' := _, map_smul' := _, inv_fun := λ (x : ι → I.quotient), ⇑(ideal.quotient.mk (I.pi ι)) (λ (i : ι), quotient.out' (x i)), left_inv := _, right_inv := _}
- to_nontrivial : nontrivial α
- is_local : ∀ (a : α), is_unit a ∨ is_unit (1 - a)
A commutative ring is local if it has a unique maximal ideal. Note that
local_ring
is a predicate.
The ideal of elements that are not units.
Equations
- local_ring.maximal_ideal α = {carrier := nonunits α (ring.to_monoid α), zero_mem' := _, add_mem' := _, smul_mem' := _}
Equations
- _ = _
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.
The residue field of a local ring is the quotient of the ring by its maximal ideal.
Equations
Equations
Equations
- local_ring.inhabited α = {default := 37}
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