File: Mathlib/Algebra/Ring/Subsemiring/Basic.lean

full_name: AddSubmonoidWithOneClass
code: /-- `AddSubmonoidWithOneClass S R` says `S` is a type of subsets `s ≤ R` that contain `0`, `1`,
and are closed under `(+)` -/
class AddSubmonoidWithOneClass (S R : Type*) [AddMonoidWithOne R]
  [SetLike S R] extends AddSubmonoidClass S R, OneMemClass S R : Prop
goal: Prop

full_name: natCast_mem
code: @[aesop safe apply (rule_sets := [SetLike])]
theorem natCast_mem [AddSubmonoidWithOneClass S R] (n : ℕ) : (n : R) ∈ s 
goal: ↑n ∈ s

full_name: ofNat_mem
code: @[aesop safe apply (rule_sets := [SetLike])]
lemma ofNat_mem [AddSubmonoidWithOneClass S R] (s : S) (n : ℕ) [n.AtLeastTwo] :
    no_index (OfNat.ofNat n) ∈ s 
goal: OfNat.ofNat n ∈ s

full_name: AddSubmonoidWithOneClass.toAddMonoidWithOne
code: instance (priority := 74) AddSubmonoidWithOneClass.toAddMonoidWithOne
    [AddSubmonoidWithOneClass S R] : AddMonoidWithOne s 
goal: AddMonoidWithOne ↥s

full_name: SubsemiringClass
code: /-- `SubsemiringClass S R` states that `S` is a type of subsets `s ⊆ R` that
are both a multiplicative and an additive submonoid. -/
class SubsemiringClass (S : Type*) (R : Type u) [NonAssocSemiring R]
  [SetLike S R] extends SubmonoidClass S R, AddSubmonoidClass S R : Prop
goal: Prop

full_name: SubsemiringClass.addSubmonoidWithOneClass
code: instance (priority := 100) SubsemiringClass.addSubmonoidWithOneClass (S : Type*)
    (R : Type u) [NonAssocSemiring R] [SetLike S R] [h : SubsemiringClass S R] :
    AddSubmonoidWithOneClass S R 
goal: AddSubmonoidWithOneClass S R

full_name: SubsemiringClass.toNonAssocSemiring
code: /-- A subsemiring of a `NonAssocSemiring` inherits a `NonAssocSemiring` structure -/
instance (priority := 75) toNonAssocSemiring : NonAssocSemiring s 
goal: NonAssocSemiring ↥s

full_name: SubsemiringClass.nontrivial
code: instance nontrivial [Nontrivial R] : Nontrivial s 
goal: Nontrivial ↥s

full_name: SubsemiringClass.noZeroDivisors
code: instance noZeroDivisors [NoZeroDivisors R] : NoZeroDivisors s 
goal: NoZeroDivisors ↥s

full_name: SubsemiringClass.subtype
code: /-- The natural ring hom from a subsemiring of semiring `R` to `R`. -/
def subtype : s →+* R 
goal: ↥s →+* R

full_name: SubsemiringClass.coe_subtype
code: @[simp]
theorem coe_subtype : (subtype s : s → R) = ((↑) : s → R) 
goal: ⇑(SubsemiringClass.subtype s) = Subtype.val

full_name: SubsemiringClass.toSemiring
code: /-- A subsemiring of a `Semiring` is a `Semiring`. -/
instance (priority := 75) toSemiring {R} [Semiring R] [SetLike S R] [SubsemiringClass S R] :
    Semiring s 
goal: Semiring ↥s

full_name: SubsemiringClass.coe_pow
code: @[simp, norm_cast]
theorem coe_pow {R} [Semiring R] [SetLike S R] [SubsemiringClass S R] (x : s) (n : ℕ) :
    ((x ^ n : s) : R) = (x : R) ^ n 
goal: ↑(x ^ n) = ↑x ^ n

full_name: SubsemiringClass.toCommSemiring
code: /-- A subsemiring of a `CommSemiring` is a `CommSemiring`. -/
instance toCommSemiring {R} [CommSemiring R] [SetLike S R] [SubsemiringClass S R] :
    CommSemiring s 
goal: CommSemiring ↥s

full_name: SubsemiringClass.instCharZero
code: instance instCharZero [CharZero R] : CharZero s 
goal: CharZero ↥s

full_name: Subsemiring
code: /-- A subsemiring of a semiring `R` is a subset `s` that is both a multiplicative and an additive
submonoid. -/
structure Subsemiring (R : Type u) [NonAssocSemiring R] extends Submonoid R, AddSubmonoid R
goal: Type u

full_name: Subsemiring.instSetLike
code: instance : SetLike (Subsemiring R) R 
goal: SetLike (Subsemiring R) R

full_name: Subsemiring.instSubsemiringClass
code: instance : SubsemiringClass (Subsemiring R) R 
goal: SubsemiringClass (Subsemiring R) R

full_name: Subsemiring.mem_toSubmonoid
code: @[simp]
theorem mem_toSubmonoid {s : Subsemiring R} {x : R} : x ∈ s.toSubmonoid ↔ x ∈ s 
goal: x ∈ s.toSubmonoid ↔ x ∈ s

full_name: Subsemiring.mem_carrier
code: theorem mem_carrier {s : Subsemiring R} {x : R} : x ∈ s.carrier ↔ x ∈ s 
goal: x ∈ s.carrier ↔ x ∈ s

full_name: Subsemiring.ext
code: /-- Two subsemirings are equal if they have the same elements. -/
@[ext]
theorem ext {S T : Subsemiring R} (h : ∀ x, x ∈ S ↔ x ∈ T) : S = T 
goal: S = T

full_name: Subsemiring.copy
code: /-- Copy of a subsemiring with a new `carrier` equal to the old one. Useful to fix definitional
equalities. -/
protected def copy (S : Subsemiring R) (s : Set R) (hs : s = ↑S) : Subsemiring R 
goal: Subsemiring R

full_name: Subsemiring.coe_copy
code: @[simp]
theorem coe_copy (S : Subsemiring R) (s : Set R) (hs : s = ↑S) : (S.copy s hs : Set R) = s 
goal: ↑(S.copy s hs) = s

full_name: Subsemiring.copy_eq
code: theorem copy_eq (S : Subsemiring R) (s : Set R) (hs : s = ↑S) : S.copy s hs = S 
goal: S.copy s hs = S

full_name: Subsemiring.toSubmonoid_injective
code: theorem toSubmonoid_injective : Function.Injective (toSubmonoid : Subsemiring R → Submonoid R)
  
goal: Function.Injective Subsemiring.toSubmonoid

full_name: Subsemiring.toSubmonoid_strictMono
code: @[mono]
theorem toSubmonoid_strictMono : StrictMono (toSubmonoid : Subsemiring R → Submonoid R) 
goal: StrictMono Subsemiring.toSubmonoid

full_name: Subsemiring.toSubmonoid_mono
code: @[mono]
theorem toSubmonoid_mono : Monotone (toSubmonoid : Subsemiring R → Submonoid R) 
goal: Monotone Subsemiring.toSubmonoid

full_name: Subsemiring.toAddSubmonoid_injective
code: theorem toAddSubmonoid_injective :
    Function.Injective (toAddSubmonoid : Subsemiring R → AddSubmonoid R)
  
goal: Function.Injective Subsemiring.toAddSubmonoid

full_name: Subsemiring.toAddSubmonoid_strictMono
code: @[mono]
theorem toAddSubmonoid_strictMono : StrictMono (toAddSubmonoid : Subsemiring R → AddSubmonoid R) 
goal: StrictMono Subsemiring.toAddSubmonoid

full_name: Subsemiring.toAddSubmonoid_mono
code: @[mono]
theorem toAddSubmonoid_mono : Monotone (toAddSubmonoid : Subsemiring R → AddSubmonoid R) 
goal: Monotone Subsemiring.toAddSubmonoid

full_name: Subsemiring.mk'
code: /-- Construct a `Subsemiring R` from a set `s`, a submonoid `sm`, and an additive
submonoid `sa` such that `x ∈ s ↔ x ∈ sm ↔ x ∈ sa`. -/
protected def mk' (s : Set R) (sm : Submonoid R) (hm : ↑sm = s) (sa : AddSubmonoid R)
    (ha : ↑sa = s) : Subsemiring R 
goal: Subsemiring R

full_name: Subsemiring.coe_mk'
code: @[simp]
theorem coe_mk' {s : Set R} {sm : Submonoid R} (hm : ↑sm = s) {sa : AddSubmonoid R} (ha : ↑sa = s) :
    (Subsemiring.mk' s sm hm sa ha : Set R) = s 
goal: ↑(Subsemiring.mk' s sm hm sa ha) = s

full_name: Subsemiring.mem_mk'
code: @[simp]
theorem mem_mk' {s : Set R} {sm : Submonoid R} (hm : ↑sm = s) {sa : AddSubmonoid R} (ha : ↑sa = s)
    {x : R} : x ∈ Subsemiring.mk' s sm hm sa ha ↔ x ∈ s 
goal: x ∈ Subsemiring.mk' s sm hm sa ha ↔ x ∈ s

full_name: Subsemiring.mk'_toSubmonoid
code: @[simp]
theorem mk'_toSubmonoid {s : Set R} {sm : Submonoid R} (hm : ↑sm = s) {sa : AddSubmonoid R}
    (ha : ↑sa = s) : (Subsemiring.mk' s sm hm sa ha).toSubmonoid = sm 
goal: (Subsemiring.mk' s sm hm sa ha).toSubmonoid = sm

full_name: Subsemiring.mk'_toAddSubmonoid
code: @[simp]
theorem mk'_toAddSubmonoid {s : Set R} {sm : Submonoid R} (hm : ↑sm = s) {sa : AddSubmonoid R}
    (ha : ↑sa = s) : (Subsemiring.mk' s sm hm sa ha).toAddSubmonoid = sa 
goal: (Subsemiring.mk' s sm hm sa ha).toAddSubmonoid = sa

full_name: Subsemiring.one_mem
code: /-- A subsemiring contains the semiring's 1. -/
protected theorem one_mem : (1 : R) ∈ s 
goal: 1 ∈ s

full_name: Subsemiring.zero_mem
code: /-- A subsemiring contains the semiring's 0. -/
protected theorem zero_mem : (0 : R) ∈ s 
goal: 0 ∈ s

full_name: Subsemiring.mul_mem
code: /-- A subsemiring is closed under multiplication. -/
protected theorem mul_mem {x y : R} : x ∈ s → y ∈ s → x * y ∈ s 
goal: x ∈ s → y ∈ s → x * y ∈ s

full_name: Subsemiring.add_mem
code: /-- A subsemiring is closed under addition. -/
protected theorem add_mem {x y : R} : x ∈ s → y ∈ s → x + y ∈ s 
goal: x ∈ s → y ∈ s → x + y ∈ s

full_name: Subsemiring.list_prod_mem
code: /-- Product of a list of elements in a `Subsemiring` is in the `Subsemiring`. -/
nonrec theorem list_prod_mem {R : Type*} [Semiring R] (s : Subsemiring R) {l : List R} :
    (∀ x ∈ l, x ∈ s) → l.prod ∈ s 
goal: (∀ x ∈ l, x ∈ s) → l.prod ∈ s

full_name: Subsemiring.list_sum_mem
code: /-- Sum of a list of elements in a `Subsemiring` is in the `Subsemiring`. -/
protected theorem list_sum_mem {l : List R} : (∀ x ∈ l, x ∈ s) → l.sum ∈ s 
goal: (∀ x ∈ l, x ∈ s) → l.sum ∈ s

full_name: Subsemiring.multiset_prod_mem
code: /-- Product of a multiset of elements in a `Subsemiring` of a `CommSemiring`
    is in the `Subsemiring`. -/
protected theorem multiset_prod_mem {R} [CommSemiring R] (s : Subsemiring R) (m : Multiset R) :
    (∀ a ∈ m, a ∈ s) → m.prod ∈ s 
goal: (∀ a ∈ m, a ∈ s) → m.prod ∈ s

full_name: Subsemiring.multiset_sum_mem
code: /-- Sum of a multiset of elements in a `Subsemiring` of a `Semiring` is
in the `add_subsemiring`. -/
protected theorem multiset_sum_mem (m : Multiset R) : (∀ a ∈ m, a ∈ s) → m.sum ∈ s 
goal: (∀ a ∈ m, a ∈ s) → m.sum ∈ s

full_name: Subsemiring.prod_mem
code: /-- Product of elements of a subsemiring of a `CommSemiring` indexed by a `Finset` is in the
    subsemiring. -/
protected theorem prod_mem {R : Type*} [CommSemiring R] (s : Subsemiring R) {ι : Type*}
    {t : Finset ι} {f : ι → R} (h : ∀ c ∈ t, f c ∈ s) : (∏ i ∈ t, f i) ∈ s 
goal: ∏ i ∈ t, f i ∈ s

full_name: Subsemiring.sum_mem
code: /-- Sum of elements in a `Subsemiring` of a `Semiring` indexed by a `Finset`
is in the `add_subsemiring`. -/
protected theorem sum_mem (s : Subsemiring R) {ι : Type*} {t : Finset ι} {f : ι → R}
    (h : ∀ c ∈ t, f c ∈ s) : (∑ i ∈ t, f i) ∈ s 
goal: ∑ i ∈ t, f i ∈ s

full_name: Subsemiring.toNonAssocSemiring
code: /-- A subsemiring of a `NonAssocSemiring` inherits a `NonAssocSemiring` structure -/
instance toNonAssocSemiring : NonAssocSemiring s 
goal: NonAssocSemiring ↥s

full_name: Subsemiring.coe_one
code: @[simp, norm_cast]
theorem coe_one : ((1 : s) : R) = (1 : R) 
goal: ↑1 = 1

full_name: Subsemiring.coe_zero
code: @[simp, norm_cast]
theorem coe_zero : ((0 : s) : R) = (0 : R) 
goal: ↑0 = 0

full_name: Subsemiring.coe_add
code: @[simp, norm_cast]
theorem coe_add (x y : s) : ((x + y : s) : R) = (x + y : R) 
goal: ↑(x + y) = ↑x + ↑y

full_name: Subsemiring.coe_mul
code: @[simp, norm_cast]
theorem coe_mul (x y : s) : ((x * y : s) : R) = (x * y : R) 
goal: ↑(x * y) = ↑x * ↑y

full_name: Subsemiring.nontrivial
code: instance nontrivial [Nontrivial R] : Nontrivial s 
goal: Nontrivial ↥s

full_name: Subsemiring.pow_mem
code: protected theorem pow_mem {R : Type*} [Semiring R] (s : Subsemiring R) {x : R} (hx : x ∈ s)
    (n : ℕ) : x ^ n ∈ s 
goal: x ^ n ∈ s

full_name: Subsemiring.noZeroDivisors
code: instance noZeroDivisors [NoZeroDivisors R] : NoZeroDivisors s 
goal: NoZeroDivisors ↥s

full_name: Subsemiring.toSemiring
code: /-- A subsemiring of a `Semiring` is a `Semiring`. -/
instance toSemiring {R} [Semiring R] (s : Subsemiring R) : Semiring s 
goal: Semiring ↥s

full_name: Subsemiring.coe_pow
code: @[simp, norm_cast]
theorem coe_pow {R} [Semiring R] (s : Subsemiring R) (x : s) (n : ℕ) :
    ((x ^ n : s) : R) = (x : R) ^ n 
goal: ↑(x ^ n) = ↑x ^ n

full_name: Subsemiring.toCommSemiring
code: /-- A subsemiring of a `CommSemiring` is a `CommSemiring`. -/
instance toCommSemiring {R} [CommSemiring R] (s : Subsemiring R) : CommSemiring s 
goal: CommSemiring ↥s

full_name: Subsemiring.subtype
code: /-- The natural ring hom from a subsemiring of semiring `R` to `R`. -/
def subtype : s →+* R 
goal: ↥s →+* R

full_name: Subsemiring.coe_subtype
code: @[simp]
theorem coe_subtype : ⇑s.subtype = ((↑) : s → R) 
goal: ⇑s.subtype = Subtype.val

full_name: Subsemiring.nsmul_mem
code: protected theorem nsmul_mem {x : R} (hx : x ∈ s) (n : ℕ) : n • x ∈ s 
goal: n • x ∈ s

full_name: Subsemiring.coe_toSubmonoid
code: @[simp]
theorem coe_toSubmonoid (s : Subsemiring R) : (s.toSubmonoid : Set R) = s 
goal: ↑s.toSubmonoid = ↑s

full_name: Subsemiring.coe_carrier_toSubmonoid
code: @[simp]
theorem coe_carrier_toSubmonoid (s : Subsemiring R) : (s.toSubmonoid.carrier : Set R) = s 
goal: s.carrier = ↑s

full_name: Subsemiring.mem_toAddSubmonoid
code: theorem mem_toAddSubmonoid {s : Subsemiring R} {x : R} : x ∈ s.toAddSubmonoid ↔ x ∈ s 
goal: x ∈ s.toAddSubmonoid ↔ x ∈ s

full_name: Subsemiring.coe_toAddSubmonoid
code: theorem coe_toAddSubmonoid (s : Subsemiring R) : (s.toAddSubmonoid : Set R) = s 
goal: ↑s.toAddSubmonoid = ↑s

full_name: Subsemiring.instTop
code: /-- The subsemiring `R` of the semiring `R`. -/
instance : Top (Subsemiring R) 
goal: Top (Subsemiring R)

full_name: Subsemiring.mem_top
code: @[simp]
theorem mem_top (x : R) : x ∈ (⊤ : Subsemiring R) 
goal: x ∈ ⊤

full_name: Subsemiring.coe_top
code: @[simp]
theorem coe_top : ((⊤ : Subsemiring R) : Set R) = Set.univ 
goal: ↑⊤ = Set.univ

full_name: Subsemiring.topEquiv
code: /-- The ring equiv between the top element of `Subsemiring R` and `R`. -/
@[simps]
def topEquiv : (⊤ : Subsemiring R) ≃+* R 
goal: ↥⊤ ≃+* R

full_name: Subsemiring.topEquiv_symm_apply_coe
code: /-- The ring equiv between the top element of `Subsemiring R` and `R`. -/
@[simps]
def topEquiv : (⊤ : Subsemiring R) ≃+* R 
goal: ↑(Subsemiring.topEquiv.symm r) = r

full_name: Subsemiring.topEquiv_apply
code: /-- The ring equiv between the top element of `Subsemiring R` and `R`. -/
@[simps]
def topEquiv : (⊤ : Subsemiring R) ≃+* R 
goal: Subsemiring.topEquiv r = ↑r

full_name: Subsemiring.comap
code: /-- The preimage of a subsemiring along a ring homomorphism is a subsemiring. -/
def comap (f : R →+* S) (s : Subsemiring S) : Subsemiring R 
goal: Subsemiring R

full_name: Subsemiring.coe_comap
code: @[simp]
theorem coe_comap (s : Subsemiring S) (f : R →+* S) : (s.comap f : Set R) = f ⁻¹' s 
goal: ↑(Subsemiring.comap f s) = ⇑f ⁻¹' ↑s

full_name: Subsemiring.mem_comap
code: @[simp]
theorem mem_comap {s : Subsemiring S} {f : R →+* S} {x : R} : x ∈ s.comap f ↔ f x ∈ s 
goal: x ∈ Subsemiring.comap f s ↔ f x ∈ s

full_name: Subsemiring.comap_comap
code: theorem comap_comap (s : Subsemiring T) (g : S →+* T) (f : R →+* S) :
    (s.comap g).comap f = s.comap (g.comp f) 
goal: Subsemiring.comap f (Subsemiring.comap g s) = Subsemiring.comap (g.comp f) s

full_name: Subsemiring.map
code: /-- The image of a subsemiring along a ring homomorphism is a subsemiring. -/
def map (f : R →+* S) (s : Subsemiring R) : Subsemiring S 
goal: Subsemiring S

full_name: Subsemiring.coe_map
code: @[simp]
theorem coe_map (f : R →+* S) (s : Subsemiring R) : (s.map f : Set S) = f '' s 
goal: ↑(Subsemiring.map f s) = ⇑f '' ↑s

full_name: Subsemiring.mem_map
code: @[simp]
lemma mem_map {f : R →+* S} {s : Subsemiring R} {y : S} : y ∈ s.map f ↔ ∃ x ∈ s, f x = y 
goal: y ∈ Subsemiring.map f s ↔ ∃ x ∈ s, f x = y

full_name: Subsemiring.map_id
code: @[simp]
theorem map_id : s.map (RingHom.id R) = s 
goal: Subsemiring.map (RingHom.id R) s = s

full_name: Subsemiring.map_map
code: theorem map_map (g : S →+* T) (f : R →+* S) : (s.map f).map g = s.map (g.comp f) 
goal: Subsemiring.map g (Subsemiring.map f s) = Subsemiring.map (g.comp f) s

full_name: Subsemiring.map_le_iff_le_comap
code: theorem map_le_iff_le_comap {f : R →+* S} {s : Subsemiring R} {t : Subsemiring S} :
    s.map f ≤ t ↔ s ≤ t.comap f 
goal: Subsemiring.map f s ≤ t ↔ s ≤ Subsemiring.comap f t

full_name: Subsemiring.gc_map_comap
code: theorem gc_map_comap (f : R →+* S) : GaloisConnection (map f) (comap f) 
goal: GaloisConnection (Subsemiring.map f) (Subsemiring.comap f)

full_name: Subsemiring.equivMapOfInjective
code: /-- A subsemiring is isomorphic to its image under an injective function -/
noncomputable def equivMapOfInjective (f : R →+* S) (hf : Function.Injective f) : s ≃+* s.map f 
goal: ↥s ≃+* ↥(Subsemiring.map f s)

full_name: Subsemiring.coe_equivMapOfInjective_apply
code: @[simp]
theorem coe_equivMapOfInjective_apply (f : R →+* S) (hf : Function.Injective f) (x : s) :
    (equivMapOfInjective s f hf x : S) = f x 
goal: ↑((s.equivMapOfInjective f hf) x) = f ↑x

full_name: RingHom.rangeS
code: /-- The range of a ring homomorphism is a subsemiring. See Note [range copy pattern]. -/
def rangeS : Subsemiring S 
goal: Subsemiring S

full_name: RingHom.coe_rangeS
code: @[simp]
theorem coe_rangeS : (f.rangeS : Set S) = Set.range f 
goal: ↑f.rangeS = Set.range ⇑f

full_name: RingHom.mem_rangeS
code: @[simp]
theorem mem_rangeS {f : R →+* S} {y : S} : y ∈ f.rangeS ↔ ∃ x, f x = y 
goal: y ∈ f.rangeS ↔ ∃ x, f x = y

full_name: RingHom.rangeS_eq_map
code: theorem rangeS_eq_map (f : R →+* S) : f.rangeS = (⊤ : Subsemiring R).map f 
goal: f.rangeS = Subsemiring.map f ⊤

full_name: RingHom.mem_rangeS_self
code: theorem mem_rangeS_self (f : R →+* S) (x : R) : f x ∈ f.rangeS 
goal: f x ∈ f.rangeS

full_name: RingHom.map_rangeS
code: theorem map_rangeS : f.rangeS.map g = (g.comp f).rangeS 
goal: Subsemiring.map g f.rangeS = (g.comp f).rangeS

full_name: RingHom.fintypeRangeS
code: /-- 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`. -/
instance fintypeRangeS [Fintype R] [DecidableEq S] (f : R →+* S) : Fintype (rangeS f) 
goal: Fintype ↥f.rangeS

full_name: Subsemiring.instBot
code: instance : Bot (Subsemiring R) 
goal: Bot (Subsemiring R)

full_name: Subsemiring.instInhabited
code: instance : Inhabited (Subsemiring R) 
goal: Inhabited (Subsemiring R)

full_name: Subsemiring.coe_bot
code: theorem coe_bot : ((⊥ : Subsemiring R) : Set R) = Set.range ((↑) : ℕ → R) 
goal: ↑⊥ = Set.range Nat.cast

full_name: Subsemiring.mem_bot
code: theorem mem_bot {x : R} : x ∈ (⊥ : Subsemiring R) ↔ ∃ n : ℕ, ↑n = x 
goal: x ∈ ⊥ ↔ ∃ n, ↑n = x

full_name: Subsemiring.instInf
code: /-- The inf of two subsemirings is their intersection. -/
instance : Inf (Subsemiring R) 
goal: Inf (Subsemiring R)

full_name: Subsemiring.coe_inf
code: @[simp]
theorem coe_inf (p p' : Subsemiring R) : ((p ⊓ p' : Subsemiring R) : Set R) = (p : Set R) ∩ p' 
goal: ↑(p ⊓ p') = ↑p ∩ ↑p'

full_name: Subsemiring.mem_inf
code: @[simp]
theorem mem_inf {p p' : Subsemiring R} {x : R} : x ∈ p ⊓ p' ↔ x ∈ p ∧ x ∈ p' 
goal: x ∈ p ⊓ p' ↔ x ∈ p ∧ x ∈ p'

full_name: Subsemiring.instInfSet
code: instance : InfSet (Subsemiring R) 
goal: InfSet (Subsemiring R)

full_name: Subsemiring.coe_sInf
code: @[simp, norm_cast]
theorem coe_sInf (S : Set (Subsemiring R)) : ((sInf S : Subsemiring R) : Set R) = ⋂ s ∈ S, ↑s 
goal: ↑(sInf S) = ⋂ s ∈ S, ↑s

full_name: Subsemiring.mem_sInf
code: theorem mem_sInf {S : Set (Subsemiring R)} {x : R} : x ∈ sInf S ↔ ∀ p ∈ S, x ∈ p 
goal: x ∈ sInf S ↔ ∀ p ∈ S, x ∈ p

full_name: Subsemiring.sInf_toSubmonoid
code: @[simp]
theorem sInf_toSubmonoid (s : Set (Subsemiring R)) :
    (sInf s).toSubmonoid = ⨅ t ∈ s, Subsemiring.toSubmonoid t 
goal: (sInf s).toSubmonoid = ⨅ t ∈ s, t.toSubmonoid

full_name: Subsemiring.sInf_toAddSubmonoid
code: @[simp]
theorem sInf_toAddSubmonoid (s : Set (Subsemiring R)) :
    (sInf s).toAddSubmonoid = ⨅ t ∈ s, Subsemiring.toAddSubmonoid t 
goal: (sInf s).toAddSubmonoid = ⨅ t ∈ s, t.toAddSubmonoid

full_name: Subsemiring.instCompleteLattice
code: /-- Subsemirings of a semiring form a complete lattice. -/
instance : CompleteLattice (Subsemiring R) 
goal: CompleteLattice (Subsemiring R)

full_name: Subsemiring.eq_top_iff'
code: theorem eq_top_iff' (A : Subsemiring R) : A = ⊤ ↔ ∀ x : R, x ∈ A 
goal: A = ⊤ ↔ ∀ (x : R), x ∈ A

full_name: Subsemiring.center
code: /-- The center of a non-associative semiring `R` is the set of elements that commute and associate
with everything in `R` -/
def center : Subsemiring R 
goal: Subsemiring R

full_name: Subsemiring.coe_center
code: theorem coe_center : ↑(center R) = Set.center R 
goal: ↑(Subsemiring.center R) = Set.center R

full_name: Subsemiring.center_toSubmonoid
code: @[simp]
theorem center_toSubmonoid : (center R).toSubmonoid = Submonoid.center R 
goal: (Subsemiring.center R).toSubmonoid = Submonoid.center R

full_name: Subsemiring.center.commSemiring'
code: /-- 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. -/
abbrev center.commSemiring' : CommSemiring (center R) 
goal: CommSemiring ↥(Subsemiring.center R)

full_name: Subsemiring.center.commSemiring
code: /-- The center is commutative. -/
instance center.commSemiring {R} [Semiring R] : CommSemiring (center R) 
goal: CommSemiring ↥(Subsemiring.center R)

full_name: Subsemiring.mem_center_iff
code: theorem mem_center_iff {R} [Semiring R] {z : R} : z ∈ center R ↔ ∀ g, g * z = z * g 
goal: z ∈ Subsemiring.center R ↔ ∀ (g : R), g * z = z * g

full_name: Subsemiring.decidableMemCenter
code: instance decidableMemCenter {R} [Semiring R] [DecidableEq R] [Fintype R] :
    DecidablePred (· ∈ center R) 
goal: DecidablePred fun x => x ∈ Subsemiring.center R

full_name: Subsemiring.center_eq_top
code: @[simp]
theorem center_eq_top (R) [CommSemiring R] : center R = ⊤ 
goal: Subsemiring.center R = ⊤

full_name: Subsemiring.centralizer
code: /-- The centralizer of a set as subsemiring. -/
def centralizer {R} [Semiring R] (s : Set R) : Subsemiring R 
goal: Subsemiring R

full_name: Subsemiring.coe_centralizer
code: @[simp, norm_cast]
theorem coe_centralizer {R} [Semiring R] (s : Set R) : (centralizer s : Set R) = s.centralizer 
goal: ↑(Subsemiring.centralizer s) = s.centralizer

full_name: Subsemiring.centralizer_toSubmonoid
code: theorem centralizer_toSubmonoid {R} [Semiring R] (s : Set R) :
    (centralizer s).toSubmonoid = Submonoid.centralizer s 
goal: (Subsemiring.centralizer s).toSubmonoid = Submonoid.centralizer s

full_name: Subsemiring.mem_centralizer_iff
code: theorem mem_centralizer_iff {R} [Semiring R] {s : Set R} {z : R} :
    z ∈ centralizer s ↔ ∀ g ∈ s, g * z = z * g 
goal: z ∈ Subsemiring.centralizer s ↔ ∀ g ∈ s, g * z = z * g

full_name: Subsemiring.center_le_centralizer
code: theorem center_le_centralizer {R} [Semiring R] (s) : center R ≤ centralizer s 
goal: Subsemiring.center R ≤ Subsemiring.centralizer s

full_name: Subsemiring.centralizer_le
code: theorem centralizer_le {R} [Semiring R] (s t : Set R) (h : s ⊆ t) : centralizer t ≤ centralizer s 
goal: Subsemiring.centralizer t ≤ Subsemiring.centralizer s

full_name: Subsemiring.centralizer_eq_top_iff_subset
code: @[simp]
theorem centralizer_eq_top_iff_subset {R} [Semiring R] {s : Set R} :
    centralizer s = ⊤ ↔ s ⊆ center R 
goal: Subsemiring.centralizer s = ⊤ ↔ s ⊆ ↑(Subsemiring.center R)

full_name: Subsemiring.centralizer_univ
code: @[simp]
theorem centralizer_univ {R} [Semiring R] : centralizer Set.univ = center R 
goal: Subsemiring.centralizer Set.univ = Subsemiring.center R

full_name: Subsemiring.le_centralizer_centralizer
code: lemma le_centralizer_centralizer {R} [Semiring R] {s : Subsemiring R} :
    s ≤ centralizer (centralizer (s : Set R)) 
goal: s ≤ Subsemiring.centralizer ↑(Subsemiring.centralizer ↑s)

full_name: Subsemiring.centralizer_centralizer_centralizer
code: @[simp]
lemma centralizer_centralizer_centralizer {R} [Semiring R] {s : Set R} :
    centralizer s.centralizer.centralizer = centralizer s 
goal: Subsemiring.centralizer s.centralizer.centralizer = Subsemiring.centralizer s

full_name: Subsemiring.closure
code: /-- The `Subsemiring` generated by a set. -/
def closure (s : Set R) : Subsemiring R 
goal: Subsemiring R

full_name: Subsemiring.mem_closure
code: theorem mem_closure {x : R} {s : Set R} : x ∈ closure s ↔ ∀ S : Subsemiring R, s ⊆ S → x ∈ S 
goal: x ∈ Subsemiring.closure s ↔ ∀ (S : Subsemiring R), s ⊆ ↑S → x ∈ S

full_name: Subsemiring.subset_closure
code: /-- The subsemiring generated by a set includes the set. -/
@[simp, aesop safe 20 apply (rule_sets := [SetLike])]
theorem subset_closure {s : Set R} : s ⊆ closure s 
goal: s ⊆ ↑(Subsemiring.closure s)

full_name: Subsemiring.not_mem_of_not_mem_closure
code: theorem not_mem_of_not_mem_closure {s : Set R} {P : R} (hP : P ∉ closure s) : P ∉ s 
goal: P ∉ s

full_name: Subsemiring.closure_le
code: /-- A subsemiring `S` includes `closure s` if and only if it includes `s`. -/
@[simp]
theorem closure_le {s : Set R} {t : Subsemiring R} : closure s ≤ t ↔ s ⊆ t 
goal: Subsemiring.closure s ≤ t ↔ s ⊆ ↑t

full_name: Subsemiring.closure_mono
code: /-- Subsemiring closure of a set is monotone in its argument: if `s ⊆ t`,
then `closure s ≤ closure t`. -/
theorem closure_mono ⦃s t : Set R⦄ (h : s ⊆ t) : closure s ≤ closure t 
goal: Subsemiring.closure s ≤ Subsemiring.closure t

full_name: Subsemiring.closure_eq_of_le
code: theorem closure_eq_of_le {s : Set R} {t : Subsemiring R} (h₁ : s ⊆ t) (h₂ : t ≤ closure s) :
    closure s = t 
goal: Subsemiring.closure s = t

full_name: Subsemiring.mem_map_equiv
code: theorem mem_map_equiv {f : R ≃+* S} {K : Subsemiring R} {x : S} :
    x ∈ K.map (f : R →+* S) ↔ f.symm x ∈ K 
goal: x ∈ Subsemiring.map (↑f) K ↔ f.symm x ∈ K

full_name: Subsemiring.map_equiv_eq_comap_symm
code: theorem map_equiv_eq_comap_symm (f : R ≃+* S) (K : Subsemiring R) :
    K.map (f : R →+* S) = K.comap f.symm 
goal: Subsemiring.map (↑f) K = Subsemiring.comap (↑f.symm) K

full_name: Subsemiring.comap_equiv_eq_map_symm
code: theorem comap_equiv_eq_map_symm (f : R ≃+* S) (K : Subsemiring S) :
    K.comap (f : R →+* S) = K.map f.symm 
goal: Subsemiring.comap (↑f) K = Subsemiring.map (↑f.symm) K

full_name: Submonoid.subsemiringClosure
code: /-- The additive closure of a submonoid is a subsemiring. -/
def subsemiringClosure (M : Submonoid R) : Subsemiring R 
goal: Subsemiring R

full_name: Submonoid.subsemiringClosure_coe
code: theorem subsemiringClosure_coe :
    (M.subsemiringClosure : Set R) = AddSubmonoid.closure (M : Set R) 
goal: ↑M.subsemiringClosure = ↑(AddSubmonoid.closure ↑M)

full_name: Submonoid.subsemiringClosure_toAddSubmonoid
code: theorem subsemiringClosure_toAddSubmonoid :
    M.subsemiringClosure.toAddSubmonoid = AddSubmonoid.closure (M : Set R) 
goal: M.subsemiringClosure.toAddSubmonoid = AddSubmonoid.closure ↑M

full_name: Submonoid.subsemiringClosure_eq_closure
code: /-- The `Subsemiring` generated by a multiplicative submonoid coincides with the
`Subsemiring.closure` of the submonoid itself . -/
theorem subsemiringClosure_eq_closure : M.subsemiringClosure = Subsemiring.closure (M : Set R) 
goal: M.subsemiringClosure = Subsemiring.closure ↑M

full_name: Subsemiring.closure_submonoid_closure
code: @[simp]
theorem closure_submonoid_closure (s : Set R) : closure ↑(Submonoid.closure s) = closure s 
goal: Subsemiring.closure ↑(Submonoid.closure s) = Subsemiring.closure s

full_name: Subsemiring.coe_closure_eq
code: /-- The elements of the subsemiring closure of `M` are exactly the elements of the additive closure
of a multiplicative submonoid `M`. -/
theorem coe_closure_eq (s : Set R) :
    (closure s : Set R) = AddSubmonoid.closure (Submonoid.closure s : Set R) 
goal: ↑(Subsemiring.closure s) = ↑(AddSubmonoid.closure ↑(Submonoid.closure s))

full_name: Subsemiring.mem_closure_iff
code: theorem mem_closure_iff {s : Set R} {x} :
    x ∈ closure s ↔ x ∈ AddSubmonoid.closure (Submonoid.closure s : Set R) 
goal: x ∈ Subsemiring.closure s ↔ x ∈ AddSubmonoid.closure ↑(Submonoid.closure s)

full_name: Subsemiring.closure_addSubmonoid_closure
code: @[simp]
theorem closure_addSubmonoid_closure {s : Set R} :
    closure ↑(AddSubmonoid.closure s) = closure s 
goal: Subsemiring.closure ↑(AddSubmonoid.closure s) = Subsemiring.closure s

full_name: Subsemiring.closure_induction
code: /-- 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`. -/
@[elab_as_elim]
theorem closure_induction {s : Set R} {p : R → Prop} {x} (h : x ∈ closure s) (mem : ∀ x ∈ s, p x)
    (zero : p 0) (one : p 1) (add : ∀ x y, p x → p y → p (x + y))
    (mul : ∀ x y, p x → p y → p (x * y)) : p x 
goal: p x

full_name: Subsemiring.closure_induction'
code: @[elab_as_elim]
theorem closure_induction' {s : Set R} {p : ∀ x, x ∈ closure s → Prop}
    (mem : ∀ (x) (h : x ∈ s), p x (subset_closure h))
    (zero : p 0 (zero_mem _)) (one : p 1 (one_mem _))
    (add : ∀ x hx y hy, p x hx → p y hy → p (x + y) (add_mem hx hy))
    (mul : ∀ x hx y hy, p x hx → p y hy → p (x * y) (mul_mem hx hy))
    {a : R} (ha : a ∈ closure s) : p a ha 
goal: p a ha

full_name: Subsemiring.closure_induction₂
code: /-- An induction principle for closure membership for predicates with two arguments. -/
@[elab_as_elim]
theorem closure_induction₂ {s : Set R} {p : R → R → Prop} {x} {y : R} (hx : x ∈ closure s)
    (hy : y ∈ closure s) (Hs : ∀ x ∈ s, ∀ y ∈ s, p x y) (H0_left : ∀ x, p 0 x)
    (H0_right : ∀ x, p x 0) (H1_left : ∀ x, p 1 x) (H1_right : ∀ x, p x 1)
    (Hadd_left : ∀ x₁ x₂ y, p x₁ y → p x₂ y → p (x₁ + x₂) y)
    (Hadd_right : ∀ x y₁ y₂, p x y₁ → p x y₂ → p x (y₁ + y₂))
    (Hmul_left : ∀ x₁ x₂ y, p x₁ y → p x₂ y → p (x₁ * x₂) y)
    (Hmul_right : ∀ x y₁ y₂, p x y₁ → p x y₂ → p x (y₁ * y₂)) : p x y 
goal: p x y

full_name: Subsemiring.mem_closure_iff_exists_list
code: theorem mem_closure_iff_exists_list {R} [Semiring R] {s : Set R} {x} :
    x ∈ closure s ↔ ∃ L : List (List R), (∀ t ∈ L, ∀ y ∈ t, y ∈ s) ∧ (L.map List.prod).sum = x 
goal: x ∈ Subsemiring.closure s ↔ ∃ L, (∀ t ∈ L, ∀ y ∈ t, y ∈ s) ∧ (List.map List.prod L).sum = x

full_name: Subsemiring.gi
code: /-- `closure` forms a Galois insertion with the coercion to set. -/
protected def gi : GaloisInsertion (@closure R _) (↑) 
goal: GaloisInsertion Subsemiring.closure SetLike.coe

full_name: Subsemiring.closure_eq
code: /-- Closure of a subsemiring `S` equals `S`. -/
theorem closure_eq (s : Subsemiring R) : closure (s : Set R) = s 
goal: Subsemiring.closure ↑s = s

full_name: Subsemiring.closure_empty
code: @[simp]
theorem closure_empty : closure (∅ : Set R) = ⊥ 
goal: Subsemiring.closure ∅ = ⊥

full_name: Subsemiring.closure_univ
code: @[simp]
theorem closure_univ : closure (Set.univ : Set R) = ⊤ 
goal: Subsemiring.closure Set.univ = ⊤

full_name: Subsemiring.closure_union
code: theorem closure_union (s t : Set R) : closure (s ∪ t) = closure s ⊔ closure t 
goal: Subsemiring.closure (s ∪ t) = Subsemiring.closure s ⊔ Subsemiring.closure t

full_name: Subsemiring.closure_iUnion
code: theorem closure_iUnion {ι} (s : ι → Set R) : closure (⋃ i, s i) = ⨆ i, closure (s i) 
goal: Subsemiring.closure (⋃ i, s i) = ⨆ i, Subsemiring.closure (s i)

full_name: Subsemiring.closure_sUnion
code: theorem closure_sUnion (s : Set (Set R)) : closure (⋃₀ s) = ⨆ t ∈ s, closure t 
goal: Subsemiring.closure (⋃₀ s) = ⨆ t ∈ s, Subsemiring.closure t

full_name: Subsemiring.map_sup
code: theorem map_sup (s t : Subsemiring R) (f : R →+* S) : (s ⊔ t).map f = s.map f ⊔ t.map f 
goal: Subsemiring.map f (s ⊔ t) = Subsemiring.map f s ⊔ Subsemiring.map f t

full_name: Subsemiring.map_iSup
code: theorem map_iSup {ι : Sort*} (f : R →+* S) (s : ι → Subsemiring R) :
    (iSup s).map f = ⨆ i, (s i).map f 
goal: Subsemiring.map f (iSup s) = ⨆ i, Subsemiring.map f (s i)

full_name: Subsemiring.comap_inf
code: theorem comap_inf (s t : Subsemiring S) (f : R →+* S) : (s ⊓ t).comap f = s.comap f ⊓ t.comap f 
goal: Subsemiring.comap f (s ⊓ t) = Subsemiring.comap f s ⊓ Subsemiring.comap f t

full_name: Subsemiring.comap_iInf
code: theorem comap_iInf {ι : Sort*} (f : R →+* S) (s : ι → Subsemiring S) :
    (iInf s).comap f = ⨅ i, (s i).comap f 
goal: Subsemiring.comap f (iInf s) = ⨅ i, Subsemiring.comap f (s i)

full_name: Subsemiring.map_bot
code: @[simp]
theorem map_bot (f : R →+* S) : (⊥ : Subsemiring R).map f = ⊥ 
goal: Subsemiring.map f ⊥ = ⊥

full_name: Subsemiring.comap_top
code: @[simp]
theorem comap_top (f : R →+* S) : (⊤ : Subsemiring S).comap f = ⊤ 
goal: Subsemiring.comap f ⊤ = ⊤

full_name: Subsemiring.prod
code: /-- Given `Subsemiring`s `s`, `t` of semirings `R`, `S` respectively, `s.prod t` is `s × t`
as a subsemiring of `R × S`. -/
def prod (s : Subsemiring R) (t : Subsemiring S) : Subsemiring (R × S) 
goal: Subsemiring (R × S)

full_name: Subsemiring.coe_prod
code: @[norm_cast]
theorem coe_prod (s : Subsemiring R) (t : Subsemiring S) :
    (s.prod t : Set (R × S)) = (s : Set R) ×ˢ (t : Set S) 
goal: ↑(s.prod t) = ↑s ×ˢ ↑t

full_name: Subsemiring.mem_prod
code: theorem mem_prod {s : Subsemiring R} {t : Subsemiring S} {p : R × S} :
    p ∈ s.prod t ↔ p.1 ∈ s ∧ p.2 ∈ t 
goal: p ∈ s.prod t ↔ p.1 ∈ s ∧ p.2 ∈ t

full_name: Subsemiring.prod_mono
code: @[mono]
theorem prod_mono ⦃s₁ s₂ : Subsemiring R⦄ (hs : s₁ ≤ s₂) ⦃t₁ t₂ : Subsemiring S⦄ (ht : t₁ ≤ t₂) :
    s₁.prod t₁ ≤ s₂.prod t₂ 
goal: s₁.prod t₁ ≤ s₂.prod t₂

full_name: Subsemiring.prod_mono_right
code: theorem prod_mono_right (s : Subsemiring R) : Monotone fun t : Subsemiring S => s.prod t 
goal: Monotone fun t => s.prod t

full_name: Subsemiring.prod_mono_left
code: theorem prod_mono_left (t : Subsemiring S) : Monotone fun s : Subsemiring R => s.prod t 
goal: Monotone fun s => s.prod t

full_name: Subsemiring.prod_top
code: theorem prod_top (s : Subsemiring R) : s.prod (⊤ : Subsemiring S) = s.comap (RingHom.fst R S) 
goal: s.prod ⊤ = Subsemiring.comap (RingHom.fst R S) s

full_name: Subsemiring.top_prod
code: theorem top_prod (s : Subsemiring S) : (⊤ : Subsemiring R).prod s = s.comap (RingHom.snd R S) 
goal: ⊤.prod s = Subsemiring.comap (RingHom.snd R S) s

full_name: Subsemiring.top_prod_top
code: @[simp]
theorem top_prod_top : (⊤ : Subsemiring R).prod (⊤ : Subsemiring S) = ⊤ 
goal: ⊤.prod ⊤ = ⊤

full_name: Subsemiring.prodEquiv
code: /-- Product of subsemirings is isomorphic to their product as monoids. -/
def prodEquiv (s : Subsemiring R) (t : Subsemiring S) : s.prod t ≃+* s × t 
goal: ↥(s.prod t) ≃+* ↥s × ↥t

full_name: Subsemiring.mem_iSup_of_directed
code: theorem mem_iSup_of_directed {ι} [hι : Nonempty ι] {S : ι → Subsemiring R} (hS : Directed (· ≤ ·) S)
    {x : R} : (x ∈ ⨆ i, S i) ↔ ∃ i, x ∈ S i 
goal: x ∈ ⨆ i, S i ↔ ∃ i, x ∈ S i

full_name: Subsemiring.coe_iSup_of_directed
code: theorem coe_iSup_of_directed {ι} [hι : Nonempty ι] {S : ι → Subsemiring R}
    (hS : Directed (· ≤ ·) S) : ((⨆ i, S i : Subsemiring R) : Set R) = ⋃ i, S i 
goal: ↑(⨆ i, S i) = ⋃ i, ↑(S i)

full_name: Subsemiring.mem_sSup_of_directedOn
code: theorem mem_sSup_of_directedOn {S : Set (Subsemiring R)} (Sne : S.Nonempty)
    (hS : DirectedOn (· ≤ ·) S) {x : R} : x ∈ sSup S ↔ ∃ s ∈ S, x ∈ s 
goal: x ∈ sSup S ↔ ∃ s ∈ S, x ∈ s

full_name: Subsemiring.coe_sSup_of_directedOn
code: theorem coe_sSup_of_directedOn {S : Set (Subsemiring R)} (Sne : S.Nonempty)
    (hS : DirectedOn (· ≤ ·) S) : (↑(sSup S) : Set R) = ⋃ s ∈ S, ↑s 
goal: ↑(sSup S) = ⋃ s ∈ S, ↑s

full_name: RingHom.domRestrict
code: /-- Restriction of a ring homomorphism to a subsemiring of the domain. -/
def domRestrict (f : R →+* S) (s : σR) : s →+* S 
goal: ↥s →+* S

full_name: RingHom.restrict_apply
code: @[simp]
theorem restrict_apply (f : R →+* S) {s : σR} (x : s) : f.domRestrict s x = f x 
goal: (f.domRestrict s) x = f ↑x

full_name: RingHom.codRestrict
code: /-- Restriction of a ring homomorphism to a subsemiring of the codomain. -/
def codRestrict (f : R →+* S) (s : σS) (h : ∀ x, f x ∈ s) : R →+* s 
goal: R →+* ↥s

full_name: RingHom.restrict
code: /-- The ring homomorphism from the preimage of `s` to `s`. -/
def restrict (f : R →+* S) (s' : σR) (s : σS) (h : ∀ x ∈ s', f x ∈ s) : s' →+* s 
goal: ↥s' →+* ↥s

full_name: RingHom.coe_restrict_apply
code: @[simp]
theorem coe_restrict_apply (f : R →+* S) (s' : σR) (s : σS) (h : ∀ x ∈ s', f x ∈ s) (x : s') :
    (f.restrict s' s h x : S) = f x 
goal: ↑((f.restrict s' s h) x) = f ↑x

full_name: RingHom.comp_restrict
code: @[simp]
theorem comp_restrict (f : R →+* S) (s' : σR) (s : σS) (h : ∀ x ∈ s', f x ∈ s) :
    (SubsemiringClass.subtype s).comp (f.restrict s' s h) = f.comp (SubsemiringClass.subtype s') 
goal: (SubsemiringClass.subtype s).comp (f.restrict s' s h) = f.comp (SubsemiringClass.subtype s')

full_name: RingHom.rangeSRestrict
code: /-- Restriction of a ring homomorphism to its range interpreted as a subsemiring.

This is the bundled version of `Set.rangeFactorization`. -/
def rangeSRestrict (f : R →+* S) : R →+* f.rangeS 
goal: R →+* ↥f.rangeS

full_name: RingHom.coe_rangeSRestrict
code: @[simp]
theorem coe_rangeSRestrict (f : R →+* S) (x : R) : (f.rangeSRestrict x : S) = f x 
goal: ↑(f.rangeSRestrict x) = f x

full_name: RingHom.rangeSRestrict_surjective
code: theorem rangeSRestrict_surjective (f : R →+* S) : Function.Surjective f.rangeSRestrict 
goal: Function.Surjective ⇑f.rangeSRestrict

full_name: RingHom.rangeS_top_iff_surjective
code: theorem rangeS_top_iff_surjective {f : R →+* S} :
    f.rangeS = (⊤ : Subsemiring S) ↔ Function.Surjective f 
goal: f.rangeS = ⊤ ↔ Function.Surjective ⇑f

full_name: RingHom.rangeS_top_of_surjective
code: /-- The range of a surjective ring homomorphism is the whole of the codomain. -/
@[simp]
theorem rangeS_top_of_surjective (f : R →+* S) (hf : Function.Surjective f) :
    f.rangeS = (⊤ : Subsemiring S) 
goal: f.rangeS = ⊤

full_name: RingHom.eqLocusS
code: /-- The subsemiring of elements `x : R` such that `f x = g x` -/
def eqLocusS (f g : R →+* S) : Subsemiring R 
goal: Subsemiring R

full_name: RingHom.eqLocusS_same
code: @[simp]
theorem eqLocusS_same (f : R →+* S) : f.eqLocusS f = ⊤ 
goal: f.eqLocusS f = ⊤

full_name: RingHom.eqOn_sclosure
code: /-- If two ring homomorphisms are equal on a set, then they are equal on its subsemiring closure. -/
theorem eqOn_sclosure {f g : R →+* S} {s : Set R} (h : Set.EqOn f g s) : Set.EqOn f g (closure s) 
goal: Set.EqOn ⇑f ⇑g ↑(Subsemiring.closure s)

full_name: RingHom.eq_of_eqOn_stop
code: theorem eq_of_eqOn_stop {f g : R →+* S} (h : Set.EqOn f g (⊤ : Subsemiring R)) : f = g 
goal: f = g

full_name: RingHom.eq_of_eqOn_sdense
code: theorem eq_of_eqOn_sdense {s : Set R} (hs : closure s = ⊤) {f g : R →+* S} (h : s.EqOn f g) :
    f = g 
goal: f = g

full_name: RingHom.sclosure_preimage_le
code: theorem sclosure_preimage_le (f : R →+* S) (s : Set S) : closure (f ⁻¹' s) ≤ (closure s).comap f 
goal: Subsemiring.closure (⇑f ⁻¹' s) ≤ Subsemiring.comap f (Subsemiring.closure s)

full_name: RingHom.map_closureS
code: /-- The image under a ring homomorphism of the subsemiring generated by a set equals
the subsemiring generated by the image of the set. -/
theorem map_closureS (f : R →+* S) (s : Set R) : (closure s).map f = closure (f '' s) 
goal: Subsemiring.map f (Subsemiring.closure s) = Subsemiring.closure (⇑f '' s)

full_name: Subsemiring.inclusion
code: /-- The ring homomorphism associated to an inclusion of subsemirings. -/
def inclusion {S T : Subsemiring R} (h : S ≤ T) : S →+* T 
goal: ↥S →+* ↥T

full_name: Subsemiring.rangeS_subtype
code: @[simp]
theorem rangeS_subtype (s : Subsemiring R) : s.subtype.rangeS = s 
goal: s.subtype.rangeS = s

full_name: Subsemiring.range_fst
code: @[simp]
theorem range_fst : (fst R S).rangeS = ⊤ 
goal: (RingHom.fst R S).rangeS = ⊤

full_name: Subsemiring.range_snd
code: @[simp]
theorem range_snd : (snd R S).rangeS = ⊤ 
goal: (RingHom.snd R S).rangeS = ⊤

full_name: Subsemiring.prod_bot_sup_bot_prod
code: @[simp]
theorem prod_bot_sup_bot_prod (s : Subsemiring R) (t : Subsemiring S) :
    s.prod ⊥ ⊔ prod ⊥ t = s.prod t 
goal: s.prod ⊥ ⊔ ⊥.prod t = s.prod t

full_name: RingEquiv.subsemiringCongr
code: /-- Makes the identity isomorphism from a proof two subsemirings of a multiplicative
    monoid are equal. -/
def subsemiringCongr (h : s = t) : s ≃+* t 
goal: ↥s ≃+* ↥t

full_name: RingEquiv.ofLeftInverseS
code: /-- Restrict a ring homomorphism with a left inverse to a ring isomorphism to its
`RingHom.rangeS`. -/
def ofLeftInverseS {g : S → R} {f : R →+* S} (h : Function.LeftInverse g f) : R ≃+* f.rangeS 
goal: R ≃+* ↥f.rangeS

full_name: RingEquiv.ofLeftInverseS_apply
code: @[simp]
theorem ofLeftInverseS_apply {g : S → R} {f : R →+* S} (h : Function.LeftInverse g f) (x : R) :
    ↑(ofLeftInverseS h x) = f x 
goal: ↑((RingEquiv.ofLeftInverseS h) x) = f x

full_name: RingEquiv.ofLeftInverseS_symm_apply
code: @[simp]
theorem ofLeftInverseS_symm_apply {g : S → R} {f : R →+* S} (h : Function.LeftInverse g f)
    (x : f.rangeS) : (ofLeftInverseS h).symm x = g x 
goal: (RingEquiv.ofLeftInverseS h).symm x = g ↑x

full_name: RingEquiv.subsemiringMap_apply_coe
code: /-- 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` -/
@[simps!]
def subsemiringMap (e : R ≃+* S) (s : Subsemiring R) : s ≃+* s.map e.toRingHom 
goal: ↑((e.subsemiringMap s) x) = e ↑x

full_name: RingEquiv.subsemiringMap_symm_apply_coe
code: /-- 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` -/
@[simps!]
def subsemiringMap (e : R ≃+* S) (s : Subsemiring R) : s ≃+* s.map e.toRingHom 
goal: ↑((e.subsemiringMap s).symm y) = (↑e).symm ↑y

full_name: RingEquiv.subsemiringMap
code: /-- 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` -/
@[simps!]
def subsemiringMap (e : R ≃+* S) (s : Subsemiring R) : s ≃+* s.map e.toRingHom 
goal: ↥s ≃+* ↥(Subsemiring.map e.toRingHom s)

full_name: Subsemiring.smul
code: /-- The action by a subsemiring is the action by the underlying semiring. -/
instance smul [SMul R' α] (S : Subsemiring R') : SMul S α 
goal: SMul (↥S) α

full_name: Subsemiring.smul_def
code: theorem smul_def [SMul R' α] {S : Subsemiring R'} (g : S) (m : α) : g • m = (g : R') • m 
goal: g • m = ↑g • m

full_name: Subsemiring.smulCommClass_left
code: instance smulCommClass_left [SMul R' β] [SMul α β] [SMulCommClass R' α β] (S : Subsemiring R') :
    SMulCommClass S α β 
goal: SMulCommClass (↥S) α β

full_name: Subsemiring.smulCommClass_right
code: instance smulCommClass_right [SMul α β] [SMul R' β] [SMulCommClass α R' β] (S : Subsemiring R') :
    SMulCommClass α S β 
goal: SMulCommClass α (↥S) β

full_name: Subsemiring.isScalarTower
code: /-- Note that this provides `IsScalarTower S R R` which is needed by `smul_mul_assoc`. -/
instance isScalarTower [SMul α β] [SMul R' α] [SMul R' β] [IsScalarTower R' α β]
    (S : Subsemiring R') :
    IsScalarTower S α β 
goal: IsScalarTower (↥S) α β

full_name: Subsemiring.faithfulSMul
code: instance faithfulSMul [SMul R' α] [FaithfulSMul R' α] (S : Subsemiring R') : FaithfulSMul S α 
goal: FaithfulSMul (↥S) α

full_name: Subsemiring.instSMulWithZeroSubtypeMem
code: /-- The action by a subsemiring is the action by the underlying semiring. -/
instance [Zero α] [SMulWithZero R' α] (S : Subsemiring R') : SMulWithZero S α 
goal: SMulWithZero (↥S) α

full_name: Subsemiring.mulAction
code: /-- The action by a subsemiring is the action by the underlying semiring. -/
instance mulAction [MulAction R' α] (S : Subsemiring R') : MulAction S α 
goal: MulAction (↥S) α

full_name: Subsemiring.distribMulAction
code: /-- The action by a subsemiring is the action by the underlying semiring. -/
instance distribMulAction [AddMonoid α] [DistribMulAction R' α] (S : Subsemiring R') :
    DistribMulAction S α 
goal: DistribMulAction (↥S) α

full_name: Subsemiring.mulDistribMulAction
code: /-- The action by a subsemiring is the action by the underlying semiring. -/
instance mulDistribMulAction [Monoid α] [MulDistribMulAction R' α] (S : Subsemiring R') :
    MulDistribMulAction S α 
goal: MulDistribMulAction (↥S) α

full_name: Subsemiring.mulActionWithZero
code: /-- The action by a subsemiring is the action by the underlying semiring. -/
instance mulActionWithZero [Zero α] [MulActionWithZero R' α] (S : Subsemiring R') :
    MulActionWithZero S α 
goal: MulActionWithZero (↥S) α

full_name: Subsemiring.module
code: /-- The action by a subsemiring is the action by the underlying semiring. -/
instance module [AddCommMonoid α] [Module R' α] (S : Subsemiring R') : Module S α 
goal: Module (↥S) α

full_name: Subsemiring.instMulSemiringActionSubtypeMem
code: /-- The action by a subsemiring is the action by the underlying semiring. -/
instance [Semiring α] [MulSemiringAction R' α] (S : Subsemiring R') : MulSemiringAction S α 
goal: MulSemiringAction (↥S) α

full_name: Subsemiring.center.smulCommClass_left
code: /-- The center of a semiring acts commutatively on that semiring. -/
instance center.smulCommClass_left : SMulCommClass (center R') R' R' 
goal: SMulCommClass (↥(Subsemiring.center R')) R' R'

full_name: Subsemiring.center.smulCommClass_right
code: /-- The center of a semiring acts commutatively on that semiring. -/
instance center.smulCommClass_right : SMulCommClass R' (center R') R' 
goal: SMulCommClass R' (↥(Subsemiring.center R')) R'

full_name: Subsemiring.closureCommSemiringOfComm
code: /-- If all the elements of a set `s` commute, then `closure s` is a commutative monoid. -/
def closureCommSemiringOfComm {s : Set R'} (hcomm : ∀ a ∈ s, ∀ b ∈ s, a * b = b * a) :
    CommSemiring (closure s) 
goal: CommSemiring ↥(Subsemiring.closure s)

full_name: Subsemiring.map_comap_eq
code: theorem map_comap_eq (f : R →+* S) (t : Subsemiring S) : (t.comap f).map f = t ⊓ f.rangeS 
goal: Subsemiring.map f (Subsemiring.comap f t) = t ⊓ f.rangeS

full_name: Subsemiring.map_comap_eq_self
code: theorem map_comap_eq_self
    {f : R →+* S} {t : Subsemiring S} (h : t ≤ f.rangeS) : (t.comap f).map f = t 
goal: Subsemiring.map f (Subsemiring.comap f t) = t

full_name: Subsemiring.map_comap_eq_self_of_surjective
code: theorem map_comap_eq_self_of_surjective
    {f : R →+* S} (hf : Function.Surjective f) (t : Subsemiring S) : (t.comap f).map f = t 
goal: Subsemiring.map f (Subsemiring.comap f t) = t

full_name: Subsemiring.comap_map_eq_self_of_injective
code: theorem comap_map_eq_self_of_injective
    {f : R →+* S} (hf : Function.Injective f) (s : Subsemiring R) : (s.map f).comap f = s 
goal: Subsemiring.comap f (Subsemiring.map f s) = s