Example of a dense but not schematically dense open subset

algebraic-geometryschemes

We have the following theorem in algebraic geometry

Let $X$ be a reduced $S$-scheme, $Y$ a separated $S$-scheme and $U\subseteq X$ a dense open subset. Then two morphisms $f,g:X\rightarrow Y$ that are equal over $U$ must be equal.

I am trying to understand why these hypothesis are needed.

It is easy to see why $Y$ must be separable, otherwise I can take the affine line with double point at the origin and the two different inclusions of the usual line on it. These morphisms are equal on $\mathbb{A^1}\setminus \{0\}$ but not on the entire double line. Basically this example is the same as the one we have in general topology when $Y$ is not Hausdorff and the reason amount to the fact that the equalizer of $f$ and $g$ must not be closed.

But it has been harder for me to understand why the hypothesis for $X$ is needed.

It appears the reason is the existence of open subsets $U\subseteq X$ that are dense in the topological level but not in the sheaf level. So you can embed them inside a closed immersion $Z\hookrightarrow X$ where $Z=X$ as sets but $\mathcal{O}_Z=\mathcal{O}_X/\mathcal{J}$ with $\mathcal{J}\subseteq \mathcal{Nil}(X)$.

I tried to construct such an open set but I failed.

Anyway, I looked in the literature and I saw that the right notion of dense open subset for schemes is called schemetically dense (or scheme theoretically dense), as can be seen in the book of Görtz, Wedhorn or the Stack Project and are exactly the ones that avoid this problem.

So now my question is

What is an example of a dense open subset $U\subseteq X$ that is not schematically dense?

I tried to construct it with an affine $X$ and $U$ principal but it appears it must be something more involved than that.

Best Answer

Take $X = \operatorname{Spec} k[x,y]/(x^2,xy)$ (i.e. a line with an embedded point at the origin) and $U = D(y)$. This is of course dense as a topological space, but is not scheme-theoretically dense, since $U\hookrightarrow X$ factors through $U\hookrightarrow \operatorname{Spec} k[y] \hookrightarrow \operatorname{Spec} k[x,y]/(x^2,xy)$.

Related Question