Using the Chinese Remainder Theorem to prove that a system of equations has a solution in $\mathbb{N}$ if and only if certain conditions are met

297 Views Asked by At

I'm currently working on the following problem:


(a) Use the Chinese Remainder Theorem to prove the following generalization: The system of equations $$x\equiv a_1\>\>\>\text{mod } m_1\\x\equiv a_2\>\>\>\text{mod }m_2\\...\\x\equiv a_r\>\>\>\text{mod }m_r$$ with $m_i \in \mathbb{N}$ has a solution in $\mathbb{N}$ if and only if $a_i \equiv a_j\text{ mod gcd}(m_i,m_j)$ for each $1\leq i\lt j \leq r.$

(b) Prove that if a solution $a$ exists, then it is unique modulo $\text{lcm}(m_1,m_1,...,m_r).$

Hint for the harder direction in a): Use the Chinese Remainder Theorem "in reverse" to rewrite each single congruence as a system of congruences involving a given prime $p$ in terms of the divisibility of the various $a_i - a_j$ by the lesser power of the $p$ occurring in $m_i,m_j$. Then put these conditions together to obtain the desired conclusion.


So based on the wording, my first instinct is that I can solve (a) with a proof by contradiction. So the theorem would be:

The system of equations does not have a solution in $\mathbb{N}$ if $a_i \not\equiv a_j\>\> \text{mod gcd}(m_i,m_j)$

But wouldn't that gcd always be 1 (which is a requirement for the CRT)?