\lecture{02}{2023-10-19}{Topology on $\R$}
\gist{%
\begin{definition}
    A set $O \subseteq \R$ is called \vocab{open} in $\R$ iff it is the union
    of a set of open intervals.

    A set $A \subseteq \R$ is called \vocab{closed} in $\R$
    iff it is the complement of an open set.
\end{definition}

\begin{remark}
    \begin{itemize}
        \item If $\emptyset \neq  O \overset{\text{open}}{\subseteq} \R$
            then $O \sim \R$.
        \item If $O \subseteq \R$
            is open, then $O$ is the union of open intervals
            with rational endpoints, since $\Q$ is dense.
    \end{itemize}
\end{remark}

\begin{remark}+
    $\{O \subseteq \R\} \sim 2^{\aleph_0} < \cP(\R)$.
\end{remark}
}{}

\begin{definition}
    We call $x \in \R$
    an \vocab{accumulation point}
    of $A$ iff for all $a < x < b$
    there is some $y \in A$, $y \in (a,b)$, $y \neq x$.
    We write \vocab{$A'$} for the set of all accumulation points of $A$.
\end{definition}
\gist{%
\begin{example}
    $\{\frac{1}{n+1} | n \in \N\}' = \{0\}$.
\end{example}
}{}

\begin{lemma}
    \label{lem:closedaccumulation}
    A set $A \subseteq  \R$ is closed iff $A' \subseteq  A$.
\end{lemma}
\begin{refproof}{lem:closedaccumulation}
    ``$\implies$''
    \gist{%
    Let $A$ be closed. Suppose that $x \in A' \setminus A$.
    Then there exists $(a,b) \ni x$
    disjoint from $A$. Hence $x \not\in A' \lightning$
    }{trivial.}

    ``$\impliedby$''
    Suppose $A' \subseteq  A$.
    \begin{claim}
        $A \subseteq  \R$ is closed iff all Cauchy sequences
        in $A$ converge in $A$.
    \end{claim}
    \gist{%
    \begin{subproof}
        Let $A$ be closed and $\langle x_n : n \in \omega \rangle$
        a Cauchy sequence in $A$.
        Suppose that $x = \lim_{n \to \infty} x_n \not\in A$.
        Then there is $(a,b) \ni x$ disjoint from $A$.
        However $x_n \in (a,b)$ for almost all $n \in \omega$ $\lightning$

        On the other hand let  $A$ not be closed.
        Then there exists a witness $x \in \R \setminus A$
        such that $A \cap (a,b) \neq  \emptyset$ for all $(a,b) \ni x$.
        In particular,
        we may pick $x_n \in (x - \frac{1}{n+1}, x + \frac{1}{n+1}) \cap A$
        for all $n < \omega$.
    \end{subproof}
    }{}

    Now if $A' \subseteq  A$ and $A$ were not closed,
    there would be some Cauchy-sequence $(x_n)$
    in $A$ such that $\lim_{n \to  \infty} x_n \not\in A$.
    But then $x \in A' \subseteq A \lightning$.
\end{refproof}
\begin{definition}
    $P \subseteq  \R$ (or, more generally, a subset of any topological space)
    is called \vocab{perfect}
    iff $P \neq \emptyset$ and $P = P'$.
\end{definition}
\begin{example}+
    Note that being perfect depends on the surrounding topological space:
    For example, $[0,1] \cap \Q$
    is perfect as a subset of $\Q$,
    but not perfect as a subset of $\R$.
\end{example}

We want to prove two things:
\begin{itemize}
    \item If $P$ is perfect, then $P \sim \R$.
    \item If $A$ is closed and uncountable then $A$ has a perfect subset.
        In particular $A \sim \R$.
\end{itemize}

\begin{lemma}
    Let $P \subseteq  \R$ be perfect.
    Then $P \sim \R$.
\end{lemma}
\begin{proof}
\gist{%
    It suffices to find an injection $f\colon \R \hookrightarrow P$.
    We have $\underbrace{\{0,1\}^{\omega}}_{\text{infinite 0-1-sequences}} \sim \R$,
    hence it suffices to construct $f\colon \{0,1\}^\omega\hookrightarrow P$.

    In order to do that, we are going to construct some
    $g\colon \underbrace{\{0,1\}^{<\omega}}_{\text{finite 0-1-sequences}} \to P$
    with certain properties
    by recursion on the length of $s \in \{0,1\}^{<\omega}$.

    Let $g(\emptyset)$ be any point in $P$.
    Suppose that $g(s) \in P$ has been chosen for all $s$ of
    length $\le n$.
    For each $s \in \{0,1\}^{n}$ pick
    $g(s) \in  (a_s, b_s)$
    such that $(a_s, b_s) \cap (a_{s'}, b_{s'}) = \emptyset$
    for all $s, s'$ of length $n$,
    $b_s - a_s \le  \frac{1}{n^3}$
    and
    $(a_{s\defon{n-1}}, b_{s\defon{n-1}}) \subseteq (a_s, b_s)$.

    For each such $s$ pick $x_s \in (a_s, b_s) \cap P$
    with $x_s \neq f(s)$.
    This is possible since $P \subseteq P'$.
    Now set $g(s\concat 0) \coloneqq g(s)$
    and $g(s \concat 1) \coloneqq  g(x_s)$.
    This finishes the construction.

    If $t \in \{0,1\}^{\omega}$,
    then $(g(t\defon{n}), n < \omega)$ is a Cauchy sequence.

    By $P' \subseteq P$ we get that this sequence
    converges to a point in $P$.
    Define $f(t)$ to be this point.

    If $t \neq t' \in \{0,1\}^{\omega}$,
    then there is some $n$ such that $t\defon{n} \neq  t'\defon{n}$,
    hence $f(t) \in [a_{t\defon{n}}, b_{t\defon{n}}]$
    and $f(t') \in [a_{t'\defon{n}}, b_{t'\defon{n}}]$
    which are disjoint.
    Thus $f(t) \neq f(t')$, i.e.~$f$ is injective.
}{Cantor scheme.}
\end{proof}
