Math 2.0

Number theory Proof

Proof of the Chinese remainder theorem for non-coprime moduli

Builds on Congruence modulo nDivisibilityGreatest common divisorLeast common multipleBézout's identityDivision algorithm

Proof

  1. Let mm and nn be positive integers and let aa and bb be integers. Let g=gcd⁡(m,n)g = \gcd(m, n) be the greatest common divisor and M=lcm⁡(m,n)M = \operatorname{lcm}(m, n) the least common multiple.
  2. Since mm and nn are positive, gg is a positive common divisor of mm and nn. Also, MM is the smallest positive common multiple of mm and nn.
  3. Necessity. Let xx be a solution. By the definition of congruence, mm divides x−ax - a and nn divides x−bx - b.
  4. Since gg divides mm and nn, step 3 shows that gg divides x−ax - a and x−bx - b. So gg divides (x−b)−(x−a)=a−b(x - b) - (x - a) = a - b, and a≡b(modg)a \equiv b \pmod g.
  5. Sufficiency. Assume a≡b(modg)a \equiv b \pmod g, and write a−b=gta - b = g t with an integer tt.
  6. By Bézout's identity, there are integers uu and vv with mu+nv=gm u + n v = g.
  7. Let x=a−mutx = a - m u t. Then x−a=m(−ut)x - a = m (- u t), so x≡a(modm)x \equiv a \pmod m.
  8. By steps 5 and 6, x−b=(a−b)−mut=gt−mut=(g−mu)t=nvtx - b = (a - b) - m u t = g t - m u t = (g - m u) t = n v t. So x≡b(modn)x \equiv b \pmod n, and xx is a solution.
  9. Uniqueness. Let xx and yy be two solutions, and let c=x−yc = x - y.
  10. The integer mm divides x−ax - a and y−ay - a, so it divides their difference cc. In the same way, nn divides cc.
  11. By the division algorithm, there are integers qq and rr with c=qM+rc = q M + r and 0≤r<M0 \le r < M.
  12. Since mm divides cc and MM, it divides r=c−qMr = c - q M. In the same way, nn divides rr. So rr is a common multiple of mm and nn.
  13. If r>0r > 0, then rr is a positive common multiple smaller than MM, which contradicts step 2. So r=0r = 0.
  14. Hence MM divides c=x−yc = x - y, that is, x≡y(modM)x \equiv y \pmod M.
  15. By steps 4, 8 and 14, the system has a solution if and only if a≡b(modg)a \equiv b \pmod g, and then two solutions are congruent modulo MM.

Idea

A solution forces aa and bb to agree modulo every common divisor of the moduli. Conversely, Bézout's identity writes gg as mu+nvm u + n v. Multiplying by t=(a−b)/gt = (a - b) / g splits a−ba - b into a multiple of mm plus a multiple of nn. Removing the multiple of mm from aa lands on bb plus a multiple of nn.

Reading path

To understand this page from the ground up, read these 24 pages in order. The foundations come first. The path takes the proofs Proof of Bézout's identity, Proof of the commutativity of addition by induction, Proof of strong induction from ordinary induction, Proof of the well-ordering principle from strong induction, Proof of the division algorithm.

Show the path as a graph
Definition by recursion, concept, no evidence levelDefinition by recursi…conceptDivisibility, definition, no evidence levelDivisibilitydefinitionMathematical induction, concept, no evidence levelMathematical inductionconceptNatural numbers, object, no evidence levelNatural numbersobjectPeano axioms, concept, no evidence levelPeano axiomsconceptCongruence modulo n, definition, no evidence levelCongruence modulo ndefinitionGreatest common divisor, definition, no evidence levelGreatest common divis…definitionLeast common multiple, definition, no evidence levelLeast common multipledefinitionSuccessor function, definition, no evidence levelSuccessor functiondefinitionAddition of natural numbers, definition, no evidence levelAddition of natural n…definitionThe successor function is injective, statement, no evidence levelThe successor functio…statementZero is not a successor, statement, no evidence levelZero is not a success…statementOrder on the natural numbers, definition, no evidence levelOrder on the natural …definitionProof of the commutativity of addition by induction, proof, no evidence levelProof of the commutat…proofCommutativity of addition, statement, no evidence levelCommutativity of addi…statementProof of strong induction from ordinary induction, proof, no evidence levelProof of strong induc…proofStrong induction, statement, no evidence levelStrong inductionstatementProof of the well-ordering principle from strong induction, proof, no evidence levelProof of the well-ord…proofWell-ordering principle, statement, no evidence levelWell-ordering princip…statementProof of the division algorithm, proof, no evidence levelProof of the division…proofDivision algorithm, statement, no evidence levelDivision algorithmstatementProof of Bézout's identity, proof, no evidence levelProof of Bézout's ide…proofBézout's identity, statement, no evidence levelBézout's identitystatementProof of the Chinese remainder theorem for non-coprime moduli, proof, no evidence levelProof of the Chinese …proof
Each page uses the pages above it. The colour of the bar on a box shows how strong the evidence is, and the box also gives it as text. The list has the same pages.
  • no evidence level
  1. Definition by recursion concept
  2. Divisibility definition
  3. Mathematical induction concept
  4. Natural numbers object
  5. Peano axioms concept
  6. Congruence modulo n definition
  7. Greatest common divisor definition
  8. Least common multiple definition
  9. Successor function definition
  10. Addition of natural numbers definition
  11. The successor function is injective statement
  12. Zero is not a successor statement
  13. Order on the natural numbers definition
  14. Proof of the commutativity of addition by induction proof
  15. Commutativity of addition statement
  16. Proof of strong induction from ordinary induction proof
  17. Strong induction statement
  18. Proof of the well-ordering principle from strong induction proof
  19. Well-ordering principle statement
  20. Proof of the division algorithm proof
  21. Division algorithm statement
  22. Proof of Bézout's identity proof
  23. Bézout's identity statement
  24. Proof of the Chinese remainder theorem for non-coprime moduli proof

Where this leads

1 page builds on this one.

Further reading

  1. Web https://en.wikipedia.org/wiki/Chinese_remainder_theorem, Generalization to non-coprime moduli
About this page
TagK0188FHKGS
URIm2://K0188FHKGS
Kindproof
WritingW0 stub
MSC11A07
ProvesChinese remainder theorem for non-coprime moduli
UsesCongruence modulo n, Divisibility, Greatest common divisor, Least common multiple, Bézout's identity, Division algorithm
MethodsConstructive proof
Changed4 November 2026

Markdown · JSON · Edit on GitHub

What this page needs for W1

  • an inventory row: the row of the inventory that the node accounts for (0 of 1)

The writing levels say how complete the text of a page is. They do not measure its truth.

What links here

No page links to this page yet.