2

I can't understand the proof of Chinese Remainder Theorem let
$x ≡ a_1 (\text{mod }m_1 ),$
$x ≡ a_2 (\text{mod }m_2 ),$
·
·
·
$x ≡ a_n (\text{mod }m_n )$

such that $m_1,m_2,...,m_n$ are relatively primes
$m = m_1 m_2 · · · m_n$
$M_k = m/m_k$ .... for $k=1,2,3,...,n$
and as $\gcd(M_k,m_k)=1$, then $M_ky_k≡1(\text{mod }m_k)$
then when $x=a_1M_1y_1+a_2M_2y_2+...+a_nM_ny_n$
will satisfy all the equations as $M_j ≡ 0\;(\text{mod }\>m_k)$ , $j\neq k$
but how $x ≡ s\;(\text{mod }\>N)$ and $s$ satisfy all the equations
Eg : $x ≡ 2\;(\text{mod }\>3),$
$x ≡ 3\;(\text{mod }\>5)$
$x ≡ 2\;(\text{mod }\>7)$

$m =3*5*7=105$ , $M_1=35$ , $M_2=21$ , $M_1=15$
$y_1=2$ , $y_2=1$ , $y_3=1$
$x=2*35*2+3*21*1+2*15*1=233$ $x ≡ 233\;(\text{mod }\>105 )\ldots x ≡ 23\;(\text{mod }\>105 )$

so $23$ satisfy all the equations, what is the proof of that ?
or if there is another easier proof, I want it.

Bill Dubuque
  • 282,220
Ammar
  • 51
  • Notice that $\gcd(m_2....m_n,\ ...,\ m_1...m_{n-1})=1$ then apply generalized Bezout and you find a $x$ – Maman Dec 21 '15 at 00:50
  • For any $i$, each member of ${M_j : j\ne i}$ is divisible by $m_i$, so $x=a_iM_iy_i+\sum _{j\ne i}Ma_jM_jy_j$ is congruent ,modulo $m_i$, to $a_iM_iy_i,$ which is congruent, modulo $m_i,$ to $a_i$. – DanielWainfleet Feb 06 '16 at 05:31

2 Answers2

1

The trick is to understand the $M_i$ more fully. First, \begin{align} \gcd \{ M_i \}_{i=1}^{n} &= \gcd \left\{ \dfrac{m}{m_i} \right\}_{i=1}^n \\ &= \dfrac{m}{\operatorname{lcm} \{ m_i \}_{i=1}^n}\\ &= \dfrac{m}{m}\\ &= 1 \end{align}

So there exists integers $\{ y_i \}_{i=1}^n$ such that $\displaystyle \sum_{i=1}^n M_i y_i = 1$.

Since $M_j$ is the product of all of the $m_i$ for which $i \ne j$, it follows that $M_j y_j \equiv 0 \pmod{m_i}$ for all $i \ne j$. Hence $1 \equiv \displaystyle \sum_{j=1}^n M_j y_j \equiv M_i y_i \pmod{m_i}$.

In summary $$ M_i y_i \pmod{m_j} = \begin{cases} 1 & \mbox{if } i = j \\ 0 & \mbox{if } i \ne j \end{cases}.$$

Now let $$ x \equiv \sum_{k=1}^n a_k M_k y_k \pmod m$$

Note that, since $m_i | m$ for all $1 \le i \le n$ we can also compute $x \pmod{m_i}$ and, since the only nonzero $\mod{m_i}$ term is $a_i M_i m_i$, we get $x \equiv a_i \pmod{m_i}$ for all $1 \le i \le n.$

0

Let $ m_1, \ldots, m_n $ be pairwise coprime positive integers. We have the natural map $ f : \mathbb{Z} \longrightarrow \mathbb{Z}_{m_1} \times \ldots \times \mathbb{Z}_{m_n} $ sending $ t \mapsto (t \text{ mod } m_1, \ldots , t \text{ mod } m_n) $. Given $ a_1, \ldots, a_n \in \mathbb{Z} $, we're interested in computing the "solution set" $ f^{-1} (( a_1 \text{ mod } m_1, \ldots, a_n \text{ mod } m_n ) ) $.

We have $ f^{-1} ((a_1 \text{ mod } m_1 , \ldots , a_n \text{ mod } m_n)) $ $ \supseteq a_1 f^{-1}((1 \text{ mod } m_1, 0 \text{ mod } m_2 , \ldots , 0 \text{ mod } m_n)) $ $ + \ldots + a_n f^{-1} ((0 \text{ mod } m_1, 0 \text{ mod } m_2, \ldots, 1 \text{ mod } m_n))$, and now thanks to coprimality each term in the RHS is non-empty.
$ \big[$ For example, we have relations $ x_1 m_1 + y_1 m_2 = 1 \, , \ldots , \, x_{n-1} m_1 + y_{n-1} m_n = 1 $, and now $ y_1 m_2, \ldots, y_{n-1}m_n $ are all $ 1 $ mod $ m_1 $, giving us an element $ (y_1 m_2) \ldots (y_{n-1} m_n) $ in $ f^{-1} ((1 \text{ mod } m_1, \ldots, 0 \text{ mod } m_n)) \big]$. This gives an element $ x_0 $ in the solution set.

Also, $ x $ is a solution if and only if $ x-x_0 $ is $ 0 $ modulo each $ m_1, \ldots, m_n $, i.e., if and only if $ x - x_0 $ is in $ m_1 \mathbb{Z} \cap \ldots \cap m_n \mathbb{Z} $. But $ m_1 \mathbb{Z} \cap \ldots \cap m_n \mathbb{Z} = \text{lcm}(m_1, \ldots, m_n) \mathbb{Z} $, which by coprimality is $ m_1 \ldots m_n \mathbb{Z} $. Hence the solution set is $ x_0 + m_1 \ldots m_n \mathbb{Z} $.