# Local rings #

Define local rings as commutative rings having a unique maximal ideal.

## Main definitions #

• LocalRing: A predicate on commutative semirings, stating that for any pair of elements that adds up to 1, one of them is a unit. This is shown to be equivalent to the condition that there exists a unique maximal ideal.
• LocalRing.maximalIdeal: The unique maximal ideal for a local rings. Its carrier set is the set of non units.
• IsLocalRingHom: A predicate on semiring homomorphisms, requiring that it maps nonunits to nonunits. For local rings, this means that the image of the unique maximal ideal is again contained in the unique maximal ideal.
• LocalRing.ResidueField: The quotient of a local ring by its maximal ideal.
class LocalRing (R : Type u) [] extends :

A semiring is local if it is nontrivial and a or b is a unit whenever a + b = 1. Note that LocalRing is a predicate.

• exists_pair_ne : ∃ (x : R) (y : R), x y
• isUnit_or_isUnit_of_add_one : ∀ {a b : R}, a + b = 1

in a local ring R, if a + b = 1, then either a is a unit or b is a unit. In another word, for every a : R, either a is a unit or 1 - a is a unit.

• )
Instances
theorem LocalRing.isUnit_or_isUnit_of_add_one {R : Type u} [] [self : ] {a : R} {b : R} (h : a + b = 1) :

in a local ring R, if a + b = 1, then either a is a unit or b is a unit. In another word, for every a : R, either a is a unit or 1 - a is a unit.

theorem LocalRing.of_isUnit_or_isUnit_of_isUnit_add {R : Type u} [] [] (h : ∀ (a b : R), IsUnit (a + b) ) :
theorem LocalRing.of_nonunits_add {R : Type u} [] [] (h : ∀ (a b : R), a b a + b ) :

A semiring is local if it is nontrivial and the set of nonunits is closed under the addition.

theorem LocalRing.of_unique_max_ideal {R : Type u} [] (h : ∃! I : , I.IsMaximal) :

A semiring is local if it has a unique maximal ideal.

theorem LocalRing.of_unique_nonzero_prime {R : Type u} [] (h : ∃! P : , P P.IsPrime) :
theorem LocalRing.isUnit_or_isUnit_of_isUnit_add {R : Type u} [] [] {a : R} {b : R} (h : IsUnit (a + b)) :
theorem LocalRing.nonunits_add {R : Type u} [] [] {a : R} {b : R} (ha : a ) (hb : b ) :
a + b
def LocalRing.maximalIdeal (R : Type u) [] [] :

The ideal of elements that are not units.

Equations
• = { carrier := , add_mem' := , zero_mem' := , smul_mem' := }
Instances For
instance LocalRing.maximalIdeal.isMaximal (R : Type u) [] [] :
.IsMaximal
Equations
• =
theorem LocalRing.maximal_ideal_unique (R : Type u) [] [] :
∃! I : , I.IsMaximal
theorem LocalRing.eq_maximalIdeal {R : Type u} [] [] {I : } (hI : I.IsMaximal) :
theorem LocalRing.le_maximalIdeal {R : Type u} [] [] {J : } (hJ : J ) :
@[simp]
theorem LocalRing.mem_maximalIdeal {R : Type u} [] [] (x : R) :
x
theorem LocalRing.of_isUnit_or_isUnit_one_sub_self {R : Type u} [] [] (h : ∀ (a : R), IsUnit (1 - a)) :
theorem LocalRing.isUnit_or_isUnit_one_sub_self {R : Type u} [] [] (a : R) :
IsUnit (1 - a)
theorem LocalRing.isUnit_of_mem_nonunits_one_sub_self {R : Type u} [] [] (a : R) (h : 1 - a ) :
theorem LocalRing.isUnit_one_sub_self_of_mem_nonunits {R : Type u} [] [] (a : R) (h : a ) :
IsUnit (1 - a)
theorem LocalRing.of_surjective' {R : Type u} {S : Type v} [] [] [] [] (f : R →+* S) (hf : ) :
theorem LocalRing.maximalIdeal_le_jacobson {R : Type u} [] [] (I : ) :
I.jacobson
theorem LocalRing.jacobson_eq_maximalIdeal {R : Type u} [] [] (I : ) (h : I ) :
I.jacobson =
class IsLocalRingHom {R : Type u} {S : Type v} [] [] (f : R →+* S) :

A local ring homomorphism is a homomorphism f between local rings such that a in the domain is a unit if f a is a unit for any a. See LocalRing.local_hom_TFAE for other equivalent definitions.

• map_nonunit : ∀ (a : R), IsUnit (f a)

A local ring homomorphism f : R ⟶ S will send nonunits of R to nonunits of S.

Instances
theorem IsLocalRingHom.map_nonunit {R : Type u} {S : Type v} [] [] {f : R →+* S} [self : ] (a : R) :
IsUnit (f a)

A local ring homomorphism f : R ⟶ S will send nonunits of R to nonunits of S.

instance isLocalRingHom_id (R : Type u_1) [] :
Equations
• =
@[simp]
theorem isUnit_map_iff {R : Type u} {S : Type v} [] [] (f : R →+* S) [] (a : R) :
IsUnit (f a)
@[simp]
theorem map_mem_nonunits_iff {R : Type u} {S : Type v} [] [] (f : R →+* S) [] (a : R) :
f a a
instance isLocalRingHom_comp {R : Type u} {S : Type v} {T : Type w} [] [] [] (g : S →+* T) (f : R →+* S) [] [] :
IsLocalRingHom (g.comp f)
Equations
• =
instance isLocalRingHom_equiv {R : Type u} {S : Type v} [] [] (f : R ≃+* S) :
Equations
• =
@[simp]
theorem isUnit_of_map_unit {R : Type u} {S : Type v} [] [] (f : R →+* S) [] (a : R) (h : IsUnit (f a)) :
theorem of_irreducible_map {R : Type u} {S : Type v} [] [] (f : R →+* S) [h : ] {x : R} (hfx : Irreducible (f x)) :
theorem isLocalRingHom_of_comp {R : Type u} {S : Type v} {T : Type w} [] [] [] (f : R →+* S) (g : S →+* T) [IsLocalRingHom (g.comp f)] :
theorem RingHom.domain_localRing {R : Type u_1} {S : Type u_2} [] [] [H : ] (f : R →+* S) [] :

If f : R →+* S is a local ring hom, then R is a local ring if S is.

theorem map_nonunit {R : Type u} {S : Type v} [] [] [] [] (f : R →+* S) [] (a : R) (h : ) :

The image of the maximal ideal of the source is contained within the maximal ideal of the target.

theorem LocalRing.local_hom_TFAE {R : Type u} {S : Type v} [] [] [] [] (f : R →+* S) :
[, f '' .toAddSubmonoid , , , ].TFAE

A ring homomorphism between local rings is a local ring hom iff it reflects units, i.e. any preimage of a unit is still a unit. https://stacks.math.columbia.edu/tag/07BJ

theorem LocalRing.of_surjective {R : Type u} {S : Type v} [] [] [] [] (f : R →+* S) [] (hf : ) :
theorem LocalRing.surjective_units_map_of_local_ringHom {R : Type u} {S : Type v} [] [] (f : R →+* S) (hf : ) (h : ) :

If f : R →+* S is a surjective local ring hom, then the induced units map is surjective.

def LocalRing.ResidueField (R : Type u) [] [] :

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

Equations
Instances For
instance LocalRing.ResidueFieldCommRing (R : Type u) [] [] :
Equations
• = let_fun this := inferInstance; this
instance LocalRing.ResidueFieldInhabited (R : Type u) [] [] :
Equations
• = let_fun this := inferInstance; this
noncomputable instance LocalRing.ResidueField.field (R : Type u) [] [] :
Equations
def LocalRing.residue (R : Type u) [] [] :

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

Equations
Instances For
instance LocalRing.ResidueField.algebra (R : Type u) [] [] :
Equations
Equations
• =
def LocalRing.ResidueField.lift {R : Type u_1} {S : Type u_2} [] [] [] (f : R →+* S) [] :

A local ring homomorphism into a field can be descended onto the residue field.

Equations
Instances For
theorem LocalRing.ResidueField.lift_comp_residue {R : Type u_1} {S : Type u_2} [] [] [] (f : R →+* S) [] :
.comp = f
@[simp]
theorem LocalRing.ResidueField.lift_residue_apply {R : Type u_1} {S : Type u_2} [] [] [] (f : R →+* S) [] (x : R) :
( x) = f x
def LocalRing.ResidueField.map {R : Type u} {S : Type v} [] [] [] [] (f : R →+* S) [] :

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

Equations
Instances For
@[simp]
theorem LocalRing.ResidueField.map_id {R : Type u} [] [] :

Applying LocalRing.ResidueField.map to the identity ring homomorphism gives the identity ring homomorphism.

theorem LocalRing.ResidueField.map_comp {R : Type u} {S : Type v} {T : Type w} [] [] [] [] [] [] (f : T →+* R) (g : R →+* S) [] [] :
LocalRing.ResidueField.map (g.comp f) = .comp

The composite of two LocalRing.ResidueField.maps is the LocalRing.ResidueField.map of the composite.

theorem LocalRing.ResidueField.map_comp_residue {R : Type u} {S : Type v} [] [] [] [] (f : R →+* S) [] :
.comp = .comp f
theorem LocalRing.ResidueField.map_residue {R : Type u} {S : Type v} [] [] [] [] (f : R →+* S) [] (r : R) :
( r) = (f r)
theorem LocalRing.ResidueField.map_id_apply {R : Type u} [] [] (x : ) :
= x
@[simp]
theorem LocalRing.ResidueField.map_map {R : Type u} {S : Type v} {T : Type w} [] [] [] [] [] [] (f : R →+* S) (g : S →+* T) (x : ) [] [] :
@[simp]
theorem LocalRing.ResidueField.mapEquiv_apply {R : Type u} {S : Type v} [] [] [] [] (f : R ≃+* S) (a : ) :
def LocalRing.ResidueField.mapEquiv {R : Type u} {S : Type v} [] [] [] [] (f : R ≃+* S) :

A ring isomorphism defines an isomorphism of residue fields.

Equations
• = { toFun := , invFun := (LocalRing.ResidueField.map f.symm), left_inv := , right_inv := , map_mul' := , map_add' := }
Instances For
@[simp]
theorem LocalRing.ResidueField.mapEquiv.symm {R : Type u} {S : Type v} [] [] [] [] (f : R ≃+* S) :
.symm =
@[simp]
theorem LocalRing.ResidueField.mapEquiv_trans {R : Type u} {S : Type v} {T : Type w} [] [] [] [] [] [] (e₁ : R ≃+* S) (e₂ : S ≃+* T) :
LocalRing.ResidueField.mapEquiv (e₁.trans e₂) = .trans
@[simp]
@[simp]
theorem LocalRing.ResidueField.mapAut_apply {R : Type u} [] [] (f : R ≃+* R) :
LocalRing.ResidueField.mapAut f =

The group homomorphism from RingAut R to RingAut k where k is the residue field of R.

Equations
• LocalRing.ResidueField.mapAut = { toFun := LocalRing.ResidueField.mapEquiv, map_one' := , map_mul' := }
Instances For
instance LocalRing.ResidueField.instMulSemiringAction {R : Type u} [] [] (G : Type u_1) [] [] :

If G acts on R as a MulSemiringAction, then it also acts on LocalRing.ResidueField R.

Equations
@[simp]
theorem LocalRing.ResidueField.residue_smul {R : Type u} [] [] (G : Type u_1) [] [] (g : G) (r : R) :
(g r) = g r
theorem LocalRing.ker_eq_maximalIdeal {R : Type u} {K : Type u'} [] [] [] (φ : R →+* K) (hφ : ) :
@[instance 100]
instance Field.instLocalRing (K : Type u') [] :
Equations
• =
theorem RingEquiv.localRing {A : Type u_1} {B : Type u_2} [] [] [] (e : A ≃+* B) :