Chinese remainder theorem proof

Chinese remainder theorem proof

We first prove the following lemma: if

a

≡

b

(

mod

p

)

a

≡

b

(

mod

q

)

gcd

⁡

(

p

,

q

)

=

1

then

a

≡

b

(

mod

p

⁢

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

,

x

0

,

y

0

∈

ℤ

such that

x

0

⁢

a

+

y

0

⁢

b

=

c

and

d

=

gcd

⁡

(

a

,

b

)

, any

solutions

to the

diophantine equation

a

⁢

x

+

b

⁢

y

=

c

are given by

x

=

x

0

+

b

d

⁢

n

y

=

y

0

+

a

d

⁢

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

(

mod

p

⁢

q

)

, thus completing the lemma.

Now, to prove the

Chinese remainder theorem

, we first show that

y

i

must exist for any natural

i

where

1

≤

i

≤

n

. If

y

i

⁢

P

p

i

≡

1

(

mod

p

i

)

then by definition there exists some

k

∈

ℤ

such that

y

i

⁢

P

p

i

-

1

=

k

⁢

p

i

which in turn implies that

y

i

⁢

P

p

i

-

k

⁢

p

i

=

1

This is a diophantine equation with

y

i

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

P

p

i

is the

product

of each

p

j

(

j

∈

ℕ

,

1

≤

j

≤

n

) except

p

i

, and every

p

j

is relatively prime to

p

i

,

P

p

i

and

p

i

are relatively prime. Therefore, by definition,

gcd

⁡

(

P

p

i

,

p

i

)

=

1

; since

1

divides

1

, there are integers

k

and

y

i

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

a

i

⁢

y

i

⁢

P

p

i

=

(

a

i

⁢

y

i

⁢

P

p

i

⁢

p

j

)

⁢

p

j

so

p

j

divides

a

i

⁢

y

i

⁢

P

p

i

, and we know

a

i

⁢

y

i

⁢

P

p

i

≡

0

(

mod

p

j

)

Now consider the case that

i

=

j

.

y

j

was selected so that

y

j

⁢

P

p

j

≡

1

(

mod

p

j

)

so we know

a

j

⁢

y

j

⁢

P

p

j

≡

a

i

(

mod

p

j

)

So we have a set of

n

congruences

mod

p

j

;

summing

them shows that

∑

i

=

1

n

a

i

⁢

y

i

⁢

P

p

i

≡

a

i

(

mod

p

j

)

Therefore

x

0

satisfies all the congruences.

Suppose we have some

x

≡

x

0

(

mod

P

)

This implies that for some

k

∈

ℤ

,

x

-

x

0

=

k

⁢

P

So, for any

p

i

, we know that

x

-

x

0

=

(

k

⁢

P

p

i

)

⁢

p

i

so

x

≡

x

0

(

mod

p

i

)

. Since congruence is

transitive

,

x

must in turn satisfy all the original congruences.

Likewise, suppose we have some

x

that satisfies all the original congruences. Then, for any

p

i

, we know that

x

≡

a

i

(

mod

p

i

)

and since

x

0

≡

a

i

(

mod

p

i

)

the transitive and

symmetric

properties of congruence imply that

x

≡

x

0

(

mod

p

i

)

for all

p

i

. So, by our lemma, we know that

x

≡

x

0

(

mod

p

1

⁢

p

2

⁢

…

⁢

p

n

)

or

x

≡

x

0

(

mod

P

)

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

Generated on Fri Feb 9 15:32:29 2018 by

LaTeXML