Deducing factorization into irreducibles by maximality principles (in a PID) In my book it says that if $d$ is an element in a principal ideal domain $D$ that cannot be written as a product of irreducible elements then it follows that $d$ is not irreducible. I dont understand this, im thinking that IF it is irreducible THEN it cannot be written as a product of irreducible elements...Am I missing something?
Claim: Any principal ideal domain is a UFD
Proof: "Let $D$ be a principal ideal domain and let $d$ be a nonzero element of $D$ that is not a unit. Suppose that $d$ cannot be written as a product of irreducible element. Then $d$ is not irreducible, and so $d = a_1b_1$, where neither $a_1$ nor $b_1$ is a unit and either $a_1$ or $b_1$ cannot be written as a product of irreducible elements. Assume that $a_1$ cannot be written as a product of irreducible element. Now $b_1$ is not a unit, and so we have $dD \subset a_1D$. We can continue this argument to obtain a factor $a_2$ of $a_1$ that cannot be written as a product of irreducible elements such that $a_1D \subset a_2D$. Thus the assumption that $d$ cannot be written as a product of irreducible elements allows us to construct a strictly ascending chain of ideals $dD \subset a_1D \subset a_2D \subset a_3D \subset.....$" (according to the last lemma, this chain contradicts the fact that $D$ is a principal ideal domain)
This is half the proof, namely they proved the first condition for an integral domain to be a UFD, however there are several parts i dont understand, like the one i pointed out in the beginning of the post. Can anyone explain this proof to me?
 A: They are using the convention that any element may be considered as a product (of one factor). Thus if $\,d\,$ is irreducible then it is a (one-factor) product of irreducibles, so any counterexample is reducible. Here is another way to view the proof.
Suppose a counterexample exists. By PID $\Rightarrow$ ACCP, the set of counterexample principal ideals contains a maximal element $(r).\,$ By above, $r$ is reducible $\,r = st.\,$ But by maximality, $\,s,t\,$ have irreducible factorizations hence, appending them,  so too does $\,r = st,\,$ contradiction.
Remark $\ $ Interpreted positively, the proof shows if $S\,$ is the set of principal ideals  disjoint from a monoid $M$ then $(r)$ is maximal in $\,S \iff r\,$ is irreducible. This is a generalization of the well-known case where $\,M = \{1\},\,$ i.e. $\ (r)$ is maximal among principal ideals $\iff r$ is rreducible.
This is a specal case of a wide class of results where elements satisfying such maximality properties are irreducible or prime, e.g. see this answer. One beautiful example along these lines is a famous theorem of Kaplansky that a domain is a UFD $\iff$ every prime ideal $\ne 0$ contains a prime $\ne 0$ (or, equivalently, every prime ideal is generated by primes).
The essence of results like this are often clarified when one studies localization. If you do so, I  recommend that you revisit these results and view them from that perspective in order to gain further insight.
