File: Mathlib/Algebra/Algebra/Subalgebra/Basic.lean

full_name: Subalgebra.algebraMap_mem'
code: /-- A subalgebra is a sub(semi)ring that includes the range of `algebraMap`. -/
structure Subalgebra (R : Type u) (A : Type v) [CommSemiring R] [Semiring A] [Algebra R A] extends
  Subsemiring A : Type v where
  /-- The image of `algebraMap` is contained in the underlying set of the subalgebra -/
  algebraMap_mem' : ∀ r, algebraMap R A r ∈ carrier
  zero_mem' := (algebraMap R A).map_zero ▸ algebraMap_mem' 0
  one_mem' := (algebraMap R A).map_one ▸ algebraMap_mem' 1
goal: (algebraMap R A) r ∈ self.carrier

full_name: Subalgebra
code: /-- A subalgebra is a sub(semi)ring that includes the range of `algebraMap`. -/
structure Subalgebra (R : Type u) (A : Type v) [CommSemiring R] [Semiring A] [Algebra R A] extends
  Subsemiring A : Type v where
  /-- The image of `algebraMap` is contained in the underlying set of the subalgebra -/
  algebraMap_mem' : ∀ r, algebraMap R A r ∈ carrier
  zero_mem' := (algebraMap R A).map_zero ▸ algebraMap_mem' 0
  one_mem' := (algebraMap R A).map_one ▸ algebraMap_mem' 1
goal: Type v

full_name: Subalgebra.instSetLike
code: instance : SetLike (Subalgebra R A) A 
goal: SetLike (Subalgebra R A) A

full_name: Subalgebra.SubsemiringClass
code: instance SubsemiringClass : SubsemiringClass (Subalgebra R A) A 
goal: SubsemiringClass (Subalgebra R A) A

full_name: Subalgebra.mem_toSubsemiring
code: @[simp]
theorem mem_toSubsemiring {S : Subalgebra R A} {x} : x ∈ S.toSubsemiring ↔ x ∈ S 
goal: x ∈ S.toSubsemiring ↔ x ∈ S

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

full_name: Subalgebra.ext
code: @[ext]
theorem ext {S T : Subalgebra R A} (h : ∀ x : A, x ∈ S ↔ x ∈ T) : S = T 
goal: S = T

full_name: Subalgebra.coe_toSubsemiring
code: @[simp]
theorem coe_toSubsemiring (S : Subalgebra R A) : (↑S.toSubsemiring : Set A) = S 
goal: ↑S.toSubsemiring = ↑S

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

full_name: Subalgebra.toSubsemiring_inj
code: theorem toSubsemiring_inj {S U : Subalgebra R A} : S.toSubsemiring = U.toSubsemiring ↔ S = U 
goal: S.toSubsemiring = U.toSubsemiring ↔ S = U

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

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

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

full_name: Subalgebra.instSMulMemClass
code: instance instSMulMemClass : SMulMemClass (Subalgebra R A) R A 
goal: SMulMemClass (Subalgebra R A) R A

full_name: algebraMap_mem
code: @[aesop safe apply (rule_sets := [SetLike])]
theorem _root_.algebraMap_mem {S R A : Type*} [CommSemiring R] [Semiring A] [Algebra R A]
    [SetLike S A] [OneMemClass S A] [SMulMemClass S R A] (s : S) (r : R) :
    algebraMap R A r ∈ s 
goal: (algebraMap R A) r ∈ s

full_name: Subalgebra.algebraMap_mem
code: protected theorem algebraMap_mem (r : R) : algebraMap R A r ∈ S 
goal: (algebraMap R A) r ∈ S

full_name: Subalgebra.rangeS_le
code: theorem rangeS_le : (algebraMap R A).rangeS ≤ S.toSubsemiring 
goal: (algebraMap R A).rangeS ≤ S.toSubsemiring

full_name: Subalgebra.range_subset
code: theorem range_subset : Set.range (algebraMap R A) ⊆ S 
goal: Set.range ⇑(algebraMap R A) ⊆ ↑S

full_name: Subalgebra.range_le
code: theorem range_le : Set.range (algebraMap R A) ≤ S 
goal: Set.range ⇑(algebraMap R A) ≤ ↑S

full_name: Subalgebra.smul_mem
code: theorem smul_mem {x : A} (hx : x ∈ S) (r : R) : r • x ∈ S 
goal: r • x ∈ S

full_name: Subalgebra.one_mem
code: protected theorem one_mem : (1 : A) ∈ S 
goal: 1 ∈ S

full_name: Subalgebra.mul_mem
code: protected theorem mul_mem {x y : A} (hx : x ∈ S) (hy : y ∈ S) : x * y ∈ S 
goal: x * y ∈ S

full_name: Subalgebra.pow_mem
code: protected theorem pow_mem {x : A} (hx : x ∈ S) (n : ℕ) : x ^ n ∈ S 
goal: x ^ n ∈ S

full_name: Subalgebra.zero_mem
code: protected theorem zero_mem : (0 : A) ∈ S 
goal: 0 ∈ S

full_name: Subalgebra.add_mem
code: protected theorem add_mem {x y : A} (hx : x ∈ S) (hy : y ∈ S) : x + y ∈ S 
goal: x + y ∈ S

full_name: Subalgebra.nsmul_mem
code: protected theorem nsmul_mem {x : A} (hx : x ∈ S) (n : ℕ) : n • x ∈ S 
goal: n • x ∈ S

full_name: Subalgebra.natCast_mem
code: protected theorem natCast_mem (n : ℕ) : (n : A) ∈ S 
goal: ↑n ∈ S

full_name: Subalgebra.list_prod_mem
code: protected theorem list_prod_mem {L : List A} (h : ∀ x ∈ L, x ∈ S) : L.prod ∈ S 
goal: L.prod ∈ S

full_name: Subalgebra.list_sum_mem
code: protected theorem list_sum_mem {L : List A} (h : ∀ x ∈ L, x ∈ S) : L.sum ∈ S 
goal: L.sum ∈ S

full_name: Subalgebra.multiset_sum_mem
code: protected theorem multiset_sum_mem {m : Multiset A} (h : ∀ x ∈ m, x ∈ S) : m.sum ∈ S 
goal: m.sum ∈ S

full_name: Subalgebra.sum_mem
code: protected theorem sum_mem {ι : Type w} {t : Finset ι} {f : ι → A} (h : ∀ x ∈ t, f x ∈ S) :
    (∑ x ∈ t, f x) ∈ S 
goal: ∑ x ∈ t, f x ∈ S

full_name: Subalgebra.multiset_prod_mem
code: protected theorem multiset_prod_mem {R : Type u} {A : Type v} [CommSemiring R] [CommSemiring A]
    [Algebra R A] (S : Subalgebra R A) {m : Multiset A} (h : ∀ x ∈ m, x ∈ S) : m.prod ∈ S 
goal: m.prod ∈ S

full_name: Subalgebra.prod_mem
code: protected theorem prod_mem {R : Type u} {A : Type v} [CommSemiring R] [CommSemiring A] [Algebra R A]
    (S : Subalgebra R A) {ι : Type w} {t : Finset ι} {f : ι → A} (h : ∀ x ∈ t, f x ∈ S) :
    (∏ x ∈ t, f x) ∈ S 
goal: ∏ x ∈ t, f x ∈ S

full_name: Subalgebra.instSubringClass
code: instance {R A : Type*} [CommRing R] [Ring A] [Algebra R A] : SubringClass (Subalgebra R A) A 
goal: SubringClass (Subalgebra R A) A

full_name: Subalgebra.neg_mem
code: protected theorem neg_mem {R : Type u} {A : Type v} [CommRing R] [Ring A] [Algebra R A]
    (S : Subalgebra R A) {x : A} (hx : x ∈ S) : -x ∈ S 
goal: -x ∈ S

full_name: Subalgebra.sub_mem
code: protected theorem sub_mem {R : Type u} {A : Type v} [CommRing R] [Ring A] [Algebra R A]
    (S : Subalgebra R A) {x y : A} (hx : x ∈ S) (hy : y ∈ S) : x - y ∈ S 
goal: x - y ∈ S

full_name: Subalgebra.zsmul_mem
code: protected theorem zsmul_mem {R : Type u} {A : Type v} [CommRing R] [Ring A] [Algebra R A]
    (S : Subalgebra R A) {x : A} (hx : x ∈ S) (n : ℤ) : n • x ∈ S 
goal: n • x ∈ S

full_name: Subalgebra.intCast_mem
code: protected theorem intCast_mem {R : Type u} {A : Type v} [CommRing R] [Ring A] [Algebra R A]
    (S : Subalgebra R A) (n : ℤ) : (n : A) ∈ S 
goal: ↑n ∈ S

full_name: Subalgebra.toAddSubmonoid
code: /-- The projection from a subalgebra of `A` to an additive submonoid of `A`. -/
def toAddSubmonoid {R : Type u} {A : Type v} [CommSemiring R] [Semiring A] [Algebra R A]
    (S : Subalgebra R A) : AddSubmonoid A 
goal: AddSubmonoid A

full_name: Subalgebra.toSubring
code: /-- A subalgebra over a ring is also a `Subring`. -/
def toSubring {R : Type u} {A : Type v} [CommRing R] [Ring A] [Algebra R A] (S : Subalgebra R A) :
    Subring A 
goal: Subring A

full_name: Subalgebra.mem_toSubring
code: @[simp]
theorem mem_toSubring {R : Type u} {A : Type v} [CommRing R] [Ring A] [Algebra R A]
    {S : Subalgebra R A} {x} : x ∈ S.toSubring ↔ x ∈ S 
goal: x ∈ S.toSubring ↔ x ∈ S

full_name: Subalgebra.coe_toSubring
code: @[simp]
theorem coe_toSubring {R : Type u} {A : Type v} [CommRing R] [Ring A] [Algebra R A]
    (S : Subalgebra R A) : (↑S.toSubring : Set A) = S 
goal: ↑S.toSubring = ↑S

full_name: Subalgebra.toSubring_injective
code: theorem toSubring_injective {R : Type u} {A : Type v} [CommRing R] [Ring A] [Algebra R A] :
    Function.Injective (toSubring : Subalgebra R A → Subring A) 
goal: Function.Injective Subalgebra.toSubring

full_name: Subalgebra.toSubring_inj
code: theorem toSubring_inj {R : Type u} {A : Type v} [CommRing R] [Ring A] [Algebra R A]
    {S U : Subalgebra R A} : S.toSubring = U.toSubring ↔ S = U 
goal: S.toSubring = U.toSubring ↔ S = U

full_name: Subalgebra.instInhabitedSubtypeMem
code: instance : Inhabited S 
goal: Inhabited ↥S

full_name: Subalgebra.toSemiring
code: instance toSemiring {R A} [CommSemiring R] [Semiring A] [Algebra R A] (S : Subalgebra R A) :
    Semiring S 
goal: Semiring ↥S

full_name: Subalgebra.toCommSemiring
code: instance toCommSemiring {R A} [CommSemiring R] [CommSemiring A] [Algebra R A] (S : Subalgebra R A) :
    CommSemiring S 
goal: CommSemiring ↥S

full_name: Subalgebra.toRing
code: instance toRing {R A} [CommRing R] [Ring A] [Algebra R A] (S : Subalgebra R A) : Ring S 
goal: Ring ↥S

full_name: Subalgebra.toCommRing
code: instance toCommRing {R A} [CommRing R] [CommRing A] [Algebra R A] (S : Subalgebra R A) :
    CommRing S 
goal: CommRing ↥S

full_name: Subalgebra.toSubmodule
code: /-- The forgetful map from `Subalgebra` to `Submodule` as an `OrderEmbedding` -/
def toSubmodule : Subalgebra R A ↪o Submodule R A 
goal: Subalgebra R A ↪o Submodule R A

full_name: Subalgebra.mem_toSubmodule
code: @[simp]
theorem mem_toSubmodule {x} : x ∈ (toSubmodule S) ↔ x ∈ S 
goal: x ∈ Subalgebra.toSubmodule S ↔ x ∈ S

full_name: Subalgebra.coe_toSubmodule
code: @[simp]
theorem coe_toSubmodule (S : Subalgebra R A) : (toSubmodule S : Set A) = S 
goal: ↑(Subalgebra.toSubmodule S) = ↑S

full_name: Subalgebra.toSubmodule_injective
code: theorem toSubmodule_injective : Function.Injective (toSubmodule : Subalgebra R A → Submodule R A) 
goal: Function.Injective ⇑Subalgebra.toSubmodule

full_name: Subalgebra.module'
code: instance (priority := low) module' [Semiring R'] [SMul R' R] [Module R' A] [IsScalarTower R' R A] :
    Module R' S 
goal: Module R' ↥S

full_name: Subalgebra.instModuleSubtypeMem
code: instance : Module R S 
goal: Module R ↥S

full_name: Subalgebra.instIsScalarTowerSubtypeMem
code: instance [Semiring R'] [SMul R' R] [Module R' A] [IsScalarTower R' R A] : IsScalarTower R' R S 
goal: IsScalarTower R' R ↥S

full_name: Subalgebra.algebra'
code: instance (priority := 500) algebra' [CommSemiring R'] [SMul R' R] [Algebra R' A]
    [IsScalarTower R' R A] :
    Algebra R' S 
goal: Algebra R' ↥S

full_name: Subalgebra.algebra
code: instance algebra : Algebra R S 
goal: Algebra R ↥S

full_name: Subalgebra.noZeroSMulDivisors_bot
code: instance noZeroSMulDivisors_bot [NoZeroSMulDivisors R A] : NoZeroSMulDivisors R S 
goal: NoZeroSMulDivisors R ↥S

full_name: Subalgebra.coe_add
code: protected theorem coe_add (x y : S) : (↑(x + y) : A) = ↑x + ↑y 
goal: ↑(x + y) = ↑x + ↑y

full_name: Subalgebra.coe_mul
code: protected theorem coe_mul (x y : S) : (↑(x * y) : A) = ↑x * ↑y 
goal: ↑(x * y) = ↑x * ↑y

full_name: Subalgebra.coe_zero
code: protected theorem coe_zero : ((0 : S) : A) = 0 
goal: ↑0 = 0

full_name: Subalgebra.coe_one
code: protected theorem coe_one : ((1 : S) : A) = 1 
goal: ↑1 = 1

full_name: Subalgebra.coe_neg
code: protected theorem coe_neg {R : Type u} {A : Type v} [CommRing R] [Ring A] [Algebra R A]
    {S : Subalgebra R A} (x : S) : (↑(-x) : A) = -↑x 
goal: ↑(-x) = -↑x

full_name: Subalgebra.coe_sub
code: protected theorem coe_sub {R : Type u} {A : Type v} [CommRing R] [Ring A] [Algebra R A]
    {S : Subalgebra R A} (x y : S) : (↑(x - y) : A) = ↑x - ↑y 
goal: ↑(x - y) = ↑x - ↑y

full_name: Subalgebra.coe_smul
code: @[simp, norm_cast]
theorem coe_smul [Semiring R'] [SMul R' R] [Module R' A] [IsScalarTower R' R A] (r : R') (x : S) :
    (↑(r • x) : A) = r • (x : A) 
goal: ↑(r • x) = r • ↑x

full_name: Subalgebra.coe_algebraMap
code: @[simp, norm_cast]
theorem coe_algebraMap [CommSemiring R'] [SMul R' R] [Algebra R' A] [IsScalarTower R' R A]
    (r : R') : ↑(algebraMap R' S r) = algebraMap R' A r 
goal: ↑((algebraMap R' ↥S) r) = (algebraMap R' A) r

full_name: Subalgebra.coe_pow
code: protected theorem coe_pow (x : S) (n : ℕ) : (↑(x ^ n) : A) = (x : A) ^ n 
goal: ↑(x ^ n) = ↑x ^ n

full_name: Subalgebra.coe_eq_zero
code: protected theorem coe_eq_zero {x : S} : (x : A) = 0 ↔ x = 0 
goal: ↑x = 0 ↔ x = 0

full_name: Subalgebra.coe_eq_one
code: protected theorem coe_eq_one {x : S} : (x : A) = 1 ↔ x = 1 
goal: ↑x = 1 ↔ x = 1

full_name: Subalgebra.val
code: /-- Embedding of a subalgebra into the algebra. -/
def val : S →ₐ[R] A 
goal: ↥S →ₐ[R] A

full_name: Subalgebra.coe_val
code: @[simp]
theorem coe_val : (S.val : S → A) = ((↑) : S → A) 
goal: ⇑S.val = Subtype.val

full_name: Subalgebra.val_apply
code: theorem val_apply (x : S) : S.val x = (x : A) 
goal: S.val x = ↑x

full_name: Subalgebra.toSubsemiring_subtype
code: @[simp]
theorem toSubsemiring_subtype : S.toSubsemiring.subtype = (S.val : S →+* A) 
goal: S.subtype = ↑S.val

full_name: Subalgebra.toSubring_subtype
code: @[simp]
theorem toSubring_subtype {R A : Type*} [CommRing R] [Ring A] [Algebra R A] (S : Subalgebra R A) :
    S.toSubring.subtype = (S.val : S →+* A) 
goal: S.toSubring.subtype = ↑S.val

full_name: Subalgebra.toSubmoduleEquiv
code: /-- Linear equivalence between `S : Submodule R A` and `S`. Though these types are equal,
we define it as a `LinearEquiv` to avoid type equalities. -/
def toSubmoduleEquiv (S : Subalgebra R A) : toSubmodule S ≃ₗ[R] S 
goal: ↥(Subalgebra.toSubmodule S) ≃ₗ[R] ↥S

full_name: Subalgebra.map
code: /-- Transport a subalgebra via an algebra homomorphism. -/
def map (f : A →ₐ[R] B) (S : Subalgebra R A) : Subalgebra R B 
goal: Subalgebra R B

full_name: Subalgebra.map_mono
code: theorem map_mono {S₁ S₂ : Subalgebra R A} {f : A →ₐ[R] B} : S₁ ≤ S₂ → S₁.map f ≤ S₂.map f 
goal: S₁ ≤ S₂ → Subalgebra.map f S₁ ≤ Subalgebra.map f S₂

full_name: Subalgebra.map_injective
code: theorem map_injective {f : A →ₐ[R] B} (hf : Function.Injective f) : Function.Injective (map f) 
goal: Function.Injective (Subalgebra.map f)

full_name: Subalgebra.map_id
code: @[simp]
theorem map_id (S : Subalgebra R A) : S.map (AlgHom.id R A) = S 
goal: Subalgebra.map (AlgHom.id R A) S = S

full_name: Subalgebra.map_map
code: theorem map_map (S : Subalgebra R A) (g : B →ₐ[R] C) (f : A →ₐ[R] B) :
    (S.map f).map g = S.map (g.comp f) 
goal: Subalgebra.map g (Subalgebra.map f S) = Subalgebra.map (g.comp f) S

full_name: Subalgebra.mem_map
code: @[simp]
theorem mem_map {S : Subalgebra R A} {f : A →ₐ[R] B} {y : B} : y ∈ map f S ↔ ∃ x ∈ S, f x = y 
goal: y ∈ Subalgebra.map f S ↔ ∃ x ∈ S, f x = y

full_name: Subalgebra.map_toSubmodule
code: theorem map_toSubmodule {S : Subalgebra R A} {f : A →ₐ[R] B} :
    (toSubmodule <| S.map f) = S.toSubmodule.map f.toLinearMap 
goal: Subalgebra.toSubmodule (Subalgebra.map f S) = Submodule.map f.toLinearMap (Subalgebra.toSubmodule S)

full_name: Subalgebra.map_toSubsemiring
code: theorem map_toSubsemiring {S : Subalgebra R A} {f : A →ₐ[R] B} :
    (S.map f).toSubsemiring = S.toSubsemiring.map f.toRingHom 
goal: (Subalgebra.map f S).toSubsemiring = Subsemiring.map f.toRingHom S.toSubsemiring

full_name: Subalgebra.coe_map
code: @[simp]
theorem coe_map (S : Subalgebra R A) (f : A →ₐ[R] B) : (S.map f : Set B) = f '' S 
goal: ↑(Subalgebra.map f S) = ⇑f '' ↑S

full_name: Subalgebra.comap
code: /-- Preimage of a subalgebra under an algebra homomorphism. -/
def comap (f : A →ₐ[R] B) (S : Subalgebra R B) : Subalgebra R A 
goal: Subalgebra R A

full_name: Subalgebra.map_le
code: theorem map_le {S : Subalgebra R A} {f : A →ₐ[R] B} {U : Subalgebra R B} :
    map f S ≤ U ↔ S ≤ comap f U 
goal: Subalgebra.map f S ≤ U ↔ S ≤ Subalgebra.comap f U

full_name: Subalgebra.gc_map_comap
code: theorem gc_map_comap (f : A →ₐ[R] B) : GaloisConnection (map f) (comap f) 
goal: GaloisConnection (Subalgebra.map f) (Subalgebra.comap f)

full_name: Subalgebra.mem_comap
code: @[simp]
theorem mem_comap (S : Subalgebra R B) (f : A →ₐ[R] B) (x : A) : x ∈ S.comap f ↔ f x ∈ S 
goal: x ∈ Subalgebra.comap f S ↔ f x ∈ S

full_name: Subalgebra.coe_comap
code: @[simp, norm_cast]
theorem coe_comap (S : Subalgebra R B) (f : A →ₐ[R] B) : (S.comap f : Set A) = f ⁻¹' (S : Set B) 
goal: ↑(Subalgebra.comap f S) = ⇑f ⁻¹' ↑S

full_name: Subalgebra.noZeroDivisors
code: instance noZeroDivisors {R A : Type*} [CommSemiring R] [Semiring A] [NoZeroDivisors A]
    [Algebra R A] (S : Subalgebra R A) : NoZeroDivisors S 
goal: NoZeroDivisors ↥S

full_name: Subalgebra.isDomain
code: instance isDomain {R A : Type*} [CommRing R] [Ring A] [IsDomain A] [Algebra R A]
    (S : Subalgebra R A) : IsDomain S 
goal: IsDomain ↥S

full_name: SubalgebraClass.toAlgebra
code: instance (priority := 75) toAlgebra : Algebra R s 
goal: Algebra R ↥s

full_name: SubalgebraClass.coe_algebraMap
code: @[simp, norm_cast]
lemma coe_algebraMap (r : R) : (algebraMap R s r : A) = algebraMap R A r 
goal: ↑((algebraMap R ↥s) r) = (algebraMap R A) r

full_name: SubalgebraClass.val
code: /-- Embedding of a subalgebra into the algebra, as an algebra homomorphism. -/
def val (s : S) : s →ₐ[R] A 
goal: ↥s →ₐ[R] A

full_name: SubalgebraClass.coe_val
code: @[simp]
theorem coe_val : (val s : s → A) = ((↑) : s → A) 
goal: ⇑(SubalgebraClass.val s) = Subtype.val

full_name: Submodule.toSubalgebra
code: /-- A submodule containing `1` and closed under multiplication is a subalgebra. -/
def toSubalgebra (p : Submodule R A) (h_one : (1 : A) ∈ p)
    (h_mul : ∀ x y, x ∈ p → y ∈ p → x * y ∈ p) : Subalgebra R A 
goal: Subalgebra R A

full_name: Submodule.mem_toSubalgebra
code: @[simp]
theorem mem_toSubalgebra {p : Submodule R A} {h_one h_mul} {x} :
    x ∈ p.toSubalgebra h_one h_mul ↔ x ∈ p 
goal: x ∈ p.toSubalgebra h_one h_mul ↔ x ∈ p

full_name: Submodule.coe_toSubalgebra
code: @[simp]
theorem coe_toSubalgebra (p : Submodule R A) (h_one h_mul) :
    (p.toSubalgebra h_one h_mul : Set A) = p 
goal: ↑(p.toSubalgebra h_one h_mul) = ↑p

full_name: Submodule.toSubalgebra_mk
code: theorem toSubalgebra_mk (s : Submodule R A) (h1 hmul) :
    s.toSubalgebra h1 hmul =
      Subalgebra.mk ⟨⟨⟨s, @hmul⟩, h1⟩, s.add_mem, s.zero_mem⟩
        (by intro r; rw [Algebra.algebraMap_eq_smul_one]; apply s.smul_mem _ h1) 
goal: s.toSubalgebra h1 hmul =
  { carrier := ↑s, mul_mem' := hmul, one_mem' := h1, add_mem' := ⋯, zero_mem' := ⋯, algebraMap_mem' := ⋯ }

full_name: Submodule.toSubalgebra_toSubmodule
code: @[simp]
theorem toSubalgebra_toSubmodule (p : Submodule R A) (h_one h_mul) :
    Subalgebra.toSubmodule (p.toSubalgebra h_one h_mul) = p 
goal: Subalgebra.toSubmodule (p.toSubalgebra h_one h_mul) = p

full_name: Subalgebra.toSubmodule_toSubalgebra
code: @[simp]
theorem _root_.Subalgebra.toSubmodule_toSubalgebra (S : Subalgebra R A) :
    (S.toSubmodule.toSubalgebra S.one_mem fun _ _ => S.mul_mem) = S 
goal: (Subalgebra.toSubmodule S).toSubalgebra ⋯ ⋯ = S

full_name: AlgHom.range
code: /-- Range of an `AlgHom` as a subalgebra. -/
protected def range (φ : A →ₐ[R] B) : Subalgebra R B 
goal: Subalgebra R B

full_name: AlgHom.mem_range
code: @[simp]
theorem mem_range (φ : A →ₐ[R] B) {y : B} : y ∈ φ.range ↔ ∃ x, φ x = y 
goal: y ∈ φ.range ↔ ∃ x, φ x = y

full_name: AlgHom.mem_range_self
code: theorem mem_range_self (φ : A →ₐ[R] B) (x : A) : φ x ∈ φ.range 
goal: φ x ∈ φ.range

full_name: AlgHom.coe_range
code: @[simp]
theorem coe_range (φ : A →ₐ[R] B) : (φ.range : Set B) = Set.range φ 
goal: ↑φ.range = Set.range ⇑φ

full_name: AlgHom.range_comp
code: theorem range_comp (f : A →ₐ[R] B) (g : B →ₐ[R] C) : (g.comp f).range = f.range.map g 
goal: (g.comp f).range = Subalgebra.map g f.range

full_name: AlgHom.range_comp_le_range
code: theorem range_comp_le_range (f : A →ₐ[R] B) (g : B →ₐ[R] C) : (g.comp f).range ≤ g.range 
goal: (g.comp f).range ≤ g.range

full_name: AlgHom.codRestrict
code: /-- Restrict the codomain of an algebra homomorphism. -/
def codRestrict (f : A →ₐ[R] B) (S : Subalgebra R B) (hf : ∀ x, f x ∈ S) : A →ₐ[R] S 
goal: A →ₐ[R] ↥S

full_name: AlgHom.val_comp_codRestrict
code: @[simp]
theorem val_comp_codRestrict (f : A →ₐ[R] B) (S : Subalgebra R B) (hf : ∀ x, f x ∈ S) :
    S.val.comp (f.codRestrict S hf) = f 
goal: S.val.comp (f.codRestrict S hf) = f

full_name: AlgHom.coe_codRestrict
code: @[simp]
theorem coe_codRestrict (f : A →ₐ[R] B) (S : Subalgebra R B) (hf : ∀ x, f x ∈ S) (x : A) :
    ↑(f.codRestrict S hf x) = f x 
goal: ↑((f.codRestrict S hf) x) = f x

full_name: AlgHom.injective_codRestrict
code: theorem injective_codRestrict (f : A →ₐ[R] B) (S : Subalgebra R B) (hf : ∀ x, f x ∈ S) :
    Function.Injective (f.codRestrict S hf) ↔ Function.Injective f 
goal: Function.Injective ⇑(f.codRestrict S hf) ↔ Function.Injective ⇑f

full_name: AlgHom.rangeRestrict
code: /-- Restrict the codomain of an `AlgHom` `f` to `f.range`.

This is the bundled version of `Set.rangeFactorization`. -/
abbrev rangeRestrict (f : A →ₐ[R] B) : A →ₐ[R] f.range 
goal: A →ₐ[R] ↥f.range

full_name: AlgHom.rangeRestrict_surjective
code: theorem rangeRestrict_surjective (f : A →ₐ[R] B) : Function.Surjective (f.rangeRestrict) 
goal: Function.Surjective ⇑f.rangeRestrict

full_name: AlgHom.fintypeRange
code: /-- The range of a morphism of algebras is a fintype, if the domain is a fintype.

Note that this instance can cause a diamond with `Subtype.fintype` if `B` is also a fintype. -/
instance fintypeRange [Fintype A] [DecidableEq B] (φ : A →ₐ[R] B) : Fintype φ.range 
goal: Fintype ↥φ.range

full_name: AlgEquiv.ofLeftInverse
code: /-- Restrict an algebra homomorphism with a left inverse to an algebra isomorphism to its range.

This is a computable alternative to `AlgEquiv.ofInjective`. -/
def ofLeftInverse {g : B → A} {f : A →ₐ[R] B} (h : Function.LeftInverse g f) : A ≃ₐ[R] f.range 
goal: A ≃ₐ[R] ↥f.range

full_name: AlgEquiv.ofLeftInverse_apply
code: @[simp]
theorem ofLeftInverse_apply {g : B → A} {f : A →ₐ[R] B} (h : Function.LeftInverse g f) (x : A) :
    ↑(ofLeftInverse h x) = f x 
goal: ↑((AlgEquiv.ofLeftInverse h) x) = f x

full_name: AlgEquiv.ofLeftInverse_symm_apply
code: @[simp]
theorem ofLeftInverse_symm_apply {g : B → A} {f : A →ₐ[R] B} (h : Function.LeftInverse g f)
    (x : f.range) : (ofLeftInverse h).symm x = g x 
goal: (AlgEquiv.ofLeftInverse h).symm x = g ↑x

full_name: AlgEquiv.ofInjective
code: /-- Restrict an injective algebra homomorphism to an algebra isomorphism -/
noncomputable def ofInjective (f : A →ₐ[R] B) (hf : Function.Injective f) : A ≃ₐ[R] f.range 
goal: A ≃ₐ[R] ↥f.range

full_name: AlgEquiv.ofInjective_apply
code: @[simp]
theorem ofInjective_apply (f : A →ₐ[R] B) (hf : Function.Injective f) (x : A) :
    ↑(ofInjective f hf x) = f x 
goal: ↑((AlgEquiv.ofInjective f hf) x) = f x

full_name: AlgEquiv.ofInjectiveField
code: /-- Restrict an algebra homomorphism between fields to an algebra isomorphism -/
noncomputable def ofInjectiveField {E F : Type*} [DivisionRing E] [Semiring F] [Nontrivial F]
    [Algebra R E] [Algebra R F] (f : E →ₐ[R] F) : E ≃ₐ[R] f.range 
goal: E ≃ₐ[R] ↥f.range

full_name: AlgEquiv.subalgebraMap
code: /-- Given an equivalence `e : A ≃ₐ[R] B` of `R`-algebras and a subalgebra `S` of `A`,
`subalgebraMap` is the induced equivalence between `S` and `S.map e` -/
@[simps!]
def subalgebraMap (e : A ≃ₐ[R] B) (S : Subalgebra R A) : S ≃ₐ[R] S.map (e : A →ₐ[R] B) 
goal: ↥S ≃ₐ[R] ↥(Subalgebra.map (↑e) S)

full_name: AlgEquiv.subalgebraMap_symm_apply_coe
code: /-- Given an equivalence `e : A ≃ₐ[R] B` of `R`-algebras and a subalgebra `S` of `A`,
`subalgebraMap` is the induced equivalence between `S` and `S.map e` -/
@[simps!]
def subalgebraMap (e : A ≃ₐ[R] B) (S : Subalgebra R A) : S ≃ₐ[R] S.map (e : A →ₐ[R] B) 
goal: ↑((e.subalgebraMap S).symm y) = (↑↑e).symm ↑y

full_name: AlgEquiv.subalgebraMap_apply_coe
code: /-- Given an equivalence `e : A ≃ₐ[R] B` of `R`-algebras and a subalgebra `S` of `A`,
`subalgebraMap` is the induced equivalence between `S` and `S.map e` -/
@[simps!]
def subalgebraMap (e : A ≃ₐ[R] B) (S : Subalgebra R A) : S ≃ₐ[R] S.map (e : A →ₐ[R] B) 
goal: ↑((e.subalgebraMap S) x) = e ↑x

full_name: Algebra.adjoin
code: /-- The minimal subalgebra that includes `s`. -/
def adjoin (s : Set A) : Subalgebra R A 
goal: Subalgebra R A

full_name: Algebra.gc
code: protected theorem gc : GaloisConnection (adjoin R : Set A → Subalgebra R A) (↑) 
goal: GaloisConnection (Algebra.adjoin R) SetLike.coe

full_name: Algebra.gi
code: /-- Galois insertion between `adjoin` and `coe`. -/
protected def gi : GaloisInsertion (adjoin R : Set A → Subalgebra R A) (↑) 
goal: GaloisInsertion (Algebra.adjoin R) SetLike.coe

full_name: Algebra.instCompleteLatticeSubalgebra
code: instance : CompleteLattice (Subalgebra R A) 
goal: CompleteLattice (Subalgebra R A)

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

full_name: Algebra.mem_top
code: @[simp]
theorem mem_top {x : A} : x ∈ (⊤ : Subalgebra R A) 
goal: x ∈ ⊤

full_name: Algebra.top_toSubmodule
code: @[simp]
theorem top_toSubmodule : Subalgebra.toSubmodule (⊤ : Subalgebra R A) = ⊤ 
goal: Subalgebra.toSubmodule ⊤ = ⊤

full_name: Algebra.top_toSubsemiring
code: @[simp]
theorem top_toSubsemiring : (⊤ : Subalgebra R A).toSubsemiring = ⊤ 
goal: ⊤.toSubsemiring = ⊤

full_name: Algebra.top_toSubring
code: @[simp]
theorem top_toSubring {R A : Type*} [CommRing R] [Ring A] [Algebra R A] :
    (⊤ : Subalgebra R A).toSubring = ⊤ 
goal: ⊤.toSubring = ⊤

full_name: Algebra.toSubmodule_eq_top
code: @[simp]
theorem toSubmodule_eq_top {S : Subalgebra R A} : Subalgebra.toSubmodule S = ⊤ ↔ S = ⊤ 
goal: Subalgebra.toSubmodule S = ⊤ ↔ S = ⊤

full_name: Algebra.toSubsemiring_eq_top
code: @[simp]
theorem toSubsemiring_eq_top {S : Subalgebra R A} : S.toSubsemiring = ⊤ ↔ S = ⊤ 
goal: S.toSubsemiring = ⊤ ↔ S = ⊤

full_name: Algebra.toSubring_eq_top
code: @[simp]
theorem toSubring_eq_top {R A : Type*} [CommRing R] [Ring A] [Algebra R A] {S : Subalgebra R A} :
    S.toSubring = ⊤ ↔ S = ⊤ 
goal: S.toSubring = ⊤ ↔ S = ⊤

full_name: Algebra.mem_sup_left
code: theorem mem_sup_left {S T : Subalgebra R A} : ∀ {x : A}, x ∈ S → x ∈ S ⊔ T 
goal: x ∈ S → x ∈ S ⊔ T

full_name: Algebra.mem_sup_right
code: theorem mem_sup_right {S T : Subalgebra R A} : ∀ {x : A}, x ∈ T → x ∈ S ⊔ T 
goal: x ∈ T → x ∈ S ⊔ T

full_name: Algebra.mul_mem_sup
code: theorem mul_mem_sup {S T : Subalgebra R A} {x y : A} (hx : x ∈ S) (hy : y ∈ T) : x * y ∈ S ⊔ T 
goal: x * y ∈ S ⊔ T

full_name: Algebra.map_sup
code: theorem map_sup (f : A →ₐ[R] B) (S T : Subalgebra R A) : (S ⊔ T).map f = S.map f ⊔ T.map f 
goal: Subalgebra.map f (S ⊔ T) = Subalgebra.map f S ⊔ Subalgebra.map f T

full_name: Algebra.coe_inf
code: @[simp, norm_cast]
theorem coe_inf (S T : Subalgebra R A) : (↑(S ⊓ T) : Set A) = (S ∩ T : Set A) 
goal: ↑(S ⊓ T) = ↑S ∩ ↑T

full_name: Algebra.mem_inf
code: @[simp]
theorem mem_inf {S T : Subalgebra R A} {x : A} : x ∈ S ⊓ T ↔ x ∈ S ∧ x ∈ T 
goal: x ∈ S ⊓ T ↔ x ∈ S ∧ x ∈ T

full_name: Algebra.inf_toSubmodule
code: @[simp]
theorem inf_toSubmodule (S T : Subalgebra R A) :
    toSubmodule (S ⊓ T) = toSubmodule S ⊓ toSubmodule T 
goal: Subalgebra.toSubmodule (S ⊓ T) = Subalgebra.toSubmodule S ⊓ Subalgebra.toSubmodule T

full_name: Algebra.inf_toSubsemiring
code: @[simp]
theorem inf_toSubsemiring (S T : Subalgebra R A) :
    (S ⊓ T).toSubsemiring = S.toSubsemiring ⊓ T.toSubsemiring 
goal: (S ⊓ T).toSubsemiring = S.toSubsemiring ⊓ T.toSubsemiring

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

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

full_name: Algebra.sInf_toSubmodule
code: @[simp]
theorem sInf_toSubmodule (S : Set (Subalgebra R A)) :
    Subalgebra.toSubmodule (sInf S) = sInf (Subalgebra.toSubmodule '' S) 
goal: Subalgebra.toSubmodule (sInf S) = sInf (⇑Subalgebra.toSubmodule '' S)

full_name: Algebra.sInf_toSubsemiring
code: @[simp]
theorem sInf_toSubsemiring (S : Set (Subalgebra R A)) :
    (sInf S).toSubsemiring = sInf (Subalgebra.toSubsemiring '' S) 
goal: (sInf S).toSubsemiring = sInf (Subalgebra.toSubsemiring '' S)

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

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

full_name: Algebra.iInf_toSubmodule
code: @[simp]
theorem iInf_toSubmodule {ι : Sort*} (S : ι → Subalgebra R A) :
    toSubmodule (⨅ i, S i) = ⨅ i, toSubmodule (S i) 
goal: Subalgebra.toSubmodule (⨅ i, S i) = ⨅ i, Subalgebra.toSubmodule (S i)

full_name: Algebra.instInhabitedSubalgebra
code: instance : Inhabited (Subalgebra R A) 
goal: Inhabited (Subalgebra R A)

full_name: Algebra.mem_bot
code: theorem mem_bot {x : A} : x ∈ (⊥ : Subalgebra R A) ↔ x ∈ Set.range (algebraMap R A) 
goal: x ∈ ⊥ ↔ x ∈ Set.range ⇑(algebraMap R A)

full_name: Algebra.toSubmodule_bot
code: theorem toSubmodule_bot : Subalgebra.toSubmodule (⊥ : Subalgebra R A) = 1 
goal: Subalgebra.toSubmodule ⊥ = 1

full_name: Algebra.coe_bot
code: @[simp]
theorem coe_bot : ((⊥ : Subalgebra R A) : Set A) = Set.range (algebraMap R A) 
goal: ↑⊥ = Set.range ⇑(algebraMap R A)

full_name: Algebra.eq_top_iff
code: theorem eq_top_iff {S : Subalgebra R A} : S = ⊤ ↔ ∀ x : A, x ∈ S 
goal: S = ⊤ ↔ ∀ (x : A), x ∈ S

full_name: Algebra.range_top_iff_surjective
code: theorem range_top_iff_surjective (f : A →ₐ[R] B) :
    f.range = (⊤ : Subalgebra R B) ↔ Function.Surjective f 
goal: f.range = ⊤ ↔ Function.Surjective ⇑f

full_name: Algebra.range_id
code: @[simp]
theorem range_id : (AlgHom.id R A).range = ⊤ 
goal: (AlgHom.id R A).range = ⊤

full_name: Algebra.map_top
code: @[simp]
theorem map_top (f : A →ₐ[R] B) : (⊤ : Subalgebra R A).map f = f.range 
goal: Subalgebra.map f ⊤ = f.range

full_name: Algebra.map_bot
code: @[simp]
theorem map_bot (f : A →ₐ[R] B) : (⊥ : Subalgebra R A).map f = ⊥ 
goal: Subalgebra.map f ⊥ = ⊥

full_name: Algebra.comap_top
code: @[simp]
theorem comap_top (f : A →ₐ[R] B) : (⊤ : Subalgebra R B).comap f = ⊤ 
goal: Subalgebra.comap f ⊤ = ⊤

full_name: Algebra.toTop
code: /-- `AlgHom` to `⊤ : Subalgebra R A`. -/
def toTop : A →ₐ[R] (⊤ : Subalgebra R A) 
goal: A →ₐ[R] ↥⊤

full_name: Algebra.surjective_algebraMap_iff
code: theorem surjective_algebraMap_iff :
    Function.Surjective (algebraMap R A) ↔ (⊤ : Subalgebra R A) = ⊥ 
goal: Function.Surjective ⇑(algebraMap R A) ↔ ⊤ = ⊥

full_name: Algebra.bijective_algebraMap_iff
code: theorem bijective_algebraMap_iff {R A : Type*} [Field R] [Semiring A] [Nontrivial A]
    [Algebra R A] : Function.Bijective (algebraMap R A) ↔ (⊤ : Subalgebra R A) = ⊥ 
goal: Function.Bijective ⇑(algebraMap R A) ↔ ⊤ = ⊥

full_name: Algebra.botEquivOfInjective
code: /-- The bottom subalgebra is isomorphic to the base ring. -/
noncomputable def botEquivOfInjective (h : Function.Injective (algebraMap R A)) :
    (⊥ : Subalgebra R A) ≃ₐ[R] R 
goal: ↥⊥ ≃ₐ[R] R

full_name: Algebra.botEquiv
code: /-- The bottom subalgebra is isomorphic to the field. -/
@[simps! symm_apply]
noncomputable def botEquiv (F R : Type*) [Field F] [Semiring R] [Nontrivial R] [Algebra F R] :
    (⊥ : Subalgebra F R) ≃ₐ[F] F 
goal: ↥⊥ ≃ₐ[F] F

full_name: Algebra.botEquiv_symm_apply
code: /-- The bottom subalgebra is isomorphic to the field. -/
@[simps! symm_apply]
noncomputable def botEquiv (F R : Type*) [Field F] [Semiring R] [Nontrivial R] [Algebra F R] :
    (⊥ : Subalgebra F R) ≃ₐ[F] F 
goal: ∀ (a : F), (Algebra.botEquiv F R).symm a = (Algebra.ofId F ↥⊥) a

full_name: Subalgebra.topEquiv_symm_apply_coe
code: /-- The top subalgebra is isomorphic to the algebra.

This is the algebra version of `Submodule.topEquiv`. -/
@[simps!]
def topEquiv : (⊤ : Subalgebra R A) ≃ₐ[R] A 
goal: ↑(Subalgebra.topEquiv.symm a) = a

full_name: Subalgebra.topEquiv_apply
code: /-- The top subalgebra is isomorphic to the algebra.

This is the algebra version of `Submodule.topEquiv`. -/
@[simps!]
def topEquiv : (⊤ : Subalgebra R A) ≃ₐ[R] A 
goal: Subalgebra.topEquiv a = ↑a

full_name: Subalgebra.topEquiv
code: /-- The top subalgebra is isomorphic to the algebra.

This is the algebra version of `Submodule.topEquiv`. -/
@[simps!]
def topEquiv : (⊤ : Subalgebra R A) ≃ₐ[R] A 
goal: ↥⊤ ≃ₐ[R] A

full_name: Subalgebra.subsingleton_of_subsingleton
code: instance subsingleton_of_subsingleton [Subsingleton A] : Subsingleton (Subalgebra R A) 
goal: Subsingleton (Subalgebra R A)

full_name: AlgHom.subsingleton
code: instance _root_.AlgHom.subsingleton [Subsingleton (Subalgebra R A)] : Subsingleton (A →ₐ[R] B) 
goal: Subsingleton (A →ₐ[R] B)

full_name: AlgEquiv.subsingleton_left
code: instance _root_.AlgEquiv.subsingleton_left [Subsingleton (Subalgebra R A)] :
    Subsingleton (A ≃ₐ[R] B) 
goal: Subsingleton (A ≃ₐ[R] B)

full_name: AlgEquiv.subsingleton_right
code: instance _root_.AlgEquiv.subsingleton_right [Subsingleton (Subalgebra R B)] :
    Subsingleton (A ≃ₐ[R] B) 
goal: Subsingleton (A ≃ₐ[R] B)

full_name: Subalgebra.range_val
code: theorem range_val : S.val.range = S 
goal: S.val.range = S

full_name: Subalgebra.instUnique
code: instance : Unique (Subalgebra R R) 
goal: Unique (Subalgebra R R)

full_name: Subalgebra.inclusion
code: /-- The map `S → T` when `S` is a subalgebra contained in the subalgebra `T`.

This is the subalgebra version of `Submodule.inclusion`, or `Subring.inclusion`  -/
def inclusion {S T : Subalgebra R A} (h : S ≤ T) : S →ₐ[R] T 
goal: ↥S →ₐ[R] ↥T

full_name: Subalgebra.inclusion_injective
code: theorem inclusion_injective {S T : Subalgebra R A} (h : S ≤ T) : Function.Injective (inclusion h) 
goal: Function.Injective ⇑(Subalgebra.inclusion h)

full_name: Subalgebra.inclusion_self
code: @[simp]
theorem inclusion_self {S : Subalgebra R A} : inclusion (le_refl S) = AlgHom.id R S 
goal: Subalgebra.inclusion ⋯ = AlgHom.id R ↥S

full_name: Subalgebra.inclusion_mk
code: @[simp]
theorem inclusion_mk {S T : Subalgebra R A} (h : S ≤ T) (x : A) (hx : x ∈ S) :
    inclusion h ⟨x, hx⟩ = ⟨x, h hx⟩ 
goal: (Subalgebra.inclusion h) ⟨x, hx⟩ = ⟨x, ⋯⟩

full_name: Subalgebra.inclusion_right
code: theorem inclusion_right {S T : Subalgebra R A} (h : S ≤ T) (x : T) (m : (x : A) ∈ S) :
    inclusion h ⟨x, m⟩ = x 
goal: (Subalgebra.inclusion h) ⟨↑x, m⟩ = x

full_name: Subalgebra.inclusion_inclusion
code: @[simp]
theorem inclusion_inclusion {S T U : Subalgebra R A} (hst : S ≤ T) (htu : T ≤ U) (x : S) :
    inclusion htu (inclusion hst x) = inclusion (le_trans hst htu) x 
goal: (Subalgebra.inclusion htu) ((Subalgebra.inclusion hst) x) = (Subalgebra.inclusion ⋯) x

full_name: Subalgebra.coe_inclusion
code: @[simp]
theorem coe_inclusion {S T : Subalgebra R A} (h : S ≤ T) (s : S) : (inclusion h s : A) = s 
goal: ↑((Subalgebra.inclusion h) s) = ↑s

full_name: Subalgebra.equivOfEq_apply
code: /-- Two subalgebras that are equal are also equivalent as algebras.

This is the `Subalgebra` version of `LinearEquiv.ofEq` and `Equiv.Set.ofEq`. -/
@[simps apply]
def equivOfEq (S T : Subalgebra R A) (h : S = T) : S ≃ₐ[R] T 
goal: (S.equivOfEq T h) x = ⟨↑x, ⋯⟩

full_name: Subalgebra.equivOfEq
code: /-- Two subalgebras that are equal are also equivalent as algebras.

This is the `Subalgebra` version of `LinearEquiv.ofEq` and `Equiv.Set.ofEq`. -/
@[simps apply]
def equivOfEq (S T : Subalgebra R A) (h : S = T) : S ≃ₐ[R] T 
goal: ↥S ≃ₐ[R] ↥T

full_name: Subalgebra.equivOfEq_symm
code: @[simp]
theorem equivOfEq_symm (S T : Subalgebra R A) (h : S = T) :
    (equivOfEq S T h).symm = equivOfEq T S h.symm 
goal: (S.equivOfEq T h).symm = T.equivOfEq S ⋯

full_name: Subalgebra.equivOfEq_rfl
code: @[simp]
theorem equivOfEq_rfl (S : Subalgebra R A) : equivOfEq S S rfl = AlgEquiv.refl 
goal: S.equivOfEq S ⋯ = AlgEquiv.refl

full_name: Subalgebra.equivOfEq_trans
code: @[simp]
theorem equivOfEq_trans (S T U : Subalgebra R A) (hST : S = T) (hTU : T = U) :
    (equivOfEq S T hST).trans (equivOfEq T U hTU) = equivOfEq S U (hST.trans hTU) 
goal: (S.equivOfEq T hST).trans (T.equivOfEq U hTU) = S.equivOfEq U ⋯

full_name: Subalgebra.range_comp_val
code: theorem range_comp_val : (f.comp S.val).range = S.map f 
goal: (f.comp S.val).range = Subalgebra.map f S

full_name: Subalgebra.equivMapOfInjective
code: /-- A subalgebra is isomorphic to its image under an injective `AlgHom` -/
noncomputable def equivMapOfInjective : S ≃ₐ[R] S.map f 
goal: ↥S ≃ₐ[R] ↥(Subalgebra.map f S)

full_name: Subalgebra.coe_equivMapOfInjective_apply
code: @[simp]
theorem coe_equivMapOfInjective_apply (x : S) : ↑(equivMapOfInjective S f hf x) = f x 
goal: ↑((S.equivMapOfInjective f hf) x) = f ↑x

full_name: Subalgebra.instSMulSubtypeMem
code: /-- The action by a subalgebra is the action by the underlying algebra. -/
instance [SMul A α] (S : Subalgebra R A) : SMul S α 
goal: SMul (↥S) α

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

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

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

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

full_name: Subalgebra.isScalarTower_mid
code: instance isScalarTower_mid {R S T : Type*} [CommSemiring R] [Semiring S] [AddCommMonoid T]
    [Algebra R S] [Module R T] [Module S T] [IsScalarTower R S T] (S' : Subalgebra R S) :
    IsScalarTower R S' T 
goal: IsScalarTower R (↥S') T

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

full_name: Subalgebra.instMulActionSubtypeMem
code: /-- The action by a subalgebra is the action by the underlying algebra. -/
instance [MulAction A α] (S : Subalgebra R A) : MulAction S α 
goal: MulAction (↥S) α

full_name: Subalgebra.instDistribMulActionSubtypeMem
code: /-- The action by a subalgebra is the action by the underlying algebra. -/
instance [AddMonoid α] [DistribMulAction A α] (S : Subalgebra R A) : DistribMulAction S α 
goal: DistribMulAction (↥S) α

full_name: Subalgebra.instSMulWithZeroSubtypeMem
code: /-- The action by a subalgebra is the action by the underlying algebra. -/
instance [Zero α] [SMulWithZero A α] (S : Subalgebra R A) : SMulWithZero S α 
goal: SMulWithZero (↥S) α

full_name: Subalgebra.instMulActionWithZeroSubtypeMem
code: /-- The action by a subalgebra is the action by the underlying algebra. -/
instance [Zero α] [MulActionWithZero A α] (S : Subalgebra R A) : MulActionWithZero S α 
goal: MulActionWithZero (↥S) α

full_name: Subalgebra.moduleLeft
code: /-- The action by a subalgebra is the action by the underlying algebra. -/
instance moduleLeft [AddCommMonoid α] [Module A α] (S : Subalgebra R A) : Module S α 
goal: Module (↥S) α

full_name: Subalgebra.toAlgebra
code: /-- The action by a subalgebra is the action by the underlying algebra. -/
instance toAlgebra {R A : Type*} [CommSemiring R] [CommSemiring A] [Semiring α] [Algebra R A]
    [Algebra A α] (S : Subalgebra R A) : Algebra S α 
goal: Algebra (↥S) α

full_name: Subalgebra.algebraMap_eq
code: theorem algebraMap_eq {R A : Type*} [CommSemiring R] [CommSemiring A] [Semiring α] [Algebra R A]
    [Algebra A α] (S : Subalgebra R A) : algebraMap S α = (algebraMap A α).comp S.val 
goal: algebraMap (↥S) α = (algebraMap A α).comp ↑S.val

full_name: Subalgebra.rangeS_algebraMap
code: @[simp]
theorem rangeS_algebraMap {R A : Type*} [CommSemiring R] [CommSemiring A] [Algebra R A]
    (S : Subalgebra R A) : (algebraMap S A).rangeS = S.toSubsemiring 
goal: (algebraMap (↥S) A).rangeS = S.toSubsemiring

full_name: Subalgebra.range_algebraMap
code: @[simp]
theorem range_algebraMap {R A : Type*} [CommRing R] [CommRing A] [Algebra R A]
    (S : Subalgebra R A) : (algebraMap S A).range = S.toSubring 
goal: (algebraMap (↥S) A).range = S.toSubring

full_name: Subalgebra.noZeroSMulDivisors_top
code: instance noZeroSMulDivisors_top [NoZeroDivisors A] (S : Subalgebra R A) : NoZeroSMulDivisors S A 
goal: NoZeroSMulDivisors (↥S) A

full_name: Set.algebraMap_mem_center
code: theorem _root_.Set.algebraMap_mem_center (r : R) : algebraMap R A r ∈ Set.center A 
goal: (algebraMap R A) r ∈ Set.center A

full_name: Subalgebra.center
code: /-- The center of an algebra is the set of elements which commute with every element. They form a
subalgebra. -/
def center : Subalgebra R A 
goal: Subalgebra R A

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

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

full_name: Subalgebra.center_toSubring
code: @[simp]
theorem center_toSubring (R A : Type*) [CommRing R] [Ring A] [Algebra R A] :
    (center R A).toSubring = Subring.center A 
goal: (Subalgebra.center R A).toSubring = Subring.center A

full_name: Subalgebra.center_eq_top
code: @[simp]
theorem center_eq_top (A : Type*) [CommSemiring A] [Algebra R A] : center R A = ⊤ 
goal: Subalgebra.center R A = ⊤

full_name: Subalgebra.instCommSemiringSubtypeMemCenter
code: instance : CommSemiring (center R A) 
goal: CommSemiring ↥(Subalgebra.center R A)

full_name: Subalgebra.instCommRingSubtypeMemCenter
code: instance {A : Type*} [Ring A] [Algebra R A] : CommRing (center R A) 
goal: CommRing ↥(Subalgebra.center R A)

full_name: Subalgebra.mem_center_iff
code: theorem mem_center_iff {a : A} : a ∈ center R A ↔ ∀ b : A, b * a = a * b 
goal: a ∈ Subalgebra.center R A ↔ ∀ (b : A), b * a = a * b

full_name: Set.algebraMap_mem_centralizer
code: @[simp]
theorem _root_.Set.algebraMap_mem_centralizer {s : Set A} (r : R) :
    algebraMap R A r ∈ s.centralizer 
goal: (algebraMap R A) r ∈ s.centralizer

full_name: Subalgebra.centralizer
code: /-- The centralizer of a set as a subalgebra. -/
def centralizer (s : Set A) : Subalgebra R A 
goal: Subalgebra R A

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

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

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

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

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

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

full_name: Subalgebra.le_centralizer_centralizer
code: lemma le_centralizer_centralizer {s : Subalgebra R A} :
    s ≤ centralizer R (centralizer R (s : Set A)) 
goal: s ≤ Subalgebra.centralizer R ↑(Subalgebra.centralizer R ↑s)

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

full_name: subalgebraOfSubsemiring
code: /-- A subsemiring is an `ℕ`-subalgebra. -/
def subalgebraOfSubsemiring (S : Subsemiring R) : Subalgebra ℕ R 
goal: Subalgebra ℕ R

full_name: mem_subalgebraOfSubsemiring
code: @[simp]
theorem mem_subalgebraOfSubsemiring {x : R} {S : Subsemiring R} :
    x ∈ subalgebraOfSubsemiring S ↔ x ∈ S 
goal: x ∈ subalgebraOfSubsemiring S ↔ x ∈ S

full_name: subalgebraOfSubring
code: /-- A subring is a `ℤ`-subalgebra. -/
def subalgebraOfSubring (S : Subring R) : Subalgebra ℤ R 
goal: Subalgebra ℤ R

full_name: mem_subalgebraOfSubring
code: @[simp]
theorem mem_subalgebraOfSubring {x : R} {S : Subring R} : x ∈ subalgebraOfSubring S ↔ x ∈ S 
goal: x ∈ subalgebraOfSubring S ↔ x ∈ S

full_name: AlgHom.equalizer
code: /-- The equalizer of two R-algebra homomorphisms -/
def equalizer (ϕ ψ : F) : Subalgebra R A 
goal: Subalgebra R A

full_name: AlgHom.mem_equalizer
code: @[simp]
theorem mem_equalizer (φ ψ : F) (x : A) : x ∈ equalizer φ ψ ↔ φ x = ψ x 
goal: x ∈ AlgHom.equalizer φ ψ ↔ φ x = ψ x

full_name: AlgHom.equalizer_toSubmodule
code: theorem equalizer_toSubmodule {φ ψ : F} :
    Subalgebra.toSubmodule (equalizer φ ψ) = LinearMap.eqLocus φ ψ 
goal: Subalgebra.toSubmodule (AlgHom.equalizer φ ψ) = LinearMap.eqLocus φ ψ

full_name: AlgHom.equalizer_eq_top
code: @[simp]
theorem equalizer_eq_top {φ ψ : F} : equalizer φ ψ = ⊤ ↔ φ = ψ 
goal: AlgHom.equalizer φ ψ = ⊤ ↔ φ = ψ

full_name: AlgHom.equalizer_same
code: @[simp]
theorem equalizer_same (φ : F) : equalizer φ φ = ⊤ 
goal: AlgHom.equalizer φ φ = ⊤

full_name: AlgHom.le_equalizer
code: theorem le_equalizer {φ ψ : F} {S : Subalgebra R A} : S ≤ equalizer φ ψ ↔ Set.EqOn φ ψ S 
goal: S ≤ AlgHom.equalizer φ ψ ↔ Set.EqOn ⇑φ ⇑ψ ↑S

full_name: AlgHom.eqOn_sup
code: theorem eqOn_sup {φ ψ : F} {S T : Subalgebra R A} (hS : Set.EqOn φ ψ S) (hT : Set.EqOn φ ψ T) :
    Set.EqOn φ ψ ↑(S ⊔ T) 
goal: Set.EqOn ⇑φ ⇑ψ ↑(S ⊔ T)

full_name: AlgHom.ext_on_codisjoint
code: theorem ext_on_codisjoint {φ ψ : F} {S T : Subalgebra R A} (hST : Codisjoint S T)
    (hS : Set.EqOn φ ψ S) (hT : Set.EqOn φ ψ T) : φ = ψ 
goal: φ = ψ

full_name: Subalgebra.map_comap_eq
code: theorem map_comap_eq (f : A →ₐ[R] B) (S : Subalgebra R B) : (S.comap f).map f = S ⊓ f.range 
goal: Subalgebra.map f (Subalgebra.comap f S) = S ⊓ f.range

full_name: Subalgebra.map_comap_eq_self
code: theorem map_comap_eq_self
    {f : A →ₐ[R] B} {S : Subalgebra R B} (h : S ≤ f.range) : (S.comap f).map f = S 
goal: Subalgebra.map f (Subalgebra.comap f S) = S

full_name: Subalgebra.map_comap_eq_self_of_surjective
code: theorem map_comap_eq_self_of_surjective
    {f : A →ₐ[R] B} (hf : Function.Surjective f) (S : Subalgebra R B) : (S.comap f).map f = S 
goal: Subalgebra.map f (Subalgebra.comap f S) = S

full_name: Subalgebra.comap_map_eq_self_of_injective
code: theorem comap_map_eq_self_of_injective
    {f : A →ₐ[R] B} (hf : Function.Injective f) (S : Subalgebra R A) : (S.map f).comap f = S 
goal: Subalgebra.comap f (Subalgebra.map f S) = S