Problem: Let $(M,d)$ a metric space and $f:M\rightarrow \mathbb{R}$ a continuous functions.
Show that the set $A = \{x\in M \mid f(x) > 0\}$ is open.
Let $a\in \partial A$. Show that $f(a)=0$.
- Show that the reciprocal of 2) is in general, false.
Partial solution: For 1), let $a\in A$, then $f(a)>0$. And since $f$ is continuous, we have that for some $\varepsilon > 0$ exists some $\delta >0$ such that if $d(x,a)<\delta$, then $d(f(x),f(a))<\varepsilon$. Now, $d(f(x),f(a))=\mid f(x)-f(a) \mid <\varepsilon$ and this implies that $f(a)<f(x)<f(a)+\varepsilon$. Since $f(a)>0$, we have that $f(x)>0$ when $d(x,a)<\delta$, so, there is a ball $B(a,\delta) \subset A$, then $A$ is open.
Im pretty lost for 2) and 3). I know that if $a\in \partial A$, $B(a,r)\cap A \neq \emptyset$ and $B(a,r)\cap M-A \neq \emptyset$. But I have no idea how to prove what the book wants. Any help would be really appreciated.
Thanks so much in advance!
EDIT: Cant use anything but the definition of open set, not sequences, not convergence!
Some hints: