# A question about nowhere dense sets in metric spaces

Consider a complete metric space $X$, and let $S \subset X$ be a nowhere dense set, that is, interior of closure of $S$ is empty. I am trying to prove that $S$ can be contained in the closure of a discrete subset $A$ of $X$. By discrete, I mean that any point in $A$ is isolated. Any help is highly appreciated.

For each $n\in\mathbb N,$ let $A_n\subseteq X$ be maximal with the properties: $$\forall x\in A_n\ \left[0\lt\operatorname d(x,S)\lt\frac1n\right]\quad\text{ and }\quad\forall x,y\in A_n\left[x\ne y\implies\operatorname d(x,y)\gt\frac1n\right].$$
Then $A=\bigcup_{n\in\mathbb N}A_n$ is discrete, and $S\subseteq\overline A.$
According to the definition, a nowhere empty set $A$ in a space $X$, is a set whose closure $\bar{A}$ has empty interior. That said, take $X=\mathbb{R}^2$ and $A=\{(x,0)\mid x\in \mathbb{R}\}$. This set is nowhere dense, but it is not a countable collection of isolated points.
• Actually, what I want is to contain $A$ in the closure of a discrete subset of $\mathbb{R}^2$. In the specific example you provide, it can be done. Consider a maximal set $A$ in the following way: $A \subset \{ (x, y) : y > 0\}$ such that $\Vert x - y\Vert > \frac{|x| + y}{2}$ for all $x, y \in A$. Now one can prove that $\mathbb{R} \times \{0\} \subset \overline{A}$. – user431348 Apr 1 '17 at 9:48