ProofComplete

Congruences - Key Proof

We present detailed proofs of Euler's Theorem and the Chinese Remainder Theorem, two fundamental results that underpin much of modern computational number theory and cryptography.

ProofEuler's Theorem

Let nn be a positive integer and aa an integer with gcd(a,n)=1\gcd(a, n) = 1. We prove that aϕ(n)1(modn)a^{\phi(n)} \equiv 1 \pmod{n}.

Let r1,r2,,rϕ(n)r_1, r_2, \ldots, r_{\phi(n)} be the integers in {1,2,,n}\{1, 2, \ldots, n\} that are coprime to nn. These form a reduced residue system modulo nn.

Claim: The set {ar1,ar2,,arϕ(n)}\{ar_1, ar_2, \ldots, ar_{\phi(n)}\} is also a reduced residue system modulo nn.

Proof of claim:

  • Each ariar_i is coprime to nn since gcd(a,n)=gcd(ri,n)=1\gcd(a, n) = \gcd(r_i, n) = 1.
  • The products are distinct modulo nn: if ariarj(modn)ar_i \equiv ar_j \pmod{n}, then since gcd(a,n)=1\gcd(a, n) = 1, we can cancel to get rirj(modn)r_i \equiv r_j \pmod{n}, so i=ji = j.
  • There are ϕ(n)\phi(n) elements, so they form a complete reduced residue system.

Therefore, the multisets {r1,r2,,rϕ(n)}\{r_1, r_2, \ldots, r_{\phi(n)}\} and {ar1,ar2,,arϕ(n)}\{ar_1, ar_2, \ldots, ar_{\phi(n)}\} are the same modulo nn.

Taking the product of all elements: ar1ar2arϕ(n)r1r2rϕ(n)(modn)ar_1 \cdot ar_2 \cdots ar_{\phi(n)} \equiv r_1 \cdot r_2 \cdots r_{\phi(n)} \pmod{n}

This simplifies to: aϕ(n)(r1r2rϕ(n))r1r2rϕ(n)(modn)a^{\phi(n)} (r_1 r_2 \cdots r_{\phi(n)}) \equiv r_1 r_2 \cdots r_{\phi(n)} \pmod{n}

Let R=r1r2rϕ(n)R = r_1 r_2 \cdots r_{\phi(n)}. Since each rir_i is coprime to nn, their product RR is also coprime to nn. Therefore, we can cancel RR from both sides: aϕ(n)1(modn)a^{\phi(n)} \equiv 1 \pmod{n}

This completes the proof.

Remark

This proof technique, using the fact that multiplication by a unit permutes the reduced residue system, is extremely powerful and appears in many contexts throughout algebra and number theory. The same idea proves Lagrange's theorem in group theory.

ProofChinese Remainder Theorem (Existence)

Let n1,n2,,nkn_1, n_2, \ldots, n_k be pairwise coprime positive integers, and let a1,a2,,aka_1, a_2, \ldots, a_k be any integers. We prove that the system: xai(modni),i=1,2,,kx \equiv a_i \pmod{n_i}, \quad i = 1, 2, \ldots, k has a solution.

Let N=n1n2nkN = n_1 n_2 \cdots n_k and define Ni=N/niN_i = N/n_i for each ii.

Key observation: Since the moduli are pairwise coprime, gcd(Ni,ni)=1\gcd(N_i, n_i) = 1 for each ii.

By Bézout's identity, there exists an integer MiM_i such that: NiMi1(modni)N_i M_i \equiv 1 \pmod{n_i}

Now consider: x=a1N1M1+a2N2M2++akNkMkx = a_1 N_1 M_1 + a_2 N_2 M_2 + \cdots + a_k N_k M_k

For any j{1,2,,k}j \in \{1, 2, \ldots, k\}, we have njNin_j \mid N_i for all iji \neq j (since NiN_i is a multiple of all nn_\ell except nin_i, and when iji \neq j, this includes njn_j).

Therefore: xajNjMjaj1aj(modnj)x \equiv a_j N_j M_j \equiv a_j \cdot 1 \equiv a_j \pmod{n_j}

This shows that xx satisfies all the congruences simultaneously.

Uniqueness: Suppose xx and yy are both solutions. Then xy(modni)x \equiv y \pmod{n_i} for all ii, which means ni(xy)n_i \mid (x - y) for all ii.

Since the nin_i are pairwise coprime, we have: N=n1n2nk(xy)N = n_1 n_2 \cdots n_k \mid (x - y)

Therefore, xy(modN)x \equiv y \pmod{N}, proving uniqueness modulo NN.

ExampleCRT Construction

The proof is constructive. For the system: x2(mod3),x3(mod4),x1(mod5)x \equiv 2 \pmod{3}, \quad x \equiv 3 \pmod{4}, \quad x \equiv 1 \pmod{5}

We have N=60N = 60, N1=20N_1 = 20, N2=15N_2 = 15, N3=12N_3 = 12.

Finding inverses: 2021(mod3)20 \cdot 2 \equiv 1 \pmod{3}, 1531(mod4)15 \cdot 3 \equiv 1 \pmod{4}, 1231(mod5)12 \cdot 3 \equiv 1 \pmod{5}.

Solution: x=2202+3153+1123=80+135+36=25111(mod60)x = 2 \cdot 20 \cdot 2 + 3 \cdot 15 \cdot 3 + 1 \cdot 12 \cdot 3 = 80 + 135 + 36 = 251 \equiv 11 \pmod{60}

These proofs reveal the elegant algebraic structure underlying modular arithmetic and continue to inspire new developments in computational mathematics.