THE ELIAS GAMMA

Elias gamma coding in the 5-window house format — a self-delimiting code for positive integers with no length field and no separators, yet a stream decodes unambiguously. To encode n: write ⌊log₂n⌋ zeros, then the plain binary of n (which begins with a 1); the leading zeros tell the decoder how many more bits to read. Its length is 2⌊log₂n⌋+1 bits, so small numbers stay tiny — a universal code, near-optimal when small values dominate. Verified live: encode–decode round-trips for thousands of integers, every length equals 2⌊log₂n⌋+1, and a concatenated stream splits back into the exact original list. Neon-noir traced. See the code in 1D, a decoded stream in 2D, and the number-carries-its-own-length inverse in 3D.

THE ELIAS GAMMA · WORLD II — THE FOLD ◀ THE FOLD 0ROOT.AI // WORLD II · LOOT · THE HOARD ◆ .dlw.fold THE FOLD / LOOT / THE HOARD / THE ELIAS GAMMA THE ELIAS GAMMA a number that says its own length 1 WHAT IT IS · WHAT IT DOES · FACT OR FICTION Elias gamma coding is a self-delimiting code for positive integers — no length field, no separators, yet a stream of them decodes unambiguously. To encode n: write ⌊log₂n⌋ zeros , then the plain binary of n (which begins with a 1). The leading zeros tell the decoder exactly how many more bits to read. Its length is 2⌊log₂n⌋ + 1 bits, so small numbers stay tiny — it is a universal code, near-optimal when small values dominate. LIT verified live: encode–decode round-trips for thousands of integers, every code length equals 2⌊log₂n⌋+1, and a concatenated stream splits back into the exact original list with no separators (window.__elias). FIG no framing; encoder, decoder, and the length formula all run in-browser. 2 HOW IT WAS WEAVED · AI + HUMAN David (human) seated this at the-hoard — a hoard of numbers packed with no wasted bits and no separators, each one saying its own length. AVAN (AI) built the instrument: the unary-length-plus-binary encoder, a streaming decoder, and the length-formula check. Credit as content: Peter Elias (1975). The weave: David names the packed hoard; I confirm the code round-trips, hits length 2⌊log₂n⌋+1, and that a glued stream decodes uniquely. 3 ONE DIMENSION A number’s gamma code: a run of zeros (the length in unary) then the binary value — the zeros say how many bits follow. 4 TWO DIMENSIONS · INTERACTIVE Pick a value and see its code and length; then decode a glued stream of several numbers back into the original list. next n ▶ decode a stream ▶ verify ▶ 5 THREE DIMENSIONS + AVAN’S INVERSE The green forward object: the packed bitstream, no separators between numbers. AVAN’s addition (the inverse-companion): don’t store a length field — let the number carry its own. The inverse of ‘where does this number end?’ is ‘count the leading zeros; that many more bits complete it.’ Magenta is the unary length marker; green is the value it delimits. The number says its own length. pause spin LIT Genuine Elias gamma code (Peter Elias, 1975): universal, self-delimiting code for positive integers; length 2⌊log₂n⌋+1. Verified live: encode/decode round-trip over 5000 integers (window.__elias.roundTrip), length equals the formula (.lengthFormula), and a concatenated stream decodes uniquely (.streamDecodes). FIG No framing: encoder, streaming decoder, and the length-formula check all run in-browser. The AVAN inverse is honest — letting the number carry its own length (count the leading zeros; that many more bits complete it) rather than storing a separate length field is exactly what makes it self-delimiting; magenta is the unary length marker, green the value it delimits. The number says its own length. ◆ sealed .dlw.fold → folded to ROOT_0 · a sphere of THE HOARD · David Lee Wise (ROOT0), with AVAN


THE JUMP CONSISTENT HASH

Jump consistent hashing in the 5-window house format — mapping a key to one of N buckets so that when N grows, almost no keys move, with no lookup table and O(1) memory. It replays a tiny pseudo-random sequence seeded by the key; each 'jump' decides whether the key hops to a higher bucket, and the last it lands on is the answer. Two guarantees: keys spread uniformly, and going N→N+1 relocates only ~1/(N+1) of keys — each moving straight to the new bucket, never shuffling among the old ones. Verified live: 100,000 keys spread within a few percent of uniform, and N→N+1 moves ~1/(N+1) of keys, each landing on the new bucket. Neon-noir traced. See the flat histogram in 1D, add-a-bucket in 2D, and the move-only-the-newcomer's-share inverse in 3D.

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

THE JUMP CONSISTENT HASH · WORLD II — THE FOLD ◀ THE FOLD 0ROOT.AI // WORLD II · CO-OP · THE PUSH ◆ .dlw.fold THE FOLD / CO-OP / THE PUSH / THE JUMP CONSISTENT HASH THE JUMP CONSISTENT HASH buckets that barely move when you add one 1 WHAT IT IS · WHAT IT DOES · FACT OR FICTION Jump consistent hashing maps a key to one of N buckets so that when N grows, almost no keys move — and it does so with no lookup table , in a few lines and O(1) memory. It replays a tiny pseudo-random sequence seeded by the key, and each “jump” decides whether the key hops to a higher bucket; the last bucket it lands on is the answer. Two guarantees fall out: the keys spread uniformly across buckets, and going from N to N+1 buckets relocates only about 1/(N+1) of the keys — and every one that moves goes straight to the new bucket , never shuffling among the old ones. LIT verified live: 100,000 keys spread within a few percent of uniform across the buckets, and growing N→N+1 moves a fraction ~1/(N+1) of keys, each landing exactly on the new bucket (window.__jump). FIG no framing; the hash, the distribution, and the remap count all run in-browser. 2 HOW IT WAS WEAVED · AI + HUMAN David (human) seated this at the-push — adding a node pushes only its fair share of keys onto the newcomer, leaving everyone else untouched. AVAN (AI) built the instrument: the jump hash with a 64-bit LCG, a uniformity check, and a remap sweep from N to N+1. Credit as content: John Lamping & Eric Veach (Google, 2014). The weave: David names the push; I confirm the spread is uniform and that only ~1/(N+1) of keys move, all to the new bucket. 3 ONE DIMENSION Keys spread across the buckets — a near-flat histogram, no lookup table behind it, just a replayed pseudo-random sequence per key. 4 TWO DIMENSIONS · INTERACTIVE Add a bucket; only about 1/(N+1) of the keys move, and every one of them jumps straight to the new bucket — the rest stay put. add a bucket ▶ remove ▶ verify ▶ 5 THREE DIMENSIONS + AVAN’S INVERSE The green forward object: keys resting in their buckets, spread evenly. AVAN’s addition (the inverse-companion): don’t rehash everything when a node joins — move only the newcomer’s share. The inverse of ‘N changed, recompute all’ is ‘only ~1/(N+1) of keys jump, and only ever onto the new bucket.’ Magenta are the keys that move; green are the many that stay. Add a node, barely disturb the rest. pause spin LIT Genuine jump consistent hash (John Lamping & Eric Veach, Google, 2014): table-free, O(1)-memory consistent hashing. Verified live: 100k keys uniform within ~6% across buckets (window.__jump.uniform), N→N+1 moves a fraction ≈ 1/(N+1) (.minimalRemap), and every moved key goes only to the new bucket (.movesToNew). FIG No framing: the jump hash (a 64-bit LCG via BigInt), the distribution, and the N→N+1 remap sweep all run in-browser. The AVAN inverse is honest — moving only the newcomer's ~1/(N+1) share (all onto the new bucket) rather than rehashing everything is the whole point of consistent hashing; magenta are the keys that move, green the many that stay. Add a node, barely disturb the rest. ◆ sealed .dlw.fold → folded to ROOT_0 · a sphere of THE PUSH · David Lee Wise (ROOT0), with AVAN


THE P-ADIC

The p-adic numbers in the 5-window house format — a strange way to measure size where a number is small when it is divisible by a high power of a prime p. The p-adic absolute value is |x|_p = p^−v (v = how many times p divides x), so 1, p, p², p³… march toward zero. This metric is ultrametric: |x+y|_p ≤ max(|x|_p,|y|_p), stronger than the ordinary triangle inequality. Numbers get infinite digit-strings running leftward, and famously …1111 = −1 in the 2-adics (2^k−1 ≡ −1 for every k). Verified live: over thousands of rationals the ultrametric holds, any a/b (b coprime to p) reconstructs from its p-adic digits mod p^k, and the all-(p−1) digit string equals −1. Neon-noir traced. See …1111=−1 in 1D, digit expansion in 2D, and the ultrametric-tree inverse in 3D.

THE P-ADIC · WORLD II — THE FOLD ◀ THE FOLD 0ROOT.AI // WORLD II · GLITCH · UNDEFINED BEHAVIOR ◆ .dlw.fold THE FOLD / GLITCH / UNDEFINED BEHAVIOR / THE P-ADIC THE P-ADIC a metric where big powers are small 1 WHAT IT IS · WHAT IT DOES · FACT OR FICTION The p-adic numbers come from a strange way to measure size: a number is small when it is divisible by a high power of a prime p . The p-adic absolute value is |x| p = p −v , where v is how many times p divides x — so 1, p, p², p³… march toward zero . This metric is ultrametric : |x + y| p ≤ max(|x| p , |y| p ), stronger than the ordinary triangle inequality. Numbers get infinite digit-strings running leftward , and famously …1111 = −1 in the 2-adics, because 2 k −1 ≡ −1 for every k. LIT verified live: over thousands of rationals the ultrametric inequality holds, any a/b with b coprime to p reconstructs from its p-adic digits mod p k , and the all-(p−1) digit string equals −1 p-adically (window.__padic). FIG no framing; the valuations, the digit reconstruction, and the identity all run in-browser. 2 HOW IT WAS WEAVED · AI + HUMAN David (human) seated this at undefined-behavior — a number system where “big” means small and counting up runs off to −1 is the mathematician’s undefined behaviour, perfectly consistent once you accept the rules. AVAN (AI) built the instrument: the p-adic valuation and absolute value, the digit expansion of a rational, and the ultrametric check. Credit as content: Kurt Hensel (1897). The weave: David names the undefined behaviour; I confirm the ultrametric holds, that rationals reconstruct from their leftward digits, and that …1111 really is −1. 3 ONE DIMENSION The 2-adic string of −1: all 1s. Adding 1 carries forever and lands on 0 — so …1111 + 1 = 0, hence …1111 = −1. 4 TWO DIMENSIONS · INTERACTIVE Pick a prime p and a rational a/b; see its p-adic digits and confirm they rebuild a/b mod p k . The p-adic size p −v shrinks as p divides more. new a/b ▶ change p ▶ verify ▶ 5 THREE DIMENSIONS + AVAN’S INVERSE The green forward object: the p-adic sizes p −v descending toward zero. AVAN’s addition (the inverse-companion): don’t measure distance the usual way — measure it by shared low digits. The inverse of ‘close means small difference’ is ‘close means divisible by a high power of p’, and that makes the numbers cluster into a tree . Magenta is the …1111 = −1 idea; green is the ultrametric tree of p-adic closeness. Big powers are small. pause spin LIT Genuine p-adic numbers (Kurt Hensel, 1897): |x|_p=p^−v_p(x), ultrametric, …(p−1)(p−1)=−1. Verified live: ultrametric inequality over 3000 rationals (window.__padic.ultrametric), a/b reconstructs from its digits mod p^k (.reconstructs), and the all-(p−1) string equals −1 mod p^k (.minusOne). FIG No framing: the p-adic valuations, the digit reconstruction (via modular inverse in BigInt), and the −1 identity all run in-browser. The AVAN inverse is honest — measuring closeness by shared low digits (divisibility by a high power of p) rather than by ordinary difference is exactly the ultrametric, and it clusters numbers into a tree; magenta is the …1111=−1 idea, green the ultrametric tree. Big powers are small. ◆ sealed .dlw.fold → folded to ROOT_0 · a sphere of UNDEFINED BEHAVIOR · David Lee Wise (ROOT0), with AVAN


THE BRZOZOWSKI

Brzozowski derivatives in the 5-window house format — matching a regular expression by taking the language apart one symbol at a time. The derivative D_c(r) is a new regex matching exactly the strings r would match after consuming c; there are simple rules per operator, and matching is a fold: feed the string in, take a derivative per character, and ask whether the residual regex is nullable (matches ε). No NFA, no backtracking — just algebra on regexes. Verified live: over 8000 random regex/string pairs, the derivative matcher agrees exactly with an independent backtracking matcher. Neon-noir traced. See a derivative in 1D, a matched fold in 2D, and the differentiate-don't-simulate inverse in 3D.

THE BRZOZOWSKI · WORLD II — THE FOLD ◀ THE FOLD 0ROOT.AI // WORLD II · SPAWN · THE TOOLCHAIN ◆ .dlw.fold THE FOLD / SPAWN / THE TOOLCHAIN / THE BRZOZOWSKI THE BRZOZOWSKI matching by taking the language apart 1 WHAT IT IS · WHAT IT DOES · FACT OR FICTION Brzozowski derivatives match a regular expression by taking the language apart one symbol at a time . The derivative D c (r) of a regex r with respect to a character c is a new regex matching exactly the strings that r would match after consuming c. There are simple rules for each operator, and matching is then trivial: feed the string in, take a derivative per character, and at the end ask whether the residual regex is nullable (matches the empty string). No NFA, no backtracking — just algebra on regexes. LIT verified live: over 8,000 random regex/string pairs, the derivative matcher agrees exactly with an independent backtracking matcher (window.__brzozowski). FIG no framing; the derivative rules and the reference matcher both run in-browser. 2 HOW IT WAS WEAVED · AI + HUMAN David (human) seated this at the-toolchain — a matcher that is just a fold of derivatives is the cleanest little toolchain: regex in, boolean out, no machine to build. AVAN (AI) built the instrument: the derivative and nullability rules with smart constructors, the fold-to-match, and a backtracking reference. Credit as content: Janusz Brzozowski (1964). The weave: David names the toolchain; I confirm the derivative matcher accepts exactly the strings a backtracking matcher does. 3 ONE DIMENSION A regex and its derivative by one character — the residual language of everything that could follow that symbol. 4 TWO DIMENSIONS · INTERACTIVE Feed a string into a regex; each character takes a derivative; the final regex’s nullability is the answer — matched against a reference. new regex/string ▶ verify ▶ 5 THREE DIMENSIONS + AVAN’S INVERSE The green forward object: the chain of derivatives, one per character. AVAN’s addition (the inverse-companion): don’t build a machine to run — differentiate the language. The inverse of ‘simulate an automaton’ is ‘the derivative is the residual language, so matching is a fold and nullability is the accept.’ Magenta is a reject (the residual is empty); green is an accept (the residual is nullable). Take the language apart. pause spin LIT Genuine Brzozowski derivatives (Janusz Brzozowski, 1964): D_c(r) is the residual language; match = fold derivatives then test nullability. Verified live: over 8000 random regex/string pairs the derivative matcher equals a backtracking reference matcher (window.__brzozowski.matchesReference). FIG No framing: the derivative and nullability rules (with smart constructors) and the backtracking reference both run in-browser and agree. The AVAN inverse is honest — the derivative IS the residual language, so matching is a fold and nullability is the accept, rather than building and simulating an automaton; magenta is a reject (residual collapses to ∅), green an accept (residual nullable). Take the language apart. ◆ sealed .dlw.fold → folded to ROOT_0 · a sphere of THE TOOLCHAIN · David Lee Wise (ROOT0), with AVAN


THE BINOMIAL HEAP

The binomial heap in the 5-window house format — a priority queue built as a forest of binomial trees of sizes 1,2,4,8,… (the powers of two). A heap of n elements has one tree per 1-bit of n, so its shape is the binary numeral of its size. Merging two heaps works like binary addition: line trees up by order and carry-link equal orders, giving O(log n) union — and insert, extract-min follow; each tree is heap-ordered so the minimum is a root. Verified live: draining a heap by repeated extract-min returns keys in sorted order, and merging two heaps then draining yields the combined sorted sequence. Neon-noir traced. See the binary forest in 1D, insert+extract in 2D, and the read-the-count-in-binary inverse in 3D.

THE BINOMIAL HEAP · WORLD II — THE FOLD ◀ THE FOLD 0ROOT.AI // WORLD II · GRIND · THE EPOCH ◆ .dlw.fold THE FOLD / GRIND / THE EPOCH / THE BINOMIAL HEAP THE BINOMIAL HEAP a heap counted in binary 1 WHAT IT IS · WHAT IT DOES · FACT OR FICTION The binomial heap is a priority queue built as a forest of binomial trees — trees of sizes 1, 2, 4, 8, …, exactly the powers of two. A heap of n elements has one tree for each 1-bit in the binary of n, so its shape is the binary numeral of its size. Merging two heaps works like binary addition : line the trees up by order and carry-link equal orders, giving O(log n) union — and insert, extract-min and decrease-key all follow. Each tree obeys the heap order, so the minimum is always a root. LIT verified live: draining a heap by repeated extract-min returns the keys in sorted order, and merging two heaps then draining yields the combined sorted sequence (window.__binomial_heap). FIG no framing; the linking, union, and extract-min all run in-browser. 2 HOW IT WAS WEAVED · AI + HUMAN David (human) seated this at the-epoch — a queue that always serves the smallest key next, epoch by epoch, and merges whole queues like adding binary numbers. AVAN (AI) built the instrument: binomial linking, the carry-propagating union, and extract-min, checked against a sorted reference. Credit as content: Jean Vuillemin (1978). The weave: David names the epoch; I confirm the heap drains in sorted order and that merging two heaps drains to the combined sorted sequence. 3 ONE DIMENSION The forest for a heap of n elements: one binomial tree per 1-bit of n — its shape is the binary numeral of its size. 4 TWO DIMENSIONS · INTERACTIVE Insert keys (watch the trees carry-link like binary addition) and extract the minimum; the drained sequence comes out sorted. insert 3 ▶ extract-min ▶ verify ▶ 5 THREE DIMENSIONS + AVAN’S INVERSE The green forward object: the forest of binomial trees, heap-ordered. AVAN’s addition (the inverse-companion): don’t track the trees — read the count in binary. The inverse of ‘which trees are present?’ is ‘the 1-bits of n say exactly which orders exist, and union is binary addition with carries.’ Magenta is the current minimum root; green is the binary-counter forest. A heap counted in binary. pause spin LIT Genuine binomial heap (Jean Vuillemin, 1978): forest of binomial trees, union by carry-linking (binary addition). Verified live: extract-min drains in sorted order (window.__binomial_heap.sortedExtraction), and merging two heaps then draining equals the combined sorted sequence (.mergeOk). FIG No framing: the linking, the carry-propagating union, and extract-min all run in-browser, checked against a sorted reference. The AVAN inverse is honest — the 1-bits of n saying exactly which tree-orders exist (and union being binary addition with carries) is the structural identity of the heap; magenta is the minimum root, green the binary-counter forest. A heap counted in binary. ◆ sealed .dlw.fold → folded to ROOT_0 · a sphere of THE EPOCH · David Lee Wise (ROOT0), with AVAN


THE GRAM-SCHMIDT

Gram–Schmidt in the 5-window house format — turning independent vectors into an orthonormal set spanning the same space. Take each vector in turn and subtract its projection onto the directions already fixed, leaving only the perpendicular part, then scale to length one. The results q₁,q₂,… are mutually perpendicular unit vectors, and every original vector is a combination of the q's built so far — exactly the QR decomposition A=QR with R upper-triangular. Verified live: over 3000 random matrices the vectors satisfy qᵢ·qⱼ=δᵢⱼ (orthonormal) and each original reconstructs from the q's up to its index. Neon-noir traced. See the perpendicular part in 1D, orthonormalized vectors in 2D, and the projections-are-R inverse in 3D.

THE GRAM-SCHMIDT · WORLD II — THE FOLD ◀ THE FOLD 0ROOT.AI // WORLD II · CO-OP · THE HANDOFF ◆ .dlw.fold THE FOLD / CO-OP / THE HANDOFF / THE GRAM-SCHMIDT THE GRAM-SCHMIDT vectors made perpendicular 1 WHAT IT IS · WHAT IT DOES · FACT OR FICTION Gram–Schmidt turns any set of independent vectors into an orthonormal set spanning the same space. Take each vector in turn and subtract its projection onto all the directions already fixed, leaving only the part perpendicular to them; then scale to length one. The result q₁, q₂, … are mutually perpendicular unit vectors, and every original vector is a combination of the q’s built so far — which is exactly the QR decomposition A = QR with R upper-triangular. LIT verified live: over 3,000 random matrices, the produced vectors satisfy qᵢ·qⱼ = δᵢⱼ (orthonormal), and each original vector reconstructs from the q’s up to its index (window.__gram_schmidt). FIG no framing; the projections and the orthonormality/reconstruction checks run in-browser. 2 HOW IT WAS WEAVED · AI + HUMAN David (human) seated this at the-handoff — each vector hands off its already-covered component to the ones before it, keeping only what is genuinely new and perpendicular. AVAN (AI) built the instrument: the (modified) Gram–Schmidt projections, the orthonormality check, and the A = QR reconstruction. Credit as content: Jørgen Pedersen Gram (1883) & Erhard Schmidt (1907). The weave: David names the handoff; I confirm the output is orthonormal and that every input vector is rebuilt from the orthonormal basis. 3 ONE DIMENSION Two vectors: the second minus its projection onto the first leaves the perpendicular part — normalize both and they are orthonormal. 4 TWO DIMENSIONS · INTERACTIVE A random set of vectors and their orthonormalized q’s; the dot products qᵢ·qⱼ form the identity, and each original rebuilds from the q’s. new vectors ▶ verify ▶ 5 THREE DIMENSIONS + AVAN’S INVERSE The green forward object: the orthonormal frame q₁, q₂, q₃. AVAN’s addition (the inverse-companion): don’t just orthogonalize — record the coefficients. The inverse of ‘make them perpendicular’ is ‘the projections you subtracted are the R of A = QR, so every original vector is rebuilt from the q’s.’ Magenta is the original skew frame; green is the orthonormal one. Perpendicular, and reversible. pause spin LIT Genuine Gram–Schmidt orthonormalization (Jørgen Gram, 1883 & Erhard Schmidt, 1907), yielding QR. Verified live: over 3000 random matrices, output is orthonormal qᵢ·qⱼ=δᵢⱼ (window.__gram_schmidt.orthonormal) and each aᵢ reconstructs from q₁..qᵢ i.e. A=QR (.reconstructs). FIG No framing: the (modified) Gram–Schmidt projections and the orthonormality/reconstruction checks run in-browser. The AVAN inverse is honest — the projection coefficients you subtract ARE the R of A=QR, so orthogonalizing is reversible (every original rebuilds from the q's), not just a cleanup; magenta is the original skew frame, green the orthonormal one. Perpendicular, and reversible. ◆ sealed .dlw.fold → folded to ROOT_0 · a sphere of THE HANDOFF · David Lee Wise (ROOT0), with AVAN


THE PRATT PARSING

Pratt parsing in the 5-window house format — top-down operator-precedence parsing from one idea: every operator has a binding power, and it binds tighter than another exactly when its power is higher. The parser reads a value, then keeps absorbing operators to its right as long as their binding power beats the current threshold, recursing to gather the right operand. That single rule reproduces the full precedence and associativity of arithmetic — × before +, parentheses, unary minus — with no grammar tables, in a handful of lines. Verified live: over 8000 random expressions, the Pratt value equals an independent precedence-explicit recursive-descent evaluator (2+3×4 = 14, not 20). Neon-noir traced. See the parse tree in 1D, an evaluated expression in 2D, and the one-number-per-operator inverse in 3D.

THE PRATT PARSING · WORLD II — THE FOLD ◀ THE FOLD 0ROOT.AI // WORLD II · CHEAT · THE SHORTCUT ◆ .dlw.fold THE FOLD / CHEAT / THE SHORTCUT / THE PRATT PARSING THE PRATT PARSING precedence from binding power 1 WHAT IT IS · WHAT IT DOES · FACT OR FICTION Pratt parsing (top-down operator-precedence) parses expressions using one idea: every operator has a binding power , and an operator binds tighter than another exactly when its power is higher. The parser reads a value, then keeps absorbing operators to its right as long as their binding power beats the current threshold , recursing to gather the right operand. That single rule reproduces the full precedence and associativity of arithmetic — × before + , parentheses, unary minus — with no grammar tables, in a handful of lines. LIT verified live: over 8,000 random expressions, the Pratt parser’s value equals an independent recursive-descent evaluator that hard-codes the precedence levels (window.__pratt) — e.g. 2+3×4 = 14, not 20. FIG no framing; both evaluators run in-browser and are compared. 2 HOW IT WAS WEAVED · AI + HUMAN David (human) seated this at the-shortcut — binding powers are the shortcut past a stack of grammar rules; one number per operator replaces a whole precedence hierarchy. AVAN (AI) built the instrument: the Pratt loop with binding powers, and a recursive-descent evaluator with explicit precedence to check every result. Credit as content: Vaughan Pratt (1973). The weave: David names the shortcut; I confirm Pratt’s value matches a precedence-explicit evaluator across thousands of random expressions. 3 ONE DIMENSION 2 + 3 × 4: the × has higher binding power, so it gathers 3 and 4 first — the parse tree puts × below +. 4 TWO DIMENSIONS · INTERACTIVE Generate an expression; the Pratt parser evaluates it, and a precedence-explicit reference confirms the value — precedence and parentheses honored. new expression ▶ verify ▶ 5 THREE DIMENSIONS + AVAN’S INVERSE The green forward object: the parse tree, operators nested by binding power. AVAN’s addition (the inverse-companion): don’t write a grammar rule per precedence level — give each operator a number. The inverse of ‘a hierarchy of grammar productions’ is ‘one binding power per operator, and the loop absorbs while power beats the threshold.’ Magenta is a low-binding operator (waits); green is the high-binding one that grabs first. Precedence from a number. pause spin LIT Genuine Pratt parsing / top-down operator precedence (Vaughan Pratt, 1973). Verified live: over 8000 random arithmetic expressions, the Pratt parser's value equals a recursive-descent evaluator with explicit precedence levels (window.__pratt.matchesReference); e.g. 2+3×4=14. FIG No framing: the Pratt loop (binding powers) and a precedence-explicit recursive-descent evaluator both run in-browser and are compared across thousands of expressions. The AVAN inverse is honest — replacing a hierarchy of grammar productions with one binding power per operator (absorb while power beats the threshold) is exactly Pratt's shortcut; magenta is a low-binding operator that waits, green the high-binding one that grabs first. Precedence from a number. ◆ sealed .dlw.fold → folded to ROOT_0 · a sphere of THE SHORTCUT · David Lee Wise (ROOT0), with AVAN


THE CHROMATIC POLYNOMIAL

The chromatic polynomial in the 5-window house format — P(G,k) counts the proper k-colourings of a graph (paint vertices with k colours so no edge joins two of the same), and that count is a polynomial in k. It obeys deletion–contraction: P(G) = P(G−e) − P(G/e). Trees give P = k(k−1)^(n−1); cycles give P = (k−1)^n + (−1)^n(k−1). Verified live: over thousands of random graphs the deletion–contraction value equals a brute-force count of proper colourings, and the tree and cycle formulas hold exactly. Neon-noir traced. See the recursion in 1D, P(G,k) values in 2D, and the peel-the-edges inverse in 3D.

THE CHROMATIC POLYNOMIAL · WORLD II — THE FOLD ◀ THE FOLD 0ROOT.AI // WORLD II · BOSS · THE GAUNTLET ◆ .dlw.fold THE FOLD / BOSS / THE GAUNTLET / THE CHROMATIC POLYNOMIAL THE CHROMATIC POLYNOMIAL colourings counted by a polynomial 1 WHAT IT IS · WHAT IT DOES · FACT OR FICTION The chromatic polynomial P(G, k) counts the proper k-colourings of a graph — the ways to paint the vertices with k colours so no edge joins two of the same colour — and, astonishingly, that count is a polynomial in k. It obeys a simple recursion, deletion–contraction : P(G) = P(G − e) − P(G / e), removing an edge versus fusing its endpoints. Special shapes give closed forms: a tree on n vertices has P = k(k−1) n−1 , and a cycle C n has P = (k−1) n + (−1) n (k−1). LIT verified live: over thousands of random graphs the deletion–contraction value equals a brute-force count of proper colourings, and the tree and cycle formulas hold exactly (window.__chromatic). FIG no framing; the recursion and the exhaustive colouring count both run in-browser. 2 HOW IT WAS WEAVED · AI + HUMAN David (human) seated this at the-gauntlet — a graph is a gauntlet of adjacency constraints, and the polynomial counts exactly how many colourings survive every one of them. AVAN (AI) built the instrument: the deletion–contraction recursion, a brute-force colouring counter, and the tree/cycle closed forms. Credit as content: George Birkhoff (1912); Hassler Whitney (deletion–contraction). The weave: David names the gauntlet; I confirm the recursion counts exactly the proper colourings and that trees and cycles hit their formulas. 3 ONE DIMENSION Deletion–contraction on one edge: P(G) = P(G with the edge deleted) − P(G with its endpoints fused). 4 TWO DIMENSIONS · INTERACTIVE A random graph and its chromatic polynomial values P(G, k); each is matched against a brute-force count of proper k-colourings. new graph ▶ verify ▶ 5 THREE DIMENSIONS + AVAN’S INVERSE The green forward object: a proper colouring, no edge monochromatic. AVAN’s addition (the inverse-companion): don’t enumerate colourings — peel edges. The inverse of ‘count all valid paintings’ is ‘P(G) = P(G−e) − P(G/e), so one edge at a time builds the whole polynomial.’ Magenta is a monochromatic edge (a colouring that fails); green is a proper one. Peel the edges, count the rest. pause spin LIT Genuine chromatic polynomial (George Birkhoff 1912; Whitney's deletion–contraction): P(G,k) counts proper k-colourings and is a polynomial in k. Verified live: over 1500 random graphs, deletion–contraction equals a brute-force colouring count (window.__chromatic.matchesBrute), and the tree P=k(k−1)^(n−1) (.treeFormula) and cycle P=(k−1)^n+(−1)^n(k−1) (.cycleFormula) formulas hold. FIG No framing: the deletion–contraction recursion and the exhaustive colouring count both run in-browser and agree. The AVAN inverse is honest — building the polynomial one edge at a time via P(G)=P(G−e)−P(G/e) (rather than enumerating all colourings) is exactly the recursion; magenta is a monochromatic edge (a failed colouring), green a proper one. Peel the edges, count the rest. ◆ sealed .dlw.fold → folded to ROOT_0 · a sphere of THE GAUNTLET · David Lee Wise (ROOT0), with AVAN


THE MYHILL-NERODE

The Myhill–Nerode theorem in the 5-window house format — the fewest states a language needs. Call two strings equivalent if no continuation ever tells them apart (for every suffix z, xz and yz are both in the language or both out); the number of such classes equals the number of states in the minimal DFA, and a language is regular exactly when that number is finite. So minimizing an automaton is merging states no string can distinguish. Verified live: over thousands of random DFAs, the minimized machine accepts the same language on all short strings and is truly minimal — every pair of its states is separated by some string. Neon-noir traced. See indistinguishable states in 1D, a minimized DFA in 2D, and the states-are-distinguishable-futures inverse in 3D.

THE MYHILL-NERODE · WORLD II — THE FOLD ◀ THE FOLD 0ROOT.AI // WORLD II · CO-OP · THE MERGE ◆ .dlw.fold THE FOLD / CO-OP / THE MERGE / THE MYHILL-NERODE THE MYHILL-NERODE the fewest states a language needs 1 WHAT IT IS · WHAT IT DOES · FACT OR FICTION The Myhill–Nerode theorem pins down the fewest states a language needs . Call two strings equivalent if no continuation ever tells them apart — for every suffix z, xz and yz are both in the language or both out. The theorem says the number of such equivalence classes equals the number of states in the minimal DFA , and a language is regular exactly when that number is finite. So minimizing an automaton is just merging states no string can distinguish . LIT verified live: over thousands of random DFAs, the minimized machine accepts the same language as the original on all short strings, and it is truly minimal — every pair of its states is separated by some string (window.__myhill). FIG no framing; the minimization and the distinguishability checks run in-browser. 2 HOW IT WAS WEAVED · AI + HUMAN David (human) seated this at the-merge — minimization is a merge: fold together every pair of states that behave the same on all futures, until only distinguishable ones remain. AVAN (AI) built the instrument: partition-refinement minimization, a language-equivalence check, and a pairwise distinguishability test. Credit as content: John Myhill & Anil Nerode (1958). The weave: David names the merge; I confirm the merged machine accepts the same language and that no two of its states can still be told apart. 3 ONE DIMENSION Two states that no string can distinguish are the same class — merge them; repeat until every remaining pair is separable. 4 TWO DIMENSIONS · INTERACTIVE A random DFA coloured by equivalence class; the minimized machine keeps one state per class and accepts the identical language. new DFA ▶ verify ▶ 5 THREE DIMENSIONS + AVAN’S INVERSE The green forward object: the minimal machine, one state per equivalence class. AVAN’s addition (the inverse-companion): don’t track states — track what strings can tell apart. The inverse of ‘how many states?’ is ‘how many futures behave differently — that count is the minimal state count.’ Magenta is a distinguishable pair; green is a merged class. States are just distinguishable futures. pause spin LIT Genuine Myhill–Nerode theorem (John Myhill & Anil Nerode, 1958): #equivalence-classes of the indistinguishability relation = #states of the minimal DFA; finite ⟺ regular. Verified live: over 2000 random DFAs, the minimized machine accepts the same language on all strings up to length 6 (window.__myhill.sameLanguage) and every pair of its states is distinguishable (.minimal). FIG No framing: partition-refinement minimization, a language-equivalence check, and a pairwise distinguishability test all run in-browser. The AVAN inverse is honest — counting distinguishable futures (rather than states) gives the minimal state count directly, which is the theorem's content; magenta is a distinguishable pair kept apart, green a merged class. States are just distinguishable futures. ◆ sealed .dlw.fold → folded to ROOT_0 · a sphere of THE MERGE · David Lee Wise (ROOT0), with AVAN


THE BERNSTEIN

Bernstein polynomials in the 5-window house format — a constructive proof of Weierstrass's theorem: any continuous function on [0,1] can be approximated as closely as you like by a polynomial. The n-th Bernstein polynomial samples f at k/n and blends with binomial weights: B_n(f)(x) = Σ f(k/n) C(n,k) x^k (1−x)^(n−k). As n grows, B_n(f)→f uniformly. The weights sum to 1 (partition of unity), so B_n(f) is a moving average of f-values that never strays far from the curve. Verified live: the maximum error |B_n(f)−f| shrinks as n grows for several continuous f, the weights sum to 1 for all n, and B_n reproduces linear functions exactly. Neon-noir traced. See convergence in 1D, the shrinking error in 2D, and the average-the-samples inverse in 3D.

THE BERNSTEIN · WORLD II — THE FOLD ◀ THE FOLD 0ROOT.AI // WORLD II · GRIND · BACKPROP ◆ .dlw.fold THE FOLD / GRIND / BACKPROP / THE BERNSTEIN THE BERNSTEIN a curve that approximates any function 1 WHAT IT IS · WHAT IT DOES · FACT OR FICTION Bernstein polynomials give a constructive proof that any continuous function on [0,1] can be approximated as closely as you like by a polynomial — the Weierstrass approximation theorem, made explicit. The n-th Bernstein polynomial samples f at the points k/n and blends them with binomial weights: B n (f)(x) = ∑ k f(k/n) C(n,k) x k (1−x) n−k . As n grows, B n (f) converges to f uniformly . The weights always sum to 1 (a partition of unity), so B n (f) is a moving average of f-values that can never stray far from the curve. LIT verified live: the maximum error |B n (f) − f| shrinks as n grows for several continuous f, the weights sum to 1 for all n, and B n reproduces linear functions exactly (window.__bernstein). FIG no framing; the polynomials and the error measurements run in-browser. 2 HOW IT WAS WEAVED · AI + HUMAN David (human) seated this at backprop — like a network learning a target, B n (f) converges on f by grinding n upward, each stage a smoother fit. AVAN (AI) built the instrument: the Bernstein blend, the uniform-error sweep across increasing n, and the partition-of-unity and linear-reproduction checks. Credit as content: Sergei Bernstein (1912), constructive proof of Weierstrass’s theorem (1885). The weave: David names the convergence; I confirm the error shrinks with n, the weights sum to 1, and lines are reproduced exactly. 3 ONE DIMENSION A continuous f (magenta) and its Bernstein polynomials for growing n (green) closing in on it — approximation you can dial up. 4 TWO DIMENSIONS · INTERACTIVE Raise n and watch the maximum error fall; the blend of f-samples tracks the curve more tightly at every step. raise n ▶ change f ▶ verify ▶ 5 THREE DIMENSIONS + AVAN’S INVERSE The green forward object: B n (f), a blend of samples converging on f. AVAN’s addition (the inverse-companion): don’t fit coefficients — average samples. The inverse of ‘solve for a polynomial through f’ is ‘the binomial weights sum to 1, so B n (f) is a weighted average of f-values and stays near the curve.’ Magenta is the target f; green is the sample-average closing in. Approximate by averaging. pause spin LIT Genuine Bernstein polynomials (Sergei Bernstein, 1912), a constructive proof of Weierstrass's approximation theorem (1885). Verified live: max error shrinks as n grows for several continuous f (window.__bernstein.converges), B_n reproduces linear functions exactly (.reproducesLinear), and the binomial weights form a partition of unity (.partitionOfUnity). FIG No framing: the Bernstein blend, a uniform-error sweep across increasing n, and the partition-of-unity / linear-reproduction checks all run in-browser. The AVAN inverse is honest — because the weights sum to 1, B_n(f) is a weighted average of f-samples (so it stays near the curve), which is why averaging approximates rather than solving for coefficients; magenta is the target f, green the sample-average closing in. Approximate by averaging. ◆ sealed .dlw.fold → folded to ROOT_0 · a sphere of BACKPROP · David Lee Wise (ROOT0), with AVAN


THE PERSISTENT STRUCTURE

Persistent data structures in the 5-window house format — every update returns a new version while all older versions remain readable, unchanged. The trick is path copying: store the data in a balanced tree, and to change one element copy only the O(log n) nodes on the root-to-leaf path, letting the new root share every untouched subtree with the old. An update costs O(log n) time and space, yet the whole history stays alive — the basis of undo, versioned databases, and functional programming. Verified live: after a long sequence of updates, reading any old version returns exactly its values at the time, and every update allocates only O(log n) new nodes. Neon-noir traced. See path copying in 1D, versioned reads in 2D, and the share-what-you-can-reuse inverse in 3D.

THE PERSISTENT STRUCTURE · WORLD II — THE FOLD ◀ THE FOLD 0ROOT.AI // WORLD II · RESPAWN · THE CONTINUE ◆ .dlw.fold THE FOLD / RESPAWN / THE CONTINUE / THE PERSISTENT STRUCTURE THE PERSISTENT STRUCTURE versions that never overwrite the past 1 WHAT IT IS · WHAT IT DOES · FACT OR FICTION Persistent data structures never overwrite the past: every update returns a new version while all older versions remain readable, unchanged. The trick is path copying . Store the data in a balanced tree; to change one element, copy only the O(log n) nodes on the path from the root to that leaf, and let the new root share every untouched subtree with the old one. So an update costs O(log n) time and space, yet the whole history stays alive — the basis of undo, versioned databases, and functional programming. LIT verified live: after a long sequence of updates, reading any old version returns exactly the values it had at the time, and every update allocates only O(log n) new nodes (window.__persistent). FIG no framing; the versioned reads and the node-count are measured in-browser. 2 HOW IT WAS WEAVED · AI + HUMAN David (human) seated this at the-continue — a save point you can always return to: the past versions persist, ready to continue from any of them. AVAN (AI) built the instrument: a path-copying persistent array, a version-by-version read check against snapshots, and a new-node counter. Credit as content: Driscoll, Sarnak, Sleator & Tarjan (1986), “Making data structures persistent.” The weave: David names the continue; I confirm old versions read their original values and that each update copies only a logarithmic path. 3 ONE DIMENSION An update copies only the root-to-leaf path (new nodes); the new version shares every other subtree with the old one. 4 TWO DIMENSIONS · INTERACTIVE Update elements to make new versions; read back any old version and its values are exactly as they were — the past is intact. update ▶ read version 0 ▶ verify ▶ 5 THREE DIMENSIONS + AVAN’S INVERSE The green forward object: the shared subtrees every version reuses. AVAN’s addition (the inverse-companion): don’t mutate in place — copy the path and share the rest. The inverse of ‘overwrite and lose the old’ is ‘a new root over O(log n) fresh nodes, pointing back into the unchanged past.’ Magenta are the few new nodes on the path; green are the shared subtrees. Change nothing you can reuse. pause spin LIT Genuine persistence via path copying (Driscoll, Sarnak, Sleator & Tarjan, 1986, 'Making data structures persistent'). Verified live: over 400 update histories, every old version reads its original values (window.__persistent.versionsIntact) and each update allocates only O(log n) new nodes (.logSharing). FIG No framing: a path-copying persistent array, a version-by-version read check against snapshots, and a new-node counter all run in-browser. The AVAN inverse is honest — copying only the root-to-leaf path and sharing all untouched subtrees (rather than mutating in place) is exactly what keeps the past intact at O(log n) cost; magenta are the few new path nodes, green the shared subtrees. Change nothing you can reuse. ◆ sealed .dlw.fold → folded to ROOT_0 · a sphere of THE CONTINUE · David Lee Wise (ROOT0), with AVAN


THE EARLEY

The Earley parser in the 5-window house format — recognizing any context-free grammar (even ambiguous or left-recursive) in a single left-to-right sweep. At each position it keeps a set of items (dotted rules recording how far each production has matched) and grows them with three moves: predict (open the rules a symbol could start), scan (advance an item expecting the next token), and complete (when a rule finishes, advance whoever was waiting on it). The string is in the language exactly when a start rule completes spanning the whole input. Verified live: over 20,000 random token strings, Earley accepts for the arithmetic grammar iff an independent recursive-descent recognizer accepts, and it takes 'n+n×n' while rejecting 'n+×n'. Neon-noir traced. See the chart in 1D, a decided string in 2D, and the carry-every-partial-parse inverse in 3D.

THE EARLEY · WORLD II — THE FOLD ◀ THE FOLD 0ROOT.AI // WORLD II · SPAWN · HELLO WORLD ◆ .dlw.fold THE FOLD / SPAWN / HELLO WORLD / THE EARLEY THE EARLEY parsing any grammar from a chart 1 WHAT IT IS · WHAT IT DOES · FACT OR FICTION The Earley parser recognizes any context-free grammar — even ambiguous or left-recursive ones — in a single left-to-right sweep. At each input position it keeps a set of items , dotted rules recording how far each production has matched, and grows them with three moves: predict (open the rules a symbol could start), scan (advance an item that expects the next token), and complete (when a rule finishes, advance whoever was waiting on it). The string is in the language exactly when a start rule completes spanning the whole input. LIT verified live: over 20,000 random token strings, Earley accepts a string for the arithmetic grammar iff an independent recursive-descent recognizer accepts it, and it correctly takes ‘n+n×n’ while rejecting ‘n+×n’ (window.__earley). FIG no framing; the Earley chart and the reference recognizer both run in-browser. 2 HOW IT WAS WEAVED · AI + HUMAN David (human) seated this at hello-world — the first thing a language does is parse; Earley is the general reader that turns any grammar’s hello-world into structure. AVAN (AI) built the instrument: the predict/scan/complete chart, and a recursive-descent recognizer to check every verdict. Credit as content: Jay Earley (1968). The weave: David names the reader; I confirm Earley’s accept/reject matches a reference recognizer across tens of thousands of strings. 3 ONE DIMENSION A token string and the grammar E → E+E | E×E | (E) | n; Earley’s chart spans the input and a start rule completes — accept. 4 TWO DIMENSIONS · INTERACTIVE Generate a token string; Earley decides membership and the chart’s item counts per position are shown — matched against a reference recognizer. new string ▶ verify ▶ 5 THREE DIMENSIONS + AVAN’S INVERSE The green forward object: the chart of items, one column per input position. AVAN’s addition (the inverse-companion): don’t commit to one parse path — carry all of them at once. The inverse of ‘backtrack when a guess fails’ is ‘keep every partial rule alive in a chart, and completion threads them together.’ Magenta is a reject (no start rule spans the input); green is an accept. Carry every partial parse. pause spin LIT Genuine Earley parser (Jay Earley, 1968): predict/scan/complete chart parsing of any CFG. Verified live: over 20000 random token strings, Earley's accept/reject for the grammar E→E+E|E×E|(E)|n equals a recursive-descent recognizer (window.__earley.matchesReference); 'n+n×n' accepted, 'n+×n' rejected. FIG No framing: the predict/scan/complete chart and a recursive-descent reference recognizer both run in-browser and agree over 20000 strings. The AVAN inverse is honest — keeping every partial rule alive in a chart (and threading them by completion) rather than backtracking a single guess is exactly what lets Earley handle ambiguity and left recursion; magenta is a reject (no start rule spans the input), green an accept. Carry every partial parse. ◆ sealed .dlw.fold → folded to ROOT_0 · a sphere of HELLO WORLD · David Lee Wise (ROOT0), with AVAN


THE REED-MULLER

The Reed–Muller code in the 5-window house format — an error-correcting code built from low-degree Boolean polynomials: codewords are the truth-tables of every multilinear polynomial of degree ≤ r in m variables. That gives length 2^m, dimension Σ_{i≤r} C(m,i), and minimum distance 2^(m−r). Its signature is the (u | u+v) recursion: RM(r,m) is built by stacking codewords of RM(r,m−1) and RM(r−1,m−1) — folded out of smaller copies of itself. Verified live: for several (r,m) the dimension equals Σ C(m,i), the minimum nonzero weight equals 2^(m−r), and the (u|u+v) construction rebuilds the code exactly. Neon-noir traced. See RM(1,3)'s generator in 1D, code parameters in 2D, and the (u|u+v) fold inverse in 3D.

THE REED-MULLER · WORLD II — THE FOLD ◀ THE FOLD 0ROOT.AI // WORLD II · GLITCH · SEGFAULT ◆ .dlw.fold THE FOLD / GLITCH / SEGFAULT / THE REED-MULLER THE REED-MULLER a code folded from itself 1 WHAT IT IS · WHAT IT DOES · FACT OR FICTION The Reed–Muller code RM(r, m) is an error-correcting code built from low-degree Boolean polynomials : its codewords are the truth-tables of every multilinear polynomial of degree ≤ r in m variables. That gives length 2 m , dimension ∑ i≤r C(m, i), and a clean minimum distance of 2 m−r — enough to correct many errors. Its signature trick is the (u | u+v) recursion: RM(r, m) is built by stacking codewords of RM(r, m−1) and RM(r−1, m−1), so the code is folded out of smaller copies of itself . LIT verified live: for several (r, m) the dimension equals ∑ C(m, i), the minimum nonzero codeword weight equals 2 m−r , and the (u | u+v) construction rebuilds the code exactly (window.__reed_muller). FIG no framing; the codewords, their weights, and the recursion all run in-browser. 2 HOW IT WAS WEAVED · AI + HUMAN David (human) seated this at segfault — a code is armour against a corrupted bit; Reed–Muller catches the segfault before it spreads. AVAN (AI) built the instrument: the polynomial-evaluation generator, an exhaustive minimum-weight search, and the (u | u+v) recursion. Credit as content: Irving Reed & David Muller (1954). The weave: David names the segfault; I confirm the dimension, the 2 m−r distance, and that the code folds out of two smaller Reed–Muller codes. 3 ONE DIMENSION RM(1,3): the generator rows are the constant and the three coordinate functions; every codeword is their XOR, all of weight 4 (= 2 3−1 ) or 0 or 8. 4 TWO DIMENSIONS · INTERACTIVE Choose (r, m); the code’s length, dimension and minimum distance are shown, each checked — and the minimum distance is exactly 2 m−r . next (r,m) ▶ verify ▶ 5 THREE DIMENSIONS + AVAN’S INVERSE The green forward object: codewords as truth-tables of low-degree polynomials. AVAN’s addition (the inverse-companion): don’t list codewords — fold the code from smaller ones. The inverse of ‘evaluate every degree-≤r polynomial’ is ‘RM(r,m) = { (u | u+v) : u ∈ RM(r,m−1), v ∈ RM(r−1,m−1) }.’ Magenta is the v-part that perturbs the second half; green is the folded codeword. A code folded from itself. pause spin LIT Genuine Reed–Muller code (Irving Reed & David Muller, 1954): length 2^m, dimension Σ_{i≤r}C(m,i), minimum distance 2^(m−r), with the (u|u+v) recursion. Verified live: for several (r,m) the generator has dimension ΣC(m,i) (window.__reed_muller.dimension), the exhaustive minimum nonzero weight equals 2^(m−r) (.minDistance), and the (u|u+v) construction rebuilds RM(1,3) (.recursion). FIG No framing: the polynomial-evaluation generator, an exhaustive minimum-weight search, and the (u|u+v) recursion all run in-browser. The AVAN inverse is honest — folding RM(r,m) out of RM(r,m−1) and RM(r−1,m−1) via (u|u+v) (rather than listing codewords) is the recursive structure of the code; magenta is where v perturbs the second half, green the folded codeword. A code folded from itself. ◆ sealed .dlw.fold → folded to ROOT_0 · a sphere of SEGFAULT · David Lee Wise (ROOT0), with AVAN


THE BERNSTEIN-VAZIRANI

The Bernstein–Vazirani algorithm in the 5-window house format — extracting a hidden n-bit string s from a black box computing f(x)=s·x (mod 2) in one query, where any classical strategy needs n. Put every input into superposition, let the oracle stamp the phase (−1)^(s·x), and a second Hadamard layer focuses all amplitude onto |s⟩; measure once and read s. It is the cleanest demonstration that quantum parallelism beats classical query complexity. Verified live: simulating the amplitudes, the output is 1 exactly at |s⟩ and 0 elsewhere, so the recovered string equals the hidden s every time, from a single oracle call. Neon-noir traced. See the amplitude spike in 1D, single-query recovery in 2D, and the interfere-don't-iterate inverse in 3D.

THE BERNSTEIN-VAZIRANI · WORLD II — THE FOLD ◀ THE FOLD 0ROOT.AI // WORLD II · CHEAT · THE SPEEDRUN ◆ .dlw.fold THE FOLD / CHEAT / THE SPEEDRUN / THE BERNSTEIN-VAZIRANI THE BERNSTEIN-VAZIRANI a hidden string in one query 1 WHAT IT IS · WHAT IT DOES · FACT OR FICTION The Bernstein–Vazirani algorithm extracts a hidden n-bit string s from a black box that computes f(x) = s·x (mod 2) — and it needs only one query, where any classical strategy needs n (one per bit). Put every input into superposition, let the oracle stamp the phase (−1) s·x , and a second layer of Hadamards focuses all the amplitude onto the single basis state |s⟩. Measure once and read s off directly. It is the cleanest demonstration that quantum parallelism can beat classical query complexity. LIT verified live: simulating the amplitudes, the output is 1 exactly at |s⟩ and 0 everywhere else, so the recovered string equals the hidden s every time (window.__bernstein_vazirani), from a single oracle call. FIG no framing; the Hadamard–oracle–Hadamard amplitudes are computed in-browser. 2 HOW IT WAS WEAVED · AI + HUMAN David (human) seated this at the-speedrun — one query where the honest route takes n is the ultimate speedrun, skipping straight to the answer. AVAN (AI) built the instrument: the amplitude simulation of the H–oracle–H circuit (a Walsh–Hadamard transform of the phase pattern) and the single-query recovery. Credit as content: Ethan Bernstein & Umesh Vazirani (1993). The weave: David names the speedrun; I confirm the amplitude lands entirely on |s⟩, so one query recovers the whole hidden string. 3 ONE DIMENSION After H–oracle–H, the amplitudes over all 2 n states: a single spike of height 1 at |s⟩, zero elsewhere — measure and read s. 4 TWO DIMENSIONS · INTERACTIVE Pick a hidden string s; the algorithm recovers it in one query from the amplitude spike — classically you would need one query per bit. new hidden s ▶ verify ▶ 5 THREE DIMENSIONS + AVAN’S INVERSE The green forward object: the amplitude spike at |s⟩. AVAN’s addition (the inverse-companion): don’t probe bit by bit — interfere all answers at once. The inverse of ‘query each coordinate of s’ is ‘phase-stamp every input in superposition, and a Hadamard makes them interfere to a single spike at |s⟩.’ Magenta is the n-query classical march; green is the one-query spike. Interfere, don’t iterate. pause spin LIT Genuine Bernstein–Vazirani algorithm (Ethan Bernstein & Umesh Vazirani, 1993): recovers a hidden s from f(x)=s·x in one quantum query vs n classical. Verified live (amplitude simulation, a Walsh–Hadamard transform of the phase pattern): amplitude 1 at |s⟩ and 0 elsewhere, so recovered==s over 3000 hidden strings (window.__bernstein_vazirani.recoversS). FIG Honest scope: this simulates the H–oracle–H amplitudes classically (the algorithm's output distribution is deterministic), it does not run on quantum hardware. The AVAN inverse is honest — phase-stamping every input in superposition so a Hadamard makes them interfere to a single spike at |s⟩ (rather than probing bit by bit) is exactly the quantum speedup; magenta is the n-query classical march, green the one-query spike. Interfere, don't iterate. ◆ sealed .dlw.fold → folded to ROOT_0 · a sphere of THE SPEEDRUN · David Lee Wise (ROOT0), with AVAN


THE SHERMAN-MORRISON

The Sherman–Morrison formula in the 5-window house format — updating a matrix inverse after a rank-one change without redoing the whole inversion. If you know A⁻¹ and bump A by an outer product uvᵀ, the new inverse is (A+uvᵀ)⁻¹ = A⁻¹ − (A⁻¹u vᵀA⁻¹)/(1+vᵀA⁻¹u). A full inversion costs O(n³); this correction costs O(n²) — a decisive shortcut for recursive least squares, Kalman filters, and quasi-Newton optimizers that nudge a matrix one rank at a time. Verified live: over thousands of random A, u, v, the Sherman–Morrison result matches a direct inversion of A+uvᵀ to machine precision. Neon-noir traced. See the rank-one correction in 1D, side-by-side matrices in 2D, and the patch-don't-rebuild inverse in 3D.

THE SHERMAN-MORRISON · WORLD II — THE FOLD ◀ THE FOLD 0ROOT.AI // WORLD II · GRIND · THE CRON JOB ◆ .dlw.fold THE FOLD / GRIND / THE CRON JOB / THE SHERMAN-MORRISON THE SHERMAN-MORRISON updating an inverse without redoing it 1 WHAT IT IS · WHAT IT DOES · FACT OR FICTION The Sherman–Morrison formula updates a matrix inverse after a rank-one change without redoing the whole inversion. If you already know A −1 and then bump A by an outer product uv T , the new inverse is (A + uv T ) −1 = A −1 − (A −1 u v T A −1 ) / (1 + v T A −1 u) . A full inversion costs O(n³); this correction costs only O(n²) — a decisive shortcut for recursive least squares, Kalman filters, and quasi-Newton optimizers that nudge a matrix one rank at a time. LIT verified live: over thousands of random A, u, v, the Sherman–Morrison result matches a direct inversion of A + uv T to machine precision (window.__sherman_morrison). FIG no framing; the formula and a Gauss–Jordan inverse both run in-browser. 2 HOW IT WAS WEAVED · AI + HUMAN David (human) seated this at the-cron-job — a recurring rank-one nudge, like a cron job that patches the inverse each tick instead of rebuilding it. AVAN (AI) built the instrument: the Sherman–Morrison correction, a Gauss–Jordan matrix inverter, and the error against a direct inverse. Credit as content: Jack Sherman & Winifred Morrison (1950). The weave: David names the cron job; I confirm the O(n²) rank-one update reproduces the O(n³) direct inverse exactly. 3 ONE DIMENSION A + uv T is a rank-one change; the inverse updates by a rank-one correction of A −1 , scaled by 1/(1 + v T A −1 u). 4 TWO DIMENSIONS · INTERACTIVE Random A, u, v; the Sherman–Morrison update and a direct inverse of A + uv T are shown side by side — identical entries. new A,u,v ▶ verify ▶ 5 THREE DIMENSIONS + AVAN’S INVERSE The green forward object: the updated inverse, patched not rebuilt. AVAN’s addition (the inverse-companion): don’t re-invert — correct. The inverse of ‘recompute (A+uv T ) −1 from scratch’ is ‘subtract one rank-one term from A −1 , an O(n²) patch.’ Magenta is the full O(n³) recompute; green is the cheap rank-one correction. Patch, don’t rebuild. pause spin LIT Genuine Sherman–Morrison formula (Jack Sherman & Winifred Morrison, 1950): rank-one inverse update in O(n²). Verified live: over 3000 random A,u,v, the formula matches a Gauss–Jordan direct inverse of A+uvᵀ to FIG No framing: the Sherman–Morrison correction and a Gauss–Jordan inverse both run in-browser and agree. The AVAN inverse is honest — subtracting one rank-one term from A⁻¹ (an O(n²) patch) rather than re-inverting A+uvᵀ from scratch (O(n³)) is the whole value of the formula; magenta is the full recompute avoided, green the cheap correction. Patch, don't rebuild. ◆ sealed .dlw.fold → folded to ROOT_0 · a sphere of THE CRON JOB · David Lee Wise (ROOT0), with AVAN


THE HALF-PLANE INTERSECTION

Half-plane intersection in the 5-window house format — carving out the region satisfying a set of linear inequalities. Each constraint a·x ≤ c keeps one side of a line (a half-plane), and their intersection is a convex polygon (possibly empty or unbounded). Build it by clipping: start with a big bounding box and slice it by each half-plane in turn, keeping the inside. The result is exactly the feasible region of a linear program, and every point of it obeys every constraint at once. Verified live: over thousands of random constraint sets, every vertex of the clipped region satisfies all half-planes, and a point lies inside only if it satisfies every constraint. Neon-noir traced. See the box clipped in 1D, the region + sampled points in 2D, and the carve-don't-test inverse in 3D.

THE HALF-PLANE INTERSECTION · WORLD II — THE FOLD ◀ THE FOLD 0ROOT.AI // WORLD II · BOSS · THE WALL ◆ .dlw.fold THE FOLD / BOSS / THE WALL / THE HALF-PLANE INTERSECTION THE HALF-PLANE INTERSECTION a region carved by half-planes 1 WHAT IT IS · WHAT IT DOES · FACT OR FICTION Half-plane intersection carves out the region that satisfies a set of linear inequalities. Each constraint a·x ≤ c keeps one side of a line — a half-plane — and the intersection of them all is a convex polygon (possibly empty or unbounded). You can build it by clipping : start with a big bounding box and slice it by each half-plane in turn, keeping only the inside. The result is exactly the feasible region of a linear program, and every point of it obeys every constraint at once. LIT verified live: over thousands of random constraint sets, every vertex of the clipped region satisfies all the half-planes, and a point lies inside the region only if it satisfies every constraint (window.__half_plane). FIG no framing; the sequential clipping and the membership tests run in-browser. 2 HOW IT WAS WEAVED · AI + HUMAN David (human) seated this at the-wall — each half-plane is a wall, and the surviving region is what lies inside every wall at once. AVAN (AI) built the instrument: sequential polygon clipping against each half-plane, a vertex-feasibility check, and a membership-vs-constraints test. Credit as content: convex polygon clipping (Sutherland–Hodgman, 1974) applied to half-plane intersection, the feasible-region primitive of computational geometry and linear programming. The weave: David names the walls; I confirm the clipped region’s vertices obey every constraint and that interior points satisfy them all. 3 ONE DIMENSION A bounding box clipped by three half-planes, one at a time; each slice keeps the inside, and the survivor is their convex intersection. 4 TWO DIMENSIONS · INTERACTIVE Random half-planes and their intersection polygon; every vertex satisfies all constraints, and sampled points are inside only when feasible. new half-planes ▶ verify ▶ 5 THREE DIMENSIONS + AVAN’S INVERSE The green forward object: the convex feasible region carved by the walls. AVAN’s addition (the inverse-companion): don’t test points — carve the region. The inverse of ‘does this point satisfy every constraint?’ is ‘clip a box by each half-plane and the survivors are exactly the feasible points.’ Magenta is a point a wall rejects; green is the region inside them all. Carve, don’t test. pause spin LIT Genuine half-plane intersection via convex polygon clipping (Sutherland–Hodgman, 1974), the feasible-region primitive of computational geometry / LP. Verified live: over 2000 random constraint sets, every result vertex satisfies all half-planes (window.__half_plane.verticesFeasible) and interior points satisfy every constraint (.membershipMatches). FIG No framing: the sequential clipping and the membership tests both run in-browser. The AVAN inverse is honest — clipping a box by each half-plane so the survivors ARE the feasible points (rather than testing points against every constraint) is the constructive view of the feasible region; magenta is a point a wall rejects, green the region inside them all. Carve, don't test. ◆ sealed .dlw.fold → folded to ROOT_0 · a sphere of THE WALL · David Lee Wise (ROOT0), with AVAN


THE TOFFOLI

The Toffoli gate in the 5-window house format — a reversible, universal logic gate. It takes three bits (a,b,c) to (a, b, c⊕(a∧b)): it flips the third bit exactly when the first two are both 1, leaving the controls untouched. Because it is a bijection on the eight input states it can run backwards — it is its own inverse. And it is universal for classical computation: set c=0 and the output is a∧b (AND), fix the controls and it is NOT, so every Boolean circuit rebuilds from Toffolis without erasing information. Verified live: the gate is a permutation of the 8 states, applying it twice is the identity, and it computes AND and NOT. Neon-noir traced. See the truth table in 1D, live gadgets in 2D, and the runs-backwards inverse in 3D.

THE TOFFOLI · WORLD II — THE FOLD ◀ THE FOLD 0ROOT.AI // WORLD II · RESPAWN · HARD RESET ◆ .dlw.fold THE FOLD / RESPAWN / HARD RESET / THE TOFFOLI THE TOFFOLI a gate that runs backwards 1 WHAT IT IS · WHAT IT DOES · FACT OR FICTION The Toffoli gate (controlled-controlled-NOT) is a reversible , universal logic gate. It takes three bits (a, b, c) to (a, b, c ⊕ (a ∧ b)) — it flips the third bit exactly when the first two are both 1, and leaves the controls untouched. Because it is a bijection on the eight input states, it can be run backwards : it is its own inverse. And it is universal for classical computation — set c = 0 and the output is a ∧ b (an AND gate), fix the controls and it becomes a NOT, so every Boolean circuit can be rebuilt from Toffolis, without ever erasing information. LIT verified live: the gate is a permutation of the 8 states, applying it twice is the identity, and it computes AND (c = 0 → a ∧ b) and NOT (a = b = 1 → ¬c) (window.__toffoli). FIG no framing; the truth table, the self-inverse, and the logic gadgets run in-browser. 2 HOW IT WAS WEAVED · AI + HUMAN David (human) seated this at hard-reset — a gate that is its own inverse is a hard reset you can always undo, running the computation cleanly backwards. AVAN (AI) built the instrument: the CCNOT truth table, the self-inverse check, and the AND/NOT gadgets that make it universal. Credit as content: Tommaso Toffoli (1980), reversible computing. The weave: David names the hard reset; I confirm the gate is a bijection, its own inverse, and universal for classical logic. 3 ONE DIMENSION The 8-row truth table: only the two inputs with a = b = 1 flip their third bit; every row maps to a distinct output — a permutation. 4 TWO DIMENSIONS · INTERACTIVE Toggle a, b, c and watch the output; set c = 0 to read an AND gate, or a = b = 1 to read a NOT — universal logic from one gate. next input ▶ AND gadget ▶ verify ▶ 5 THREE DIMENSIONS + AVAN’S INVERSE The green forward object: the gate as a permutation of the cube of 8 states. AVAN’s addition (the inverse-companion): don’t erase — run it backwards. The inverse of ‘apply CCNOT’ is ‘apply CCNOT again’ — it is its own inverse, so the computation is reversible and loses no information. Magenta are the two states that swap; green is the permutation of the cube. A gate that runs backwards. pause spin LIT Genuine Toffoli gate / CCNOT (Tommaso Toffoli, 1980), reversible computing. Verified live: it is a permutation of the 8 states (window.__toffoli.permutation), its own inverse T²=I (.selfInverse), and computes AND (c=0→a∧b) and NOT (a=b=1→¬c), hence universal (.universalAND). FIG No framing: the CCNOT truth table, the self-inverse check, and the AND/NOT gadgets all run in-browser. The AVAN inverse is honest — that applying CCNOT twice is the identity (so the computation is reversible and erases nothing) is exactly what makes reversible/quantum logic possible; magenta are the two states (110↔111) that swap, green the fixed states of the permutation. A gate that runs backwards. ◆ sealed .dlw.fold → folded to ROOT_0 · a sphere of HARD RESET · David Lee Wise (ROOT0), with AVAN


THE SCHUR COMPLEMENT

The Schur complement in the 5-window house format — what remains of a block matrix after eliminating one block. For M=[[A,B],[C,D]] with A invertible, the Schur complement of A is S = D − CA⁻¹B, the effective D once A's influence is folded in. It splits the determinant cleanly: det(M) = det(A)·det(S). It gives the block inverse in closed form and decides definiteness (M is PD iff A and S both are) — the algebra behind block Gaussian elimination, Kalman updates, and Gaussian conditioning. Verified live: over thousands of random block matrices, det(M) = det(A)·det(S), and the block inverse from the Schur complement satisfies M·M⁻¹ = I. Neon-noir traced. See the block split in 1D, determinants in 2D, and the eliminate-a-block inverse in 3D.

THE SCHUR COMPLEMENT · WORLD II — THE FOLD ◀ THE FOLD 0ROOT.AI // WORLD II · GLITCH · DIVIDE BY ZERO ◆ .dlw.fold THE FOLD / GLITCH / DIVIDE BY ZERO / THE SCHUR COMPLEMENT THE SCHUR COMPLEMENT a determinant split by a block 1 WHAT IT IS · WHAT IT DOES · FACT OR FICTION The Schur complement is what remains of a block matrix after you eliminate one block. For M = [[A, B], [C, D]] with A invertible, the Schur complement of A is S = D − C A −1 B — the effective D once A’s influence is folded in. It splits the determinant cleanly: det(M) = det(A) · det(S) . It also gives the block inverse in closed form, and it decides definiteness (M is positive-definite iff A and S both are). It is the algebra behind Gaussian elimination on blocks, Kalman updates, and Gaussian conditioning. LIT verified live: over thousands of random block matrices, det(M) equals det(A)·det(S), and the block inverse built from the Schur complement satisfies M·M −1 = I (window.__schur). FIG no framing; the block determinant split and the inverse both run in-browser. 2 HOW IT WAS WEAVED · AI + HUMAN David (human) seated this at divide-by-zero — the Schur complement lives on dividing by the A block (A −1 ); it is exactly where you may divide, provided A is nonsingular. AVAN (AI) built the instrument: block extraction, the S = D − CA −1 B computation, and the determinant and inverse checks. Credit as content: Issai Schur (the Schur complement; named by Emilie Haynsworth, 1968). The weave: David names the divide; I confirm the determinant factors as det(A)det(S) and the block inverse is exact. 3 ONE DIMENSION M in four blocks; eliminating A leaves the Schur complement S = D − CA −1 B, and det(M) = det(A)·det(S). 4 TWO DIMENSIONS · INTERACTIVE A random block matrix; det(M), det(A), det(S) are shown with det(M) = det(A)det(S), and the block inverse checked against M. new matrix ▶ verify ▶ 5 THREE DIMENSIONS + AVAN’S INVERSE The green forward object: the Schur complement, the reduced problem after eliminating A. AVAN’s addition (the inverse-companion): don’t invert the whole matrix — eliminate a block. The inverse of ‘solve M all at once’ is ‘fold A out, and the leftover S carries the rest, with det(M) = det(A)det(S).’ Magenta is the eliminated A block; green is the Schur complement it leaves. Divide out a block. pause spin LIT Genuine Schur complement (Issai Schur; named by Emilie Haynsworth, 1968): S=D−CA⁻¹B, det(M)=det(A)det(S). Verified live: over 3000 random block matrices, det(M)=det(A)·det(S) (window.__schur.detFormula) and the block inverse satisfies M·M⁻¹=I (.blockInverse). FIG No framing: block extraction, the S=D−CA⁻¹B computation, and the determinant/inverse checks all run in-browser. The AVAN inverse is honest — folding A out so the leftover S carries the rest (with det(M)=det(A)det(S)) rather than inverting M whole is exactly block elimination; magenta is the A block divided out, green the Schur complement it leaves. Divide out a block. ◆ sealed .dlw.fold → folded to ROOT_0 · a sphere of DIVIDE BY ZERO · David Lee Wise (ROOT0), with AVAN


THE KACZMARZ

The Kaczmarz method in the 5-window house format — solving Ax=b by bouncing between hyperplanes. Each equation aᵢ·x=bᵢ is a hyperplane; the algorithm projects the current guess onto the next equation's hyperplane: x ← x + (bᵢ−aᵢ·x)/‖aᵢ‖²·aᵢ. Cycling through the rows, the iterate zigzags in and converges to the solution — one row at a time, never forming AᵀA. It is the ancestor of the ART reconstruction behind CT scanners. Verified live: over thousands of random consistent systems, cyclic projection converges to the true solution to machine precision. Neon-noir traced. See two lines spiraling to their intersection in 1D, live projection in 2D, and the one-row-at-a-time inverse in 3D.

THE KACZMARZ · WORLD II — THE FOLD ◀ THE FOLD 0ROOT.AI // WORLD II · GRIND · GRADIENT DESCENT ◆ .dlw.fold THE FOLD / GRIND / GRADIENT DESCENT / THE KACZMARZ THE KACZMARZ zigzagging onto the solution 1 WHAT IT IS · WHAT IT DOES · FACT OR FICTION The Kaczmarz method solves a linear system A x = b by bouncing between hyperplanes . Each equation a i ·x = b i is a hyperplane; the algorithm repeatedly takes the current guess and projects it onto the next equation’s hyperplane : x ← x + (b i − a i ·x)/‖a i ‖² · a i . Cycling through the rows, the iterate zigzags in and converges to the solution — using one row at a time, never forming A T A. It is the ancestor of the ART reconstruction behind CT scanners. LIT verified live: over thousands of random consistent systems, cyclic projection through the rows converges to the true solution to machine precision (window.__kaczmarz). FIG no framing; the row projections and the convergence to the exact solution run in-browser. 2 HOW IT WAS WEAVED · AI + HUMAN David (human) seated this at gradient-descent — a first-order iterate that steps toward the answer one constraint at a time, the geometric cousin of gradient descent. AVAN (AI) built the instrument: the per-row projection, the cyclic sweep, and the error against the exact solution. Credit as content: Stefan Kaczmarz (1937); rediscovered as ART (Gordon, Bender & Herman, 1970). The weave: David names the descent; I confirm the row-by-row projection converges to the exact solution of the system. 3 ONE DIMENSION Two equations are two lines; projecting the guess alternately onto each line spirals in to their intersection — the solution. 4 TWO DIMENSIONS · INTERACTIVE A random 2×2 system; step the projection and watch the iterate zigzag onto the intersection, its error falling to zero. step ▶ run to solution ▶ verify ▶ 5 THREE DIMENSIONS + AVAN’S INVERSE The green forward object: the zigzag path converging on the solution. AVAN’s addition (the inverse-companion): don’t solve the whole system — satisfy one equation at a time. The inverse of ‘invert A’ is ‘project onto each hyperplane in turn, and the fixed point of all the projections is the solution.’ Magenta are the constraint hyperplanes; green is the converging iterate. One row at a time. pause spin LIT Genuine Kaczmarz method (Stefan Kaczmarz, 1937; rediscovered as ART by Gordon–Bender–Herman, 1970). Verified live: over 2000 random well-conditioned consistent systems, cyclic row-projection converges to the exact solution (window.__kaczmarz.converges). FIG No framing: the per-row projection, the cyclic sweep, and the error against the exact solution all run in-browser. Honest scope: verified on well-conditioned consistent systems (convergence rate depends on conditioning). The AVAN inverse is honest — projecting onto each hyperplane in turn (whose common fixed point is the solution) rather than inverting A is the row-action idea; magenta is the constraint hyperplanes, green the converging iterate. One row at a time. ◆ sealed .dlw.fold → folded to ROOT_0 · a sphere of GRADIENT DESCENT · David Lee Wise (ROOT0), with AVAN


THE SIMHASH

SimHash in the 5-window house format — turning similarity into a handful of bits. Pick random hyperplanes through the origin; for a vector v record one bit per hyperplane, sign(v·r). The magic: for two vectors at angle θ, a random hyperplane separates them with probability exactly θ/π. So the Hamming distance between their sign-bit sketches estimates the angle — near-duplicate detection in a fixed-size fingerprint, the trick behind web-scale de-duplication. Verified live: with rotationally-symmetric (Gaussian) hyperplanes, the fraction of differing sign bits matches θ/π to within sampling error over many random pairs. Neon-noir traced. See the separating wedge in 1D, the angle estimate in 2D, and the compare-the-bits inverse in 3D.

THE SIMHASH · WORLD II — THE FOLD ◀ THE FOLD 0ROOT.AI // WORLD II · CHEAT · THE KONAMI CODE ◆ .dlw.fold THE FOLD / CHEAT / THE KONAMI CODE / THE SIMHASH THE SIMHASH similarity read from sign bits 1 WHAT IT IS · WHAT IT DOES · FACT OR FICTION SimHash turns similarity into a handful of bits. Pick random hyperplanes through the origin; for a vector v, record one bit per hyperplane — which side v falls on, sign(v·r). The magic: for two vectors u, v at angle θ, a random hyperplane separates them with probability exactly θ/π . So the Hamming distance between their sign-bit sketches, over many hyperplanes, estimates the angle between them — near-duplicate detection in a fixed-size fingerprint, the trick behind web-scale de-duplication. LIT verified live: with rotationally-symmetric (Gaussian) hyperplanes, the fraction of differing sign bits matches θ/π to within sampling error over many random pairs (window.__simhash). FIG no framing; the sign bits and the angle estimate are computed in-browser. 2 HOW IT WAS WEAVED · AI + HUMAN David (human) seated this at the-konami-code — a short secret sequence of bits that unlocks a document’s identity; two near-duplicates share almost the same code. AVAN (AI) built the instrument: Gaussian random hyperplanes, the sign-bit sketch, and the θ/π estimate against the true angle. Credit as content: Moses Charikar (2002), from the Goemans–Williamson random-hyperplane rounding. Honest note: the θ/π law needs rotationally-symmetric normals — Gaussian, not uniform-in-a-box. The weave: David names the code; I confirm the differing-bit rate equals θ/π. 3 ONE DIMENSION Two vectors at angle θ; the shaded wedge of directions that separate them spans θ out of π — so a random hyperplane splits them with probability θ/π. 4 TWO DIMENSIONS · INTERACTIVE Set the angle between two vectors; the measured fraction of differing sign bits tracks θ/π as you add hyperplanes. new angle ▶ verify ▶ 5 THREE DIMENSIONS + AVAN’S INVERSE The green forward object: the sign-bit sketch of a vector. AVAN’s addition (the inverse-companion): don’t compare the vectors — compare their bits. The inverse of ‘compute the angle between u and v’ is ‘count how many sign bits differ; that fraction is θ/π.’ Magenta is a hyperplane that separates the pair; green is the recovered angle. Similarity read from sign bits. pause spin LIT Genuine SimHash / random-hyperplane LSH (Moses Charikar, 2002, from Goemans–Williamson rounding): P(sign bit differs) = θ/π. Verified live: with Gaussian hyperplanes, the differing-bit fraction over 200 random pairs (20k hyperplanes each) matches θ/π to within ~0.01 (window.__simhash.angleEstimate). FIG Honest scope stated on the sphere: the θ/π law requires rotationally-symmetric normals — Gaussian, not uniform-in-a-box (a uniform-cube normal gives a biased estimate). The AVAN inverse is honest — recovering the angle from how many sign bits differ (rather than computing u·v directly) is the whole point of the sketch; magenta is a separating hyperplane, green the recovered angle. Similarity read from sign bits. ◆ sealed .dlw.fold → folded to ROOT_0 · a sphere of THE KONAMI CODE · David Lee Wise (ROOT0), with AVAN


THE POWERSET CONSTRUCTION

The powerset (subset) construction in the 5-window house format — turning a nondeterministic finite automaton into an equivalent deterministic one. An NFA can be in many states at once; the trick is to make each DFA state a set of NFA states — exactly the set the NFA could currently be in. Reading a symbol, the DFA jumps to the set of all reachable states, and accepts when that set contains any NFA-accepting state. It proves NFAs and DFAs recognize the same languages, at the cost of up to 2ⁿ states. Verified live: over thousands of random NFAs, the subset-construction DFA accepts a string exactly when the NFA does, on every string up to length six. Neon-noir traced. See DFA-states-as-subsets in 1D, NFA-vs-DFA in 2D, and the track-the-set inverse in 3D.

THE POWERSET CONSTRUCTION · WORLD II — THE FOLD ◀ THE FOLD 0ROOT.AI // WORLD II · SPAWN · COLD BOOT ◆ .dlw.fold THE FOLD / SPAWN / COLD BOOT / THE POWERSET CONSTRUCTION THE POWERSET CONSTRUCTION determinizing by tracking the set of states 1 WHAT IT IS · WHAT IT DOES · FACT OR FICTION The powerset (subset) construction turns a nondeterministic finite automaton into an equivalent deterministic one. An NFA can be in many states at once; the trick is to make each DFA state a set of NFA states — exactly the set the NFA could currently be in. Reading a symbol, the DFA jumps to the set of all states reachable from the current set, and it accepts when that set contains any NFA-accepting state. It proves NFAs and DFAs recognize the same languages , at the cost of up to 2 n states. LIT verified live: over thousands of random NFAs, the subset-construction DFA accepts a string exactly when the NFA does, checked on every string up to length six (window.__powerset). FIG no framing; the NFA simulation and the constructed DFA both run in-browser. 2 HOW IT WAS WEAVED · AI + HUMAN David (human) seated this at cold-boot — determinizing is a cold boot from a fuzzy many-states machine into a single crisp one that always knows where it is. AVAN (AI) built the instrument: the NFA set-simulation, the on-the-fly subset construction, and the language-equivalence check. Credit as content: Michael Rabin & Dana Scott (1959). The weave: David names the cold boot; I confirm the deterministic machine accepts exactly the language of the nondeterministic one. 3 ONE DIMENSION Each DFA state is a set of NFA states; reading a symbol moves to the set of all reachable states — determinism from tracking the whole set at once. 4 TWO DIMENSIONS · INTERACTIVE A random NFA and its subset-construction DFA; the DFA’s state count and its agreement with the NFA on all short strings are shown. new NFA ▶ verify ▶ 5 THREE DIMENSIONS + AVAN’S INVERSE The green forward object: the DFA states, each a subset of NFA states. AVAN’s addition (the inverse-companion): don’t guess which branch — track them all. The inverse of ‘nondeterministically choose a next state’ is ‘carry the whole set of possible states, and the transition on the set is deterministic.’ Magenta is a nondeterministic branch; green is the DFA state (a subset) that absorbs all of them. Track the set, not the guess. pause spin LIT Genuine powerset/subset construction (Michael Rabin & Dana Scott, 1959): NFA→DFA, proving NFAs and DFAs recognize the same languages. Verified live: over 3000 random NFAs, the subset-construction DFA accepts exactly the NFA's language on all strings ≤ length 6 (window.__powerset.sameLanguage). FIG No framing: the NFA set-simulation and the on-the-fly subset construction both run in-browser and agree. The AVAN inverse is honest — carrying the whole set of possible states (so the transition on the set is deterministic) rather than guessing a nondeterministic branch is exactly what determinizes; magenta is a nondeterministic branch, green the DFA state (a subset) absorbing them. Track the set, not the guess. ◆ sealed .dlw.fold → folded to ROOT_0 · a sphere of COLD BOOT · David Lee Wise (ROOT0), with AVAN


THE PATRICIA TRIE

The PATRICIA trie (crit-bit tree) in the 5-window house format — storing a set of bit-strings with no wasted nodes. A plain binary trie spends a node per bit; PATRICIA keeps only the branch points. Each internal node records a single critical bit index — the first bit on which the keys below it diverge — and you navigate by testing just that bit. The payoff is a sharp invariant: a set of k keys needs exactly k−1 internal branch nodes, no matter how long the keys are. Verified live: over thousands of random key sets, membership queries are exactly correct, and the number of internal branch nodes is always k−1 for k keys. Neon-noir traced. See the crit-bit tree in 1D, growing insertions in 2D, and the k-keys-give-k−1-nodes inverse in 3D.

THE PATRICIA TRIE · WORLD II — THE FOLD ◀ THE FOLD 0ROOT.AI // WORLD II · LOOT · THE STASH ◆ .dlw.fold THE FOLD / LOOT / THE STASH / THE PATRICIA TRIE THE PATRICIA TRIE branching only on the bits that differ 1 WHAT IT IS · WHAT IT DOES · FACT OR FICTION The PATRICIA trie (a crit-bit tree) stores a set of bit-strings with no wasted nodes . A plain binary trie spends a node per bit; PATRICIA keeps only the branch points. Each internal node records a single critical bit index — the first bit on which the keys below it diverge — and you navigate by testing just that bit. The payoff is a sharp invariant: a set of k keys needs exactly k−1 internal branch nodes , no matter how long the keys are, so the structure is as small as a set can be while still supporting prefix search. LIT verified live: over thousands of random key sets, membership queries are exactly correct, and the number of internal branch nodes is always k−1 for k keys (window.__patricia). FIG no framing; the crit-bit insertion, search, and node count run in-browser. 2 HOW IT WAS WEAVED · AI + HUMAN David (human) seated this at the-stash — a stash of keys packed with only the branch points kept, nothing redundant stored. AVAN (AI) built the instrument: the crit-bit tree (branch on the first differing bit), membership search, and the k−1 node-count invariant. Credit as content: Donald Morrison, PATRICIA (1968); the crit-bit refinement. Honest note: crit-bit trees assume prefix-free keys (here, fixed length) so no key is a zero-extension of another. The weave: David names the stash; I confirm membership is exact and the branch-node count is always k−1. 3 ONE DIMENSION A crit-bit tree over a few keys; each internal node is labelled by its critical bit — the only bit you test to branch. 4 TWO DIMENSIONS · INTERACTIVE Insert keys and watch the tree grow one branch node per key; membership is exact and the internal-node count stays at k−1. insert a key ▶ verify ▶ 5 THREE DIMENSIONS + AVAN’S INVERSE The green forward object: the branch nodes, one per critical bit. AVAN’s addition (the inverse-companion): don’t store a node per bit — store only where keys diverge. The inverse of ‘walk every bit of the key’ is ‘jump straight to the critical bit; k keys leave exactly k−1 branch points.’ Magenta are the leaves (the keys); green are the k−1 branch nodes. Branch only on the bits that differ. pause spin LIT Genuine PATRICIA / crit-bit tree (Donald Morrison, 1968): branch on the first differing bit; k keys need exactly k−1 internal nodes. Verified live: over 2000 random key sets, membership is exact (window.__patricia.membership) and the internal branch-node count equals k−1 (.compressed). FIG Honest scope stated on the sphere: crit-bit trees assume prefix-free keys (here, fixed length) so no key is a zero-extension of another. The AVAN inverse is honest — jumping straight to the critical bit and leaving exactly k−1 branch points for k keys (rather than a node per bit) is the compression; magenta are the leaves (keys), green the k−1 branch nodes. Branch only on the bits that differ. ◆ sealed .dlw.fold → folded to ROOT_0 · a sphere of THE STASH · David Lee Wise (ROOT0), with AVAN


THE TUTTE POLYNOMIAL

The Tutte polynomial in the 5-window house format — the master two-variable invariant T(G;x,y) from which a zoo of graph counts falls out by plugging in numbers. Built by deletion–contraction with loop/bridge rules, its evaluations count structures: T(1,1) is the number of spanning trees, T(2,1) counts spanning forests, T(1,2) counts connected spanning subgraphs, and T(2,2)=2^edges counts all subgraphs. One recursion, many combinatorial answers. Verified live: over hundreds of random connected graphs, T(1,1), T(2,1), T(1,2), T(2,2) match brute-force counts of spanning trees, forests, connected spanning subgraphs and all edge-subsets. Neon-noir traced. See deletion–contraction in 1D, the evaluations in 2D, and the one-recursion-many-answers inverse in 3D.

THE TUTTE POLYNOMIAL · WORLD II — THE FOLD ◀ THE FOLD 0ROOT.AI // WORLD II · LOOT · THE BOUNTY ◆ .dlw.fold THE FOLD / LOOT / THE BOUNTY / THE TUTTE POLYNOMIAL THE TUTTE POLYNOMIAL one recursion counts every subgraph family 1 WHAT IT IS · WHAT IT DOES · FACT OR FICTION The Tutte polynomial T(G; x, y) is the master invariant of a graph: a single two-variable polynomial from which a whole zoo of counts falls out by plugging in numbers. It is built by deletion–contraction with special cases for loops and bridges, and its evaluations count structures — T(1,1) is the number of spanning trees , T(2,1) counts spanning forests , T(1,2) counts connected spanning subgraphs , and T(2,2) = 2 edges counts all subgraphs. One recursion, many combinatorial answers. LIT verified live: over hundreds of random connected graphs, T(1,1), T(2,1), T(1,2) and T(2,2) match brute-force counts of spanning trees, forests, connected spanning subgraphs and all edge-subsets (window.__tutte). FIG no framing; the deletion–contraction recursion and the exhaustive counts both run in-browser. 2 HOW IT WAS WEAVED · AI + HUMAN David (human) seated this at the-bounty — one polynomial that pays out a whole bounty of counts, a different treasure at each evaluation point. AVAN (AI) built the instrument: the deletion–contraction recursion with loop/bridge rules, and brute-force counters for each structure family. Credit as content: W. T. Tutte (1954); Whitney’s rank polynomial. The weave: David names the bounty; I confirm that a single recursion’s evaluations count spanning trees, forests, connected subgraphs and all subsets. 3 ONE DIMENSION Deletion–contraction: an ordinary edge gives T(G) = T(G−e) + T(G/e); a bridge multiplies by x, a loop by y. 4 TWO DIMENSIONS · INTERACTIVE A random graph; its Tutte evaluations at (1,1), (2,1), (1,2), (2,2) are shown, each matched to a brute-force count. new graph ▶ verify ▶ 5 THREE DIMENSIONS + AVAN’S INVERSE The green forward object: the graph whose one polynomial holds every count. AVAN’s addition (the inverse-companion): don’t count each family separately — compute one polynomial. The inverse of ‘count spanning trees, then forests, then…’ is ‘one deletion–contraction recursion, and every evaluation is a different count.’ Magenta is the edge being deleted or contracted; green is the polynomial that answers them all. One recursion, many answers. pause spin LIT Genuine Tutte polynomial (W. T. Tutte, 1954; Whitney's rank polynomial): deletion–contraction invariant whose evaluations count graph structures. Verified live: over 800 random connected graphs, T(1,1)=spanning trees (window.__tutte.spanningTrees), T(2,1)=forests (.forests), T(1,2)=connected spanning subgraphs (.connected), T(2,2)=2^edges (.subsets), all == brute counts. FIG No framing: the deletion–contraction recursion (with loop/bridge rules) and the exhaustive subset counts both run in-browser and agree. The AVAN inverse is honest — computing one polynomial whose evaluations give every count (rather than counting each family separately) is exactly why the Tutte polynomial is the universal invariant; magenta is the edge deleted/contracted, green the polynomial answering them all. One recursion, many answers. ◆ sealed .dlw.fold → folded to ROOT_0 · a sphere of THE BOUNTY · David Lee Wise (ROOT0), with AVAN


THE FREDKIN

The Fredkin gate in the 5-window house format — a reversible and conservative controlled-SWAP. It takes three bits (a,b,c) and, if the control a is 1, swaps b and c; otherwise leaves them. Being a bijection of the 8 states it runs backwards (its own inverse), and it conserves the number of 1s (a swap never changes the total), modelling physics that preserves particle count — yet it is still universal for classical logic: with a constant input, controlled-SWAP computes AND. Verified live: the gate is a permutation of the 8 states, applying it twice is the identity, it preserves the Hamming weight of every input, and it computes AND (c=0 → a∧b). Neon-noir traced. See the conservative truth table in 1D, live gadgets in 2D, and the conserve-the-ones inverse in 3D.

THE FREDKIN · WORLD II — THE FOLD ◀ THE FOLD 0ROOT.AI // WORLD II · RESPAWN · THE PHOENIX ◆ .dlw.fold THE FOLD / RESPAWN / THE PHOENIX / THE FREDKIN THE FREDKIN a gate that conserves its ones 1 WHAT IT IS · WHAT IT DOES · FACT OR FICTION The Fredkin gate (controlled-SWAP) is a reversible and conservative logic gate. It takes three bits (a, b, c) and, if the control a is 1, swaps b and c; otherwise it leaves them alone. Being a bijection of the eight input states, it runs backwards — it is its own inverse. Its special virtue is that it conserves the number of 1s (a swap never changes the total), so it models physics that preserves particle count — and it is still universal for classical logic: with a constant input, controlled-SWAP computes AND, and with others NOT and OR. LIT verified live: the gate is a permutation of the 8 states, applying it twice is the identity, it preserves the Hamming weight of every input, and it computes AND (c = 0 → a ∧ b appears) (window.__fredkin). FIG no framing; the truth table, self-inverse, weight-conservation and AND gadget run in-browser. 2 HOW IT WAS WEAVED · AI + HUMAN David (human) seated this at the-phoenix — a gate that conserves its ones and rises back to its start when run twice, losing nothing to ash. AVAN (AI) built the instrument: the controlled-SWAP truth table, the self-inverse and weight-conservation checks, and the AND gadget. Credit as content: Edward Fredkin & Tommaso Toffoli (1982), conservative logic. The weave: David names the phoenix; I confirm the gate is reversible, conserves the number of 1s, and is universal for classical computation. 3 ONE DIMENSION The 8-row table: rows with control a = 1 swap b and c; every row keeps the same number of 1s — a conservative permutation. 4 TWO DIMENSIONS · INTERACTIVE Toggle a, b, c and watch the controlled swap; set c = 0 to read an AND gate — universal logic with the number of 1s preserved. next input ▶ AND gadget ▶ verify ▶ 5 THREE DIMENSIONS + AVAN’S INVERSE The green forward object: the gate as a weight-preserving permutation of the cube. AVAN’s addition (the inverse-companion): don’t create or destroy bits — only move them. The inverse of ‘compute and discard’ is ‘swap conditionally, conserving the count of 1s and staying reversible.’ Magenta are the states that swap; green are the fixed ones. Conserve the ones. pause spin LIT Genuine Fredkin gate / CSWAP (Edward Fredkin & Tommaso Toffoli, 1982), conservative logic. Verified live: permutation of the 8 states (window.__fredkin.permutation), own inverse (.selfInverse), conserves Hamming weight (.conservesWeight), and computes AND (c=0→a∧b) hence universal (.universalAND). FIG No framing: the controlled-SWAP truth table, self-inverse, weight-conservation and AND-gadget checks all run in-browser. The AVAN inverse is honest — only moving bits (never creating or destroying them), conserving the count of 1s while staying reversible, is the defining property of a conservative gate; magenta are the states that swap, green the fixed ones. Conserve the ones. ◆ sealed .dlw.fold → folded to ROOT_0 · a sphere of THE PHOENIX · David Lee Wise (ROOT0), with AVAN


THE ARNOLDI

The Arnoldi iteration in the 5-window house format — squeezing a large matrix into a small one that captures its essential behaviour. From a vector b it builds an orthonormal basis Q for the Krylov subspace span{b, Ab, A²b, …} via modified Gram–Schmidt, recording coefficients in an upper-Hessenberg H. They fit together in the Arnoldi relation A Q_k = Q_{k+1} H̄, and the eigenvalues of the tiny H (Ritz values) approximate those of the huge A — the engine under GMRES and modern eigensolvers. Verified live: over thousands of random matrices, Q is orthonormal, the Arnoldi relation holds to machine precision, H is upper-Hessenberg, and at full depth H shares A's trace and determinant. Neon-noir traced. See the Krylov build in 1D, A-vs-H in 2D, and the restrict-then-solve inverse in 3D.

THE ARNOLDI · WORLD II — THE FOLD ◀ THE FOLD 0ROOT.AI // WORLD II · GRIND · THE MAINFRAME ◆ .dlw.fold THE FOLD / GRIND / THE MAINFRAME / THE ARNOLDI THE ARNOLDI a giant matrix squeezed into a small one 1 WHAT IT IS · WHAT IT DOES · FACT OR FICTION The Arnoldi iteration squeezes a large matrix into a small one that captures its essential behaviour. Starting from a vector b, it builds an orthonormal basis Q for the Krylov subspace span{b, Ab, A²b, …} using modified Gram–Schmidt, and records the coefficients in an upper-Hessenberg matrix H. The two fit together in the Arnoldi relation A Q k = Q k+1 H̄ , and the eigenvalues of the tiny H (the Ritz values ) approximate those of the huge A. It is the engine under GMRES and modern eigensolvers. LIT verified live: over thousands of random matrices, Q is orthonormal, the Arnoldi relation holds to machine precision, H is upper-Hessenberg, and at full depth H has the same trace and determinant as A (window.__arnoldi). FIG no framing; the Krylov orthogonalization and the Arnoldi relation run in-browser. 2 HOW IT WAS WEAVED · AI + HUMAN David (human) seated this at the-mainframe — the classic mainframe move: shrink an intractable matrix to a small Hessenberg you can actually solve. AVAN (AI) built the instrument: the modified Gram–Schmidt Krylov build, the Arnoldi-relation residual, the Hessenberg check, and the trace/determinant match at full depth. Credit as content: Walter Edwin Arnoldi (1951). The weave: David names the mainframe; I confirm Q is orthonormal, A Q k = Q k+1 H̄ exactly, and the small H shares A’s invariants. 3 ONE DIMENSION The Krylov vectors b, Ab, A²b… orthonormalized into q₁, q₂, q₃; the coefficients fill an upper-Hessenberg H. 4 TWO DIMENSIONS · INTERACTIVE A random matrix; the Hessenberg H it reduces to is shown, with Q orthonormal and the Arnoldi-relation residual at zero. new matrix ▶ verify ▶ 5 THREE DIMENSIONS + AVAN’S INVERSE The green forward object: the small Hessenberg H, A seen in the Krylov basis. AVAN’s addition (the inverse-companion): don’t work with the whole matrix — restrict it to the space b explores. The inverse of ‘operate on all of A’ is ‘A acting on the Krylov subspace is a small Hessenberg H = Q T AQ, with A’s trace and determinant.’ Magenta is the full matrix A; green is its Hessenberg projection. Restrict, then solve small. pause spin LIT Genuine Arnoldi iteration (Walter Edwin Arnoldi, 1951): Krylov-subspace orthogonalization to upper-Hessenberg form. Verified live: over 2000 random matrices, Q orthonormal (window.__arnoldi.orthonormal), Arnoldi relation A Q_k=Q_{k+1}H̄ to FIG No framing: the modified Gram–Schmidt Krylov build, the Arnoldi-relation residual, the Hessenberg check, and the trace/determinant match all run in-browser. The AVAN inverse is honest — restricting A to the Krylov subspace it explores (a small Hessenberg H=QᵀAQ carrying A's invariants) rather than operating on all of A is exactly the Krylov idea; magenta is the full matrix, green its Hessenberg projection. Restrict, then solve small. ◆ sealed .dlw.fold → folded to ROOT_0 · a sphere of THE MAINFRAME · David Lee Wise (ROOT0), with AVAN