\lecture{12}{2023-11-24}{}

\begin{definition}
    A tree $T$ is \vocab{ill-founded}
    if it has an infinite branch,
    i.e. $[T] \neq  \emptyset$
    Otherwise it is called \vocab{well-founded}.
    Let
    \[\IF \coloneqq  \{T \in  \Tr : T \text{ is ill-founded}\}\]
    and
    \[\WF \coloneqq  \{T \in  \Tr : T \text{ is well-founded}\}\]
\end{definition}

\begin{proposition}
    $\IF \in  \Sigma^1_1(\Tr)$.
\end{proposition}
\begin{proof}
    We have
    \begin{IEEEeqnarray*}{rCl}
        T \in \IF &\iff& \exists \beta \in \cN .~\forall n \in \N.~T(\beta\defon{n}) = 1.
    \end{IEEEeqnarray*}

    Consider $\{(T, \beta) \in \Tr \times  \cN : \forall n.~ T(\beta\defon{n}) = 1\}$.
    Note that this set is closed in $\Tr \times \cN$,
    since it is a countable intersection of clopen sets.
    % TODO Why clopen?
    Then $\IF = \proj_{\Tr}(D) \in \Sigma^1_1$.
\end{proof}

\begin{definition}
    An analytic set $B$ in some Polish space $Y$
    is \vocab{complete analytic} (\vocab{$\Sigma^1_1$-complete})
    iff for any analytic $A \in \Sigma^1_1(X)$ for some Polish space $X$,
    there exists a Borel function $f\colon X\to Y$
    such that $x \in A \iff f(x) \in B$.

    Similarly, define \vocab{complete coanalytic} (\vocab{$\Pi^1_1$-complete}).
\end{definition}
\begin{observe}
    \leavevmode
    \begin{itemize}
        \item Complements of $\Sigma^1_1$-complete sets are $\Pi^1_1$-complete.
        \item $\Sigma^1_1$-complete sets are never Borel:
            Suppose there is a $\Sigma^1_1$-complete set $B \in \cB(Y)$.
            Take $A \in \Sigma^1_1(X) \setminus \cB(X)$
            and $f\colon X \to  Y$ Borel.
            But then $f^{-1}(B)$ is Borel.
    \end{itemize}
\end{observe}

\begin{theorem}
    \label{thm:lec12:1}
    Suppose that $A \subseteq \cN$ is analytic.
    Then there is $f\colon \cN \to \Tr$\todo{Borel?}
    such that $x \in A \iff f(x)$ is ill-founded.
\end{theorem}
For the proof we need some prerequisites:
\begin{enumerate}[1.]
    \item Recall that for $S$ countable,
        the pruned\footnote{no maximal elements, in particular this implies ill-founded if the tree is non empty.} trees
        $T \subseteq S^{<\N}$ on $S$ correspond
        to closed subsets of $S^{\N}$:
        \begin{IEEEeqnarray*}{rCl}
            T &\longmapsto & [T]\\
            \{\alpha\defon{n} : \alpha \in D, n \in \N\} &\longmapsfrom & D\\
        \end{IEEEeqnarray*}
        \todo{Copy from exercises}
    \item \leavevmode\begin{definition}
        If $T$  is a tree on $\N \times \N$
        and $x \in \cN$,
        then the \vocab{section at $x$}
        %denoted $T(x)$,
        is the following tree on $\N$ :
        \[
        T(x) = \{s \in \N^{<\N} : (x\defon{|s|}, s) \in T\}.
        \]
    \end{definition}
    \item \leavevmode
        \begin{proposition}
            \label{prop:lec12:2}
            Let $A \subseteq  \cN$.
            The following are equivalent:
            \begin{itemize}
                \item   $A$ is analytic.
                \item There is a pruned tree on $\N \times \N$
                    such that
                    \[A = \proj_1 ([T]) = \{x \in \cN : \exists  y \in \cN.~ (x,y) \in [T]\}.\]
            \end{itemize}
        \end{proposition}
        \begin{proof}
            $A$ is analytic iff
            there exists $F \overset{\text{closed}}{\subseteq} \N \times \N$
            such that $A = \proj_1(F)$.
            But closed sets of $\N \times \N$ correspond to pruned trees,
            by the first point.
        \end{proof}
\end{enumerate}
\begin{refproof}{thm:lec12:1}
    Take a tree $T$ on $\N \times \N$
    as in \autoref{prop:lec12:2}, i.e.~$A = \proj_1([T])$.
    Consider
    \begin{IEEEeqnarray*}{rCl}
        f\colon \cN &\longrightarrow & \Tr \\
        x &\longmapsto & T(x).
    \end{IEEEeqnarray*}
    Clearly $x \in A \iff f(x)$ is ill-founded.
    $f$ is continuous:
    Let $x\defon{n} = y\defon{n}$ for some $n \in \N$.
    Then for all $m \le n, s,t \in \N^{<\N}$
    such that $s = x\defon{m} = y \defon{m}$ and $|t| = |s|$,
    we have
    \begin{itemize}
        \item $t \in T(x) \iff (s,t) \in T$,
        \item $t \in T(y) \iff (s,t) \in T$.
    \end{itemize}

    So if $x\defon{n} = y\defon{n}$,
    then $t \in T(x) \iff t \in  T(y)$ as long as $|t| \le n$..
\end{refproof}

\begin{corollary}
\label{cor:ifsi11c}
    $\IF$ is $\Sigma^1_1$-complete.
\end{corollary}
\begin{proof}
    Let $A \subseteq X$ is analytic
    and $X$ Polish and uncountable,
    then
    % https://q.uiver.app/#q=WzAsNSxbMCwwLCJYIl0sWzEsMCwiXFxjTiJdLFsyLDAsIlxcVHIiXSxbMCwxLCJBIl0sWzEsMSwiYihBKSJdLFsxLDIsImYiXSxbMCwxLCJiIl0sWzMsMCwiIiwwLHsic3R5bGUiOnsidGFpbCI6eyJuYW1lIjoiaG9vayIsInNpZGUiOiJ0b3AifX19XSxbNCwxLCIiLDAseyJzdHlsZSI6eyJ0YWlsIjp7Im5hbWUiOiJob29rIiwic2lkZSI6InRvcCJ9fX1dXQ==
\[\begin{tikzcd}
	X & \cN & \Tr \\
	A & {b(A)}
	\arrow["f", from=1-2, to=1-3]
	\arrow["b", from=1-1, to=1-2]
	\arrow[hook, from=2-1, to=1-1]
	\arrow[hook, from=2-2, to=1-2]
\end{tikzcd}\]

    If $X$ is Polish and countable and $A \subseteq  X$ analytic,
    just consider
    \begin{IEEEeqnarray*}{rCl}
        g \colon X &\longrightarrow & \Tr \\
        x &\longmapsto & \begin{cases}
            a &: x \in A,\\
            b &: x \not\in A,\\
        \end{cases}
    \end{IEEEeqnarray*}
    where $a \in \IF$ and $b \not\in \IF$ are chosen arbitrarily.
\end{proof}

\subsection{Linear Orders}

Let us consider the space
\[\LO \coloneqq  \{x \in 2^{\N\times \N} : x \text{ is a linear order on $\N$}\},\]
where we code a linear order $(\N, <)$
by $x \in 2^{\N \times \N}$ with $x(m,n) = 1 \iff m \le n$.

Let
\[
\WO \coloneqq  \{x \in \LO: x \text{ is a well ordering}\}.
\]

Recall that
\begin{itemize}
    \item $(A,<)$ is a well ordering iff there are no infinite descending chains.
    \item Every well ordering is isomorphic to an ordinal.
    \item Any two well orderings are comparable,
        i.e.~they are isomorphic,
        or one is isomorphic to an initial segment of the other.

        Let $(A, <_A) \prec (B, <_B)$ denote that
        $(A, <_A)$ is isomorphic to a proper initial segment of $(B, <_B)$.
\end{itemize}

\begin{definition}
    A \vocab{rank} on some set $C$
    is a function
    \[
    \phi\colon  C \to  \Ord.
    \]
\end{definition}
\begin{example}
    Let $C = \WO$
    and
    \begin{IEEEeqnarray*}{rCl}
        \phi\colon \WO &\longrightarrow & \Ord \\
    \end{IEEEeqnarray*}
    where $\phi((A,<_A))$ is the unique ordinal
    isomorphic to $(A, <_A)$.
\end{example}

