instance setLike : SetLike (StarSubalgebra R A) A where
  coe S := S.carrier
  coe_injective' p q h := by obtain ⟨⟨⟨⟨⟨_, _⟩, _⟩, _⟩, _⟩, _⟩ := p; 

Proof state:
case mk.mk.mk.mk.mk
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
q : StarSubalgebra R A
carrier✝ : Set A
mul_mem'✝ : ∀ {a b : A}, a ∈ carrier✝ → b ∈ carrier✝ → a * b ∈ carrier✝
one_mem'✝ : 1 ∈ { carrier := carrier✝, mul_mem' := mul_mem'✝ }.carrier
add_mem'✝ :
  ∀ {a b : A},
    a ∈
        { toSubsemigroup := { carrier := carrier✝, mul_mem' := mul_mem'✝ },
              one_mem' := one_mem'✝ }.toSubsemigroup.carrier →
      b ∈
          { toSubsemigroup := { carrier := carrier✝, mul_mem' := mul_mem'✝ },
                one_mem' := one_mem'✝ }.toSubsemigroup.carrier →
        a + b ∈
          { toSubsemigroup := { carrier := carrier✝, mul_mem' := mul_mem'✝ },
                one_mem' := one_mem'✝ }.toSubsemigroup.carrier
zero_mem'✝ :
  0 ∈ { toSubsemigroup := { carrier := carrier✝, mul_mem' := mul_mem'✝ }, one_mem' := one_mem'✝ }.toSubsemigroup.carrier
algebraMap_mem'✝ :
  ∀ (r : R),
    (algebraMap R A) r ∈
      { toSubmonoid := { toSubsemigroup := { carrier := carrier✝, mul_mem' := mul_mem'✝ }, one_mem' := one_mem'✝ },
              add_mem' := add_mem'✝, zero_mem' := zero_mem'✝ }.toSubmonoid.toSubsemigroup.carrier
star_mem'✝ :
  ∀ {a : A},
    a ∈
        {
                  toSubsemiring :=
                    {
                      toSubmonoid :=
                        { toSubsemigroup := { carrier := carrier✝, mul_mem' := mul_mem'✝ }, one_mem' := one_mem'✝ },
                      add_mem' := add_mem'✝, zero_mem' := zero_mem'✝ },
                  algebraMap_mem' := algebraMap_mem'✝ }.toSubsemiring.toSubmonoid.toSubsemigroup.carrier →
      star a ∈
        {
                  toSubsemiring :=
                    {
                      toSubmonoid :=
                        { toSubsemigroup := { carrier := carrier✝, mul_mem' := mul_mem'✝ }, one_mem' := one_mem'✝ },
                      add_mem' := add_mem'✝, zero_mem' := zero_mem'✝ },
                  algebraMap_mem' := algebraMap_mem'✝ }.toSubsemiring.toSubmonoid.toSubsemigroup.carrier
h :
  (fun S => S.carrier)
      {
        toSubalgebra :=
          {
            toSubsemiring :=
              {
                toSubmonoid :=
                  { toSubsemigroup := { carrier := carrier✝, mul_mem' := mul_mem'✝ }, one_mem' := one_mem'✝ },
                add_mem' := add_mem'✝, zero_mem' := zero_mem'✝ },
            algebraMap_mem' := algebraMap_mem'✝ },
        star_mem' := star_mem'✝ } =
    (fun S => S.carrier) q
⊢ {
      toSubalgebra :=
        {
          toSubsemiring :=
            {
              toSubmonoid :=
                { toSubsemigroup := { carrier := carrier✝, mul_mem' := mul_mem'✝ }, one_mem' := one_mem'✝ },
              add_mem' := add_mem'✝, zero_mem' := zero_mem'✝ },
          algebraMap_mem' := algebraMap_mem'✝ },
      star_mem' := star_mem'✝ } =
    q

Next tactic:
cases q