# Any open subset of $\Bbb R$ is a countable union of disjoint open intervals. [Collecting Proofs]

This question has probably been asked. However, I am not interested in just getting the answer to it. Rather, I am interested in collecting as many different proofs of it which are as diverse as possible. A professor told me that there are many. So, I invite everyone who has seen proofs of this fact to share them with the community. I think it is a result worth knowing how to prove in many different ways and having a post that combines as many of them as possible will, no doubt, be quite useful. After two days, I will place a bounty on this question to attract as many people as possible. Of course, any comments, corrections, suggestions, links to papers/notes etc. are more than welcome.

-
First proof that comes in mind: if $O$ is an open set and $x \in O$ then there exists an interval $I$ such that $x \in I \subset O$. If there exists one such interval, then there exists one 'largest' interval which contains $x$ (the union of all such intervals). Denote by $\{I_\alpha\}$ the family of all such maximal intervals. First all intervals $I_\alpha$ are pairwise disjoint (otherwise they wouldn't be maximal) and every interval contains a rational number, and therefore there can only be a countable number of intervals in the family. –  Beni Bogosel Mar 2 '13 at 0:12
Since this is a big-list question, I am converting it to CW. –  robjohn Mar 2 '13 at 9:01
Oh, OK! Thanks! –  Orest Xherija Mar 3 '13 at 1:04
I cannot understand how each $I_a$ is disjoint. If one interval contains x and another interval also contains x, aren't they intersecting? –  jablesauce May 29 '14 at 1:41
Yes but their union would then be another interval that contains an $I_a$ and therefore must be equal to it by maximality. –  Gregory Grant Mar 15 at 16:36

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\mathscr{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.

-
I like this answer LOTS. :-) And +1. –  coffeemath Mar 2 '13 at 1:30
This answer is very clear. It depends on the axiom of choice though, are there any constructive variants of this argument? –  Bunder Mar 2 '13 at 8:28
@Bunder: No, it doesn’t depend on the axiom of choice. The only place where you might even think that it did is when I showed that there are only countably many intervals, but the rationals can be explicitly well-ordered, so no choice is necessary even there. –  Brian M. Scott Mar 2 '13 at 12:24

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.

-
"connected => interval" also requires a proof (usually using the intermediate step "path-connected"). –  Martin Brandenburg Mar 4 '13 at 19:29
Path connected is not needed. It would be circular, as one needs connectedness of intervals to see that path-connected implies connected... If a set is not order convex (so x < z < y, x,y in A but z not in A), then we have an immediate disconnection. That intervals are connected follows from completeness of the order, and is a standard fact for ordered spaces. –  Henno Brandsma Mar 4 '13 at 20:22

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.

-
He wanted a countable union of disjoint open intervals. If $U$ is simply an open interval, then $U=I_q=I_{\tilde{q}}$ for all $q,\tilde{q} \in \mathcal{Q}\cap U$. –  José Siqueira Oct 15 '13 at 16:15
That it is a disjoint union follows from the definition of $I_q$: if $x \in I_q \cap I_p$ then $I_q \cup I_p \subseteq I_q$ and $I_p$; hence if $I_q \neq I_p$ then $I_q \cap I_p = \emptyset$. Strictly speaking one should throw away all repeated $I_q$s, and one can definitely do this without destroying the countability of the union. –  Stromael Oct 21 '13 at 11:14

A variant of the usual proof with the equivalence relation, which trades in the ease of constructing the intervals with the ease of proving countability (not that either is hard...):

1. Define the same equivalence relation, but only on $\mathbb Q \cap U$: $q_1 \sim q_2$ iff $(q_1, q_2) \subset U$ (or $(q_2, q_1) \subset U$, whichever makes sense).
2. From each equivalency class $C$, produce the open interval $(\inf C, \sup C) \subset U$ (where $\inf C$ is defined to be $-\infty$ in case $C$ is not bounded from below, and $\sup C = \infty$ in case $C$ is not bounded from above).
3. The amount of equivalence classes is clearly countable, since $\mathbb Q \cap U$ is countable.
-

Let $U\subseteq\mathbb R$ open. 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.

-
Are you sure the union is countable here? –  user10444 Sep 11 '14 at 16:55
@user10444: It is countable yes! If you agree that $\{(\alpha_x,\beta_x):x\in U\}$ is a disjoint family of open intervals then you can see it by choosing $r_x\in \mathbb Q\cap (\alpha_x,\beta_x)$ for all $x\in U$. Then $\{r_x:x\in U\}$ is countable right? Note that the intervals $\{(\alpha_x,\beta_x):x\in U\}$ are not distinct! –  P.. Sep 11 '14 at 19:03

Let $U$ be an open subset of $\mathbb{R}$. Let $P$ be the poset consisting of collections $\mathcal{A}$ of disjoint open intervals where we say $\mathcal{A} \le \mathcal{A}'$ if each of the sets in $\mathcal{A}$ is a subset of some open interval in $\mathcal{A}'$. Every chain $C$ in this poset has an upper bound, namely $$\mathcal{B} = \left\{ \bigcup\left\{J \in \bigcup\bigcup C : I \subseteq J \right\}: I \in \bigcup\bigcup C\right\}.$$ Therefore by Zorn's lemma the poset $P$ has a maximal element $\mathcal{M}$. We claim that the union of the intervals in $\mathcal{M}$ is all of $U$. Suppose toward a contradiction that there is a real $x \in U$ that is not contained in any of the intervals in $\mathcal{M}$. Because $U$ is open we can take an open interval $I$ with $x \in I \subseteq U$. Then the set $$\mathcal{M}' = \{J \in \mathcal{M} : J \cap I = \emptyset\} \cup \left\{I \cup \bigcup \{J \in \mathcal{M} : J \cap I \ne \emptyset\}\right\}$$ is a collection of disjoint open intervals and is above $\mathcal{M}$ in the poset $P$, contradicting the maximality of $\mathcal{M}$. It remains to observe that $\mathcal{M}$ is countable, which follows from the fact that its elements contain distinct rational numbers.

Note that the only way in which anything about order (or connectedness) is used is to see that $I \cup \bigcup \{J \in \mathcal{M} : J \cap I \ne \emptyset\}$ is an interval.

-
And yes, before you ask, I know this proof is silly. –  Trevor Wilson Mar 8 '13 at 2:21
I think this proof conceptually connects many things, including well-ordering, order theory and so on. So, I really benefited. –  user64066 Oct 22 '13 at 20:19
@user64066 Thanks, I'm glad to hear it. –  Trevor Wilson Oct 22 '13 at 20:30

Let $G$ be a nonempty open set in $\mathbb{R}$. Write $a\sim b$ if the closed interval $[a, b]$ or $[b, a]$ if $b<a$, lies in $G$.This is an equivalence relation, in particular $a\sim a$ since $\{a\}$ is itself a closed interval. $G$ is therefore the union of disjoint equivalence classes.

Let $C(a)$ be the equivalence class containing $a$. Then $C(a)$ is clearly an interval. Also $C(a)$ is open, for if $k\in C(a)$, then $(k-\epsilon, k+\epsilon)\subseteq G$ for sfficiently small $\epsilon$.

But then $(k-\epsilon, k+\epsilon)\subseteq C(a)$; so $G$ is the union of disjoint intervals. These are at most countable in number by Lindel$\ddot{\rm o}$f's theorem. This completes the proof.

Reference:G. De Barra, Measure theory and Integration, Horwood Publishing.

-

I hope that this is right as this is a lemma i've thought of and i plan to use in a project due in several days and it somewhat generalizes the question asked:

Suppose that $U$ is a set of intervals in $\mathbb{R}$ (closed, open, semi-closed, etc.). Then there exists a set of disjoint intervals $V$ in $\mathbb{R}$ s.t. $\bigcup_{I\in U}I=\biguplus_{I\in V}I$. If non of the intervals are degenerate or $U$ is countable, then this set can be taken to be countable. And if they were all open, then we could take the segments of $V$ to be open (And also, if $U$ is countable then we won't be needing the Axiom of Choice).

proof: Let us order the elements of $U$: $U=\langle I_\beta\,|\,\beta\leq\alpha\rangle$ where $\alpha$ is the first ordinal of cardinality $|U|$. (If $U$ is countable then this doesn't require AC and from here on will be standard induction with a simple construction in the end for $\omega$).

I'll build $V_\beta=\langle J^\gamma_\beta\,|\,\gamma\leq\beta\rangle$ - a sequence of segments for all $\beta\leq\alpha$ such that every two sets in $V_\beta$ are either disjoint or equal and such that $\displaystyle{\bigcup_{\gamma\leq\beta}I_\gamma=\biguplus_{\gamma\leq\beta}J^\gamma_\beta}$ and $\forall\beta$, $\langle J^\beta_\gamma\rangle_{\gamma\geq\beta}$ is a non-descending sequence of sets ,by means of transfinite induction.

For $V_0$ take, $V_0=\langle I_0\rangle$. Suppose that we have built the required $V_\gamma$, $\gamma<\beta$ for some $\beta\leq\alpha$, then we will build $V_\beta$ in the following way: $\forall\gamma<\beta$, denote $\widetilde{J}_\gamma$=$\bigcup_{\gamma\leq\delta<\beta}J_\delta^\gamma$-still segments (non-decreasing sequence). If $I_\beta$ is disjoint of all $\widetilde{J}_\gamma$, taking $V_\beta\!=\!\langle \widetilde{J}_\gamma\,|\,\gamma<\beta\rangle\cup\{(\beta,I_\beta)\}$ would give us a sequence $\langle V_\gamma\,|\,\gamma\leq\beta\rangle$ satisfying the required conditions of it (the only non trivial thing is that pairs of $\widetilde{J}_\gamma$ are either disjoint of each other or are equal, but that is also quite trivial since if the contrary would have occurred, then $\exists\gamma_1<\gamma_2<\beta$ s.t. $\widetilde{J}_{\gamma_1}\neq\widetilde{J}_{\gamma_2}$ and $\widetilde{J}_{\gamma_1}\cap\widetilde{J}_{\gamma_2}\neq\emptyset$, but then, $\exists \beta>\delta_1\geq\gamma_1, \beta>\delta_2\geq\gamma_2$ s.t. $J^{\gamma_1}_{\delta_1}\cap J^{\gamma_2}_{\delta_2}\neq\emptyset$, meaning that either $J^{\gamma_1}_{\delta_2}= J^{\gamma_2}_{\delta_2}$ or $J^{\gamma_1}_{\delta_1}= J^{\gamma_2}_{\delta_1}$ thus, $\forall\beta>\epsilon\geq\delta_1,\delta_2$, $J^{\gamma_1}_{\epsilon}= J^{\gamma_2}_{\epsilon}$ and since we are talking here about non-decreasing sequences, this will contradict $\widetilde{J}_{\gamma_1}\neq\widetilde{J}_{\gamma_2}$). And if $I_\beta$ isn't disjoint of all $\widetilde{J}_\gamma$, Then we can take $J_\beta^\gamma=\widetilde{J}_\gamma$ for all $\gamma<\beta$ that don't intersect with $I_\beta$ and $J_\beta^\gamma=\bigcup_{\delta<\beta\text{ s.t. }\widetilde{J}_\delta\cap I_\beta\neq\emptyset}{\widetilde{J}_\delta}\cup I_\beta$ - segment for all of the other $\gamma\leq\beta$. Then again from the same arguments, $\langle V_\gamma\,|\,\gamma\leq\beta\rangle$ would satisfy the required conditions.

Finally, we can take $V=\{J_\alpha^\beta\,|\,\beta\leq\alpha\}$ to get what we wanted in the first place. And obviously, if our segments were all non-degenerate to begin with, from the way we constructed our set, all of the segments in $V$ will be non-degenerate (and thus of positive measure), but they are disjoint and so there is only a countable number of them. And if the segments in $U$ were all open, then obviously, so will the segments in $V$.$\square$

-

The proof that every open set is a disjoint union of countably many open intervals relies on three facts:

• $\Bbb R$ is locally-connected
• $\Bbb R$ is ccc
• The open connected sets in $\Bbb R$ are open intervals

Let $U\subseteq \Bbb R$ be open. Then there is a collection of disjoint, open, connected sets $\{G_\alpha\}_{\alpha\in A}$ such that $U=\bigcup_{\alpha\in A} G_\alpha$. Since $\Bbb R$ is ccc, the collection $\{G_\alpha\}$ is at most countable. Since the open connected sets $\Bbb R$ are open intervals, $\{G_\alpha\}$ is a countable collection of disjoint, open intervals.

The first two facts allow us to see some generalizations. Namely any open set in a locally-connected, ccc space is a countable disjoint union of connected open sets. This applies to any Euclidean space. Although open connected subsets of Euclidean space are more complicated than open intervals, they are still relatively well-behaved.

-
What does "R is ccc" mean? –  Christian Bueno Feb 24 at 8:39
It means "satisfies the countable-chain condition" which really concerns itself with anti-chains. It means that every collection of disjoint open sets is at most countable. Every separable space is ccc. –  Bryan Feb 25 at 0:56
Ok thanks for clearing that up. –  Christian Bueno Feb 25 at 5:18
how to decompose (0,1} into a countable union of disjoint open intervals? –  Frank Mar 27 at 15:31

The following is certainly not the quickest approach to a proof, but when this question was first posed to me in class, my first intuition was to use some elementary graph theory:

Let $U$ be an open set of $\mathbb{R}$. As we know, $\mathbb{R}$ has a countable basis $\mathcal{B}$ comprised of connected open sets and so we may write $U=\bigcup_{n\in I} U_n$, where for each $n$ we have $U_n\in\mathcal{B}$ and $I$ is some countable index set.

Let $G$ be the intersection graph of $\{U_n\}$. That is to say, the vertex set of $G$ is simply $\{U_n\}$ and there is an edge between $U_i$ and $U_j$ iff they have nonempty intersection. It's easy to convince yourself that:

• This graph must have countably many graphically-connected components (otherwise we'd have uncountably many vertices which is impossible).
• The intersection graph of $A\subseteq\{U_n\}$ is graphically-connected iff for any two $V,W\in A$ there is a sequence $V=U_{n_1},U_{n_2},\ldots,U_{n_k}=W$ such that $U_{n_i}\cap U_{n_{i+1}}\neq\varnothing$.
• The union $\bigcup A$ is a connected set of $\mathbb{R}$ whenever the intersection graph of $A$ is graphically-connected.

Thus, when we take the union of all the vertices within a graphically-connected component, for every component, we obtain countably-many connected open sets. The union of these sets is of course $U$ itself. Since the connected open sets of $\mathbb{R}$ are intervals (including rays), we're done.

Side Note: This would also work in $\mathbb{R}^n$ or in general, any topological space $X$ that has a countable basis comprised of connected sets. Well, so long as we replace countable union of disjoint open intervals with countable union of disjoint open connected sets.

-