How statement and proof provenance work
The first chip identifies the source of the statement or construction; the second identifies the source of its local proof or verification.
- Literature-sourced: the exact statement appears in a cited source; only wording and notation differ.
- AI-adapted: a semantically identical restatement of literature-sourced material, modulo indexing, notation, and boundary cases adopted by the library.
- AI-generated: a genuinely novel statement formulated by AI, with no source for the claim itself.
These labels describe origin, not correctness: citations and verification chips remain separate evidence.
The Euclidean algorithm: for and the remainder descent from terminates, and the last nonzero remainder is
Statement
Let and . Define by
where in the first clause is the unique quotient of by given by Division with remainder in : for and there are unique with and , so that is the remainder and .
Let be the unique function with and supplied by the recursion theorem (The recursion theorem). Write ; the sequence is the remainder descent from .
Then:
- for every , and whenever ;
- for every (Common divisor, and the greatest common divisor , with the convention );
- there is a least with , and ; writing , the value is the last nonzero remainder, and ;
- .
So the descent terminates, and the last nonzero remainder is .
Facts & Assumptions
Given: , , the map and the sequence described above, and the embedding , , of The naturals embed in the integers.
is a commutative ring; its order is total, antisymmetric and transitive, and is compatible with addition; means together with (The integers form a commutative ring, Arithmetic on the integers, The integers form a totally ordered ring, Order on the integers, The integers as equivalence classes of pairs of naturals).
For and there is exactly one pair of integers with and (Division with remainder in : for and there are unique with and ).
For a set , an and a function there is exactly one with and (The recursion theorem).
Induction on : a property holding at and inherited by successors holds everywhere (The principle of mathematical induction).
Every nonempty subset of has a least element (The well-ordering principle, Order on the natural numbers, The natural numbers (von Neumann)).
is injective, preserves addition, multiplication and order, and its image is exactly the nonnegative integers (The naturals embed in the integers).
On : exactly one of , , holds (Trichotomy of the order on ); if and only if (Discreteness: is the immediate successor); and every is a successor (Every nonzero natural number is a successor).
Proof
is a well-defined function. For the pair with and is unique by [L2], so and depend only on ; for the value is ; and the two clauses are exhaustive and exclusive by totality. Hence [L3] applies with , and , giving the sequence .
Base case of the induction, at : , so ; and because .
Induction hypothesis: fix and assume and .
Inductive step. If , then by [L2] write with ; by definition , so and , while by [L8]. If instead , then , so and both properties are inherited unchanged. Since , these two cases are exhaustive.
By induction, and for every ; and step 2.1 also shows whenever . This is claim 1 and claim 2.
Let . Every is nonnegative, hence lies in the image of , so is nonempty; let be its least element and fix with .
. Otherwise , so by step 3.1; writing with , we get , and hence , since otherwise by trichotomy and so , contradicting antisymmetry. That contradicts the minimality of .
So is nonempty; let be its least element. , since . Hence for some , and because .
: indeed by step 3.1, and because and is the least index with vanishing .
Since , the definition gives , so and ; and by the choice of .
Therefore , the last equality because . So the descent terminates at index and the last nonzero remainder equals , which is claims 3 and 4.
Remarks
-
Termination is not an extra appeal to well-ordering about . It is the clause of Division with remainder in : for and there are unique with and , which makes the second coordinates a strictly decreasing sequence of nonnegative integers; well-ordering is then applied to their preimages in , where it is available.
-
The theorem is stated for only, matching Division with remainder in : for and there are unique with and . For one may run the descent from instead: by is symmetric and unchanged by signs: ; moreover , , , and unless , so nothing is lost. That reduction is recorded here rather than built into the statement, so that the recursion above uses the published division algorithm exactly as stated.
-
No claim is made about how many divisions the descent takes. The count depends on the pair; the companion page works out one family where it is exactly known (Consecutive Fibonacci numbers are coprime, and for every the Euclidean algorithm on takes exactly divisions, with quotient in the first of them and quotient in the last ↗), and no worst-case bound over all inputs is proved anywhere here.
Depends on
- If $a = qb + r$ then $a, b$ and $b, r$ have exactly the same common divisors, so $\gcd(a,b) = \gcd(b,r)$
- Common divisor, and the greatest common divisor $\gcd(a,b)$, with the convention $\gcd(0,0) := 0$
- $\gcd$ is symmetric and unchanged by signs: $\gcd(a,b) = \gcd(b,a) = \gcd(|a|,|b|)$; moreover $\gcd(a,0) = |a|$, $\gcd(a,1) = 1$, $\gcd(a,a) = |a|$, and $\gcd(a,b) \ge 1$ unless $a = b = 0$
- Division with remainder in $\mathbb{Z}$: for $a \in \mathbb{Z}$ and $b > 0$ there are unique $q, r \in \mathbb{Z}$ with $a = qb + r$ and $0 \le r < b$
- The recursion theorem
- The principle of mathematical induction
- The well-ordering principle
- The natural numbers $\mathbb{N}$ (von Neumann)
- Order on the natural numbers
- Discreteness: $\sigma(n)$ is the immediate successor
- Trichotomy of the order on $\mathbb{N}$
- Every nonzero natural number is a successor
- The naturals embed in the integers
- The absolute value $|a|$ of an integer
- Absolute value in $\mathbb{Z}$: $|a| \ge 0$; $|a| = 0$ exactly when $a = 0$; $|-a| = |a|$; $|ab| = |a|\,|b|$; $-|a| \le a \le |a|$; and $|a| \le c$ exactly when $-c \le a \le c$
- The integers form a totally ordered ring
- Order on the integers
- The integers form a commutative ring
- Arithmetic on the integers
- The integers as equivalence classes of pairs of naturals
Used by
- The extended Euclidean algorithm: the same descent produces integers x, y with ax + by = gcd(a,b), so Bézout coefficients are computed and not merely shown to exist Corollary
- 360 = 2³ · 3² · 5 and 84 = 2² · 3 · 7, with gcd(360,84) = 12 and lcm(360,84) = 2520 read off the exponents Example
- Consecutive Fibonacci numbers are coprime, and for every m ∈ ℕ the Euclidean algorithm on (Fₘ₊₃, Fₘ₊₂) takes exactly m+1 divisions, with quotient 1 in the first m of them and quotient 2 in the last Example
- gcd(1071, 462) = 21 by the Euclidean algorithm, with the back-substitution giving 21 = 7 · 462 - 3 · 1071 Example
Dependency tree · next 3 levels
Direct dependencies and their dependencies through the next three levels: 64 results over 23 levels. An arrow runs from a result to what uses it, and this result sits at the bottom with a heavier outline. Click the chart to enlarge it.
Sources
- Euclidean algorithm (Wikipedia) (standard reference, not scraped)