\lecture{05}{2023-10-31}{}

\begin{fact}
    \begin{itemize}
        \item A set $A$ is nwd iff $\overline{A}$ is nwd.
        \item If $F$ is closed then $F$ is nwd iff $X \setminus F$ is open and dense.
        \item Any meager set $B$ is contained in a meager $F_{\sigma}$-set.
    \end{itemize}
\end{fact}
\gist{%
\begin{proof}
    \begin{itemize}
        \item This follows from the definition as $\overline{\overline{A}} = \overline{A}$.
        \item Trivial.
        \item Let $B = \bigcup_{n < \omega} B_n$ be a union of nwd sets.
            Then $B \subseteq \bigcup_{n < \omega} \overline{B_n}$.
    \end{itemize}
\end{proof}
}{}

\gist{%
\begin{definition}
    A  \vocab{$\sigma$-algebra} on a set $X$
    is a collection of subsets of $X$
    such that:
    \begin{itemize}
        \item $\emptyset, X \in \cA$,
        \item $ A \in \cA \implies X \setminus A \in \cA$,
        \item  $(A_i)_{i < \omega}, A_i \in \cA \implies \bigcup_{i < \omega} A_i \in \cA$.
    \end{itemize}
\end{definition}
\begin{fact}
    Since $\bigcap_{i < \omega} A_i = \left( \bigcup_{i < \omega} A_i^c \right)^c$
    we have that $\sigma$-algebras are closed under countable intersections.
\end{fact}
}{}

\begin{theorem}
    \label{thm:bairesigma}
    Let $X$ be a topological space.
    Then the collection of sets with the Baire property
    is \gist{a $\sigma$-algebra on $X$.

    It is}{} the smallest $\sigma$-algebra
    containing all meager and open sets.
\end{theorem}
\begin{refproof}{thm:bairesigma}
    Let $\cA$ be the collection of sets with the Baire property.
    Since open sets have the Baire property,
    we have $\emptyset, X \in \cA$.


    Let $A_n \in \cA$ for all $n < \omega$.
    Take $U_n$ such that $A_n \symdif U_n$ is meager.
    Then
    \[
        \left( \bigcup_{n < \omega} A_n \right) \symdif \left( \bigcup_{n < \omega} U_n \right)
    \]
    is meager,
    hence $\bigcup_{n < \omega} A_n \in \cA$.

    Let $A \in \cA$.
    Take some open $U$ such that $U \symdif A$ is meager.
    We have $(X \setminus U) \symdif (X \setminus A) = U \symdif A$.

    \begin{claim}
        \label{thm:bairesigma:c1}
        If $F$ is closed,
        then $F \setminus \inter(F)$
        is nwd.
        In particular, $F \symdif \inter(F)$ is nwd.
    \end{claim}
    \begin{refproof}{thm:bairesigma:c1}
        $F \setminus \inter(F)$ is closed,
        hence $\overline{F \setminus \inter(F)} = F \setminus \inter(F)$.
        Clearly $\inter(F\setminus\inter(F)) = \emptyset$.
    \end{refproof}

    From the claim we get that
    $X \setminus A =^\ast X \setminus U =^\ast \inter(X \setminus U)$.
    Hence $X \setminus A \in \cA$.


    It is clear that all meager sets have the Baire property.

    Let $A \in \cA$. Then $A = (A \setminus U) \cup (A \cap U)$
    for some open $U$
    such that $A \setminus U$ is meager.
    We have $A \cap U = U \setminus (U \setminus A)$.
    Thus we get that $\cA$ is the minimal $\sigma$-algebra
    containing all meager and all open sets.
\end{refproof}

%\begin{example}
%    Nwd set of positive measure.
%    TODO
%    remove open intervals such that their length does not add to 0
%      
%\end{example}

\begin{theorem}[Baire Category theorem]
    \yalabel{Baire Category Theorem}{Baire Category Theorem}{thm:bct}
    Let $X$ be a completely metrizable space.
    Then every comeager set of $X$ is dense in $X$.
\end{theorem}
\todo{Proof (copy from some other lecture)}
\begin{theoremdef}
    Let $X$ be a topological space.
    The following are equivalent:
    \begin{enumerate}[(i)]
        \item Every nonempty open set
            is non-meager in $X$.
        \item Every comeager set is dense.
        \item The intersection of countable many
            open dense sets is dense.
    \end{enumerate}
    In this case $X$ is called a \vocab{Baire space}.%
    \footnote{cf.~\yaref{s5e1}}
\end{theoremdef}
\begin{proof}
    \todo{Proof (short)}

    (iii) $\implies$ (i)
    Let us first show that $X$ is non-meager.
    Suppose that $X$ is meager. Then $X = \bigcup_{n} A_n = \bigcup_{n} \overline{A_n}$
    is the countable union of nwd sets.
    We have that
    \[
    \emptyset = \bigcap_{n} (X \setminus \overline{A_n})
    \]
    is dense by (iii).
    This proof can be adapted to other open sets $X$.
\end{proof}

\begin{notation}
    Let $X ,Y$ be topological spaces,
    $A \subseteq  X \times Y$
    and
    $x \in X, y \in Y$.

    Let
    \[
    A_x \coloneqq \{y \in Y : (x,y) \in A\}
    \]
    and
    \[
    A^y \coloneqq \{x \in X : (x,y) \in A\} .
    \]
\end{notation}

The following similar to Fubini,
but for meager sets:

\begin{theorem}[Kuratowski-Ulam]
    \yalabel{Kuratowski-Ulam}{Kuratowski-Ulam}{thm:kuratowskiulam}
    Let $X,Y$ be second countable topological spaces.
    Let $A \subseteq X \times Y$
    be a set with the Baire property.%
    \footnote{It is important that $A$ has the Baire property (cf. \yaref{s5e4}).}

    Then
    \begin{enumerate}[(i)]
        \item $\{x \in X : A_x \text{ has the BP }\}$
            is comeager\footnote{Note that not necessarily all sections
                have the BP. For example $\{x\} \times Y$ is meager in $X \times Y$}
            and similarly for $y$.
        \item $A$ is meager
            \begin{IEEEeqnarray*}{rll}
                \iff &\{x \in X : A_x \text{ is meager}\}&\text{ is comeager}\\
                \iff &\{y \in Y : A^y \text{ is meager}\}& \text{ is comeager}.
            \end{IEEEeqnarray*}
        \item $A$ is comeager
            \begin{IEEEeqnarray*}{rll}
                \iff & \{x \in X: A_x \text{ is comeager}\} &\text{ is comeager}\\
                \iff & \{y \in Y: A^y \text{ is comeager}\} & \text{ is comeager}.
            \end{IEEEeqnarray*}
    \end{enumerate}
\end{theorem}
\begin{refproof}{thm:kuratowskiulam}
    (ii) and (iii) are equivalent by passing to the complement.

    \begin{claim}%[1a]
        \label{thm:kuratowskiulam:c1a}

        If $F \overset{\text{closed}}{\subseteq}  X \times Y$
        is nwd,
        then
        \[
        \{x \in X : F_x \text{is nwd}\}
        \]
        is comeager.
    \end{claim}
    \begin{refproof}{thm:kuratowskiulam:c1a}
        Put $W = F^c$.
        This is open and dense in $X \times Y$.
        It suffices to show that $\{x \in X : W_x \text{ is dense}\}$
        is comeager.
        Note that $W_x$ is open for all $x$.

        Fix a countable basis $(V_n)$ of $Y$
        with $V_n$ non-empty.
        We want to show that
        \[
        \{x \in X: \forall n.~ (W_x \cap V_n) \neq \emptyset\}
        \]
        is a comeager set.
        This is equivalent to
        \[
        \{x \in X : (W_x \cap V_n) \neq \emptyset\}
        \]
        being comeager for all $n$,
        because the intersection
        of countably many comeager sets is comeager.

        Fix $n$ and let $U_n \coloneqq \{x \in X: (W_x \cap V_n) = \emptyset\}$.
        We will show that $U_n$ is open and dense,
        hence it is comeager.

        $U_n = \proj_x(W \cap (X \times V_n))$ is open
        since projections of open sets are open.

        Let $U \subseteq X$ be nonempty and open.
        We need to show that $U \cap U_n \neq \emptyset$.
        It is
        \[
        U \cap U_n = \proj_x(W \cap (U \times V_n))
        \]
        nonempty since $W$ is dense.
    \end{refproof}

    \begin{claim} % [1a']
        \label{thm:kuratowskiulam:c1ap}
        If $F \subseteq  X \times Y$
        is nwd,
        then
        \[
        \{x \in X : F_x \text{is nwd}\}
        \]
        is comeager.

    \end{claim}
    \begin{refproof}{thm:kuratowskiulam:c1ap}
        We have that $\overline{F}$ is nwd.
        Hence by \yaref{thm:kuratowskiulam:c1a}
        the set
         \[
        \{x \in X: \overline{F_x} \text{ is nwd}\} \subseteq
        \{x \in X: F_x \text{ is nwd}\}
        \]
        is comeager.
    \end{refproof}

    \begin{claim}% [1b]
        \label{thm:kuratowskiulam:c1b}

        If $M \subseteq  X \times Y$ is meager,
        then
        \[
        \{x \in X : M_x \text{ is meager}\}
        \]
        is comeager.
    \end{claim}
    \begin{refproof}{thm:kuratowskiulam:c1b}
        This follows from \yaref{thm:kuratowskiulam:c1ap}:
        Let $M = \bigcup_{n < \omega} F_n$
        where the $F_n$ are nwd.
        Apply \yaref{thm:kuratowskiulam:c1ap}
        to each $F_n$.
        We get that
        $M_x$ is comeager
        as a countable intersection of comeager sets.
    \end{refproof}

% \phantom\qedhere
% \end{refproof}
% TODO fix claim numbers

\gist{%
\begin{remark}
    Suppose that $A$ has the BP.
    Then there is an open $U$ such that
    $A \symdif U \mathbin{\text{\reflectbox{$\coloneqq$}}} M$ is meager.
    Then $A = U \symdif M$.
\end{remark}
}{}
