I was trying to understand the condition in proving the Chinese remainder theorem below
Let R be a ring and $I_1,\dots, I_m$ be ideals of R such that $I_j+\bigcap_{k\neq j}I_k=R$ for $0<j\leq m$. Then for $a_1,\dots,a_m\in R$, there always exist an $a\in R$ such that $a\equiv a_j$ (mod $I_j$).
The proof is quite simple and I knew how to exploit the condition to prove the claim based on the case when $m=2$, which basically means that $I_1, I_2$ are coprime ideals. But what I don't understand is why using the condition $I_j+\bigcap_{k\neq j}I_k=R$ in the statement instead of saying that any two ideals in $I_1,\dots, I_m$ are coprime. Can someone prove the claim using the latter or can you show that these two conditions are equivalent?
The conditions are equivalent for unital rings (or for rings satisfying $R^2=R$).
Theorem. Let $R$ be a ring such that $R^2=R$, and let $I_1,\ldots,I_m$ be two-sided ideals. The following are equivalent:
Proof. If 2 holds, then $$R = I_j+\cap_{k\neq i}I_k \subseteq I_j+ I_i \subseteq R,$$ so $I_j+I_i=R$.
Conversely, assume 1 holds. We proceed by induction on $m$. If $m=2$, the two statements are equal.
If $m=3$, and $I_1+I_2 = I_1+I_3 = R$, then $$\begin{align*} R=R^2 &= (I_1+I_2)(I_1+I_3)\\ &= I_1I_1 + I_1I_3 + I_2I_1+I_2I_3\\ &\subseteq I_1+I_2I_3\\ & \subseteq I_1+(I_2\cap I_3)\\ &\subseteq R, \end{align*}$$ so $I_1+(I_2\cap I_3)=R$. Similarly for $I_2+(I_1\cap I_3)$ and $I_3+(I_1\cap I_2)$.
Assume that the result holds for $k$ ideals and $m=k+1$. Then $$\begin{align*} R = R^2 &= (I_1+(I_2\cap\cdots\cap I_k))(I_1+I_{k+1})\\ &\subseteq I_1 + (I_2\cap\cdots \cdots \cap I_k)I_{k+1}\\ & \subseteq I_1+\cap_{j=2}^{k+1}I_j\\ &\subseteq R, \end{align*}$$ so we get the desired equality. $\Box$
You can weaken the condition $R^2=R$ to asking that $R=R^2+I_j$ for each $j$; this is what Hungerford does, for example. In the case of $m=3$, the argument proceeds as follows; as before $$R^2\subseteq I_1+(I_2\cap I_3).$$ Then we have $$R = I_1+R^2 \subseteq I_1+(I_1+(I_2\cap I_3)) = I_1+(I_2\cap I_3)\subseteq R,$$ proving the desired equality. The general case proceeds similarly.
This suggests that a problem may arise in a ring in which $R^2\neq R$ (and $R^2+I_j\neq R$ for at least one $j$). If $A$ is an abelian group and we define multiplication to be $ab=0$ for all $a,b\in A$, then ideals correspond to subgroups. We would be looking for three subgroups $B_1,B_2,B_3$ such that any two of them are comaximal, but the intersection of any two is contained in the third. An easy example is the Klein $4$-group $\mathbb{Z}_2\oplus\mathbb{Z}_2$, and take $B_1=\{(0,0),(1,0)\}$, $B_2=\{(0,0),(1,1)\}$, and $B_3=\{(0,0), (0,1)\}$. Then $B_1+B_2=B_1+B_3=B_2+B_3=\mathbb{Z}_2\oplus\mathbb{Z}_2$, but any two of them intersect trivially so $B_j+\cap_{i\neq j}B_i \neq \mathbb{Z}_2\oplus\mathbb{Z}_2$.