[GOAL]
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
p q : StarSubalgebra R A
h : (fun S => S.carrier) p = (fun S => S.carrier) q
⊢ p = q
[PROOFSTEP]
obtain ⟨⟨⟨⟨⟨_, _⟩, _⟩, _⟩, _⟩, _⟩ := p
[GOAL]
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
[PROOFSTEP]
cases q
[GOAL]
case mk.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
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
toSubalgebra✝ : Subalgebra R A
star_mem'✝ : ∀ {a : A}, a ∈ toSubalgebra✝.carrier → star a ∈ toSubalgebra✝.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) { toSubalgebra := toSubalgebra✝, star_mem' := star_mem'✝ }
⊢ {
      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'✝¹ } =
    { toSubalgebra := toSubalgebra✝, star_mem' := star_mem'✝ }
[PROOFSTEP]
congr
[GOAL]
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 T : StarSubalgebra R A
h : S.toSubalgebra = T.toSubalgebra
x : A
⊢ x ∈ S ↔ x ∈ T
[PROOFSTEP]
rw [← mem_toSubalgebra, ← mem_toSubalgebra, h]
[GOAL]
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
hs : s = ↑S
a : A
ha : a ∈ (Subalgebra.copy S.toSubalgebra s hs).toSubsemiring.toSubmonoid.toSubsemigroup.carrier
⊢ a ∈ S.carrier
[PROOFSTEP]
simpa [hs] using ha
[GOAL]
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
a : A
hs : ↑S = ↑S
ha : a ∈ (Subalgebra.copy S.toSubalgebra (↑S) hs).toSubsemiring.toSubmonoid.toSubsemigroup.carrier
⊢ a ∈ S.carrier
[PROOFSTEP]
simpa [hs] using ha
[GOAL]
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 // x ∈ S } →⋆ₐ[R] A
[PROOFSTEP]
refine' { toFun := ((↑) : S → A), .. }
[GOAL]
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
[PROOFSTEP]
intros
[GOAL]
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 : { x // x ∈ 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
[PROOFSTEP]
intros
[GOAL]
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' := ?refine'_1 },
          map_mul' :=
            (_ :
              ∀ (x y : { x // x ∈ 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) })
      0 =
    0
[PROOFSTEP]
intros
[GOAL]
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 : { x // x ∈ S }),
    OneHom.toFun
        (↑{ toOneHom := { toFun := Subtype.val, map_one' := ?refine'_1 },
            map_mul' :=
              (_ :
                ∀ (x y : { x // x ∈ 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 : { x // x ∈ 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 : { x // x ∈ 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
[PROOFSTEP]
intros
[GOAL]
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 : { x // x ∈ 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 : { x // x ∈ S }),
                    OneHom.toFun
                        (↑{ toOneHom := { toFun := Subtype.val, map_one' := ?refine'_1 },
                            map_mul' :=
                              (_ :
                                ∀ (x y : { x // x ∈ 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 : { x // x ∈ 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 : { x // x ∈ 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 { x // x ∈ S }) r) =
      ↑(algebraMap R A) r
[PROOFSTEP]
intros
[GOAL]
case refine'_6
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 : { x // x ∈ S }),
    OneHom.toFun
        (↑↑↑{
                toRingHom :=
                  {
                    toMonoidHom :=
                      { toOneHom := { toFun := Subtype.val, map_one' := ?refine'_1 },
                        map_mul' :=
                          (_ :
                            ∀ (x y : { x // x ∈ 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 : { x // x ∈ S }),
                          OneHom.toFun
                              (↑{ toOneHom := { toFun := Subtype.val, map_one' := ?refine'_1 },
                                  map_mul' :=
                                    (_ :
                                      ∀ (x y : { x // x ∈ 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 : { x // x ∈ 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 : { x // x ∈ 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) },
                commutes' :=
                  (_ :
                    ∀ (r : R),
                      OneHom.toFun
                          (↑↑{
                                toMonoidHom :=
                                  { toOneHom := { toFun := Subtype.val, map_one' := ?refine'_1 },
                                    map_mul' :=
                                      (_ :
                                        ∀ (x y : { x // x ∈ 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 : { x // x ∈ S }),
                                      OneHom.toFun
                                          (↑{ toOneHom := { toFun := Subtype.val, map_one' := ?refine'_1 },
                                              map_mul' :=
                                                (_ :
                                                  ∀ (x y : { x // x ∈ 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 : { x // x ∈ 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 : { x // x ∈ 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 { x // x ∈ S }) r) =
                        ↑(algebraMap R A) r) })
        (star x) =
      star
        (OneHom.toFun
          (↑↑↑{
                  toRingHom :=
                    {
                      toMonoidHom :=
                        { toOneHom := { toFun := Subtype.val, map_one' := ?refine'_1 },
                          map_mul' :=
                            (_ :
                              ∀ (x y : { x // x ∈ 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 : { x // x ∈ S }),
                            OneHom.toFun
                                (↑{ toOneHom := { toFun := Subtype.val, map_one' := ?refine'_1 },
                                    map_mul' :=
                                      (_ :
                                        ∀ (x y : { x // x ∈ 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 : { x // x ∈ 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 : { x // x ∈ 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) },
                  commutes' :=
                    (_ :
                      ∀ (r : R),
                        OneHom.toFun
                            (↑↑{
                                  toMonoidHom :=
                                    { toOneHom := { toFun := Subtype.val, map_one' := ?refine'_1 },
                                      map_mul' :=
                                        (_ :
                                          ∀ (x y : { x // x ∈ 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 : { x // x ∈ S }),
                                        OneHom.toFun
                                            (↑{ toOneHom := { toFun := Subtype.val, map_one' := ?refine'_1 },
                                                map_mul' :=
                                                  (_ :
                                                    ∀ (x y : { x // x ∈ 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 : { x // x ∈ 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 : { x // x ∈ 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 { x // x ∈ S }) r) =
                          ↑(algebraMap R A) r) })
          x)
[PROOFSTEP]
intros
[GOAL]
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
[PROOFSTEP]
rfl
[GOAL]
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✝ : { x // x ∈ 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✝
[PROOFSTEP]
rfl
[GOAL]
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 : { x // x ∈ 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
[PROOFSTEP]
rfl
[GOAL]
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✝ : { x // x ∈ S }
⊢ OneHom.toFun
      (↑{ toOneHom := { toFun := Subtype.val, map_one' := (_ : ↑1 = ↑1) },
          map_mul' :=
            (_ :
              ∀ (x y : { x // x ∈ 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 : { x // x ∈ 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 : { x // x ∈ S }),
                  OneHom.toFun { toFun := Subtype.val, map_one' := (_ : ↑1 = ↑1) } (x * y) =
                    OneHom.toFun { toFun := Subtype.val, map_one' := (_ : ↑1 = ↑1) } (x * y)) })
        y✝
[PROOFSTEP]
rfl
[GOAL]
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 : { x // x ∈ 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 : { x // x ∈ 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 : { x // x ∈ 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 : { x // x ∈ S }),
                  OneHom.toFun
                      (↑{ toOneHom := { toFun := Subtype.val, map_one' := (_ : ↑1 = ↑1) },
                          map_mul' :=
                            (_ :
                              ∀ (x y : { x // x ∈ 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 : { x // x ∈ 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 { x // x ∈ S }) r✝) =
    ↑(algebraMap R A) r✝
[PROOFSTEP]
rfl
[GOAL]
case refine'_6
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✝ : { x // x ∈ S }
⊢ OneHom.toFun
      (↑↑↑{
              toRingHom :=
                {
                  toMonoidHom :=
                    { toOneHom := { toFun := Subtype.val, map_one' := (_ : ↑1 = ↑1) },
                      map_mul' :=
                        (_ :
                          ∀ (x y : { x // x ∈ 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 : { x // x ∈ 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 : { x // x ∈ 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 : { x // x ∈ S }),
                        OneHom.toFun
                            (↑{ toOneHom := { toFun := Subtype.val, map_one' := (_ : ↑1 = ↑1) },
                                map_mul' :=
                                  (_ :
                                    ∀ (x y : { x // x ∈ 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 : { x // x ∈ 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)) },
              commutes' :=
                (_ :
                  ∀ (r : R),
                    OneHom.toFun
                        (↑↑{
                              toMonoidHom :=
                                { toOneHom := { toFun := Subtype.val, map_one' := (_ : ↑1 = ↑1) },
                                  map_mul' :=
                                    (_ :
                                      ∀ (x y : { x // x ∈ 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 : { x // x ∈ 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 : { x // x ∈ 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 : { x // x ∈ S }),
                                    OneHom.toFun
                                        (↑{ toOneHom := { toFun := Subtype.val, map_one' := (_ : ↑1 = ↑1) },
                                            map_mul' :=
                                              (_ :
                                                ∀ (x y : { x // x ∈ 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 : { x // x ∈ 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 { x // x ∈ S }) r) =
                      OneHom.toFun
                        (↑↑{
                              toMonoidHom :=
                                { toOneHom := { toFun := Subtype.val, map_one' := (_ : ↑1 = ↑1) },
                                  map_mul' :=
                                    (_ :
                                      ∀ (x y : { x // x ∈ 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 : { x // x ∈ 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 : { x // x ∈ 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 : { x // x ∈ S }),
                                    OneHom.toFun
                                        (↑{ toOneHom := { toFun := Subtype.val, map_one' := (_ : ↑1 = ↑1) },
                                            map_mul' :=
                                              (_ :
                                                ∀ (x y : { x // x ∈ 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 : { x // x ∈ 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 { x // x ∈ S }) r)) })
      (star x✝) =
    star
      (OneHom.toFun
        (↑↑↑{
                toRingHom :=
                  {
                    toMonoidHom :=
                      { toOneHom := { toFun := Subtype.val, map_one' := (_ : ↑1 = ↑1) },
                        map_mul' :=
                          (_ :
                            ∀ (x y : { x // x ∈ 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 : { x // x ∈ 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 : { x // x ∈ 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 : { x // x ∈ S }),
                          OneHom.toFun
                              (↑{ toOneHom := { toFun := Subtype.val, map_one' := (_ : ↑1 = ↑1) },
                                  map_mul' :=
                                    (_ :
                                      ∀ (x y : { x // x ∈ 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 : { x // x ∈ 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)) },
                commutes' :=
                  (_ :
                    ∀ (r : R),
                      OneHom.toFun
                          (↑↑{
                                toMonoidHom :=
                                  { toOneHom := { toFun := Subtype.val, map_one' := (_ : ↑1 = ↑1) },
                                    map_mul' :=
                                      (_ :
                                        ∀ (x y : { x // x ∈ 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 : { x // x ∈ 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 : { x // x ∈ 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 : { x // x ∈ S }),
                                      OneHom.toFun
                                          (↑{ toOneHom := { toFun := Subtype.val, map_one' := (_ : ↑1 = ↑1) },
                                              map_mul' :=
                                                (_ :
                                                  ∀ (x y : { x // x ∈ 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 : { x // x ∈ 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 { x // x ∈ S }) r) =
                        OneHom.toFun
                          (↑↑{
                                toMonoidHom :=
                                  { toOneHom := { toFun := Subtype.val, map_one' := (_ : ↑1 = ↑1) },
                                    map_mul' :=
                                      (_ :
                                        ∀ (x y : { x // x ∈ 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 : { x // x ∈ 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 : { x // x ∈ 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 : { x // x ∈ S }),
                                      OneHom.toFun
                                          (↑{ toOneHom := { toFun := Subtype.val, map_one' := (_ : ↑1 = ↑1) },
                                              map_mul' :=
                                                (_ :
                                                  ∀ (x y : { x // x ∈ 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 : { x // x ∈ 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 { x // x ∈ S }) r)) })
        x✝)
[PROOFSTEP]
rfl
[GOAL]
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
[PROOFSTEP]
rintro _ ⟨a, ha, rfl⟩
[GOAL]
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
[PROOFSTEP]
exact map_star f a ▸ Set.mem_image_of_mem _ (S.star_mem' ha)
[GOAL]
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)
[PROOFSTEP]
exact Set.preimage_preimage
[GOAL]
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 : A), g ∈ s → g * z = z * g ∧ star g * z = z * star g
[PROOFSTEP]
show (∀ g ∈ s ∪ star s, g * z = z * g) ↔ ∀ g ∈ s, g * z = z * g ∧ star g * z = z * star g
[GOAL]
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 : A), g ∈ s ∪ star s → g * z = z * g) ↔ ∀ (g : A), g ∈ s → g * z = z * g ∧ star g * z = z * star g
[PROOFSTEP]
simp only [Set.mem_union, or_imp, forall_and, and_congr_right_iff]
[GOAL]
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 : A), x ∈ s → x * z = z * x) →
    ((∀ (x : A), x ∈ star s → x * z = z * x) ↔ ∀ (x : A), x ∈ s → star x * z = z * star x)
[PROOFSTEP]
exact fun _ => ⟨fun hz a ha => hz _ (Set.star_mem_star.mpr ha), fun hz a ha => star_star a ▸ hz _ ha⟩
[GOAL]
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
[PROOFSTEP]
simp only [Set.mem_star, Subalgebra.mem_carrier] at *
[GOAL]
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
[PROOFSTEP]
exact (star_mul x y).symm ▸ mul_mem hy hx
[GOAL]
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
[PROOFSTEP]
simp only [Set.mem_star, Subalgebra.mem_carrier] at *
[GOAL]
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
[PROOFSTEP]
exact (star_add x y).symm ▸ add_mem hx hy
[GOAL]
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
r : R
⊢ ↑(algebraMap R A) r ∈
    {
            toSubmonoid :=
              {
                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) },
            add_mem' :=
              (_ :
                ∀ {x y : A},
                  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 →
                    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),
            zero_mem' := (_ : star 0 ∈ S.toSubsemigroup.1) }.toSubmonoid.toSubsemigroup.carrier
[PROOFSTEP]
simpa only [Set.mem_star, Subalgebra.mem_carrier, ← algebraMap_star_comm] using S.algebraMap_mem (star r)
[GOAL]
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 : A
⊢ star x ∈ star S ↔ x ∈ S
[PROOFSTEP]
simp only [mem_star_iff, star_star]
[GOAL]
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 : Set A
this : ∀ (t : Set A), Algebra.adjoin R (star t) ≤ star (Algebra.adjoin R t)
⊢ star (Algebra.adjoin R s) ≤ Algebra.adjoin R (star s)
[PROOFSTEP]
simpa only [star_star] using Subalgebra.star_mono (this (star s))
[GOAL]
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
a : A
ha : a ∈ (S ⊔ star S).carrier
⊢ star a ∈ (S ⊔ star S).carrier
[PROOFSTEP]
simp only [Subalgebra.mem_carrier, ← (@Algebra.gi R A _ _ _).l_sup_u _ _] at *
[GOAL]
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
a : A
ha : a ∈ Algebra.adjoin R (↑S ⊔ ↑(star S))
⊢ star a ∈ Algebra.adjoin R (↑S ⊔ ↑(star S))
[PROOFSTEP]
rw [← mem_star_iff _ a, star_adjoin_comm, sup_comm]
[GOAL]
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
a : A
ha : a ∈ Algebra.adjoin R (↑S ⊔ ↑(star S))
⊢ a ∈ Algebra.adjoin R (star (↑(star S) ⊔ ↑S))
[PROOFSTEP]
simpa using ha
[GOAL]
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 : Set A
src✝ : Subalgebra R A := Algebra.adjoin R (s ∪ star s)
a✝ : A
hx :
  a✝ ∈
    { toSubsemiring := src✝.toSubsemiring,
              algebraMap_mem' :=
                (_ : ∀ (r : R), ↑(algebraMap R A) r ∈ src✝.carrier) }.toSubsemiring.toSubmonoid.toSubsemigroup.carrier
⊢ star a✝ ∈
    { toSubsemiring := src✝.toSubsemiring,
              algebraMap_mem' :=
                (_ : ∀ (r : R), ↑(algebraMap R A) r ∈ src✝.carrier) }.toSubsemiring.toSubmonoid.toSubsemigroup.carrier
[PROOFSTEP]
rwa [Subalgebra.mem_carrier, ← Subalgebra.mem_star_iff, Subalgebra.star_adjoin_comm, Set.union_star, star_star,
  Set.union_comm]
[GOAL]
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
⊢ GaloisConnection (adjoin R) SetLike.coe
[PROOFSTEP]
intro s S
[GOAL]
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 : Set A
S : StarSubalgebra R A
⊢ adjoin R s ≤ S ↔ s ≤ ↑S
[PROOFSTEP]
rw [← toSubalgebra_le_iff, adjoin_toSubalgebra, Algebra.adjoin_le_iff, coe_toSubalgebra]
[GOAL]
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 : Set A
S : StarSubalgebra R A
⊢ s ∪ star s ⊆ ↑S ↔ s ≤ ↑S
[PROOFSTEP]
exact
  ⟨fun h => (Set.subset_union_left s _).trans h, fun h =>
    Set.union_subset h fun x hx => star_star x ▸ star_mem (show star x ∈ S from h hx)⟩
[GOAL]
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 : Set A
p : A → A → Prop
a b : A
ha : a ∈ adjoin R s
hb : b ∈ adjoin R s
Hs : ∀ (x : A), x ∈ s → ∀ (y : A), y ∈ s → p x y
Halg : ∀ (r₁ r₂ : R), p (↑(algebraMap R A) r₁) (↑(algebraMap R A) r₂)
Halg_left : ∀ (r : R) (x : A), x ∈ s → p (↑(algebraMap R A) r) x
Halg_right : ∀ (r : R) (x : A), x ∈ s → p x (↑(algebraMap R A) r)
Hadd_left : ∀ (x₁ x₂ y : A), p x₁ y → p x₂ y → p (x₁ + x₂) y
Hadd_right : ∀ (x y₁ y₂ : A), p x y₁ → p x y₂ → p x (y₁ + y₂)
Hmul_left : ∀ (x₁ x₂ y : A), p x₁ y → p x₂ y → p (x₁ * x₂) y
Hmul_right : ∀ (x y₁ y₂ : A), p x y₁ → p x y₂ → p x (y₁ * y₂)
Hstar : ∀ (x y : A), p x y → p (star x) (star y)
Hstar_left : ∀ (x y : A), p x y → p (star x) y
Hstar_right : ∀ (x y : A), p x y → p x (star y)
⊢ p a b
[PROOFSTEP]
refine'
  Algebra.adjoin_induction₂ ha hb (fun x hx y hy => _) Halg (fun r x hx => _) (fun r x hx => _) Hadd_left Hadd_right
    Hmul_left Hmul_right
[GOAL]
case refine'_1
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 : Set A
p : A → A → Prop
a b : A
ha : a ∈ adjoin R s
hb : b ∈ adjoin R s
Hs : ∀ (x : A), x ∈ s → ∀ (y : A), y ∈ s → p x y
Halg : ∀ (r₁ r₂ : R), p (↑(algebraMap R A) r₁) (↑(algebraMap R A) r₂)
Halg_left : ∀ (r : R) (x : A), x ∈ s → p (↑(algebraMap R A) r) x
Halg_right : ∀ (r : R) (x : A), x ∈ s → p x (↑(algebraMap R A) r)
Hadd_left : ∀ (x₁ x₂ y : A), p x₁ y → p x₂ y → p (x₁ + x₂) y
Hadd_right : ∀ (x y₁ y₂ : A), p x y₁ → p x y₂ → p x (y₁ + y₂)
Hmul_left : ∀ (x₁ x₂ y : A), p x₁ y → p x₂ y → p (x₁ * x₂) y
Hmul_right : ∀ (x y₁ y₂ : A), p x y₁ → p x y₂ → p x (y₁ * y₂)
Hstar : ∀ (x y : A), p x y → p (star x) (star y)
Hstar_left : ∀ (x y : A), p x y → p (star x) y
Hstar_right : ∀ (x y : A), p x y → p x (star y)
x : A
hx : x ∈ s ∪ star s
y : A
hy : y ∈ s ∪ star s
⊢ p x y
[PROOFSTEP]
cases' hx with hx hx
[GOAL]
case refine'_1.inl
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 : Set A
p : A → A → Prop
a b : A
ha : a ∈ adjoin R s
hb : b ∈ adjoin R s
Hs : ∀ (x : A), x ∈ s → ∀ (y : A), y ∈ s → p x y
Halg : ∀ (r₁ r₂ : R), p (↑(algebraMap R A) r₁) (↑(algebraMap R A) r₂)
Halg_left : ∀ (r : R) (x : A), x ∈ s → p (↑(algebraMap R A) r) x
Halg_right : ∀ (r : R) (x : A), x ∈ s → p x (↑(algebraMap R A) r)
Hadd_left : ∀ (x₁ x₂ y : A), p x₁ y → p x₂ y → p (x₁ + x₂) y
Hadd_right : ∀ (x y₁ y₂ : A), p x y₁ → p x y₂ → p x (y₁ + y₂)
Hmul_left : ∀ (x₁ x₂ y : A), p x₁ y → p x₂ y → p (x₁ * x₂) y
Hmul_right : ∀ (x y₁ y₂ : A), p x y₁ → p x y₂ → p x (y₁ * y₂)
Hstar : ∀ (x y : A), p x y → p (star x) (star y)
Hstar_left : ∀ (x y : A), p x y → p (star x) y
Hstar_right : ∀ (x y : A), p x y → p x (star y)
x y : A
hy : y ∈ s ∪ star s
hx : x ∈ s
⊢ p x y
[PROOFSTEP]
cases' hy with hy hy
[GOAL]
case refine'_1.inr
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 : Set A
p : A → A → Prop
a b : A
ha : a ∈ adjoin R s
hb : b ∈ adjoin R s
Hs : ∀ (x : A), x ∈ s → ∀ (y : A), y ∈ s → p x y
Halg : ∀ (r₁ r₂ : R), p (↑(algebraMap R A) r₁) (↑(algebraMap R A) r₂)
Halg_left : ∀ (r : R) (x : A), x ∈ s → p (↑(algebraMap R A) r) x
Halg_right : ∀ (r : R) (x : A), x ∈ s → p x (↑(algebraMap R A) r)
Hadd_left : ∀ (x₁ x₂ y : A), p x₁ y → p x₂ y → p (x₁ + x₂) y
Hadd_right : ∀ (x y₁ y₂ : A), p x y₁ → p x y₂ → p x (y₁ + y₂)
Hmul_left : ∀ (x₁ x₂ y : A), p x₁ y → p x₂ y → p (x₁ * x₂) y
Hmul_right : ∀ (x y₁ y₂ : A), p x y₁ → p x y₂ → p x (y₁ * y₂)
Hstar : ∀ (x y : A), p x y → p (star x) (star y)
Hstar_left : ∀ (x y : A), p x y → p (star x) y
Hstar_right : ∀ (x y : A), p x y → p x (star y)
x y : A
hy : y ∈ s ∪ star s
hx : x ∈ star s
⊢ p x y
[PROOFSTEP]
cases' hy with hy hy
[GOAL]
case refine'_1.inl.inl
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 : Set A
p : A → A → Prop
a b : A
ha : a ∈ adjoin R s
hb : b ∈ adjoin R s
Hs : ∀ (x : A), x ∈ s → ∀ (y : A), y ∈ s → p x y
Halg : ∀ (r₁ r₂ : R), p (↑(algebraMap R A) r₁) (↑(algebraMap R A) r₂)
Halg_left : ∀ (r : R) (x : A), x ∈ s → p (↑(algebraMap R A) r) x
Halg_right : ∀ (r : R) (x : A), x ∈ s → p x (↑(algebraMap R A) r)
Hadd_left : ∀ (x₁ x₂ y : A), p x₁ y → p x₂ y → p (x₁ + x₂) y
Hadd_right : ∀ (x y₁ y₂ : A), p x y₁ → p x y₂ → p x (y₁ + y₂)
Hmul_left : ∀ (x₁ x₂ y : A), p x₁ y → p x₂ y → p (x₁ * x₂) y
Hmul_right : ∀ (x y₁ y₂ : A), p x y₁ → p x y₂ → p x (y₁ * y₂)
Hstar : ∀ (x y : A), p x y → p (star x) (star y)
Hstar_left : ∀ (x y : A), p x y → p (star x) y
Hstar_right : ∀ (x y : A), p x y → p x (star y)
x y : A
hx : x ∈ s
hy : y ∈ s
⊢ p x y
[PROOFSTEP]
exact Hs x hx y hy
[GOAL]
case refine'_1.inl.inr
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 : Set A
p : A → A → Prop
a b : A
ha : a ∈ adjoin R s
hb : b ∈ adjoin R s
Hs : ∀ (x : A), x ∈ s → ∀ (y : A), y ∈ s → p x y
Halg : ∀ (r₁ r₂ : R), p (↑(algebraMap R A) r₁) (↑(algebraMap R A) r₂)
Halg_left : ∀ (r : R) (x : A), x ∈ s → p (↑(algebraMap R A) r) x
Halg_right : ∀ (r : R) (x : A), x ∈ s → p x (↑(algebraMap R A) r)
Hadd_left : ∀ (x₁ x₂ y : A), p x₁ y → p x₂ y → p (x₁ + x₂) y
Hadd_right : ∀ (x y₁ y₂ : A), p x y₁ → p x y₂ → p x (y₁ + y₂)
Hmul_left : ∀ (x₁ x₂ y : A), p x₁ y → p x₂ y → p (x₁ * x₂) y
Hmul_right : ∀ (x y₁ y₂ : A), p x y₁ → p x y₂ → p x (y₁ * y₂)
Hstar : ∀ (x y : A), p x y → p (star x) (star y)
Hstar_left : ∀ (x y : A), p x y → p (star x) y
Hstar_right : ∀ (x y : A), p x y → p x (star y)
x y : A
hx : x ∈ s
hy : y ∈ star s
⊢ p x y
[PROOFSTEP]
exact star_star y ▸ Hstar_right _ _ (Hs _ hx _ hy)
[GOAL]
case refine'_1.inr.inl
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 : Set A
p : A → A → Prop
a b : A
ha : a ∈ adjoin R s
hb : b ∈ adjoin R s
Hs : ∀ (x : A), x ∈ s → ∀ (y : A), y ∈ s → p x y
Halg : ∀ (r₁ r₂ : R), p (↑(algebraMap R A) r₁) (↑(algebraMap R A) r₂)
Halg_left : ∀ (r : R) (x : A), x ∈ s → p (↑(algebraMap R A) r) x
Halg_right : ∀ (r : R) (x : A), x ∈ s → p x (↑(algebraMap R A) r)
Hadd_left : ∀ (x₁ x₂ y : A), p x₁ y → p x₂ y → p (x₁ + x₂) y
Hadd_right : ∀ (x y₁ y₂ : A), p x y₁ → p x y₂ → p x (y₁ + y₂)
Hmul_left : ∀ (x₁ x₂ y : A), p x₁ y → p x₂ y → p (x₁ * x₂) y
Hmul_right : ∀ (x y₁ y₂ : A), p x y₁ → p x y₂ → p x (y₁ * y₂)
Hstar : ∀ (x y : A), p x y → p (star x) (star y)
Hstar_left : ∀ (x y : A), p x y → p (star x) y
Hstar_right : ∀ (x y : A), p x y → p x (star y)
x y : A
hx : x ∈ star s
hy : y ∈ s
⊢ p x y
[PROOFSTEP]
exact star_star x ▸ Hstar_left _ _ (Hs _ hx _ hy)
[GOAL]
case refine'_1.inr.inr
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 : Set A
p : A → A → Prop
a b : A
ha : a ∈ adjoin R s
hb : b ∈ adjoin R s
Hs : ∀ (x : A), x ∈ s → ∀ (y : A), y ∈ s → p x y
Halg : ∀ (r₁ r₂ : R), p (↑(algebraMap R A) r₁) (↑(algebraMap R A) r₂)
Halg_left : ∀ (r : R) (x : A), x ∈ s → p (↑(algebraMap R A) r) x
Halg_right : ∀ (r : R) (x : A), x ∈ s → p x (↑(algebraMap R A) r)
Hadd_left : ∀ (x₁ x₂ y : A), p x₁ y → p x₂ y → p (x₁ + x₂) y
Hadd_right : ∀ (x y₁ y₂ : A), p x y₁ → p x y₂ → p x (y₁ + y₂)
Hmul_left : ∀ (x₁ x₂ y : A), p x₁ y → p x₂ y → p (x₁ * x₂) y
Hmul_right : ∀ (x y₁ y₂ : A), p x y₁ → p x y₂ → p x (y₁ * y₂)
Hstar : ∀ (x y : A), p x y → p (star x) (star y)
Hstar_left : ∀ (x y : A), p x y → p (star x) y
Hstar_right : ∀ (x y : A), p x y → p x (star y)
x y : A
hx : x ∈ star s
hy : y ∈ star s
⊢ p x y
[PROOFSTEP]
exact star_star x ▸ star_star y ▸ Hstar _ _ (Hs _ hx _ hy)
[GOAL]
case refine'_2
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 : Set A
p : A → A → Prop
a b : A
ha : a ∈ adjoin R s
hb : b ∈ adjoin R s
Hs : ∀ (x : A), x ∈ s → ∀ (y : A), y ∈ s → p x y
Halg : ∀ (r₁ r₂ : R), p (↑(algebraMap R A) r₁) (↑(algebraMap R A) r₂)
Halg_left : ∀ (r : R) (x : A), x ∈ s → p (↑(algebraMap R A) r) x
Halg_right : ∀ (r : R) (x : A), x ∈ s → p x (↑(algebraMap R A) r)
Hadd_left : ∀ (x₁ x₂ y : A), p x₁ y → p x₂ y → p (x₁ + x₂) y
Hadd_right : ∀ (x y₁ y₂ : A), p x y₁ → p x y₂ → p x (y₁ + y₂)
Hmul_left : ∀ (x₁ x₂ y : A), p x₁ y → p x₂ y → p (x₁ * x₂) y
Hmul_right : ∀ (x y₁ y₂ : A), p x y₁ → p x y₂ → p x (y₁ * y₂)
Hstar : ∀ (x y : A), p x y → p (star x) (star y)
Hstar_left : ∀ (x y : A), p x y → p (star x) y
Hstar_right : ∀ (x y : A), p x y → p x (star y)
r : R
x : A
hx : x ∈ s ∪ star s
⊢ p (↑(algebraMap R A) r) x
[PROOFSTEP]
cases' hx with hx hx
[GOAL]
case refine'_2.inl
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 : Set A
p : A → A → Prop
a b : A
ha : a ∈ adjoin R s
hb : b ∈ adjoin R s
Hs : ∀ (x : A), x ∈ s → ∀ (y : A), y ∈ s → p x y
Halg : ∀ (r₁ r₂ : R), p (↑(algebraMap R A) r₁) (↑(algebraMap R A) r₂)
Halg_left : ∀ (r : R) (x : A), x ∈ s → p (↑(algebraMap R A) r) x
Halg_right : ∀ (r : R) (x : A), x ∈ s → p x (↑(algebraMap R A) r)
Hadd_left : ∀ (x₁ x₂ y : A), p x₁ y → p x₂ y → p (x₁ + x₂) y
Hadd_right : ∀ (x y₁ y₂ : A), p x y₁ → p x y₂ → p x (y₁ + y₂)
Hmul_left : ∀ (x₁ x₂ y : A), p x₁ y → p x₂ y → p (x₁ * x₂) y
Hmul_right : ∀ (x y₁ y₂ : A), p x y₁ → p x y₂ → p x (y₁ * y₂)
Hstar : ∀ (x y : A), p x y → p (star x) (star y)
Hstar_left : ∀ (x y : A), p x y → p (star x) y
Hstar_right : ∀ (x y : A), p x y → p x (star y)
r : R
x : A
hx : x ∈ s
⊢ p (↑(algebraMap R A) r) x
[PROOFSTEP]
exact Halg_left _ _ hx
[GOAL]
case refine'_2.inr
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 : Set A
p : A → A → Prop
a b : A
ha : a ∈ adjoin R s
hb : b ∈ adjoin R s
Hs : ∀ (x : A), x ∈ s → ∀ (y : A), y ∈ s → p x y
Halg : ∀ (r₁ r₂ : R), p (↑(algebraMap R A) r₁) (↑(algebraMap R A) r₂)
Halg_left : ∀ (r : R) (x : A), x ∈ s → p (↑(algebraMap R A) r) x
Halg_right : ∀ (r : R) (x : A), x ∈ s → p x (↑(algebraMap R A) r)
Hadd_left : ∀ (x₁ x₂ y : A), p x₁ y → p x₂ y → p (x₁ + x₂) y
Hadd_right : ∀ (x y₁ y₂ : A), p x y₁ → p x y₂ → p x (y₁ + y₂)
Hmul_left : ∀ (x₁ x₂ y : A), p x₁ y → p x₂ y → p (x₁ * x₂) y
Hmul_right : ∀ (x y₁ y₂ : A), p x y₁ → p x y₂ → p x (y₁ * y₂)
Hstar : ∀ (x y : A), p x y → p (star x) (star y)
Hstar_left : ∀ (x y : A), p x y → p (star x) y
Hstar_right : ∀ (x y : A), p x y → p x (star y)
r : R
x : A
hx : x ∈ star s
⊢ p (↑(algebraMap R A) r) x
[PROOFSTEP]
exact star_star x ▸ Hstar_right _ _ (Halg_left r _ hx)
[GOAL]
case refine'_3
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 : Set A
p : A → A → Prop
a b : A
ha : a ∈ adjoin R s
hb : b ∈ adjoin R s
Hs : ∀ (x : A), x ∈ s → ∀ (y : A), y ∈ s → p x y
Halg : ∀ (r₁ r₂ : R), p (↑(algebraMap R A) r₁) (↑(algebraMap R A) r₂)
Halg_left : ∀ (r : R) (x : A), x ∈ s → p (↑(algebraMap R A) r) x
Halg_right : ∀ (r : R) (x : A), x ∈ s → p x (↑(algebraMap R A) r)
Hadd_left : ∀ (x₁ x₂ y : A), p x₁ y → p x₂ y → p (x₁ + x₂) y
Hadd_right : ∀ (x y₁ y₂ : A), p x y₁ → p x y₂ → p x (y₁ + y₂)
Hmul_left : ∀ (x₁ x₂ y : A), p x₁ y → p x₂ y → p (x₁ * x₂) y
Hmul_right : ∀ (x y₁ y₂ : A), p x y₁ → p x y₂ → p x (y₁ * y₂)
Hstar : ∀ (x y : A), p x y → p (star x) (star y)
Hstar_left : ∀ (x y : A), p x y → p (star x) y
Hstar_right : ∀ (x y : A), p x y → p x (star y)
r : R
x : A
hx : x ∈ s ∪ star s
⊢ p x (↑(algebraMap R A) r)
[PROOFSTEP]
cases' hx with hx hx
[GOAL]
case refine'_3.inl
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 : Set A
p : A → A → Prop
a b : A
ha : a ∈ adjoin R s
hb : b ∈ adjoin R s
Hs : ∀ (x : A), x ∈ s → ∀ (y : A), y ∈ s → p x y
Halg : ∀ (r₁ r₂ : R), p (↑(algebraMap R A) r₁) (↑(algebraMap R A) r₂)
Halg_left : ∀ (r : R) (x : A), x ∈ s → p (↑(algebraMap R A) r) x
Halg_right : ∀ (r : R) (x : A), x ∈ s → p x (↑(algebraMap R A) r)
Hadd_left : ∀ (x₁ x₂ y : A), p x₁ y → p x₂ y → p (x₁ + x₂) y
Hadd_right : ∀ (x y₁ y₂ : A), p x y₁ → p x y₂ → p x (y₁ + y₂)
Hmul_left : ∀ (x₁ x₂ y : A), p x₁ y → p x₂ y → p (x₁ * x₂) y
Hmul_right : ∀ (x y₁ y₂ : A), p x y₁ → p x y₂ → p x (y₁ * y₂)
Hstar : ∀ (x y : A), p x y → p (star x) (star y)
Hstar_left : ∀ (x y : A), p x y → p (star x) y
Hstar_right : ∀ (x y : A), p x y → p x (star y)
r : R
x : A
hx : x ∈ s
⊢ p x (↑(algebraMap R A) r)
[PROOFSTEP]
exact Halg_right _ _ hx
[GOAL]
case refine'_3.inr
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 : Set A
p : A → A → Prop
a b : A
ha : a ∈ adjoin R s
hb : b ∈ adjoin R s
Hs : ∀ (x : A), x ∈ s → ∀ (y : A), y ∈ s → p x y
Halg : ∀ (r₁ r₂ : R), p (↑(algebraMap R A) r₁) (↑(algebraMap R A) r₂)
Halg_left : ∀ (r : R) (x : A), x ∈ s → p (↑(algebraMap R A) r) x
Halg_right : ∀ (r : R) (x : A), x ∈ s → p x (↑(algebraMap R A) r)
Hadd_left : ∀ (x₁ x₂ y : A), p x₁ y → p x₂ y → p (x₁ + x₂) y
Hadd_right : ∀ (x y₁ y₂ : A), p x y₁ → p x y₂ → p x (y₁ + y₂)
Hmul_left : ∀ (x₁ x₂ y : A), p x₁ y → p x₂ y → p (x₁ * x₂) y
Hmul_right : ∀ (x y₁ y₂ : A), p x y₁ → p x y₂ → p x (y₁ * y₂)
Hstar : ∀ (x y : A), p x y → p (star x) (star y)
Hstar_left : ∀ (x y : A), p x y → p (star x) y
Hstar_right : ∀ (x y : A), p x y → p x (star y)
r : R
x : A
hx : x ∈ star s
⊢ p x (↑(algebraMap R A) r)
[PROOFSTEP]
exact star_star x ▸ Hstar_left _ _ (Halg_right r _ hx)
[GOAL]
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 : Set A
p : { x // x ∈ adjoin R s } → Prop
a : { x // x ∈ adjoin R s }
Hs : ∀ (x : A) (h : x ∈ s), p { val := x, property := (_ : x ∈ ↑(adjoin R s)) }
Halg : ∀ (r : R), p (↑(algebraMap R { x // x ∈ adjoin R s }) r)
Hadd : ∀ (x y : { x // x ∈ adjoin R s }), p x → p y → p (x + y)
Hmul : ∀ (x y : { x // x ∈ adjoin R s }), p x → p y → p (x * y)
Hstar : ∀ (x : { x // x ∈ adjoin R s }), p x → p (star x)
b : A
hb : b ∈ adjoin R s
⊢ p { val := b, property := hb }
[PROOFSTEP]
refine' Exists.elim _ fun (hb : b ∈ adjoin R s) (hc : p ⟨b, hb⟩) => hc
[GOAL]
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 : Set A
p : { x // x ∈ adjoin R s } → Prop
a : { x // x ∈ adjoin R s }
Hs : ∀ (x : A) (h : x ∈ s), p { val := x, property := (_ : x ∈ ↑(adjoin R s)) }
Halg : ∀ (r : R), p (↑(algebraMap R { x // x ∈ adjoin R s }) r)
Hadd : ∀ (x y : { x // x ∈ adjoin R s }), p x → p y → p (x + y)
Hmul : ∀ (x y : { x // x ∈ adjoin R s }), p x → p y → p (x * y)
Hstar : ∀ (x : { x // x ∈ adjoin R s }), p x → p (star x)
b : A
hb : b ∈ adjoin R s
⊢ ∃ x, p { val := b, property := x }
[PROOFSTEP]
apply adjoin_induction hb
[GOAL]
case Hs
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 : Set A
p : { x // x ∈ adjoin R s } → Prop
a : { x // x ∈ adjoin R s }
Hs : ∀ (x : A) (h : x ∈ s), p { val := x, property := (_ : x ∈ ↑(adjoin R s)) }
Halg : ∀ (r : R), p (↑(algebraMap R { x // x ∈ adjoin R s }) r)
Hadd : ∀ (x y : { x // x ∈ adjoin R s }), p x → p y → p (x + y)
Hmul : ∀ (x y : { x // x ∈ adjoin R s }), p x → p y → p (x * y)
Hstar : ∀ (x : { x // x ∈ adjoin R s }), p x → p (star x)
b : A
hb : b ∈ adjoin R s
⊢ ∀ (x : A), x ∈ s → ∃ x_1, p { val := x, property := x_1 }
case Halg
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 : Set A
p : { x // x ∈ adjoin R s } → Prop
a : { x // x ∈ adjoin R s }
Hs : ∀ (x : A) (h : x ∈ s), p { val := x, property := (_ : x ∈ ↑(adjoin R s)) }
Halg : ∀ (r : R), p (↑(algebraMap R { x // x ∈ adjoin R s }) r)
Hadd : ∀ (x y : { x // x ∈ adjoin R s }), p x → p y → p (x + y)
Hmul : ∀ (x y : { x // x ∈ adjoin R s }), p x → p y → p (x * y)
Hstar : ∀ (x : { x // x ∈ adjoin R s }), p x → p (star x)
b : A
hb : b ∈ adjoin R s
⊢ ∀ (r : R), ∃ x, p { val := ↑(algebraMap R A) r, property := x }
case Hadd
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 : Set A
p : { x // x ∈ adjoin R s } → Prop
a : { x // x ∈ adjoin R s }
Hs : ∀ (x : A) (h : x ∈ s), p { val := x, property := (_ : x ∈ ↑(adjoin R s)) }
Halg : ∀ (r : R), p (↑(algebraMap R { x // x ∈ adjoin R s }) r)
Hadd : ∀ (x y : { x // x ∈ adjoin R s }), p x → p y → p (x + y)
Hmul : ∀ (x y : { x // x ∈ adjoin R s }), p x → p y → p (x * y)
Hstar : ∀ (x : { x // x ∈ adjoin R s }), p x → p (star x)
b : A
hb : b ∈ adjoin R s
⊢ ∀ (x y : A),
    (∃ x_1, p { val := x, property := x_1 }) →
      (∃ x, p { val := y, property := x }) → ∃ x_1, p { val := x + y, property := x_1 }
case Hmul
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 : Set A
p : { x // x ∈ adjoin R s } → Prop
a : { x // x ∈ adjoin R s }
Hs : ∀ (x : A) (h : x ∈ s), p { val := x, property := (_ : x ∈ ↑(adjoin R s)) }
Halg : ∀ (r : R), p (↑(algebraMap R { x // x ∈ adjoin R s }) r)
Hadd : ∀ (x y : { x // x ∈ adjoin R s }), p x → p y → p (x + y)
Hmul : ∀ (x y : { x // x ∈ adjoin R s }), p x → p y → p (x * y)
Hstar : ∀ (x : { x // x ∈ adjoin R s }), p x → p (star x)
b : A
hb : b ∈ adjoin R s
⊢ ∀ (x y : A),
    (∃ x_1, p { val := x, property := x_1 }) →
      (∃ x, p { val := y, property := x }) → ∃ x_1, p { val := x * y, property := x_1 }
case Hstar
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 : Set A
p : { x // x ∈ adjoin R s } → Prop
a : { x // x ∈ adjoin R s }
Hs : ∀ (x : A) (h : x ∈ s), p { val := x, property := (_ : x ∈ ↑(adjoin R s)) }
Halg : ∀ (r : R), p (↑(algebraMap R { x // x ∈ adjoin R s }) r)
Hadd : ∀ (x y : { x // x ∈ adjoin R s }), p x → p y → p (x + y)
Hmul : ∀ (x y : { x // x ∈ adjoin R s }), p x → p y → p (x * y)
Hstar : ∀ (x : { x // x ∈ adjoin R s }), p x → p (star x)
b : A
hb : b ∈ adjoin R s
⊢ ∀ (x : A), (∃ x_1, p { val := x, property := x_1 }) → ∃ x_1, p { val := star x, property := x_1 }
[PROOFSTEP]
exacts [fun x hx => ⟨subset_adjoin R s hx, Hs x hx⟩, fun r => ⟨StarSubalgebra.algebraMap_mem _ r, Halg r⟩,
  fun x y hx hy => Exists.elim hx fun hx' hx => Exists.elim hy fun hy' hy => ⟨add_mem hx' hy', Hadd _ _ hx hy⟩,
  fun x y hx hy => Exists.elim hx fun hx' hx => Exists.elim hy fun hy' hy => ⟨mul_mem hx' hy', Hmul _ _ hx hy⟩,
  fun x hx => Exists.elim hx fun hx' hx => ⟨star_mem hx', Hstar _ hx⟩]
[GOAL]
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 : Set A
hcomm : ∀ (a : A), a ∈ s → ∀ (b : A), b ∈ s → a * b = b * a
hcomm_star : ∀ (a : A), a ∈ s → ∀ (b : A), b ∈ s → a * star b = star b * a
src✝ : Semiring { x // x ∈ (adjoin R s).toSubalgebra } := Subalgebra.toSemiring (adjoin R s).toSubalgebra
⊢ ∀ (a b : { x // x ∈ adjoin R s }), a * b = b * a
[PROOFSTEP]
rintro ⟨x, hx⟩ ⟨y, hy⟩
[GOAL]
case mk.mk
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 : Set A
hcomm : ∀ (a : A), a ∈ s → ∀ (b : A), b ∈ s → a * b = b * a
hcomm_star : ∀ (a : A), a ∈ s → ∀ (b : A), b ∈ s → a * star b = star b * a
src✝ : Semiring { x // x ∈ (adjoin R s).toSubalgebra } := Subalgebra.toSemiring (adjoin R s).toSubalgebra
x : A
hx : x ∈ adjoin R s
y : A
hy : y ∈ adjoin R s
⊢ { val := x, property := hx } * { val := y, property := hy } =
    { val := y, property := hy } * { val := x, property := hx }
[PROOFSTEP]
ext
[GOAL]
case mk.mk.a
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 : Set A
hcomm : ∀ (a : A), a ∈ s → ∀ (b : A), b ∈ s → a * b = b * a
hcomm_star : ∀ (a : A), a ∈ s → ∀ (b : A), b ∈ s → a * star b = star b * a
src✝ : Semiring { x // x ∈ (adjoin R s).toSubalgebra } := Subalgebra.toSemiring (adjoin R s).toSubalgebra
x : A
hx : x ∈ adjoin R s
y : A
hy : y ∈ adjoin R s
⊢ ↑({ val := x, property := hx } * { val := y, property := hy }) =
    ↑({ val := y, property := hy } * { val := x, property := hx })
[PROOFSTEP]
simp only [MulMemClass.mk_mul_mk]
[GOAL]
case mk.mk.a
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 : Set A
hcomm : ∀ (a : A), a ∈ s → ∀ (b : A), b ∈ s → a * b = b * a
hcomm_star : ∀ (a : A), a ∈ s → ∀ (b : A), b ∈ s → a * star b = star b * a
src✝ : Semiring { x // x ∈ (adjoin R s).toSubalgebra } := Subalgebra.toSemiring (adjoin R s).toSubalgebra
x : A
hx : x ∈ adjoin R s
y : A
hy : y ∈ adjoin R s
⊢ x * y = y * x
[PROOFSTEP]
rw [← mem_toSubalgebra, adjoin_toSubalgebra] at hx hy 
[GOAL]
case mk.mk.a
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 : Set A
hcomm : ∀ (a : A), a ∈ s → ∀ (b : A), b ∈ s → a * b = b * a
hcomm_star : ∀ (a : A), a ∈ s → ∀ (b : A), b ∈ s → a * star b = star b * a
src✝ : Semiring { x // x ∈ (adjoin R s).toSubalgebra } := Subalgebra.toSemiring (adjoin R s).toSubalgebra
x : A
hx : x ∈ Algebra.adjoin R (s ∪ star s)
y : A
hy : y ∈ Algebra.adjoin R (s ∪ star s)
⊢ x * y = y * x
[PROOFSTEP]
letI : CommSemiring (Algebra.adjoin R (s ∪ star s)) :=
  Algebra.adjoinCommSemiringOfComm R
    (by
      intro a ha b hb
      cases' ha with ha ha <;> cases' hb with hb hb
      · exact hcomm _ ha _ hb
      · exact star_star b ▸ hcomm_star _ ha _ hb
      · exact star_star a ▸ (hcomm_star _ hb _ ha).symm
      · simpa only [star_mul, star_star] using congr_arg star (hcomm _ hb _ ha))
[GOAL]
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 : Set A
hcomm : ∀ (a : A), a ∈ s → ∀ (b : A), b ∈ s → a * b = b * a
hcomm_star : ∀ (a : A), a ∈ s → ∀ (b : A), b ∈ s → a * star b = star b * a
src✝ : Semiring { x // x ∈ (adjoin R s).toSubalgebra } := Subalgebra.toSemiring (adjoin R s).toSubalgebra
x : A
hx : x ∈ Algebra.adjoin R (s ∪ star s)
y : A
hy : y ∈ Algebra.adjoin R (s ∪ star s)
⊢ ∀ (a : A), a ∈ s ∪ star s → ∀ (b : A), b ∈ s ∪ star s → a * b = b * a
[PROOFSTEP]
intro a ha b hb
[GOAL]
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 : Set A
hcomm : ∀ (a : A), a ∈ s → ∀ (b : A), b ∈ s → a * b = b * a
hcomm_star : ∀ (a : A), a ∈ s → ∀ (b : A), b ∈ s → a * star b = star b * a
src✝ : Semiring { x // x ∈ (adjoin R s).toSubalgebra } := Subalgebra.toSemiring (adjoin R s).toSubalgebra
x : A
hx : x ∈ Algebra.adjoin R (s ∪ star s)
y : A
hy : y ∈ Algebra.adjoin R (s ∪ star s)
a : A
ha : a ∈ s ∪ star s
b : A
hb : b ∈ s ∪ star s
⊢ a * b = b * a
[PROOFSTEP]
cases' ha with ha ha
[GOAL]
case inl
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 : Set A
hcomm : ∀ (a : A), a ∈ s → ∀ (b : A), b ∈ s → a * b = b * a
hcomm_star : ∀ (a : A), a ∈ s → ∀ (b : A), b ∈ s → a * star b = star b * a
src✝ : Semiring { x // x ∈ (adjoin R s).toSubalgebra } := Subalgebra.toSemiring (adjoin R s).toSubalgebra
x : A
hx : x ∈ Algebra.adjoin R (s ∪ star s)
y : A
hy : y ∈ Algebra.adjoin R (s ∪ star s)
a b : A
hb : b ∈ s ∪ star s
ha : a ∈ s
⊢ a * b = b * a
[PROOFSTEP]
cases' hb with hb hb
[GOAL]
case inr
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 : Set A
hcomm : ∀ (a : A), a ∈ s → ∀ (b : A), b ∈ s → a * b = b * a
hcomm_star : ∀ (a : A), a ∈ s → ∀ (b : A), b ∈ s → a * star b = star b * a
src✝ : Semiring { x // x ∈ (adjoin R s).toSubalgebra } := Subalgebra.toSemiring (adjoin R s).toSubalgebra
x : A
hx : x ∈ Algebra.adjoin R (s ∪ star s)
y : A
hy : y ∈ Algebra.adjoin R (s ∪ star s)
a b : A
hb : b ∈ s ∪ star s
ha : a ∈ star s
⊢ a * b = b * a
[PROOFSTEP]
cases' hb with hb hb
[GOAL]
case inl.inl
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 : Set A
hcomm : ∀ (a : A), a ∈ s → ∀ (b : A), b ∈ s → a * b = b * a
hcomm_star : ∀ (a : A), a ∈ s → ∀ (b : A), b ∈ s → a * star b = star b * a
src✝ : Semiring { x // x ∈ (adjoin R s).toSubalgebra } := Subalgebra.toSemiring (adjoin R s).toSubalgebra
x : A
hx : x ∈ Algebra.adjoin R (s ∪ star s)
y : A
hy : y ∈ Algebra.adjoin R (s ∪ star s)
a b : A
ha : a ∈ s
hb : b ∈ s
⊢ a * b = b * a
[PROOFSTEP]
exact hcomm _ ha _ hb
[GOAL]
case inl.inr
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 : Set A
hcomm : ∀ (a : A), a ∈ s → ∀ (b : A), b ∈ s → a * b = b * a
hcomm_star : ∀ (a : A), a ∈ s → ∀ (b : A), b ∈ s → a * star b = star b * a
src✝ : Semiring { x // x ∈ (adjoin R s).toSubalgebra } := Subalgebra.toSemiring (adjoin R s).toSubalgebra
x : A
hx : x ∈ Algebra.adjoin R (s ∪ star s)
y : A
hy : y ∈ Algebra.adjoin R (s ∪ star s)
a b : A
ha : a ∈ s
hb : b ∈ star s
⊢ a * b = b * a
[PROOFSTEP]
exact star_star b ▸ hcomm_star _ ha _ hb
[GOAL]
case inr.inl
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 : Set A
hcomm : ∀ (a : A), a ∈ s → ∀ (b : A), b ∈ s → a * b = b * a
hcomm_star : ∀ (a : A), a ∈ s → ∀ (b : A), b ∈ s → a * star b = star b * a
src✝ : Semiring { x // x ∈ (adjoin R s).toSubalgebra } := Subalgebra.toSemiring (adjoin R s).toSubalgebra
x : A
hx : x ∈ Algebra.adjoin R (s ∪ star s)
y : A
hy : y ∈ Algebra.adjoin R (s ∪ star s)
a b : A
ha : a ∈ star s
hb : b ∈ s
⊢ a * b = b * a
[PROOFSTEP]
exact star_star a ▸ (hcomm_star _ hb _ ha).symm
[GOAL]
case inr.inr
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 : Set A
hcomm : ∀ (a : A), a ∈ s → ∀ (b : A), b ∈ s → a * b = b * a
hcomm_star : ∀ (a : A), a ∈ s → ∀ (b : A), b ∈ s → a * star b = star b * a
src✝ : Semiring { x // x ∈ (adjoin R s).toSubalgebra } := Subalgebra.toSemiring (adjoin R s).toSubalgebra
x : A
hx : x ∈ Algebra.adjoin R (s ∪ star s)
y : A
hy : y ∈ Algebra.adjoin R (s ∪ star s)
a b : A
ha : a ∈ star s
hb : b ∈ star s
⊢ a * b = b * a
[PROOFSTEP]
simpa only [star_mul, star_star] using congr_arg star (hcomm _ hb _ ha)
[GOAL]
case mk.mk.a
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 : Set A
hcomm : ∀ (a : A), a ∈ s → ∀ (b : A), b ∈ s → a * b = b * a
hcomm_star : ∀ (a : A), a ∈ s → ∀ (b : A), b ∈ s → a * star b = star b * a
src✝ : Semiring { x // x ∈ (adjoin R s).toSubalgebra } := Subalgebra.toSemiring (adjoin R s).toSubalgebra
x : A
hx : x ∈ Algebra.adjoin R (s ∪ star s)
y : A
hy : y ∈ Algebra.adjoin R (s ∪ star s)
this : CommSemiring { x // x ∈ Algebra.adjoin R (s ∪ star s) } :=
  Algebra.adjoinCommSemiringOfComm R (_ : ∀ (a : A), a ∈ s ∪ star s → ∀ (b : A), b ∈ s ∪ star s → a * b = b * a)
⊢ x * y = y * x
[PROOFSTEP]
exact congr_arg Subtype.val (mul_comm (⟨x, hx⟩ : Algebra.adjoin R (s ∪ star s)) ⟨y, hy⟩)
[GOAL]
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
x : A
inst✝ : IsStarNormal x
a : A
ha : a ∈ {x}
b : A
hb : b ∈ {x}
⊢ a * b = b * a
[PROOFSTEP]
rw [Set.mem_singleton_iff] at ha hb 
[GOAL]
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
x : A
inst✝ : IsStarNormal x
a : A
ha : a = x
b : A
hb : b = x
⊢ a * b = b * a
[PROOFSTEP]
rw [ha, hb]
[GOAL]
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
x : A
inst✝ : IsStarNormal x
a : A
ha : a ∈ {x}
b : A
hb : b ∈ {x}
⊢ a * star b = star b * a
[PROOFSTEP]
rw [Set.mem_singleton_iff] at ha hb 
[GOAL]
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
x : A
inst✝ : IsStarNormal x
a : A
ha : a = x
b : A
hb : b = x
⊢ a * star b = star b * a
[PROOFSTEP]
simpa only [ha, hb] using (star_comm_self' x).symm
[GOAL]
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
⊢ ⊤.toSubalgebra = ⊤
[PROOFSTEP]
ext
[GOAL]
case h
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
x✝ : A
⊢ x✝ ∈ ⊤.toSubalgebra ↔ x✝ ∈ ⊤
[PROOFSTEP]
simp
  -- porting note: Lean can no longer prove this by `rfl`, it times out
[GOAL]
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 T : StarSubalgebra R A
⊢ (S ⊓ T).toSubalgebra = S.toSubalgebra ⊓ T.toSubalgebra
[PROOFSTEP]
ext
[GOAL]
case h
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 T : StarSubalgebra R A
x✝ : A
⊢ x✝ ∈ (S ⊓ T).toSubalgebra ↔ x✝ ∈ S.toSubalgebra ⊓ T.toSubalgebra
[PROOFSTEP]
simp
  -- porting note: Lean can no longer prove this by `rfl`, it times out
[GOAL]
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 : Set (StarSubalgebra R A)
x : A
⊢ x ∈ sInf S ↔ ∀ (p : StarSubalgebra R A), p ∈ S → x ∈ p
[PROOFSTEP]
simp only [← SetLike.mem_coe, coe_sInf, Set.mem_iInter₂]
[GOAL]
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 : Set (StarSubalgebra R A)
⊢ ↑(sInf S).toSubalgebra = ↑(sInf (toSubalgebra '' S))
[PROOFSTEP]
simp
[GOAL]
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
ι : Sort u_5
S : ι → StarSubalgebra R A
⊢ ↑(⨅ (i : ι), S i) = ⋂ (i : ι), ↑(S i)
[PROOFSTEP]
simp [iInf]
[GOAL]
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
ι : Sort u_5
S : ι → StarSubalgebra R A
x : A
⊢ x ∈ ⨅ (i : ι), S i ↔ ∀ (i : ι), x ∈ S i
[PROOFSTEP]
simp only [iInf, mem_sInf, Set.forall_range_iff]
[GOAL]
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
ι : Sort u_5
S : ι → StarSubalgebra R A
⊢ ↑(⨅ (i : ι), S i).toSubalgebra = ↑(⨅ (i : ι), (S i).toSubalgebra)
[PROOFSTEP]
simp
[GOAL]
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
⊢ ⊥.toSubalgebra = ⊥
[PROOFSTEP]
change Algebra.adjoin R (∅ ∪ star ∅) = Algebra.adjoin R ∅
[GOAL]
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
⊢ Algebra.adjoin R (∅ ∪ star ∅) = Algebra.adjoin R ∅
[PROOFSTEP]
simp
[GOAL]
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
x : A
⊢ x ∈ ⊥ ↔ x ∈ Set.range ↑(algebraMap R A)
[PROOFSTEP]
rw [← mem_toSubalgebra, bot_toSubalgebra, Algebra.mem_bot]
[GOAL]
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
⊢ ↑⊥ = Set.range ↑(algebraMap R A)
[PROOFSTEP]
simp [Set.ext_iff, mem_bot]
[GOAL]
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 : StarSubalgebra R A
h : S = ⊤
x : A
⊢ x ∈ S
[PROOFSTEP]
rw [h]
[GOAL]
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 : StarSubalgebra R A
h : S = ⊤
x : A
⊢ x ∈ ⊤
[PROOFSTEP]
exact mem_top
[GOAL]
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 : StarSubalgebra R A
h : ∀ (x : A), x ∈ S
⊢ S = ⊤
[PROOFSTEP]
ext x
[GOAL]
case h
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 : StarSubalgebra R A
h : ∀ (x : A), x ∈ S
x : A
⊢ x ∈ S ↔ x ∈ ⊤
[PROOFSTEP]
exact ⟨fun _ => mem_top, fun _ => h x⟩
[GOAL]
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
hF : StarAlgHomClass F R A B
f g : F
a : A
ha : ↑f a = ↑g a
⊢ star a ∈ (AlgHom.equalizer ↑f ↑g).toSubsemiring.toSubmonoid.toSubsemigroup.carrier
[PROOFSTEP]
simpa only [← map_star] using congrArg star ha
[GOAL]
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
hF : StarAlgHomClass F R A B
f✝ g✝ : F
s : Set A
inst✝ : StarAlgHomClass F R { x // x ∈ adjoin R s } B
f g : F
h : ∀ (x : { x // x ∈ adjoin R s }), ↑x ∈ s → ↑f x = ↑g x
⊢ f = g
[PROOFSTEP]
refine'
  FunLike.ext f g fun a =>
    adjoin_induction' (p := fun y => f y = g y) a (fun x hx => _) (fun r => _) (fun x y hx hy => _) (fun x y hx hy => _)
      fun x hx => _
[GOAL]
case refine'_1
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
hF : StarAlgHomClass F R A B
f✝ g✝ : F
s : Set A
inst✝ : StarAlgHomClass F R { x // x ∈ adjoin R s } B
f g : F
h : ∀ (x : { x // x ∈ adjoin R s }), ↑x ∈ s → ↑f x = ↑g x
a : { x // x ∈ adjoin R s }
x : A
hx : x ∈ s
⊢ (fun y => ↑f y = ↑g y) { val := x, property := (_ : x ∈ ↑(adjoin R s)) }
[PROOFSTEP]
exact h ⟨x, subset_adjoin R s hx⟩ hx
[GOAL]
case refine'_2
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
hF : StarAlgHomClass F R A B
f✝ g✝ : F
s : Set A
inst✝ : StarAlgHomClass F R { x // x ∈ adjoin R s } B
f g : F
h : ∀ (x : { x // x ∈ adjoin R s }), ↑x ∈ s → ↑f x = ↑g x
a : { x // x ∈ adjoin R s }
r : R
⊢ (fun y => ↑f y = ↑g y) (↑(algebraMap R { x // x ∈ adjoin R s }) r)
[PROOFSTEP]
simp only [AlgHomClass.commutes]
[GOAL]
case refine'_3
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
hF : StarAlgHomClass F R A B
f✝ g✝ : F
s : Set A
inst✝ : StarAlgHomClass F R { x // x ∈ adjoin R s } B
f g : F
h : ∀ (x : { x // x ∈ adjoin R s }), ↑x ∈ s → ↑f x = ↑g x
a x y : { x // x ∈ adjoin R s }
hx : (fun y => ↑f y = ↑g y) x
hy : (fun y => ↑f y = ↑g y) y
⊢ (fun y => ↑f y = ↑g y) (x + y)
[PROOFSTEP]
simp only [map_add, map_add, hx, hy]
[GOAL]
case refine'_4
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
hF : StarAlgHomClass F R A B
f✝ g✝ : F
s : Set A
inst✝ : StarAlgHomClass F R { x // x ∈ adjoin R s } B
f g : F
h : ∀ (x : { x // x ∈ adjoin R s }), ↑x ∈ s → ↑f x = ↑g x
a x y : { x // x ∈ adjoin R s }
hx : (fun y => ↑f y = ↑g y) x
hy : (fun y => ↑f y = ↑g y) y
⊢ (fun y => ↑f y = ↑g y) (x * y)
[PROOFSTEP]
simp only [map_mul, map_mul, hx, hy]
[GOAL]
case refine'_5
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
hF : StarAlgHomClass F R A B
f✝ g✝ : F
s : Set A
inst✝ : StarAlgHomClass F R { x // x ∈ adjoin R s } B
f g : F
h : ∀ (x : { x // x ∈ adjoin R s }), ↑x ∈ s → ↑f x = ↑g x
a x : { x // x ∈ adjoin R s }
hx : (fun y => ↑f y = ↑g y) x
⊢ (fun y => ↑f y = ↑g y) (star x)
[PROOFSTEP]
simp only [map_star, hx]
[GOAL]
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
hF : StarAlgHomClass F R A B
f g : F
φ : A →⋆ₐ[R] B
⊢ ∀ {a : B},
    a ∈ (AlgHom.range φ.toAlgHom).toSubsemiring.toSubmonoid.toSubsemigroup.carrier →
      star a ∈ (AlgHom.range φ.toAlgHom).toSubsemiring.toSubmonoid.toSubsemigroup.carrier
[PROOFSTEP]
rintro _ ⟨b, rfl⟩
[GOAL]
case intro
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
hF : StarAlgHomClass F R A B
f g : F
φ : A →⋆ₐ[R] B
b : A
⊢ star (↑↑φ.toAlgHom b) ∈ (AlgHom.range φ.toAlgHom).toSubsemiring.toSubmonoid.toSubsemigroup.carrier
[PROOFSTEP]
exact ⟨star b, map_star φ b⟩
[GOAL]
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
hF : StarAlgHomClass F R A B
f g : F
φ : A →⋆ₐ[R] B
x : B
⊢ x ∈ StarAlgHom.range φ → x ∈ map φ ⊤
[PROOFSTEP]
rintro ⟨a, ha⟩
[GOAL]
case intro
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
hF : StarAlgHomClass F R A B
f g : F
φ : A →⋆ₐ[R] B
x : B
a : A
ha : ↑↑φ.toAlgHom a = x
⊢ x ∈ map φ ⊤
[PROOFSTEP]
exact ⟨a, by simp, ha⟩
[GOAL]
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
hF : StarAlgHomClass F R A B
f g : F
φ : A →⋆ₐ[R] B
x : B
a : A
ha : ↑↑φ.toAlgHom a = x
⊢ a ∈ ↑⊤.toSubsemiring
[PROOFSTEP]
simp
[GOAL]
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
hF : StarAlgHomClass F R A B
f g : F
φ : A →⋆ₐ[R] B
x : B
⊢ x ∈ map φ ⊤ → x ∈ StarAlgHom.range φ
[PROOFSTEP]
rintro ⟨a, -, ha⟩
[GOAL]
case intro.intro
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
hF : StarAlgHomClass F R A B
f g : F
φ : A →⋆ₐ[R] B
x : B
a : A
ha : ↑↑φ.toAlgHom a = x
⊢ x ∈ StarAlgHom.range φ
[PROOFSTEP]
exact ⟨a, ha⟩
