\subsection{The Ellis semigroup}
\lecture{17}{2023-12-12}{The Ellis semigroup}

Let $(X, d)$ be a compact metric space
and $(X, T)$ a flow.

Let $X^{X} \coloneqq \{f\colon  X \to X\}$
be the set of all functions.\footnote{We take all the functions,
    they need not be continuous.}
We equip this with the product topology,
i.e.~a subbasis
is given by sets
\[
U_{\epsilon}(x,y) \coloneqq  \{f \in X^X : d(x,f(y)) < \epsilon\}.
\]
for all $x,y \in X$, $\epsilon > 0$.

$X^{X}$ is a compact Hausdorff space.
\begin{remark}%
    \footnote{cf.~\yaref{s11e1}}
    Let $f_0 \in X^X$ be fixed.
    \begin{itemize}
        \item $X^X \ni f \mapsto f \circ f_0$
            is continuous:

            Consider $\{f : f \circ f_0 \in U_{\epsilon}(x,y)\}$.
            We have $ff_0 \in U_{\epsilon}(x,y)$
            iff $f \in U_\epsilon(x,f_0(y))$.
        \item Fix $x_0 \in X$.
            Then  $f \mapsto f(x_0)$ is continuous.
        \item In general  $f \mapsto f_0 \circ f$ is not continuous,
            but if $f_0$ is continuous, then the map is continuous.
    \end{itemize}
\end{remark}

\begin{definition}
Let $(X,T)$ be a flow.
Then the \vocab{Ellis semigroup}
is defined by
$E(X,T) \coloneqq \overline{T} \subseteq X^X$,
i.e.~identify $t \in T$ with $x \mapsto tx$
and take the closure in  $X^X$.
\end{definition}
$E(X,T)$ is compact and Hausdorff,
since $X^X$ has these properties.

Properties of $(X,T)$ translate to properties of $E(X,T)$:
\begin{goal}
    We want to show that if  $(X,T)$ is distal,
    then $E(X,T)$ is a group.
\end{goal}

\begin{proposition}
    $E(X,T)$ is a semigroup,
    i.e.~closed under composition.
\end{proposition}
\begin{proof}
    Let $G \coloneqq E(X,T)$.
    Take $t \in T$. We want to show that $tG \subseteq G$,
    i.e.~for all $h \in G$ we have $th \in G$.

    We have that $t^{-1}G$ is compact,
    since $t^{-1}$ is continuous
    and $G$ is compact.

    Then $T \subseteq t^{-1}G$ since $T \ni s = t^{-1}\underbrace{(ts)}_{\in G}$.
    So $G = \overline{T} \subseteq  t^{-1}G$.
    Hence $tG \subseteq G$.

    \begin{claim}
        If $g \in G$, then
        \[
        \overline{T} g = \overline{Tg}.
        \]
    \end{claim}
    \begin{subproof}
        Cf.~\yaref{s11e1}
    \end{subproof}

    Let $g \in G$.
    We need to show that $Gg \subseteq  G$.

    It is
    \[
    Gg = \overline{T}g = \overline{Tg}.
    \]
    Since $G$ compact,
    and $Tg \subseteq G$,
    we  have $ \overline{Tg} \subseteq G$.
\end{proof}

\begin{definition}
    A \vocab{compact semigroup} $S$
    is a nonempty semigroup with a compact
    Hausdorff topology,
    such that $S \ni x \mapsto xs$ is continuous for all  $s$.
\end{definition}
\begin{example}
    The Ellis semigroup is a compact semigroup.
\end{example}

\begin{lemma}[Ellis–Numakura]
    \yalabel{Ellis-Numakura Lemma}{Ellis-Numakura}{lem:ellisnumakura}
    Every compact semigroup
    contains an \vocab{idempotent} element,
    i.e.~$f$ such that $f^2 = f$.
\end{lemma}
\begin{proof}
    Using Zorn's lemma, take a $\subseteq$-minimal
    compact subsemigroup $R$ of $S$
    and let $s \in R$.

    Then $Rs$ is also a compact subsemigroup
    and $Rs \subseteq R$.
    By minimality of $R$, $R = Rs$.
    Let $P \coloneqq \{ x \in R : xs = s\}$.
    Then $P \neq \emptyset$,
    since $s \in Rs$
    and $P$ is a compact semigroup,
    since $x \overset{\alpha}\mapsto xs$
    is continuous and $P = \alpha^{-1}(s) \cap R$.
    Thus $P = R$ by minimality,
    so $s \in P$,
    i.e.~$s^2 = s$.
\end{proof}

The \yaref{lem:ellisnumakura} is not very interesting for $E(X,T)$,
since we already know that it has an identity,
in fact we have chosen $R = \{1\}$ in the proof.
But it is interesting for other semigroups.


\begin{theorem}[Ellis]
    $(X,T)$ is distal iff $E(X,T)$ is a group.
\end{theorem}
\begin{proof}

    Let $G \coloneqq  E(X,T)$.
    Let $d$ be a metric on $X$.

    For all $g \in G$ we need to show that $x \mapsto gx$ is bijective.
    If we had $gx = gy$, then $d(gx,gy) = 0$.
    Then $\inf d(tx,ty) = 0$, but the flow is distal,
    hence $x = y$.

    Let $g \in G$. Consider the compact semigroup $\Gamma \coloneqq  Gg$.
    By the \yaref{lem:ellisnumakura},
    there is $f \in \Gamma$ such that $f^2 = f$,
    i.e.~for all $x \in X$ we have $f^2(x) = f(x)$.
    Since $f$ is injective, we get that $x = f(x)$,
    i.e.~$f = \id$.

    Take $g' \in G$ such that $f = g' \circ g$.%
    %\footnote{This exists since $f \in Gg$.}

    It is $g' = g'gg'$,
    so $\forall  x .~g'(x) = g'(g g'(x))$.
    Hence $g'$ is bijective
    and $x = gg'(x)$,
    i.e.~$g g' = \id$.

    \todo{The other direction is left as an easy exercise.}
\end{proof}

% TODO ANKI-MARKER

Let $(X,T)$ be a flow.
Then by Zorn's lemma, there exists $X_0 \subseteq X$
such that $(X_0, T)$ is minimal.
In particular,
for $x \in X$ and $\overline{Tx} = Y$
we have that $(Y,T)$ is a flow.
However if we pick $y \in Y$, $Ty$ might not be dense.
% TODO: question!
% TODO: think about this!
% We want to a minimal subflow in a nice way:

\begin{theorem}
    \label{thm:distalflowpartition}
    If $(X,T)$ is distal, then $X$ is the disjoint union of minimal subflows.
    In fact those disjoint sets
    will be orbits of $E(X,T)$.
\end{theorem}
\begin{proof}
    Let $G = E(X,T)$.
    Note that for all $x \in X$,
    we have that $Gx \subseteq X$ is compact
    and invariant under the action of $G$.

    Since $G$ is a group, the orbits partition $X$.%
    \footnote{Note that in general this does not hold for semigroups.}

    % Clearly the sets $Gx$ cover $X$. We want to show that they
    % partition $X$.
    % It suffices to show that $y \in Gx \implies Gy = Gx$.

%     Take some $y \in Gx$.
%     Recall that $\overline{Ty} = \overline{T} y = Gy$.
%     We have $\overline{Ty} \subseteq  Gx$,
%     so $Gy \subseteq Gx$.
%     Since $y = g_0 x \implies x = g_0^{-1}y$, we also have $x \in Gy$,
%     hence $Gx \subseteq  Gy$
%     TODO: WHY?
\end{proof}
\begin{corollary}
    If $(X,T)$ is distal and minimal,
    then $E(X,T) \acts X$ is transitive.
\end{corollary}
