Give an example of a unique factorization domain A that is not a PID. You need not show that A is a UFD (assuming it is), but please show that your example is not a PID.
Let R be a UFD. Let p be a prime ideal such that 0=p and there is no prime ideal strictly between 0 and p. Show that p is principal.
Solution.
A=C[X,Y] is a UFD, but not a PID. For example, the ideal ⟨X,Y⟩ is not principal; if this were not the case, write ⟨X,Y⟩=⟨f⟩ for some f∈A. Then f must divide X and Y, which are prime, so because A is a UFD, it follows XY divide f, which is impossible. Thus, A is not a PID.
Let x∈p, and factor x into up1k1⋯pnkn. Without loss of generality, because p is prime, we may assume that p1∈p. But ⟨p1⟩ is a prime subideal of p, so by assumption, p=⟨p1⟩, so p is principal.