GCD with Remainder

Theorem
Let $$a, b \in \Z$$.

Let $$q, r \in \Z$$ such that $$a = q b + r$$.

Then $$\gcd \left\{{a, b}\right\} = \gcd \left\{{b, r}\right\}$$

where $$\gcd \left\{{a, b}\right\}$$ is the greatest common divisor of $$a$$ and $$b$$.

Proof
$$ $$ $$ $$

The argument works the other way about:

$$ $$ $$ $$

Thus $$\gcd \left\{{a, b}\right\} = \gcd \left\{{b, r}\right\}$$.