UFD is GCD Domain

Theorem
Let $A$ be a unique factorisation domain.

Then $A$ is a GCD domain.

Proof
Let $x,y \in A$, with factorisations:


 * $x = u x_1 \cdots x_r,\quad y = v y_1 \cdots y_s$

with $u,v$ units and the $x_i$, $y_i$ irreducible.

We may choose the factorisations as follows:


 * $x = u (x_1 \cdots x_t) x_{t + 1} \cdots x_r$


 * $y = v (y_1 \cdots y_t) y_{t + 1} \cdots y_s$

where:
 * $t \leq \operatorname{min}\{r,s\}$
 * For $i = 1,\ldots, t$, $x_i$ and $y_i$ are associates
 * For any $i \in \{ t+1,\cdots,r\}$, $j \in \{ t+ 1,\cdots, s\}$, $x_i$ and $y_j$ are not associates.

Let $d = x_1 \cdots x_t$.

We claim that $d$ is a greatest common divisor for $x$ and $y$.

Certainly $d|x$ and $d|y$, so let $f$ be another common divisor of $x$ and $y$.

We can find $w,z \in A$ be such that $x = u f w$, and $y = v f z$.

If $f$ is unit, then trivially $f | d$.

If $f \nmid d$, then the factorisation of $f$ must contain an irreducible that does not divide $d$.

But then some element $x_j$, $j > t$ must divide some $y_k$, $k >t$, a contradicton.

Therefore $f | d$.