\lecture{03}{2023-10–23}{Cantor-Bendixson}

\begin{theorem}[Cantor-Bendixson]
    \yalabel{Cantor-Bendixson}{Cantor-Bendixson}{thm:cantorbendixson}
    If $A \subseteq  \R$ is closed,
    it is either at most countable or else
    $A$ contains a perfect set.
\end{theorem}
\begin{corollary}
    If $A \subseteq \R$ is closed,
    then either $A \le \N$ or $A \sim \R$.
\end{corollary}
\begin{fact}
    $A' = \{x \in  \R | \forall  a < x < b.~ (a,b) \cap A \text{ is at least countable}\}$.
\end{fact}
\begin{proof}
    $\supseteq$ is clear.
    For $\subseteq $, fix $a < x < b$
    and let us define $(y_n: n \in  \omega)$
    as well as $((a_n, b_n): n \in \omega)$.
    Set $a_0 \coloneqq a$, $b_0 \coloneqq b$.
    Having defined $(a_n, b_n)$,
    pick $x \neq y_n \in A \cap (a_n, b_n)$,
    Then pick $a_n < a_{n+1} < x < b_{n+1} < b_n$
    such that $y_n \not\in (a_{n+1}, b_{n+1})$.
    Clearly $y_n \neq y_{n+1}$,
    hence $\{y_n : n \in \N\}$ is a countable subset of $A \cap (a,b)$.
\end{proof}

\begin{definition}
    Let $A \subseteq  \R$.
    We say that $x \in \R$
    is a \vocab{condensation point} of $A$
    iff for all $a < x < b$, $(a,b) \cap A$
    is uncountable.
\end{definition}
By the fact we just proved,
all condensation points are accumulation points.

\begin{refproof}{thm:cantorbendixson}
    Fix $A \subseteq \R$ closed.
    We want to see that $A$ is at most countable
    or there is some perfect $P \subseteq A$.
    Let
    \[P \coloneqq  \{x \in \R | x \text{ is a condensation point of $A$}\}.\]
    Since $A $ is closed, $P \subseteq A$.

    \begin{claim}
        $A \setminus P$ is at most countable.
    \end{claim}
    \begin{subproof}
        For each $x \in A \setminus P$,
        there is $a_x < x < b_x$ 
        such that $(a_x, b_x) \cap A$ 
        is at most countable.
        Since $\Q$ is dense in $\R$,
        we may assume that $a_x, b_x \in \Q$.

        Then
        \begin{IEEEeqnarray*}{rCl}
            A \setminus P &=& \bigcup_{x \in  A \setminus P} (a_x, b_x) \cap A.
        \end{IEEEeqnarray*}
        $\subseteq $ holds by the choice of $a_x$ and $b_x$.
        For $\supseteq$ let $y$ be an element of the RHS.
        Then $y \in (a_{x_0}, b_{x_0}) \cap A$ for some $x_0$.
        As $(a_{x_0}, b_{x_0}) \cap A$ is at most countable,
        $y \not\in P$.

        Now we have that $A \setminus P$ is a union
        of at most countably many sets,
        each of which is at most countable.
    \end{subproof}

    \begin{claim}
        If $P \neq  \emptyset$, the $P$ is perfect.
    \end{claim}
    \begin{subproof}
        $P \neq \emptyset$: $\checkmark$ 

        $P \subseteq  P'$:
        % \begin{IEEEeqnarray*}{rCl}
        %     P &=& \{x \in A | \text{every open neighbourhood of $x$ is uncountable}\}\\
        %     &\subseteq & \{x \in A | \text{every open neighbourhood of $x$ is at least countable}\} = P'.
        % \end{IEEEeqnarray*}
        
        Let $x \in P$.
        Let $a < x < b$.
        We need to show that there is some $y \in  (a,b) \cap P \setminus \{x\}$.
        Suppose that for all $y \in  (a,b) \setminus \{x\}$
        there is some $a_y < y < b_y$
        with $(a_y, b_y) \cap A$ being at most countable.
        Wlog.~$a_y, b_y \in \Q$.
        Then
        \[
            (a,b) \cap A = \{x \} \cup \bigcup_{\substack{y \in (a,b)\\y \neq x}} [(a_y, b_y) \cap A].
        \] 
        But then $(a,b) \cap A$ is at most countable
        contradicting $ x \in P$.

        $P' \subseteq P$ (i.e.~$P$ is closed):
        Let $x \in P'$.
        Then for $a < x < b$ the set
        $(a,b) \cap P$
        always has a member $y$ such that $y \neq x$.
        Since $y \in P$, we get that $(a,b) \cap A$
        in uncountable, hence $x \in P$.
    \end{subproof}
    But now
    \[
        A = \overbrace{P}^{\mathclap{\text{perfect, unless $= \emptyset$}}} \cup \underbrace{(A \setminus P)}_{\mathclap{\text{at most countable}}}.
    \] 
\end{refproof}

\gist{\todo{Alternative proof of Cantor-Bendixson}}{}
% \begin{remark}
%     There is an alternative proof of Cantor-Bendixson, going as follows:
%     Fix $A \subseteq  \R$ closed.
%     Define a sequence
%     \[
%         A \supseteq A' \supseteq A'' \supseteq \ldots \supseteq \bigcap_{n} A^{(n)}
%         \supseteq \left( \bigcap_{n} A^{(n)} \right)' \supseteq \ldots
%     \]
%     Then $A \setminus A'$ has at most countably many points.
%     For all $a \in  A \setminus A'$
%     pick $\Q\ni a_x < x < b_x \in \Q$ 
%     such that $(a_x, b_x) \cap A = \{x\}$.
%     Then $A \setminus A' = \bigcup_{x \in A \setminus A'}  [(a_x, b_x) \cap A]$
%     is at most countable.
%     Also $A'$ is closed.
% \end{remark}
