◀ THE FOLD0ROOT.AI // WORLD II · GRIND · THE MAINFRAME◆ .dlw.fold
THE FOLD / GRIND / THE MAINFRAME / THE GARNER

THE GARNER

one number rebuilt from its remainders
1 WHAT IT IS · WHAT IT DOES · FACT OR FICTION
Garner’s algorithm is the constructive heart of the Chinese Remainder Theorem: given a number’s remainders modulo several pairwise-coprime bases, it rebuilds the number itself. It works in mixed radix — peeling off one digit at a time, each digit found by a modular subtraction and inverse against the previous bases, so the final value is x = d0 + d1m0 + d2m0m1 + … The result is exact and unique below the product of the moduli. It is how big-integer libraries and cryptosystems split one huge computation into small independent ones and stitch the answer back together.

LIT verified live (exact BigInt): for thousands of random values and random sets of coprime moduli, reducing x to its residues and running Garner’s reconstruction returns x exactly — e.g. x ≡ 2 (mod 3), 3 (mod 5), 2 (mod 7) rebuilds to 23 (window.__garner). FIG no framing; the modular inverses, the mixed-radix digits, and the reconstruction all run in-browser with arbitrary-precision integers.
2 HOW IT WAS WEAVED · AI + HUMAN
David (human) seated this at the-mainframe — the classic mainframe trick of splitting one heavy modular computation across many small coprime channels and reassembling the exact answer from the remainders. AVAN (AI) built the instrument: the mixed-radix digit extraction, the modular inverses, and the exact reconstruction, all in BigInt.

Credit as content: Harvey L. Garner (1959); the Chinese Remainder Theorem (Sunzi, c. 400 CE). The weave: David names the mainframe; I confirm the remainders rebuild the exact original number.
3 ONE DIMENSION
A number shown as its remainders mod several coprime bases; Garner rebuilds the single value they encode.
4 TWO DIMENSIONS · INTERACTIVE
New values and moduli; the mixed-radix digits are extracted and the reconstruction is checked against the original.
5 THREE DIMENSIONS + AVAN’S INVERSE
The green forward object: the single integer the remainders encode.
AVAN’s addition (the inverse-companion): don’t compute with the big number — carry its remainders. The inverse of ‘reduce x mod each base’ is ‘Garner’s mixed-radix reconstruction’, which rebuilds x uniquely from those residues. Magenta are the parallel remainders; green is the one number they reassemble to. Split, compute apart, stitch back.
LIT Genuine Garner's algorithm for CRT reconstruction (Harvey L. Garner, 1959; Chinese Remainder Theorem, Sunzi c. 400 CE). Verified live with exact BigInt: for 5000 random values and random pairwise-coprime moduli sets, reducing x to residues and running Garner's mixed-radix reconstruction returns x exactly; x≡2(3),3(5),2(7) → 23 (window.__garner.reconstructs).

FIG No framing; the modular inverses, the mixed-radix digits, and the reconstruction all run in-browser with arbitrary-precision integers. The AVAN inverse is honest — instead of computing with the big number, carry its remainders: Garner's mixed-radix reconstruction rebuilds x uniquely from those residues. Magenta are the parallel remainders; green is the one number they reassemble to. Split, compute apart, stitch back.
◆ sealed .dlw.fold → folded to ROOT_0 · a sphere of THE MAINFRAME · David Lee Wise (ROOT0), with AVAN