Restricting a Weil divisor to a local scheme

Apologies if the title is garbage. I couldn't think up anything more pertinent, as it's really just a notational question.

In Hartshorne, p.141, Proposition 6.11, it is shown that Weil divisors are Cartier (under some assumptions).

My question is what on earth does it mean for $\mbox{Spec } \mathcal{O}_x$ to be a local scheme; moreover, how does one induce a Weil divisor $D_x$ on it?

In my head this is supposed to be restricting $D$ to a given point; the construction then gives a local equation for $D$ at $x$.

However, I am struggling to see how the scheme $\mbox{Spec } \mathcal{O}_x$ corresponds at all to $x$: it's not even a point unless the stalk is a field.

Thanks for any help offered.


A local scheme is the affine spectrum $\mathrm{Spec}(A)$ of a local ring $A$; such a scheme always has a single closed point. For any scheme $X$, the spectrum $\mathrm{Spec}(\mathscr{O}_{X,x})$ is called the local scheme of $X$ at the point $x$. There is a canonical morphism $\mathrm{Spec}(\mathscr{O}_x) \to X$ and the map of underlying topological spaces is a homeomorphism from $\mathrm{Spec}(\mathscr{O}_x)$ to the subspace of $X$ formed by the points $y$ such that $x \in \overline{\{y\}}$. All this can be found in full detail in (EGA, I, 2.4).

Let $Z = \displaystyle\sum_{x \in X^{(1)}} n_x . \overline{\{x\}}$ be a Weil divisor on $X$, where $X^{(1)}$ is the set of 1-codimensional points of $X$. For any point $y \in Y$ one defines the Weil divisor

$$ Z_y = \sum_{x \in X^{(1)} \cap T_y} n_x . (\overline{\{x\}} \cap T_y) $$

on $T_y = \mathrm{Spec}(\mathscr{O}_{X,y})$. $Z$ being locally principal is equivalent to $Z_y$ being principal.

I would recommend taking a look at the exposition in EGA IV, which is very detailed and much easier to follow than Hartshorne, in my opinion (at least for beginners like us). This particular theorem is (EGA, IV_4, 21.6.9).