UFD yields height of certain primes at most $1$

Hint $\ $ A characteristic property of UFDs is: every prime ideal $\rm\:P\:$ may be generated by primes; equivalently, a prime ideal $\ne 0$ contains a prime $\ne 0.\,$ Indeed, $\rm\:0\ne p_1\cdots p_n\in P\:\Rightarrow\:$ some $\rm\: p_i\in P,\:$ so each generator may be replaced by some prime factor. Though this simple direction is all you need here, below I give a proof of the less trivial converse (a famous theorem of Kaplansky), since this beautiful result deserves to be much better known.

Theorem $\ $ TFAE for an integral domain D

$\rm(1)\ \ \:D\:$ is a UFD $ $ (i.e. a Unique Factorization Domain)
$\rm(2)\ \ $ In $\rm\:D\:$ every prime ideal may be generated by primes.
$\rm(3)\ \ $ In $\rm\:D\:$ every prime ideal $\ne 0$ contains a prime $\ne 0.$

Proof $\,\ (1 \Rightarrow 2)\ $ Proved above. $\rm\,\ (2\Rightarrow 3)\ $ Choose any prime generator $\ne 0$ of the ideal.
$(3 \Rightarrow 1)\,\ $ The set $\rm\:S\subseteq D\:$ of products of units and nonzero primes forms a $ $ saturated monoid, $\ $ i.e. $\rm\:S\:$ is closed under products (clear) and under divisors, since the only nonunit divisors of a prime product are subproducts (up to associates), by uniqueness of factorization of prime products. $\rm\,S\,$ is a saturated monoid $\Rightarrow$ its complement $\rm\:\bar S = $ union of prime ideals. So $\rm\:\bar S = \{0\}\:$ (else it contains a prime ideal $\rm\:P\ne 0\:$ containing a prime $\rm\:0\ne p\in P\subseteq \bar S,\:$ contra $\rm\:p\in S).\:$ Hence every $\rm\:0\ne d\in D\:$ lies in $\rm S,\:$ i.e. $\rm\:d\:$ is a unit or prime product, so $\rm\:D\:$ is a UFD.

Remark $\ $ The essence of the proof is clearer when one learns localization. Then, by general principles, the prime ideals in $\rm\bar S\:$ correspond to maximal ideals of the localization $\rm\:S^{-1} D.\:$

In fact one can view this as a special case of how UFDs behave under localization. Generally the localization of a UFD remains a UFD. Indeed, such localizations are characterized by the sets of primes that survive (don't become units) in the localizations.

The converse is also true for atomic domains, i.e. domains where nonzero nonunits factor into atoms (irreducibles). Namely, if $\rm\:D\:$ is an atomic domain and $\rm\:S\:$ is a saturated submonoid of $\rm\:D^*$ generated by primes, then $\rm\: D_S$ UFD $\rm\:\Rightarrow\:D$ UFD $\:\!$ (popularized by Nagata). This yields a slick proof of $\rm\:D$ UFD $\rm\Rightarrow D[x]$ UFD, viz. $\rm\:S = D^*\:$ is generated by primes, so localizing yields the UFD $\rm\:F[x],\:$ $\rm\:F =\:$ fraction field of $\rm\:D.\:$ Therefore $\rm\:D[x]\:$ is a UFD, by Nagata. This yields a more conceptual / structural view of the essence of the matter (vs. standard proof by Gauss' Lemma).


Let $P$ be a prime ideal minimal over $(a)$. Then, since $a$ is a product of primes it follows that $P$ contains a prime element, hence a principal prime (containing $a$), so they coincide.
But it's easy to see that a non-zero principal prime ideal in a UFD has height one: if we have $0\neq P_1\subseteq P=(p)$, then take a prime element $p_1\in P_1$ and from $(p_1)\subseteq (p)$ we get $p\mid p_1$, and thus $(p_1)=(p)$, so $P_1=P$.