Proof set is nowhere dense iff the complement of the closure is dense

Suppose $(S,d)$ is a metric space and $E\subset S$. Prove that $E$ is nowhere dense if and only if $S\setminus \bar{E}$ is dense.

I have yet been able to prove the $\Leftarrow$ part. Suppose $E$ is not nowhere dense, this implies that $\bar{E}^\circ\neq\emptyset$. So, $\exists x\in\bar{E}$ and $\exists\epsilon>0$ such that $B(x,\epsilon)\in\bar{E}$. But this contradicts that $S\setminus \bar{E}$ is dense.

Now the $\Rightarrow$ part. Suppose $S\setminus\bar{E}$ is not dense, which implies that there is an non-empty open set $V$ such that $V\cap S\setminus\bar{E}=\emptyset$. This implies there exist $x\in V$ such that $x\in \bar{E}$, so there exists a sequence $(x_n)_{n \in\mathbb{N}}$ converging to $x$.

How can I proceed from here?

• In my view, it was bad practice to put this under the "real analysis" tag. This is not real analysis, but rather the other two tags describe the topic accurately. – Cloudscape Mar 14 '17 at 15:37

Indeed, if $S \setminus \overline E$ is not dense, then we find an open $V$ such that $V \cap S \setminus \overline E = \emptyset$. Now $$V \cap S \setminus \overline E = S \setminus (\overline E \cup (S \setminus V))$$ and we get $\overline E \cup (S \setminus V) = S$. Thus, $V \subseteq \overline E$.
Although OP asked about metric spaces, let me answer it in a more general context. For a topological space $X$ and $B\subset X$, one has $$B^\circ=X\setminus \overline{X\setminus B}.$$
Indeed, since $B^\circ\subset B$, it follows that $B^\circ\cap X\setminus B=\emptyset$, hence $B^\circ\subset X\setminus \overline{X\setminus B}$. Conversely, if $x\not\in \overline{X\setminus B}$, then there exists an open set $V$ such that $x\in V$ and $V\cap X\setminus B=\emptyset$, hence $x\in V\subset B$, i.e., $x\in B^\circ$.
Now, $E\subset X$ is nowhere dense iff $\overline{E}^\circ =\emptyset$, but $$\overline{E}^\circ=\emptyset\Leftrightarrow X\setminus\overline{X\setminus \overline{E}}=\emptyset\Leftrightarrow \overline{X\setminus \overline{E}}=X,$$ meaning that $X\setminus \overline{E}$ is dense.
Rational $\mathbb Q$ and irrational $\mathbb R \setminus\mathbb Q$ numbers is a counterexample. I think the proposition should be $A$ is a closed nowhere dense set in $\mathbb R$ if and only if $B$ is an open dense set in $\mathbb R$.