
systems of congruences
Hello. I am completely stumped by this problem:
x = a1 (mod m1)
x = a2 (mod m2)
...
x = an (mod mn)
Let mj be arbitrary positive integers. Show that there is a simultaneous solution of this system if and only if ai= aj (mod(mi, mj)) for all pairs of the indices i,j for which 1 <= i < j <= r
Thanks for the help.

What do you mean by "mod(mi,mj)"?

I mean the greatest common divisor of mi and mj as the modulo. mi is $\displaystyle m_{i}$ and mj is $\displaystyle m_{j}$

This in the commonly known Chinese Remainder Theorem.
Use Google to get some explanations.
There are proofs available on the internet.