Proof that an affine scheme is quasi compact [duplicate]

I want to prove that any affine scheme $X = \operatorname{Spec} A$ is compact.

$\bigcup D(f_i)$ is an open cover of $X$ if and only if the sum ideal $\sum (f_i)$ contains $1$. That is, $ D(\sum f_i)=\bigcup D(f_i)$.

Why does a possible infinite sum of ideals which includes $1$ mean that there exists a finite subset of such ideal whose ideal sum will include $1$ ?


Solution 1:

If $\mathfrak{a}_i \subseteq A$ is an ideal for each $i \in Y$, $Y$ a set of any size, then $\sum_i \mathfrak{a}_i$ is (by definition) the set of all finite sums of elements of the $\mathfrak{a}_i$. So if $1 \in \sum_i \mathfrak{a}_i$, then there exist $i_1,\ldots,i_n$ and elements $f_{i_k} \in \mathfrak{a}_{i_k}$ such that $$f_{i_1}+\cdots+f_{i_n}=1.$$

Solution 2:

$1\in\sum(f_i)$ implies that $1=\sum_{j=1}^{j=n}a_{i_j}f_{i_j}$, thus $\bigcup_{j=1}^{j=n}D(f_{i_j})=Spec(A)$.