Solution (source code)

= Solution

The assertion is false because excursion coding does not remember the speed of traversal. Let $f$ be any nonzero coding function and let $\phi:[0,1]\to[0,1]$ be a nonidentity increasing <homeomorphism>. Set $g=f\circ\phi$. Then
$$
m_g(s,t)=m_f(\phi(s),\phi(t)),
\qquad
d_g(s,t)=d_f(\phi(s),\phi(t)).
$$
Thus $[s]\mapsto[\phi(s)]$ induces an <isometry> $T_g\to T_f$, although generally $g\ne f$.