# 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 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 SubringClass.toHasIntCast {R : Type u} {S : Type v} [Ring R] [SetLike S R] [hSR : ] (s : S) :
IntCast s
Equations
• = { intCast := fun (n : ) => { val := n, property := } }
instance SubringClass.toRing {R : Type u} {S : Type v} [Ring R] [SetLike S R] [hSR : ] (s : S) :
Ring s

A subring of a ring inherits a ring structure

Equations
instance SubringClass.toCommRing {S : Type v} (s : S) {R : Type u_1} [] [SetLike S R] [] :

A subring of a CommRing is a CommRing.

Equations
instance SubringClass.instIsDomainSubtypeMemInstMembershipToSemiringToRing {S : Type v} (s : S) {R : Type u_1} [Ring R] [] [SetLike S R] [] :

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) :
s →+* R

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

Equations
• One or more equations did not get rendered due to their size.
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
• = { toAddSubmonoid := { toAddSubsemigroup := { carrier := self.carrier, add_mem' := }, zero_mem' := }, neg_mem' := }
Instances For
instance Subring.instSetLikeSubring {R : Type u} [Ring R] :
SetLike () R
Equations
• Subring.instSetLikeSubring = { coe := fun (s : ) => s.carrier, coe_injective' := }
@[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 {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
• One or more equations did not get rendered due to their size.
Instances For
@[simp]
theorem Subring.coe_copy {R : Type u} [Ring R] (S : ) (s : Set R) (hs : s = S) :
(Subring.copy S s hs) = s
theorem Subring.copy_eq {R : Type u} [Ring R] (S : ) (s : Set R) (hs : s = S) :
Subring.copy S 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
• One or more equations did not get rendered due to their size.
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) :
def Subsemiring.toSubring {R : Type u} [Ring R] (s : ) (hneg : -1 s) :

A Subsemiring containing -1 is a Subring.

Equations
• = { 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) 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) 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)

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)

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) :
(Finset.prod t fun (i : ι) => 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) :
(Finset.sum t fun (i : ι) => 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 s

A subring of a ring inherits a ring structure

Equations
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 : s) (y : s) :
(x + y) = x + y
@[simp]
theorem Subring.coe_neg {R : Type u} [Ring R] (s : ) (x : s) :
(-x) = -x
@[simp]
theorem Subring.coe_mul {R : Type u} [Ring R] (s : ) (x : s) (y : 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 : s) (n : ) :
(x ^ n) = x ^ n
theorem Subring.coe_eq_zero_iff {R : Type u} [Ring R] (s : ) {x : s} :
x = 0 x = 0
instance Subring.toCommRing {R : Type u_1} [] (s : ) :

A subring of a CommRing is a CommRing.

Equations

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

Equations
• =

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

Equations
• =

A subring of a domain is a domain.

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

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

Equations
• One or more equations did not get rendered due to their size.
Instances For
@[simp]
theorem Subring.coeSubtype {R : Type u} [Ring R] (s : ) :
() = 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} :
x s
@[simp]
theorem Subring.coe_toAddSubgroup {R : Type u} [Ring R] (s : ) :
= s

## top #

instance Subring.instTopSubring {R : Type u} [Ring R] :
Top ()

The subring R of the ring R.

Equations
• Subring.instTopSubring = { top := let __src := ; let __src_1 := ; { toSubsemiring := { 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_apply {R : Type u} [Ring R] (r : ) :
Subring.topEquiv r = r
@[simp]
theorem Subring.topEquiv_symm_apply_coe {R : Type u} [Ring R] (r : R) :
((RingEquiv.symm Subring.topEquiv) r) = r
def Subring.topEquiv {R : Type u} [Ring R] :
≃+* R

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

Equations
• Subring.topEquiv = Subsemiring.topEquiv
Instances For
theorem Subring.card_top (R : Type u_1) [Ring R] [] :

## 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
• One or more equations did not get rendered due to their size.
Instances For
@[simp]
theorem Subring.coe_comap {R : Type u} {S : Type v} [Ring R] [Ring S] (s : ) (f : R →+* 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
• One or more equations did not get rendered due to their size.
Instances For
@[simp]
theorem Subring.coe_map {R : Type u} {S : Type v} [Ring R] [Ring S] (f : R →+* S) (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 ∃ x ∈ s, 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) :
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 : ) :
s ≃+* ()

A subring is isomorphic to its image under an injective function

Equations
• = let __src := Equiv.Set.image (f) (s) hf; { toEquiv := __src, 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 : s) :
(() 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) :
() =
@[simp]
theorem RingHom.mem_range {R : Type u} {S : Type v} [Ring R] [Ring S] {f : R →+* S} {y : S} :
∃ (x : R), f x = y
theorem RingHom.range_eq_map {R : Type u} {S : Type v} [Ring R] [Ring S] (f : R →+* S) :
theorem RingHom.mem_range_self {R : Type u} {S : Type v} [Ring R] [Ring S] (f : R →+* S) (x : R) :
f x
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) :
=
instance RingHom.fintypeRange {R : Type u} {S : Type v} [Ring R] [Ring S] [] [] (f : R →+* S) :
Fintype ()

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

## bot #

instance Subring.instBotSubring {R : Type u} [Ring R] :
Bot ()
Equations
• Subring.instBotSubring = { bot := }
Equations
• Subring.instInhabitedSubring = { 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.instInfSubring {R : Type u} [Ring R] :
Inf ()

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.instInfSetSubring {R : Type u} [Ring R] :
Equations
• Subring.instInfSetSubring = { sInf := fun (s : Set ()) => Subring.mk' (⋂ t ∈ s, t) (⨅ t ∈ s, t.toSubmonoid) (⨅ t ∈ s, ) }
@[simp]
theorem Subring.coe_sInf {R : Type u} [Ring R] (S : Set ()) :
(sInf S) = ⋂ s ∈ S, s
theorem Subring.mem_sInf {R : Type u} [Ring R] {S : Set ()} {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 ()) :
(sInf s).toSubmonoid = ⨅ t ∈ s, t.toSubmonoid
@[simp]
theorem Subring.sInf_toAddSubgroup {R : Type u} [Ring R] (s : Set ()) :
= ⨅ t ∈ s,

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
• One or more equations did not get rendered due to their size.
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) [] :

The center is commutative.

Equations
• One or more equations did not get rendered due to their size.
Equations
• One or more equations did not get rendered due to their size.
@[simp]
theorem Subring.center.coe_inv {K : Type u} [] (a : ()) :
a⁻¹ = (a)⁻¹
@[simp]
theorem Subring.center.coe_div {K : Type u} [] (a : ()) (b : ()) :
(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
• = let __src := ; { toSubsemiring := __src, neg_mem' := }
Instances For
@[simp]
theorem Subring.coe_centralizer {R : Type u} [Ring R] (s : Set R) :
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) :

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

Equations
• = let __src := ;
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.sum (List.map List.prod L) = 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)) :
= ⨆ t ∈ s,
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
• One or more equations did not get rendered due to their size.
Instances For
theorem Subring.coe_prod {R : Type u} {S : Type v} [Ring R] [Ring S] (s : ) (t : ) :
() = s ×ˢ t
theorem Subring.mem_prod {R : Type u} {S : Type v} [Ring R] [Ring S] {s : } {t : } {p : R × S} :
p 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₂) :
Subring.prod s₁ t₁ Subring.prod s₂ t₂
theorem Subring.prod_mono_right {R : Type u} {S : Type v} [Ring R] [Ring S] (s : ) :
Monotone fun (t : ) =>
theorem Subring.prod_mono_left {R : Type u} {S : Type v} [Ring R] [Ring S] (t : ) :
Monotone fun (s : ) =>
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] :
def Subring.prodEquiv {R : Type u} {S : Type v} [Ring R] [Ring S] (s : ) (t : ) :
() ≃+* s × t

Product of subrings is isomorphic to their product as rings.

Equations
• = let __src := Equiv.Set.prod s t; { toEquiv := __src, 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 (x x_1 : ) => x x_1) 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 (x x_1 : ) => x x_1) S) :
(⨆ (i : ι), S i) = ⋃ (i : ι), (S i)
theorem Subring.mem_sSup_of_directedOn {R : Type u} [Ring R] {S : Set ()} (Sne : ) (hS : DirectedOn (fun (x x_1 : ) => x x_1) S) {x : R} :
x sSup S ∃ s ∈ S, x s
theorem Subring.coe_sSup_of_directedOn {R : Type u} [Ring R] {S : Set ()} (Sne : ) (hS : DirectedOn (fun (x x_1 : ) => x x_1) S) :
(sSup S) = ⋃ s ∈ S, 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 () 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 (()) 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 (()) K
def RingHom.rangeRestrict {R : Type u} {S : Type v} [Ring R] [Ring S] (f : R →+* S) :
R →+* ()

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

This is the bundled version of Set.rangeFactorization.

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

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
• One or more equations did not get rendered due to their size.
Instances For
@[simp]
theorem RingHom.eqLocus_same {R : Type u} [Ring R] {S : Type v} [] (f : R →+* S) :
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) :
S →+* T

The ring homomorphism associated to an inclusion of subrings.

Equations
Instances For
@[simp]
theorem Subring.range_subtype {R : Type u} [Ring R] (s : ) :
theorem Subring.range_fst {R : Type u} {S : Type v} [Ring R] [Ring S] :
theorem Subring.range_snd {R : Type u} {S : Type v} [Ring R] [Ring S] :
@[simp]
theorem Subring.prod_bot_sup_bot_prod {R : Type u} {S : Type v} [Ring R] [Ring S] (s : ) (t : ) :
=
def RingEquiv.subringCongr {R : Type u} [Ring R] {s : } {t : } (h : s = t) :
s ≃+* t

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

Equations
• = let __src := ; { toEquiv := __src, 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 ≃+* ()

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) :
() = 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 : ()) :
= g x
@[simp]
theorem RingEquiv.subringMap_apply_coe {R : Type u} {S : Type v} [Ring R] [Ring S] {s : } (e : R ≃+* S) (x : (Subsemiring.toAddSubmonoid s.toSubsemiring)) :
( x) = e x
@[simp]
theorem RingEquiv.subringMap_symm_apply_coe {R : Type u} {S : Type v} [Ring R] [Ring S] {s : } (e : R ≃+* S) (y : ( '' (Subsemiring.toAddSubmonoid s.toSubsemiring))) :
() = () y
def RingEquiv.subringMap {R : Type u} {S : Type v} [Ring R] [Ring S] {s : } (e : R ≃+* S) :
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
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.instSMulSubtypeMemSubringInstMembershipInstSetLikeSubring {R : Type u} [Ring R] {α : Type u_1} [SMul R α] (S : ) :
SMul (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 : 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 (S) α β
Equations
• =
instance Subring.smulCommClass_right {R : Type u} [Ring R] {α : Type u_1} {β : Type u_2} [SMul α β] [SMul R β] [] (S : ) :
SMulCommClass α (S) β
Equations
• =

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

Equations
• =

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

Equations
• One or more equations did not get rendered due to their size.

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

Equations
• One or more equations did not get rendered due to their size.

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

Equations
• One or more equations did not get rendered due to their size.

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

Equations
• One or more equations did not get rendered due to their size.

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

Equations

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

Equations

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

Equations
• One or more equations did not get rendered due to their size.
instance Subring.center.smulCommClass_left {R : Type u} [Ring R] :
SMulCommClass (()) 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 (()) R

The center of a semiring acts commutatively on that semiring.

Equations
• =