[Math] Dense in itself sets

general-topologyreal-analysisset-theory

Just I am reading wiki article on dense in itself sets.

The article gives the example:

A simple example of a set which is dense-in-itself but not closed (and hence not a perfect set) is the subset of irrational numbers(considered as a subset of the real numbers). This set is dense-in-itself because every neighborhood of an irrational number contains at least one other irrational number. On the other hand, this set of irrationals is not closed because every rational number lies in its closure".

I think this example is wrong because, if I considered

$S = { \{ \sqrt {p} | \ }$ p is prime $\}$ then this is clearly a subset of irrational numbers.

But $ S $ is not dense in itself. Because $ S $ has "isolated points" (I think all points of $ S $ are isolated points of $S$).

and we know, "if set is dense in itself then it has no isolated points".

Please clarify me. May be I am wrong, but I think I am not!

Best Answer

A subset of S does not need to be dense-in-itself as well. Some properties of topological spaces aren't carried over to its subsets, such as separability.

But the set of all irrational numbers is dense-in-itself, since it contains no isolated points.