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

\begin{flashcard}[TopCloseOpen]
    \begin{definition*}
        Let $(X, \tau)$ be a topological space. We
        say $G \subset X$ is \emph{open} if
        \cloze{$G \in \tau$}.
        We say $F$ is \emph{closed} if \cloze{$X
        \setminus F \in \tau$}.
    \end{definition*}
\end{flashcard}

\begin{flashcard}[TopNbd]
    \begin{definition*}
        Let $(X, \tau)$ be a topological space.
        A subset $\mathcal{N} \subset X$ is a
        \emph{neighbourhood} of $a \in X$ if
        \cloze{there exists $G \subset X$ open
        with $a \in G \subset \mathcal{N}$.}
    \end{definition*}
\end{flashcard}

\begin{flashcard}[TopCtsFn]
    \begin{definition*}
        Let $(X, \tau)$ and $(Y, \sigma)$ be
        topological spaces. Let $f : X \to Y$. We say
        $f$ is \emph{continuous} if \cloze{whenever $G
        \subset Y$ is open then $f^{-1}(G) \subset X$
        is open; that is, $f$ is continuous if
        $\forall G \in \sigma$, $f^{-1}(G) \in \tau$.}
    \end{definition*}
\end{flashcard}

\begin{flashcard}[TopCtsFnAtA]
    \begin{definition*}
        Let $(X, \tau)$ and $(Y, \sigma)$ be
        topological spaces.
        We say $f$ is \emph{continuous at $a \in
        X$} if \cloze{whenever $\mathcal{N} \subset Y$ is
        a neighbourhood of $f(a)$ then
        $f^{-1}(\mathcal{N}) \subset X$ is a
        neighbourhood of $a$.}
    \end{definition*}
\end{flashcard}

\begin{flashcard}[TopHomeomorphismDefn]
    \begin{definition*}
        Let $(X, \tau)$, $(Y, \sigma)$ be
        topological spaces. We say $f$ is a
        \emph{homeomorphism} and $X$, $Y$ are
        \emph{homeomorphic} if \cloze{$f$ is a bijection
        and both $f$ and $f^{-1}$ are continuous.}
    \end{definition*}
\end{flashcard}

\begin{flashcard}[TopologicalProperty]
    \begin{definition*}
        Let $(X, \tau)$, $(Y, \sigma)$ be
        topological spaces. We say that a property
        is \emph{topological} if \cloze{it is
        preserved by homomorphisms; that is to
        say, if $X, Y$ are homeomorphic then $X$
        has the property if and only if $Y$ does.}
    \end{definition*}
\end{flashcard}

\subsubsection*{Remarks}

\begin{enumerate}[(1)]
    \item If $\tau$ is induced by a metric then
        this is all consistent with the metric
        space definitions of these concepts.
    \item Given our definition: $G$ is open if and
        only if $G \in \tau$, often don't need to
        explicitly name the topology. For example,
        let $X = \RR$ with the usual topology and
        $G \subset X$ be open. Other times more
        convenient to specify $\tau$, write `$G
        \in \tau$' etc.
    \item Homeomorphism is an ``equivalence
        relation''.
    \item If $a \in G$ and $G$ open then $G$ is a
        neighbourhood of $a$, however,
        neighbourhoods need not be open in
        general. A set $G \subset X$ is open if
        and only if $G$ is a neighbourhood of each
        of its points.
\end{enumerate}

\begin{proposition}
    Let $X, Y$ be topological spaces and let $f :
    X \to Y$. Then $f$ is continuous if and only
    if for all $a \in X$, $f$ is continuous at
    $a$.
\end{proposition}

\begin{proof}
    \begin{enumerate}
        \item[$\Rightarrow$] Suppose $f$
            continuous and let $a \in X$. Let
            $\mathcal{N} \subset Y$ be a
            neighbourhood of $f(a)$. Then there is
            an open set $G \subset Y$ with $a \in
            G \subset \mathcal{N}$. As $f$
            continuous, $f^{-1}(G) \subset X$
            open. Now $a \in f^{-1}(G) \subset
            f^{-1}(\mathcal{N})$ with $f^{-1}(G)$
            open.
        \item[$\Leftarrow$] Suppose for all $a \in
            X$ we have $f$ continuous at $a$. Let
            $G \subset Y$ be open. Let $a \in
            f^{-1}(G)$. Then $f(a) \in G$, but $G$
            is open so $G$ is a neighbourhood of
            $f(a)$. Now $f$ is continuous at $a$
            so $f^{-1}(G)$ is a neighbourhood of
            $a$ in $X$. But $a$ was arbitrary so
            $f^{-1}(G)$ is a neighbourhood of each
            of its points. That is, $f^{-1}(G)
            \subset X$ is open. Hence $f$ is
            continuous.
    \end{enumerate}
\end{proof}

\begin{proposition}
    Let $(X, \tau)$, $(Y, \sigma)$, $(Z, \rho)$ be
    topological spaces, let $f : X \to Y$ be
    continuous and let $g : Y \to Z$ be
    continuous. Then $g \circ f : X \to Z$ is
    continuous.
\end{proposition}

\begin{proof}
    Let $G \in \rho$. As $g$ is continuous,
    $g^{-1}(G) \in \sigma$. As $f$ continuous,
    $f^{-1}(g^{-1}(G)) \in \tau$. That is, $(g
    \circ f)^{-1}(G) \in \tau$. So $g \circ f$ is
    continuous.
\end{proof}

\subsubsection*{Examples}

\begin{enumerate}[(1)]
    \item The discrete topology: Let $X$ be any
        set and $\tau = \mathcal{P}(X)$. `Every
        set is open'. However, this is not new: it
        is induced by the discrete metric
        \[ d(x, y) = \begin{cases}
            1 & x \neq y \\
            0 & x = y
        \end{cases} \]
        Now in $(X, d)$, for any $x \in X$ then
        $\{x\} = B_1(x)$ is open and so if $G
        \subset X$ then $G = \bigcup_{x \in G}
        \{x\}$ is open.
        \begin{hiddenflashcard}[discrete-topology]
            Discrete topology? \\
            \[ \cloze{\tau = \mathcal{P}(X)} \]
        \end{hiddenflashcard}
    \item The indiscrete topology: Let $X$ be any
        set and $\tau = \{\emptyset, X\}$. `Only
        open sets are $\emptyset$ and the whole
        space'. This is genuinely new: $\tau$
        cannot be induced by a metric (if $|X| \ge
        2$). Indeed, suppose $|X| \ge 2$ and that
        $\tau$ is induced by a metric $d$. Let $x,
        y \in X$ with $x \neq y$, so $d(x, y) =
        \delta > 0$, say. Then $B_\delta(x)$ is
        open with $x \in B_\delta(x)$ and $y
        \not\in B_\delta(x)$, contradiction.
        \begin{hiddenflashcard}[indiscrete-topology]
            Indiscrete topology? \\
            \[ \cloze{\tau = \{\emptyset, X\}} \]
        \end{hiddenflashcard}
    \item The cofinite topology: Let $X$ be any
        infinite set and let
        \[ \tau = \{G \subset X \mid X \setminus
        G \text{ is finite}\} \cup \{\emptyset\} \]
        Check this is a topology:
        \begin{enumerate}[(i)]
            \item $\emptyset \in \tau$, $X
                \setminus X = \emptyset$ is
                finite so $X \in \tau$.
            \item Let $\sigma \in \tau$. If
                $\sigma$ is empty or contains
                $\emptyset$ then $\bigcup_{G \in
                \sigma} G = \emptyset \in \tau$.
                Otherwise, pick $H \in \sigma$
                with $H \neq \emptyset$. Then $X
                \setminus H$ is finite so
                \[ \left( X \setminus \bigcup_{G
                \in \sigma} G \right) = \bigcap_{G
                \in \sigma} (X \setminus G)
                \subset X \setminus H \]
                is finite. So $\bigcup_{G \in
                \sigma} G \in \tau$.
            \item Let $G, H \in \tau$. If $G =
                \emptyset$ or $H = \emptyset$ then
                $G \cap H = \emptyset \in \tau$.
                Otherwise $X \setminus G$, $X
                \setminus H$ are finite and then
                \[ (X \setminus (G \cap H)) = (X
                \setminus G) \cup (X \setminus H) \]
                is finite. So $G \cap H \in \tau$.
        \end{enumerate}
        So the cofinite topology is indeed a
        topology. \\
        Is it induced by a metric $d$? No: observe
        first that if $G, H$ are open and
        non-empty then $G \cap H \neq \emptyset$.
        Now suppose $x, y \in X$ with $x \neq y$.
        Then $d(x, y) = \delta > 0$ so
        $B_{\frac{\delta}{2}}(x)$,
        $B_{\frac{\delta}{2}}(y)$ are non-empty
        disjoint open sets. So $d$ doesn't induce
        $\tau$.
    \item The cocountable topology: Let $X$ be any
        uncountable set and let
        \[ \tau = \{G \subset X \mid X \setminus G
        \text{ countable}\} \cup \{\emptyset\} \]
        Then, very similarly to (3), this is a
        topology that is not induced by any
        metric.
\end{enumerate}

\subsection{Sequences and Hausdorff spaces}

\begin{flashcard}[TopConvergentSeq]
    \begin{definition*}
        Let $X$ be a topological space, let
        $(x_n)$ be a sequence in $X$ and let $x
        \in X$. We say $(x_n)$ \emph{converges} to
        $x$ and write $x_n \to x$ if \cloze{whenever
        $\mathcal{N} \subset X$ is a neighbourhood
        of $x$ then there exists $N$ such that for
        all $n \ge N$, $x_n \in \mathcal{N}$.}
    \end{definition*}
\end{flashcard}

\subsubsection*{Examples}

\begin{enumerate}[(1)]
    \item Let $X$ be an uncountable set with the
        cocountable topology. Which sequences
        converge in $X$? Suppose $x_n \to x$. Then
        let
        \[ \mathcal{N} = (X \setminus \{x_n \mid n
        \in \NN\}) \cup \{x\} \]
        Then $\mathcal{N}$ is open and $x \in
        \mathcal{N}$ so $\mathcal{N}$ is a
        neighbourhood of $x$. So there exists $N$
        such that for all $N \ge N$, $x_n \in
        \mathcal{N}$. So there exists $N$ such
        that for all $n \ge N$, $x_n = x$.
        Obviously if there exists $N$ such that
        for all $n \ge N$, $x_n = x$ then $x_n \to
        x$. So the only convergent sequences in
        this space are eventually constant.
        \begin{hiddenflashcard}[topology-only-convergent-sequences-are-eventually-constant]
            Example of a topology for which all
            convergent sequences are eventually
            constant? \\
            \cloze{
            \fcemph{Cocountable topology} on an uncountable
            set $X$ (we don't need the
            uncountableness, but uncountable makes
            it so that the space is not induced by
            any metric).
            }
        \end{hiddenflashcard}
    \item Let $X = \{1, 2, 3\}$ with the
        indiscrete topology. Let $x_n = i \in X$
        with $i \equiv n \pmod{3}$. So the
        sequence is $1, 2, 3, 1, 2, 3, 1, 2, 3,
        \dots$. Then we claim that $x_n \to 2$.
        Let $\mathcal{N}$ be a neighbourhood of 2.
        Then there exists $G$ open such that $2
        \in G \subset \mathcal{N}$. But the only
        open sets are $\emptyset$ or $\{1, 2,
        3\}$. So $G = \{1, 2, 3\}$. So
        $\mathcal{N} = \{1, 2, 3\}$ so for all
        $n$, $x_n \in \mathcal{N}$. So $x_n \to
        2$. Similarly $x_n \to 1$ and $x_n \to 3$.
        So:
        \begin{warning*}
            LIMITS OF CONVERGENT SEQUENCES NEED
            NOT BE UNIQUE. \\
            So we can't write $\lim_{n \to
            \infty} x_n$, unless we prove that the
            limit exists \emph{and} is unique. \\
            Note the above proof shows that in any
            indiscrete space every sequence
            converges to every point of the space.
        \end{warning*}
\end{enumerate}
