Chinese Remainder Theorem

Theorem (Chinese remainder theorem)

Suppose that m1,,mkm_{1},\dots,m_{k} are mutually coprime integers and a1,,aka_{1},\dots,a_{k} are prescribed integers. Then, the system of congruences xa1(modm1)xak(modmk)\begin{align*} x&\equiv a_{1}\pmod{m_{1}}\\ &\vdots\\ x&\equiv a_{k}\pmod{m_{k}} \end{align*}has a unique solution(modM)\pmod{M} where M=m1mkM=m_{1}\dots m_{k}.

Definition (Least common multiple)

Let a,bZa,b\in \mathbb{Z}. The least common multiple is the smallest positive integer divisible by both aa and bb. It is commonly denoted as lcm(a,b)lcm(a,b) or [a,b][a,b].

Theorem (Generalized Chinese Remainder Theorem)

Suppose that m1,,mkm_{1},\dots,m_{k} are integers and a1,,aka_{1},\dots,a_{k} are prescribed integers. Then, the system of congruences xa1(modm1)xak(modmk)\begin{align*} x&\equiv a_{1}\pmod{m_{1}}\\ &\vdots\\ x&\equiv a_{k}\pmod{m_{k}} \end{align*}has a unique solution(modM)\pmod{M} where MM is the M=lcm(m1,,mk)M=lcm(m_{1},\dots ,m_{k})if and only if gcd(mi,mj)aiaj,ijgcd(m_{i},m_{j})|a_{i}-a_{j},\forall i\not=j.

Cor

If m1,,mkm_{1},\dots,m_{k} are mutually coprime, then Z/mZZ/m1ZZ/mkZ\mathbb{Z}/m\mathbb{Z}\cong\mathbb{Z}/m_{1}\mathbb{Z}\oplus\dots \oplus \mathbb{Z}/m_{k}\mathbb{Z}and (Z/mZ)(Z/m1Z)(Z/mkZ)(\mathbb{Z}/m\mathbb{Z})^*\cong(\mathbb{Z}/m_{1}\mathbb{Z})^{*}\otimes \dots \otimes (\mathbb{Z}/m_{k}\mathbb{Z})^{*}