Antiperiodic functions are indecomposable Let $A$ be the algebra of continuous functions $\mathbb{R} \to \mathbb{R}$ which are periodic of period $1$, and write $M$ for the $A$-module of antiperiodic functions of period $1$ (meaning $f \in M$ satisfies $f(x+1) = -f(x)$ for all $x \in \mathbb{R}$). In Etingof's Introduction to Representation Theory, he asks the reader to show that $M$ is indecomposable and that $A \oplus A \cong M \oplus M$ as $A$-modules. How does one prove either of these things? I would be happy with hints.
Note that since $A$ and $M$ are not isomorphic as $A$-modules (clearly $M$ is not cyclic) this illustrates the failure of the Krull-Schmidt theorem without finiteness conditions.
 A: Let's suppose $M$ can be decomposed into a direct sum of non-zero submodules, $M = M_1 \oplus M_2$, and define
$$
X_i := \{x \in \mathbb R : f(x) = 0\quad\forall f\in M_i \}
$$
$X_i$ is closed. If $x_n$ is a sequence of elements of $X_i$ convergent to $x_0$ then for each $f\in M_i$, $f(x_n) = 0$ and, since $f$ is continuous, $f(x_0) = 0$. Hence $x_0 \in X_i$.
The sets 
$$
Y_i := \mathbb R \setminus X_i\quad i = 1, 2
$$
are not empty and open.
For each $x\in \mathbb R$, it exists a function $f\in M$ such that $f(x) \neq 0$. Writing $f$ as $f_1 + f_2$, with $f_1\in M_1$ and $f_2\in M_2$, we can deduce that $x\in Y_1 \cup Y_2$ and therefore $Y_1 \cup Y_2 = \mathbb R$.
Since $\mathbb R$ is connected, we must conclude that $Y_1 \cap Y_2 \neq \emptyset$.
Let $y_0$ be an element of $Y_1 \cap Y_2$ and $f_i\in M_i$ such that $f_i(y_0) \neq 0$, $i = 1, 2$.
We can choose an interval $I$ centered on $y_0$ such that
$$
f_i(x) \neq 0 \quad \forall x \in I, i = 1, 2
$$
Let's take the set
$$
J = \{ x + n \in \mathbb R : x\in I, n\in \mathbb Z \}
$$
the function defined by
$$
d(x) =
\begin{cases}
f_1(x)/f_2(x) &\text{if } x\in J\\
0 & \text{if } x\notin J
\end{cases}
$$
and a map $0 \neq h\in A$ with support in $J$.
$f^*_1 := h^2 f_1$ is a non-zero element of $M_1$, $f^*_2 := h f_2$ is an element of $M_2$ and $d^* := h d$ is an element of $A$. Moreover 
$$
d^* f^*_2 = h^2 d f_2 = h^2 f_1 = f^*_1
$$
Therefore $f^*_1$ belongs also to $M_2$. That contradicts the made assumption $M_1\cap M_2 = \emptyset$.
A: The first half of the problem is solved by AlbertH, so I will solve the second half. Define $\varphi:A\oplus A\to M\oplus M$ by
$$\varphi(f,g)=(cf-sg,sf+cg),$$
where $s(x)=\sin\pi x$ and $c(x)=\cos \pi x$. Given any $m,n\in M$ and $x\in \mathbb{R}$, there are unique reals $f(x),g(x)\in \mathbb{R}$ satisfyingthe equation
$$(m(x),n(x))=((cf-sg)(x),(sf+cg)(x)),$$
because the matrix $\left[\begin{array}{cc}
\cos\pi x & \sin\pi x\\
-\sin\pi x & \cos\pi x
\end{array}\right]$ is invertible.
It is easy to check that these pointwise solutions combine to define elements $f,g\in A$ such that $\varphi(f,g)=(m,n)$. Therefore $\varphi$ is surjective. Since the solution is unique pointwise, $\varphi$ is injective. Thus $\varphi$ is the desired isomorphism.
