I'm so stuck with the next problem. First, the definition that I have are the next:
$X$ is totally disconnected if for all $x\in X$ we have that $C_x=\{x\}$ where $C_x$ is the connected component.
Let $A,B\subseteq\mathbb{R}$ be a compact and totally disconnected sets. Prove that $A\cup B$ is also totally disconnected.
We have two cases:
1) If $A\cap B=\emptyset$ then, take $x\in A\cup B$ and $C_x$ the connected component of $x$. Because $\mathbb{R}$ is normal and $A,B$ are two disjoint closed sets (they are compacts) then there exists $U,V\subseteq\mathbb{R}$ disjoint open sets such that $A\subseteq U$ and $B\subseteq V$. Therefore, without loss of generality, because $C_x$ is connected, $C_x\subseteq U$ and thus $C_x\subseteq A$. We conclude that $C_x=\{x\}$.
2) $A\cap B\neq\emptyset$. Here is where I'm stuck. Take $x\in A\cup B$ and suppose by contradiction that $|C_x|\geq 2$. Then, $C_x\not\subseteq A$ and $C_x\not\subseteq B$ (because the connected sets in $A$ and $B$ have only one point) but $C_x\cap A\neq\emptyset$ and $C_x\cap B\neq\emptyset$. I don't know how can I conclude the proof. Any hint? I really appreciate any help you can provide.
First of all recall that a subset of $\mathbb{R}$ is connected if and only if it is an interval. The same holds for intervals as well: a subset of an interval is connected if and only if it is again an interval. Here by interval I understand a subset $I\subseteq\mathbb{R}$ such that if $a,b\in I$ and $a<c<b$ for some $c\in \mathbb{R}$ then $c\in I$.
Assume that $A\cup B$ is not totally disconnected. Then $[a,b]\subseteq A\cup B$ for some $a,b\in A\cup B$, $a<b$. Let $I=[a,b]$.
Since both $A,B$ are compact (actually closed in $\mathbb{R}$ is enough) then $I\cap A$ and $I\cap B$ are closed. Both are nonempty and their union is $I$ and thus we can rephrase the problem:
Let $I=A\cup B$. Both subsets have to be proper otherwise they wouldn't be totally disconnected. Since $A$ is closed then $I\backslash A$ is open in $I$. Thus $I\backslash A\subseteq B$ and so $B$ is not totally disconnected because it contains an open subset of $I$ (which contains an interval by definition). Contradiction.