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 then and have exactly the same common divisors, so
Common divisor, and the greatest common divisor , with the convention
is symmetric and unchanged by signs: ; moreover , , , and unless
Division with remainder in : for and there are unique with and
The recursion theorem
The principle of mathematical induction
The well-ordering principle
The natural numbers (von Neumann)
Order on the natural numbers
Discreteness: is the immediate successor
Trichotomy of the order on
Every nonzero natural number is a successor
The naturals embed in the integers
The absolute value of an integer
Absolute value in : ; exactly when ; ; ; ; and exactly when
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