I am trying to solve Exercise 2.35 in John M. Lee. Introduction to Topological Manifolds, p. 32:
Let $X$ be a topological space. Assume that for every $p\in X$ there exists a continuous function $f:~X\longrightarrow\mathbb{R}$ such that $f^{-1}(0)=\{p\}$. Show that $X$ is Hausdorff.
(The inverse $f^{-1}$ here is implied as converse, not a bijective inverse.)
My thinking is that if we take the open subset $(-1;1)$ of $\mathbb{R}$ for each $f$ since the map is continuous we get open sets containing $p_i$, and it boils down to showing the intersection is empty. I can't quite follow this important part through.
If $q\ne p$, let $f_p$ be a function $f:~X\longrightarrow\mathbb{R}$ satisfying $f^{-1}(0)=\{p\}$ (this exists by assumption), and let $\alpha=f_p(q)>0$, and let $\epsilon=\frac{\alpha}2$. Consider the inverse images under $f_p$ of $(\leftarrow,\epsilon)$ and $(\epsilon,\to)$.