Chinese remainder theorem (existence and uniqueness)
Statement
If are pairwise coprime (), then for any integers the system has a solution , and any two solutions are congruent modulo .
Why is it true?
Because the moduli share no prime factors, the condition of leaving remainder modulo and the condition of leaving remainder modulo are completely independent constraints — like specifying an object's -coordinate and -coordinate separately. Bézout's identity gives us "basis vectors" that are modulo one modulus and modulo all the others, letting us build a solution directly as a linear combination.
Proof sketch
We first prove the two-modulus case () and then extend by induction. Since , Bézout's identity gives integers with . Set .
Check modulo : from we have , while , so .
Symmetrically, modulo : and , so . This proves existence for .
For uniqueness when : if and both solve the system, then and , i.e. both and divide . Multiply the Bézout equation by : . Since , the first term is a multiple of ; since , the second term is also a multiple of . Hence , i.e. .
For general , induction: the first two congruences are equivalent (by the case) to a single congruence modulo ; since is coprime to both and , it is coprime to their product , so we can combine again, and so on up to . Notice also that the explicit sum works directly for any by the exact same reasoning: is coprime to so its inverse exists, and every term contains as a factor of .
Topics that use this theorem
Step-by-step proofs
No step-by-step proof yet for this theorem.
References
- Jean-Jacques Quisquater, Christophe Couvreur (1982). Fast decipherment algorithm for RSA public-key cryptosystem · DOI:10.1049/el:19820617
- David Harvey, Joris van der Hoeven (2021). Integer multiplication in time O(n log n) · DOI:10.4007/annals.2021.193.2.4