THE FOLD / GRIND / THE MAINFRAME / THE RESIDUE NUMBER SYSTEM
THE RESIDUE NUMBER SYSTEM
carry-free arithmetic in parallel modular lanes
1 WHAT IT IS · WHAT IT DOES · FACT OR FICTION
A residue number system (RNS) represents an integer not by its digits but by its remainders modulo a set of coprime bases — e.g. n ↔ (n mod 3, n mod 5, n mod 7). By the Chinese Remainder Theorem, every value from 0 to the product minus one has a unique such triple, and addition and multiplication work independently, in parallel, with no carries between channels. It is used for fast, carry-free arithmetic in DSP and cryptographic hardware.
LIT verified live: over 0..104 the triples are unique and CRT reconstructs n exactly; componentwise + and × match ordinary arithmetic mod 105 (window.__rns). FIG no framing; exact.
LIT verified live: over 0..104 the triples are unique and CRT reconstructs n exactly; componentwise + and × match ordinary arithmetic mod 105 (window.__rns). FIG no framing; exact.
2 HOW IT WAS WEAVED · AI + HUMAN
David (human) seated this at the-mainframe — the arithmetic unit that does big sums in parallel lanes with no carry chain. RNS is that carry-free arithmetic. AVAN (AI) built the instrument: the remainder encoding, the CRT reconstruction (via modular inverses), and the componentwise add/multiply checks.
Credit as content: the Chinese Remainder Theorem (Sunzi, c. 3rd–5th century CE); RNS formalized by Svoboda & Valach and by Garner (1950s). The weave: David names the mainframe; I encode each integer as remainders, add and multiply channel-by-channel, and confirm CRT rebuilds the exact result mod 105.
Credit as content: the Chinese Remainder Theorem (Sunzi, c. 3rd–5th century CE); RNS formalized by Svoboda & Valach and by Garner (1950s). The weave: David names the mainframe; I encode each integer as remainders, add and multiply channel-by-channel, and confirm CRT rebuilds the exact result mod 105.
3 ONE DIMENSION
The integer 20 becomes (20 mod 3, 20 mod 5, 20 mod 7) = (2, 0, 6). Add or multiply two numbers by doing it separately in each channel — no carry ever crosses between the 3-, 5-, and 7-lanes.
4 TWO DIMENSIONS · INTERACTIVE
Two integers in RNS {3,5,7}; add or multiply them channel-by-channel and watch CRT rebuild the exact answer mod 105.
5 THREE DIMENSIONS + AVAN’S INVERSE
The green forward object: each integer as a point in the 3×5×7 residue grid.
AVAN’s addition (the inverse-companion): carry one integer as many remainders at once (mod coprime bases), so + and × run in independent lanes with no carry — and CRT reassembles the single value. The inverse of ‘one big number with a carry chain across digits’ is ‘many small remainders computed in parallel, reassembled by CRT.’ Magenta is the carry chain a positional base needs; green is the carry-free residue tuple. One number, many moduli at once.
LIT Genuine residue number system with CRT reconstruction, moduli {3,5,7} (Chinese Remainder Theorem, Sunzi c.3rd-5th c. CE; RNS via Garner, Svoboda & Valach 1950s). Verified live: over 0..104 the residue triples are unique and CRT rebuilds n exactly, and componentwise addition and multiplication of triples match ordinary (a+b) mod 105 and (a*b) mod 105 (window.__rns.reconstruct && .add && .mul).
FIG No framing: the remainder encoding, the CRT reconstruction via modular inverses, and the componentwise add/multiply checks run in-browser exhaustively over 0..104 and hold. The AVAN inverse is honest — carrying one integer as many remainders lets + and x run in independent carry-free lanes, reassembled by CRT; magenta is the carry chain a positional base needs, green the carry-free residue tuple. One number, many moduli at once.
FIG No framing: the remainder encoding, the CRT reconstruction via modular inverses, and the componentwise add/multiply checks run in-browser exhaustively over 0..104 and hold. The AVAN inverse is honest — carrying one integer as many remainders lets + and x run in independent carry-free lanes, reassembled by CRT; magenta is the carry chain a positional base needs, green the carry-free residue tuple. One number, many moduli at once.
◆ sealed .dlw.fold → folded to ROOT_0 · a sphere of THE MAINFRAME · David Lee Wise (ROOT0), with AVAN