Q:

Prove that if $S$ is a nonempty set of real numbers then $x$ in $\overline{S}$ iff every neighborhood of $x$ contains at least one point in $S$.

The following is typed class notes.

Lemma $3.15 (c)$. For every point $x \in S$, there exists $\epsilon> 0$ $s.t.$ $N(x,\epsilon)$ $\subset S$ 
Lemma $3.20$. If $S$ is a nonempty set of real numbers then $x$ in $\overline{S}$ iff every neighborhood of $x$ contains at least one point in $S$. This is also equivalent to saying that every open set containing $x$ contains at least one point in $S$.
$proof.$ Recall that $\overline{S}=S\cup Bd(S)$. If $x$ in S then the conditions on both sides of the first 'iff' are clearly true.

But it's the second part of the proof where I start to get confused.

On the other hand, if $x\notin S$, then every neighborhood of $x$ contains at least one point in $S^{c}$, namely $x$, and so in this case: $x \in \overline{S}$ iff $x \in Bd(S)$ iff every neighborhood of $x$ contains at least one point in $S$.

Okay, so I get why $x \in \overline{S}$ iff $x \in Bd(S)$ iff every neighborhood of $x$ contains at least one point in $S$.

The $\leftarrow$ direction of the last assertion (follows? some word is missing and I'm guessing it's follows) from the first 'iff', since any neighborhood is open. For the other direction, if $U$ is an open set containing $x$, then by Lemma 3.15(c), $U$ contains a neighborhood of $x$, which contains at least one point in $S$. QED

It's this part that confuses me. I know it says last assertion, but are we talking about Lemma 3.20? I was wondering if someone could perhaps reword this part because I'm pretty lost when it comes to proving Lemma 3.20 

A:

If $x$ is in $\overline S$ then $x$ is in $S$ or on the boundary of $S$. If $x$ is in $S$ then every neighborhood of $x$ contains at least one point from $S$ (it contains at least $x$) and if $x$ is on the boundary of $S$, then, from the definition of the boundary we also have that every neigborhood of $x$ contains at least one point from $S$.
If every  neighborhood of $x$ contain at least one point from $S$ then $x$ must be in $\overline S$. Why? The only place where $x$ can be is either $\overline S$ or the complement of $\overline S$. Suppose that $x$ is in the complement of $\overline S$. Then there exists neighborhood of $x$ that does not contain points from $\overline S$. That means such a neighborhood does not contain points neither from $S$ nor from the boundary of $S$, but that is a contradiction with the assumption that every  neighborhood of $x$ contain at least one point from $S$ so $x$ is not in the complement of $\overline S$, so $x$ is in $\overline S$.

