Clarification on chinese remainder theorem for ring

http://www.math.uwaterloo.ca/~rdwillar/Courses/PM701/lecture_09_11.pdf

I am not able to understand why $$(r_1 +\cdots + r_{i-1} + r_{i+1} +\cdots + r_k) - a_i \in A_i$$ in the last line of Theorem 17.5 (Chinese remainder theorem) of this link.

-
the link is broken – I. J. Kennedy May 21 '13 at 19:05

By assumption (see the previous sentence) you have $r_i \in A_1 \cap A_2 \cap \cdots\cap A_{i-1} \cap A_{i + 1} \cap \cdots \cap A_k$. So in particular, $r_1 \in A_i, r_2 \in A_i, \dots r_{i-1} \in A_i, r_{i+1} \in A_i, \dots r_k \in A_i$. So you have $r^\prime = r_1 + r_2 \cdots + r_{i-1} + r_{i+1} + \cdots + r_k \in A_i$. Since $A_i$ is an ideal and $a_i, r^\prime \in A_i$ you also have $r^\prime - a_i \in A_i$.