Skip to main content
KetQat

Appearance

Proof · intermediate

Proof of the MacWilliams identity for binary codes

A discrete Fourier transform over the binary n-tuples turns a sum over the code into a sum over its dual; applied to the function that records the weight of a word it gives the identity. The argument is given in full for q = 2.

Established resultMachine-checkedUpdated 2026-12-01 · last verified 2026-12-01

AI-assisted text, machine-checked, not yet reviewed by a person. Citations resolve and an automated pass compared the statements with the cited sources. That is not peer review; check the sources for anything you depend on.

Let C⊆F2nC \subseteq \F_2^n be linear.

Step 1: a sum over CC of signs. For u∈F2nu \in \F_2^n,

∑c∈C(−1)u⋅c  =  {∣C∣u∈C⊥,0u∉C⊥.\sum_{c \in C} (-1)^{u \cdot c} \;=\; \begin{cases} \abs{C} & u \in C^{\perp}, \\ 0 & u \notin C^{\perp}. \end{cases}

If u∈C⊥u \in C^\perp every term is 11. Otherwise pick c0∈Cc_0 \in C with u⋅c0=1u \cdot c_0 = 1; the substitution c↦c+c0c \mapsto c + c_0 permutes CC and multiplies the sum by −1-1, so the sum is zero.

Step 2: transform of the weight function. Fix numbers x,yx, y and let f(u)=x n−wt⁡(u) ywt⁡(u)=∏i=1nf1(ui)f(u) = x^{\,n - \operatorname{wt}(u)}\, y^{\operatorname{wt}(u)} = \prod_{i=1}^n f_1(u_i) with f1(0)=xf_1(0) = x, f1(1)=yf_1(1) = y. For v∈F2nv \in \F_2^n define f^(v)=∑u∈F2n(−1)u⋅vf(u)\hat f(v) = \sum_{u \in \F_2^n} (-1)^{u \cdot v} f(u). The sum factorises over coordinates:

f^(v)  =  ∏i=1n(x+(−1)vi y)  =  (x+y) n−wt⁡(v) (x−y)wt⁡(v).\hat f(v) \;=\; \prod_{i=1}^{n} \Bigl( x + (-1)^{v_i}\, y \Bigr) \;=\; (x + y)^{\,n - \operatorname{wt}(v)}\,(x - y)^{\operatorname{wt}(v)} .

Step 3: combine. Summing f^\hat f over the code and exchanging the order of summation,

∑c∈Cf^(c)  =  ∑u∈F2nf(u)∑c∈C(−1)u⋅c  =  ∣C∣∑u∈C⊥f(u),\sum_{c \in C} \hat f(c) \;=\; \sum_{u \in \F_2^n} f(u) \sum_{c \in C} (-1)^{u \cdot c} \;=\; \abs{C} \sum_{u \in C^{\perp}} f(u) ,

by Step 1. The left side is WC(x+y, x−y)W_C(x + y,\, x - y) by Step 2 and the right side is ∣C∣ WC⊥(x,y)\abs{C}\, W_{C^{\perp}}(x, y). Since this holds for all numbers x,yx, y, it is an identity of polynomials.

Holds when

  • Proved here for q=2q = 2. The general case replaces the sign (−1)u⋅v(-1)^{u \cdot v} by a nontrivial additive character of Fq\F_q and is given in Huffman and Pless.
Proves

Open in the knowledge graph

Contributions about this record

Nobody has published a contribution about it yet.

Publish a result, reproduction or commentPropose a correction to this page

References

  1. Jessie MacWilliams (1963). A Theorem on the Distribution of Weights in a Systematic Code. Bell System Technical Journal 42 (1), 79-94. doi:10.1002/j.1538-7305.1963.tb04003.x
  2. W. Cary Huffman, Vera Pless (2003). Fundamentals of Error-Correcting Codes. Cambridge University Press. doi:10.1017/CBO9780511807077

Contributors

  • KetQat maintainers · @ketqatConceptualization; Supervision (CRediT roles)
  • Claude (AI drafting assistant)Writing, original draft (CRediT roles)

Review history

  1. Automated source check · Pass · 2026-12-01 · Independent automated verification pass (AI, not the drafting session)

    Steps 1-3 re-derived (character sum over a linear code, coordinate-wise factorisation of the transform of x^(n-wt) y^wt, exchange of summation). Numerical check: |C| W_(C-dual)(x,y) = W_C(x+y, x-y) verified exactly for 50 random binary linear codes (n <= 8) at three integer points each, and the [7,4,3] Hamming / [7,3,4] simplex weight distributions enumerated. Crossref metadata of MacWilliams 1963 (BSTJ 42(1) 79-94) matched. Huffman-Pless (general q) not opened; the proof itself is only claimed for q = 2.

Revision history

  1. 2026-12-01Content release 2.1.0: 35 more topics, an independent source check of every record, intake hardening (#17)80537b7e
  2. 2026-11-30KetQat Commons: free learning paths, knowledge records, research problems, literature intake (#14)571c9b10

Current revision 0a7e85cd09a088a9. Source file knowledge/records/proof/macwilliams-identity.md in the content repository (readable there once it is public).