\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}
    \label{prop:ifs11}
    $\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
    \[D \coloneqq \{(T, \beta) \in \Tr \times  \cN : \forall n.~ T(\beta\defon{n}) = 1\}.\]
    \gist{%
        Note that this set is closed in $\Tr \times \cN$,
        since it is a countable intersection of clopen sets.
        Then $\IF = \proj_{\Tr}(D) \in \Sigma^1_1$.
    }{$D \overset{\text{closed}}{\subseteq} \Tr \times \cN$ and $\IF = \proj_{\Tr}(D)$.}
\end{proof}

\begin{definition}
    An analytic set $B$ in some Polish space $Y$
    is \vocab{complete analytic} (\vocab{$\Sigma^1_1$-complete})
    \gist{%
    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$,
    i.e.~$f^{-1}(B) = A$.
    }{%
    iff for any $A \in \Sigma^1_1(X)$, $X$ Polish
    there exists $f\colon  X \to Y$ Borel such that $f^{-1}(B) = A$.}

    \gist{%
    Similarly, a conalytic set $B$ is called
    \vocab{complete coanalytic} (\vocab{$\Pi^1_1$-complete})
    iff for any $A \subseteq \Pi^1_1(X)$
    there exists $f\colon X \to Y$ Borel such that $f^{-1}(B) = A$.
    }{Similarly we 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%
            \gist{:
                Suppose there is a $\Sigma^1_1$-complete set $B \in \cB(Y)$.
                Take $A \in \Sigma^1_1(X) \setminus \cB(X)$%
                \footnote{e.g.~\yaref{thm:universals11}}
                and $f\colon X \to  Y$ Borel.
                But then we get that $f^{-1}(B)$ is Borel $\lightnig$.
            }{.}
    \end{itemize}
\end{observe}

% TODO ANKI-MARKER
\begin{theorem}
    \label{thm:lec12:1}
    Suppose that $A \subseteq \cN$ is analytic.
    \gist{%
        Then there is a continuous function $f\colon \cN \to \Tr$
        such that $x \in A \iff f(x)$ is ill-founded,
        i.e.~$A = f^{-1}(\IF)$.
    }{%
        Then there exists $f\colon \cN \to \Tr$ continuous
        such that $A = f^{-1}(\IF)$.
    }
\end{theorem}
For the proof we need some prerequisites:

\gist{%
    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}$:%
    \footnote{cf.~\yaref{s3e1} (c)}
    \begin{IEEEeqnarray*}{rCl}
        T &\longmapsto & [T]\\
        \{\alpha\defon{n} : \alpha \in D, n \in \N\} &\longmapsfrom & D\\
    \end{IEEEeqnarray*}
}{%
    For $S$ countable,
    pruned trees on $S$ correspond to closed subsets of $S^{\N}$
    via $T \mapsto [T]$.
}
\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}
\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}
    \gist{%
        $A$ is analytic iff
        there exists $F \overset{\text{closed}}{\subseteq} (\N \times \N)^{\N}$
        such that $A = \proj_1(F)$.
        But closed sets of $\N^\N \times \N^{\N}$ correspond to pruned trees,
        by the first point.
    }{Closed subsets of $\N^\N \times \N^\N$ correspond to pruned trees.}
\end{proof}
\begin{refproof}{thm:lec12:1}
    \gist{%
        Take a tree $T$ on $\N \times \N$
        as in \autoref{prop:lec12:2}, i.e.~$A = \proj_1([T])$.
    }{Write $A = \proj_1([T])$ for a pruned tree $T$ on $\N \times \N$.}
    Consider
    \begin{IEEEeqnarray*}{rCl}
        f\colon \cN &\longrightarrow & \Tr \\
        x &\longmapsto & T(x).
    \end{IEEEeqnarray*}
    \gist{%
        Clearly $x \in A \iff f(x) \in \IF$.
        $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:ifs11c}
    $\IF$ is $\Sigma^1_1$-complete.
\end{corollary}
\begin{proof}
    Let $X$ be Polish.
    Suppose that $A \subseteq X$ is analytic and uncountable%
    \gist{}{ (trivial for countable)}.

    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}\]
    where $f$ is chosen as in \yaref{thm:lec12:1}.

    \gist{%
        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}\}.
\]
\gist{%
    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}
\gist{%
    \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}
}{}
