Chinese Remainder Theorem (Sunzi, Qin Jiushao)
Statement
Let be pairwise coprime positive integers and let be any integers. Then the system of congruences for every has a solution , and this solution is unique modulo .
Why is it true?
First recorded around the 3rd–5th century in the Sunzi Suanjing ('the unknown number of things') and given a complete general algorithm by Qin Jiushao in 1247 (Da-yan rule), this theorem says that pairwise-coprime moduli carry independent information: knowing a number's remainder mod 3, mod 5, mod 7 pins it down uniquely mod 105, with no information lost or contradictory, because the moduli never 'overlap'.
Proof sketch
Existence, step 1 (build the pieces): for each define , the product of all moduli except . Because the are pairwise coprime, every prime factor of is absent from every (), so . By Bezout's identity (extended Euclidean algorithm) there exists an integer — the modular inverse of mod — with .
Existence, step 2 (assemble the solution): set . Fix any index and reduce this sum mod . For every , the factor contains as one of its factors (since ), so and the term . Only the -th term survives: (using ). Since was arbitrary, satisfies every congruence at once.
Uniqueness mod : suppose is another integer satisfying every . Then for every , i.e. every divides . Because the are pairwise coprime, their least common multiple equals their product , so as well — any common multiple of pairwise-coprime numbers must already be a multiple of their product. Hence : the solution is unique modulo , exactly as claimed.
Toy verification: take with , i.e. the system . Here ; needs , i.e. , so ; needs , so . Then , so . Check: leaves remainder mod , and leaves remainder mod — both congruences hold, confirming the construction.
Topics that use this theorem
Step-by-step proofs
No step-by-step proof yet for this theorem.
References
- Victor J. Katz (2009). A History of Mathematics: An Introduction
- Oliver Knill (2012). A Multivariable Chinese Remainder Theorem · arXiv:1206.5114