TITLE: Every open set in $\mathbb{R}$ is the union of an at most countable collection of disjoint segments
QUESTION [10 upvotes]: Let $E$ be an open set in $\mathbb{R}$.
Fix $x\in E$.
I have proved that statement is true when $\{y\in \mathbb{R}|(x,y)\subset E\}$ is bounded above and $\{z\in \mathbb{R}|(z,x)\subset E\}$ is bounded below.
If at least one of those above are not bounded, $E$ must be equal to one of;
1.$\mathbb{R}$
2.$\{r\in \mathbb{R}|r<k\}$for some $k\in \mathbb{R}$
3.$\{r\in \mathbb{R}|k<r\}$for some $k\in \mathbb{R}$
Are these sets can be the union of an at most countable collection of disjoint 'segments'?

REPLY [3 votes]: Let $E$ be an open subset of $\mathbb{R}$.  We can assume without loss of generality that E is nonempty.  Consider a real number $x \in E$.  In the context of this problem, a segment $(a_1,b_1)$ means the set of all $p \in \mathbb{R}$ such that $a_1 \lt p \lt b_1$.  $ $Let $y = inf \lbrace a \in E \mid (a,x) \subseteq E \rbrace$ and $w = sup \lbrace a \in E \mid (x,a) \subseteq E \rbrace$.  Then $E$ is the union of all such segments $(y,w)$ for all points $x \in E$.  Since each of these segments is open, it remains to show that they are at most countable. First, note that the rationals are known to be dense in the reals.  Also, the rationals are a countable set.  Thus, let $\lbrace r_n \rbrace$ be an ordering of the rational numbers.  Now order the segments $(y,w)$ such that $(y_1,w_1)$ precedes $(y_2,w_2)$ if and only if the least $i$ such that $r_i \in (y_1,w_1)$ is less than the least $j$ such that $r_j \in (y_2,w_2)$.  $r_i$ and $r_j$ exist because the rationals are dense.  This is an ordering of the segements whose union is $E$, showing that the segments are at most countable.