Proving that $(X,\tau)$ is Hausdorff given a condition. Let $(X,\tau)$ be a topological space such that for each $p \in X$ there is a continuous function $f:X \to \Bbb R$ verifying $f^{-1}(\{0\}) = \{p\}$. Then $(X,\tau)$ is Hausdorff. 
Welp, take $p,q \in X$ distinct points and fix two continuous functions $f_p,f_q: X \to \Bbb R$ with $f_p^{-1}(\{0\}) = \{p\}$ and $f_q^{-1}(\{0\}) = \{q\}$. Then we have: $f_p(p) = f_q(q) = 0$ and $f_p(q),f_q(p) \neq 0$. The idea seems to be using continuity to find the neighbourhoods.
I had two ideas, but they didn't seem to go anywhere.


*

*there exists $r > 0$ small enough (after a possible reduction) such that $f_p(q),f_q(p) \not\in \left]-r,r\right[$, then we take $f_p^{-1}( \left]-r,r\right[)$ and $f_q^{-1}( \left]-r,r\right[)$. They're open by continuity, but I couldn't quite show that they're disjoint.

*use continuity of $f_p$ and $f_q$ at $p$ and $q$ to find neighbourhoods $U_p$ and $U_q$, but we have a lot of possible combinations of inequalities. 
I'm unsure if I'm on the right track. Help? Thanks.
 A: Let $p,q\in X$.  Now, let $f$ be a function such that $f^{-1}(\{0\})=\{p\}$.  (Then $f(p)=0$).  Let $r=f(q)$ and $d=|r|/4$.  Consider the preimages of $(-d,d)$ and $(r-d,r+d)$ under $f$.
Now, you must show that they are open (easy since $f$ is continuous), they contain $p$ and $q$ respectively (easy again), and are disjoint (this is not difficult, but a little more work, try a contradiction).
A: A topological space is Hausdorff if and only if every net in it converges to at most one point (that is, every convergent net has a unique limit).
For the sake of contradiction, suppose that $(X,\tau)$ admits a net $(x_{\alpha})_{\alpha\in A}$ (where $A$ a is non-empty, directed index set) such that $x_{\alpha}\to p$ and $x_{\alpha}\to q$ with $p,q\in X$ and $p\neq q$. Then, by continuity, $f_p(x_{\alpha})\to f_p(p)=0$ and $f_p(x_{\alpha})\to f_p(q)\neq 0$ (given that $f_p^{-1}(\{0\})=\{p\})$. But $\mathbb R $ is Hausdorff, so the real-valued net $(f_p(x_{\alpha}))_{\alpha\in A}$ can't converge to two distinct points. Contradiction.
