My questions concern uniform spaces in specific cases involving compact spaces.
The first one is about how a compact Hausdorff space is a uniform space. I'm aware of indirect proofs using pseudometrics, but I'd like to see a direct proof that the set of neighbourhoods of the diagonal $\Delta_K$ of a compact Hausdorff space $K$ forms a basis for a uniformity on $K$ that induces its topology. How can I find such a proof ? (the only hard part being that for all such $U$ there is such a $V$ with $V\circ V\subset U$, i.e. $K$ is divisible)
Once this is solved, I'm wondering about the following question: let $X$ be a uniform space, $Z$ its Cauchy completion (which is again a uniform space), and assume $Z$ is compact (i.e. $X$ is precompact). Let $K$ be a compact space, and $f:X\to K$ a continuous function. Is $f$ necessarily uniformly continuous ?
If the answer is yes, then it can be extended to a map $g: Z\to K$ by the usual construction. If the answer is no, does this last bit still hold: even if $f$ is not uniformly continuous, can it always be extended to the completion when the codomain is compact ? (here the completion is not assumed to be compact)
My thoughts on how to answer these questions:
for the first one, I've been stuck for quite a while and have not made much progress. I've tried using the fact that for an open set $U\subset K$, there is $V$ open with $\overline{V}\subset U$, but this hasn't led me anywhere. Similarly, finding that a neighbourhood of the diagonal contains another such neighbourhood of the form $\displaystyle\bigcup_{i=1}^n U_i\times U_i$, where each $U_i$ open hasn't given me anything.
For the second one, I think the answer is yes, but only because I think that the map can be extended, and since $Z$ is compact, then $g$ would be uniformly continuous, and thus its restriction to $X$ too. So I've tried actually answering the third question (i.e. not proving that $f$ is uniformly continuous, and not any assumptions on $Z$; simply proving that it can be extended), but I run into some complications when I try to prove that if $x_i \to x, y_j \to x$, and $f(x_i), f(y_j)$ both converge in $K$, then it's to the same limit, and haven't managed to show this (which would help)