◀ THE FOLD0ROOT.AI // WORLD II · GLITCH · HEISENBUG◆ .dlw.fold
THE FOLD / GLITCH / HEISENBUG / THE DEDEKIND SUM

THE DEDEKIND SUM

sawtooth sums bound by a reciprocity law
1 WHAT IT IS · WHAT IT DOES · FACT OR FICTION
The Dedekind sum s(h,k) is a finite sum built from the sawtooth function ((x)) — the fractional part shifted to average zero: ((x)) = x - ⌊x⌋ - ½ for non-integers, 0 for integers. Then s(h,k) = ∑i=1k-1 ((i/k))·((hi/k)). These strange little sums, packed with the jagged sawtooth, obey a reciprocity law of startling smoothness: for coprime h and k, s(h,k) + s(k,h) = -¼ + (h/k + k/h + 1/(hk))/12. The jagged pieces combine into a clean rational. Dedekind sums underlie the transformation law of the η-function and appear in lattice-point counting and topology.

LIT verified live: over thousands of coprime pairs (h,k), the directly computed sawtooth sum s(h,k)+s(k,h) equals the reciprocity right-hand side -¼ + (h/k+k/h+1/(hk))/12 to machine precision (window.__dedekind). FIG no framing; the sawtooth, the Dedekind sum, and the reciprocity check all run in-browser.
2 HOW IT WAS WEAVED · AI + HUMAN
David (human) seated this at heisenbug — the sawtooth’s ragged jumps look like noise, yet two of these jagged sums always add up to a perfectly clean rational: a wild-looking thing that resolves the moment you pair it. AVAN (AI) built the instrument: the sawtooth ((x)), the Dedekind sum, and the reciprocity-law verification.

Credit as content: Richard Dedekind (1877), from his study of the η-function. The weave: David names the heisenbug; I confirm the jagged sawtooth sums obey the smooth reciprocity law.
3 ONE DIMENSION
The sawtooth ((x)) and the products ((i/k))·((hi/k)) that sum to s(h,k) — jagged pieces summing to a clean value.
4 TWO DIMENSIONS · INTERACTIVE
Cycle coprime (h,k); s(h,k) and s(k,h) are summed and checked against the reciprocity right-hand side.
5 THREE DIMENSIONS + AVAN’S INVERSE
The green forward object: the Dedekind sum s(h,k), a single rational value.
AVAN’s addition (the inverse-companion): don’t compute one sum — pair it with its transpose. The inverse of ‘the jagged sawtooth sum s(h,k)’ is ‘its partner s(k,h), which together obey a clean reciprocity law’, turning ragged pieces into one smooth rational. Magenta are the sawtooth products; green is the reciprocity value they and their transpose sum to. Jaggedness resolved by pairing.
LIT Genuine Dedekind sum and reciprocity law (Richard Dedekind, 1877, from his study of the η-function). Verified live: over ~11700 coprime pairs (h,k), the directly computed sawtooth sum s(h,k)+s(k,h) equals −¼+(h/k+k/h+1/(hk))/12 to ~1e-15 (window.__dedekind.ok, .worst, .count).

FIG No framing; the sawtooth ((x)), the Dedekind sum, and the reciprocity check all run in-browser. The AVAN inverse is honest — instead of computing one sum, pair it with its transpose: the inverse of 'the jagged sawtooth sum s(h,k)' is 'its partner s(k,h), which together obey a clean reciprocity law', turning ragged pieces into one smooth rational. Magenta are the sawtooth products; green is the reciprocity value they and their transpose sum to. Jaggedness resolved by pairing.
◆ sealed .dlw.fold → folded to ROOT_0 · a sphere of HEISENBUG · David Lee Wise (ROOT0), with AVAN