21.01.03 · number-theory / elementary

Congruences, the Chinese remainder theorem, and the ring structure of ℤ/nℤ

shipped3 tiersLean: none

Anchor (Master): Sun Zi c. 4th-5th c. CE *Sunzi Suanjing* (originator example); Qin Jiushao 1247 *Mathematical Treatise in Nine Sections* (Da Yan procedure); Gauss 1801 *Disquisitiones Arithmeticae* arts. 1-37, 49-89 (canonical modern formulation); Hardy-Wright 2008 *An Introduction to the Theory of Numbers* 6e §§V-VI; Lang 2002 *Algebra* (Springer GTM 211, 3e) Ch. II §2; Niven-Zuckerman-Montgomery 1991 *An Introduction to the Theory of Numbers* 5e §2; Shamir 1979 *CACM* 22 (secret sharing); Schönhage-Strassen 1971 *Computing* 7 (CRT-based fast integer multiplication)

Intuition Beginner

A congruence is an equation that ignores multiples of a fixed number. Two whole numbers and are congruent modulo when they leave the same remainder upon division by . The notation, due to Gauss in 1801, is . Examples: , because and both leave remainder when divided by ; , because both are even.

Clock arithmetic is the everyday picture. A -hour clock identifies with , with , and so on. Adding hours to o'clock gives o'clock, because . The seven-day week is the same idea modulo : a hundred days from Wednesday is Friday, because and Wednesday plus two is Friday. Every cyclic phenomenon — clocks, calendars, musical octaves, the angles in a circle — is congruence in disguise.

The set of residue classes modulo is written and consists of elements: . The bracket means "the class of all whole numbers that leave this remainder". The class modulo collects — every number that lands on the position when you walk around a -hour clock. Addition and multiplication of these classes are defined by picking any representatives, doing the operation, and reducing modulo . The result does not depend on which representatives you chose.

The Chinese remainder theorem is the surprise of the subject. Suppose you want a number that leaves remainder when divided by and remainder when divided by . The answer is , and every other answer differs from by a multiple of . The theorem says that whenever two moduli have no common factor, simultaneous congruences with those moduli always have a unique solution modulo their product. This generalises to any number of pairwise-coprime moduli.

Modular arithmetic is the workhorse behind familiar systems. ISBN-10 book numbers use a checksum modulo to detect typos: the ten digits satisfy , and a single-digit error or any swap of two adjacent digits breaks the congruence. Credit card numbers use the Luhn algorithm modulo . RSA encryption computes powers modulo a large product of two primes — every secure web connection you make routes through the arithmetic of for with hundreds of digits.

Visual Beginner

A picture of two circular clocks side by side. The left clock has positions and shows arrows labelling , , , illustrating the wrap-around when you walk past .

The right clock has positions, with one arrow at position . Below it, two smaller clocks of size and both point to the same image of : the size- clock has at position (since ), and the size- clock has at position (since ). An arrow connects the pair of small clocks to the big size- clock, illustrating the Chinese remainder correspondence: a position on the -clock is a position on the -clock paired with a position on the -clock.

The picture captures the central fact of the subject. A clock of size is a circular world in which numbers wrap around. When with and coprime, the clock of size splits into a pair: a clock of size and a clock of size . Specifying a position on the big clock is the same as specifying a pair of positions on the two smaller clocks. The Chinese remainder theorem is the rigorous statement of this splitting.

Worked example Beginner

Find a whole number such that and . State the answer as a single residue modulo .

Step 1. List the numbers satisfying between and : these are .

Step 2. List the numbers satisfying between and : these are .

Step 3. The intersection is . So is one solution, and every solution differs from by a multiple of . The full solution set is .

Step 4. Check: , so . And , so . Both conditions are satisfied.

What this tells us: when the two moduli and have no common factor, the pair of congruences pins down a unique residue modulo the product . The same construction extends to any number of pairwise-coprime moduli — five conditions modulo specify a unique residue modulo .

Check your understanding Beginner

Formal definition Intermediate+

The notion of congruence, the ring , its group of units, and the Chinese remainder theorem admit clean definitions on the foundation laid by 21.01.01 (Bézout, gcd) and 21.01.02 (primes, the fundamental theorem).

Definition (congruence). For integers and a positive integer , we say is congruent to modulo , written , if . Equivalently, and have the same remainder upon division by .

The relation is an equivalence relation: reflexive (), symmetric ( iff ), transitive ( and imply since ). It is compatible with and : if and , then and .

Definition (residue classes; the ring ). The residue class of modulo is . The set of residue classes is $$ \mathbb{Z}/n\mathbb{Z} ;=; { [0]_n, [1]_n, \ldots, [n-1]_n }, $$ a set of cardinality . Addition and multiplication on residue classes are defined by and ; the compatibility of congruence with and shows these definitions are independent of choice of representative. The resulting structure is a commutative ring with identity, the ring of integers modulo .

Definition (group of units ). The group of units of is $$ (\mathbb{Z}/n\mathbb{Z})^\times ;=; { [a]_n : \exists , [b]_n \text{ with } [a]_n \cdot [b]_n = [1]_n }. $$ By Bézout (proved in 21.01.01), has a multiplicative inverse modulo if and only if . The order of the group of units is the Euler totient . The first values are , , , , , , for prime, and for a prime power.

Definition (field; as a field iff is prime). is a field if and only if is prime. The forward direction: if with , then , so has zero-divisors and is not an integral domain. The reverse: if is prime, then for every , so every nonzero element is a unit, and is a field. We write for this field.

Counterexamples to common slips

  • " is the same as ." The class is an infinite set, namely . The classes and are equal because they have the same set of representatives, even though as integers. Pedagogically, write when emphasising the class and when emphasising the representative.

  • "You can always cancel: implies ." False unless . Example: (both sides ), but . The correct cancellation rule: implies .

  • "Fermat's little theorem holds for every ." It holds for every coprime to , equivalently for every nonzero residue class. The case gives . The unrestricted version is Fermat's little theorem in the form , which covers .

Key theorem with proof Intermediate+

The signature theorem of this unit is the Chinese remainder theorem in its modern form: a ring isomorphism when . We prove the two-modulus case in full; the multi-modulus generalisation follows by induction.

Theorem (Chinese remainder theorem, two-modulus form). Let be positive integers with , and set . The map $$ \Phi : \mathbb{Z}/n\mathbb{Z} ;\longrightarrow; \mathbb{Z}/n_1\mathbb{Z} \times \mathbb{Z}/n_2\mathbb{Z}, \qquad [x]n \longmapsto ([x]{n_1}, [x]_{n_2}), $$ is a ring isomorphism. In particular, for any pair , the simultaneous congruence system $$ x \equiv a_1 \pmod{n_1}, \qquad x \equiv a_2 \pmod{n_2} $$ admits a unique solution modulo .

Proof. is well-defined. If , then , hence and ; so and .

is a ring homomorphism. Both addition and multiplication of residue classes are defined pointwise on representatives, and reduction modulo is itself a ring homomorphism . The map is the product of the two reductions composed with the canonical surjection , hence a ring homomorphism.

is injective. Suppose . Then and . Since , we have (a consequence of unique factorisation from 21.01.02, or directly from Bézout: choose with , multiply , and use and ). Hence , so the kernel is the identity element.

is surjective. Given , we explicitly construct an integer with . By Bézout, since , there exist integers with $$ u n_2 + v n_1 = 1. $$ Set and . Then , , , . (The pair is the CRT idempotent decomposition of .) The integer $$ x = a_1 e_1 + a_2 e_2 = a_1 u n_2 + a_2 v n_1 $$ satisfies and . Hence .

Since is an injective ring homomorphism between two finite sets of the same cardinality , it is also surjective and hence bijective.

Bridge. The CRT builds toward 01.02.06 commutative rings and ideals, where the proof above reappears as "if , then ". The central insight is exactly that coprimality of moduli is the operational content of — the ideal-theoretic encoding of "the moduli share no common factor". This is the bridge from elementary modular arithmetic to the ring-theoretic decomposition principles of 01.02.07 (Noether's first isomorphism theorem applied to the diagonal map). The pattern generalises to localisation (an isomorphism for finite collections of maximal ideals), identifies the idempotent decomposition with the structure of a product ring, and appears again in 01.02.18 pending the construction of as for irreducible. Putting these together, the CRT is the proto-localisation theorem: it splits the global ring into independent factors at each prime power dividing .

Exercises Intermediate+

Lean formalization Intermediate+

Mathlib provides essentially all the operational machinery used in this unit. The Lean module Codex.NumberTheory.Elementary.CongruencesCRT packages the unit's load-bearing identifications alongside the standard Mathlib API.

-- Operative imports: Mathlib.Data.ZMod.Basic, Mathlib.Data.ZMod.Quotient,
-- Mathlib.NumberTheory.Padics, Mathlib.Data.Nat.Totient,
-- Mathlib.RingTheory.Ideal.QuotientOperations, Mathlib.NumberTheory.ZMod.Basic

#check @ZMod                       -- ZMod : ℕ → Type, the ring ℤ/nℤ
#check @ZMod.chineseRemainder      -- (m n : ℕ) [Coprime m n] : ZMod (m * n) ≃+* ZMod m × ZMod n
#check @Nat.totient                 -- Nat.totient : ℕ → ℕ, the Euler totient
#check @Nat.totient_mul             -- ∀ {m n : ℕ}, m.Coprime n → (m * n).totient = m.totient * n.totient

#check @ZMod.unitsEquivCoprime
-- ZMod.unitsEquivCoprime : (ZMod n)ˣ ≃ {x : ZMod n // IsCoprime x n}

#check @Ideal.quotientInfRingEquivPiQuotient
-- The general commutative-ring CRT: pairwise coprime ideals I_i with intersection J satisfy
-- R/J ≃+* Π i, R/I_i

#check @ZMod.pow_card_sub_one_eq_one
-- Fermat's little theorem: (a : ZMod p)^(p - 1) = 1 when p is prime and a ≠ 0

The CRT isomorphism ZMod.chineseRemainder is the operational form of the Key Theorem above; its inductive multi-modulus generalisation is ZMod.chineseRemainderRing (or assembled by hand from the two-modulus form). Fermat's little theorem is ZMod.pow_card_sub_one_eq_one; Wilson's theorem is ZMod.wilsons_lemma; the totient multiplicativity is Nat.totient_mul. What Mathlib does not yet supply as a unified module — the prime-power structure of , the Carmichael function with its prime-power formula, the CRT-based RSA decryption, and the Schönhage-Strassen NTT modular rings — is documented in the unit metadata Mathlib gap analysis.

Advanced results Master

Theorem 1 (general CRT for commutative rings; Lang 2002 Ch. II §2). Let be a commutative ring with identity and let be pairwise coprime ideals of — that is, for every . Then the canonical map $$ R ;\longrightarrow; \prod_{i=1}^k R/I_i, \qquad r \mapsto (r + I_1, \ldots, r + I_k), $$ has kernel , and induces a ring isomorphism $$ R \big/ (I_1 \cap \cdots \cap I_k) ;\xrightarrow{\sim}; \prod_{i=1}^k R/I_i. $$ [Lang 2002]. The integer case is the special case , with ; the intersection becomes the principal ideal by unique factorisation. The polynomial-ring case , with distinct gives Lagrange interpolation: a polynomial of degree is determined by its values at distinct points. The general statement clarifies that CRT is the categorical content of "coprime decomposition" in any commutative ring, not a phenomenon special to .

Theorem 2 (Euler totient and the multiplicativity formula; Gauss 1801 art. 38). The Euler totient is multiplicative: for . The closed form is [Gauss 1801]. The multiplicativity is the unit-group statement of the CRT isomorphism . The closed form is the prime-power formula assembled via multiplicativity. Dirichlet 1849 gave the average value , with the constant identified as — a first hint of the analytic-number-theoretic content of . The Möbius-inversion identity is equivalent to the partition of into orbits of cyclic subgroups, each of size for some .

Theorem 3 (Fermat-Euler theorem; Fermat 1640, Euler 1736). For , . Specialised to prime: (Fermat 1640, in correspondence with Frénicle de Bessy); equivalently for all [Gauss 1801]. The proof is Lagrange's theorem applied to the cyclic group : the order of any element divides the order . Fermat 1640 stated only the prime case; Euler 1736 generalised to arbitrary via the totient. The contrapositive (a composite-detector): if there exists coprime to with , then is composite — this is the Fermat primality test, with the Carmichael numbers ( composite but for every coprime to ) the well-known false negatives.

Theorem 4 (structure of ; Gauss 1801 arts. 49-89). Let with distinct odd primes. Then $$ (\mathbb{Z}/n\mathbb{Z})^\times ;\cong; (\mathbb{Z}/2^{e_0})^\times \times \prod_{i=1}^r (\mathbb{Z}/p_i^{e_i})^\times, $$ where is cyclic of order for odd, is the identity group of order , , and for [Gauss 1801]. Gauss 1801 Disquisitiones Arithmeticae arts. 49-89 contains the complete structural development, including the existence of primitive roots modulo odd prime powers and the explicit lifting argument for a primitive root of chosen so . The Carmichael function , the exponent of , equals ; thus with equality iff is cyclic, namely when for an odd prime. Carmichael 1910 Bull. AMS 16 introduced in the form usable for cryptographic key-strength estimates [Carmichael 1910].

Theorem 5 (Quadratic reciprocity via the CRT decomposition; Gauss 1801 art. 130). For distinct odd primes , the Legendre symbols satisfy $$ \left(\frac{p}{q}\right) \left(\frac{q}{p}\right) = (-1)^{\frac{(p-1)(q-1)}{4}}. $$ Gauss 1801 §IV gave eight different proofs over his career; the modern proofs (e.g., via Gauss sums, via the splitting of cyclotomic fields, via the Chebotarev density theorem) all rest on the CRT identification and the quadratic-residue behaviour in each factor. Hilbert 1897 Bericht über die Theorie der algebraischen Zahlkörper lifted the reciprocity law into a statement about Hilbert symbols and quadratic forms; Artin 1927 Hamburg Abh. 5, 353 stated the general Artin reciprocity law, of which quadratic reciprocity is the specialisation. Quadratic reciprocity is the foundation of the genus theory of quadratic forms and the prototype of class-field theory.

Theorem 6 (CRT-based RSA decryption; Rivest-Shamir-Adleman 1978 + standard speedup). For RSA decryption with modulus , exponent , and ciphertext , the decryption can be computed approximately 4 times faster by parallel computation modulo and modulo followed by CRT recombination. The algorithm: set and (per Fermat's little theorem); compute and in parallel; recombine via the CRT inverse for the pair : , with the precomputed modular inverse modulo . Each of and involves operands half the bit-size of , so the squaring cost drops by roughly . PKCS#1 v2.2 (RFC 8017) specifies this CRT-form as the canonical RSA decryption routine; essentially every TLS handshake uses it.

Theorem 7 (Schönhage-Strassen integer multiplication via CRT-NTT; 1971 Computing 7). Two -bit integers can be multiplied in operations via the number-theoretic transform (NTT) over the ring with [Schönhage-Strassen 1971]. The algorithm: split each operand into chunks, view as polynomial; compute the product modulo via an FFT in the cyclotomic ring ; recover the product via CRT in . The choice of Fermat-prime-like moduli makes the -th root of unity an integer power of , so multiplication by it is a bit-shift. Schönhage-Strassen held the asymptotic record until Furer 2007 (and the recent Harvey-van der Hoeven 2021 Annals of Mathematics 193 at ); all are CRT-NTT-based.

Theorem 8 (Shamir-Asmuth-Bloom CRT secret sharing; Shamir 1979, Asmuth-Bloom 1983). A secret can be split into shares such that any shares reconstruct but any shares reveal nothing. Shamir 1979 CACM 22 used polynomial interpolation over ; the dual CRT-based scheme of Asmuth-Bloom 1983 IEEE Trans. Inform. Theory IT-29 uses pairwise-coprime moduli [Shamir 1979]. The Asmuth-Bloom construction: choose pairwise-coprime with the product of the smallest exceeding the product of the largest times ; the -th share is ; reconstruction from any shares uses the multi-modulus CRT. Used in distributed-key generation, threshold cryptography, and the post-quantum protocols of NIST PQC. Both Shamir and CRT sharing are instances of a more general theme: error-correcting codes (Reed-Solomon, Reed-Muller) realised via polynomial CRT in .

Synthesis. The Chinese remainder theorem is the foundational reason that the multiplicative structure of factors cleanly across distinct primes, and this is exactly the bridge from elementary modular arithmetic to commutative algebra. The central insight is that coprimality of moduli is the operational content of "the corresponding ideals sum to the whole ring" — an ideal-theoretic statement that survives every generalisation from to polynomial rings, to number rings, to local-global principles in arithmetic geometry. Putting these together with the Fermat-Euler theorem and the structure theorem for , every arithmetic question modulo decomposes into independent questions modulo each prime power dividing , computed locally and reassembled by CRT.

The pattern generalises in multiple directions. The localisation at a prime and the -adic completion are the limits of the CRT factor as , identifying the local-global principle of 21.05.01 -adic numbers with the analytic completion. The Artin map in class-field theory generalises Dirichlet's character-equidistribution from to general Galois groups, with the CRT decomposition becoming the splitting behaviour of in a number-field extension. The étale fundamental group of specialises CRT to the profinite completion , a single object that encodes all arithmetic of at once.

The applied consequences are equally pervasive. CRT-based RSA decryption is the canonical speedup in every TLS implementation. The Schönhage-Strassen NTT is the basis of modern arbitrary-precision arithmetic in GMP, Magma, and Mathematica. Reed-Solomon codes — polynomial CRT in — protect every CD, DVD, QR code, deep-space transmission, and RAID-6 disk array. Shamir-Asmuth-Bloom secret sharing underpins distributed-key cryptosystems and post-quantum threshold protocols. The bridge is everywhere the same: a question over decomposes into independent questions over , computed locally and recombined via CRT — the operational content of "the local-global principle" in its most elementary form.

Full proof set Master

Proposition 1 (CRT for pairwise-coprime moduli, full statement and proof). Let be pairwise coprime positive integers, . The map $$ \Psi : \mathbb{Z}/N\mathbb{Z} ;\longrightarrow; \prod_{i=1}^k \mathbb{Z}/n_i\mathbb{Z}, \qquad [x]N \mapsto ([x]{n_1}, \ldots, [x]_{n_k}), $$ is a ring isomorphism.

Proof. By induction on . The base case is direct. For , this is the Key Theorem. For the inductive step from to , set . Since each is coprime to for , the product is coprime to (a Bézout consequence: write for each , take the product over , expand). Apply the two-modulus CRT to : $$ \mathbb{Z}/(M n_k)\mathbb{Z} ;\xrightarrow{\sim}; \mathbb{Z}/M\mathbb{Z} \times \mathbb{Z}/n_k\mathbb{Z}. $$ By the inductive hypothesis applied to : $$ \mathbb{Z}/M\mathbb{Z} ;\xrightarrow{\sim}; \prod_{i=1}^{k-1} \mathbb{Z}/n_i\mathbb{Z}. $$ Composing the two isomorphisms, $$ \mathbb{Z}/N\mathbb{Z} ;\xrightarrow{\sim}; \prod_{i=1}^k \mathbb{Z}/n_i\mathbb{Z}. \qquad \square $$

Proposition 2 (Explicit CRT solution formula). Given pairwise-coprime and target residues , the unique solution of the system modulo is $$ x ;\equiv; \sum_{i=1}^k a_i N_i u_i \pmod N, \qquad N_i = N/n_i, \qquad u_i \equiv N_i^{-1} \pmod{n_i}. $$

Proof. Each is coprime to (a product of integers each coprime to ). Hence has a multiplicative inverse modulo , computable by extended Euclidean (from 21.01.01).

The product satisfies and for (because ). Multiplying by and summing: $$ \sum_{i=1}^k a_i N_i u_i ;\equiv; \begin{cases} a_j \cdot 1 + \sum_{i \neq j} a_i \cdot 0 = a_j \pmod{n_j}, & \text{(focusing on the }j\text{-th component)} \end{cases} $$ for each . So the proposed satisfies all congruences. Uniqueness modulo follows from Proposition 1: the map is injective, so two solutions agree modulo .

Proposition 3 (Euler totient via CRT — full computation). For , $$ \varphi(n) ;=; \prod_{i=1}^r p_i^{e_i - 1}(p_i - 1) ;=; n \prod_{p \mid n}\left(1 - \frac{1}{p}\right). $$

Proof. By Proposition 1, as groups. Taking cardinalities, .

It remains to compute for a prime power. The residues modulo are ; the non-units are exactly the multiples of , namely , totalling elements. Hence .

Substituting: $$ \varphi(n) = \prod_{i} p_i^{e_i - 1}(p_i - 1) = \prod_i p_i^{e_i} \cdot \prod_i \frac{p_i - 1}{p_i} = n \prod_{p \mid n}\left(1 - \frac{1}{p}\right). \qquad \square $$

Proposition 4 (Fermat-Euler theorem; structural proof). For , .

Proof. The residue lies in the group , which has order . By Lagrange's theorem (every element of a finite group satisfies ), . Translating: .

The specialisation gives Fermat's little theorem for . Multiplying both sides by extends to for every integer (the case is direct: both sides are ).

Connections Master

  • Divisibility, GCD, and Bézout 21.01.01. Just shipped. Bézout's identity is the load-bearing step in the CRT proof — both the constructive existence (the idempotent decomposition ) and the uniqueness (the joint kernel , implies when ). The extended Euclidean algorithm of 21.01.01 supplies the modular inverse needed for the explicit CRT formula of Proposition 2. Without 21.01.01 the present unit's central theorem has no operational construction.

  • Primes and the fundamental theorem of arithmetic 21.01.02. Just shipped. The fundamental theorem provides the prime-power factorisation that decomposes via CRT into the product of (Theorem 4 above). Primality is also the dividing line for field structure: is a field if and only if is prime. The Fermat-Euler theorem (Theorem 3) inherits Fermat's little theorem as the prime case. The chapter-level synthesis of elementary number theory rests on the interplay of 21.01.01 (additive structure), 21.01.02 (multiplicative atoms), and the present unit (the local-global decomposition).

  • Commutative rings and ideals 01.02.06. Pending. The CRT generalises directly from to any commutative ring: for pairwise-coprime ideals (in the sense ), the canonical map has kernel and induces . The chapter-closing synthesis of commutative algebra in 01.02.06 reframes the present unit's content as the dimension-1 / discrete case of the general decomposition principle that organises localisation, completion, and sheaf cohomology.

  • Finite fields and Frobenius 01.02.18 pending. Pending. The base case is , defined here. The general for is constructed as for irreducible of degree , an instance of polynomial CRT applied to a single maximal ideal. Polynomial CRT in — the analogue of integer CRT for the Euclidean domain — generalises in 01.02.18 pending (when shipped) to the Frobenius decomposition of when factors. Reed-Solomon codes (Theorem 8 above, [Reed-Solomon 1960]) are the canonical applied target.

  • Riemann zeta function and the Euler product 21.03.01. Shipped. The Euler product encodes the Chinese remainder decomposition into an analytic statement: the multiplicative function factors as a product over prime powers. The Dirichlet character generalisation in 21.03.02 uses the CRT decomposition of to factor . The bridge from elementary CRT to analytic number theory is precisely this: every multiplicative arithmetic function decomposes across primes, with the operational content supplied by the present unit.

Historical & philosophical context Master

The Chinese remainder theorem is the oldest theorem in number theory bearing a non-European name. The originator example appears in Sun Zi c. 4th-5th century CE Sunzi Suanjing [Sun Zi]: "There are certain things whose number is unknown; counted by threes they leave remainder 2, by fives remainder 3, by sevens remainder 2 — what is their number?" The traditional answer 23 is recovered by what would later be named the CRT. Sun Zi gives only the example and a verification, with no general algorithm. The general procedure for arbitrary pairwise-coprime moduli is due to Qin Jiushao 1247 Mathematical Treatise in Nine Sections (Shushu Jiuzhang) [Qin Jiushao 1247] under the name Da Yan (大衍, "Great Extension"); the Da Yan procedure is essentially the modern formula of Proposition 2, with each computed by what amounts to the extended Euclidean algorithm. The same theorem was independently developed in India by Brahmagupta 628 Brahmasphuṭasiddhānta [Brahmagupta 628] using the Kuṭṭaka ("pulveriser") algorithm — again a Euclidean-style routine — for the same problem of simultaneous linear congruences.

The modern Western formulation is due to Gauss 1801 Disquisitiones Arithmeticae arts. 1-37 (the congruence notation , due to Gauss in this work), arts. 38-44 (the CRT proper for pairwise-coprime moduli, with both two-modulus and multi-modulus forms), and arts. 49-89 (the structure theory of , including the existence of primitive roots modulo odd prime powers) [Gauss 1801]. Gauss does not cite Sun Zi or Qin Jiushao — the Chinese mathematical tradition was unknown in Europe at the time — but the name "Chinese remainder theorem" emerged in 19th-century scholarship after the publication of Wylie 1852 Notes on Chinese arithmetic and the subsequent translation and study of the Shushu Jiuzhang. The name was popularised by Dickson 1919 History of the Theory of Numbers Vol. 1 and is standard in 20th-century textbooks.

The ring-theoretic abstraction took shape in the late 19th and early 20th centuries. Dedekind 1871 (in his supplements to Dirichlet's Vorlesungen über Zahlentheorie) introduced ideals in commutative rings and recognised that the coprime-moduli condition corresponds to the ideal-theoretic statement . Noether 1921 Math. Ann. 83 abstracted the chain conditions; the general CRT for pairwise-coprime ideals in a commutative ring entered the textbook canon with van der Waerden 1930 Moderne Algebra and remains in the same form in Lang 2002 Algebra Ch. II §2 [Lang 2002]. The polynomial analogue (CRT in for coprime polynomial moduli) is essentially Lagrange interpolation 1795 Leçons élémentaires sur les mathématiques, predating the integer formulation by Gauss.

The structure theory of — cyclic for with odd; product of two cyclic groups for with ; CRT factorisation otherwise — is essentially complete in Gauss 1801 §III. The Carmichael function recording the group exponent rather than the order was introduced by Carmichael 1910 Bull. AMS 16, 232 [Carmichael 1910] and is fundamental in modern cryptographic key-strength estimates: RSA security depends on , not . The Carmichael numbers — composite for which for all coprime to — were classified by Korselt 1899 Math. Ann. 53 and shown to be infinite by Alford-Granville-Pomerance 1994 Annals 139.

The applied legacy is dominated by cryptography and coding theory. Rivest-Shamir-Adleman 1978 CACM 21, 120 introduced RSA based on the asymmetry between exponentiation and discrete-logarithm computation modulo a large semi-prime . CRT-based decryption — recommended in PKCS#1 v2.2 (RFC 8017) and implemented in essentially every TLS stack — exploits the factorisation of as to gain a speedup. Reed-Solomon 1960 J. SIAM 8, 300 [Reed-Solomon 1960] introduced their codes via polynomial CRT in ; today they protect every CD, DVD, QR code, deep-space transmission, and RAID-6 disk array. Shamir 1979 CACM 22, 612 [Shamir 1979] introduced secret sharing via polynomial interpolation; the Asmuth-Bloom 1983 IEEE Trans. Inform. Theory IT-29 dual scheme uses pairwise-coprime moduli and the CRT formula of Proposition 2. Schönhage-Strassen 1971 Computing 7, 281 [Schönhage-Strassen 1971] introduced the CRT-NTT integer-multiplication algorithm that powered arbitrary-precision arithmetic in GMP and Magma for half a century, with the Harvey-van der Hoeven 2021 Annals 193 improvement to closing a 1971 question of Schönhage.

Bibliography Master

@book{SunZiSuanjing,
  author    = {Sun Zi},
  title     = {Sunzi Suanjing},
  editor    = {Lam, Lay Yong and Ang, Tian Se},
  publisher = {World Scientific},
  year      = {2004},
  edition   = {2},
  note      = {Chinese mathematical manuscript, c. 4th-5th century CE. The originator example for the Chinese remainder theorem appears in Volume 3, Problem 26. English translation in Lam-Ang 2004 *Fleeting Footsteps*, 2nd edition.}
}

@book{Brahmagupta628,
  author    = {Brahmagupta},
  title     = {Brahmasphu\d{t}asiddh\={a}nta},
  editor    = {Colebrooke, Henry Thomas},
  publisher = {John Murray},
  year      = {1817},
  note      = {Sanskrit treatise, 628 CE. Chapter 12 (Ku\d{t}\d{t}aka) contains the general algorithm for solving simultaneous linear congruences. English translation in Colebrooke 1817 *Algebra, with Arithmetic and Mensuration, from the Sanscrit of Brahmegupta and Bhascara*.}
}

@book{QinJiushao1247,
  author    = {Qin, Jiushao},
  title     = {Mathematical Treatise in Nine Sections (Shushu Jiuzhang)},
  publisher = {Song Dynasty},
  year      = {1247},
  note      = {Chinese mathematical treatise. Chapter 1 contains the Da Yan (大衍) procedure: the first systematic general-modulus CRT algorithm. English exposition: Libbrecht 1973 *Chinese Mathematics in the Thirteenth Century*, MIT Press.}
}

@book{Gauss1801,
  author    = {Gauss, Carl Friedrich},
  title     = {Disquisitiones Arithmeticae},
  publisher = {Gerhard Fleischer},
  address   = {Leipzig},
  year      = {1801},
  note      = {English translation by Arthur A. Clarke, Yale University Press, 1965. Articles 1-37 introduce congruence notation; articles 38-44 develop the CRT; articles 49-89 give the structure theory of $(\mathbb{Z}/n)^\times$.}
}

@article{Carmichael1910,
  author  = {Carmichael, Robert D.},
  title   = {Note on a new number theory function},
  journal = {Bulletin of the American Mathematical Society},
  volume  = {16},
  pages   = {232--238},
  year    = {1910}
}

@article{ReedSolomon1960,
  author  = {Reed, Irving S. and Solomon, Gustave},
  title   = {Polynomial codes over certain finite fields},
  journal = {Journal of the Society for Industrial and Applied Mathematics},
  volume  = {8},
  pages   = {300--304},
  year    = {1960}
}

@article{SchonhageStrassen1971,
  author  = {Sch\"{o}nhage, Arnold and Strassen, Volker},
  title   = {Schnelle Multiplikation gro{\ss}er Zahlen},
  journal = {Computing},
  volume  = {7},
  pages   = {281--292},
  year    = {1971}
}

@article{Shamir1979,
  author  = {Shamir, Adi},
  title   = {How to share a secret},
  journal = {Communications of the ACM},
  volume  = {22},
  pages   = {612--613},
  year    = {1979}
}

@article{AsmuthBloom1983,
  author  = {Asmuth, Charles A. and Bloom, John},
  title   = {A modular approach to key safeguarding},
  journal = {IEEE Transactions on Information Theory},
  volume  = {IT-29},
  pages   = {208--210},
  year    = {1983}
}

@article{RivestShamirAdleman1978,
  author  = {Rivest, Ronald L. and Shamir, Adi and Adleman, Leonard},
  title   = {A method for obtaining digital signatures and public-key cryptosystems},
  journal = {Communications of the ACM},
  volume  = {21},
  pages   = {120--126},
  year    = {1978}
}

@book{HardyWright2008,
  author    = {Hardy, G. H. and Wright, E. M.},
  title     = {An Introduction to the Theory of Numbers},
  edition   = {6},
  publisher = {Oxford University Press},
  year      = {2008},
  note      = {Revised by D. R. Heath-Brown and J. H. Silverman, foreword by A. Wiles. Chapters V-VI contain the elementary theory of congruences, the CRT, and the structure of $(\mathbb{Z}/n)^\times$.}
}

@book{IrelandRosen1990,
  author    = {Ireland, Kenneth and Rosen, Michael},
  title     = {A Classical Introduction to Modern Number Theory},
  edition   = {2},
  series    = {Graduate Texts in Mathematics},
  volume    = {84},
  publisher = {Springer},
  year      = {1990}
}

@book{Lang2002,
  author    = {Lang, Serge},
  title     = {Algebra},
  edition   = {3},
  series    = {Graduate Texts in Mathematics},
  volume    = {211},
  publisher = {Springer},
  year      = {2002},
  note      = {Chapter II §2 develops the CRT for coprime ideals in a commutative ring.}
}

@book{Apostol1976,
  author    = {Apostol, Tom M.},
  title     = {Introduction to Analytic Number Theory},
  series    = {Undergraduate Texts in Mathematics},
  publisher = {Springer},
  year      = {1976}
}

@book{NivenZuckermanMontgomery1991,
  author    = {Niven, Ivan and Zuckerman, Herbert S. and Montgomery, Hugh L.},
  title     = {An Introduction to the Theory of Numbers},
  edition   = {5},
  publisher = {John Wiley},
  year      = {1991}
}