# Bundled subsemirings #

We define bundled subsemirings and some standard constructions: CompleteLattice structure, Subtype and inclusion ring homomorphisms, subsemiring map, comap and range (rangeS) of a RingHom etc.

class AddSubmonoidWithOneClass (S : Type u_1) (R : Type u_2) [] [SetLike S R] extends , :

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

Instances
theorem natCast_mem {S : Type u_1} {R : Type u_2} [] [SetLike S R] (s : S) [] (n : ) :
n s
@[deprecated natCast_mem]
theorem coe_nat_mem {S : Type u_1} {R : Type u_2} [] [SetLike S R] (s : S) [] (n : ) :
n s

Alias of natCast_mem.

theorem ofNat_mem {S : Type u_1} {R : Type u_2} [] [SetLike S R] [] (s : S) (n : ) [n.AtLeastTwo] :
s
@[instance 74]
instance AddSubmonoidWithOneClass.toAddMonoidWithOne {S : Type u_1} {R : Type u_2} [] [SetLike S R] (s : S) [] :
Equations
• = let __src := ;
class SubsemiringClass (S : Type u_1) (R : Type u) [] [SetLike S R] extends , :

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

Instances
@[instance 100]
instance SubsemiringClass.addSubmonoidWithOneClass (S : Type u_1) (R : Type u) [] [SetLike S R] [h : ] :
Equations
• =
@[instance 75]
instance SubsemiringClass.toNonAssocSemiring {R : Type u} {S : Type v} [] [SetLike S R] [hSR : ] (s : S) :

A subsemiring of a NonAssocSemiring inherits a NonAssocSemiring structure

Equations
instance SubsemiringClass.nontrivial {R : Type u} {S : Type v} [] [SetLike S R] [hSR : ] (s : S) [] :
Equations
• =
instance SubsemiringClass.noZeroDivisors {R : Type u} {S : Type v} [] [SetLike S R] [hSR : ] (s : S) [] :
Equations
• =
def SubsemiringClass.subtype {R : Type u} {S : Type v} [] [SetLike S R] [hSR : ] (s : S) :
s →+* R

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

Equations
• One or more equations did not get rendered due to their size.
Instances For
@[simp]
theorem SubsemiringClass.coe_subtype {R : Type u} {S : Type v} [] [SetLike S R] [hSR : ] (s : S) :
= Subtype.val
@[instance 75]
instance SubsemiringClass.toSemiring {S : Type v} (s : S) {R : Type u_1} [] [SetLike S R] [] :

A subsemiring of a Semiring is a Semiring.

Equations
@[simp]
theorem SubsemiringClass.coe_pow {S : Type v} (s : S) {R : Type u_1} [] [SetLike S R] [] (x : s) (n : ) :
(x ^ n) = x ^ n
instance SubsemiringClass.toCommSemiring {S : Type v} (s : S) {R : Type u_1} [] [SetLike S R] [] :

A subsemiring of a CommSemiring is a CommSemiring.

Equations
instance SubsemiringClass.instCharZero {R : Type u} {S : Type v} [] [SetLike S R] [hSR : ] (s : S) [] :
Equations
• =
structure Subsemiring (R : Type u) [] extends :

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

• 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

The sum of two elements of an additive subsemigroup belongs to the subsemigroup.

• zero_mem' : 0 self.carrier

An additive submonoid contains 0.

Instances For
@[reducible]
abbrev Subsemiring.toAddSubmonoid {R : Type u} [] (self : ) :

Reinterpret a Subsemiring as an AddSubmonoid.

Equations
• self.toAddSubmonoid = { carrier := self.carrier, add_mem' := , zero_mem' := }
Instances For
instance Subsemiring.instSetLike {R : Type u} [] :
SetLike () R
Equations
• Subsemiring.instSetLike = { coe := fun (s : ) => s.carrier, coe_injective' := }
Equations
• =
@[simp]
theorem Subsemiring.mem_toSubmonoid {R : Type u} [] {s : } {x : R} :
x s.toSubmonoid x s
theorem Subsemiring.mem_carrier {R : Type u} [] {s : } {x : R} :
x s.carrier x s
theorem Subsemiring.ext {R : Type u} [] {S : } {T : } (h : ∀ (x : R), x S x T) :
S = T

Two subsemirings are equal if they have the same elements.

def Subsemiring.copy {R : Type u} [] (S : ) (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
• S.copy s hs = let __src := S.toAddSubmonoid.copy s hs; let __src := S.copy s hs; { carrier := s, mul_mem' := , one_mem' := , add_mem' := , zero_mem' := }
Instances For
@[simp]
theorem Subsemiring.coe_copy {R : Type u} [] (S : ) (s : Set R) (hs : s = S) :
(S.copy s hs) = s
theorem Subsemiring.copy_eq {R : Type u} [] (S : ) (s : Set R) (hs : s = S) :
S.copy s hs = S
theorem Subsemiring.toSubmonoid_injective {R : Type u} [] :
Function.Injective Subsemiring.toSubmonoid
theorem Subsemiring.toSubmonoid_strictMono {R : Type u} [] :
StrictMono Subsemiring.toSubmonoid
theorem Subsemiring.toSubmonoid_mono {R : Type u} [] :
Monotone Subsemiring.toSubmonoid
theorem Subsemiring.toAddSubmonoid_injective {R : Type u} [] :
theorem Subsemiring.toAddSubmonoid_strictMono {R : Type u} [] :
theorem Subsemiring.toAddSubmonoid_mono {R : Type u} [] :
def Subsemiring.mk' {R : Type u} [] (s : Set R) (sm : ) (hm : sm = s) (sa : ) (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
• Subsemiring.mk' s sm hm sa ha = { carrier := s, mul_mem' := , one_mem' := , add_mem' := , zero_mem' := }
Instances For
@[simp]
theorem Subsemiring.coe_mk' {R : Type u} [] {s : Set R} {sm : } (hm : sm = s) {sa : } (ha : sa = s) :
(Subsemiring.mk' s sm hm sa ha) = s
@[simp]
theorem Subsemiring.mem_mk' {R : Type u} [] {s : Set R} {sm : } (hm : sm = s) {sa : } (ha : sa = s) {x : R} :
x Subsemiring.mk' s sm hm sa ha x s
@[simp]
theorem Subsemiring.mk'_toSubmonoid {R : Type u} [] {s : Set R} {sm : } (hm : sm = s) {sa : } (ha : sa = s) :
(Subsemiring.mk' s sm hm sa ha).toSubmonoid = sm
@[simp]
theorem Subsemiring.mk'_toAddSubmonoid {R : Type u} [] {s : Set R} {sm : } (hm : sm = s) {sa : } (ha : sa = s) :
(Subsemiring.mk' s sm hm sa ha).toAddSubmonoid = sa
theorem Subsemiring.one_mem {R : Type u} [] (s : ) :
1 s

A subsemiring contains the semiring's 1.

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

A subsemiring contains the semiring's 0.

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

A subsemiring is closed under multiplication.

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

A subsemiring is closed under addition.

theorem Subsemiring.list_prod_mem {R : Type u_1} [] (s : ) {l : List R} :
(xl, x s)l.prod s

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

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

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

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

Product of a multiset of elements in a Subsemiring of a CommSemiring is in the Subsemiring.

theorem Subsemiring.multiset_sum_mem {R : Type u} [] (s : ) (m : ) :
(am, a s)m.sum s

Sum of a multiset of elements in a Subsemiring of a Semiring is in the add_subsemiring.

theorem Subsemiring.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 subsemiring of a CommSemiring indexed by a Finset is in the subsemiring.

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

Sum of elements in a Subsemiring of a Semiring indexed by a Finset is in the add_subsemiring.

instance Subsemiring.toNonAssocSemiring {R : Type u} [] (s : ) :

A subsemiring of a NonAssocSemiring inherits a NonAssocSemiring structure

Equations
• s.toNonAssocSemiring =
@[simp]
theorem Subsemiring.coe_one {R : Type u} [] (s : ) :
1 = 1
@[simp]
theorem Subsemiring.coe_zero {R : Type u} [] (s : ) :
0 = 0
@[simp]
theorem Subsemiring.coe_add {R : Type u} [] (s : ) (x : s) (y : s) :
(x + y) = x + y
@[simp]
theorem Subsemiring.coe_mul {R : Type u} [] (s : ) (x : s) (y : s) :
(x * y) = x * y
instance Subsemiring.nontrivial {R : Type u} [] (s : ) [] :
Equations
• =
theorem Subsemiring.pow_mem {R : Type u_1} [] (s : ) {x : R} (hx : x s) (n : ) :
x ^ n s
instance Subsemiring.noZeroDivisors {R : Type u} [] (s : ) [] :
Equations
• =
instance Subsemiring.toSemiring {R : Type u_1} [] (s : ) :

A subsemiring of a Semiring is a Semiring.

Equations
• s.toSemiring = let __src := s.toNonAssocSemiring; let __src_1 := s.toMonoid; Semiring.mk Monoid.npow
@[simp]
theorem Subsemiring.coe_pow {R : Type u_1} [] (s : ) (x : s) (n : ) :
(x ^ n) = x ^ n
instance Subsemiring.toCommSemiring {R : Type u_1} [] (s : ) :

A subsemiring of a CommSemiring is a CommSemiring.

Equations
• s.toCommSemiring = let __src := s.toSemiring;
def Subsemiring.subtype {R : Type u} [] (s : ) :
s →+* R

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

Equations
• s.subtype = let __src := s.subtype; let __src := s.toAddSubmonoid.subtype; { toFun := Subtype.val, map_one' := , map_mul' := , map_zero' := , map_add' := }
Instances For
@[simp]
theorem Subsemiring.coe_subtype {R : Type u} [] (s : ) :
s.subtype = Subtype.val
theorem Subsemiring.nsmul_mem {R : Type u} [] (s : ) {x : R} (hx : x s) (n : ) :
n x s
@[simp]
theorem Subsemiring.coe_toSubmonoid {R : Type u} [] (s : ) :
s.toSubmonoid = s
@[simp]
theorem Subsemiring.coe_carrier_toSubmonoid {R : Type u} [] (s : ) :
s.carrier = s
theorem Subsemiring.mem_toAddSubmonoid {R : Type u} [] {s : } {x : R} :
theorem Subsemiring.coe_toAddSubmonoid {R : Type u} [] (s : ) :
instance Subsemiring.instTop {R : Type u} [] :
Top ()

The subsemiring R of the semiring R.

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

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

Equations
• Subsemiring.topEquiv = { toFun := fun (r : ) => r, invFun := fun (r : R) => r, , left_inv := , right_inv := , map_mul' := , map_add' := }
Instances For
def Subsemiring.comap {R : Type u} {S : Type v} [] [] (f : R →+* S) (s : ) :

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

Equations
• One or more equations did not get rendered due to their size.
Instances For
@[simp]
theorem Subsemiring.coe_comap {R : Type u} {S : Type v} [] [] (s : ) (f : R →+* S) :
() = f ⁻¹' s
@[simp]
theorem Subsemiring.mem_comap {R : Type u} {S : Type v} [] [] {s : } {f : R →+* S} {x : R} :
x f x s
theorem Subsemiring.comap_comap {R : Type u} {S : Type v} {T : Type w} [] [] [] (s : ) (g : S →+* T) (f : R →+* S) :
= Subsemiring.comap (g.comp f) s
def Subsemiring.map {R : Type u} {S : Type v} [] [] (f : R →+* S) (s : ) :

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

Equations
• One or more equations did not get rendered due to their size.
Instances For
@[simp]
theorem Subsemiring.coe_map {R : Type u} {S : Type v} [] [] (f : R →+* S) (s : ) :
() = f '' s
@[simp]
theorem Subsemiring.mem_map {R : Type u} {S : Type v} [] [] {f : R →+* S} {s : } {y : S} :
y xs, f x = y
@[simp]
theorem Subsemiring.map_id {R : Type u} [] (s : ) :
= s
theorem Subsemiring.map_map {R : Type u} {S : Type v} {T : Type w} [] [] [] (s : ) (g : S →+* T) (f : R →+* S) :
= Subsemiring.map (g.comp f) s
theorem Subsemiring.map_le_iff_le_comap {R : Type u} {S : Type v} [] [] {f : R →+* S} {s : } {t : } :
t s
theorem Subsemiring.gc_map_comap {R : Type u} {S : Type v} [] [] (f : R →+* S) :
noncomputable def Subsemiring.equivMapOfInjective {R : Type u} {S : Type v} [] [] (s : ) (f : R →+* S) (hf : ) :
s ≃+* ()

A subsemiring is isomorphic to its image under an injective function

Equations
• s.equivMapOfInjective f hf = let __src := Equiv.Set.image (f) (s) hf; { toEquiv := __src, map_mul' := , map_add' := }
Instances For
@[simp]
theorem Subsemiring.coe_equivMapOfInjective_apply {R : Type u} {S : Type v} [] [] (s : ) (f : R →+* S) (hf : ) (x : s) :
((s.equivMapOfInjective f hf) x) = f x
def RingHom.rangeS {R : Type u} {S : Type v} [] [] (f : R →+* S) :

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

Equations
• f.rangeS = ().copy ()
Instances For
@[simp]
theorem RingHom.coe_rangeS {R : Type u} {S : Type v} [] [] (f : R →+* S) :
f.rangeS =
@[simp]
theorem RingHom.mem_rangeS {R : Type u} {S : Type v} [] [] {f : R →+* S} {y : S} :
y f.rangeS ∃ (x : R), f x = y
theorem RingHom.rangeS_eq_map {R : Type u} {S : Type v} [] [] (f : R →+* S) :
f.rangeS =
theorem RingHom.mem_rangeS_self {R : Type u} {S : Type v} [] [] (f : R →+* S) (x : R) :
f x f.rangeS
theorem RingHom.map_rangeS {R : Type u} {S : Type v} {T : Type w} [] [] [] (g : S →+* T) (f : R →+* S) :
Subsemiring.map g f.rangeS = (g.comp f).rangeS
instance RingHom.fintypeRangeS {R : Type u} {S : Type v} [] [] [] [] (f : R →+* S) :
Fintype f.rangeS

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
• f.fintypeRangeS =
instance Subsemiring.instBot {R : Type u} [] :
Bot ()
Equations
• Subsemiring.instBot = { bot := ().rangeS }
instance Subsemiring.instInhabited {R : Type u} [] :
Equations
• Subsemiring.instInhabited = { default := }
theorem Subsemiring.coe_bot {R : Type u} [] :
= Set.range Nat.cast
theorem Subsemiring.mem_bot {R : Type u} [] {x : R} :
x ∃ (n : ), n = x
instance Subsemiring.instInf {R : Type u} [] :
Inf ()

The inf of two subsemirings is their intersection.

Equations
• One or more equations did not get rendered due to their size.
@[simp]
theorem Subsemiring.coe_inf {R : Type u} [] (p : ) (p' : ) :
(p p') = p p'
@[simp]
theorem Subsemiring.mem_inf {R : Type u} [] {p : } {p' : } {x : R} :
x p p' x p x p'
instance Subsemiring.instInfSet {R : Type u} [] :
Equations
• Subsemiring.instInfSet = { sInf := fun (s : Set ()) => Subsemiring.mk' (ts, t) (ts, t.toSubmonoid) (ts, t.toAddSubmonoid) }
@[simp]
theorem Subsemiring.coe_sInf {R : Type u} [] (S : Set ()) :
(sInf S) = sS, s
theorem Subsemiring.mem_sInf {R : Type u} [] {S : Set ()} {x : R} :
x sInf S pS, x p
@[simp]
theorem Subsemiring.sInf_toSubmonoid {R : Type u} [] (s : Set ()) :
(sInf s).toSubmonoid = ts, t.toSubmonoid
@[simp]
theorem Subsemiring.sInf_toAddSubmonoid {R : Type u} [] (s : Set ()) :

Subsemirings of a semiring form a complete lattice.

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

The center of a non-associative semiring R is the set of elements that commute and associate with everything in R

Equations
• = let __src := ; { carrier := __src.carrier, mul_mem' := , one_mem' := , add_mem' := , zero_mem' := }
Instances For
theorem Subsemiring.coe_center (R : Type u) [] :
@[simp]
theorem Subsemiring.center_toSubmonoid (R : Type u) [] :
.toSubmonoid =
@[reducible, inline]

The center is commutative and associative.

This is not an instance as it forms a non-defeq diamond with NonUnitalSubringClass.tNonUnitalring  in the npow field.

Equations
• = let __src := Submonoid.center.commMonoid'; let __src_1 := .toNonAssocSemiring;
Instances For
instance Subsemiring.center.commSemiring {R : Type u_1} [] :

The center is commutative.

Equations
• Subsemiring.center.commSemiring = let __src := Submonoid.center.commMonoid; let __src_1 := .toSemiring;
theorem Subsemiring.mem_center_iff {R : Type u_1} [] {z : R} :
∀ (g : R), g * z = z * g
instance Subsemiring.decidableMemCenter {R : Type u_1} [] [] [] :
DecidablePred fun (x : R) =>
Equations
@[simp]
theorem Subsemiring.center_eq_top (R : Type u_1) [] :
def Subsemiring.centralizer {R : Type u_1} [] (s : Set R) :

The centralizer of a set as subsemiring.

Equations
• = let __src := ; { carrier := s.centralizer, mul_mem' := , one_mem' := , add_mem' := , zero_mem' := }
Instances For
@[simp]
theorem Subsemiring.coe_centralizer {R : Type u_1} [] (s : Set R) :
= s.centralizer
theorem Subsemiring.centralizer_toSubmonoid {R : Type u_1} [] (s : Set R) :
.toSubmonoid =
theorem Subsemiring.mem_centralizer_iff {R : Type u_1} [] {s : Set R} {z : R} :
gs, g * z = z * g
theorem Subsemiring.center_le_centralizer {R : Type u_1} [] (s : Set R) :
theorem Subsemiring.centralizer_le {R : Type u_1} [] (s : Set R) (t : Set R) (h : s t) :
@[simp]
theorem Subsemiring.centralizer_eq_top_iff_subset {R : Type u_1} [] {s : Set R} :
s
@[simp]
@[simp]
theorem Subsemiring.centralizer_centralizer_centralizer {R : Type u_1} [] {s : Set R} :
Subsemiring.centralizer s.centralizer.centralizer =
def Subsemiring.closure {R : Type u} [] (s : Set R) :

The Subsemiring generated by a set.

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

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 : ) :
Ps
@[simp]
theorem Subsemiring.closure_le {R : Type u} [] {s : Set R} {t : } :
s t

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

theorem Subsemiring.closure_mono {R : Type u} [] ⦃s : Set R ⦃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 : } (h₁ : s t) (h₂ : ) :
theorem Subsemiring.mem_map_equiv {R : Type u} {S : Type v} [] [] {f : R ≃+* S} {K : } {x : S} :
x Subsemiring.map (f) K f.symm x K
theorem Subsemiring.map_equiv_eq_comap_symm {R : Type u} {S : Type v} [] [] (f : R ≃+* S) (K : ) :
Subsemiring.map (f) K = Subsemiring.comap (f.symm) K
theorem Subsemiring.comap_equiv_eq_map_symm {R : Type u} {S : Type v} [] [] (f : R ≃+* S) (K : ) :
Subsemiring.comap (f) K = Subsemiring.map (f.symm) K
def Submonoid.subsemiringClosure {R : Type u} [] (M : ) :

The additive closure of a submonoid is a subsemiring.

Equations
• M.subsemiringClosure = let __src := ; { carrier := __src.carrier, mul_mem' := , one_mem' := , add_mem' := , zero_mem' := }
Instances For
theorem Submonoid.subsemiringClosure_coe {R : Type u} [] (M : ) :
M.subsemiringClosure = ()
theorem Submonoid.subsemiringClosure_toAddSubmonoid {R : Type u} [] (M : ) :
theorem Submonoid.subsemiringClosure_eq_closure {R : Type u} [] (M : ) :
M.subsemiringClosure =

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 : RProp} {x : R} (h : ) (mem : xs, p x) (zero : p 0) (one : p 1) (add : ∀ (x y : R), p xp yp (x + y)) (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 and multiplication, then p holds for all elements of the closure of s.

theorem Subsemiring.closure_induction' {R : Type u} [] {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) ) (mul : ∀ (x : R) (hx : ) (y : R) (hy : ), p x hxp y hyp (x * y) ) {a : R} (ha : ) :
p a ha
theorem Subsemiring.closure_induction₂ {R : Type u} [] {s : Set R} {p : RRProp} {x : R} {y : R} (hx : ) (hy : ) (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) (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 x y

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

theorem Subsemiring.mem_closure_iff_exists_list {R : Type u_1} [] {s : Set R} {x : R} :
∃ (L : List (List R)), (tL, yt, y s) (List.map List.prod L).sum = x
def Subsemiring.gi (R : Type u) [] :
GaloisInsertion Subsemiring.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 Subsemiring.closure_eq {R : Type u} [] (s : ) :

Closure of a subsemiring S equals S.

@[simp]
theorem Subsemiring.closure_empty {R : Type u} [] :
@[simp]
theorem Subsemiring.closure_union {R : Type u} [] (s : Set R) (t : Set R) :
theorem Subsemiring.closure_iUnion {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)) :
= ts,
theorem Subsemiring.map_sup {R : Type u} {S : Type v} [] [] (s : ) (t : ) (f : R →+* S) :
theorem Subsemiring.map_iSup {R : Type u} {S : Type v} [] [] {ι : Sort u_1} (f : R →+* S) (s : ι) :
Subsemiring.map f (iSup s) = ⨆ (i : ι), Subsemiring.map f (s i)
theorem Subsemiring.comap_inf {R : Type u} {S : Type v} [] [] (s : ) (t : ) (f : R →+* S) :
theorem Subsemiring.comap_iInf {R : Type u} {S : Type v} [] [] {ι : Sort u_1} (f : R →+* S) (s : ι) :
= ⨅ (i : ι), Subsemiring.comap f (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 : ) (t : ) :

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

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

Product of subsemirings is isomorphic to their product as monoids.

Equations
• s.prodEquiv t = let __src := Equiv.Set.prod s t; { toEquiv := __src, map_mul' := , map_add' := }
Instances For
theorem Subsemiring.mem_iSup_of_directed {R : Type u} [] {ι : 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
theorem Subsemiring.coe_iSup_of_directed {R : Type u} [] {ι : Sort u_1} [hι : ] {S : ι} (hS : Directed (fun (x x_1 : ) => x x_1) S) :
(⨆ (i : ι), S i) = ⋃ (i : ι), (S i)
theorem Subsemiring.mem_sSup_of_directedOn {R : Type u} [] {S : Set ()} (Sne : S.Nonempty) (hS : DirectedOn (fun (x x_1 : ) => x x_1) S) {x : R} :
x sSup S sS, x s
theorem Subsemiring.coe_sSup_of_directedOn {R : Type u} [] {S : Set ()} (Sne : S.Nonempty) (hS : DirectedOn (fun (x x_1 : ) => x x_1) S) :
(sSup S) = sS, s
def RingHom.domRestrict {R : Type u} {S : Type v} [] [] {σR : Type u_1} [SetLike σR R] [] (f : R →+* S) (s : σR) :
s →+* S

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

Equations
• f.domRestrict s = f.comp
Instances For
@[simp]
theorem RingHom.restrict_apply {R : Type u} {S : Type v} [] [] {σR : Type u_1} [SetLike σR R] [] (f : R →+* S) {s : σR} (x : s) :
(f.domRestrict s) x = f x
def RingHom.codRestrict {R : Type u} {S : Type v} [] [] {σS : Type u_2} [SetLike σS S] [] (f : R →+* S) (s : σS) (h : ∀ (x : R), f x s) :
R →+* s

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

Equations
• f.codRestrict s h = let __src := (f).codRestrict s h; let __src := (f).codRestrict s h; { toFun := fun (n : R) => f n, , map_one' := , map_mul' := , map_zero' := , map_add' := }
Instances For
def RingHom.restrict {R : Type u} {S : Type v} [] [] {σR : Type u_1} {σS : Type u_2} [SetLike σR R] [SetLike σS S] [] [] (f : R →+* S) (s' : σR) (s : σS) (h : xs', f x s) :
s' →+* s

The ring homomorphism from the preimage of s to s.

Equations
• f.restrict s' s h = (f.domRestrict s').codRestrict s
Instances For
@[simp]
theorem RingHom.coe_restrict_apply {R : Type u} {S : Type v} [] [] {σR : Type u_1} {σS : Type u_2} [SetLike σR R] [SetLike σS S] [] [] (f : R →+* S) (s' : σR) (s : σS) (h : xs', f x s) (x : s') :
((f.restrict s' s h) x) = f x
@[simp]
theorem RingHom.comp_restrict {R : Type u} {S : Type v} [] [] {σR : Type u_1} {σS : Type u_2} [SetLike σR R] [SetLike σS S] [] [] (f : R →+* S) (s' : σR) (s : σS) (h : xs', f x s) :
.comp (f.restrict s' s h) = f.comp
def RingHom.rangeSRestrict {R : Type u} {S : Type v} [] [] (f : R →+* S) :
R →+* f.rangeS

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

This is the bundled version of Set.rangeFactorization.

Equations
• f.rangeSRestrict = f.codRestrict f.rangeS
Instances For
@[simp]
theorem RingHom.coe_rangeSRestrict {R : Type u} {S : Type v} [] [] (f : R →+* S) (x : R) :
(f.rangeSRestrict x) = f x
theorem RingHom.rangeSRestrict_surjective {R : Type u} {S : Type v} [] [] (f : R →+* S) :
Function.Surjective f.rangeSRestrict
theorem RingHom.rangeS_top_iff_surjective {R : Type u} {S : Type v} [] [] {f : R →+* S} :
f.rangeS =
@[simp]
theorem RingHom.rangeS_top_of_surjective {R : Type u} {S : Type v} [] [] (f : R →+* S) (hf : ) :
f.rangeS =

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

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

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

Equations
• f.eqLocusS g = let __src := (f).eqLocusM g; let __src := (f).eqLocusM g; { carrier := {x : R | f x = g x}, mul_mem' := , one_mem' := , add_mem' := , zero_mem' := }
Instances For
@[simp]
theorem RingHom.eqLocusS_same {R : Type u} {S : Type v} [] [] (f : R →+* S) :
f.eqLocusS f =
theorem RingHom.eqOn_sclosure {R : Type u} {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 subsemiring closure.

theorem RingHom.eq_of_eqOn_stop {R : Type u} {S : Type v} [] [] {f : R →+* S} {g : R →+* S} (h : Set.EqOn f g ) :
f = g
theorem RingHom.eq_of_eqOn_sdense {R : Type u} {S : Type v} [] [] {s : Set R} (hs : ) {f : R →+* S} {g : R →+* S} (h : Set.EqOn (f) (g) s) :
f = g
theorem RingHom.sclosure_preimage_le {R : Type u} {S : Type v} [] [] (f : R →+* S) (s : Set S) :
theorem RingHom.map_closureS {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 : } (h : S T) :
S →+* T

The ring homomorphism associated to an inclusion of subsemirings.

Equations
• = S.subtype.codRestrict T
Instances For
@[simp]
theorem Subsemiring.rangeS_subtype {R : Type u} [] (s : ) :
s.subtype.rangeS = s
@[simp]
theorem Subsemiring.range_fst {R : Type u} {S : Type v} [] [] :
().rangeS =
@[simp]
theorem Subsemiring.range_snd {R : Type u} {S : Type v} [] [] :
().rangeS =
@[simp]
theorem Subsemiring.prod_bot_sup_bot_prod {R : Type u} {S : Type v} [] [] (s : ) (t : ) :
s.prod .prod t = s.prod t
def RingEquiv.subsemiringCongr {R : Type u} [] {s : } {t : } (h : s = t) :
s ≃+* t

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

Equations
• = let __src := ; { toEquiv := __src, map_mul' := , map_add' := }
Instances For
def RingEquiv.ofLeftInverseS {R : Type u} {S : Type v} [] [] {g : SR} {f : R →+* S} (h : ) :
R ≃+* f.rangeS

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

Equations
• One or more equations did not get rendered due to their size.
Instances For
@[simp]
theorem RingEquiv.ofLeftInverseS_apply {R : Type u} {S : Type v} [] [] {g : SR} {f : R →+* S} (h : ) (x : R) :
() = f x
@[simp]
theorem RingEquiv.ofLeftInverseS_symm_apply {R : Type u} {S : Type v} [] [] {g : SR} {f : R →+* S} (h : ) (x : f.rangeS) :
.symm x = g x
@[simp]
theorem RingEquiv.subsemiringMap_apply_coe {R : Type u} {S : Type v} [] [] (e : R ≃+* S) (s : ) (x : s.toAddSubmonoid) :
((e.subsemiringMap s) x) = e x
@[simp]
theorem RingEquiv.subsemiringMap_symm_apply_coe {R : Type u} {S : Type v} [] [] (e : R ≃+* S) (s : ) (y : (e.toAddEquiv '' s.toAddSubmonoid)) :
((e.subsemiringMap s).symm y) = (e).symm y
def RingEquiv.subsemiringMap {R : Type u} {S : Type v} [] [] (e : R ≃+* S) (s : ) :
s ≃+* (Subsemiring.map e.toRingHom s)

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
• One or more equations did not get rendered due to their size.
Instances For

### Actions by Subsemirings #

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.ofSubsemiring provides a stronger result than those found in this file, which uses the same scalar action.

instance Subsemiring.smul {R' : Type u_1} {α : Type u_2} [] [SMul R' α] (S : ) :
SMul (S) α

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

Equations
• S.smul = S.smul
theorem Subsemiring.smul_def {R' : Type u_1} {α : Type u_2} [] [SMul R' α] {S : } (g : S) (m : α) :
g m = g m
instance Subsemiring.smulCommClass_left {R' : Type u_1} {α : Type u_2} {β : Type u_3} [] [SMul R' β] [SMul α β] [SMulCommClass R' α β] (S : ) :
SMulCommClass (S) α β
Equations
• =
instance Subsemiring.smulCommClass_right {R' : Type u_1} {α : Type u_2} {β : Type u_3} [] [SMul α β] [SMul R' β] [SMulCommClass α R' β] (S : ) :
SMulCommClass α (S) β
Equations
• =
instance Subsemiring.isScalarTower {R' : Type u_1} {α : Type u_2} {β : Type u_3} [] [SMul α β] [SMul R' α] [SMul R' β] [IsScalarTower R' α β] (S : ) :
IsScalarTower (S) α β

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

Equations
• =
instance Subsemiring.faithfulSMul {R' : Type u_1} {α : Type u_2} [] [SMul R' α] [FaithfulSMul R' α] (S : ) :
FaithfulSMul (S) α
Equations
• =
instance Subsemiring.instSMulWithZeroSubtypeMem {R' : Type u_1} {α : Type u_2} [] [Zero α] [SMulWithZero R' α] (S : ) :
SMulWithZero (S) α

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

Equations
instance Subsemiring.mulAction {R' : Type u_1} {α : Type u_2} [Semiring R'] [MulAction R' α] (S : ) :
MulAction (S) α

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

Equations
• S.mulAction = S.mulAction
instance Subsemiring.distribMulAction {R' : Type u_1} {α : Type u_2} [Semiring R'] [] [] (S : ) :

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

Equations
• S.distribMulAction = S.distribMulAction
instance Subsemiring.mulDistribMulAction {R' : Type u_1} {α : Type u_2} [Semiring R'] [] [] (S : ) :

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

Equations
• S.mulDistribMulAction = S.mulDistribMulAction
instance Subsemiring.mulActionWithZero {R' : Type u_1} {α : Type u_2} [Semiring R'] [Zero α] [] (S : ) :

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

Equations
instance Subsemiring.module {R' : Type u_1} {α : Type u_2} [Semiring R'] [] [Module R' α] (S : ) :
Module (S) α

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

Equations
instance Subsemiring.instMulSemiringActionSubtypeMem {R' : Type u_1} {α : Type u_2} [Semiring R'] [] [] (S : ) :

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

Equations
• S.instMulSemiringActionSubtypeMem = S.mulSemiringAction
instance Subsemiring.center.smulCommClass_left {R' : Type u_1} [Semiring R'] :
SMulCommClass (()) R' R'

The center of a semiring acts commutatively on that semiring.

Equations
• =
instance Subsemiring.center.smulCommClass_right {R' : Type u_1} [Semiring R'] :
SMulCommClass R' (()) R'

The center of a semiring acts commutatively on that semiring.

Equations
• =
def Subsemiring.closureCommSemiringOfComm {R' : Type u_1} [Semiring R'] {s : Set R'} (hcomm : as, bs, a * b = b * a) :

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

Equations
• = let __src := .toSemiring;
Instances For