Some users, including me, were thinking in chat about the following conditions for a commutative ring $R$ with $1$:
$$(\forall a,b\in R)\;\;\langle a\rangle+\langle b\rangle=\langle\gcd(a,b)\rangle \tag1$$
and
$$(\forall a,b\in R)\;\;\gcd(a,b)=1\implies \langle a\rangle+\langle b\rangle=R.\tag2$$
The second condition says that coprime elements generate coprime ideals. Suppose $R$ is a gcd domain for the conditions to make sense. It's clear that $(1)$ implies $(2)$. Does $(2)$ imply $(1)$?
Suppose $(2)$ holds. Let $a,b\in R$ and $d=\gcd(a,b)$. ($d$ is one of the associate elements which satisfy the definition of $\gcd(a,b)$). Let $$(ar+bs)\in \langle a\rangle+\langle b\rangle.$$
We have $a=dx$ and $b=dy$ for some $x,y\in R.$ Therefore
$$ar+bs=dxr+dys=d(xr+ys)\in\langle d\rangle.$$
So we surely have $\subset$ in $(1).$ We need $\supset.$
This would follow if we had $x,y\in R$ such that
$$ax+by=\gcd(a,b).$$
Does their existence follow from $(2)$ for general gcd domains? If not, what is the (possibly simple) counter-example? And what stronger condition do we need for the implication to hold? Does unique factorization suffice?