Homeomorphism between $\mathbb{R}$ and $\mathbb{R}/[-1,1]$

91 Views Asked by At

I am having trouble showing that $\mathbb{R}$ and $\mathbb{R}/[-1,1]$ are homeomorphic. Intuitively, I would say that the function $f: \mathbb{R} \rightarrow \mathbb{R}/[-1,1]$, with $f(x)= R(x-1)$ for $x<0$, $f(x)=R(x+1)$ for $x>0$ and $f(0)=R(0)$, where $R:= \{(x,y)\in\mathbb{R}^2\space |\space y=x \space \text{or}\space x,y\in[-1,1]\}$ and $R(x):=\{y\in\mathbb{R}\space|\space (x,y)\in R\}$, defines the homeomorphism between the two spaces. My question is: how do I proof that $f$ is indeed a homeomorphism?