Let $R$ be a UFD if $f\neq 0$ and $\langle f\rangle$ is a prime ideal then $f$ is irreducible. Here is a short and easy proof for this claim but I do not understand the last bit.
Assume for a contradiction that $f$ is not irreducible then $f=uv$ where $u$ and $v$ are not units. By $\langle f\rangle$ a prime ideal we have either $f|u$ or $f|v.$ WLOG, assume former, then $uv=f|u$, this contradicts irreducibility of $u$.
My question:
Where in this proof have we assumed $u$ is irreducible?
{I can see that we can alter this proof a bit by using UFD property to say $f=r_1...r_k$ say where $r_i$ are irreducible then the same can follow. Alternatively $uv|u$ also contradicts $v$ is not a unit. But my question is where on this proof did we assume $u$ is irreducible?}
Many thanks in advance!