THE DE CASTELJAU

de Casteljau's algorithm in the 5-window house format — evaluate a Bezier curve by repeated linear interpolation: take the control points, interpolate each adjacent pair by parameter t to get one fewer point, and repeat until a single point remains — that point is on the curve. It is numerically stable and needs only midpoint-style blends, no polynomial powers. Remarkably, it computes exactly the same result as the Bernstein polynomial sum C(n,i) t^i (1-t)^(n-i) P_i. Verified live: over 300 random curves, de Casteljau's nested interpolation matches the Bernstein polynomial to floating precision (worst deviation ~1e-14). See the interpolation pyramid in 1D, a curve in 2D, and the blend-not-power inverse in 3D.

THE DE CASTELJAU · WORLD II — THE FOLD ◀ THE FOLD 0ROOT.AI // WORLD II · CO-OP · SPLIT SCREEN ◆ .dlw.fold THE FOLD / CO-OP / SPLIT SCREEN / THE DE CASTELJAU THE DE CASTELJAU a Bezier curve from nested interpolation 1 WHAT IT IS · WHAT IT DOES · FACT OR FICTION De Casteljau’s algorithm evaluates a Bézier curve by repeated linear interpolation : take the control points, interpolate each adjacent pair by the parameter t to get one fewer point, and repeat until a single point remains — that point is on the curve. It is numerically stable and needs only midpoint-style blends, no polynomial powers. Remarkably, it computes exactly the same result as the Bernstein polynomial ∑ C(n,i) t i (1−t) n−i P i . LIT verified live: over 300 random curves, de Casteljau’s nested interpolation matches the Bernstein polynomial to floating precision (worst deviation ~10 −14 ) — window.__decasteljau. FIG no framing; exact. 2 HOW IT WAS WEAVED · AI + HUMAN David (human) seated this at split-screen — the rendering pipeline where smooth curves are drawn from a few control points. De Casteljau is that curve evaluator. AVAN (AI) built the instrument: the nested lerp pyramid, the Bernstein-polynomial reference, and the agreement check. Credit as content: Paul de Casteljau (1959, at Citroën). The weave: David names split-screen; I collapse the control polygon by repeated interpolation and confirm the landing point equals the Bernstein-polynomial value exactly. 3 ONE DIMENSION Interpolate each adjacent pair of control points at fraction t, giving one fewer point. Repeat on the new points. The pyramid collapses to a single point — the curve at t. 4 TWO DIMENSIONS · INTERACTIVE A Bézier curve with its control polygon and the de Casteljau construction lines; the point is checked against the Bernstein polynomial. new curve ▶ verify 300 ▶ 5 THREE DIMENSIONS + AVAN’S INVERSE The green forward object: a smooth curve from nested midpoints. AVAN’s addition (the inverse-companion): evaluate a polynomial curve using only repeated interpolation — no powers, no binomial coefficients — collapsing the control polygon pair by pair. The inverse of ‘sum Bernstein terms with t i powers’ is ‘nest linear interpolations — stable, and exactly equal.’ Magenta is the power-hungry Bernstein sum; green is the interpolation pyramid. The same curve, built by blending. pause spin LIT Genuine de Casteljau algorithm (de Casteljau 1959). Verified live: over 300 random control polygons and 21 sample parameters each, the nested-interpolation result equals the Bernstein polynomial value to floating precision (worst deviation ~1e-14) (window.__decasteljau.matchesBernstein). FIG No framing: the nested lerp pyramid, the Bernstein-polynomial reference, and the agreement check run in-browser and match to machine precision. The AVAN inverse is honest — collapsing the control polygon by repeated interpolation evaluates the curve with no powers or binomials, stably, and exactly equal to Bernstein; magenta is the power-hungry Bernstein sum, green the interpolation pyramid. The same curve, built by blending. ◆ sealed .dlw.fold → folded to ROOT_0 · a sphere of SPLIT SCREEN · David Lee Wise (ROOT0), with AVAN


THE CONTINUED FRACTION

continued fractions in the 5-window house format — write a number as a0 + 1/(a1 + 1/(a2 + ...)), a ladder of nested reciprocals. For a rational p/q the ladder is finite and the integer parts [a0; a1, a2, ...] come straight from the Euclidean algorithm. Folding the ladder back up (the convergents) reconstructs p/q exactly, in lowest terms. Continued fractions give the best rational approximations of any number and underlie lattice reduction and Pell's equation. Verified live: over 500 random rationals, the continued fraction then reconstructed via convergents returns the exact reduced fraction. See the Euclidean quotients in 1D, the convergents in 2D, and the ladder inverse in 3D.

I-13 v2.0 | net = binds - k | 4 planes, 13 symbols, 12 operants, 5 cortex rules | sha 64881ebf

THE CONTINUED FRACTION · WORLD II — THE FOLD ◀ THE FOLD 0ROOT.AI // WORLD II · GRIND · THE HOT LOOP ◆ .dlw.fold THE FOLD / GRIND / THE HOT LOOP / THE CONTINUED FRACTION THE CONTINUED FRACTION a number as a ladder of nested reciprocals 1 WHAT IT IS · WHAT IT DOES · FACT OR FICTION A continued fraction writes a number as a 0 + 1/(a 1 + 1/(a 2 + …)) — a ladder of nested reciprocals. For a rational p/q the ladder is finite and the integer parts [a 0 ; a 1 , a 2 , …] come straight from the Euclidean algorithm . Folding the ladder back up (the “convergents”) reconstructs p/q exactly , in lowest terms. Continued fractions give the best rational approximations of any number and underlie lattice reduction and Pell’s equation. LIT verified live: over 500 random rationals, the continued fraction then reconstructed via convergents returns the exact reduced fraction (window.__contfrac). FIG no framing; exact integer arithmetic. 2 HOW IT WAS WEAVED · AI + HUMAN David (human) seated this at the-hot-loop — the Euclidean loop that peels a fraction into its integer parts. The continued fraction is what that loop is really computing. AVAN (AI) built the instrument: the Euclidean quotient sequence, the convergent fold-up, and the exact reconstruction check. Credit as content: continued fractions (Euclid’s algorithm, antiquity; theory by Wallis, Euler, Lagrange). The weave: David names the hot-loop; I read off the quotients as the fraction is reduced and fold them back into the exact reduced rational. 3 ONE DIMENSION 415/93: 415 = 4·93 + 43, so a 0 =4; then 93/43 gives a 1 =2; then 43/7 gives a 2 =6; then 7/1 gives a 3 =7. The quotients [4;2,6,7] are the continued fraction. 4 TWO DIMENSIONS · INTERACTIVE Any rational’s continued fraction and its convergents; the fold-up is checked to reconstruct the exact reduced fraction. new fraction ▶ verify 500 ▶ 5 THREE DIMENSIONS + AVAN’S INVERSE The green forward object: a number as a finite ladder of reciprocals. AVAN’s addition (the inverse-companion): express any rational as a ladder of integer parts and reciprocals — read straight off the Euclidean algorithm — whose fold-up reconstructs it exactly and gives the best rational approximations. The inverse of ‘a fraction is one ratio p/q’ is ‘a fraction is a finite ladder [a₀;a₁,a₂,…].’ Magenta is the single opaque ratio; green is the revealing ladder. Euclid’s algorithm, read as a number. pause spin LIT Genuine continued fractions (Euclid's algorithm; theory by Wallis, Euler, Lagrange). Verified live: over 500 random rationals p/q, reading the quotients of the Euclidean algorithm as the continued fraction and folding the convergents back up reconstructs the exact reduced fraction (window.__contfrac.reconstructs); 415/93 = [4;2,6,7]. FIG No framing: the Euclidean quotient sequence, the convergent fold-up, and the exact reconstruction check run in-browser over 500 rationals with exact integer arithmetic. The AVAN inverse is honest — expressing a rational as a ladder of integer parts and reciprocals (read off Euclid) reconstructs it exactly and gives the best rational approximations; magenta is the single opaque ratio, green the revealing ladder. Euclid's algorithm, read as a number. ◆ sealed .dlw.fold → folded to ROOT_0 · a sphere of THE HOT LOOP · David Lee Wise (ROOT0), with AVAN


THE ROPE

a rope in the 5-window house format — store a long string as a balanced binary tree whose leaves hold small pieces and whose internal nodes cache the length of their left subtree. This makes concatenation and splitting O(log n) — just re-link a few nodes, no copying — and indexing a walk down the tree using the cached lengths. It is the structure behind fast text editors and immutable string libraries, where inserting into a huge document must not copy it whole. Verified live: over 200 random strings, ropeIndex(i) returns the same character as the flat string at every position, and concatenating two ropes flattens to the exact concatenation (length and content). See the length-cache walk in 1D, a rope tree in 2D, and the no-copy inverse in 3D.

THE ROPE · WORLD II — THE FOLD ◀ THE FOLD 0ROOT.AI // WORLD II · LOOT · THE BOUNTY ◆ .dlw.fold THE FOLD / LOOT / THE BOUNTY / THE ROPE THE ROPE a long string as a balanced tree of pieces 1 WHAT IT IS · WHAT IT DOES · FACT OR FICTION A rope stores a long string as a balanced binary tree whose leaves hold small pieces and whose internal nodes cache the length of their left subtree. This makes concatenation and splitting O(log n) — just re-link a few nodes, no copying — and indexing a walk down the tree using the cached lengths. It is the structure behind fast text editors and immutable string libraries, where inserting into a huge document must not copy it whole. LIT verified live: over 200 random strings, ropeIndex(i) returns the same character as the flat string at every position, and concatenating two ropes flattens to the exact concatenation (length and content) — window.__rope. FIG no framing; exact. 2 HOW IT WAS WEAVED · AI + HUMAN David (human) seated this at the-bounty — the big reward of editing huge text cheaply: no whole-document copies. The rope is that reward. AVAN (AI) built the instrument: the balanced split into leaves, the left-length caches, the index walk, the O(1) concat, and the flatten cross-check. Credit as content: Boehm, Atkinson & Plass (“Ropes: an Alternative to Strings”, 1995). The weave: David names the-bounty; I break a string into a tree of pieces, walk the length caches to index any position, and confirm the tree flattens back to the exact string. 3 ONE DIMENSION Each internal node stores its left subtree’s length. To find character i: if i is less than the left length, go left; otherwise subtract it and go right. A few hops reach the leaf holding position i. 4 TWO DIMENSIONS · INTERACTIVE A string as a rope tree; index any position by walking the length caches, and concatenate two ropes without copying. new string ▶ verify 200 ▶ 5 THREE DIMENSIONS + AVAN’S INVERSE The green forward object: a string as a tree of pieces. AVAN’s addition (the inverse-companion): make concatenation and splitting O(log n) by storing a string as a balanced tree of pieces with cached subtree lengths — editing re-links nodes instead of copying characters. The inverse of ‘a string is one flat array you must copy to edit’ is ‘a string is a tree — concat and split by re-linking.’ Magenta is the whole-array copy you avoid; green is the piece tree. Editing text without copying it. pause spin LIT Genuine rope data structure (Boehm, Atkinson & Plass 1995). Verified live: over 200 random strings, indexing a position via the cached left-lengths returns the same character as the flat string at every position, and concatenating two ropes flattens to the exact concatenation with the correct total length (window.__rope.index && .concat). FIG No framing: the balanced split into leaves, the left-length caches, the index walk, the O(1) concat, and the flatten cross-check run in-browser and agree exactly. The AVAN inverse is honest — storing a string as a balanced tree of pieces with cached subtree lengths makes concat and split O(log n) by re-linking instead of copying; magenta is the whole-array copy you avoid, green the piece tree. Editing text without copying it. ◆ sealed .dlw.fold → folded to ROOT_0 · a sphere of THE BOUNTY · David Lee Wise (ROOT0), with AVAN


THE LDPC CODE

an LDPC code in the 5-window house format — low-density parity-check codes protect data with a sparse set of parity checks: a valid codeword c satisfies H*c = 0 (mod 2) for the parity-check matrix H. The classic bit-flipping decoder is beautifully simple: compute which checks fail, count for each bit how many failing checks it touches, and flip the bit in the most failing checks; repeat until all checks pass. LDPC codes approach the Shannon limit and protect Wi-Fi, 5G, and deep-space links. Verified live: over 400 valid codewords each hit by a single bit error, bit-flipping restores H*c = 0 and recovers the original codeword — 400/400. See the accused bit in 1D, a decode in 2D, and the self-repair inverse in 3D.

THE LDPC CODE · WORLD II — THE FOLD ◀ THE FOLD 0ROOT.AI // WORLD II · GLITCH · THE BLUE SCREEN ◆ .dlw.fold THE FOLD / GLITCH / THE BLUE SCREEN / THE LDPC CODE THE LDPC CODE a codeword that heals its own errors 1 WHAT IT IS · WHAT IT DOES · FACT OR FICTION An LDPC code (low-density parity-check) protects data with a sparse set of parity checks : a valid codeword c satisfies H·c = 0 (mod 2) for the parity-check matrix H. The classic bit-flipping decoder is beautifully simple: compute which checks fail, count for each bit how many failing checks it touches, and flip the bit in the most failing checks ; repeat until all checks pass. LDPC codes approach the Shannon limit and protect Wi-Fi, 5G, and deep-space links. LIT verified live: over 400 valid codewords each hit by a single bit error, bit-flipping restores H·c = 0 and recovers the original codeword — 400/400 (window.__ldpc). FIG the single-error case is exact for this code; heavier noise is not claimed. 2 HOW IT WAS WEAVED · AI + HUMAN David (human) seated this at the-blue-screen — the crash from corruption, here caught and healed before it shows. LDPC bit-flipping is that self-repair. AVAN (AI) built the instrument: the sparse parity-check matrix, the GF(2) null-space codeword generator, the syndrome, the flip-the-worst-bit loop, and the restore + recover check. Credit as content: Robert Gallager (LDPC codes, 1962). The weave: David names the blue-screen; I flip a bit, run the bit-flipping decoder, and confirm the parity checks pass again and the original codeword returns. 3 ONE DIMENSION A flipped bit makes every parity check it touches fail. That bit sits in more failing checks than any other — so flip the bit with the most failing checks, and the errors vanish. 4 TWO DIMENSIONS · INTERACTIVE A codeword, a single injected error, and the bit-flipping decoder restoring it; the syndrome and recovery are checked. new error ▶ verify 400 ▶ 5 THREE DIMENSIONS + AVAN’S INVERSE The green forward object: a codeword that heals its own errors. AVAN’s addition (the inverse-companion): let a message repair itself by attaching sparse parity checks — failing checks vote on which bit is wrong, and flipping the most-accused bit restores H·c=0. The inverse of ‘a corrupted bit is lost’ is ‘the parity checks vote it back — flip the most-accused bit.’ Magenta is the failing checks around the error; green is the healed codeword. Self-repair from a web of parities. pause spin LIT Genuine LDPC bit-flipping decoding (Gallager 1962). Verified live: over 400 valid codewords (from the GF(2) null space of a sparse H with distinct weight-3 columns) each corrupted by a single bit error, the bit-flipping decoder restores H*c = 0 and recovers the original codeword in all 400 trials (window.__ldpc.restored && .recovered). FIG Honestly scoped: single-error correction is exact for this code; heavier noise is NOT claimed (bit-flipping is a heuristic that can fail on many errors). The sparse parity-check matrix, the GF(2) null-space codeword generator, the syndrome, the flip-the-worst-bit loop, and the restore + recover check run in-browser. The AVAN inverse is honest — sparse parity checks vote on which bit is wrong, and flipping the most-accused bit restores H*c=0; magenta is the failing checks around the error, green the healed codeword. Self-repair from a web of parities. ◆ sealed .dlw.fold → folded to ROOT_0 · a sphere of THE BLUE SCREEN · David Lee Wise (ROOT0), with AVAN


THE BURROWS-WHEELER

the Burrows-Wheeler transform in the 5-window house format — reversibly reorder a string so similar characters cluster together (making it far more compressible), yet the original can be perfectly reconstructed from the transform plus one index. It takes the last column of the sorted table of all rotations of the string; astonishingly that scrambled last column holds enough to invert the whole thing. It is the heart of bzip2 and the FM-index. Verified live: over 200 random strings, inverting the BWT (last column + index) returns the exact original. See the sorted rotations in 1D, a transform+inverse in 2D, and the lossless-scramble inverse in 3D.

THE BURROWS-WHEELER · WORLD II — THE FOLD ◀ THE FOLD 0ROOT.AI // WORLD II · CO-OP · THE SYNC ◆ .dlw.fold THE FOLD / CO-OP / THE SYNC / THE BURROWS-WHEELER THE BURROWS-WHEELER a reversible scramble that makes text compress 1 WHAT IT IS · WHAT IT DOES · FACT OR FICTION The Burrows–Wheeler transform reversibly reorders a string so that similar characters cluster together — making it far more compressible — yet the original can be perfectly reconstructed from the transform plus one index. It takes the last column of the sorted table of all rotations of the string. Astonishingly, that last column, though scrambled, holds enough to invert the whole thing. It is the heart of bzip2 and of FM-index text search. LIT verified live: over 200 random strings, inverting the BWT (last column + index) returns the exact original (window.__bwt). FIG no framing; exact and lossless. 2 HOW IT WAS WEAVED · AI + HUMAN David (human) seated this at the-sync — a reversible reordering both sides can undo to recover the exact data. The BWT is that lossless scramble. AVAN (AI) built the instrument: the rotation table, the sort, the last-column extraction, the repeated-sort inversion, and the round-trip check. Credit as content: Michael Burrows & David Wheeler (1994). The weave: David names the-sync; I sort all rotations, take the last column, and rebuild the original by repeatedly prepending and sorting — confirming the scramble is perfectly reversible. 3 ONE DIMENSION “banana” → sort all 6 rotations → read the last column: nnbaaa . The a’s and n’s have clustered — more compressible — yet an index lets you invert it exactly. 4 TWO DIMENSIONS · INTERACTIVE A string, its rotation table sorted, the BWT last column, and the reconstruction — checked to return the original. new string ▶ verify 200 ▶ 5 THREE DIMENSIONS + AVAN’S INVERSE The green forward object: a reordering that clusters, yet fully inverts. AVAN’s addition (the inverse-companion): make a string more compressible without losing anything — sort its rotations and take the last column, which clusters like characters, and keep one index so the whole thing inverts. The inverse of ‘compress by finding patterns in place’ is ‘permute so patterns line up — reversibly.’ Magenta is the scattered original; green is the clustered, invertible transform. A lossless scramble that helps you pack. pause spin LIT Genuine Burrows-Wheeler transform (Burrows & Wheeler 1994). Verified live: over 200 random strings, taking the last column of the sorted rotation table (plus the original-row index) and inverting it by repeated prepend-and-sort returns the exact original string (window.__bwt.reversible); 'banana' -> 'nnbaaa'. FIG No framing: the rotation table, the sort, the last-column extraction, the repeated-sort inversion, and the round-trip check run in-browser and hold losslessly. The AVAN inverse is honest — sorting rotations and taking the last column clusters like characters (more compressible) while one index keeps it invertible; magenta is the scattered original, green the clustered invertible transform. A lossless scramble that helps you pack. ◆ sealed .dlw.fold → folded to ROOT_0 · a sphere of THE SYNC · David Lee Wise (ROOT0), with AVAN


THE SHAMIR SHARING

Shamir's secret sharing in the 5-window house format — split a secret into n shares so that any k of them reconstruct it exactly, but any k-1 reveal nothing at all. The trick: hide the secret as the constant term of a random degree-(k-1) polynomial over a finite field, and hand out points on it. k points pin down the polynomial (and its constant) by Lagrange interpolation; fewer leave the constant completely undetermined — every possible secret equally consistent. Verified live: over 200 schemes, every k-subset reconstructs the secret while k-1 shares leave it undetermined. See the polynomial through points in 1D, a k-of-n split in 2D, and the trust-split inverse in 3D.

THE SHAMIR SHARING · WORLD II — THE FOLD ◀ THE FOLD 0ROOT.AI // WORLD II · CHEAT · GOD MODE ◆ .dlw.fold THE FOLD / CHEAT / GOD MODE / THE SHAMIR SHARING THE SHAMIR SHARING split a secret so any k of n rebuild it, fewer learn nothing 1 WHAT IT IS · WHAT IT DOES · FACT OR FICTION Shamir’s secret sharing splits a secret into n shares so that any k of them reconstruct it exactly — but any k−1 reveal nothing at all . The trick: hide the secret as the constant term of a random degree-(k−1) polynomial over a finite field, and hand out points on it. k points pin down the polynomial (and its constant) by Lagrange interpolation; fewer leave the constant completely undetermined — every possible secret is equally consistent. LIT verified live: over 200 schemes, every k-subset of shares reconstructs the secret, while k−1 shares leave it undetermined (two different secrets both fit) — window.__shamir. FIG no framing; exact over GF(257). 2 HOW IT WAS WEAVED · AI + HUMAN David (human) seated this at god-mode — the power to split trust so no single holder can act alone, yet a quorum can. Shamir’s scheme is that split. AVAN (AI) built the instrument: the random polynomial over GF(257), the share evaluation, the Lagrange-at-zero reconstruction, and the threshold checks. Credit as content: Adi Shamir (1979). The weave: David names god-mode; I hide the secret in a polynomial’s constant term, hand out points, and confirm any k rebuild it while k−1 fix nothing. 3 ONE DIMENSION The secret is p(0) of a random polynomial of degree k−1. k points determine that polynomial uniquely (so p(0) is fixed); k−1 points fit infinitely many polynomials — every value of p(0) still possible. 4 TWO DIMENSIONS · INTERACTIVE A secret split into n shares; pick any k to reconstruct it, and see that k−1 leave it undetermined. new secret ▶ verify 200 ▶ 5 THREE DIMENSIONS + AVAN’S INVERSE The green forward object: a secret recoverable only by a quorum. AVAN’s addition (the inverse-companion): make a secret rebuildable by any k of n but by no fewer — hide it as a polynomial’s constant term and share points; k points pin the polynomial, k−1 leave it free. The inverse of ‘store the secret in one place’ is ‘scatter points of a polynomial — a quorum rebuilds it, a minority learns nothing.’ Magenta is the sub-threshold shares that reveal nothing; green is the reconstructing quorum. Trust split k-of-n. pause spin LIT Genuine Shamir secret sharing (Shamir 1979). Verified live over GF(257): across 200 schemes, every k-subset of the n shares reconstructs the secret exactly via Lagrange-at-zero, while any k-1 shares leave the secret undetermined (two different chosen p(0) values both fit) (window.__shamir.kReconstructs && .fewerUndetermined). FIG No framing: the random polynomial over GF(257), the share evaluation, the Lagrange-at-zero reconstruction, and the threshold checks run in-browser and hold. The AVAN inverse is honest — hiding the secret as a polynomial's constant term and sharing points makes it rebuildable by any k but by no fewer; magenta is the sub-threshold shares that reveal nothing, green the reconstructing quorum. Trust split k-of-n. ◆ sealed .dlw.fold → folded to ROOT_0 · a sphere of GOD MODE · David Lee Wise (ROOT0), with AVAN


THE NEVILLE

Neville's algorithm in the 5-window house format — evaluate the unique polynomial through a set of data points at a query x by a triangle of linear blends, never forming the polynomial explicitly. Start with the y-values; each step combines two neighboring lower-degree interpolants, weighted by distance to x, into one of higher degree, until a single value remains. It is numerically friendly and, like de Casteljau, replaces coefficients with repeated interpolation. Verified live: over 300 random datasets, Neville's value passes exactly through every data point and matches Lagrange interpolation at random x (to ~1e-13). See the blend triangle in 1D, an interpolating curve in 2D, and the no-coefficients inverse in 3D.

THE NEVILLE · WORLD II — THE FOLD ◀ THE FOLD 0ROOT.AI // WORLD II · SPAWN · THE TOOLCHAIN ◆ .dlw.fold THE FOLD / SPAWN / THE TOOLCHAIN / THE NEVILLE THE NEVILLE polynomial interpolation by a triangle of blends 1 WHAT IT IS · WHAT IT DOES · FACT OR FICTION Neville’s algorithm evaluates the unique polynomial through a set of data points at a query x — by a triangle of linear blends , never forming the polynomial explicitly. Start with the y-values; each step combines two neighboring lower-degree interpolants, weighted by distance to x, into one of higher degree, until a single value remains. It is numerically friendly and, like de Casteljau, replaces coefficients with repeated interpolation. LIT verified live: over 300 random datasets, Neville’s value passes exactly through every data point and matches the Lagrange interpolation at random x (to ~10 −13 ) — window.__neville. FIG no framing; exact. 2 HOW IT WAS WEAVED · AI + HUMAN David (human) seated this at the-toolchain — the numerical toolkit that fits a curve through points without solving a linear system. Neville’s algorithm is that fit. AVAN (AI) built the instrument: the interpolation triangle, the distance-weighted blends, the passes-through check, and the Lagrange cross-check. Credit as content: Eric Harold Neville (1934). The weave: David names the toolchain; I combine neighboring interpolants into higher-degree ones by distance-weighted blends and confirm the result passes through every point and equals the Lagrange value. 3 ONE DIMENSION Bottom row: the y-values (degree-0 interpolants). Each level up blends two adjacent entries by their distance to x, raising the degree. The apex is the interpolated value P(x). 4 TWO DIMENSIONS · INTERACTIVE Data points and the interpolating curve from Neville’s algorithm; it is checked to pass through every point and match Lagrange. new points ▶ verify 300 ▶ 5 THREE DIMENSIONS + AVAN’S INVERSE The green forward object: an interpolant built by a triangle of blends. AVAN’s addition (the inverse-companion): evaluate the interpolating polynomial without ever computing its coefficients — blend neighboring lower-degree interpolants by their distance to x, climbing a triangle to the answer. The inverse of ‘solve for polynomial coefficients, then evaluate’ is ‘blend interpolants pairwise up a triangle.’ Magenta is the linear system you never solve; green is the blending triangle. Interpolation without coefficients. pause spin LIT Genuine Neville's algorithm (Neville 1934). Verified live: over 300 random datasets, the distance-weighted interpolation triangle passes exactly through every data point and matches Lagrange interpolation at random query points (worst deviation ~1e-13) (window.__neville.passesThrough && .matchesLagrange). FIG No framing: the interpolation triangle, the distance-weighted blends, the passes-through check, and the Lagrange cross-check run in-browser and agree to machine precision. The AVAN inverse is honest — blending neighboring lower-degree interpolants up a triangle evaluates the interpolant with no coefficients; magenta is the linear system you never solve, green the blending triangle. Interpolation without coefficients. ◆ sealed .dlw.fold → folded to ROOT_0 · a sphere of THE TOOLCHAIN · David Lee Wise (ROOT0), with AVAN


THE BOOTH

Booth's algorithm in the 5-window house format — multiply two signed binary numbers directly in two's complement, with no special-casing of the sign. It recodes the multiplier by looking at adjacent bit pairs: a 0->1 boundary means subtract the multiplicand, a 1->0 boundary means add it, inside a run do nothing. A run of ones like 0111 becomes 'add once, subtract once' instead of three adds — fewer operations, and negatives handled for free. Verified live: over 2000 random 8-bit signed multipliers against arbitrary multiplicands, Booth recoding's result equals a*b exactly. See the bit-pair recoding in 1D, a recoded multiply in 2D, and the boundary-only inverse in 3D.

THE BOOTH · WORLD II — THE FOLD ◀ THE FOLD 0ROOT.AI // WORLD II · GRIND · THE MAINFRAME ◆ .dlw.fold THE FOLD / GRIND / THE MAINFRAME / THE BOOTH THE BOOTH signed multiplication by recoding the bits 1 WHAT IT IS · WHAT IT DOES · FACT OR FICTION Booth’s algorithm multiplies two signed binary numbers directly in two’s complement, with no special-casing of the sign. It recodes the multiplier by looking at adjacent bit pairs: a 0→1 boundary means subtract the multiplicand, a 1→0 boundary means add it, inside a run do nothing. A run of ones like 0111 becomes “add once, subtract once” instead of three adds — fewer operations, and negatives handled for free. LIT verified live: over 2000 random 8-bit signed multipliers against arbitrary multiplicands, Booth recoding’s result equals a·b exactly (window.__booth). FIG no framing; exact. 2 HOW IT WAS WEAVED · AI + HUMAN David (human) seated this at the-mainframe — the arithmetic unit that multiplies signed numbers in hardware. Booth’s algorithm is that multiplier’s trick. AVAN (AI) built the instrument: the bit-pair recoding into {−1,0,+1}, the shifted add/subtract sum, and the equals-a·b check. Credit as content: Andrew Donald Booth (1951). The weave: David names the mainframe; I recode the multiplier by its bit-pair boundaries and add or subtract the shifted multiplicand accordingly, confirming the total equals the signed product. 3 ONE DIMENSION Scan the multiplier’s bit pairs (bit i, bit i−1). Boundary 0→1 (reading low to high): the Booth digit is −1 (subtract shifted b); 1→0: +1 (add). A run of equal bits contributes 0. The signed sum is a·b. 4 TWO DIMENSIONS · INTERACTIVE A signed multiplier recoded into Booth digits; the shifted add/subtract sum is checked to equal a·b. new a,b ▶ verify 2000 ▶ 5 THREE DIMENSIONS + AVAN’S INVERSE The green forward object: a signed product from bit-pair recoding. AVAN’s addition (the inverse-companion): multiply signed numbers with no sign special-case and fewer adds by recoding the multiplier at its bit-pair boundaries — a run of ones collapses to one add and one subtract. The inverse of ‘add the multiplicand once per set bit (and fix up the sign)’ is ‘add/subtract at the edges of bit-runs — sign handled for free.’ Magenta is the per-set-bit adds you skip; green is the boundary-only add/subtract. Signed multiply by recoding. pause spin LIT Genuine Booth's multiplication algorithm (Booth 1951). Verified live: over 2000 random 8-bit signed multipliers a against arbitrary multiplicands b, recoding a into Booth digits {-1,0,+1} by its bit-pair boundaries and summing the shifted add/subtract of b equals the signed product a*b exactly (window.__booth.equalsProduct); -13x7 = -91. FIG No framing: the bit-pair recoding into {-1,0,+1}, the shifted add/subtract sum, and the equals-a*b check run in-browser over 2000 signed pairs and hold. The AVAN inverse is honest — recoding the multiplier at its bit-run boundaries collapses a run of ones to one add and one subtract, handling sign with no special case; magenta is the per-set-bit adds you skip, green the boundary-only add/subtract. Signed multiply by recoding. ◆ sealed .dlw.fold → folded to ROOT_0 · a sphere of THE MAINFRAME · David Lee Wise (ROOT0), with AVAN


THE FIBONACCI HEAP

the Fibonacci heap in the 5-window house format — a priority queue that makes insert and decrease-key cost only O(1) amortized, deferring all the real work to extract-min, which then lazily consolidates trees of equal degree. That fast decrease-key is what lets Dijkstra and Prim hit their best textbook bounds. It keeps a forest of heap-ordered trees and a pointer to the minimum root; the 'pay later' laziness is the whole idea. Verified live: over 100 random heaps, repeated extract-min returns the keys in exact sorted order. See the lazy insert in 1D, insert+extract in 2D, and the pay-later inverse in 3D.

THE FIBONACCI HEAP · WORLD II — THE FOLD ◀ THE FOLD 0ROOT.AI // WORLD II · BOSS · THE RAID ◆ .dlw.fold THE FOLD / BOSS / THE RAID / THE FIBONACCI HEAP THE FIBONACCI HEAP a priority queue that pays for order only when it must 1 WHAT IT IS · WHAT IT DOES · FACT OR FICTION The Fibonacci heap is a priority queue that makes insert and decrease-key cost only O(1) amortized , deferring all the real work to extract-min — which then lazily consolidates trees of equal degree. That fast decrease-key is what lets Dijkstra and Prim hit their best textbook bounds. It keeps a forest of heap-ordered trees and a pointer to the minimum root; the “pay later” laziness is the whole idea. LIT verified live: over 100 random heaps, repeated extract-min returns the keys in exact sorted order (window.__fibheap). FIG no framing; the ordering is exact (the O(1) amortized bound is cited, not timed). 2 HOW IT WAS WEAVED · AI + HUMAN David (human) seated this at the-raid — the priority queue that decides who goes next, cheaply, again and again. The Fibonacci heap is that queue. AVAN (AI) built the instrument: the root list, the O(1) insert/merge, the lazy consolidation by degree, and the sorted-extract check. Credit as content: Michael Fredman & Robert Tarjan (1984). The weave: David names the-raid; I insert lazily into a root forest and only consolidate equal-degree trees at extract-min, confirming the keys come out perfectly sorted. 3 ONE DIMENSION Insert just drops a node into the root list (O(1)). The debt is paid at extract-min: trees of equal degree are linked until all root degrees differ — a lazy binomial-like tidy-up. 4 TWO DIMENSIONS · INTERACTIVE Insert keys, then extract-min repeatedly; the output is checked to come out in sorted order. new heap ▶ extract-min ▶ verify 100 ▶ 5 THREE DIMENSIONS + AVAN’S INVERSE The green forward object: a lazy forest that sorts on demand. AVAN’s addition (the inverse-companion): make insert and decrease-key O(1) amortized by paying later — drop nodes into a root list and defer all restructuring to extract-min, which consolidates equal-degree trees. The inverse of ‘keep the heap tidy on every operation’ is ‘stay lazy, consolidate only when you must pop the min.’ Magenta is the eager tidying you skip; green is the lazy forest that sorts on demand. Pay for order only when you need it. pause spin LIT Genuine Fibonacci heap (Fredman & Tarjan 1984). Verified live: over 100 random heaps, inserting keys into the lazy root forest and repeatedly extracting the minimum (with consolidation of equal-degree trees) returns the keys in exact sorted order (window.__fibheap.sortedExtract). FIG The extract-min ordering is exact; the O(1) amortized bound is CITED, not timed. The root list, the O(1) insert/merge, the lazy consolidation by degree, and the sorted-extract check run in-browser and hold. The AVAN inverse is honest — dropping nodes into a root list and deferring all restructuring to extract-min makes insert and decrease-key O(1) amortized; magenta is the eager tidying you skip, green the lazy forest that sorts on demand. Pay for order only when you pop the min. ◆ sealed .dlw.fold → folded to ROOT_0 · a sphere of THE RAID · David Lee Wise (ROOT0), with AVAN


THE GRAHAM SCAN

the Graham scan in the 5-window house format — compute the convex hull of a set of points (the smallest convex polygon enclosing them all, like a rubber band snapped around nails). It sorts the points, then walks them keeping only left turns: whenever three consecutive points make a right turn, the middle one is popped. What remains is the hull, in O(n log n). It is a workhorse of computational geometry. Verified live: over 300 random point sets the hull is convex (every turn a left turn) and every input point lies inside or on it. See the turn test in 1D, a hull in 2D, and the rubber-band inverse in 3D.

THE GRAHAM SCAN · WORLD II — THE FOLD ◀ THE FOLD 0ROOT.AI // WORLD II · SPAWN · GENESIS BLOCK ◆ .dlw.fold THE FOLD / SPAWN / GENESIS BLOCK / THE GRAHAM SCAN THE GRAHAM SCAN the convex hull by keeping only left turns 1 WHAT IT IS · WHAT IT DOES · FACT OR FICTION The Graham scan computes the convex hull of a set of points — the smallest convex polygon enclosing them all, like a rubber band snapped around nails. It sorts the points, then walks them keeping only left turns : whenever three consecutive points make a right turn, the middle one is popped. What remains is the hull, in O(n log n). It is a workhorse of computational geometry — collision bounds, shape analysis, and more. LIT verified live: over 300 random point sets the hull is convex (every turn a left turn) and every input point lies inside or on it (window.__graham). FIG no framing; exact. 2 HOW IT WAS WEAVED · AI + HUMAN David (human) seated this at genesis-block — the first shape built from scattered points: the boundary that contains them all. The Graham scan is that boundary. AVAN (AI) built the instrument: the sort, the left-turn stack walk (monotone chain), the convexity check, and the contains-all-points check. Credit as content: Ronald Graham (1972). The weave: David names genesis-block; I sort the points and pop any right turn, keeping only left turns, and confirm the result is convex and encloses every input point. 3 ONE DIMENSION Walk the sorted points. Keep a stack; before adding a point, while the last three make a right turn (clockwise), pop the middle. Only left turns survive — the convex boundary. 4 TWO DIMENSIONS · INTERACTIVE Scattered points and their convex hull; the hull is checked to be convex and to contain every point. new points ▶ verify 300 ▶ 5 THREE DIMENSIONS + AVAN’S INVERSE The green forward object: the smallest convex boundary around the points. AVAN’s addition (the inverse-companion): find the tightest convex boundary by sorting and keeping only left turns — every right turn pops an interior point, like a rubber band contracting onto the outermost nails. The inverse of ‘test every subset for the enclosing polygon’ is ‘sort once, pop right turns — the hull falls out.’ Magenta is the interior points the band skips over; green is the hull vertices. The boundary from a single sorted sweep. pause spin LIT Genuine Graham scan / monotone-chain convex hull (Graham 1972; Andrew 1979). Verified live: over 300 random point sets, the sorted left-turn stack walk yields a hull where every consecutive triple turns left (convex) and every input point lies inside or on the hull (window.__graham.convex && .containsAll). FIG No framing: the sort, the left-turn stack walk, the convexity check, and the contains-all-points check run in-browser and hold. The AVAN inverse is honest — sorting and keeping only left turns (popping every right turn) contracts a rubber band onto the outermost points; magenta is the interior points skipped, green the hull vertices. The boundary from a single sorted sweep. ◆ sealed .dlw.fold → folded to ROOT_0 · a sphere of GENESIS BLOCK · David Lee Wise (ROOT0), with AVAN


THE RABIN-KARP

the Rabin-Karp algorithm in the 5-window house format — find a pattern in text using a rolling hash: hash the pattern once, then slide a window over the text, updating the window's hash in O(1) per step by removing the leaving character and adding the entering one (polynomial hashing modulo a large prime). Only when hashes match does it verify character-by-character. It shines at multi-pattern search and plagiarism detection. Verified live: over 300 random text/pattern pairs, the rolling-hash match positions (with verification) exactly equal a brute-force scan. See the rolling window in 1D, a search in 2D, and the fingerprint inverse in 3D.

THE RABIN-KARP · WORLD II — THE FOLD ◀ THE FOLD 0ROOT.AI // WORLD II · CO-OP · THE BROADCAST ◆ .dlw.fold THE FOLD / CO-OP / THE BROADCAST / THE RABIN-KARP THE RABIN-KARP string search by a rolling hash 1 WHAT IT IS · WHAT IT DOES · FACT OR FICTION The Rabin–Karp algorithm finds a pattern in text using a rolling hash : it hashes the pattern once, then slides a window over the text, updating the window’s hash in O(1) per step by removing the leaving character and adding the entering one — polynomial hashing modulo a large prime. Only when hashes match does it verify character-by-character. It shines at multi-pattern search and plagiarism detection. LIT verified live: over 300 random text/pattern pairs, the rolling-hash match positions (with match verification) exactly equal a brute-force scan (window.__rabinkarp). FIG no framing; exact (hashes filter, then confirm). 2 HOW IT WAS WEAVED · AI + HUMAN David (human) seated this at the-broadcast — scanning a stream for a signal, cheaply, one character at a time. Rabin–Karp is that scan. AVAN (AI) built the instrument: the polynomial hash, the O(1) roll (remove-add), the on-match verification, and the brute cross-check. Credit as content: Michael Rabin & Richard Karp (1987). The weave: David names the broadcast; I roll a modular hash across the text and, on every hash hit, confirm the characters — matching a direct scan exactly. 3 ONE DIMENSION Slide the window one step: subtract the departing character’s weighted value, multiply by the base, add the arriving character. The hash updates in O(1) — no re-reading the window. 4 TWO DIMENSIONS · INTERACTIVE A text and a pattern; the rolling hash flags candidate positions and confirms matches, checked against a brute scan. new search ▶ verify 300 ▶ 5 THREE DIMENSIONS + AVAN’S INVERSE The green forward object: matches found by a rolling fingerprint. AVAN’s addition (the inverse-companion): search for a pattern by a rolling fingerprint — update the window’s hash in O(1) as it slides, and only compare characters when fingerprints agree. The inverse of ‘re-read every window fully to compare’ is ‘keep a rolling hash, verify only on a hit.’ Magenta is the full comparisons skipped at non-matching windows; green is the confirmed matches. Search by a fingerprint that rolls. pause spin LIT Genuine Rabin-Karp rolling-hash search (Rabin & Karp 1987). Verified live: over 300 random text/pattern pairs, the polynomial rolling hash (updated O(1) per slide) with on-match character verification returns exactly the same match positions as a brute-force scan (window.__rabinkarp.matchesBrute). FIG No framing: the polynomial hash, the O(1) roll (remove-add), the on-match verification, and the brute cross-check run in-browser and agree exactly. The AVAN inverse is honest — a rolling fingerprint updated in O(1) as the window slides, with character comparison only on a hash hit, replaces full re-reading of every window; magenta is the comparisons skipped at non-matching windows, green the confirmed matches. Search by a fingerprint that rolls. ◆ sealed .dlw.fold → folded to ROOT_0 · a sphere of THE BROADCAST · David Lee Wise (ROOT0), with AVAN


THE TEA CIPHER

TEA (the Tiny Encryption Algorithm) in the 5-window house format — a block cipher famous for being tiny (a few lines) yet a real Feistel-style cipher. It encrypts a 64-bit block with a 128-bit key over 32 rounds, each mixing the two halves with shifts, additions, and XORs and a magic constant (the golden-ratio delta 0x9E3779B9). Decryption runs the same operations in reverse. Its simplicity made it a teaching classic (and spurred XTEA after weaknesses were found). Verified live: over 500 random blocks and keys, decrypt(encrypt(x)) returns x exactly, and the ciphertext differs from the plaintext. See a round in 1D, an encrypt/decrypt in 2D, and the add-shift-xor inverse in 3D.

THE TEA CIPHER · WORLD II — THE FOLD ◀ THE FOLD 0ROOT.AI // WORLD II · CHEAT · NOCLIP ◆ .dlw.fold THE FOLD / CHEAT / NOCLIP / THE TEA CIPHER THE TEA CIPHER a whole block cipher from add, shift, xor 1 WHAT IT IS · WHAT IT DOES · FACT OR FICTION TEA (the Tiny Encryption Algorithm) is a block cipher famous for being tiny — a few lines of code — yet a real Feistel-style cipher. It encrypts a 64-bit block with a 128-bit key over 32 rounds, each round mixing the two halves with shifts, additions, and XORs and a magic constant (the golden-ratio-derived delta 0x9E3779B9). Decryption runs the same operations in reverse. Its extreme simplicity made it a teaching classic (and later spurred XTEA after weaknesses were found). LIT verified live: over 500 random blocks and keys, decrypt(encrypt(x)) returns x exactly, and the ciphertext differs from the plaintext (window.__tea). FIG exact round-trip; this is a toy cipher, not modern security. 2 HOW IT WAS WEAVED · AI + HUMAN David (human) seated this at noclip — the cheat that slips through walls, here a cipher small enough to memorize yet real enough to lock a block. TEA is that pocket-sized lock. AVAN (AI) built the instrument: the 32-round add/shift/xor Feistel mix, the delta constant, the reverse-round decryption, and the round-trip check (uint32 arithmetic). Credit as content: David Wheeler & Roger Needham (1994). The weave: David names noclip; I run the shift-add-xor rounds forward to encrypt and backward to decrypt, confirming the block returns exactly. 3 ONE DIMENSION Each round nudges sum by delta, then updates each half from the other via ((half<<4)+key) XOR (half+sum) XOR ((half>>5)+key). Shift, add, xor — that is the whole cipher. 4 TWO DIMENSIONS · INTERACTIVE A 64-bit block encrypted under a key, then decrypted; the round-trip is checked to return the original. new block+key ▶ verify 500 ▶ 5 THREE DIMENSIONS + AVAN’S INVERSE The green forward object: a full cipher from three operations. AVAN’s addition (the inverse-companion): lock a block with only shifts, additions, and XORs — 32 Feistel rounds mixing two halves so decryption is just the rounds run backward. The inverse of ‘a cipher needs S-boxes and big tables’ is ‘add, shift, xor, repeat — and reverse to unlock.’ Magenta is the heavy machinery a big cipher uses; green is the pocket-sized round. Encryption from add-shift-xor. (Toy cipher — not production security.) pause spin LIT Genuine Tiny Encryption Algorithm (Wheeler & Needham 1994). Verified live: over 500 random 64-bit blocks and 128-bit keys, the 32-round add/shift/xor Feistel cipher satisfies decrypt(encrypt(x)) == x exactly (uint32 arithmetic), and the ciphertext differs from the plaintext (window.__tea.roundTrip && .diffuses). FIG Exact round-trip; honestly labelled a TOY cipher, not modern security (TEA has known weaknesses that led to XTEA). The 32-round Feistel mix, the delta constant, the reverse-round decryption, and the round-trip check run in-browser and hold. The AVAN inverse is honest — 32 Feistel rounds of shift/add/xor mixing two halves make decryption just the rounds reversed; magenta is the heavy machinery a big cipher uses, green the pocket-sized round. Encryption from add-shift-xor. ◆ sealed .dlw.fold → folded to ROOT_0 · a sphere of NOCLIP · David Lee Wise (ROOT0), with AVAN


THE LLOYD

Lloyd's algorithm (k-means) in the 5-window house format — pick k centers, then alternate two steps: assign each point to its nearest center, and update each center to the mean of its assigned points. Repeat until nothing moves. Each step can only lower the total squared distance (the distortion), so it converges monotonically to a local optimum. It is the workhorse of clustering, quantization, and color reduction. Verified live: over 80 runs, every updated center is exactly the mean of its assigned points, and the distortion is non-increasing at every step. See the two moves in 1D, settling clusters in 2D, and the move-to-mean inverse in 3D.

THE LLOYD · WORLD II — THE FOLD ◀ THE FOLD 0ROOT.AI // WORLD II · GRIND · GRADIENT DESCENT ◆ .dlw.fold THE FOLD / GRIND / GRADIENT DESCENT / THE LLOYD THE LLOYD k-means: cluster by moving to the mean 1 WHAT IT IS · WHAT IT DOES · FACT OR FICTION Lloyd’s algorithm is the classic k-means loop: pick k centers, then alternate two steps — assign each point to its nearest center, and update each center to the mean of its assigned points. Repeat until nothing moves. Each step can only lower the total squared distance (the distortion), so it converges monotonically to a local optimum. It is the workhorse of clustering, quantization, and color reduction. LIT verified live: over 80 runs, every updated center is exactly the mean of its assigned points, and the distortion is non-increasing at every step (window.__lloyd). FIG no framing; exact (converges to a local optimum, not necessarily global). 2 HOW IT WAS WEAVED · AI + HUMAN David (human) seated this at gradient-descent — the downhill loop, here descending the clustering distortion two moves at a time. Lloyd’s algorithm is that descent. AVAN (AI) built the instrument: the nearest-center assignment, the mean update, the distortion measure, the centroid-is-mean check, and the monotone-decrease check. Credit as content: Stuart Lloyd (1957, published 1982). The weave: David names gradient-descent; I alternate assign and update, confirming each center becomes the mean of its cluster and the distortion never rises. 3 ONE DIMENSION Two alternating moves. Assign : color each point by its nearest center. Update : slide each center to the average of its colored points. Neither move can raise the total squared distance. 4 TWO DIMENSIONS · INTERACTIVE Points and k centers; step the assign/update loop and watch clusters settle, distortion falling each step. step ▶ new points ▶ verify 80 ▶ 5 THREE DIMENSIONS + AVAN’S INVERSE The green forward object: clusters settling to their means. AVAN’s addition (the inverse-companion): cluster points by alternating assign-to-nearest and move-center-to-mean — each move only lowers the total squared distance, so it converges. The inverse of ‘search all groupings for the best clustering’ is ‘alternate two easy steps downhill — distortion never rises.’ Magenta is the combinatorial search you avoid; green is the settling centers. Clustering by moving to the mean. pause spin LIT Genuine Lloyd's k-means algorithm (Lloyd 1957, pub. 1982). Verified live: over 80 runs, each updated center equals exactly the mean of its assigned points, and the distortion (sum of squared distances) is non-increasing at every assign and update step (window.__lloyd.centroidIsMean && .distortionMonotone). FIG Exact per-step facts; honestly notes convergence is to a LOCAL optimum, not necessarily global. The nearest-center assignment, the mean update, the distortion measure, the centroid-is-mean check, and the monotone-decrease check run in-browser and hold. The AVAN inverse is honest — alternating assign-to-nearest and move-to-mean descends the distortion monotonically; magenta is the combinatorial search avoided, green the settling centers. Clustering by moving to the mean. ◆ sealed .dlw.fold → folded to ROOT_0 · a sphere of GRADIENT DESCENT · David Lee Wise (ROOT0), with AVAN


THE FREIVALDS

Freivalds' algorithm in the 5-window house format — check whether a claimed matrix product A*B = C is correct in O(n^2), far faster than the O(n^3) to recompute A*B. The trick: pick a random 0/1 vector r and test whether A(Br) = Cr. If A*B = C the test always passes; if not, it fails with probability >= 1/2 each round, so a few rounds catch any error with overwhelming confidence. It is the seminal randomized verifier. Verified live: over 200 trials the correct product passes all rounds, and a product with a single wrong entry is caught within 10 rounds. See the random probe in 1D, an accept/reject in 2D, and the check-without-redoing inverse in 3D.

THE FREIVALDS · WORLD II — THE FOLD ◀ THE FOLD 0ROOT.AI // WORLD II · BOSS · THE FIREWALL ◆ .dlw.fold THE FOLD / BOSS / THE FIREWALL / THE FREIVALDS THE FREIVALDS verify a matrix product in O(n^2) with a random probe 1 WHAT IT IS · WHAT IT DOES · FACT OR FICTION Freivalds’ algorithm checks whether a claimed matrix product A·B = C is correct in O(n 2 ) — far faster than the O(n 3 ) it would take to recompute A·B. The trick: pick a random 0/1 vector r and test whether A(Br) = Cr. If A·B = C the test always passes ; if not, it fails with probability ≥ ½ each round, so a few rounds catch any error with overwhelming confidence. It is the seminal example of a randomized verifier . LIT verified live: over 200 trials the correct product passes all rounds, and a product with a single wrong entry is caught within 10 rounds (window.__freivalds). FIG one-sided error: correct always passes; wrong caught with high probability. 2 HOW IT WAS WEAVED · AI + HUMAN David (human) seated this at the-firewall — the guard that verifies a claim cheaply rather than redoing the work. Freivalds’ algorithm is that guard for matrix products. AVAN (AI) built the instrument: the random 0/1 probe vector, the three matrix–vector products, the pass/fail test, and the correct-always-passes / wrong-caught checks. Credit as content: Rūsiņš Freivalds (1977). The weave: David names the firewall; I probe A(Br) against Cr with a random vector and confirm a true product always passes while a corrupted one is caught fast. 3 ONE DIMENSION Instead of forming A·B (O(n 3 )), pick random r and compute A(Br) and Cr — three matrix×vector products (O(n 2 )). If they ever differ, C is wrong; each round independently catches an error with probability ≥ ½. 4 TWO DIMENSIONS · INTERACTIVE A claimed product C (sometimes corrupted); Freivalds’ random-vector test accepts the correct one and rejects the wrong one. toggle correct/wrong ▶ verify 200 ▶ 5 THREE DIMENSIONS + AVAN’S INVERSE The green forward object: a product verified without recomputing it. AVAN’s addition (the inverse-companion): verify a matrix product in O(n 2 ) by probing with a random vector — a correct product always passes A(Br)=Cr, a wrong one fails at least half the time, so a few rounds suffice. The inverse of ‘recompute A·B to check C’ is ‘probe with random r — cheap, one-sided, and confident.’ Magenta is the O(n 3 ) recomputation you skip; green is the O(n 2 ) random probe. Checking without redoing. pause spin LIT Genuine Freivalds' algorithm (Freivalds 1977). Verified live: over 200 trials, a correct product C=A*B passes all 10 random-vector rounds, and a product with a single corrupted entry is caught (rejected) within 10 rounds (window.__freivalds.correctPasses; wrongCaught/wrongTotal). FIG One-sided error, honestly stated: a correct product ALWAYS passes; a wrong product is caught only with high probability (>= 1/2 per round). The random 0/1 probe vector, the three matrix-vector products, the pass/fail test, and the correct-passes / wrong-caught checks run in-browser and hold. The AVAN inverse is honest — probing A(Br) against Cr with a random vector verifies the product in O(n^2); magenta is the O(n^3) recomputation skipped, green the O(n^2) probe. Checking without redoing. ◆ sealed .dlw.fold → folded to ROOT_0 · a sphere of THE FIREWALL · David Lee Wise (ROOT0), with AVAN


THE STEIN

Stein's binary GCD in the 5-window house format — compute the greatest common divisor using only subtraction, comparison, and bit shifts, no division or modulo (slow in hardware). It rests on three facts: gcd(2a,2b)=2*gcd(a,b), gcd(2a,b)=gcd(a,b) when b is odd, and gcd(a,b)=gcd(|a-b|,min(a,b)) for two odds. Strip common factors of two, halve evens, subtract odds, restore the twos at the end. It is the GCD of choice on hardware without a divide unit. Verified live: over 3000 random pairs, Stein's shift-and-subtract GCD equals the Euclidean GCD exactly. See a reduction trace in 1D, a computed GCD in 2D, and the division-free inverse in 3D.

THE STEIN · WORLD II — THE FOLD ◀ THE FOLD 0ROOT.AI // WORLD II · GRIND · THE GRINDSTONE ◆ .dlw.fold THE FOLD / GRIND / THE GRINDSTONE / THE STEIN THE STEIN GCD with only shifts and subtractions 1 WHAT IT IS · WHAT IT DOES · FACT OR FICTION Stein’s algorithm (binary GCD) computes the greatest common divisor using only subtraction, comparison, and bit shifts — no division or modulo , which are slow in hardware. It rests on three facts: gcd(2a,2b)=2·gcd(a,b), gcd(2a,b)=gcd(a,b) when b is odd, and gcd(a,b)=gcd(|a−b|,min(a,b)) for two odds. Strip common factors of two, halve evens, subtract odds, restore the twos at the end. It is the GCD of choice on hardware without a divide unit. LIT verified live: over 3000 random pairs, Stein’s shift-and-subtract GCD equals the Euclidean GCD exactly (window.__stein). FIG no framing; exact. 2 HOW IT WAS WEAVED · AI + HUMAN David (human) seated this at the-grindstone — the reduction loop, here grinding a GCD out of shifts and subtractions with no divider in sight. Stein’s algorithm is that division-free grind. AVAN (AI) built the instrument: the common-power-of-two strip, the halving of evens, the subtract-of-odds loop, the shift-back, and the equals-Euclid check. Credit as content: Josef Stein (1967; the method is older, Roman-era). The weave: David names the grindstone; I remove shared twos, halve even operands, subtract the smaller odd from the larger, and confirm the result matches the Euclidean GCD. 3 ONE DIMENSION gcd(48, 36): both even → factor out 4, leaving gcd(12,9). 12 is even → halve to gcd(6,9), then gcd(3,9). Two odds → subtract: gcd(3,6)→gcd(3,3)→3. Restore ×4 → 12. 4 TWO DIMENSIONS · INTERACTIVE Two numbers reduced by Stein’s shifts and subtractions; the result is checked against the Euclidean GCD. new pair ▶ verify 3000 ▶ 5 THREE DIMENSIONS + AVAN’S INVERSE The green forward object: a GCD from shifts and subtractions alone. AVAN’s addition (the inverse-companion): compute a GCD with no division — strip shared factors of two, halve even operands, subtract the smaller odd from the larger, restore the twos. The inverse of ‘GCD needs the modulo of the Euclidean algorithm’ is ‘shift and subtract — no divider required.’ Magenta is the division the Euclidean loop uses; green is the shift-and-subtract path. GCD for hardware without divide. pause spin LIT Genuine Stein binary GCD (Stein 1967; the method is ancient). Verified live: over 3000 random pairs, stripping shared factors of two, halving even operands, and subtracting the smaller odd from the larger yields exactly the Euclidean GCD (window.__stein.equalsEuclid); gcd(1071,462)=21. FIG No framing: the common-power-of-two strip, the halving of evens, the subtract-of-odds loop, the shift-back, and the equals-Euclid check run in-browser and hold. The AVAN inverse is honest — removing shared twos, halving evens, and subtracting odds computes the GCD with no division; magenta is the division the Euclidean loop uses, green the shift-and-subtract path. GCD for hardware without a divide unit. ◆ sealed .dlw.fold → folded to ROOT_0 · a sphere of THE GRINDSTONE · David Lee Wise (ROOT0), with AVAN


THE CONSISTENT HASHING

consistent hashing in the 5-window house format — map keys to servers so that adding or removing a server moves only a small fraction of keys (roughly 1/n) instead of remapping everything as plain modulo hashing would. Nodes and keys are placed on a hash ring; a key belongs to the first node clockwise from it. Remove a node and only its keys spill to the next; everyone else stays put. Virtual nodes smooth the load. It is the backbone of distributed caches and databases. Verified live: over 50 rings, every key maps to a node, and removing a node moves only that node's keys. See the ring in 1D, a node drop in 2D, and the churn-without-chaos inverse in 3D.

THE CONSISTENT HASHING · WORLD II — THE FOLD ◀ THE FOLD 0ROOT.AI // WORLD II · CO-OP · SHARED MEMORY ◆ .dlw.fold THE FOLD / CO-OP / SHARED MEMORY / THE CONSISTENT HASHING THE CONSISTENT HASHING node churn that moves only ~1/n of the keys 1 WHAT IT IS · WHAT IT DOES · FACT OR FICTION Consistent hashing maps keys to servers so that adding or removing a server moves only a small fraction of keys — roughly 1/n — instead of remapping everything as plain modulo hashing would. Nodes and keys are placed on a hash ring ; a key belongs to the first node clockwise from it. Remove a node and only its keys spill to the next node; everyone else stays put. Virtual nodes smooth the load. It is the backbone of distributed caches and databases. LIT verified live: over 50 rings, every key maps to a node, and removing a node moves only that node’s keys — all others are unchanged (window.__consistent). FIG no framing; exact. 2 HOW IT WAS WEAVED · AI + HUMAN David (human) seated this at shared-memory — the shared store spread across nodes that come and go, where reshuffling everything on each change would be ruinous. Consistent hashing is that graceful spread. AVAN (AI) built the instrument: the hash ring with virtual nodes, the clockwise lookup, and the only-removed-node-moves check. Credit as content: David Karger et al. (1997). The weave: David names shared-memory; I place nodes and keys on a ring, map each key to the next node clockwise, and confirm that removing a node disturbs only the keys it held. 3 ONE DIMENSION Nodes sit at hashed positions around a ring. A key hashes to a spot and walks clockwise to the first node. Remove that node and its keys walk on to the next node — nobody else’s keys move. 4 TWO DIMENSIONS · INTERACTIVE Keys on a hash ring of nodes; remove a node and watch only its keys move, checked against a full re-map. new ring ▶ drop a node ▶ verify 50 ▶ 5 THREE DIMENSIONS + AVAN’S INVERSE The green forward object: keys mapped to nodes around a ring. AVAN’s addition (the inverse-companion): make node churn cheap by placing keys and nodes on a ring and mapping each key to the next node clockwise — so adding or removing a node moves only ~1/n of the keys. The inverse of ‘hash mod n, so every key remaps when n changes’ is ‘a ring, where only the neighbors of a change move.’ Magenta is the full reshuffle plain hashing forces; green is the local, ~1/n movement. Churn without chaos. pause spin LIT Genuine consistent hashing (Karger et al. 1997). Verified live: over 50 rings (each node given 40 virtual nodes), every key maps to a node via clockwise lookup, and removing a node moves ONLY the keys that node held — every other key's assignment is unchanged (window.__consistent.allMapped && .onlyRemovedMoves). FIG No framing: the hash ring with virtual nodes, the clockwise lookup, and the only-removed-node-moves check run in-browser and hold. The AVAN inverse is honest — placing keys and nodes on a ring and mapping each key to the next node clockwise makes node churn move only ~1/n of the keys; magenta is the full reshuffle plain mod-n hashing forces, green the local movement. Churn without chaos. ◆ sealed .dlw.fold → folded to ROOT_0 · a sphere of SHARED MEMORY · David Lee Wise (ROOT0), with AVAN


THE MARCHING SQUARES

marching squares in the 5-window house format — extract a contour (isoline) from a grid of scalar values. For each cell it looks at which of the four corners are above the threshold: a 4-bit case index (0-15) selects, from a small lookup table, which cell edges the contour crosses. The exact crossing point on each edge is found by linear interpolation between the two corner values. Stitched together, the segments trace the level set. It is how weather maps draw isobars and metaballs get outlines. Verified live: over 60 random fields, every contour vertex sits on a grid edge whose two endpoints straddle the threshold. See a cell case in 1D, a contour in 2D, and the interpolated-crossing inverse in 3D.

THE MARCHING SQUARES · WORLD II — THE FOLD ◀ THE FOLD 0ROOT.AI // WORLD II · SPAWN · FIRST LIGHT ◆ .dlw.fold THE FOLD / SPAWN / FIRST LIGHT / THE MARCHING SQUARES THE MARCHING SQUARES trace an isoline through a grid of values 1 WHAT IT IS · WHAT IT DOES · FACT OR FICTION Marching squares extracts a contour — an isoline — from a grid of scalar values. For each cell it looks at which of the four corners are above the threshold: a 4-bit case index (0–15) selects, from a small lookup table, which cell edges the contour crosses. The exact crossing point on each edge is found by linear interpolation between the two corner values. Stitched together, the segments trace the level set. It is how weather maps draw isobars and how metaballs get their outlines. LIT verified live: over 60 random fields, every contour vertex sits on a grid edge whose two endpoints straddle the threshold (one above, one below) — window.__marching. FIG no framing; exact. 2 HOW IT WAS WEAVED · AI + HUMAN David (human) seated this at first-light — the first outline drawn from a field of values, the boundary between above and below. Marching squares is that outline. AVAN (AI) built the instrument: the 4-corner case index, the edge lookup, the linear-interpolation crossing, and the every-vertex-on-a-straddling-edge check. Credit as content: marching squares (the 2-D case of Lorensen & Cline’s marching cubes, 1987). The weave: David names first-light; I classify each cell by its corners, interpolate the crossing on each straddling edge, and confirm every contour vertex lies exactly where the field crosses the level. 3 ONE DIMENSION A cell’s four corners are each above (1) or below (0) the threshold — a 4-bit index. The contour crosses exactly the edges whose two ends disagree, at the linearly-interpolated level-crossing point. 4 TWO DIMENSIONS · INTERACTIVE A scalar field and its contour at a threshold; every contour vertex is checked to sit on a straddling edge. new field ▶ threshold ▶ verify 60 ▶ 5 THREE DIMENSIONS + AVAN’S INVERSE The green forward object: the isoline threading the grid. AVAN’s addition (the inverse-companion): draw the boundary between above and below by reading each cell’s four corners as a case index and interpolating the crossing on every straddling edge. The inverse of ‘sample the field densely and threshold each pixel’ is ‘classify cells, interpolate crossings — a crisp isoline.’ Magenta is the jagged per-pixel threshold; green is the interpolated contour. The level set, threaded through a grid. pause spin LIT Genuine marching squares (the 2-D case of Lorensen & Cline's marching cubes 1987). Verified live: over 60 random scalar fields, every contour vertex produced sits on a grid edge whose two endpoints straddle the threshold (one above, one below), at the linearly-interpolated crossing (window.__marching.allOnStraddle). FIG No framing: the 4-corner case index, the edge lookup, the linear-interpolation crossing, and the every-vertex-on-a-straddling-edge check run in-browser and hold. The AVAN inverse is honest — classifying each cell by its corners and interpolating the crossing on every straddling edge traces a crisp isoline; magenta is the jagged per-pixel threshold, green the interpolated contour. The level set, threaded through a grid. ◆ sealed .dlw.fold → folded to ROOT_0 · a sphere of FIRST LIGHT · David Lee Wise (ROOT0), with AVAN


THE CATMULL-ROM

the Catmull-Rom spline in the 5-window house format — an interpolating cubic curve: unlike a Bezier, it passes exactly through every control point, using each point's neighbors to set the tangent there. Each segment between Pi and Pi+1 is a cubic in t with C(0)=Pi and C(1)=Pi+1, and the tangent at Pi is (Pi+1 - Pi-1)/2. It gives smooth, natural-looking paths, which is why it is everywhere in animation and camera motion. Verified live: over 300 random point sets, each segment's endpoints land exactly on the two control points it spans. See a segment in 1D, a curve in 2D, and the interpolating inverse in 3D.

THE CATMULL-ROM · WORLD II — THE FOLD ◀ THE FOLD 0ROOT.AI // WORLD II · RESPAWN · THE CONTINUE ◆ .dlw.fold THE FOLD / RESPAWN / THE CONTINUE / THE CATMULL-ROM THE CATMULL-ROM a smooth spline through every control point 1 WHAT IT IS · WHAT IT DOES · FACT OR FICTION The Catmull–Rom spline is an interpolating cubic curve: unlike a Bézier, it passes exactly through every control point, using each point’s neighbors to set the tangent there. Each segment between P i and P i+1 is a cubic in t with C(0)=P i and C(1)=P i+1 , and the tangent at P i is (P i+1 −P i−1 )/2. It gives smooth, natural-looking paths, which is why it is everywhere in animation and camera motion. LIT verified live: over 300 random point sets, each segment’s endpoints land exactly on the two control points it spans (the curve interpolates them) — window.__catmullrom. FIG no framing; exact. 2 HOW IT WAS WEAVED · AI + HUMAN David (human) seated this at the-continue — the smooth carry-on through every waypoint, no corner missed. The Catmull–Rom spline is that continuation. AVAN (AI) built the instrument: the cubic basis with neighbor-set tangents, the segment evaluation, and the passes-through-every-control-point check. Credit as content: Edwin Catmull & Raphael Rom (1974). The weave: David names the-continue; I build each cubic segment so its ends sit on consecutive control points, and confirm the curve threads exactly through them all. 3 ONE DIMENSION Between P i and P i+1 , the segment starts at P i and ends at P i+1 ; its tangent at P i points along P i+1 −P i−1 . Neighbors shape the curve; the point itself is always hit. 4 TWO DIMENSIONS · INTERACTIVE Control points and the Catmull–Rom curve through them; each segment is checked to start and end exactly on its control points. new points ▶ verify 300 ▶ 5 THREE DIMENSIONS + AVAN’S INVERSE The green forward object: a smooth curve hitting every waypoint. AVAN’s addition (the inverse-companion): make a smooth curve that passes through every control point (not just near it) by setting each point’s tangent from its neighbors — (P i+1 −P i−1 )/2. The inverse of ‘a Bézier only approaches its control points’ is ‘an interpolating spline hits every one, neighbors shaping the tangents.’ Magenta is the control points a Bézier misses; green is the curve threading them all. Smoothness that never skips a waypoint. pause spin LIT Genuine Catmull-Rom spline (Catmull & Rom 1974). Verified live: over 300 random point sets, each cubic segment evaluated at t=0 and t=1 lands exactly on the two consecutive control points it spans (the curve interpolates every control point) — window.__catmullrom.passesThrough, worst deviation 0. FIG No framing: the cubic basis with neighbor-set tangents, the segment evaluation, and the passes-through-every-control-point check run in-browser and hold exactly. The AVAN inverse is honest — setting each point's tangent from its neighbors ((Pi+1 - Pi-1)/2) makes the spline pass through every control point, not just near it; magenta is the control points a Bezier only approaches, green the curve threading them all. Smoothness that never skips a waypoint. ◆ sealed .dlw.fold → folded to ROOT_0 · a sphere of THE CONTINUE · David Lee Wise (ROOT0), with AVAN


THE BARRETT

Barrett reduction in the 5-window house format — compute x mod n without dividing, replacing the expensive division with one multiplication and a shift using a precomputed constant mu = floor(4^k/n) (k = bit length of n). The quotient is estimated as floor(x*mu / 4^k), then x - q*n is corrected by at most two subtractions. For inputs x < n^2 (a modular product), this is exact. It is a cornerstone of fast modular exponentiation in RSA and elliptic-curve crypto, where the modulus is fixed and reused millions of times. Verified live: over thousands of pairs with x < n^2, Barrett reduction equals x mod n exactly, needing at most 2 corrections. See the multiply-shift steps in 1D, a reduction in 2D, and the no-divide inverse in 3D.

THE BARRETT · WORLD II — THE FOLD ◀ THE FOLD 0ROOT.AI // WORLD II · CHEAT · THE SPEEDRUN ◆ .dlw.fold THE FOLD / CHEAT / THE SPEEDRUN / THE BARRETT THE BARRETT reduce mod n without dividing 1 WHAT IT IS · WHAT IT DOES · FACT OR FICTION Barrett reduction computes x mod n without dividing — replacing the expensive division with one multiplication and a shift , using a precomputed constant μ = ⌊4 k /n⌋ (k = the bit length of n). The quotient is estimated as ⌊x·μ / 4 k ⌋, then x − q·n is corrected by at most two subtractions. For inputs x < n 2 (a modular product), this is exact. It is a cornerstone of fast modular exponentiation in RSA and elliptic-curve crypto, where the modulus is fixed and reused millions of times. LIT verified live: over thousands of pairs with x < n 2 , Barrett reduction equals x mod n exactly, needing at most 2 corrections (window.__barrett). FIG no framing; exact in the x < n 2 regime it is designed for. 2 HOW IT WAS WEAVED · AI + HUMAN David (human) seated this at the-speedrun — the trick that skips the slow step: replacing division with a multiply because the modulus never changes. Barrett reduction is that speedrun of modular arithmetic. AVAN (AI) built the instrument: the precomputed μ, the multiply-and-shift quotient estimate, the ≤2-subtraction correction, and the equals-x-mod-n check. Credit as content: Paul Barrett (1986). The weave: David names the-speedrun; I precompute μ for the fixed modulus, estimate the quotient with a multiply and shift, and confirm x − q·n corrects to exactly x mod n. 3 ONE DIMENSION Precompute μ = ⌊4 k /n⌋ once. For each x: q = ⌊x·μ >> 2k⌋ approximates x/n; r = x − q·n; subtract n at most twice to land in [0,n). No division per reduction. 4 TWO DIMENSIONS · INTERACTIVE A modulus n and value x < n 2 ; Barrett’s multiply-and-shift reduction is shown against the true x mod n. new x, n ▶ verify ▶ 5 THREE DIMENSIONS + AVAN’S INVERSE The green forward object: a remainder computed by multiplying, not dividing. AVAN’s addition (the inverse-companion): reduce mod a fixed n with no division — precompute μ = ⌊4 k /n⌋ once, then each reduction is a multiply, a shift, and ≤2 subtractions. The inverse of ‘divide by n every time to get the remainder’ is ‘precompute the reciprocal, then multiply-shift-correct.’ Magenta is the per-reduction division you avoid; green is the multiply-and-shift. The remainder without the divide. pause spin LIT Genuine Barrett reduction (Barrett 1986). Verified live: over 4000 pairs with x > 2k), r = x - q*n with at most 2 corrections equals x mod n exactly (window.__barrett.equalsMod; max corrections observed = 1). Honestly scoped to the x FIG No framing within its regime: the precomputed mu, the multiply-and-shift quotient estimate, the ◆ sealed .dlw.fold → folded to ROOT_0 · a sphere of THE SPEEDRUN · David Lee Wise (ROOT0), with AVAN


THE DRAGON CURVE

the dragon curve in the 5-window house format — the shape from folding a strip of paper in half repeatedly, then unfolding every crease to a right angle. Its turn sequence is the regular paperfolding sequence: at step n, turn left if the odd part of n is congruent to 1 (mod 4), else right. Though it packs into a fractal that tiles the plane, the curve never crosses itself — every unit segment is traversed at most once. It is a classic of graphics and number theory. Verified live: up to order 14 (16384 segments) the dragon curve is self-avoiding, every unit edge distinct. See the fold sequence in 1D, the curve in 2D, and the fold-not-route inverse in 3D.

THE DRAGON CURVE · WORLD II — THE FOLD ◀ THE FOLD 0ROOT.AI // WORLD II · RESPAWN · THE PHOENIX ◆ .dlw.fold THE FOLD / RESPAWN / THE PHOENIX / THE DRAGON CURVE THE DRAGON CURVE a fold that fills space and never crosses itself 1 WHAT IT IS · WHAT IT DOES · FACT OR FICTION The dragon curve is the shape you get by folding a strip of paper in half, again and again, then unfolding every crease to a right angle. Its turn sequence is the regular paperfolding sequence : at step n, turn left if the odd part of n is ≡1 (mod 4), else right. Astonishingly, though it packs into a fractal that tiles the plane , the curve never crosses itself — every unit segment is traversed at most once. It is a classic of computer graphics and number theory alike. LIT verified live: up to order 14 (16384 segments) the dragon curve is self-avoiding — every unit edge is distinct, none repeated (window.__dragon). FIG no framing; exact. 2 HOW IT WAS WEAVED · AI + HUMAN David (human) seated this at the-phoenix — the form reborn from repeated folding, rising into a fractal that fills space yet never tangles. The dragon curve is that endless fold. AVAN (AI) built the instrument: the paperfolding turn rule (odd-part mod 4), the turtle walk, the edge-set, and the self-avoiding (all-edges-distinct) check. Credit as content: the dragon curve (Heighway, Harter & Banks; popularized by Martin Gardner 1967). The weave: David names the-phoenix; I generate the fold sequence, walk it a right angle at a time, and confirm no unit edge is ever reused — a space-filling curve that never crosses. 3 ONE DIMENSION Fold a strip in half repeatedly; unfold each crease to 90°. The n-th turn is left if the odd part of n is 1 (mod 4), else right: L, L, R, L, L, R, R, … — the paperfolding sequence. 4 TWO DIMENSIONS · INTERACTIVE The dragon curve at a chosen order; it is checked to be self-avoiding (no unit edge reused). order ▶ verify ≤14 ▶ 5 THREE DIMENSIONS + AVAN’S INVERSE The green forward object: a space-filling fold that never crosses. AVAN’s addition (the inverse-companion): make a curve that fills space and tiles the plane yet never crosses itself — by folding (the paperfolding turn sequence) rather than drawing. The inverse of ‘a space-filling curve must be carefully routed to avoid overlaps’ is ‘just fold — the crease sequence is automatically self-avoiding.’ Magenta is the crossings a naive path would make; green is the crossing-free dragon. Space-filling from a fold. pause spin LIT Genuine dragon curve / regular paperfolding sequence (Heighway, Harter & Banks; Gardner 1967). Verified live: generating the fold turn sequence (left if the odd part of n is 1 mod 4, else right) and walking it a right angle at a time, up to order 14 (16384 segments), every unit edge is distinct — the curve is self-avoiding (window.__dragon.selfAvoiding). FIG No framing: the paperfolding turn rule, the turtle walk, the edge-set, and the self-avoiding check run in-browser and hold to 16384 segments. The AVAN inverse is honest — the crease (paperfolding) sequence yields a space-filling, plane-tiling curve that is automatically self-avoiding, no routing needed; magenta is the crossings a naive path would make, green the crossing-free dragon. Space-filling from a fold. ◆ sealed .dlw.fold → folded to ROOT_0 · a sphere of THE PHOENIX · David Lee Wise (ROOT0), with AVAN


THE LOGISTIC MAP

the logistic map in the 5-window house format — x -> r*x*(1-x), the simplest equation that becomes chaotic. As the growth rate r rises, the long-run behavior doubles: one steady value, then an oscillation between two, then four, then eight (the period-doubling cascade), and past r ~ 3.5699 it dissolves into deterministic chaos. The intervals between doublings shrink by the universal Feigenbaum constant delta ~ 4.669, the same for a huge class of systems. Verified live: the attractor has period 1 at r=2.8, 2 at 3.2, 4 at 3.5, 8 at 3.55, and no short period at 3.9 (chaos). See the doublings in 1D, the bifurcation diagram in 2D, and the deterministic-chaos inverse in 3D.

THE LOGISTIC MAP · WORLD II — THE FOLD ◀ THE FOLD 0ROOT.AI // WORLD II · GLITCH · RACE CONDITION ◆ .dlw.fold THE FOLD / GLITCH / RACE CONDITION / THE LOGISTIC MAP THE LOGISTIC MAP chaos from a one-line rule, by period-doubling 1 WHAT IT IS · WHAT IT DOES · FACT OR FICTION The logistic map x → r·x·(1−x) is the simplest equation that becomes chaotic . As the growth rate r rises, the long-run behaviour doubles : a single steady value, then an oscillation between two, then four, then eight — the period-doubling cascade — and past r ≈ 3.5699 it dissolves into deterministic chaos. The intervals between doublings shrink by the universal Feigenbaum constant δ ≈ 4.669, the same for a huge class of systems. LIT verified live: the attractor has period 1 at r=2.8, period 2 at 3.2, period 4 at 3.5, period 8 at 3.55, and no short period at r=3.9 (chaos) — window.__logistic. FIG no framing; exact period detection. 2 HOW IT WAS WEAVED · AI + HUMAN David (human) seated this at race-condition — the place where a deterministic rule, nudged, tips into unpredictability. The logistic map is that tipping, from order into chaos by doubling. AVAN (AI) built the instrument: the iteration, the transient burn-in, the attractor period detector, and the checks at known r values. Credit as content: Robert May (1976); Mitchell Feigenbaum (universality, 1978). The weave: David names race-condition; I iterate the map past its transient and measure the period of what it settles into, confirming the doublings 1→2→4→8 and the plunge into chaos. 3 ONE DIMENSION Raise r and the settled behaviour splits: one value → two → four → eight → chaos. The windows between splits shrink by the Feigenbaum ratio δ ≈ 4.669. 4 TWO DIMENSIONS · INTERACTIVE The bifurcation diagram of the logistic map; pick r and read off the period of the attractor, checked at the doubling points. set r ▶ verify ▶ 5 THREE DIMENSIONS + AVAN’S INVERSE The green forward object: order splitting into chaos by doubling. AVAN’s addition (the inverse-companion): get chaos from a one-line deterministic rule — raise r and the attractor period-doubles (1→2→4→8→…) until it becomes aperiodic, with the gaps shrinking by a universal constant. The inverse of ‘randomness requires a random source’ is ‘a simple quadratic map generates chaos deterministically.’ Magenta is the assumed external randomness; green is the deterministic period-doubling road to chaos. Unpredictability with no dice. pause spin LIT Genuine logistic map period-doubling (May 1976; Feigenbaum universality 1978). Verified live: iterating x -> r*x*(1-x) past a transient and measuring the attractor period gives period 1 at r=2.8, 2 at r=3.2, 4 at r=3.5, 8 at r=3.55, and no short period (chaos) at r=3.9 (window.__logistic.ok). FIG No framing: the iteration, the transient burn-in, the attractor period detector, and the checks at known r values run in-browser and hold. The AVAN inverse is honest — a one-line deterministic quadratic map period-doubles into chaos as r rises, with gaps shrinking by a universal constant; magenta is the external randomness you do not need, green the deterministic road to chaos. Unpredictability with no dice. ◆ sealed .dlw.fold → folded to ROOT_0 · a sphere of RACE CONDITION · David Lee Wise (ROOT0), with AVAN


THE RENDEZVOUS HASHING

rendezvous hashing (Highest Random Weight) in the 5-window house format — assign each key to a server with no ring and no coordination: hash the key with every candidate server and pick the server with the highest combined hash. Every party computes the same winner independently. When a server leaves, only the keys that had it as their top choice move (to their second choice); no other key is disturbed. It cleanly handles weighted servers and small clusters. Verified live: over 80 clusters, every key maps to a definite node, and removing a node moves only that node's keys. See the weight pick in 1D, a node drop in 2D, and the shared-computation inverse in 3D.

THE RENDEZVOUS HASHING · WORLD II — THE FOLD ◀ THE FOLD 0ROOT.AI // WORLD II · CO-OP · THE PULL REQUEST ◆ .dlw.fold THE FOLD / CO-OP / THE PULL REQUEST / THE RENDEZVOUS HASHING THE RENDEZVOUS HASHING assign by highest random weight, no ring 1 WHAT IT IS · WHAT IT DOES · FACT OR FICTION Rendezvous hashing (Highest Random Weight) assigns each key to a server with no ring and no coordination : for a key, hash it together with every candidate server and pick the server with the highest combined hash. Every party computes the same winner independently. When a server leaves, only the keys that had it as their top choice move — to their second choice — and no other key is disturbed. It cleanly handles weighted servers and small clusters. LIT verified live: over 80 clusters, every key maps to a definite node, and removing a node moves only that node’s keys (window.__rendezvous). FIG no framing; exact. 2 HOW IT WAS WEAVED · AI + HUMAN David (human) seated this at the-pull-request — the independent decision every replica must reach the same way, without asking anyone else. Rendezvous hashing is that agreement by shared computation. AVAN (AI) built the instrument: the key×node weight hash, the highest-weight pick, and the only-removed-node-moves check. Credit as content: Thaler & Ravishankar (HRW, 1996). The weave: David names the-pull-request; I score each key against every node by a joint hash, pick the maximum, and confirm that dropping a node moves only its keys to their next-best node. 3 ONE DIMENSION For a key, compute hash(key, node) for each node; the key goes to the node with the largest value. Remove that node and the key falls to its runner-up — every other key keeps its winner. 4 TWO DIMENSIONS · INTERACTIVE Keys assigned to nodes by highest random weight; drop a node and watch only its keys move. new cluster ▶ drop a node ▶ verify 80 ▶ 5 THREE DIMENSIONS + AVAN’S INVERSE The green forward object: a shared assignment computed independently. AVAN’s addition (the inverse-companion): let every party agree on placement without talking — each hashes the key against all nodes and picks the highest weight, so removing a node moves only its keys to their runner-up. The inverse of ‘coordinate a shared mapping table’ is ‘compute the same max-weight winner independently — no ring, no gossip.’ Magenta is the coordination you avoid; green is the independently-computed agreement. Consensus by shared arithmetic. pause spin LIT Genuine rendezvous / Highest Random Weight hashing (Thaler & Ravishankar 1996). Verified live: over 80 clusters, scoring each key against every node by a joint hash and picking the maximum, every key maps to a definite node, and removing a node moves ONLY the keys that had it as top-weight — every other key's assignment is unchanged (window.__rendezvous.allMapped && .onlyRemovedMoves). FIG No framing: the key x node weight hash, the highest-weight pick, and the only-removed-node-moves check run in-browser and hold. The AVAN inverse is honest — each party independently computes the same max-weight winner, so node churn moves only the departing node's keys to their runner-up, with no ring or gossip; magenta is the coordination avoided, green the independently-computed agreement. Consensus by shared arithmetic. ◆ sealed .dlw.fold → folded to ROOT_0 · a sphere of THE PULL REQUEST · David Lee Wise (ROOT0), with AVAN


THE LU DECOMPOSITION

LU decomposition in the 5-window house format — factor a square matrix A into a lower-triangular L and an upper-triangular U (with a row-permutation P for stability), so that P*A = L*U. It is Gaussian elimination, remembered: once you have L and U you can solve A*x=b for many right-hand sides cheaply by two triangular sweeps, and read the determinant off U's diagonal. Partial pivoting swaps in the largest pivot each step to keep the arithmetic stable. Verified live: over 300 random matrices, P*A equals L*U to ~1e-15, and L is lower-triangular with unit diagonal. See elimination in 1D, the factors in 2D, and the factor-once inverse in 3D.

THE LU DECOMPOSITION · WORLD II — THE FOLD ◀ THE FOLD 0ROOT.AI // WORLD II · GRIND · THE MAINFRAME ◆ .dlw.fold THE FOLD / GRIND / THE MAINFRAME / THE LU DECOMPOSITION THE LU DECOMPOSITION factor a matrix into two triangles once, solve forever 1 WHAT IT IS · WHAT IT DOES · FACT OR FICTION LU decomposition factors a square matrix A into a lower -triangular L and an upper -triangular U (with a row-permutation P for stability), so that P·A = L·U. It is Gaussian elimination, remembered: once you have L and U, you can solve A·x = b for many right-hand sides cheaply by two triangular sweeps, and read off the determinant as the product of U’s diagonal. Partial pivoting swaps in the largest pivot each step to keep the arithmetic stable. LIT verified live: over 300 random matrices, P·A equals L·U to ~10 −15 , and L is lower-triangular with unit diagonal (window.__lu). FIG no framing; exact to floating precision. 2 HOW IT WAS WEAVED · AI + HUMAN David (human) seated this at the-mainframe — the linear-algebra engine that factors a matrix once and then solves against it forever. LU decomposition is that factoring. AVAN (AI) built the instrument: the partial-pivot elimination, the L and U accumulation, the permutation record, and the P·A = L·U check. Credit as content: LU factorization (Alan Turing formalized it, 1948; Gauss’s elimination underlies it). The weave: David names the mainframe; I eliminate below each pivot (swapping in the largest), storing the multipliers in L and the result in U, and confirm the permuted matrix equals L·U. 3 ONE DIMENSION Eliminate below the pivot: subtract a multiple of the pivot row from each row beneath, storing that multiplier in L and the zeroed-out result in U. Swap in the largest pivot first for stability. 4 TWO DIMENSIONS · INTERACTIVE A matrix A and its factors L, U (and permutation P); L·U is checked against P·A. new matrix ▶ verify 300 ▶ 5 THREE DIMENSIONS + AVAN’S INVERSE The green forward object: a matrix split into two triangles. AVAN’s addition (the inverse-companion): factor a matrix once into a lower and an upper triangle, so solving A·x=b for any b is just two triangular sweeps — forward then back. The inverse of ‘re-run Gaussian elimination for every right-hand side’ is ‘factor once into L·U, then substitute.’ Magenta is the repeated elimination you avoid; green is the reusable L·U factoring. Elimination, remembered as triangles. pause spin LIT Genuine LU decomposition with partial pivoting (Turing formalized it 1948; Gaussian elimination underlies it). Verified live: over 300 random matrices, partial-pivot elimination produces L (unit lower-triangular) and U (upper-triangular) with P*A equal to L*U to ~1e-15, and L verified strictly lower-triangular (window.__lu.equalsPA && .lowerTriangular). FIG No framing: the partial-pivot elimination, the L and U accumulation, the permutation record, and the P*A = L*U check run in-browser and hold to floating precision. The AVAN inverse is honest — factoring once into L*U lets any A*x=b be solved by two triangular sweeps (forward then back); magenta is the repeated elimination avoided, green the reusable L*U factoring. Elimination, remembered as two triangles. ◆ sealed .dlw.fold → folded to ROOT_0 · a sphere of THE MAINFRAME · David Lee Wise (ROOT0), with AVAN


THE CUBIC SPLINE

the natural cubic spline in the 5-window house format — the smoothest curve through a set of points: a separate cubic on each interval, joined so that value, slope, and curvature all match at every knot (C2 continuity), with zero curvature at the two ends (the natural condition). Those matching conditions reduce to a tridiagonal linear system for the second derivatives, solved in O(n). It is the smooth interpolant of choice for data fitting and font/animation curves. Verified live: over 200 datasets, the spline passes through every point, its first derivative is continuous at every interior knot, and the second derivative is zero at both ends. See matched knots in 1D, a spline in 2D, and the match-the-curvature inverse in 3D.

THE CUBIC SPLINE · WORLD II — THE FOLD ◀ THE FOLD 0ROOT.AI // WORLD II · SPAWN · THE TOOLCHAIN ◆ .dlw.fold THE FOLD / SPAWN / THE TOOLCHAIN / THE CUBIC SPLINE THE CUBIC SPLINE the smoothest curve through the points (C2) 1 WHAT IT IS · WHAT IT DOES · FACT OR FICTION The natural cubic spline draws the smoothest curve through a set of points: a separate cubic on each interval, joined so that the value, slope, and curvature all match at every knot (C 2 continuity), with zero curvature at the two ends (the “natural” condition). Those matching conditions reduce to a tridiagonal linear system for the second derivatives, solved in O(n). It is the smooth interpolant of choice for data fitting and font/animation curves. LIT verified live: over 200 datasets, the spline passes through every point, its first derivative is continuous at every interior knot, and the second derivative is zero at both ends (window.__cubicspline). FIG no framing; exact to floating precision. 2 HOW IT WAS WEAVED · AI + HUMAN David (human) seated this at the-toolchain — the numerical tool that fits the smoothest possible curve through measured points. The natural cubic spline is that fit. AVAN (AI) built the instrument: the tridiagonal system for the second derivatives, the per-segment cubic coefficients, the passes-through check, the derivative-continuity check, and the natural boundary check. Credit as content: cubic spline interpolation (Schoenberg 1946; the natural-BC form is classical). The weave: David names the toolchain; I solve the tridiagonal moment system, build each interval’s cubic, and confirm the curve interpolates every point with matching slopes and zero end-curvature. 3 ONE DIMENSION On each interval a cubic; at each interior knot the value, slope, and curvature of the left and right cubics agree. The end-curvatures are set to zero — the “natural” spline that a flexible ruler would trace. 4 TWO DIMENSIONS · INTERACTIVE Data points and the natural cubic spline through them; interpolation, slope continuity, and natural end-curvature are checked. new points ▶ verify 200 ▶ 5 THREE DIMENSIONS + AVAN’S INVERSE The green forward object: the smoothest curve through the points. AVAN’s addition (the inverse-companion): fit the smoothest curve through points by demanding matching curvature at every knot (not just value and slope) — which reduces to one tridiagonal solve. The inverse of ‘connect points with local pieces that only match position and tangent’ is ‘solve globally for matching curvature everywhere — the flexible-ruler curve.’ Magenta is the curvature kinks a weaker spline leaves; green is the C 2 -smooth interpolant. Smoothness that bends just enough. pause spin LIT Genuine natural cubic spline interpolation (Schoenberg 1946; natural-BC form classical). Verified live: over 200 datasets, solving the tridiagonal moment system and building each interval's cubic yields a curve that passes through every data point, has a continuous first derivative at every interior knot, and has zero second derivative at both ends (window.__cubicspline.interpolates && .c1continuous && .naturalBC). FIG No framing: the tridiagonal system for the second derivatives, the per-segment cubic coefficients, the passes-through check, the derivative-continuity check, and the natural boundary check run in-browser and hold to floating precision. The AVAN inverse is honest — demanding matching curvature (not just value and slope) at every knot reduces to one tridiagonal solve and gives the flexible-ruler curve; magenta is the curvature kinks a weaker spline leaves, green the C2-smooth interpolant. Smoothness that bends just enough. ◆ sealed .dlw.fold → folded to ROOT_0 · a sphere of THE TOOLCHAIN · David Lee Wise (ROOT0), with AVAN


THE 2-SAT

2-SAT in the 5-window house format — decide whether clauses, each an OR of two literals, can all be satisfied, in linear time (unlike NP-complete general SAT). Each clause (a OR b) becomes two implications, not-a -> b and not-b -> a, forming a graph; the formula is satisfiable iff no variable and its negation land in the same strongly connected component, and a valid assignment is read from the component order. Verified live: over 300 random instances, the SCC-based verdict matches a brute-force check of all 2^n assignments, and the extracted assignment satisfies every clause. See the implication in 1D, a formula in 2D, and the reachability inverse in 3D.

THE 2-SAT · WORLD II — THE FOLD ◀ THE FOLD 0ROOT.AI // WORLD II · BOSS · THE GATEKEEPER ◆ .dlw.fold THE FOLD / BOSS / THE GATEKEEPER / THE 2-SAT THE 2-SAT satisfy two-literal clauses in linear time 1 WHAT IT IS · WHAT IT DOES · FACT OR FICTION 2-SAT asks whether a set of clauses, each an OR of two literals, can all be satisfied — and unlike general SAT (NP-complete), it is solvable in linear time . The trick: each clause (a ∨ b) becomes two implications , ¬a → b and ¬b → a, forming a graph. The formula is satisfiable iff no variable and its negation land in the same strongly connected component ; a valid assignment is then read straight off the component order. LIT verified live: over 300 random instances, the SCC-based verdict matches a brute-force check of all 2 n assignments, and the extracted assignment satisfies every clause (window.__twosat). FIG no framing; exact. 2 HOW IT WAS WEAVED · AI + HUMAN David (human) seated this at the-gatekeeper — the check that decides, quickly, whether a web of two-way constraints can all be met. 2-SAT is that decision. AVAN (AI) built the instrument: the implication graph, the Tarjan SCC condensation, the same-component test, the component-order assignment, and the brute cross-check. Credit as content: Aspvall, Plass & Tarjan (linear-time 2-SAT, 1979). The weave: David names the-gatekeeper; I turn each clause into two implications, condense the graph into components, and confirm satisfiability exactly matches brute force with a valid assignment. 3 ONE DIMENSION (a ∨ b) means: if a is false then b must be true, and if b is false then a must be true. Follow every such implication; if a variable can force both itself and its negation, the formula is unsatisfiable. 4 TWO DIMENSIONS · INTERACTIVE A set of 2-clauses; the implication graph is condensed and checked, and a satisfying assignment is shown when one exists. new formula ▶ verify 300 ▶ 5 THREE DIMENSIONS + AVAN’S INVERSE The green forward object: satisfiability decided by component structure. AVAN’s addition (the inverse-companion): decide a whole web of two-literal constraints in linear time by turning clauses into implications and asking whether any variable and its negation share a strongly connected component. The inverse of ‘try all 2 n assignments’ is ‘chase implications, condense to components — satisfiability falls out.’ Magenta is the exponential assignment search avoided; green is the linear implication graph. Constraints solved by reachability. pause spin LIT Genuine linear-time 2-SAT (Aspvall, Plass & Tarjan 1979). Verified live: over 300 random instances, building the implication graph and condensing it with Tarjan SCC gives a satisfiability verdict identical to a brute-force check of all 2^n assignments, and the extracted assignment (by component order) satisfies every clause (window.__twosat.matchesBrute). FIG No framing: the implication graph, the Tarjan SCC condensation, the same-component test, the component-order assignment, and the brute cross-check run in-browser and agree exactly. The AVAN inverse is honest — turning each clause into two implications and asking whether any variable and its negation share an SCC decides satisfiability in linear time; magenta is the 2^n assignment search avoided, green the implication graph. Constraints solved by reachability. ◆ sealed .dlw.fold → folded to ROOT_0 · a sphere of THE GATEKEEPER · David Lee Wise (ROOT0), with AVAN