# mathlib3documentation

ring_theory.subsemiring.basic

# Bundled subsemirings #

THIS FILE IS SYNCHRONIZED WITH MATHLIB4. Any changes to this file require a corresponding PR to mathlib4.

We define bundled subsemirings and some standard constructions: `complete_lattice` structure, `subtype` and `inclusion` ring homomorphisms, subsemiring `map`, `comap` and range (`srange`) of a `ring_hom` etc.

@[class]
structure add_submonoid_with_one_class (S : Type u_1) (R : Type u_2) [ R] :
Prop
• to_one_mem_class :

`add_submonoid_with_one_class S R` says `S` is a type of subsets `s ≤ R` that contain `0`, `1`, and are closed under `(+)`

Instances of this typeclass
theorem nat_cast_mem {S : Type u_1} {R : Type u_2} [ R] (s : S) (n : ) :
n s
@[protected, instance]
def add_submonoid_with_one_class.to_add_monoid_with_one {S : Type u_1} {R : Type u_2} [ R] (s : S)  :
Equations
@[class]
structure subsemiring_class (S : Type u_1) (R : Type u) [ R] :
Prop
• to_submonoid_class :

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

Instances of this typeclass
@[protected, instance]
def subsemiring_class.add_submonoid_with_one_class (S : Type u_1) (R : Type u) [ R] [h : R] :
theorem coe_nat_mem {R : Type u} {S : Type v} [ R] [hSR : R] (s : S) (n : ) :
n s
@[protected, instance]
def subsemiring_class.to_non_assoc_semiring {R : Type u} {S : Type v} [ R] [hSR : R] (s : S) :

A subsemiring of a `non_assoc_semiring` inherits a `non_assoc_semiring` structure

Equations
@[protected, instance]
def subsemiring_class.nontrivial {R : Type u} {S : Type v} [ R] [hSR : R] (s : S) [nontrivial R] :
@[protected, instance]
def subsemiring_class.no_zero_divisors {R : Type u} {S : Type v} [ R] [hSR : R] (s : S)  :
def subsemiring_class.subtype {R : Type u} {S : Type v} [ R] [hSR : R] (s : S) :

The natural ring hom from a subsemiring of semiring `R` to `R`.

Equations
@[simp]
theorem subsemiring_class.coe_subtype {R : Type u} {S : Type v} [ R] [hSR : R] (s : S) :
@[protected, instance]
def subsemiring_class.to_semiring {S : Type v} (s : S) {R : Type u_1} [semiring R] [ R] [ R] :

A subsemiring of a `semiring` is a `semiring`.

Equations
• = _ _ _ _ _
@[simp, norm_cast]
theorem subsemiring_class.coe_pow {S : Type v} (s : S) {R : Type u_1} [semiring R] [ R] [ R] (x : s) (n : ) :
(x ^ n) = x ^ n
@[protected, instance]
def subsemiring_class.to_comm_semiring {S : Type v} (s : S) {R : Type u_1} [ R] [ R] :

A subsemiring of a `comm_semiring` is a `comm_semiring`.

Equations
• = _ _ _ _
@[protected, instance]
def subsemiring_class.to_ordered_semiring {S : Type v} (s : S) {R : Type u_1} [ R] [ R] :

A subsemiring of an `ordered_semiring` is an `ordered_semiring`.

Equations
• = _ _ _ _
@[protected, instance]
def subsemiring_class.to_strict_ordered_semiring {S : Type v} (s : S) {R : Type u_1} [ R] [ R] :

A subsemiring of an `strict_ordered_semiring` is an `strict_ordered_semiring`.

Equations
@[protected, instance]
def subsemiring_class.to_ordered_comm_semiring {S : Type v} (s : S) {R : Type u_1} [ R] [ R] :

A subsemiring of an `ordered_comm_semiring` is an `ordered_comm_semiring`.

Equations
@[protected, instance]
def subsemiring_class.to_strict_ordered_comm_semiring {S : Type v} (s : S) {R : Type u_1} [ R] [ R] :

A subsemiring of an `strict_ordered_comm_semiring` is an `strict_ordered_comm_semiring`.

Equations
@[protected, instance]
def subsemiring_class.to_linear_ordered_semiring {S : Type v} (s : S) {R : Type u_1} [ R] [ R] :

A subsemiring of a `linear_ordered_semiring` is a `linear_ordered_semiring`.

Equations
• = _ _ _ _ _
@[protected, instance]
def subsemiring_class.to_linear_ordered_comm_semiring {S : Type v} (s : S) {R : Type u_1} [ R] [ R] :

A subsemiring of a `linear_ordered_comm_semiring` is a `linear_ordered_comm_semiring`.

Equations
def subsemiring.to_add_submonoid {R : Type u} (self : subsemiring R) :

Reinterpret a `subsemiring` as an `add_submonoid`.

def subsemiring.to_submonoid {R : Type u} (self : subsemiring R) :

Reinterpret a `subsemiring` as a `submonoid`.

structure subsemiring (R : Type u)  :

A subsemiring of a semiring `R` is a subset `s` that is both a multiplicative and an additive submonoid.

Instances for `subsemiring`
@[protected, instance]
def subsemiring.set_like {R : Type u}  :
R
Equations
@[protected, instance]
@[simp]
theorem subsemiring.mem_carrier {R : Type u} {s : subsemiring R} {x : R} :
x s.carrier x s
@[ext]
theorem subsemiring.ext {R : Type u} {S T : subsemiring R} (h : (x : R), x S x T) :
S = T

Two subsemirings are equal if they have the same elements.

@[protected]
def subsemiring.copy {R : Type u} (S : subsemiring R) (s : set R) (hs : s = S) :

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

Equations
@[simp]
theorem subsemiring.coe_copy {R : Type u} (S : subsemiring R) (s : set R) (hs : s = S) :
(S.copy s hs) = s
theorem subsemiring.copy_eq {R : Type u} (S : subsemiring R) (s : set R) (hs : s = S) :
S.copy s hs = S
@[protected]
def subsemiring.mk' {R : Type u} (s : set R) (sm : submonoid R) (hm : sm = s) (sa : add_submonoid R) (ha : sa = s) :

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

Equations
@[simp]
theorem subsemiring.coe_mk' {R : Type u} {s : set R} {sm : submonoid R} (hm : sm = s) {sa : add_submonoid R} (ha : sa = s) :
sm hm sa ha) = s
@[simp]
theorem subsemiring.mem_mk' {R : Type u} {s : set R} {sm : submonoid R} (hm : sm = s) {sa : add_submonoid R} (ha : sa = s) {x : R} :
x sm hm sa ha x s
@[simp]
theorem subsemiring.mk'_to_submonoid {R : Type u} {s : set R} {sm : submonoid R} (hm : sm = s) {sa : add_submonoid R} (ha : sa = s) :
sm hm sa ha).to_submonoid = sm
@[simp]
theorem subsemiring.mk'_to_add_submonoid {R : Type u} {s : set R} {sm : submonoid R} (hm : sm = s) {sa : add_submonoid R} (ha : sa = s) :
sm hm sa ha).to_add_submonoid = sa
@[protected]
theorem subsemiring.one_mem {R : Type u} (s : subsemiring R) :
1 s

A subsemiring contains the semiring's 1.

@[protected]
theorem subsemiring.zero_mem {R : Type u} (s : subsemiring R) :
0 s

A subsemiring contains the semiring's 0.

@[protected]
theorem subsemiring.mul_mem {R : Type u} (s : subsemiring R) {x y : R} :
x s y s x * y s

A subsemiring is closed under multiplication.

@[protected]
theorem subsemiring.add_mem {R : Type u} (s : subsemiring R) {x y : R} :
x s y s x + y s

A subsemiring is closed under addition.

theorem subsemiring.list_prod_mem {R : Type u_1} [semiring R] (s : subsemiring R) {l : list R} :
( (x : R), x l x s) l.prod s

Product of a list of elements in a `subsemiring` is in the `subsemiring`.

@[protected]
theorem subsemiring.list_sum_mem {R : Type u} (s : subsemiring R) {l : list R} :
( (x : R), x l x s) l.sum s

Sum of a list of elements in a `subsemiring` is in the `subsemiring`.

@[protected]
theorem subsemiring.multiset_prod_mem {R : Type u_1} (s : subsemiring R) (m : multiset R) :
( (a : R), a m a s) m.prod s

Product of a multiset of elements in a `subsemiring` of a `comm_semiring` is in the `subsemiring`.

@[protected]
theorem subsemiring.multiset_sum_mem {R : Type u} (s : subsemiring R) (m : multiset R) :
( (a : R), a m a s) m.sum s

Sum of a multiset of elements in a `subsemiring` of a `semiring` is in the `add_subsemiring`.

@[protected]
theorem subsemiring.prod_mem {R : Type u_1} (s : subsemiring R) {ι : Type u_2} {t : finset ι} {f : ι R} (h : (c : ι), c t f c s) :
t.prod (λ (i : ι), f i) s

Product of elements of a subsemiring of a `comm_semiring` indexed by a `finset` is in the subsemiring.

@[protected]
theorem subsemiring.sum_mem {R : Type u} (s : subsemiring R) {ι : Type u_1} {t : finset ι} {f : ι R} (h : (c : ι), c t f c s) :
t.sum (λ (i : ι), f i) s

Sum of elements in an `subsemiring` of an `semiring` indexed by a `finset` is in the `add_subsemiring`.

@[protected, instance]

A subsemiring of a `non_assoc_semiring` inherits a `non_assoc_semiring` structure

Equations
@[simp, norm_cast]
theorem subsemiring.coe_one {R : Type u} (s : subsemiring R) :
1 = 1
@[simp, norm_cast]
theorem subsemiring.coe_zero {R : Type u} (s : subsemiring R) :
0 = 0
@[simp, norm_cast]
theorem subsemiring.coe_add {R : Type u} (s : subsemiring R) (x y : s) :
(x + y) = x + y
@[simp, norm_cast]
theorem subsemiring.coe_mul {R : Type u} (s : subsemiring R) (x y : s) :
(x * y) = x * y
@[protected, instance]
def subsemiring.nontrivial {R : Type u} (s : subsemiring R) [nontrivial R] :
@[protected]
theorem subsemiring.pow_mem {R : Type u_1} [semiring R] (s : subsemiring R) {x : R} (hx : x s) (n : ) :
x ^ n s
@[protected, instance]
@[protected, instance]
def subsemiring.to_semiring {R : Type u_1} [semiring R] (s : subsemiring R) :

A subsemiring of a `semiring` is a `semiring`.

Equations
@[simp, norm_cast]
theorem subsemiring.coe_pow {R : Type u_1} [semiring R] (s : subsemiring R) (x : s) (n : ) :
(x ^ n) = x ^ n
@[protected, instance]
def subsemiring.to_comm_semiring {R : Type u_1} (s : subsemiring R) :

A subsemiring of a `comm_semiring` is a `comm_semiring`.

Equations
def subsemiring.subtype {R : Type u} (s : subsemiring R) :

The natural ring hom from a subsemiring of semiring `R` to `R`.

Equations
@[simp]
theorem subsemiring.coe_subtype {R : Type u} (s : subsemiring R) :
@[protected, instance]

A subsemiring of an `ordered_semiring` is an `ordered_semiring`.

Equations
@[protected, instance]

A subsemiring of a `strict_ordered_semiring` is a `strict_ordered_semiring`.

Equations
@[protected, instance]

A subsemiring of an `ordered_comm_semiring` is an `ordered_comm_semiring`.

Equations
@[protected, instance]

A subsemiring of a `strict_ordered_comm_semiring` is a `strict_ordered_comm_semiring`.

Equations
@[protected, instance]

A subsemiring of a `linear_ordered_semiring` is a `linear_ordered_semiring`.

Equations
@[protected, instance]

A subsemiring of a `linear_ordered_comm_semiring` is a `linear_ordered_comm_semiring`.

Equations
@[protected]
theorem subsemiring.nsmul_mem {R : Type u} (s : subsemiring R) {x : R} (hx : x s) (n : ) :
n x s
@[simp]
theorem subsemiring.mem_to_submonoid {R : Type u} {s : subsemiring R} {x : R} :
x s
@[simp]
@[simp]
theorem subsemiring.mem_to_add_submonoid {R : Type u} {s : subsemiring R} {x : R} :
x s
@[protected, instance]
def subsemiring.has_top {R : Type u}  :

The subsemiring `R` of the semiring `R`.

Equations
@[simp]
theorem subsemiring.mem_top {R : Type u} (x : R) :
@[simp]
theorem subsemiring.coe_top {R : Type u}  :
@[simp]
theorem subsemiring.top_equiv_apply {R : Type u} (r : ) :
def subsemiring.top_equiv {R : Type u}  :

The ring equiv between the top element of `subsemiring R` and `R`.

Equations
def subsemiring.comap {R : Type u} {S : Type v} (f : R →+* S) (s : subsemiring S) :

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

Equations
@[simp]
theorem subsemiring.coe_comap {R : Type u} {S : Type v} (s : subsemiring S) (f : R →+* S) :
@[simp]
theorem subsemiring.mem_comap {R : Type u} {S : Type v} {s : subsemiring S} {f : R →+* S} {x : R} :
x f x s
theorem subsemiring.comap_comap {R : Type u} {S : Type v} {T : Type w} (s : subsemiring T) (g : S →+* T) (f : R →+* S) :
def subsemiring.map {R : Type u} {S : Type v} (f : R →+* S) (s : subsemiring R) :

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

Equations
@[simp]
theorem subsemiring.coe_map {R : Type u} {S : Type v} (f : R →+* S) (s : subsemiring R) :
s) = f '' s
@[simp]
theorem subsemiring.mem_map {R : Type u} {S : Type v} {f : R →+* S} {s : subsemiring R} {y : S} :
y (x : R) (H : x s), f x = y
@[simp]
theorem subsemiring.map_id {R : Type u} (s : subsemiring R) :
= s
theorem subsemiring.map_map {R : Type u} {S : Type v} {T : Type w} (s : subsemiring R) (g : S →+* T) (f : R →+* S) :
s) = subsemiring.map (g.comp f) s
theorem subsemiring.map_le_iff_le_comap {R : Type u} {S : Type v} {f : R →+* S} {s : subsemiring R} {t : subsemiring S} :
t s
theorem subsemiring.gc_map_comap {R : Type u} {S : Type v} (f : R →+* S) :
noncomputable def subsemiring.equiv_map_of_injective {R : Type u} {S : Type v} (s : subsemiring R) (f : R →+* S) (hf : function.injective f) :

A subsemiring is isomorphic to its image under an injective function

Equations
@[simp]
theorem subsemiring.coe_equiv_map_of_injective_apply {R : Type u} {S : Type v} (s : subsemiring R) (f : R →+* S) (hf : function.injective f) (x : s) :
( hf) x) = f x
def ring_hom.srange {R : Type u} {S : Type v} (f : R →+* S) :

The range of a ring homomorphism is a subsemiring. See Note [range copy pattern].

Equations
Instances for `↥ring_hom.srange`
@[simp]
theorem ring_hom.coe_srange {R : Type u} {S : Type v} (f : R →+* S) :
@[simp]
theorem ring_hom.mem_srange {R : Type u} {S : Type v} {f : R →+* S} {y : S} :
y f.srange (x : R), f x = y
theorem ring_hom.srange_eq_map {R : Type u} {S : Type v} (f : R →+* S) :
theorem ring_hom.mem_srange_self {R : Type u} {S : Type v} (f : R →+* S) (x : R) :
theorem ring_hom.map_srange {R : Type u} {S : Type v} {T : Type w} (g : S →+* T) (f : R →+* S) :
= (g.comp f).srange
@[protected, instance]
def ring_hom.fintype_srange {R : Type u} {S : Type v} [fintype R] [decidable_eq S] (f : R →+* S) :

The range of a morphism of semirings 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
@[protected, instance]
def subsemiring.has_bot {R : Type u}  :
Equations
@[protected, instance]
def subsemiring.inhabited {R : Type u}  :
Equations
theorem subsemiring.coe_bot {R : Type u}  :
theorem subsemiring.mem_bot {R : Type u} {x : R} :
x (n : ), n = x
@[protected, instance]
def subsemiring.has_inf {R : Type u}  :

The inf of two subsemirings is their intersection.

Equations
@[simp]
theorem subsemiring.coe_inf {R : Type u} (p p' : subsemiring R) :
(p p') = p p'
@[simp]
theorem subsemiring.mem_inf {R : Type u} {p p' : subsemiring R} {x : R} :
x p p' x p x p'
@[protected, instance]
def subsemiring.has_Inf {R : Type u}  :
Equations
@[simp, norm_cast]
theorem subsemiring.coe_Inf {R : Type u} (S : set (subsemiring R)) :
(has_Inf.Inf S) = (s : (H : s S), s
theorem subsemiring.mem_Inf {R : Type u} {S : set (subsemiring R)} {x : R} :
x (p : , p S x p
@[simp]
theorem subsemiring.Inf_to_submonoid {R : Type u} (s : set (subsemiring R)) :
= (t : (H : t s), t.to_submonoid
@[simp]
theorem subsemiring.Inf_to_add_submonoid {R : Type u} (s : set (subsemiring R)) :
= (t : (H : t s), t.to_add_submonoid
@[protected, instance]

Subsemirings of a semiring form a complete lattice.

Equations
theorem subsemiring.eq_top_iff' {R : Type u} (A : subsemiring R) :
A = (x : R), x A
def subsemiring.center (R : Type u_1) [semiring R] :

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

Equations
Instances for `↥subsemiring.center`
theorem subsemiring.coe_center (R : Type u_1) [semiring R] :
@[simp]
theorem subsemiring.center_to_submonoid (R : Type u_1) [semiring R] :
theorem subsemiring.mem_center_iff {R : Type u_1} [semiring R] {z : R} :
(g : R), g * z = z * g
@[protected, instance]
Equations
@[simp]
theorem subsemiring.center_eq_top (R : Type u_1)  :
@[protected, instance]

The center is commutative.

Equations
def subsemiring.centralizer {R : Type u_1} [semiring R] (s : set R) :

The centralizer of a set as subsemiring.

Equations
@[simp, norm_cast]
theorem subsemiring.coe_centralizer {R : Type u_1} [semiring R] (s : set R) :
theorem subsemiring.centralizer_to_submonoid {R : Type u_1} [semiring R] (s : set R) :
theorem subsemiring.mem_centralizer_iff {R : Type u_1} [semiring R] {s : set R} {z : R} :
(g : R), g s g * z = z * g
theorem subsemiring.center_le_centralizer {R : Type u_1} [semiring R] (s : set R) :
theorem subsemiring.centralizer_le {R : Type u_1} [semiring R] (s t : set R) (h : s t) :
@[simp]
theorem subsemiring.centralizer_eq_top_iff_subset {R : Type u_1} [semiring R] {s : set R} :
@[simp]
theorem subsemiring.centralizer_univ {R : Type u_1} [semiring R] :
def subsemiring.closure {R : Type u} (s : set R) :

The `subsemiring` generated by a set.

Equations
theorem subsemiring.mem_closure {R : Type u} {x : R} {s : set R} :
(S : , s S x S
@[simp]
theorem subsemiring.subset_closure {R : Type u} {s : set R} :

The subsemiring generated by a set includes the set.

theorem subsemiring.not_mem_of_not_mem_closure {R : Type u} {s : set R} {P : R} (hP : P ) :
P s
@[simp]
theorem subsemiring.closure_le {R : Type u} {s : set R} {t : subsemiring R} :
s t

A subsemiring `S` includes `closure s` if and only if it includes `s`.

theorem subsemiring.closure_mono {R : Type u} ⦃s t : set R⦄ (h : s t) :

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

theorem subsemiring.closure_eq_of_le {R : Type u} {s : set R} {t : subsemiring R} (h₁ : s t) (h₂ : t ) :
theorem subsemiring.mem_map_equiv {R : Type u} {S : Type v} {f : R ≃+* S} {K : subsemiring R} {x : S} :
x (f.symm) x K
theorem subsemiring.map_equiv_eq_comap_symm {R : Type u} {S : Type v} (f : R ≃+* S) (K : subsemiring R) :
= K
theorem subsemiring.comap_equiv_eq_map_symm {R : Type u} {S : Type v} (f : R ≃+* S) (K : subsemiring S) :
= K

The additive closure of a submonoid is a subsemiring.

Equations

The `subsemiring` generated by a multiplicative submonoid coincides with the `subsemiring.closure` of the submonoid itself .

@[simp]
theorem subsemiring.closure_submonoid_closure {R : Type u} (s : set R) :
theorem subsemiring.coe_closure_eq {R : Type u} (s : set R) :

The elements of the subsemiring closure of `M` are exactly the elements of the additive closure of a multiplicative submonoid `M`.

theorem subsemiring.mem_closure_iff {R : Type u} {s : set R} {x : R} :
@[simp]
theorem subsemiring.closure_induction {R : Type u} {s : set R} {p : R Prop} {x : R} (h : x ) (Hs : (x : R), x s p x) (H0 : p 0) (H1 : p 1) (Hadd : (x y : R), p x p y p (x + y)) (Hmul : (x y : R), p x p y p (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 and multiplication, then `p` holds for all elements of the closure of `s`.

theorem subsemiring.closure_induction₂ {R : Type u} {s : set R} {p : R R Prop} {x y : R} (hx : x ) (hy : y ) (Hs : (x : R), x s (y : R), y s 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) (Hadd_left : (x₁ x₂ y : R), p x₁ y p x₂ y p (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₁ y p x₂ y p (x₁ * x₂) y) (Hmul_right : (x y₁ y₂ : R), p x y₁ p x y₂ p x (y₁ * y₂)) :
p x y

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

theorem subsemiring.mem_closure_iff_exists_list {R : Type u_1} [semiring R] {s : set R} {x : R} :
(L : list (list R)), ( (t : list R), t L (y : R), y t y s) .sum = x
@[protected]

`closure` forms a Galois insertion with the coercion to set.

Equations
theorem subsemiring.closure_eq {R : Type u} (s : subsemiring R) :

Closure of a subsemiring `S` equals `S`.

@[simp]
theorem subsemiring.closure_empty {R : Type u}  :
@[simp]
theorem subsemiring.closure_univ {R : Type u}  :
theorem subsemiring.closure_union {R : Type u} (s t : set R) :
theorem subsemiring.closure_Union {R : Type u} {ι : Sort u_1} (s : ι set R) :
subsemiring.closure ( (i : ι), s i) = (i : ι), subsemiring.closure (s i)
theorem subsemiring.closure_sUnion {R : Type u} (s : set (set R)) :
= (t : set R) (H : t s),
theorem subsemiring.map_sup {R : Type u} {S : Type v} (s t : subsemiring R) (f : R →+* S) :
(s t) =
theorem subsemiring.map_supr {R : Type u} {S : Type v} {ι : Sort u_1} (f : R →+* S) (s : ι ) :
(supr s) = (i : ι), (s i)
theorem subsemiring.comap_inf {R : Type u} {S : Type v} (s t : subsemiring S) (f : R →+* S) :
(s t) =
theorem subsemiring.comap_infi {R : Type u} {S : Type v} {ι : Sort u_1} (f : R →+* S) (s : ι ) :
(infi s) = (i : ι), (s i)
@[simp]
theorem subsemiring.map_bot {R : Type u} {S : Type v} (f : R →+* S) :
@[simp]
theorem subsemiring.comap_top {R : Type u} {S : Type v} (f : R →+* S) :
def subsemiring.prod {R : Type u} {S : Type v} (s : subsemiring R) (t : subsemiring S) :

Given `subsemiring`s `s`, `t` of semirings `R`, `S` respectively, `s.prod t` is `s × t` as a subsemiring of `R × S`.

Equations
@[norm_cast]
theorem subsemiring.coe_prod {R : Type u} {S : Type v} (s : subsemiring R) (t : subsemiring S) :
(s.prod t) = s ×ˢ t
theorem subsemiring.mem_prod {R : Type u} {S : Type v} {s : subsemiring R} {t : subsemiring S} {p : R × S} :
p s.prod t p.fst s p.snd t
theorem subsemiring.prod_mono {R : Type u} {S : Type v} ⦃s₁ s₂ : subsemiring R⦄ (hs : s₁ s₂) ⦃t₁ t₂ : subsemiring S⦄ (ht : t₁ t₂) :
s₁.prod t₁ s₂.prod t₂
theorem subsemiring.prod_mono_right {R : Type u} {S : Type v} (s : subsemiring R) :
monotone (λ (t : , s.prod t)
theorem subsemiring.prod_mono_left {R : Type u} {S : Type v} (t : subsemiring S) :
monotone (λ (s : , s.prod t)
theorem subsemiring.prod_top {R : Type u} {S : Type v} (s : subsemiring R) :
s.prod = s
theorem subsemiring.top_prod {R : Type u} {S : Type v} (s : subsemiring S) :
.prod s = s
@[simp]
theorem subsemiring.top_prod_top {R : Type u} {S : Type v}  :
def subsemiring.prod_equiv {R : Type u} {S : Type v} (s : subsemiring R) (t : subsemiring S) :

Product of subsemirings is isomorphic to their product as monoids.

Equations
theorem subsemiring.mem_supr_of_directed {R : Type u} {ι : Sort u_1} [hι : nonempty ι] {S : ι } (hS : S) {x : R} :
(x (i : ι), S i) (i : ι), x S i
theorem subsemiring.coe_supr_of_directed {R : Type u} {ι : Sort u_1} [hι : nonempty ι] {S : ι } (hS : S) :
( (i : ι), S i) = (i : ι), (S i)
theorem subsemiring.mem_Sup_of_directed_on {R : Type u} {S : set (subsemiring R)} (Sne : S.nonempty) (hS : S) {x : R} :
x (s : (H : s S), x s
theorem subsemiring.coe_Sup_of_directed_on {R : Type u} {S : set (subsemiring R)} (Sne : S.nonempty) (hS : S) :
(has_Sup.Sup S) = (s : (H : s S), s
def ring_hom.dom_restrict {R : Type u} {S : Type v} {σR : Type u_1} [set_like σR R] [ R] (f : R →+* S) (s : σR) :

Restriction of a ring homomorphism to a subsemiring of the domain.

Equations
@[simp]
theorem ring_hom.restrict_apply {R : Type u} {S : Type v} {σR : Type u_1} [set_like σR R] [ R] (f : R →+* S) {s : σR} (x : s) :
def ring_hom.cod_restrict {R : Type u} {S : Type v} {σS : Type u_2} [set_like σS S] [ S] (f : R →+* S) (s : σS) (h : (x : R), f x s) :

Restriction of a ring homomorphism to a subsemiring of the codomain.

Equations
def ring_hom.restrict {R : Type u} {S : Type v} {σR : Type u_1} {σS : Type u_2} [set_like σR R] [set_like σS S] [ R] [ S] (f : R →+* S) (s' : σR) (s : σS) (h : (x : R), x s' f x s) :

The ring homomorphism from the preimage of `s` to `s`.

Equations
@[simp]
theorem ring_hom.coe_restrict_apply {R : Type u} {S : Type v} {σR : Type u_1} {σS : Type u_2} [set_like σR R] [set_like σS S] [ R] [ S] (f : R →+* S) (s' : σR) (s : σS) (h : (x : R), x s' f x s) (x : s') :
((f.restrict s' s h) x) = f x
@[simp]
theorem ring_hom.comp_restrict {R : Type u} {S : Type v} {σR : Type u_1} {σS : Type u_2} [set_like σR R] [set_like σS S] [ R] [ S] (f : R →+* S) (s' : σR) (s : σS) (h : (x : R), x s' f x s) :
(f.restrict s' s h) =
def ring_hom.srange_restrict {R : Type u} {S : Type v} (f : R →+* S) :

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

This is the bundled version of `set.range_factorization`.

Equations
@[simp]
theorem ring_hom.coe_srange_restrict {R : Type u} {S : Type v} (f : R →+* S) (x : R) :
theorem ring_hom.srange_restrict_surjective {R : Type u} {S : Type v} (f : R →+* S) :
theorem ring_hom.srange_top_iff_surjective {R : Type u} {S : Type v} {f : R →+* S} :
theorem ring_hom.srange_top_of_surjective {R : Type u} {S : Type v} (f : R →+* S) (hf : function.surjective f) :

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

def ring_hom.eq_slocus {R : Type u} {S : Type v} (f g : R →+* S) :

The subsemiring of elements `x : R` such that `f x = g x`

Equations
@[simp]
theorem ring_hom.eq_slocus_same {R : Type u} {S : Type v} (f : R →+* S) :
theorem ring_hom.eq_on_sclosure {R : Type u} {S : Type v} {f g : R →+* S} {s : set R} (h : g s) :
g

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

theorem ring_hom.eq_of_eq_on_stop {R : Type u} {S : Type v} {f g : R →+* S} (h : g ) :
f = g
theorem ring_hom.eq_of_eq_on_sdense {R : Type u} {S : Type v} {s : set R} (hs : = ) {f g : R →+* S} (h : g s) :
f = g
theorem ring_hom.sclosure_preimage_le {R : Type u} {S : Type v} (f : R →+* S) (s : set S) :
theorem ring_hom.map_sclosure {R : Type u} {S : Type v} (f : R →+* S) (s : set R) :

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

def subsemiring.inclusion {R : Type u} {S T : subsemiring R} (h : S T) :

The ring homomorphism associated to an inclusion of subsemirings.

Equations
@[simp]
theorem subsemiring.srange_subtype {R : Type u} (s : subsemiring R) :
@[simp]
theorem subsemiring.range_fst {R : Type u} {S : Type v}  :
@[simp]
theorem subsemiring.range_snd {R : Type u} {S : Type v}  :
@[simp]
theorem subsemiring.prod_bot_sup_bot_prod {R : Type u} {S : Type v} (s : subsemiring R) (t : subsemiring S) :
def ring_equiv.subsemiring_congr {R : Type u} {s t : subsemiring R} (h : s = t) :

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

Equations
def ring_equiv.sof_left_inverse {R : Type u} {S : Type v} {g : S R} {f : R →+* S} (h : f) :

Restrict a ring homomorphism with a left inverse to a ring isomorphism to its `ring_hom.srange`.

Equations
@[simp]
theorem ring_equiv.sof_left_inverse_apply {R : Type u} {S : Type v} {g : S R} {f : R →+* S} (h : f) (x : R) :
x) = f x
@[simp]
theorem ring_equiv.sof_left_inverse_symm_apply {R : Type u} {S : Type v} {g : S R} {f : R →+* S} (h : f) (x : (f.srange)) :
x = g x
def ring_equiv.subsemiring_map {R : Type u} {S : Type v} (e : R ≃+* S) (s : subsemiring R) :

Given an equivalence `e : R ≃+* S` of semirings and a subsemiring `s` of `R`, `subsemiring_map e s` is the induced equivalence between `s` and `s.map e`

Equations
@[simp]
theorem ring_equiv.subsemiring_map_symm_apply {R : Type u} {S : Type v} (e : R ≃+* S) (s : subsemiring R)  :
@[simp]
theorem ring_equiv.subsemiring_map_apply {R : Type u} {S : Type v} (e : R ≃+* S) (s : subsemiring R) (ᾰ : (s.to_add_submonoid)) :

### Actions by `subsemiring`s #

These are just copies of the definitions about `submonoid` starting from `submonoid.mul_action`. The only new result is `subsemiring.module`.

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

@[protected, instance]
def subsemiring.has_smul {R' : Type u_1} {α : Type u_2} [has_smul R' α] (S : subsemiring R') :
α

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

Equations
theorem subsemiring.smul_def {R' : Type u_1} {α : Type u_2} [has_smul R' α] {S : subsemiring R'} (g : S) (m : α) :
g m = g m
@[protected, instance]
def subsemiring.smul_comm_class_left {R' : Type u_1} {α : Type u_2} {β : Type u_3} [has_smul R' β] [ β] [ α β] (S : subsemiring R') :
β
@[protected, instance]
def subsemiring.smul_comm_class_right {R' : Type u_1} {α : Type u_2} {β : Type u_3} [ β] [has_smul R' β] [ R' β] (S : subsemiring R') :
β
@[protected, instance]
def subsemiring.is_scalar_tower {R' : Type u_1} {α : Type u_2} {β : Type u_3} [ β] [has_smul R' α] [has_smul R' β] [ α β] (S : subsemiring R') :
β

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

@[protected, instance]
def subsemiring.has_faithful_smul {R' : Type u_1} {α : Type u_2} [has_smul R' α] [ α] (S : subsemiring R') :
@[protected, instance]
def subsemiring.smul_with_zero {R' : Type u_1} {α : Type u_2} [has_zero α] [ α] (S : subsemiring R') :

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

Equations
@[protected, instance]
def subsemiring.mul_action {R' : Type u_1} {α : Type u_2} [semiring R'] [ α] (S : subsemiring R') :
α

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

Equations
@[protected, instance]
def subsemiring.distrib_mul_action {R' : Type u_1} {α : Type u_2} [semiring R'] [add_monoid α] [ α] (S : subsemiring R') :

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

Equations
@[protected, instance]
def subsemiring.mul_distrib_mul_action {R' : Type u_1} {α : Type u_2} [semiring R'] [monoid α] [ α] (S : subsemiring R') :

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

Equations
@[protected, instance]
def subsemiring.mul_action_with_zero {R' : Type u_1} {α : Type u_2} [semiring R'] [has_zero α] [ α] (S : subsemiring R') :

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

Equations
@[protected, instance]
def subsemiring.module {R' : Type u_1} {α : Type u_2} [semiring R'] [module R' α] (S : subsemiring R') :
α

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

Equations
@[protected, instance]
def subsemiring.mul_semiring_action {R' : Type u_1} {α : Type u_2} [semiring R'] [semiring α] [ α] (S : subsemiring R') :

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

Equations
@[protected, instance]

The center of a semiring acts commutatively on that semiring.

@[protected, instance]

The center of a semiring acts commutatively on that semiring.

def subsemiring.closure_comm_semiring_of_comm {R' : Type u_1} [semiring R'] {s : set R'} (hcomm : (a : R'), a s (b : R'), b s a * b = b * a) :

If all the elements of a set `s` commute, then `closure s` is a commutative monoid.

Equations
def pos_submonoid (R : Type u_1)  :

Submonoid of positive elements of an ordered semiring.

Equations
@[simp]
theorem mem_pos_monoid {R : Type u_1} (u : Rˣ) :
0 < u