# Scheme-theoretically dense and associated points.

(Vakil 5.5.4) An open subscheme U of a scheme X is said to be scheme-theoretically dense if any function on any open set V is $0$ if it restricts to $0$ on $U \cap V$. If $X$ is locally Noetherian, then you can use the injection (5.5.3.1) (with $M = A$) to show that an open subscheme $U \subset X$ is scheme-theoretically dense if and only if it contains all the associated points of $X$.

The injection (5.5.3.1) is $M \to \prod_{associated~\mathfrak p} M_{\mathfrak p}$.

I think I have proved the backward direction (For those who are curious about this: first let $V$ be any affine scheme and then cover general $V$ with open affines. Use the fact that $U\cap V$ has the same number of associated points as $V$ and 5.5.3.1). But I don't know how to prove the forward direction.

Suppose $U$ doesn't contain some associated point, say $X$. By definition of associated points in a locally Noetherian scheme, we have $x$ is an associated point of any open affine Spec $A$ containing it. I am thinking that probably I should take $V:=\operatorname {Spec} A$. However, I have trouble finding the nonzero function on $V$ that vanishes on $U\cap V$. Well, this choice of $V$ may be invalid. Thanks for your help.

By definition, since $x$ is an associated point of $A$, there is some $f\in A$ such that the prime ideal $p\subset A$ corresponding to $x$ is the annihilator of $f$. Since $x\not\in U\cap V$, this implies $f$ vanishes on $U\cap V$. (Every point of $U\cap V$ corresponds to some prime $q\subset A$ that does not contain $p$, and so some element of $p$ gets inverted in the localization $A_q$, which means $f$ becomes $0$ in $A_q$ since it annihilates all of $p$.)