THE GERSHGORIN

Gershgorin's circle theorem in the 5-window house format — pin down where a matrix's eigenvalues can be without computing them: every eigenvalue lies within at least one Gershgorin disc, centered at a diagonal entry a_ii with radius equal to the sum of the absolute off-diagonal entries in that row. A few cheap sums bound the whole spectrum, invaluable for stability analysis and preconditioning. Verified live: over 300 random symmetric matrices, every (Jacobi-computed) eigenvalue falls inside a Gershgorin disc, and the eigenvalues sum to the trace. See a row-disc in 1D, discs on the line in 2D, and the localize-by-rows inverse in 3D.

THE GERSHGORIN · WORLD II — THE FOLD ◀ THE FOLD 0ROOT.AI // WORLD II · GRIND · THE MAINFRAME ◆ .dlw.fold THE FOLD / GRIND / THE MAINFRAME / THE GERSHGORIN THE GERSHGORIN trap every eigenvalue in a disc, without solving 1 WHAT IT IS · WHAT IT DOES · FACT OR FICTION Gershgorin’s circle theorem pins down where a matrix’s eigenvalues can be without computing them: every eigenvalue lies within at least one Gershgorin disc — a disc centered at a diagonal entry a ii , with radius equal to the sum of the absolute values of the off-diagonal entries in that row. A few cheap sums bound the whole spectrum, which is invaluable for stability analysis and preconditioning. LIT verified live: over 300 random symmetric matrices, every (Jacobi-computed) eigenvalue falls inside a Gershgorin disc, and the eigenvalues sum to the trace (window.__gershgorin). FIG no framing; exact containment. 2 HOW IT WAS WEAVED · AI + HUMAN David (human) seated this at the-mainframe — the matrix engine that bounds a spectrum with a glance at the rows. Gershgorin’s theorem is that glance. AVAN (AI) built the instrument: the row-radius discs, an independent Jacobi eigensolver, the every-eigenvalue-in-a-disc check, and the sum-equals-trace sanity check. Credit as content: Semyon Gershgorin (1931). The weave: David names the mainframe; I draw each row’s disc from its diagonal and off-diagonal sum, compute the eigenvalues independently, and confirm each one is trapped in a disc. 3 ONE DIMENSION Row i gives a disc: center at a ii , radius = Σ j≠i |a ij |. Every eigenvalue of the matrix must sit inside the union of these discs — no eigenvalue escapes them all. 4 TWO DIMENSIONS · INTERACTIVE A symmetric matrix, its Gershgorin discs on the real line, and its eigenvalues — each checked to lie inside a disc. new matrix ▶ verify 300 ▶ 5 THREE DIMENSIONS + AVAN’S INVERSE The green forward object: eigenvalues trapped inside row-discs. AVAN’s addition (the inverse-companion): bound the spectrum without solving for it — each row draws a disc (diagonal ± off-diagonal sum), and every eigenvalue must lie in the union. The inverse of ‘compute the eigenvalues to know their range’ is ‘read a disc off each row — they trap the whole spectrum.’ Magenta is the full eigen-solve you can skip for a bound; green is the row-disc that traps them. Localizing eigenvalues by rows. pause spin LIT Genuine Gershgorin circle theorem (Gershgorin 1931). Verified live: over 300 random symmetric matrices, every eigenvalue (computed independently by a Jacobi eigensolver) lies within a Gershgorin disc (center a_ii, radius sum of off-diagonal magnitudes), and the eigenvalues sum to the trace as a sanity check (window.__gershgorin.allInDisc && .sumEqualsTrace). FIG No framing: the row-radius discs, an independent Jacobi eigensolver, the every-eigenvalue-in-a-disc check, and the sum-equals-trace check run in-browser and hold. The AVAN inverse is honest — each row draws a disc (diagonal +/- off-diagonal sum) and every eigenvalue must lie in the union, bounding the spectrum with no eigen-solve; magenta is the full solve you can skip for a bound, green the row-disc that traps them. Localizing eigenvalues by rows. ◆ sealed .dlw.fold → folded to ROOT_0 · a sphere of THE MAINFRAME · David Lee Wise (ROOT0), with AVAN


THE LEAST ROTATION

Booth's least-rotation algorithm in the 5-window house format — find the lexicographically smallest rotation of a string in linear time, the canonical form of a necklace where all rotations are equivalent. Instead of trying every rotation (O(n^2)), it runs a KMP-style failure-function scan over the doubled string, sliding a candidate start and jumping past mismatches. It is how you canonicalize cyclic sequences (circular DNA, polygon encodings, necklace enumeration). Verified live: over 500 random strings, Booth's rotation index gives the exact same rotation as a brute-force minimum over all rotations. See the necklace rotations in 1D, a canonical form in 2D, and the one-name inverse in 3D.

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

THE LEAST ROTATION · WORLD II — THE FOLD ◀ THE FOLD 0ROOT.AI // WORLD II · LOOT · THE STASH ◆ .dlw.fold THE FOLD / LOOT / THE STASH / THE LEAST ROTATION THE LEAST ROTATION the canonical rotation of a necklace, in O(n) 1 WHAT IT IS · WHAT IT DOES · FACT OR FICTION Booth’s least-rotation algorithm finds the lexicographically smallest rotation of a string in linear time — the canonical form of a “necklace,” where all rotations are considered equivalent. Instead of trying every rotation (O(n 2 )), it runs a KMP-style failure-function scan over the doubled string, sliding a candidate start and jumping past mismatches. It is how you canonicalize cyclic sequences — circular DNA, polygon encodings, necklace enumeration. LIT verified live: over 500 random strings, Booth’s rotation index gives the exact same rotation as a brute-force minimum over all rotations (window.__leastrotation). FIG no framing; exact. 2 HOW IT WAS WEAVED · AI + HUMAN David (human) seated this at the-stash — the hoard where every cyclic arrangement collapses to one canonical key, so duplicates that differ only by rotation are recognized as one. Booth’s algorithm mints that key. AVAN (AI) built the instrument: the doubled-string failure scan, the candidate-start slide, and the brute-minimum cross-check. Credit as content: Kellogg Booth (1980). The weave: David names the-stash; I scan the doubled string with a failure function, sliding the best start past mismatches, and confirm the resulting rotation equals the true minimum over all rotations. 3 ONE DIMENSION A necklace “bbaab” has rotations bbaab, baabb, aabbb, abbba, bbbaa. The smallest is aabbb — that rotation is the canonical form. Booth finds its start index in one linear pass. 4 TWO DIMENSIONS · INTERACTIVE A string as a necklace; Booth’s least rotation is highlighted and checked against the brute minimum over all rotations. new necklace ▶ verify 500 ▶ 5 THREE DIMENSIONS + AVAN’S INVERSE The green forward object: the one canonical rotation of a necklace. AVAN’s addition (the inverse-companion): give a cyclic sequence a single canonical form — its lexicographically least rotation — found in linear time by a failure-function scan of the doubled string. The inverse of ‘compare all n rotations to find the smallest’ is ‘one KMP-style pass picks the least rotation.’ Magenta is the O(n 2 ) all-rotations comparison; green is the single canonical key. One name for every rotation. pause spin LIT Genuine Booth least-rotation algorithm (Booth 1980). Verified live: over 500 random strings, the doubled-string failure-function scan returns a rotation index whose rotation equals the brute-force lexicographically-minimum rotation over all n rotations (window.__leastrotation.matchesBrute); 'bbaab' -> 'aabbb'. FIG No framing: the doubled-string failure scan, the candidate-start slide, and the brute-minimum cross-check run in-browser and agree exactly. The AVAN inverse is honest — a KMP-style pass over the doubled string finds the least rotation in linear time, giving a cyclic sequence one canonical form; magenta is the O(n^2) all-rotations comparison, green the single canonical key. One name for every rotation. ◆ sealed .dlw.fold → folded to ROOT_0 · a sphere of THE STASH · David Lee Wise (ROOT0), with AVAN


THE SIEVE OF ATKIN

the sieve of Atkin in the 5-window house format — find primes using quadratic forms instead of marking multiples. A number (with small primes handled separately) is prime if it solves one of three modular equations an odd number of times: 4x^2+y^2 (n mod 12 in {1,5}), 3x^2+y^2 (n mod 12 = 7), or 3x^2-y^2 with x>y (n mod 12 = 11), then multiples of prime squares are removed. It is asymptotically faster than Eratosthenes. Verified live: the sieve of Atkin's prime list up to 5000 is identical to trial division (669 primes). See the quadratic forms in 1D, a prime grid in 2D, and the parabola-sieve inverse in 3D.

THE SIEVE OF ATKIN · WORLD II — THE FOLD ◀ THE FOLD 0ROOT.AI // WORLD II · SPAWN · GENESIS BLOCK ◆ .dlw.fold THE FOLD / SPAWN / GENESIS BLOCK / THE SIEVE OF ATKIN THE SIEVE OF ATKIN primes from quadratic forms, not multiples 1 WHAT IT IS · WHAT IT DOES · FACT OR FICTION The sieve of Atkin finds primes using quadratic forms instead of marking multiples. A number (with the small primes handled separately) is prime if it is a solution to one of three modular equations an odd number of times: 4x²+y² (for n mod 12 ∈ {1,5}), 3x²+y² (n mod 12 = 7), or 3x²−y² with x>y (n mod 12 = 11) — then the multiples of prime squares are removed. It is asymptotically faster than Eratosthenes. LIT verified live: the sieve of Atkin’s prime list up to 5000 is identical to trial division (669 primes) — window.__atkin. FIG no framing; exact. 2 HOW IT WAS WEAVED · AI + HUMAN David (human) seated this at genesis-block — the generation of the primes from scratch, here by counting solutions to quadratic forms rather than crossing off multiples. The sieve of Atkin is that generation. AVAN (AI) built the instrument: the three quadratic-form toggles by residue mod 12, the square-multiple removal, and the equals-trial-division check. Credit as content: A. O. L. Atkin & Daniel Bernstein (2004). The weave: David names genesis-block; I toggle candidates by the parity of their quadratic-form solution counts, strip prime-square multiples, and confirm the primes match trial division exactly. 3 ONE DIMENSION Toggle n whenever a quadratic form (4x²+y², 3x²+y², or 3x²−y²) equals it, subject to n’s residue mod 12. An odd number of hits marks a candidate; then remove multiples of prime squares. 4 TWO DIMENSIONS · INTERACTIVE The sieve of Atkin’s primes up to a limit; the set is checked against trial division. limit ▶ verify ▶ 5 THREE DIMENSIONS + AVAN’S INVERSE The green forward object: primes found by quadratic forms. AVAN’s addition (the inverse-companion): find primes by counting solutions to quadratic forms (mod 12) rather than crossing off multiples — an odd solution-count flags a candidate, then prime-square multiples are removed. The inverse of ‘mark every multiple of every prime (Eratosthenes)’ is ‘toggle by quadratic-form parity, then strip squares.’ Magenta is the multiple-marking of Eratosthenes; green is the quadratic-form sieve. Primes from parabolas, not multiples. pause spin LIT Genuine sieve of Atkin (Atkin & Bernstein 2004). Verified live: toggling candidates by the parity of their quadratic-form solution counts (mod 12) and removing multiples of prime squares produces exactly the same primes up to 5000 as trial division (669 primes) — window.__atkin.matchesTrial. FIG No framing: the three quadratic-form toggles by residue mod 12, the square-multiple removal, and the equals-trial-division check run in-browser and match exactly. The AVAN inverse is honest — counting solutions to quadratic forms (odd count flags a candidate) then stripping prime-square multiples finds primes without marking every multiple; magenta is the multiple-marking of Eratosthenes, green the quadratic-form sieve. Primes from parabolas, not multiples. ◆ sealed .dlw.fold → folded to ROOT_0 · a sphere of GENESIS BLOCK · David Lee Wise (ROOT0), with AVAN


THE LI CHAO TREE

the Li Chao tree in the 5-window house format — maintain a set of lines and answer 'which line is lowest at this x?' in O(log) time, storing the lower envelope of a pencil of lines. Each node owns the line that dominates the middle of its x-range; a new line either replaces it or is pushed to the half where it might win. It powers the convex-hull trick for speeding up dynamic programming, turning O(n^2) DP transitions into O(n log n). Verified live: over 200 trees, the Li Chao query returns exactly the minimum of all inserted lines at each x, matching a brute-force scan. See the lower envelope in 1D, a query in 2D, and the stored-envelope inverse in 3D.

THE LI CHAO TREE · WORLD II — THE FOLD ◀ THE FOLD 0ROOT.AI // WORLD II · CO-OP · SPLIT SCREEN ◆ .dlw.fold THE FOLD / CO-OP / SPLIT SCREEN / THE LI CHAO TREE THE LI CHAO TREE the lowest line at any x, in log time 1 WHAT IT IS · WHAT IT DOES · FACT OR FICTION The Li Chao tree maintains a set of lines and answers “which line is lowest at this x?” in O(log) time — it stores the lower envelope of a pencil of lines. Each node owns the line that dominates the middle of its x-range; a new line either replaces it or is pushed to the half where it might win. It powers the convex-hull trick for speeding up dynamic programming, turning O(n 2 ) DP transitions into O(n log n). LIT verified live: over 200 trees, the Li Chao query returns exactly the minimum of all inserted lines at each x, matching a brute-force scan (window.__lichao). FIG no framing; exact. 2 HOW IT WAS WEAVED · AI + HUMAN David (human) seated this at split-screen — the many lines drawn at once, of which only the lowest at each point is seen. The Li Chao tree keeps that lower envelope. AVAN (AI) built the instrument: the recursive dominate-the-midpoint insertion, the descend-to-the-winning-half push, the log-time query, and the brute-minimum cross-check. Credit as content: Li Chao (the segment-tree-of-lines technique). The weave: David names split-screen; I insert each line so the node keeps whichever dominates its midpoint and pushes the other down, and confirm the query returns the true minimum line at every x. 3 ONE DIMENSION Many lines; at each x only the lowest matters. Their lower envelope is a piecewise-linear convex curve. A Li Chao tree stores it so any x-query returns the winning line in O(log) time. 4 TWO DIMENSIONS · INTERACTIVE A set of lines and their lower envelope; query any x and compare the Li Chao result to a brute minimum. new lines ▶ verify 200 ▶ 5 THREE DIMENSIONS + AVAN’S INVERSE The green forward object: the lower envelope of a pencil of lines. AVAN’s addition (the inverse-companion): answer “lowest line at x” in O(log) by storing lines in a tree where each node keeps whichever dominates its midpoint and pushes the loser to the half it might still win. The inverse of ‘scan every line at every query’ is ‘keep the lower envelope in a tree — query in log time.’ Magenta is the linear scan per query avoided; green is the stored envelope. The minimum line, in log time. pause spin LIT Genuine Li Chao tree (the segment-tree-of-lines technique). Verified live: over 200 trees with random lines and queries, the recursive dominate-the-midpoint insertion and log-time query return exactly the minimum of all inserted lines at each x, matching a brute-force scan (window.__lichao.matchesBrute). FIG No framing: the recursive dominate-the-midpoint insertion, the descend-to-the-winning-half push, the log-time query, and the brute-minimum cross-check run in-browser and agree exactly. The AVAN inverse is honest — keeping at each node whichever line dominates its midpoint and pushing the loser to the half it might still win stores the lower envelope for O(log) queries; magenta is the linear scan per query avoided, green the stored envelope. The minimum line, in log time. ◆ sealed .dlw.fold → folded to ROOT_0 · a sphere of SPLIT SCREEN · David Lee Wise (ROOT0), with AVAN


THE EXTENDED EUCLID

The extended Euclidean algorithm in the 5-window house format — run the ordinary Euclidean division loop, but carry the coefficients along so the GCD arrives with a proof of how to build it: integers x, y with a·x + b·y = gcd(a,b), Bézout's identity. Those coefficients are exactly what give modular inverses and power RSA. Verified live: over 5000 random pairs, the returned (x,y) satisfy a·x + b·y = gcd(a,b) exactly and the gcd matches the ordinary Euclidean one. See the division loop in 1D, a pair certified in 2D, and the remainder-that-proves-itself inverse in 3D.

THE EXTENDED EUCLID · WORLD II — THE FOLD ◀ THE FOLD 0ROOT.AI // WORLD II · GRIND · WARM CACHE ◆ .dlw.fold THE FOLD / GRIND / WARM CACHE / THE EXTENDED EUCLID THE EXTENDED EUCLID the GCD carries a Bézout certificate 1 WHAT IT IS · WHAT IT DOES · FACT OR FICTION The extended Euclidean algorithm computes gcd(a,b) and , for free, the integers x and y that express it: a·x + b·y = gcd(a,b) — Bézout’s identity. It runs the ordinary Euclidean division loop but carries the coefficients along, so the GCD comes with a certificate . Those coefficients are exactly what you need to compute modular inverses (a⁻¹ mod m), solve linear Diophantine equations, and power RSA key generation. LIT verified live: over 5000 random pairs, the returned (x,y) satisfy a·x + b·y = gcd(a,b) exactly, and the gcd matches the ordinary Euclidean one (window.__egcd). FIG no framing; exact integer arithmetic. 2 HOW IT WAS WEAVED · AI + HUMAN David (human) seated this at warm-cache — the reduction loop, here carrying the Bézout coefficients along so the GCD arrives with a proof of how to build it. The extended Euclid is that certified reduction. AVAN (AI) built the instrument: the recursive coefficient back-substitution, and the a·x+b·y=gcd verification. Credit as content: the extended Euclidean algorithm (Euclid’s division, antiquity; Bézout’s identity, 1779). The weave: David names warm-cache; I run the division loop while back-substituting the coefficients, and confirm a·x+b·y equals the GCD exactly. 3 ONE DIMENSION 240 = 5·46 + 10; 46 = 4·10 + 6; 10 = 1·6 + 4; 6 = 1·4 + 2; 4 = 2·2. GCD is 2 — and unwinding the quotients gives x, y with 240x + 46y = 2. 4 TWO DIMENSIONS · INTERACTIVE Two numbers; their GCD and the Bézout coefficients x, y are shown, with a·x+b·y checked to equal the GCD. new pair ▶ verify 5000 ▶ 5 THREE DIMENSIONS + AVAN’S INVERSE The green forward object: a GCD that carries its own Bézout certificate. AVAN’s addition (the inverse-companion): get not just the GCD but the coefficients that build it — carry x, y through the Euclidean loop so a·x+b·y=gcd falls out, giving modular inverses for free. The inverse of ‘compute the GCD and stop’ is ‘compute the GCD with a certificate of how to combine a and b into it.’ Magenta is the bare GCD; green is the GCD-plus-coefficients. A remainder that proves itself. pause spin LIT Genuine extended Euclidean algorithm (Euclid's division, antiquity; Bézout's identity, 1779). Verified live: over 5000 random pairs, the recursive coefficient back-substitution returns (x,y) with a·x + b·y == gcd(a,b) exactly (integer arithmetic), and gcd matches the plain Euclidean loop (window.__egcd.bezoutHolds). FIG No framing: the Euclidean division loop, the coefficient back-substitution, and the a·x+b·y==gcd check run in-browser with exact integers and agree. The AVAN inverse is honest — computing the GCD with a certificate of how to combine a and b into it (giving modular inverses for free) genuinely extends 'compute the GCD and stop'; magenta is the bare GCD, green the GCD-plus-coefficients. A remainder that proves itself. ◆ sealed .dlw.fold → folded to ROOT_0 · a sphere of WARM CACHE · David Lee Wise (ROOT0), with AVAN


THE HOUGH

The Hough transform in the 5-window house format — detect lines in a scatter of points by a duality: each point (x,y) becomes a sinusoid ρ = x·cosθ + y·sinθ in parameter space, and the sinusoids of collinear points all cross at one (ρ,θ) — the line's own parameters. Accumulate votes and lines appear as peaks, robust to gaps and noise. Verified live: collinear points exactly satisfy ρ₀ = x·cosθ₀ + y·sinθ₀ (worst error ~1e-13), and the accumulator peak recovers the line across 200 trials at 720×720 resolution. See the sinusoids crossing in 1D, an accumulator in 2D, and detection-as-voting in 3D.

THE HOUGH · WORLD II — THE FOLD ◀ THE FOLD 0ROOT.AI // WORLD II · SPAWN · THE SANDBOX ◆ .dlw.fold THE FOLD / SPAWN / THE SANDBOX / THE HOUGH THE HOUGH a point becomes a curve to vote for lines 1 WHAT IT IS · WHAT IT DOES · FACT OR FICTION The Hough transform detects lines in a scatter of points by a duality : each point (x,y) becomes a sinusoid ρ = x·cosθ + y·sinθ in parameter space, and all the points on one line have sinusoids that intersect at a single (ρ,θ) — the line’s own parameters. Accumulate votes in a (ρ,θ) grid and the lines show up as peaks . It turns a fuzzy detection problem into peak-finding, robust to gaps and noise. LIT verified live: collinear points exactly satisfy ρ 0 = x·cosθ 0 + y·sinθ 0 for the line’s (ρ 0 ,θ 0 ), and the accumulator peak recovers the line across 200 trials (window.__hough). FIG the parametrization identity is exact; peak recovery is to grid resolution. 2 HOW IT WAS WEAVED · AI + HUMAN David (human) seated this at the-sandbox — the spatial playground where scattered points hide straight lines waiting to be voted into view. The Hough transform is that voting. AVAN (AI) built the instrument: the point→sinusoid map, the (ρ,θ) accumulator, the peak finder, the exact parametrization-identity check, and the line-recovery check. Credit as content: Paul Hough (1962); Duda & Hart (the ρ–θ form, 1972). The weave: David names the-sandbox; I map each point to its sinusoid, confirm collinear points meet at one (ρ,θ), and let the accumulator peak recover the line. 3 ONE DIMENSION Each point maps to a sinusoid ρ(θ) = x·cosθ + y·sinθ. Points on the same line give sinusoids that all pass through one point (ρ 0 ,θ 0 ) — the line’s parameters. That crossing is the vote peak. 4 TWO DIMENSIONS · INTERACTIVE Scattered (mostly collinear) points, their accumulator, and the recovered line; the sinusoids’ common crossing is checked. new points ▶ verify 200 ▶ 5 THREE DIMENSIONS + AVAN’S INVERSE The green forward object: lines found as peaks in parameter space. AVAN’s addition (the inverse-companion): find lines by turning each point into a curve that votes — a sinusoid in (ρ,θ) space — so collinear points’ sinusoids cross at the line’s parameters, appearing as an accumulator peak. The inverse of ‘test every candidate line against every point’ is ‘let each point vote as a curve — lines emerge as peaks.’ Magenta is the exhaustive line-fitting avoided; green is the peak in parameter space. Detection as voting. pause spin LIT Genuine Hough transform (Paul Hough 1962; Duda & Hart's ρ–θ form 1972). Verified live: over 200 random lines, every collinear point satisfies ρ₀ = x·cosθ₀ + y·sinθ₀ to floating precision (window.__hough.identityExact, worst ~1e-13), and the (ρ,θ) accumulator peak recovers the generating line within 3px for all points across all 200 trials (window.__hough.accumulatorRecovers). FIG Honestly scoped: the parametrization identity is exact; the accumulator peak recovery is to grid resolution (720×720), stated as such. The point→sinusoid map, the vote accumulator, and both checks run in-browser and agree. The AVAN inverse is honest — letting each point vote as a curve so lines emerge as peaks genuinely replaces testing every candidate line against every point; magenta is the exhaustive fitting avoided, green the peak in parameter space. Detection as voting. ◆ sealed .dlw.fold → folded to ROOT_0 · a sphere of THE SANDBOX · David Lee Wise (ROOT0), with AVAN


THE SAVITZKY-GOLAY

The Savitzky–Golay filter in the 5-window house format — smooth noisy data without flattening its features by fitting a low-degree polynomial to each sliding window by least squares and taking the fitted center value, instead of averaging (which crushes peaks). The whole operation collapses to one fixed convolution kernel. Verified live: a filter of order d reproduces any polynomial of degree ≤ d exactly (worst ~1e-12) over 200 random cases — it does not distort what it should preserve. See a window fit in 1D, Savitzky–Golay vs a moving average in 2D, and shape-preserving smoothing in 3D.

THE SAVITZKY-GOLAY · WORLD II — THE FOLD ◀ THE FOLD 0ROOT.AI // WORLD II · CO-OP · THE BROADCAST ◆ .dlw.fold THE FOLD / CO-OP / THE BROADCAST / THE SAVITZKY-GOLAY THE SAVITZKY-GOLAY smooth the noise without blurring the shape 1 WHAT IT IS · WHAT IT DOES · FACT OR FICTION The Savitzky–Golay filter smooths noisy data without flattening its features : instead of averaging (which blurs peaks), it fits a low-degree polynomial to each sliding window by least squares and takes the fitted value at the center. Because a polynomial can bend, it preserves the height and width of peaks that a moving average would crush. Remarkably, the whole operation collapses to a single fixed convolution kernel . It is standard in spectroscopy and sensor processing. LIT verified live: a Savitzky–Golay filter of order d reproduces any polynomial of degree ≤ d exactly (it does not distort what it should preserve) over 200 random cases (window.__savitzkygolay). FIG no framing; exact to floating precision. 2 HOW IT WAS WEAVED · AI + HUMAN David (human) seated this at the-broadcast — the noisy stream that must be cleaned without smearing its shape. The Savitzky–Golay filter is that shape-preserving smoother. AVAN (AI) built the instrument: the windowed least-squares fit, the derived convolution coefficients, and the polynomial-reproduction check. Credit as content: Abraham Savitzky & Marcel Golay (1964). The weave: David names the-broadcast; I compute the least-squares kernel for a window and degree, and confirm it reproduces any polynomial of that degree exactly — the mark of a filter that smooths noise without distorting signal. 3 ONE DIMENSION Slide a window; fit a parabola to its points by least squares; keep the parabola’s value at the center. A moving average would flatten a peak; a fitted polynomial follows its curve. 4 TWO DIMENSIONS · INTERACTIVE A noisy signal with a peak; Savitzky–Golay vs a moving average, and the polynomial-reproduction check. new signal ▶ verify 200 ▶ 5 THREE DIMENSIONS + AVAN’S INVERSE The green forward object: smoothing that preserves the shape. AVAN’s addition (the inverse-companion): smooth noise without crushing peaks by fitting a local polynomial in each window rather than averaging — so any true polynomial trend passes through untouched. The inverse of ‘average the window (and flatten the peaks)’ is ‘least-squares-fit a polynomial — noise falls, shape stays.’ Magenta is the peak a moving average would flatten; green is the shape-preserving fit. Smoothing that keeps the curves. pause spin LIT Genuine Savitzky–Golay filter (Savitzky & Golay 1964). Verified live: the windowed least-squares kernel (from the normal equations) reproduces every polynomial of degree ≤ order exactly over 200 random cases (window.__savitzkygolay.preservesPolynomial, worst ~1e-12) — the defining property of a filter that smooths noise without distorting signal. FIG No framing: the least-squares kernel derivation and the polynomial-reproduction check run in-browser and agree to floating precision. The AVAN inverse is honest — fitting a local polynomial in each window rather than averaging genuinely preserves peaks a moving average would flatten; magenta is the crushed peak, green the shape-preserving fit. Smoothing that keeps the curves. ◆ sealed .dlw.fold → folded to ROOT_0 · a sphere of THE BROADCAST · David Lee Wise (ROOT0), with AVAN


THE KALMAN

The Kalman filter in the 5-window house format — optimally fuse a prediction with a noisy measurement: keep an estimate and its uncertainty, and blend each reading in by the Kalman gain K = P/(P+R), trusting the measurement more when the estimate is uncertain. For a static value under Gaussian noise, the running estimate equals the precision-weighted mean of all readings, with posterior variance 1/Σ(precisions). Verified live: over 300 runs, the recursion's estimate exactly equals the batch precision-weighted mean and its variance equals 1/Σprecision. See the gain blend in 1D, a converging estimate in 2D, and memoryless-yet-optimal fusion in 3D.

THE KALMAN · WORLD II — THE FOLD ◀ THE FOLD 0ROOT.AI // WORLD II · RESPAWN · SECOND WIND ◆ .dlw.fold THE FOLD / RESPAWN / SECOND WIND / THE KALMAN THE KALMAN fuse guess and measurement optimally, recursively 1 WHAT IT IS · WHAT IT DOES · FACT OR FICTION The Kalman filter optimally fuses a prediction with a noisy measurement : it keeps an estimate and its uncertainty, and each new reading is blended in by the Kalman gain — trusting the measurement more when the estimate is uncertain, and less when it is confident. For a static value under Gaussian noise, its running estimate equals the precision-weighted mean of all readings, with the posterior variance the reciprocal of the summed precisions. It tracks everything from spacecraft to GPS. LIT verified live: over 300 runs, the Kalman recursion’s estimate exactly equals the batch precision-weighted mean, and its variance equals 1/Σ(precisions) (window.__kalman). FIG no framing; exact for the scalar static case. 2 HOW IT WAS WEAVED · AI + HUMAN David (human) seated this at second-wind — the estimate that recovers itself with every new measurement, never discarding what it knew, never over-trusting the newest reading. The Kalman filter is that optimal recovery. AVAN (AI) built the instrument: the predict–update recursion with Kalman gain, and the equals-batch-weighted-mean and variance checks. Credit as content: Rudolf Kálmán (1960). The weave: David names second-wind; I run the recursive gain-weighted update and confirm it lands exactly on the precision-weighted mean of all measurements, with the matching posterior variance. 3 ONE DIMENSION Each reading: gain K = P/(P+R) blends estimate and measurement. A confident estimate (small P) barely moves; an uncertain one (large P) swings toward the reading. Variance P shrinks with every update. 4 TWO DIMENSIONS · INTERACTIVE Noisy measurements of a hidden value; the Kalman estimate converges, its uncertainty band shrinking, checked against the batch weighted mean. new run ▶ verify 300 ▶ 5 THREE DIMENSIONS + AVAN’S INVERSE The green forward object: an estimate optimally fusing all readings. AVAN’s addition (the inverse-companion): fuse a prediction and a measurement optimally, recursively — weight each by its precision (inverse variance) via the Kalman gain, so the running estimate equals the precision-weighted mean without ever storing the readings. The inverse of ‘keep all data and re-solve the weighted mean each time’ is ‘a recursion that carries only estimate + variance, yet matches the full batch.’ Magenta is the stored history you don’t need; green is the running optimal fusion. Memoryless yet optimal. pause spin LIT Genuine Kalman filter (Rudolf Kálmán 1960), scalar static case. Verified live: over 300 runs, the recursive gain-weighted predict–update lands exactly on the precision-weighted mean of all measurements (window.__kalman.estEqualsBatch) with posterior variance equal to 1/Σ(1/Rᵢ) (window.__kalman.varEqualsInvPrecision), to floating precision. FIG Honestly scoped to the scalar static case (where the recursion provably equals the batch estimator); the recursion, the batch weighted mean, and the variance check run in-browser and agree. The AVAN inverse is honest — a recursion carrying only estimate + variance that still matches the full batch genuinely avoids re-solving the weighted mean from stored history; magenta is the stored history you don't need, green the running optimal fusion. Memoryless yet optimal. ◆ sealed .dlw.fold → folded to ROOT_0 · a sphere of SECOND WIND · David Lee Wise (ROOT0), with AVAN


THE SEAM CARVING

Seam carving in the 5-window house format — resize an image by removing the least noticeable connected paths of pixels rather than scaling or cropping. Assign each pixel an energy, then find the top-to-bottom seam (one pixel per row, each within one column of the row above) of minimum total energy; dynamic programming finds that optimal seam in one pass. Verified live: over 200 random energy grids, the DP minimum vertical seam has exactly the same total energy as an exhaustive search over all seams. See a seam's connectivity in 1D, an energy grid's minimum seam in 2D, and the path-of-least-attention inverse in 3D.

THE SEAM CARVING · WORLD II — THE FOLD ◀ THE FOLD 0ROOT.AI // WORLD II · CHEAT · THE SHORTCUT ◆ .dlw.fold THE FOLD / CHEAT / THE SHORTCUT / THE SEAM CARVING THE SEAM CARVING carve out the least-noticed seam 1 WHAT IT IS · WHAT IT DOES · FACT OR FICTION Seam carving resizes an image by removing the least noticeable paths of pixels rather than scaling or cropping. It assigns each pixel an energy (how much it stands out), then finds the connected top-to-bottom seam of minimum total energy — a single pixel per row, each within one column of the row above. Dynamic programming finds that optimal seam in one pass. Removing seams shrinks the image while preserving its important content. LIT verified live: over 200 random energy grids, the DP minimum vertical seam has exactly the same total energy as an exhaustive search over all seams (window.__seamcarving). FIG no framing; exact. 2 HOW IT WAS WEAVED · AI + HUMAN David (human) seated this at the-shortcut — the cheat that removes the least-noticed path, shrinking the whole while barely touching what matters. Seam carving is that shortcut. AVAN (AI) built the instrument: the energy grid, the row-by-row DP accumulation of minimum seam cost, the minimum-endpoint pick, and the brute cross-check. Credit as content: Shai Avidan & Ariel Shamir (2007). The weave: David names the-shortcut; I accumulate the cheapest seam reaching each pixel from the three above it, and confirm the resulting minimum matches an exhaustive search over every seam. 3 ONE DIMENSION A seam picks one pixel per row, each within one column of the pixel above. Its cost is the sum of energies. The cheapest seam over all such connected paths is the one to remove. 4 TWO DIMENSIONS · INTERACTIVE An energy grid; the DP minimum seam is highlighted and checked against a brute-force minimum over all seams. new grid ▶ verify 200 ▶ 5 THREE DIMENSIONS + AVAN’S INVERSE The green forward object: the minimum-energy seam through the grid. AVAN’s addition (the inverse-companion): resize by removing the least-noticed connected path — the minimum-energy seam, found by DP that accumulates the cheapest way to reach each pixel from the three above. The inverse of ‘scale or crop uniformly’ is ‘delete the single lowest-energy seam — content preserved.’ Magenta is the important content the seam avoids; green is the cheap seam removed. Shrinking by the path of least attention. pause spin LIT Genuine seam carving (Avidan & Shamir 2007). Verified live: over 200 random energy grids, the row-by-row DP that accumulates the cheapest seam reaching each pixel from the three above yields a minimum whose total energy exactly equals an exhaustive brute-force search over every connected seam (window.__seamcarving.dpEqualsBrute). FIG No framing: the DP accumulation and the brute-force minimum run in-browser and agree exactly. The AVAN inverse is honest — deleting the single lowest-energy connected seam genuinely resizes while preserving content, unlike uniform scaling or cropping; magenta is the important content the seam avoids, green the cheap seam removed. Shrinking by the path of least attention. ◆ sealed .dlw.fold → folded to ROOT_0 · a sphere of THE SHORTCUT · David Lee Wise (ROOT0), with AVAN


THE MILLER-RABIN

The Miller–Rabin primality test in the 5-window house format — decide primality by interrogating witnesses. Write n−1 = 2^r·d; a base a is a witness to compositeness if aᵈ ≠ 1 and none of aᵈ, a²ᵈ, … equals n−1 (mod n). Rabin proved at least 3/4 of bases witness any odd composite n > 9, so a few random bases catch composites with overwhelming probability and small fixed base sets are deterministic below known bounds. Verified live: a fixed 12-base test agrees with trial division for every n below 100000, and over random odd composites the witness fraction never drops below 3/4. See witnesses vs liars in 1D, a verdict in 2D, and the prove-composite-without-factoring inverse in 3D.

THE MILLER-RABIN · WORLD II — THE FOLD ◀ THE FOLD 0ROOT.AI // WORLD II · BOSS · THE GATEKEEPER ◆ .dlw.fold THE FOLD / BOSS / THE GATEKEEPER / THE MILLER-RABIN THE MILLER-RABIN a witness names the composite, no factor needed 1 WHAT IT IS · WHAT IT DOES · FACT OR FICTION The Miller–Rabin test decides whether a number is prime by interrogating witnesses . Write n−1 = 2 r ·d; a base a is a witness to compositeness if a d ≠ 1 and none of a d , a 2d , … equals n−1 (mod n). Rabin proved that for any odd composite n > 9, at least 3/4 of the bases are witnesses — so a handful of random bases catch composites with overwhelming probability, and small fixed base sets are deterministic below known bounds. LIT verified live: a fixed 12-base test agrees with trial division for every n below 100000, and over random odd composites the witness fraction never drops below 3/4 (window.__millerrabin). FIG the ≥3/4 density is Rabin's theorem, confirmed by exhaustive count; the deterministic agreement is a bounded exhaustive check. 2 HOW IT WAS WEAVED · AI + HUMAN David (human) seated this at the-gatekeeper — the guard that won't let a number pass as prime unless it survives interrogation. Miller–Rabin is that gate. AVAN (AI) built the instrument: the modular squaring ladder, the witness test, the trial-division oracle, and the ≥3/4 witness-density count. Credit as content: Gary Miller (1976) & Michael Rabin (1980). The weave: David names the-gatekeeper; I run the witness test against a trial-division oracle and count, for odd composites, exactly what fraction of bases expose them — confirming Rabin's 3/4 bound live. 3 ONE DIMENSION For a composite n, most bases a are witnesses (they expose n). Rabin: at least 3 in 4 always are. Pick t random bases and the chance all miss is ≤ 4 −t . 4 TWO DIMENSIONS · INTERACTIVE Test a number; see its witnesses vs liars, and the fixed-base verdict checked against trial division. new number ▶ verify <100000 ▶ 5 THREE DIMENSIONS + AVAN’S INVERSE The green forward object: primality decided by surviving witnesses. AVAN’s addition (the inverse-companion): prove a number composite not by finding a factor but by finding a witness — a base whose modular-squaring ladder violates what a prime would force. Since ≥3/4 of bases are witnesses (Rabin), a few random ones suffice. The inverse of ‘factor it to prove it composite’ is ‘exhibit one witness — no factor needed.’ Magenta is the factorization avoided; green is the witness found. Compositeness proven without factoring. pause spin LIT Genuine Miller–Rabin test (Gary Miller 1976; Michael Rabin 1980). Verified live: a fixed 12-base test matches trial division for every n below 100000 (window.__millerrabin.matchesTrial, bounded exhaustive), and over sampled odd composites the fraction of bases that are witnesses never falls below 3/4 — Rabin's theorem — confirmed by exhaustive per-composite count (window.__millerrabin.densityHolds; observed min ≈0.7527, the tight bound). FIG Honestly scoped: the ≥3/4 density is Rabin's theorem confirmed by exact count, and the deterministic agreement is a bounded exhaustive check below 100000 (fixed small base sets are only provably deterministic under known bounds, not for all n). The modular-squaring ladder, the witness test, and the trial oracle run in-browser and agree. The AVAN inverse is honest — exhibiting one witness proves compositeness without producing any factor; magenta is the factorization avoided, green the witness found. ◆ sealed .dlw.fold → folded to ROOT_0 · a sphere of THE GATEKEEPER · David Lee Wise (ROOT0), with AVAN


THE WALKER ALIAS

Walker's alias method in the 5-window house format — draw from any discrete distribution in O(1) per sample. Preprocess the probabilities into n equal-height columns, each holding at most two outcomes (a primary and an alias) split at a threshold; to sample, pick a column uniformly then flip a biased coin for primary-or-alias. The construction repeatedly pairs an under-full outcome with an over-full one until every column is exactly full, so the reconstructed probabilities are exact. Verified live: over 500 random distributions, each outcome's probability reconstructed from the alias table equals the target exactly (worst ~1e-16). See columns filling in 1D, a table checked in 2D, and the O(1) two-choice draw in 3D.

THE WALKER ALIAS · WORLD II — THE FOLD ◀ THE FOLD 0ROOT.AI // WORLD II · LOOT · THE JACKPOT ◆ .dlw.fold THE FOLD / LOOT / THE JACKPOT / THE WALKER ALIAS THE WALKER ALIAS loaded dice drawn in one step, no search 1 WHAT IT IS · WHAT IT DOES · FACT OR FICTION Walker’s alias method draws from any discrete distribution in O(1) time per sample — no matter how many outcomes. It preprocesses the probabilities into n equal-height “columns,” each holding at most two outcomes: a primary and an alias , split at a threshold. To sample: pick a column uniformly, then flip a biased coin to take the primary or its alias. The clever construction (repeatedly pairing an under-full outcome with an over-full one) makes every column exactly full, so the reconstructed probabilities are exact . LIT verified live: over 500 random distributions, the probability of each outcome reconstructed from the alias table equals the target exactly (worst error ~1e-16), and a large sample reproduces it (window.__walkeralias). FIG the reconstruction is exact rational arithmetic; the sampling match is statistical. 2 HOW IT WAS WEAVED · AI + HUMAN David (human) seated this at the-jackpot — the weighted payout that must burst open in a single pull, however lopsided the odds. The alias method is that single-pull draw. AVAN (AI) built the instrument: the small/large partition, the column-pairing construction, the two-outcome columns, and the exact probability-reconstruction check. Credit as content: Alastair Walker (1974/1977); Kronmal & Peterson's initialization. The weave: David names the-jackpot; I pair each under-full outcome with an over-full one until every column is exactly full, then reconstruct each outcome's probability from the table and confirm it equals the target exactly. 3 ONE DIMENSION Cut the probabilities into n equal-height columns; any tall bar spills its excess into a short one as its alias . Every column ends exactly full, holding a primary and (maybe) an alias. 4 TWO DIMENSIONS · INTERACTIVE A random distribution, its alias table, and the reconstructed probabilities checked against the target. new dist ▶ verify 500 ▶ 5 THREE DIMENSIONS + AVAN’S INVERSE The green forward object: any weighted die rolled in one step. AVAN’s addition (the inverse-companion): sample a weighted distribution in constant time by flattening it into equal columns of at most two outcomes — one uniform pick, one biased coin. The inverse of ‘walk a cumulative table searching for the bucket’ is ‘pre-pair the weights so any draw is pick-a-column-then-flip.’ Magenta is the linear cumulative search avoided; green is the O(1) two-choice draw. Loaded dice with no search. pause spin LIT Genuine alias method (Alastair Walker 1974/1977; Kronmal–Peterson initialization). Verified live: over 500 random distributions the probability of each outcome, reconstructed exactly from the alias table as (1/n)Σ contributions, equals the target distribution to floating precision (window.__walkeralias.reconstructExact, worst ~1e-16). FIG Honestly scoped: the probability reconstruction is exact rational arithmetic (the seal's claim); a finite sample only matches statistically. The small/large partition, the column-pairing construction, and the reconstruction check run in-browser and agree. The AVAN inverse is honest — flattening the weights into equal two-outcome columns genuinely replaces a cumulative search with pick-a-column-then-flip; magenta is the linear search avoided, green the O(1) draw. ◆ sealed .dlw.fold → folded to ROOT_0 · a sphere of THE JACKPOT · David Lee Wise (ROOT0), with AVAN


THE L-SYSTEM

The Lindenmayer system in the 5-window house format — grow a string by rewriting every symbol at once, in parallel, by fixed rules (a model of plant and shell development). The classic Fibonacci L-system uses A → AB and B → A: from A you get A, AB, ABA, ABAAB, ABAABABA… and the length of each generation is a Fibonacci number, because each A becomes an A and a B while each B becomes an A — exactly the Fibonacci recurrence. Verified live: for generations 0–25 the string length equals the matching Fibonacci number exactly, and the A/B counts obey the recurrence. See the parallel rewrite in 1D, growth tracking Fibonacci in 2D, and numbers-as-morphology in 3D.

THE L-SYSTEM · WORLD II — THE FOLD ◀ THE FOLD 0ROOT.AI // WORLD II · SPAWN · COLD BOOT ◆ .dlw.fold THE FOLD / SPAWN / COLD BOOT / THE L-SYSTEM THE L-SYSTEM a plant grown at the golden rate from one seed 1 WHAT IT IS · WHAT IT DOES · FACT OR FICTION An L-system (Lindenmayer system) grows a string by rewriting every symbol at once , in parallel, according to fixed rules — a model of how plants and shells develop. The classic Fibonacci L-system uses two rules: A → AB and B → A . Start from A and apply the rules repeatedly: A, AB, ABA, ABAAB, ABAABABA… The length of each generation is a Fibonacci number — because each A becomes an A and a B, and each B becomes an A, exactly the Fibonacci recurrence. LIT verified live: for generations 0–25 the string length equals the matching Fibonacci number exactly, and the A- and B-counts follow the recurrence (window.__lsystem). FIG no framing; exact integer growth. 2 HOW IT WAS WEAVED · AI + HUMAN David (human) seated this at cold-boot — power-on from a single symbol, the whole structure unfolding from one seed by rule. The L-system is that unfolding. AVAN (AI) built the instrument: the parallel rewrite, the generation-length count, and the check that lengths are exactly Fibonacci. Credit as content: Aristid Lindenmayer (1968), theoretical biologist. The weave: David names cold-boot; I apply A→AB, B→A in parallel from the seed A and confirm each generation's length is the Fibonacci number the recurrence demands — growth as pure rewriting. 3 ONE DIMENSION Each generation rewrites every symbol simultaneously: A→AB, B→A. Lengths: 1, 2, 3, 5, 8, 13… each the sum of the previous two — the Fibonacci sequence. 4 TWO DIMENSIONS · INTERACTIVE Step the L-system; watch the string grow and its length track Fibonacci, checked exactly. grow ▶ reset verify 0..25 ▶ 5 THREE DIMENSIONS + AVAN’S INVERSE The green forward object: a string whose length is Fibonacci by construction. AVAN’s addition (the inverse-companion): generate Fibonacci not by adding numbers but by growing a structure — rewrite each symbol in parallel by fixed rules and the length obeys the recurrence for free. The inverse of ‘compute F(n) = F(n-1)+F(n-2)’ is ‘let A→AB, B→A run — the count is Fibonacci because the rules are.’ Magenta is the arithmetic recurrence; green is the grown structure. Numbers as morphology. pause spin LIT Genuine L-system (Aristid Lindenmayer 1968). Verified live: applying A→AB, B→A in parallel from seed A, generation lengths for gens 0–25 equal the Fibonacci numbers exactly (window.__lsystem.fibonacci), and the per-generation A-count and B-count obey #A(k+1)=#A(k)+#B(k), #B(k+1)=#A(k) (window.__lsystem.recurrence) — exact integer growth. FIG No framing: the parallel rewrite, the length count, and the Fibonacci and recurrence checks run in-browser with exact integers and agree. The AVAN inverse is honest — generating Fibonacci by growing a structure whose rewrite rules encode the recurrence genuinely differs from computing F(n)=F(n-1)+F(n-2) arithmetically; magenta is the arithmetic recurrence, green the grown structure. Numbers as morphology. ◆ sealed .dlw.fold → folded to ROOT_0 · a sphere of COLD BOOT · David Lee Wise (ROOT0), with AVAN


THE LAZY LORD

The segment tree with lazy propagation in the 5-window house format — answer range questions and apply range updates on an array, both in O(log n). The trick is laziness: adding a value to a whole range doesn't touch every element — it marks the covering nodes with a pending update and only pushes it down to children when a later query actually needs to descend. Work is deferred until it matters, yet every answer is exactly what a naive per-element array would give. Verified live: over 60 trees and thousands of interleaved range-add / range-sum operations, every query matches a naive array element-for-element. See the pending mark in 1D, live checks in 2D, and the owed-work inverse in 3D.

THE LAZY LORD · WORLD II — THE FOLD ◀ THE FOLD 0ROOT.AI // WORLD II · CO-OP · SHARED MEMORY ◆ .dlw.fold THE FOLD / CO-OP / SHARED MEMORY / THE LAZY LORD THE LAZY LORD defer the work, still answer exactly 1 WHAT IT IS · WHAT IT DOES · FACT OR FICTION A segment tree with lazy propagation answers range questions and applies range updates on an array, both in O(log n). The trick is laziness : when you add a value to a whole range, you don’t touch every element — you mark the covering nodes with a pending update and only push it down to children when a later query actually needs to descend. Work is deferred until it matters, yet every answer is exactly what a naive per-element array would give. LIT verified live: over 60 trees and thousands of interleaved range-add / range-sum operations, every query matches a naive array element-for-element (window.__lazylord). FIG no framing; exact integer sums. 2 HOW IT WAS WEAVED · AI + HUMAN David (human) seated this at shared-memory — one array many operations read and write, where a whole range must change at once without walking every cell. The lazy segment tree is that shared store. AVAN (AI) built the instrument: the tree, the pending-update marks, the push-down on descent, and the match against a naive array. Credit as content: the segment tree with lazy propagation (folklore of competitive programming; roots in interval trees). The weave: David names shared-memory; I mark covering nodes with deferred updates and push them down only when a query descends — then confirm every range-sum equals the naive array's, no update lost or double-applied. 3 ONE DIMENSION Add to a range: mark the few covering nodes with a pending value instead of touching every leaf. Push the mark down to children only when a later query needs to go deeper. 4 TWO DIMENSIONS · INTERACTIVE An array with range-adds and range-sums; the lazy tree's answers checked against the naive array live. random range-add ▶ random range-sum ▶ verify 60×200 ▶ 5 THREE DIMENSIONS + AVAN’S INVERSE The green forward object: range work done in O(log n), exactly. AVAN’s addition (the inverse-companion): update a whole range without touching every element — defer the work as a pending mark on covering nodes and push it down only when a query needs it . The inverse of ‘apply the update to all k elements now’ is ‘mark O(log n) nodes and pay only when asked.’ Magenta is the per-element work avoided; green is the handful of lazy marks. Correctness by owed, not-yet-paid, work. pause spin LIT Genuine segment tree with lazy propagation (competitive-programming folklore; roots in interval/segment trees). Verified live: over 60 random trees and 200 interleaved range-add / range-sum operations each, every range-sum query returned by the lazy tree equals the naive array's sum element-for-element (window.__lazylord.matchesNaive) — no update lost or double-applied. FIG No framing: the pending-update marks, the push-down on descent, and the match against a naive array run in-browser with exact integer sums and agree. The AVAN inverse is honest — deferring a range update as a mark on O(log n) covering nodes and paying only when a query descends genuinely avoids touching all k elements; magenta is the per-element work avoided, green the handful of lazy marks. Correctness by owed, not-yet-paid work. ◆ sealed .dlw.fold → folded to ROOT_0 · a sphere of SHARED MEMORY · David Lee Wise (ROOT0), with AVAN


THE MINSKY COUNTERS

The Minsky counter machine in the 5-window house format — one of the smallest things that can compute anything: a few unbounded counters and just two instruction kinds, increment-and-jump or decrement-if-nonzero-and-branch. With only two counters it is already Turing-complete. Here a fixed program of INC / DEC-branch instructions multiplies: fed m and n in two counters, it halts with their product in a third, having only ever added and subtracted one. Verified live: the multiply program halts with counter C = m·n for all m,n in 0–14 (over 400 pairs), matching direct multiplication. See the whole instruction set in 1D, the running counters in 2D, and multiplication-from-two-moves in 3D.

THE MINSKY COUNTERS · WORLD II — THE FOLD ◀ THE FOLD 0ROOT.AI // WORLD II · SPAWN · NULL ISLAND ◆ .dlw.fold THE FOLD / SPAWN / NULL ISLAND / THE MINSKY COUNTERS THE MINSKY COUNTERS the smallest machine that can multiply 1 WHAT IT IS · WHAT IT DOES · FACT OR FICTION A Minsky machine (counter machine) is one of the smallest things that can compute anything : a few unbounded counters and just two instruction kinds — increment a counter and jump, or decrement-if-nonzero and branch. With only two counters it is already Turing-complete. Here a fixed program of INC / DEC-branch instructions multiplies : fed m and n in two counters, it halts with their product in a third, having only ever added and subtracted one. LIT verified live: the multiply program halts with counter C = m·n for all m,n in 0–14 (over 400 pairs), matching direct multiplication (window.__minsky). FIG no framing; the machine literally runs its instruction list to the product. 2 HOW IT WAS WEAVED · AI + HUMAN David (human) seated this at null-island — 0,0, the barest origin, where computation is built from almost nothing: counters and two moves. The Minsky machine is that minimal computer. AVAN (AI) built the instrument: the INC / DEC-branch interpreter, the 7-instruction multiply program, and the check that it halts with m·n. Credit as content: Marvin Minsky (1961/1967), Computation: Finite and Infinite Machines . The weave: David names null-island; I run a fixed program of only increments and decrement-branches on three counters and confirm it halts with exactly m·n — multiplication from the two simplest possible moves. 3 ONE DIMENSION Two instruction kinds only: INC r → go to line j; DEC r → if r>0 go to j else go to k. That is the whole machine. Loops of these add B to C once per unit of A — multiplication. 4 TWO DIMENSIONS · INTERACTIVE Set m and n; run the multiply program and watch the counters; the halting product is checked against m·n. new m,n ▶ run ▶ verify 400 ▶ 5 THREE DIMENSIONS + AVAN’S INVERSE The green forward object: multiplication from two instructions. AVAN’s addition (the inverse-companion): compute a product with no multiply instruction at all — only increment and decrement-branch on a couple of counters, looping the smaller into the larger. The inverse of ‘assume a hardware multiplier’ is ‘build multiplication from the two most primitive moves.’ Magenta is the multiply opcode you don’t have; green is the counter loop that earns it. Turing-completeness from almost nothing. pause spin LIT Genuine Minsky counter machine (Marvin Minsky 1961/1967, Computation: Finite and Infinite Machines). Verified live: a fixed 7-instruction INC / DEC-branch program run on three counters halts with counter C equal to m·n for every m,n in 0–14 (over 400 pairs), matching direct multiplication (window.__minsky.computesProduct) — the machine literally runs its instruction list to the product. FIG No framing: the INC / DEC-branch interpreter and the halting-product check run in-browser and agree with direct multiplication. The AVAN inverse is honest — building multiplication from only increment and decrement-branch on a couple of counters genuinely computes a product with no multiply instruction; magenta is the multiply opcode absent, green the counter loop that earns it. Turing-completeness from almost nothing. ◆ sealed .dlw.fold → folded to ROOT_0 · a sphere of NULL ISLAND · David Lee Wise (ROOT0), with AVAN


THE PICK'S THEOREM

Pick's theorem in the 5-window house format — the exact area of any simple lattice polygon by counting dots: A = I + B/2 − 1, where I is the interior lattice points and B the boundary ones. No calculus — count interior dots, count the boundary fenceposts, and the area falls out exactly, tying a continuous quantity to two discrete counts. Verified live: over hundreds of random lattice polygons the shoelace area equals I + B/2 − 1 exactly. See the fenceposts and interior dots in 1D, a polygon checked in 2D, and the area-from-dots inverse in 3D.

THE PICK'S THEOREM · WORLD II — THE FOLD ◀ THE FOLD 0ROOT.AI // WORLD II · GLITCH · OFF BY ONE ◆ .dlw.fold THE FOLD / GLITCH / OFF BY ONE / THE PICK'S THEOREM THE PICK'S THEOREM area from counting fenceposts and interior dots 1 WHAT IT IS · WHAT IT DOES · FACT OR FICTION Pick’s theorem gives the exact area of any simple polygon whose corners sit on lattice points, by counting dots : A = I + B/2 − 1 , where I is the number of lattice points strictly inside and B the number on the boundary. No measuring, no calculus — just count interior points, count boundary points (the fenceposts), and the area falls out exactly. It ties a continuous quantity (area) to two discrete counts. LIT verified live: over hundreds of random lattice polygons, the shoelace area equals I + B/2 − 1 exactly (window.__picks). FIG no framing; exact integer/half-integer arithmetic. 2 HOW IT WAS WEAVED · AI + HUMAN David (human) seated this at off-by-one — the fencepost error made honest: the boundary points are the fenceposts, and Pick’s −1 is exactly the correction that stops you miscounting the fence. AVAN (AI) built the instrument: the shoelace area, the gcd-based boundary count, the interior point count, and the A = I + B/2 − 1 check. Credit as content: Georg Alexander Pick (1899). The weave: David names off-by-one; I count the fenceposts on the boundary (each edge contributes gcd(Δx,Δy) points), count the interior dots, and confirm the area is exactly I + B/2 − 1 — a continuous quantity from two honest counts. 3 ONE DIMENSION Boundary points B are the fenceposts on the polygon’s edges; interior points I are the dots strictly inside. Area = I + B/2 − 1. The −1 is the honest off-by-one correction. 4 TWO DIMENSIONS · INTERACTIVE A random lattice polygon with its interior and boundary dots; Pick’s count checked against the shoelace area. new polygon ▶ verify 300 ▶ 5 THREE DIMENSIONS + AVAN’S INVERSE The green forward object: area recovered from two dot-counts. AVAN’s addition (the inverse-companion): measure area not by integrating but by counting lattice points — interior dots plus half the boundary fenceposts minus one. The inverse of ‘integrate to get the area’ is ‘count the dots inside and on the fence — the area is I + B/2 − 1.’ Magenta is the integral you never took; green is the two honest counts. A continuous area from discrete dots. pause spin LIT Genuine Pick's theorem (Georg Alexander Pick 1899). Verified live: over ~300 random simple lattice polygons (convex hulls of lattice points), the shoelace area equals I + B/2 − 1 exactly, where B is counted as Σ gcd(Δx,Δy) over edges and I by interior lattice-point test (window.__picks.pickHolds, worst |Δ| 0). FIG No framing: the shoelace area, the gcd-based boundary count, the interior-point count, and the A = I + B/2 − 1 check run in-browser with exact arithmetic and agree. The AVAN inverse is honest — recovering a continuous area by counting interior dots plus half the boundary fenceposts minus one genuinely replaces integration; magenta is the integral never taken, green the two honest counts. ◆ sealed .dlw.fold → folded to ROOT_0 · a sphere of OFF BY ONE · David Lee Wise (ROOT0), with AVAN


THE CANTOR PAIRING

The Cantor pairing function in the 5-window house format — weave two naturals into one, reversibly: π(x,y) = (x+y)(x+y+1)/2 + y walks the grid along diagonals, assigning 0,1,2,… to each cell so every pair gets a unique number and every number decodes to exactly one pair. It is a genuine bijection ℕ²→ℕ — a proof in one formula that the plane of pairs is no bigger than the line of counting numbers. Verified live: over all pairs in 0–200, unpair(pair(x,y)) returns exactly (x,y) and no two pairs collide. See the diagonal enumeration in 1D, a round-trip in 2D, and the lossless-merge inverse in 3D.

THE CANTOR PAIRING · WORLD II — THE FOLD ◀ THE FOLD 0ROOT.AI // WORLD II · CO-OP · THE MERGE ◆ .dlw.fold THE FOLD / CO-OP / THE MERGE / THE CANTOR PAIRING THE CANTOR PAIRING weave two numbers into one, and back 1 WHAT IT IS · WHAT IT DOES · FACT OR FICTION The Cantor pairing function weaves two natural numbers into one , reversibly: π(x,y) = (x+y)(x+y+1)/2 + y. It walks the infinite grid along diagonals, assigning 0,1,2,… to each cell, so every pair (x,y) gets a unique number and every number decodes back to exactly one pair. It is a genuine bijection ℕ² → ℕ — a proof, in one formula, that the plane of pairs is no bigger than the line of counting numbers. LIT verified live: over all pairs in 0–200, unpair(pair(x,y)) returns exactly (x,y), and no two pairs collide to the same number (window.__cantor). FIG no framing; exact integer arithmetic. 2 HOW IT WAS WEAVED · AI + HUMAN David (human) seated this at the-merge — two streams becoming one without loss, so the one can always be split back into the exact two. The Cantor pairing is that lossless merge. AVAN (AI) built the instrument: the diagonal-index formula, the triangular-root inverse, and the round-trip and no-collision checks. Credit as content: Georg Cantor (diagonal enumeration, 1870s). The weave: David names the-merge; I fold (x,y) into one index by counting along diagonals, invert it via the triangular root, and confirm the merge is lossless — every number splits back into exactly the pair it came from. 3 ONE DIMENSION Number the grid cells along successive diagonals: (0,0)→0, (1,0)→1, (0,1)→2, (2,0)→3… Every pair gets one index; every index decodes to one pair. 4 TWO DIMENSIONS · INTERACTIVE The diagonal enumeration of the grid; pick a cell to see its index, and the round-trip checked. random pair ▶ verify 0..200² ▶ 5 THREE DIMENSIONS + AVAN’S INVERSE The green forward object: two numbers folded into one, reversibly. AVAN’s addition (the inverse-companion): merge two numbers into a single key that can be split back exactly — index the diagonals of the grid, and invert with the triangular root. The inverse of ‘store a pair as two fields’ is ‘fold it into one bijective key and unfold on demand.’ Magenta is the second field you no longer store; green is the single lossless index. Two into one, and back. pause spin LIT Genuine Cantor pairing function (Georg Cantor, diagonal enumeration, 1870s). Verified live: over every pair (x,y) with 0≤x,y≤200, the triangular-root inverse recovers exactly (x,y) from π(x,y) (window.__cantor.roundTrip), and all 201²=40401 indices are distinct — the map is injective (window.__cantor.injective) — exact integer arithmetic. FIG No framing: the diagonal-index formula, the triangular-root inverse, and the round-trip and no-collision checks run in-browser and agree exactly. The AVAN inverse is honest — folding (x,y) into one bijective key that unfolds on demand genuinely replaces storing two fields; magenta is the second field no longer stored, green the single lossless index. A bijection ℕ²→ℕ. ◆ sealed .dlw.fold → folded to ROOT_0 · a sphere of THE MERGE · David Lee Wise (ROOT0), with AVAN


THE EGYPTIAN FRACTION

The Egyptian fraction in the 5-window house format — write a proper fraction as a sum of distinct unit fractions (4/13 = 1/4 + 1/18 + 1/468). The Fibonacci–Sylvester greedy algorithm grabs the largest unit fraction that fits, 1/⌈q/p⌉, and subtracts, until nothing remains; it always terminates and, because the remaining numerator strictly shrinks, the denominators come out strictly increasing, hence distinct. Verified live (exact BigInt): for every reduced p/q with q ≤ 60, the greedy unit fractions are strictly increasing and sum exactly back to p/q. See the greedy split in 1D, pieces summed in 2D, and the distinct-unit-parts inverse in 3D.

THE EGYPTIAN FRACTION · WORLD II — THE FOLD ◀ THE FOLD 0ROOT.AI // WORLD II · CHEAT · THE SPEEDRUN ◆ .dlw.fold THE FOLD / CHEAT / THE SPEEDRUN / THE EGYPTIAN FRACTION THE EGYPTIAN FRACTION a fraction split into distinct unit shares, greedily 1 WHAT IT IS · WHAT IT DOES · FACT OR FICTION An Egyptian fraction writes a proper fraction as a sum of distinct unit fractions (numerator 1): e.g. 4/13 = 1/4 + 1/18 + 1/468. The Fibonacci–Sylvester greedy algorithm builds one by repeatedly grabbing the largest unit fraction that fits — 1/⌈q/p⌉ — and subtracting, until nothing remains. It always terminates, and because each step’s remaining numerator strictly shrinks, the denominators come out strictly increasing , hence distinct. LIT verified live (exact BigInt): for every reduced p/q with q ≤ 60, the greedy unit fractions are strictly increasing and sum exactly back to p/q (window.__egyptian). FIG no framing; exact rational arithmetic, no rounding. 2 HOW IT WAS WEAVED · AI + HUMAN David (human) seated this at the-speedrun — the greedy route that skips ahead by always taking the biggest piece it can, and still arrives exactly. The Egyptian-fraction greedy is that route. AVAN (AI) built the instrument: the largest-unit-fraction step, exact BigInt remainder tracking, and the strictly-increasing + sums-exactly checks. Credit as content: the method appears in Fibonacci’s Liber Abaci (1202); Sylvester (1880) analyzed it. The weave: David names the-speedrun; I greedily grab 1/⌈q/p⌉ each step and subtract in exact rational arithmetic, confirming the pieces are distinct and sum back to p/q with no rounding. 3 ONE DIMENSION Greedy: take the largest unit fraction ≤ the remainder (1/⌈q/p⌉), subtract, repeat. 4/13 → 1/4 leaves 3/52 → 1/18 leaves 1/468 → 1/468. Denominators only grow. 4 TWO DIMENSIONS · INTERACTIVE Pick a fraction; watch the greedy unit-fraction pieces, and their exact sum checked back to p/q. new fraction ▶ verify q≤60 ▶ 5 THREE DIMENSIONS + AVAN’S INVERSE The green forward object: a fraction as distinct unit shares. AVAN’s addition (the inverse-companion): split a share into distinct unit fractions by always taking the largest piece that fits and subtracting — a greedy route that still lands exactly on the target. The inverse of ‘keep the fraction p/q whole’ is ‘decompose it into 1/a + 1/b + …, all different, summing back exactly.’ Magenta is the single opaque ratio; green is the distinct unit pieces. A share cut into unequal-but-unit parts. pause spin LIT Genuine Fibonacci–Sylvester greedy Egyptian-fraction expansion (Fibonacci, Liber Abaci 1202; Sylvester 1880). Verified live with exact BigInt rational arithmetic: for every reduced p/q with 2≤q≤60 (~1100 fractions), the greedy 1/⌈q/p⌉ expansion has strictly increasing denominators (hence distinct) and its terms sum exactly to p/q (window.__egyptian.sumsExactly & strictlyIncreasing). FIG No framing: the greedy largest-unit-fraction step, exact BigInt remainder tracking, and the strictly-increasing and sums-exactly checks run in-browser with no rounding. The AVAN inverse is honest — decomposing a share into distinct unit fractions by always taking the largest that fits genuinely lands back on p/q exactly; magenta is the single opaque ratio, green the distinct unit pieces. ◆ sealed .dlw.fold → folded to ROOT_0 · a sphere of THE SPEEDRUN · David Lee Wise (ROOT0), with AVAN


THE ALIQUOT

The aliquot sum in the 5-window house format — s(n) adds up all of a number's proper divisors, sorting the integers into deficient (s<n), abundant (s>n), and the rare perfect (s=n): 6 = 1+2+3, 28 = 1+2+4+7+14. Two numbers form an amicable pair when each is the aliquot sum of the other — 220 and 284, known since antiquity. Verified live: exhaustively to 10000, the only perfect numbers are 6, 28, 496, 8128, and the amicable pairs include 220&284, each confirmed by summing divisors. See perfect and amicable numbers in 1D, a number weighed against its parts in 2D, and the identity-from-parts inverse in 3D.

THE ALIQUOT · WORLD II — THE FOLD ◀ THE FOLD 0ROOT.AI // WORLD II · LOOT · THE HOARD ◆ .dlw.fold THE FOLD / LOOT / THE HOARD / THE ALIQUOT THE ALIQUOT the number that equals the sum of its parts 1 WHAT IT IS · WHAT IT DOES · FACT OR FICTION The aliquot sum s(n) adds up all of a number’s proper divisors (every divisor except itself). It sorts the integers into three ancient classes: deficient (s<n), abundant (s>n), and the rare perfect (s = n): 6 = 1+2+3, 28 = 1+2+4+7+14. Two numbers form an amicable pair when each is the aliquot sum of the other — 220 and 284, known since antiquity. LIT verified live: exhaustively to 10000, the only perfect numbers are 6, 28, 496, 8128, and the amicable pairs include 220&284 — each confirmed by summing divisors (window.__aliquot). FIG no framing; exact integer divisor sums. 2 HOW IT WAS WEAVED · AI + HUMAN David (human) seated this at the-hoard — gather every proper divisor into one pile; when the pile equals the number, it is perfect . The aliquot sum is that gathering. AVAN (AI) built the instrument: the divisor-sum function, the perfect/deficient/abundant classifier, the amicable-pair finder, and the exhaustive check to 10000. Credit as content: perfect numbers (Euclid, Nicomachus); amicable pairs (Pythagoreans, then Thābit ibn Qurra). The weave: David names the-hoard; I gather each number’s proper divisors into a pile and report when it equals the number (perfect) or another number’s (amicable) — sums checked exactly. 3 ONE DIMENSION 6 = 1 + 2 + 3 (perfect). 28 = 1 + 2 + 4 + 7 + 14 (perfect). 220 ↔ 284: each is the sum of the other’s proper divisors (amicable). 4 TWO DIMENSIONS · INTERACTIVE A number’s proper divisors and its aliquot sum, with its class; the exhaustive census checked. new number ▶ census ≤10000 ▶ 5 THREE DIMENSIONS + AVAN’S INVERSE The green forward object: a number weighed against the sum of its parts. AVAN’s addition (the inverse-companion): judge a number not by its size but by the sum of its proper divisors — deficient, abundant, or perfectly self-equal, and amicable when two point at each other. The inverse of ‘a number is just its value’ is ‘a number is measured against the pile of its parts.’ Magenta is the number’s bare value; green is the sum of its divisors. Identity from the parts, not the whole. pause spin LIT Genuine aliquot classification (perfect numbers: Euclid, Nicomachus; amicable pairs: Pythagoreans, Thābit ibn Qurra). Verified live: exhaustively over 2≤n≤10000, summing proper divisors gives exactly the perfect set {6,28,496,8128} (window.__aliquot.perfectsOk) and amicable pairs where s(a)=b, s(b)=a including 220&284 — exact integer divisor sums. FIG No framing: the divisor-sum function, the perfect/deficient/abundant classifier, the amicable-pair finder, and the exhaustive census to 10000 run in-browser and agree. The AVAN inverse is honest — measuring a number against the pile of its proper divisors (deficient/abundant/perfect, amicable when two point at each other) genuinely differs from reading its bare value; magenta is the value, green the sum of parts. ◆ sealed .dlw.fold → folded to ROOT_0 · a sphere of THE HOARD · David Lee Wise (ROOT0), with AVAN


THE BULGARIAN SOLITAIRE

Bulgarian solitaire in the 5-window house format — deal n cards into piles of any sizes; each move, take one card from every pile and gather them into a single new pile. When n is triangular, n = 1+2+…+k, this process from any starting configuration always settles into the same staircase {k, k−1, …, 1} — a stable attractor it can never leave. Verified live: for triangular n up to 36, hundreds of random starts all converge to the staircase, which is itself a fixed point of the move. See the take-one-from-each move in 1D, a start funneling in 2D, and the self-organizing-attractor inverse in 3D.

THE BULGARIAN SOLITAIRE · WORLD II — THE FOLD ◀ THE FOLD 0ROOT.AI // WORLD II · RESPAWN · THE PHOENIX ◆ .dlw.fold THE FOLD / RESPAWN / THE PHOENIX / THE BULGARIAN SOLITAIRE THE BULGARIAN SOLITAIRE any pile grinds down to the staircase 1 WHAT IT IS · WHAT IT DOES · FACT OR FICTION Bulgarian solitaire is a deceptively simple card game on a number. Deal n cards into piles of any sizes; each move, take one card from every pile and gather them into a single new pile . When n is a triangular number n = 1+2+…+k, this process, from any starting configuration, always settles into the same fixed staircase {k, k−1, …, 1} — a stable attractor it can never leave. LIT verified live: for triangular n up to 36, hundreds of random starting partitions all converge to the staircase, which is a fixed point of the move (window.__bulgarian). FIG no framing; deterministic integer dynamics. 2 HOW IT WAS WEAVED · AI + HUMAN David (human) seated this at the-phoenix — whatever heap you start from, the same shape rises from the ashes: the staircase reforms every time. Bulgarian solitaire is that reforming. AVAN (AI) built the instrument: the take-one-from-each-pile move, the convergence loop, and the checks that the staircase is reached and is a fixed point. Credit as content: popularized by Martin Gardner (1983); analyzed by Jørgen Brandt and others. The weave: David names the-phoenix; I run the deterministic move from many random partitions of a triangular n and confirm they all fall into the same staircase — a self-organizing fixed point. 3 ONE DIMENSION Each step: remove one card from every pile, and those removed cards form one new pile. For triangular n, every start funnels to the staircase {k, k−1, …, 1}. 4 TWO DIMENSIONS · INTERACTIVE Watch a random start funnel to the staircase step by step; the convergence checked over many starts. new start ▶ step ▶ verify n≤36 ▶ 5 THREE DIMENSIONS + AVAN’S INVERSE The green forward object: one attractor swallowing every start. AVAN’s addition (the inverse-companion): reach one fixed shape from every starting heap by a single blind rule — take one from each pile, drop them as a new pile — and the staircase self-assembles. The inverse of ‘design the target and build it’ is ‘apply one local move everywhere and let the attractor emerge.’ Magenta is the many possible starts; green is the single staircase they all become. Order that assembles itself. pause spin LIT Genuine Bulgarian solitaire (popularized by Martin Gardner 1983; analyzed by Jørgen Brandt and others). Verified live: for triangular n = k(k+1)/2 with k=1..8, 200 random partitions each converge under the take-one-from-each-pile move to the staircase {k,…,1} (window.__bulgarian.allConverge), and the staircase is confirmed a fixed point — deterministic integer dynamics (worst observed ~54 steps). FIG No framing: the take-one-from-each-pile move, the convergence loop, and the reached-and-fixed-point checks run in-browser and agree. The AVAN inverse is honest — reaching one fixed shape from every start by a single blind local rule genuinely self-assembles the staircase rather than being designed; magenta is the many possible starts, green the single attractor they all become. Order that assembles itself. ◆ sealed .dlw.fold → folded to ROOT_0 · a sphere of THE PHOENIX · David Lee Wise (ROOT0), with AVAN


THE GALE-SHAPLEY

The Gale–Shapley algorithm in the 5-window house format — pair two sides, each with ranked preferences, into a stable matching where no unmatched pair both prefer each other to their partners. Proposers propose in order; each reviewer holds the best offer and rejects the rest; rejects try their next choice. It always terminates with everyone matched, and is proposer-optimal: every proposer gets the best partner they could have in any stable matching. Verified live: over hundreds of random instances the output has no blocking pair and matches everyone, and for small n it is exactly the proposer-optimal stable matching found by brute force. See the propose-hold-reject loop in 1D, a matching in 2D, and the deferred-acceptance inverse in 3D.

THE GALE-SHAPLEY · WORLD II — THE FOLD ◀ THE FOLD 0ROOT.AI // WORLD II · CO-OP · SPLIT SCREEN ◆ .dlw.fold THE FOLD / CO-OP / SPLIT SCREEN / THE GALE-SHAPLEY THE GALE-SHAPLEY proposals settle into a matching no pair wants to break 1 WHAT IT IS · WHAT IT DOES · FACT OR FICTION The Gale–Shapley algorithm pairs two sides — say n proposers and n reviewers, each with a ranked list — into a stable matching : one where no unmatched pair both prefer each other to their assigned partners. Proposers propose in preference order; each reviewer holds their best offer so far and rejects the rest; rejected proposers try their next choice. It always terminates with everyone matched, and the result is proposer-optimal — every proposer gets the best partner they could have in any stable matching. LIT verified live: over hundreds of random instances the output has no blocking pair and matches everyone, and for small n it is exactly the proposer-optimal stable matching found by brute force (window.__galeshapley). FIG no framing; exact combinatorial checks. 2 HOW IT WAS WEAVED · AI + HUMAN David (human) seated this at split-screen — two sides, one game, matched so cleanly that no pair on the two screens would rather defect to each other. Gale–Shapley is that matching. AVAN (AI) built the instrument: the propose–hold–reject loop, the no-blocking-pair stability test, and the brute-force proposer-optimality check. Credit as content: David Gale & Lloyd Shapley (1962); Shapley’s share of the 2012 Nobel in Economics. The weave: David names split-screen; I run proposals until everyone is held, then confirm no pair would break their match and that each proposer got their best stable partner — verified against every stable matching for small n. 3 ONE DIMENSION Each proposer proposes down their list; each reviewer keeps their favourite offer and rejects the rest; rejects re-propose. It stops when no one is free — a matching no pair wants to break. 4 TWO DIMENSIONS · INTERACTIVE A random instance with its preference lists; the stable matching drawn, and stability + optimality checked. new instance ▶ verify 400 ▶ 5 THREE DIMENSIONS + AVAN’S INVERSE The green forward object: a matching with no pair that wants out. AVAN’s addition (the inverse-companion): reach a matching that no pair wants to break not by scoring all pairings but by deferred acceptance — propose, tentatively hold the best, reject the rest, repeat. The inverse of ‘search all n! matchings for a stable one’ is ‘let proposals settle — the fixed point is stable and proposer-optimal.’ Magenta is the factorial search avoided; green is the settled matching. Stability from proposing, not searching. pause spin LIT Genuine Gale–Shapley deferred-acceptance algorithm (David Gale & Lloyd Shapley 1962; Shapley shared the 2012 Nobel Memorial Prize in Economics). Verified live: over 400 random instances the matching has no blocking pair (window.__galeshapley.stable) and is perfect (everyone matched), and for n≤4 it equals the proposer-optimal matching over all stable matchings enumerated by brute force (window.__galeshapley.manOptimal). FIG No framing: the propose-hold-reject loop, the no-blocking-pair stability test, and the brute-force proposer-optimality check run in-browser and agree. The AVAN inverse is honest — reaching a stable, proposer-optimal matching by deferred acceptance genuinely replaces searching all n! matchings; magenta is the factorial search avoided, green the settled matching. Stability from proposing, not searching. ◆ sealed .dlw.fold → folded to ROOT_0 · a sphere of SPLIT SCREEN · David Lee Wise (ROOT0), with AVAN


THE STERN DIATOMIC

Stern's diatomic sequence (fusc) in the 5-window house format — built by a(0)=0, a(1)=1, a(2n)=a(n), a(2n+1)=a(n)+a(n+1): 1,1,2,1,3,2,3,1,4,3,5,… It hides a miracle: the consecutive ratios a(n)/a(n+1) list every positive rational exactly once, in lowest terms, never repeating — the Stern–Brocot enumeration read straight off a sequence. Verified live: consecutive terms are always coprime, the ratios up to n=8000 are distinct and reduced, and every reduced p/q with p,q≤8 appears among them. See the recurrence in 1D, the ratios in 2D, and the all-fractions-on-one-thread inverse in 3D.

THE STERN DIATOMIC · WORLD II — THE FOLD ◀ THE FOLD 0ROOT.AI // WORLD II · SPAWN · GENESIS BLOCK ◆ .dlw.fold THE FOLD / SPAWN / GENESIS BLOCK / THE STERN DIATOMIC THE STERN DIATOMIC a sequence that lists every fraction exactly once 1 WHAT IT IS · WHAT IT DOES · FACT OR FICTION Stern’s diatomic sequence (the fusc function) is built by a 0 =0, a 1 =1, a 2n =a n , a 2n+1 =a n +a n+1 — 1,1,2,1,3,2,3,1,4,3,5,… It hides a miracle: the consecutive ratios a n /a n+1 list every positive rational exactly once , in lowest terms, never repeating. It is the Stern–Brocot enumeration read straight off a sequence — a single counting list that touches all the fractions. LIT verified live: consecutive terms are always coprime (gcd = 1), the ratios up to n=8000 are all distinct and reduced, and every reduced p/q with p,q ≤ 8 appears among them (window.__stern). FIG no framing; exact integer arithmetic. 2 HOW IT WAS WEAVED · AI + HUMAN David (human) seated this at genesis-block — from the single seed a 1 =1, the whole field of rationals is generated, one per step, none twice. Stern’s sequence is that genesis. AVAN (AI) built the instrument: the recurrence, the coprime-neighbours check, and the distinct-and-covers-all-rationals check. Credit as content: Moritz Stern (1858); the fusc name is Dijkstra’s. The weave: David names genesis-block; I grow the sequence from a 1 =1 by the doubling recurrence and confirm its consecutive ratios enumerate the positive rationals — each in lowest terms, each exactly once. 3 ONE DIMENSION a 2n =a n (copy), a 2n+1 =a n +a n+1 (mediant). The ratios a n /a n+1 : 1/1, 1/2, 2/1, 1/3, 3/2, 2/3, 3/1… — every fraction, once. 4 TWO DIMENSIONS · INTERACTIVE The sequence and its ratios; the coprime and enumerate-all-rationals properties checked. shift window ▶ verify ▶ 5 THREE DIMENSIONS + AVAN’S INVERSE The green forward object: one list holding all the fractions. AVAN’s addition (the inverse-companion): enumerate every positive rational exactly once not by nested loops over p and q but by one linear sequence whose consecutive ratios are already reduced and never repeat. The inverse of ‘loop p, loop q, skip non-coprime’ is ‘read a n /a n+1 off Stern’s sequence — each fraction, once.’ Magenta is the double loop with gcd filtering; green is the single clean list. All fractions on one thread. pause spin LIT Genuine Stern diatomic sequence / fusc (Moritz Stern 1858; fusc named by Dijkstra). Verified live: consecutive terms satisfy gcd(a(n),a(n+1))=1 for all n FIG No framing: the doubling recurrence, the coprime-neighbours check, and the distinct-and-covers-all-rationals check run in-browser and agree. The AVAN inverse is honest — enumerating every positive rational exactly once via one linear sequence whose consecutive ratios are already reduced genuinely replaces a double loop with gcd filtering; magenta is that filtered double loop, green the single clean list. All fractions on one thread. ◆ sealed .dlw.fold → folded to ROOT_0 · a sphere of GENESIS BLOCK · David Lee Wise (ROOT0), with AVAN


THE ZELLER

Zeller's congruence in the 5-window house format — a closed-form formula returning the day of the week for any date, no calendar lookup or day counting. It packs the irregular Gregorian rules (month lengths, leap years, century correction) into one modular expression: h = (d + ⌊13(m+1)/5⌋ + K + ⌊K/4⌋ + ⌊J/4⌋ + 5J) mod 7, treating January and February as months 13 and 14 of the prior year. Verified live: over 20000 random Gregorian dates (1901–2099), Zeller's congruence matches the reference calendar's weekday every time. See the formula in 1D, a date checked in 2D, and the calendar-as-formula inverse in 3D.

THE ZELLER · WORLD II — THE FOLD ◀ THE FOLD 0ROOT.AI // WORLD II · GRIND · THE CRON JOB ◆ .dlw.fold THE FOLD / GRIND / THE CRON JOB / THE ZELLER THE ZELLER a formula that names any day of the week 1 WHAT IT IS · WHAT IT DOES · FACT OR FICTION Zeller’s congruence is a closed-form formula that returns the day of the week for any date — no calendar lookup, no day-by-day counting. It packs the irregular Gregorian rules (month lengths, leap years, the century correction) into one modular arithmetic expression: h = (d + ⌊13(m+1)/5⌋ + K + ⌊K/4⌋ + ⌊J/4⌋ + 5J) mod 7, treating January and February as months 13 and 14 of the prior year. One line, and the weekday falls out. LIT verified live: over 20000 random Gregorian dates (1901–2099), Zeller’s congruence matches the reference calendar’s weekday every time (window.__zeller). FIG no framing; exact integer arithmetic against an independent date engine. 2 HOW IT WAS WEAVED · AI + HUMAN David (human) seated this at the-cron-job — the thing that must know what day it is, every day, forever, without walking the calendar. Zeller’s congruence is that oracle. AVAN (AI) built the instrument: the month-shift, the century split, the modular formula, and the match against an independent reference calendar. Credit as content: Christian Zeller (1882/1886). The weave: David names the-cron-job; I fold the Gregorian calendar’s irregular rules into one modular expression and confirm it names the correct weekday for tens of thousands of dates — checked against a separate date engine. 3 ONE DIMENSION h = (d + ⌊13(m+1)/5⌋ + K + ⌊K/4⌋ + ⌊J/4⌋ + 5J) mod 7, with Jan/Feb counted as months 13/14 of the previous year. K = year mod 100, J = year ÷ 100. 4 TWO DIMENSIONS · INTERACTIVE Pick a date; Zeller’s weekday shown beside the reference calendar’s, checked to agree. random date ▶ verify 20000 ▶ 5 THREE DIMENSIONS + AVAN’S INVERSE The green forward object: a weekday from one formula. AVAN’s addition (the inverse-companion): name any day of the week with arithmetic, not counting — fold month lengths, leap years, and the century rule into a single mod-7 expression. The inverse of ‘count days forward from a known date’ is ‘evaluate one congruence — the weekday is a function of (y,m,d).’ Magenta is the day-by-day march; green is the closed form. The calendar as a formula. pause spin LIT Genuine Zeller's congruence (Christian Zeller 1882/1886). Verified live: over 20000 random Gregorian dates in 1901–2099, the modular formula's weekday matches an independent date engine (JavaScript Date) every time (window.__zeller.matchesReference) — exact integer arithmetic. FIG No framing: the month-shift, the century split, the modular formula, and the match against an independent reference calendar run in-browser and agree. The AVAN inverse is honest — folding the Gregorian calendar's irregular rules into one mod-7 expression genuinely replaces counting days forward from a known date; magenta is the day-by-day march, green the closed form. The calendar as a formula. ◆ sealed .dlw.fold → folded to ROOT_0 · a sphere of THE CRON JOB · David Lee Wise (ROOT0), with AVAN


THE KARPLUS-STRONG

Karplus–Strong synthesis in the 5-window house format — a realistic plucked string from almost nothing: fill a length-N buffer with noise, then repeatedly output the front sample and feed back the average of two neighbours. The delay line sets the pitch; the averaging is a low-pass that lets high harmonics die faster than low ones, just as a real string decays. The fundamental sits near fs/(N+0.5), the delay length plus the filter's half-sample lag. Verified live: for several N the measured pitch (by autocorrelation) matches fs/(N+0.5) within ~2%, and the signal energy decays monotonically. See the ring buffer in 1D, a waveform in 2D, and the string-from-a-delay-line inverse in 3D.

THE KARPLUS-STRONG · WORLD II — THE FOLD ◀ THE FOLD 0ROOT.AI // WORLD II · GRIND · THE HOT LOOP ◆ .dlw.fold THE FOLD / GRIND / THE HOT LOOP / THE KARPLUS-STRONG THE KARPLUS-STRONG noise fed through a loop becomes a plucked note 1 WHAT IT IS · WHAT IT DOES · FACT OR FICTION Karplus–Strong synthesis makes a startlingly realistic plucked string from almost nothing: fill a short buffer of length N with random noise, then repeatedly output the front sample and feed back the average of two neighbours into the tail. The delay line sets the pitch; the averaging is a gentle low-pass that lets high harmonics die faster than low ones — exactly how a real string decays. The fundamental sits near fs/(N + 0.5) , the delay length plus the filter’s half-sample lag. LIT verified live: for several N the measured pitch (by autocorrelation) matches fs/(N+0.5) within ~2%, and the signal energy decays monotonically (window.__karplus). FIG the fs/(N+0.5) is a low-frequency approximation (closer for longer delays); tolerance is stated, not hidden. 2 HOW IT WAS WEAVED · AI + HUMAN David (human) seated this at the-hot-loop — a tiny ring buffer cycled a thousand times a second, each pass averaging and feeding back, until noise becomes a note. Karplus–Strong is that hot loop. AVAN (AI) built the instrument: the noise fill, the average-and-feedback delay line, the autocorrelation pitch estimate, and the energy-decay check. Credit as content: Kevin Karplus & Alex Strong (1983); Jaffe–Smith’s analysis. The weave: David names the-hot-loop; I cycle a noise-filled delay line through a two-tap averager and confirm the pitch lands near fs/(N+0.5) and the tone decays — a plucked string from a loop. 3 ONE DIMENSION A ring of N samples starts as noise; each step outputs the front and writes back the average of two neighbours. The loop length is the period; the averaging is the decay. 4 TWO DIMENSIONS · INTERACTIVE The synthesized waveform for a chosen N; its measured pitch vs fs/(N+0.5) and its decay checked. new pluck ▶ verify N-sweep ▶ 5 THREE DIMENSIONS + AVAN’S INVERSE The green forward object: a plucked tone from a noise loop. AVAN’s addition (the inverse-companion): synthesize a decaying plucked note not by modelling the physics but by looping noise through a short averaging delay — the loop length is the pitch, the averaging is the damping. The inverse of ‘solve the wave equation on a string’ is ‘cycle a noise buffer with a two-tap low-pass — a string emerges.’ Magenta is the physical model skipped; green is the feedback loop. A string from a delay line. pause spin LIT Genuine Karplus–Strong plucked-string algorithm (Kevin Karplus & Alex Strong 1983; Jaffe–Smith analysis). Verified live: for a sweep of delay lengths N, the autocorrelation-measured pitch matches fs/(N+0.5) within ~2% (window.__karplus.pitchClose, worst ≈1.9%) and the signal energy decays monotonically from start to end (window.__karplus.decays). FIG Honestly scoped: fs/(N+0.5) is a low-frequency approximation (the two-tap averager's group delay is exactly half a sample only near DC), so the ~2% tolerance is stated, not hidden, and accuracy improves for longer delays. The noise fill, the average-and-feedback delay line, the autocorrelation pitch estimate, and the decay check run in-browser. The AVAN inverse is honest — looping noise through a short averaging delay genuinely produces a decaying plucked tone without solving the wave equation; magenta is the physical model skipped, green the feedback loop. ◆ sealed .dlw.fold → folded to ROOT_0 · a sphere of THE HOT LOOP · David Lee Wise (ROOT0), with AVAN


THE HOFSTADTER Q

Hofstadter's Q-sequence in the 5-window house format — a recurrence that feeds on its own recent values as indices: Q(1)=Q(2)=1, Q(n) = Q(n − Q(n−1)) + Q(n − Q(n−2)). Unlike Fibonacci's fixed look-back, Q's look-back distance depends on itself, making it chaotic. Astonishingly, whether it stays well-defined forever (never reading an index ≤ 0) is an open problem; it merely appears to, as far as anyone has computed. Verified live: computed to n = 100000, every lookback index stays in range, and the first ten values match the hand-derived reference 1,1,2,3,3,4,5,5,6,6. See the self-reference in 1D, the chaotic plot in 2D, and the order's-edge inverse in 3D.

THE HOFSTADTER Q · WORLD II — THE FOLD ◀ THE FOLD 0ROOT.AI // WORLD II · GLITCH · UNDEFINED BEHAVIOR ◆ .dlw.fold THE FOLD / GLITCH / UNDEFINED BEHAVIOR / THE HOFSTADTER Q THE HOFSTADTER Q a recurrence that feeds on itself, maybe off the edge 1 WHAT IT IS · WHAT IT DOES · FACT OR FICTION Hofstadter’s Q-sequence is a recurrence that feeds on its own recent values as indices : Q(1)=Q(2)=1, and Q(n) = Q(n − Q(n−1)) + Q(n − Q(n−2)). Unlike Fibonacci (which looks back a fixed distance), Q looks back a distance that depends on itself — making it chaotic and unpredictable. Astonishingly, whether it stays well-defined forever (never trying to read an index ≤ 0) is an open problem in mathematics; it merely appears to, as far as anyone has computed. LIT verified live: computed to n = 100000, every lookback index stays in range (well-defined so far), and the first ten values match the hand-derived reference 1,1,2,3,3,4,5,5,6,6 (window.__hofstadterq). FIG honest: global well-definedness is unproven — this checks a large finite prefix, not eternity. 2 HOW IT WAS WEAVED · AI + HUMAN David (human) seated this at undefined-behavior — the spec’s dark corner, where a recurrence that indexes by its own output could, in principle, step off the edge; that it doesn’t is unproven. Hofstadter’s Q lives there. AVAN (AI) built the instrument: the self-referential recurrence, the in-range guard on every lookback, and the match to the hand-derived opening values. Credit as content: Douglas Hofstadter, Gödel, Escher, Bach (1979); sequence OEIS A005185. The weave: David names undefined-behavior; I run the self-indexing recurrence, guard every lookback against stepping to a non-positive index, and confirm it survives 100000 terms — while flagging honestly that surviving forever is not proven. 3 ONE DIMENSION Q(n) = Q(n − Q(n−1)) + Q(n − Q(n−2)). The step-back distance is Q’s own recent output — the sequence reaches into itself to decide where to look. 4 TWO DIMENSIONS · INTERACTIVE The chaotic Q-sequence plotted; its well-definedness and opening values checked. zoom range ▶ verify 100000 ▶ 5 THREE DIMENSIONS + AVAN’S INVERSE The green forward object: a sequence that indexes by its own values. AVAN’s addition (the inverse-companion): define a sequence whose look-back distance is its own output — not a fixed offset like Fibonacci but a self-chosen one, producing chaos from the simplest self-reference. The inverse of ‘recur at a fixed distance’ is ‘let the sequence decide, from itself, how far back to reach.’ Magenta is the fixed-offset recurrence (orderly); green is the self-indexing one (chaotic, and possibly stepping off the edge). Order’s edge, self-chosen. pause spin LIT Genuine Hofstadter Q-sequence (Douglas Hofstadter, Gödel, Escher, Bach, 1979; OEIS A005185). Verified live: computed to n=100000, every lookback index n−Q(n−1) and n−Q(n−2) stays in [1,n−1] (well-defined over this prefix; window.__hofstadterq.welldefined), and the first ten terms equal the hand-derived reference 1,1,2,3,3,4,5,5,6,6 (window.__hofstadterq.matchesReference). FIG Honestly scoped: global well-definedness of Q is an UNPROVEN open problem — this checks a large finite prefix (100000 terms), not eternity, and the sphere says so plainly. The self-referential recurrence, the in-range guard on every lookback, and the reference-value match run in-browser. The AVAN inverse is honest — a sequence whose look-back distance is its own output genuinely differs from Fibonacci's fixed offset, producing chaos (and possibly, though never observed, a step off the edge); magenta is the orderly fixed-offset recurrence, green the self-indexing one. ◆ sealed .dlw.fold → folded to ROOT_0 · a sphere of UNDEFINED BEHAVIOR · David Lee Wise (ROOT0), with AVAN