1

This is the question.

Let $\gcd(m,n)=d$. Show that if $a=b$ (mod $d$), the equations $x=a$ (mod $m$) and $x =b$ (mod $n$) has a solution.

My thinking is this. Because $\gcd(m,n)=d$, there exists some $r,s$ integers such that $rm+sn = d$. So $r\frac{m}{d} + s\frac{n}{d} = 1$. Now, my idea is to define $x$ similar to that in the Chinese Remainder Theorem, letting $x = br\frac{m}{d} + as\frac{n}{d} \implies dx = brm+asn$. Now, $dx$ (mod $m$) $= asn = da$ (mod $m$). Similarly $dx= db$ (mod $n$). So $dx = da$ (mod $m$) = $db$ (mod $n$).

Here is where I'm stuck. I suppose now I should use the fact that if $a=b$ (mod $d$), then $dx = da$ (mod $m$) = $db$ (mod $n$) would imply $x=a$ (mod $m$) and $x =b$ (mod $n$), and the proposed $x$ above would work. But how do I do it? Any hints?

koifish
  • 2,779

1 Answers1

2

Because $a=b$ (mod $d$), there exists $l$ such that $a=b+ld$.

Because $gcd(m,n)=d$, there exists $u,v$ such that $um+nv=d$. So $lum+lnv=ld$.

Let's define $x=b+lnv$.

Obviously, one has $x=b$ (mod $n$). Moreover, $x=b+lnv=b+ld-lum = a-lum$ so you have also $x=a$ (mod $m$).

TheSilverDoe
  • 29,720
  • Hello, I may be misunderstanding something, but the question just asks me to prove the existence of a solution, not to determine it's uniqueness. In fact, there's a second part, which says if the solutions are unique up to modulo $lcm(m,n)$. – koifish Aug 27 '20 at 11:47
  • @YipJungHon Now, this seems correct ! – TheSilverDoe Aug 27 '20 at 11:57