Continuity on Compacts subsets is equivalent to Uniform Continuity (proof using Lebesgue Covering Lemma)?

I am trying to prove that Continuity is equivalent to uniform continuity in compact spaces by means of Lebesgue's Covering Lemma. My attempted proof is the following.

Let $f: X\to \Omega$ a continuos function with $X$ compact. Fix $x\in X$. Then, since $f$ is continuos, $f^{1}(B(f(x),\epsilon)\cap f(X))$ is open in $X$ ($\epsilon>0$). The collection of all those $f^{-1}(B(f(x),\epsilon)\cap f(X))$ is an open covering of $X$.

We are now going to use the Lebesgue Covering Lemma. Since $X$ is compact, $X$ is also sequentially compact. Therefore , if we pick $x$ as before, there must be a $\delta>0$ such that $B(x,\delta)\subseteq G$ for some $G$ in our open cover. We have then for each $y\in X$ ,$d(x,y)<\delta$ implies $\rho(f(x),f(y))<\epsilon$. Is this proof correct?

• You don't have to intersect with $f[X]$, really, and formally we need to halve the radii, see below. – Henno Brandsma Nov 10 '17 at 16:45

I'm confused about whether you're working at $x$ or not. We want uniform continuity, so work globally:
Start by some $\varepsilon > 0$. Let $\mathcal{U} = \{f^{-1}[B(f(x), {\varepsilon \over 2})]: x \in X\}$, this is an open cover of $X$ (it covers trivially and the sets are open by continuity).
Let $\delta$ be the Lebesgue number for this cover, so that any subset of diameter $< \delta$ is contained in a member of $\mathcal{U}$ (see here for this formulation). So if $d(x,y) < \delta$ for any $x,y \in X$, then $\{x,y\}$ has diameter $< \delta$ and thus $\{x,y\} \subseteq f^{-1}[B(z,\frac{\varepsilon}{2})]$, for some $z \in X$. Then the triangle inequality via $f(z)$ shows that $d(f(x), f(y)) < \varepsilon$.
If your formulation of the lemma is that every $B(x,\delta)$ is contained in an element of $\mathcal{U}$, use $y \in B(x,\delta) \subseteq f^{-1}[B(z,\frac{\varepsilon}{2})]$ the same triangle inequality shows $d(f(x),f(y)) < \varepsilon$ again, it doesn't really matter.