Theorem 5.4.2.1. Chinese Remainder Theorem.
Let \(m = m_1 m_2 \cdots m_r\) with \(\gcd(m_i,m_j) = 1\) for all \(i \neq j\text{.}\) Then the system
\begin{equation*}
\left\{
{\begin{array}{l}
x \equiv a_1 \pmod {m_1}\\
x \equiv a_2 \pmod{m_2}\\
\quad \vdots\\
x \equiv a_r \pmod{m_r}\\
\end{array}}
\right\}
\end{equation*}
has a unique solution modulo \(m\text{,}\) given by
\begin{equation*}
x =a_1e_1 + a_2 e_2+\cdots +a_r e_r, \quad \text{where } e_i = w_i\cdot t_i,
\end{equation*}
with
\begin{equation*}
w_i=\frac{m}{m_i}\quad \text{and} \quad
t_iw_i \equiv 1 \pmod{m_i}.
\end{equation*}
In other words, the solution set is exactly the congruence class of \(x\) modulo \(m\text{,}\)
\begin{equation*}
[x] = \set{x + km \mid k \in \ZZ}.
\end{equation*}
