# Showing that a set is dense in the real numbers.

This is a follow-up question to the question I just asked.

Question: Let's consider a measure $\mu$: $B_{\mathbb{R}}$ $\rightarrow$ $[0,\infty]$ satisfying $\mu((a,b))$=$b-a$ for any $b>a$. Let {$x_j$}, where $j \in$ $\mathbb{N}$, be an enumeration of $\mathbb{Q}$ and let {$a_j$}, $j \in$ $\mathbb{N}$,be a sequence of positive numbers satisfying $\sum_{j=1}^{\infty} a_j< \epsilon$.

Show that the set $E=\bigcup_{j\in \mathbb{N}} B(a_j,x_j)$, (where $B(a_j,x_j)$ means the ball with radius $a_j$ about $x_j$), is dense in $\mathbb{R}$.

Proof: I'm really struggling with this one. I've never proved that something is "dense" before, so I don't really have any techniques to use. These are facts that I know that may potentially be useful:

I know that the set of rational numbers is dense in ${\mathbb{R}}$.

I know that E is dense in ${\mathbb{R}}$ if every point of ${\mathbb{R}}$ is a limit point of E, or a point of E (or both).

Here's my attempt of coming up with a proof: We need to show that for every open interval,$(a,b)$, we have that $(a,b)\cap E \neq \emptyset$.

Theorem $1.20$ b in Rudin's PMA states: If $x,y \in \mathbb{R}$, and $x<y$, then there exists a $p \in \mathbb{Q}$ such that $x<p<y$ (in other words ${\mathbb{Q}}$ is dense in ${\mathbb{R}}$). Thus every open interval (a,b) contains a rational point. And since $E$ is an open cover for $\mathbb{Q}$ (I'm not sure if this is entirely correct to say), then it must be that $(a,b)\cap E \neq \emptyset$. Thus E is dense in $\mathbb{R}$. Is this correct? This is the best I could come up with so far. Thank you.

• It is true that $E$ is an open cover for $\mathbb{Q}$ since $E$ contains all of $\mathbb{Q}$ (and thus is a cover) and $E$ is the union of open sets. – J. Pistachio Sep 3 '18 at 22:24
• @Josh thanks, so is my proof correct, or is there anything I should fix? – kemb Sep 3 '18 at 22:32
• I think you're good! – J. Pistachio Sep 3 '18 at 22:36
• Any set containing $\mathbb Q$ is dense in $\mathbb R$. To see this, use the characterization that a set $A$ is dense in $\mathbb R$ if and only if $\overline{A} = \mathbb{R}$, where $\overline{A}$ is the closure of $A$. In your case, you have $\mathbb{Q} \subseteq E \subseteq \mathbb {R}$, so taking closures of all three sets in this chain of containments, we get $\mathbb{R} \subseteq \overline{E} \subseteq \mathbb R$, whence $\overline{E} = \mathbb R$, as desired. I've used the fact that $\overline{\mathbb{Q}} = \mathbb R$ since $\mathbb Q$ is dense in $\mathbb R$. – Bungo Sep 4 '18 at 7:12

$E=\cup_j B(a_j,x_j)$ contains $\mathbb{Q}$, since every rational number is some $x_j$, and $x_j\in B(a_j,x_j)\subset E$. Since $\mathbb{Q}$ is dense, $E$ must be dense too.
• @kemb Yes, yours is correct, but a bit redundant. You said that you "know that the set of rational numbers is dense in $\mathbb{R}$," but you then essentially re-prove that in your proof that $E$ is dense. The most important part of your proof is that $E$ is an open cover of $\mathbb{Q}$, but again this is more than you need: it doesn't matter that $E$ is open, it just matters that it contains $\mathbb{Q}$. – Yly Sep 3 '18 at 23:00
Yes, if a set $A$ is dense in $X$ so is any $B$ with $A \subseteq B \subseteq X$. This is trivial, as a set is dense in $X$ iff every non-empty open set intersects it, and if an open set intersects $A$ it certainly intersects $B$. Or use that $X=\overline{A} \subseteq \overline{B}$ e.g.
As it's clear that $\mathbb{Q} \subseteq E$, and $\mathbb{Q}$ is dense in the reals (you already know this, no need to reprove it, just quote the fact) so is $E$. That's all you need to remark.
So $E$ is an open and dense subset of $\mathbb{R}$.