# Why can we interchange "primes" and "irreducibles" in the definition of UFD?

On Wikipedia, UFD is defined as an integral domain in which every element can be uniquely factored as product of primes (irreducibles), up to multiplication by units and arrangement.

My question is about why primes or irreducibles can be interchangeably placed in definition. I mean, in other words, are following two definitions equivalent?

(1) $$R$$ is an integral domain in which every element can be uniquely factored as product of primes (up to unit multiplication and permutation).

(2) $$R$$ is an integral domain in which every element can be uniquely factored as product of irreducibles (up to unit multiplication and permutation).

(from comments below, my question actually boils down to following:)

If in a domain, every element can be uniquely factored into product of primes, then certainly it can be decomposed into irreducibles; how can we ensure uniqueness into irreducible factorization?

• Yes, it turns out that if all elements can be unique factored into irreducibles, then all irreducibles are primes. Basically, one mimics the proof for the integers as far as I recall. Commented Jun 17, 2016 at 9:31
• How is proof of this? (In any integral domain, primes are irreducibles. ) Commented Jun 17, 2016 at 9:31
• Do you know the proof that irreducible integers are prime? Commented Jun 17, 2016 at 9:32
• means, you are asking question in $\mathbb{Z}$? Commented Jun 17, 2016 at 9:36
• Yes, do you know how to show that the irreducible elements in $\mathbb{Z}$ are prime, given that integers factor uniquely? Commented Jun 17, 2016 at 9:39

Assume $R$ satisfies property (2). We want to see that any irreducible is prime, so also property (1) is satisfied.
Let $a$ be irreducible and suppose $a\mid bc$, so $bc=ad$ for some $d\ne0$ (the case when $bc=0$ is trivial). Decompose $b$, $c$ and $d$ into a product of irreducibles: \begin{align} b&=b_0b_1b_2\dots b_m && \text{$b_0$ invertible, $b_i$ irreducible for $1\le i\le m$} \\ c&=c_0c_1c_2\dots c_n && \text{$c_0$ invertible, $c_i$ irreducible for $1\le i\le n$} \\ d&=d_0d_1d_2\dots d_p && \text{$d_0$ invertible, $d_i$ irreducible for $1\le i\le p$} \end{align} By assumption (2), we deduce that $a=ub_i$, for some $i$ and some invertible $u$, or $a=vc_j$, for some $j$ and some invertible $v$.
In the former case, $a\mid b$; in the latter case, $a\mid c$. Therefore $a$ is prime.