Prove that in any GCD domain every irreducible element is prime

The proof of the following proposition is not completely clear to me. I get everything up until the bold part and I have a feeling some crucial steps are omitted, can anybody help clear this up?

Let $R$ be an integral domain. If every two elements of $R$ have a greatest common divisor, then every irreducible element in $R$ is prime.

Proof:

Consider an irreducible element $p \in R$ and $x,y \in R$ such that $p\vert xy$. Suppose now that $py$ and $xy$ have a greatest common divisor $z$ in R. We want to conclude from this that $p \vert x$ or $p \vert y$. This is obvious if $xy = 0$, so we may assume that $xy \neq 0$. Then $z \neq 0$. As both $p$ and $y$ divide each of $py$ and $xy$, we have that $z = pu = yv$ for certain $u,v \in R$. Using the cancellation law with $\boldsymbol z \boldsymbol \neq \boldsymbol 0$, we obtain that $\boldsymbol v \boldsymbol \vert \boldsymbol p$. As $p$ is irreducible, either $v \in R^\times$ (i.e. the set of invertible elements of $R$) or $v \sim p$ (i.e. $Rv = Rp$). If $v \sim p$, then $p \vert x$. If $v \in R^\times$, then $p$ divides $v^{-1} pu = v^{-1} z=y$.

• Can you tell me where you read it? – Qian Jul 12 '16 at 16:03
• @TheoYou It was stated in the course notes of a 'Fields and Galois Theory' course taught at my university. – Kasper Cools Jul 12 '16 at 16:07

Clearly $yv = z$ divides $py$, so $py = yvw$. Now canceling $y \ne 0$ tells you that $v \mid p$.

$$z\vert py\Rightarrow yv\vert py\Rightarrow v\vert p$$the last step is due to the cancellation law.

The proof is the same as for integers: $\ p\nmid x,\,p\mid xy\,\Rightarrow\, p\mid xy,py\,\Rightarrow\, p|(xy,py) = \color{#c00}{(x,p)}y = y\,$ since $\,p\,$ irreducible and $\,p\nmid x\,\Rightarrow\, \color{#c00}{(x,p) \sim 1}$

Remark  See also this answer where I present this version of Euclid's lemma in Bezout, gcd, and ideal form.

Since Kasper's question have already been clarified, I just provide another interpretation here, which might be more intuitive.

Let $R$ be a GCD domain. Denote $\sim$ as the relation of "being associates", then the quotient $R/\sim$ together with gcd (as meet, $\wedge$) and lcm (as join, $\vee$) forms a distributive lattice.

As shown in the figure above, for irreducible $p$ which divides $ab$, $a\wedge p=\gcd(a,p)$ is a factor of $p$, thus is a unit(i.e. associate of $1$) or an associate of $p$. That is, the node labeling $a\wedge p$ must coincide with that labeling either $1$ or $p$. Same argument applies for $b\wedge p$. While since $(R/\sim,\gcd,\text{lcm})$ is a distributive lattice, the diamond lattice $M_{3}$ is forbidden, that is, at least one of $a\wedge p$ and $b\wedge p$ must associates with $p$. Therefore at least one of $p|a$ and $p|b$ holds, by def., $p$ prime.