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

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

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

full_name: intCast_mem
code: @[aesop safe apply (rule_sets := [SetLike])]
theorem intCast_mem (n : ℤ) : (n : R) ∈ s 
goal: ↑n ∈ s

full_name: SubringClass.toHasIntCast
code: instance (priority := 75) toHasIntCast : IntCast s 
goal: IntCast ↥s

full_name: SubringClass.toRing
code: /-- A subring of a ring inherits a ring structure -/
instance (priority := 75) toRing : Ring s 
goal: Ring ↥s

full_name: SubringClass.toCommRing
code: /-- A subring of a `CommRing` is a `CommRing`. -/
instance (priority := 75) toCommRing {R} [CommRing R] [SetLike S R] [SubringClass S R] :
    CommRing s 
goal: CommRing ↥s

full_name: SubringClass.instIsDomainSubtypeMem
code: /-- A subring of a domain is a domain. -/
instance (priority := 75) {R} [Ring R] [IsDomain R] [SetLike S R] [SubringClass S R] : IsDomain s 
goal: IsDomain ↥s

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

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

full_name: SubringClass.coe_natCast
code: @[simp, norm_cast]
theorem coe_natCast (n : ℕ) : ((n : s) : R) = n 
goal: ↑↑n = ↑n

full_name: SubringClass.coe_intCast
code: @[simp, norm_cast]
theorem coe_intCast (n : ℤ) : ((n : s) : R) = n 
goal: ↑↑n = ↑n

full_name: Subring
code: /-- `Subring R` is the type of subrings of `R`. A subring of `R` is a subset `s` that is a
  multiplicative submonoid and an additive subgroup. Note in particular that it shares the
  same 0 and 1 as R. -/
structure Subring (R : Type u) [Ring R] extends Subsemiring R, AddSubgroup R
goal: Type u

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

full_name: Subring.instSubringClass
code: instance : SubringClass (Subring R) R 
goal: SubringClass (Subring R) R

full_name: Subring.mem_toSubsemiring
code: @[simp]
theorem mem_toSubsemiring {s : Subring R} {x : R} : x ∈ s.toSubsemiring ↔ x ∈ s 
goal: x ∈ s.toSubsemiring ↔ x ∈ s

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

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

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

full_name: Subring.mk_le_mk
code: @[simp]
theorem mk_le_mk {S S' : Subsemiring R} (h₁ h₂) :
    (⟨S, h₁⟩ : Subring R) ≤ (⟨S', h₂⟩ : Subring R) ↔ S ≤ S' 
goal: { toSubsemiring := S, neg_mem' := h₁ } ≤ { toSubsemiring := S', neg_mem' := h₂ } ↔ S ≤ S'

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

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

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

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

full_name: Subring.toSubsemiring_injective
code: theorem toSubsemiring_injective : Function.Injective (toSubsemiring : Subring R → Subsemiring R)
  
goal: Function.Injective Subring.toSubsemiring

full_name: Subring.toSubsemiring_strictMono
code: @[mono]
theorem toSubsemiring_strictMono : StrictMono (toSubsemiring : Subring R → Subsemiring R) 
goal: StrictMono Subring.toSubsemiring

full_name: Subring.toSubsemiring_mono
code: @[mono]
theorem toSubsemiring_mono : Monotone (toSubsemiring : Subring R → Subsemiring R) 
goal: Monotone Subring.toSubsemiring

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

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

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

full_name: Subring.toSubmonoid_injective
code: theorem toSubmonoid_injective : Function.Injective (fun s : Subring R => s.toSubmonoid)
  
goal: Function.Injective fun s => s.toSubmonoid

full_name: Subring.toSubmonoid_strictMono
code: @[mono]
theorem toSubmonoid_strictMono : StrictMono (fun s : Subring R => s.toSubmonoid) 
goal: StrictMono fun s => s.toSubmonoid

full_name: Subring.toSubmonoid_mono
code: @[mono]
theorem toSubmonoid_mono : Monotone (fun s : Subring R => s.toSubmonoid) 
goal: Monotone fun s => s.toSubmonoid

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

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

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

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

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

full_name: Subsemiring.toSubring
code: /-- A `Subsemiring` containing -1 is a `Subring`. -/
def Subsemiring.toSubring (s : Subsemiring R) (hneg : (-1 : R) ∈ s) : Subring R 
goal: Subring R

full_name: Subring.one_mem
code: /-- A subring contains the ring's 1. -/
protected theorem one_mem : (1 : R) ∈ s 
goal: 1 ∈ s

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

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

full_name: Subring.sub_mem
code: /-- A 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: Subring.list_prod_mem
code: /-- Product of a list of elements in a subring is in the subring. -/
protected theorem list_prod_mem {l : List R} : (∀ x ∈ l, x ∈ s) → l.prod ∈ s 
goal: (∀ x ∈ l, x ∈ s) → l.prod ∈ s

full_name: Subring.list_sum_mem
code: /-- Sum of a list of elements in a subring is in the 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: Subring.multiset_prod_mem
code: /-- Product of a multiset of elements in a subring of a `CommRing` is in the subring. -/
protected theorem multiset_prod_mem {R} [CommRing R] (s : Subring R) (m : Multiset R) :
    (∀ a ∈ m, a ∈ s) → m.prod ∈ s 
goal: (∀ a ∈ m, a ∈ s) → m.prod ∈ s

full_name: Subring.multiset_sum_mem
code: /-- Sum of a multiset of elements in a `Subring` of a `Ring` is
in the `Subring`. -/
protected theorem multiset_sum_mem {R} [Ring R] (s : Subring R) (m : Multiset R) :
    (∀ a ∈ m, a ∈ s) → m.sum ∈ s 
goal: (∀ a ∈ m, a ∈ s) → m.sum ∈ s

full_name: Subring.prod_mem
code: /-- Product of elements of a subring of a `CommRing` indexed by a `Finset` is in the
    subring. -/
protected theorem prod_mem {R : Type*} [CommRing R] (s : Subring 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: Subring.sum_mem
code: /-- Sum of elements in a `Subring` of a `Ring` indexed by a `Finset`
is in the `Subring`. -/
protected theorem sum_mem {R : Type*} [Ring R] (s : Subring 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: Subring.toRing
code: /-- A subring of a ring inherits a ring structure -/
instance toRing : Ring s 
goal: Ring ↥s

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

full_name: Subring.pow_mem
code: protected theorem pow_mem {x : R} (hx : x ∈ s) (n : ℕ) : x ^ n ∈ s 
goal: x ^ n ∈ s

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

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

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

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

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

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

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

full_name: Subring.toCommRing
code: /-- A subring of a `CommRing` is a `CommRing`. -/
instance toCommRing {R} [CommRing R] (s : Subring R) : CommRing s 
goal: CommRing ↥s

full_name: Subring.instNontrivialSubtypeMem
code: /-- A subring of a non-trivial ring is non-trivial. -/
instance {R} [Ring R] [Nontrivial R] (s : Subring R) : Nontrivial s 
goal: Nontrivial ↥s

full_name: Subring.instNoZeroDivisorsSubtypeMem
code: /-- A subring of a ring with no zero divisors has no zero divisors. -/
instance {R} [Ring R] [NoZeroDivisors R] (s : Subring R) : NoZeroDivisors s 
goal: NoZeroDivisors ↥s

full_name: Subring.instIsDomainSubtypeMem
code: /-- A subring of a domain is a domain. -/
instance {R} [Ring R] [IsDomain R] (s : Subring R) : IsDomain s 
goal: IsDomain ↥s

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

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

full_name: Subring.coe_natCast
code: @[norm_cast] -- Porting note (#10618): simp can prove this (removed `@[simp]`)
theorem coe_natCast : ∀ n : ℕ, ((n : s) : R) = n 
goal: ↑↑n = ↑n

full_name: Subring.coe_intCast
code: @[norm_cast] -- Porting note (#10618): simp can prove this (removed `@[simp]`)
theorem coe_intCast : ∀ n : ℤ, ((n : s) : R) = n 
goal: ↑↑n = ↑n

full_name: Subring.coe_toSubsemiring
code: @[simp]
theorem coe_toSubsemiring (s : Subring R) : (s.toSubsemiring : Set R) = s 
goal: ↑s.toSubsemiring = ↑s

full_name: Subring.mem_toSubmonoid
code: @[simp, nolint simpNF] -- Porting note (#10675): dsimp can not prove this
theorem mem_toSubmonoid {s : Subring R} {x : R} : x ∈ s.toSubmonoid ↔ x ∈ s 
goal: x ∈ s.toSubmonoid ↔ x ∈ s

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

full_name: Subring.mem_toAddSubgroup
code: @[simp, nolint simpNF] -- Porting note (#10675): dsimp can not prove this
theorem mem_toAddSubgroup {s : Subring R} {x : R} : x ∈ s.toAddSubgroup ↔ x ∈ s 
goal: x ∈ s.toAddSubgroup ↔ x ∈ s

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

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

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

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

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

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

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

full_name: Subring.card_top
code: theorem card_top (R) [Ring R] [Fintype R] : Fintype.card (⊤ : Subring R) = Fintype.card R 
goal: Fintype.card ↥⊤ = Fintype.card R

full_name: Subring.comap
code: /-- The preimage of a subring along a ring homomorphism is a subring. -/
def comap {R : Type u} {S : Type v} [Ring R] [Ring S] (f : R →+* S) (s : Subring S) : Subring R 
goal: Subring R

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

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

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

full_name: Subring.map
code: /-- The image of a subring along a ring homomorphism is a subring. -/
def map {R : Type u} {S : Type v} [Ring R] [Ring S] (f : R →+* S) (s : Subring R) : Subring S 
goal: Subring S

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

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

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

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

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

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

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

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

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

full_name: RingHom.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: RingHom.range_eq_map
code: theorem range_eq_map (f : R →+* S) : f.range = Subring.map f ⊤ 
goal: f.range = Subring.map f ⊤

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

full_name: RingHom.map_range
code: theorem map_range : f.range.map g = (g.comp f).range 
goal: Subring.map g f.range = (g.comp f).range

full_name: RingHom.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: Subring.instBot
code: instance : Bot (Subring R) 
goal: Bot (Subring R)

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

full_name: Subring.coe_bot
code: theorem coe_bot : ((⊥ : Subring R) : Set R) = Set.range ((↑) : ℤ → R) 
goal: ↑⊥ = Set.range Int.cast

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

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

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

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

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

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

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

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

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

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

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

full_name: Subring.instCompleteLattice
code: /-- Subrings of a ring form a complete lattice. -/
instance : CompleteLattice (Subring R) 
goal: CompleteLattice (Subring R)

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

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

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

full_name: Subring.center_toSubsemiring
code: @[simp]
theorem center_toSubsemiring : (center R).toSubsemiring = Subsemiring.center R 
goal: (Subring.center R).toSubsemiring = Subsemiring.center R

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

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

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

full_name: Subring.instCommRingSubtypeMemCenter
code: /-- The center is commutative. -/
instance : CommRing (center R) 
goal: CommRing ↥(Subring.center R)

full_name: Subring.instField
code: instance instField : Field (center K) 
goal: Field ↥(Subring.center K)

full_name: Subring.center.coe_inv
code: @[simp]
theorem center.coe_inv (a : center K) : ((a⁻¹ : center K) : K) = (a : K)⁻¹ 
goal: ↑a⁻¹ = (↑a)⁻¹

full_name: Subring.center.coe_div
code: @[simp]
theorem center.coe_div (a b : center K) : ((a / b : center K) : K) = (a : K) / (b : K) 
goal: ↑(a / b) = ↑a / ↑b

full_name: Subring.centralizer
code: /-- The centralizer of a set inside a ring as a `Subring`. -/
def centralizer (s : Set R) : Subring R 
goal: Subring R

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

full_name: Subring.centralizer_toSubmonoid
code: theorem centralizer_toSubmonoid (s : Set R) :
    (centralizer s).toSubmonoid = Submonoid.centralizer s 
goal: (Subring.centralizer s).toSubmonoid = Submonoid.centralizer s

full_name: Subring.centralizer_toSubsemiring
code: theorem centralizer_toSubsemiring (s : Set R) :
    (centralizer s).toSubsemiring = Subsemiring.centralizer s 
goal: (Subring.centralizer s).toSubsemiring = Subsemiring.centralizer s

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

full_name: Subring.center_le_centralizer
code: theorem center_le_centralizer (s) : center R ≤ centralizer s 
goal: Subring.center R ≤ Subring.centralizer s

full_name: Subring.centralizer_le
code: theorem centralizer_le (s t : Set R) (h : s ⊆ t) : centralizer t ≤ centralizer s 
goal: Subring.centralizer t ≤ Subring.centralizer s

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

full_name: Subring.centralizer_univ
code: @[simp]
theorem centralizer_univ : centralizer Set.univ = center R 
goal: Subring.centralizer Set.univ = Subring.center R

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

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

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

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

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

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

full_name: Subring.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) (Hs : ∀ x ∈ s, p x)
    (zero : p 0) (one : p 1) (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: Subring.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))
    (neg : ∀ x hx, p x hx → p (-x) (neg_mem hx))
    (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: Subring.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) (H1_left : ∀ x, p 1 x) (H1_right : ∀ x, p x 1)
    (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: Subring.mem_closure_iff
code: theorem mem_closure_iff {s : Set R} {x} :
    x ∈ closure s ↔ x ∈ AddSubgroup.closure (Submonoid.closure s : Set R) 
goal: x ∈ Subring.closure s ↔ x ∈ AddSubgroup.closure ↑(Submonoid.closure s)

full_name: Subring.closureCommRingOfComm
code: /-- If all elements of `s : Set A` commute pairwise, then `closure s` is a commutative ring.  -/
def closureCommRingOfComm {s : Set R} (hcomm : ∀ a ∈ s, ∀ b ∈ s, a * b = b * a) :
    CommRing (closure s) 
goal: CommRing ↥(Subring.closure s)

full_name: Subring.exists_list_of_mem_closure
code: theorem exists_list_of_mem_closure {s : Set R} {x : R} (h : x ∈ closure s) :
    ∃ L : List (List R), (∀ t ∈ L, ∀ y ∈ t, y ∈ s ∨ y = (-1 : R)) ∧ (L.map List.prod).sum = x 
goal: ∃ L, (∀ t ∈ L, ∀ y ∈ t, y ∈ s ∨ y = -1) ∧ (List.map List.prod L).sum = x

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

full_name: RingHom.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: RingHom.rangeRestrict_surjective
code: theorem rangeRestrict_surjective (f : R →+* S) : Function.Surjective f.rangeRestrict 
goal: Function.Surjective ⇑f.rangeRestrict

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

full_name: RingHom.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 = (⊤ : Subring S) 
goal: f.range = ⊤

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

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

full_name: RingHom.eqOn_set_closure
code: /-- If two ring homomorphisms are equal on a set, then they are equal on its subring 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 ↑(Subring.closure s)

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

full_name: RingHom.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: RingHom.closure_preimage_le
code: theorem closure_preimage_le (f : R →+* S) (s : Set S) : closure (f ⁻¹' s) ≤ (closure s).comap f 
goal: Subring.closure (⇑f ⁻¹' s) ≤ Subring.comap f (Subring.closure s)

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

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

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

full_name: Subring.range_fst
code: theorem range_fst : (fst R S).rangeS = ⊤ 
goal: (RingHom.fst R S).rangeS = ⊤

full_name: Subring.range_snd
code: theorem range_snd : (snd R S).rangeS = ⊤ 
goal: (RingHom.snd R S).rangeS = ⊤

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

full_name: RingEquiv.subringCongr
code: /-- Makes the identity isomorphism from a proof two subrings of a multiplicative
    monoid are equal. -/
def subringCongr (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: RingEquiv.subringMap_symm_apply_coe
code: /-- Given an equivalence `e : R ≃+* S` of rings and a subring `s` of `R`,
`subringMap e s` is the induced equivalence between `s` and `s.map e` -/
@[simps!]
def subringMap (e : R ≃+* S) : s ≃+* s.map e.toRingHom 
goal: ↑(e.subringMap.symm y) = (↑e).symm ↑y

full_name: RingEquiv.subringMap_apply_coe
code: /-- Given an equivalence `e : R ≃+* S` of rings and a subring `s` of `R`,
`subringMap e s` is the induced equivalence between `s` and `s.map e` -/
@[simps!]
def subringMap (e : R ≃+* S) : s ≃+* s.map e.toRingHom 
goal: ↑(e.subringMap x) = e ↑x

full_name: RingEquiv.subringMap
code: /-- Given an equivalence `e : R ≃+* S` of rings and a subring `s` of `R`,
`subringMap e s` is the induced equivalence between `s` and `s.map e` -/
@[simps!]
def subringMap (e : R ≃+* S) : s ≃+* s.map e.toRingHom 
goal: ↥s ≃+* ↥(Subring.map e.toRingHom s)

full_name: Subring.InClosure.recOn
code: @[elab_as_elim]
protected theorem InClosure.recOn {C : R → Prop} {x : R} (hx : x ∈ closure s) (h1 : C 1)
    (hneg1 : C (-1)) (hs : ∀ z ∈ s, ∀ n, C n → C (z * n)) (ha : ∀ {x y}, C x → C y → C (x + y)) :
    C x 
goal: C x

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

full_name: AddSubgroup.int_mul_mem
code: theorem AddSubgroup.int_mul_mem {G : AddSubgroup R} (k : ℤ) {g : R} (h : g ∈ G) :
    (k : R) * g ∈ G 
goal: ↑k * g ∈ G

full_name: Subring.instSMulSubtypeMem
code: /-- The action by a subring is the action by the underlying ring. -/
instance [SMul R α] (S : Subring R) : SMul S α 
goal: SMul (↥S) α

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

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

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

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

full_name: Subring.instFaithfulSMulSubtypeMem
code: instance [SMul R α] [FaithfulSMul R α] (S : Subring R) : FaithfulSMul S α 
goal: FaithfulSMul (↥S) α

full_name: Subring.instMulActionSubtypeMem
code: /-- The action by a subring is the action by the underlying ring. -/
instance [MulAction R α] (S : Subring R) : MulAction S α 
goal: MulAction (↥S) α

full_name: Subring.instDistribMulActionSubtypeMem
code: /-- The action by a subring is the action by the underlying ring. -/
instance [AddMonoid α] [DistribMulAction R α] (S : Subring R) : DistribMulAction S α 
goal: DistribMulAction (↥S) α

full_name: Subring.instMulDistribMulActionSubtypeMem
code: /-- The action by a subring is the action by the underlying ring. -/
instance [Monoid α] [MulDistribMulAction R α] (S : Subring R) : MulDistribMulAction S α 
goal: MulDistribMulAction (↥S) α

full_name: Subring.instSMulWithZeroSubtypeMem
code: /-- The action by a subring is the action by the underlying ring. -/
instance [Zero α] [SMulWithZero R α] (S : Subring R) : SMulWithZero S α 
goal: SMulWithZero (↥S) α

full_name: Subring.instMulActionWithZeroSubtypeMem
code: /-- The action by a subring is the action by the underlying ring. -/
instance [Zero α] [MulActionWithZero R α] (S : Subring R) : MulActionWithZero S α 
goal: MulActionWithZero (↥S) α

full_name: Subring.instModuleSubtypeMem
code: /-- The action by a subring is the action by the underlying ring. -/
instance [AddCommMonoid α] [Module R α] (S : Subring R) : Module S α 
goal: Module (↥S) α

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

full_name: Subring.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 (↥(Subring.center R)) R R

full_name: Subring.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 (↥(Subring.center R)) R

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

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

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

full_name: Subring.comap_map_eq
code: theorem comap_map_eq (f : R →+* S) (s : Subring R) :
    (s.map f).comap f = s ⊔ closure (f ⁻¹' {0}) 
goal: Subring.comap f (Subring.map f s) = s ⊔ Subring.closure (⇑f ⁻¹' {0})

full_name: Subring.comap_map_eq_self
code: theorem comap_map_eq_self {f : R →+* S} {s : Subring R}
    (h : f ⁻¹' {0} ⊆ s) : (s.map f).comap f = s 
goal: Subring.comap f (Subring.map f s) = s

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