Alphabeta Math
TheoremStatement: AI-adaptedProof: AI-adaptedSession-authored (Fable 5 assisted)precheck 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 aZa \in \mathbb{Z} and b>0b > 0 the remainder descent from (a,b)(a,b) terminates, and the last nonzero remainder is gcd(a,b)\gcd(a,b)

Statement

Let aZa \in \mathbb{Z} and b>0b > 0. Define Φ:Z×ZZ×Z\Phi : \mathbb{Z} \times \mathbb{Z} \to \mathbb{Z} \times \mathbb{Z} by

Φ(u,v)  =  {(v,  uqv)if v>0,(u,v)if v0,\Phi(u,v) \;=\; \begin{cases} (v,\; u - qv) & \text{if } v > 0, \\ (u,v) & \text{if } v \le 0, \end{cases}

where in the first clause qq is the unique quotient of uu by vv given by Division with remainder in Z\mathbb{Z}: for aZa \in \mathbb{Z} and b>0b > 0 there are unique q,rZq, r \in \mathbb{Z} with a=qb+ra = qb + r and 0r<b0 \le r < b, so that uqvu - qv is the remainder and 0uqv<v0 \le u - qv < v.

Let R:NZ×ZR : \mathbb{N} \to \mathbb{Z} \times \mathbb{Z} be the unique function with R(0)=(a,b)R(0) = (a,b) and R(σ(k))=Φ(R(k))R(\sigma(k)) = \Phi(R(k)) supplied by the recursion theorem (The recursion theorem). Write R(k)=(ak,bk)R(k) = (a_k, b_k); the sequence b0,b1,b2,b_0, b_1, b_2, \dots is the remainder descent from (a,b)(a,b).

Then:

  1. bk0b_k \ge 0 for every kk, and bσ(k)<bkb_{\sigma(k)} < b_k whenever bk>0b_k > 0;
  2. gcd(ak,bk)=gcd(a,b)\gcd(a_k, b_k) = \gcd(a,b) for every kk (Common divisor, and the greatest common divisor gcd(a,b)\gcd(a,b), with the convention gcd(0,0):=0\gcd(0,0) := 0);
  3. there is a least NNN \in \mathbb{N} with bN=0b_N = 0, and N0N \ne 0; writing N=σ(M)N = \sigma(M), the value bMb_M is the last nonzero remainder, and bM>0b_M > 0;
  4. aN=bM=gcd(a,b)a_N = b_M = \gcd(a,b).

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

Facts & Assumptions

Given: aZa \in \mathbb{Z}, b>0b > 0, the map Φ\Phi and the sequence R(k)=(ak,bk)R(k) = (a_k,b_k) described above, and the embedding ι:NZ\iota : \mathbb{N} \to \mathbb{Z}, ι(k)=[(k,0)]\iota(k) = [(k,0)], of The naturals embed in the integers.

[L1]

Z\mathbb{Z} is a commutative ring; its order is total, antisymmetric and transitive, and is compatible with addition; x<yx < y means xyx \le y together with xyx \ne 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 uZu \in \mathbb{Z} and v>0v > 0 there is exactly one pair (q,r)(q,r) of integers with u=qv+ru = qv + r and 0r<v0 \le r < v (Division with remainder in Z\mathbb{Z}: for aZa \in \mathbb{Z} and b>0b > 0 there are unique q,rZq, r \in \mathbb{Z} with a=qb+ra = qb + r and 0r<b0 \le r < b).

[L3]

For a set AA, an αA\alpha \in A and a function f:AAf : A \to A there is exactly one g:NAg : \mathbb{N} \to A with g(0)=αg(0) = \alpha and g(σ(k))=f(g(k))g(\sigma(k)) = f(g(k)) (The recursion theorem).

[L4]

Induction on N\mathbb{N}: a property holding at 00 and inherited by successors holds everywhere (The principle of mathematical induction).

[L5]
[L6]

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

[L7]

On N\mathbb{N}: exactly one of m<nm < n, m=nm = n, n<mn < m holds (Trichotomy of the order on N\mathbb{N}); m<nm < n if and only if σ(m)n\sigma(m) \le n (Discreteness: σ(n)\sigma(n) is the immediate successor); and every n0n \ne 0 is a successor (Every nonzero natural number is a successor).

Proof

technique · induction
1.1

Φ\Phi is a well-defined function. For v>0v > 0 the pair (q,r)(q,r) with u=qv+ru = qv + r and 0r<v0 \le r < v is unique by [L2], so qq and r=uqvr = u - qv depend only on (u,v)(u,v); for v0v \le 0 the value is (u,v)(u,v); and the two clauses are exhaustive and exclusive by totality. Hence [L3] applies with A=Z×ZA = \mathbb{Z} \times \mathbb{Z}, α=(a,b)\alpha = (a,b) and f=Φf = \Phi, giving the sequence RR.

L1L2L3construct
1.2

Base case of the induction, at k=0k = 0: b0=b>0b_0 = b > 0, so b00b_0 \ge 0; and gcd(a0,b0)=gcd(a,b)\gcd(a_0,b_0) = \gcd(a,b) because (a0,b0)=(a,b)(a_0,b_0) = (a,b).

basegivenL1
1.3

Induction hypothesis: fix kk and assume bk0b_k \ge 0 and gcd(ak,bk)=gcd(a,b)\gcd(a_k,b_k) = \gcd(a,b).

ih
2.1

Inductive step. If bk>0b_k > 0, then by [L2] write ak=qbk+ra_k = q b_k + r with 0r<bk0 \le r < b_k; by definition R(σ(k))=Φ(ak,bk)=(bk,r)R(\sigma(k)) = \Phi(a_k,b_k) = (b_k, r), so bσ(k)=r0b_{\sigma(k)} = r \ge 0 and bσ(k)=r<bkb_{\sigma(k)} = r < b_k, while gcd(aσ(k),bσ(k))=gcd(bk,r)=gcd(ak,bk)=gcd(a,b)\gcd(a_{\sigma(k)}, b_{\sigma(k)}) = \gcd(b_k, r) = \gcd(a_k,b_k) = \gcd(a,b) by [L8]. If instead bk=0b_k = 0, then bk0b_k \le 0, so R(σ(k))=R(k)R(\sigma(k)) = R(k) and both properties are inherited unchanged. Since bk0b_k \ge 0, these two cases are exhaustive.

step 1.3L1L2L8
3.1

By induction, bk0b_k \ge 0 and gcd(ak,bk)=gcd(a,b)\gcd(a_k,b_k) = \gcd(a,b) for every kNk \in \mathbb{N}; and step 2.1 also shows bσ(k)<bkb_{\sigma(k)} < b_k whenever bk>0b_k > 0. This is claim 1 and claim 2.

step 1.2step 2.1L4
4.1

Let U:={nN:ι(n)=bk for some kN}U := \{\, n \in \mathbb{N} : \iota(n) = b_k \text{ for some } k \in \mathbb{N} \,\}. Every bkb_k is nonnegative, hence lies in the image of ι\iota, so UU is nonempty; let n0n_0 be its least element and fix k0k_0 with bk0=ι(n0)b_{k_0} = \iota(n_0).

step 3.1L5L6choose
5.1

bk0=0b_{k_0} = 0. Otherwise bk0>0b_{k_0} > 0, so 0bσ(k0)<bk00 \le b_{\sigma(k_0)} < b_{k_0} by step 3.1; writing bσ(k0)=ι(n1)b_{\sigma(k_0)} = \iota(n_1) with n1Un_1 \in U, we get ι(n1)<ι(n0)\iota(n_1) < \iota(n_0), and hence n1<n0n_1 < n_0, since otherwise n0n1n_0 \le n_1 by trichotomy and so ι(n0)ι(n1)\iota(n_0) \le \iota(n_1), contradicting antisymmetry. That contradicts the minimality of n0n_0.

step 3.1step 4.1L1L6L7
6.1

So {kN:bk=0}\{\, k \in \mathbb{N} : b_k = 0 \,\} is nonempty; let NN be its least element. N0N \ne 0, since b0=b>0b_0 = b > 0. Hence N=σ(M)N = \sigma(M) for some MNM \in \mathbb{N}, and M<NM < N because M<σ(M)M < \sigma(M).

step 5.1givenL5L7
7.1

bM>0b_M > 0: indeed bM0b_M \ge 0 by step 3.1, and bM0b_M \ne 0 because M<NM < N and NN is the least index with vanishing bb.

step 3.1step 6.1
8.1

Since bM>0b_M > 0, the definition gives R(N)=R(σ(M))=Φ(aM,bM)=(bM,  aMqbM)R(N) = R(\sigma(M)) = \Phi(a_M,b_M) = (b_M,\; a_M - q b_M), so aN=bMa_N = b_M and bN=aMqbMb_N = a_M - q b_M; and bN=0b_N = 0 by the choice of NN.

step 6.1step 7.1L2
9.1

Therefore gcd(a,b)=gcd(aN,bN)=gcd(aN,0)=aN=aN=bM\gcd(a,b) = \gcd(a_N, b_N) = \gcd(a_N, 0) = |a_N| = a_N = b_M, the last equality because aN=bM>0a_N = b_M > 0. So the descent terminates at index NN and the last nonzero remainder bMb_M equals gcd(a,b)\gcd(a,b), which is claims 3 and 4.

step 3.1step 7.1step 8.1L9discharge-induction

Remarks

Depends on

Used by

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