◀ THE FOLD0ROOT.AI // WORLD II · CO-OP · THE BROADCAST◆ .dlw.fold
THE FOLD / CO-OP / THE BROADCAST / THE MACWILLIAMS

THE MACWILLIAMS

a dual code counted without ever listing it
1 WHAT IT IS · WHAT IT DOES · FACT OR FICTION
The MacWilliams identity is one of the quiet marvels of coding theory: you never have to look at the dual code. Every linear code C has a dual C⊥ — all the words orthogonal to everything in C — and each has a weight enumerator, the tally of how many codewords have 0 ones, 1 one, 2 ones, and so on. Jessie MacWilliams proved in 1963 that the dual’s entire tally is a fixed linear transform of the primal’s: B₃ = (1/|C|)·Σₕ Aₕ·K₃(i), where K₃ is the Krawtchouk polynomial K₃(i) = Σₛ (−1)ₛ·C(i,s)·C(n−i,j−s). Count one side, and the other side is already known — even when the dual is astronomically large.

LIT verified live: for the Hamming(7,4) code the brute-forced dual (the [7,3] simplex code, weights 1,0,0,0,7,0,0,0) is reproduced exactly by the Krawtchouk transform of the primal tally 1,0,0,7,7,0,0,1 — and over hundreds of random binary linear codes the transform matches a brute enumeration of the dual with zero error, in whole numbers (window.__macwilliams). FIG no framing; the dual is enumerated the slow way and computed the MacWilliams way, and the two integer vectors are compared entry by entry.
2 HOW IT WAS WEAVED · AI + HUMAN
David (human) seated this at the-broadcast — the co-op cell where one side speaks and the other already knows what was said: the primal broadcasts its weight tally, and the dual’s whole tally arrives with it. AVAN (AI) built the instrument: the code and dual enumerators, the Krawtchouk transform, and the entry-by-entry integer comparison.

Credit as content: Florence Jessie MacWilliams (1963); Mikhail Krawtchouk for the polynomials. The weave: David names the broadcast; I confirm that counting one code counts its dual too.
3 ONE DIMENSION
Hamming(7,4) weight tally (magenta) and its dual the simplex code (green) — the second read off the first.
4 TWO DIMENSIONS · INTERACTIVE
New random linear codes; the dual is both enumerated and transformed, then compared.
5 THREE DIMENSIONS + AVAN’S INVERSE
The green forward object: the dual’s weight tally, obtained without ever listing the dual.
AVAN’s addition (the inverse-companion): do not enumerate the other code — transform this one. The inverse of ‘list all 2ⁿ⁻ᵏ dual codewords and count their weights’ is ‘one Krawtchouk matrix applied to the tally you already have’. Magenta is the primal tally; green is the dual tally the transform hands you. Count once, know twice.
LIT Genuine MacWilliams identity (Florence Jessie MacWilliams, 1963; Krawtchouk polynomials after Mikhail Krawtchouk). Verified live: the Hamming(7,4) dual weight enumerator obtained by brute enumeration equals the Krawtchouk transform of the primal enumerator exactly, and over 400 random binary linear codes with n=4..9 the transformed tally matches the brute-enumerated dual tally entry for entry in integers (window.__macwilliams.ok, .pass, .tot).

FIG No framing; the dual is enumerated the slow way and computed the MacWilliams way, and the two integer vectors are compared entry by entry in-browser. The AVAN inverse is honest — instead of listing all dual codewords and counting their weights, transform the tally you already have: the inverse of 'enumerate the other code' is 'one Krawtchouk matrix applied to this one'. Magenta is the primal tally; green is the dual tally the transform hands you.
◆ sealed .dlw.fold → folded to ROOT_0 · a sphere of THE BROADCAST · David Lee Wise (ROOT0), with AVAN