# Prove that( $f$ locally Holder Continuous function on compact set) $\implies (f$ globally Holder continuous)

Let $X$ and $Y$ be metric spaces and let $K \subset X$ be a compact subspace of $X$. I want to prove:

($f: K\to Y$ locally Holder-continuous with exponent $s$)$\implies ( f: K \to Y$ globally Holder Continuous on all of $K$ with exponent $s$).

Here is my attempted solution: local Holder Continuity means $\forall x \in K, \hspace{2mm} \exists U_{x}$ an open neighbourhood of $x$, such that $f$ Holder continuous with exponent $s$ on $U_{x}$. Let $(U_{x})_{x\in K}$ be an open cover of $K$ of such $U_x$. By compactness of $K$ find a finite subcover $U_{i_1},..., U_{i_{n}}$ of $(U_{x})_{x\in K}$. In each $U_{i_j}$, $\exists$ corresponding Holder constant $C_{i_j}$. Let $C := \max \{ U_{i_1},..., U_{i_{n}} \}$. That $C$ will serve as Holder Constant for $x ,y \in K$ when $x,y$ are in the same $U_{i_j}$. So for $x ,y \in$ different $U_{i_j}$, I want to use the concept of Lebesgue numbers:

Let $(X,d)$ be a compact metric space and let $(U_i)_{i\in I}$ be an open cover of $X$. Then there exists $\delta>0$ such that each subset $Y$ of $X$ of diameter less than or equal to $\delta$ lies within some $U_i$.

I am not sure how to proceed though.

Assume $f$ is not globally holder continuous then there exist two sequences, say $\{x_n\}$ and $\{y_n\}$ in $K$ such that
$$d(f(x_n), f(y_n)) \ge n ~d^s(x_n, y_n)$$
W.L.O.G we may assume $x_n \rightarrow x$ and $y_n \rightarrow y$. Moreover $x \neq y$ since otherwise it is contradicting with locally holder continuous around point $x=y$. Therefore $x \neq y$, taking into account $f$ is continuous and above inequality we get $$d(f(x), f(y)) = \infty$$