triangle inequality for metrics I am trying to prove the triangle inequality for the space $[0,1)$ and the metric 
$\rho(x,y)= \min\{|x-y|,|x+1-y|, |y+1-x|\}$.
Now, I know that I will need to separate it into several cases. The proof is not difficult from there, but how would I make a distinction between the cases?
 A: (Getting this off the Unanswered list.)
Since $y-x+1=y-(x-1)$, $\rho(x,y)$ is the minimum of the distances from $y$ to $x-1,x$, and $x+1$ in $\Bbb R$. If $x\le y$, then $|x-y|=y-x<y-x+1$, and 
$$\rho(x,y)=\min\{|x-y|,|x+1-y|\}=\min\{y-x,x+(1-y)\}\;.$$
Similarly, if $x\ge y$, then 
$$\rho(x,y)=\min\{x-y,y+(1-x)\}\;.$$
In either case, if $u=\min\{x,y\}$ and $v=\max\{x,y\}$, then
$$\rho(x,y)=\min\{v-u,u+(1-v)\}\;.$$
If you imagine wrapping $[0,1)$ around in a circle, so that as you ‘fall off’ $[0,1)$ at $1$ you ‘reappear’ at $0$ and vice versa, you can see that $v-u$ is the distance that you go when you travel from left to right from $u$ to $v$, while $u+(1-v)$ is the distance that you go when you travel from right to left from $u$ to $v$. This suggests transforming $[0,1)$ into a genuine circle.
Let $C$ be the circle in the plane of radius $\frac1{2\pi}$ centred at the origin; $C$ is the set of points with polar coordinates of the form $\left\langle\frac1{2\pi},\theta\right\rangle$ for $\theta\in[0,2\pi)$. Let
$$h:[0,1)\to C:x\mapsto\left\langle\frac1{2\pi},2\pi x\right\rangle\;;$$
$h$ is a bijection that wraps $[0,1)$ anti-clockwise around $C$. Now verify that for any $x,y\in[0,1)$, if $u=\min\{x,y\}$ and $v=\max\{x,y\}$, then $v-u$ is the length of the directed anti-clockwise arc from $h(u)$ to $h(v)$, while $u+(1-v)=(u+1)-v$ is the length of the directed anti-clockwise arc from $h(v)$ to $h(u)$. Thus, $\rho(x,y)$ is the length of the shorter arc on $C$ with endpoints $h(x)$ and $h(y)$; call that arc $A(x,y)$.
Now let $z$ be any third point. If $h(z)\in A(x,y)$, then clearly $A(x,y)=A(x,z)\cup A(z,y)$, $A(x,z)\cap A(z,y)=\{z\}$, and $\rho(x,y)=\rho(x,z)+\rho(z,y)$. Otherwise, $A(x,z)\cap A(z,y)=\{z\}$, and $A(x,z)\cup A(z,y)$ is the longer arc from $h(x)$ to $h(y)$, so $\rho(x,y)\le\rho(x,z)+\rho(y,z)$.
If you work directly in $[0,1)$, this amounts to splitting the problem into four cases, two of which have two subcases each: $z$ is between $u$ and $v$, and $v-u\le u+(1-v)$; $z$ is between $u$ and $v$, and $v-u>u+(1-v)$; $z$ is not between $u$ and $v$, and $v-u\le u+(1-v)$; and $z$ is not between $u$ and $v$, and $v-u>u+(1-v)$. The last two case can each be split into the subcases $z<u$ and $z>v$.
