Let $S$ be the set of continuous function $f$ defined on some segment $[0,a_f], a_f \ge 0$, and such that $f(0)=0$.
For $f$ and $g$ in $S$, let
$$
c_{fg}=\max\{z : f(x)=g(x) \text{ for all } x \in [0,z] \},
$$
then, define the metric,
$$
d(f,g) = a_f - c_{fg} + a_g - c_{fg},
$$
Show the triangle inequality holds for $d$.
The only proof I see is a case by case analysis of all the possibilities.
I don't see how to enumerate all the possibilities, there seems to be too much.
Also, for the case
$$
\begin{cases}
f,g,h \text{ are different functions} \\
c_{fg} < c_{fh} < c_{hg} \\
a_{fg}<a_{fh}<a_{hg}
\end{cases}
$$
I don't see why the triangle inequality holds.