Metric Isometry is always smooth? Let $M$ be a smooth manifold. Let $d$ be any metric on $M$ which induces the topology on $M$. Let $f:(M,d) \rightarrow (M,d) $ be an isometry (in the sense of metric spaces). Is it true that $f$ must be smooth?
(if the metric $d$ is induced by some Riemannian metric $g$ then the answer is positive by the Myers–Steenrod theorem)
 A: No. Let $(X,d')$ be a metric space and let $f \colon X \rightarrow X$ be a homeomorphism. You can define a new metric on $X$ (which you might call the pullback metric) by $d(x,y) := d'(f(x),f(y))$. The topology induced by $d$ is the same as the topology induced by $d'$ and $\varphi \colon X \rightarrow X$ is an isometry for $(X,d')$ if and only if $f^{-1} \circ \varphi \circ f$ is an isometry for $(X,d)$. This gives you a construction that modifies isometries by possibly nonsmooth maps.
To generate a counterexample, take $M = \mathbb{R}$, $d'(x,y) = |x - y|$, $f = x^3$ (a homeomorphism but not a diffeomorphism of $\mathbb{R}$ with the usual smooth structure) and $\varphi(x) = x + 1$. Then $d(x,y) = |x^3 - y^3|$ is a metric on $\mathbb{R}$ inducing the standard topology and $\tilde{\varphi}(x) = (f^{-1} \circ \varphi \circ f)(x) = \left(x^3 + 1\right)^\frac{1}{3}$ is a nonsmooth isometry of $(\mathbb{R}, d)$.
A: This post will explain why in the post of @levap , the distance preserving map $\tilde{\varphi}$ fails to be smooth. 
The key point is: the space $\mathbb R$ with distance $d(x,y)=|x^3-y^3|$ (which can be induced by metric tensor $g=9x^4$) is a Riemannian manifold with metric non-degenerate everywhere  but at $x=0$. If you check Myers and Steenrod's original paper published in 1938: The group of isometry of a Riemannian manifold, or Richard Palais's proof in On the differentiability of isometry. In both paper, the metric of Riemannian manifold is supposed to be non-degenerate.  
Let's have a look at the Riemannian manifold $(\mathbb R, g)$, with $g=9x^4$ (which induce the distance $d(x,y)=|x^3-y^3|$) and see how degeneracy at $x=0$ fails the smoothness, it's metric tensor is induced by the heomemorphism (but NOT diffeomorphism) $\varphi:x\to x^3$, since the tangent map $\varphi_*=3x^2$ vanish at $x=0$, so it's pullback metric tensor vanish at $x=0$. Also, if we remove the point $x=0$, the manifold has geodesic $\gamma(x)=x^{1/3}$, but this geodesic cannot be extended to $x=0$, since otherwise its tangent vector will be $\dot{\gamma}(0)=\lim_{x\to 0}\frac13x^{-2/3}=\infty$. Thus, there is no geodesic passing $x=0$, so one cannot define exponential map at $x=0$. But the exponential map is the essential tool the proof required, so the proof will fail if the tensor metric vanish at $x=0$.
This counterexample shows that Mayers-Steenrod theorem fails in the Riemannian manifolds with degenerate metric tensor.
