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?