1

My assignment is the following:

Prove that the system $$x\equiv a \pmod m$$ $$x\equiv b \pmod n$$ has a solution if and only if $\gcd(m,n) \mid (a-b)$

My approach is the following:

[$\longleftarrow$] Let $x=a +r_1m = b + r_2n$, where $r_1$ y $r_2$ are whole numbers. So, $a-b=r_2n-r_1m\ (*)$. If we find $d=$ GCD$(n,m)$, then $$n=N\cdot d$$ $$m=M\cdot d$$ Replacing in $(*)$ $$a-b=d(r_2N-r_1M)$$

[$\longrightarrow$] If $d=\gcd(n,m)$ and $d \mid a-b$, so $$d=\dfrac{n}{N}$$ $$d=\dfrac{m}{M}$$ and $\dfrac{n}{N}\Big |a-b$ y $\dfrac{m}{M}\Big |a-b$

How can I finish both sides of this proof?

  • 2
    You can use that $d=\gcd(a,b)$ is a generator of the ideal $(a,b)$, hence any linear combination of $a$ and $b$ is a multiple of $d$, and that any divisor common to $a$ and $b$ is a divisor of $d$. – Bernard Dec 09 '19 at 00:40

0 Answers0