Invariance and termination of the Euclidean algorithm
Statement
For integers with , the set of common divisors of and equals the set of common divisors of and ; hence , and repeating the division step terminates in finitely many steps with the last nonzero remainder equal to .
Why is it true?
Subtracting a multiple of from cannot create or destroy a shared divisor with : anything that measures both and must also measure the leftover , and vice versa.
Proof sketch
Step 1 (Same common divisors). Let be any integer dividing both and , so and for integers . Then , so , meaning divides both and . Conversely, if divides both and , say and , then , so , meaning divides both and .
Step 2 (Equality of greatest common divisors). Because the pairs and have the exact same set of common divisors, they have the exact same maximum element: .
Step 3 (Finite termination). Each division step produces a remainder satisfying , so the sequence of second entries is a strictly decreasing sequence of non-negative integers. Such a sequence can have at most steps before reaching ; at the step , the last nonzero remainder is .
Topics that use this theorem
Step-by-step proofs
No step-by-step proof yet for this theorem.
References
- David M. Burton (2010). Elementary Number Theory
- John H. Conway, Richard K. Guy (1996). The Book of Numbers · DOI:10.1007/978-1-4612-4072-3