File: Mathlib/RingTheory/NonUnitalSubsemiring/Basic.lean

full_name: NonUnitalSubsemiringClass.mul_mem
code: /-- `NonUnitalSubsemiringClass S R` states that `S` is a type of subsets `s ⊆ R` that
are both an additive submonoid and also a multiplicative subsemigroup. -/
class NonUnitalSubsemiringClass (S : Type*) (R : Type u) [NonUnitalNonAssocSemiring R]
  [SetLike S R] extends AddSubmonoidClass S R : Prop where
  mul_mem : ∀ {s : S} {a b : R}, a ∈ s → b ∈ s → a * b ∈ s
goal: a ∈ s → b ∈ s → a * b ∈ s

full_name: NonUnitalSubsemiringClass
code: /-- `NonUnitalSubsemiringClass S R` states that `S` is a type of subsets `s ⊆ R` that
are both an additive submonoid and also a multiplicative subsemigroup. -/
class NonUnitalSubsemiringClass (S : Type*) (R : Type u) [NonUnitalNonAssocSemiring R]
  [SetLike S R] extends AddSubmonoidClass S R : Prop where
  mul_mem : ∀ {s : S} {a b : R}, a ∈ s → b ∈ s → a * b ∈ s
goal: Prop

full_name: NonUnitalSubsemiringClass.mulMemClass
code: instance (priority := 100) NonUnitalSubsemiringClass.mulMemClass (S : Type*) (R : Type u)
    [NonUnitalNonAssocSemiring R] [SetLike S R] [h : NonUnitalSubsemiringClass S R] :
    MulMemClass S R 
goal: MulMemClass S R

full_name: NonUnitalSubsemiringClass.toNonUnitalNonAssocSemiring
code: /-- A non-unital subsemiring of a `NonUnitalNonAssocSemiring` inherits a
`NonUnitalNonAssocSemiring` structure -/
instance (priority := 75) toNonUnitalNonAssocSemiring : NonUnitalNonAssocSemiring s 
goal: NonUnitalNonAssocSemiring ↥s

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

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

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

full_name: NonUnitalSubsemiringClass.toNonUnitalSemiring
code: /-- A non-unital subsemiring of a `NonUnitalSemiring` is a `NonUnitalSemiring`. -/
instance toNonUnitalSemiring {R} [NonUnitalSemiring R] [SetLike S R]
    [NonUnitalSubsemiringClass S R] : NonUnitalSemiring s 
goal: NonUnitalSemiring ↥s

full_name: NonUnitalSubsemiringClass.toNonUnitalCommSemiring
code: /-- A non-unital subsemiring of a `NonUnitalCommSemiring` is a `NonUnitalCommSemiring`. -/
instance toNonUnitalCommSemiring {R} [NonUnitalCommSemiring R] [SetLike S R]
    [NonUnitalSubsemiringClass S R] : NonUnitalCommSemiring s 
goal: NonUnitalCommSemiring ↥s

full_name: NonUnitalSubsemiring
code: /-- A non-unital subsemiring of a non-unital semiring `R` is a subset `s` that is both an additive
submonoid and a semigroup. -/
structure NonUnitalSubsemiring (R : Type u) [NonUnitalNonAssocSemiring R] extends AddSubmonoid R,
  Subsemigroup R
goal: Type u

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

full_name: NonUnitalSubsemiring.instNonUnitalSubsemiringClass
code: instance : NonUnitalSubsemiringClass (NonUnitalSubsemiring R) R 
goal: NonUnitalSubsemiringClass (NonUnitalSubsemiring R) R

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

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

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

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

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

full_name: NonUnitalSubsemiring.toSubsemigroup_injective
code: theorem toSubsemigroup_injective :
    Function.Injective (toSubsemigroup : NonUnitalSubsemiring R → Subsemigroup R)
  
goal: Function.Injective NonUnitalSubsemiring.toSubsemigroup

full_name: NonUnitalSubsemiring.toSubsemigroup_strictMono
code: @[mono]
theorem toSubsemigroup_strictMono :
    StrictMono (toSubsemigroup : NonUnitalSubsemiring R → Subsemigroup R) 
goal: StrictMono NonUnitalSubsemiring.toSubsemigroup

full_name: NonUnitalSubsemiring.toSubsemigroup_mono
code: @[mono]
theorem toSubsemigroup_mono : Monotone (toSubsemigroup : NonUnitalSubsemiring R → Subsemigroup R) 
goal: Monotone NonUnitalSubsemiring.toSubsemigroup

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

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

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

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

full_name: NonUnitalSubsemiring.coe_mk'
code: @[simp]
theorem coe_mk' {s : Set R} {sg : Subsemigroup R} (hg : ↑sg = s) {sa : AddSubmonoid R}
    (ha : ↑sa = s) : (NonUnitalSubsemiring.mk' s sg hg sa ha : Set R) = s 
goal: ↑(NonUnitalSubsemiring.mk' s sg hg sa ha) = s

full_name: NonUnitalSubsemiring.mem_mk'
code: @[simp]
theorem mem_mk' {s : Set R} {sg : Subsemigroup R} (hg : ↑sg = s) {sa : AddSubmonoid R}
    (ha : ↑sa = s) {x : R} : x ∈ NonUnitalSubsemiring.mk' s sg hg sa ha ↔ x ∈ s 
goal: x ∈ NonUnitalSubsemiring.mk' s sg hg sa ha ↔ x ∈ s

full_name: NonUnitalSubsemiring.mk'_toSubsemigroup
code: @[simp]
theorem mk'_toSubsemigroup {s : Set R} {sg : Subsemigroup R} (hg : ↑sg = s) {sa : AddSubmonoid R}
    (ha : ↑sa = s) : (NonUnitalSubsemiring.mk' s sg hg sa ha).toSubsemigroup = sg 
goal: (NonUnitalSubsemiring.mk' s sg hg sa ha).toSubsemigroup = sg

full_name: NonUnitalSubsemiring.mk'_toAddSubmonoid
code: @[simp]
theorem mk'_toAddSubmonoid {s : Set R} {sg : Subsemigroup R} (hg : ↑sg = s) {sa : AddSubmonoid R}
    (ha : ↑sa = s) : (NonUnitalSubsemiring.mk' s sg hg sa ha).toAddSubmonoid = sa 
goal: (NonUnitalSubsemiring.mk' s sg hg sa ha).toAddSubmonoid = sa

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

full_name: NonUnitalSubsemiring.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: NonUnitalSubsemiring.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: NonUnitalSubsemiring.mem_toSubsemigroup
code: @[simp high]
theorem mem_toSubsemigroup {s : NonUnitalSubsemiring R} {x : R} : x ∈ s.toSubsemigroup ↔ x ∈ s 
goal: x ∈ s.toSubsemigroup ↔ x ∈ s

full_name: NonUnitalSubsemiring.coe_toSubsemigroup
code: @[simp high]
theorem coe_toSubsemigroup (s : NonUnitalSubsemiring R) : (s.toSubsemigroup : Set R) = s 
goal: ↑s.toSubsemigroup = ↑s

full_name: NonUnitalSubsemiring.mem_toAddSubmonoid
code: @[simp]
theorem mem_toAddSubmonoid {s : NonUnitalSubsemiring R} {x : R} : x ∈ s.toAddSubmonoid ↔ x ∈ s 
goal: x ∈ s.toAddSubmonoid ↔ x ∈ s

full_name: NonUnitalSubsemiring.coe_toAddSubmonoid
code: @[simp]
theorem coe_toAddSubmonoid (s : NonUnitalSubsemiring R) : (s.toAddSubmonoid : Set R) = s 
goal: ↑s.toAddSubmonoid = ↑s

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

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

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

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

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

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

full_name: NonUnitalSubsemiring.comap
code: /-- The preimage of a non-unital subsemiring along a non-unital ring homomorphism is a
non-unital subsemiring. -/
def comap (f : F) (s : NonUnitalSubsemiring S) : NonUnitalSubsemiring R 
goal: NonUnitalSubsemiring R

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

full_name: NonUnitalSubsemiring.mem_comap
code: @[simp]
theorem mem_comap {s : NonUnitalSubsemiring S} {f : F} {x : R} : x ∈ s.comap f ↔ f x ∈ s 
goal: x ∈ NonUnitalSubsemiring.comap f s ↔ f x ∈ s

full_name: NonUnitalSubsemiring.comap_comap
code: theorem comap_comap (s : NonUnitalSubsemiring T) (g : G) (f : F) :
    ((s.comap g : NonUnitalSubsemiring S).comap f : NonUnitalSubsemiring R) =
      s.comap ((g : S →ₙ+* T).comp (f : R →ₙ+* S)) 
goal: NonUnitalSubsemiring.comap f (NonUnitalSubsemiring.comap g s) = NonUnitalSubsemiring.comap ((↑g).comp ↑f) s

full_name: NonUnitalSubsemiring.map
code: /-- The image of a non-unital subsemiring along a ring homomorphism is a non-unital subsemiring. -/
def map (f : F) (s : NonUnitalSubsemiring R) : NonUnitalSubsemiring S 
goal: NonUnitalSubsemiring S

full_name: NonUnitalSubsemiring.coe_map
code: @[simp]
theorem coe_map (f : F) (s : NonUnitalSubsemiring R) : (s.map f : Set S) = f '' s 
goal: ↑(NonUnitalSubsemiring.map f s) = ⇑f '' ↑s

full_name: NonUnitalSubsemiring.mem_map
code: @[simp]
theorem mem_map {f : F} {s : NonUnitalSubsemiring R} {y : S} : y ∈ s.map f ↔ ∃ x ∈ s, f x = y 
goal: y ∈ NonUnitalSubsemiring.map f s ↔ ∃ x ∈ s, f x = y

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

full_name: NonUnitalSubsemiring.map_map
code: theorem map_map (g : G) (f : F) :
    (s.map (f : R →ₙ+* S)).map (g : S →ₙ+* T) = s.map ((g : S →ₙ+* T).comp (f : R →ₙ+* S)) 
goal: NonUnitalSubsemiring.map (↑g) (NonUnitalSubsemiring.map (↑f) s) = NonUnitalSubsemiring.map ((↑g).comp ↑f) s

full_name: NonUnitalSubsemiring.map_le_iff_le_comap
code: theorem map_le_iff_le_comap {f : F} {s : NonUnitalSubsemiring R} {t : NonUnitalSubsemiring S} :
    s.map f ≤ t ↔ s ≤ t.comap f 
goal: NonUnitalSubsemiring.map f s ≤ t ↔ s ≤ NonUnitalSubsemiring.comap f t

full_name: NonUnitalSubsemiring.gc_map_comap
code: theorem gc_map_comap (f : F) :
    @GaloisConnection (NonUnitalSubsemiring R) (NonUnitalSubsemiring S) _ _ (map f) (comap f) 
goal: GaloisConnection (NonUnitalSubsemiring.map f) (NonUnitalSubsemiring.comap f)

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

full_name: NonUnitalSubsemiring.coe_equivMapOfInjective_apply
code: @[simp]
theorem coe_equivMapOfInjective_apply (f : F) (hf : Function.Injective f) (x : s) :
    (equivMapOfInjective s f hf x : S) = f x 
goal: ↑((s.equivMapOfInjective f hf) x) = f ↑x

full_name: NonUnitalRingHom.srange
code: /-- The range of a non-unital ring homomorphism is a non-unital subsemiring.
See note [range copy pattern]. -/
def srange : NonUnitalSubsemiring S 
goal: NonUnitalSubsemiring S

full_name: NonUnitalRingHom.coe_srange
code: @[simp]
theorem coe_srange : (srange f : Set S) = Set.range f 
goal: ↑(NonUnitalRingHom.srange f) = Set.range ⇑f

full_name: NonUnitalRingHom.mem_srange
code: @[simp]
theorem mem_srange {f : F} {y : S} : y ∈ srange f ↔ ∃ x, f x = y 
goal: y ∈ NonUnitalRingHom.srange f ↔ ∃ x, f x = y

full_name: NonUnitalRingHom.srange_eq_map
code: theorem srange_eq_map : srange f = (⊤ : NonUnitalSubsemiring R).map f 
goal: NonUnitalRingHom.srange f = NonUnitalSubsemiring.map f ⊤

full_name: NonUnitalRingHom.mem_srange_self
code: theorem mem_srange_self (f : F) (x : R) : f x ∈ srange f 
goal: f x ∈ NonUnitalRingHom.srange f

full_name: NonUnitalRingHom.map_srange
code: theorem map_srange (g : S →ₙ+* T) (f : R →ₙ+* S) : map g (srange f) = srange (g.comp f) 
goal: NonUnitalSubsemiring.map g (NonUnitalRingHom.srange f) = NonUnitalRingHom.srange (g.comp f)

full_name: NonUnitalRingHom.finite_srange
code: /-- The range of a morphism of non-unital semirings is finite if the domain is a finite. -/
instance finite_srange [Finite R] (f : F) : Finite (srange f : NonUnitalSubsemiring S) 
goal: Finite ↥(NonUnitalRingHom.srange f)

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

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

full_name: NonUnitalSubsemiring.coe_bot
code: theorem coe_bot : ((⊥ : NonUnitalSubsemiring R) : Set R) = {0} 
goal: ↑⊥ = {0}

full_name: NonUnitalSubsemiring.mem_bot
code: theorem mem_bot {x : R} : x ∈ (⊥ : NonUnitalSubsemiring R) ↔ x = 0 
goal: x ∈ ⊥ ↔ x = 0

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

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

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

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

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

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

full_name: NonUnitalSubsemiring.sInf_toSubsemigroup
code: @[simp]
theorem sInf_toSubsemigroup (s : Set (NonUnitalSubsemiring R)) :
    (sInf s).toSubsemigroup = ⨅ t ∈ s, NonUnitalSubsemiring.toSubsemigroup t 
goal: (sInf s).toSubsemigroup = ⨅ t ∈ s, t.toSubsemigroup

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

full_name: NonUnitalSubsemiring.instCompleteLattice
code: /-- Non-unital subsemirings of a non-unital semiring form a complete lattice. -/
instance : CompleteLattice (NonUnitalSubsemiring R) 
goal: CompleteLattice (NonUnitalSubsemiring R)

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

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

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

full_name: NonUnitalSubsemiring.center_toSubsemigroup
code: @[simp]
theorem center_toSubsemigroup :
    (center R).toSubsemigroup = Subsemigroup.center R 
goal: (NonUnitalSubsemiring.center R).toSubsemigroup = Subsemigroup.center R

full_name: NonUnitalSubsemiring.center.instNonUnitalCommSemiring
code: /-- The center is commutative and associative. -/
instance center.instNonUnitalCommSemiring : NonUnitalCommSemiring (center R) 
goal: NonUnitalCommSemiring ↥(NonUnitalSubsemiring.center R)

full_name: Set.mem_center_iff_addMonoidHom
code: /-- A point-free means of proving membership in the center, for a non-associative ring.

This can be helpful when working with types that have ext lemmas for `R →+ R`. -/
lemma _root_.Set.mem_center_iff_addMonoidHom (a : R) :
    a ∈ Set.center R ↔
      AddMonoidHom.mulLeft a = .mulRight a ∧
      AddMonoidHom.compr₂ .mul (.mulLeft a) = .comp .mul (.mulLeft a) ∧
      AddMonoidHom.comp .mul (.mulRight a) = .compl₂ .mul (.mulLeft a) ∧
      AddMonoidHom.compr₂ .mul (.mulRight a) = .compl₂ .mul (.mulRight a) 
goal: a ∈ Set.center R ↔
  AddMonoidHom.mulLeft a = AddMonoidHom.mulRight a ∧
    AddMonoidHom.mul.compr₂ (AddMonoidHom.mulLeft a) = AddMonoidHom.mul.comp (AddMonoidHom.mulLeft a) ∧
      AddMonoidHom.mul.comp (AddMonoidHom.mulRight a) = AddMonoidHom.mul.compl₂ (AddMonoidHom.mulLeft a) ∧
        AddMonoidHom.mul.compr₂ (AddMonoidHom.mulRight a) = AddMonoidHom.mul.compl₂ (AddMonoidHom.mulRight a)

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

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

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

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

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

full_name: NonUnitalSubsemiring.centralizer_toSubsemigroup
code: theorem centralizer_toSubsemigroup {R} [NonUnitalSemiring R] (s : Set R) :
    (centralizer s).toSubsemigroup = Subsemigroup.centralizer s 
goal: (NonUnitalSubsemiring.centralizer s).toSubsemigroup = Subsemigroup.centralizer s

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

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

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

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

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

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

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

full_name: NonUnitalSubsemiring.subset_closure
code: /-- The non-unital 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 ⊆ ↑(NonUnitalSubsemiring.closure s)

full_name: NonUnitalSubsemiring.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: NonUnitalSubsemiring.closure_le
code: /-- A non-unital subsemiring `S` includes `closure s` if and only if it includes `s`. -/
@[simp]
theorem closure_le {s : Set R} {t : NonUnitalSubsemiring R} : closure s ≤ t ↔ s ⊆ t 
goal: NonUnitalSubsemiring.closure s ≤ t ↔ s ⊆ ↑t

full_name: NonUnitalSubsemiring.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: NonUnitalSubsemiring.closure s ≤ NonUnitalSubsemiring.closure t

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

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

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

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

full_name: Subsemigroup.nonUnitalSubsemiringClosure
code: /-- The additive closure of a non-unital subsemigroup is a non-unital subsemiring. -/
def nonUnitalSubsemiringClosure (M : Subsemigroup R) : NonUnitalSubsemiring R 
goal: NonUnitalSubsemiring R

full_name: Subsemigroup.nonUnitalSubsemiringClosure_coe
code: theorem nonUnitalSubsemiringClosure_coe :
    (M.nonUnitalSubsemiringClosure : Set R) = AddSubmonoid.closure (M : Set R) 
goal: ↑M.nonUnitalSubsemiringClosure = ↑(AddSubmonoid.closure ↑M)

full_name: Subsemigroup.nonUnitalSubsemiringClosure_toAddSubmonoid
code: theorem nonUnitalSubsemiringClosure_toAddSubmonoid :
    M.nonUnitalSubsemiringClosure.toAddSubmonoid = AddSubmonoid.closure (M : Set R) 
goal: M.nonUnitalSubsemiringClosure.toAddSubmonoid = AddSubmonoid.closure ↑M

full_name: Subsemigroup.nonUnitalSubsemiringClosure_eq_closure
code: /-- The `NonUnitalSubsemiring` generated by a multiplicative subsemigroup coincides with the
`NonUnitalSubsemiring.closure` of the subsemigroup itself . -/
theorem nonUnitalSubsemiringClosure_eq_closure :
    M.nonUnitalSubsemiringClosure = NonUnitalSubsemiring.closure (M : Set R) 
goal: M.nonUnitalSubsemiringClosure = NonUnitalSubsemiring.closure ↑M

full_name: NonUnitalSubsemiring.closure_subsemigroup_closure
code: @[simp]
theorem closure_subsemigroup_closure (s : Set R) : closure ↑(Subsemigroup.closure s) = closure s 
goal: NonUnitalSubsemiring.closure ↑(Subsemigroup.closure s) = NonUnitalSubsemiring.closure s

full_name: NonUnitalSubsemiring.coe_closure_eq
code: /-- The elements of the non-unital subsemiring closure of `M` are exactly the elements of the
additive closure of a multiplicative subsemigroup `M`. -/
theorem coe_closure_eq (s : Set R) :
    (closure s : Set R) = AddSubmonoid.closure (Subsemigroup.closure s : Set R) 
goal: ↑(NonUnitalSubsemiring.closure s) = ↑(AddSubmonoid.closure ↑(Subsemigroup.closure s))

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

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

full_name: NonUnitalSubsemiring.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) (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: NonUnitalSubsemiring.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) (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: NonUnitalSubsemiring.gi
code: /-- `closure` forms a Galois insertion with the coercion to set. -/
protected def gi : GaloisInsertion (@closure R _) (↑) 
goal: GaloisInsertion NonUnitalSubsemiring.closure SetLike.coe

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

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

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

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

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

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

full_name: NonUnitalSubsemiring.map_sup
code: theorem map_sup (s t : NonUnitalSubsemiring R) (f : F) :
    (map f (s ⊔ t) : NonUnitalSubsemiring S) = map f s ⊔ map f t 
goal: NonUnitalSubsemiring.map f (s ⊔ t) = NonUnitalSubsemiring.map f s ⊔ NonUnitalSubsemiring.map f t

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

full_name: NonUnitalSubsemiring.comap_inf
code: theorem comap_inf (s t : NonUnitalSubsemiring S) (f : F) :
    (comap f (s ⊓ t) : NonUnitalSubsemiring R) = comap f s ⊓ comap f t 
goal: NonUnitalSubsemiring.comap f (s ⊓ t) = NonUnitalSubsemiring.comap f s ⊓ NonUnitalSubsemiring.comap f t

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

full_name: NonUnitalSubsemiring.map_bot
code: @[simp]
theorem map_bot (f : F) : map f (⊥ : NonUnitalSubsemiring R) = (⊥ : NonUnitalSubsemiring S) 
goal: NonUnitalSubsemiring.map f ⊥ = ⊥

full_name: NonUnitalSubsemiring.comap_top
code: @[simp]
theorem comap_top (f : F) : comap f (⊤ : NonUnitalSubsemiring S) = (⊤ : NonUnitalSubsemiring R) 
goal: NonUnitalSubsemiring.comap f ⊤ = ⊤

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

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

full_name: NonUnitalSubsemiring.mem_prod
code: theorem mem_prod {s : NonUnitalSubsemiring R} {t : NonUnitalSubsemiring 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: NonUnitalSubsemiring.prod_mono
code: @[mono]
theorem prod_mono ⦃s₁ s₂ : NonUnitalSubsemiring R⦄ (hs : s₁ ≤ s₂) ⦃t₁ t₂ : NonUnitalSubsemiring S⦄
    (ht : t₁ ≤ t₂) : s₁.prod t₁ ≤ s₂.prod t₂ 
goal: s₁.prod t₁ ≤ s₂.prod t₂

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

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

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

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

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

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

full_name: NonUnitalSubsemiring.mem_iSup_of_directed
code: theorem mem_iSup_of_directed {ι} [hι : Nonempty ι] {S : ι → NonUnitalSubsemiring 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: NonUnitalSubsemiring.coe_iSup_of_directed
code: theorem coe_iSup_of_directed {ι} [hι : Nonempty ι] {S : ι → NonUnitalSubsemiring R}
    (hS : Directed (· ≤ ·) S) : ((⨆ i, S i : NonUnitalSubsemiring R) : Set R) = ⋃ i, S i 
goal: ↑(⨆ i, S i) = ⋃ i, ↑(S i)

full_name: NonUnitalSubsemiring.mem_sSup_of_directedOn
code: theorem mem_sSup_of_directedOn {S : Set (NonUnitalSubsemiring 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: NonUnitalSubsemiring.coe_sSup_of_directedOn
code: theorem coe_sSup_of_directedOn {S : Set (NonUnitalSubsemiring R)} (Sne : S.Nonempty)
    (hS : DirectedOn (· ≤ ·) S) : (↑(sSup S) : Set R) = ⋃ s ∈ S, ↑s 
goal: ↑(sSup S) = ⋃ s ∈ S, ↑s

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

full_name: NonUnitalRingHom.srangeRestrict
code: /-- Restriction of a non-unital ring homomorphism to its range interpreted as a
non-unital subsemiring.

This is the bundled version of `Set.rangeFactorization`. -/
def srangeRestrict (f : F) : R →ₙ+* (srange f : NonUnitalSubsemiring S) 
goal: R →ₙ+* ↥(NonUnitalRingHom.srange f)

full_name: NonUnitalRingHom.coe_srangeRestrict
code: @[simp]
theorem coe_srangeRestrict (f : F) (x : R) : (srangeRestrict f x : S) = f x 
goal: ↑((NonUnitalRingHom.srangeRestrict f) x) = f x

full_name: NonUnitalRingHom.srangeRestrict_surjective
code: theorem srangeRestrict_surjective (f : F) :
    Function.Surjective (srangeRestrict f : R → (srange f : NonUnitalSubsemiring S)) 
goal: Function.Surjective ⇑(NonUnitalRingHom.srangeRestrict f)

full_name: NonUnitalRingHom.srange_top_iff_surjective
code: theorem srange_top_iff_surjective {f : F} :
    srange f = (⊤ : NonUnitalSubsemiring S) ↔ Function.Surjective (f : R → S) 
goal: NonUnitalRingHom.srange f = ⊤ ↔ Function.Surjective ⇑f

full_name: NonUnitalRingHom.srange_top_of_surjective
code: /-- The range of a surjective non-unital ring homomorphism is the whole of the codomain. -/
@[simp]
theorem srange_top_of_surjective (f : F) (hf : Function.Surjective (f : R → S)) :
    srange f = (⊤ : NonUnitalSubsemiring S) 
goal: NonUnitalRingHom.srange f = ⊤

full_name: NonUnitalRingHom.eqSlocus
code: /-- The non-unital subsemiring of elements `x : R` such that `f x = g x` -/
def eqSlocus (f g : F) : NonUnitalSubsemiring R 
goal: NonUnitalSubsemiring R

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

full_name: NonUnitalRingHom.eq_of_eqOn_stop
code: theorem eq_of_eqOn_stop {f g : F}
    (h : Set.EqOn (f : R → S) (g : R → S) (⊤ : NonUnitalSubsemiring R)) : f = g 
goal: f = g

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

full_name: NonUnitalRingHom.sclosure_preimage_le
code: theorem sclosure_preimage_le (f : F) (s : Set S) :
    closure ((f : R → S) ⁻¹' s) ≤ (closure s).comap f 
goal: NonUnitalSubsemiring.closure (⇑f ⁻¹' s) ≤ NonUnitalSubsemiring.comap f (NonUnitalSubsemiring.closure s)

full_name: NonUnitalRingHom.map_sclosure
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_sclosure (f : F) (s : Set R) : (closure s).map f = closure ((f : R → S) '' s) 
goal: NonUnitalSubsemiring.map f (NonUnitalSubsemiring.closure s) = NonUnitalSubsemiring.closure (⇑f '' s)

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

full_name: NonUnitalSubsemiring.srange_subtype
code: @[simp]
theorem srange_subtype (s : NonUnitalSubsemiring R) : NonUnitalRingHom.srange (subtype s) = s 
goal: NonUnitalRingHom.srange (NonUnitalSubsemiringClass.subtype s) = s

full_name: NonUnitalSubsemiring.range_fst
code: @[simp]
theorem range_fst : NonUnitalRingHom.srange (fst R S) = ⊤ 
goal: NonUnitalRingHom.srange (NonUnitalRingHom.fst R S) = ⊤

full_name: NonUnitalSubsemiring.range_snd
code: @[simp]
theorem range_snd : NonUnitalRingHom.srange (snd R S) = ⊤ 
goal: NonUnitalRingHom.srange (NonUnitalRingHom.snd R S) = ⊤

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

full_name: RingEquiv.sofLeftInverse'
code: /-- Restrict a non-unital ring homomorphism with a left inverse to a ring isomorphism to its
`NonUnitalRingHom.srange`. -/
def sofLeftInverse' {g : S → R} {f : F} (h : Function.LeftInverse g f) : R ≃+* srange f 
goal: R ≃+* ↥(NonUnitalRingHom.srange f)

full_name: RingEquiv.sofLeftInverse'_apply
code: @[simp]
theorem sofLeftInverse'_apply {g : S → R} {f : F} (h : Function.LeftInverse g f) (x : R) :
    ↑(sofLeftInverse' h x) = f x 
goal: ↑((RingEquiv.sofLeftInverse' h) x) = f x

full_name: RingEquiv.sofLeftInverse'_symm_apply
code: @[simp]
theorem sofLeftInverse'_symm_apply {g : S → R} {f : F} (h : Function.LeftInverse g f)
    (x : srange f) : (sofLeftInverse' h).symm x = g x 
goal: (RingEquiv.sofLeftInverse' h).symm x = g ↑x

full_name: RingEquiv.nonUnitalSubsemiringMap
code: /-- Given an equivalence `e : R ≃+* S` of non-unital semirings and a non-unital subsemiring
`s` of `R`, `non_unital_subsemiring_map e s` is the induced equivalence between `s` and
`s.map e` -/
@[simps!]
def nonUnitalSubsemiringMap (e : R ≃+* S) (s : NonUnitalSubsemiring R) :
    s ≃+* NonUnitalSubsemiring.map e.toNonUnitalRingHom s 
goal: ↥s ≃+* ↥(NonUnitalSubsemiring.map e.toNonUnitalRingHom s)

full_name: RingEquiv.nonUnitalSubsemiringMap_symm_apply_coe
code: /-- Given an equivalence `e : R ≃+* S` of non-unital semirings and a non-unital subsemiring
`s` of `R`, `non_unital_subsemiring_map e s` is the induced equivalence between `s` and
`s.map e` -/
@[simps!]
def nonUnitalSubsemiringMap (e : R ≃+* S) (s : NonUnitalSubsemiring R) :
    s ≃+* NonUnitalSubsemiring.map e.toNonUnitalRingHom s 
goal: ↑((e.nonUnitalSubsemiringMap s).symm y) = (↑e).symm ↑y

full_name: RingEquiv.nonUnitalSubsemiringMap_apply_coe
code: /-- Given an equivalence `e : R ≃+* S` of non-unital semirings and a non-unital subsemiring
`s` of `R`, `non_unital_subsemiring_map e s` is the induced equivalence between `s` and
`s.map e` -/
@[simps!]
def nonUnitalSubsemiringMap (e : R ≃+* S) (s : NonUnitalSubsemiring R) :
    s ≃+* NonUnitalSubsemiring.map e.toNonUnitalRingHom s 
goal: ↑((e.nonUnitalSubsemiringMap s) x) = e ↑x