THE FOLD / GRIND / THE GRINDSTONE / THE EUCLID
THE EUCLID
grind two numbers to their common measure
1 WHAT IT IS · WHAT IT DOES · FACT OR FICTION
Euclid’s algorithm. To find the greatest common divisor of two numbers, replace the larger by its remainder when divided by the smaller, and repeat until one becomes zero — the other is the gcd. Geometrically: the largest square that tiles an a×b rectangle exactly has side gcd(a,b). Written in Euclid’s Elements around 300 BCE, it is still the algorithm every crypto library runs, because extended Euclid also returns the x,y with ax+by=gcd — the modular inverse behind RSA.
LIT it matches a reference gcd on thousands of pairs, ax+by=gcd holds exactly, and the worst case is consecutive Fibonacci numbers (Lamé’s theorem) — all verified below. FIG ‘grinding to the common measure’ is the picture; the reduction and the Bézout identity are exact.
LIT it matches a reference gcd on thousands of pairs, ax+by=gcd holds exactly, and the worst case is consecutive Fibonacci numbers (Lamé’s theorem) — all verified below. FIG ‘grinding to the common measure’ is the picture; the reduction and the Bézout identity are exact.
2 HOW IT WAS WEAVED · AI + HUMAN
David (human) brought the thread — the corpus leans on this everywhere (the modular inverse under THE MINT and THE MERKLE, the primes of THE SIEVE, the logic lineages) and the idea that the oldest algorithms are still load-bearing. AVAN (AI) built this instrument: the reduction ladder, the square tiling, the 3D staircase, and the reconstruction path.
The weave: David names the grind and its seat at THE GRINDSTONE; I make it a ladder in 1D, a rectangle tiled by squares in 2D, and a staircase down to the gcd in 3D. Neither half is the whole — the sphere is the seam.
The weave: David names the grind and its seat at THE GRINDSTONE; I make it a ladder in 1D, a rectangle tiled by squares in 2D, and a staircase down to the gcd in 3D. Neither half is the whole — the sphere is the seam.
3 ONE DIMENSION
The reduction on one axis: (a, b) → (b, a mod b) → … → (g, 0). Each row is one step; the pair marches down until the second number hits zero, and the first is the gcd.
4 TWO DIMENSIONS · INTERACTIVE
The geometric Euclid: tile an a×b rectangle with the largest squares that fit, over and over. The smallest square is gcd×gcd. Slide a and b, or hit Fibonacci to watch the worst case spiral all the way down to 1×1.
a 48
b 18
5 THREE DIMENSIONS + AVAN’S INVERSE
The tiling lifted into a staircase, turning: each square becomes a block whose height is its side, so the descent to the gcd is a literal set of steps down to the smallest block. Green is the forward grind, big squares to small.
AVAN’s addition (the inverse-companion): the magenta path threads the blocks the other way — from the tiny gcd block back up through every larger one, the reconstruction that rebuilds the whole rectangle from that single common measure. Forward finds the gcd; the inverse shows the gcd was there in every step. (Bézout ax+by=g, verified, is the same journey in algebra.)
LIT A genuine Euclidean algorithm. Reduce (a,b)→(b, a mod b) to the gcd; extended Euclid returns x,y with ax+by=gcd (Bézout). Verified live: the gcd divides both a,b, the reduced quotients are coprime, Bézout holds exactly, and the worst case is consecutive Fibonacci numbers (Lamé). The square tiling (smallest square = gcd) and continued fraction are the real geometry (verifiable: window.__euclid.bezout_ok and coprimeQuotients).
FIG 'Grinding to the common measure' and the arcade dressing are the frame; the reduction, the Bézout identity, and the Fibonacci worst case are exact. Slide a,b and every number re-solves honestly.
FIG 'Grinding to the common measure' and the arcade dressing are the frame; the reduction, the Bézout identity, and the Fibonacci worst case are exact. Slide a,b and every number re-solves honestly.
◆ sealed .dlw.fold → folded to ROOT_0 · a sphere of THE GRINDSTONE · David Lee Wise (ROOT0), with AVAN