Heine-Cantor Theorem/Proof 2

Theorem
Let $M_1 = \left({A_1, d_1}\right)$ and $M_2 = \left({A_2, d_2}\right)$ be metric spaces.

Let $M_1$ be compact.

Let $f: A_1 \to A_2$ be a continuous mapping.

Then $f$ is uniformly continuous.

Proof
Let $A_1 \times A_1$ and $A_2 \times A_2$ be considered with the product topology.

Let $F: A_1 \times A_1 \to A_2 \times A_2$ be the mapping defined as:
 * $F \left({x, y}\right) = \left({f \left({x}\right), f \left({y}\right)}\right)$

By Projection from Product Topology is Continuous, we have that the (first and second) projections on $A_1 \times A_1$ are continuous.

By Continuity of Composite Mapping and Continuous Mapping to Topological Product, it follows that $F$ is continuous.

By Metric is Continuous and Continuity of Composite Mapping, it follows that $d_2 \circ F: A_1 \times A_1 \to \R$ is continuous.

Let $\epsilon \in \R_{>0}$ be a strictly positive real number.

By Continuity Defined from Closed Sets, $C = \left({d_2 \circ F}\right)^{-1} \left({\left[{\epsilon \,.\,.\, {+\infty}}\right)}\right)$ is closed in $A_1 \times A_1$.

By Topological Product of Compact Spaces, $A_1 \times A_1$ is compact.

By Closed Subspace of Compact Space is Compact, $C$ is compact.

By Metric is Continuous and Continuous Image of Compact Space is Compact, $d_1 \left({C}\right)$ is compact.

We have that $d_1 \left({C}\right)$ has a smallest element $\delta$.

By metric space axiom $(M4)$, we have that $\delta > 0$.

By construction, it follows that:
 * $\forall x, y \in A_1: d_1 \left({x, y}\right) < \delta \implies d_2 \left({f \left({x}\right), f \left({y}\right)}\right) < \epsilon$