Is $M=[0,1)$ with $d(x,y)=\min\{|x-y|,1-|x-y|\}$ a complete metric space? Let $M=[0,1)$. For $x,y\in M$, define
$$d(x,y)=\min\{|x-y|,1-|x-y|\}.$$
Then it can be shown that $d$ is a metric on $M$. Positive definiteness and symmetry are easy to show. The frustrating part is to prove the triangle inequality which is done in this post. 

Is this metric space $(M, d)$ complete? 

I was thinking to find a counter example but I couldn't find any. Also, I cannot prove that it is complete!
There is a comment under this post which says

This is the distance induced by the canonical mapping of the unit interval $[0,1)$ to the unit circle $S^1=\mathbb{R}/\mathbb{Z}$.

Can someone elaborate on this?
Here are some of my observations. 


*

*For this metric we have,


$$d(x,y)=
\begin{cases}
|x-y|, & 0\le|x-y|<\frac{1}{2}\\
1-|x-y|, & \frac{1}{2} \le |x-y| < 1
\end{cases}.
$$


*The following properties are valid.


$$
\begin{array}{l}
& d(x,y) \le |x-y|, \\
& d(x,y) \le 1-|x-y|, \\
& d(x,y) \le \frac{1}{2}.
\end{array}
$$


*A sequence which is Cauchy/Convergent with respect to $|.|$ is Cauchy/Convergent with respect to $d$. But the converse is not true. See the below example.

*The sequence
$$
a_n=
\begin{cases}
1-\frac{1}{n},&\quad n \text{ is even} \\
\frac{1}{n},&\quad n \text{ is odd}
\end{cases}
$$
is not Cauchy with respect to $|.|$ but it is Cauchy with respect to $d$. It is not convergent with respect to $|.|$ but it is convergent to $0$ in $M$ with respect to $d$!

*If we try to add $\{1\}$ to $M$ then $d$ loses its definiteness property on $M\cup\{1\}$ and won't be a metric on $M\cup\{1\}$ anymore! The reason is that $d(1,0)=0$ but $1\ne 0$.
 A: The metric space $S^1=\mathbb{R}/\mathbb{Z}$ is formally defined as $\{ \overline{x} \, \colon x\in\mathbb{R}\}$ where $\overline{x} := \{x+n : n\in\mathbb{Z}\}$. For instance, one element of $S^1$ is $\overline{1.5} = \{\dots, -1.5, -0.5, 0.5, 1.5, 2.5, \dots\}$. It is usually referred to as the torus and is endowed with the following distance $\delta$ :
Let $\delta(\bar{x},\bar{y})$ be the smallest distance (in $\mathbb{R}$) between an element of $\bar{x}$ and an element of $\bar{y}$. For instance, one can check that $\delta(\overline{1.5}, \overline{3.4}) = 0.1$.
Now you can show that there is an homeomorphism between $(M,d)$ and $(S^1,\delta)$.
More precisely, show that $\delta(\overline{x},\overline{y}) = d(x,y)$ whenever $x,y \in M$. Then any Cauchy sequence in $M$ can be mapped to a Cauchy sequence in $S^1$, and hence converges. That proves that $(M,d)$ is complete.
Side Note: They are also homeomorphic to $(\mathbb{U}, \lvert \cdot \rvert)$, where $\mathbb{U}$ is the set of complex numbers with modulus $1$, and that's why $S^1$ is called "the unit circle" in the comment.
A Direct Approach: Take a Cauchy sequence $(x_n)$ in $(M,d)$. If $\limsup x_n < 1$, show that $(x_n)$ converges to this limit in $(M,d)$. Else, we have $\limsup x_n = 1$. Hence, there is a subsequence $x_{\phi(n)}$ that converges in the metric space $([0,1],|.|)$ to $1$. Show that $x_{\phi(n)}$ converges to $0$ in $(M,d)$. Deduce that $x_n$ actually converges to $0$ in $(M,d)$.
