\lecture{10}{}{} % Mirko

Applications of induction and recursion:
\begin{fact}
    For every set $x$ there is a transitive set $t$
    such that $x \in t$.
\end{fact}
\begin{proof}
    Take $R = \in $.
    We want a function $F$ with domain $\omega$
    such that $F(0) = \{x\}$
    and $F(n+1) = \bigcup F(n)$.
    Once we have such a function,
     $\{x\} \cup \bigcup \ran(F)$
     is a set as desired.
     To get this $F$ using the recursion theorem,
     pick $D$ such that
     \[
         (\emptyset, 0, \{x\}) \in D
     \]
     and
     \[
         (f, n+1, \bigcup\bigcup \ran(f)) \in D.
     \]
     The recursion theorem then gives a function
     such that
     \begin{IEEEeqnarray*}{rCl}
         F(0) &=& \{x\},\\
         F(n+1) &=& \bigcup\bigcup \ran(F\defon{n+1})\\
                &=& \bigcup \bigcup \{\{x\}, x, \bigcup x, \ldots, \underbrace{\bigcup^{n-1} x}_{F(n)}\}
                    = \bigcup F(n),
     \end{IEEEeqnarray*}
     i.e.~$F(n+1) = \bigcup F(n)$.
\end{proof}

\begin{notation}
    Let $\OR$ denote the class of all ordinals
    and $V$ the class of all sets.
\end{notation}
\begin{lemma}
    There is a function $F\colon \OR \to  V$
    such that $F(\alpha) = \bigcup \{\cP(F(\beta)): \beta < \alpha\}$.
\end{lemma}
\begin{proof}
    Use the recursion theorem with $R = \in $
    and $(w,x,y) \in D$ iff
    \[
    y = \bigcup \{\cP(\overline{y}) : \overline{y} \in \ran(w)\}.
    \]
    This function has the following properties:
    \begin{IEEEeqnarray*}{rCl}
        F(0) &=& \bigcup \emptyset = \emptyset,\\
        F(1) &=& \bigcup \{\cP(\emptyset)\} = \bigcup \{\{\emptyset\} \} = \{\emptyset\},\\
        F(2) &=& \bigcup \{\cP(\emptyset), \cP(\{\emptyset\})\} = \bigcup \{\{\emptyset\}, \{\emptyset, \{\emptyset\} \} \} = \{\emptyset, \{\emptyset\} \},\\
        \ldots
    \end{IEEEeqnarray*}

    It is easy to prove by induction:
    \begin{enumerate}[(a)]
        \item Every $F(\alpha)$ is transitive.
        \item $F(\alpha) \subseteq F(\beta)$ for all $\alpha \le \beta$.
        \item $F(\alpha+1) = \cP(F(\alpha))$ for all $\alpha \in \OR$.
        \item $F(\lambda) = \bigcup \{F(\beta) :\beta < \lambda\}$
            for $\lambda \in \OR$ a limit.
    \end{enumerate}
\end{proof}
\begin{notation}
    Usually, one write $V_\alpha$ for $F(\alpha)$.
    They are called the \vocab{rank initial segments}  of $V$.
\end{notation}
\begin{lemma}
    If $x$ is any set, then there is some $\alpha \in \OR$
    such that $x \in V_\alpha$,
    i.e.~$V = \bigcup \{V_{\alpha} : \alpha \in \OR\}$.
\end{lemma}
\begin{proof}
    We use induction on the well-founded $\in$-relation.
    Let $A = \bigcup \{V_\alpha : \alpha \in \OR\}$.
    We need to show that $A = V$.
    By induction it suffices to prove that for every $x \in V$,
    if $\{y : y \in x\} \subseteq  A$, then $x \in A$.
    The hypothesis says that for all $y \in x$,
    there is some $\alpha$ with $y \in V_\alpha$.
    Write $\alpha_y$ for the least such $\alpha$.
    By \AxRep, $\{\alpha_y : y \in x\}$
    is a set and we may let
    $\alpha = \sup \{\alpha_y : y \in x\} \ge \alpha_y$
    for all $y \in x$.
    Then $y \in V_{\alpha_y} \subseteq  V_\alpha$
    for all $y \in x$.

    In other words $x \subseteq V_\alpha$,
    hence $x \in V_{\alpha+1}$.
\end{proof}

\begin{lemma}[\vocab{Transitive collapse}/\vocab{Mostowski collapse}]
    \yalabel{Mostowski Collapse}{Mostowski}{lem:mostowski}
    Let $R$ be a binary set-like relation on a class $A$.
    Then $R$ is well-founded iff there is a transitive class $B$
    such that
    \[
         (B, \in\defon{B}) \cong (A, R),
    \]
    i.e.~there is an isomorphism $F$,
    that is a function $F\colon  B \to A$
    with $x \in y \iff (F(x),F(y)) \in R$ for $x,y \in B$.
\end{lemma}
\begin{proof}
    ``$\impliedby$'' Suppose that $R$ is ill-founded
    (i.e.~not well-founded).
    Then there is some $(y_n : n < \omega)$ such that $y_n  \in A$
    and $(y_{n+1}, y_n) \in R$ for all $n < \omega$.
    But then if $F$ is an isomorphism as above,
    \[
    F^{-1}(Y_{n+1}) \in F^{-1}(Y_n)
    \]
    for all $n < \omega$ $\lightning$

    ``$\implies$ '' Suppose that $R$ is well-founded.
    We want a transitive class $B$ and a function $F\colon  B \leftrightarrow A$
    such that
    \[
    x \in y \iff (F(x), F(y)) \in R.
    \]
    Equivalently $G\colon  A \leftrightarrow B$
    with $(x,y) \in R$ iff $G(x) \in G(y)$ for all $x,y \in A$.

    In other words, $G(y) = \{G(x) : (x,y) \in R\}$.
    Such a function $G$ and class $B$ exist by the recursion theorem.
\end{proof}

\begin{lemma}[\vocab{Rank function}]
    Let $R$ be a well-founded and set-like binary relation
    on a class $A$.
    Then there is a function $F\colon  A \to \OR$,
    such that for all $x,y \in A$
    \[(x,y) \in R \implies F(x) < F(y).\]
\end{lemma}
\begin{proof}
    By the recursion theorem,
    there is $F$ such that
    \[
    F(y) = \sup \{F(x) + 1 : (x,y) \in R\}.
    \]
    This function is as desired.
\end{proof}

This does not skip any ordinals,
as $F(y)$ is the least ordinal $> F(x)$
for all $(x,y) \in R$.
Thus $\ran(F)$ is transitive.
So either $\ran(F) = \OR$
or $\ran(F) \in \OR$.
This $F$ is called the \vocab{rank function} for $(A, R)$.
\begin{notation}
    \[
    \rk_R(x) = \|x\|_R  \coloneqq  F(x),
    \]
    and
    \[
    \rk_R \rank(R) \coloneqq \ran(F).
    \]

    In the special case that $R$ is a linear order on $A$,
    hence a well-order,
    $\rank(R)$ is called the \vocab{order type} of $R$
    (or of $(A,R)$), written $\otp(R)$.
\end{notation}

