Chinese remainder theorem proof


We first prove the following lemma: if

a≡b(modp)
a≡b(modq)
gcd⁡(p,q)=1

then

a≡b(modp⁢q)

We know that for some k∈ℤ, a-b=k⁢p; likewise, for some j∈ℤ, a-b=j⁢q, so k⁢p=j⁢q. Therefore k⁢p-j⁢q=0.

It is a well-known theorem that, given a,b,c,x0,y0∈ℤ such that x0⁢a+y0⁢b=c and d=gcd⁡(a,b), any solutions to the diophantine equationMathworldPlanetmath a⁢x+b⁢y=c are given by

x=x0+bd⁢n
y=y0+ad⁢n

where n∈ℤ.

We apply this theorem to the diophantine equation k⁢p-j⁢q=0. Clearly one solution of this diophantine equation is k=0,j=0. Since gcd⁡(q,p)=1, all solutions of this equation are given by k=n⁢q and j=n⁢p for any n∈ℤ. So we have a-b=n⁢p⁢q; therefore p⁢q divides a-b, so a≡b(modp⁢q), thus completing the lemma.

Now, to prove the Chinese remainder theoremMathworldPlanetmathPlanetmathPlanetmath, we first show that yi must exist for any natural i where 1≤i≤n. If

yi⁢Ppi≡1(modpi)

then by definition there exists some k∈ℤ such that

yi⁢Ppi-1=k⁢pi

which in turn implies that

yi⁢Ppi-k⁢pi=1

This is a diophantine equation with yi and k being the unknown integers. It is a well-known theorem that a diophantine equation of the form

a⁢x+b⁢y=c

has solutions for x and y if and only if gcd⁡(a,b) divides c. Since Ppi is the productPlanetmathPlanetmath of each pj (j∈ℕ, 1≤j≤n) except pi, and every pj is relatively prime to pi, Ppi and pi are relatively prime. Therefore, by definition, gcd⁡(Ppi,pi)=1; since 1 divides 1, there are integers k and yi that satisfy the above equation.

Consider some j∈ℕ, 1≤j≤n. For any i∈ℕ, 1≤i≤n, either i≠j or i=j. If i≠j, then

ai⁢yi⁢Ppi=(ai⁢yi⁢Ppi⁢pj)⁢pj

so pj divides ai⁢yi⁢Ppi, and we know

ai⁢yi⁢Ppi≡0(modpj)

Now consider the case that i=j. yj was selected so that

yj⁢Ppj≡1(modpj)

so we know

aj⁢yj⁢Ppj≡ai(modpj)

So we have a set of n congruencesMathworldPlanetmathPlanetmathPlanetmathPlanetmath modpj; summing them shows that

∑i=1nai⁢yi⁢Ppi≡ai(modpj)

Therefore x0 satisfies all the congruences.

Suppose we have some

x≡x0(modP)

This implies that for some k∈ℤ,

x-x0=k⁢P

So, for any pi, we know that

x-x0=(k⁢Ppi)⁢pi

so x≡x0(modpi). Since congruence is transitiveMathworldPlanetmathPlanetmathPlanetmathPlanetmathPlanetmath, x must in turn satisfy all the original congruences.

Likewise, suppose we have some x that satisfies all the original congruences. Then, for any pi, we know that

x≡ai(modpi)

and since

x0≡ai(modpi)

the transitive and symmetric properties of congruence imply that

x≡x0(modpi)

for all pi. So, by our lemma, we know that

x≡x0(modp1⁢p2⁢…⁢pn)

or

x≡x0(modP)
Title Chinese remainder theorem proof
Canonical name ChineseRemainderTheoremProof
Date of creation 2013-03-22 11:59:11
Last modified on 2013-03-22 11:59:11
Owner vampyr (22)
Last modified by vampyr (22)
Numerical id 7
Author vampyr (22)
Entry type Proof
Classification msc 11D79