THE FOLD / GRIND / WARM CACHE / THE DIRICHLET APPROXIMATION
THE DIRICHLET APPROXIMATION
a rational close to any real, guaranteed by pigeonhole
1 WHAT IT IS · WHAT IT DOES · FACT OR FICTION
Dirichlet’s approximation theorem guarantees good rational approximations to every real number, and it falls straight out of the pigeonhole principle. For any real α and any bound Q, there is a fraction p/q with 1 ≤ q ≤ Q and |α − p/q| < 1/(qQ) — which is at most 1/q2. The proof: the Q + 1 fractional parts {α}, {2α}, …, {Qα}, together with 0, fall into Q sub-intervals of [0, 1], so two of them lie within 1/Q — their difference gives the fraction. It is the seed from which continued-fraction approximation and Hurwitz’s sharp bound grow.
LIT verified live: for thousands of random α and bounds Q, a q ≤ Q is found with the nearest fraction satisfying |α − p/q| < 1/(qQ), and hence < 1/q2 (window.__dirichlet). FIG no framing; the pigeonhole q located and the two bounds checked exactly.
LIT verified live: for thousands of random α and bounds Q, a q ≤ Q is found with the nearest fraction satisfying |α − p/q| < 1/(qQ), and hence < 1/q2 (window.__dirichlet). FIG no framing; the pigeonhole q located and the two bounds checked exactly.
2 HOW IT WAS WEAVED · AI + HUMAN
David (human) seated this at warm-cache — among the first Q multiples of α, one lands within 1/Q of a whole number, and that near-miss is cached as a good fraction. AVAN (AI) built the instrument: the fractional-part scan for a q with ||qα|| < 1/Q, and the |α − p/q| < 1/(qQ) ≤ 1/q2 checks.
Credit as content: Peter Gustav Lejeune Dirichlet (1842); the argument is the founding use of the pigeonhole (Schubfachprinzip). The weave: David names warm-cache; I look through the multiples qα for one whose fractional part is within 1/Q of an integer — pigeonhole promises it exists — and read off a fraction p/q closer than 1/q2 to α.
Credit as content: Peter Gustav Lejeune Dirichlet (1842); the argument is the founding use of the pigeonhole (Schubfachprinzip). The weave: David names warm-cache; I look through the multiples qα for one whose fractional part is within 1/Q of an integer — pigeonhole promises it exists — and read off a fraction p/q closer than 1/q2 to α.
3 ONE DIMENSION
The Q + 1 points 0, {α}, {2α}, …, {Qα} in [0,1] fall into Q boxes of width 1/Q — so two share a box (pigeonhole), giving |qα − p| < 1/Q. For √2, Q = 10: 7/5 is within 1/50.
4 TWO DIMENSIONS · INTERACTIVE
The multiples of α mod 1 in their boxes; the pigeonhole pair; the fraction p/q and its error against 1/q2; checked.
5 THREE DIMENSIONS + AVAN’S INVERSE
The green forward object: a rational within 1/q2 of any real.
AVAN’s addition (the inverse-companion): don’t hunt for a good fraction — guarantee one by pigeonhole: crowd Q + 1 points into Q boxes and two must collide. The inverse of ‘search for p/q near α’ is ‘pigeonhole forces a q ≤ Q with error below 1/q2.’ Magenta is a blind search; green is the pigeonhole-guaranteed fraction. Approximation by counting boxes.
LIT Genuine Dirichlet approximation theorem (Peter Gustav Lejeune Dirichlet, 1842; the founding use of the pigeonhole principle). Verified live: for 5000 random α and bounds Q, scanning the multiples finds a q ≤ Q with ||qα|| < 1/Q, and the nearest fraction satisfies |α − p/q| < 1/(qQ) (window.__dirichlet.exists) and hence < 1/q² (window.__dirichlet.q2bound).
FIG No framing: the fractional-part scan for a q with ||qα|| < 1/Q and the two error bounds all run in-browser with exact arithmetic. The AVAN inverse is honest — guaranteeing a good fraction by pigeonhole (crowd Q+1 points into Q boxes, two collide) rather than searching is exactly Dirichlet's proof; magenta is a blind search, green the pigeonhole-guaranteed fraction. Approximation by counting boxes.
FIG No framing: the fractional-part scan for a q with ||qα|| < 1/Q and the two error bounds all run in-browser with exact arithmetic. The AVAN inverse is honest — guaranteeing a good fraction by pigeonhole (crowd Q+1 points into Q boxes, two collide) rather than searching is exactly Dirichlet's proof; magenta is a blind search, green the pigeonhole-guaranteed fraction. Approximation by counting boxes.
◆ sealed .dlw.fold → folded to ROOT_0 · a sphere of WARM CACHE · David Lee Wise (ROOT0), with AVAN