Question regarding open covers in Zariski topology (distinguished opens of affine schemes are quasi-compact) Let $A$ be a commutative ring with $1$, and define for $f\in A$ the distinguished open set $D(f)=\{P\in\operatorname{Spec}A\mid f\not\in P\}$.
Suppose we have $D(f)=\bigcup_{i\in I}D(h_i)$ over some index set $I$ and where $h_i\in A$ for every $i\in I$. I'd like to show that there is a finite subset of $I$, call it $\{1,\dots ,n\}$ for which $D(f)=\bigcup_{i=1}^n D(h_i)$.
I can make some progress on this. We have $D(f)=\bigcup_{i\in I}D(h_i)$ if and only if $V(f)=\bigcap V(h_i)=V(\sum_i (h_i))$, and so $f\in\sqrt{\sum(h_i)}$, which means $f^n=\sum_{i=1}^N b_ih_i$ for some $N\geq 1$ and some $b_i\in A$.
Now, how do I "get rid of" the $b_i$'s so that I can end up at the desired form?
 A: $D(f)\subset \operatorname{Spec} A$ is the open affine subscheme $\operatorname{Spec} A_f$, so we can instead solve the following problem: if $\operatorname{Spec} R = \bigcup_{\alpha\in A} D(f_\alpha)$, then we can write find a finite subset $A'\subset A$ so that $\operatorname{Spec} A = \bigcup_{\alpha\in A'} D(f_\alpha)$.
The statement that $\bigcup_{\alpha\in A} D(f_\alpha) = \operatorname{Spec} R$ implies that $\bigcap_{\alpha\in A} V(f_\alpha) = V(\sum_{\alpha\in A} (f_\alpha)) = \emptyset$, or that $\sum_{\alpha\in A} (f_\alpha) = (1)$. Since we define the sum of ideals by taking finite $R$-linear sums of the generators, this implies that there's a finite subset $A'\subset A$ so that $\sum_{\alpha\in A'} r_\alpha f_\alpha=1$. Thus $\bigcap_{\alpha\in A'} V(f_\alpha)=\emptyset$, or $\bigcup_{\alpha\in A'} D(f_\alpha)=\operatorname{Spec} R$, and we're done.
This is the key statement in proving affine schemes are quasi-compact: if we're handed an arbitrary covering of $\operatorname{Spec} R$ by open subsets, then we can refine any open cover of $\operatorname{Spec} R$ to a cover by principal affine open sets $D(f_\alpha)$ as $\alpha$ ranges over some index set $A$. Then the above result implies that we can find a finite subcover of our original cover.
