Definition 4.12.1 (Connected). Let $X$ be a topological space, then the following are equivalent:
For any $\emptyset \ne U, V \subset X$ open with $U \cup V = X$, $U \cap V \ne \emptyset$.
There exists no surjective $f \in C(X; \bracs{0, 1})$.
For any $U \subset X$ open and closed, either $U = \emptyset$ or $U = X$.
If the above holds, then $X$ is connected.
Proof. $(1) \Rightarrow (2)$: Let $f \in C(X; \bracs{0, 1})$, then $X = f^{-1}(0) \cup f^{-1}(1)$. If $f$ is surjective, then $f^{-1}(0) \cap f^{-1}(1) \ne \emptyset$, which is impossible.
$\neg (1) \Rightarrow \neg (2)$: If there exists $\emptyset \ne U, V \subset X$ open with $X = U \sqcup V$, then $f = \one_{U} \in C(X; \bracs{0, 1})$ is surjective.
$\neg (3) \Rightarrow \neg (1)$: Let $\emptyset \ne U \subsetneq X$ be open and closed, then $X = U \sqcup U^{c}$ is a disjoint union of two non-empty open sets.
$\neg (1) \Rightarrow \neg (3)$: Let $\emptyset \ne U, V \subset X$. If $X = U \sqcup V$, then $\emptyset \ne U \subsetneq X$ is open and closed.$\square$