I'm working through the problems in Rudin's Principles of Mathematical analysis, chapter 4. Problem 3 is as follows:
Let $f$ be a continuous real function on a metric space $X$. Let $Z(f)$ (the zero set of $f$) be the set of all $p\in X$ at which $f(p)=0$. Prove that $Z(f)$ is closed.
Here's what I have.
Let $p$ be a limit point of $Z(f)$. Then for every neighbourhood $N_{\epsilon}(p)$ of p, there is a point $p'\in Z(f)\cap N_{\epsilon}(p)$ so that $f(p')=0$. Then for any $\epsilon>0$ there is some $\delta$ such that $|f(p)-f(p')|=|f(p)|<\delta$. Since we can take $\epsilon$ arbitrarily small, $f(p)=0$ and so $p\in Z(f)$.
I thought that looked good, but I realized I'm not sure that $\epsilon$ getting arbitrarily small implies $\delta$ getting arbitrarily small, which is what I would actually need. It seems to make sense that $\delta$ should get arbitrarily small but I'm not sure now—could you have a function which is continuous where, with $\epsilon,\delta$ as in the definition of continuity, taking $\epsilon'<\epsilon$ would require us to choose $\delta'\geq\delta$?
Maybe this is a dumb question. If my proof is incorrect, could someone give me a hint to fix it?