Euclidean Algorithm

Algorithm
The Euclidean Algorithm is a method for finding the Greatest Common Divisor (GCD) of two integers. The steps are: 1. Start with $$(a,b)$$. If $$b=0$$ then you are done and the GCD is $$a$$. 2. If $$b\neq 0$$ then you take the Definition:Principal Remainder of $$\frac{a}{b}$$. 3. Repeat these steps until $$b=0$$.

Proof
Suppose $$a,b\in \mathbb{Z}$$ and $$a\vee b\neq 0$$. Let the remainder of $$\frac{a}{b}$$ be called $$r$$. Therefore $$a = qb + r$$ where $$q$$ is the quotient of the division by the Division Theorem. Any common divisor of $$a$$ and $$b$$ is also a common divisor of $$r$$.

To see this, note that $$r=a-qb$$. Let $$d$$ be the common divisor. Then $$a=sd$$ and $$b=td$$ for $$s,t\in \mathbb{Z}$$. Thus $$r=(s-qt)d$$. Since $$(s-qt)\in\mathbb{Z}$$, $$r$$ is divisible by $$d$$.

This is true for any divisor $$d$$, so the greatest common divisor of $$a$$ and $$b$$ is also the greatest common divisor of $$b$$ and $$r$$. Therefore, we may search instead for $$\gcd \left\{{b, r}\right\}$$. Since $$|r|<|b|$$ and $$r\in\mathbb{Z}$$, we will reach $$r=0$$ after finitely many steps. At this point, $$\gcd \left\{{r, 0}\right\}=r$$ since the greatest common divisor of any non-zero number $$k$$ and $$0$$ is $$k$$.