2.9.8

Let $$m,n,a,b$$ be integers, and suppose $$\gcd(m,n) = 1$$. Then we claim that there exists an integer $$x$$ such that $$x \equiv a \pmod m$$, and $$x \equiv b \pmod n$$.

If $$m=n=0$$, then whatever convention we assign to $$gcd(0,0)$$, it will not be 1, so we may assume $$m$$ and $$n$$ are not both 0. Then Proposition 2.2.6 applies, and $$\gcd(m,n) = 1 = mr + ns$$ for some integers $$r$$ and $$s$$. Let $$x = b + ns(a-b)$$, which is an integer. Then, evidently $$x \equiv b \pmod n$$. But also, $$ns = 1 - mr$$, so that $$x = b + (a-b)(1-mr) = a - mr(a-b) \equiv a \pmod m$$. Thus an integer $$x$$ with the desired properties exists.