Let $D$ be a unique factorization domain such that if $p$ and $q$ are irreducible elements of $D$, then $p$ and $q$ are associates. Show that if $A$ and $B$ are ideals of $D$, then either $A \subseteq B$ or $B \subseteq A$.
Intuitively, the idea that every pair of irreducibles are associate hints that (up to units) there is only one irreducible in $D$. If I can show that $D$ is a P.I.D., the rest of the proof follows easily.
Show $\boldsymbol{D}$ is a P.I.D. Let $I$ be an ideal of $D$; I seek to show that $I$ is principal. Let $x \in I$. As $D$ is a UFD, $x=p_1^{n_1}p_2^{n_2} \dots p_k^{n_k}$ for $p_i$'s are irreducible. Now,by hypothesis, we have
$$p_1 = u_jp_j \hspace{1cm} \forall \, j \in \{2, 3, \dots, k\}$$
$$\implies p_j = \frac{p_1}{u_j}$$
Thus, $x$ can be rewritten:
$$x = p_1^{n_1} \cdot \left(\frac{p_1}{u_2}\right)^{n_2} \cdot \dots \cdot \left(\frac{p_1}{u_k}\right)^{n_k} = \dots =p_1r$$
for some $r \in D$. As $x=p_1r$, then $x \in (p_1)$ and so $I \subseteq (p_1)$. It's obvious that $(p_1) \subseteq I$. So $I = (p_1)$. Thus, $D$ is a P.I.D. $ \hspace{1cm} \square$
But now this proof is problematic because it seems to insist that there is only one ideal of $D$. And while the problem as stated doesn't negate that possibility (since if $A = B$ then $A \subseteq B$ and $B\subseteq A$), I would think that if that was the conclusion I was intended to reach, then the problem would be stated that way. All the same, I can't find the error with my proof that there is only one ideal.