% vim: tw=50
% 15/11/2022 11AM

\begin{enumerate}[(1)]
    \setcounter{enumi}{1}
\item[] \vspace{-1\baselineskip}$X$ connected if and only
        if whenever
        $U, V \subset X$ are open and disjoint
        with $X = U \cup V$ then $U = \emptyset$
        or $V = \emptyset$. \myskip
        Again, could replace
        `open' by `closed'. \myskip
        If $X$ is disconnected, we say the sets
        $U, V$ in the definition \emph{disconnect}
        $X$.
    \item Connectedness is a topological property.
    \item If $S \subset X$, $X$ a topological
        space, what does our definition of
        connectedness say when applied to $S$? Of
        course as usual $S$ has the subspace
        topology from $X$ so is a topological
        space in its own right. \\
        $S$ is disconnected if and only if there
        exist open sets $U, V \subset X$ such that
        $S \cap U \cap V = \emptyset$ and $S
        \subset U \cup V$, $S \cap U \neq
        \emptyset$, $S \cap V \neq \emptyset$.
        Again, we say $U, V$
        disconnect $S$.
        \begin{warning*}
            We \emph{don't} necessarily need to
            have $U \cap V = \emptyset$: for
            example in $\NN$ with the cofinite
            topology, the set $\{1, 2\}$ is
            disconnected in $\NN$ by the open sets
            $\NN \setminus \{1\}, \NN \setminus
            \{2\}$. We have
            \[ (\NN \setminus \{1\}) \cap (\NN
            \setminus \{2\}) \cap \{1, 2\} =
            \emptyset \]
            but
            \[ (\NN \setminus \{1\}) \cap (\NN
            \setminus \{2\}) \neq \emptyset .\]
            Indeed, if $U, V \subset \NN$ are open
            and non-empty then $U \cap V \neq
            \emptyset$.
        \end{warning*}
        \noindent
        $S$ connected if and only if whenever $U,
        V \subset X$ are open and $S \subset U
        \cap V$ and $S \cap U \cap
        V = \emptyset$ then either $S \cap U =
        \emptyset$ or $S \cap V = \emptyset$.
        \myskip
        Finally, as in remark 1, could replace
        `open' with `closed' in these
        reformulations of the definition.
\end{enumerate}

\noindent
Which subsets of $\RR$ are connected?

\begin{flashcard}[interval-in-R]
\begin{definition*}
    A subset $I \subset \RR$ is an \emph{interval}
    if \cloze{whenever $a < b < c$ with $a, c \in I$ then
    $b \in I$.}
\end{definition*}
\end{flashcard}

\begin{proposition}
    Let $I \subset \RR$ with the usual topology.
    Then $I$ is connected if and only if $I$ is an
    interval.
\end{proposition}

\begin{proof}
    \begin{enumerate}
        \item[$\Rightarrow$] Suppose $I$ not an
            interval. Then we can find $a < b < c$
            with $a, c \in I$ but $b \not\in I$.
            Then $(-\infty, b)$ and $(b, \infty)$
            disconnect $I$ in $\RR$.
        \item[$\Leftarrow$] Suppose $I$ is an interval.
            Work in subspace topology on $I$. Let
            $S \subset I$ be open, closed and
            non-empty. Let $a \in S$. \myskip
            Suppose we have $b \in I \setminus S$.
            Without loss of generality $b > a$.
            Let $c = \sup([a, b] \cap S)$. Then we
            can find a sequence $(x_n)$ in $S$
            with $x_n \to c \in I$> But $S$ is
            closed in $I$ so $c \in S$. In
            particular, $c \neq b$, so $c < b$.
            \myskip
            But also $S$ is open in $I$ so there
            exists $\delta > 0$ such that $(c -
            \delta, c + \delta) \subset S$,
            without loss of generality $\delta < b
            - c$. Then $c + \frac{\delta}{2} \in S
            \cap [a, b]$, contradiction to the
            supremum property. So in fact, $S =
            I$. So $I$ is connected. \qedhere
    \end{enumerate}
\end{proof}

\myskip
Another equivalent version of the definition of
connectedness:

\begin{theorem}
    Let $X$ be a topological space. Then $X$
    connected if and only if every continuous
    function $f : X \to \ZZ$ (with usual topology)
    is constant.
\end{theorem}

\begin{proof}
    \begin{enumerate}
        \item[$\Rightarrow$] Suppose $X$ is
            connected and $f : X \to \ZZ$
            continuous. For any $n \in \ZZ$,
            $\{n\} \subset \ZZ$ is open and
            closed, so $f^{-1}(\{n\}) \subset X$
            is open and closed, so $f^{-1}(\{n\})
            = \emptyset$ or $f^{-1}(\{n\}) = X$.
            So $f$ is constant.
        \item[$\Leftarrow$] Suppose $U, V$
            disconnect $X$. Define $f : X \to \ZZ$
            by
            \[ f(x) = \begin{cases}
                0 & x \in U \\
                1 & x \in V
            \end{cases} \]
            Then for any $A \subset \ZZ$,
            $f^{-1}(A) = \emptyset, X, U \text{ or
            } V$, so $f^{-1}(A)$ is open. So $f$
            is continuous and non-constant. \qedhere
    \end{enumerate}
\end{proof}

\subsubsection*{Remarks}

\begin{enumerate}[(1)]
    \item Theorem 42 together with Intermediate
        value theorem can provide an alternative
        proof of Proposition 41.
    \item Theorem 42 remains true with same proof
        if $\ZZ$ is replaced by any discrete
        topological space $Y$ with $|Y| \ge 2$.
\end{enumerate}

\begin{flashcard}[ConnectedContImage]
\begin{proposition}
    A continuous image of a connected space is
    \cloze{connected.}
\end{proposition}
\end{flashcard}

\begin{proof}
    Let $X$ be a connected topological space, let
    $Y$ be a topological space and let $f : X \to
    Y$ be continuous. Suppose $U, V \subset Y$ are
    open with $f(X) \subset U \cup V$ and $U \cap V
    \cap f(X) = \emptyset$. As $f$ continuous,
    $f^{-1}(U), f^{-1}(V) \subset X$ are open.
    Also $X = f^{-1}(U0 \cup f^{-1}(V)$ and
    $f^{-1}(U) \cap f^{-1}(V) = \emptyset$. As $X$
    connected without loss of generality we have
    $f^{-1}(U) = \emptyset$. Then $U \cap f(X) =
    \emptyset$. So $f(X)$ is connected.
\end{proof}

\begin{flashcard}[ConnectedProduct]
\begin{proposition}
    A product of connected spaces is
    \cloze{connected.}
\end{proposition}
\end{flashcard}

\begin{hiddenflashcard}[connected-product-is-connected-proof]
Proof that product of connected spaces is
connected? \\
\cloze{
If $Y = \emptyset$, then $X \times Y = \emptyset$
so trivially connected. So assume $Y \neq
\emptyset$. \\
Suppose $U, V$ disconnect $X \times Y$. Fix $x \in
X$. Noting that $\{x\} \times Y$ homeomorphic to
$Y$ (just check the obvious homeomorphism is in
fact a homeomorphism), we have $\{x\} \times Y$
connected, so $\{x\} \times Y \subset U$ or $V$,
otherwise $U, V$ disconnect it. \\
Hence we can define
\[ A = \{x \in X \mid \{x\} \times Y \subset U\} \]
\[ B = \{x \in X \mid \{x\} \times Y \subset V\} \]
and the above observation proves $A \cup B = X$.
Clearly have $A \cap B = \emptyset$, since $U \cap
V = \emptyset$. \\
Suppose $x \in A$. Pick $y \in Y$ (we assumed $Y$
non-empty). Then since $U$ open, there exists open
$S \subset X$, $T \subset Y$ such that $(x, y) \in
S \times T$. Then for all $x' \in S$, $(x', y) \in
U$ hence $x' \in A$. So $x \in T \subset A$, so
$A$ is a neighbourhood of $x$. Hence $A$ open. \\
Similarly $B$ open. Since $U$, $V$ disconnect $X
\times Y$, they are non-empty, so $A$ and $B$
non-empty, so $A$ and $B$ disconnect $X$,
contradiction.
}
\end{hiddenflashcard}

\begin{proof}
    Let $(X, \tau)$ and $(Y, \sigma)$ be connected
    topological spaces, and let $\rho$ be the
    product topology on $X \times Y$. Suppose $U,
    V \in \rho$ with $U \cap V = \emptyset$ and
    $U \cap V = X \times Y$. We want to show $U =
    \emptyset$, $V = X \times Y$ or $U = X \times
    Y$, $V = \emptyset$. \\
    Fix $x \in X$. Then $\{x\} \times Y$ is
    homeomorphic to $Y$ (Exercise - Example sheet
    3). In particular, $\{x\} \times Y$ is
    connected. Then $\{x\} \times Y \subset U$ or
    $\{x\} \times Y \subset V$ as otherwise $U, W$
    would disconnect $\{x\} \times Y$ in $X \times
    Y$. So let
    \[ A = \{x \in X \mid \{x\} \times Y \subset
    U\} \]
    and
    \[ B = \{x \in X \mid \{x\} \times Y \subset
    V\} \]
    Clearly $A \cap B = \emptyset$ (as $U \cap V =
    \emptyset$). And we've just proved $X = A \cup
    B$. \myskip
    Suppose $x \in A$. So $\{x\} \times Y \subset
    U$. Then (assuming $U \neq \emptyset$, which
    we can do without loss of generality, since if
    $Y = \emptyset$ then $X \times Y$ is clearly
    connected) pick any $y \in Y$. Then $(x, y)
    \in U$. $U$ is open so can find $T \in \tau$,
    $S \in \sigma$ such that $(x, y) \in T \times
    S \subset U$. In particular, for all $w \in
    T$ then $(w, y) \in U$ and so $\{w\} \times Y
    \subset U$, i.e. $w \in A$. We now have $T \in
    \tau$ with $x \in T \subset A$ so $A$ is a
    neighbourhood of $x$ in $X$. Hence $A$ is
    open. \myskip
    Similarly $B$ is open. But $X$ is connected,
    so $A = \emptyset$ giving $U = \emptyset$ or
    $B = \emptyset$ giving $V = \emptyset$. Hence
    $X \times Y$ is connected.
\end{proof}

\begin{example*}
    Recall $[-1, 0) \cap (0, 1]$ is not connected.
    But it \emph{is} a disjoint union of connected
    sets: $[-1, 0) \cup (0, 1]$. Moreover, any
    proper superset of $[-1, 0)$ or $(0, 1]$ in
    $[-1, 0) \cup (0, 1]$ is disconnected.
\end{example*}

\begin{flashcard}[connected-component-defn]
\begin{definition*}
    Let $X$ be a topological space. A
    \emph{connected component} of $X$ is \cloze{a maximal
    connected subset of $A$ of $X$: that is to
    say, $A$ is connected but if $A \subset B
    \subset X$ with $B$ connected then $A = B$.}
\end{definition*}
\end{flashcard}

\begin{theorem}
    The connected components of a topological
    space $X$ form a partition of $X$.
\end{theorem}

\begin{proof}
    Define $\sim$ on $X$ by $x \sim y$ if and only
    if $\exists A \subset X$ connected with $x, y
    \in A$. Clearly $\sim$ is reflexive ($\{x\}$
    is connected) and it is symmetric by the way
    we defined it. So we want to show $\sim$ is
    transitive. \myskip
    Suppose $x, y, z \in X$ with $x \sim y$ and $y
    \sim z$. Then $\exists A, B \subset X$
    connected with $x, y \in A$ and $y, z \in B$.
    Now $x, z \in A \cup B$. Suppose $U, V$
    disconnect $A \cup B$ in $X$. Without loss of
    generality $y \in U$. Pick $w \in V \cap (A
    \cup B)$. Without loss of generality $w \in
    A$. But also $y \in A$ so $U, V$ disconnect
    $A$. So $A \cup B$ is connected so $x \sim z$.
    \\
    Hence $\sim$ is an equivalence relation.
    \noindent
    Suppose $S$ is an equivalence class of $\sim$.
    Suppose $U, V$ disconnect $S$. Then can find $x
    \in U \cap S$, $y \in V \cap S$ and $U \cap V \cap
    S = \emptyset$. Then $x \sim y$ so there is a
    connected $A \subset X$ with $x, y \in A$. For all
    $z \in A$, $x, z \in A$ connected so $x \sim z$ so
    $z \in S$. So $A \subset S$ and so $U \cap V \cap
    A = \emptyset$ so $U, V$ disconnect $A$,
    contradiction. So $S$ is connected. \\
    Suppose $S \subset T \subset X$ with $T$
    connected. Let $x \in S$. Then for all $y \in T$,
    $x, y \in T$ with $T$ connected so $x \sim y$.
    Thus $T \subset S$. So $S = T$. So $S$ is a
    connected component. \myskip
    Finally, let $R$ be a connected component. Let $x,
    y \in R$. Then, as $R$ is connected, $x \sim y$.
    So $R$ is connected in some equivalence class $Q$
    of $\sim$. But $R \subset Q$ with $Q$ connected so
    $R = Q$. \myskip
    So the equivalence classes of $\sim$ are precisely
    the connected components.
\end{proof}
