# Explicit description of discrete valuations corresponding to prime divisors

I'm reading Hartshorne p. 130 on Weil divisors. Let $X$ be a noetherian integral separated scheme regular in codimension 1, $Y$ a prime divisor on $X$, and $\eta \in Y$ its generic point. $\mathcal{O}_{\eta,X}$ is then a discrete valuation ring with quotient field $K =$ the function field of $X$.

Consider the corresponding discrete valuation $v_Y$. My question is: is it possible to describe this valuation more explicitly? Or alternatively do you know any illuminating examples for specific schemes and divisors?

• I do not know if it is illuminating for you, but maybe you can start with the case of $X$ a nonsingular curve, and $Y$ a point on $X$. – Brenin Oct 16 '13 at 20:42

Proposition 11.1. Let $(R, \mathfrak m)$ be a regular local ring of dimension 1. If $\pi$ is a regular parameter for $R$, then every element $t$ of the quotient field $K(R)$ can be written uniquely in the form $t = u\pi^n$ with $n\in\mathbb Z$ and $u$ a unit of $R$. In particular, every ideal of $R$ is of the form $(\pi^n)$, and R is a principal ideal domain.
Think of this as follows: Your prime divisor $Z$ is the closure of a point $P$ of codimension one. If you go into a local neighbourhood of it, there is a single function $\pi$ that defines its vanishing. More precisely, think of $X=\mathrm{Spec}(A)$. If you take any rational function $f=a/b$ with $a,b\in A$, then the stalks of $a$ and $b$ at $P$ both have a well-defined order of vanishing, in the sense that $a=u\pi^r$ and $b=v\pi^s$ with $u$ and $v$ units in $\mathcal O_{X,P}$. Then, $a$ vanishes at $P$ to the order $r$ and $b$ to the order $s$. If $r>s$, then $f$ will vanish at $P$ to the order $r-s$. If $s>r$, then $f$ has a pole at $P$, of order $s-r$.
Silly example: Consider the rational function $$f=\frac{(x-4)(y-2)^3(x+6)}{(x-4)^5(y-2)}$$ on $\mathbb A^2$. Then $f$ has order $-4$ along the line $x=4$ and it has order $1$ along the line $y=2$. The example is silly because the message is the following: You are usually not able to write your prime divisor as the vanishing of one single global function, and even if you could, your ring might not be factorial, etc etc. The bottom line is that everything works very nice when you go into a neighbourhood of your point that is local enough, and there it is the same as back in highschool, just count how often the zero appears in the numerator and how often it appears in the denominator, subtract, and then you know if it's a zero or a pole. And you can even say how much of either it is.