Is it true that subset D is dense in space X iff every nonempty open set in X contains one point of D I have a proposition that I am not sure if it is right: 
Let D be a subset of space X. D is dense in X if and only if every nonempty open set U of X contains at least one point of D.
When X is a metric space, then I could verify that this is true in both directions.
When X is a topological space, I could prove the ==> direction; however the <== direction is so difficult that I doubt the proposition is right. However, I cannot yet find a counter example.
This proposition is the generalization of a property of real numbers R:
Q is dense in R so every open interval of R contains a point of Q.
Thank you.
 A: As to your definition: $D$ is dense when the closure of $D$ (a.k.a. $\overline{D}$) in $X$, equals $X$. (this does not mean in general that every point of $X$ is a limit of a convergent sequence from $D$; it does in metric spaces, but not in general topological spaces). So as the definition I will use $\overline{D} = X$.
Of course, now the solution will depend on the definition of the closure of a set $A$. Let's use the definition, or characterization, that $x \in \overline{A}$ iff for every open set $O$ of $X$ that contains $x$, $O$ intersects $A$.
Now the statement about the density of $D$ is pretty clear: if $D$ is dense and $O \neq \emptyset$ is open, then pick $p \in O$, then $p \in \overline{D}$, as $\overline{D} = X$, and so every open neighbourhood of $p$ intersects $D$; in particular $O$ intersects $D$, i.e. $O$ contains a point of $D$.
On the other hand, if every non-empty open set $O$ of $X$ contains a point of $D$, let $x \in X$. Let $O$ be any open set that contains $x$. Then $O$ is non-empty (because of $x$) and so contains a point of $D$, i.e. $O \cap D \neq \emptyset$. But this just says that $x \in \overline{D}$ by the definition above. As $x \in X$ was arbitrary, $X \subset \overline{D}$. As $\overline{D} \subset X$ by definition, we have equality.
Note that nothing at all of a metric is used. This is just a general fact for topological spaces.
A: Hint: Proving by contrapositive would probably be easier. If $D$ is not dense, then its closure is not all of $X$. What can you then say about the complement of its closure? On the other hand, if there is a non-empty open set disjoint from $D,$ then the complement of this open set is closed and contains $D,$ but isn't all of $X,$ so what can we say about the closure of $D$?
A: 
$D$ is dense in $X$ if closure of $D$ is $X$, or equivalently, every point in $X$ is the limit of a sequence in $D$. 



*

*Suppose $D$ is dense. Let $x\in X$, let $r>0$, $x_n\to x$ a $D$ valued sequence. As $$
d(x_n,x) \to 0
$$there is a $N$ such as $$
n\ge N \Rightarrow d(x_n,x)< r
$$
In particular, $x_N\in B(x,r)\cap D$.

*Suppose that every open ball of $X$ contains an element of $D$.
Let $x\in X$, let $x_n \in D\cap B(x,2^{-n})$. This is a $D$ valued sequence, and 
$$ d(x_n,x) < 2^{-n}$$ so $x_n\to x$.


Now in a general topologic context:


*

*Suppose $D$ is dense. Let $x\in X$ and $x_n\to x$ a $D$ valued sequence. 
Let $V$ an open set such as $x\in V$.
As $x_n\to x$  there is a $N$ such as $$
n\ge N \Rightarrow x_n\in V
$$
In particular, $x_N\in V\cap D$.

*There is no hope of a better result. Take for example the discret topology. $O = X - D$ is (as every subset) an open set, containing $x$ when $x\notin D$, such as $O\cap D = \emptyset$.
A: I think your question is same with this question " A set D in a space X is dense in X iff every non-empty open set in X meets D", right?
