\subsection{Sheet 1}
\tutorial{02}{2023-10-24}{}
% Points: 15 / 16

\nr 1
Let $(X,d)$ be a metric space and $\emptyset \neq A \subseteq X$.
Let $d(x,A) \coloneqq  \inf(d(x,a) : a \in A\}$.

\begin{itemize}
    \item $d(-,A)$ is uniformly continuous:

        Clearly $|d(x,A) - d(y,A)| \le  d(x,y)$.
        \todo{Add details}
    \item  $d(x,A) = 0 \iff x \in  \overline{A}$.

        $d(x,A) = 0$ iff there is a sequence in $A$
        converging towards $x$ iff $x \in \overline{A}$.
\end{itemize}


\nr 2

Let $X$ be a discrete space.
For $f,g \in X^{\N}$ define
\[
d(f,g) \coloneqq \begin{cases}
    (1 + \min \{n: f(n) \neq g(n)\})^{-1} &: f \neq g,\\
    0 &: f= g.
\end{cases}
\]


\begin{enumerate}[(a)]
    \item $d$ is an \vocab{ultrametric},
        i.e.~$d(f,g) \le \max \{d(f,h), d(g,h)\}$ for all $f,g,h \in  X^{\N}$ :

        Let $f,g,h \in X^{\N}$.

        We need to show that $d(f,g) \le \max(d(f,h), d(g,h))$.

        If $f = g$ this is trivial.
        Otherwise let $n$ be minimal such that $f(n) \neq g(n)$.
        Then $h(n) \neq f(n)$ or $ h(n) \neq g(n)$
        must be the case.
        W.l.o.g.~$h(n) \neq f(n)$.
        Then $d(f,g) = \frac{1}{1+n} \le d(f,h)$.

    \item $d$ induces the product topology on $X^{\N}$:

        It suffices to show that the $\epsilon$-balls with respect to $d$
        are exactly the basic open set of the product topology,
        i.e.~the sets of the form
        \[
        \{x_1\} \times \ldots \times  \{x_n\}  \times X^{\N}
        \]
        for some $n \in \N$, $x_1,\ldots,x _n \in X$.

        Let $\epsilon > 0$. Let $n$ be minimal such that $\frac{1}{1+n} \ge \epsilon$.
        Then $B_{\epsilon}((x_i)_{i \in \N}) = \{x_1\} \times  \{x_n\} \times X^{\N}$.
        Since $\N \ni n \mapsto \frac{1}{1+n}$
        is injective, every basic open set of the product topology
        can be written in this way.

    \item $d$ is complete:

        Let $(f_n)_{n \in \N}$ be a Cauchy sequence with respect to $d$.
        For $n \in \N$ take $N_n \in \N$
        such that $d(f_i, f_j) < \frac{1}{1 + n}$.
        Clearly $f_i(n) = f_j(n)$ for all  $n > N_n$.

        Define $f \in  X^\N$ by $f(n) \coloneqq f_{N_n}(n)$.
        Then $ (f_n)_{n \in \N}$
        converges to $f$,
        since for all $n > N_n$ $f_n$


    \item If $X$ is countable, then $X^{\N}$ with the product topology
        is a Polish space:

        (We assume that $X$ is non-empty, as otherwise the claim is wrong)

        We need to show that there exists a countable dense subset.
        To this end, pick some $x_0 \in X$ and
        consider the set $D \coloneqq \bigcup_{n\in \N} (X^n \times \{x_{0}\}^{\N})$.
        Since $X$ is countable, so is $D$.
        Take some $(a_n)_{n \in \N} \in X^{\N}$
        and consider $B \coloneqq  B_{\epsilon}((a_n)_{n \in \N})$.
        Let $m$ be such that $\frac{1}{1+m} < \epsilon$.
        Then $(b_{n})_{n \in \N} \in B \cap D$,
        where $b_n \coloneqq  a_n$ for $n \le  m$ and $b_n \coloneqq x_0$
        otherwise.
        Hence $D$ is dense.
\end{enumerate}

\nr 3

Consider $\N$ as a discrete space and $\N^{\N}$ with the product topology.
Let
\[
S_{\infty} = \{f\colon \N \to \N \text{ bijective}\} \subseteq \N^{\N}.
\]
\begin{enumerate}[(a)]
    \item $S_{\infty}$ is a Polish space:

        From \yaref{s1e2} we know that $\N^{\N}$ is Polish.
        Hence it suffices to show that $S_{\infty}$ is $G_{\delta}$
        with respect to $\N^\N$.

        Consider the sets $I \coloneqq \bigcap_{(i,j) \in \N^2, i < j} \{f \in \N^{\N} | f(i) \neq f(j)\}$
        and $S \coloneqq \bigcap_{n \in \N} \{f \in \N^\N | n \in \im f\}$.

        We have that $\{f \in \N^\N | f(i) \neq f(j)\} = \bigcup_{n \in \N}  \N^{i-1} \times \{n\}  \times \N^{i - j -1 } \times (\N \setminus \{n\} ) \times \N^\N$
        is open.
        Hence $I$ is $G_{\delta}$.

        Furthermore $\{f \in \N^{\N} | n \in \im f\} = \bigcup_{k \in \N} \N^k \times \{n\} \times \N^\N$j
        is open,
        thus $S$ is $G_\delta$ as well.
        In particular $S \cap G$ is $G_\delta$.
        Since $I$ is the subset of injective functions
        and $S$ is the subset of surjective functions,
        we have that $S_{\infty} = I \cap S$.

    \item $S_{\infty}$ is not locally compact:

        Consider the point $x = (i)_{i \in \N} \in S_{\infty}$.
        Let $x \in B$ be open. We need to show that there
        is no closed compact set $C \supseteq B$
        W.l.o.g.~let $B = (\{0\} \times \ldots \times  \{n\}  \times \N^\N) \cap S_\infty$
        for some $n \in \N$.
        Let $C \supseteq B$ be some closed set.
        Consider the open covering
        \[
        \{S_{\infty} \setminus B\} \cup \{ B_j | j > n\}.
        \]
        where
        \[
            B_j \coloneqq (\{0\} \times  \ldots \times \{n\} \times \{j\} \times \N^{\N}) \cap S_\infty.
        \]
        Clearly there cannot exist a finite subcover
        as $B$ is the disjoint union of the $B_j$.

\end{enumerate}

\nr 4
\begin{fact}
    Let $X $ be a compact Hausdorff space.
    Then the following are equivalent:
    \begin{enumerate}[(i)]
        \item $X$ is Polish,
        \item $X$ is metrisable,
        \item $X$ is second countable.
    \end{enumerate}
\end{fact}
\begin{proof}
    (i) $\implies$ (ii) clear

    (i) $\implies$ (iii) clear

    (ii) $\implies$ (i) Consider the cover $\{B_{\epsilon}(x) | x \in X\}$
    for every $\epsilon \in \Q$
    and chose a finite subcover.
    Then the midpoints of the balls from the cover
    form a countable dense subset.

    The metric is complete as $X$ is compact.
    (For metric spaces: compact $\iff$ seq.~compact $\iff$ complete and totally bounded)

    (iii) $\implies$ (ii)
    Use Urysohn's metrisation theorem and the fact that compact
    Hausdorff spaces are normal
\end{proof}

Let $X$ be compact Polish\footnote{compact metrisable $\implies$ compact Polish}
and $Y $ Polish.
Let $\cC(X,Y)$ be the set of continuous functions $X \to Y$.
Consider the \vocab{uniform metric} $d_u(f,g) \coloneqq  \sup_{x \in X} |d(f(x), g(x))|$.
Clearly $d_u$ is a metric.

\begin{claim}
    $d_u$ is complete.
\end{claim}
\begin{subproof}
    Let $(f_n)$ be a Cauchy sequence in $\cC(X,Y)$.
    A $Y$ is complete,
    there exists a pointwise limit $f$.

    $f_n$ converges uniformly to $f$:

    \[
    d(f_n(x), f(x)) \le  \overbrace{d(f_n(x), f_m(x))}^{\mathclap{\text{$(f_n)$ is Cauchy}}}
    + \underbrace{d(f_m(x), f(x))}_{\mathclap{\text{small for appropriate $m$}}}.
    \]

    $f$ is continuous by the uniform convergence theorem.
\end{subproof}

\begin{claim}
    There exists a countable dense subset.
\end{claim}
\begin{subproof}
    Fix a metric $d_X$ on $X$ defining its topology.
    Let
    \[
    C_{m,n} \coloneqq  \{f \in  \cC(X,Y) : \forall x,y \in X.~\left( d_X(x,y) < \frac{1}{m+1} \implies d(f(x), f(y)) <\frac{1}{n+1}\right) \}.
    \]

    Choose $X_m \subseteq X$ finite with $X \subseteq \bigcup_{x \in X_m} B_{\frac{1}{m+1}}(x)$.
    Let $D_{m,n} \subseteq C_{m,n}$ be countable,
    such that for every $f \in C_{m,n}$ and every $\eta >  0$,
    there is $g \in D_{m,n}$ with $d(f(y), g(y)) < \frac{\eta}{3}$
    for each $y \in X_m$.
    Then $\bigcup_{m,n} D_{m,n}$ is dense in $\cC(X,Y)$:
    Indeed if $f \in \cC(X,Y)$ and $\eta > 0$,
    we find $n > \frac{3}{\eta}$ and $m$ such that $f \in C_{m,n}$,
    since $f$ is uniformly continuous.
    Let $g \in D_{m,n}$ be such that $\forall y \in X_m.~d(f(y), g(y)) < \frac{1}{n+1}$.
    We have $d_u(f,g) \le \eta$,
    since for every $x \in X$, we find $y \in X_m$ with $d_X(x,y) < \frac{1}{m+1}$,
    hence
    \begin{IEEEeqnarray*}{rCl}
        d_Y(f(x), g(x)) &\le& d_Y(f(x), f(y)) + d_Y(f(y), g(y)) + d_Y(g(y), g(x))\\
                        &\le& \frac{1}{n+1}  + \frac{1}{n+1} + \frac{1}{n+1} \le \eta.
    \end{IEEEeqnarray*}
\end{subproof}
