Principal ideals and UFD's Problems 1-6 form a project designed to prove that if R is a UFD and every nonzero prime ideal of R is maixmal, then R is a PID.
Let I be an ideal of R, since {0} is principal, we can assume that $I \not= \{0\}$. Since R is a UFD, every nonzero element of I can be written as $up_1...p_t$ where u is a unit and the $p_i$ are irreducible, hence prime. Let r=r(I) be the minimum such t. We are going to prove by induction on r and I is principal. 
1) If r=0, show that $I = \langle 1 \rangle = R$. 
Answer
If r=0 then I contains a unit, so that $1 \in I$ and I=R.
I'm not sure if I get this, because I'm having trouble understanding the notation r=r(I). What is that? Does it mean that we multiply r by I? If so, then r=0 just gives us 0=0. So I'm sure that I'm misunderstading that notation...
Thank you in advance 
 A: Here $\,r\,$ denotes the length of the shortest element in $\,I,\,$ i.e. the element having the least number of prime factors. If $\,r = 0\,$ then a nonzero element of $\,I\,$ has no prime factors, so it is a unit.
The proof employs following pretty generalization of the Euclidean algorithm to arbitrary PIDs. The Dedekind-Hasse criterion states that
a domain $\rm\:D\:$ is a PID iff given any $\rm\:0\ne b,c \in D,\:$
either $\rm\:b\:|\:c\:$ or there exists a $\rm D$-linear combination of $\rm\:b,c\:$ that's "smaller" than $\rm b,\:$ where size is measured by naturals  (or any ordinal), so that induction (or descent) works.  
It is clear that such a domain must be a PID, since 
the smallest element in an ideal must divide all others.
Conversely, since a PID is UFD, an adequate metric is
the number of prime factors (since if  $\rm\:b\nmid c\:$ then their gcd $\rm\:d\:$
must have fewer prime factors; for if $\rm\:(b,c) = (d)\:$ then
 $\rm\:d\:|\:b\:$ properly, else $\rm\:b\:|\:d\:|\:c\:$ contra hypothesis). Notice Euclidean descent by the Division Algorithm is just a
special case, hence Euclidean $\Rightarrow$ PID ($\Rightarrow$ {UFD, Bezout} $\Rightarrow$ GCD). 
