Continuous Two-Valued Function Criterion for Disc. Topo. Spaces

Continuous Two-Valued Function Criterion for Disconnected Topological Spaces

We will now look at a very nice theorem which tells us that a topological space $X$ is disconnected with a separation $\{ A, B \}$ if and only if there exists a continuous and surjective function $f : X \to \{0, 1 \}$ (where $\{ 0, 1 \}$ has the discrete topology) which maps all of $A$ to $0$ and all of $B$ to $1$.

 Theorem 1: Let $X$ be a topological space and let $\{ 0, 1 \}$ be the topological space with the discrete topology. Then $X$ is disconnected if and only if there exists a continuous surjective function $f : X \to \{ 0, 1 \}$.
• Proof: $\Rightarrow$ Suppose that $X$ is a disconnected topological space. Then there exists $A, B \subset X$, $A, B \neq \emptyset$, $A \cap B = \emptyset$, and:
(1)
\begin{align} \quad X = A \cup B \end{align}
• Define a function $f : X \to \{0, 1\}$ for all $x \in X$ by:
(2)
\begin{align} \quad f(x) = \left\{\begin{matrix} 0 & \mathrm{if} \: x \in A\\ 1 & \mathrm{if} \: x \in B \end{matrix}\right. \end{align}
• Clearly $f$ is surjective since $f(X) = \{ 0, 1 \}$. We only need to show that $f$ is continuous.
• Since $\{ 0, 1 \}$ has the discrete topology we have that every subset of $\{ 0, 1 \}$ is open. More precisely, $\emptyset$, $\{ 0 \}$, $\{ 1 \}$, and $\{ 0, 1 \}$ are all open in $\{ 0 , 1 \}$. Notice that:
(3)
\begin{align} \quad f^{-1}(\emptyset) = \emptyset \end{align}
(4)
\begin{align} \quad f^{-1}(\{ 0 \}) = A \end{align}
(5)
\begin{align} \quad f^{-1}(\{ 1 \}) = B \end{align}
(6)
\begin{align} \quad f^{-1}(\{0, 1 \}) = A \cup B = X \end{align}
• In all cases we see that the inverse images of open sets in $\{ 0 , 1 \}$ are open in $X$. Therefore $f$ is continuous.
• $\Rightarrow$ Suppose that there exists a continuous and surjective map $f : X \to \{ 0, 1 \}$. We claim that then $\{ f^{-1}(\{ 0 \}), f^{-1}(\{ 1 \}) \}$ is a separation of $X$. Since $f$ is continuous, $f^{-1}(\{ 0 \})$ and $f^{-1}(\{ 1 \})$ are both open in $X$, and since $f$ is surjective, $f^{-1}(\{ 0 \}) \neq \emptyset$ and $f^{-1}(\{ 1 \}) \neq \emptyset$ and:
(7)
\begin{align} \quad X = f^{-1}(\{0 \}) \cup f^{-1}(\{ 1 \}) \end{align}
• We only need to show that $f^{-1}(\{ 0 \}) \cap f^{-1}(\{ 1 \}) = \emptyset$. Suppose not. Then there exists an $x \in f^{-1}(\{ 0 \}) \cap f^{-1}(\{ 1 \})$. So $f(x) \in \{ 0 \}$ and $f(x) \{ 1 \}$. But this implies that $f(x) = 0$ AND $f(x) = 1$ which is a contradiction.
• Thus $\{ f^{-1}(\{ 0\}), f^{-1}(\{ 1 \}) \}$ is a separation of $X$, so $X$ is disconnected. $\blacksquare$