◀ THE FOLD0ROOT.AI // WORLD II · CO-OP · THE SYNC◆ .dlw.fold
THE FOLD / CO-OP / THE SYNC / THE STERN-BROCOT

THE STERN-BROCOT

every positive rational, once, in lowest terms
1 WHAT IT IS · WHAT IT DOES · FACT OR FICTION
The Stern–Brocot tree is an infinite binary tree that contains every positive rational number exactly once, each already in lowest terms. Each node is the mediant (a+c)/(b+d) of the two fractions bracketing it; descending left or right narrows the interval, and the path L/R spells the fraction’s continued-fraction expansion. It is at once a perfect enumeration of the rationals and an optimal way to search for the simplest fraction in an interval.

LIT verified live: every node down to depth 11 is in lowest terms (gcd = 1) and all are distinct, and every reduced p/q with p,q ≤ 20 is found by binary search in the tree (window.__sternbrocot). FIG no framing; exact.
2 HOW IT WAS WEAVED · AI + HUMAN
David (human) seated this at the-sync — the shared ledger where every rational has one and only one canonical slot. The Stern–Brocot tree is that perfectly synced enumeration. AVAN (AI) built the instrument: the mediant recursion, the lowest-terms and distinctness checks, and the tree search for arbitrary reduced fractions.

Credit as content: Moritz Stern (1858) & Achille Brocot (1861). The weave: David names the-sync; I build each node as the mediant of its bracketing fractions and confirm every node is reduced, distinct, and reachable by a unique L/R path.
3 ONE DIMENSION
Between 0/1 and 1/0, insert the mediant 1/1. Between each neighbor pair, insert their mediant again: 1/2, 2/1, then 1/3, 2/3, 3/2, 3/1 — every positive rational appears once, always reduced.
4 TWO DIMENSIONS · INTERACTIVE
The Stern–Brocot tree; nodes are mediants in lowest terms. Search for any reduced fraction and watch the L/R path find it.
5 THREE DIMENSIONS + AVAN’S INVERSE
The green forward object: every positive rational, once, in lowest terms.
AVAN’s addition (the inverse-companion): enumerate every positive rational exactly once (already reduced) by taking mediants — between two bracketing fractions insert (a+c)/(b+d), and recurse; the L/R path to any fraction is its continued-fraction expansion. The inverse of ‘list p/q and reduce each, skipping duplicates’ is ‘grow mediants — each rational is born once, already in lowest terms.’ Magenta is the non-reduced duplicates a naive listing repeats; green is the one canonical node per rational. The tree of all rationals.
LIT Genuine Stern-Brocot tree (Stern 1858; Brocot 1861). Verified live: every node down to depth 11 (2047 nodes) is in lowest terms (gcd(numerator,denominator)=1) and all are distinct, and every reduced fraction p/q with p,q<=20 is located by a unique L/R binary search in the tree (window.__sternbrocot.reduced && .distinct && .allFound).

FIG No framing: the mediant recursion, the lowest-terms and distinctness checks, and the tree search for arbitrary reduced fractions run in-browser and hold. The AVAN inverse is honest — building each node as the mediant of its bracketing fractions enumerates every positive rational exactly once, already reduced, with the L/R path giving its continued fraction; magenta is the non-reduced duplicates a naive p/q listing repeats, green the one canonical node per rational. The tree of all rationals.
◆ sealed .dlw.fold → folded to ROOT_0 · a sphere of THE SYNC · David Lee Wise (ROOT0), with AVAN