# Metric in $\mathbb{S}^1$

Let $\mathbb{S}^1=\{ x=e^{2 \pi ir} | r \in I \}$, if

$$d(x,y) = \left\{ \begin{array}{lcc} \min\{s-r,1-s+r\} & \text{if} & r \leq s \\ \\ \min\{r-s,1-r+s\} & \text{if} & s \leq r \\ \end{array} \right.$$

How can I prove that $d(x,y)$ is a metric in $\mathbb{S}^1$? Just the triangular inequality it is hard for me, for example :

$x=y$ iff a)$r=s$, b) $r=0$ and $s=1$, or c) $r=1$ and $s=0$ so if $x=y$ then $d(x,y)=0$, for the other hand $d(x,y)=0$ then a)$r=s$, b) $1-s+r=0$, in case that $r <s$ this implies $s=1$ and $r=0$ because of $1-s \geq 0$ and $r >0$, or analogously c) $r=0$ and $s=1$.

Is this correct? Thanks for your help and time.

On some level this proof will be a proof by cases. However, using cases based on the trichotomy law $s<r$ or $s>r$ or $s=r$ are going to cause you headaches, as they already seem to have done for proving the separation axiom $d(x,y)=0$ iff $x=y$.
First, don't just stick with that cumbersome formula for $d(x,y)$. Simplify it, by making good use of absolute values: $$d(x,y) = \text{min}\{|s-r|,1-|s-r|\}$$ The proof that $d(x,y)=0$ if and only if $x=y$ can then be simplified:
• If $x=y$ then we may take $s=r$ and so $|s-r|=0$ and hence $d(x,y)=0$. Conversely, if $d(x,y)=0$ then we may take $s,r$ such that $|s-r|=0$ or $1$ and it follows that $x=y$.