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$.
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.