◀ THE FOLD0ROOT.AI // WORLD II · SPAWN · THE SANDBOX◆ .dlw.fold
THE FOLD / SPAWN / THE SANDBOX / THE RSK

THE RSK

permutations become two tableaux — order becomes shape
1 WHAT IT IS · WHAT IT DOES · FACT OR FICTION
The Robinson–Schensted correspondence is a perfect bijection between permutations of 1…n and pairs of standard Young tableaux (P, Q) of the same shape. Build P by row insertion: each number slides into the first row, bumping the smallest larger element down to the next row, which bumps again, cascading down. Q records when each cell appeared.

This reversible bookkeeping encodes deep structure. Schensted’s theorem: the length of P’s first row equals the permutation’s longest increasing subsequence — and the first column gives the longest decreasing one.

LIT verified live: over all 720 permutations of 6 symbols, RSK maps each to a distinct (P, Q) pair (a bijection), and P’s first-row length equals the longest increasing subsequence every time (window.__rsk). FIG no framing; exact combinatorial bijection.
2 HOW IT WAS WEAVED · AI + HUMAN
David (human) seated this at the-sandbox — building a structure by dropping pieces in and letting them settle. RSK is the sandbox of combinatorics: insert numbers, watch tableaux self-assemble by bumping. AVAN (AI) built the instrument: the row-insertion engine, the exhaustive bijection check, the Schensted longest-increasing-subsequence test.

Credit as content: Gilbert de B. Robinson (1938), Craige Schensted (1961), extended to RSK by Donald Knuth (1970). The weave: David names the sandbox; I insert permutations into tableaux, prove the map is a reversible bijection, and show the hidden monotone skeleton it exposes.
3 ONE DIMENSION
Row insertion: a new value enters the first row and displaces the smallest element larger than it, which drops to the next row and displaces again — a bump cascade that always terminates by adding one cell.
4 TWO DIMENSIONS · INTERACTIVE
Type or roll a permutation; watch the P (values) and Q (timestamps) tableaux build by insertion. The first row of P is the longest increasing subsequence. Verify the bijection and Schensted’s theorem over all 720 permutations.
5 THREE DIMENSIONS + AVAN’S INVERSE
The green forward object: the two tableaux, terraced by shape, that a permutation assembles — a linear sequence turned into two staircases.
AVAN’s addition (the inverse-companion): the map is fully reversible — from (P, Q) you reverse-bump to recover the exact permutation, so nothing is lost, and it is a genuine bijection. That is why n! permutations correspond to tableau-pairs of every shape λ, giving the identity Σλ (fλ)² = n! (where fλ counts tableaux of shape λ). The inverse of ‘a flat sequence’ is ‘two 2D shapes that together remember it exactly’ — and the shape lays bare the monotone structure (longest increasing / decreasing runs) invisible in the raw list. Magenta is the raw permutation; green is the tableaux exposing its increasing/decreasing skeleton. Order becomes shape, and shape reveals what order concealed.
LIT Genuine Robinson-Schensted correspondence (Robinson 1938; Schensted 1961; Knuth's RSK 1970). Verified live: row insertion over all 720 permutations of {1..6} yields 720 distinct (P,Q) tableau pairs (a bijection), and the length of P's first row equals the longest increasing subsequence for every permutation (window.__rsk.bijection && .lisMatchesFirstRow).

FIG No framing: the row-insertion engine, the exhaustive bijection check, and the Schensted LIS test run in-browser and are exact. The AVAN inverse is honest — the map is genuinely reversible (reverse-bumping recovers the permutation), giving the identity sum of (f^lambda)^2 = n!; magenta is the raw permutation, green the tableaux exposing its monotone skeleton.
◆ sealed .dlw.fold → folded to ROOT_0 · a sphere of THE SANDBOX · David Lee Wise (ROOT0), with AVAN