I am trying to prove the Chinese remainder theorem for modules, i.e. if $R$ commutative, $I,J$ comaximal ideals, and $M$ an $R$-module, then $M/IJM \simeq M/IM\times M/JM$. I have defined \begin{align*} \varphi: M/IJM &\to M/IM \times M/JM\\ m+IJM &\to (m+IM, m+JM) \end{align*} I am trying to show that this map has a trivial kernel to prove injectivity. If $m\in \ker(\varphi)$ we would have $m\in IM\cap JM$. I know that comaximality of $I$ and $J$ means that $I\cap J = IJ$. So I want to show that $m\in (I\cap J)M$ to show $m\in IJM$.
Thus, I want to show $IM\cap JM = (I\cap J)M$. I can show $(I\cap J)M \subseteq IM\cap JM$ pretty easily but I am having trouble showing $IM\cap JM\subseteq (I\cap J)M$. If $m\in IM\cap JM$, I know that (courtesy of Servaes in the comments) \begin{align*} m &= \sum i_km_k\\ m &= \sum j_\ell m_\ell' \end{align*} for $i_k\in I, j_\ell\in J, m_k,m_\ell\in M$ and each sum is finite. I want to show that each $i_k, j_\ell\in I\cap J$. We have that \begin{align*} \sum (i_k-j_k) m_k &= 0 \end{align*} where $i_k$ or $j_k$ could be $0$ depending on whether $m_\ell'$ corresponds with some $m_k$ or vice versa. If I could say $i_k = j_k$, I would get that $i_k,j_k\in I\cap J$ and be done. I am tempted to say this is the case since the sum adds up to $0$ and I feel like I can try to invoke some argument about $R$-linear independence here, but I am not too sure how to proceed with doing that.
The Chinese Remainder Theorem holds for modules indeed (and not just for two comaximal ideals, but for any finite number of pairwise comaximal ideals). See
Keenan Kidwell's answer at https://mathoverflow.net/questions/18959/chinese-remainder-theorem-for-rings-why-not-for-modules for a slick proof using tensor products, and
my Witt#5c: The Chinese Remainder Theorem for Modules for a manual proof that I have written before I understood how to properly use tensor products for base change :)