$\newcommand{\Spec}{\operatorname{Spec}}$
Let $A$ be an algebra and $\Spec(A)$ the scheme consisting of all prime ideals of $A$.
How to show that $\Spec(A)=\bigcup_{i=1}^n D(g_i)$ implies that $(g_1, \ldots, g_n)=A$? By definition, $D(g_i)=\{p \in \Spec(A): g_i \not\in p\}$. Let $a \in A$. Then $a \in p$ for some $p \in \Spec(A)$. Therefore $a \in p \in D(g_i)$ for some $i$. Hence $g_i \not\in p$. But how could we show that $a \in (g_1, \ldots, g_n)$? Thank you very much.