Corollary 1: If n1, n2, …,
nk are pair-wise relatively prime and n = n1 x n2 x ......x nk then for all integer x and a
x ≡ a (mod ni)
for i = 1, 2, …, k if and only if
x ≡ a (mod n).
Proof: For the if part of the proof we assume x ≡ a (mod n) and hence (x-a) = kn for some integer k. Thus ni | (x-a) since n = n1 x n2 x ......x nk.
To prove the only if part we assume x ≡ a (mod ni) for all i = 1, 2, …, k. We prove this part by induction on k.
Basis: When k = 2 we have x ≡ a (mod n1) and x ≡ a ( mod n2 ). We have to prove x ≡ a (mod n1n2). From the given congruence we can infer there exists integers k1 and k2 such that ( x-a ) = k1n2 = k2n2. Since n1 and n2 are relatively prime we have integers l and m such that ln1 + mn2 = 1. Multiplying both sides by (x-a ) we have lk 2n 2n 1 + m k 1n 1n2 = (x-a) and hence (x-a) = k3n1n 2 where k3 is an integer.
Inductive Hypothesis: Assume the hypothesis
holds for pair-wise relatively prime integers n1, n2, …, nk-1.
Induction step: We have to show the corollary holds for
pair-wise relatively prime integers n1, n2, …,
nk. Let n'= n1 x n2 x… x nk-1.
We know that n' and nk are relatively prime and x ≡ a (mod
n') and x ≡ a (mod nk). Following similar argument used
for the proof of the basis we can show x ≡ a ( mod n'nk ). We also know that n = n1x n2 x… x nk and
thus n = n' x nk. Hence we have proved that x ≡ a (mod
n).![]()
Reference:
1. Introduction to Algorithms , Second Edition, T. H. Cormen, C. E. Leiserson, R. Rivest and C. Stein, Prentice Hall India .
2. Introduction to Analytic Number Theory , T. M. Apostol, Springer International .