File: Mathlib/RingTheory/NonUnitalSubring/Basic.lean

full_name: NonUnitalSubringClass
code: /-- `NonUnitalSubringClass S R` states that `S` is a type of subsets `s ⊆ R` that
are both a multiplicative submonoid and an additive subgroup. -/
class NonUnitalSubringClass (S : Type*) (R : Type u) [NonUnitalNonAssocRing R]
    [SetLike S R] extends NonUnitalSubsemiringClass S R, NegMemClass S R : Prop where
goal: Prop

full_name: NonUnitalSubringClass.addSubgroupClass
code: instance (priority := 100) NonUnitalSubringClass.addSubgroupClass (S : Type*) (R : Type u)
    [SetLike S R] [NonUnitalNonAssocRing R] [h : NonUnitalSubringClass S R] :
    AddSubgroupClass S R 
goal: AddSubgroupClass S R

full_name: NonUnitalSubringClass.toNonUnitalNonAssocRing
code: /-- A non-unital subring of a non-unital ring inherits a non-unital ring structure -/
instance (priority := 75) toNonUnitalNonAssocRing : NonUnitalNonAssocRing s 
goal: NonUnitalNonAssocRing ↥s

full_name: NonUnitalSubringClass.toNonUnitalRing
code: /-- A non-unital subring of a non-unital ring inherits a non-unital ring structure -/
instance (priority := 75) toNonUnitalRing {R : Type*} [NonUnitalRing R] [SetLike S R]
    [NonUnitalSubringClass S R] (s : S) : NonUnitalRing s 
goal: NonUnitalRing ↥s

full_name: NonUnitalSubringClass.toNonUnitalCommRing
code: /-- A non-unital subring of a `NonUnitalCommRing` is a `NonUnitalCommRing`. -/
instance (priority := 75) toNonUnitalCommRing {R} [NonUnitalCommRing R] [SetLike S R]
    [NonUnitalSubringClass S R] : NonUnitalCommRing s 
goal: NonUnitalCommRing ↥s

full_name: NonUnitalSubringClass.subtype
code: /-- The natural non-unital ring hom from a non-unital subring of a non-unital ring `R` to `R`. -/
def subtype (s : S) : s →ₙ+* R 
goal: ↥s →ₙ+* R

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

full_name: NonUnitalSubring
code: /-- `NonUnitalSubring R` is the type of non-unital subrings of `R`. A non-unital subring of `R`
is a subset `s` that is a multiplicative subsemigroup and an additive subgroup. Note in particular
that it shares the same 0 as R. -/
structure NonUnitalSubring (R : Type u) [NonUnitalNonAssocRing R] extends
  NonUnitalSubsemiring R, AddSubgroup R
goal: Type u

full_name: NonUnitalSubring.toSubsemigroup
code: /-- The underlying submonoid of a `NonUnitalSubring`. -/
def toSubsemigroup (s : NonUnitalSubring R) : Subsemigroup R 
goal: Subsemigroup R

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

full_name: NonUnitalSubring.instNonUnitalSubringClass
code: instance : NonUnitalSubringClass (NonUnitalSubring R) R 
goal: NonUnitalSubringClass (NonUnitalSubring R) R

full_name: NonUnitalSubring.mem_carrier
code: theorem mem_carrier {s : NonUnitalSubring R} {x : R} : x ∈ s.toNonUnitalSubsemiring ↔ x ∈ s 
goal: x ∈ s.toNonUnitalSubsemiring ↔ x ∈ s

full_name: NonUnitalSubring.mem_mk
code: @[simp]
theorem mem_mk {S : NonUnitalSubsemiring R} {x : R} (h) :
    x ∈ (⟨S, h⟩ : NonUnitalSubring R) ↔ x ∈ S 
goal: x ∈ { toNonUnitalSubsemiring := S, neg_mem' := h } ↔ x ∈ S

full_name: NonUnitalSubring.coe_set_mk
code: @[simp]
theorem coe_set_mk (S : NonUnitalSubsemiring R) (h) :
    ((⟨S, h⟩ : NonUnitalSubring R) : Set R) = S 
goal: ↑{ toNonUnitalSubsemiring := S, neg_mem' := h } = ↑S

full_name: NonUnitalSubring.mk_le_mk
code: @[simp]
theorem mk_le_mk {S S' : NonUnitalSubsemiring R} (h h') :
    (⟨S, h⟩ : NonUnitalSubring R) ≤ (⟨S', h'⟩ : NonUnitalSubring R) ↔ S ≤ S' 
goal: { toNonUnitalSubsemiring := S, neg_mem' := h } ≤ { toNonUnitalSubsemiring := S', neg_mem' := h' } ↔ S ≤ S'

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

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

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

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

full_name: NonUnitalSubring.toNonUnitalSubsemiring_injective
code: theorem toNonUnitalSubsemiring_injective :
    Function.Injective (toNonUnitalSubsemiring : NonUnitalSubring R → NonUnitalSubsemiring R)
  
goal: Function.Injective NonUnitalSubring.toNonUnitalSubsemiring

full_name: NonUnitalSubring.toNonUnitalSubsemiring_strictMono
code: @[mono]
theorem toNonUnitalSubsemiring_strictMono :
    StrictMono (toNonUnitalSubsemiring : NonUnitalSubring R → NonUnitalSubsemiring R) 
goal: StrictMono NonUnitalSubring.toNonUnitalSubsemiring

full_name: NonUnitalSubring.toNonUnitalSubsemiring_mono
code: @[mono]
theorem toNonUnitalSubsemiring_mono :
    Monotone (toNonUnitalSubsemiring : NonUnitalSubring R → NonUnitalSubsemiring R) 
goal: Monotone NonUnitalSubring.toNonUnitalSubsemiring

full_name: NonUnitalSubring.toAddSubgroup_injective
code: theorem toAddSubgroup_injective :
    Function.Injective (toAddSubgroup : NonUnitalSubring R → AddSubgroup R)
  
goal: Function.Injective NonUnitalSubring.toAddSubgroup

full_name: NonUnitalSubring.toAddSubgroup_strictMono
code: @[mono]
theorem toAddSubgroup_strictMono :
    StrictMono (toAddSubgroup : NonUnitalSubring R → AddSubgroup R) 
goal: StrictMono NonUnitalSubring.toAddSubgroup

full_name: NonUnitalSubring.toAddSubgroup_mono
code: @[mono]
theorem toAddSubgroup_mono : Monotone (toAddSubgroup : NonUnitalSubring R → AddSubgroup R) 
goal: Monotone NonUnitalSubring.toAddSubgroup

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

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

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

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

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

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

full_name: NonUnitalSubring.mk'_toSubsemigroup
code: @[simp]
theorem mk'_toSubsemigroup {s : Set R} {sm : Subsemigroup R} (hm : ↑sm = s) {sa : AddSubgroup R}
    (ha : ↑sa = s) : (NonUnitalSubring.mk' s sm sa hm ha).toSubsemigroup = sm 
goal: (NonUnitalSubring.mk' s sm sa hm ha).toSubsemigroup = sm

full_name: NonUnitalSubring.mk'_toAddSubgroup
code: @[simp]
theorem mk'_toAddSubgroup {s : Set R} {sm : Subsemigroup R} (hm : ↑sm = s) {sa : AddSubgroup R}
    (ha : ↑sa = s) : (NonUnitalSubring.mk' s sm sa hm ha).toAddSubgroup = sa 
goal: (NonUnitalSubring.mk' s sm sa hm ha).toAddSubgroup = sa

full_name: NonUnitalSubring.zero_mem
code: /-- A non-unital subring contains the ring's 0. -/
protected theorem zero_mem : (0 : R) ∈ s 
goal: 0 ∈ s

full_name: NonUnitalSubring.mul_mem
code: /-- A non-unital subring 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: NonUnitalSubring.add_mem
code: /-- A non-unital subring 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: NonUnitalSubring.neg_mem
code: /-- A non-unital subring is closed under negation. -/
protected theorem neg_mem {x : R} : x ∈ s → -x ∈ s 
goal: x ∈ s → -x ∈ s

full_name: NonUnitalSubring.sub_mem
code: /-- A non-unital subring is closed under subtraction -/
protected theorem sub_mem {x y : R} (hx : x ∈ s) (hy : y ∈ s) : x - y ∈ s 
goal: x - y ∈ s

full_name: NonUnitalSubring.list_sum_mem
code: /-- Sum of a list of elements in a non-unital subring is in the non-unital subring. -/
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: NonUnitalSubring.multiset_sum_mem
code: /-- Sum of a multiset of elements in a `NonUnitalSubring` of a `NonUnitalRing` is
in the `NonUnitalSubring`. -/
protected theorem multiset_sum_mem {R} [NonUnitalNonAssocRing R] (s : NonUnitalSubring R)
    (m : Multiset R) : (∀ a ∈ m, a ∈ s) → m.sum ∈ s 
goal: (∀ a ∈ m, a ∈ s) → m.sum ∈ s

full_name: NonUnitalSubring.sum_mem
code: /-- Sum of elements in a `NonUnitalSubring` of a `NonUnitalRing` indexed by a `Finset`
is in the `NonUnitalSubring`. -/
protected theorem sum_mem {R : Type*} [NonUnitalNonAssocRing R] (s : NonUnitalSubring 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: NonUnitalSubring.toNonUnitalRing
code: /-- A non-unital subring of a non-unital ring inherits a non-unital ring structure -/
instance toNonUnitalRing {R : Type*} [NonUnitalRing R] (s : NonUnitalSubring R) :
    NonUnitalRing s 
goal: NonUnitalRing ↥s

full_name: NonUnitalSubring.zsmul_mem
code: protected theorem zsmul_mem {x : R} (hx : x ∈ s) (n : ℤ) : n • x ∈ s 
goal: n • x ∈ s

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

full_name: NonUnitalSubring.val_neg
code: @[simp, norm_cast]
theorem val_neg (x : s) : (↑(-x) : R) = -↑x 
goal: ↑(-x) = -↑x

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

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

full_name: NonUnitalSubring.coe_eq_zero_iff
code: theorem coe_eq_zero_iff {x : s} : (x : R) = 0 ↔ x = 0 
goal: ↑x = 0 ↔ x = 0

full_name: NonUnitalSubring.toNonUnitalCommRing
code: /-- A non-unital subring of a `NonUnitalCommRing` is a `NonUnitalCommRing`. -/
instance toNonUnitalCommRing {R} [NonUnitalCommRing R] (s : NonUnitalSubring R) :
    NonUnitalCommRing s 
goal: NonUnitalCommRing ↥s

full_name: NonUnitalSubring.mem_toSubsemigroup
code: @[simp]
theorem mem_toSubsemigroup {s : NonUnitalSubring R} {x : R} : x ∈ s.toSubsemigroup ↔ x ∈ s 
goal: x ∈ s.toSubsemigroup ↔ x ∈ s

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

full_name: NonUnitalSubring.mem_toAddSubgroup
code: @[simp]
theorem mem_toAddSubgroup {s : NonUnitalSubring R} {x : R} : x ∈ s.toAddSubgroup ↔ x ∈ s 
goal: x ∈ s.toAddSubgroup ↔ x ∈ s

full_name: NonUnitalSubring.coe_toAddSubgroup
code: @[simp]
theorem coe_toAddSubgroup (s : NonUnitalSubring R) : (s.toAddSubgroup : Set R) = s 
goal: ↑s.toAddSubgroup = ↑s

full_name: NonUnitalSubring.mem_toNonUnitalSubsemiring
code: @[simp]
theorem mem_toNonUnitalSubsemiring {s : NonUnitalSubring R} {x : R} :
    x ∈ s.toNonUnitalSubsemiring ↔ x ∈ s 
goal: x ∈ s.toNonUnitalSubsemiring ↔ x ∈ s

full_name: NonUnitalSubring.coe_toNonUnitalSubsemiring
code: @[simp]
theorem coe_toNonUnitalSubsemiring (s : NonUnitalSubring R) :
    (s.toNonUnitalSubsemiring : Set R) = s 
goal: ↑s.toNonUnitalSubsemiring = ↑s

full_name: NonUnitalSubring.instTop
code: /-- The non-unital subring `R` of the ring `R`. -/
instance : Top (NonUnitalSubring R) 
goal: Top (NonUnitalSubring R)

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

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

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

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

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

full_name: NonUnitalSubring.comap
code: /-- The preimage of a `NonUnitalSubring` along a ring homomorphism is a `NonUnitalSubring`. -/
def comap {F : Type w} {R : Type u} {S : Type v} [NonUnitalNonAssocRing R] [NonUnitalNonAssocRing S]
    [FunLike F R S] [NonUnitalRingHomClass F R S] (f : F) (s : NonUnitalSubring S) :
    NonUnitalSubring R 
goal: NonUnitalSubring R

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

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

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

full_name: NonUnitalSubring.map
code: /-- The image of a `NonUnitalSubring` along a ring homomorphism is a `NonUnitalSubring`. -/
def map {F : Type w} {R : Type u} {S : Type v} [NonUnitalNonAssocRing R] [NonUnitalNonAssocRing S]
    [FunLike F R S] [NonUnitalRingHomClass F R S] (f : F) (s : NonUnitalSubring R) :
    NonUnitalSubring S 
goal: NonUnitalSubring S

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

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

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

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

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

full_name: NonUnitalSubring.gc_map_comap
code: theorem gc_map_comap (f : F) :
    GaloisConnection (map f : NonUnitalSubring R → NonUnitalSubring S) (comap f) 
goal: GaloisConnection (NonUnitalSubring.map f) (NonUnitalSubring.comap f)

full_name: NonUnitalSubring.equivMapOfInjective
code: /-- A `NonUnitalSubring` 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 ≃+* ↥(NonUnitalSubring.map f s)

full_name: NonUnitalSubring.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.range
code: /-- The range of a ring homomorphism, as a `NonUnitalSubring` of the target.
See Note [range copy pattern]. -/
def range {R : Type u} {S : Type v} [NonUnitalNonAssocRing R] [NonUnitalNonAssocRing S]
    (f : R →ₙ+* S) : NonUnitalSubring S 
goal: NonUnitalSubring S

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

full_name: NonUnitalRingHom.mem_range
code: @[simp]
theorem mem_range {f : R →ₙ+* S} {y : S} : y ∈ f.range ↔ ∃ x, f x = y 
goal: y ∈ f.range ↔ ∃ x, f x = y

full_name: NonUnitalRingHom.range_eq_map
code: theorem range_eq_map (f : R →ₙ+* S) : f.range = NonUnitalSubring.map f ⊤ 
goal: f.range = NonUnitalSubring.map f ⊤

full_name: NonUnitalRingHom.mem_range_self
code: theorem mem_range_self (f : R →ₙ+* S) (x : R) : f x ∈ f.range 
goal: f x ∈ f.range

full_name: NonUnitalRingHom.map_range
code: theorem map_range : f.range.map g = (g.comp f).range 
goal: NonUnitalSubring.map g f.range = (g.comp f).range

full_name: NonUnitalRingHom.fintypeRange
code: /-- The range of a ring homomorphism is a fintype, if the domain is a fintype.
Note: this instance can form a diamond with `Subtype.fintype` in the
  presence of `Fintype S`. -/
instance fintypeRange [Fintype R] [DecidableEq S] (f : R →ₙ+* S) : Fintype (range f) 
goal: Fintype ↥f.range

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

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

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

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

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

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

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

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

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

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

full_name: NonUnitalSubring.coe_iInf
code: @[simp, norm_cast]
theorem coe_iInf {ι : Sort*} {S : ι → NonUnitalSubring R} : (↑(⨅ i, S i) : Set R) = ⋂ i, S i 
goal: ↑(⨅ i, S i) = ⋂ i, ↑(S i)

full_name: NonUnitalSubring.mem_iInf
code: theorem mem_iInf {ι : Sort*} {S : ι → NonUnitalSubring R} {x : R} :
    (x ∈ ⨅ i, S i) ↔ ∀ i, x ∈ S i 
goal: x ∈ ⨅ i, S i ↔ ∀ (i : ι), x ∈ S i

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

full_name: NonUnitalSubring.sInf_toAddSubgroup
code: @[simp]
theorem sInf_toAddSubgroup (s : Set (NonUnitalSubring R)) :
    (sInf s).toAddSubgroup = ⨅ t ∈ s, NonUnitalSubring.toAddSubgroup t 
goal: (sInf s).toAddSubgroup = ⨅ t ∈ s, t.toAddSubgroup

full_name: NonUnitalSubring.instCompleteLattice
code: /-- `NonUnitalSubring`s of a ring form a complete lattice. -/
instance : CompleteLattice (NonUnitalSubring R) 
goal: CompleteLattice (NonUnitalSubring R)

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

full_name: NonUnitalSubring.center
code: /-- The center of a ring `R` is the set of elements that commute with everything in `R` -/
def center : NonUnitalSubring R 
goal: NonUnitalSubring R

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

full_name: NonUnitalSubring.center_toNonUnitalSubsemiring
code: @[simp]
theorem center_toNonUnitalSubsemiring :
    (center R).toNonUnitalSubsemiring = NonUnitalSubsemiring.center R 
goal: (NonUnitalSubring.center R).toNonUnitalSubsemiring = NonUnitalSubsemiring.center R

full_name: NonUnitalSubring.center.instNonUnitalCommRing
code: /-- The center is commutative and associative. -/
instance center.instNonUnitalCommRing : NonUnitalCommRing (center R) 
goal: NonUnitalCommRing ↥(NonUnitalSubring.center R)

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

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

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

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

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

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

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

full_name: NonUnitalSubring.closure_mono
code: /-- `NonUnitalSubring` 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: NonUnitalSubring.closure s ≤ NonUnitalSubring.closure t

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

full_name: NonUnitalSubring.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, negation, 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)) (neg : ∀ x : R, p x → p (-x))
    (mul : ∀ x y, p x → p y → p (x * y)) : p x 
goal: p x

full_name: NonUnitalSubring.closure_induction'
code: /-- The difference with `NonUnitalSubring.closure_induction` is that this acts on the
subtype. -/
@[elab_as_elim]
theorem closure_induction' {s : Set R} {p : closure s → Prop} (a : closure s)
    (mem : ∀ (x) (hx : x ∈ s), p ⟨x, subset_closure hx⟩) (zero : p 0)
    (add : ∀ x y, p x → p y → p (x + y)) (neg : ∀ x, p x → p (-x))
    (mul : ∀ x y, p x → p y → p (x * y)) : p a 
goal: p a

full_name: NonUnitalSubring.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} {a b : R} (ha : a ∈ closure s)
    (hb : b ∈ closure s) (Hs : ∀ x ∈ s, ∀ y ∈ s, p x y) (H0_left : ∀ x, p 0 x)
    (H0_right : ∀ x, p x 0) (Hneg_left : ∀ x y, p x y → p (-x) y)
    (Hneg_right : ∀ x y, p x y → p x (-y)) (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 a b 
goal: p a b

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

full_name: NonUnitalSubring.closureNonUnitalCommRingOfComm
code: /-- If all elements of `s : Set A` commute pairwise, then `closure s` is a commutative ring.  -/
def closureNonUnitalCommRingOfComm {R : Type u} [NonUnitalRing R] {s : Set R}
    (hcomm : ∀ a ∈ s, ∀ b ∈ s, a * b = b * a) : NonUnitalCommRing (closure s) 
goal: NonUnitalCommRing ↥(NonUnitalSubring.closure s)

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

full_name: NonUnitalSubring.mem_iSup_of_directed
code: /-- The underlying set of a non-empty directed Sup of `NonUnitalSubring`s is just a union of the
`NonUnitalSubring`s. Note that this fails without the directedness assumption (the union of two
`NonUnitalSubring`s is typically not a `NonUnitalSubring`) -/
theorem mem_iSup_of_directed {ι} [hι : Nonempty ι] {S : ι → NonUnitalSubring 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: NonUnitalSubring.coe_iSup_of_directed
code: theorem coe_iSup_of_directed {ι} [Nonempty ι] {S : ι → NonUnitalSubring R}
    (hS : Directed (· ≤ ·) S) : ((⨆ i, S i : NonUnitalSubring R) : Set R) = ⋃ i, S i 
goal: ↑(⨆ i, S i) = ⋃ i, ↑(S i)

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

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

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

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

full_name: NonUnitalRingHom.rangeRestrict
code: /-- Restriction of a ring homomorphism to its range interpreted as a `NonUnitalSubring`.

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

full_name: NonUnitalRingHom.coe_rangeRestrict
code: @[simp]
theorem coe_rangeRestrict (f : R →ₙ+* S) (x : R) : (f.rangeRestrict x : S) = f x 
goal: ↑(f.rangeRestrict x) = f x

full_name: NonUnitalRingHom.rangeRestrict_surjective
code: theorem rangeRestrict_surjective (f : R →ₙ+* S) : Function.Surjective f.rangeRestrict 
goal: Function.Surjective ⇑f.rangeRestrict

full_name: NonUnitalRingHom.range_top_iff_surjective
code: theorem range_top_iff_surjective {f : R →ₙ+* S} :
    f.range = (⊤ : NonUnitalSubring S) ↔ Function.Surjective f 
goal: f.range = ⊤ ↔ Function.Surjective ⇑f

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

full_name: NonUnitalRingHom.eqLocus
code: /-- The `NonUnitalSubring` of elements `x : R` such that `f x = g x`, i.e.,
  the equalizer of f and g as a `NonUnitalSubring` of R -/
def eqLocus (f g : R →ₙ+* S) : NonUnitalSubring R 
goal: NonUnitalSubring R

full_name: NonUnitalRingHom.eqLocus_same
code: @[simp]
theorem eqLocus_same (f : R →ₙ+* S) : f.eqLocus f = ⊤ 
goal: f.eqLocus f = ⊤

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

full_name: NonUnitalRingHom.eq_of_eqOn_set_top
code: theorem eq_of_eqOn_set_top {f g : R →ₙ+* S} (h : Set.EqOn f g (⊤ : NonUnitalSubring R)) : f = g 
goal: f = g

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

full_name: NonUnitalRingHom.closure_preimage_le
code: theorem closure_preimage_le (f : R →ₙ+* S) (s : Set S) : closure (f ⁻¹' s) ≤ (closure s).comap f 
goal: NonUnitalSubring.closure (⇑f ⁻¹' s) ≤ NonUnitalSubring.comap f (NonUnitalSubring.closure s)

full_name: NonUnitalRingHom.map_closure
code: /-- The image under a ring homomorphism of the `NonUnitalSubring` generated by a set equals
the `NonUnitalSubring` generated by the image of the set. -/
theorem map_closure (f : R →ₙ+* S) (s : Set R) : (closure s).map f = closure (f '' s) 
goal: NonUnitalSubring.map f (NonUnitalSubring.closure s) = NonUnitalSubring.closure (⇑f '' s)

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

full_name: NonUnitalSubring.range_subtype
code: @[simp]
theorem range_subtype (s : NonUnitalSubring R) : (NonUnitalSubringClass.subtype s).range = s 
goal: (NonUnitalSubringClass.subtype s).range = s

full_name: NonUnitalSubring.range_fst
code: theorem range_fst : NonUnitalRingHom.srange (fst R S) = ⊤ 
goal: NonUnitalRingHom.srange (NonUnitalRingHom.fst R S) = ⊤

full_name: NonUnitalSubring.range_snd
code: theorem range_snd : NonUnitalRingHom.srange (snd R S) = ⊤ 
goal: NonUnitalRingHom.srange (NonUnitalRingHom.snd R S) = ⊤

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

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

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

full_name: RingEquiv.ofLeftInverse'_symm_apply
code: @[simp]
theorem ofLeftInverse'_symm_apply {g : S → R} {f : R →ₙ+* S} (h : Function.LeftInverse g f)
    (x : f.range) : (ofLeftInverse' h).symm x = g x 
goal: (RingEquiv.ofLeftInverse' h).symm x = g ↑x

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