I am trying to understand some notes from my algebra course, one of which says (it's basically a proof of that all irreducibles are prime in Euclidean domain) :
......Suppose $x = ab$ and $x$ does not divide $a$. Let $d$ be a highest common factor for $x$ and $a$. Then $d$ is not $xu$ for any unit $u$. But x is irreducible, and so d is a unit. So, in fact, $1$-element is a highest common factor for x and a. By Bézout's Lemma, $\exists s, t \in \mathbf{R}$ with $xs + at = 1$ ......
I am confused with the bolded step and you can take it for granted that I understand other sentences in this proof. Why does 'x is irreducible' imply 'd is a unit'? I know that it would be necessary to find an appropriate inverse for d in order to identify it as a unit. But I can hardly find any conditions here to convince me.
I've read other answers for this proof but I think it would be constructive if I also knew this method. Many thanks if any expert can help me.
$x$ is irreducible means: If $x=de$ then one of $d,e$ is a unit. So if $d$ were not a unit, $e$ would be, makeing $a$, which is a multiple of $d$, also a multiple of $de^{-1}=x$, contrary to assumption.