Proving that a particular map is an embedding from the Klein bottle into $\mathbb{R}^4$ I would appreciate if anyone could help me with the above:

Show that the map $g:\mathbb{R}^{2}\rightarrow \mathbb{R}^{4} $ given by $$g(x, y)=((a+r\cos2\pi y)\cos 2 \pi x, (a+r\cos 2 \pi y)\sin 2 \pi x, r\sin 2 \pi y \cdot \cos \pi x, r\sin 2 \pi y \cdot \sin \pi x)  $$ induces an embedding $C^{\infty}$ from the Klein's Bottle into $\mathbb{R}^{4}$.

Important: it does not specify anything about the numbers $a$ and $r$, but I think they have to obey something like $0<r<a$.
Remark: we have 3 ways to construct the Klein's bottle, as follow:

$\bullet$ $\mathbb{R}^{2}/G$ :  where $G=\langle f_1, f_2\rangle$, such that, $f_1, f_2:\mathbb{R}^{2}\rightarrow \mathbb{R}^{2}$ given by $f_1(x, y)=(x, y+1)$ and $f_2(x, y)=(x+1, 1-y)$.
$\bullet$ $(S^{1}\times \mathbb{R})/H$ : where $H$ is the ciclic group spanned by $h:S^{1}\times \mathbb{R} \rightarrow S^{1}\times \mathbb{R}$ given by $h((x, y), z)=h(x, y, z)=(x, -y, z+1)$.
$\bullet$ $(S^{1}\times S^{1})/K $ : where $K=\{ I_{S^{1}\times S^{1}}, k\}$, such that $I_{S^{1}\times S^{1}}$ is the identity and $k:S^{1}\times S^{1}\rightarrow S^{1}\times S^{1}$ is given by $k(x, y)=(\overline{x}, -y)$.

thanks for any help.
 A: You can do this in three steps. 

  
*
  
*First prove that $g\circ f_1=g\circ f_2=g$. 
  Therefore you have that for any $h\in G$, 
  $g\circ h=g.$

This implies that $g:\Bbb R^2\to \Bbb R^4$ factors to a continuous map $$\tilde{g}:\Bbb R^2/G\to \Bbb R^4.$$

  
*
  
*Then prove that $\tilde{g}:\Bbb R^2/G\to \Bbb R^4$ is one-to-one.
  

This statement is equivalent to the fact that for any $(x,y)$ and $(x^\prime,y^\prime)$ in $\Bbb R^2$, $g(x,y)=g(x^\prime,y^\prime)$ if and only if there is an element $h\in G$ such that $h(x,y)=(x^\prime,y^\prime)$. Note that we already did the implication $(\Leftarrow)$. 
From the fact that the Klein bottle is compact and $\Bbb R^4$ is Hausdorff, $\tilde{g}$ is a homeomorphism onto its image. 

  
*
  
*Finally prove that $g:\Bbb R^2\to \Bbb R^4$ is a $C^\infty$ immersion.
  

From general theorems about group action on manifold etc, you have that $g$ is a $C^\infty$ immersion if and only if $\tilde{g}$ is a $C^\infty$ immersion (you can prove it again, by using $\tilde{g}\circ p=g$ where $p:\Bbb R^2\to \Bbb R^2/G$, and the fact that $p$ is a local diffeomorphism).
Therefore the induced map $\tilde{g}$ is an embedding, which is what you wanted.
Some details for the last step:
For $(x,y)\in\Bbb R^2$ we have 
$$d_{(x,y)}g= \begin{pmatrix} 
-2\pi(a+r\cos(2\pi y))\sin(2\pi x) & -2\pi r\sin(2\pi y)\cos(2\pi x)\\ 
2\pi(a+r\cos(2\pi y))\cos(2\pi x) & -2\pi r\sin(2\pi y)\sin(2\pi x)\\
-r\pi\sin(2\pi y)\sin(\pi x) & 2\pi r\cos(2\pi y)\cos(\pi x)\\
r\pi\sin(2\pi y)\cos(\pi x) & 2\pi r\cos(2\pi y)\sin(\pi x)\\  
\end{pmatrix}$$
The determinant of the submatrix with the first two rows is
$$(-2\pi(a+r\cos(2\pi y))\sin(2\pi x))\times(-2\pi r\sin(2\pi y)\sin(2\pi x))\\-  (-2\pi r\sin(2\pi y)\cos(2\pi x))\times(2\pi(a+r\cos(2\pi y))\cos(2\pi x))\\=r(2\pi)^2(a+r\cos(2\pi y))\sin(2\pi y)$$
which is non-zero if and only if $\sin(2\pi y)\neq 0$. In the case where $\sin(2\pi y)= 0$ we have 
$$d_{(x,y)}g= \begin{pmatrix} 
-2\pi(a+r\cos(2\pi y))\sin(2\pi x) & 0\\ 
2\pi(a+r\cos(2\pi y))\cos(2\pi x) & 0\\
0 & 2\pi r\cos(2\pi y)\cos(\pi x)\\
0 & 2\pi r\cos(2\pi y)\sin(\pi x)\\  
\end{pmatrix}$$
which has clearly rank $2$.
