Unit circle metric Let $S^1$ the unit circle in $\mathbb{R}^2$ and 
$$d: S^1\times S^1\to\mathbb{R}$$
$$d(\theta_1,\theta_2) = \left\{
    \begin{array}{ll}
        |\theta_1-\theta_2| & \mbox{if } |\theta_1-\theta_2|\le \pi \\
        2\pi-|\theta_1-\theta_2| & \mbox{else}
    \end{array}
\right.$$
I'm trying to prove that this function satisfies the triangle inequality
$$d(\theta_1,\theta_3)\le d(\theta_1,\theta_2)+d(\theta_2,\theta_3)$$
There are three possible cases:


*

*$|\theta_1-\theta_2|, |\theta_2-\theta_3|\le\pi$

*$|\theta_1-\theta_2|\le\pi, |\theta_2-\theta_3|>\pi$ or $|\theta_2-\theta_3|\le\pi, |\theta_1-\theta_2|>\pi$

*$|\theta_1-\theta_2|, |\theta_2-\theta_3|>\pi$


I proved the first two ones using the triangle inequality for the absolute value, but I'm stuck for the third.
It is equivalent to prove that
$$|\theta_1-\theta_3|+|\theta_1-\theta_2|+|\theta_2-\theta_3|\le 4\pi\text{ if }|\theta_1-\theta_3|\le\pi$$
and
$$|\theta_1-\theta_2|+|\theta_2-\theta_3|-|\theta_1-\theta_3|\le 2\pi\text{ if }|\theta_1-\theta_3|>\pi$$
Could you give me a hint ? Or did I misdefine $d$ or any other error ?
 A: Apologies: this should be a comment, but I am not "reputable" enough to leave comments.
If you proved 1, then you should have no problems with 3. The key to the exercise is to understand this metric geometrically. Note that if you draw two radii on the unit circle, then there are two obvious angles between them, that you could measure. The two-case-rule just says "always measure the smaller one of the two angles". In other words, the distance between two angles is always at most $\pi$, which should allow you to easily complete the proof.
A: This is not a formal proof, but gives, I think, the geometric intuition:

A: I would say that w.l.o.g. $\theta_1 \leq \theta_3$ and break it up into the cases of $\theta_1 \leq \theta_2 \leq \theta_3$, $\theta_2 \leq \theta_1 \leq \theta_3$, and $\theta_1 \leq \theta_3 \leq \theta_2$. That allows you to use more than just the triangle inequality on the real line.
A: If the three points $z_1$, $z_2$, $z_3\in S^1$ can be covered by a semicircle $H$ then the restriction $d\restriction H$ acts on the $z_i$ like the usual metric on $\mathbb R$, if not, then the sum of any two distances between the $z_i$  is $>\pi$ and the third distance is $<\pi$.
