Any open subset of $\Bbb R$ is a countable union of disjoint open intervals

Here’s one to get things started.

Let $U$ be a non-empty open subset of $\Bbb R$. For $x,y\in U$ define $x\sim y$ iff $\big[\min\{x,y\},\max\{x,y\}\big]\subseteq U$. It’s easily checked that $\sim$ is an equivalence relation on $U$ whose equivalence classes are pairwise disjoint open intervals in $\Bbb R$. (The term interval here includes unbounded intervals, i.e., rays.) Let $\mathscr{I}$ be the set of $\sim$-classes. Clearly $U=\bigcup_{I \in \mathscr{I}} I$. For each $I\in\mathscr{I}$ choose a rational $q_I\in I$; the map $\mathscr{I}\to\Bbb Q:I\mapsto q_I$ is injective, so $\mathscr{I}$ is countable.

A variant of the same basic idea is to let $\mathscr{I}$ be the set of open intervals that are subsets of $U$. For $I,J\in\mathscr{I}$ define $I\sim J$ iff there are $I_0=I,I_1,\dots,I_n=J\in\mathscr{I}$ such that $I_k\cap I_{k+1}\ne\varnothing$ for $k=0,\dots,n-1$. Then $\sim$ is an equivalence relation on $\mathscr{I}$. For $I\in\mathscr{I}$ let $[I]$ be the $\sim$-class of $I$. Then $\left\{\bigcup[I]:I\in\mathscr{I}\right\}$ is a decomposition of $U$ into pairwise disjoint open intervals.

Both of these arguments generalize to any LOTS (= Linearly Ordered Topological Space), i.e., any linearly ordered set $\langle X,\le\rangle$ with the topology generated by the subbase of open rays $(\leftarrow,x)$ and $(x,\to)$: if $U$ is a non-empty open subset of $X$, then $U$ is the union of a family of pairwise disjoint open intervals. In general the family need not be countable, of course.


These answers all seem to be variations on one another, but I've found each one so far to be at least a little cryptic. Here's my version/adaptation.

Let $U \subseteq R$ be open and let $x \in U$. Either $x$ is rational or irrational. If $x$ is rational, define \begin{align}I_x = \bigcup\limits_{\substack{I\text{ an open interval} \\ x~\in~I~\subseteq~U}} I,\end{align} which, as a union of non-disjoint open intervals (each $I$ contains $x$), is an open interval subset to $U$. If $x$ is irrational, by openness of $U$ there is $\varepsilon > 0$ such that $(x - \varepsilon, x + \varepsilon) \subseteq U$, and there exists rational $y \in (x - \varepsilon, x + \varepsilon) \subseteq I_y$ (by the definition of $I_y$). Hence $x \in I_y$. So any $x \in U$ is in $I_q$ for some $q \in U \cap \mathbb{Q}$, and so \begin{align}U \subseteq \bigcup\limits_{q~\in~U \cap~\mathbb{Q}} I_q.\end{align} But $I_q \subseteq U$ for each $q \in U \cap \mathbb{Q}$; thus \begin{align}U = \bigcup\limits_{q~\in~U \cap~\mathbb{Q}} I_q, \end{align} which is a countable union of open intervals.


In a locally connected space $X$, all connected components of open sets are open. This is in fact equivalent to being locally connected.

Proof: (one direction) let $O$ be an open subset of a locally connected space $X$. Let $C$ be a component of $O$ (as a (sub)space in its own right). Let $x \in C$. Then let $U_x$ be a connected neighbourhood of $x$ in $X$ such that $U_x \subset O$, which can be done as $O$ is open and the connected neighbourhoods form a local base. Then $U_x,C \subset O$ are both connected and intersect (in $x$) so their union $U_x \cup C \subset O$ is a connected subset of $O$ containing $x$, so by maximality of components $U_x \cup C \subset C$. But then $U_x$ witnesses that $x$ is an interior point of $C$, and this shows all points of $C$ are interior points, hence $C$ is open (in either $X$ or $O$, that's equivalent).

Now $\mathbb{R}$ is locally connected (open intervals form a local base of connected sets) and so every open set if a disjoint union of its components, which are open connected subsets of $\mathbb{R}$, hence are open intervals (potentially of infinite "length", i.e. segments). That there are countably many of them at most, follows from the already given "rational in every interval" argument.


Let $U\subseteq\mathbb R$ open. It is enough to write $U$ as a disjoint union of open intervals.
For each $x\in U$, we define $\alpha_x=\inf\{\alpha\in\mathbb R:(\alpha,x+\epsilon)\subseteq U, \text{ for some }\epsilon>0\}$ and $\beta_x=\sup\{\beta\in\mathbb R:(\alpha_x,\beta)\subseteq U\}$.

Then $\displaystyle U=\bigcup_{x\in U}(\alpha_x,\beta_x)$ where $\{(\alpha_x,\beta_x):x\in U\}$ is a disjoint family of open intervals.

The intervals appearing in the union are disjoint in the sense that every time $x,y\in U$ with $x<y$, then either $(\alpha_x,\beta_x)=(\alpha_y,\beta_y)$ holds, or $(\alpha_x,\beta_x)\cap(\alpha_y,\beta_y)$ is empty. To see this, suppose $(\alpha_x,\beta_x)\cap(\alpha_y,\beta_y)$ has an element. We claim that $[x,y]\subseteq U$. (For if $x<t<y$ with $t\not\in U$, then $\beta_x\leq t\leq \alpha_y$.)

But if $[x,y]\subseteq U$, then both $\alpha_x<x$ and $\alpha_y<x$, and both $y<\beta_x$ and $y<\beta_y$. Hence $\alpha_x$ and $\alpha_y$ can be expressed as $$\alpha_x=\inf\{\alpha\leq x:(\alpha,x+\epsilon)\subseteq U, \text{ for some }\epsilon>0\},$$ $$\alpha_y=\inf\{\overline\alpha\leq x:(\overline\alpha,y+\overline\epsilon)\subseteq U, \text{ for some }\overline\epsilon>0\},$$ and these are the same; so then also $\beta_x$ and $\beta_y$ are the same.