Chinese Remainder Theorem

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

Let $$r \perp s$$ (i.e. let $$r$$ and $$s$$ be coprime).

Then:
 * $$a \equiv b \left({\bmod\, rs}\right)$$ iff $$a \equiv b \left({\bmod\, r}\right)$$ and $$a \equiv b \left({\bmod\, s}\right)$$

where $$a \equiv b \left({\bmod\, r}\right)$$ denotes that $$a$$ is congruent modulo $r$ to $$b$$.

Proof
Suppose $$a \equiv b \left({\bmod\, rs}\right)$$.

Then from Congruence by Divisor of Modulus it follows directly that $$a \equiv b \left({\bmod\, r}\right)$$ and $$a \equiv b \left({\bmod\, s}\right)$$.

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

Now suppose that $$a \equiv b \left({\bmod\, r}\right)$$ and $$a \equiv b \left({\bmod\, s}\right)$$.

We have $$a \equiv b \left({\bmod\, r}\right) \implies \exists k \in \Z: a - b = kr$$ by definition of congruence.

We also have that $$k r \equiv 0 \left({\bmod\, s}\right)$$ because $$a \equiv b \left({\bmod\, s}\right)$$.

As $$r \perp s$$, we have from Common Factor Cancelling in Congruence that $$k \equiv 0 \left({\bmod\, s}\right)$$.

So $$\exists q \in \Z: a - b = qsr$$.

Hence by definition of congruence $$a \equiv b \left({\bmod\, rs}\right)$$.