Theorem: polynomialFunctions_closure_eq_top
File: Mathlib/Topology/ContinuousFunction/Weierstrass.lean

tactic: cases' lt_or_le a b with h h
state_before: a b : ℝ
⊢ (polynomialFunctions (Set.Icc a b)).topologicalClosure = ⊤
state_after: case inl
a b : ℝ
h : a < b
⊢ (polynomialFunctions (Set.Icc a b)).topologicalClosure = ⊤

case inr
a b : ℝ
h : b ≤ a
⊢ (polynomialFunctions (Set.Icc a b)).topologicalClosure = ⊤

tactic: let W : C(Set.Icc a b, ℝ) →ₐ[ℝ] C(I, ℝ) :=
  compRightAlgHom ℝ ℝ (iccHomeoI a b h).symm.toContinuousMap
state_before: case inl
a b : ℝ
h : a < b
⊢ (polynomialFunctions (Set.Icc a b)).topologicalClosure = ⊤
state_after: case inl
a b : ℝ
h : a < b
W : C(↑(Set.Icc a b), ℝ) →ₐ[ℝ] C(↑I, ℝ) := compRightAlgHom ℝ ℝ (iccHomeoI a b h).symm.toContinuousMap
⊢ (polynomialFunctions (Set.Icc a b)).topologicalClosure = ⊤

tactic: let W' : C(Set.Icc a b, ℝ) ≃ₜ C(I, ℝ) := compRightHomeomorph ℝ (iccHomeoI a b h).symm
state_before: case inl
a b : ℝ
h : a < b
W : C(↑(Set.Icc a b), ℝ) →ₐ[ℝ] C(↑I, ℝ) := compRightAlgHom ℝ ℝ (iccHomeoI a b h).symm.toContinuousMap
⊢ (polynomialFunctions (Set.Icc a b)).topologicalClosure = ⊤
state_after: case inl
a b : ℝ
h : a < b
W : C(↑(Set.Icc a b), ℝ) →ₐ[ℝ] C(↑I, ℝ) := compRightAlgHom ℝ ℝ (iccHomeoI a b h).symm.toContinuousMap
W' : C(↑(Set.Icc a b), ℝ) ≃ₜ C(↑I, ℝ) := compRightHomeomorph ℝ (iccHomeoI a b h).symm
⊢ (polynomialFunctions (Set.Icc a b)).topologicalClosure = ⊤

tactic: have w : (W : C(Set.Icc a b, ℝ) → C(I, ℝ)) = W' := rfl
state_before: case inl
a b : ℝ
h : a < b
W : C(↑(Set.Icc a b), ℝ) →ₐ[ℝ] C(↑I, ℝ) := compRightAlgHom ℝ ℝ (iccHomeoI a b h).symm.toContinuousMap
W' : C(↑(Set.Icc a b), ℝ) ≃ₜ C(↑I, ℝ) := compRightHomeomorph ℝ (iccHomeoI a b h).symm
⊢ (polynomialFunctions (Set.Icc a b)).topologicalClosure = ⊤
state_after: case inl
a b : ℝ
h : a < b
W : C(↑(Set.Icc a b), ℝ) →ₐ[ℝ] C(↑I, ℝ) := compRightAlgHom ℝ ℝ (iccHomeoI a b h).symm.toContinuousMap
W' : C(↑(Set.Icc a b), ℝ) ≃ₜ C(↑I, ℝ) := compRightHomeomorph ℝ (iccHomeoI a b h).symm
w : ⇑W = ⇑W'
⊢ (polynomialFunctions (Set.Icc a b)).topologicalClosure = ⊤

tactic: have p := polynomialFunctions_closure_eq_top'
state_before: case inl
a b : ℝ
h : a < b
W : C(↑(Set.Icc a b), ℝ) →ₐ[ℝ] C(↑I, ℝ) := compRightAlgHom ℝ ℝ (iccHomeoI a b h).symm.toContinuousMap
W' : C(↑(Set.Icc a b), ℝ) ≃ₜ C(↑I, ℝ) := compRightHomeomorph ℝ (iccHomeoI a b h).symm
w : ⇑W = ⇑W'
⊢ (polynomialFunctions (Set.Icc a b)).topologicalClosure = ⊤
state_after: case inl
a b : ℝ
h : a < b
W : C(↑(Set.Icc a b), ℝ) →ₐ[ℝ] C(↑I, ℝ) := compRightAlgHom ℝ ℝ (iccHomeoI a b h).symm.toContinuousMap
W' : C(↑(Set.Icc a b), ℝ) ≃ₜ C(↑I, ℝ) := compRightHomeomorph ℝ (iccHomeoI a b h).symm
w : ⇑W = ⇑W'
p : (polynomialFunctions I).topologicalClosure = ⊤
⊢ (polynomialFunctions (Set.Icc a b)).topologicalClosure = ⊤

tactic: apply_fun fun s => s.comap W at p
state_before: case inl
a b : ℝ
h : a < b
W : C(↑(Set.Icc a b), ℝ) →ₐ[ℝ] C(↑I, ℝ) := compRightAlgHom ℝ ℝ (iccHomeoI a b h).symm.toContinuousMap
W' : C(↑(Set.Icc a b), ℝ) ≃ₜ C(↑I, ℝ) := compRightHomeomorph ℝ (iccHomeoI a b h).symm
w : ⇑W = ⇑W'
p : (polynomialFunctions I).topologicalClosure = ⊤
⊢ (polynomialFunctions (Set.Icc a b)).topologicalClosure = ⊤
state_after: case inl
a b : ℝ
h : a < b
W : C(↑(Set.Icc a b), ℝ) →ₐ[ℝ] C(↑I, ℝ) := compRightAlgHom ℝ ℝ (iccHomeoI a b h).symm.toContinuousMap
W' : C(↑(Set.Icc a b), ℝ) ≃ₜ C(↑I, ℝ) := compRightHomeomorph ℝ (iccHomeoI a b h).symm
w : ⇑W = ⇑W'
p : Subalgebra.comap W (polynomialFunctions I).topologicalClosure = Subalgebra.comap W ⊤
⊢ (polynomialFunctions (Set.Icc a b)).topologicalClosure = ⊤

tactic: simp only [Algebra.comap_top] at p
state_before: case inl
a b : ℝ
h : a < b
W : C(↑(Set.Icc a b), ℝ) →ₐ[ℝ] C(↑I, ℝ) := compRightAlgHom ℝ ℝ (iccHomeoI a b h).symm.toContinuousMap
W' : C(↑(Set.Icc a b), ℝ) ≃ₜ C(↑I, ℝ) := compRightHomeomorph ℝ (iccHomeoI a b h).symm
w : ⇑W = ⇑W'
p : Subalgebra.comap W (polynomialFunctions I).topologicalClosure = Subalgebra.comap W ⊤
⊢ (polynomialFunctions (Set.Icc a b)).topologicalClosure = ⊤
state_after: case inl
a b : ℝ
h : a < b
W : C(↑(Set.Icc a b), ℝ) →ₐ[ℝ] C(↑I, ℝ) := compRightAlgHom ℝ ℝ (iccHomeoI a b h).symm.toContinuousMap
W' : C(↑(Set.Icc a b), ℝ) ≃ₜ C(↑I, ℝ) := compRightHomeomorph ℝ (iccHomeoI a b h).symm
w : ⇑W = ⇑W'
p : Subalgebra.comap W (polynomialFunctions I).topologicalClosure = ⊤
⊢ (polynomialFunctions (Set.Icc a b)).topologicalClosure = ⊤

tactic: rw [Subalgebra.topologicalClosure_comap_homeomorph _ W W' w] at p
state_before: case inl
a b : ℝ
h : a < b
W : C(↑(Set.Icc a b), ℝ) →ₐ[ℝ] C(↑I, ℝ) := compRightAlgHom ℝ ℝ (iccHomeoI a b h).symm.toContinuousMap
W' : C(↑(Set.Icc a b), ℝ) ≃ₜ C(↑I, ℝ) := compRightHomeomorph ℝ (iccHomeoI a b h).symm
w : ⇑W = ⇑W'
p : Subalgebra.comap W (polynomialFunctions I).topologicalClosure = ⊤
⊢ (polynomialFunctions (Set.Icc a b)).topologicalClosure = ⊤
state_after: case inl
a b : ℝ
h : a < b
W : C(↑(Set.Icc a b), ℝ) →ₐ[ℝ] C(↑I, ℝ) := compRightAlgHom ℝ ℝ (iccHomeoI a b h).symm.toContinuousMap
W' : C(↑(Set.Icc a b), ℝ) ≃ₜ C(↑I, ℝ) := compRightHomeomorph ℝ (iccHomeoI a b h).symm
w : ⇑W = ⇑W'
p : (Subalgebra.comap W (polynomialFunctions I)).topologicalClosure = ⊤
⊢ (polynomialFunctions (Set.Icc a b)).topologicalClosure = ⊤

tactic: rw [polynomialFunctions.comap_compRightAlgHom_iccHomeoI] at p
state_before: case inl
a b : ℝ
h : a < b
W : C(↑(Set.Icc a b), ℝ) →ₐ[ℝ] C(↑I, ℝ) := compRightAlgHom ℝ ℝ (iccHomeoI a b h).symm.toContinuousMap
W' : C(↑(Set.Icc a b), ℝ) ≃ₜ C(↑I, ℝ) := compRightHomeomorph ℝ (iccHomeoI a b h).symm
w : ⇑W = ⇑W'
p : (Subalgebra.comap W (polynomialFunctions I)).topologicalClosure = ⊤
⊢ (polynomialFunctions (Set.Icc a b)).topologicalClosure = ⊤
state_after: case inl
a b : ℝ
h : a < b
W : C(↑(Set.Icc a b), ℝ) →ₐ[ℝ] C(↑I, ℝ) := compRightAlgHom ℝ ℝ (iccHomeoI a b h).symm.toContinuousMap
W' : C(↑(Set.Icc a b), ℝ) ≃ₜ C(↑I, ℝ) := compRightHomeomorph ℝ (iccHomeoI a b h).symm
w : ⇑W = ⇑W'
p : (polynomialFunctions (Set.Icc a b)).topologicalClosure = ⊤
⊢ (polynomialFunctions (Set.Icc a b)).topologicalClosure = ⊤

tactic: exact p
state_before: case inl
a b : ℝ
h : a < b
W : C(↑(Set.Icc a b), ℝ) →ₐ[ℝ] C(↑I, ℝ) := compRightAlgHom ℝ ℝ (iccHomeoI a b h).symm.toContinuousMap
W' : C(↑(Set.Icc a b), ℝ) ≃ₜ C(↑I, ℝ) := compRightHomeomorph ℝ (iccHomeoI a b h).symm
w : ⇑W = ⇑W'
p : (polynomialFunctions (Set.Icc a b)).topologicalClosure = ⊤
⊢ (polynomialFunctions (Set.Icc a b)).topologicalClosure = ⊤
state_after: no goals

tactic: have : Subsingleton (Set.Icc a b) := (Set.subsingleton_Icc_of_ge h).coe_sort
state_before: case inr
a b : ℝ
h : b ≤ a
⊢ (polynomialFunctions (Set.Icc a b)).topologicalClosure = ⊤
state_after: case inr
a b : ℝ
h : b ≤ a
this : Subsingleton ↑(Set.Icc a b)
⊢ (polynomialFunctions (Set.Icc a b)).topologicalClosure = ⊤

tactic: apply Subsingleton.elim
state_before: case inr
a b : ℝ
h : b ≤ a
this : Subsingleton ↑(Set.Icc a b)
⊢ (polynomialFunctions (Set.Icc a b)).topologicalClosure = ⊤
state_after: no goals