Exercise: Let $(X,d)$ be a compact metric space. A function $f:X\to\mathbb{R}$ is called Lipschitz-continuous if there exists a constant $L$ such that for all $x,y\in X$ we have that $\left|f(x) - f(y)\right|\leq Ld(x,y)$. Let $C(X)$ be the set of continuous functions on $X$ with the uniform metric and let $\mathcal{A}\subseteq C(X)$be the collection of Lipschitz continuous functions.
Let $x_0\in X$ and define $f_{x_0}:X\to\mathbb{R}$ by $f_{x_0}(x) = d(x,x_0)$. Show that $f_{x_0}\in\mathcal{A}$.
What I've tried: I need to show that for every two points $x,y\in X$ we have that $\left|f_{x_0}(x) - f_{x_0}(y)\right| = \left|d(x,x_0)-d(y,x_0)\right| \leq L d(x,y)$. However, since $d(x,y)$ is the uniform metric, I don't know what $d(x,y)$ looks like. The uniform metric is defined to be $p(f,g) = \sup_{x\in X}\left|f(x) - g(x)\right|$, how would this work in this exercise?
Question: How do I solve this exercise?
We have
$(*)$ $\left|f_{x_0}(x) - f_{x_0}(y)\right| = \left|d(x,x_0)-d(y,x_0)\right| \leq d(x,y)$
by the reversed triangle inequality. hence $L=1$.
You are done, since, by $(*)$ we get $f_{x_0}\in\mathcal{A}$.
The metric $d$ is the metric on $X$, the uniform metric is defined on $C(X)$ !