Alphabeta Math
TheoremStatement: AI-adaptedProof: AI-adaptedprecheck passjudge pass (z-ai/glm-5.2)audited 2026-07-28
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 a∈Z and b>0 the remainder descent from (a,b) terminates, and the last nonzero remainder is gcd⁡(a,b)

Statement

Let a∈Z and b>0. Define Φ:Z×Z→Z×Z by

Φ(u,v)  =  {(v,  u−qv)if v>0,(u,v)if v≤0,

where in the first clause q is the unique quotient of u by v given by Division with remainder in Z: for a∈Z and b>0 there are unique q,r∈Z with a=qb+r and 0≤r<b, so that u−qv is the remainder and 0≤u−qv<v.

Let R:N→Z×Z be the unique function with R(0)=(a,b) and R(σ(k))=Φ(R(k)) supplied by the recursion theorem (The recursion theorem). Write R(k)=(ak,bk); the sequence b0,b1,b2,… is the remainder descent from (a,b).

Then:

  1. bk≥0 for every k, and bσ(k)<bk whenever bk>0;
  2. gcd⁡(ak,bk)=gcd⁡(a,b) for every k (Common divisor, and the greatest common divisor gcd⁡(a,b), with the convention gcd⁡(0,0):=0);
  3. there is a least N∈N with bN=0, and N≠0; writing N=σ(M), the value bM is the last nonzero remainder, and bM>0;
  4. aN=bM=gcd⁡(a,b).

So the descent terminates, and the last nonzero remainder is gcd⁡(a,b).

Facts & Assumptions

Given: a∈Z, b>0, the map Φ and the sequence R(k)=(ak,bk) described above, and the embedding ι:N→Z, ι(k)=[(k,0)], of The naturals embed in the integers.

[L1]

Z is a commutative ring; its order is total, antisymmetric and transitive, and is compatible with addition; x<y means x≤y together with x≠y (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).

[L2]

For u∈Z and v>0 there is exactly one pair (q,r) of integers with u=qv+r and 0≤r<v (Division with remainder in Z: for a∈Z and b>0 there are unique q,r∈Z with a=qb+r and 0≤r<b).

[L3]

For a set A, an α∈A and a function f:A→A there is exactly one g:N→A with g(0)=α and g(σ(k))=f(g(k)) (The recursion theorem).

[L4]

Induction on N: a property holding at 0 and inherited by successors holds everywhere (The principle of mathematical induction).

[L6]

ι is injective, preserves addition, multiplication and order, and its image is exactly the nonnegative integers (The naturals embed in the integers).

[L7]

On N: exactly one of m<n, m=n, n<m holds (Trichotomy of the order on N); m<n if and only if σ(m)≤n (Discreteness: σ(n) is the immediate successor); and every n≠0 is a successor (Every nonzero natural number is a successor).

Proof

technique · induction
1.1

Φ is a well-defined function. For v>0 the pair (q,r) with u=qv+r and 0≤r<v is unique by [L2], so q and r=u−qv depend only on (u,v); for v≤0 the value is (u,v); and the two clauses are exhaustive and exclusive by totality. Hence [L3] applies with A=Z×Z, α=(a,b) and f=Φ, giving the sequence R.

L1L2L3construct
1.2

Base case of the induction, at k=0: b0=b>0, so b0≥0; and gcd⁡(a0,b0)=gcd⁡(a,b) because (a0,b0)=(a,b).

basegivenL1
1.3

Induction hypothesis: fix k and assume bk≥0 and gcd⁡(ak,bk)=gcd⁡(a,b).

ih
2.1

Inductive step. If bk>0, then by [L2] write ak=qbk+r with 0≤r<bk; by definition R(σ(k))=Φ(ak,bk)=(bk,r), so bσ(k)=r≥0 and bσ(k)=r<bk, while gcd⁡(aσ(k),bσ(k))=gcd⁡(bk,r)=gcd⁡(ak,bk)=gcd⁡(a,b) by [L8]. If instead bk=0, then bk≤0, so R(σ(k))=R(k) and both properties are inherited unchanged. Since bk≥0, these two cases are exhaustive.

step 1.3L1L2L8
3.1

By induction, bk≥0 and gcd⁡(ak,bk)=gcd⁡(a,b) for every k∈N; and step 2.1 also shows bσ(k)<bk whenever bk>0. This is claim 1 and claim 2.

step 1.2step 2.1L4
4.1

Let U:={ n∈N:ι(n)=bk for some k∈N }. Every bk is nonnegative, hence lies in the image of ι, so U is nonempty; let n0 be its least element and fix k0 with bk0=ι(n0).

step 3.1L5L6choose
5.1

bk0=0. Otherwise bk0>0, so 0≤bσ(k0)<bk0 by step 3.1; writing bσ(k0)=ι(n1) with n1∈U, we get ι(n1)<ι(n0), and hence n1<n0, since otherwise n0≤n1 by trichotomy and so ι(n0)≤ι(n1), contradicting antisymmetry. That contradicts the minimality of n0.

step 3.1step 4.1L1L6L7
6.1

So { k∈N:bk=0 } is nonempty; let N be its least element. N≠0, since b0=b>0. Hence N=σ(M) for some M∈N, and M<N because M<σ(M).

step 5.1givenL5L7
7.1

bM>0: indeed bM≥0 by step 3.1, and bM≠0 because M<N and N is the least index with vanishing b.

step 3.1step 6.1
8.1

Since bM>0, the definition gives R(N)=R(σ(M))=Φ(aM,bM)=(bM,  aM−qbM), so aN=bM and bN=aM−qbM; and bN=0 by the choice of N.

step 6.1step 7.1L2
9.1

Therefore gcd⁡(a,b)=gcd⁡(aN,bN)=gcd⁡(aN,0)=∣aN∣=aN=bM, the last equality because aN=bM>0. So the descent terminates at index N and the last nonzero remainder bM equals gcd⁡(a,b), which is claims 3 and 4.

step 3.1step 7.1step 8.1L9discharge-induction∎

Remarks

Depends on

Used by

Dependency tree · two levels

47 results within two dependency steps of this one, each drawn at its shortest distance from it. An arrow runs from a result to what uses it, so the chart reads left to right and ends at this result, which carries a heavier outline. Every node is a link to that result. Click elsewhere on the chart to enlarge it.

Sources