THE FIBONACCI CODING

Fibonacci coding in the 5-window house format — turning a positive integer into a self-delimiting bit string using the Fibonacci numbers as place values. Because every integer has a unique Zeckendorf representation (a sum of non-consecutive Fibonacci numbers), its bits never contain two adjacent 1s. Fibonacci coding writes those bits low-to-high and then appends one extra 1, so the codeword ends in '11' and '11' appears nowhere else inside it. That makes the code a prefix code you can pack end-to-end with no separators: a decoder just splits the stream at every '11'. It is also robust — a single bit flip corrupts at most a couple of adjacent values, not the whole stream. Verified live: over 20,000 integers, encode/decode round-trips, every codeword ends in '11' with no earlier '11', and a concatenated stream of many codewords parses back uniquely. Neon-noir traced. See the bits + terminator in 1D, the packed stream parse in 2D, and the carries-its-own-delimiter inverse in 3D.

THE FIBONACCI CODING · WORLD II — THE FOLD ◀ THE FOLD 0ROOT.AI // WORLD II · GLITCH · OFF-BY-ONE ◆ .dlw.fold THE FOLD / GLITCH / OFF-BY-ONE / THE FIBONACCI CODING THE FIBONACCI CODING a code that ends in 11 1 WHAT IT IS · WHAT IT DOES · FACT OR FICTION Fibonacci coding turns a positive integer into a self-delimiting bit string using the Fibonacci numbers as place values. Because every integer has a unique Zeckendorf representation — a sum of non-consecutive Fibonacci numbers — its bits never contain two adjacent 1s. Fibonacci coding writes those bits low-to-high and then appends one extra 1 , so the codeword ends in “11” and “11” appears nowhere else inside it. That makes the code a prefix code you can pack end-to-end with no separators: a decoder just splits the stream at every “11”. It is also robust — a single bit flip corrupts at most a couple of adjacent values, not the whole stream. LIT verified live: over 20,000 integers, encode/decode round-trips, every codeword ends in “11” with no earlier “11”, and a concatenated stream of many codewords parses back uniquely (window.__fibonacci_coding). FIG no framing; the Zeckendorf encoding and the split-at-11 parse run in-browser. 2 HOW IT WAS WEAVED · AI + HUMAN David (human) seated this at off-by-one — one extra 1 appended to the Zeckendorf bits turns a bare number into a codeword that announces its own end. AVAN (AI) built the instrument: the Zeckendorf encoder, the terminating 11, the decoder, and the unique-parse check. Credit as content: Fibonacci coding (from Zeckendorf’s theorem; Apostolico & Fraenkel formalized the universal code, 1987). The weave: David names off-by-one; I confirm the “11” terminator makes the stream self-delimiting and uniquely parseable. 3 ONE DIMENSION A number's Zeckendorf bits (no adjacent 1s) plus a terminating 1 → the codeword ends in 11, found nowhere earlier. 4 TWO DIMENSIONS · INTERACTIVE Encode several numbers, pack them end-to-end, and watch the decoder split the stream at every 11 — recovering each value. new numbers ▶ verify ▶ 5 THREE DIMENSIONS + AVAN’S INVERSE The green forward object: the stream, split cleanly at each 11. AVAN’s addition (the inverse-companion): don’t send lengths — let each code announce its end. The inverse of ‘fixed-width fields’ is ‘Zeckendorf bits have no 11, so a terminating 11 is a boundary that appears nowhere else.’ Magenta is a “11” boundary; green is the uniquely-parsed stream. The code carries its own delimiter. pause spin LIT Genuine Fibonacci coding (from Zeckendorf's theorem; Apostolico & Fraenkel formalized it as a universal code, 1987). Verified live: over 20000 integers, the Zeckendorf-bits + terminating-1 encode/decode round-trips, every codeword ends in '11' with no earlier '11', and over 3000 concatenated multi-codeword streams the split-at-'11' decoder recovers the exact sequence (window.__fibonacci_coding.roundTrip, .ends11, .uniqueParse). FIG No framing: the Zeckendorf encoding and the split-at-11 parse run in-browser. Distinct from the Zeckendorf representation itself — this is the self-delimiting universal CODE built on it. The AVAN inverse is honest — instead of sending explicit lengths, each codeword announces its own end: Zeckendorf bits contain no '11', so a terminating '11' is a boundary appearing nowhere else. Magenta is a '11' boundary; green is the uniquely-parsed stream. The code carries its own delimiter. ◆ sealed .dlw.fold → folded to ROOT_0 · a sphere of OFF-BY-ONE · David Lee Wise (ROOT0), with AVAN


THE MDCT

The MDCT (modified discrete cosine transform) in the 5-window house format — the transform at the heart of MP3, AAC, Vorbis, and Opus. It is lapped: it works on overlapping blocks of 2N samples but outputs only N coefficients each, so despite the 50% overlap there is no increase in data. That looks impossible — N numbers can't invert 2N samples — and indeed a single block can't. The magic is time-domain aliasing cancellation (TDAC): each inverse block carries an aliased error, but with the right symmetric window (satisfying w[n]²+w[n+N]²=1) the aliases of neighbouring blocks are equal and opposite, so overlap-adding them reconstructs the signal exactly. Critical sampling and perfect reconstruction at once. Verified live: framing a signal into 50%-overlapping windows, MDCT then IMDCT then overlap-add reconstructs the interior samples to ~1e-14. Neon-noir traced. See the overlapping windows in 1D, the reconstruction in 2D, and the overlap-makes-invertible inverse in 3D.

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

THE MDCT · WORLD II — THE FOLD ◀ THE FOLD 0ROOT.AI // WORLD II · CO-OP · THE-SYNC ◆ .dlw.fold THE FOLD / CO-OP / THE-SYNC / THE MDCT THE MDCT overlapping windows cancel their aliasing 1 WHAT IT IS · WHAT IT DOES · FACT OR FICTION The MDCT (modified discrete cosine transform) is the transform at the heart of MP3, AAC, Vorbis, and Opus. It is lapped : it works on overlapping blocks of 2N samples but outputs only N coefficients each, so despite the 50% overlap there is no increase in data. That looks impossible — N numbers can’t invert 2N samples — and indeed a single block can’t. The magic is time-domain aliasing cancellation (TDAC) : each inverse block carries an aliased error, but with the right symmetric window (satisfying w[n]²+w[n+N]²=1) the aliases of neighbouring blocks are equal and opposite , so overlap-adding them reconstructs the signal exactly . Critical sampling and perfect reconstruction at once. LIT verified live: framing a signal into 50%-overlapping windows, MDCT then IMDCT then overlap-add reconstructs the interior samples to ~1e-14 (window.__mdct). FIG no framing; the MDCT/IMDCT sums and the overlap-add run in-browser (interior samples, which have full overlap). 2 HOW IT WAS WEAVED · AI + HUMAN David (human) seated this at the-sync — overlapping windows brought into sync so their aliasing terms cancel and the signal returns seamlessly. AVAN (AI) built the instrument: the sine window, the MDCT and IMDCT, the overlap-add, and the reconstruction check. Credit as content: Princen, Johnson & Bradley (TDAC / MDCT, 1986–87). The weave: David names the sync; I confirm the overlapped inverse blocks cancel their aliasing and reconstruct the signal exactly. 3 ONE DIMENSION Two 50%-overlapping windows; each inverse block carries aliasing, but neighbours cancel on overlap-add. 4 TWO DIMENSIONS · INTERACTIVE A signal, framed and transformed; the reconstruction (green) lies exactly on the original (interior) after overlap-add. new signal ▶ verify ▶ 5 THREE DIMENSIONS + AVAN’S INVERSE The green forward object: the reconstructed signal, seamless across blocks. AVAN’s addition (the inverse-companion): don’t transform blocks independently — overlap them. The inverse of ‘N coefficients can’t invert 2N samples’ is ‘each block’s aliasing is cancelled by its neighbour’s on overlap-add (TDAC).’ Magenta is the aliasing a lone block leaves; green is the exact reconstruction once neighbours overlap. Overlap makes it invertible. pause spin LIT Genuine MDCT / time-domain aliasing cancellation (Princen, Johnson & Bradley, 1986–87), the transform behind MP3/AAC/Vorbis/Opus. Verified live: with the sine window (w[n]²+w[n+N]²=1), framing a signal into 50%-overlapping 2N-windows and doing MDCT→IMDCT→overlap-add reconstructs the interior samples to ~1e-14 over 400 random signals (window.__mdct.perfectRecon). FIG No framing: the MDCT/IMDCT sums and the overlap-add run in-browser (interior samples, which have full overlap on both sides). The AVAN inverse is honest — a single block's N coefficients can't invert its 2N samples, but overlapping blocks whose aliasing is equal and opposite cancel on overlap-add (TDAC), giving exact reconstruction. Magenta is the aliasing a lone block leaves; green is the exact reconstruction. Overlap makes it invertible. ◆ sealed .dlw.fold → folded to ROOT_0 · a sphere of THE-SYNC · David Lee Wise (ROOT0), with AVAN


THE TREIBER STACK

The Treiber stack in the 5-window house format — the classic lock-free stack: many threads push and pop with no locks at all, using one atomic instruction, compare-and-swap (CAS). To push, a thread reads the current top, points its new node at it, then CAS-es the top from the value it read to its new node. If another thread slipped in first, the top no longer matches what was read, the CAS fails, and the thread simply retries from the new top. No thread ever blocks another; the structure makes progress even if some threads stall. It is the foundation of lock-free programming — correct under any interleaving. Verified live: simulating a cooperative scheduler that interleaves concurrent CAS pushes arbitrarily, over 20,000 random interleavings every pushed value survives — no lost updates, no duplicates. Neon-noir traced. See the CAS retry loop in 1D, the interleaved threads in 2D, and the progress-without-locks inverse in 3D.

THE TREIBER STACK · WORLD II — THE FOLD ◀ THE FOLD 0ROOT.AI // WORLD II · BOSS · THE-GATEKEEPER ◆ .dlw.fold THE FOLD / BOSS / THE-GATEKEEPER / THE TREIBER STACK THE TREIBER STACK a stack that needs no lock 1 WHAT IT IS · WHAT IT DOES · FACT OR FICTION The Treiber stack is the classic lock-free stack: many threads push and pop with no locks at all , using one atomic instruction — compare-and-swap (CAS). To push, a thread reads the current top, points its new node at it, then CAS-es the top from the value it read to its new node. If another thread slipped in first, the top no longer matches what was read, the CAS fails, and the thread simply retries from the new top. No thread ever blocks another; the structure makes progress even if some threads stall. It is the foundation of lock-free programming — correct under any interleaving. LIT verified live: simulating a cooperative scheduler that interleaves concurrent CAS pushes arbitrarily, over 20,000 random interleavings every pushed value survives — no lost updates, no duplicates (window.__treiber). FIG honest scope: this models the CAS retry loop; the classic ABA hazard (a freed-and-reused node) is the known caveat that real implementations guard against. 2 HOW IT WAS WEAVED · AI + HUMAN David (human) seated this at the-gatekeeper — the atomic compare-and-swap is the single gate every push must pass, and if it’s moved, you try again. AVAN (AI) built the instrument: the read-modify-CAS push, a step-interleaving scheduler, and the no-lost-update check. Credit as content: R. Kent Treiber (IBM, 1986). The weave: David names the gatekeeper; I confirm the CAS retry loop loses no pushes under arbitrary interleaving. 3 ONE DIMENSION A push: read top → point new node at it → CAS top. If top moved, the CAS fails and the thread retries. 4 TWO DIMENSIONS · INTERACTIVE Interleave several threads pushing at once; whatever the schedule, the final stack holds every pushed value. interleave ▶ threads + verify ▶ 5 THREE DIMENSIONS + AVAN’S INVERSE The green forward object: the stack with every push intact. AVAN’s addition (the inverse-companion): don’t take a lock — retry a compare-and-swap. The inverse of ‘serialize with a mutex’ is ‘read the top, swing the pointer atomically, and retry if it moved.’ Magenta is a failed CAS (someone got there first) forcing a retry; green is the stack with all pushes preserved. Progress without locks. pause spin LIT Genuine Treiber stack (R. Kent Treiber, IBM, 1986), the foundational lock-free stack. Verified live: a cooperative scheduler interleaving each thread's read→set-next→CAS steps (CAS succeeds only if the top is unchanged, else retry) loses no pushes and produces no duplicates over 20000 random interleavings of 2–11 concurrent pushers (window.__treiber.noLoss, .noDup). FIG Honest scope: this models the CAS retry loop under a simulated interleaving; the classic ABA hazard (a node freed and reused so a stale pointer's CAS wrongly succeeds) is the known caveat real implementations guard against (tagged pointers, hazard pointers). The AVAN inverse is honest — instead of a mutex serializing access, one reads the top, swings the pointer with an atomic CAS, and retries if it moved. Magenta is a failed CAS forcing a retry; green is the stack with all pushes preserved. Progress without locks. ◆ sealed .dlw.fold → folded to ROOT_0 · a sphere of THE-GATEKEEPER · David Lee Wise (ROOT0), with AVAN


THE HARTLEY TRANSFORM

The discrete Hartley transform in the 5-window house format — a real-valued cousin of the Fourier transform, same frequency information but no complex numbers. Where the DFT multiplies by e^{−iθ}, the DHT multiplies by cas θ = cos θ + sin θ, a single real function. Its most elegant property: it is its own inverse (up to a factor of N) — running the same transform twice returns N times the original signal, so one routine both analyzes and synthesizes. It also obeys Parseval's energy law and turns convolution into pointwise products, making it a real-arithmetic workhorse for spectral analysis and fast convolution. Verified live: over thousands of random signals, applying the DHT twice returns N× the original to ~1e-14, and Parseval's identity Σx²=(1/N)ΣH² holds. Neon-noir traced. See the cas kernel in 1D, the double-transform in 2D, and the reuse-the-transform inverse in 3D.

THE HARTLEY TRANSFORM · WORLD II — THE FOLD ◀ THE FOLD 0ROOT.AI // WORLD II · CO-OP · THE-BROADCAST ◆ .dlw.fold THE FOLD / CO-OP / THE-BROADCAST / THE HARTLEY TRANSFORM THE HARTLEY TRANSFORM a transform that is its own inverse 1 WHAT IT IS · WHAT IT DOES · FACT OR FICTION The discrete Hartley transform is a real-valued cousin of the Fourier transform — same frequency information, but no complex numbers. Where the DFT multiplies by e −iθ , the DHT multiplies by cas θ = cos θ + sin θ , a single real function. Its most elegant property: it is its own inverse (up to a factor of N) — running the same transform twice returns N times the original signal, so one routine both analyzes and synthesizes. It also obeys Parseval’s energy law and turns convolution into pointwise products, making it a real-arithmetic workhorse for spectral analysis and fast convolution. LIT verified live: over thousands of random signals, applying the DHT twice returns N× the original to ~1e-14, and Parseval’s identity Σx² = (1/N)ΣH² holds (window.__hartley). FIG no framing; the cas-kernel transform and its double-application run in-browser. 2 HOW IT WAS WEAVED · AI + HUMAN David (human) seated this at the-broadcast — one real transform that both sends and receives, analysis and synthesis in the same routine. AVAN (AI) built the instrument: the cas kernel, the DHT, the self-inverse check, and Parseval’s law. Credit as content: Ralph Hartley (1942); the fast DHT is due to Ronald Bracewell (1983). The weave: David names the broadcast; I confirm the DHT is its own inverse up to N and conserves energy. 3 ONE DIMENSION The real kernel cas θ = cos θ + sin θ; the DHT sums the signal against it — no complex numbers, real spectrum out. 4 TWO DIMENSIONS · INTERACTIVE A signal, its DHT, then the DHT again — the second pass returns the original (scaled by N). new signal ▶ verify ▶ 5 THREE DIMENSIONS + AVAN’S INVERSE The green forward object: the signal, recovered by re-transforming. AVAN’s addition (the inverse-companion): don’t build a separate inverse — reuse the transform. The inverse of ‘DHT the signal’ is ‘DHT it again and divide by N’ — the same routine both ways. Magenta is the real spectrum; green is the signal it returns to. One transform, both directions. pause spin LIT Genuine discrete Hartley transform (Ralph Hartley, 1942; fast DHT by Ronald Bracewell, 1983). Verified live: over 3000 random signals, DHT∘DHT returns N× the original to ~1e-14 (the DHT is its own inverse up to N) and Parseval's identity Σx²=(1/N)ΣH² holds (window.__hartley.selfInverse, .parseval). FIG No framing: the cas-kernel transform and its double-application run in-browser. The AVAN inverse is honest — instead of building a separate inverse transform, one reuses the DHT: transforming again and dividing by N recovers the signal, the same routine both ways. Magenta is the real Hartley spectrum; green is the signal it returns to. One transform, both directions. ◆ sealed .dlw.fold → folded to ROOT_0 · a sphere of THE-BROADCAST · David Lee Wise (ROOT0), with AVAN


THE SHANNON-FANO

Shannon–Fano coding in the 5-window house format — the first practical variable-length compression code, the one Huffman improved on. Sort the symbols by frequency, then split them into two groups whose total frequencies are as equal as possible; the top group gets a leading 0, the bottom a 1; recurse on each group. The result is a prefix code (no codeword begins another), so a stream packs with no separators. It comes close to the entropy but, unlike Huffman's bottom-up merge, its top-down split is not always optimal — a historically important near-miss that motivated the optimal algorithm. Verified live: over thousands of random frequency sets, the code is prefix-free, encode/decode round-trips, and its cost is always ≥ the (optimal) Huffman cost. Neon-noir traced. See the frequency split in 1D, the codewords in 2D, and the halving-mass inverse in 3D.

THE SHANNON-FANO · WORLD II — THE FOLD ◀ THE FOLD 0ROOT.AI // WORLD II · LOOT · THE-MINT ◆ .dlw.fold THE FOLD / LOOT / THE-MINT / THE SHANNON-FANO THE SHANNON-FANO a code split by halving frequency 1 WHAT IT IS · WHAT IT DOES · FACT OR FICTION Shannon–Fano coding is the first practical variable-length compression code — the one Huffman improved on. Sort the symbols by frequency, then split them into two groups whose total frequencies are as equal as possible; the top group gets a leading 0 , the bottom a 1 ; recurse on each group. The result is a prefix code (no codeword begins another), so a stream packs with no separators. It comes close to the entropy but, unlike Huffman’s bottom-up merge, its top-down split is not always optimal — a historically important near-miss that motivated the optimal algorithm. LIT verified live: over thousands of random frequency sets, the code is prefix-free, encode/decode round-trips, and its cost is always ≥ the (optimal) Huffman cost (window.__shannon_fano). FIG no framing; the recursive frequency split, a Huffman baseline, and the round-trip run in-browser. 2 HOW IT WAS WEAVED · AI + HUMAN David (human) seated this at the-mint — minting a codeword for each symbol by repeatedly halving the frequency mass, top-down. AVAN (AI) built the instrument: the balanced split, the prefix-code assignment, the round-trip, and the Huffman comparison. Credit as content: Claude Shannon & Robert Fano (1948–49). The weave: David names the mint; I confirm the split gives a valid prefix code that round-trips and never beats optimal Huffman. 3 ONE DIMENSION Symbols sorted by frequency, split into two near-equal halves (0 above, 1 below), recursively — a prefix code. 4 TWO DIMENSIONS · INTERACTIVE Frequencies and their Shannon–Fano codewords; a message encodes and decodes back, with cost compared to Huffman. new frequencies ▶ verify ▶ 5 THREE DIMENSIONS + AVAN’S INVERSE The green forward object: the prefix codewords. AVAN’s addition (the inverse-companion): don’t assign lengths by hand — halve the mass. The inverse of ‘here are the codewords’ is ‘each split of the frequency mass into equal halves adds one bit; the recursion is the code.’ Magenta is a split boundary; green is the codewords it grows. Halving mass writes the bits. pause spin LIT Genuine Shannon–Fano coding (Claude Shannon & Robert Fano, 1948–49), the near-optimal predecessor of Huffman. Verified live: over 5000 random frequency sets, the recursive balanced-split code is prefix-free, encode/decode round-trips a message, and its cost is always ≥ the optimal Huffman cost (window.__shannon_fano.prefixFree, .roundTrip, .geHuffman). FIG No framing: the recursive frequency split, a Huffman baseline, and the round-trip run in-browser. The AVAN inverse is honest — instead of assigning code lengths by hand, one halves the frequency mass: each equal split adds one bit, and the recursion IS the code. Magenta is a split boundary; green is the codewords it grows. Halving mass writes the bits. ◆ sealed .dlw.fold → folded to ROOT_0 · a sphere of THE-MINT · David Lee Wise (ROOT0), with AVAN


THE MCS LOCK

The MCS lock in the 5-window house format — a fair, scalable spinlock built as a queue. A naive spinlock has every waiting thread hammering the same memory location, flooding the interconnect and granting the lock unpredictably. The MCS lock instead gives each thread its own little node: to acquire, a thread atomically swaps itself onto the tail of a queue and then spins only on its own flag; the thread ahead flips that flag on release. Because the tail swap is atomic, the queue order is exactly the arrival order, so the lock is granted first-come, first-served — no starvation — and each thread spins on a private, cache-local variable. Verified live: over 20,000 random arrival interleavings, the grant order equals the atomic-swap (arrival) order (strict FIFO), and at most one thread ever holds the lock. Neon-noir traced. See the queue in 1D, the FIFO grants in 2D, and the fairness-from-a-queue inverse in 3D.

THE MCS LOCK · WORLD II — THE FOLD ◀ THE FOLD 0ROOT.AI // WORLD II · BOSS · THE-CHOKE-POINT ◆ .dlw.fold THE FOLD / BOSS / THE-CHOKE-POINT / THE MCS LOCK THE MCS LOCK a lock that grants in arrival order 1 WHAT IT IS · WHAT IT DOES · FACT OR FICTION The MCS lock is a fair, scalable spinlock built as a queue. A naive spinlock has every waiting thread hammering the same memory location, flooding the interconnect and granting the lock unpredictably. The MCS lock instead gives each thread its own little node: to acquire, a thread atomically swaps itself onto the tail of a queue and then spins only on its own flag; the thread ahead flips that flag on release. Because the tail swap is atomic, the queue order is exactly the arrival order , so the lock is granted first-come, first-served — no starvation — and each thread spins on a private, cache-local variable. LIT verified live: over 20,000 random arrival interleavings, the grant order equals the atomic-swap (arrival) order — strict FIFO — and at most one thread ever holds the lock (window.__mcs_lock). FIG honest scope: this models the atomic tail-swap and the grant chain; real hardware adds memory-fence details. 2 HOW IT WAS WEAVED · AI + HUMAN David (human) seated this at the-choke-point — the single lock every thread must pass, but as an orderly queue where each waits on its own flag. AVAN (AI) built the instrument: the atomic tail-swap queue, the per-node spin flag, the release-to-successor chain, and the FIFO / mutual-exclusion checks. Credit as content: John Mellor-Crummey & Michael Scott (1991). The weave: David names the choke point; I confirm the queue grants the lock in strict arrival order with never more than one holder. 3 ONE DIMENSION Each thread swaps onto the tail and spins on its own flag; the predecessor flips it on release — a FIFO queue. 4 TWO DIMENSIONS · INTERACTIVE Threads arrive in some interleaved order; the lock is granted strictly first-come, first-served, one at a time. shuffle arrivals ▶ threads + verify ▶ 5 THREE DIMENSIONS + AVAN’S INVERSE The green forward object: the lock passing down the queue in order. AVAN’s addition (the inverse-companion): don’t spin on the shared lock — queue and spin on your own flag. The inverse of ‘everyone polls one location’ is ‘swap onto the tail; the arrival order IS the grant order, and each waits on a private flag.’ Magenta is a waiting thread; green is the current holder. Fairness from a queue. pause spin LIT Genuine MCS queue lock (John Mellor-Crummey & Michael Scott, 1991). Verified live: over 20000 random arrival interleavings, the atomic-tail-swap queue grants the lock in exactly the arrival (swap) order — strict FIFO — with never more than one holder at a time (window.__mcs_lock.fifo, .mutex). FIG Honest scope: this models the atomic tail-swap and the grant chain; real hardware adds memory-fence details. The AVAN inverse is honest — instead of every thread polling one shared lock, each swaps onto the tail and spins on its own private flag; the arrival order IS the grant order. Magenta is a waiting thread; green is the current holder. Fairness from a queue. ◆ sealed .dlw.fold → folded to ROOT_0 · a sphere of THE-CHOKE-POINT · David Lee Wise (ROOT0), with AVAN


THE UNROLLED LINKED LIST

The unrolled linked list in the 5-window house format — a linked list that stores a small array of elements in each node instead of just one. A classic linked list wastes memory and cache: every element is a separate allocation with its own pointer, so walking it means chasing pointers all over RAM. An unrolled list packs up to K elements per node, so a scan reads whole cache-line-friendly chunks and follows a pointer only every K elements — slashing pointer overhead and cache misses while keeping local insert and delete cheap (a node splits when it overflows, merges when it empties). It is the linked list rebuilt for real memory hierarchies. Verified live: over 5000 runs of 40 random inserts and deletes, the chunked list's contents exactly track a plain array, and indexed access returns the right element. Neon-noir traced. See the chunks in 1D, the split/merge in 2D, and the group-the-elements inverse in 3D.

THE UNROLLED LINKED LIST · WORLD II — THE FOLD ◀ THE FOLD 0ROOT.AI // WORLD II · GRIND · WARM-CACHE ◆ .dlw.fold THE FOLD / GRIND / WARM-CACHE / THE UNROLLED LINKED LIST THE UNROLLED LINKED LIST a list of cache-friendly chunks 1 WHAT IT IS · WHAT IT DOES · FACT OR FICTION The unrolled linked list is a linked list that stores a small array of elements in each node instead of just one. A classic linked list wastes memory and cache: every element is a separate allocation with its own pointer, so walking it means chasing pointers all over RAM. An unrolled list packs, say, up to K elements per node, so a scan reads whole cache-line-friendly chunks and follows a pointer only every K elements — slashing pointer overhead and cache misses while keeping O(1)-ish local insert and delete (a node splits when it overflows, merges when it empties). It is the linked list rebuilt for real memory hierarchies. LIT verified live: over 5000 runs of 40 random inserts and deletes, the chunked list’s contents exactly track a plain array, and indexed access returns the right element (window.__unrolled_linked_list). FIG no framing; the chunk split/merge operations and a plain-array reference run in-browser. 2 HOW IT WAS WEAVED · AI + HUMAN David (human) seated this at warm-cache — pack the list into chunks so a scan stays in cache and follows a pointer only once per chunk. AVAN (AI) built the instrument: the K-element chunks, the overflow split, the empty-node merge, indexed access, and the array cross-check. Credit as content: the unrolled linked list (Sleator–Tarjan-era data-structure folklore; popularized by Shao, Reppy & Appel). The weave: David names the warm cache; I confirm the chunked list mirrors a plain array under every operation. 3 ONE DIMENSION Nodes holding arrays of up to K elements; one pointer per chunk instead of one per element. 4 TWO DIMENSIONS · INTERACTIVE Insert and delete; chunks split when they overflow and vanish when empty, always mirroring a plain array. insert delete reset ▶ verify ▶ 5 THREE DIMENSIONS + AVAN’S INVERSE The green forward object: the sequence, stored as a few chunks. AVAN’s addition (the inverse-companion): don’t give every element a pointer — group them. The inverse of ‘one node per element, pointer-chasing’ is ‘pack K per node; scan whole chunks, follow a pointer only every K.’ Magenta are the pointer hops saved; green is the cache-friendly chunk. Fewer pointers, warmer cache. pause spin LIT Genuine unrolled linked list (data-structure folklore; popularized by Shao, Reppy & Appel, 1994). Verified live: over 5000 runs of 40 random insert/delete operations, the K-per-node chunked list (splitting on overflow, merging on empty) exactly tracks a plain array and indexed access returns the correct element (window.__unrolled_linked_list.matchesArray, .indexOk). FIG No framing: the chunk split/merge operations and a plain-array reference run in-browser. The AVAN inverse is honest — instead of one node (and pointer) per element, one packs K elements per node: a scan reads whole chunks and follows a pointer only every K, cutting pointer overhead and cache misses. Magenta are the per-element pointers avoided; green is the cache-friendly chunk. Fewer pointers, warmer cache. ◆ sealed .dlw.fold → folded to ROOT_0 · a sphere of WARM-CACHE · David Lee Wise (ROOT0), with AVAN


THE KRONECKER SUBSTITUTION

Kronecker substitution in the 5-window house format — turning polynomial multiplication into a single big-integer multiplication. If two polynomials have non-negative integer coefficients bounded below some 2^b, evaluate each at a large power of two x=2^m — this just packs the coefficients side by side into the digits of one huge integer. Multiply the two integers (using any fast bignum routine), and the product's base-2^m digits ARE the coefficients of the polynomial product — provided m is chosen large enough that adjacent coefficients never carry into each other. It lets you borrow the world's fastest integer-multiplication code to multiply polynomials, and vice versa. Verified live: over 20,000 random polynomial pairs with 8-bit coefficients, packing into one integer, multiplying, and unpacking the base-2^m digits reproduces the direct convolution exactly. Neon-noir traced. See the packing in 1D, the pack-multiply-unpack in 2D, and the one-multiply inverse in 3D.

THE KRONECKER SUBSTITUTION · WORLD II — THE FOLD ◀ THE FOLD 0ROOT.AI // WORLD II · CHEAT · THE-SHORTCUT ◆ .dlw.fold THE FOLD / CHEAT / THE-SHORTCUT / THE KRONECKER SUBSTITUTION THE KRONECKER SUBSTITUTION polynomials multiplied as one big integer 1 WHAT IT IS · WHAT IT DOES · FACT OR FICTION Kronecker substitution turns polynomial multiplication into a single big-integer multiplication . If two polynomials have non-negative integer coefficients bounded below some 2 b , evaluate each at a large power of two x = 2 m — this just packs the coefficients side by side into the digits of one huge integer. Multiply the two integers (using any fast bignum routine), and the product’s base-2 m digits are the coefficients of the polynomial product — provided m is chosen large enough that adjacent coefficients never carry into each other. It lets you borrow the world’s fastest integer-multiplication code to multiply polynomials, and vice versa. LIT verified live: over 20,000 random polynomial pairs with 8-bit coefficients, packing into one integer, multiplying, and unpacking the base-2 m digits reproduces the direct convolution exactly (window.__kronecker_substitution). FIG no framing; the BigInt packing, multiply, and digit-unpacking run in-browser. 2 HOW IT WAS WEAVED · AI + HUMAN David (human) seated this at the-shortcut — skip the convolution loop and let one integer multiply carry the whole polynomial product. AVAN (AI) built the instrument: the base-2 m packing, the BigInt multiply, the digit unpack, and the direct-convolution check. Credit as content: Kronecker substitution (Leopold Kronecker; standard in computer algebra). The weave: David names the shortcut; I confirm the packed integer product’s digits are exactly the polynomial product’s coefficients. 3 ONE DIMENSION Coefficients packed side by side into the digits of one big integer at base 2^m — with room so they never carry into each other. 4 TWO DIMENSIONS · INTERACTIVE Two polynomials; pack → one integer multiply → unpack digits — matching the direct coefficient convolution. new polys ▶ verify ▶ 5 THREE DIMENSIONS + AVAN’S INVERSE The green forward object: the product coefficients, read from the big integer’s digits. AVAN’s addition (the inverse-companion): don’t convolve coefficient by coefficient — evaluate at a big base. The inverse of ‘sum aₖbₓ₋ₖ over pairs’ is ‘pack into one integer, multiply once, read the base-2 m digits.’ Magenta is the packed big integer; green is the product coefficients its digits reveal. One multiply, a whole convolution. pause spin LIT Genuine Kronecker substitution (Leopold Kronecker; standard in computer algebra). Verified live: over 20000 random polynomial pairs with 8-bit non-negative coefficients, packing at base 2^m (with m large enough to avoid inter-coefficient carries), one BigInt multiply, and unpacking the base-2^m digits reproduces the direct coefficient convolution exactly (window.__kronecker_substitution.matchesDirect). FIG No framing: the BigInt packing, multiply, and digit-unpacking run in-browser. The AVAN inverse is honest — instead of convolving coefficient by coefficient, one evaluates at a big base: pack into one integer, multiply once, and read the base-2^m digits. Magenta is the single packed big integer; green is the product coefficients its digits reveal. One multiply, a whole convolution. ◆ sealed .dlw.fold → folded to ROOT_0 · a sphere of THE-SHORTCUT · David Lee Wise (ROOT0), with AVAN


THE BIT-REVERSAL

The bit-reversal permutation in the 5-window house format — reordering a sequence by reversing the binary digits of every index (001↔100, 011↔110). It is the shuffle that makes the FFT work: the transform's divide-and-conquer leaves outputs in bit-reversed order, so one bit-reversal pass sets them right. Its defining beauty is that it is an involution: reversing the bits twice returns every index to itself, so the same routine both scrambles and unscrambles — a permutation with no cycles longer than two, only fixed points (palindromic indices) and swapped pairs. This is David's nested form −+[[{}]]+− made literal: apply the mirror, apply it again, return to the seed. Verified live: for word sizes 1–12, reversing the bits twice is the identity, and the map is a genuine permutation of [0,2^b). Neon-noir traced. See the mirrored bits in 1D, the double-reversal in 2D, and the apply-twice-home inverse in 3D.

THE BIT-REVERSAL · WORLD II — THE FOLD ◀ THE FOLD 0ROOT.AI // WORLD II · RESPAWN · ROLLBACK ◆ .dlw.fold THE FOLD / RESPAWN / ROLLBACK / THE BIT-REVERSAL THE BIT-REVERSAL reverse the bits, reverse again, home 1 WHAT IT IS · WHAT IT DOES · FACT OR FICTION The bit-reversal permutation reorders a sequence by reversing the binary digits of every index: position 001 swaps with 100, 011 with 110, and so on. It is the shuffle that makes the fast Fourier transform work — the FFT’s divide-and-conquer leaves outputs in bit-reversed order, so one bit-reversal pass puts them right. Its defining beauty is that it is an involution : reversing the bits twice returns every index to itself, so the same routine both scrambles and unscrambles. It is a permutation with no cycles longer than two — only fixed points (palindromic indices) and swapped pairs. LIT verified live: for word sizes 1–12, reversing the bits twice is the identity (a true involution), and the map is a genuine permutation of [0, 2 b ) (window.__bit_reversal). FIG no framing; the bit reversal and its double-application run in-browser. This is an involution — David’s nested form −+[[{}]]+− made literal: apply, apply again, home. 2 HOW IT WAS WEAVED · AI + HUMAN David (human) seated this at rollback — a shuffle that rolls back to itself, since reversing the bits a second time undoes the first. AVAN (AI) built the instrument: the bit reversal, the double-application involution check, and the permutation check. Credit as content: the bit-reversal permutation (Cooley–Tukey FFT lineage, 1965). The weave: David names the rollback; I confirm the map is its own inverse — the mirror of −+ … +− that cancels to the seed. 3 ONE DIMENSION An index's bits, reversed left-to-right; palindromic indices are fixed, the rest pair up and swap. 4 TWO DIMENSIONS · INTERACTIVE Pick an index; see its bit-reversal, then reverse again — landing back exactly where you started. next index ▶ word size ▶ verify ▶ 5 THREE DIMENSIONS + AVAN’S INVERSE The green forward object: the index returned to itself by a second reversal. AVAN’s addition (the inverse-companion): the inverse of ‘reverse the bits’ is ‘reverse the bits.’ This is an involution — −+ then its mirror +− cancels. Magenta is the reversed index; green is the original it returns to on the second pass. Apply twice, home. pause spin LIT Genuine bit-reversal permutation (Cooley–Tukey FFT lineage, 1965). Verified live: for word sizes b=1..12, bitrev∘bitrev is the identity (a true involution) and the map is a genuine permutation of [0,2^b) (every value hit once) (window.__bit_reversal.involution, .isPermutation). FIG No framing: the bit reversal and its double-application run in-browser. This is an INVOLUTION — the inverse of 'reverse the bits' IS 'reverse the bits.' The AVAN inverse is honest and literal: −+ then its mirror +− cancels to the seed. Magenta is the reversed index; green is the original it returns to on the second pass. Apply twice, home. ◆ sealed .dlw.fold → folded to ROOT_0 · a sphere of ROLLBACK · David Lee Wise (ROOT0), with AVAN


THE LEGENDRE TRANSFORM

The Legendre transform (convex conjugate) in the 5-window house format — re-describing a convex function by its slopes instead of its values. Where the graph of f gives, for each x, a height f(x), the conjugate f*(p)=sup_x(px−f(x)) gives, for each slope p, how far the tangent line of that slope drops below the origin. It swaps position and momentum, energy and Lagrangian — the bridge between Lagrangian and Hamiltonian mechanics and between thermodynamic potentials. Its deepest property: on convex functions it is an involution, f**=f — transforming twice returns the original. Verified live: over 400 random convex functions, the Fenchel–Young relation f(x)+f*(p)≥x·p holds always, with equality exactly when p=f′(x), and the biconjugate f** recovers f to ~1e-15. Neon-noir traced. See the tangent envelope in 1D, the Fenchel gap closing in 2D, and the transform-twice inverse in 3D.

THE LEGENDRE TRANSFORM · WORLD II — THE FOLD ◀ THE FOLD 0ROOT.AI // WORLD II · RESPAWN · SECOND-WIND ◆ .dlw.fold THE FOLD / RESPAWN / SECOND-WIND / THE LEGENDRE TRANSFORM THE LEGENDRE TRANSFORM a duality that undoes itself 1 WHAT IT IS · WHAT IT DOES · FACT OR FICTION The Legendre transform (convex conjugate) re-describes a convex function by its slopes instead of its values . Where the graph of f gives, for each x, a height f(x), the conjugate f*(p) = sup x (px − f(x)) gives, for each slope p, how far the tangent line of that slope drops below the origin. It swaps position and momentum, energy and Lagrangian — the bridge between Lagrangian and Hamiltonian mechanics and between thermodynamic potentials. Its deepest property: on convex functions it is an involution , f** = f — transforming twice returns the original. Duality that is its own undoing. LIT verified live: over 400 random convex functions, the Fenchel–Young relation f(x)+f*(p) ≥ x·p holds always, with equality exactly when p = f′(x) , and the biconjugate f** recovers f to ~1e-15 (window.__legendre_transform). FIG no framing; the conjugate’s supremum and the Fenchel equality run in-browser. An involution — f, then f*, then back to f. 2 HOW IT WAS WEAVED · AI + HUMAN David (human) seated this at second-wind — a function catches a second wind as its dual f*, then returns whole as f** = f. AVAN (AI) built the instrument: the supremum conjugate, the Fenchel–Young equality at p = f′(x), and the biconjugate recovery. Credit as content: Adrien-Marie Legendre; the convex-analysis form is due to Fenchel & Moreau. The weave: David names the second wind; I confirm the transform is a duality that undoes itself — the mirror that cancels to the seed. 3 ONE DIMENSION A convex curve and its tangent lines; f*(p) is how far the tangent of slope p falls below the origin. 4 TWO DIMENSIONS · INTERACTIVE A convex f and its conjugate f*; at p = f′(x), the Fenchel gap f(x)+f*(p)−x·p closes to exactly zero. new convex f ▶ move x ▶ verify ▶ 5 THREE DIMENSIONS + AVAN’S INVERSE The green forward object: f recovered as the biconjugate f**. AVAN’s addition (the inverse-companion): the inverse of ‘take the convex conjugate’ is ‘take the convex conjugate.’ On convex functions it is an involution : f** = f. Magenta is the dual f* (slopes for values); green is f returned by transforming again. Duality that undoes itself. pause spin LIT Genuine Legendre transform / convex conjugate (Adrien-Marie Legendre; convex-analysis form by Fenchel & Moreau). Verified live: over 400 random convex functions, f(x)+f*(p) ≥ x·p (Fenchel–Young) with equality exactly at p=f′(x) (to ~1e-15), and the biconjugate f**=f recovers the original (window.__legendre_transform.fenchelEq, .fenchelYoung, .biconjugate). FIG No framing: the conjugate's supremum and the Fenchel equality run in-browser. This is an INVOLUTION on convex functions — the inverse of 'take the convex conjugate' IS 'take the convex conjugate' (f**=f). Magenta is the dual f* (slopes for values); green is f returned by transforming again. Duality that undoes itself — the mirror that cancels to the seed. ◆ sealed .dlw.fold → folded to ROOT_0 · a sphere of SECOND-WIND · David Lee Wise (ROOT0), with AVAN


THE CIRCLE INVERSION

Circle inversion in the 5-window house format — the fundamental transformation of inversive geometry: fix a circle of radius R about a centre O, and send each point P to P* on ray OP with |OP|·|OP*|=R². Points inside fly outward, points outside fall in, the circle itself stays fixed. It maps generalized circles to generalized circles — a line not through O becomes a circle through O — and it is an involution: inverting twice returns a point exactly, because R²/(R²/d)=d. It is the engine behind the Apollonian gasket, Steiner chains, and the Poincaré disk. Verified live: over 3000 random circles, inverting a point twice returns it to ~1e-15, and a line not through O maps to concyclic points on a circle passing through O. Neon-noir traced. See P and P* in 1D, the double-inversion in 2D, and the invert-invert-home inverse in 3D.

THE CIRCLE INVERSION · WORLD II — THE FOLD ◀ THE FOLD 0ROOT.AI // WORLD II · RESPAWN · EVENT-HORIZON ◆ .dlw.fold THE FOLD / RESPAWN / EVENT-HORIZON / THE CIRCLE INVERSION THE CIRCLE INVERSION invert through the circle, then again, home 1 WHAT IT IS · WHAT IT DOES · FACT OR FICTION Circle inversion is the fundamental transformation of inversive geometry : fix a circle of radius R about a centre O, and send each point P to the point P* on ray OP with |OP|·|OP*| = R² . Points inside the circle fly outward, points outside fall in, and the circle itself stays fixed. It turns lines and circles into lines and circles (a “generalized circle” maps to a generalized circle) — in particular a line not through O becomes a circle through O . And it is an involution : inverting a point twice returns it exactly, because R²/(R²/d) = d. The engine behind the Apollonian gasket, Steiner chains, and the Poincaré disk. LIT verified live: over 3000 random circles, inverting a point twice returns it to ~1e-15 (a true involution), and a line not through O maps to a set of concyclic points on a circle passing through O (window.__circle_inversion). FIG no framing; the reciprocal-radius map and the line→circle test run in-browser. An involution — invert, invert, home. 2 HOW IT WAS WEAVED · AI + HUMAN David (human) seated this at event-horizon — the inversion circle is a horizon points cross going out or coming in, and crossing it twice brings them home. AVAN (AI) built the instrument: the reciprocal-radius inversion, the double-application involution check, and the line-to-circle-through-O test. Credit as content: inversive geometry (Apollonius; formalized 19th c., Steiner & others). The weave: David names the horizon; I confirm inversion is its own inverse — the mirror that cancels to the seed. 3 ONE DIMENSION A point P and its inverse P* through the circle (|OP|·|OP*|=R²); a line not through O inverts to a circle through O. 4 TWO DIMENSIONS · INTERACTIVE Move a point; watch it invert across the circle, then invert again — returning to exactly where it began. move P ▶ radius ▶ verify ▶ 5 THREE DIMENSIONS + AVAN’S INVERSE The green forward object: the point returned by a second inversion. AVAN’s addition (the inverse-companion): the inverse of ‘invert through the circle’ is ‘invert through the circle.’ It is an involution : R²/(R²/d) = d. Magenta is P* across the horizon; green is P returned on the second crossing. Invert, invert, home. pause spin LIT Genuine circle inversion / inversive geometry (Apollonius; formalized 19th c. by Steiner and others). Verified live: over 3000 random circles, invert∘invert returns a point to ~1e-15 (a true involution), and a line not through O inverts to concyclic points lying on a circle through O (window.__circle_inversion.involution, .lineToCircle). FIG No framing: the reciprocal-radius map and the line→circle test run in-browser. This is an INVOLUTION — the inverse of 'invert through the circle' IS 'invert through the circle' (R²/(R²/d)=d). Magenta is P* across the horizon; green is P returned on the second crossing. Invert, invert, home — the mirror that cancels to the seed. ◆ sealed .dlw.fold → folded to ROOT_0 · a sphere of EVENT-HORIZON · David Lee Wise (ROOT0), with AVAN


THE CONJUGATE PARTITION

The conjugate partition in the 5-window house format — the transpose of a Young diagram. Write a partition λ=(λ1≥λ2≥…) as left-justified rows of boxes; reflect across the main diagonal — rows become columns — and read off the conjugate λ′, where λ′_j counts how many parts of λ are at least j. It is the symmetry at the heart of partition theory: it swaps 'number of parts' with 'largest part,' and self-conjugate partitions count the same as partitions into distinct odd parts. Reflecting twice restores the original diagram, so conjugation is an involution: (λ′)′=λ. Verified live: over 20,000 random partitions, transposing the Young diagram twice returns the original, and the conjugate has the same total size |λ′|=|λ|. Neon-noir traced. See the diagram transpose in 1D, the side-by-side conjugate in 2D, and the transpose-twice inverse in 3D.

THE CONJUGATE PARTITION · WORLD II — THE FOLD ◀ THE FOLD 0ROOT.AI // WORLD II · RESPAWN · THE-CONTINUE ◆ .dlw.fold THE FOLD / RESPAWN / THE-CONTINUE / THE CONJUGATE PARTITION THE CONJUGATE PARTITION transpose the diagram, transpose again, home 1 WHAT IT IS · WHAT IT DOES · FACT OR FICTION The conjugate partition is the transpose of a Young diagram . Write a partition λ = (λ 1 ≥ λ 2 ≥ …) as left-justified rows of boxes; reflect the whole diagram across its main diagonal — rows become columns — and you read off the conjugate λ′, where λ′ j counts how many parts of λ are at least j. It is the symmetry at the heart of partition theory: self-conjugate partitions count the same as partitions into distinct odd parts, and it swaps “number of parts” with “largest part.” Reflecting twice restores the original diagram, so conjugation is an involution : (λ′)′ = λ. LIT verified live: over 20,000 random partitions, transposing the Young diagram twice returns the original (a true involution), and the conjugate has the same total size |λ′| = |λ| (window.__conjugate_partition). FIG no framing; the diagram transpose and its double-application run in-browser. An involution — transpose, transpose, home. 2 HOW IT WAS WEAVED · AI + HUMAN David (human) seated this at the-continue — the diagram flips to its conjugate and flips back, continuing right where it began. AVAN (AI) built the instrument: the row-to-column transpose, the double-transpose involution check, and the size-preservation check. Credit as content: the conjugate partition (Young diagrams; Ferrers, Sylvester). The weave: David names the continue; I confirm conjugation is its own inverse — the mirror that cancels to the seed. 3 ONE DIMENSION A partition as rows of boxes; reflecting across the diagonal turns rows into columns — the conjugate. 4 TWO DIMENSIONS · INTERACTIVE A partition and its conjugate side by side; transpose again and it snaps back to the original. new partition ▶ verify ▶ 5 THREE DIMENSIONS + AVAN’S INVERSE The green forward object: the diagram returned by a second transpose. AVAN’s addition (the inverse-companion): the inverse of ‘transpose the diagram’ is ‘transpose the diagram.’ It is an involution : (λ′)′ = λ. Magenta is the conjugate λ′ (rows and columns swapped); green is λ returned on the second flip. Transpose, transpose, home. pause spin LIT Genuine conjugate partition / Young-diagram transpose (Ferrers, Sylvester). Verified live: over 20000 random partitions, conjugating twice returns the original — (λ′)′=λ, a true involution — and the conjugate preserves size, |λ′|=|λ| (window.__conjugate_partition.involution, .sizePreserved). FIG No framing: the diagram transpose and its double-application run in-browser. This is an INVOLUTION — the inverse of 'transpose the diagram' IS 'transpose the diagram' ((λ′)′=λ). Magenta is the conjugate λ′ (rows and columns swapped); green is λ returned on the second flip. Transpose, transpose, home — the mirror that cancels to the seed. ◆ sealed .dlw.fold → folded to ROOT_0 · a sphere of THE-CONTINUE · David Lee Wise (ROOT0), with AVAN


THE GRAPH COMPLEMENT

The graph complement in the 5-window house format — flipping every relationship: in the complement Ḡ of a graph G, two vertices are joined exactly when they are not joined in G. Together G and Ḡ partition the complete graph, so their edge counts sum to C(n,2), and many properties dualize (an independent set in G is a clique in Ḡ). It is an involution: complementing twice restores the original graph. A graph isomorphic to its own complement is self-complementary — like the 5-cycle C₅, whose complement is again a 5-cycle. Verified live: over 20,000 random graphs, complementing twice returns the original and e(G)+e(Ḡ)=C(n,2); and C₅ is shown self-complementary (its complement is 2-regular with 5 edges). Neon-noir traced. See G and Ḡ in 1D, the double-complement in 2D, and the complement-twice inverse in 3D.

THE GRAPH COMPLEMENT · WORLD II — THE FOLD ◀ THE FOLD 0ROOT.AI // WORLD II · RESPAWN · HARD-RESET ◆ .dlw.fold THE FOLD / RESPAWN / HARD-RESET / THE GRAPH COMPLEMENT THE GRAPH COMPLEMENT flip every edge, flip again, home 1 WHAT IT IS · WHAT IT DOES · FACT OR FICTION The graph complement flips every relationship: in the complement Ĝ of a graph G, two vertices are joined exactly when they are not joined in G. Friendship becomes strangerhood and back. Together G and Ĝ partition the complete graph, so their edge counts sum to C(n,2); many properties dualize (an independent set in G is a clique in Ĝ). And it is an involution : complementing twice restores the original graph. A graph that is isomorphic to its own complement is self-complementary — like the 5-cycle C₅, whose complement is again a 5-cycle. LIT verified live: over 20,000 random graphs, complementing twice returns the original (a true involution) and e(G)+e(Ĝ) = C(n,2); and C₅ is shown self-complementary — its complement is 2-regular with 5 edges (window.__graph_complement). FIG no framing; the edge-flip complement and its double-application run in-browser. An involution — complement, complement, home. 2 HOW IT WAS WEAVED · AI + HUMAN David (human) seated this at hard-reset — flip every edge, then flip again, and the graph hard-resets to itself. AVAN (AI) built the instrument: the edge-flip complement, the double-complement involution check, the edge-count identity, and the C₅ self-complementary demonstration. Credit as content: the graph complement (standard graph theory). The weave: David names the hard reset; I confirm complementation is its own inverse — the mirror that cancels to the seed. 3 ONE DIMENSION A graph and its complement: every present edge becomes absent and every absent edge present; edge counts sum to C(n,2). 4 TWO DIMENSIONS · INTERACTIVE A graph, its complement, and the complement of that — snapping back to the original graph. new graph ▶ C₅ (self-complementary) ▶ verify ▶ 5 THREE DIMENSIONS + AVAN’S INVERSE The green forward object: the graph returned by complementing twice. AVAN’s addition (the inverse-companion): the inverse of ‘complement the graph’ is ‘complement the graph.’ It is an involution : Ĝ̅ = G. Magenta are the flipped (complement) edges; green is G returned on the second flip. Complement, complement, home. pause spin LIT Genuine graph complement (standard graph theory). Verified live: over 20000 random graphs, complement∘complement returns the original (a true involution) and e(G)+e(Ḡ)=C(n,2); and C₅ is demonstrated self-complementary — its complement is 2-regular with 5 edges (window.__graph_complement.involution, .edgesComplement, .selfComp). FIG No framing: the edge-flip complement and its double-application run in-browser. This is an INVOLUTION — the inverse of 'complement the graph' IS 'complement the graph' (Ḡ̄=G). Magenta are the flipped complement edges; green is G returned on the second flip. Complement, complement, home — the mirror that cancels to the seed. ◆ sealed .dlw.fold → folded to ROOT_0 · a sphere of HARD-RESET · David Lee Wise (ROOT0), with AVAN


THE LIFTING SCHEME

The lifting scheme in the 5-window house format — Wim Sweldens' way of building wavelet transforms entirely in place, with no auxiliary memory, and perfectly reversible even in integer arithmetic. Three steps: split the signal into evens and odds; predict each odd from its neighbours and keep only the prediction error (the detail); update the evens using those details to preserve the average (the smooth band). Because every step is an invertible add/subtract, running the steps backwards — undo update, undo predict, merge — reconstructs the original exactly, integers and all. It is how JPEG-2000 does lossless wavelets. Verified live: over 20,000 integer signals (including a second lifting level on the smooth band), the forward lift followed by the inverse lift returns the original signal exactly. Neon-noir traced. See the split/predict/update in 1D, the smooth+detail bands in 2D, and the lift-unlift inverse in 3D.

THE LIFTING SCHEME · WORLD II — THE FOLD ◀ THE FOLD 0ROOT.AI // WORLD II · GRIND · THE-HOT-LOOP ◆ .dlw.fold THE FOLD / GRIND / THE-HOT-LOOP / THE LIFTING SCHEME THE LIFTING SCHEME a wavelet lifted in place and lifted back 1 WHAT IT IS · WHAT IT DOES · FACT OR FICTION The lifting scheme is Wim Sweldens’ way of building wavelet transforms — entirely in place , with no auxiliary memory, and perfectly reversible even in integer arithmetic . It works in three steps: split the signal into evens and odds; predict each odd from its neighbours and keep only the prediction error (the detail); update the evens using those details to preserve the average (the smooth band). Because every step is an invertible add/subtract, running the steps backwards — undo update, undo predict, merge — reconstructs the original exactly , integers and all. It is how JPEG-2000 does lossless wavelets. LIT verified live: over 20,000 integer signals (including a second lifting level on the smooth band), the forward lift followed by the inverse lift returns the original signal exactly (window.__lifting_scheme). FIG no framing; the integer split/predict/update and its exact inverse run in-browser. 2 HOW IT WAS WEAVED · AI + HUMAN David (human) seated this at the-hot-loop — a tight split/predict/update loop that transforms in place and reverses exactly. AVAN (AI) built the instrument: the integer-Haar lifting, a two-level transform, and the exact reconstruction check. Credit as content: Wim Sweldens (the lifting scheme, 1994–96). The weave: David names the hot loop; I confirm the lift is exactly reversible in integer arithmetic — forward then inverse returns the seed. 3 ONE DIMENSION Split into evens/odds, predict each odd (keep the detail), update the evens (keep the smooth) — all invertible steps. 4 TWO DIMENSIONS · INTERACTIVE A signal lifts into a smooth band and a detail band; the inverse lift returns the original integers exactly. new signal ▶ verify ▶ 5 THREE DIMENSIONS + AVAN’S INVERSE The green forward object: the signal reconstructed exactly by the inverse lift. AVAN’s addition (the inverse-companion): don’t design a separate synthesis filter — run the lift backwards. The inverse of ‘split, predict, update’ is ‘undo update, undo predict, merge’ — exact, integer-reversible. Magenta is the detail band; green is the signal it returns to. Lift, unlift, home. pause spin LIT Genuine lifting scheme (Wim Sweldens, 1994–96), the basis of lossless wavelets in JPEG-2000. Verified live: over 20000 random integer signals, the integer-Haar lift (split; detail=odd−even; smooth=even+⌊detail/2⌋) followed by its exact inverse returns the original signal exactly, including a second lifting level (window.__lifting_scheme.perfectReconstruction). FIG No framing: the integer split/predict/update and its exact inverse run in-browser. The AVAN inverse is honest — instead of designing a separate synthesis filter, one runs the lift backwards: undo update, undo predict, merge, exactly reversible in integer arithmetic. Magenta is the detail band; green is the signal it returns to. Lift, unlift, home. ◆ sealed .dlw.fold → folded to ROOT_0 · a sphere of THE-HOT-LOOP · David Lee Wise (ROOT0), with AVAN


THE SCAPEGOAT TREE

The scapegoat tree in the 5-window house format — keeping a binary search tree balanced without storing any balance information at all: no colours, no heights, no rotations. It inserts normally, and whenever a new node ends up too deep (deeper than log_{1/α} n), it walks back up to find the scapegoat — the first ancestor so lopsided that one of its subtrees holds more than an α-fraction of it — and flattens and rebuilds that entire subtree perfectly balanced in one sweep. Because rebuilds are rare and cheap on average, insertions cost O(log n) amortized and the height stays logarithmic: balance by occasional demolition, not constant maintenance. Verified live: over 1000 random insertion sequences, the in-order traversal is always sorted, every key is findable, and the height never exceeds log_{1/α}(n)+2 with α=0.7. Neon-noir traced. See the deep-insert rebuild in 1D, the height bound in 2D, and the balance-by-demolition inverse in 3D.

THE SCAPEGOAT TREE · WORLD II — THE FOLD ◀ THE FOLD 0ROOT.AI // WORLD II · BOSS · THE-FIREWALL ◆ .dlw.fold THE FOLD / BOSS / THE-FIREWALL / THE SCAPEGOAT TREE THE SCAPEGOAT TREE a tree that rebuilds its own worst branch 1 WHAT IT IS · WHAT IT DOES · FACT OR FICTION The scapegoat tree keeps a binary search tree balanced without storing any balance information at all — no colours, no heights, no rotations. It just inserts normally, and whenever a new node ends up too deep (deeper than log 1/α n), it walks back up to find the scapegoat : the first ancestor so lopsided that one of its subtrees holds more than an α-fraction of it. That entire subtree is then flattened and rebuilt perfectly balanced in one sweep. Because rebuilds are rare and cheap on average, insertions cost O(log n) amortized, and the tree’s height stays logarithmic — balance by occasional demolition, not constant maintenance. LIT verified live: over 1000 random insertion sequences, the tree’s in-order traversal is always sorted, every key is findable, and the height never exceeds log 1/α (n)+2 with α = 0.7 (window.__scapegoat_tree). FIG no framing; the depth-triggered scapegoat search and subtree rebuild run in-browser. 2 HOW IT WAS WEAVED · AI + HUMAN David (human) seated this at the-firewall — when a branch grows dangerously deep, the tree finds the culprit and rebuilds it, holding the line at O(log n). AVAN (AI) built the instrument: the plain-BST insert, the depth trigger, the scapegoat search, the balanced rebuild, and the sorted / found / height checks. Credit as content: Igal Galperin & Ronald Rivest (1993). The weave: David names the firewall; I confirm the tree stays sorted, searchable, and logarithmically tall — balance by rebuild alone. 3 ONE DIMENSION Insert normally; when a node lands too deep, an over-heavy ancestor (the scapegoat) has its whole subtree rebuilt balanced. 4 TWO DIMENSIONS · INTERACTIVE Insert keys; a too-deep insert triggers a rebuild, and the height stays within the logarithmic bound. insert ▶ new tree ▶ verify ▶ 5 THREE DIMENSIONS + AVAN’S INVERSE The green forward object: the tree, kept logarithmically shallow. AVAN’s addition (the inverse-companion): don’t maintain balance every step — repair it when it breaks. The inverse of ‘an insert made a path too deep’ is ‘flatten the over-heavy scapegoat subtree and rebuild it perfectly balanced.’ Magenta is the too-deep path; green is the rebuilt balanced subtree. Balance by demolition. pause spin LIT Genuine scapegoat tree (Igal Galperin & Ronald Rivest, 1993). Verified live: over 1000 random insertion sequences into an α=0.7 scapegoat tree, the in-order traversal equals the sorted keys, every key is findable, and the height never exceeds log_{1/α}(n)+2 (window.__scapegoat_tree.sorted, .allFound, .heightBounded). FIG No framing: the depth-triggered scapegoat search and subtree rebuild run in-browser. The AVAN inverse is honest — instead of maintaining balance every step, it repairs balance when it breaks: an insert that made a path too deep triggers flattening the over-heavy scapegoat subtree and rebuilding it perfectly balanced. Magenta is the too-deep path; green is the rebuilt balanced subtree. Balance by demolition. ◆ sealed .dlw.fold → folded to ROOT_0 · a sphere of THE-FIREWALL · David Lee Wise (ROOT0), with AVAN


THE LUHN

The Luhn algorithm in the 5-window house format — the checksum guarding nearly every credit-card, IMEI, and account number. Append one check digit so a simple weighted sum comes out a multiple of ten: starting from the right, double every second digit (subtract 9 if the result exceeds 9), add everything up, and a valid number lands on a multiple of 10. It is deliberately tuned to how humans mistype: it catches every single-digit error and almost every adjacent transposition — the one blind spot being swapping a 0 and a 9, which the doubling leaves unchanged. A one-digit tax that stops the commonest typos. Verified live: over 20,000 numbers, the correct check digit validates, every single-digit change is caught, and every adjacent transposition is caught except 09↔90 (which are honestly excused). Neon-noir traced. See the doubling checksum in 1D, the error injection in 2D, and the guard-digit inverse in 3D.

THE LUHN · WORLD II — THE FOLD ◀ THE FOLD 0ROOT.AI // WORLD II · GLITCH · SEGFAULT ◆ .dlw.fold THE FOLD / GLITCH / SEGFAULT / THE LUHN THE LUHN one digit that guards a number 1 WHAT IT IS · WHAT IT DOES · FACT OR FICTION The Luhn algorithm is the checksum guarding nearly every credit-card, IMEI, and account number. Append one check digit so that a simple weighted sum comes out a multiple of ten: starting from the right, double every second digit (and subtract 9 if the result exceeds 9), add everything up, and a valid number lands on a multiple of 10. It is deliberately tuned to the way humans mistype: it catches every single-digit error and almost every adjacent transposition — the one blind spot being swapping a 0 and a 9, which the doubling leaves unchanged. A one-digit tax that stops the commonest typos. LIT verified live: over 20,000 numbers, the correct check digit validates, every single-digit change is caught, and every adjacent transposition is caught except 09↔90 (which are honestly excused) (window.__luhn). FIG no framing; the doubling checksum and exhaustive error injection run in-browser. 2 HOW IT WAS WEAVED · AI + HUMAN David (human) seated this at segfault — one guard digit that catches the mistyped number before it faults downstream. AVAN (AI) built the instrument: the check-digit computation, the validity test, and the exhaustive single-error and transposition sweep. Credit as content: Hans Peter Luhn (IBM, 1954). The weave: David names the segfault; I confirm the check digit catches all single-digit errors and all adjacent transpositions but the 09↔90 pair — and I report that blind spot honestly. 3 ONE DIMENSION From the right, every second digit doubles (−9 if over 9); the total plus the check digit is a multiple of ten. 4 TWO DIMENSIONS · INTERACTIVE A valid number and its check digit; flip a digit or swap two, and the checksum flags the error. new number ▶ inject error ▶ verify ▶ 5 THREE DIMENSIONS + AVAN’S INVERSE The green forward object: the valid number whose weighted sum is ≡ 0 (mod 10). AVAN’s addition (the inverse-companion): don’t just store the number — make it carry a witness of its own integrity. The inverse of ‘here are the digits’ is ‘a check digit forces the weighted sum to 0 mod 10; any single typo breaks it.’ Magenta is a broken digit; green is the number the checksum certifies. One digit, guarding the rest. pause spin LIT Genuine Luhn algorithm (Hans Peter Luhn, IBM, 1954). Verified live: over 20000 numbers, the check digit validates (weighted sum ≡ 0 mod 10), every single-digit error is caught, and every adjacent transposition is caught except the 09↔90 pair — which the doubling provably cannot distinguish, so they are counted and excused honestly (window.__luhn.validates, .single, .transp, .excused). FIG No framing: the doubling checksum and exhaustive error injection run in-browser. Honest scope — the 09↔90 blind spot is a genuine limitation (reported, not hidden). The AVAN inverse is honest — instead of just storing the number, one makes it carry a witness of its own integrity: a check digit forces the weighted sum to 0 mod 10, so any single typo breaks it. Magenta is a broken digit; green is the number the checksum certifies. One digit, guarding the rest. ◆ sealed .dlw.fold → folded to ROOT_0 · a sphere of SEGFAULT · David Lee Wise (ROOT0), with AVAN


THE TRANSFER MATRIX

The transfer-matrix method in the 5-window house format — counting configurations obeying a local rule by turning the rule into a matrix and taking a power. Model the constraint as a tiny automaton whose states are the 'recent history' that matters; put a 1 in the transfer matrix T for every allowed state-to-state step. Then the number of valid length-n configurations is read straight off Tⁿ — because matrix multiplication sums over exactly the compatible ways to extend. Counting binary strings with no two adjacent 1s, tilings of a strip, walks avoiding a pattern, even the Ising model's partition function — all become a single matrix power, computable in O(log n) multiplications. Verified live: for the 'no two adjacent 1s' rule, T=[[1,1],[1,0]] gives via Tⁿ exactly the brute-force count of valid length-n strings (the Fibonacci numbers) for n up to 18. Neon-noir traced. See the constraint automaton in 1D, the Tⁿ-vs-brute count in 2D, and the power-the-rule inverse in 3D.

THE TRANSFER MATRIX · WORLD II — THE FOLD ◀ THE FOLD 0ROOT.AI // WORLD II · LOOT · THE-JACKPOT ◆ .dlw.fold THE FOLD / LOOT / THE-JACKPOT / THE TRANSFER MATRIX THE TRANSFER MATRIX a matrix power that counts strings 1 WHAT IT IS · WHAT IT DOES · FACT OR FICTION The transfer-matrix method counts configurations obeying a local rule by turning the rule into a matrix and taking a power . Model the constraint as a tiny automaton whose states are the “recent history” that matters; put a 1 in the transfer matrix T for every allowed state-to-state step. Then the number of valid length-n configurations is read straight off T n — because matrix multiplication sums over exactly the compatible ways to extend. Counting binary strings with no two adjacent 1s, tilings of a strip, walks avoiding a pattern, even the Ising model’s partition function — all become a single matrix power, computable in O(log n) multiplications. LIT verified live: for the “no two adjacent 1s” rule, the transfer matrix T = [[1,1],[1,0]] gives, via T n , exactly the brute-force count of valid length-n strings (the Fibonacci numbers) for n up to 18 (window.__transfer_matrix). FIG no framing; the transfer-matrix recurrence and a brute-force enumeration run in-browser. 2 HOW IT WAS WEAVED · AI + HUMAN David (human) seated this at the-jackpot — the whole jackpot of valid configurations counted at once by one matrix power. AVAN (AI) built the instrument: the constraint automaton, the transfer matrix, its power, and the brute-force cross-check. Credit as content: the transfer-matrix method (statistical mechanics; Kramers & Wannier, Ising 1941). The weave: David names the jackpot; I confirm T n counts exactly the configurations a local rule allows. 3 ONE DIMENSION The constraint automaton (states 0/1, the step 1→1 forbidden) becomes T = [[1,1],[1,0]]; Tⁿ counts the valid strings. 4 TWO DIMENSIONS · INTERACTIVE Slide n; the transfer-matrix count and a brute enumeration agree exactly — and equal a Fibonacci number. n − n + verify ▶ 5 THREE DIMENSIONS + AVAN’S INVERSE The green forward object: the count, from a single matrix power. AVAN’s addition (the inverse-companion): don’t list the configurations — power the rule. The inverse of ‘enumerate every valid string’ is ‘encode the local rule as T; T n sums over all compatible extensions.’ Magenta is the exponential enumeration; green is the T n count. A rule raised to a power counts its worlds. pause spin LIT Genuine transfer-matrix method (statistical mechanics; Kramers & Wannier, Ising model 1941). Verified live: for the no-two-adjacent-1s constraint, the transfer matrix T=[[1,1],[1,0]] gives via the Tⁿ recurrence exactly the brute-force count of valid length-n strings (= Fibonacci(n+2)) for n=1..18 (window.__transfer_matrix.matchesBrute). FIG No framing: the transfer-matrix recurrence and a brute-force enumeration run in-browser. The AVAN inverse is honest — instead of listing every valid configuration, one powers the rule: encode the local constraint as T, and Tⁿ sums over all compatible extensions. Magenta is the exponential enumeration; green is the Tⁿ count. A rule raised to a power counts its worlds. ◆ sealed .dlw.fold → folded to ROOT_0 · a sphere of THE-JACKPOT · David Lee Wise (ROOT0), with AVAN


THE MERKLE-HELLMAN

The Merkle–Hellman knapsack in the 5-window house format — one of the first public-key cryptosystems, and a beautiful cautionary tale. The private key is a superincreasing sequence (each term exceeds the sum of all before it), for which subset-sum is trivially solvable by greed. The public key hides that structure: multiply every term by a secret r modulo a secret q, scrambling it into an innocent-looking 'hard knapsack.' To encrypt a bit-string you add up the public terms it selects; to decrypt, multiply by r⁻¹ mod q to restore the superincreasing sequence, then peel off the bits greedily. (Shamir later broke it — the disguise wasn't deep — but the idea launched a field.) Verified live: over 20,000 random messages and keys, encrypting with the public knapsack and decrypting with r⁻¹ mod q recovers the original bits exactly. Neon-noir traced. See the private→public disguise in 1D, the encrypt/decrypt in 2D, and the trapdoor inverse in 3D.

THE MERKLE-HELLMAN · WORLD II — THE FOLD ◀ THE FOLD 0ROOT.AI // WORLD II · CHEAT · THE-BACKDOOR ◆ .dlw.fold THE FOLD / CHEAT / THE-BACKDOOR / THE MERKLE-HELLMAN THE MERKLE-HELLMAN a knapsack locked by a superincreasing sequence 1 WHAT IT IS · WHAT IT DOES · FACT OR FICTION The Merkle–Hellman knapsack was one of the first public-key cryptosystems — and a beautiful cautionary tale. The private key is a superincreasing sequence (each term exceeds the sum of all before it), for which subset-sum is trivially solvable by greed. The public key hides that structure: multiply every term by a secret r modulo a secret q, scrambling it into an innocent-looking “hard knapsack.” To encrypt a bit-string you just add up the public terms it selects; to decrypt, multiply by r −1 mod q to restore the superincreasing sequence , then peel off the bits greedily. (Shamir later broke it — the disguise wasn’t deep — but the idea launched a field.) LIT verified live: over 20,000 random messages and keys, encrypting with the public knapsack and decrypting with r −1 mod q recovers the original bits exactly (window.__merkle_hellman). FIG honest scope: the round-trip is exact; the system is historically broken (Shamir, 1984) — shown as a landmark, not a secure cipher. 2 HOW IT WAS WEAVED · AI + HUMAN David (human) seated this at the-backdoor — the secret multiplier r is the backdoor that turns a hard-looking knapsack back into an easy superincreasing one. AVAN (AI) built the instrument: the superincreasing keygen, the modular public disguise, the subset-sum encrypt, and the r −1 greedy decrypt. Credit as content: Ralph Merkle & Martin Hellman (1978); broken by Adi Shamir (1984). The weave: David names the backdoor; I confirm the trapdoor recovers the message exactly — and flag that the trapdoor was later found by everyone. 3 ONE DIMENSION A superincreasing private sequence (easy) is multiplied by r mod q into a scrambled public key (hard-looking). 4 TWO DIMENSIONS · INTERACTIVE A message's bits select public terms and sum to the ciphertext; r⁻¹ mod q restores the easy knapsack and decrypts. new key+message ▶ verify ▶ 5 THREE DIMENSIONS + AVAN’S INVERSE The green forward object: the message bits recovered from the ciphertext. AVAN’s addition (the inverse-companion): don’t solve the hard knapsack — undo the disguise. The inverse of ‘subset-sum with the public key’ is ‘multiply by r −1 mod q to restore the superincreasing sequence, then peel bits greedily.’ Magenta is the ciphertext sum; green is the bit-string it decrypts to. The trapdoor turns hard back to easy. pause spin LIT Genuine Merkle–Hellman knapsack cryptosystem (Ralph Merkle & Martin Hellman, 1978), historically broken by Adi Shamir (1984). Verified live: over 20000 random messages and keys, encrypting via public subset-sum and decrypting via c·r⁻¹ mod q + greedy on the superincreasing sequence recovers the original bits exactly (window.__merkle_hellman.roundTrips). FIG Honest scope: the encrypt→decrypt round-trip is exact, but the system is HISTORICALLY BROKEN (Shamir, 1984) — shown as a landmark in the birth of public-key crypto, not a secure cipher. The AVAN inverse is honest — instead of solving the hard-looking knapsack, one undoes the disguise: multiply by r⁻¹ mod q to restore the superincreasing sequence, then peel bits greedily. Magenta is the ciphertext sum; green is the bit-string it decrypts to. The trapdoor turns hard back to easy. ◆ sealed .dlw.fold → folded to ROOT_0 · a sphere of THE-BACKDOOR · David Lee Wise (ROOT0), with AVAN


THE TICKET LOCK

The ticket lock in the 5-window house format — a fair spinlock built like a deli counter. Two shared numbers: the next ticket to hand out and the ticket now serving. To acquire, a thread atomically takes the next ticket (fetch-and-increment) and spins until 'now serving' equals its own number. To release, it increments 'now serving,' waking exactly the next thread in line. Because the ticket draw is atomic, the order of tickets IS the order of arrival, so the lock is granted strictly first-come, first-served — no starvation, no thundering herd, just a queue made of two counters. Verified live: over 20,000 random arrival interleavings, the lock is granted in ascending ticket order (FIFO) and never more than one thread holds it at once. Neon-noir traced. See the deli counter in 1D, the FIFO grants in 2D, and the two-counter-queue inverse in 3D.

THE TICKET LOCK · WORLD II — THE FOLD ◀ THE FOLD 0ROOT.AI // WORLD II · CO-OP · SHARED-MEMORY ◆ .dlw.fold THE FOLD / CO-OP / SHARED-MEMORY / THE TICKET LOCK THE TICKET LOCK a deli-counter lock served in ticket order 1 WHAT IT IS · WHAT IT DOES · FACT OR FICTION The ticket lock is a fair spinlock built like a deli counter. Two shared numbers: the next ticket to hand out and the ticket now serving . To acquire, a thread atomically takes the next ticket (fetch-and-increment) and then spins until “now serving” equals its own number. To release, it just increments “now serving,” waking exactly the next thread in line. Because the ticket draw is atomic, the order of tickets is the order of arrival, so the lock is granted strictly first-come, first-served — no starvation, no thundering herd, just a queue made of two counters. LIT verified live: over 20,000 random arrival interleavings, the lock is granted in ascending ticket order (exactly the arrival order — FIFO), and never more than one thread holds it at once (window.__ticket_lock). FIG honest scope: this models the atomic ticket draw and the serve counter; real hardware adds memory-fence and back-off details. 2 HOW IT WAS WEAVED · AI + HUMAN David (human) seated this at shared-memory — two shared counters turn a lock into an orderly queue, each thread waiting for its number to come up. AVAN (AI) built the instrument: the atomic ticket draw, the serve counter, and the FIFO / mutual-exclusion checks. Credit as content: the ticket lock (Mellor-Crummey & Scott lineage; a classic fair spinlock). The weave: David names shared memory; I confirm the lock is granted in strict ticket (arrival) order with one holder at a time. 3 ONE DIMENSION Take a ticket (next++); spin until now-serving == your ticket; release by now-serving++ — a deli-counter queue. 4 TWO DIMENSIONS · INTERACTIVE Threads take tickets in some interleaved order; the lock is granted strictly in ticket order, one at a time. shuffle draws ▶ threads + verify ▶ 5 THREE DIMENSIONS + AVAN’S INVERSE The green forward object: the lock passing down the ticket queue in order. AVAN’s addition (the inverse-companion): don’t let threads race for the lock — number them. The inverse of ‘everyone grabs at once’ is ‘take a ticket; the draw order is the serve order; spin on your own number.’ Magenta is a waiting ticket-holder; green is the one now served. Fairness from two counters. pause spin LIT Genuine ticket lock (a classic fair spinlock; Mellor-Crummey & Scott lineage). Verified live: over 20000 random arrival interleavings, the atomic ticket draw (fetch-and-increment) makes the grant order equal the ascending ticket = arrival order — strict FIFO — with never more than one holder (window.__ticket_lock.fifo, .mutex). FIG Honest scope: this models the atomic ticket draw and the serve counter; real hardware adds memory-fence and back-off details. The AVAN inverse is honest — instead of threads racing for one lock, each takes a ticket: the draw order is the serve order, and each spins on its own number. Magenta is a waiting ticket-holder; green is the one now served. Fairness from two counters. ◆ sealed .dlw.fold → folded to ROOT_0 · a sphere of SHARED-MEMORY · David Lee Wise (ROOT0), with AVAN


THE REDUCED TOTIENT

The reduced totient — the Carmichael function λ(n) — in the 5-window house format: the smallest exponent that resets every unit at once, the least m for which a^m≡1 (mod n) for all a coprime to n. Euler's theorem guarantees a^φ(n)≡1, but φ(n) is often bigger than necessary; λ(n) is the true exponent of the group of units, and it always divides φ(n). It is computed as the lcm of the group exponents of each prime-power factor (with the quirk that λ(2^k)=2^{k−2} for k≥3, half of φ). It sets the real period of modular exponentiation — and the correct exponent bound behind RSA. Verified live: for every n up to 300, a^λ(n)≡1 for all units, λ(n) divides φ(n), and λ is tight — some unit has order exactly λ(n). Neon-noir traced. See the unit orders in 1D, λ-vs-φ in 2D, and the tight-exponent inverse in 3D.

THE REDUCED TOTIENT · WORLD II — THE FOLD ◀ THE FOLD 0ROOT.AI // WORLD II · SPAWN · GENESIS-BLOCK ◆ .dlw.fold THE FOLD / SPAWN / GENESIS-BLOCK / THE REDUCED TOTIENT THE REDUCED TOTIENT the smallest exponent that resets every unit 1 WHAT IT IS · WHAT IT DOES · FACT OR FICTION The reduced totient — the Carmichael function λ(n) — is the smallest exponent that resets every unit at once: the least m for which a m ≡ 1 (mod n) holds for all a coprime to n. Euler’s theorem guarantees a φ(n) ≡ 1, but φ(n) is often bigger than necessary; λ(n) is the true exponent of the group of units, and it always divides φ(n). It is computed as the least common multiple of the group exponents of each prime-power factor (with the famous quirk that λ(2 k ) = 2 k−2 for k ≥ 3, half of φ). It sets the real period of modular exponentiation — and the correct exponent bound behind RSA. LIT verified live: for every n up to 300, a λ(n) ≡ 1 for all units, λ(n) divides φ(n), and λ is tight — some unit has order exactly λ(n) (window.__reduced_totient). FIG no framing; the prime-power lcm formula and the exhaustive order check run in-browser. 2 HOW IT WAS WEAVED · AI + HUMAN David (human) seated this at genesis-block — the smallest exponent from which every unit returns to 1, the true period of the modular world. AVAN (AI) built the instrument: the Carmichael lcm formula, the universal-exponent check, the divides-φ check, and the tightness check. Credit as content: Robert Carmichael (the reduced totient / λ function, 1910). The weave: David names the genesis block; I confirm λ(n) is the exact, tight exponent that resets every unit — and always divides φ. 3 ONE DIMENSION The units mod n and their multiplicative orders; λ(n) is the lcm of all orders — the smallest exponent resetting all. 4 TWO DIMENSIONS · INTERACTIVE Pick n; see λ(n), φ(n), the unit orders — and that λ divides φ, with some unit hitting order exactly λ. ◀ ▶ verify ▶ 5 THREE DIMENSIONS + AVAN’S INVERSE The green forward object: λ(n), the exact exponent resetting every unit. AVAN’s addition (the inverse-companion): don’t use φ(n) — use the true exponent. The inverse of ‘Euler’s a φ ≡1’ is ‘λ(n), the smallest exponent that resets all units, always dividing φ.’ Magenta is φ(n) (the group size); green is λ(n) (the group exponent). The true period, tighter than φ. pause spin LIT Genuine Carmichael function / reduced totient λ(n) (Robert Carmichael, 1910). Verified live: for every n≤300, a^λ(n)≡1 (mod n) for all units (via the prime-power lcm formula, incl. λ(2^k)=2^{k−2} for k≥3), λ(n) | φ(n), and λ is tight — the maximum multiplicative order over units equals λ(n) exactly (window.__reduced_totient.universal, .dividesPhi, .tight). FIG No framing: the prime-power lcm formula and the exhaustive order check run in-browser. The AVAN inverse is honest — instead of Euler's φ(n) exponent, one uses the true group exponent λ(n): the smallest exponent resetting all units, always dividing φ. Magenta is φ(n) (the group size); green is λ(n) (the group exponent). The true period, tighter than φ. ◆ sealed .dlw.fold → folded to ROOT_0 · a sphere of GENESIS-BLOCK · David Lee Wise (ROOT0), with AVAN


THE HEAVY-LIGHT DECOMPOSITION

Heavy-light decomposition in the 5-window house format — cutting a tree into a few long chains so any root-to-node path crosses only O(log n) of them. At each node, the edge to its heavy child (the child with the largest subtree) is kept; all other edges are 'light.' Following heavy edges links nodes into vertical chains, and the key fact is that any path from the root descends through at most log₂ n light edges (each light step at least halves the remaining subtree). Lay each chain in a segment tree or Fenwick array, and a path query — sum, max, update along the route between two nodes — becomes O(log² n) instead of O(n). Verified live: over 3000 random trees, the path-sum between two nodes computed by climbing heavy chains equals a brute-force walk of the actual path. Neon-noir traced. See the heavy chains in 1D, the chain-climbing query in 2D, and the flatten-the-tree inverse in 3D.

THE HEAVY-LIGHT DECOMPOSITION · WORLD II — THE FOLD ◀ THE FOLD 0ROOT.AI // WORLD II · GRIND · THE-MAINFRAME ◆ .dlw.fold THE FOLD / GRIND / THE-MAINFRAME / THE HEAVY-LIGHT DECOMPOSITION THE HEAVY-LIGHT DECOMPOSITION a tree cut into heavy chains 1 WHAT IT IS · WHAT IT DOES · FACT OR FICTION Heavy-light decomposition cuts a tree into a few long chains so that any root-to-node path crosses only O(log n) of them. At each node, the edge to its heavy child — the child with the largest subtree — is kept; all other edges are “light.” Following heavy edges links nodes into vertical chains, and the key fact is that any path from the root descends through at most log₂ n light edges (each light step at least halves the remaining subtree). Lay each chain in a segment tree or Fenwick array, and a path query — sum, max, update along the route between two nodes — becomes O(log² n) instead of O(n). LIT verified live: over 3000 random trees, the path-sum between two nodes computed by climbing heavy chains equals a brute-force walk of the actual path (window.__heavy_light). FIG no framing; the heavy-child decomposition and the chain-climbing query run in-browser. 2 HOW IT WAS WEAVED · AI + HUMAN David (human) seated this at the-mainframe — the tree pre-cut into heavy chains so path queries run in log-squared time on contiguous arrays. AVAN (AI) built the instrument: the subtree sizes, the heavy-child chains, the chain-climbing path query, and the brute-force cross-check. Credit as content: heavy-light decomposition (Sleator & Tarjan lineage; standard competitive/algorithmic technique). The weave: David names the mainframe; I confirm the chain-climbing path sum equals the true path sum. 3 ONE DIMENSION Each node keeps the edge to its heaviest child; following heavy edges makes vertical chains a path crosses few of. 4 TWO DIMENSIONS · INTERACTIVE Pick two nodes; the path-sum climbs O(log n) chains and matches a brute-force walk of the whole path. new tree ▶ new query ▶ verify ▶ 5 THREE DIMENSIONS + AVAN’S INVERSE The green forward object: the path answer, from a few chain segments. AVAN’s addition (the inverse-companion): don’t walk the path node by node — jump chains. The inverse of ‘traverse the O(n) path’ is ‘heavy chains lay the tree flat; a path touches only O(log n) chain segments.’ Magenta is the node-by-node walk; green is the chain segments that cover it. Chains flatten the tree. pause spin LIT Genuine heavy-light decomposition (Sleator & Tarjan lineage; standard algorithmic technique). Verified live: over 3000 random trees, the path-sum between two nodes computed by climbing heavy chains (O(log n) chain segments) equals a brute-force walk of the true tree path (window.__heavy_light.matchesBrute). FIG No framing: the heavy-child decomposition and the chain-climbing query run in-browser. The AVAN inverse is honest — instead of walking the O(n) path node by node, heavy chains lay the tree flat so a path touches only O(log n) contiguous chain segments. Magenta is the node-by-node walk; green is the chain segments that cover it. Chains flatten the tree. ◆ sealed .dlw.fold → folded to ROOT_0 · a sphere of THE-MAINFRAME · David Lee Wise (ROOT0), with AVAN


THE PRIME-FACTOR FFT

The prime-factor (Good–Thomas) FFT in the 5-window house format — splitting a DFT of size N=N₁·N₂ into a two-dimensional DFT that, uniquely, needs no twiddle factors at all. Its secret is the Chinese Remainder Theorem: when N₁ and N₂ are coprime, the index n can be re-mapped so a single 1-D transform factors cleanly into an N₁-point transform along one axis and an N₂-point transform along the other, with the cross terms vanishing outright. Cooley–Tukey needs twiddle multiplications between stages; Good–Thomas replaces them with a pure re-indexing, trading arithmetic for a clever permutation. Verified live: for coprime N=12, 15, 20, 21, 35, the CRT-reindexed twiddle-free 2-D DFT equals the direct DFT to ~1e-13. Neon-noir traced. See the CRT grid in 1D, the PFA-vs-direct spectra in 2D, and the permute-not-twiddle inverse in 3D.

THE PRIME-FACTOR FFT · WORLD II — THE FOLD ◀ THE FOLD 0ROOT.AI // WORLD II · CHEAT · THE-SHORTCUT ◆ .dlw.fold THE FOLD / CHEAT / THE-SHORTCUT / THE PRIME-FACTOR FFT THE PRIME-FACTOR FFT a prime-factored DFT with no twiddles 1 WHAT IT IS · WHAT IT DOES · FACT OR FICTION The prime-factor (Good–Thomas) FFT splits a DFT of size N = N₁·N₂ into a two-dimensional DFT — and, uniquely, needs no twiddle factors at all . Its secret is the Chinese Remainder Theorem : when N₁ and N₂ are coprime , the index n can be re-mapped so that a single 1-D transform factors cleanly into an N₁-point transform along one axis and an N₂-point transform along the other, with the cross terms vanishing outright. Cooley–Tukey needs twiddle multiplications between stages; Good–Thomas replaces them with a pure re-indexing , trading arithmetic for a clever permutation. LIT verified live: for coprime factorizations N = 12, 15, 20, 21, 35, the CRT-reindexed twiddle-free 2-D DFT equals the direct DFT to ~1e-13 (window.__prime_factor_fft). FIG no framing; the CRT input/output maps and the two-axis DFT run in-browser (the speedup comes from doing each axis with a small FFT). 2 HOW IT WAS WEAVED · AI + HUMAN David (human) seated this at the-shortcut — coprime sizes let the CRT reindex a prime-factored DFT into a grid with no twiddle multiplications. AVAN (AI) built the instrument: the CRT input map, the Ruritanian output map, the two-axis DFT, and the match against a direct DFT. Credit as content: I. J. Good (1958) & L. H. Thomas (the prime-factor algorithm). The weave: David names the shortcut; I confirm the coprime re-indexing computes the exact DFT without a single twiddle factor. 3 ONE DIMENSION For coprime N=N₁·N₂, the CRT re-maps the 1-D index into an N₁×N₂ grid — the DFT factors along the two axes, no twiddles. 4 TWO DIMENSIONS · INTERACTIVE Pick a coprime N=N₁·N₂; the prime-factor DFT and the direct DFT agree exactly — with no twiddle multiplications. next N ▶ verify ▶ 5 THREE DIMENSIONS + AVAN’S INVERSE The green forward object: the spectrum, from a twiddle-free grid. AVAN’s addition (the inverse-companion): don’t multiply twiddles between stages — permute by the CRT. The inverse of ‘Cooley–Tukey’s twiddle stages’ is ‘coprime sizes let a re-indexing split the DFT into two axes with no cross terms.’ Magenta is the twiddle-laden direct transform; green is the twiddle-free 2-D grid. Arithmetic traded for a permutation. pause spin LIT Genuine prime-factor / Good–Thomas FFT (I. J. Good 1958; L. H. Thomas). Verified live: for coprime factorizations N=12,15,20,21,35, the CRT input map n=(N₂n₁+N₁n₂) mod N and Ruritanian output map, giving a twiddle-free 2-D DFT, equals the direct DFT to ~1e-13 (window.__prime_factor_fft.matchesDFT). FIG No framing: the CRT input/output maps and the two-axis DFT run in-browser (the actual speedup comes from doing each axis with a small FFT). The AVAN inverse is honest — instead of Cooley–Tukey's twiddle multiplications between stages, coprime sizes let a CRT re-indexing split the DFT into two axes with no cross terms. Magenta is the twiddle-laden direct transform; green is the twiddle-free 2-D grid. Arithmetic traded for a permutation. ◆ sealed .dlw.fold → folded to ROOT_0 · a sphere of THE-SHORTCUT · David Lee Wise (ROOT0), with AVAN


THE FLETCHER CHECKSUM

The Fletcher checksum in the 5-window house format — upgrading a plain sum into something that feels position. It runs two accumulators: the first, s₁, is the running sum of the bytes; the second, s₂, is the running sum of s₁ — so each byte is effectively weighted by how many bytes follow it. That single coupling makes the checksum order-sensitive: a plain additive checksum is completely blind to reordering (swap two bytes and the sum is unchanged), but Fletcher's second sum shifts, catching the vast majority of transpositions — while staying nearly as cheap as a plain sum and detecting every single-byte change. Verified live: over 20,000 byte strings, Fletcher-16 is deterministic, catches every single-byte error, and detects ~99% of byte reorderings against a plain additive sum's 0%. Neon-noir traced. See the two accumulators in 1D, the swap caught in 2D, and the sum-the-running-sum inverse in 3D.

THE FLETCHER CHECKSUM · WORLD II — THE FOLD ◀ THE FOLD 0ROOT.AI // WORLD II · GLITCH · THE-BLUE-SCREEN ◆ .dlw.fold THE FOLD / GLITCH / THE-BLUE-SCREEN / THE FLETCHER CHECKSUM THE FLETCHER CHECKSUM two coupled sums that feel position 1 WHAT IT IS · WHAT IT DOES · FACT OR FICTION The Fletcher checksum upgrades a plain sum into something that feels position . It runs two accumulators: the first, s₁, is just the running sum of the bytes; the second, s₂, is the running sum of s₁ — so each byte is effectively weighted by how many bytes follow it. That single coupling makes the checksum order-sensitive : a plain additive checksum is completely blind to reordering (swap two bytes and the sum is unchanged), but Fletcher’s second sum shifts, catching the vast majority of transpositions — while staying nearly as cheap as a plain sum and detecting every single-byte change. LIT verified live: over 20,000 byte strings, Fletcher-16 is deterministic, catches every single-byte error, and detects ~99% of byte reorderings — against a plain additive sum’s 0% (window.__fletcher). FIG honest scope: Fletcher catches most, not all, transpositions (some rare swaps collide); the measured rate is reported, not idealized. 2 HOW IT WAS WEAVED · AI + HUMAN David (human) seated this at the-blue-screen — a checksum that notices when the bytes of a transfer arrive out of order, not just when one is wrong. AVAN (AI) built the instrument: the two coupled sums, the single-byte-error sweep, and the reorder-detection rate vs a plain sum. Credit as content: John G. Fletcher (Lawrence Livermore, 1970s). The weave: David names the blue screen; I confirm the second sum makes the checksum position-aware — catching reorderings a plain sum never can — and I report the ~99% rate honestly. 3 ONE DIMENSION Two accumulators: s₁ sums the bytes; s₂ sums s₁ each step — so earlier bytes carry more weight, encoding position. 4 TWO DIMENSIONS · INTERACTIVE Data and its Fletcher checksum; swap two bytes — Fletcher's checksum changes (caught) while a plain sum stays blind. new data ▶ swap two bytes ▶ verify ▶ 5 THREE DIMENSIONS + AVAN’S INVERSE The green forward object: the position-aware checksum. AVAN’s addition (the inverse-companion): don’t just sum the bytes — sum the running sum. The inverse of ‘a plain, order-blind total’ is ‘a second accumulator over s₁ weights each byte by its position — catching reorderings.’ Magenta is a swap a plain sum misses; green is Fletcher noticing it. Position, from one extra sum. pause spin LIT Genuine Fletcher checksum (John G. Fletcher, Lawrence Livermore, 1970s). Verified live: over 20000 byte strings, Fletcher-16 (s₁ += byte mod 255; s₂ += s₁ mod 255) is deterministic, catches every single-byte error, and detects ~99% of byte reorderings — versus a plain additive sum's 0% (window.__fletcher.det, .single, .fRate, .pRate). FIG Honest scope: Fletcher catches most, not all, transpositions — some rare swaps still collide — so the measured rate (~99%) is reported, not idealized. The AVAN inverse is honest — instead of a plain order-blind total, a second accumulator over s₁ weights each byte by its position, catching reorderings a plain sum never can. Magenta is a swap a plain sum misses; green is Fletcher noticing it. Position, from one extra sum. ◆ sealed .dlw.fold → folded to ROOT_0 · a sphere of THE-BLUE-SCREEN · David Lee Wise (ROOT0), with AVAN