I have doubts whether I am calculating the stalks correctly of the closed subscheme $Z=V(XY)\subset \mathbb{A}^2_k$.
- So far I calculated the stalk at a closed point $(X-x,Y)=(x,0)$ for $x\neq 0$ $$\mathcal{O}_{Z,(x,0)}=\big (k[X,Y]/(XY)\big )_{(X-x,Y)}=\big (k[X,Y]/Y\big )_{(X-x)}=k[X]_{(X-x)}.$$
The stalk at the point $(0,0)$ is $$\mathcal{O}_{Z,(0,0)}=\big (k[X,Y]/(XY)\big )_{(X,Y)}$$ which is not an integral domain. Can one write this ring more easily?
The stalk at one of the generic points $(X)$ should be given by $$\mathcal{O}_{Z, (X)}=\big (k[X,Y]/(XY)\big )_{(X)}=k(Y).$$
- The functions on the open set $U=V(XY)-V(Y)\subset V(XY)$ are given by $$\mathcal{O}_{Z}(U)=k[X]_{X}.$$ Sometimes I just restrict the scheme to a smaller subscheme and calculate the stalk, the functions there, but I am also interested in how one calculates this just algebraically.
Specifically, you start with the exact sequence (of $k[X,Y]$ modules) $0 \to (XY) \to k[X,Y] \to k[X,Y]/(XY) \to 0$. Apply the localization that inverts $Y$. Now you get an exact sequence ( of $k[X,Y,1/Y]$ modules) $0 \to (X) \to k[X,Y][1/Y] \to (k[X,Y]/(XY)[1/Y] \to 0$. This tells you that $k[Y,1/Y] \cong (k[X,Y]/(XY))[1/Y] = \mathscr{O}_Z(U)$.
In geometric terms: when you take the union of two lines meeting at a point, and delete one of the lines, you get a line with one point removed.
Passing to a helpful neighborhood make things much more "intuitive", in the sense that it reduces computations to familiar things. You can see this in the third example where indeed the stalk at that generic point $\eta$ is $k(x)$.
The stalk at the generic point $\eta$ of $spec[x]$ is the same as its field of fractions (this is a general fact about generic points of integral domains which you can unwrap and prove as a commutative algebra fact...), and you can compute the stalk at $\eta$ by first localizing to $k[x,1/x]$ (which is isomorphic to a neighborhood of $\eta$ in $k[x,y]/(xy)$, specifically the neighborhood $x \not = 0$.). There's nothing about this that isn't algebraic when you unwrap everything.
A similar argument can justify the first computation. (Said a little more algebraically, we first pass to a localization where $X$ becomes invertible (i.e. some neighborhood of $(X - x, Y)$. We apply the fact that localization is exact to the exact sequence $0 \to (XY) \to k[X,Y] \to k[X,Y]/ (XY) \to 0$. Since $(XY) = (Y)$ after making $X$ invertible, we end up with the ring $(K[X,Y]/(Y)_{(X - x,Y)} = k[X]_{(X - x)}$. … but for me it is more intuitive to think about this geometrically, and it is not less precise.)
3.I don't think you should expect a 'simpler' way to write $(k[X,Y]/(XY))_{(X,Y)}$ (though I might be mistaken). This ring captures all the local geometry of two lines intersecting, which is it's own thing.