# Checking for varification: Proof - continuous function on a compact metric spaces is uniformly continuous

As a prep for my exam, I tried to prove all theorems we had during lecture on my own. I tried to prove that every continuous function on a compact metric space is also uniformly continuous. However in my "proof" I don't see me using the compact property of the metric Space, so I assume I error somewhere and that my "proof" is incorrect. I would be very happy, if someone could look over it and point out my mistake.

Let $(X,d)$ be a metric Space and $f$ be a continuous function on $X$. For a given $\epsilon$,

we define $T$ as the family of all neighborhoods of all $x_i \in X,$ that suffice the condition: $d(x_j, x_i) < { \delta \over 2} \Rightarrow d_Y(f(x_j), f(x_i))$ for $x_j \in U_{ \delta \over 2}(x_i)$ - (remind $f$ is continuous)

Now picking any two points $x_m, x_n$ in any neighborhood of $x_i$ suffices the triangle inequality and one has $d_X(x_m, x_n) \le d_X(x_m, x_i) + d_X(x_i, x_n) < { \delta \over 2} + { \delta \over 2} = \delta \Rightarrow d_Y(f(x_m), f(x_n)) < \epsilon$

The continuity of $f$ does not imply the existence of the neighborhoods you choose. Indeed, the $\delta$ should depend on $x_i$. You salvage the proof precisely by noting that by compactness, you can choose a finite subcover, and then choose the smallest $\delta_i$ of the subcover.