Lemma 10.26.4. Let $R$ be a ring. Let $\mathfrak p$ be a minimal prime of $R$. Let $W \subset \mathop{\mathrm{Spec}}(R)$ be a quasi-compact open not containing the point $\mathfrak p$. Then there exists an $f \in R$, $f \not\in \mathfrak p$ such that $D(f) \cap W = \emptyset$.

Proof. Since $W$ is quasi-compact we may write it as a finite union of standard affine opens $D(g_ i)$, $i = 1, \ldots , n$. Since $\mathfrak p \not\in W$ we have $g_ i \in \mathfrak p$ for all $i$. By Lemma 10.25.1 each $g_ i$ is nilpotent in $R_{\mathfrak p}$. Hence we can find an $f \in R$, $f \not\in \mathfrak p$ such that for all $i$ we have $f g_ i^{n_ i} = 0$ for some $n_ i > 0$. Then $D(f)$ works. $\square$

In your comment you can use Markdown and LaTeX style mathematics (enclose it like $\pi$). A preview option is available if you wish to see how it works out (just click on the eye in the toolbar).