**Proof.**
Let $\mathop{\mathrm{Spec}}(A)$ be an affine neighbourhood of a point $x \in D$. Let $\mathfrak p \subset A$ be the prime corresponding to $x$. Let $I \subset A$ be the ideal defining the trace of $D$ on $\mathop{\mathrm{Spec}}(A)$. Since $A$ is Noetherian (as $X$ is Noetherian) the ideal $I$ is generated by finitely many elements, say $I = (f_1, \ldots , f_ r)$. Under the assumption of (1) we have $I_\mathfrak p = (f)$ for some $f \in A_\mathfrak p$. Then $f_ i = g_ i f$ for some $g_ i \in A_\mathfrak p$. Write $g_ i = a_ i/h_ i$ and $f = f'/h$ for some $a_ i, h_ i, f', h \in A$, $h_ i, h \not\in \mathfrak p$. Then $I_{h_1 \ldots h_ r h} \subset A_{h_1 \ldots h_ r h}$ is principal, because it is generated by $f'$. This proves (1). For (2) we may assume $I = (f)$. The assumption implies that the image of $f$ in $A_\mathfrak p$ is a nonzerodivisor. Then $f$ is a nonzerodivisor on a neighbourhood of $x$ by Algebra, Lemma 10.68.6. This proves (2).
$\square$

## Comments (2)

Comment #3829 by Antoine VEZIER on

Comment #3930 by Johan on