l3lab/ntp-mathlib huggingface dataset:
/-- Embedding of a subalgebra into the algebra. -/
def subtype : S →⋆ₐ[R] A := by refine' { toFun := ((↑) : S → A), .. } <;> 

Proof state:
case refine'_4
F : Type u_1
R : Type u_2
A : Type u_3
B : Type u_4
C : Type u_5
inst✝¹³ : CommSemiring R
inst✝¹² : StarRing R
inst✝¹¹ : Semiring A
inst✝¹⁰ : StarRing A
inst✝⁹ : Algebra R A
inst✝⁸ : StarModule R A
inst✝⁷ : Semiring B
inst✝⁶ : StarRing B
inst✝⁵ : Algebra R B
inst✝⁴ : StarModule R B
inst✝³ : Semiring C
inst✝² : StarRing C
inst✝¹ : Algebra R C
inst✝ : StarModule R C
S : StarSubalgebra R A
⊢ ∀ (x y : ↥S),
    OneHom.toFun
        (↑{ toOneHom := { toFun := Subtype.val, map_one' := ?refine'_1 },
            map_mul' :=
              (_ :
                ∀ (x y : ↥S),
                  OneHom.toFun { toFun := Subtype.val, map_one' := ?refine'_1 } (x * y) =
                    OneHom.toFun { toFun := Subtype.val, map_one' := ?refine'_1 } x *
                      OneHom.toFun { toFun := Subtype.val, map_one' := ?refine'_1 } y) })
        (x + y) =
      OneHom.toFun
          (↑{ toOneHom := { toFun := Subtype.val, map_one' := ?refine'_1 },
              map_mul' :=
                (_ :
                  ∀ (x y : ↥S),
                    OneHom.toFun { toFun := Subtype.val, map_one' := ?refine'_1 } (x * y) =
                      OneHom.toFun { toFun := Subtype.val, map_one' := ?refine'_1 } x *
                        OneHom.toFun { toFun := Subtype.val, map_one' := ?refine'_1 } y) })
          x +
        OneHom.toFun
          (↑{ toOneHom := { toFun := Subtype.val, map_one' := ?refine'_1 },
              map_mul' :=
                (_ :
                  ∀ (x y : ↥S),
                    OneHom.toFun { toFun := Subtype.val, map_one' := ?refine'_1 } (x * y) =
                      OneHom.toFun { toFun := Subtype.val, map_one' := ?refine'_1 } x *
                        OneHom.toFun { toFun := Subtype.val, map_one' := ?refine'_1 } y) })
          y

Next tactic:
intros
/-- Embedding of a subalgebra into the algebra. -/
def subtype : S →⋆ₐ[R] A := by refine' { toFun := ((↑) : S → A), .. } <;> 

Proof state:
case refine'_5
F : Type u_1
R : Type u_2
A : Type u_3
B : Type u_4
C : Type u_5
inst✝¹³ : CommSemiring R
inst✝¹² : StarRing R
inst✝¹¹ : Semiring A
inst✝¹⁰ : StarRing A
inst✝⁹ : Algebra R A
inst✝⁸ : StarModule R A
inst✝⁷ : Semiring B
inst✝⁶ : StarRing B
inst✝⁵ : Algebra R B
inst✝⁴ : StarModule R B
inst✝³ : Semiring C
inst✝² : StarRing C
inst✝¹ : Algebra R C
inst✝ : StarModule R C
S : StarSubalgebra R A
⊢ ∀ (r : R),
    OneHom.toFun
        (↑↑{
              toMonoidHom :=
                { toOneHom := { toFun := Subtype.val, map_one' := ?refine'_1 },
                  map_mul' :=
                    (_ :
                      ∀ (x y : ↥S),
                        OneHom.toFun { toFun := Subtype.val, map_one' := ?refine'_1 } (x * y) =
                          OneHom.toFun { toFun := Subtype.val, map_one' := ?refine'_1 } x *
                            OneHom.toFun { toFun := Subtype.val, map_one' := ?refine'_1 } y) },
              map_zero' := ?refine'_3,
              map_add' :=
                (_ :
                  ∀ (x y : ↥S),
                    OneHom.toFun
                        (↑{ toOneHom := { toFun := Subtype.val, map_one' := ?refine'_1 },
                            map_mul' :=
                              (_ :
                                ∀ (x y : ↥S),
                                  OneHom.toFun { toFun := Subtype.val, map_one' := ?refine'_1 } (x * y) =
                                    OneHom.toFun { toFun := Subtype.val, map_one' := ?refine'_1 } x *
                                      OneHom.toFun { toFun := Subtype.val, map_one' := ?refine'_1 } y) })
                        (x + y) =
                      OneHom.toFun
                          (↑{ toOneHom := { toFun := Subtype.val, map_one' := ?refine'_1 },
                              map_mul' :=
                                (_ :
                                  ∀ (x y : ↥S),
                                    OneHom.toFun { toFun := Subtype.val, map_one' := ?refine'_1 } (x * y) =
                                      OneHom.toFun { toFun := Subtype.val, map_one' := ?refine'_1 } x *
                                        OneHom.toFun { toFun := Subtype.val, map_one' := ?refine'_1 } y) })
                          x +
                        OneHom.toFun
                          (↑{ toOneHom := { toFun := Subtype.val, map_one' := ?refine'_1 },
                              map_mul' :=
                                (_ :
                                  ∀ (x y : ↥S),
                                    OneHom.toFun { toFun := Subtype.val, map_one' := ?refine'_1 } (x * y) =
                                      OneHom.toFun { toFun := Subtype.val, map_one' := ?refine'_1 } x *
                                        OneHom.toFun { toFun := Subtype.val, map_one' := ?refine'_1 } y) })
                          y) })
        ((algebraMap R ↥S) r) =
      (algebraMap R A) r

Next tactic:
intros
/-- Embedding of a subalgebra into the algebra. -/
def subtype : S →⋆ₐ[R] A := by refine' { toFun := ((↑) : S → A), .. } <;> intros <;> 

Proof state:
case refine'_1
F : Type u_1
R : Type u_2
A : Type u_3
B : Type u_4
C : Type u_5
inst✝¹³ : CommSemiring R
inst✝¹² : StarRing R
inst✝¹¹ : Semiring A
inst✝¹⁰ : StarRing A
inst✝⁹ : Algebra R A
inst✝⁸ : StarModule R A
inst✝⁷ : Semiring B
inst✝⁶ : StarRing B
inst✝⁵ : Algebra R B
inst✝⁴ : StarModule R B
inst✝³ : Semiring C
inst✝² : StarRing C
inst✝¹ : Algebra R C
inst✝ : StarModule R C
S : StarSubalgebra R A
⊢ ↑1 = 1

Next tactic:
rfl
/-- Embedding of a subalgebra into the algebra. -/
def subtype : S →⋆ₐ[R] A := by refine' { toFun := ((↑) : S → A), .. } <;> intros <;> 

Proof state:
case refine'_2
F : Type u_1
R : Type u_2
A : Type u_3
B : Type u_4
C : Type u_5
inst✝¹³ : CommSemiring R
inst✝¹² : StarRing R
inst✝¹¹ : Semiring A
inst✝¹⁰ : StarRing A
inst✝⁹ : Algebra R A
inst✝⁸ : StarModule R A
inst✝⁷ : Semiring B
inst✝⁶ : StarRing B
inst✝⁵ : Algebra R B
inst✝⁴ : StarModule R B
inst✝³ : Semiring C
inst✝² : StarRing C
inst✝¹ : Algebra R C
inst✝ : StarModule R C
S : StarSubalgebra R A
x✝ y✝ : ↥S
⊢ OneHom.toFun { toFun := Subtype.val, map_one' := (_ : ↑1 = ↑1) } (x✝ * y✝) =
    OneHom.toFun { toFun := Subtype.val, map_one' := (_ : ↑1 = ↑1) } x✝ *
      OneHom.toFun { toFun := Subtype.val, map_one' := (_ : ↑1 = ↑1) } y✝

Next tactic:
rfl
/-- Embedding of a subalgebra into the algebra. -/
def subtype : S →⋆ₐ[R] A := by refine' { toFun := ((↑) : S → A), .. } <;> intros <;> 

Proof state:
case refine'_3
F : Type u_1
R : Type u_2
A : Type u_3
B : Type u_4
C : Type u_5
inst✝¹³ : CommSemiring R
inst✝¹² : StarRing R
inst✝¹¹ : Semiring A
inst✝¹⁰ : StarRing A
inst✝⁹ : Algebra R A
inst✝⁸ : StarModule R A
inst✝⁷ : Semiring B
inst✝⁶ : StarRing B
inst✝⁵ : Algebra R B
inst✝⁴ : StarModule R B
inst✝³ : Semiring C
inst✝² : StarRing C
inst✝¹ : Algebra R C
inst✝ : StarModule R C
S : StarSubalgebra R A
⊢ OneHom.toFun
      (↑{ toOneHom := { toFun := Subtype.val, map_one' := (_ : ↑1 = ↑1) },
          map_mul' :=
            (_ :
              ∀ (x y : ↥S),
                OneHom.toFun { toFun := Subtype.val, map_one' := (_ : ↑1 = ↑1) } (x * y) =
                  OneHom.toFun { toFun := Subtype.val, map_one' := (_ : ↑1 = ↑1) } (x * y)) })
      0 =
    0

Next tactic:
rfl
/-- Embedding of a subalgebra into the algebra. -/
def subtype : S →⋆ₐ[R] A := by refine' { toFun := ((↑) : S → A), .. } <;> intros <;> 

Proof state:
case refine'_4
F : Type u_1
R : Type u_2
A : Type u_3
B : Type u_4
C : Type u_5
inst✝¹³ : CommSemiring R
inst✝¹² : StarRing R
inst✝¹¹ : Semiring A
inst✝¹⁰ : StarRing A
inst✝⁹ : Algebra R A
inst✝⁸ : StarModule R A
inst✝⁷ : Semiring B
inst✝⁶ : StarRing B
inst✝⁵ : Algebra R B
inst✝⁴ : StarModule R B
inst✝³ : Semiring C
inst✝² : StarRing C
inst✝¹ : Algebra R C
inst✝ : StarModule R C
S : StarSubalgebra R A
x✝ y✝ : ↥S
⊢ OneHom.toFun
      (↑{ toOneHom := { toFun := Subtype.val, map_one' := (_ : ↑1 = ↑1) },
          map_mul' :=
            (_ :
              ∀ (x y : ↥S),
                OneHom.toFun { toFun := Subtype.val, map_one' := (_ : ↑1 = ↑1) } (x * y) =
                  OneHom.toFun { toFun := Subtype.val, map_one' := (_ : ↑1 = ↑1) } (x * y)) })
      (x✝ + y✝) =
    OneHom.toFun
        (↑{ toOneHom := { toFun := Subtype.val, map_one' := (_ : ↑1 = ↑1) },
            map_mul' :=
              (_ :
                ∀ (x y : ↥S),
                  OneHom.toFun { toFun := Subtype.val, map_one' := (_ : ↑1 = ↑1) } (x * y) =
                    OneHom.toFun { toFun := Subtype.val, map_one' := (_ : ↑1 = ↑1) } (x * y)) })
        x✝ +
      OneHom.toFun
        (↑{ toOneHom := { toFun := Subtype.val, map_one' := (_ : ↑1 = ↑1) },
            map_mul' :=
              (_ :
                ∀ (x y : ↥S),
                  OneHom.toFun { toFun := Subtype.val, map_one' := (_ : ↑1 = ↑1) } (x * y) =
                    OneHom.toFun { toFun := Subtype.val, map_one' := (_ : ↑1 = ↑1) } (x * y)) })
        y✝

Next tactic:
rfl
/-- Embedding of a subalgebra into the algebra. -/
def subtype : S →⋆ₐ[R] A := by refine' { toFun := ((↑) : S → A), .. } <;> intros <;> 

Proof state:
case refine'_5
F : Type u_1
R : Type u_2
A : Type u_3
B : Type u_4
C : Type u_5
inst✝¹³ : CommSemiring R
inst✝¹² : StarRing R
inst✝¹¹ : Semiring A
inst✝¹⁰ : StarRing A
inst✝⁹ : Algebra R A
inst✝⁸ : StarModule R A
inst✝⁷ : Semiring B
inst✝⁶ : StarRing B
inst✝⁵ : Algebra R B
inst✝⁴ : StarModule R B
inst✝³ : Semiring C
inst✝² : StarRing C
inst✝¹ : Algebra R C
inst✝ : StarModule R C
S : StarSubalgebra R A
r✝ : R
⊢ OneHom.toFun
      (↑↑{
            toMonoidHom :=
              { toOneHom := { toFun := Subtype.val, map_one' := (_ : ↑1 = ↑1) },
                map_mul' :=
                  (_ :
                    ∀ (x y : ↥S),
                      OneHom.toFun { toFun := Subtype.val, map_one' := (_ : ↑1 = ↑1) } (x * y) =
                        OneHom.toFun { toFun := Subtype.val, map_one' := (_ : ↑1 = ↑1) } (x * y)) },
            map_zero' :=
              (_ :
                OneHom.toFun
                    (↑{ toOneHom := { toFun := Subtype.val, map_one' := (_ : ↑1 = ↑1) },
                        map_mul' :=
                          (_ :
                            ∀ (x y : ↥S),
                              OneHom.toFun { toFun := Subtype.val, map_one' := (_ : ↑1 = ↑1) } (x * y) =
                                OneHom.toFun { toFun := Subtype.val, map_one' := (_ : ↑1 = ↑1) } (x * y)) })
                    0 =
                  OneHom.toFun
                    (↑{ toOneHom := { toFun := Subtype.val, map_one' := (_ : ↑1 = ↑1) },
                        map_mul' :=
                          (_ :
                            ∀ (x y : ↥S),
                              OneHom.toFun { toFun := Subtype.val, map_one' := (_ : ↑1 = ↑1) } (x * y) =
                                OneHom.toFun { toFun := Subtype.val, map_one' := (_ : ↑1 = ↑1) } (x * y)) })
                    0),
            map_add' :=
              (_ :
                ∀ (x y : ↥S),
                  OneHom.toFun
                      (↑{ toOneHom := { toFun := Subtype.val, map_one' := (_ : ↑1 = ↑1) },
                          map_mul' :=
                            (_ :
                              ∀ (x y : ↥S),
                                OneHom.toFun { toFun := Subtype.val, map_one' := (_ : ↑1 = ↑1) } (x * y) =
                                  OneHom.toFun { toFun := Subtype.val, map_one' := (_ : ↑1 = ↑1) } (x * y)) })
                      (x + y) =
                    OneHom.toFun
                      (↑{ toOneHom := { toFun := Subtype.val, map_one' := (_ : ↑1 = ↑1) },
                          map_mul' :=
                            (_ :
                              ∀ (x y : ↥S),
                                OneHom.toFun { toFun := Subtype.val, map_one' := (_ : ↑1 = ↑1) } (x * y) =
                                  OneHom.toFun { toFun := Subtype.val, map_one' := (_ : ↑1 = ↑1) } (x * y)) })
                      (x + y)) })
      ((algebraMap R ↥S) r✝) =
    (algebraMap R A) r✝

Next tactic:
rfl
/-- Transport a star subalgebra via a star algebra homomorphism. -/
def map (f : A →⋆ₐ[R] B) (S : StarSubalgebra R A) : StarSubalgebra R B :=
  { S.toSubalgebra.map f.toAlgHom with
    star_mem' := by
      

Proof state:
F : Type u_1
R : Type u_2
A : Type u_3
B : Type u_4
C : Type u_5
inst✝¹³ : CommSemiring R
inst✝¹² : StarRing R
inst✝¹¹ : Semiring A
inst✝¹⁰ : StarRing A
inst✝⁹ : Algebra R A
inst✝⁸ : StarModule R A
inst✝⁷ : Semiring B
inst✝⁶ : StarRing B
inst✝⁵ : Algebra R B
inst✝⁴ : StarModule R B
inst✝³ : Semiring C
inst✝² : StarRing C
inst✝¹ : Algebra R C
inst✝ : StarModule R C
S✝ : StarSubalgebra R A
f : A →⋆ₐ[R] B
S : StarSubalgebra R A
src✝ : Subalgebra R B := Subalgebra.map f.toAlgHom S.toSubalgebra
⊢ ∀ {a : B},
    a ∈
        { toSubsemiring := src✝.toSubsemiring,
                  algebraMap_mem' :=
                    (_ :
                      ∀ (r : R), (algebraMap R B) r ∈ src✝.carrier) }.toSubsemiring.toSubmonoid.toSubsemigroup.carrier →
      star a ∈
        { toSubsemiring := src✝.toSubsemiring,
                  algebraMap_mem' :=
                    (_ :
                      ∀ (r : R), (algebraMap R B) r ∈ src✝.carrier) }.toSubsemiring.toSubmonoid.toSubsemigroup.carrier

Next tactic:
rintro _ ⟨a, ha, rfl⟩
/-- Transport a star subalgebra via a star algebra homomorphism. -/
def map (f : A →⋆ₐ[R] B) (S : StarSubalgebra R A) : StarSubalgebra R B :=
  { S.toSubalgebra.map f.toAlgHom with
    star_mem' := by
      rintro _ ⟨a, ha, rfl⟩
      

Proof state:
case intro.intro
F : Type u_1
R : Type u_2
A : Type u_3
B : Type u_4
C : Type u_5
inst✝¹³ : CommSemiring R
inst✝¹² : StarRing R
inst✝¹¹ : Semiring A
inst✝¹⁰ : StarRing A
inst✝⁹ : Algebra R A
inst✝⁸ : StarModule R A
inst✝⁷ : Semiring B
inst✝⁶ : StarRing B
inst✝⁵ : Algebra R B
inst✝⁴ : StarModule R B
inst✝³ : Semiring C
inst✝² : StarRing C
inst✝¹ : Algebra R C
inst✝ : StarModule R C
S✝ : StarSubalgebra R A
f : A →⋆ₐ[R] B
S : StarSubalgebra R A
src✝ : Subalgebra R B := Subalgebra.map f.toAlgHom S.toSubalgebra
a : A
ha : a ∈ ↑S.toSubsemiring
⊢ star (↑f.toAlgHom a) ∈
    { toSubsemiring := src✝.toSubsemiring,
              algebraMap_mem' :=
                (_ : ∀ (r : R), (algebraMap R B) r ∈ src✝.carrier) }.toSubsemiring.toSubmonoid.toSubsemigroup.carrier

Next tactic:
exact map_star f a ▸ Set.mem_image_of_mem _ (S.star_mem' ha)
theorem comap_comap (S : StarSubalgebra R C) (g : B →⋆ₐ[R] C) (f : A →⋆ₐ[R] B) :
    (S.comap g).comap f = S.comap (g.comp f) :=
  SetLike.coe_injective <| by 

Proof state:
F : Type u_1
R : Type u_2
A : Type u_3
B : Type u_4
C : Type u_5
inst✝¹³ : CommSemiring R
inst✝¹² : StarRing R
inst✝¹¹ : Semiring A
inst✝¹⁰ : StarRing A
inst✝⁹ : Algebra R A
inst✝⁸ : StarModule R A
inst✝⁷ : Semiring B
inst✝⁶ : StarRing B
inst✝⁵ : Algebra R B
inst✝⁴ : StarModule R B
inst✝³ : Semiring C
inst✝² : StarRing C
inst✝¹ : Algebra R C
inst✝ : StarModule R C
S✝ : StarSubalgebra R A
S : StarSubalgebra R C
g : B →⋆ₐ[R] C
f : A →⋆ₐ[R] B
⊢ ↑(comap f (comap g S)) = ↑(comap (StarAlgHom.comp g f) S)

Next tactic:
exact Set.preimage_preimage
theorem mem_centralizer_iff {s : Set A} {z : A} :
    z ∈ centralizer R s ↔ ∀ g ∈ s, g * z = z * g ∧ star g * z = z * star g := by
  

Proof state:
F : Type u_1
R : Type u_2
A : Type u_3
B : Type u_4
C : Type u_5
inst✝¹³ : CommSemiring R
inst✝¹² : StarRing R
inst✝¹¹ : Semiring A
inst✝¹⁰ : StarRing A
inst✝⁹ : Algebra R A
inst✝⁸ : StarModule R A
inst✝⁷ : Semiring B
inst✝⁶ : StarRing B
inst✝⁵ : Algebra R B
inst✝⁴ : StarModule R B
inst✝³ : Semiring C
inst✝² : StarRing C
inst✝¹ : Algebra R C
inst✝ : StarModule R C
S : StarSubalgebra R A
s : Set A
z : A
⊢ z ∈ centralizer R s ↔ ∀ g ∈ s, g * z = z * g ∧ star g * z = z * star g

Next tactic:
show (∀ g ∈ s ∪ star s, g * z = z * g) ↔ ∀ g ∈ s, g * z = z * g ∧ star g * z = z * star g
theorem mem_centralizer_iff {s : Set A} {z : A} :
    z ∈ centralizer R s ↔ ∀ g ∈ s, g * z = z * g ∧ star g * z = z * star g := by
  show (∀ g ∈ s ∪ star s, g * z = z * g) ↔ ∀ g ∈ s, g * z = z * g ∧ star g * z = z * star g
  

Proof state:
F : Type u_1
R : Type u_2
A : Type u_3
B : Type u_4
C : Type u_5
inst✝¹³ : CommSemiring R
inst✝¹² : StarRing R
inst✝¹¹ : Semiring A
inst✝¹⁰ : StarRing A
inst✝⁹ : Algebra R A
inst✝⁸ : StarModule R A
inst✝⁷ : Semiring B
inst✝⁶ : StarRing B
inst✝⁵ : Algebra R B
inst✝⁴ : StarModule R B
inst✝³ : Semiring C
inst✝² : StarRing C
inst✝¹ : Algebra R C
inst✝ : StarModule R C
S : StarSubalgebra R A
s : Set A
z : A
⊢ (∀ g ∈ s ∪ star s, g * z = z * g) ↔ ∀ g ∈ s, g * z = z * g ∧ star g * z = z * star g

Next tactic:
simp only [Set.mem_union, or_imp, forall_and, and_congr_right_iff]
theorem mem_centralizer_iff {s : Set A} {z : A} :
    z ∈ centralizer R s ↔ ∀ g ∈ s, g * z = z * g ∧ star g * z = z * star g := by
  show (∀ g ∈ s ∪ star s, g * z = z * g) ↔ ∀ g ∈ s, g * z = z * g ∧ star g * z = z * star g
  simp only [Set.mem_union, or_imp, forall_and, and_congr_right_iff]
  

Proof state:
F : Type u_1
R : Type u_2
A : Type u_3
B : Type u_4
C : Type u_5
inst✝¹³ : CommSemiring R
inst✝¹² : StarRing R
inst✝¹¹ : Semiring A
inst✝¹⁰ : StarRing A
inst✝⁹ : Algebra R A
inst✝⁸ : StarModule R A
inst✝⁷ : Semiring B
inst✝⁶ : StarRing B
inst✝⁵ : Algebra R B
inst✝⁴ : StarModule R B
inst✝³ : Semiring C
inst✝² : StarRing C
inst✝¹ : Algebra R C
inst✝ : StarModule R C
S : StarSubalgebra R A
s : Set A
z : A
⊢ (∀ x ∈ s, x * z = z * x) → ((∀ x ∈ star s, x * z = z * x) ↔ ∀ x ∈ s, star x * z = z * star x)

Next tactic:
exact fun _ =>
    ⟨fun hz a ha => hz _ (Set.star_mem_star.mpr ha), fun hz a ha => star_star a ▸ hz _ ha⟩
/-- The pointwise `star` of a subalgebra is a subalgebra. -/
instance involutiveStar : InvolutiveStar (Subalgebra R A) where
  star S :=
    { carrier := star S.carrier
      mul_mem' := fun {x y} hx hy => by
        

Proof state:
F : Type u_1
R : Type u_2
A : Type u_3
B : Type u_4
inst✝⁹ : CommSemiring R
inst✝⁸ : StarRing R
inst✝⁷ : Semiring A
inst✝⁶ : Algebra R A
inst✝⁵ : StarRing A
inst✝⁴ : StarModule R A
inst✝³ : Semiring B
inst✝² : Algebra R B
inst✝¹ : StarRing B
inst✝ : StarModule R B
S : Subalgebra R A
x y : A
hx : x ∈ star S.carrier
hy : y ∈ star S.carrier
⊢ x * y ∈ star S.carrier

Next tactic:
simp only [Set.mem_star, Subalgebra.mem_carrier] at *
/-- The pointwise `star` of a subalgebra is a subalgebra. -/
instance involutiveStar : InvolutiveStar (Subalgebra R A) where
  star S :=
    { carrier := star S.carrier
      mul_mem' := fun {x y} hx hy => by
        simp only [Set.mem_star, Subalgebra.mem_carrier] at *
        

Proof state:
F : Type u_1
R : Type u_2
A : Type u_3
B : Type u_4
inst✝⁹ : CommSemiring R
inst✝⁸ : StarRing R
inst✝⁷ : Semiring A
inst✝⁶ : Algebra R A
inst✝⁵ : StarRing A
inst✝⁴ : StarModule R A
inst✝³ : Semiring B
inst✝² : Algebra R B
inst✝¹ : StarRing B
inst✝ : StarModule R B
S : Subalgebra R A
x y : A
hx : star x ∈ S
hy : star y ∈ S
⊢ star (x * y) ∈ S

Next tactic:
exact (star_mul x y).symm ▸ mul_mem hy hx
/-- The pointwise `star` of a subalgebra is a subalgebra. -/
instance involutiveStar : InvolutiveStar (Subalgebra R A) where
  star S :=
    { carrier := star S.carrier
      mul_mem' := fun {x y} hx hy => by
        simp only [Set.mem_star, Subalgebra.mem_carrier] at *
        exact (star_mul x y).symm ▸ mul_mem hy hx
      one_mem' := Set.mem_star.mp ((star_one A).symm ▸ one_mem S : star (1 : A) ∈ S)
      add_mem' := fun {x y} hx hy => by
        

Proof state:
F : Type u_1
R : Type u_2
A : Type u_3
B : Type u_4
inst✝⁹ : CommSemiring R
inst✝⁸ : StarRing R
inst✝⁷ : Semiring A
inst✝⁶ : Algebra R A
inst✝⁵ : StarRing A
inst✝⁴ : StarModule R A
inst✝³ : Semiring B
inst✝² : Algebra R B
inst✝¹ : StarRing B
inst✝ : StarModule R B
S : Subalgebra R A
x y : A
hx :
  x ∈
    {
          toSubsemigroup :=
            { carrier := star S.carrier,
              mul_mem' := (_ : ∀ {x y : A}, x ∈ star S.carrier → y ∈ star S.carrier → x * y ∈ star S.carrier) },
          one_mem' := (_ : star 1 ∈ S.toSubsemigroup.1) }.toSubsemigroup.carrier
hy :
  y ∈
    {
          toSubsemigroup :=
            { carrier := star S.carrier,
              mul_mem' := (_ : ∀ {x y : A}, x ∈ star S.carrier → y ∈ star S.carrier → x * y ∈ star S.carrier) },
          one_mem' := (_ : star 1 ∈ S.toSubsemigroup.1) }.toSubsemigroup.carrier
⊢ x + y ∈
    {
          toSubsemigroup :=
            { carrier := star S.carrier,
              mul_mem' := (_ : ∀ {x y : A}, x ∈ star S.carrier → y ∈ star S.carrier → x * y ∈ star S.carrier) },
          one_mem' := (_ : star 1 ∈ S.toSubsemigroup.1) }.toSubsemigroup.carrier

Next tactic:
simp only [Set.mem_star, Subalgebra.mem_carrier] at *
/-- The pointwise `star` of a subalgebra is a subalgebra. -/
instance involutiveStar : InvolutiveStar (Subalgebra R A) where
  star S :=
    { carrier := star S.carrier
      mul_mem' := fun {x y} hx hy => by
        simp only [Set.mem_star, Subalgebra.mem_carrier] at *
        exact (star_mul x y).symm ▸ mul_mem hy hx
      one_mem' := Set.mem_star.mp ((star_one A).symm ▸ one_mem S : star (1 : A) ∈ S)
      add_mem' := fun {x y} hx hy => by
        simp only [Set.mem_star, Subalgebra.mem_carrier] at *
        

Proof state:
F : Type u_1
R : Type u_2
A : Type u_3
B : Type u_4
inst✝⁹ : CommSemiring R
inst✝⁸ : StarRing R
inst✝⁷ : Semiring A
inst✝⁶ : Algebra R A
inst✝⁵ : StarRing A
inst✝⁴ : StarModule R A
inst✝³ : Semiring B
inst✝² : Algebra R B
inst✝¹ : StarRing B
inst✝ : StarModule R B
S : Subalgebra R A
x y : A
hx : star x ∈ S
hy : star y ∈ S
⊢ star (x + y) ∈ S

Next tactic:
exact (star_add x y).symm ▸ add_mem hx hy