Lemma 31.15.11. Let $X$ be a Noetherian scheme. Let $D \subset X$ be an effective Cartier divisor. Assume that there exist integral effective Cartier divisors $D_ i \subset X$ such that $D \subset \bigcup D_ i$ set theoretically. Then $D = \sum a_ i D_ i$ for some $a_ i \geq 0$. The existence of the $D_ i$ is guaranteed if $\mathcal{O}_{X, x}$ is a UFD for all $x \in D$ or if $X$ is regular.

Proof. Choose $a_ i$ as in Lemma 31.15.8 and set $D' = \sum a_ i D_ i$. Then $D' \to D$ is an inclusion of effective Cartier divisors which is an isomorphism away from codimension $2$ on $X$. Pick $x \in X$. Set $A = \mathcal{O}_{X, x}$ and let $f, f' \in A$ be the nonzerodivisor generating the ideal of $D, D'$ in $A$. Then $f = gf'$ for some $g \in A$. Moreover, for every prime $\mathfrak p$ of height $\leq 1$ of $A$ we see that $g$ maps to a unit of $A_\mathfrak p$. This implies that $g$ is a unit because the minimal primes over $(g)$ have height $1$ (Algebra, Lemma 10.60.11). $\square$

In your comment you can use Markdown and LaTeX style mathematics (enclose it like $\pi$). A preview option is available if you wish to see how it works out (just click on the eye in the toolbar).