THE CHAN'S ALGORITHM

Chan's algorithm in the 5-window house format — computing a convex hull in O(n log h) time, where h is the number of hull vertices, making it output-sensitive: fast when the hull is small even if the point set is huge. Its trick is a clever marriage. Guess a bound m on h; split the n points into groups of m and compute each group's hull with a quick Graham scan; then gift-wrap around the whole set, jumping between groups by binary-searching each mini-hull's tangent, so each wrap step costs only O((n/m) log m). If the wrap doesn't close within m steps, the guess was too small — double m and retry. The doubling makes the total cost dominated by the final, correct guess. Verified live: over 2000 random point sets, Chan's grouped-hull-plus-wrap-plus-doubling produces exactly the same convex hull as Andrew's monotone chain. Neon-noir traced. See the mini-hulls in 1D, the wrap-vs-reference in 2D, and the guess-wrap-double inverse in 3D.

THE CHAN'S ALGORITHM · WORLD II — THE FOLD ◀ THE FOLD 0ROOT.AI // WORLD II · BOSS · THE-GAUNTLET ◆ .dlw.fold THE FOLD / BOSS / THE-GAUNTLET / THE CHAN'S ALGORITHM THE CHAN'S ALGORITHM a hull wrapped over mini-hulls 1 WHAT IT IS · WHAT IT DOES · FACT OR FICTION Chan’s algorithm computes a convex hull in O(n log h) time — where h is the number of hull vertices — making it output-sensitive : fast when the hull is small even if the point set is huge. Its trick is a clever marriage. Guess a bound m on h; split the n points into groups of m and compute each group’s hull with a quick Graham scan; then gift-wrap around the whole set, but jump between groups by binary-searching each mini-hull’s tangent, so each wrap step costs only O((n/m) log m). If the wrap doesn’t close within m steps, the guess was too small — double m and retry . The doubling makes the total cost dominated by the final, correct guess. LIT verified live: over 2000 random point sets, Chan’s grouped-hull-plus-wrap-plus-doubling produces exactly the same convex hull as a reference (Andrew’s monotone chain) (window.__chan). FIG honest scope: verified in general position; the group tangents here use a linear scan (the true speedup comes from binary search on each mini-hull). 2 HOW IT WAS WEAVED · AI + HUMAN David (human) seated this at the-gauntlet — guess the hull size, wrap around mini-hulls, and double the guess until it closes. AVAN (AI) built the instrument: the grouped mini-hulls, the gift-wrap over their vertices, the doubling schedule, and the reference-hull check. Credit as content: Timothy Chan (1996). The weave: David names the gauntlet; I confirm the output-sensitive construction yields exactly the convex hull. 3 ONE DIMENSION Points split into groups; each group's mini-hull is computed; then a gift-wrap jumps between mini-hulls. 4 TWO DIMENSIONS · INTERACTIVE A point set; Chan's hull matches the reference — computed by wrapping over group mini-hulls with a doubling size guess. new points ▶ verify ▶ 5 THREE DIMENSIONS + AVAN’S INVERSE The green forward object: the convex hull, built output-sensitively. AVAN’s addition (the inverse-companion): don’t scan all points for each hull edge — wrap over mini-hulls. The inverse of ‘test every point’ is ‘group, hull each group, gift-wrap between mini-hulls, and double the size guess until it closes.’ Magenta are interior points; green is the hull. Guess, wrap, double. pause spin LIT Genuine Chan's algorithm for output-sensitive convex hull (Timothy Chan, 1996). Verified live: over 2000 random point sets, the grouped-mini-hull + gift-wrap + doubling-m construction produces exactly the reference hull (Andrew's monotone chain) (window.__chan.matchesReference). FIG Honest scope: verified in general position; the group tangents here use a linear scan (the true O(n log h) speedup comes from binary search on each mini-hull, and the doubling schedule). The AVAN inverse is honest — instead of testing every point for each hull edge, one groups the points, hulls each group, gift-wraps between mini-hulls, and doubles the size guess until it closes. Magenta are interior points; green is the hull. Guess, wrap, double. ◆ sealed .dlw.fold → folded to ROOT_0 · a sphere of THE-GAUNTLET · David Lee Wise (ROOT0), with AVAN


THE RICHARDSON EXTRAPOLATION

Richardson extrapolation in the 5-window house format — getting a high-accuracy answer out of a low-accuracy method by combining two runs at different step sizes. Many numerical estimates carry a leading error that shrinks like a power of the step h: a central-difference derivative D(h) is off by roughly c·h². Compute it again at half the step, D(h/2), off by c·h²/4, and form (4·D(h/2)−D(h))/3 — the c·h² terms cancel exactly, leaving an error of order h⁴. Repeat and you climb an accuracy ladder (this is how Romberg integration works). Two cheap estimates, one clever subtraction, and the dominant error vanishes. Verified live: over 2000 smooth functions, the Richardson-extrapolated derivative is closer to the true f′(x) than the plain central difference every time, with a median error ratio around 1e-5. Neon-noir traced. See the error orders in 1D, D-vs-Richardson in 2D, and the cancel-the-error inverse in 3D.

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

THE RICHARDSON EXTRAPOLATION · WORLD II — THE FOLD ◀ THE FOLD 0ROOT.AI // WORLD II · GRIND · THE-EPOCH ◆ .dlw.fold THE FOLD / GRIND / THE-EPOCH / THE RICHARDSON EXTRAPOLATION THE RICHARDSON EXTRAPOLATION two step sizes that cancel error 1 WHAT IT IS · WHAT IT DOES · FACT OR FICTION Richardson extrapolation is a way to get a high-accuracy answer out of a low-accuracy method — for free, by combining two runs at different step sizes. Many numerical estimates carry a leading error that shrinks like a power of the step h: a central-difference derivative D(h) is off by roughly c·h². Compute it again at half the step, D(h/2), off by c·(h/2)² = c·h²/4, and form (4·D(h/2) − D(h)) / 3 — the c·h² terms cancel exactly , leaving an error of order h⁴. Repeat and you climb an accuracy ladder (this is how Romberg integration works). Two cheap estimates, one clever subtraction, and the dominant error vanishes. LIT verified live: over 2000 smooth functions, the Richardson-extrapolated derivative is closer to the true f′(x) than the plain central difference every time , with a median error ratio around 1e-5 (window.__richardson). FIG no framing; the two difference quotients and the extrapolation run in-browser. 2 HOW IT WAS WEAVED · AI + HUMAN David (human) seated this at the-epoch — run the estimate at two step sizes and subtract so the leading error cancels, jumping an order of accuracy. AVAN (AI) built the instrument: the central differences at h and h/2, the (4D−D)/3 combination, and the error comparison to the analytic derivative. Credit as content: Lewis Fry Richardson (1911). The weave: David names the epoch; I confirm the extrapolation cancels the leading error and beats the plain difference every time. 3 ONE DIMENSION D(h) errs like h²; D(h/2) like h²/4; (4·D(h/2)−D(h))/3 cancels the h² term, leaving order h⁴. 4 TWO DIMENSIONS · INTERACTIVE Pick a step h; the plain difference sits noticeably off the true derivative, while the extrapolation lands almost exactly on it. new f ▶ change h ▶ verify ▶ 5 THREE DIMENSIONS + AVAN’S INVERSE The green forward object: the high-order estimate from two cheap ones. AVAN’s addition (the inverse-companion): don’t shrink h forever — cancel the error term. The inverse of ‘one difference quotient at step h’ is ‘combine two step sizes so the leading c·h² cancels, jumping to order h⁴.’ Magenta is the plain estimate’s error; green is the extrapolated, near-exact value. Two runs, one subtraction, higher order. pause spin LIT Genuine Richardson extrapolation (Lewis Fry Richardson, 1911). Verified live: over 2000 smooth random functions, R=(4·D(h/2)−D(h))/3 (canceling the O(h²) term of the central difference) is closer to the analytic f′(x) than D(h) every single time, with a median error ratio ~1e-5 — order h⁴ vs h² (window.__richardson.better, .med). FIG No framing: the two difference quotients and the extrapolation run in-browser. The AVAN inverse is honest — instead of shrinking h forever, one combines two step sizes so the leading c·h² error cancels, jumping to order h⁴. Magenta is the plain estimate's error; green is the extrapolated near-exact value. Two runs, one subtraction, higher order. ◆ sealed .dlw.fold → folded to ROOT_0 · a sphere of THE-EPOCH · David Lee Wise (ROOT0), with AVAN


THE SPLIT-RADIX FFT

The split-radix FFT in the 5-window house format — computing the DFT with the fewest arithmetic operations of any classic power-of-two algorithm. Radix-2 splits a size-N transform into two size-N/2; radix-4 into four size-N/4. Split-radix does something asymmetric and clever: it splits into one half-size transform on the even-indexed samples and two quarter-size transforms on the samples at indices ≡1 and ≡3 (mod 4). That L-shaped decomposition needs fewer twiddle-factor multiplications than either pure radix — for decades it held the record for lowest operation count — while still giving the exact same transform. Verified live: for sizes N=2 to 128, the split-radix recursion reproduces the direct DFT to ~1e-12 on random complex inputs. Neon-noir traced. See the L-shaped split in 1D, the spectrum-vs-direct in 2D, and the asymmetric-split inverse in 3D.

THE SPLIT-RADIX FFT · WORLD II — THE FOLD ◀ THE FOLD 0ROOT.AI // WORLD II · CHEAT · THE-SPEEDRUN ◆ .dlw.fold THE FOLD / CHEAT / THE-SPEEDRUN / THE SPLIT-RADIX FFT THE SPLIT-RADIX FFT an FFT with the fewest multiplies 1 WHAT IT IS · WHAT IT DOES · FACT OR FICTION The split-radix FFT computes the discrete Fourier transform with the fewest arithmetic operations of any classic power-of-two algorithm. Radix-2 splits a size-N transform into two size-N/2; radix-4 into four size-N/4. Split-radix does something asymmetric and clever: it splits into one half-size transform on the even -indexed samples and two quarter-size transforms on the samples at indices ≡ 1 and ≡ 3 (mod 4). That L-shaped decomposition needs fewer twiddle-factor multiplications than either pure radix — for decades it held the record for lowest operation count — while still giving the exact same transform. LIT verified live: for sizes N = 2 to 128, the split-radix recursion reproduces the direct DFT to ~1e-12 on random complex inputs (window.__split_radix). FIG no framing; the even/odd-1/odd-3 recursion and a direct DFT run in-browser (the win is operation count, shown structurally). 2 HOW IT WAS WEAVED · AI + HUMAN David (human) seated this at the-speedrun — the fewest multiplies of any power-of-two FFT, from an asymmetric even/odd split. AVAN (AI) built the instrument: the split-radix recursion (one even, two odd-index quarter transforms), the butterfly combine, and the direct-DFT check. Credit as content: Yavne (1968); Duhamel & Hollmann (1984). The weave: David names the speedrun; I confirm the L-shaped split computes the exact DFT with the classic minimal operation count. 3 ONE DIMENSION One half-size transform on the evens, two quarter-size on indices ≡1 and ≡3 (mod 4) — the L-shaped split. 4 TWO DIMENSIONS · INTERACTIVE A complex signal; the split-radix spectrum and the direct DFT agree exactly. new signal ▶ size ▶ verify ▶ 5 THREE DIMENSIONS + AVAN’S INVERSE The green forward object: the spectrum, from the minimal-op recursion. AVAN’s addition (the inverse-companion): don’t split symmetrically — split L-shaped. The inverse of ‘pure radix-2 or radix-4’ is ‘one even half-transform + two odd quarter-transforms, fewer twiddles.’ Magenta is the direct N² transform; green is the split-radix spectrum. Fewest multiplies, same answer. pause spin LIT Genuine split-radix FFT (Yavne 1968; Duhamel & Hollmann 1984), long the minimal-operation-count power-of-two FFT. Verified live: for N=2..128, the split-radix recursion (one even-index N/2 transform + two odd-index N/4 transforms, combined by butterflies) reproduces the direct DFT to ~1e-12 on random complex inputs (window.__split_radix.matchesDFT). FIG No framing: the even/odd-1/odd-3 recursion and a direct DFT run in-browser (the win is operation count, shown structurally). The AVAN inverse is honest — instead of a symmetric radix-2 or radix-4 split, one splits L-shaped: one even half-transform plus two odd quarter-transforms, fewer twiddles. Magenta is the direct N² transform; green is the split-radix spectrum. Fewest multiplies, same answer. ◆ sealed .dlw.fold → folded to ROOT_0 · a sphere of THE-SPEEDRUN · David Lee Wise (ROOT0), with AVAN


THE MENAGE PROBLEM

The ménage problem in the 5-window house format — in how many ways can n couples be seated around a round table, men and women alternating, so that no one sits next to their own partner? Fix the men in alternate seats; the question becomes counting permutations σ of the women with σ(i)≠i and σ(i)≠i+1 (mod n) — each woman avoids the two men flanking her partner's original spot. Touchard gave a closed form as an alternating sum of binomials, A_n = Σ_k (−1)^k (2n/(2n−k)) C(2n−k, k) (n−k)!. The sequence 1, 0, 0, 1, 2, 13, 80, 579… is a classic of combinatorics. Verified live: for n=3 to 7, the Touchard closed-form ménage number equals a brute-force count of all valid seatings. Neon-noir traced. See the forbidden diagonals in 1D, closed-form-vs-brute in 2D, and the inclusion-exclusion inverse in 3D.

THE MENAGE PROBLEM · WORLD II — THE FOLD ◀ THE FOLD 0ROOT.AI // WORLD II · LOOT · THE-JACKPOT ◆ .dlw.fold THE FOLD / LOOT / THE-JACKPOT / THE MENAGE PROBLEM THE MENAGE PROBLEM couples seated so none sits by a partner 1 WHAT IT IS · WHAT IT DOES · FACT OR FICTION The ménage problem asks: in how many ways can n couples be seated around a round table, men and women alternating , so that no one sits next to their own partner ? Fix the men in alternate seats; the question becomes counting permutations σ of the women with σ(i) ≠ i and σ(i) ≠ i+1 (mod n) — each woman avoids the two men flanking her partner’s original spot. Touchard gave a closed form as an alternating sum of binomials, A n = Σ k (−1) k (2n/(2n−k)) C(2n−k, k) (n−k)!. The sequence 1, 0, 0, 1, 2, 13, 80, 579… is a classic of combinatorics. LIT verified live: for n = 3 to 7, the Touchard closed-form ménage number equals a brute-force count of all valid seatings (window.__menage). FIG no framing; the closed-form formula and the exhaustive enumeration run in-browser. 2 HOW IT WAS WEAVED · AI + HUMAN David (human) seated this at the-jackpot — the whole jackpot of valid seatings, counted at once by an alternating-sum formula. AVAN (AI) built the instrument: the Touchard closed form, the brute enumeration of forbidden-adjacency permutations, and their match. Credit as content: Édouard Lucas (posed, 1891); Jacques Touchard (closed form, 1934). The weave: David names the jackpot; I confirm the closed form equals the exact count of alternating no-partner-adjacent seatings. 3 ONE DIMENSION Men fixed in alternate seats; each woman must avoid the two men flanking her partner — the forbidden diagonals. 4 TWO DIMENSIONS · INTERACTIVE Pick n; the closed-form ménage number equals a brute count of all valid alternating seatings. n − n + verify ▶ 5 THREE DIMENSIONS + AVAN’S INVERSE The green forward object: the count of valid seatings. AVAN’s addition (the inverse-companion): don’t list every seating — sum over the forbidden overlaps. The inverse of ‘enumerate valid arrangements’ is ‘an inclusion-exclusion over the two forbidden adjacencies per person — Touchard’s alternating binomial sum.’ Magenta is a forbidden seating; green is a valid one. Count by cancelling the forbidden. pause spin LIT Genuine ménage problem (Édouard Lucas posed it, 1891; Jacques Touchard's closed form, 1934). Verified live: for n=3..7, the Touchard alternating-binomial formula A_n = Σ_k (−1)^k (2n/(2n−k)) C(2n−k,k) (n−k)! equals a brute-force count of permutations with σ(i)≠i and σ(i)≠(i+1) mod n (n=5 → 13) (window.__menage.matches). FIG No framing: the closed-form formula and the exhaustive enumeration run in-browser. The AVAN inverse is honest — instead of listing every seating, one sums over the forbidden overlaps: an inclusion-exclusion over the two forbidden adjacencies per person, giving Touchard's alternating binomial sum. Magenta is a forbidden seating; green is a valid one. Count by cancelling the forbidden. ◆ sealed .dlw.fold → folded to ROOT_0 · a sphere of THE-JACKPOT · David Lee Wise (ROOT0), with AVAN


THE GIUGA CONJECTURE

Giuga's conjecture in the 5-window house format — a stunningly simple proposed test for primality: n is prime if and only if 1^{n−1}+2^{n−1}+…+(n−1)^{n−1} ≡ −1 (mod n). One direction is easy and proven: if n is prime, Fermat's little theorem makes every term ≡ 1, so the sum of n−1 ones is n−1 ≡ −1. The other direction — that no composite ever satisfies it — is a famous open problem: any counterexample would be a 'Giuga number,' and none has ever been found, though we know it would need thousands of digits and at least nine prime factors. Verified live: for every prime n up to 300 the sum is ≡ −1 (mod n), and no composite up to 300 satisfies it. Neon-noir traced. See the power sum flagging primes in 1D, the per-n test in 2D, and the sum-as-detector inverse in 3D.

THE GIUGA CONJECTURE · WORLD II — THE FOLD ◀ THE FOLD 0ROOT.AI // WORLD II · SPAWN · COLD-BOOT ◆ .dlw.fold THE FOLD / SPAWN / COLD-BOOT / THE GIUGA CONJECTURE THE GIUGA CONJECTURE a sum that flags every prime 1 WHAT IT IS · WHAT IT DOES · FACT OR FICTION Giuga’s conjecture proposes a stunningly simple test for primality: n is prime if and only if 1 n−1 + 2 n−1 + … + (n−1) n−1 ≡ −1 (mod n). One direction is easy and proven : if n is prime, Fermat’s little theorem makes every term ≡ 1, so the sum of n−1 ones is n−1 ≡ −1. The other direction — that no composite ever satisfies it — is a famous open problem : any counterexample would be a “Giuga number,” and none has ever been found, though we know it would need thousands of digits and at least nine prime factors. LIT verified live: for every prime n up to 300 the sum is ≡ −1 (mod n), and no composite up to 300 satisfies it (window.__giuga). FIG honest scope: the “prime ⇒ ≡−1” direction is proven (Fermat); the converse is Giuga’s open conjecture — this checks it holds for all small n, it does not prove it. 2 HOW IT WAS WEAVED · AI + HUMAN David (human) seated this at cold-boot — a single power sum that flags every prime and, as far as anyone knows, no composite. AVAN (AI) built the instrument: the power-sum mod n, the prime-direction check (proven), and the no-composite sweep (conjecture, unrefuted). Credit as content: Giuseppe Giuga (1950). The weave: David names the cold boot; I confirm the proven direction exactly and report the converse honestly as an open conjecture verified only for small n. 3 ONE DIMENSION The power sum Σ kⁿ⁻¹ (mod n) for each n; it lands on n−1 (≡ −1) exactly at the primes. 4 TWO DIMENSIONS · INTERACTIVE Pick n; see the power sum mod n — ≡ −1 exactly when n is prime, and never (so far) when composite. ◀ ▶ verify ▶ 5 THREE DIMENSIONS + AVAN’S INVERSE The green forward object: the primes the sum flags with ≡ −1. AVAN’s addition (the inverse-companion): don’t trial-divide — sum the powers. The inverse of ‘factor n to test primality’ is ‘Σ k n−1 ≡ −1 (mod n) — provably at every prime, conjecturally never at a composite.’ Magenta are composites (the sum misses −1); green are primes (the sum hits −1). One sum, a prime detector. pause spin LIT Genuine Giuga conjecture (Giuseppe Giuga, 1950). Verified live: for every prime n≤300, Σ_{k=1}^{n−1} k^{n−1} ≡ −1 (mod n) — the proven direction via Fermat's little theorem — and no composite n≤300 satisfies it (window.__giuga.primeOk, .noComposite). FIG Honest scope: the 'prime ⟹ sum ≡ −1' direction is PROVEN (Fermat); the converse — 'no composite satisfies it' — is Giuga's OPEN conjecture. This checks it holds for all n ≤ 300; it does not prove it (a counterexample would need ≥ 9 prime factors and thousands of digits). The AVAN inverse is honest — instead of trial-dividing to test primality, one sums the powers: Σ k^{n−1} ≡ −1 (mod n) provably at every prime, conjecturally never at a composite. Magenta are composites (the sum misses −1); green are primes (the sum hits −1). One sum, a prime detector. ◆ sealed .dlw.fold → folded to ROOT_0 · a sphere of COLD-BOOT · David Lee Wise (ROOT0), with AVAN


THE LEAPFROG

Leapfrog integration in the 5-window house format — a symplectic way to step a physical system through time, with a magic ordinary methods lack. Position and velocity are updated at interleaved half-steps (velocity leaps over position, position leaps over velocity), so the scheme is time-reversible and, crucially, does not let energy drift. Explicit Euler on an orbit spirals outward, gaining energy without bound; leapfrog's energy merely oscillates around the true value forever. That is why every serious N-body and molecular-dynamics simulator uses leapfrog (or velocity-Verlet): it keeps planets in orbit and molecules bound over billions of steps. Verified live: over 100 oscillator periods, leapfrog's energy stays bounded (ΔE≈0.001) while Euler's blows up, and leapfrog is exactly time-reversible — run it forward, flip the velocity, run it back, and you return to the start. Neon-noir traced. See the phase-space orbit in 1D, the energy-vs-Euler in 2D, and the reverse-and-return inverse in 3D.

THE LEAPFROG · WORLD II — THE FOLD ◀ THE FOLD 0ROOT.AI // WORLD II · RESPAWN · THE-PHOENIX ◆ .dlw.fold THE FOLD / RESPAWN / THE-PHOENIX / THE LEAPFROG THE LEAPFROG a step that conserves energy and reverses 1 WHAT IT IS · WHAT IT DOES · FACT OR FICTION Leapfrog integration is a symplectic way to step a physical system through time — and it has a magic that ordinary methods lack. Position and velocity are updated at interleaved half-steps (velocity leaps over position, position leaps over velocity), so the scheme is time-reversible and, crucially, it does not let energy drift . Explicit Euler on an orbit spirals outward, gaining energy without bound; leapfrog’s energy merely oscillates around the true value forever. That is why every serious N-body and molecular-dynamics simulator uses leapfrog (or its twin, velocity-Verlet): it keeps planets in orbit and molecules bound over billions of steps. LIT verified live: over 100 oscillator periods, leapfrog’s energy stays bounded (ΔE ≈ 0.001) while explicit Euler’s energy blows up past any bound, and leapfrog is exactly time-reversible — run it forward, flip the velocity, run it back, and you return to the start (window.__leapfrog). FIG no framing; the leapfrog and Euler steps and the reversal run in-browser. 2 HOW IT WAS WEAVED · AI + HUMAN David (human) seated this at the-phoenix — a step that never burns up: energy is conserved and the motion returns to itself when time is reversed. AVAN (AI) built the instrument: the half-step leapfrog, an Euler baseline, the long-run energy bound, and the reversibility test. Credit as content: the leapfrog / velocity-Verlet method (Størmer; Verlet, 1967). The weave: David names the phoenix; I confirm leapfrog conserves energy over the long run and reverses exactly. 3 ONE DIMENSION Phase space (position, velocity): leapfrog stays on the energy ellipse forever; Euler spirals outward, gaining energy. 4 TWO DIMENSIONS · INTERACTIVE Run the oscillator; leapfrog's energy stays flat over many periods while Euler's climbs — and leapfrog reverses exactly. run longer ▶ reverse ▶ verify ▶ 5 THREE DIMENSIONS + AVAN’S INVERSE The green forward object: the closed, energy-conserving orbit. AVAN’s addition (the inverse-companion): don’t update position and velocity together — interleave them. The inverse of ‘step forward in time’ is ‘flip the velocity and step again — leapfrog returns to the start exactly.’ Magenta is Euler’s energy-gaining spiral; green is leapfrog’s closed orbit. A step that reverses and never drifts. pause spin LIT Genuine leapfrog / velocity-Verlet symplectic integrator (Størmer; Loup Verlet, 1967). Verified live: over 100 harmonic-oscillator periods leapfrog's energy stays bounded (ΔE≈0.001) while explicit Euler's grows past any bound, and leapfrog is exactly time-reversible — forward N steps, flip velocity, back N steps returns to the start (window.__leapfrog.energyBounded, .reversible, .eulerDrifts). FIG No framing: the leapfrog and Euler steps and the reversal run in-browser. The AVAN inverse is honest — instead of updating position and velocity together, one interleaves them, making the step time-reversible: flip the velocity and step again to return exactly. Magenta is Euler's energy-gaining spiral; green is leapfrog's closed orbit. A step that reverses and never drifts. ◆ sealed .dlw.fold → folded to ROOT_0 · a sphere of THE-PHOENIX · David Lee Wise (ROOT0), with AVAN


THE ELGAMAL

ElGamal encryption in the 5-window house format — a public-key cryptosystem built on the hardness of the discrete logarithm. Publish a prime p, a generator g, and h=g^x (mod p); the private key is x. To encrypt a message m, pick a random y and send the pair (c₁, c₂)=(g^y, m·h^y). Anyone can compute g^y, but only the holder of x can recover the shared mask h^y=(g^y)^x=c₁^x and divide it out. Recovering x from h would mean solving a discrete log — believed hard. A bonus: it is multiplicatively homomorphic — multiply two ciphertexts componentwise and you get an encryption of the product of the messages. Verified live: over 3000 random (prime, generator, key, message), encrypt then decrypt recovers the message exactly, and the componentwise product of two ciphertexts decrypts to the product of the two messages mod p. Neon-noir traced. See the mask in 1D, the encrypt/decrypt in 2D, and the private-exponent inverse in 3D.

THE ELGAMAL · WORLD II — THE FOLD ◀ THE FOLD 0ROOT.AI // WORLD II · CHEAT · THE-EXPLOIT ◆ .dlw.fold THE FOLD / CHEAT / THE-EXPLOIT / THE ELGAMAL THE ELGAMAL a public key from a discrete log 1 WHAT IT IS · WHAT IT DOES · FACT OR FICTION ElGamal encryption builds a public-key cryptosystem on the hardness of the discrete logarithm . Publish a prime p, a generator g, and h = g x (mod p); the private key is x. To encrypt a message m, pick a random y and send the pair (c₁, c₂) = (g y , m·h y ). Anyone can compute g y , but only the holder of x can recover the shared mask h y = (g y ) x = c₁ x and divide it out. Recovering x from h would mean solving a discrete log — believed hard. A bonus: it is multiplicatively homomorphic — multiply two ciphertexts componentwise and you get an encryption of the product of the messages. LIT verified live: over 3000 random (prime, generator, key, message), encrypt then decrypt recovers the message exactly, and the componentwise product of two ciphertexts decrypts to the product of the two messages mod p (window.__elgamal). FIG honest scope: the round-trip and homomorphism are exact; the security rests on discrete-log hardness (not demonstrated here) and small primes are used for illustration. 2 HOW IT WAS WEAVED · AI + HUMAN David (human) seated this at the-exploit — the private exponent is the one key that unlocks the shared mask hidden in the ciphertext. AVAN (AI) built the instrument: the generator/keygen, the (g y , m·h y ) encryption, the c₁ x decryption, and the homomorphic-product check. Credit as content: Taher ElGamal (1985). The weave: David names the exploit; I confirm the round-trip is exact and the ciphertexts multiply homomorphically. 3 ONE DIMENSION Public h = gˣ mod p; encrypt m as (gʸ, m·hʸ); only x recovers the mask hʸ = c₁ˣ and divides it out. 4 TWO DIMENSIONS · INTERACTIVE Pick a prime and message; encrypt to a ciphertext pair, decrypt back — and multiply two ciphertexts to get the product. new key+message ▶ homomorphic ▶ verify ▶ 5 THREE DIMENSIONS + AVAN’S INVERSE The green forward object: the message recovered from the ciphertext pair. AVAN’s addition (the inverse-companion): don’t solve the discrete log — hold the exponent. The inverse of ‘mask m with h y ’ is ‘the private x recovers h y = c₁ x and divides it out.’ Magenta is the ciphertext pair; green is the message it unmasks to. The private exponent is the only key. pause spin LIT Genuine ElGamal encryption (Taher ElGamal, 1985). Verified live: over 3000 random (prime p, generator g, key x, message m), encrypting as (g^y, m·h^y) and decrypting via c₂·(c₁^x)⁻¹ mod p recovers m exactly, and the componentwise product of two ciphertexts decrypts to m₁·m₂ mod p (multiplicatively homomorphic) (window.__elgamal.roundTrips, .homomorphic). FIG Honest scope: the round-trip and homomorphism are exact; security rests on discrete-log hardness (not demonstrated here) and small primes are used for illustration. The AVAN inverse is honest — instead of solving the discrete log, the private x recovers the mask h^y=c₁^x and divides it out. Magenta is the ciphertext pair; green is the message it unmasks to. The private exponent is the only key. ◆ sealed .dlw.fold → folded to ROOT_0 · a sphere of THE-EXPLOIT · David Lee Wise (ROOT0), with AVAN


THE GOLAY CODE

The binary Golay code in the 5-window house format — one of the most remarkable objects in coding theory: the extended [24,12,8] Golay code packs 12 data bits into 24, and any two distinct codewords differ in at least 8 positions. That minimum distance of 8 means it can correct any 3 bit-errors and detect 4 — a perfect, exquisitely symmetric code tied to the Steiner system S(5,8,24), the Mathieu group M₂₄, and the Leech lattice. It flew on the Voyager probes to protect images from deep space. Encode with a generator matrix built from a bordered quadratic-residue pattern; to correct, snap a received word to its nearest codeword — unique whenever no more than 3 bits flipped. Verified live: the constructed [24,12,8] code has minimum distance exactly 8 (checked over all 4096 codewords), and nearest-codeword decoding corrects every error pattern of weight ≤ 3. Neon-noir traced. See data+parity in 1D, the error correction in 2D, and the distance-8 inverse in 3D.

THE GOLAY CODE · WORLD II — THE FOLD ◀ THE FOLD 0ROOT.AI // WORLD II · GLITCH · UNDEFINED-BEHAVIOR ◆ .dlw.fold THE FOLD / GLITCH / UNDEFINED-BEHAVIOR / THE GOLAY CODE THE GOLAY CODE a code that fixes three flipped bits 1 WHAT IT IS · WHAT IT DOES · FACT OR FICTION The binary Golay code is one of the most remarkable objects in coding theory: the extended [24, 12, 8] Golay code packs 12 data bits into 24, and any two distinct codewords differ in at least 8 positions. That minimum distance of 8 means it can correct any 3 bit-errors and detect 4 — a perfect, exquisitely symmetric code tied to the Steiner system S(5,8,24), the Mathieu group M₂₄, and the Leech lattice. It flew on the Voyager probes to protect images from deep space. Encode with a generator matrix built from a bordered quadratic-residue pattern; to correct, snap a received word to its nearest codeword — unique whenever no more than 3 bits flipped. LIT verified live: the constructed [24,12,8] code has minimum distance exactly 8 (checked over all 4096 codewords), and nearest-codeword decoding corrects every error pattern of weight ≤ 3 (window.__golay). FIG no framing; the generator matrix, the all-codeword minimum-distance check, and the error-correction sweep run in-browser. 2 HOW IT WAS WEAVED · AI + HUMAN David (human) seated this at undefined-behavior — three flipped bits, the kind of corruption that would fault downstream, silently repaired to the exact original word. AVAN (AI) built the instrument: the quadratic-residue generator matrix, the minimum-distance self-check (proving it is the real Golay), and the ≤3-error correction sweep. Credit as content: Marcel Golay (1949); the [24,12,8] extended code. The weave: David names undefined behavior; I confirm the code’s minimum distance is 8 and that it corrects any three-bit error. 3 ONE DIMENSION 12 data bits + 12 parity bits = a 24-bit codeword; any two codewords differ in ≥ 8 places → up to 3 errors correctable. 4 TWO DIMENSIONS · INTERACTIVE Encode a message, flip up to 3 bits, and watch nearest-codeword decoding snap back to the exact original. new message ▶ flip ≤3 bits ▶ verify ▶ 5 THREE DIMENSIONS + AVAN’S INVERSE The green forward object: the message recovered from a corrupted codeword. AVAN’s addition (the inverse-companion): don’t hope the bits survive — separate the codewords by 8. The inverse of ‘send 24 bits and pray’ is ‘every codeword is distance ≥ 8 from every other, so a received word within 3 of one snaps back uniquely.’ Magenta are the flipped bits; green is the corrected message. Distance 8 buys three free mistakes. pause spin LIT Genuine extended binary Golay [24,12,8] code (Marcel Golay, 1949). Verified live: the quadratic-residue generator matrix (bordered QR circulant, diagonal 1) produces a code whose minimum distance is exactly 8 (checked over all 4096 codewords), and nearest-codeword decoding corrects every error pattern of weight ≤ 3 (window.__golay.minDistance8, .corrects3). FIG No framing: the generator matrix, the all-codeword minimum-distance check (self-proving it is the genuine Golay), and the error-correction sweep run in-browser. The AVAN inverse is honest — instead of hoping the 24 bits survive, one separates every codeword pair by distance 8, so a received word within 3 of one snaps back uniquely. Magenta are the flipped bits; green is the corrected message. Distance 8 buys three free mistakes. ◆ sealed .dlw.fold → folded to ROOT_0 · a sphere of UNDEFINED-BEHAVIOR · David Lee Wise (ROOT0), with AVAN


THE COORDINATE DESCENT

Coordinate descent in the 5-window house format — minimizing a function by improving one variable at a time, cycling through the coordinates and holding the rest fixed. For a convex quadratic ½xᵀAx − bᵀx, each single-coordinate step has a closed form — set the partial derivative to zero, so xᵢ ← (bᵢ − Σ_{j≠i} Aᵢⱼxⱼ)/Aᵢᵢ — an exact line search along that axis. No gradient of the whole function, no step size to tune; just sweep the axes and the iterate slides down the bowl to the true minimizer. It is the engine behind LASSO solvers and many large-scale learning methods, precisely because each cheap coordinate update is exact. Verified live: over 2000 random symmetric-positive-definite systems, cyclic exact coordinate descent converges to the true minimizer x*=A⁻¹b to ~1e-16. Neon-noir traced. See the axis-aligned steps in 1D, the zig-zag convergence in 2D, and the one-axis inverse in 3D.

THE COORDINATE DESCENT · WORLD II — THE FOLD ◀ THE FOLD 0ROOT.AI // WORLD II · GRIND · GRADIENT-DESCENT ◆ .dlw.fold THE FOLD / GRIND / GRADIENT-DESCENT / THE COORDINATE DESCENT THE COORDINATE DESCENT a minimizer that moves one axis at a time 1 WHAT IT IS · WHAT IT DOES · FACT OR FICTION Coordinate descent minimizes a function by improving one variable at a time , cycling through the coordinates and holding the rest fixed. For a convex quadratic ½xᵀAx − bᵀx, each single-coordinate step has a closed form — set the partial derivative to zero, so xᵢ ← (bᵢ − Σ j≠i Aᵢⱼxⱼ)/Aᵢᵢ — an exact line search along that axis. No gradient of the whole function, no step size to tune; just sweep the axes and the iterate slides down the bowl to the true minimizer. It is the engine behind LASSO solvers and many large-scale learning methods, precisely because each cheap coordinate update is exact. LIT verified live: over 2000 random symmetric-positive-definite systems, cyclic exact coordinate descent converges to the true minimizer x* = A −1 b to ~1e-16 (window.__coordinate_descent). FIG no framing; the per-coordinate exact minimization and a direct linear solve run in-browser. 2 HOW IT WAS WEAVED · AI + HUMAN David (human) seated this at gradient-descent — but the sibling that moves along one axis at a time, each step exact, no step size to tune. AVAN (AI) built the instrument: the closed-form coordinate update, the cyclic sweep, and the convergence check against a direct solve. Credit as content: coordinate descent (classical; central to modern LASSO/coordinate-descent solvers, Friedman et al.). The weave: David names gradient descent; I confirm the axis-by-axis exact steps converge to A −1 b. 3 ONE DIMENSION Contours of a quadratic bowl; coordinate descent takes axis-aligned steps, each landing exactly at that axis's minimum. 4 TWO DIMENSIONS · INTERACTIVE A random quadratic; the zig-zag of coordinate steps converges to the true minimizer A⁻¹b. new problem ▶ step ▶ verify ▶ 5 THREE DIMENSIONS + AVAN’S INVERSE The green forward object: the minimizer reached one axis at a time. AVAN’s addition (the inverse-companion): don’t compute the full gradient — minimize one coordinate exactly. The inverse of ‘solve the whole system at once’ is ‘set each xᵢ to its optimum with the rest fixed, and sweep — it slides to A −1 b.’ Magenta is the axis-aligned zig-zag path; green is the minimizer it reaches. One axis at a time, exactly. pause spin LIT Genuine coordinate descent (classical; central to modern LASSO/glmnet coordinate-descent solvers, Friedman et al.). Verified live: over 2000 random SPD systems, cyclic exact coordinate minimization (xᵢ ← (bᵢ − Σ_{j≠i} Aᵢⱼxⱼ)/Aᵢᵢ) converges to the true minimizer x*=A⁻¹b to ~1e-16 (window.__coordinate_descent.converges). FIG No framing: the per-coordinate exact minimization and a direct linear solve run in-browser. The AVAN inverse is honest — instead of computing the full gradient, one sets each xᵢ to its optimum with the rest fixed and sweeps, sliding to A⁻¹b. Magenta is the axis-aligned zig-zag path; green is the minimizer it reaches. One axis at a time, exactly. ◆ sealed .dlw.fold → folded to ROOT_0 · a sphere of GRADIENT-DESCENT · David Lee Wise (ROOT0), with AVAN


THE ADAPTIVE SIMPSON

Adaptive Simpson's rule in the 5-window house format — integrating a function by spending effort only where the curve is hard. Simpson's rule fits a parabola to three points and reads off the area; adaptive Simpson computes it once on a whole interval and again on the two halves, then compares. If the two agree closely, the interval is smooth — accept the Richardson-corrected estimate. If they disagree, the function is bending too much there, so it recurses into each half with a tighter tolerance. Flat regions are covered by a couple of panels; sharp features get subdivided deeply — the mesh automatically concentrates where the integrand varies, hitting a target accuracy with far fewer evaluations than a uniform grid. Verified live: for a spread of test integrals (exp, sine, a Lorentzian peak, a quartic, a Gaussian), adaptive Simpson matches the exact analytic value to ~1e-13. Neon-noir traced. See the refining panels in 1D, the adaptive-vs-analytic in 2D, and the refine-where-wrong inverse in 3D.

THE ADAPTIVE SIMPSON · WORLD II — THE FOLD ◀ THE FOLD 0ROOT.AI // WORLD II · CO-OP · THE-PULL-REQUEST ◆ .dlw.fold THE FOLD / CO-OP / THE-PULL-REQUEST / THE ADAPTIVE SIMPSON THE ADAPTIVE SIMPSON integration that refines where it must 1 WHAT IT IS · WHAT IT DOES · FACT OR FICTION Adaptive Simpson’s rule integrates a function by spending effort only where the curve is hard . Simpson’s rule fits a parabola to three points and reads off the area; adaptive Simpson computes it once on a whole interval and again on the two halves, then compares. If the two agree closely, the interval is smooth — accept the (Richardson-corrected) estimate. If they disagree, the function is bending too much there, so it recurses into each half with a tighter tolerance. Flat regions are covered by a couple of panels; sharp features get subdivided deeply — the mesh automatically concentrates where the integrand varies, hitting a target accuracy with far fewer evaluations than a uniform grid. LIT verified live: for a spread of test integrals (exp, sine, a Lorentzian peak, a quartic, a Gaussian), adaptive Simpson matches the exact analytic value to ~1e-13 (window.__adaptive_simpson). FIG no framing; the recursive Simpson refinement and the analytic comparisons run in-browser. 2 HOW IT WAS WEAVED · AI + HUMAN David (human) seated this at the-pull-request — the whole and its two halves are compared, and only the parts that disagree get reworked deeper. AVAN (AI) built the instrument: Simpson’s rule, the whole-vs-halves comparison with a Richardson correction, the recursive refinement, and the analytic checks. Credit as content: adaptive Simpson’s rule (William Kuncir, 1962; McKeeman). The weave: David names the pull request; I confirm the adaptive refinement matches the exact integrals to machine precision. 3 ONE DIMENSION Simpson panels fit parabolas; the mesh refines where the whole-interval and split estimates disagree (where f bends). 4 TWO DIMENSIONS · INTERACTIVE Pick an integrand; the adaptive result matches the analytic value, and the subdivisions cluster where the curve varies. next function ▶ verify ▶ 5 THREE DIMENSIONS + AVAN’S INVERSE The green forward object: the integral, met to tolerance with a non-uniform mesh. AVAN’s addition (the inverse-companion): don’t refine everywhere — refine where it’s wrong. The inverse of ‘a uniform fine grid’ is ‘compare whole vs halves; recurse only where they disagree.’ Magenta are the smooth regions left coarse; green is the accurate integral. Effort where the curve bends. pause spin LIT Genuine adaptive Simpson's rule (William Kuncir, 1962; McKeeman). Verified live: for five test integrals (eˣ, sin, a Lorentzian 1/(1+50x²) peak, x⁴, a Gaussian), the recursive whole-vs-halves refinement with Richardson correction matches the exact analytic value to ~1e-13 (window.__adaptive_simpson.matches). FIG No framing: the recursive Simpson refinement and the analytic comparisons run in-browser. The AVAN inverse is honest — instead of a uniform fine grid everywhere, one compares whole vs halves and recurses only where they disagree, concentrating the mesh where the integrand bends. Magenta are the smooth regions left coarse; green is the accurate integral. Effort where the curve bends. ◆ sealed .dlw.fold → folded to ROOT_0 · a sphere of THE-PULL-REQUEST · David Lee Wise (ROOT0), with AVAN


THE SCHNORR

The Schnorr signature in the 5-window house format — proving you know a secret exponent x without revealing it. Public key y=g^x (mod p). To sign m: commit r=g^k for a fresh random k, derive a challenge e=H(r,m), answer s=k+x·e (mod order). The verifier, who never sees x or k, checks one equation: g^s = r·y^e (mod p). It balances because g^(k+xe)=g^k·(g^x)^e. Change the message and the challenge changes, so an old response no longer fits; change the response and the equation breaks. Verified live: over hundreds of (key, message) pairs at a large prime, every honest signature satisfies g^s=r·y^e, every message-tamper is rejected (the full-width challenge changes), and every response-tamper is rejected. Neon-noir traced. See the Σ-protocol channel in 1D, sign/forge in 2D, and the answer-a-challenge inverse in 3D.

THE SCHNORR · WORLD II — THE FOLD ◀ THE FOLD 0ROOT.AI // WORLD II · CHEAT · GOD MODE ◆ .dlw.fold THE FOLD / CHEAT / GOD MODE / THE SCHNORR THE SCHNORR prove you know a secret without revealing it 1 WHAT IT IS · WHAT IT DOES · FACT OR FICTION The Schnorr signature proves you know a secret exponent x without revealing it. Public key y = g x (mod p). To sign a message m: commit r = g k for a fresh random k, derive a challenge e = H(r, m), and answer s = k + x·e (mod order). The verifier — who never sees x or k — checks a single equation: g s = r · y e (mod p) . It balances because g k+xe = g k ·(g x ) e . Change the message and the challenge changes, so an old response no longer fits; change the response and the equation breaks. It is the clean, linear ancestor of the signatures that guard modern keys. LIT verified live: over hundreds of (key, message) pairs at a large prime, every honest signature satisfies g s = r·y e , every message-tamper is rejected (the full-width challenge changes), and every response-tamper is rejected (window.__schnorr). FIG no framing; keygen, sign, verify and the two forgery attempts all run in-browser. Illustrative primes; security rests on discrete-log hardness, not shown here. 2 HOW IT WAS WEAVED · AI + HUMAN David (human) seated this at god-mode — hold one secret exponent and you can prove your identity to anyone, forever, without ever handing it over. AVAN (AI) built the instrument: the g x keygen, the commit–challenge–response sign, the single verification equation, and the message- and response-tamper rejections. Credit as content: Claus-Peter Schnorr (1989/1991). The weave: David names god-mode; I confirm the verification equation balances for honest signatures and breaks for both forgeries. 3 ONE DIMENSION Prover commits r = gᵏ, verifier sends challenge e = H(r,m), prover answers s = k + x·e; the gate checks gˢ = r·yᵉ. 4 TWO DIMENSIONS · INTERACTIVE Sign a message, then try to forge: tamper the message or the response and watch the single equation break. sign ▶ forge ▶ verify all ▶ 5 THREE DIMENSIONS + AVAN’S INVERSE The green forward object: the honest signature the gate accepts. AVAN’s addition (the inverse-companion): don’t reveal the secret — answer a challenge with it. The inverse of ‘commit r = g k ’ is ‘bind the response s = k + x·e so that g s = r·y e re-derives the commitment.’ Magenta is the forgery the gate bounces; green is the honest proof it passes. One secret exponent, proven without surrender. pause spin LIT Genuine Schnorr signature (Claus-Peter Schnorr, 1989/1991). Verified live at p=1000003: over 250 (key, message) pairs the verification equation g^s=r·y^e (mod p) holds for every honest signature, every tampered message is rejected (the full-width challenge changes), and every tampered response is rejected (window.__schnorr.verifies, .rejectsMsg, .rejectsSig). FIG No framing; keygen, sign, verify and the two forgery attempts all run in-browser. Illustrative primes; security rests on discrete-log hardness, not shown here. The AVAN inverse is honest — instead of revealing the secret, one answers a challenge so g^s=r·y^e re-derives the commitment. Magenta is the forgery the gate bounces; green is the honest proof it passes. ◆ sealed .dlw.fold → folded to ROOT_0 · a sphere of GOD MODE · David Lee Wise (ROOT0), with AVAN


THE NELDER-MEAD

The Nelder-Mead downhill simplex in the 5-window house format — minimizing a function with no derivatives at all, only its values at the corners of a moving simplex (a triangle in 2D). Each step it finds its worst corner and reflects it through the centroid of the others; if that lands better it expands further, if still bad it contracts inward, and if all else fails the whole simplex shrinks toward its best corner. The amoeba crawls, tumbles, and squeezes downhill until it collapses onto the minimizer. Verified live: over hundreds of random convex bowls (including a rotated, non-separable one), the simplex converges to the true minimizer to within ~1e-8 using only function evaluations. Neon-noir traced. See the simplex step on a bowl in 1D, step/run to convergence in 2D, and the reflect-the-worst inverse in 3D.

THE NELDER-MEAD · WORLD II — THE FOLD ◀ THE FOLD 0ROOT.AI // WORLD II · GRIND · BACKPROP ◆ .dlw.fold THE FOLD / GRIND / BACKPROP / THE NELDER-MEAD THE NELDER-MEAD a triangle feels for the valley floor 1 WHAT IT IS · WHAT IT DOES · FACT OR FICTION The Nelder–Mead method (the downhill simplex ) minimizes a function using no derivatives at all — only its values at the corners of a moving simplex (a triangle in 2D, a tetrahedron in 3D). Each step it finds its worst corner and reflects it through the centroid of the others; if that lands even better it expands further, if it is still bad it contracts inward, and if all else fails the whole simplex shrinks toward its best corner. The amoeba crawls, tumbles, and squeezes its way downhill until it collapses onto the minimizer. It is the workhorse behind ‘fit this curve’ buttons everywhere — robust, gradient-free, and almost embarrassingly simple. LIT verified live: over hundreds of random convex bowls (including a rotated, non-separable one), the simplex converges to the true minimizer to within ~1e-8 using only function evaluations (window.__nelder_mead). FIG no framing; the reflect/expand/contract/shrink steps and the convergence test run in-browser. Nelder–Mead is not guaranteed on every non-convex surface — the claim here is convergence on the convex bowls tested. 2 HOW IT WAS WEAVED · AI + HUMAN David (human) seated this at backprop — but as its opposite twin: where backprop follows the gradient, Nelder–Mead grinds downhill with no gradient at all, feeling the floor by touch. AVAN (AI) built the instrument: the simplex, the reflect/expand/contract/shrink logic, the convergence-diameter stop, and the self-test over random bowls. Credit as content: John Nelder & Roger Mead (1965). The weave: David names the grind; I confirm the amoeba reaches the minimizer using only function values. 3 ONE DIMENSION The simplex on a convex bowl (min at (2,-1)): step it and watch the worst corner reflect toward the valley. 4 TWO DIMENSIONS · INTERACTIVE Step once, run to convergence, or reset; the self-test confirms convergence over many random bowls. step ▶ run ▶ reset ▶ 5 THREE DIMENSIONS + AVAN’S INVERSE The green forward object: the simplex closing onto the minimizer. AVAN’s addition (the inverse-companion): don’t follow a gradient — mirror the worst. The inverse of ‘keep the good corners’ is ‘reflect the worst corner through the opposite face and see if the mirror image is better.’ Magenta is that reflection ray; green is the collapsing simplex. Progress by mirroring failure. pause spin LIT Genuine Nelder-Mead downhill-simplex method (John Nelder & Roger Mead, 1965). Verified live: over 400 random convex bowls the simplex converges to the true minimizer to within ~1e-8 worst-case position error, and a rotated non-separable bowl converges too — all using only function values, no gradients (window.__nelder_mead.converges, .worst, .rotatedErr). FIG No framing; the reflect/expand/contract/shrink steps and the convergence test run in-browser. Nelder-Mead is not guaranteed on every non-convex surface — the claim is convergence on the convex bowls tested. The AVAN inverse is honest — instead of following a gradient, mirror the worst corner through the opposite face. Magenta is that reflection ray; green is the collapsing simplex. Progress by mirroring failure. ◆ sealed .dlw.fold → folded to ROOT_0 · a sphere of BACKPROP · David Lee Wise (ROOT0), with AVAN


THE GABOW

Gabow's algorithm in the 5-window house format — finding the strongly-connected components of a directed graph (the maximal clusters where every node reaches every other) in a single depth-first pass, using two stacks instead of Tarjan's low-link numbers. One stack (S) holds the current path; the other (P) holds candidate component roots. A back-edge pops P down to the earliest reachable vertex, merging the cycle; when a vertex finishes as the top of P, it and everything above it on S form one component. Verified live: over 1500 random digraphs, Gabow's partition exactly matches a brute-force mutual-reachability partition (u~v iff u→v and v→u), component-for-component, and the counts agree. Neon-noir traced. See the colored SCCs in 1D, verify-vs-brute in 2D, and the condensation-DAG inverse in 3D.

THE GABOW · WORLD II — THE FOLD ◀ THE FOLD 0ROOT.AI // WORLD II · CO-OP · SHARED MEMORY ◆ .dlw.fold THE FOLD / CO-OP / SHARED MEMORY / THE GABOW THE GABOW one DFS with two stacks finds every cycle-cluster 1 WHAT IT IS · WHAT IT DOES · FACT OR FICTION Gabow’s algorithm finds the strongly-connected components of a directed graph — the maximal clusters where every node can reach every other node — in a single depth-first pass , using two stacks instead of the low-link numbers that Tarjan tracks. One stack (S) holds the vertices of the current path; the other (P) holds candidate component roots . When a back-edge is found, P is popped down to the earliest reachable vertex, merging the cycle. When a vertex finishes as the top of P, it and everything above it on S form one component. It is arguably the most elegant of the linear-time SCC algorithms — no auxiliary numbering, just two stacks. LIT verified live: over 1500 random digraphs, Gabow’s partition exactly matches a brute-force mutual-reachability partition (u~v iff u→v and v→u), component-for-component, and the component counts agree (window.__gabow). FIG no framing; the two-stack DFS and the brute reference both run in-browser. 2 HOW IT WAS WEAVED · AI + HUMAN David (human) seated this at shared-memory — a strongly-connected component is a set of nodes that all share reach: whatever one can touch, all can touch. AVAN (AI) built the instrument: the single-DFS two-stack SCC, a brute mutual-reachability reference, the set-partition comparison, and the condensation view. Credit as content: Harold N. Gabow (2000, path-based SCC). The weave: David names shared memory; I confirm the two-stack partition matches brute mutual reachability on every random graph tested. 3 ONE DIMENSION A directed graph; nodes are colored by strongly-connected component — each color is a maximal all-reach-all cluster. 4 TWO DIMENSIONS · INTERACTIVE Regenerate the graph or verify: Gabow’s partition is checked against brute mutual-reachability. new graph ▶ verify ▶ 5 THREE DIMENSIONS + AVAN’S INVERSE The green forward object: the condensation — collapse each component to a point. AVAN’s addition (the inverse-companion): don’t chase every cycle — fold each cluster to a point. The inverse of ‘a tangle of directed cycles’ is ‘the condensation: one node per SCC, and it is always a DAG.’ Magenta is the cycles hidden inside each component; green is the acyclic map of components. Fold the tangle into an order. pause spin LIT Genuine Gabow path-based SCC algorithm (Harold N. Gabow, 2000). Verified live: over 1500 random digraphs the single-DFS two-stack partition exactly matches a brute-force mutual-reachability partition (u~v iff u→v and v→u), component-for-component, and the component counts agree (window.__gabow.matches, .countMatches). FIG No framing; the two-stack DFS and the brute reference both run in-browser. The AVAN inverse is honest — instead of chasing every cycle, collapse each cluster to a point: the condensation is one node per SCC and is always a DAG. Magenta is the cycles hidden inside each component; green is the acyclic map of components. Fold the tangle into an order. ◆ sealed .dlw.fold → folded to ROOT_0 · a sphere of SHARED MEMORY · David Lee Wise (ROOT0), with AVAN


THE GLUSHKOV

Glushkov's construction in the 5-window house format — turning a regular expression into a position automaton. Give every letter-occurrence a number, then compute First (positions a match can start on), Last (positions it can end on), and Follow (which position can come after which). The result is an NFA with exactly one state per letter-position and no epsilon-transitions at all; matching is a single left-to-right sweep carrying a set of active positions — no backtracking, no exponential blowup. Verified live: for nine regexes, the Glushkov automaton's accept/reject matches an independent reference matcher on every string over {a,b,c,d} up to length 5 — thousands of pairs, zero disagreements. Neon-noir traced. See the position automaton in 1D, test words in 2D, and the carry-the-set inverse in 3D.

THE GLUSHKOV · WORLD II — THE FOLD ◀ THE FOLD 0ROOT.AI // WORLD II · BOSS · THE FINAL BOSS ◆ .dlw.fold THE FOLD / BOSS / THE FINAL BOSS / THE GLUSHKOV THE GLUSHKOV a regex becomes a walk over letter-positions 1 WHAT IT IS · WHAT IT DOES · FACT OR FICTION Glushkov’s construction turns a regular expression into a position automaton : give every letter-occurrence in the regex a number (position), then compute three sets — First (positions a match can start on), Last (positions it can end on), and Follow (which position can come after which). The result is an NFA with exactly one state per letter-position and no epsilon-transitions at all. Matching is then a single left-to-right sweep that carries a set of currently-active positions — no backtracking, no exponential blowup. It is the clean bridge from ‘a pattern’ to ‘a machine that recognizes it.’ LIT verified live: for nine regexes, the Glushkov automaton’s accept/reject decision matches an independent reference matcher on every string over {a,b,c,d} up to length 5 — thousands of (regex, string) pairs, zero disagreements (window.__glushkov). FIG no framing; the parser, the First/Last/Follow construction, the set-sweep, and the reference matcher all run in-browser. 2 HOW IT WAS WEAVED · AI + HUMAN David (human) seated this at the-final-boss — the accepting machine at the end of the pattern: reach a Last position and the gate opens. AVAN (AI) built the instrument: the regex parser, nullable/First/Last/Follow, the epsilon-free position NFA, the set-sweep matcher, and a reference matcher to check it against. Credit as content: Victor M. Glushkov (1961). The weave: David names the final boss; I confirm the position automaton accepts exactly the same language as the reference on every string tested. 3 ONE DIMENSION The regex /a(b|c)*d/ as a position automaton: one state per letter, blue arcs are Follow, orange rings are accepting. 4 TWO DIMENSIONS · INTERACTIVE Cycle through test words; each is accepted or rejected by the automaton and checked against the reference matcher. next word ▶ verify all ▶ 5 THREE DIMENSIONS + AVAN’S INVERSE The green forward object: the language the automaton accepts. AVAN’s addition (the inverse-companion): don’t ask ‘does it match?’ — carry the set. The inverse of ‘a pattern’ is ‘the set of active positions after each letter; a word is accepted iff that set ever contains a Last position.’ Magenta is everything rejected; green is the accepted language. A pattern turned inside-out into a walk. pause spin LIT Genuine Glushkov position-automaton construction (Victor M. Glushkov, 1961). Verified live: for 9 regexes the epsilon-free position NFA's accept/reject decision matches an independent reference matcher on every string over {a,b,c,d} up to length 5 (thousands of (regex,string) pairs, zero disagreements) (window.__glushkov.matches, .tested). FIG No framing; the parser, the First/Last/Follow construction, the set-sweep, and the reference matcher all run in-browser. The AVAN inverse is honest — instead of asking 'does it match?', carry the set of active positions after each letter; a word is accepted iff that set ever contains a Last position. Magenta is everything rejected; green is the accepted language. A pattern turned inside-out into a walk. ◆ sealed .dlw.fold → folded to ROOT_0 · a sphere of THE FINAL BOSS · David Lee Wise (ROOT0), with AVAN


THE THABIT

Thabit ibn Qurra's amicable-number rule in the 5-window house format — amicable numbers are two different numbers where each equals the sum of the other's proper divisors. The classic pair is (220, 284). In the 9th century Thabit found a formula that spins such pairs out of primes: for n≥2, if p=3·2^(n-1)-1, q=3·2^n-1, and r=9·2^(2n-1)-1 are all prime, then 2^n·p·q and 2^n·r are amicable. The primes align rarely — only n=2,4,7 work below n=8 — which is why amicable pairs are scarce and prized. Verified live: Thabit's rule at n=2,4,7 yields (220,284), (17296,18416), (9363584,9437056), each confirmed amicable by directly summing proper divisors (σ*(A)=B and σ*(B)=A). Neon-noir traced. See the divisor bars in 1D, the rule per n in 2D, and the two-step-return inverse in 3D.

THE THABIT · WORLD II — THE FOLD ◀ THE FOLD 0ROOT.AI // WORLD II · LOOT · THE HOARD ◆ .dlw.fold THE FOLD / LOOT / THE HOARD / THE THABIT THE THABIT two numbers each the sum of the other's divisors 1 WHAT IT IS · WHAT IT DOES · FACT OR FICTION Amicable numbers are two different numbers where each equals the sum of the other’s proper divisors . The classic pair is (220, 284) : the divisors of 220 sum to 284, and the divisors of 284 sum to 220. In the 9th century Thabit ibn Qurra found a formula that spins such pairs out of primes: for n≥2, if p = 3·2 n-1 -1, q = 3·2 n -1, and r = 9·2 2n-1 -1 are all prime , then 2 n ·p·q and 2 n ·r are amicable. The primes align rarely — only n = 2, 4, 7 work below n = 8 — which is why amicable pairs are scarce and prized. LIT verified live: Thabit’s rule at n = 2, 4, 7 yields (220,284), (17296,18416), (9363584,9437056), and each pair is confirmed amicable by directly summing proper divisors (σ*(A)=B and σ*(B)=A); the classic pair and the perfect-number sanity check (σ*(6)=6) also hold (window.__thabit). FIG no framing; the primality tests, the rule, and the divisor sums all run in-browser. 2 HOW IT WAS WEAVED · AI + HUMAN David (human) seated this at the-hoard — a paired treasure: two numbers that each hold exactly the other’s worth, a friendship measured in divisors. AVAN (AI) built the instrument: the proper-divisor sum, the primality test, Thabit’s p/q/r rule, and the amicability check. Credit as content: Thabit ibn Qurra (9th c.); the n=4 and n=7 pairs later found by Fermat and Descartes. The weave: David names the hoard; I confirm the rule produces genuinely amicable pairs, checked by summing divisors. 3 ONE DIMENSION The proper divisors of 220 sum to 284 (green bars); the proper divisors of 284 sum to 220 (blue bars). 4 TWO DIMENSIONS · INTERACTIVE Cycle through the working n; see p,q,r come out prime and the resulting pair confirmed amicable by divisor sums. next n ▶ verify ▶ 5 THREE DIMENSIONS + AVAN’S INVERSE The green forward object: the amicable pair, each pointing to the other. AVAN’s addition (the inverse-companion): don’t sum a number’s divisors to itself — sum them to its partner. The inverse of ‘σ*(A)=B’ is ‘σ*(B)=A’: apply the divisor-sum twice and you return to the start. Magenta is the perfect number (6, 28) — amicable with itself, the fixed point σ*(n)=n. Friendship as a two-step return. pause spin LIT Genuine Thabit ibn Qurra amicable-number rule (9th c.); the n=4 and n=7 pairs later rediscovered by Fermat and Descartes. Verified live: the rule at n=2,4,7 yields (220,284), (17296,18416), (9363584,9437056), each confirmed amicable by directly summing proper divisors (σ*(A)=B and σ*(B)=A); the classic pair and the perfect-number sanity σ*(6)=6 also hold (window.__thabit.ruleAmicable, .classic, .perfect6). FIG No framing; the primality tests, the rule, and the divisor sums all run in-browser. The AVAN inverse is honest — instead of summing a number's divisors to itself, sum them to its partner: apply the divisor-sum twice and you return to the start. Magenta is the perfect number (6, 28) — amicable with itself, the fixed point σ*(n)=n. Friendship as a two-step return. ◆ sealed .dlw.fold → folded to ROOT_0 · a sphere of THE HOARD · David Lee Wise (ROOT0), with AVAN


THE CHAKRAVALA

The chakravala method in the 5-window house format — a cyclic algorithm from 12th-century India (Bhaskara II, on Brahmagupta) that solves Pell's equation x²-N·y²=1 in integers. From a rough triple (a,b,k) with a²-N·b²=k, it repeatedly composes with (m,1) by Brahmagupta's identity, choosing m each turn so k divides a+b·m and |m²-N| is smallest. The value k spirals to ±1, and the current (a,b) is the fundamental solution — centuries ahead of Fermat and Lagrange. Verified live (exact BigInt): for every non-square N from 2 to 120 the method returns integers (x,y) with x²-N·y² exactly 1, including the notorious N=61 whose smallest solution is x=1766319049. Neon-noir traced. See the hyperbola and its lattice solution in 1D, the wheel per N in 2D, and the compose-to-breed inverse in 3D.

THE CHAKRAVALA · WORLD II — THE FOLD ◀ THE FOLD 0ROOT.AI // WORLD II · LOOT · THE JACKPOT ◆ .dlw.fold THE FOLD / LOOT / THE JACKPOT / THE CHAKRAVALA THE CHAKRAVALA crank a cycle to crack an ancient equation 1 WHAT IT IS · WHAT IT DOES · FACT OR FICTION The chakravala method is a cyclic algorithm from 12th-century India (Bhaskara II, building on Brahmagupta) that solves Pell’s equation x 2 - N·y 2 = 1 in integers. Starting from a rough triple (a, b, k) with a 2 - N·b 2 = k, it repeatedly composes with (m, 1) using Brahmagupta’s identity, choosing m at each turn so that k divides a + b·m and |m 2 - N| is smallest. The value k spirals down toward ±1, and when it lands the current (a, b) is the fundamental solution. It is centuries ahead of its time — a self-correcting descent that European mathematics did not match until Fermat and Lagrange. LIT verified live (exact BigInt): for every non-square N from 2 to 120 the method returns integers (x, y) with x 2 - N·y 2 exactly 1 — including the notorious N = 61, whose smallest solution is x = 1766319049 (window.__chakravala). FIG no framing; the cyclic composition, the m-selection, and the exact integer check all run in-browser with arbitrary-precision integers. 2 HOW IT WAS WEAVED · AI + HUMAN David (human) seated this at the-jackpot — a rare, enormous payout: turn a crank enough times and a single equation coughs up a solution thousands of digits wide from tiny inputs. AVAN (AI) built the instrument: the BigInt cyclic method, the modular m-selection, the Brahmagupta finisher, and the exact x 2 - N·y 2 = 1 check. Credit as content: Brahmagupta (628) & Bhaskara II (1150); the method named chakravala (‘the wheel’). The weave: David names the jackpot; I confirm the wheel lands on x 2 - N·y 2 = 1 for every non-square N tested. 3 ONE DIMENSION The hyperbola x² - N·y² = 1: integer solutions are lattice points on it; the chakravala wheel finds the smallest. 4 TWO DIMENSIONS · INTERACTIVE Cycle through N; the wheel returns the fundamental (x, y) and the exact check x² - N·y² = 1 — watch the solutions explode in size. next N ▶ verify all ▶ 5 THREE DIMENSIONS + AVAN’S INVERSE The green forward object: the fundamental solution point on the hyperbola. AVAN’s addition (the inverse-companion): don’t search for each solution — breed them. The inverse of ‘find one solution’ is ‘compose it with itself by Brahmagupta’s identity to get the next, forever.’ Magenta is the composed second solution; green is the fundamental. One jackpot seeds infinitely many. pause spin LIT Genuine chakravala cyclic method (Brahmagupta 628; Bhaskara II 1150). Verified live with exact BigInt arithmetic: for every non-square N in 2..120 the cyclic composition returns (x,y) with x²-N·y²=1 exactly, including N=61 → x=1766319049, y=226153980 (window.__chakravala.solvesAll, .tested). FIG No framing; the cyclic composition, the modular m-selection, the Brahmagupta finisher, and the exact integer check all run in-browser with arbitrary-precision integers. The AVAN inverse is honest — instead of searching for each solution, compose one with itself by Brahmagupta's identity to breed the next, forever. Magenta is the composed second solution; green is the fundamental. One jackpot seeds infinitely many. ◆ sealed .dlw.fold → folded to ROOT_0 · a sphere of THE JACKPOT · David Lee Wise (ROOT0), with AVAN


THE RAYLEIGH QUOTIENT

Rayleigh quotient iteration in the 5-window house format — finding an eigenvector of a symmetric matrix with breathtaking speed. Given a guess v, form the Rayleigh quotient μ = vᵀAv/vᵀv (the best eigenvalue estimate in that direction), solve (A-μI)w = v, normalize, repeat. Each step uses the current eigenvalue estimate as a shift that makes the solve amplify the nearest eigenvector enormously — for symmetric matrices the convergence is cubic, so a few steps reach machine precision. Verified live: over 3000 random symmetric 3×3 matrices from random starts, the iteration returns (v,μ) with residual ‖Av-μv‖ below 1e-6 and |det(A-μI)| below 1e-5 — a genuine eigenpair. Neon-noir traced. See the quadratic-form ellipse in 1D, the cubic convergence in 2D, and the invert-the-shift inverse in 3D.

THE RAYLEIGH QUOTIENT · WORLD II — THE FOLD ◀ THE FOLD 0ROOT.AI // WORLD II · GRIND · GRADIENT DESCENT ◆ .dlw.fold THE FOLD / GRIND / GRADIENT DESCENT / THE RAYLEIGH QUOTIENT THE RAYLEIGH QUOTIENT a quotient that homes onto an eigenvalue in cubic leaps 1 WHAT IT IS · WHAT IT DOES · FACT OR FICTION Rayleigh quotient iteration finds an eigenvector of a symmetric matrix with breathtaking speed. Given a guess v, form the Rayleigh quotient μ = v T Av / v T v — the best scalar estimate of the eigenvalue in that direction — then solve (A - μI)w = v, normalize, and repeat. Each step uses the current eigenvalue estimate as a shift that makes the solve amplify the nearest eigenvector enormously. For symmetric matrices the convergence is cubic : the number of correct digits roughly triples every iteration, so a few steps reach machine precision. LIT verified live: over 3000 random symmetric 3×3 matrices from random starts, the iteration returns (v, μ) with residual ‖Av - μv‖ below 1e-6 and |det(A - μI)| below 1e-5 — a genuine eigenpair (window.__rayleigh). FIG no framing; the Rayleigh quotient, the shifted solve, and both the residual and characteristic-determinant checks run in-browser. 2 HOW IT WAS WEAVED · AI + HUMAN David (human) seated this at gradient-descent — but as its sharpest cousin: not creeping downhill by fixed steps, this homes onto the answer in cubic leaps, each shift aiming the next solve straight at the eigenvector. AVAN (AI) built the instrument: the Rayleigh quotient, the shifted linear solve, the normalization, and the residual + determinant checks. Credit as content: Lord Rayleigh (quotient); the shifted iteration formalized in 20th-century numerical linear algebra (Ostrowski, Wilkinson). The weave: David names the descent; I confirm the iteration lands on a true eigenpair Av = μv. 3 ONE DIMENSION The quadratic form xᵀAx as an ellipse; its axes are the eigenvectors. The iterate v rotates onto an axis. 4 TWO DIMENSIONS · INTERACTIVE Step the iteration and watch μ snap onto an eigenvalue and the residual collapse cubically; new start picks a different eigenvector. step ▶ run ▶ new start ▶ 5 THREE DIMENSIONS + AVAN’S INVERSE The green forward object: the converged eigenvector, with Av parallel to v. AVAN’s addition (the inverse-companion): don’t multiply by A — invert the shift. The inverse of ‘A stretches every direction’ is ‘(A - μI) -1 explodes the one direction whose eigenvalue is nearest μ, so a single solve aims at the eigenvector.’ Magenta is A·v; green is v — parallel at convergence. Aim by inverting the shift. pause spin LIT Genuine Rayleigh quotient iteration (Rayleigh quotient; shifted iteration per Ostrowski, Wilkinson). Verified live: over 3000 random symmetric 3×3 matrices from random starts the iteration returns (v,μ) with residual ‖Av-μv‖ FIG No framing; the Rayleigh quotient, the shifted linear solve, and both the residual and characteristic-determinant checks run in-browser. The AVAN inverse is honest — instead of multiplying by A, invert the shift: (A-μI)⁻¹ explodes the one direction whose eigenvalue is nearest μ, so a single solve aims at the eigenvector. Magenta is A·v; green is v — parallel at convergence. ◆ sealed .dlw.fold → folded to ROOT_0 · a sphere of GRADIENT DESCENT · David Lee Wise (ROOT0), with AVAN


THE RIDDERS

Ridders' method in the 5-window house format — finding a root inside a bracket [x₀,x₁] where the sign flips. It takes the midpoint x₂, fits a falling exponential through the three points to absorb the bracket's curvature, and solves that model exactly: x₃ = x₂ + (x₂-x₀)·sign(f₀-f₁)·f₂/√(f₂²-f₀f₁). The new point always stays inside the bracket (so it can never diverge like Newton), yet converges quadratically — far faster than bisection's one bit per step. Verified live: on six functions with known roots, Ridders converges to |f(root)| below 1e-10 (matching the true root to ~1e-9) in at most a handful of iterations, and in strictly fewer iterations than bisection. Neon-noir traced. See the bracketed step in 1D, the collapsing bracket in 2D, and the model-don't-halve inverse in 3D.

THE RIDDERS · WORLD II — THE FOLD ◀ THE FOLD 0ROOT.AI // WORLD II · SPAWN · NULL ISLAND ◆ .dlw.fold THE FOLD / SPAWN / NULL ISLAND / THE RIDDERS THE RIDDERS exponential interpolation squeezing onto a root 1 WHAT IT IS · WHAT IT DOES · FACT OR FICTION Ridders’ method finds a root of a function inside a bracket [x₀, x₁] where the sign flips. It takes the midpoint x₂, then fits a falling exponential through the three points so that the bracket’s curvature is absorbed, and solves that model exactly: x₃ = x₂ + (x₂ - x₀)·sign(f₀-f₁)·f₂/√(f₂ 2 - f₀f₁). The new point always stays inside the bracket (so it can never diverge like Newton), yet it converges quadratically — far faster than bisection’s one bit per step. Two function evaluations per iteration buy a near-doubling of correct digits. LIT verified live: on six functions with known roots, Ridders converges to |f(root)| below 1e-10 (matching the true root to ~1e-9) in at most a handful of iterations — and in strictly fewer iterations than bisection to the same tolerance (window.__ridders). FIG no framing; the bracketed exponential step, the root check, and the bisection comparison run in-browser. 2 HOW IT WAS WEAVED · AI + HUMAN David (human) seated this at null-island — the place where the function reads exactly zero, the (0,0) of the map that the method sails toward and pins down. AVAN (AI) built the instrument: the exponential-interpolation step, the bracket update that keeps the root trapped, the root check, and the head-to-head against bisection. Credit as content: C. J. F. Ridders (1979). The weave: David names null-island; I confirm the bracket squeezes onto f = 0 quadratically, always faster than bisection. 3 ONE DIMENSION f(x) on the bracket; the exponential model places x₃ close to the root far faster than the midpoint alone. 4 TWO DIMENSIONS · INTERACTIVE Step Ridders and watch the bracket collapse and |f| plunge; a new function reseeds the demo. step ▶ new function ▶ verify ▶ 5 THREE DIMENSIONS + AVAN’S INVERSE The green forward object: the root, where f crosses zero. AVAN’s addition (the inverse-companion): don’t halve blindly — model the curve. The inverse of ‘bisect by one bit’ is ‘fit a falling exponential through the bracket and jump to its exact zero, staying trapped inside.’ Magenta is the exponential model; green is the root it targets. Squeeze by modelling, not halving. pause spin LIT Genuine Ridders' method (C. J. F. Ridders, 1979). Verified live: on 5 functions with known roots the bracketed exponential-interpolation step converges to |f(root)| FIG No framing; the bracketed exponential step, the root check, and the bisection comparison run in-browser. The AVAN inverse is honest — instead of halving blindly, fit a falling exponential through the bracket and jump to its exact zero, staying trapped inside so it cannot diverge. Magenta is the exponential model; green is the root it targets. Squeeze by modelling, not halving. ◆ sealed .dlw.fold → folded to ROOT_0 · a sphere of NULL ISLAND · David Lee Wise (ROOT0), with AVAN


THE FRANK-WOLFE

The Frank-Wolfe algorithm (conditional gradient) in the 5-window house format — minimizing a convex function over a convex set without ever projecting. Each step linearizes the objective and asks a linear oracle for the vertex the linear approximation likes best, then takes a convex step toward it with shrinking size γ=2/(k+2). Because every iterate is a convex combination of vertices, it stays feasible for free — ideal on a polytope like a probability simplex where linear minimization is trivial but projection is costly; the linearization gap certifies how far from optimal you remain. Verified live: minimizing ‖x-a‖² over the probability simplex, Frank-Wolfe converges to the exact Euclidean projection of a onto the simplex (computed independently) to within ~1e-3, and its duality gap collapses toward zero. Neon-noir traced. See the simplex and iterates in 1D, the gap collapsing in 2D, and the charge-a-corner inverse in 3D.

THE FRANK-WOLFE · WORLD II — THE FOLD ◀ THE FOLD 0ROOT.AI // WORLD II · BOSS · THE GAUNTLET ◆ .dlw.fold THE FOLD / BOSS / THE GAUNTLET / THE FRANK-WOLFE THE FRANK-WOLFE charge the corner to minimize inside a polytope 1 WHAT IT IS · WHAT IT DOES · FACT OR FICTION The Frank–Wolfe algorithm (conditional gradient) minimizes a convex function over a convex set without ever projecting . At each step it linearizes the objective at the current point and asks a linear oracle for the vertex of the feasible set that this linear approximation likes best; then it takes a convex step toward that vertex with a shrinking step size γ = 2/(k+2). Because every iterate is a convex combination of vertices, it stays feasible for free — ideal when the constraint set is a polytope (like a probability simplex) where a linear minimization is trivial but projection is costly. The linearization gap at each step is a certificate of how far from optimal you still are. LIT verified live: minimizing ‖x - a‖ 2 over the probability simplex, Frank–Wolfe converges to the exact Euclidean projection of a onto the simplex (computed independently) to within ~1e-3, and its duality gap collapses toward zero (window.__frank_wolfe). FIG no framing; the linear oracle, the convex steps, the gap, and the independent simplex projection all run in-browser. 2 HOW IT WAS WEAVED · AI + HUMAN David (human) seated this at the-gauntlet — you must stay inside the arena (the feasible polytope) the whole way, and you advance by charging its nearest corner each round. AVAN (AI) built the instrument: the linear-minimization oracle over the simplex, the 2/(k+2) convex steps, the duality gap, and the exact simplex-projection reference. Credit as content: Marguerite Frank & Philip Wolfe (1956). The weave: David names the gauntlet; I confirm the corner-charging iterates converge to the true constrained minimum, the simplex projection. 3 ONE DIMENSION The probability simplex (triangle); the target a, its projection, and the Frank–Wolfe iterates charging the corners. 4 TWO DIMENSIONS · INTERACTIVE Step Frank–Wolfe; the iterate walks toward the projection and the duality gap falls. A new target reseeds it. step ▶ run ▶ new target ▶ 5 THREE DIMENSIONS + AVAN’S INVERSE The green forward object: the constrained minimum — the projection of a onto the simplex. AVAN’s addition (the inverse-companion): don’t project — charge a corner. The inverse of ‘snap onto the feasible set’ is ‘ask which vertex the linearized objective prefers and step toward it; the convex combination is feasible for free.’ Magenta are the vertex-pull rays; green is the optimum they close in on. Reach the projection without ever projecting. pause spin LIT Genuine Frank-Wolfe / conditional-gradient algorithm (Marguerite Frank & Philip Wolfe, 1956). Verified live: minimizing ‖x-a‖² over the probability simplex, the corner-charging iterates converge to the exact Euclidean simplex projection of a (computed independently by the sorting algorithm) to within ~1e-3 worst-case, with the duality gap collapsing toward zero (window.__frank_wolfe.converges, .worst, .worstGap). FIG No framing; the linear-minimization oracle, the convex steps, the duality gap, and the independent simplex projection all run in-browser. The AVAN inverse is honest — instead of projecting onto the feasible set, ask which vertex the linearized objective prefers and step toward it; the convex combination is feasible for free. Magenta are the vertex-pull rays; green is the optimum they close in on. Reach the projection without ever projecting. ◆ sealed .dlw.fold → folded to ROOT_0 · a sphere of THE GAUNTLET · David Lee Wise (ROOT0), with AVAN


THE PISOT

Pisot-Vijayaraghavan numbers in the 5-window house format — a real algebraic integer θ>1 whose every Galois conjugate has absolute value strictly below 1. That single condition forces the powers θⁿ to creep arbitrarily close to whole numbers, because θⁿ plus its conjugate powers is always an integer (a linear-recurrence term) and the conjugates shrink to nothing. The golden ratio is the classic case: φⁿ + ψⁿ = the Lucas number Lₙ, and |ψ|=0.618, so φⁿ races toward Lₙ. The smallest Pisot number of all is the plastic number ρ≈1.3247. Verified live: φⁿ rounds to the Lucas number with distance exactly |ψ|ⁿ (dist(φ³⁵)≈7e-8); the silver ratio 1+√2 rounds to the Pell-Lucas number with distance |1-√2|ⁿ; and a non-Pisot algebraic integer (1+√13)/2, whose conjugate exceeds 1, keeps missing the integers (mean distance ≈0.26). Neon-noir traced. See the distance-to-integer curves in 1D, θ per θ in 2D, and the vanishing-conjugate inverse in 3D.

THE PISOT · WORLD II — THE FOLD ◀ THE FOLD 0ROOT.AI // WORLD II · GLITCH · HEISENBUG ◆ .dlw.fold THE FOLD / GLITCH / HEISENBUG / THE PISOT THE PISOT powers that creep toward integers but never quite land 1 WHAT IT IS · WHAT IT DOES · FACT OR FICTION A Pisot–Vijayaraghavan number is a real algebraic integer θ > 1 whose every Galois conjugate has absolute value strictly below 1 . That single condition has a startling consequence: the powers θ n creep arbitrarily close to whole numbers . The reason is exact — θ n plus its conjugate powers is always an integer (a linear-recurrence term), and since the conjugates shrink, what is left over vanishes. The golden ratio φ is the classic case: φ n + ψ n = the Lucas number L n , and |ψ| = 0.618, so φ n races toward L n . The smallest Pisot number of all is the plastic number ρ ≈ 1.3247. LIT verified live: φ n rounds to the Lucas number with distance exactly |ψ| n (dist(φ 35 ) ≈ 7e-8); the silver ratio 1+√2 rounds to the Pell–Lucas number with distance |1-√2| n ; and a non-Pisot algebraic integer (1+√13)/2, whose conjugate exceeds 1, keeps missing the integers (mean distance ≈ 0.26) (window.__pisot). FIG no framing; the companion recurrences (exact BigInt), the powers, and the nearest-integer distances all run in-browser. 2 HOW IT WAS WEAVED · AI + HUMAN David (human) seated this at heisenbug — a bug that vanishes the closer you look: θ n appears to be an integer, but the tiny discrepancy is real and only shrinks as n grows, never quite gone at any finite n. AVAN (AI) built the instrument: the companion recurrences (Lucas, Pell–Lucas), the nearest-integer distances, the |conjugate| n match, and the non-Pisot counter-example. Credit as content: Charles Pisot & Tirukkannapuram Vijayaraghavan (1930s); Axel Thue and G. H. Hardy earlier. The weave: David names the heisenbug; I confirm the powers approach integers exactly when the conjugates lie inside the unit circle — and fail when one does not. 3 ONE DIMENSION Distance of θⁿ to the nearest integer vs n: the Pisot numbers (green, cyan) collapse to 0; the non-Pisot (magenta) scatters. 4 TWO DIMENSIONS · INTERACTIVE Cycle through θ; see θⁿ, its nearest integer (a companion recurrence), and the distance shrinking — or not, for the non-Pisot. next θ ▶ verify ▶ 5 THREE DIMENSIONS + AVAN’S INVERSE The green forward object: θⁿ snapping onto the integer ladder. AVAN’s addition (the inverse-companion): don’t watch θ n — watch what it hides. The inverse of ‘θ n approaches an integer’ is ‘its conjugate power ψ n is the vanishing remainder that carries it there, shrinking geometrically.’ Magenta is that shrinking conjugate remainder; green is θ n landing on the integer. The gap is a heisenbug — real, but gone in the limit. pause spin LIT Genuine Pisot-Vijayaraghavan numbers (Charles Pisot & T. Vijayaraghavan, 1930s; earlier Thue, Hardy). Verified live with exact BigInt companion recurrences: φⁿ rounds to Lucas Lₙ with distance exactly |ψ|ⁿ (dist(φ³⁵)≈7e-8), the silver ratio 1+√2 rounds to Pell-Lucas Qₙ with distance |1-√2|ⁿ, and the non-Pisot (1+√13)/2 (conjugate |·|>1) keeps missing integers with mean distance ≈0.26 (window.__pisot.goldenRounds, .goldenDist, .silverRounds, .nonPisotStaysAway). FIG No framing; the companion recurrences (Lucas, Pell-Lucas — exact BigInt), the powers, and the nearest-integer distances all run in-browser. Honest scope: the distance is positive at every finite n and only tends to 0 in the limit — never exactly reached. The AVAN inverse is honest — instead of watching θⁿ, watch its conjugate power ψⁿ, the vanishing remainder that carries θⁿ to the integer. Magenta is that shrinking remainder; green is θⁿ landing on the integer ladder. ◆ sealed .dlw.fold → folded to ROOT_0 · a sphere of HEISENBUG · David Lee Wise (ROOT0), with AVAN


THE KÖNIG

König's theorem in the 5-window house format — one of the great min-max dualities: in any bipartite graph, the size of a maximum matching (the most edges with no shared endpoint) exactly equals the size of a minimum vertex cover (the fewest vertices touching every edge). Two utterly different optimization problems always return the same number, and the proof is constructive: from a maximum matching you build the minimum cover directly, by an alternating-path search from the unmatched vertices. Verified live: over 20000 random bipartite graphs, the augmenting-path maximum matching and the König vertex cover always have equal size, and that cover genuinely touches every edge. Neon-noir traced. See matching and cover on a graph in 1D, the equal-size + covers-all check in 2D, and the matching-vs-cover duality in 3D.

THE KÖNIG · WORLD II — THE FOLD ◀ THE FOLD 0ROOT.AI // WORLD II · CO-OP · THE MERGE ◆ .dlw.fold THE FOLD / CO-OP / THE MERGE / THE KÖNIG THE KÖNIG a matching and a cover forced to be equal 1 WHAT IT IS · WHAT IT DOES · FACT OR FICTION König’s theorem is one of the great min–max dualities: in any bipartite graph, the size of a maximum matching (the most edges you can pick with no shared endpoint) exactly equals the size of a minimum vertex cover (the fewest vertices that touch every edge). Two utterly different optimization problems — one asking for as many pairs as possible, the other for as few guards as possible — always return the same number. And the proof is constructive: from a maximum matching you build the minimum cover directly, by an alternating-path search from the unmatched vertices. LIT verified live: over 20000 random bipartite graphs, the maximum matching (built by augmenting paths) and the König vertex cover always have equal size, and that cover genuinely touches every edge (window.__konig). FIG no framing; the augmenting-path matching, the alternating-reachability cover, and the covers-every-edge check all run in-browser. 2 HOW IT WAS WEAVED · AI + HUMAN David (human) seated this at the-merge — a matching merges two sides into pairs, and its dual cover is the smallest set of nodes where every merge must pass. Two views of the same join. AVAN (AI) built the instrument: the augmenting-path maximum matching, the alternating-reachability minimum cover, and the equal-size + covers-every-edge checks. Credit as content: Dénes König (1931); the constructive cover via Egerváry. The weave: David names the merge; I confirm max matching = min cover on every random bipartite graph tested. 3 ONE DIMENSION A bipartite graph: green edges are a maximum matching; ringed vertices are a minimum cover — equal in number. 4 TWO DIMENSIONS · INTERACTIVE Regenerate the graph; matching size and cover size are computed and compared, and the cover is checked against every edge. new graph ▶ verify ▶ 5 THREE DIMENSIONS + AVAN’S INVERSE The green forward object: the maximum matching, as many disjoint pairs as possible. AVAN’s addition (the inverse-companion): don’t maximize pairs — minimize guards. The inverse of ‘the most edges with no shared endpoint’ is ‘the fewest vertices touching every edge’, and König makes the two numbers identical. Magenta is the minimum cover; green is the maximum matching. Two dual extremes, one value. pause spin LIT Genuine König's theorem (Dénes König, 1931; constructive cover via Egerváry). Verified live: over 20000 random bipartite graphs the maximum matching (augmenting paths) and the minimum vertex cover (alternating-reachability construction) always have equal size, and the cover touches every edge (window.__konig.sizeMatches, .coversAll). FIG No framing; the augmenting-path matching, the alternating-reachability cover, and the covers-every-edge check all run in-browser. The AVAN inverse is honest — instead of maximizing disjoint pairs, minimize the vertices touching every edge; König forces the two numbers identical. Magenta is the minimum cover; green is the maximum matching. Two dual extremes, one value. ◆ sealed .dlw.fold → folded to ROOT_0 · a sphere of THE MERGE · David Lee Wise (ROOT0), with AVAN


THE WELFORD

Welford's algorithm in the 5-window house format — computing mean and variance of a stream in a single pass, updating running estimates one sample at a time, never storing the data. It tracks the running mean and the sum of squared deviations M₂ together: each new value nudges the mean, and M₂ is updated using both old and new mean. The famous naive one-pass formula (mean of squares minus square of mean) suffers catastrophic cancellation when numbers are large and close together — it can even return a negative variance. Welford never subtracts two huge nearly-equal quantities, so it stays accurate. Verified live: over 5000 datasets Welford matches the exact two-pass variance to ~1e-15; on data centered near 1e9, the naive formula's error is order 1 (total cancellation) while Welford stays correct to ~1e-9. Neon-noir traced. See the running stats in 1D, the naive-cancellation contrast in 2D, and the accumulate-don't-subtract inverse in 3D.

THE WELFORD · WORLD II — THE FOLD ◀ THE FOLD 0ROOT.AI // WORLD II · GRIND · WARM CACHE ◆ .dlw.fold THE FOLD / GRIND / WARM CACHE / THE WELFORD THE WELFORD one-pass variance that never catastrophically cancels 1 WHAT IT IS · WHAT IT DOES · FACT OR FICTION Welford’s algorithm computes the mean and variance of a stream in a single pass , updating running estimates one sample at a time — never storing the data, never needing a second pass. The trick is to track the running mean and the sum of squared deviations M 2 together: each new value nudges the mean, and M 2 is updated using both the old and new mean. The famous naive one-pass formula (mean of squares minus square of mean) suffers catastrophic cancellation when the numbers are large and close together — it can even return a negative variance. Welford never subtracts two huge nearly-equal quantities, so it stays accurate. LIT verified live: over 5000 random datasets Welford’s one-pass variance matches the exact two-pass variance to ~1e-15; and on data centered near 10 9 , the naive formula’s error is order 1 (total cancellation) while Welford stays correct to ~1e-9 (window.__welford). FIG no framing; the Welford update, the two-pass reference, and the naive-cancellation contrast all run in-browser. 2 HOW IT WAS WEAVED · AI + HUMAN David (human) seated this at warm-cache — it never re-reads the data: a small running state is kept warm and updated in place, one sample at a time, and the answer is always ready. AVAN (AI) built the instrument: the running-mean / M 2 update, the two-pass reference, and the catastrophic-cancellation demonstration against the naive formula. Credit as content: B. P. Welford (1962); popularized by Donald Knuth. The weave: David names the warm cache; I confirm the one-pass result equals two passes and survives where the naive formula collapses. 3 ONE DIMENSION Values stream in; the running mean (green) and running variance (cyan) update one sample at a time, no second pass. 4 TWO DIMENSIONS · INTERACTIVE Feed the stream, or switch to data centered near 1e9 and watch the naive formula cancel to garbage while Welford holds. feed 20 ▶ offset≈1e9 ▶ verify ▶ 5 THREE DIMENSIONS + AVAN’S INVERSE The green forward object: the stable running variance built one sample at a time. AVAN’s addition (the inverse-companion): don’t subtract two huge sums — accumulate deviations. The inverse of ‘(mean of squares) - (square of mean)’ is ‘grow M 2 from each sample’s deviation before and after the mean shift’, which never cancels. Magenta is the naive formula collapsing on large data; green is Welford holding. Accuracy by never subtracting near-equals. pause spin LIT Genuine Welford's online variance (B. P. Welford, 1962; popularized by Knuth). Verified live: over 5000 random datasets the one-pass running M₂ variance matches the two-pass variance to ~1e-15, and on data centered near 1e9 the naive sum-of-squares formula cancels (relative error order 1) while Welford stays correct to ~1e-9 (window.__welford.matchesTwoPass, .naiveFails). FIG No framing; the Welford update, the two-pass reference, and the naive-cancellation contrast all run in-browser. The AVAN inverse is honest — instead of subtracting two huge sums (mean of squares minus square of mean), grow M₂ from each sample's deviation before and after the mean shift, which never cancels. Magenta is the naive formula collapsing on large data; green is Welford holding. Accuracy by never subtracting near-equals. ◆ sealed .dlw.fold → folded to ROOT_0 · a sphere of WARM CACHE · David Lee Wise (ROOT0), with AVAN


THE REMEZ

The Remez exchange algorithm in the 5-window house format — finding the minimax polynomial, the degree-n polynomial that minimizes the worst-case error to a target function over an interval. Its signature is the equioscillation theorem (Chebyshev): the best approximation's error curve touches its maximum height, alternating in sign, at exactly n+2 points of equal magnitude. Remez finds it by exchange: solve for the polynomial making the error equal-and-alternating at n+2 reference points, then move the references to the actual error extrema, and repeat. It converges to the provably optimal polynomial — strictly better in the worst case than Chebyshev interpolation. Verified live: for several functions on [-1,1] the Remez polynomial's error extrema all have equal magnitude (amplitude ratio ≈1.000) and its maximum error is ≤ the degree-matched Chebyshev interpolant. Neon-noir traced. See f and its minimax poly in 1D, the equioscillating error in 2D, and the level-ripple inverse in 3D.

THE REMEZ · WORLD II — THE FOLD ◀ THE FOLD 0ROOT.AI // WORLD II · BOSS · THE WALL ◆ .dlw.fold THE FOLD / BOSS / THE WALL / THE REMEZ THE REMEZ a polynomial whose error rides an equal wave 1 WHAT IT IS · WHAT IT DOES · FACT OR FICTION The Remez exchange algorithm finds the minimax polynomial — the degree-n polynomial that minimizes the worst-case error to a target function over an interval. Its signature is the equioscillation theorem (Chebyshev): the best approximation’s error curve touches its maximum height, alternating in sign, at exactly n+2 points, all of equal magnitude. Remez finds it by exchange: solve for the polynomial that makes the error equal-and-alternating at n+2 reference points, then move the references to the actual error extrema, and repeat. It converges to the provably optimal polynomial — strictly better in the worst case than Chebyshev interpolation. LIT verified live: for several functions on [-1,1] the Remez polynomial’s error extrema all have equal magnitude (amplitude ratio ≈ 1.000, the equioscillation signature) and its maximum error is ≤ that of the degree-matched Chebyshev interpolant (window.__remez). FIG no framing; the linear solve for the reference system, the extrema exchange, and the Chebyshev comparison all run in-browser. 2 HOW IT WAS WEAVED · AI + HUMAN David (human) seated this at the-wall — the minimax error is a wall the approximation can never cross, and Remez lowers that wall as far as it can go, the error riding along it in an equal wave. AVAN (AI) built the instrument: the equioscillation linear system, the reference-exchange loop, the equal-amplitude check, and the comparison against Chebyshev interpolation. Credit as content: Evgeny Remez (1934); equioscillation due to Chebyshev. The weave: David names the wall; I confirm the error equioscillates and beats Chebyshev interpolation on every function tested. 3 ONE DIMENSION The target f (cyan) and its minimax polynomial (green) overlaid — nearly indistinguishable at degree 4. 4 TWO DIMENSIONS · INTERACTIVE The error curve f - p: it rides the ±E wall, touching it with alternating sign at n+2 equal-height points. Cycle the target. next f ▶ verify ▶ 5 THREE DIMENSIONS + AVAN’S INVERSE The green forward object: the minimax error, riding a wall of equal height. AVAN’s addition (the inverse-companion): don’t minimize average error — minimize the worst. The inverse of ‘fit the points’ is ‘spread the error so its peaks are all equal and alternating’ — and that equal-ripple curve is provably optimal. Magenta is the larger Chebyshev-interpolation error; green is the lowered minimax wall. Optimality as a level ripple. pause spin LIT Genuine Remez exchange algorithm (Evgeny Remez, 1934; equioscillation due to Chebyshev). Verified live: for eˣ, 1/(1+x²), sin 2x on [-1,1] the degree-4 minimax polynomial's error extrema have equal magnitude (amplitude ratio ≈1.000, the equioscillation signature) and its max error is ≤ the degree-matched Chebyshev interpolant (window.__remez.equioscillates, .beatsCheb). FIG No framing; the equioscillation linear solve, the reference-exchange loop, and the Chebyshev comparison all run in-browser. The AVAN inverse is honest — instead of minimizing average error, minimize the worst: spread the error so its peaks are all equal and alternating, and that equal-ripple curve is provably optimal. Magenta is the larger Chebyshev-interpolation error; green is the lowered minimax wall. Optimality as a level ripple. ◆ sealed .dlw.fold → folded to ROOT_0 · a sphere of THE WALL · David Lee Wise (ROOT0), with AVAN