Some definitions: Let $(M,d)$, $(M',d')$ be metric spaces. For $f:M\to M'$, $x\in M$ and $r>0$, define $$D\_r(f)(x):= \sup\{r^{-1}d'(f(x),f(y)): y\in M,\,d(x,y)\leq r\}.$$ Define the *pointwise Lipschitz constant of $f$ at $x\in M$* as $\text{Lip}(f)(x):=\limsup\_{r\to 0} D\_r(f)(x)$, and say $f$ is *pointwise Lipschitz at $x$*, if $\text{Lip}(f)(x)<\infty$.


My question is the following:



> 
> Let $(M,d)$ be a compact length space (see [1]) and $X$ a Banach space. Let
>  $f:M\to X$ be continuous, and let $S\subseteq M$ be dense in $M$. If
>  there exists a constant $\alpha\geq 0$ such that
>  $\text{Lip}(f)(s)\leq \alpha$ for all $s\in S$, is it then true that there
>  exists a constant $\beta \geq 0$ for which $\text{Lip}(f)(x)\leq \beta$
>  for all $x\in M$?
> 
> 
> 


If $S$ is quasi-convex (meaning there exists a bi-Lipschitz bijection from $S$ to some length space), then I'm fairly sure that the answer is `yes'. 


I thought one could use uniform continuity of $f$ (since $M$ is assumed to be compact) to make the general case work, but one always seems to run into the same problem: For a given $\varepsilon >0$, it seems to be that one cannot necessarily find an $r\_0>0$ so that, for all $0<r<r\_0$ and all $s\in S$, we have $D\_r(f)(s) <\alpha + \varepsilon$. So it feels like there should be a counterexample.


[1] <https://en.wikipedia.org/wiki/Intrinsic_metric>



The pointwise Lipschitz-ness of a function on a dense set, implies its pointwise Lipschitz-ness everywhere?
Converting comment to an answer:


Let $M = [0,1]$ with its usual metric (which is a length space), $X= \mathbb{R}$ and let $f : [0,1] \to \mathbb{R}$ be the [Cantor function](https://en.wikipedia.org/wiki/Cantor_function). Let $S$ be the complement of the Cantor set, which is dense in $[0,1]$. Then we have $\operatorname{Lip}(f)(s) = 0$ for all $s \in S$, yet for all $x$ in the Cantor set, we have $\operatorname{Lip}(f)(x) = \infty$.


