◀ THE FOLD0ROOT.AI // WORLD II · GRIND · BACKPROP◆ .dlw.fold
THE FOLD / GRIND / BACKPROP / THE CYCLE LEMMA

THE CYCLE LEMMA

exactly k winning rotations of a step sequence
1 WHAT IT IS · WHAT IT DOES · FACT OR FICTION
The cycle lemma (Dvoretzky–Motzkin, 1947) is the combinatorial heart of the ballot problem and the Catalan numbers. Take a sequence of steps, each at most +1, whose total is a positive integer k. Look at all n cyclic rotations of the sequence. The lemma says exactly k of those rotations are ‘dominating’ — have every partial sum strictly positive. For k = 1 that means precisely one rotation works, which is why counting problems with a ‘first return’ structure divide out cleanly by the length — the source of the 1/(n+1) in the Catalan number.

LIT verified live: for thousands of random ±1 step-sequences with positive total k, brute-counting the rotations whose partial sums stay positive gives exactly k every time; and the Catalan identity that falls out, C(2n+1,n)/(2n+1) = C(2n,n)/(n+1), holds for n up to 8 (window.__cyclelemma). FIG no framing; the rotation counting and the Catalan cross-check both run in-browser.
2 HOW IT WAS WEAVED · AI + HUMAN
David (human) seated this at backprop — the grind that rolls through every rotation of the sequence and counts, always landing on exactly k winners. AVAN (AI) built the instrument: the dominating-rotation count, the ±1 sequences, and the Catalan cross-check.

Credit as content: Aryeh Dvoretzky and Theodore Motzkin (1947). The weave: David names the grind; I confirm exactly k of the rotations dominate.
3 ONE DIMENSION
A ±1 step sequence around a ring; the dominating rotations (all partial sums positive) are marked.
4 TWO DIMENSIONS · INTERACTIVE
New sequences; the number of dominating rotations is counted and compared to the total k.
5 THREE DIMENSIONS + AVAN’S INVERSE
The green forward object: the exactly-k dominating rotations of the sequence.
AVAN’s addition (the inverse-companion): don’t hunt for the good arrangement — count the rotations. The inverse of ‘how many rotations dominate?’ is ‘exactly k, the total of the steps’ — so a k=1 total leaves a unique winner, giving the 1/(n+1) of the Catalan numbers. Magenta is the step sequence; green are the k dominating rotations. Order counted, not searched.
LIT Genuine cycle lemma (Aryeh Dvoretzky & Theodore Motzkin, 1947). Verified live: for ~6000 random ±1 step-sequences with positive total k, brute-counting the dominating rotations (all partial sums > 0) gives exactly k every time, and the Catalan identity C(2n+1,n)/(2n+1)=C(2n,n)/(n+1) holds for n≤8 (window.__cyclelemma.ok, .catOk).

FIG No framing; the rotation counting and the Catalan cross-check both run in-browser. The AVAN inverse is honest — instead of hunting for the good arrangement, count the rotations: the inverse of 'how many rotations dominate?' is 'exactly k, the total of the steps' — so a k=1 total leaves a unique winner, giving the 1/(n+1) of the Catalan numbers. Magenta is the step sequence; green are the k dominating rotations. Order counted, not searched.
◆ sealed .dlw.fold → folded to ROOT_0 · a sphere of BACKPROP · David Lee Wise (ROOT0), with AVAN