# Is a compact set an union of a finite number of disjoint closed intervals?

I think it is true for $\mathbb R$ with usual metric. How about others? How to prove it?

Motivation: I got this idea when I was reading a proof for Lebesgue's Criterion of Riemann Integrability, here it is: .

Please note the red marker: "[$[a,b] - \mathop {\cup}^{n}_{j = 1} I_j$] is a finite union of closed intervals". I think [$[a,b] - \mathop {\cup}^{n}_{j = 1} I_j$] is compact here. I've no idea how to prove the equivalence.

P.S. here is the definition of Lebesgue outer measure of Carothers' Real Analysis:

• @graydad: [0,0.5]∪[0.5,1] or almost like this? – Bear and bunny Mar 23 '15 at 0:35
• @graydad: ohhh, I was wrong. – Bear and bunny Mar 23 '15 at 0:40
• @graydad: how about removal of disjointedness that is a compact set an union of closed intervals? what do you think about it? – Bear and bunny Mar 23 '15 at 0:43
• @graydad: That's a little bit weird here. I've updated my original idea of this problem. – Bear and bunny Mar 23 '15 at 1:01

No. See the Cantor set, which contains no proper interval.

• how about removal of disjointedness that is a compact set an union of closed intervals? – Bear and bunny Mar 23 '15 at 0:38
• No, the Cantor set is far more complicated than that. It contains uncountably many connected components and it contains no interval. So it cannot be a union of closed intervals. The answer to your question is no. – shalop Mar 23 '15 at 1:32
• @Shalop: Thank you Shalop. That's a little bit weird coz it comes from a part of proof for Lebesgue's Criterion of Riemann Integrability(see my update). Did I get a incorrect rephrase of the problem there? – Bear and bunny Mar 23 '15 at 1:37
• @Frank_W The set in the proof is compact of the form expected by you. However limits of such sequences of sets are compact (because closed and bounded in finite dimensional space), but their structure may be much more complicated. In particular they may be uncountable but without any interval. – Przemysław Scherwentke Mar 23 '15 at 13:34
• @PrzemysławScherwentke: so the proof is incorrect there? – Bear and bunny Mar 23 '15 at 15:01

For a less pathological example than the Cantor set, consider

$$\{0\}\cup\bigcup_{n=1}^\infty\left\{\frac1n\right\}$$

I think I've fully understood this question. Yes, Przemysław Scherwentke's answer here is correct. However, [$[a,b] - \mathop {\cup}^{n}_{j = 1} I_j$] is more complicated than the general title coz $I_j$ and [a,b] both are intervals here(distinct by open and closed) that means they all have interiors that are not empty. Since {$j$} is finite, that means if {$I_j$} are disjoint each other, it will be trivial to show a finite union((n+1) elements) of closed intervals; Otherwise, suppose {$I_j$} have been rearranged from small to large by values of left endpoints. Without loss of generality, there exist $I_k$ and $I_m$ are not disjoint that imply the interval between left endpoints of $I_k$ and $I_m$ will be covered by $I_k$. Apparently, a finite union(less than (n+1) elements) of closed intervals are trivial again. Indeed, {$I_j$} is a cover for all points whose oscillation equal or greater than $1/k$, so it should be chosen as disjoint each other as possible.

In particular, One example of nowhere continuous function is the indicator function of the rational numbers on $[0,1]$, also known as the Dirichlet function on $[0,1]$. It is not Riemann Integrable and neither is indicator function of the irrational numbers. Actually, Lebesgue Outer measure of discontinuous points of Dirichlet function on $[0,1]$ is $1$ which means m*(${ω_f≥1/k}$) $> 0$ when $k≥N$ where ∃ $N∈ \mathbb N^+$. So reverse implication of the proof can not work on the Dirichlet function on $[0,1]$.