If coprime elements generate coprime ideals, does it imply for any $a,b\in R$ that $\langle a\rangle+\langle b\rangle=\langle \gcd (a,b)\rangle$? 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?
 A: Yes, $(2)\Rightarrow (1)$ holds. If $\rm\:d = gcd(a,b)\:$ then $\rm\:(a,b)\:=\: d\:\!(a/d,b/d) = d\!\:(1) = (d)\:$ by $(2)$.  Hence a GCD domain is Bezout iff coprime elements are comaximal (a domain is called Bezout if two-generated (so finitely generated) ideals are principal).
Remark $\ $ For a comprehensive survey of integral domains closely related to GCD domains see D.D. Anderson: GCD domains, Gauss' lemma, and contents of polynomials, 2000.  See also
Theorem $\rm\ \ \ TFAE\ $ for a $\rm UFD\ D$ 
$(1)\ \ $ prime ideals are maximal if nonzero, $ $ i.e. $\rm\ dim\,\ D \le  1$
$(2)\ \ $ prime ideals are principal
$(3)\ \ $ maximal ideals are principal
$(4)\ \ \rm\ gcd(a,b) = 1\, \Rightarrow\, (a,b) = 1, $ i.e. $ $ coprime $\Rightarrow$ comaximal 
$(5)\ \ $ $\rm D$ is Bezout
$(6)\ \ $ $\rm D$ is a $\rm PID$ 
Proof $\ $ (sketch of $1 \Rightarrow 2 \Rightarrow 3 \Rightarrow 4 \Rightarrow 5 \Rightarrow 6 \Rightarrow 1)\ $ where $\rm\,p_i,\,P\,$ denote primes $\neq 0$
$(1\Rightarrow 2)$ $\rm\ \  p_1^{e_1}\cdots p_n^{e_n}\in P\,\Rightarrow\,$ some $\rm\,p_j\in P\,$ so $\rm\,P\supseteq (p_j)\, \Rightarrow\, P = (p_j)\:$ by dim $\le1$ 
$(2\Rightarrow 3)^{\phantom{|^i}}\!\!\!$ $ \ $ max ideals are prime, so principal by $(2)$
$(3\Rightarrow 4)^{\phantom{|^i}}\!\!\!$ $\  \rm \gcd(a,b)=1\,\Rightarrow\,(a,b) \subsetneq (p) $ for all max $\rm\,(p),\,$ so $\rm\ (a,b) = 1$ 
$(4\Rightarrow 5)^{\phantom{|^|}}\!\!\!$ $\ \ \rm c = \gcd(a,b)\, \Rightarrow\, (a,b) = c\ (a/c,b/c) = (c)$ 
$(5\Rightarrow 6)^{\phantom{|^|}}\!\!\!$ $\  $ Ideals $\neq 0$ in Bezout UFDs are generated by an elt with least #prime factors
$(6\Rightarrow 1)^{\phantom{|^|}}\!\!\!$ $\ \ \rm (d) \supsetneq (p)$ properly $\rm\Rightarrow\,d\mid p\,$ properly $\rm\,\Rightarrow\,d\,$ unit $\,\rm\Rightarrow\,(d)=(1),\,$ so $\rm\,(p)\,$ is max
A: A domain in which every sum of two (or finitely many) principal ideals is again a principal ideal is called a Bézout domain (curiously the English write an accent in that name, whereas the French, aware of the fact that writing accents was very haphazard at the time, don't). A Bézout domain is always a GCD domain, but the converse is not true. It is easy to see that the generator of $\langle a\rangle+\langle b\rangle$ is necessarily a gcd of $a$ and $b$. Your question is therefore whether a GCD domain in which (2) holds is necessarily a Bézout domain. The answer is yes, as indicated in the comment by Joel Cohen: when $d=\gcd(a,b)$, the elements $a/d$ and $b/d$ cannot have a common factor, so $1$ is a gcd of $a/d$ and $b/d$, and by (2) there exist $s,t$ with $s(a/d)+t(b/d)=1$, which implies $as+bt=d$ and therefore (1).
