Are the only sets in $\mathbb{R^1}$ which are both open and closed $\mathbb{R^1}$ and $\emptyset$? As the topic, how to prove that the only set in $\mathbb{R^1}$ which are both open and close are the $\mathbb{R^1}$ and $\emptyset$. I tried to prove by contradiction, but i can't really show that the assumption implies the contrary.

Assume $U$ and its complement $V$ are both non-empty open subsets of $\mathbb R$. Then there are $x \in U$ and $y \in V$ and by switching the roles of $U$ and $V$, if necessary, we may assume $x < y$. Now let
$$a = \sup\{b \in \mathbb R : [x,b] \subseteq U \}$$
(the supremum exists since $x \in U$ and $y \not\in U$ and $x<y$). If $a \in U$ then, since $U$ is open, $a + \varepsilon \in U$ for small $\varepsilon$, contradicting the definition of $a$. Otherwise, if $a \in V$ then, since $V$ is also open, $a-\varepsilon \in V$ for small $\varepsilon$, again contradicting the definition of $a$.
