Let $R$ be a unique factorization domain and let $a,b \in R$ be nonzero, non-unit 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$.
suppose $a=up_1^{e_1}p_2^{e_2} \dots p_n^{e_n}, \,\,\,b = vp_1^{f_1}p_2^{f_2} \dots p_n^{f_n} $ be the prime factorizations of $a, b$ such that
$u, v \in R^{\text{x}}$ (group of units) and all $p_i, i \in \mathbb{N}$ are distinct with $e_i,f_i \ge 0$. Now, let $c = q_1^{g_1}q_2^{g_2} \dots q_m^{g_m}$
be some multiple of $a$ and $b$ such that $e_i +f_i \le g_i$ for all $i$ then some $p_i^{e_i+f_i} \mid q_i^{g_i}$ so clearly $a \mid c$ and $b\mid c$. Define $m = p_1^{max(e_1,f_1)}p_2^{max(e_2,f_2)} \dots p_n^{max(e_n,f_n)}$. Then $p_i^{e_i} \mid p_i^{max(e_i,f_i)}$ and similarly $p_i^{f_i} \mid p_i^{max(e_i,f_i)}$ and
so $a\mid m$ and $b\mid m$. Further, $max(e_i,f_i) \le g_i$ thus $m \mid c$. Hence, $m$ is the least common multiple of $a$
and $b$