# Subrings #

Let R be a ring. This file defines the "bundled" subring type Subring R, a type whose terms correspond to subrings of R. This is the preferred way to talk about subrings in mathlib. Unbundled subrings (s : Set R and IsSubring s) are not in this file, and they will ultimately be deprecated.

We prove that subrings are a complete lattice, and that you can map (pushforward) and comap (pull back) them along ring homomorphisms.

We define the closure construction from Set R to Subring R, sending a subset of R to the subring it generates, and prove that it is a Galois insertion.

## Main definitions #

Notation used here:

(R : Type u) [Ring R] (S : Type u) [Ring S] (f g : R →+* S) (A : Subring R) (B : Subring S) (s : Set R)

• Subring R : the type of subrings of a ring R.

• instance : CompleteLattice (Subring R) : the complete lattice structure on the subrings.

• Subring.center : the center of a ring R.

• Subring.closure : subring closure of a set, i.e., the smallest subring that includes the set.

• Subring.gi : closure : Set M → Subring M and coercion (↑) : Subring M → et M form a GaloisInsertion.

• comap f B : Subring A : the preimage of a subring B along the ring homomorphism f

• map f A : Subring B : the image of a subring A along the ring homomorphism f.

• prod A B : Subring (R × S) : the product of subrings

• f.range : Subring B : the range of the ring homomorphism f.

• eqLocus f g : Subring R : given ring homomorphisms f g : R →+* S, the subring of R where f x = g x

## Implementation notes #

A subring is implemented as a subsemiring which is also an additive subgroup. The initial PR was as a submonoid which is also an additive subgroup.

Lattice inclusion (e.g. ≤ and ⊓) is used rather than set notation (⊆ and ∩), although ∈ is defined as membership of a subring's underlying set.

## Tags #

subring, subrings

class SubringClass (S : Type u_1) (R : Type u) [Ring R] [SetLike S R] extends , :

SubringClass S R states that S is a type of subsets s ⊆ R that are both a multiplicative submonoid and an additive subgroup.

Instances
@[instance 100]
instance SubringClass.addSubgroupClass (S : Type u_1) (R : Type u) [SetLike S R] [Ring R] [h : ] :
Equations
• =
theorem intCast_mem {R : Type u} {S : Type v} [Ring R] [SetLike S R] [hSR : ] (s : S) (n : ) :
n s
@[deprecated intCast_mem]
theorem coe_int_mem {R : Type u} {S : Type v} [Ring R] [SetLike S R] [hSR : ] (s : S) (n : ) :
n s

Alias of intCast_mem.

@[instance 75]
instance SubringClass.toHasIntCast {R : Type u} {S : Type v} [Ring R] [SetLike S R] [hSR : ] (s : S) :
IntCast { x : R // x s }
Equations
• = { intCast := fun (n : ) => n, }
@[instance 75]
instance SubringClass.toRing {R : Type u} {S : Type v} [Ring R] [SetLike S R] [hSR : ] (s : S) :
Ring { x : R // x s }

A subring of a ring inherits a ring structure

Equations
@[instance 75]
instance SubringClass.toCommRing {S : Type v} (s : S) {R : Type u_1} [] [SetLike S R] [] :
CommRing { x : R // x s }

A subring of a CommRing is a CommRing.

Equations
@[instance 75]
instance SubringClass.instIsDomainSubtypeMem {S : Type v} (s : S) {R : Type u_1} [Ring R] [] [SetLike S R] [] :
IsDomain { x : R // x s }

A subring of a domain is a domain.

Equations
• =
def SubringClass.subtype {R : Type u} {S : Type v} [Ring R] [SetLike S R] [hSR : ] (s : S) :
{ x : R // x s } →+* R

The natural ring hom from a subring of ring R to R.

Equations
• = { toFun := Subtype.val, map_one' := , map_mul' := , map_zero' := , map_add' := }
Instances For
@[simp]
theorem SubringClass.coeSubtype {R : Type u} {S : Type v} [Ring R] [SetLike S R] [hSR : ] (s : S) :
= Subtype.val
@[simp]
theorem SubringClass.coe_natCast {R : Type u} {S : Type v} [Ring R] [SetLike S R] [hSR : ] (s : S) (n : ) :
n = n
@[simp]
theorem SubringClass.coe_intCast {R : Type u} {S : Type v} [Ring R] [SetLike S R] [hSR : ] (s : S) (n : ) :
n = n
structure Subring (R : Type u) [Ring R] extends :

Subring R is the type of subrings of R. A subring of R is a subset s that is a multiplicative submonoid and an additive subgroup. Note in particular that it shares the same 0 and 1 as R.

• carrier : Set R
• mul_mem' : ∀ {a b : R}, a self.carrierb self.carriera * b self.carrier
• one_mem' : 1 self.carrier
• add_mem' : ∀ {a b : R}, a self.carrierb self.carriera + b self.carrier
• zero_mem' : 0 self.carrier
• neg_mem' : ∀ {x : R}, x self.carrier-x self.carrier

G is closed under negation

Instances For
@[reducible]
abbrev Subring.toAddSubgroup {R : Type u} [Ring R] (self : ) :

Reinterpret a Subring as an AddSubgroup.

Equations
• self.toAddSubgroup = { carrier := self.carrier, add_mem' := , zero_mem' := , neg_mem' := }
Instances For
instance Subring.instSetLike {R : Type u} [Ring R] :
Equations
• Subring.instSetLike = { coe := fun (s : ) => s.carrier, coe_injective' := }
Equations
• =
@[simp]
theorem Subring.mem_toSubsemiring {R : Type u} [Ring R] {s : } {x : R} :
x s.toSubsemiring x s
theorem Subring.mem_carrier {R : Type u} [Ring R] {s : } {x : R} :
x s.carrier x s
@[simp]
theorem Subring.mem_mk {R : Type u} [Ring R] {S : } {x : R} (h : ∀ {x : R}, x S.carrier-x S.carrier) :
x { toSubsemiring := S, neg_mem' := h } x S
@[simp]
theorem Subring.coe_set_mk {R : Type u} [Ring R] (S : ) (h : ∀ {x : R}, x S.carrier-x S.carrier) :
{ toSubsemiring := S, neg_mem' := h } = S
@[simp]
theorem Subring.mk_le_mk {R : Type u} [Ring R] {S : } {S' : } (h₁ : ∀ {x : R}, x S.carrier-x S.carrier) (h₂ : ∀ {x : R}, x S'.carrier-x S'.carrier) :
{ toSubsemiring := S, neg_mem' := h₁ } { toSubsemiring := S', neg_mem' := h₂ } S S'
theorem Subring.ext_iff {R : Type u} [Ring R] {S : } {T : } :
S = T ∀ (x : R), x S x T
theorem Subring.ext {R : Type u} [Ring R] {S : } {T : } (h : ∀ (x : R), x S x T) :
S = T

Two subrings are equal if they have the same elements.

def Subring.copy {R : Type u} [Ring R] (S : ) (s : Set R) (hs : s = S) :

Copy of a subring with a new carrier equal to the old one. Useful to fix definitional equalities.

Equations
• S.copy s hs = { carrier := s, mul_mem' := , one_mem' := , add_mem' := , zero_mem' := , neg_mem' := }
Instances For
@[simp]
theorem Subring.coe_copy {R : Type u} [Ring R] (S : ) (s : Set R) (hs : s = S) :
(S.copy s hs) = s
theorem Subring.copy_eq {R : Type u} [Ring R] (S : ) (s : Set R) (hs : s = S) :
S.copy s hs = S
theorem Subring.toSubsemiring_injective {R : Type u} [Ring R] :
Function.Injective Subring.toSubsemiring
theorem Subring.toSubsemiring_strictMono {R : Type u} [Ring R] :
StrictMono Subring.toSubsemiring
theorem Subring.toSubsemiring_mono {R : Type u} [Ring R] :
Monotone Subring.toSubsemiring
theorem Subring.toAddSubgroup_injective {R : Type u} [Ring R] :
theorem Subring.toAddSubgroup_strictMono {R : Type u} [Ring R] :
theorem Subring.toAddSubgroup_mono {R : Type u} [Ring R] :
theorem Subring.toSubmonoid_injective {R : Type u} [Ring R] :
Function.Injective fun (s : ) => s.toSubmonoid
theorem Subring.toSubmonoid_strictMono {R : Type u} [Ring R] :
StrictMono fun (s : ) => s.toSubmonoid
theorem Subring.toSubmonoid_mono {R : Type u} [Ring R] :
Monotone fun (s : ) => s.toSubmonoid
def Subring.mk' {R : Type u} [Ring R] (s : Set R) (sm : ) (sa : ) (hm : sm = s) (ha : sa = s) :

Construct a Subring R from a set s, a submonoid sm, and an additive subgroup sa such that x ∈ s ↔ x ∈ sm ↔ x ∈ sa.

Equations
• Subring.mk' s sm sa hm ha = { toSubmonoid := sm.copy s , add_mem' := , zero_mem' := , neg_mem' := }
Instances For
@[simp]
theorem Subring.coe_mk' {R : Type u} [Ring R] {s : Set R} {sm : } (hm : sm = s) {sa : } (ha : sa = s) :
(Subring.mk' s sm sa hm ha) = s
@[simp]
theorem Subring.mem_mk' {R : Type u} [Ring R] {s : Set R} {sm : } (hm : sm = s) {sa : } (ha : sa = s) {x : R} :
x Subring.mk' s sm sa hm ha x s
@[simp]
theorem Subring.mk'_toSubmonoid {R : Type u} [Ring R] {s : Set R} {sm : } (hm : sm = s) {sa : } (ha : sa = s) :
(Subring.mk' s sm sa hm ha).toSubmonoid = sm
@[simp]
theorem Subring.mk'_toAddSubgroup {R : Type u} [Ring R] {s : Set R} {sm : } (hm : sm = s) {sa : } (ha : sa = s) :
(Subring.mk' s sm sa hm ha).toAddSubgroup = sa
def Subsemiring.toSubring {R : Type u} [Ring R] (s : ) (hneg : -1 s) :

A Subsemiring containing -1 is a Subring.

Equations
• s.toSubring hneg = { toSubsemiring := s, neg_mem' := }
Instances For
theorem Subring.one_mem {R : Type u} [Ring R] (s : ) :
1 s

A subring contains the ring's 1.

theorem Subring.zero_mem {R : Type u} [Ring R] (s : ) :
0 s

A subring contains the ring's 0.

theorem Subring.mul_mem {R : Type u} [Ring R] (s : ) {x : R} {y : R} :
x sy sx * y s

A subring is closed under multiplication.

theorem Subring.add_mem {R : Type u} [Ring R] (s : ) {x : R} {y : R} :
x sy sx + y s

A subring is closed under addition.

theorem Subring.neg_mem {R : Type u} [Ring R] (s : ) {x : R} :
x s-x s

A subring is closed under negation.

theorem Subring.sub_mem {R : Type u} [Ring R] (s : ) {x : R} {y : R} (hx : x s) (hy : y s) :
x - y s

A subring is closed under subtraction

theorem Subring.list_prod_mem {R : Type u} [Ring R] (s : ) {l : List R} :
(∀ xl, x s)l.prod s

Product of a list of elements in a subring is in the subring.

theorem Subring.list_sum_mem {R : Type u} [Ring R] (s : ) {l : List R} :
(∀ xl, x s)l.sum s

Sum of a list of elements in a subring is in the subring.

theorem Subring.multiset_prod_mem {R : Type u_1} [] (s : ) (m : ) :
(∀ am, a s)m.prod s

Product of a multiset of elements in a subring of a CommRing is in the subring.

theorem Subring.multiset_sum_mem {R : Type u_1} [Ring R] (s : ) (m : ) :
(∀ am, a s)m.sum s

Sum of a multiset of elements in a Subring of a Ring is in the Subring.

theorem Subring.prod_mem {R : Type u_1} [] (s : ) {ι : Type u_2} {t : } {f : ιR} (h : ct, f c s) :
it, f i s

Product of elements of a subring of a CommRing indexed by a Finset is in the subring.

theorem Subring.sum_mem {R : Type u_1} [Ring R] (s : ) {ι : Type u_2} {t : } {f : ιR} (h : ct, f c s) :
it, f i s

Sum of elements in a Subring of a Ring indexed by a Finset is in the Subring.

instance Subring.toRing {R : Type u} [Ring R] (s : ) :
Ring { x : R // x s }

A subring of a ring inherits a ring structure

Equations
• s.toRing =
theorem Subring.zsmul_mem {R : Type u} [Ring R] (s : ) {x : R} (hx : x s) (n : ) :
n x s
theorem Subring.pow_mem {R : Type u} [Ring R] (s : ) {x : R} (hx : x s) (n : ) :
x ^ n s
@[simp]
theorem Subring.coe_add {R : Type u} [Ring R] (s : ) (x : { x : R // x s }) (y : { x : R // x s }) :
(x + y) = x + y
@[simp]
theorem Subring.coe_neg {R : Type u} [Ring R] (s : ) (x : { x : R // x s }) :
(-x) = -x
@[simp]
theorem Subring.coe_mul {R : Type u} [Ring R] (s : ) (x : { x : R // x s }) (y : { x : R // x s }) :
(x * y) = x * y
@[simp]
theorem Subring.coe_zero {R : Type u} [Ring R] (s : ) :
0 = 0
@[simp]
theorem Subring.coe_one {R : Type u} [Ring R] (s : ) :
1 = 1
@[simp]
theorem Subring.coe_pow {R : Type u} [Ring R] (s : ) (x : { x : R // x s }) (n : ) :
(x ^ n) = x ^ n
theorem Subring.coe_eq_zero_iff {R : Type u} [Ring R] (s : ) {x : { x : R // x s }} :
x = 0 x = 0
instance Subring.toCommRing {R : Type u_1} [] (s : ) :
CommRing { x : R // x s }

A subring of a CommRing is a CommRing.

Equations
• s.toCommRing =
instance Subring.instNontrivialSubtypeMem {R : Type u_1} [Ring R] [] (s : ) :
Nontrivial { x : R // x s }

A subring of a non-trivial ring is non-trivial.

Equations
• =
instance Subring.instNoZeroDivisorsSubtypeMem {R : Type u_1} [Ring R] [] (s : ) :
NoZeroDivisors { x : R // x s }

A subring of a ring with no zero divisors has no zero divisors.

Equations
• =
instance Subring.instIsDomainSubtypeMem {R : Type u_1} [Ring R] [] (s : ) :
IsDomain { x : R // x s }

A subring of a domain is a domain.

Equations
• =
def Subring.subtype {R : Type u} [Ring R] (s : ) :
{ x : R // x s } →+* R

The natural ring hom from a subring of ring R to R.

Equations
• s.subtype = { toFun := Subtype.val, map_one' := , map_mul' := , map_zero' := , map_add' := }
Instances For
@[simp]
theorem Subring.coeSubtype {R : Type u} [Ring R] (s : ) :
s.subtype = Subtype.val
theorem Subring.coe_natCast {R : Type u} [Ring R] (s : ) (n : ) :
n = n
theorem Subring.coe_intCast {R : Type u} [Ring R] (s : ) (n : ) :
n = n

## Partial order #

@[simp]
theorem Subring.coe_toSubsemiring {R : Type u} [Ring R] (s : ) :
s.toSubsemiring = s
@[simp]
theorem Subring.mem_toSubmonoid {R : Type u} [Ring R] {s : } {x : R} :
x s.toSubmonoid x s
@[simp]
theorem Subring.coe_toSubmonoid {R : Type u} [Ring R] (s : ) :
s.toSubmonoid = s
@[simp]
theorem Subring.mem_toAddSubgroup {R : Type u} [Ring R] {s : } {x : R} :
@[simp]
theorem Subring.coe_toAddSubgroup {R : Type u} [Ring R] (s : ) :

## top #

instance Subring.instTop {R : Type u} [Ring R] :

The subring R of the ring R.

Equations
• Subring.instTop = { top := let __src := ; let __src_1 := ; { toSubmonoid := __src, add_mem' := , zero_mem' := , neg_mem' := } }
@[simp]
theorem Subring.mem_top {R : Type u} [Ring R] (x : R) :
@[simp]
theorem Subring.coe_top {R : Type u} [Ring R] :
= Set.univ
@[simp]
theorem Subring.topEquiv_symm_apply_coe {R : Type u} [Ring R] (r : R) :
(Subring.topEquiv.symm r) = r
@[simp]
theorem Subring.topEquiv_apply {R : Type u} [Ring R] (r : { x : R // x }) :
Subring.topEquiv r = r
def Subring.topEquiv {R : Type u} [Ring R] :
{ x : R // x } ≃+* R

The ring equiv between the top element of Subring R and R.

Equations
• Subring.topEquiv = Subsemiring.topEquiv
Instances For
instance Subring.instFintypeSubtypeMemTop {R : Type u_1} [Ring R] [] :
Fintype { x : R // x }
Equations
• Subring.instFintypeSubtypeMemTop =
theorem Subring.card_top (R : Type u_1) [Ring R] [] :
Fintype.card { x : R // x } =

## comap #

def Subring.comap {R : Type u} {S : Type v} [Ring R] [Ring S] (f : R →+* S) (s : ) :

The preimage of a subring along a ring homomorphism is a subring.

Equations
• = { carrier := f ⁻¹' s.carrier, mul_mem' := , one_mem' := , add_mem' := , zero_mem' := , neg_mem' := }
Instances For
@[simp]
theorem Subring.coe_comap {R : Type u} {S : Type v} [Ring R] [Ring S] (s : ) (f : R →+* S) :
(Subring.comap f s) = f ⁻¹' s
@[simp]
theorem Subring.mem_comap {R : Type u} {S : Type v} [Ring R] [Ring S] {s : } {f : R →+* S} {x : R} :
x f x s
theorem Subring.comap_comap {R : Type u} {S : Type v} {T : Type w} [Ring R] [Ring S] [Ring T] (s : ) (g : S →+* T) (f : R →+* S) :

## map #

def Subring.map {R : Type u} {S : Type v} [Ring R] [Ring S] (f : R →+* S) (s : ) :

The image of a subring along a ring homomorphism is a subring.

Equations
• = { carrier := f '' s.carrier, mul_mem' := , one_mem' := , add_mem' := , zero_mem' := , neg_mem' := }
Instances For
@[simp]
theorem Subring.coe_map {R : Type u} {S : Type v} [Ring R] [Ring S] (f : R →+* S) (s : ) :
(Subring.map f s) = f '' s
@[simp]
theorem Subring.mem_map {R : Type u} {S : Type v} [Ring R] [Ring S] {f : R →+* S} {s : } {y : S} :
y xs, f x = y
@[simp]
theorem Subring.map_id {R : Type u} [Ring R] (s : ) :
= s
theorem Subring.map_map {R : Type u} {S : Type v} {T : Type w} [Ring R] [Ring S] [Ring T] (s : ) (g : S →+* T) (f : R →+* S) :
Subring.map g (Subring.map f s) = Subring.map (g.comp f) s
theorem Subring.map_le_iff_le_comap {R : Type u} {S : Type v} [Ring R] [Ring S] {f : R →+* S} {s : } {t : } :
t s
theorem Subring.gc_map_comap {R : Type u} {S : Type v} [Ring R] [Ring S] (f : R →+* S) :
noncomputable def Subring.equivMapOfInjective {R : Type u} {S : Type v} [Ring R] [Ring S] (s : ) (f : R →+* S) (hf : ) :
{ x : R // x s } ≃+* { x : S // x }

A subring is isomorphic to its image under an injective function

Equations
• s.equivMapOfInjective f hf = { toEquiv := Equiv.Set.image (⇑f) (↑s) hf, map_mul' := , map_add' := }
Instances For
@[simp]
theorem Subring.coe_equivMapOfInjective_apply {R : Type u} {S : Type v} [Ring R] [Ring S] (s : ) (f : R →+* S) (hf : ) (x : { x : R // x s }) :
((s.equivMapOfInjective f hf) x) = f x

## range #

def RingHom.range {R : Type u} {S : Type v} [Ring R] [Ring S] (f : R →+* S) :

The range of a ring homomorphism, as a subring of the target. See Note [range copy pattern].

Equations
Instances For
@[simp]
theorem RingHom.coe_range {R : Type u} {S : Type v} [Ring R] [Ring S] (f : R →+* S) :
f.range =
@[simp]
theorem RingHom.mem_range {R : Type u} {S : Type v} [Ring R] [Ring S] {f : R →+* S} {y : S} :
y f.range ∃ (x : R), f x = y
theorem RingHom.range_eq_map {R : Type u} {S : Type v} [Ring R] [Ring S] (f : R →+* S) :
f.range =
theorem RingHom.mem_range_self {R : Type u} {S : Type v} [Ring R] [Ring S] (f : R →+* S) (x : R) :
f x f.range
theorem RingHom.map_range {R : Type u} {S : Type v} {T : Type w} [Ring R] [Ring S] [Ring T] (g : S →+* T) (f : R →+* S) :
Subring.map g f.range = (g.comp f).range
instance RingHom.fintypeRange {R : Type u} {S : Type v} [Ring R] [Ring S] [] [] (f : R →+* S) :
Fintype { x : S // x f.range }

The range of a ring homomorphism is a fintype, if the domain is a fintype. Note: this instance can form a diamond with Subtype.fintype in the presence of Fintype S.

Equations
• f.fintypeRange =

## bot #

instance Subring.instBot {R : Type u} [Ring R] :
Equations
• Subring.instBot = { bot := .range }
instance Subring.instInhabited {R : Type u} [Ring R] :
Equations
• Subring.instInhabited = { default := }
theorem Subring.coe_bot {R : Type u} [Ring R] :
= Set.range Int.cast
theorem Subring.mem_bot {R : Type u} [Ring R] {x : R} :
x ∃ (n : ), n = x

## inf #

instance Subring.instInf {R : Type u} [Ring R] :

The inf of two subrings is their intersection.

Equations
• One or more equations did not get rendered due to their size.
@[simp]
theorem Subring.coe_inf {R : Type u} [Ring R] (p : ) (p' : ) :
(p p') = p p'
@[simp]
theorem Subring.mem_inf {R : Type u} [Ring R] {p : } {p' : } {x : R} :
x p p' x p x p'
instance Subring.instInfSet {R : Type u} [Ring R] :
Equations
• Subring.instInfSet = { sInf := fun (s : Set (Subring R)) => Subring.mk' (⋂ ts, t) (⨅ ts, t.toSubmonoid) (⨅ ts, t.toAddSubgroup) }
@[simp]
theorem Subring.coe_sInf {R : Type u} [Ring R] (S : Set (Subring R)) :
(sInf S) = sS, s
theorem Subring.mem_sInf {R : Type u} [Ring R] {S : Set (Subring R)} {x : R} :
x sInf S pS, x p
@[simp]
theorem Subring.coe_iInf {R : Type u} [Ring R] {ι : Sort u_1} {S : ι} :
(⨅ (i : ι), S i) = ⋂ (i : ι), (S i)
theorem Subring.mem_iInf {R : Type u} [Ring R] {ι : Sort u_1} {S : ι} {x : R} :
x ⨅ (i : ι), S i ∀ (i : ι), x S i
@[simp]
theorem Subring.sInf_toSubmonoid {R : Type u} [Ring R] (s : Set (Subring R)) :
(sInf s).toSubmonoid = ts, t.toSubmonoid
@[simp]
theorem Subring.sInf_toAddSubgroup {R : Type u} [Ring R] (s : Set (Subring R)) :
instance Subring.instCompleteLattice {R : Type u} [Ring R] :

Subrings of a ring form a complete lattice.

Equations
theorem Subring.eq_top_iff' {R : Type u} [Ring R] (A : ) :
A = ∀ (x : R), x A

## Center of a ring #

def Subring.center (R : Type u) [Ring R] :

The center of a ring R is the set of elements that commute with everything in R

Equations
• = { carrier := , mul_mem' := , one_mem' := , add_mem' := , zero_mem' := , neg_mem' := }
Instances For
theorem Subring.coe_center (R : Type u) [Ring R] :
=
@[simp]
theorem Subring.center_toSubsemiring (R : Type u) [Ring R] :
.toSubsemiring =
theorem Subring.mem_center_iff {R : Type u} [Ring R] {z : R} :
∀ (g : R), g * z = z * g
instance Subring.decidableMemCenter {R : Type u} [Ring R] [] [] :
DecidablePred fun (x : R) =>
Equations
@[simp]
theorem Subring.center_eq_top (R : Type u_1) [] :
instance Subring.instCommRingSubtypeMemCenter {R : Type u} [Ring R] :
CommRing { x : R // }

The center is commutative.

Equations
• Subring.instCommRingSubtypeMemCenter =
instance Subring.instField {K : Type u} [] :
Field { x : K // }
Equations
• Subring.instField = Field.mk zpowRec (fun (q : ℚ≥0) => ) (fun (q : ) => )
@[simp]
theorem Subring.center.coe_inv {K : Type u} [] (a : { x : K // }) :
a⁻¹ = (↑a)⁻¹
@[simp]
theorem Subring.center.coe_div {K : Type u} [] (a : { x : K // }) (b : { x : K // }) :
(a / b) = a / b
def Subring.centralizer {R : Type u} [Ring R] (s : Set R) :

The centralizer of a set inside a ring as a Subring.

Equations
• = { toSubsemiring := , neg_mem' := }
Instances For
@[simp]
theorem Subring.coe_centralizer {R : Type u} [Ring R] (s : Set R) :
= s.centralizer
theorem Subring.centralizer_toSubmonoid {R : Type u} [Ring R] (s : Set R) :
.toSubmonoid =
theorem Subring.centralizer_toSubsemiring {R : Type u} [Ring R] (s : Set R) :
.toSubsemiring =
theorem Subring.mem_centralizer_iff {R : Type u} [Ring R] {s : Set R} {z : R} :
gs, g * z = z * g
theorem Subring.center_le_centralizer {R : Type u} [Ring R] (s : Set R) :
theorem Subring.centralizer_le {R : Type u} [Ring R] (s : Set R) (t : Set R) (h : s t) :
@[simp]
theorem Subring.centralizer_eq_top_iff_subset {R : Type u} [Ring R] {s : Set R} :
s
@[simp]
theorem Subring.centralizer_univ {R : Type u} [Ring R] :

## subring closure of a subset #

def Subring.closure {R : Type u} [Ring R] (s : Set R) :

The Subring generated by a set.

Equations
Instances For
theorem Subring.mem_closure {R : Type u} [Ring R] {x : R} {s : Set R} :
∀ (S : ), s Sx S
@[simp]
theorem Subring.subset_closure {R : Type u} [Ring R] {s : Set R} :
s

The subring generated by a set includes the set.

theorem Subring.not_mem_of_not_mem_closure {R : Type u} [Ring R] {s : Set R} {P : R} (hP : P) :
Ps
@[simp]
theorem Subring.closure_le {R : Type u} [Ring R] {s : Set R} {t : } :
s t

A subring t includes closure s if and only if it includes s.

theorem Subring.closure_mono {R : Type u} [Ring R] ⦃s : Set R ⦃t : Set R (h : s t) :

Subring closure of a set is monotone in its argument: if s ⊆ t, then closure s ≤ closure t.

theorem Subring.closure_eq_of_le {R : Type u} [Ring R] {s : Set R} {t : } (h₁ : s t) (h₂ : ) :
theorem Subring.closure_induction {R : Type u} [Ring R] {s : Set R} {p : RProp} {x : R} (h : ) (Hs : xs, p x) (zero : p 0) (one : p 1) (add : ∀ (x y : R), p xp yp (x + y)) (neg : ∀ (x : R), p xp (-x)) (mul : ∀ (x y : R), p xp yp (x * y)) :
p x

An induction principle for closure membership. If p holds for 0, 1, and all elements of s, and is preserved under addition, negation, and multiplication, then p holds for all elements of the closure of s.

theorem Subring.closure_induction' {R : Type u} [Ring R] {s : Set R} {p : (x : R) → Prop} (mem : ∀ (x : R) (h : x s), p x ) (zero : p 0 ) (one : p 1 ) (add : ∀ (x : R) (hx : ) (y : R) (hy : ), p x hxp y hyp (x + y) ) (neg : ∀ (x : R) (hx : ), p x hxp (-x) ) (mul : ∀ (x : R) (hx : ) (y : R) (hy : ), p x hxp y hyp (x * y) ) {a : R} (ha : ) :
p a ha
theorem Subring.closure_induction₂ {R : Type u} [Ring R] {s : Set R} {p : RRProp} {a : R} {b : R} (ha : ) (hb : ) (Hs : xs, ys, p x y) (H0_left : ∀ (x : R), p 0 x) (H0_right : ∀ (x : R), p x 0) (H1_left : ∀ (x : R), p 1 x) (H1_right : ∀ (x : R), p x 1) (Hneg_left : ∀ (x y : R), p x yp (-x) y) (Hneg_right : ∀ (x y : R), p x yp x (-y)) (Hadd_left : ∀ (x₁ x₂ y : R), p x₁ yp x₂ yp (x₁ + x₂) y) (Hadd_right : ∀ (x y₁ y₂ : R), p x y₁p x y₂p x (y₁ + y₂)) (Hmul_left : ∀ (x₁ x₂ y : R), p x₁ yp x₂ yp (x₁ * x₂) y) (Hmul_right : ∀ (x y₁ y₂ : R), p x y₁p x y₂p x (y₁ * y₂)) :
p a b

An induction principle for closure membership, for predicates with two arguments.

theorem Subring.mem_closure_iff {R : Type u} [Ring R] {s : Set R} {x : R} :
def Subring.closureCommRingOfComm {R : Type u} [Ring R] {s : Set R} (hcomm : as, bs, a * b = b * a) :
CommRing { x : R // }

If all elements of s : Set A commute pairwise, then closure s is a commutative ring.

Equations
Instances For
theorem Subring.exists_list_of_mem_closure {R : Type u} [Ring R] {s : Set R} {x : R} (h : ) :
∃ (L : List (List R)), (∀ tL, yt, y s y = -1) (List.map List.prod L).sum = x
def Subring.gi (R : Type u) [Ring R] :
GaloisInsertion Subring.closure SetLike.coe

closure forms a Galois insertion with the coercion to set.

Equations
• = { choice := fun (s : Set R) (x : s) => , gc := , le_l_u := , choice_eq := }
Instances For
theorem Subring.closure_eq {R : Type u} [Ring R] (s : ) :
= s

Closure of a subring S equals S.

@[simp]
theorem Subring.closure_empty {R : Type u} [Ring R] :
@[simp]
theorem Subring.closure_univ {R : Type u} [Ring R] :
theorem Subring.closure_union {R : Type u} [Ring R] (s : Set R) (t : Set R) :
theorem Subring.closure_iUnion {R : Type u} [Ring R] {ι : Sort u_1} (s : ιSet R) :
Subring.closure (⋃ (i : ι), s i) = ⨆ (i : ι), Subring.closure (s i)
theorem Subring.closure_sUnion {R : Type u} [Ring R] (s : Set (Set R)) :
= ts,
theorem Subring.map_sup {R : Type u} {S : Type v} [Ring R] [Ring S] (s : ) (t : ) (f : R →+* S) :
Subring.map f (s t) =
theorem Subring.map_iSup {R : Type u} {S : Type v} [Ring R] [Ring S] {ι : Sort u_1} (f : R →+* S) (s : ι) :
Subring.map f (iSup s) = ⨆ (i : ι), Subring.map f (s i)
theorem Subring.comap_inf {R : Type u} {S : Type v} [Ring R] [Ring S] (s : ) (t : ) (f : R →+* S) :
theorem Subring.comap_iInf {R : Type u} {S : Type v} [Ring R] [Ring S] {ι : Sort u_1} (f : R →+* S) (s : ι) :
Subring.comap f (iInf s) = ⨅ (i : ι), Subring.comap f (s i)
@[simp]
theorem Subring.map_bot {R : Type u} {S : Type v} [Ring R] [Ring S] (f : R →+* S) :
@[simp]
theorem Subring.comap_top {R : Type u} {S : Type v} [Ring R] [Ring S] (f : R →+* S) :
def Subring.prod {R : Type u} {S : Type v} [Ring R] [Ring S] (s : ) (t : ) :
Subring (R × S)

Given Subrings s, t of rings R, S respectively, s.prod t is s ×̂ t as a subring of R × S.

Equations
• s.prod t = { carrier := s ×ˢ t, mul_mem' := , one_mem' := , add_mem' := , zero_mem' := , neg_mem' := }
Instances For
theorem Subring.coe_prod {R : Type u} {S : Type v} [Ring R] [Ring S] (s : ) (t : ) :
(s.prod t) = s ×ˢ t
theorem Subring.mem_prod {R : Type u} {S : Type v} [Ring R] [Ring S] {s : } {t : } {p : R × S} :
p s.prod t p.1 s p.2 t
theorem Subring.prod_mono {R : Type u} {S : Type v} [Ring R] [Ring S] ⦃s₁ : ⦃s₂ : (hs : s₁ s₂) ⦃t₁ : ⦃t₂ : (ht : t₁ t₂) :
s₁.prod t₁ s₂.prod t₂
theorem Subring.prod_mono_right {R : Type u} {S : Type v} [Ring R] [Ring S] (s : ) :
Monotone fun (t : ) => s.prod t
theorem Subring.prod_mono_left {R : Type u} {S : Type v} [Ring R] [Ring S] (t : ) :
Monotone fun (s : ) => s.prod t
theorem Subring.prod_top {R : Type u} {S : Type v} [Ring R] [Ring S] (s : ) :
theorem Subring.top_prod {R : Type u} {S : Type v} [Ring R] [Ring S] (s : ) :
@[simp]
theorem Subring.top_prod_top {R : Type u} {S : Type v} [Ring R] [Ring S] :
.prod =
def Subring.prodEquiv {R : Type u} {S : Type v} [Ring R] [Ring S] (s : ) (t : ) :
{ x : R × S // x s.prod t } ≃+* { x : R // x s } × { x : S // x t }

Product of subrings is isomorphic to their product as rings.

Equations
• s.prodEquiv t = { toEquiv := Equiv.Set.prod s t, map_mul' := , map_add' := }
Instances For
theorem Subring.mem_iSup_of_directed {R : Type u} [Ring R] {ι : Sort u_1} [hι : ] {S : ι} (hS : Directed (fun (x1 x2 : ) => x1 x2) S) {x : R} :
x ⨆ (i : ι), S i ∃ (i : ι), x S i

The underlying set of a non-empty directed sSup of subrings is just a union of the subrings. Note that this fails without the directedness assumption (the union of two subrings is typically not a subring)

theorem Subring.coe_iSup_of_directed {R : Type u} [Ring R] {ι : Sort u_1} [hι : ] {S : ι} (hS : Directed (fun (x1 x2 : ) => x1 x2) S) :
(⨆ (i : ι), S i) = ⋃ (i : ι), (S i)
theorem Subring.mem_sSup_of_directedOn {R : Type u} [Ring R] {S : Set (Subring R)} (Sne : S.Nonempty) (hS : DirectedOn (fun (x1 x2 : ) => x1 x2) S) {x : R} :
x sSup S sS, x s
theorem Subring.coe_sSup_of_directedOn {R : Type u} [Ring R] {S : Set (Subring R)} (Sne : S.Nonempty) (hS : DirectedOn (fun (x1 x2 : ) => x1 x2) S) :
(sSup S) = sS, s
theorem Subring.mem_map_equiv {R : Type u} {S : Type v} [Ring R] [Ring S] {f : R ≃+* S} {K : } {x : S} :
x Subring.map (↑f) K f.symm x K
theorem Subring.map_equiv_eq_comap_symm {R : Type u} {S : Type v} [Ring R] [Ring S] (f : R ≃+* S) (K : ) :
Subring.map (↑f) K = Subring.comap (↑f.symm) K
theorem Subring.comap_equiv_eq_map_symm {R : Type u} {S : Type v} [Ring R] [Ring S] (f : R ≃+* S) (K : ) :
Subring.comap (↑f) K = Subring.map (↑f.symm) K
def RingHom.rangeRestrict {R : Type u} {S : Type v} [Ring R] [Ring S] (f : R →+* S) :
R →+* { x : S // x f.range }

Restriction of a ring homomorphism to its range interpreted as a subsemiring.

This is the bundled version of Set.rangeFactorization.

Equations
• f.rangeRestrict = f.codRestrict f.range
Instances For
@[simp]
theorem RingHom.coe_rangeRestrict {R : Type u} {S : Type v} [Ring R] [Ring S] (f : R →+* S) (x : R) :
(f.rangeRestrict x) = f x
theorem RingHom.rangeRestrict_surjective {R : Type u} {S : Type v} [Ring R] [Ring S] (f : R →+* S) :
Function.Surjective f.rangeRestrict
theorem RingHom.range_top_iff_surjective {R : Type u} {S : Type v} [Ring R] [Ring S] {f : R →+* S} :
f.range =
@[simp]
theorem RingHom.range_top_of_surjective {R : Type u} {S : Type v} [Ring R] [Ring S] (f : R →+* S) (hf : ) :
f.range =

The range of a surjective ring homomorphism is the whole of the codomain.

def RingHom.eqLocus {R : Type u} [Ring R] {S : Type v} [] (f : R →+* S) (g : R →+* S) :

The subring of elements x : R such that f x = g x, i.e., the equalizer of f and g as a subring of R

Equations
• f.eqLocus g = { carrier := {x : R | f x = g x}, mul_mem' := , one_mem' := , add_mem' := , zero_mem' := , neg_mem' := }
Instances For
@[simp]
theorem RingHom.eqLocus_same {R : Type u} [Ring R] {S : Type v} [] (f : R →+* S) :
f.eqLocus f =
theorem RingHom.eqOn_set_closure {R : Type u} [Ring R] {S : Type v} [] {f : R →+* S} {g : R →+* S} {s : Set R} (h : Set.EqOn (⇑f) (⇑g) s) :
Set.EqOn f g

If two ring homomorphisms are equal on a set, then they are equal on its subring closure.

theorem RingHom.eq_of_eqOn_set_top {R : Type u} [Ring R] {S : Type v} [] {f : R →+* S} {g : R →+* S} (h : Set.EqOn f g ) :
f = g
theorem RingHom.eq_of_eqOn_set_dense {R : Type u} [Ring R] {S : Type v} [] {s : Set R} (hs : ) {f : R →+* S} {g : R →+* S} (h : Set.EqOn (⇑f) (⇑g) s) :
f = g
theorem RingHom.closure_preimage_le {R : Type u} {S : Type v} [Ring R] [Ring S] (f : R →+* S) (s : Set S) :
theorem RingHom.map_closure {R : Type u} {S : Type v} [Ring R] [Ring S] (f : R →+* S) (s : Set R) :
= Subring.closure (f '' s)

The image under a ring homomorphism of the subring generated by a set equals the subring generated by the image of the set.

def Subring.inclusion {R : Type u} [Ring R] {S : } {T : } (h : S T) :
{ x : R // x S } →+* { x : R // x T }

The ring homomorphism associated to an inclusion of subrings.

Equations
• = S.subtype.codRestrict T
Instances For
@[simp]
theorem Subring.range_subtype {R : Type u} [Ring R] (s : ) :
s.subtype.range = s
theorem Subring.range_fst {R : Type u} {S : Type v} [Ring R] [Ring S] :
(RingHom.fst R S).rangeS =
theorem Subring.range_snd {R : Type u} {S : Type v} [Ring R] [Ring S] :
(RingHom.snd R S).rangeS =
@[simp]
theorem Subring.prod_bot_sup_bot_prod {R : Type u} {S : Type v} [Ring R] [Ring S] (s : ) (t : ) :
s.prod .prod t = s.prod t
def RingEquiv.subringCongr {R : Type u} [Ring R] {s : } {t : } (h : s = t) :
{ x : R // x s } ≃+* { x : R // x t }

Makes the identity isomorphism from a proof two subrings of a multiplicative monoid are equal.

Equations
• = { toEquiv := , map_mul' := , map_add' := }
Instances For
def RingEquiv.ofLeftInverse {R : Type u} {S : Type v} [Ring R] [Ring S] {g : SR} {f : R →+* S} (h : ) :
R ≃+* { x : S // x f.range }

Restrict a ring homomorphism with a left inverse to a ring isomorphism to its RingHom.range.

Equations
• One or more equations did not get rendered due to their size.
Instances For
@[simp]
theorem RingEquiv.ofLeftInverse_apply {R : Type u} {S : Type v} [Ring R] [Ring S] {g : SR} {f : R →+* S} (h : ) (x : R) :
( x) = f x
@[simp]
theorem RingEquiv.ofLeftInverse_symm_apply {R : Type u} {S : Type v} [Ring R] [Ring S] {g : SR} {f : R →+* S} (h : ) (x : { x : S // x f.range }) :
.symm x = g x
@[simp]
theorem RingEquiv.subringMap_symm_apply_coe {R : Type u} {S : Type v} [Ring R] [Ring S] {s : } (e : R ≃+* S) (y : (e.toAddEquiv '' s.toAddSubmonoid)) :
(e.subringMap.symm y) = (↑e).symm y
@[simp]
theorem RingEquiv.subringMap_apply_coe {R : Type u} {S : Type v} [Ring R] [Ring S] {s : } (e : R ≃+* S) (x : s.toAddSubmonoid) :
(e.subringMap x) = e x
def RingEquiv.subringMap {R : Type u} {S : Type v} [Ring R] [Ring S] {s : } (e : R ≃+* S) :
{ x : R // x s } ≃+* { x : S // x Subring.map e.toRingHom s }

Given an equivalence e : R ≃+* S of rings and a subring s of R, subringMap e s is the induced equivalence between s and s.map e

Equations
• e.subringMap = e.subsemiringMap s.toSubsemiring
Instances For
theorem Subring.InClosure.recOn {R : Type u} [Ring R] {s : Set R} {C : RProp} {x : R} (hx : ) (h1 : C 1) (hneg1 : C (-1)) (hs : zs, ∀ (n : R), C nC (z * n)) (ha : ∀ {x y : R}, C xC yC (x + y)) :
C x
theorem Subring.closure_preimage_le {R : Type u} {S : Type v} [Ring R] [Ring S] (f : R →+* S) (s : Set S) :
theorem AddSubgroup.int_mul_mem {R : Type u} [Ring R] {G : } (k : ) {g : R} (h : g G) :
k * g G

## Actions by Subrings #

These are just copies of the definitions about Subsemiring starting from Subsemiring.MulAction.

When R is commutative, Algebra.ofSubring provides a stronger result than those found in this file, which uses the same scalar action.

instance Subring.instSMulSubtypeMem {R : Type u} [Ring R] {α : Type u_1} [SMul R α] (S : ) :
SMul { x : R // x S } α

The action by a subring is the action by the underlying ring.

Equations
theorem Subring.smul_def {R : Type u} [Ring R] {α : Type u_1} [SMul R α] {S : } (g : { x : R // x S }) (m : α) :
g m = g m
instance Subring.smulCommClass_left {R : Type u} [Ring R] {α : Type u_1} {β : Type u_2} [SMul R β] [SMul α β] [] (S : ) :
SMulCommClass { x : R // x S } α β
Equations
• =
instance Subring.smulCommClass_right {R : Type u} [Ring R] {α : Type u_1} {β : Type u_2} [SMul α β] [SMul R β] [] (S : ) :
SMulCommClass α { x : R // x S } β
Equations
• =
instance Subring.instIsScalarTowerSubtypeMem {R : Type u} [Ring R] {α : Type u_1} {β : Type u_2} [SMul α β] [SMul R α] [SMul R β] [] (S : ) :
IsScalarTower { x : R // x S } α β

Note that this provides IsScalarTower S R R which is needed by smul_mul_assoc.

Equations
• =
instance Subring.instFaithfulSMulSubtypeMem {R : Type u} [Ring R] {α : Type u_1} [SMul R α] [] (S : ) :
FaithfulSMul { x : R // x S } α
Equations
• =
instance Subring.instMulActionSubtypeMem {R : Type u} [Ring R] {α : Type u_1} [] (S : ) :
MulAction { x : R // x S } α

The action by a subring is the action by the underlying ring.

Equations
instance Subring.instDistribMulActionSubtypeMem {R : Type u} [Ring R] {α : Type u_1} [] [] (S : ) :
DistribMulAction { x : R // x S } α

The action by a subring is the action by the underlying ring.

Equations
instance Subring.instMulDistribMulActionSubtypeMem {R : Type u} [Ring R] {α : Type u_1} [] [] (S : ) :
MulDistribMulAction { x : R // x S } α

The action by a subring is the action by the underlying ring.

Equations
instance Subring.instSMulWithZeroSubtypeMem {R : Type u} [Ring R] {α : Type u_1} [Zero α] [] (S : ) :
SMulWithZero { x : R // x S } α

The action by a subring is the action by the underlying ring.

Equations
instance Subring.instMulActionWithZeroSubtypeMem {R : Type u} [Ring R] {α : Type u_1} [Zero α] [] (S : ) :
MulActionWithZero { x : R // x S } α

The action by a subring is the action by the underlying ring.

Equations
• S.instMulActionWithZeroSubtypeMem = S.mulActionWithZero
instance Subring.instModuleSubtypeMem {R : Type u} [Ring R] {α : Type u_1} [] [Module R α] (S : ) :
Module { x : R // x S } α

The action by a subring is the action by the underlying ring.

Equations
• S.instModuleSubtypeMem = S.module
instance Subring.instMulSemiringActionSubtypeMem {R : Type u} [Ring R] {α : Type u_1} [] [] (S : ) :
MulSemiringAction { x : R // x S } α

The action by a subsemiring is the action by the underlying ring.

Equations
instance Subring.center.smulCommClass_left {R : Type u} [Ring R] :
SMulCommClass { x : R // } R R

The center of a semiring acts commutatively on that semiring.

Equations
• =
instance Subring.center.smulCommClass_right {R : Type u} [Ring R] :
SMulCommClass R { x : R // } R

The center of a semiring acts commutatively on that semiring.

Equations
• =
theorem Subring.map_comap_eq {R : Type u} {S : Type v} [Ring R] [Ring S] (f : R →+* S) (t : ) :
Subring.map f (Subring.comap f t) = t f.range
theorem Subring.map_comap_eq_self {R : Type u} {S : Type v} [Ring R] [Ring S] {f : R →+* S} {t : } (h : t f.range) :
theorem Subring.map_comap_eq_self_of_surjective {R : Type u} {S : Type v} [Ring R] [Ring S] {f : R →+* S} (hf : ) (t : ) :
theorem Subring.comap_map_eq {R : Type u} {S : Type v} [Ring R] [Ring S] (f : R →+* S) (s : ) :
theorem Subring.comap_map_eq_self {R : Type u} {S : Type v} [Ring R] [Ring S] {f : R →+* S} {s : } (h : f ⁻¹' {0} s) :
theorem Subring.comap_map_eq_self_of_injective {R : Type u} {S : Type v} [Ring R] [Ring S] {f : R →+* S} (hf : ) (s : ) :