Euclidean algorithm in a Euclidean domain
Let be a Euclidean domain with Euclidean function and let . The Euclidean algorithm sets and . While , it divides by and lets be the remainder. The values decrease strictly, so the algorithm stops with some . The last nonzero remainder is a greatest common divisor of and , if .
Builds on Euclidean domain, Greatest common divisor in an integral domain