[proofplan]
We prove the biconditional directly. The forward direction starts from the containment $(a) \subset (b)$ and expresses $a$ as an element of $(b)$, which yields a factorisation $a = br$ witnessing divisibility. The reverse direction starts from $b \mid a$, writes $a = br$, and shows every multiple of $a$ is a multiple of $b$, giving the ideal containment. The "in particular" statement follows by applying the biconditional in both directions and observing that mutual divisibility in an integral domain is equivalent to being associates.
[/proofplan]
[step:Show that $(a) \subset (b)$ implies $b \mid a$]
Suppose $(a) \subset (b)$. Since $a = a \cdot 1_R \in (a)$, the containment gives $a \in (b)$. By [definition of a principal ideal](/page/Principal%20Ideal), $(b) = \{br : r \in R\}$, so there exists $r \in R$ with $a = br$. This means $b \mid a$.
[guided]
What does the containment $(a) \subset (b)$ actually give us? It says that every element of the ideal $(a)$ is also an element of the ideal $(b)$. To extract a divisibility statement, we need to find a specific element to work with.
The key observation is that $a$ itself belongs to $(a)$, since $a = a \cdot 1_R \in (a)$. By the containment hypothesis $(a) \subset (b)$, this forces $a \in (b)$.
Now we unpack what membership in $(b)$ means. By [definition of a principal ideal](/page/Principal%20Ideal), $(b) = \{br : r \in R\}$, so $a \in (b)$ means there exists $r \in R$ such that
\begin{align*}
a = br.
\end{align*}
This equation $a = br$ is precisely the definition of $b \mid a$. The argument works because ideal containment is a statement about all multiples, but we only needed to test it on the single element $a = a \cdot 1_R$ to extract the divisibility witness $r$.
[/guided]
[/step]
[step:Show that $b \mid a$ implies $(a) \subset (b)$]
Suppose $b \mid a$, so there exists $r \in R$ with $a = br$. Let $x \in (a)$ be arbitrary. Then $x = as$ for some $s \in R$, and substituting gives $x = (br)s = b(rs) \in (b)$. Since $x$ was arbitrary, $(a) \subset (b)$.
[guided]
We want to show that every element of $(a)$ lies in $(b)$. A generic element of $(a)$ has the form $x = as$ for some $s \in R$. The divisibility hypothesis gives us a factorisation $a = br$ for some $r \in R$. Substituting:
\begin{align*}
x = as = (br)s = b(rs).
\end{align*}
Since $rs \in R$ (because $R$ is closed under multiplication), we have $x = b(rs) \in (b)$. As $x \in (a)$ was arbitrary, this shows $(a) \subset (b)$.
[/guided]
[/step]
[step:Deduce that $(a) = (b)$ if and only if $a$ and $b$ are associates]
Suppose $(a) = (b)$. The containment $(a) \subset (b)$ gives $b \mid a$ by the forward direction, so $a = bu$ for some $u \in R$. The containment $(b) \subset (a)$ gives $a \mid b$, so $b = av$ for some $v \in R$. Substituting, $a = bu = (av)u = a(vu)$. If $a = 0_R$, then $(a) = (0) = (b)$ forces $b = 0_R$, and both are associates (with unit $1_R$ or any unit as witness, since $0 = 0 \cdot 1_R$). If $a \neq 0_R$, then since $R$ is an [integral domain](/page/Integral%20Domain) (every [PID](/page/Principal%20Ideal%20Domain) is an integral domain), we may cancel $a$ from $a = a(vu)$ to obtain $vu = 1_R$. Thus $u \in R^\times$, and $a = bu$ with $u$ a unit, so $a$ and $b$ are associates.
Conversely, suppose $a$ and $b$ are associates, so $a = bu$ for some $u \in R^\times$. Then $b \mid a$ (witnessed by $u$), giving $(a) \subset (b)$. Also $b = au^{-1}$, so $a \mid b$ (witnessed by $u^{-1}$), giving $(b) \subset (a)$. Therefore $(a) = (b)$.
[guided]
We apply the biconditional proved in the previous two steps in both directions simultaneously.
**Forward: $(a) = (b)$ implies associates.** The equality $(a) = (b)$ means both $(a) \subset (b)$ and $(b) \subset (a)$. By the forward direction of the biconditional, $b \mid a$ and $a \mid b$. Write $a = bu$ and $b = av$ for some $u, v \in R$. Substituting the second into the first:
\begin{align*}
a = bu = (av)u = a(vu).
\end{align*}
We now need to conclude that $vu = 1_R$. There are two cases. If $a = 0_R$, then $(a) = (0)$, which is the zero ideal. But $(a) = (b)$ forces $(b) = (0)$, so $b = 0_R$ as well. Both are zero, and $0 = 0 \cdot 1_R$, so $a$ and $b$ are associates (any unit witnesses this since $0 \cdot u = 0$ for all $u$). If $a \neq 0_R$, we use the fact that every [PID](/page/Principal%20Ideal%20Domain) is an [integral domain](/page/Integral%20Domain): the equation $a \cdot 1_R = a(vu)$ with $a \neq 0_R$ allows cancellation, yielding $vu = 1_R$. Therefore $u \in R^\times$ is a unit, and $a = bu$ shows that $a$ and $b$ are associates.
**Reverse: associates implies $(a) = (b)$.** Suppose $a = bu$ where $u \in R^\times$. Then $b \mid a$ (with witness $u$), so the reverse direction of the biconditional gives $(a) \subset (b)$. Since $u$ is a unit, $u^{-1} \in R$, and $b = au^{-1}$, so $a \mid b$ (with witness $u^{-1}$). The reverse direction again gives $(b) \subset (a)$. Combining both containments: $(a) = (b)$.
[/guided]
[/step]