\section{Pseudometrics}
\label{section:pseudometric}

The axioms of uniform spaces strongly resembles working in a metric space. In fact, any uniform space may arise from a family of uniformly continuous pseudometrics. This allows understanding uniform spaces in a more familiar language.

\begin{definition}[Pseudometric]
\label{definition:pseudometric}
    Let $X$ be a set, and $d: X \times X \to [0, \infty)$, then $d$ is a \textbf{pseudometric} on $X$ if
    \begin{enumerate}
        \item[(PM1)] For any $x \in X$, $d(x, x) = 0$.
        \item[(PM2)] For any $x, y \in X$, $d(x, y) = d(y, x)$.
        \item[(PM3)] For any $x, y, z \in X$, $d(x, z) \le d(x, y) + d(y, z)$.
    \end{enumerate}

    If $d$ satisfies the above and
    \begin{enumerate}
        \item[(M)] For any $x, y \in X$ with $x \ne y$, $d(x, y) > 0$.
    \end{enumerate}

    then $d$ is a \textbf{metric}.
\end{definition}

\begin{lemma}
\label{lemma:pseudometric-continuous}
    Let $(X, \fU)$ be a uniform space and $d: X \times X \to [0, \infty)$ be a pseudometric, then the following are equivalent:
    \begin{enumerate}
        \item $d \in UC(X \times X; [0, \infty))$.
        \item For each $r > 0$, $E(d, r) = \bracs{(x, y) \in X \times X| d(x, y) < r} \in \fU$.
    \end{enumerate}
\end{lemma}
\begin{proof}
    (1) $\Rightarrow$ (2): Let $r > 0$, then there exists $V \in \fU$ symmetric such that for any $(x, x'), (y, y') \in V$, $\abs{d(x, y) - d(x', y')} < r$. In particular, for any $(x, y) \in V$, $(x, x), (x, y) \in V$. Thus $d(x, y) < d(x, x) + r = r$, $V \subset E(d, r)$, and $E(d, r) \in \fU$.

    (2) $\Rightarrow$ (1): Let $r > 0$, then for any $(x, x'), (y, y') \in E(d, r/2)$, $\abs{d(x, y) - d(x', y')} < r$ by the triangle inequality.
\end{proof}


\begin{definition}[Pseudometric Uniformity]
\label{definition:pseudometric-uniformity}
    Let $X$ be a set and $\seqi{d}$ be pseudometric on $X$. For each $i \in I$, $r > 0$, and $x \in X$, let
    \[
    B_i(x, r) = \bracs{y \in X| d(x, y) < r}
    \]

    and
    \[
    E(d_i, r) = \bracs{(x, y) \in X \times X| d(x, y) < r}
    \]

    then there exists a uniformity $\fU$ on $X$ such that:
    \begin{enumerate}
        \item The family
        \[
        \fB = \bracs{\bigcap_{j \in J}E(d_j, r) \bigg | J \subset I \text{ finite}, r > 0}
        \]

        forms a fundamental system of entourages consisting of symmetric open sets.
        \item For any $x \in X$,
        \[
        \cb(x) = \bracs{\bigcap_{j \in J}B_j(x, r) \bigg | J \subset I \text{ finite}, r > 0}
        \]

        is a fundamental system of neighbourhoods at $x$.
        \item For each $U \subset X$, $U$ is open if and only if for every $x \in U$, there exists $J \subset I$ finite and $r > 0$ such that $\bigcap_{j \in J}B_j(x, r) \subset U$.
        \item For each $i \in I$, $d_i \in UC(X \times X; [0, \infty))$.
        \item[(U)] For any other uniformity $\mathfrak{V}$ satisfying (4), $\mathfrak{U} \subset \mathfrak{V}$.
    \end{enumerate}

    The uniformity $\fU$ is the \textbf{pseudometric uniformity} induced by $\seqi{d}$, and the topology induced by $\fU$ is the \textbf{pseudometric topology} on $X$ induced by $\seqi{d}$.
\end{definition}
\begin{proof}
    (1, fundamental system): To see that $\fB$ is a fundamental system of entourages for a uniformity on $X$, it is sufficient to verify the conditions of \autoref{proposition:fundamental-entourage-criterion}.
    \begin{enumerate}
        \item[(FB1)] For any $J, J' \subset I$ finite and $r, r' > 0$,
        \[
        \bigcap_{j \in J \cup J'}E(d_j, r \wedge r') \subset \paren{\bigcap_{j \in J}E(d_j, r)} \cap \paren{\bigcap_{j \in J'}E(d_j, r')}
        \]

        \item[(UB1)] For each $i \in I$, $d(x, x) = 0$ for all $x \in X$. Thus for any $i \in I$ and $r > 0$, $E(d_i, r)$ contains the diagonal.
        \item[(UB3)] For each $J \subset I$ finite and $r > 0$,
        \begin{align*}
        \paren{\bigcap_{j \in J}E(d_j, r/2)} \circ \paren{\bigcap_{j \in J}E(d_j, r)} &\subset \bigcap_{j \in J}E(d_j, r/2) \circ E(d_j, r/2) \\
        &\subset \bigcap_{j \in J}E(d_j, r)
        \end{align*}
        
        by the triangle inequality.
    \end{enumerate}

    (2): Since $\fB$ is a fundamental system of entourages for $\fU$,
    \[
    \cb(x) = \bracs{U(x)| U \in \fB}
    \]

    is a fundamental system of neighbourhoods at $x$.

    (3): By definition of the uniform topology, for any $U \subset X$, $U$ is open if and only if for any $x \in U$, there exists $V \in \fU$ such that $x \in V(x) \subset U$. As $\fB$ is a fundamental system of entourages for $\fU$, this is equivalent to the existence of $J \subset I$ finite and $r > 0$ such that
    \[
    x \in \paren{\bigcap_{j \in J}E(d_j, r)}(x) = \bigcap_{j \in J}B_j(x, r) \subset U
    \]


    (1, symmetric open): Let $i \in I$ and $r > 0$. Since $d_i$ is symmetric, so is $E(d_i, r)$. For any $(x, y) \in E(d_i, r)$, let $s = r - d_i(x, y)$, then for any $(x', y') \in X \times X$ with $d_i(x, x') < s/2$ and $d_i(y, y') < s/2$, $d(x', y') < s + d_i(x, y) = r$. Thus $B_i(x, s/2) \times B_i(y, s/2) \subset E(d_i, r)$.

    By (3), $B_i(x, s/2) \in \cn(x)$ and $B_i(y, s/2) \in \cn(y)$, so $B_i(x, s/2) \times B_i(y, s/2) \in \cn((x, y))$. As such, $E(d_i, r)$ is open by \autoref{lemma:openneighbourhood}.

    (4): By \autoref{lemma:pseudometric-continuous}.

    (5): By \autoref{lemma:pseudometric-continuous}, $E(d_i, r) \in \mathfrak{V}$ for all $i \in I$ and $r > 0$, so $\mathfrak{V} \supset \mathfrak{B}$ by (F2), and $\mathfrak{V} \supset \mathfrak{U}$.
\end{proof}

\begin{lemma}
\label{lemma:uniform-sequence-pseudometric}
    Let $(X, \fU)$ be a uniform space and $\bracsn{U_n}_0^\infty \subset \fU$ such that:
    \begin{enumerate}
        \item[(a)] $U_{0} = X \times X$.
        \item[(b)] For each $n \in \natz$, $U_n$ is symmetric.
        \item[(c)] For each $n \in \natz$, $U_{n + 1} \circ U_{n+1} \subset U_n$.
    \end{enumerate}

    then there exists a pseudometric $d: X \times X \to [0, 1]$ such that
    \[
    U_{n+1} \subset E(d, 2^{-n}) \subset U_{n-1}
    \]

    for each $n \in \natp$.
\end{lemma}
\begin{proof}
    Let
    \[
    \rho: X \times X \to [0, 1] \quad (x, y) \mapsto \inf\bracs{2^{-n}| n \in \natz, (x, y) \in U_n}
    \]

    and $d: X \times X \to [0, 1]$ by
    \[
     d(x, y) = \inf\bracs{\sum_{j = 1}^n\rho(x_{j-1}, x_j) \bigg | \seqf{x_j} \subset X, x_0 = x, x_n = y, n \in \natp}
    \]

    then
    \begin{enumerate}
        \item[(PM1)] For any $x \in X$, $x \in \bigcap_{n \in \natp}U_n$. Thus $\rho(x, x) = 0$ and $d(x, x) \le \rho(x, x) = 0$.
        \item[(PM2)] Let $x, y \in X$. By assumption (b), $\rho(x, y) = \rho(y, x)$. Thus $d(x, y) = d(y, x)$ as well.
        \item[(PM3)] Let $x, y, z \in X$, then for any $\seqf{x_j}$ and $\seqf[m]{y_j}$ with $x_0 = x$, $x_n = y = y_0$, and $y_m = z$,
        \[
        d(x, z) \le \sum_{j = 1}^n \rho(x_{j - 1}, x_j) + \sum_{j = 1}^m \rho(y_{j - 1}, y_j)
        \]

        As this holds for all such $\seqf{x_j}$ and $\seqf[m]{y_j}$, $d(x, z) \le d(x, y) + d(y, z)$.
    \end{enumerate}

    so $d$ is a pseudometric.

    For any $(x, y) \in U_{n+1}$, $d(x, y) \le \rho(x, y) < 2^{-n}$, so $U_{n+1} \subset E(d, 2^{-n})$.

    Let $x, y \in X$ with $d(x, y) < 2^{-n}$. If $\rho(x, y) < 2^{-n}$, then the claim holds directly. Assume inductively that for any $x, y \in X$ with $d(x, y) < 2^{-n}$, if there exists $\seqf[m]{x_j} \subset X$ such that $x_0 = x$, $x_m = y$ and $\sum_{j = 1}^m \rho(x_{j - 1}, x_j) < 2^{-n}$, then $(x, y) \in U_{n - 1}$.

    Let $x, y \in X$ and $\seqf[m+1]{x_j} \subset X$ such that $x_0 = x$, $x_{m+1} = y$, and $\sum_{j = 1}^{m+1} \rho(x_{j - 1}, x_j) < 2^{-n}$. Let $1 \le k < m+1$ such that $\sum_{j = 1}^{k}\rho(x_{j - 1}, x_j) < 2^{-n-1}$ and $\sum_{j = 1}^{k+1}\rho(x_{j-1}, x_j) \ge 2^{-n-1}$, then $\sum_{j = k + 1}^{m+1}\rho(x_{j-1}, x_j) < 2^{-n-1}$ as well. By the inductive hypothesis, $(x, x_k), (x_{k+1}, y) \in U_{n+1} \subset U_n$. Given that $\rho(x_k, x_{k+1}) < 2^{-n}$, $(x_k, x_{k+1}) \in U_{n+1}$ too. Thus
    \[
    (x, y) \in U_{n+1} \circ U_{n + 1} \circ U_{n + 1} \subset U_n \circ U_n \subset U_{n-1}
    \]

\end{proof}

\begin{remark}
\label{remark:pseudometric-proof}
	Unfortunately, it was hard to access sources for this proof online, so I could not provide a specific citation. As such, I followed an online PDF given by the link: https://krex.k-state.edu/server/api/core/bitstreams/1bdf2b14-3b5a-4962-a589-93ee1998950c/content
\end{remark}

\begin{remark}
\label{remark:uniform-sequence-pseudometric}
	It may be tempting to construct the level sets of the pseudometric on the dyadic rational numbers by composing these sets, then proceed to construct the pseudometric as in Urysohn's lemma. However, this approach has a major shortcoming in that the composition of symmetric entourages are not necessarily symmetric. As such, it is difficult to construct symmetric level sets for the desired pseudometric.
\end{remark}


\begin{theorem}
\label{theorem:uniform-pseudometric}
    Let $(X, \fU)$ be a uniform space, then $\fU$ is the pseudometric uniformity induced by the family of all uniformly continuous pseudometrics on $X$.
\end{theorem}
\begin{proof}
    Let $\seqi{d}$ be the family of all uniformly continuous pseudometrics on $X$, and $\mathfrak{V}$ be the pseudometric uniformity induced by $\seqi{d}$. By (U) of \autoref{definition:pseudometric-uniformity}, $\fU \supset \mathfrak{V}$.

    On the other hand, let $U_1 \in \mathfrak{U}$. By (U3), there exists $\seq{U_n} \subset \mathfrak{U}$ such that $U_{n + 1} \circ U_{n + 1} \subset U_n$ for all $n \in \natp$. Let $U_0 = X \times X$, then $\bracsn{U_n}_0^\infty \subset \fU$ satisfies the hypothesis of \autoref{lemma:uniform-sequence-pseudometric}. Thus there exists a pseudometric $d: X \times X \to [0, \infty)$ such that for all $n \in \natp$,
    \[
    U_{n + 1} \subset E(d, 2^{-n}) \subset U_{n-1}
    \]

    By \autoref{definition:pseudometric-uniformity}, $d$ is a uniformly continuous pseudometric on $X$. Since $E(d, 1/4) \subset U_1$, $U_1 \in \mathfrak{V}$. Therefore $\fU = \mathfrak{V}$.
\end{proof}

\begin{proposition}
\label{proposition:uniform-pseudometric-hausdorff}
    Let $(X, \fU)$ be a uniform space and $\seqi{d}$ be a family of pseudometrics that induces the topology on $X$, then the following are equivalent:
    \begin{enumerate}
        \item $X$ is separated.
        \item For any $x, y \in X$ with $x \ne y$, there exists $i \in I$ such that $d_i(x, y) > 0$.
        \item For any $x, y \in X$ with $x \ne y$, there exists a uniformly continuous pseudometric $d$ on $X$ such that $d(x, y) > 0$.
    \end{enumerate}
\end{proposition}
\begin{proof}
    (1) $\Rightarrow$ (2): By assumption, there exists $U \in \fU$ such that $(x, y) \not\in U$, so there exists $J \subset I$ finite and $r > 0$ such that
    \[
    \bigcap_{j \in J}E(d_j, r) \subset U
    \]

    In which case, there must exist $j \in J$ such that $d_j(x, y) \ge r > 0$.

    (3) $\Rightarrow$ (1): Let $x, y \in X$ with $x \ne y$ and $d$ be a continuous pseudometric on $X$ such that $r = d(x, y) > 0$. By \autoref{theorem:uniform-pseudometric}, $E(d, r) \in \fU$. Therefore $\bigcup_{U \in \fU}U = \Delta$, and $X$ is separated by \autoref{definition:uniform-separated}.
\end{proof}


\begin{definition}[Equivalent Pseudometrics]
\label{definition:equivalent-pseudometrics}
    Let $X$ be a set and $\seqi{d}, \seqj{d}$ be pseudometrics on $X$, then $\seqi{d}$ and $\seqj{d}$ are \textbf{equivalent} if their induced uniformities coincide.
\end{definition}

\begin{lemma}
\label{lemma:pseudometric-clamp}
    Let $X$ be a set and $d: X \times X \to [0, \infty)$ be a pseudometric, then the pseudometric
    \[
    \td d: X \times X \to [0, \infty) \quad (x, y) \mapsto d(x, y) \wedge 1
    \]

    is equivalent to $d$.
\end{lemma}
\begin{proof}
    For any $r \in (0, 1]$, $E(d, r) = E(\td d, r)$. Since sets of the above form generate the uniformity induced by $d$ and $\td d$, their induced uniformities coincide.
\end{proof}

\begin{proposition}
\label{proposition:countable-equivalent-pseudometrics}
    Let $X$ be a set and $\seq{d_n}$ be pseudometrics on $X$, then there exists a pseudometric $d: X \times X \to [0, \infty)$ equivalent to $\seq{d_n}$.
\end{proposition}
\begin{proof}
    Using \autoref{lemma:pseudometric-clamp}, assume without loss of generality that for each $n \in \natp$, $d_n$ takes values in $[0, 1]$. Let
    \[
    d(x, y) = \sum_{n \in \natp}\frac{d_n(x, y)}{2^n}
    \]

    then $d$ is a well-defined a pseudometric.

    Let $r > 0$, then there exists $n \in \natp$ such that $2^{-n} < r$. Take $s = r - 2^{-n}$, then $\bigcap_{k = 1}^nE(d_k, s) \subset E(d, r)$. On the other hand, for any $n \in \natp$ and $r > 0$, $E(d, r/2^n) \subset \bigcap_{k = 1}^n E(d_k, r)$. Therefore $\seq{d_n}$ and $d$ are equivalent.
\end{proof}

\begin{theorem}[Metrisability of Uniform Spaces]
\label{theorem:uniform-metrisable}
    Let $(X, \fU)$ be a uniform space, then the following are equivalent:
    \begin{enumerate}
        \item There exists a countable fundamental system of entourages for $X$.
        \item There exists a pseudometric $d: X \times X \to [0, \infty)$ that induces the uniformity on $X$.
        \item There exists a countable family $\seq{d_n}$ of pseudometrics on $X$ that induce the uniformity on $X$.
    \end{enumerate}
\end{theorem}
\begin{proof}
    (1) $\Rightarrow$ (2): Let $\seq{U_n} \subset \fU$ be a fundamental system of entourages for $X$ and $V_1 = U_n$. Assume inductively that $\bracs{V_k|1 \le k \le n} \subset \fU$ has been constructed such that
    \begin{enumerate}
        \item[(a)] For each $1 \le k \le n$, $V_k$ is symmetric.
        \item[(b)] For each $1 \le k \le n$, $V_k \subset U_k$.
        \item[(c)] For each $1 \le k < n$, $V_{k+1} \circ V_{k+1} \subset V_{k}$.
    \end{enumerate}

    Let $W = V_n \cap U_{n+1}$, then by \autoref{lemma:symmetricfundamentalentourage}, there exists $V_{n+1} \in \fU$ symmetric such that $V_{n+1} \circ V_{n+1} \subset W$. Thus $\bracs{V_k|1 \le k \le n + 1} \subset \fU$ satisfies (a), (b), and (c) for $n + 1$.

    Let $V_0 = X \times X$, then by \autoref{lemma:uniform-sequence-pseudometric}, there exists a pseudometric $d: X \times X \to [0, \infty)$ such that for each $n \in \natp$,
    \[
    V_{n+1} \subset E(d, 2^{-n}) \subset V_{n-1}
    \]

    For any $U \in \fU$, there exists $n \in \nat$ such that
    \[
    U \supset U_n \supset V_n \supset E(d, 2^{-n-1})
    \]

    so $d$ induces the uniformity on $\fU$.

    (3) $\Rightarrow$ (1): By (1) of \autoref{definition:pseudometric-uniformity},
    \[
    \fB = \bracs{\bigcap_{j \in J}E(d_j, r) \bigg | J \subset \nat \text{ finite}, r > 0}
    \]

    is a fundamental system of entourages for $\fU$. Since for any $r > 0$, there exists $q \in \rational \cap (0, r)$,
    \[
    \bracs{\bigcap_{j \in J}E(d_j, r) \bigg | J \subset \nat \text{ finite}, r \in \rational, r > 0}
    \]

    is a countable fundamental system of entourages for $\fU$.
\end{proof}

\begin{proposition}
\label{proposition:uniform-continuous-pseudometric}
    Let $X, Y$ be uniform spaces and $f: X \to Y$, then the following are equivalent:
    \begin{enumerate}
        \item $f \in UC(X; Y)$.
        \item For every uniformly continuous pseudometric $d_Y$ on $Y$, there exists a uniformly continuous pseudometric $d_X$ on $X$ such that for all $x, y \in X$, $d_Y(f(x), f(y)) \le d_X(x, y)$.
    \end{enumerate}
\end{proposition}
\begin{proof}
	(1) $\Rightarrow$ (2): $d_X(x, y) = d_Y(f(x), f(y))$ is a uniformly continuous pseudometric.

	(2) $\Rightarrow$ (1): Let $U$ be an entourage of $Y$. By \autoref{theorem:uniform-pseudometric}, there exists a uniformly continuous pseudometric $d_Y$ on $Y$ and $r > 0$ such that $E(d_Y, r) \subset U$. By assumption, there exists a uniformly continuous pseudometric $d_X$ on $X$ such that $d_Y(f(x), f(y)) \le d_X(x, y)$. In which case, $(f \times f)(E(d_X, r)) \subset U$, and the pre-image of $U$ by $(f \times f)$ is an entourage in $X$ by \autoref{definition:pseudometric-uniformity}, so $f \in UC(X; Y)$.
\end{proof}
