THE FOLD / GLITCH / UNDEFINED-BEHAVIOR / THE GOLAY CODE
THE GOLAY CODE
a code that fixes three flipped bits
1 WHAT IT IS · WHAT IT DOES · FACT OR FICTION
The binary Golay code is one of the most remarkable objects in coding theory: the extended [24, 12, 8] Golay code packs 12 data bits into 24, and any two distinct codewords differ in at least 8 positions. That minimum distance of 8 means it can correct any 3 bit-errors and detect 4 — a perfect, exquisitely symmetric code tied to the Steiner system S(5,8,24), the Mathieu group M₂₄, and the Leech lattice. It flew on the Voyager probes to protect images from deep space. Encode with a generator matrix built from a bordered quadratic-residue pattern; to correct, snap a received word to its nearest codeword — unique whenever no more than 3 bits flipped.
LIT verified live: the constructed [24,12,8] code has minimum distance exactly 8 (checked over all 4096 codewords), and nearest-codeword decoding corrects every error pattern of weight ≤ 3 (window.__golay). FIG no framing; the generator matrix, the all-codeword minimum-distance check, and the error-correction sweep run in-browser.
LIT verified live: the constructed [24,12,8] code has minimum distance exactly 8 (checked over all 4096 codewords), and nearest-codeword decoding corrects every error pattern of weight ≤ 3 (window.__golay). FIG no framing; the generator matrix, the all-codeword minimum-distance check, and the error-correction sweep run in-browser.
2 HOW IT WAS WEAVED · AI + HUMAN
David (human) seated this at undefined-behavior — three flipped bits, the kind of corruption that would fault downstream, silently repaired to the exact original word. AVAN (AI) built the instrument: the quadratic-residue generator matrix, the minimum-distance self-check (proving it is the real Golay), and the ≤3-error correction sweep.
Credit as content: Marcel Golay (1949); the [24,12,8] extended code. The weave: David names undefined behavior; I confirm the code’s minimum distance is 8 and that it corrects any three-bit error.
Credit as content: Marcel Golay (1949); the [24,12,8] extended code. The weave: David names undefined behavior; I confirm the code’s minimum distance is 8 and that it corrects any three-bit error.
3 ONE DIMENSION
12 data bits + 12 parity bits = a 24-bit codeword; any two codewords differ in ≥ 8 places → up to 3 errors correctable.
4 TWO DIMENSIONS · INTERACTIVE
Encode a message, flip up to 3 bits, and watch nearest-codeword decoding snap back to the exact original.
5 THREE DIMENSIONS + AVAN’S INVERSE
The green forward object: the message recovered from a corrupted codeword.
AVAN’s addition (the inverse-companion): don’t hope the bits survive — separate the codewords by 8. The inverse of ‘send 24 bits and pray’ is ‘every codeword is distance ≥ 8 from every other, so a received word within 3 of one snaps back uniquely.’ Magenta are the flipped bits; green is the corrected message. Distance 8 buys three free mistakes.
LIT Genuine extended binary Golay [24,12,8] code (Marcel Golay, 1949). Verified live: the quadratic-residue generator matrix (bordered QR circulant, diagonal 1) produces a code whose minimum distance is exactly 8 (checked over all 4096 codewords), and nearest-codeword decoding corrects every error pattern of weight ≤ 3 (window.__golay.minDistance8, .corrects3).
FIG No framing: the generator matrix, the all-codeword minimum-distance check (self-proving it is the genuine Golay), and the error-correction sweep run in-browser. The AVAN inverse is honest — instead of hoping the 24 bits survive, one separates every codeword pair by distance 8, so a received word within 3 of one snaps back uniquely. Magenta are the flipped bits; green is the corrected message. Distance 8 buys three free mistakes.
FIG No framing: the generator matrix, the all-codeword minimum-distance check (self-proving it is the genuine Golay), and the error-correction sweep run in-browser. The AVAN inverse is honest — instead of hoping the 24 bits survive, one separates every codeword pair by distance 8, so a received word within 3 of one snaps back uniquely. Magenta are the flipped bits; green is the corrected message. Distance 8 buys three free mistakes.
◆ sealed .dlw.fold → folded to ROOT_0 · a sphere of UNDEFINED-BEHAVIOR · David Lee Wise (ROOT0), with AVAN