# cardinality of the set of all dense subsets of $\Bbb R$

Let $$A=\{X \subseteq \mathbb R : \operatorname{cl}(X)=\mathbb R\}$$ Prove that the set $A$ and $P(\mathbb R)$ have the same cardinality. Well, the first thing it came to my mind was the injective function from $A$ to $P(\mathbb R)$ define as $f(X)=X$.

From here, one would conclude that $|A|\le|P(\mathbb R)|$. I am having some difficulty trying to prove that $|P(\mathbb R)|\le|A|$. I can't think of an injective function from subsets of the real numbers to the set $A$.

It's obvious that I have to use the density of each of the $X$'s in $A$, but I don't know how to use this fact in order to construct the desired function.

With Brian's help and suggestion I add the following:

Define a function $g$ from $\wp(\Bbb P)$ to $A$ as follows: take $X \in \wp(\Bbb P)$ and send it to $X\cup\Bbb Q$. The function $g$ is injective, this is easy to see as $X$ and $\Bbb Q$ are disjoint sets. Now, the codomain of g is $A$, so we would have to check that $X\cup\Bbb Q$ is still a dense subset in $\Bbb R$. Pick a real number, as $\Bbb Q$ is dense in $\Bbb R$, we know that for a given $r>0$, there exists $q \in \Bbb Q$ such that $q \in B(x,r) \cap \Bbb Q$. But $B(x,r) \cap \Bbb Q$ is included in $B(x,r) \cap X\cup\Bbb Q$, it follows that $X\cup\Bbb Q$ is dense in $\Bbb R$. From the existence of the injective functions $f$ and $g$, we can conclude that $|P(\mathbb R)|\le|A|\le|P(\mathbb R)|$, then $|A|=|P(\mathbb R)|$.

-
\le and \ge give you $\le$ and $\ge$, respectively. The argument looks fine. –  Brian M. Scott Oct 6 '13 at 4:06
Ok, thanks for your patience. –  Andrew Oct 6 '13 at 4:06
You’re welcome. –  Brian M. Scott Oct 6 '13 at 4:07

HINT: Let $\Bbb P=\Bbb R\setminus\Bbb Q$ be the set of irrationals; you know that $\wp(\Bbb P)$ has the same cardinality as $\wp(\Bbb R)$, so an injection from $\wp(\Bbb P)$ to $A$ is good enough. For each $X\subseteq\Bbb P$ consider the set $X\cup\Bbb Q$.
@Andrew: It doesn’t: it has cardinality $2^\mathfrak{c}$, as does $\wp(\Bbb R)$. If $S$ is any set, $|\wp(S)|=2^{|S|}$, and $|\Bbb P|=|\Bbb R|$. That last equality can be proved in several ways, depending on what you’ve already proved. –  Brian M. Scott Oct 6 '13 at 3:50
@Andrew: Double dollar signs give you displayed lines. Here’s single dollar signs: $X\in\wp(\Bbb R)$. Here’s double: $$X\in\wp(\Bbb R)$$ –  Brian M. Scott Oct 6 '13 at 4:01