**Proof Plan.** For each point $x \in U$, we construct the maximal open interval $I_x \subseteq U$ containing $x$ using the order-completeness of $\mathbb{R}$. The maximality ensures that distinct maximal intervals are disjoint, and a counting argument using the density of $\mathbb{Q}$ shows there are at most countably many.
**Step 1 (Construct maximal intervals).** For each $x \in U$, define
\begin{align*}
a_x := \inf\{a \in \mathbb{R} : (a, x] \subseteq U\}, \qquad b_x := \sup\{b \in \mathbb{R} : [x, b) \subseteq U\}.
\end{align*}
Since $U$ is open, there exists $\varepsilon > 0$ with $(x - \varepsilon, x + \varepsilon) \subseteq U$, so $a_x < x < b_x$. Set $I_x := (a_x, b_x)$.
[claim:Maximal Interval Is In U]
$I_x \subseteq U$.
[/claim]
[proof]
Let $y \in (a_x, b_x)$. If $y \ge x$, then $y < b_x = \sup\{b : [x, b) \subseteq U\}$, so there exists $b > y$ with $[x, b) \subseteq U$, hence $y \in U$. The case $y < x$ is symmetric, using $a_x = \inf\{a : (a, x] \subseteq U\}$.
[/proof]
[claim:Maximality Of Intervals]
$I_x$ is the largest open interval contained in $U$ that contains $x$. That is, if $J$ is any open interval with $x \in J \subseteq U$, then $J \subseteq I_x$.
[/claim]
[proof]
Let $J = (\alpha, \beta)$ with $x \in J \subseteq U$. Then $(\alpha, x] \subseteq U$, so $a_x \le \alpha < x$ by definition of $a_x$, hence $\alpha \ge a_x$. Similarly $b_x \ge \beta$. Therefore $J = (\alpha, \beta) \subseteq (a_x, b_x) = I_x$.
[/proof]
**Step 2 (Disjointness or equality).** Let $x, y \in U$. If $I_x \cap I_y \neq \varnothing$, then $I_x \cup I_y$ is an open interval (the union of two overlapping open intervals on $\mathbb{R}$ is an interval) contained in $U$ and containing both $x$ and $y$. By maximality, $I_x \cup I_y \subseteq I_x$ and $I_x \cup I_y \subseteq I_y$, so $I_x = I_y$. Therefore the maximal intervals are either identical or disjoint.
**Step 3 (Countability).** Let $\mathcal{I} = \{I_x : x \in U\}$ be the collection of distinct maximal intervals. Each $I_x$ is a nonempty open interval in $\mathbb{R}$, so it contains a rational number $q_x \in I_x \cap \mathbb{Q}$. Since the intervals are pairwise disjoint, the map $I_x \mapsto q_x$ is an injection from $\mathcal{I}$ into $\mathbb{Q}$. Since $\mathbb{Q}$ is countable, $\mathcal{I}$ is countable.
**Step 4 (Decomposition).** By construction, $U = \bigcup_{x \in U} I_x = \bigsqcup_{k} I_k$ where $\{I_k\}$ is the (countable) collection of distinct maximal intervals.
**Step 5 (Uniqueness).** Suppose $U = \bigsqcup_j J_j$ is another decomposition into pairwise disjoint open intervals. For any $x \in U$, $x$ belongs to exactly one $J_j$, and $J_j \subseteq U$ is an open interval containing $x$, so $J_j \subseteq I_x$ by maximality. Conversely, $I_x \subseteq U = \bigsqcup_j J_j$. Since $I_x$ is connected and the $J_j$ are pairwise disjoint [open sets](/page/Open%20Set), $I_x$ must be contained in a single $J_j$ (otherwise the preimages under inclusion would disconnect $I_x$). Therefore $J_j = I_x$, and the decompositions agree. $\blacksquare$