Lemma 1
If a1,a2,...al are all relatively prime to m, then so is a1a2a3...al.
Proof: aˉ1aˉ2aˉ3...aˉl=a1a2a3...al So (a1a2a3...al,m)=1
Lemma 2
If a1,a2,a3,...al divides n and (ai,aj)=1. Then a1a2a3...al divides n.
Proof:
For l=1, a1∣n.
Suppose that a1,a2,...al−1 divides n and (ai,aj)=1. Then a1a2...at−1 divides n.
For al relatively prime to all a1,a2,...al−1. pal+qa1a2...al−1=1 Obviously left side divides n.
Chinese Remainder Theorem
Suppose m=m1m2m3...mt and that (mi,mj)=1.
Consider system: x=b1(m1),x=b2(m2),...,x=bt(mt) This system always has solutions and any two solutions differ by a multiple of m.
Proof:
Let ni=m/mi, we already know (mi,ni)=1. That is rimi+sini=1.
So we have sini≡1(mi) and then bisini≡bi(mi).
That indicate x0=∑bisini is one of the solutions.
Suppose another solution x1−x0≡0(mi), x1 is another solution. We have all mi∣(x1−x0). So other solutions differ by m.
Isomorphism
Define
For rings R1,R2,R3,...,Rn. Define the direct sum R1⨁R2⨁R3...⨁Rn=S={r1,r2,r3,...rn}={ri}. The addition is {ri}+{ri′}=ri+ri′. The multiplication is {ri}⋅{ri′}=riri′. The zero is {0} and identity is {1}. For u∈S is a unit iff there is a v∈S such that uv=1. That is uivi=1. Then we can consider a group of units ∏U(Ri)
Proposition 1
If S=R1⨁R2⨁R3...⨁Rn, then U(S)=U(R1)U(R2)...U(Rn).
Assume m1,m2,...,mt are all relatively prime. ψi is the homomorphism from Z to Z/miZ. ψ(n)={ψ1(n),ψ2(n),...,ψt(n)} By CRT, there always exist a n that ψi(n)=bˉi which is n≡bi(mi). So ψ is onto.
So the kernel is ker(ψi)=miZ.
Therefore, we shown that ψ allows isomorphism between Z/mZ and ⨁i=1tZ/miZ.
By definition, a unit in Z/mZ will be relatively prime with any mi. And let xi be the unit of Z/miZ we get x={x1,x2,...,xt}. U(Z/mZ)≅U(Z/m1Z)×U(Z/m2Z)×U(Z/m3Z)...U(Z/mtZ) From the isomorphism, we can see the order of left side is ϕ(m) and the order of right side is ∏ϕ(mi).
Let m=∏ipiai, we have ϕ(m)=∏iϕ(piai).
Considering pa is relatively prime to any number except some multiple of p, so there are pa−1 number are multiple of p. That is ϕ(pa)=pa−pa−1=pa(1−1/p).
Therefore ϕ(m)=mi∏(1−1/pi) In the end, we have two isomorphism: Z/mZ≅i=1⨁tZ/piaiZ
U(Z/mZ)≅i=1∏tU(Z/piaiZ)