Given a ring $A$ we can make $Spec(A)$ with the Zariski topology. A question in atiyah and macdonald asks you to prove that $Spec(A)$ is quasi-compact. It is clear that if $Spec(A)$ is covered by open sets $U_s, s\in S$, then it is covered by $X_{f_i}, i \in I$ where $X_{f_i}$ are the basic open sets of the Zariski topology. Then it is easy to show if the $X_{f_i}$ cover $Spec(A)$ then they generate the unit ideal. From this point I become very confused. This is because I do not see how the $X_{f_i}$ generating the unit ideal implies some finite subset $J$ of $I$ $X_{f_j}, j\in J$ generates the unit ideal.
edit: well now i understand why there must be a finite subset it comes directly from the definition of sum of ideals. but now i am really confused as to why the definition of sum of ideals is such that almost all of them are 0. i would appreciate some insight as to why this is.