Let X be a scheme and let U be an open subscheme. The *scheme theoretic closure* of U in X is the smallest closed subscheme Z of X such that j : U —> X factors through Z. We say that U is *scheme theoretically dense* in X if the scheme theoretic closure of U ∩ V in V equals V for every open V of X. See Definition Tag 01RB. Then U is scheme theoretically dense in X if and only if O_X —> j_*O_U to be injective, see Lemma Tag 01RE.

If X is locally Noetherian, then U is scheme theoretically dense in X if and only if U is dense in X and contains all embedded points of X (Lemma Tag 083P).

For general schemes the situation isn’t as nice. For example, there exists a scheme with 1 point but no associated point (Lemma Tag 05AI). As a replacement for associated points, we sometimes use weakly associated primes (Definition Tag 0547) and the corresponding notion for schemes. This notion agrees with associated point for locally Noetherian schemes. There are enough weakly associated points: if U contains all the weakly associated points, then U is scheme theoretically dense (result not yet in the stacks project). But in some sense there are too many: there is an example of a scheme theoretically dense open subscheme U of a scheme X which does not contain all weakly associated points of X (Section Tag 084J).

We have the following result from Raynaud-Gruson: If X —> Y is an etale morphism and x ∈ X with image y ∈ Y then x is a weakly associated point of X if and only if y is a weakly associated point of Y (Lemma Tag 05FP).

What about scheme theoretic density? Given an etale morphism of schemes g : X’ —> X and a scheme theoretically dense open U ⊂ X the inverse image g^{-1}U is a scheme theoretically dense in X’ (Lemma Tag 0832). This was added recently in order to show that scheme theoretic density defined as above (and as in EGA IV 11.10.2) makes sense in the setting of algebraic spaces.

If you have trouble falling asleep tonight, try proving some of the results above.

I don’t find your example so surprising as the open U is not retro-compact (so that the schematic closure does not necessarily commute with passing to open subschemes, right?).

If U->X is a quasi-compact open immersion, then it is schematically dense if and only if it contains all weakly associated points of X.

Yes, I agree with everything you say. Taking the scheme theoretic image of a quasi-compact morphism commutes with flat base change, see Lemma Tag 081I.