Prove the $R$-module isomorphism $P\oplus P\cong R\oplus R$ Let
$$R=\{f:\mathbb{R}\to\mathbb{R}:f\text{ is continuous and }f(x+\pi)=f(x)\}$$
$$P=\{f:\mathbb{R}\to\mathbb{R}:f\text{ is continuous and }f(x+\pi)=-f(x)\}$$
Then under addtition and multiplication $R$ is a ring and $P$ is an $R$-module. Show that there is an $R$-module isomorphism
$$P\oplus P\cong R\oplus R$$
Background:
We are learning homonological algebra (just getting started) at the moment, so maybe something about it should be made use of.
My attemp: I have tried to construct some suitable mapping $R\to P$ or $P\to R$. For example I have tried to "flip" the graph of $f\in R$ in $[(2k-1)\pi,(2k)\pi]$ to obtain a function in $P$. But I cannot seem to find the right one.
Questions:
(1) Am I suppose to construct this way, or should I use some magical property of $P$ and $R$?
(2) Why does the direct sum appear here; what is so important or necessary about it?
 A: You can use the matrix $M=\begin{pmatrix}\cos&-\sin \\ \sin&\cos\end{pmatrix}$. Note that if $f\in P$, then $f\times \sin\in R$, similarly $f\times \cos\in R$. Thus if $\begin{pmatrix}f\\g\end{pmatrix}\in P\oplus P$ then $M\begin{pmatrix}f\\g\end{pmatrix}= \begin{pmatrix}f\times \cos-g\times\sin\\ f\times\sin+g\times\cos\end{pmatrix} \in R\oplus R$. Now $M$ is invertible, in fact its inverse is ${}^tM$. This gives the isomorphism $P\oplus P\simeq R\oplus R$.
Edit : I realize that I did not really answer your questions, and specifically let me say a few words about (2). Note that a map $R\to P$ is entirely determined by the image of $1$ which is thus an element of $P$. Say this image is $u$ then the map $R\to P$ is given by $f\mapsto uf$. Now in this particular case, this cannot be an isomorphism. Indeed, by continuity $u$ has to vanish, so if $f\in\operatorname{Im}(R\to P)$ then $f$ has to vanish at the zeroes of $u$. But since there are functions in $P$ with no common zeroes, so $R\to P$ cannot be onto.
Similarly, a map $R\oplus R\to P\oplus P$ is also given by a $2\times 2$ matrix as above. This times it works because the determinant of this matrix does not vanish.
There is also a geometrical interpretation : $R$ is the set of continuous function on the circle whereas $P$ is the set of sections of the twisted line bundle $L$. The point is that $L\oplus L$ is the trivial bundle.
