I'm studying for my topology exam and have come across a question that I can't solve. To state the problem more clearly: For $D$ a closed entourage in a uniform space $X$, and $K$ a compact subset of $X$, show that $D[K]$ is closed.
I guess I'm missing some fundamental proof technique that I need to use for this sort of problem and I'd really like to see what I'm missing.
Proposition. If $D$ is an entourage closed as a subset of $X^2$ and $K ⊆ X$ is compact, then $D[K]$ is closed.
Note that $D[K] = π_2[(K × X) ∩ D]$ and $(Κ × X) ∩ D$ is closed in $K × X$. So the proposition follows from the following lemma.
Lemma. Let $X$ be a topological space, $K$ a compact space. Then $π_2: K × X \to X$ is a closed mapping.
The lemma can be proved using tube lemma argument: Let $A$ be closed in $K × X$, let $y ∈ X \setminus π_X[A]$. For each $x ∈ K × X$ with $π_2(x) = y$, we have $x ∉ A$, so there is $U_x$ open in $K$ and $V_x$ open in $X$ such that $U_x × V_x$ is open neighborhood of $x$ disjoint with $A$. By compactness, there are $x_1, …, x_n$ such that $\{U_{x_1}, …, U_{x_n}\}$ covers $K$. Define $V := V_{x_1} ∩ \cdots ∩ V_{x_n}$. Then $K × V$ is open neighborhood of $K × \{x\}$ disjoint with $A$ and $V$ is open neighborhood of $y$ disjoint with $f[A]$. So $X \setminus f[A]$ is open and $f[A]$ is closed.