Question on Comaximal Ideals

There's a small detail in a proof of the Chinese Remainder Theorem for modules I don't understand when it comes to showing the normally constructed homomorphism is a surjection.

Suppose $R$ is a commutative unital ring, with $I_1,\dots,I_k$ pairwise comaximal ideals.

How then for any $j$ can I find $r\in R$ such that $r\equiv 1\pmod{I_j}$ but $r\equiv 0\pmod{I_i}$ for $i\neq j$?

Thank you!

-
Is your question "why does it exist", or "is there an algorithm for actually finding $r$"? –  Arturo Magidin Dec 10 '11 at 21:47

I suppose you mean by comaximal $I_i+I_j=R$ if $i\ne j$. With loss of generalities, we can take $j=1$. For any $i\ne 1$, we have $$1=\alpha_{i}+\beta_{i}, \quad \alpha_{i}\in I_1, \beta_{i}\in I_i.$$ Taking the product of these equalities we get $$1=\alpha'+\beta_2\beta_3...\beta_k, \quad \alpha'\in I_1.$$ Then $r:=1-\alpha'$ does the trick.

-
Thank QiL, that's pretty straightforward. –  Bongle Dec 10 '11 at 21:53

As far as existence, the idea is to use comaximality:

For example, if $k=2$, then you have $I_1 + I_2 = (1)$, so there exist $a\in I_1$ and $b\in I_2$ such that $a+b=1$. Taking $r=b$ we have $r=b\equiv b+a = 1\pmod{I_1}$, and $r=b\equiv 0\pmod{I_2}$.

For larger $k$, note that $$R = R^{k-1} = (I_1+I_2)(I_1+I_3)\cdots(I_1+I_{k-1}) \subseteq I_1 + I_2\cdots I_k\subseteq I_1 + I_j = R$$ for any $j\neq 1$; hence $I_1$ and $I_2\cdots I_k$ are comaximal. Therefore, $I_1 + I_2\cdots I_k = (1)$, so you can find $a\in I_1$ and $b\in I_2\cdots I_k$ such that $a+b=1$. Take $r=b$, and then $b\in I_1\cdots I_k\subseteq I_j$ for each $j\neq 1$, and there's your $r$. Obviously, you can replace $1$ with an arbitrary $j$.

-
That makes sense now, thanks. –  Bongle Dec 10 '11 at 21:53