### Integral domains and ideals

Let R be an integral domain and suppose that every prime ideal in R is principal. This exercise proves that every ideal of R is principal. (a) Assume that the set of ideals of R that are not principal is nonempty and prove that this set has a maximal element. [Use Zorn's Lemma.] (b) Let I be an ideal which is maximal with re