Chinese Remainder Theorem

Theorem
Let $a, b, r, s \in \Z$.

Let $r \perp s$ (that is, let $r$ and $s$ be coprime).

Then:
 * $a \equiv b \pmod {r s}$ $a \equiv b \pmod r$ and $a \equiv b \pmod s$

where $a \equiv b \pmod r$ denotes that $a$ is congruent modulo $r$ to $b$.

Necessary Condition
Suppose $a \equiv b \pmod {r s}$.

Then from Congruence by Divisor of Modulus it follows directly that:
 * $a \equiv b \pmod r$

and:
 * $a \equiv b \pmod s$

Note that for this result it is not required that $r \perp s$.

Sufficient Condition
Now suppose that $a \equiv b \pmod r$ and $a \equiv b \pmod s$.

We have by definition of congruence:
 * $a \equiv b \pmod r \implies \exists k \in \Z: a - b = k r$

From $a \equiv b \pmod s$ we also have that:
 * $k r \equiv 0 \pmod s$

As $r \perp s$, we have from Common Factor Cancelling in Congruence:
 * $k \equiv 0 \pmod s$

So:
 * $\exists q \in \Z: a - b = q s r$

Hence by definition of congruence:
 * $a \equiv b \pmod {r s}$