Solution (source code)

= Solution

For pairwise comaximal <ideals> $I_1,\ldots,I_r$ of $R$, reduction gives the <Chinese remainder theorem for ideals>:
$$
\boxed{R/(I_1\cdots I_r)\cong\prod_{i=1}^rR/I_i.}
$$
Its kernel is $\bigcap_iI_i$. For two comaximal <ideals>, write $1=u+v$ with $u\in I$, $v\in J$. If $x\in I\cap J$, then $x=xu+xv\in IJ$, showing $I\cap J=IJ$. Induction gives the product formula: a product of <ideals> individually comaximal with $J$ is still comaximal with $J$, by multiplying identities modulo $J$.

Put $J_i=\prod_{j\ne i}I_j$. Since $I_i+J_i=R$, choose $e_i\in J_i$ with $e_i\equiv1\pmod{I_i}$. The element $\sum_i a_ie_i$ has any prescribed residues $a_i\pmod{I_i}$, proving surjectivity. Its residue class modulo the product is unique because we already identified the kernel. In a <Dedekind domain>, powers of distinct nonzero <prime ideals> are pairwise comaximal, giving the prime-power form. The theorem requires comaximality; it is not a statement about arbitrary lists of <ideals>.