Proof check, about continuity and closed sets Can someone criticize my proof (if it was correct to begin with.), I quote from Abbott's:

Assume $h\colon \mathbb{R}\rightarrow\mathbb{R}$ is continuous on $\mathbb{R}$. And let $K=\{x \mid h(x) = 0\}$. To show that $K$ is a closed set.

Proof :
Case 1 :
$h(x)$ is never $0$, then $K$ is empty and hence closed.
Case 2 :
There exist some $x$'s that satisfy $h(x)=0$.
Take $m$ as a limit point of $K$, then by definition, given $\delta>0$ we have that $V_\delta(m)$ intersects $K$ at some other point than $m$, in other words there exists $\delta_{0}>0$ and $y \in K$ such that $y \in V_{\delta_{0}}(m) \iff \left|y-m\right|<\delta_0$, since $y$ is a real number and $h(x)$ is continuous on $\mathbb{R}$ then given $\varepsilon>0$ : $$\begin{align}\left|h(m)-h(y)\right|<\varepsilon&\implies\left|h(m)\right|<\varepsilon\end{align}$$
Thus, $h(m)=0 \implies  m  \in  K$ which means that $K$ is closed. $\blacksquare$
 A: The proof is not well written in that way. In particular, you have to choose $\delta_0$ in a suitable way that depends on $\varepsilon$. Let me try to correct it below.

Case 2 :
There exist some x's that satisfy h(x)=0
take m as a limit point of K, then by definition, given $\delta$>0 we have that $V_\delta(m)$ intersects K at some other point than m. Fix $\varepsilon>0$. Let’s choose $\delta_0$ such that
$$ |h(x)-h(m)|<\varepsilon \;\forall x\in (m-\delta_0,m+\delta_0).$$
This $\delta_0$ exists because of the continuity of the function $h$. Then, as a consequence of what we wrote, there exists y $\in$ K such that y $\in V_{\delta_{0}}(m)$, i.e., $\left|y-m\right|<\delta_0$.
Since $|m-y|<\delta_0$, we now have
$$\begin{align}\left|h(m)-h(y)\right|<\varepsilon&\implies\left|h(m)\right|<\varepsilon\end{align}$$
Thus, since $\varepsilon>0$ was chosen arbitrarily, $h(m)=0$ $\implies$ m $\in$ K. Since m was an arbitrary limit point of K, K is closed. $\blacksquare$
A: I'll give you an alternative approach.  (I'm assuming you don't know yet that the inverse image of a closed set under a continuous function is closed.)  If $h(x)=0$ is always true, then $K= \Bbb R$ and is closed.
Otherwise, we will prove that $\Bbb R \setminus K$ is open so that $K$ must be closed.  Choose $x_0 \in \Bbb R$ and assume $x \notin K$ so that $h(x_0)=y \neq 0$.  Then because $h$ is continuous, for $\varepsilon = \left \vert \frac y2 \right \vert ~ \exists \delta \gt 0$ such that $\vert x-x_0 \vert \lt \delta \Rightarrow \vert h(x) - y \vert \lt \varepsilon = \left \vert \frac y2 \right \vert \Rightarrow \vert h(x) \vert \gt \left \vert \frac y2 \right \vert \gt 0.$  Thus, for any point $x_0 \in \Bbb R \setminus K$ we have an open neighborhood containing $U$ containing $x_0$ (namely, $U= \{ x \in \Bbb R \mid \vert x-x_0 \vert \lt \delta \}$) such that $U \cap K = \varnothing$; i.e., $U \subseteq \Bbb R \setminus K$.  Thus, $\Bbb R \setminus K$ is open so $K$ is closed.
