## Describe least common multiples in a UFD

Let $R$ be a unique factorization domain and let $a,b \in R$ be nonzero elements. Prove that $a$ and $b$ have a least common multiple, and describe one such multiple in terms of the factorizations of $a$ and $b$.

We begin with some remarks on the elements of a UFD. Let $R$ be a unique factorization domain, and let $S \subseteq R$ be a set of irreducibles such that (1) every irreducible in $R$ is a multiple of some element in $S$ and (2) no two elements of $S$ are multiples of each other. Then we can write every nonzero element of $R$ in the form $\prod_S s^{k_s}$, where $k_s \in \mathbb{N}$ and all but finitely many $k_s$ are zero. The fact that this product is taken over the (possibly infinite) set $S$ is okay because our exponent function $k$ comes from the “direct sum” of $\mathbb{N}$. With this in mind, we will typically not mention $S$ and simply refer to factorizations of nonzero elements in $R$ as $\prod s^{k_s}$, with the understanding that $s$ ranges over a set of representatives of irreducible classes and all but finitely many $k_s$ are zero. Using this notation, for factorizations $\prod s^{k_s}$ and $\prod s^{\ell_s}$, we have $(\prod s^{k_s})(\prod s^{\ell_s}) = \prod s^{k_s + \ell_s}$ using the usual laws of exponents (because $R$ is commutative).

Now we prove a lemma.

Lemma: Let $R$ be a UFD and let $a,b \in R$ be nonzero, where $a$ and $b$ have the factorizations $a = \prod s^{k_s}$ and $b = \prod s^{\ell_s}$. Then $a$ divides $b$ if and only if $k_s \leq \ell_s$ for all $s$. Proof: Suppose $a$ divides $b$. Then we can write $ac = b$ for some $c$, where $c = \prod s^{m_s}$. Then $\prod s^{k_s + m_s} = ac = b = \prod s^{\ell_s}$, so that $k_s + m_s = \ell_s$ for each $s$. Since these exponents are natural numbers, we have $k_s \leq \ell_s$ for all $s$. Conversely, suppose $k_s \leq \ell_s$ for all $s$; then there exists a natural number $m_s$ such that $k_s + m_s = \ell_s$. Note that all but finitely many $\ell_s$ are zero, so that all but finitely many $m_s$ are zero. Let $c = \prod s^{m_s}$. Certainly then $ac = (\prod s^{k_s})(\prod s^{m_s}) = \prod s^{k_s + m_s}$ $= \prod s^{\ell_s} = b$, so that $a$ divides $b$. $\square$

Now to the main result. Let $a,b \in R$ be nonzero elements with factorizations $a = \prod s^{k_s}$ and $b = \prod s^{\ell_s}$. Note that all but finitely many of $\max(k_s,\ell_s)$ are zero. Define $m = \prod s^{\max(k_s,\ell_s)}$. Certainly $a|c$ and $b|c$, using the lemma. Suppose now that $c = \prod s^{n_s}$ is an element of $R$ which is divisible by both $a$ and $b$. Again using the lemma, we have $k_s \leq n_s$ and $\ell_s \leq n_s$. Thus $\max(k_s,\ell_s) \leq n_s$, and thus $m$ divides $c$. Hence $m$ is a least common multiple of $a$ and $b$.