Let $X$ and $Y$ be metric space, $X$ be compact, $C(X,Y)$ denote the set of continuous functions from $X$ to $Y$ with uniform convergence on compacts topology, and $\operatorname{Lip}(X,Y)$ denote the subspace of Lipschitz functions from $X$ to $Y$. Under what conditions is $\operatorname{Lip}(X,Y)$ a dense subset of $C(X,Y)$?




---


*I expect that there should be some “topological compatibility condition” between $X$ and $Y$, but this is purely (and likely unfounded) intuition.*



Uniform density of Lipschitz maps is space of continuous function — for general metric spaces
Let $(X,\rho)$ be a compact metric space, and let $(Y,d)$ be a separable metric space. Then I claim that one can endow $X$ with a compatible metric $d$ such that every continuous $f:X\rightarrow Y$ can be uniformly approximated by a Lipschitz function.


Let $(f\_n)\_{n\geq 0}$ be a sequence of continuous functions such that every continuous $f:X\rightarrow Y$ can be uniformly approximated by some $f\_n$. Let $(\alpha\_n)\_{n\geq 0}$ be a sequence of positive real numbers such that $\alpha\_n\cdot\operatorname{Diam}(f\_n[X])\rightarrow 0$. Then define a metric $d$ on $X$ by setting $$d(x,y)=\rho(x,y)+\sup\_n\alpha\_n\cdot d(f\_n(x),f\_n(y)).$$ Then the metric $d$ is compatible with the original topology on $X$. Furthermore, for each $n$, we have
$d(f\_n(x),f\_n(y))\leq\alpha\_n^{-1}\cdot d(x,y)$, so each $f\_n$ is Lipschitz.


