For integers a and b, the set of common divisors D(a,b)={d:d∣a and d∣b} is identical to D(a,b−a). This implies gcd(a,b)=gcd(a,b−a), which extends to gcd(a,b)=gcd(b,amodb), ensuring the greatest common divisor remains invariant throughout the algorithm's reduction steps.
Conditions: a and b are integers.; The operation is either subtraction (b−a) or modulo (amodb).