\section{Compact Uniform Spaces}
\label{section:compact-uniform}

\begin{definition}
\label{definition:totally-bounded-uniform}
    Let $(X, \fU)$ be a uniform space, then the following are equivalent:
    \begin{enumerate}
        \item For every $U \in \fU$, there exists $\seqf{x_j} \subset U$ such that $X = \bigcup_{j = 1}^n U(x_j)$. 
        \item Every ultrafilter on $X$ is Cauchy.
        \item For every filter $\fF_0 \subset 2^X$, there exists $\fF \supset \fF_0$ such that $\fF$ is Cauchy. 
    \end{enumerate}

    If the above holds, then $(X, \fU)$ is \textbf{totally bounded}. 
\end{definition}
\begin{proof}
    (1) $\Rightarrow$ (2): Let $\fF \subset 2^X$ be an ultrafilter and $U \in \fU$, then there exists $U$-small sets $\seqf{E_j} \subset 2^X$ such that $X = \bigcup_{j = 1}^n E_j$. By (3) of \autoref{definition:ultrafilter}, there exists $1 \le j \le n$ such that $E_j \in \fF$, so $\fF$ is Cauchy.

    (2) $\Rightarrow$ (3): By the \hyperref[ultrafilter lemma]{lemma:ultrafilter}. 

    $\neg (1) \Rightarrow \neg (3)$: Let $U \in \fU$ be symmetric such that for all $X_0 \subset X$ finite, $\bigcup_{x \in X_0}U(x) \subsetneq X$. Let $\fF_0$ be the filter generated by
    \[
    \bracs{X \setminus \bigcup_{x \in X_0}U(x) \bigg | X_0 \subset X \text{ finite}}
    \]

    then for any $U$-small set $E \subset X$ and $x \in E$, $E \cap [X \setminus U(x)] = \emptyset$. Therefore no filter finer than $\fF_0$ contains a $U$-small set. 
\end{proof}

\begin{proposition}
\label{proposition:totally-bounded-image}
    Let $X, Y$ be uniform spaces and $f \in UC(X; Y)$. If $X$ is totally bounded, then so is $f(X)$. 
\end{proposition}
\begin{proof}
    Let $U$ be an entourage of $Y$, then there exists $\seqf{x_j} \subset X$ such that $\bigcup_{j = 1}^n[(f \times f)^{-1}(U)](x_j) = X$. In which case, $f(x) \subset \bigcup_{j = 1}^n U(f(x_j))$.
\end{proof}


\begin{proposition}
\label{proposition:compact-uniform}
    Let $X$ be a uniform space, then the following are equivalent: 
    \begin{enumerate}
        \item $X$ is compact. 
        \item $X$ is complete and totally bounded. 
    \end{enumerate}

    In particular, $X$ is totally bounded if and only if its Hausdorff completion is compact. 
\end{proposition}
\begin{proof}
    (1) $\Rightarrow$ (2): By (1) of \autoref{definition:compact}, $X$ is totally bounded. Let $\fF$ be a Cauchy filter, then by (4) of \autoref{definition:compact}, $\fF$ has at least one accumulation point. Since $\fF$ is Cauchy, the accumulation points and limit points of $\fF$ coincide by (2) of \autoref{proposition:cauchyfilterlimit}. 

    (2) $\Rightarrow$ (1): By (2) of \autoref{definition:totally-bounded-uniform}, every ultrafilter is Cauchy, and hence converges, which satisfies (4) of \autoref{definition:compact}. 
\end{proof}

\begin{proposition}
\label{proposition:totally-bounded-product}
    Let $\seqi{X}$ be totally bounded uniform spaces, then $\prod_{i \in I}X_i$ is totally bounded. 
\end{proposition}
\begin{proof}
    Let $J \subset I$ be finite and $\seqj{U}$ such that $U_j$ is an entourage of $X_j$ for each $j \in J$. Since each $X_j$ is totally bounded, there exists $Y_j \subset X_j$ finite such that $X_j = U_j(Y_j)$. Let $Y = \prod_{j \in J}Y_j$ and $\phi_y \in \pi_J^{-1}(y)$ for each $y \in Y$, then for any $x \in X$, there exists $y \in Y$ such that $\pi_j(x) \in U_j(\pi_j(y))$ for each $j \in J$. Therefore
    \[
    X = \bigcup_{x \in Y}\braks{\bigcap_{j \in J}(\pi_j \times \pi_j)^{-1}(U_j)}(\phi_x)
    \]
\end{proof}



\begin{proposition}
\label{proposition:uniform-continuous-compact}
    Let $X$ be a compact uniform space, $Y$ be a uniform space, and $f \in C(X; Y)$, then $f \in UC(X; Y)$.
\end{proposition}
\begin{proof}
    Let $V$ be an entourage of $Y$. For each $x \in X$, let $U_x$ be an entourage of $X$ such that $(f(y), f(z)) \in V$ for all $y, z \in (U_x \circ U_x)(x)$. Since $X$ is compact, there exists $\seqf{x_j} \subset X$ such that $X = \bigcup_{j = 1}^nU_{x_j}(x_j)$. 
    
    Let $U = \bigcap_{j = 1}^n U_{x_j}$, then for any $(x, y) \in U$, there exists $1 \le j \le n$ such that $x \in U_{x_j}(x_j)$. In which case, $x, y \in (U_{x_j} \circ U_{x_j})(x_j)$, so $(f(x), f(y)) \in V$. 
\end{proof}

\begin{proposition}
\label{proposition:compact-uniform-structure}
    Let $X$ be a compact Hausdorff space, then there exists a unique uniformity on $X$ that induces its topology. 
\end{proposition}
\begin{proof}
    By \autoref{proposition:completely-regular-uniformisable}, there exists a uniformity on $X$ that induces its topology. By \autoref{proposition:uniform-continuous-compact}, $X$ admits a unique uniformity. 
\end{proof}
