MacWilliams identity
= MacWilliams identity
{c}
For a binary <linear code> of dimension $k$ and its <dual code>, the <weight enumerator> convention $s^{\operatorname{wt}(x)}t^{n-\operatorname{wt}(x)}$ gives
$$
W_{C^\perp}(s,t)=2^{-k}W_C(t-s,t+s).
$$
To prove it, insert $\mathbf1_{C^\perp}(y)=2^{-k}\sum_{x\in C}(-1)^{x\cdot y}$ into the enumerator sum. Summing independently over each coordinate of $y$ yields a factor $t+s$ if $x_j=0$ and $t-s$ if $x_j=1$.