My text gives the definition that $E$ is disconnected if there exist disjoint open sets $A, B$ such that:
- $A \cap E$, $B \cap E$ are nonempty.
- $(A \cap E) \cup (B \cap E) = E$.
Then for the $(\implies)$ direction, the text offers the following as proof:
Suppose $E$ is an interval and $E$ is not connected. Then there exist disjoint open sets $A$, and $B$ with $A \cap E \ne \emptyset$, $B \cap E \ne \emptyset$, and $E \subset A \cup B$. Suppose $a \in A \cap E$ and $b \in B \cap E$. Inasmuch as $E$, an open set in $\mathbb R$ is a finite or countable union of open and disjoint intervals, there exist disjoint open intervals $I$ and $J$ such that $a \in I$ and $b \in J$. Suppose $a < b$ and $J = (t, s)$. Since $a < t < b$, $t \in E$. However, $t \notin A \cup B$, creating a contradiction.
Is the part with $E$ being a finite or countable union of open and disjoint intervals necessary? I did it in a much simpler way: Without loss of generality, call the open set on the left $A$, with $a \in A \cap E$, and call the open set on the right $B$, with $b \in B \cap E$. Now, set $c =$ sup$A$; $a < c < b \rightarrow c \in E$. Since $c$ is a boundary point of $A$ and $A^c$, $c \notin A$. But $c \notin B$ either. Otherwise, there is a $\delta$ such that $N(c, \delta) \subset B$, entailing that $A \cap B$ is nonempty, which is not possible. As a result, we have $c \in E$ and $c \notin E$, a contradiction.
Why did the book need to use the fact that $E$ is a union of open, disjoint intervals?