PROOF 83
Prove.
The last remainder of the Euclidean algorithm is the gcd
On the natural numbers ℕ.
A way to read this proof
First separate what is assumed from what is to be proved. At each step, ask which definition or earlier result permits the move. If it is unclear, return to that premise rather than skipping to the conclusion.
Definition D1
d | a means there exists a natural number k with a = dk.
Proof.
∎
Definition D2
C(a, b) is the set of all common divisors of a and b, and gcd(a, b) is the maximum of C(a, b).
Proof.
∎
Definition D3
Set r₀ = a, r₁ = b, and while rₖ > 0 define the next term by rₖ₋₁ = rₖqₖ + rₖ₊₁, 0 ≤ rₖ₊₁ < rₖ.
Proof.
∎
Lemma L1
If d | x, then for every q, d | xq
Proof.
∎
Lemma L2
If a = bq + r, then C(a, b) = C(b, r) and gcd(a, b) = gcd(b, r)
Proof.
∎
Lemma L3
For every k at which rₖ is defined, gcd(a, b) = gcd(rₖ, rₖ₊₁)
Proof.
∎
Theorem T
If the algorithm stops at rₙ > 0, rₙ₊₁ = 0, then gcd(a, b) = rₙ.
Proof.
∎
Remark
Can A1 be removed from this proof?
L2 is a conditional statement. Identify what supplies its condition.