Let $T:V\to V$ be a self-adjoint operator on a Hilbert space $V$. We know that its spectrum $\sigma(T)$ is contained in some finite interval $[a,b]$. We consider the ring homomorphism \begin{align*} \varphi : &\Bbb{R}[X] \to \Bbb{R}[T] \ \text{given by} \ f:=f(X) \mapsto f(T), \end{align*} where $\Bbb R[X]$ denotes the ring of polynomial functions on $[a,b]$. We also know that $\varphi$ is uniformly continuous with the sup-norm on $\Bbb{R} [X]$ and the operator-norm on $\Bbb {R}[T]$. So we can extend the map $\varphi$ to a continuous map $$\overline{\varphi}:\overline{\Bbb{R}[X]}\to\overline{\Bbb{R}[T]},$$ where $\overline{\Bbb R[X]}$ is the sup-norm closure of $\Bbb{R}[X]$ in $C([a,b])$, and the latter is the operator-norm completion of $\Bbb{R}[T]$. Note that by Weierstrass Approximation Theorem, we have $\overline{\Bbb{R}[X]}=C([a,b])$ where $C([a,b])$ is the ring of real-valued continuous functions on $[a,b]$.
My Question. Let $\tau(T)\subseteq[a,b]$ be the simultaneous zero-set of $\operatorname{Ker}(\overline{\varphi})$. How can we show that if $f\geq 0$ on $\tau(T)$ then $f(T)\geq 0$. Thanks!
In fact we know that $f$ can be written as a finite sum of the form \begin{align} f=\sum_i P_i^2+(x-a)\sum_j Q_j^2+(b-x)\sum_k R_k^2 \qquad \text{on $\tau(T)$} \end{align} for some $P_i, Q_j, R_k \in \Bbb R [x]$ on $\tau(T)$. Also we know that each $P_i^2(T)\geq 0$, each $Q_j^2(T)$, and $R_k^2(T)\geq 0$. It remains to show that $T-a\geq 0$ and $b-T\geq 0$ where the scalars refer to the scalar operators.