# Proving Every Principal Ideal Domain is Unique Factorization Domain

Im trying to learn the proof of Every Principal Ideal Domain is Unique Factorization Domain

First we take a E D(a is non zero,non unit) a=p1.p2...pn and a=q1.q2....qs

Then its enough to prove the factorization is unique

p1.p2..pn=q1.q2..qs


Then the proof says that

p1 divides LHS Which implies p1 divides RHS.


How can we say that?

Then it says that

Without Loss of generality  q1=U1p1(For some unit U1 E D)


How can we say this also?

• In a PID, the irreducibles $p_i, q_i$ are also prime. Thus $p_1 | q_1 \dots q_n$ implies $p_1$ divides one of them. Hence the $p_1 = u_1 q_i$ (for some $i$ which is assumed 1 here). – Weaam Oct 20 '15 at 5:08
• There is no reason to assume from the start that both factorizations have $n$ terms. $p_1$ divides LHS too because LHS = RHS, – steven gregory Oct 20 '15 at 5:10
• @StevenGregory That was a typing mistake.Corrected it. – techno Oct 20 '15 at 5:12

You know that in a PID, a prime number is the same as an irreducible. Thus if $p_1$ divides the RHS of the equality it divides some $q_i$ and without loss of generality (because in a PID the product is associative and commutative) we can assume $q_1=q_i.$ It follows that since $q_1$ is a prime then $p_1$ is an associate of $q_1.$
You could also use Kaplansky's theorem: an integral domain $D$ is a UFD if and only if every non-zero prime ideal contains a non-zero prime element. http://sierra.nmsu.edu/morandi/oldwebpages/Math581Fall2012/Kaplansky.pdf
If $P$ is a non-zero prime ideal, it is principal since all ideals are principal in a PID and thus $P=(p)$ for some non-zero $p$. Moreover, $p$ is prime. So it is a UFD.