# Effective Weil divisors on a Surface and local equations

Let $S$ be a non singular surface over an algebraically closed field $k$ ($S$ is a $k$-scheme integral, of finite type and separated). Suppose that $D\subset S$ is an effective Weil divisor; I don't understand what is a local equation of $D$ at a point $x\in S$. It should be some particular element of the local ring $\mathcal O_{X,x}$. Moreover I'd like to know why we assume that $D$ is effective in order to define a local equation at a point.

• The point, I think is that smoothness implies that each $\mathcal{O}_{X,x}$ is a UFD, so a height one prime is actually principal. If $D$ is not effective then, well, the right local equation for $-Y$ is the inverse of the equation for $Y$, and that's not a regular function at the points of $Y$.
– Hoot
Oct 5 '15 at 22:35

$\def\O{\mathcal{O}} \def\p{\mathfrak{p}}$ A local equation at $x$ can be viewed one of two ways. It's either an element of $\O_{S, x}$ or an element of $\O_{S}(U)$ for some neighborhood $U$ in $S$ of $x$ that cuts out $D$, i.e., such that, locally, $D = V(f)$ where $f$ is the local equation.
If you look at Hartshorne's section on divisors in Chapter 2, you'll see how this works. It's not required to assume $S$ is a surface or is smooth. What you need is that $S$ is and \textbf{locally factorial} i.e. for every point $x \in S$, we have $\mathcal{O}_{X, x}$ is a UFD and hence, its codimension 1 primes are principal.
Since we are working with local things for now, let's assume $S$ is affine. So, now, if you have a prime divisor, say $D$, of $S$, then it is $V(\p)$ for some prime $\p$ in $S$ of codimension $1$. Hence, locally, $\p$ is principal. You can phrase this in two ways. Either for each $x$ in $D$, there is some principal open affine neighborhood $S_{f}$ of $x$ such that $D \cap S_{f} = V(g)$ for some $g \in \Gamma(S_{f})$. Alternatively, you can say that for each $x \in D$, $\p_{x}$ is a principal ideal in $\Gamma(S)_{x}$.
The reason effectivity is assumed is as follows: if $D$ is effective then we can write it as a positive sum of prime divisors $D = D_{1} + \cdots + D_{n}$. Then, we can take the local equations for $D$ to be the product of the local equations for $D_{i}$. But this doesn't work for non-effective divisors because a "local equation" that cuts out a non-effective divisor would require tracking both the zeros and poles of the local equation, as it need not be regular.