l3lab/ntp-mathlib huggingface dataset:
/-- Given an estimator for a pair, we can extract an estimator for the first factor. -/
-- This isn't an instance as at the sole use case we need to provide
-- the instance arguments by hand anyway.
def Estimator.fstInst [DecidableRel ((· : α) < ·)] [∀ (p : α × β), WellFoundedGT { q // q ≤ p }]
    (a : Thunk α) (b : Thunk β) {ε : Type*} (i : Estimator (a.prod b) ε) :
    Estimator a (Estimator.fst (a.prod b) ε) where
  bound_le e := (Estimator.bound_le e.inner : bound (a.prod b) e.inner ≤ (a.get, b.get)).1
  improve_spec e := by
    let bd := (bound (a.prod b) e.inner).1
    have := Estimator.improveUntil_spec (a.prod b) (fun p => bd < p.1) e.inner
    revert this
    simp only [EstimatorData.improve, decide_eq_true_eq]
    

Proof state:
α : Type ?u.21167
β : Type ?u.21170
inst✝⁴ : PartialOrder α
inst✝³ : PartialOrder β
inst✝² : ∀ (a : α), WellFoundedGT { x // x ≤ a }
inst✝¹ : DecidableRel fun x x_1 => x < x_1
inst✝ : ∀ (p : α × β), WellFoundedGT { q // q ≤ p }
a : Thunk α
b : Thunk β
ε : Type u_1
i : Estimator (Thunk.prod a b) ε
e : fst (Thunk.prod a b) ε
bd : α := (bound (Thunk.prod a b) e.inner).1
⊢ (match improveUntil (Thunk.prod a b) (fun p => decide ((bound (Thunk.prod a b) e.inner).1 < p.1)) e.inner with
    | Except.error a_1 => ¬(bound (Thunk.prod a b) e.inner).1 < (Thunk.get (Thunk.prod a b)).1
    | Except.ok e' => (bound (Thunk.prod a b) e.inner).1 < (bound (Thunk.prod a b) e').1) →
    match
      Option.map fst.mk
        (Except.toOption
          (improveUntil (Thunk.prod a b) (fun p => decide ((bound (Thunk.prod a b) e.inner).1 < p.1)) e.inner)) with
    | none => bound a e = Thunk.get a
    | some e' => bound a e < bound a e'

Next tactic:
match Estimator.improveUntil (a.prod b) _ _ with
    | .error _ =>
      simp only [Option.map_none']
      exact fun w =>
        eq_of_le_of_not_lt
          (Estimator.bound_le e.inner : bound (a.prod b) e.inner ≤ (a.get, b.get)).1 w
    | .ok e' => exact fun w => w
/-- Given an estimator for a pair, we can extract an estimator for the first factor. -/
-- This isn't an instance as at the sole use case we need to provide
-- the instance arguments by hand anyway.
def Estimator.fstInst [DecidableRel ((· : α) < ·)] [∀ (p : α × β), WellFoundedGT { q // q ≤ p }]
    (a : Thunk α) (b : Thunk β) {ε : Type*} (i : Estimator (a.prod b) ε) :
    Estimator a (Estimator.fst (a.prod b) ε) where
  bound_le e := (Estimator.bound_le e.inner : bound (a.prod b) e.inner ≤ (a.get, b.get)).1
  improve_spec e := by
    let bd := (bound (a.prod b) e.inner).1
    have := Estimator.improveUntil_spec (a.prod b) (fun p => bd < p.1) e.inner
    revert this
    simp only [EstimatorData.improve, decide_eq_true_eq]
    match Estimator.improveUntil (a.prod b) _ _ with
    | .error _ =>
      

Proof state:
α : Type ?u.21167
β : Type ?u.21170
inst✝⁴ : PartialOrder α
inst✝³ : PartialOrder β
inst✝² : ∀ (a : α), WellFoundedGT { x // x ≤ a }
inst✝¹ : DecidableRel fun x x_1 => x < x_1
inst✝ : ∀ (p : α × β), WellFoundedGT { q // q ≤ p }
a : Thunk α
b : Thunk β
ε : Type u_1
i : Estimator (Thunk.prod a b) ε
e : fst (Thunk.prod a b) ε
bd : α := (bound (Thunk.prod a b) e.inner).1
a✝ : Option ε
⊢ (match Except.error a✝ with
    | Except.error a_1 => ¬(bound (Thunk.prod a b) e.inner).1 < (Thunk.get (Thunk.prod a b)).1
    | Except.ok e' => (bound (Thunk.prod a b) e.inner).1 < (bound (Thunk.prod a b) e').1) →
    match Option.map fst.mk (Except.toOption (Except.error a✝)) with
    | none => bound a e = Thunk.get a
    | some e' => bound a e < bound a e'

Next tactic:
simp only [Option.map_none']
/-- Given an estimator for a pair, we can extract an estimator for the first factor. -/
-- This isn't an instance as at the sole use case we need to provide
-- the instance arguments by hand anyway.
def Estimator.fstInst [DecidableRel ((· : α) < ·)] [∀ (p : α × β), WellFoundedGT { q // q ≤ p }]
    (a : Thunk α) (b : Thunk β) {ε : Type*} (i : Estimator (a.prod b) ε) :
    Estimator a (Estimator.fst (a.prod b) ε) where
  bound_le e := (Estimator.bound_le e.inner : bound (a.prod b) e.inner ≤ (a.get, b.get)).1
  improve_spec e := by
    let bd := (bound (a.prod b) e.inner).1
    have := Estimator.improveUntil_spec (a.prod b) (fun p => bd < p.1) e.inner
    revert this
    simp only [EstimatorData.improve, decide_eq_true_eq]
    match Estimator.improveUntil (a.prod b) _ _ with
    | .error _ =>
      simp only [Option.map_none']
      

Proof state:
α : Type ?u.21167
β : Type ?u.21170
inst✝⁴ : PartialOrder α
inst✝³ : PartialOrder β
inst✝² : ∀ (a : α), WellFoundedGT { x // x ≤ a }
inst✝¹ : DecidableRel fun x x_1 => x < x_1
inst✝ : ∀ (p : α × β), WellFoundedGT { q // q ≤ p }
a : Thunk α
b : Thunk β
ε : Type u_1
i : Estimator (Thunk.prod a b) ε
e : fst (Thunk.prod a b) ε
bd : α := (bound (Thunk.prod a b) e.inner).1
a✝ : Option ε
⊢ ¬(bound (Thunk.prod a b) e.inner).1 < (Thunk.get (Thunk.prod a b)).1 →
    match Option.map fst.mk (Except.toOption (Except.error a✝)) with
    | none => bound a e = Thunk.get a
    | some e' => bound a e < bound a e'

Next tactic:
exact fun w =>
        eq_of_le_of_not_lt
          (Estimator.bound_le e.inner : bound (a.prod b) e.inner ≤ (a.get, b.get)).1 w
/-- Given an estimator for a pair, we can extract an estimator for the first factor. -/
-- This isn't an instance as at the sole use case we need to provide
-- the instance arguments by hand anyway.
def Estimator.fstInst [DecidableRel ((· : α) < ·)] [∀ (p : α × β), WellFoundedGT { q // q ≤ p }]
    (a : Thunk α) (b : Thunk β) {ε : Type*} (i : Estimator (a.prod b) ε) :
    Estimator a (Estimator.fst (a.prod b) ε) where
  bound_le e := (Estimator.bound_le e.inner : bound (a.prod b) e.inner ≤ (a.get, b.get)).1
  improve_spec e := by
    let bd := (bound (a.prod b) e.inner).1
    have := Estimator.improveUntil_spec (a.prod b) (fun p => bd < p.1) e.inner
    revert this
    simp only [EstimatorData.improve, decide_eq_true_eq]
    match Estimator.improveUntil (a.prod b) _ _ with
    | .error _ =>
      simp only [Option.map_none']
      exact fun w =>
        eq_of_le_of_not_lt
          (Estimator.bound_le e.inner : bound (a.prod b) e.inner ≤ (a.get, b.get)).1 w
    | .ok e' => 

Proof state:
α : Type ?u.21167
β : Type ?u.21170
inst✝⁴ : PartialOrder α
inst✝³ : PartialOrder β
inst✝² : ∀ (a : α), WellFoundedGT { x // x ≤ a }
inst✝¹ : DecidableRel fun x x_1 => x < x_1
inst✝ : ∀ (p : α × β), WellFoundedGT { q // q ≤ p }
a : Thunk α
b : Thunk β
ε : Type u_1
i : Estimator (Thunk.prod a b) ε
e : fst (Thunk.prod a b) ε
bd : α := (bound (Thunk.prod a b) e.inner).1
e' : ε
⊢ (match Except.ok e' with
    | Except.error a_1 => ¬(bound (Thunk.prod a b) e.inner).1 < (Thunk.get (Thunk.prod a b)).1
    | Except.ok e' => (bound (Thunk.prod a b) e.inner).1 < (bound (Thunk.prod a b) e').1) →
    match Option.map fst.mk (Except.toOption (Except.ok e')) with
    | none => bound a e = Thunk.get a
    | some e' => bound a e < bound a e'

Next tactic:
exact fun w => w
/-- The `StarSubalgebra.inclusion` of a closed star subalgebra is a `ClosedEmbedding`. -/
theorem closedEmbedding_inclusion {S₁ S₂ : StarSubalgebra R A} (h : S₁ ≤ S₂)
    (hS₁ : IsClosed (S₁ : Set A)) : ClosedEmbedding (inclusion h) :=
  { embedding_inclusion h with
    closed_range := isClosed_induced_iff.2
      ⟨S₁, hS₁, by
          

Proof state:
R : Type u_1
A : Type u_2
B : Type u_3
inst✝⁶ : CommSemiring R
inst✝⁵ : StarRing R
inst✝⁴ : TopologicalSpace A
inst✝³ : Semiring A
inst✝² : Algebra R A
inst✝¹ : StarRing A
inst✝ : StarModule R A
S₁ S₂ : StarSubalgebra R A
h : S₁ ≤ S₂
hS₁ : IsClosed ↑S₁
src✝ : Embedding ⇑(inclusion h) := embedding_inclusion h
⊢ Subtype.val ⁻¹' ↑S₁ = range ⇑(inclusion h)

Next tactic:
convert (Set.range_subtype_map id _).symm
/-- The `StarSubalgebra.inclusion` of a closed star subalgebra is a `ClosedEmbedding`. -/
theorem closedEmbedding_inclusion {S₁ S₂ : StarSubalgebra R A} (h : S₁ ≤ S₂)
    (hS₁ : IsClosed (S₁ : Set A)) : ClosedEmbedding (inclusion h) :=
  { embedding_inclusion h with
    closed_range := isClosed_induced_iff.2
      ⟨S₁, hS₁, by
          convert (Set.range_subtype_map id _).symm
          · 

Proof state:
case h.e'_2.h.e'_4
R : Type u_1
A : Type u_2
B : Type u_3
inst✝⁶ : CommSemiring R
inst✝⁵ : StarRing R
inst✝⁴ : TopologicalSpace A
inst✝³ : Semiring A
inst✝² : Algebra R A
inst✝¹ : StarRing A
inst✝ : StarModule R A
S₁ S₂ : StarSubalgebra R A
h : S₁ ≤ S₂
hS₁ : IsClosed ↑S₁
src✝ : Embedding ⇑(inclusion h) := embedding_inclusion h
⊢ ↑S₁ = id '' {x | x ∈ S₁}

Next tactic:
rw [Set.image_id]
/-- The `StarSubalgebra.inclusion` of a closed star subalgebra is a `ClosedEmbedding`. -/
theorem closedEmbedding_inclusion {S₁ S₂ : StarSubalgebra R A} (h : S₁ ≤ S₂)
    (hS₁ : IsClosed (S₁ : Set A)) : ClosedEmbedding (inclusion h) :=
  { embedding_inclusion h with
    closed_range := isClosed_induced_iff.2
      ⟨S₁, hS₁, by
          convert (Set.range_subtype_map id _).symm
          · rw [Set.image_id]; 

Proof state:
case h.e'_2.h.e'_4
R : Type u_1
A : Type u_2
B : Type u_3
inst✝⁶ : CommSemiring R
inst✝⁵ : StarRing R
inst✝⁴ : TopologicalSpace A
inst✝³ : Semiring A
inst✝² : Algebra R A
inst✝¹ : StarRing A
inst✝ : StarModule R A
S₁ S₂ : StarSubalgebra R A
h : S₁ ≤ S₂
hS₁ : IsClosed ↑S₁
src✝ : Embedding ⇑(inclusion h) := embedding_inclusion h
⊢ ↑S₁ = {x | x ∈ S₁}

Next tactic:
rfl
/-- The `StarSubalgebra.inclusion` of a closed star subalgebra is a `ClosedEmbedding`. -/
theorem closedEmbedding_inclusion {S₁ S₂ : StarSubalgebra R A} (h : S₁ ≤ S₂)
    (hS₁ : IsClosed (S₁ : Set A)) : ClosedEmbedding (inclusion h) :=
  { embedding_inclusion h with
    closed_range := isClosed_induced_iff.2
      ⟨S₁, hS₁, by
          convert (Set.range_subtype_map id _).symm
          · rw [Set.image_id]; rfl
          · 

Proof state:
case convert_4
R : Type u_1
A : Type u_2
B : Type u_3
inst✝⁶ : CommSemiring R
inst✝⁵ : StarRing R
inst✝⁴ : TopologicalSpace A
inst✝³ : Semiring A
inst✝² : Algebra R A
inst✝¹ : StarRing A
inst✝ : StarModule R A
S₁ S₂ : StarSubalgebra R A
h : S₁ ≤ S₂
hS₁ : IsClosed ↑S₁
src✝ : Embedding ⇑(inclusion h) := embedding_inclusion h
⊢ ∀ x ∈ S₁, id x ∈ S₂

Next tactic:
intro _ h'
/-- The `StarSubalgebra.inclusion` of a closed star subalgebra is a `ClosedEmbedding`. -/
theorem closedEmbedding_inclusion {S₁ S₂ : StarSubalgebra R A} (h : S₁ ≤ S₂)
    (hS₁ : IsClosed (S₁ : Set A)) : ClosedEmbedding (inclusion h) :=
  { embedding_inclusion h with
    closed_range := isClosed_induced_iff.2
      ⟨S₁, hS₁, by
          convert (Set.range_subtype_map id _).symm
          · rw [Set.image_id]; rfl
          · intro _ h'
            

Proof state:
case convert_4
R : Type u_1
A : Type u_2
B : Type u_3
inst✝⁶ : CommSemiring R
inst✝⁵ : StarRing R
inst✝⁴ : TopologicalSpace A
inst✝³ : Semiring A
inst✝² : Algebra R A
inst✝¹ : StarRing A
inst✝ : StarModule R A
S₁ S₂ : StarSubalgebra R A
h : S₁ ≤ S₂
hS₁ : IsClosed ↑S₁
src✝ : Embedding ⇑(inclusion h) := embedding_inclusion h
x✝ : A
h' : x✝ ∈ S₁
⊢ id x✝ ∈ S₂

Next tactic:
apply h h'
theorem _root_.Subalgebra.topologicalClosure_star_comm (s : Subalgebra R A) :
    (star s).topologicalClosure = star s.topologicalClosure := by
  

Proof state:
R : Type u_1
A : Type u_2
B : Type u_3
inst✝¹² : CommSemiring R
inst✝¹¹ : StarRing R
inst✝¹⁰ : TopologicalSpace A
inst✝⁹ : Semiring A
inst✝⁸ : Algebra R A
inst✝⁷ : StarRing A
inst✝⁶ : StarModule R A
inst✝⁵ : TopologicalSemiring A
inst✝⁴ : ContinuousStar A
inst✝³ : TopologicalSpace B
inst✝² : Semiring B
inst✝¹ : Algebra R B
inst✝ : StarRing B
s : Subalgebra R A
⊢ Subalgebra.topologicalClosure (star s) = star (Subalgebra.topologicalClosure s)

Next tactic:
suffices ∀ t : Subalgebra R A, (star t).topologicalClosure ≤ star t.topologicalClosure from
    le_antisymm (this s) (by simpa only [star_star] using Subalgebra.star_mono (this (star s)))
theorem _root_.Subalgebra.topologicalClosure_star_comm (s : Subalgebra R A) :
    (star s).topologicalClosure = star s.topologicalClosure := by
  suffices ∀ t : Subalgebra R A, (star t).topologicalClosure ≤ star t.topologicalClosure from
    le_antisymm (this s) (by 

Proof state:
R : Type u_1
A : Type u_2
B : Type u_3
inst✝¹² : CommSemiring R
inst✝¹¹ : StarRing R
inst✝¹⁰ : TopologicalSpace A
inst✝⁹ : Semiring A
inst✝⁸ : Algebra R A
inst✝⁷ : StarRing A
inst✝⁶ : StarModule R A
inst✝⁵ : TopologicalSemiring A
inst✝⁴ : ContinuousStar A
inst✝³ : TopologicalSpace B
inst✝² : Semiring B
inst✝¹ : Algebra R B
inst✝ : StarRing B
s : Subalgebra R A
this : ∀ (t : Subalgebra R A), Subalgebra.topologicalClosure (star t) ≤ star (Subalgebra.topologicalClosure t)
⊢ star (Subalgebra.topologicalClosure s) ≤ Subalgebra.topologicalClosure (star s)

Next tactic:
simpa only [star_star] using Subalgebra.star_mono (this (star s))
theorem _root_.Subalgebra.topologicalClosure_star_comm (s : Subalgebra R A) :
    (star s).topologicalClosure = star s.topologicalClosure := by
  suffices ∀ t : Subalgebra R A, (star t).topologicalClosure ≤ star t.topologicalClosure from
    le_antisymm (this s) (by simpa only [star_star] using Subalgebra.star_mono (this (star s)))
  

Proof state:
R : Type u_1
A : Type u_2
B : Type u_3
inst✝¹² : CommSemiring R
inst✝¹¹ : StarRing R
inst✝¹⁰ : TopologicalSpace A
inst✝⁹ : Semiring A
inst✝⁸ : Algebra R A
inst✝⁷ : StarRing A
inst✝⁶ : StarModule R A
inst✝⁵ : TopologicalSemiring A
inst✝⁴ : ContinuousStar A
inst✝³ : TopologicalSpace B
inst✝² : Semiring B
inst✝¹ : Algebra R B
inst✝ : StarRing B
s : Subalgebra R A
⊢ ∀ (t : Subalgebra R A), Subalgebra.topologicalClosure (star t) ≤ star (Subalgebra.topologicalClosure t)

Next tactic:
exact fun t => (star t).topologicalClosure_minimal (Subalgebra.star_mono subset_closure)
    (isClosed_closure.preimage continuous_star)
/-- Continuous `StarAlgHom`s from the topological closure of a `StarSubalgebra` whose
compositions with the `StarSubalgebra.inclusion` map agree are, in fact, equal. -/
theorem _root_.StarAlgHom.ext_topologicalClosure [T2Space B] {S : StarSubalgebra R A}
    {φ ψ : S.topologicalClosure →⋆ₐ[R] B} (hφ : Continuous φ) (hψ : Continuous ψ)
    (h :
      φ.comp (inclusion (le_topologicalClosure S)) = ψ.comp (inclusion (le_topologicalClosure S))) :
    φ = ψ := by
  

Proof state:
R : Type u_1
A : Type u_2
B : Type u_3
inst✝¹³ : CommSemiring R
inst✝¹² : StarRing R
inst✝¹¹ : TopologicalSpace A
inst✝¹⁰ : Semiring A
inst✝⁹ : Algebra R A
inst✝⁸ : StarRing A
inst✝⁷ : StarModule R A
inst✝⁶ : TopologicalSemiring A
inst✝⁵ : ContinuousStar A
inst✝⁴ : TopologicalSpace B
inst✝³ : Semiring B
inst✝² : Algebra R B
inst✝¹ : StarRing B
inst✝ : T2Space B
S : StarSubalgebra R A
φ ψ : ↥(topologicalClosure S) →⋆ₐ[R] B
hφ : Continuous ⇑φ
hψ : Continuous ⇑ψ
h :
  StarAlgHom.comp φ (inclusion (_ : S ≤ topologicalClosure S)) =
    StarAlgHom.comp ψ (inclusion (_ : S ≤ topologicalClosure S))
⊢ φ = ψ

Next tactic:
rw [FunLike.ext'_iff]
/-- Continuous `StarAlgHom`s from the topological closure of a `StarSubalgebra` whose
compositions with the `StarSubalgebra.inclusion` map agree are, in fact, equal. -/
theorem _root_.StarAlgHom.ext_topologicalClosure [T2Space B] {S : StarSubalgebra R A}
    {φ ψ : S.topologicalClosure →⋆ₐ[R] B} (hφ : Continuous φ) (hψ : Continuous ψ)
    (h :
      φ.comp (inclusion (le_topologicalClosure S)) = ψ.comp (inclusion (le_topologicalClosure S))) :
    φ = ψ := by
  rw [FunLike.ext'_iff]
  

Proof state:
R : Type u_1
A : Type u_2
B : Type u_3
inst✝¹³ : CommSemiring R
inst✝¹² : StarRing R
inst✝¹¹ : TopologicalSpace A
inst✝¹⁰ : Semiring A
inst✝⁹ : Algebra R A
inst✝⁸ : StarRing A
inst✝⁷ : StarModule R A
inst✝⁶ : TopologicalSemiring A
inst✝⁵ : ContinuousStar A
inst✝⁴ : TopologicalSpace B
inst✝³ : Semiring B
inst✝² : Algebra R B
inst✝¹ : StarRing B
inst✝ : T2Space B
S : StarSubalgebra R A
φ ψ : ↥(topologicalClosure S) →⋆ₐ[R] B
hφ : Continuous ⇑φ
hψ : Continuous ⇑ψ
h :
  StarAlgHom.comp φ (inclusion (_ : S ≤ topologicalClosure S)) =
    StarAlgHom.comp ψ (inclusion (_ : S ≤ topologicalClosure S))
⊢ ⇑φ = ⇑ψ

Next tactic:
have : Dense (Set.range <| inclusion (le_topologicalClosure S)) := by
    refine' embedding_subtype_val.toInducing.dense_iff.2 fun x => _
    convert show ↑x ∈ closure (S : Set A) from x.prop
    rw [← Set.range_comp]
    exact
      Set.ext fun y =>
        ⟨by
          rintro ⟨y, rfl⟩
          exact y.prop, fun hy => ⟨⟨y, hy⟩, rfl⟩⟩
/-- Continuous `StarAlgHom`s from the topological closure of a `StarSubalgebra` whose
compositions with the `StarSubalgebra.inclusion` map agree are, in fact, equal. -/
theorem _root_.StarAlgHom.ext_topologicalClosure [T2Space B] {S : StarSubalgebra R A}
    {φ ψ : S.topologicalClosure →⋆ₐ[R] B} (hφ : Continuous φ) (hψ : Continuous ψ)
    (h :
      φ.comp (inclusion (le_topologicalClosure S)) = ψ.comp (inclusion (le_topologicalClosure S))) :
    φ = ψ := by
  rw [FunLike.ext'_iff]
  have : Dense (Set.range <| inclusion (le_topologicalClosure S)) := by
    

Proof state:
R : Type u_1
A : Type u_2
B : Type u_3
inst✝¹³ : CommSemiring R
inst✝¹² : StarRing R
inst✝¹¹ : TopologicalSpace A
inst✝¹⁰ : Semiring A
inst✝⁹ : Algebra R A
inst✝⁸ : StarRing A
inst✝⁷ : StarModule R A
inst✝⁶ : TopologicalSemiring A
inst✝⁵ : ContinuousStar A
inst✝⁴ : TopologicalSpace B
inst✝³ : Semiring B
inst✝² : Algebra R B
inst✝¹ : StarRing B
inst✝ : T2Space B
S : StarSubalgebra R A
φ ψ : ↥(topologicalClosure S) →⋆ₐ[R] B
hφ : Continuous ⇑φ
hψ : Continuous ⇑ψ
h :
  StarAlgHom.comp φ (inclusion (_ : S ≤ topologicalClosure S)) =
    StarAlgHom.comp ψ (inclusion (_ : S ≤ topologicalClosure S))
⊢ Dense (range ⇑(inclusion (_ : S ≤ topologicalClosure S)))

Next tactic:
refine' embedding_subtype_val.toInducing.dense_iff.2 fun x => _
/-- Continuous `StarAlgHom`s from the topological closure of a `StarSubalgebra` whose
compositions with the `StarSubalgebra.inclusion` map agree are, in fact, equal. -/
theorem _root_.StarAlgHom.ext_topologicalClosure [T2Space B] {S : StarSubalgebra R A}
    {φ ψ : S.topologicalClosure →⋆ₐ[R] B} (hφ : Continuous φ) (hψ : Continuous ψ)
    (h :
      φ.comp (inclusion (le_topologicalClosure S)) = ψ.comp (inclusion (le_topologicalClosure S))) :
    φ = ψ := by
  rw [FunLike.ext'_iff]
  have : Dense (Set.range <| inclusion (le_topologicalClosure S)) := by
    refine' embedding_subtype_val.toInducing.dense_iff.2 fun x => _
    

Proof state:
R : Type u_1
A : Type u_2
B : Type u_3
inst✝¹³ : CommSemiring R
inst✝¹² : StarRing R
inst✝¹¹ : TopologicalSpace A
inst✝¹⁰ : Semiring A
inst✝⁹ : Algebra R A
inst✝⁸ : StarRing A
inst✝⁷ : StarModule R A
inst✝⁶ : TopologicalSemiring A
inst✝⁵ : ContinuousStar A
inst✝⁴ : TopologicalSpace B
inst✝³ : Semiring B
inst✝² : Algebra R B
inst✝¹ : StarRing B
inst✝ : T2Space B
S : StarSubalgebra R A
φ ψ : ↥(topologicalClosure S) →⋆ₐ[R] B
hφ : Continuous ⇑φ
hψ : Continuous ⇑ψ
h :
  StarAlgHom.comp φ (inclusion (_ : S ≤ topologicalClosure S)) =
    StarAlgHom.comp ψ (inclusion (_ : S ≤ topologicalClosure S))
x : ↥(topologicalClosure S)
⊢ ↑x ∈ closure (Subtype.val '' range ⇑(inclusion (_ : S ≤ topologicalClosure S)))

Next tactic:
convert show ↑x ∈ closure (S : Set A) from x.prop
/-- Continuous `StarAlgHom`s from the topological closure of a `StarSubalgebra` whose
compositions with the `StarSubalgebra.inclusion` map agree are, in fact, equal. -/
theorem _root_.StarAlgHom.ext_topologicalClosure [T2Space B] {S : StarSubalgebra R A}
    {φ ψ : S.topologicalClosure →⋆ₐ[R] B} (hφ : Continuous φ) (hψ : Continuous ψ)
    (h :
      φ.comp (inclusion (le_topologicalClosure S)) = ψ.comp (inclusion (le_topologicalClosure S))) :
    φ = ψ := by
  rw [FunLike.ext'_iff]
  have : Dense (Set.range <| inclusion (le_topologicalClosure S)) := by
    refine' embedding_subtype_val.toInducing.dense_iff.2 fun x => _
    convert show ↑x ∈ closure (S : Set A) from x.prop
    

Proof state:
case h.e'_5.h.e'_3
R : Type u_1
A : Type u_2
B : Type u_3
inst✝¹³ : CommSemiring R
inst✝¹² : StarRing R
inst✝¹¹ : TopologicalSpace A
inst✝¹⁰ : Semiring A
inst✝⁹ : Algebra R A
inst✝⁸ : StarRing A
inst✝⁷ : StarModule R A
inst✝⁶ : TopologicalSemiring A
inst✝⁵ : ContinuousStar A
inst✝⁴ : TopologicalSpace B
inst✝³ : Semiring B
inst✝² : Algebra R B
inst✝¹ : StarRing B
inst✝ : T2Space B
S : StarSubalgebra R A
φ ψ : ↥(topologicalClosure S) →⋆ₐ[R] B
hφ : Continuous ⇑φ
hψ : Continuous ⇑ψ
h :
  StarAlgHom.comp φ (inclusion (_ : S ≤ topologicalClosure S)) =
    StarAlgHom.comp ψ (inclusion (_ : S ≤ topologicalClosure S))
x : ↥(topologicalClosure S)
⊢ Subtype.val '' range ⇑(inclusion (_ : S ≤ topologicalClosure S)) = ↑S

Next tactic:
rw [← Set.range_comp]
/-- Continuous `StarAlgHom`s from the topological closure of a `StarSubalgebra` whose
compositions with the `StarSubalgebra.inclusion` map agree are, in fact, equal. -/
theorem _root_.StarAlgHom.ext_topologicalClosure [T2Space B] {S : StarSubalgebra R A}
    {φ ψ : S.topologicalClosure →⋆ₐ[R] B} (hφ : Continuous φ) (hψ : Continuous ψ)
    (h :
      φ.comp (inclusion (le_topologicalClosure S)) = ψ.comp (inclusion (le_topologicalClosure S))) :
    φ = ψ := by
  rw [FunLike.ext'_iff]
  have : Dense (Set.range <| inclusion (le_topologicalClosure S)) := by
    refine' embedding_subtype_val.toInducing.dense_iff.2 fun x => _
    convert show ↑x ∈ closure (S : Set A) from x.prop
    rw [← Set.range_comp]
    

Proof state:
case h.e'_5.h.e'_3
R : Type u_1
A : Type u_2
B : Type u_3
inst✝¹³ : CommSemiring R
inst✝¹² : StarRing R
inst✝¹¹ : TopologicalSpace A
inst✝¹⁰ : Semiring A
inst✝⁹ : Algebra R A
inst✝⁸ : StarRing A
inst✝⁷ : StarModule R A
inst✝⁶ : TopologicalSemiring A
inst✝⁵ : ContinuousStar A
inst✝⁴ : TopologicalSpace B
inst✝³ : Semiring B
inst✝² : Algebra R B
inst✝¹ : StarRing B
inst✝ : T2Space B
S : StarSubalgebra R A
φ ψ : ↥(topologicalClosure S) →⋆ₐ[R] B
hφ : Continuous ⇑φ
hψ : Continuous ⇑ψ
h :
  StarAlgHom.comp φ (inclusion (_ : S ≤ topologicalClosure S)) =
    StarAlgHom.comp ψ (inclusion (_ : S ≤ topologicalClosure S))
x : ↥(topologicalClosure S)
⊢ range (Subtype.val ∘ ⇑(inclusion (_ : S ≤ topologicalClosure S))) = ↑S

Next tactic:
exact
      Set.ext fun y =>
        ⟨by
          rintro ⟨y, rfl⟩
          exact y.prop, fun hy => ⟨⟨y, hy⟩, rfl⟩⟩
/-- Continuous `StarAlgHom`s from the topological closure of a `StarSubalgebra` whose
compositions with the `StarSubalgebra.inclusion` map agree are, in fact, equal. -/
theorem _root_.StarAlgHom.ext_topologicalClosure [T2Space B] {S : StarSubalgebra R A}
    {φ ψ : S.topologicalClosure →⋆ₐ[R] B} (hφ : Continuous φ) (hψ : Continuous ψ)
    (h :
      φ.comp (inclusion (le_topologicalClosure S)) = ψ.comp (inclusion (le_topologicalClosure S))) :
    φ = ψ := by
  rw [FunLike.ext'_iff]
  have : Dense (Set.range <| inclusion (le_topologicalClosure S)) := by
    refine' embedding_subtype_val.toInducing.dense_iff.2 fun x => _
    convert show ↑x ∈ closure (S : Set A) from x.prop
    rw [← Set.range_comp]
    exact
      Set.ext fun y =>
        ⟨by
          

Proof state:
R : Type u_1
A : Type u_2
B : Type u_3
inst✝¹³ : CommSemiring R
inst✝¹² : StarRing R
inst✝¹¹ : TopologicalSpace A
inst✝¹⁰ : Semiring A
inst✝⁹ : Algebra R A
inst✝⁸ : StarRing A
inst✝⁷ : StarModule R A
inst✝⁶ : TopologicalSemiring A
inst✝⁵ : ContinuousStar A
inst✝⁴ : TopologicalSpace B
inst✝³ : Semiring B
inst✝² : Algebra R B
inst✝¹ : StarRing B
inst✝ : T2Space B
S : StarSubalgebra R A
φ ψ : ↥(topologicalClosure S) →⋆ₐ[R] B
hφ : Continuous ⇑φ
hψ : Continuous ⇑ψ
h :
  StarAlgHom.comp φ (inclusion (_ : S ≤ topologicalClosure S)) =
    StarAlgHom.comp ψ (inclusion (_ : S ≤ topologicalClosure S))
x : ↥(topologicalClosure S)
y : A
⊢ y ∈ range (Subtype.val ∘ ⇑(inclusion (_ : S ≤ topologicalClosure S))) → y ∈ ↑S

Next tactic:
rintro ⟨y, rfl⟩