Proposition
Let $R$ be a PID and $M$ a torsion module over $R$. Suppose $M$ is not faithful, with $\operatorname{Ann(M)}=Ra$ and $a=u{p_1}^{\alpha_1}...{p_n}^{\alpha_n}$ an irreducible factorization of $a$. Then $$M=\bigoplus M[p_i]$$ (here $M[p_i]=Ker(f:M \to M, m \rightarrow {p_i}^{\alpha_i}x$).
I got stuck trying to show $\sum=\bigoplus$, and I don't know what to do to prove $M=\sum M[p_i]$. I'll write what I did up to now.
-$\sum=\bigoplus$:
Let $x_i \in M[p_i] : \sum_{i=1}^n x_i=0$. I define $g_i=\prod_{j \neq i}{p_j}^{\alpha_j}$, then $\prod_{j \neq i}{p_j}^{\alpha_j}x_i=g_i(\sum_{i=1}^n x_i=0)=0$.
I want to show $x_i=0$. I know that $x_i \in M[p_i] \cap M[\prod_{j \neq i}{p_j}^{\alpha_j}]$ but I couldn't deduce from here that $x_i=0$.
Any suggestions to prove this proposition and help me where I got stuck would be appreciated.
For the time being assume $n = 2$. Since $R$ is a PID, the ideals $(p_1^{\alpha_1})$ and $(p_2^{\alpha_2})$ are comaximals. So there exists $r_1, r_2 \in R$ such that $r_1p_1^{\alpha_1} + r_2p_2^{\alpha_2} = 1$. Thus, for any $m \in M$, we can write $m = r_1p_1^{\alpha_1}m + r_2p_2^{\alpha_2}m$ and so we have, $p_1^{\alpha_1}m \in M[p_2], p_2^{\alpha_2}m \in M[p_1]$. This proves that $M = M[p_1] + M[p_2]$. Now let $m \in M$ be such that $m \in M[p_1]\bigcap M[p_2]$. Then $p_1^{\alpha_1}m = 0$ and $p_2^{\alpha_2}m = 0$. So, $m = r_1p_1^{\alpha_1}m + r_2p_2^{\alpha_2}m = 0$. This shows that $M = M[p_1] \oplus M[p_2]$.
Now for the general case, note that the ideals $(p_1^{\alpha_1})$ and $(\Pi_{i \neq 1}p_i^{\alpha_i})$ are comaximals. We can use inductions.