TITLE: Vakil 14.2.E: $\mathcal L \cong \mathcal O_X(\mathrm{div}(s))$ for $s$ a rational section.
QUESTION [10 upvotes]: I am working through Vakil's Ch. 14 (march2313 version) on invertible sheaves and am having trouble on 14.2.E.
The question (in notation to be defined) is this: how do I show that each point in the support of $D$ is contained in some set in $B$?
Let $X$ be a Noetherian normal scheme, $\mathcal L$ an invertible sheaf on $X$, and $s$ a rational section, $D = \mathrm{div}(s)$. This means that $s$ is an equivalence class of sections over open sets containing all of the associated points of $X$. We associate to $D$ a sheaf $\mathcal O_X(D)$ defined by 
$$\mathcal O_X(D)(U) = \{t\in K(X):\: \mathrm{div}\rvert_{U}(t)+D\geq 0\},$$ where $K(X)$ is the total quotient ring of $X$, which coincides with the function field if $X$ is irreducible.
Part of the exercise is to show that $B = \{\mathrm{open}\: U\subset X:\: \mathcal O(\mathrm{div}(s)) \rvert_U \cong \mathrm O_U \}$ is a base for the Zariski topology on X. On each such set it is easy to see that $\mathcal O_X(D)(U)\longrightarrow \mathcal O_X(U)\longrightarrow \mathcal L(U)$ defined by $t\longmapsto t\longmapsto ts$ is an isomorphism, so in the end we find that $\mathcal O_X(\mathrm{div}(s))\cong \mathcal L$ . 
The complement $U$ of (the support of) $D$ is such an open set; sections over $U$ are those $t\in K(X)$ having nonnegative valuation at every codimension 1 point contained in $U$. Since $X$ is normal, $\mathcal O_X(U)$ is normal, so Hartog's lemma gives that $$\mathcal O_X(U) = \bigcap_{q\in U, \mathrm{codim}(q)=1}\mathcal O_{X,q},$$ so we find that $t\in \mathcal O_X(U).$ Taking distinguished open sets in $U$ gives a basis in U, so we need only consider those points in the support of $D$.
Suppose $p\in D$. If $p$ lies is only one prime divisor $Y$ in $D$, then the complement $U$ of the other componenets is an open set over which the only constraint on sections of $\mathcal O_X(D)$ is that they satisfy $v_Y(t)+v_Y(s)\geq 0$ ($v_Y$ being the valuation on $\mathcal O_{X,Y}$), so I should be able to find an isomorphism of $\mathcal O_X(D)(U)\cong \mathcal O_X(U)$ gotten by multiplying by an appropriate power of a uniformizer in $\mathcal O_{X,Y}$, but I'm not sure how to make this go. For those $p$ contained in more than one irreducible component of $D$, things seem worse because it could be that $p$ generizes to two prime divisors where $s$ has different nonzero orders. So then I want to to inject into the direct product of the associated points...?
I hope I have made my points of confusion sufficiently clear.

REPLY [4 votes]: Since I've been asking myself the same question, I'll add another, hopefully easier answer:
We want to show that $\mathfrak U := \{ U \ \mid \ \mathcal O(D)|_U \cong \mathcal O_U\}$ forms a base for the Zariski topology of X.
Replacing $\mathcal O(D)$ by $\mathcal L$, this statement is obviously true since $\mathcal L$ is a line bundle.
It hence suffices to show that $\mathcal O(D)$ is trivial on any open subset $U$ on which $\mathcal L$ is trivial.
Let $U$ be such an open subset and choose an isomorphism $\mathcal \phi : \mathcal L|_U \to \mathcal O_U$.
Then $s|_U$ gives rise to a rational section $f := \phi(s|_U)$ of $\mathcal O_U$ and furthermore (by definition) $D|_U = \mathrm{div}|_U f$.
Then the map $\mathcal O(D)|_U = \mathcal O_U(D|_U) = \mathcal O_U(\mathrm{div}|_U f) \to \mathcal O_U$ given on sections by $t \mapsto f\cdot t$ is well-defined and gives the required isomorphism:
$\mathrm{div}|_U(f\cdot t) = \mathrm{div}|_U t + \mathrm{div}|_U f = \mathrm{div}|_U t + D|_U \geq 0$ since $t$ is a section of $\mathcal O(D)$ and hence $f\cdot t$ is a regular section by the normality hypothesis (using that $A = \cap_{\mathrm{ht}(\mathfrak p) = 1}A_{\mathfrak p}$ for a normal Noetherian ring $A$).
Starting with a regular section $t \in \mathcal O_U$, one has that $\begin{align} \mathrm{div}|_U (\frac{t}{f}) + D|_U = \mathrm{div}|_U t - \mathrm{div}|_U f + \mathrm{div}|_U f = \mathrm{div}|_U t \geq 0
\end{align}$ since $t$ is regular.
Hence dividing a regular section by $f$ gives the required inverse $\mathcal O_U \to \mathcal O(D)|_U$.
Note that we essentially made use of the fact that $D = \mathrm{div} s$ is a locally principle divisor and the same line of thought shows that $\mathcal O(D)$ is a line bundle, whenever $D$ is a locally principle divisor in the given setting.