Suppose we have $a^2 \equiv b^2 \bmod 4R$ where $R$ is an integral domain. Under what conditions on $R$ can we conclude that $a \equiv b \bmod 2R$?


This would hold if $2 \in R$ is a prime or the product of distinct comaximal primes. This can fail when $R$ is not integrally closed: For $R = \mathbb{Z}[\sqrt{-3}]$ we have $(4+\sqrt{-3})^2 \equiv 1^2 \bmod 4R$ but $4 + \sqrt{-3} \not\equiv 1 \bmod 2R$.


Does this hold in a GCD domain? Does it hold, more generally, in an integrally closed domain?



For an integral domain $R$ when does $a^2 \equiv b^2 \bmod 4R$ imply $a \equiv b \bmod 2R$?
Denote $a-b=x$, then $a^2-b^2=x(x+2b)=4z$ for $z\in R$. Assuming that $R$ is integrally closed, we see that $(x/2)^2+b(x/2)-z=0$, so $x/2$ is an algebraic integer, thus $x/2\in R$.


