# Dense open subsets of schemes

Let $X$ be a scheme. Let $U$ be an open subset of $X$. It is clear that if $U$ contains all the generic points of $X$ (by which I mean the generic points of irreducible components of $X$) then $U$ is dense in $X$.

Is the converse of this statement true in general? That is, if $U$ is dense in $X$ does it contain all the generic points of $X$?

I know the converse is true for an affine scheme with finitely many minimal primes, hence for a scheme $X$ whose set of irreducible components is locally finite. So the statement holds for any locally Noetherian scheme.

$\textbf{Proof for the affine case when the ring has finitely many minimal primes:}$ Let $X = Spec(A)$. Let $p_1, \dots, p_n$ be the minimal primes of $A$. Let $U$ be a dense open of $Spec(A)$. Suppose $U = \{p_a : a \in A\}$. Then $$\overline{U} = \mathbb{V}(\cap_{a \in A} p_a) = Spec(A)$$

So, $\cap_{a \in A} p_a = nil(A)$. Let $p_{b_1}, \dots, p_{b_k}$ be the minimal primes of $A$ in $U$. Then $\cap_{a \in A} p_a = \cap p_{b_j}$. So for any minimal prime $p_i$, $nil(A) = \cap p_{b_j} \subset p_i$. By minimality and the fact that $p_i$ is prime, $p_i = p_{b_j}$ for some $j$ ($\textbf{here I need finiteness of the set of minimal primes}$), and so $p_i \in U$.

$\DeclareMathOperator{\Spec}{\operatorname{Spec}}$This is not true, even if $X = \Spec R$ is affine. Consider the ring
$$R := k[x_1, x_2, \ldots]/(x_1x_2, x_3x_4, \ldots) = k[x_i]/(x_ix_{i+1} \mid i \text{ odd})$$
This ring has infinitely many minimal primes (corresponding to binary sequences of even/odd choices for each pair of annihilating variables $\{x_i, x_{i+1}\}$). Set $p := (x_1, x_3, x_5, \ldots)$ be the minimal prime consisting of odd variables, and $U := \Spec(R) \setminus V(p)$, so that $p \not \in U$. Notice that for $f \in R$, $D(f) \subseteq U \iff V(f) \supseteq V(p) \iff f \in p$. Also, since $R$ is reduced, $D(f) = \emptyset$ iff $f = 0$.
To show $U$ is dense in $R$, it suffices to show that for all $g \ne 0 \in R$, $U \cap D(g) \ne \emptyset$, or equivalently, there exists $f \in R$ with $D(f) \subseteq U$ and $D(f) \cap D(g) = D(fg) \ne \emptyset$. In other words, for all $0 \ne g \in R$, there exists $f \in p$ with $fg \ne 0$. But such a choice of $f$ always exists for any $g$, by taking $f = x_k$, for some odd $k$ greater than the largest index appearing in $g$.
(To show this last claim, note that $x_kg = 0$ in $R$ involves only finitely many variables in $k[x_i]$, hence would hold in a sub-polynomial ring in finitely many variables, but in the finite case $k[x_1, \ldots, x_{n+1}]/(x_1x_2, \ldots, x_nx_{n+1}) = \Big(k[\ldots]/(\ldots)\Big)[x_k,x_{k+1}]/(x_kx_{k+1})$, $\text{ann}(x_k) = (x_{k+1})$).