Suppose $(X,d)$ is a metric space with the nearest point property and $a,b \in X$ with $a \ne b$. Suppose there is a path of finite length in $X$ from $a$ to $b$ and let $m$ be the infimum of the lengths of all paths from $a$ to $b$.Then, by Lipschitz reparametrization, there exists a path $g:[0,1] \rightarrow X$ from $a$ to $b$ that satisfies $lth_t(g) = tm ~\forall~t \in [0,1].$ and $g$ is Lipschitz with length $m. lth_t(g)$ represents the length of the function $g$ upto a point $t$.
Prove that $g$ is injective.
Attempt:
Suppose $g(a) = g(b)$ where $a,b \in [0,1]$.
I am kind of stuck here. I have no clue how to move forward from here.
Could someone please provide me with a direction to follow.
Informally: if a path intersects itself, it forms a loop which we can cut out, thus making it shorter.
Formally: Suppose $g(a)=g(b)$ where $0\le a<b\le 1$. Define $$ h(t) = \begin{cases} g(t), \quad & 0 \le t\le a, \\ g(t-a+b), \quad & a \le t\le 1+a-b \end{cases} $$ Then:
$h$ is $m$-Lipschitz. Indeed, the only nonobvious case is $0\le t < a < s \le 1+a-b$. But then $$ |h(t)-h(s)| = |h(t) - h(a) + h(a) - h(s)| \le |h(t) - h(a)| + |h(a) - h(s)| \\ = |g(t) -g(a)| + |g(b) - g(s-a+b)| \le m(a-t) + m(s-a) = m(s-t) $$ where I write $| \cdot - \cdot |$ instead of $d_X(\cdot, \cdot)$ for brevity.
The path defined by $h$ has length at most $m(1+a-b) < m$. This is a contradiction.