[Math] Every open set in $\mathbb{R}$ is the countable union of rational open intervals

real numbersreal-analysis

How would I prove that every open set in $\mathbb{R}$ is the countable union of open intervals with rational endpoints?

Context: I am trying to see whether the set of rational open subsets of $\mathbb{R}$ is countable.

Best Answer

Let $U$ be an open set in $\mathbb R$ we have to prove there is a countable family of open intervals $(a_i,b_i)$ with $a_i,b_i \in \mathbb R$ so that $U=\bigcup\limits_{i\in\mathbb N}(a_i,b_i)$.

To do this for each $x\in U$ we have $(a_x,b_x)$ so that $x\in(a_x,b_x) \subseteq U$. This is because $U$ is open. Of course, there is a rational number $a'_x$ between $a_x$ and $x$ and a rational number $b'_x$ between $b_x$ and $x$. This is because the rational numbers are dense in $\mathbb R$.

So we can consider the familiy of open intervals with rational endpoints. $(a'_x,b'_x)$ Why is this family countable? Because the number of intervals with rational coordinates is countable, since its cardinality does not exceed $|\mathbb Q\times \mathbb Q |=|\mathbb N|$.

Moreover $\bigcup\limits_{x\in U}(a'_x,b'_x)$ is clearly a subset of $U$ since every interval in the union is contained in $U$. But this union also contains $U$ since every element $x\in U$ is contained in the interval $(a'_x,b'_x)$ and hence is contained in the union. Hence $U$ is a countable union of rational open intervals.