text:
# 1 Self-dual codes over rings and fields

## 1 Self-dual codes over rings and fields

### 1.1 Inner products

There are several different kinds of self-dual codes. Let $`F`$ be a finite set called the alphabet (e.g. $`F=\{0,1\}`$ for binary codes). A code $`C`$ over $`F`$ of length $`n`$ is any subset of $`F^n`$. If $`F`$ has the structure of an additive group then $`C`$ is additive if it is an additive subgroup of $`F^n`$. If $`F`$ has a ring structure then $`C`$ is linear over $`F`$ if it is additive and also closed under multiplication by elements of $`F`$. (We will always assume that multiplication in $`F`$ is commutative.)

In order to define dual codes we must equip $`F`$ with an inner product (cf. , ). We denote this by $`(,)`$ and require that it satisfy the following conditions:

$$\begin{array}{c}(x+y,z)=(x,z)+(y,z),\hfill \\ (x,y+z)=(x,y)+(x,z),\hfill \\ \mathrm{if}(x,y)=0\text{for all }x\text{ then }y=0,\hfill \\ \mathrm{if}(x,y)=0\text{for all }y\text{ then }x=0.\hfill \end{array}$$

To define the dual of a linear code we impose the further condition that $`F`$ has a conjugacy operation, or “involutory anti-automorphism” (which may be the identity), denoted by a bar, which satisfies

$$\overline{\overline{x}}=x,\overline{x+y}=\overline{x}+\overline{y},\overline{xy}=\overline{x}\overline{y}.$$

The inner product must then satisfy

$$(x,y)=\overline{(y,x)},(ax,y)=(x,\overline{a}y).$$

The inner product of vectors $`x=(x_1,\mathrm{},x_n)`$, $`y=(y_1,\mathrm{},y_n)`$ in $`F^n`$ is defined by

$$(x,y)=\underset{i=1}{\overset{n}{}}(x_i,y_i).$$

### 1.2 Families of self-dual codes

Families ($`2`$) through ($`m^Z`$) include the most important families of codes we will consider in this chapter.

($`2`$) Binary linear codes: $`F=F_2=\{0,1\}`$, with inner product $`(x,y)=xy`$, $`C=\text{subspace of }F_2^n.`$

($`3`$) Ternary linear codes: $`F=F_3=\{0,1,2\}`$, $`(x,y)=xy`$, $`C=\text{subspace of }F_3^n.`$

($`4^\mathrm{H}`$) Quaternary linear codes: $`F=F_4=\{0,1,\omega ,\omega ^2\}`$, where $`\omega ^2+\omega +1=0`$, $`\omega ^3=1`$, $`\overline{x}=x^2`$ for $`xF_4`$, with the Hermitian inner product $`(x,y)=x\overline{y}`$, $`C=\text{subspace of }F_4^n.`$ Note that for $`x,yF_4`$, $`(x+y)^2=x^2+y^2`$, $`x^4=x`$.

($`4^\mathrm{E}`$) Quaternary linear codes: $`F=F_4`$, but with the Euclidean inner product $`(x,y)=xy`$.

($`4^{\mathrm{H}+}`$) Quaternary additive codes: $`F=F_4`$, with $`(x,y)=xy^2+x^2y=\mathrm{trace}(x\overline{y})`$ (the trace from $`F_4`$ to $`F_2`$); $`C=\text{additive subgroup of }F_4^n`$.

For completeness we should also mention family $`4^{\mathrm{E}+}`$, quaternary additive codes with the Euclidean trace inner product: $`F=F_4`$, with $`(x,y)=xy+(xy)^2=\mathrm{trace}(xy)`$ (the trace from $`F_4`$ to $`F_2`$); $`C=`$ additive subgroup of $`F_4^n`$. However, the map

$$x=\omega x_1+\overline{\omega }x_2F_4^nx_1x_2F_2^{\mathrm{\hspace{0.17em}2}n}$$

shows that these codes are equivalent to binary codes from family $`2`$ with a particular pairing of the coordinates. Since we don’t know any interesting examples of this family other than linear codes, we shall say no more about them.

($`q^\mathrm{H}`$) Linear codes over $`F_q`$ (or $`q`$-ary linear codes), where $`q`$ is an even power of an arbitrary prime $`p`$, with $`\overline{x}=x^\sqrt{q}`$ for $`xF_q`$, $`(x,y)=x\overline{y}`$, $`C=\text{subspace of }F_q^n`$. Note that for $`x,yF_q`$, $`(x+y)^\sqrt{q}=x^\sqrt{q}+y^\sqrt{q}`$, $`x^q=x`$.

($`q^\mathrm{E}`$) Linear codes over $`F_q`$, but with $`(x,y)=xy`$. If $`q`$ is a square, family $`q^\mathrm{H}`$ is generally preferred to $`q^\mathrm{E}`$.

($`4^Z`$) $`Z_4`$-linear codes: $`F=Z_4=\{0,1,2,3\}`$, with $`(x,y)=xy`$ $`(mod4)`$, $`C=`$ linear subspace111Strictly speaking, a $`Z_4`$-submodule. of $`Z_4^n`$.

($`m^Z`$) $`F=Z_m=Z/mZ`$, where $`m`$ is an integer $`2`$, with $`(x,y)=xy`$ $`(modm)`$, $`C=`$ linear subspace222Strictly speaking, a $`Z_m`$-submodule. of $`Z_m^n`$.

Note that for the families $`2`$, $`3`$, $`4^Z`$, $`m^Z`$, an additive code is automatically linear.

The following families are less important for our present purposes:

(F1) Linear codes over $`F_q[u]/(u^2)`$, where $`u`$ is an indeterminate, with $`\overline{u}=u`$, $`(x,y)=x\overline{y}`$. (References  and  consider such codes, as well as a noncommutative variant.)

(F2) Additive codes over $`F_4`$, with $`(x,y)=x\overline{y}`$.

If we relax the requirement that $`F`$ be commutative and finite, we can add:

(F3) Linear codes over the $`p`$-adic integers.

(F4) Codes over Frobenius rings.

(F5) Lattices in $`R^n`$ (see Section 14).

### 1.3 The dual code

Once we have specified a family of codes by giving $`F`$ and an inner product we can define the dual of a code $`C`$ to be

$$C^{}=\{uF^n:(u,v)=0\text{for all}vC\}.$$

The dual of a binary linear code (family $`2`$) is again a binary linear code. Similarly, the dual of a code in any of families $`3`$ through $`m^Z`$ is again a code of the same family. For family $`4^{\mathrm{H}+}`$, the dual of an additive code is additive; if $`C`$ is also linear so is $`C^{}`$, and then $`C^{}`$ coincides with the dual in family $`4^\mathrm{H}`$. The dual in family $`4^\mathrm{E}`$ is the conjugate of the dual in family $`4^\mathrm{H}`$.

For families $`2`$ through $`m^Z`$ it is easily checked that we have

$$|C||C^{}|=|F|^n,$$
(1)
which implies

$$(C^{})^{}=C.$$
(2)
In general, however, we can say only that

$$C(C^{})^{}.$$

In particular, (2) does not necessarily hold for family F2 (consider, for example, the code $`\{00,11\}`$ which has dual $`\{00,11,\omega \omega ,\overline{\omega }\overline{\omega }\}`$, containing only 4 words).

### 1.4 Self-dual codes

If $`C=C^{}`$ then $`C`$ is said to be self-dual. If $`CC^{}`$, $`C`$ is self-orthogonal. (In the past, some authors have used “self-orthogonal” and “weakly self-orthogonal” for these two concepts.)

In families $`2`$ through $`m^Z`$, if $`C`$ is self-dual then

$$|C|=|F|^{n/2},$$
(3)
and if $`|F|`$ is not a square then $`n`$ must be even. In particular, if $`C`$ is linear over a field, then $`n`$ is even and $`C`$ is a subspace of dimension $`n/2`$. The only families from $`2`$ through $`m^Z`$ that contain self-dual codes of odd length are $`4^{\mathrm{H}+}`$, $`4^Z`$ and $`m^Z`$ with $`m`$ a square.

#### Remarks about the final three families.

(F3): Let $`C`$ be a code of length $`n`$ over the $`p`$-adic integers $`Z_p^{\mathrm{}}`$ (such codes have been studied in , ). In general it is not clear how one should define $`C^{}`$. However, if when we reduce $`Cmodp`$ it has the same dimension over $`F_p`$ as $`C`$ had over $`F_p^{\mathrm{}}`$, then there is a natural way to define the dual so that it satisfies

$$(C^{})^{}=C,dimC+dimC^{}=n.$$

Namely, let $`D=Q_p^{\mathrm{}}C`$ be the code over the $`p`$-adic rationals $`Q_p^{\mathrm{}}`$ generated by $`C`$. Since $`D`$ is a linear code over a field, $`D^{}`$ exists and satisfies $`(D^{})^{}=D`$, $`dimD+dimD^{}=n`$. Now set $`C^{}=D^{}Z_p^{\mathrm{}}^n`$.

(F4): J. A. Wood (, see also ) has investigated codes over noncommutative finite rings $`F`$, and has shown that the two fundamental MacWilliams theorems (Theorem 4 below and Theorems 10.4 and 10.6 of Chapter 1) hold precisely when $`F`$ is a Frobenius ring. At present however no interesting examples of self-dual codes over noncommutative rings are known.

(F5): Unimodular lattices are analogues of self-dual codes in $`R^n`$ — see Section 14.

## 2 Equivalence of codes

### 2.1 Equivalent codes

Codes that differ only in minor ways, such as in the order in which the coordinates are arranged, are said to be equivalent. The transformations that we allow in defining equivalence for the above families of codes are as follows (these are precisely the transformations that commute with the process of forming the dual).

($`2`$) Permutations of the coordinates.

($`3`$) Monomial transformations of the coordinates (that is, a permutation of the coordinates followed by multiplication of the coordinates by nonzero field elements).

($`4^\mathrm{H}`$) Monomials; global conjugation.

($`4^\mathrm{E}`$) Permutations; global conjugation.

($`4^{\mathrm{H}+}`$) Monomials; conjugation of individual coordinates.

($`q^\mathrm{H}`$) Monomials over the subgroup

$$\{xF_q:x\overline{x}=1\}F_q^{}/F_\sqrt{q}^{},$$

where the star denotes the set of nonzero field elements; global multiplication by elements of $`F_q^{}`$; global action of Galois group $`Gal(F_q/F_p)`$

($`q^\mathrm{E}`$) Monomials over $`\{\pm 1\}`$; global multiplication by units; global action of Galois group.

($`4^Z`$) Monomials over $`\{\pm 1\}`$.

($`m^Z`$) Monomials over square roots of unity; global multiplication by units of $`Z_m`$.

### 2.2 Automorphism groups

In each case, the subset of such transformations that preserves the code forms the automorphism group $`Aut(C)`$ of the code.

Let $`G`$ denote the full group of all transformations listed. The order of $`G`$ in the above cases is:

($`2`$) $`n!`$

($`3`$) $`2^nn!`$

($`4^\mathrm{H}`$) $`2.3^nn!`$

($`4^\mathrm{E}`$) $`2.n!`$

($`4^{\mathrm{H}+}`$) $`6^nn!`$

($`q^\mathrm{H}`$) $`\mathrm{log}_p(q)(\sqrt{q}1)(\sqrt{q}+1)^nn!`$

($`q^\mathrm{E}`$) $`\mathrm{log}_p(q)\frac{q1}{2}2^nn!`$

($`4^Z`$) $`2^nn!`$

($`m^Z`$) For $`m=5,6,7,8,9`$ the orders are

$$\frac{51}{2}2^nn!,2^nn!,\frac{71}{2}2^nn!,4^nn!,3.2^nn!$$

respectively.

The number of codes that are equivalent to a given code $`C`$ is then

$$\frac{|G|}{|Aut(C)|}.$$

In most cases it is possible to determine the total number $`T_n`$ (say) of distinct self-dual codes of length $`n`$ in one of our families. Then

$$T_n=\underset{\genfrac{}{}{0pt}{}{\mathrm{inequivalent}}{C}}{}\frac{|G|}{|Aut(C)|}$$

where the sum is over all inequivalent codes. In other words

$$\underset{\genfrac{}{}{0pt}{}{\mathrm{inequivalent}}{C}}{}\frac{1}{|Aut(C)|}=\frac{T_n}{|G|}.$$
(4)
Equation (4) is called a mass formula. The appropriate values of $`T_n`$ are:

($`2`$)

$$\underset{i=1}{\overset{\frac{1}{2}n1}{}}(2^i+1)(n0(mod2))$$
(5)
($`2_{\mathrm{II}}`$) (weights divisible by 4):

$$2\underset{i=1}{\overset{\frac{1}{2}n2}{}}(2^i+1)(n0(mod8))$$
(6)
($`3`$)

$$2\underset{i=1}{\overset{\frac{1}{2}n1}{}}(3^i+1)(n0(mod4))$$
(7)
($`4^\mathrm{H}`$)

$$\underset{i=0}{\overset{\frac{1}{2}n1}{}}(2^{2i+1}+1)(n0(mod2))$$
(8)
($`4^\mathrm{E}`$)

$$\underset{i=1}{\overset{\frac{1}{2}n1}{}}(4^i+1)(n0(mod2))$$
(9)
($`4^{\mathrm{H}+}`$)

$$\underset{i=1}{\overset{n}{}}(2^i+1)$$
(10)
($`4_{\mathrm{II}}^{\mathrm{H}+}`$) (all weights even):

$$2\underset{i=1}{\overset{n1}{}}(2^i+1)(n0(mod2))$$
(11)
($`q^\mathrm{H}`$)

$$\underset{i=0}{\overset{\frac{1}{2}n1}{}}(q^{i+\frac{1}{2}}+1)(n0(mod2))$$
(12)
($`q^\mathrm{E}`$)

$$b\underset{i=1}{\overset{\frac{1}{2}n1}{}}(q^i+1)(n0(mod2))$$
(13)
where $`b=1`$ if $`q`$ is even, 2 if $`q`$ is odd

($`4^Z`$)

$$\underset{k=0}{\overset{n/2}{}}\sigma (n,k)2^{k(k+1)/2},$$
(14)
where $`\sigma (n,k)`$, the number of binary self-orthogonal $`[n,k]`$ codes with all weights divisible by 4, is equal to 1 if $`k=0`$, and otherwise is given by

$$\underset{i=0}{\overset{k1}{}}\frac{2^{n2i2}+2^{\left[\frac{n}{2}\right]i1}1}{2^{i+1}1},\mathrm{if}n\pm 1(mod8),$$

$$\underset{i=0}{\overset{k1}{}}\frac{2^{n2i2}1}{2^{i+1}1},\mathrm{if}n\pm 2(mod8),$$

$$\underset{i=0}{\overset{k1}{}}\frac{2^{n2i2}2^{\left[\frac{n}{2}\right]i1}1}{2^{i+1}1},\mathrm{if}n\pm 3(mod8),$$

$$\left[\underset{i=0}{\overset{k2}{}}\frac{2^{n2i2}+2^{\frac{n}{2}i1}2}{2^{i+1}1}\right]\left[\frac{1}{2^{k1}}+\frac{2^{n2k}+2^{\frac{n}{2}k}2}{2^k1}\right],\mathrm{if}n0(mod8),$$

$$\left[\underset{i=0}{\overset{k2}{}}\frac{2^{n2i2}2^{\frac{n}{2}i1}2}{2^{i+1}1}\right]\left[\frac{1}{2^{k1}}+\frac{2^{n2k}2^{\frac{n}{2}k}2}{2^k1}\right],\mathrm{if}n4(mod8).$$

There is a similar but even more complicated formula for $`T_n`$ for self-dual codes over $`Z_4`$ with Euclidean norms divisible by 8, see .

Formulae (5)–(13) are based on various sources including , , , \[191, Chap. 19\]. Equation (14) is due to Gaborit .

Here are two proofs of (5). (i) Let $`\sigma _{n,k}`$ denote the number of $`[n,k]`$ self-orthogonal codes $`C`$ containing 1. Any such $`C`$ can be extended to an $`[n,k+1]`$ self-orthogonal code $`D`$ by adjoining any vector of $`C^{}C`$, and any $`D`$ will arise $`2^k1`$ times from different $`C`$’s. So we have $`\sigma _{n,1}=1`$,

$$\frac{\sigma _{n,k+1}}{\sigma _{n,k}}=\frac{2^{n2k}1}{2^k1},$$

and $`\sigma _{n,n/2}`$ gives (5). (ii) A more sophisticated proof can be obtained by observing that the Euclidean inner product induces a symplectic geometry structure on the space of even weight vectors modulo 1. A self-dual code is then a maximally isotropic subspace. The number of maximally isotropic subspaces of a symplectic geometry of dimension $`2k`$ is $`\mathrm{\Pi }_{i=1}^k(2^i+1)`$ \[35, §9.4\], and we obtain (5) by noting that our symplectic geometry has dimension $`n2`$.

Similarly, a binary self-dual code with weights divisible by 4 is a maximally totally singular subspace of the orthogonal geometry of dimension $`n2`$ induced by $`\frac{1}{2}wt(v)`$, which leads to (6). Equations (7), (9), (11), (13) are also obtained via orthogonal geometry, (10) via symplectic geometry, and (8) and (12) via unitary geometry.

These mass formulae are useful when one is attempting to find all inequivalent codes of a given length (compare Section 11). For example, suppose we are trying to find all binary self-dual codes of length 8. We immediately find two codes, $`i_2i_2i_2i_2`$, where $`i_2=[11]`$, and the Hamming code $`e_8`$, and then it appears that there are no others. To prove this, we compute the automorphism groups of these two codes: they have orders $`2^44!=384`$ and $`\mathrm{8.7.6.4}=1344`$, respectively. We also calculate $`T_8/|G|=\mathrm{3.5.9}/8!=3/896`$ from (5), and see that indeed

$$\frac{1}{384}+\frac{1}{1344}=\frac{3}{896},$$

verifying that this enumeration is complete. We will return to this in Section 11.

There are also formulae that give the total number of self-dual codes containing a fixed self-orthogonal vector or code — see \[191, Chapter 19\].

### 2.3 Codes over $`Z_4`$

Codes over rings are probably less familiar to the reader than codes over fields, and so we will add some remarks here about the first such case, codes over $`Z_4`$, family $`4^Z`$.

Any code over $`Z_4`$ is equivalent to one with generator matrix of the form

$$\left[\begin{array}{ccc}I_{k_1}& X& Y_1+2Y_2\\ 0& 2I_{k_2}& 2Z\end{array}\right]$$
(15)
where $`X`$, $`Y_1`$, $`Y_2`$, $`Z`$ are binary matrices. Then $`C`$ is an elementary abelian group of type $`4^{k_1}2^{k_2}`$, containing $`2^{2k_1+k_2}`$ words. We indicate this by writing $`|C|=4^{k_1}2^{k_2}`$. The dual code $`C^{}`$ has generator matrix

$$\left[\begin{array}{ccc}(Y_1+2Y_2)^{tr}Z^{tr}X^{tr}& Z^{tr}& I_{nk_1k_2}\\ 2X^{tr}& 2I_{k_2}& 0\end{array}\right]$$

and $`|C^{}|=4^{nk_1k_2}2^{k_2}`$.

There are two binary codes $`C^{(1)}`$ and $`C^{(2)}`$ associated with $`C`$, having generator matrices

$$[I_{k_1}XY_1]\mathrm{and}\left[\begin{array}{ccc}I_{k_1}& X& Y_1\\ 0& I_{k_2}& Z\end{array}\right]$$
(16)
and parameters $`[n,k_1]`$ and $`[n,k_1+k_2]`$ respectively. If $`C`$ is self-orthogonal then $`C^{(1)}`$ is doubly-even and $`C^{(1)}C^{(2)}C^{(1)}`$. If $`C`$ is self-dual then $`C^{(2)}=C^{(1)}`$. The next two theorems give the converse assertions.

###### Theorem 1

If $`A`$, $`B`$ are binary codes with $`AB`$ then there is a code $`C`$ over $`Z_4`$ with $`C^{(1)}=A`$, $`C^{(2)}=B`$. If in addition $`A`$ is doubly-even and $`BA^{}`$ then $`C`$ can be made self-orthogonal. If $`B=A^{}`$ then $`C`$ is self-dual.

#### Proof.

Suppose $`A`$, $`B`$ have generator matrices as shown in (16). Then

$$\left[\begin{array}{ccc}I& X& Y\\ 0& 2I& 2Z\end{array}\right]$$
(17)
is a generator matrix for a code $`C`$ with $`C^{(1)}=A`$, $`C^{(2)}=B`$. To establish the second assertion we must modify (17) to make $`C`$ self-orthogonal. This is accomplished by replacing the $`(j,i)`$th entry of (17) by the inner product modulo 4 of rows $`i`$ and $`j`$, for $`1ik_1`$, $`1jk_1+k_2`$, $`i<j`$.

In this way every self-orthogonal doubly-even binary code corresponds to one or more self-dual codes over $`Z_4`$.

###### Theorem 2

 A code $`C`$ over $`Z_4`$ with generator matrix (15) is self-dual if and only if $`C^{(1)}`$ is doubly-even, $`C^{(2)}=C^{(1)}`$, and $`Y_2`$ is chosen so that if $`M=Y_1Y_2^{tr}`$, then $`M_{ij}+M_{ji}\frac{1}{2}wt(v_iv_j)`$, where $`v_1,\mathrm{},v_{k_1}`$ are the generators of $`C^{(1)}`$.

In contrast to self-dual codes over fields, self-dual codes over $`Z_4`$ exist for all lengths, even or odd. Furthermore, a self-dual code $`C`$ over $`Z_4`$ of length $`n`$ can be shortened to a self-dual code of length $`n1`$ by deleting any one of its coordinates. This is accomplished as follows. If the projection of $`C`$ onto the $`i`$th coordinate contains all of $`Z_4`$, the shortened code is obtained by taking those words of $`C`$ that are 0 or 2 in the $`i`$th coordinate and omitting that coordinate. If the projection of $`C`$ onto the $`i`$th coordinate contains only 0 and 2, we take the words of $`C`$ that are 0 on the $`i`$th coordinate and omit that coordinate.

In this way all self-dual codes over $`Z_4`$ belong to a common “family tree”, with $`i_1=\{0,2\}`$ at the root. The beginning of this tree, showing all self-dual codes of lengths $`n8`$, is given in Fig. 2 of .

## 3 Weight enumerators and MacWilliams theorem

### 3.1 Weight enumerators

The Hamming weight of a vector $`u=(u_1,\mathrm{},u_n)F^n`$, denoted by $`wt(u)`$, is the number of nonzero components $`u_i`$.

Two other types of “weight” are useful for studying nonbinary codes. For the codes in families $`4^Z`$, $`m^Z`$ (and hence for $`2`$, $`3`$, and, if $`q`$ is a prime, $`q^\mathrm{E}`$) we define the Lee weight and Euclidean norm of $`uF`$ by

$`\mathrm{Lee}(u)`$ $`=`$ $`\mathrm{min}\{|u|,|F||u|\},`$
$`\mathrm{Norm}(u)`$ $`=`$ $`(\mathrm{Lee}(u))^2.`$
For a vector $`u=(u_1,\mathrm{},u_n)F^n`$, we set

$`\mathrm{Lee}(u)`$ $`=`$ $`{\displaystyle \underset{i=1}{\overset{n}{}}}\mathrm{Lee}(u_i),`$
$`\mathrm{Norm}(u)`$ $`=`$ $`{\displaystyle \underset{i=1}{\overset{n}{}}}\mathrm{Norm}(u_i).`$
Of course, if $`u`$ is a binary vector, $`wt(u)=\mathrm{Lee}(u)=\mathrm{Norm}(u)`$.

It is customary to use the symbol $`A_i`$ to denote the number of vectors in a code $`C`$ having Hamming weight (or Lee weight, or Euclidean norm, depending on context) equal to $`i`$. Then $`\{A_0,A_1,A_2,\mathrm{}\}`$ is called the weight distribution of the code. The Hamming weight enumerator (abbreviated hwe) of $`C`$ is defined to be

$$W_C(x,y)=\underset{uC}{}x^{nwt(u)}y^{wt(u)}=\underset{i=0}{\overset{n}{}}A_ix^{ni}y^i.$$
(18)
(The adjective “Hamming” is often omitted.) There are good reasons for taking the Hamming weight enumerator to be a homogeneous polynomial of degree $`n`$ (see below). However, no information is lost if we set $`x=1`$, and write it as a polynomial in the single variable $`y`$.

There is an analogous definition for nonlinear codes: for $`vF^n`$, let $`A_i(v)`$ be the number of codewords at Hamming distance $`i`$ from $`v`$. The average Hamming weight distribution for a nonlinear or nonadditive code is then

$$A_i=\frac{1}{|C|}\underset{cC}{}A_i(c),$$

with associated Hamming weight enumerator

$$W_C(x,y)=\underset{i=0}{\overset{n}{}}A_ix^{ni}y^i.$$

Much more information about a code $`C`$ is supplied by its complete weight enumerator (abbreviated cwe) and defined as follows. Let the elements of the alphabet $`F`$ be $`\xi _0`$, $`\xi _1,\mathrm{},\xi _a`$, and introduce corresponding indeterminates $`x_0`$, $`x_1,\mathrm{},x_a`$. Then

$$cwe_C(x_0,\mathrm{},x_a)=\underset{uC}{}x_0^{n_0(u)}x_1^{n_1(u)}\mathrm{}x_a^{n_a(u)},$$
(19)
where $`n_\nu (u)`$ is the number of components of $`u`$ that take the value $`\xi _\nu `$.

If there is a natural way to pair up some of the symbols in $`F`$ then we can often reduce the number of variables in the cwe without losing any essential information, by identifying indeterminates corresponding to paired symbols. The result is a symmetrized weight enumerator (abbreviated swe). Some examples will make this clear. For linear codes over $`F_4`$ the symmetrized weight enumerator is

$$swe_C(x,y,z)=\underset{uC}{}x^{n_0(u)}y^{n_1(u)}z^{N_w(u)}=cwe_C(x,y,z,z),$$
(20)
where $`n_0(u)`$, $`n_1(u)`$ are as above and $`N_w(u)`$ is the number of components in $`u`$ that are equal to either $`\omega `$ or $`\overline{\omega }`$. For linear codes over $`Z_4`$, the appropriate symmetrized weight enumerator is

$$swe_C(x,y,z)=\underset{uC}{}x^{n_0(u)}y^{n_\pm (u)}z^{n_2(z)}=cwe_C(x,y,z,y),$$
(21)
where $`n_\pm (u)`$ is the number of components of $`u`$ that are equal to either $`+1`$ or $`1`$. There is an obvious generalization of (21) to linear codes over $`Z_m`$.

The swe contains only about half as many variables as the complete weight enumerator, and yet still contains enough information to determine the Lee weight or norm distribution of a code.

All the weight enumerators mentioned so far can be obtained from the “full weight enumerator” of the code. This is a generating function, or formal sum (not a polynomial), listing all the codewords:

$$\underset{uC}{}z_1^{u_1}z_2^{u_2}\mathrm{}z_n^{u_n},$$

where we use a different indeterminate $`z_i`$ for each coordinate position. To obtain the symmetrized weight enumerator of a code over $`F_4`$, for example, we replace each occurrence of $`z_i^0`$ by $`x`$, each $`z_i^1`$ by $`y`$, and each $`z_i^\omega `$ or $`z_i^{\overline{\omega }}`$ by $`z`$.

Still further weight enumerators that have proved useful can also be obtained from the full weight enumerator. For example, the split Hamming weight enumerator of a code of length $`n=2m`$ is

$$split_C(x,y,X,Y)=\underset{yC}{}x^{ml(u)}y^{l(u)}X^{mr(u)}Y^{r(u)},$$

where $`l(u)`$ (resp. $`r(u)`$) is the Hamming weight of the left half (resp. right half) of $`u`$. Split weight enumerators have been investigated in , for example. Of course, the split need not be into equal parts. Multiply-split weight enumerators have been extensively used in .

One may also define weight enumerators for translates of codes: if $`C`$ is a translate of a linear or additive code, its weight enumerator is

$$W_C(x,y)=\underset{cC}{}x^{nwt(c)}y^{wt(c)}.$$

We will use such weight enumerators later in this chapter when studying the “shadow” of a self-dual code.

The biweight enumerator of a code generalizes the weight enumerator to consider the overlaps of pairs of codewords, and the joint weight enumerator of two codes $`C`$ and $`D`$ considers the overlaps of pairs of codewords $`uC`$ and $`vD`$. More generally, the $`k`$-fold multiple weight enumerator of a code considers the composition of $`k`$ codewords chosen simultaneously from the code. Again there are generalizations of the MacWilliams and Gleason theorems (, \[191, Chap. 5\], ). The connections between multiple weight enumerators of self-dual codes and Siegel modular forms have been investigated by Duke , Ozeki , ,  and Runge .

Ozeki  has recently introduced another generalization of the weight enumerator of a code $`C`$, namely its Jacobi polynomial. For a fixed vector $`vF^n`$, this is defined by

$$Jac_{C,v}(x,z)=\underset{uC}{}x^{wt(u)}z^{wt(uv)},$$

which is essentially a split weight enumerator. These polynomials have been studied in , , . They have the same relationship to Jacobi forms  as weight enumerators do to modular forms (cf. the remarks in Section 14).

For future reference we note the following relations between inner products and weights or norms for four of our families:

($`2`$):

$$(u,v)=\frac{1}{2}\{wt(u+v)wt(u)wt(v)\}$$
(22)
($`4^{\mathrm{H}+}`$):

$$(u,v)=wt(u+v)wt(u)wt(v)$$
(23)
($`4^Z`$), ($`m^Z`$):

$$(u,v)=\frac{1}{2}\{\mathrm{Norm}(u+v)\mathrm{Norm}(u)\mathrm{Norm}(v)\}.$$
(24)
### 3.2 Examples of self-dual codes and their weight enumerators

The following are some key examples of self-dual codes of the different families mentioned in Section 1, together with their weight enumerators. Some of these weight enumerators will be labeled for later reference. Unless indicated otherwise, all the codes mentioned are self-dual codes of the appropriate kind.

We write $`[n,k,d]_q`$ to indicate a linear code of length $`n`$, dimension $`k`$ and minimal distance $`d`$ over the field $`F_q`$, omitting $`q`$ when it is equal to 2. $`[n,k,d]_{4+}`$ indicates an additive code over $`F_4`$ containing $`4^k`$ vectors (so $`k\frac{1}{2}Z`$). Usually the subscript on the symbol for a code (e.g. $`e_8`$) gives its length. We adopt the convention that parentheses in a vector mean that all permutations indicated by the parentheses are to be applied to that vector. For example, in the definition of $`e_8`$ below, $`1(1101000)`$ stands for the seven vectors $`11101000`$, $`10110100`$, $`10011010`$, etc. The generators for the hexacode in (34) could have been abbreviated as $`(100)(1\omega \omega )`$.

The following codes are all self-dual.

($`2`$) The first example of a binary self-dual code is the $`[2,1,2]`$ repetition code $`i_2=\{00,11\}`$, with weight enumerator

$$W_{i_2}(x,y)=x^2+y^2=\varphi _2(\mathrm{say}),$$
(25)
and $`|Aut(i_2)|=2`$.

The $`[8,4,4]`$ Hamming code $`e_8`$ (see Section 12 of Chapter 1; , p. 80) generated by $`1(1101000)`$, is self-dual with weight enumerator

$$W_{e_8}(x,y)=x^8+14x^4y^4+y^8=\varphi _8,$$
(26)
and group $`GA_3(2)`$ of order $`\mathrm{8.7.6.4}=1344`$.

The $`[24,12,8]`$ binary Golay code $`g_{24}`$ (Section 12 of Chapter 1; , Chaps. 3, 11), generated by

$$1(10101110001100000000000),$$
(27)
or equivalently by the idempotent generator

$$1(00000101001100110101111),$$
(28)
has weight enumerator

$$W_{g_{24}}(x,y)=x^{24}+759x^{16}y^8+2576x^{12}y^{12}+759x^8y^{16}+y^{24}=\varphi _{24}.$$
(29)
$`Aut(g_{24})`$ is the Mathieu group $`M_{24}`$, of order $`\mathrm{24.23.22.21.20.48}=244823040`$.

All three codes $`i_2`$, $`e_8`$, $`g_{24}`$ are unique in the sense that any linear or nonlinear code with the same length, size and minimal distance and containing the zero vector is linear and equivalent to the code given above  (see also ).

($`3`$) Self-dual codes over $`F_3`$ exist if and only if the length $`n`$ is a multiple of 4 (this follows from Gleason’s theorem, see (104), and is also a consequence of the argument used to prove (7) ). We use indeterminates $`x,y`$ for the Hamming weight enumerator $`W(x,y)`$ and $`x,y,z`$ for the cwe.

The $`[4,2,3]_3`$ tetracode $`t_4`$, generated by $`\{1110,0121\}`$ (Section 7 of Chapter 1;  p. 81) has

$$W_{t_4}(x,y)=x^4+8xy^3$$
(30)
and cwe $`x\{x^3+(y+z)^3\}`$. $`Aut(t_4)=2.S(4)`$, where $`S(n)`$ denotes a symmetric group of order $`n!`$.

The $`[12,6,6]_3`$ ternary Golay code $`g_{12}`$ (Section 12 of Chapter 1; , p. 85), generated by $`1(11210200000)`$, has

$$W_{g_{12}}(x,y)=x^{12}+264x^6y^6+440x^3y^9+24y^{12}$$
(31)
and (assuming the all-ones codeword is present)

$$cwe(x,y,z)=x^{12}+y^{12}+z^{12}+22(x^6y^6+y^6z^6+z^6x^6)+220(x^6y^3z^3+x^3y^6z^3+x^3y^3z^6).$$
(32)
$`Aut(g_{12})=2.M_{12}`$ (where $`M_{12}`$ is a Mathieu group), of order 190080.

These two codes are unique in the same sense as our binary examples .

($`4^\mathrm{H}`$) We use indeterminates $`x,y`$ for the Hamming weight enumerator, $`x,y,z`$ for the swe and $`x,y,z,t`$ (corresponding to the symbols $`0,1,\omega ,\overline{\omega }`$) for the cwe, so that $`swe(x,y,z)=cwe(x,y,z,z)`$.

The $`[2,1,2]_4`$ repetition code $`i_2=\{00,11,\omega \omega ,\overline{\omega }\overline{\omega }\}`$ has

$`W_{i_2}(x,y)`$ $`=`$ $`x^2+3y^2,`$
$`swe`$ $`=`$ $`x^2+y^2+2z^2,`$
$`cwe`$ $`=`$ $`x^2+y^2+z^2+t^2,`$ (33)
and a group of order 12.

The $`[6,3,4]_4`$ hexacode $`h_6`$ (Section 12 of Chapter 1, \[71, p. 82\]) in the form with generator matrix

$$\left[\begin{array}{cccccc}1& 0& 0& 1& \omega & \omega \\ 0& 1& 0& \omega & 1& \omega \\ 0& 0& 1& \omega & \omega & 1\end{array}\right]$$
(34)
has

$`W_{h_6}(x,y)`$ $`=`$ $`x^6+45x^2y^4+18y^6,`$ (35)
$`swe`$ $`=`$ $`x^6+y^6+2z^6+15(2x^2y^2z^2+x^2z^4+y^2z^4),`$ (36)
$`cwe`$ $`=`$ $`x^6+y^6+z^6+t^6+15(x^2y^2z^2+x^2y^2t^2+x^2z^2t^2+y^2z^2t^2)`$ (37)
and $`Aut(h_6)=3.S(6)`$, of order 2160.

Again these codes are unique.

Of course this $`i_2`$ is simply the $`F_4`$-span of the binary code $`i_2`$ defined above. In general, if $`C`$ is defined over an alphabet $`F`$, and $`F^{}F`$ is a larger alphabet, we write $`CF^{}`$ to indicate this process.

If $`C`$ is a binary self-dual code then $`CF_4`$ is a self-dual code belonging to both families $`4^\mathrm{H}`$ and $`4^\mathrm{E}`$. Conversely, it is not difficult to show that if $`C`$ is self-dual over $`F_4`$ with respect to both the Hermitian and Euclidean inner products, then $`C=BF_4`$ for some self-dual binary code $`B`$.

($`4^\mathrm{E}`$) The $`[4,2,3]_4`$ Reed-Solomon code

$$\left[\begin{array}{cccc}1& 1& 1& 1\\ 0& 1& \omega & \overline{\omega }\end{array}\right]$$

has

$`W(x,y)`$ $`=`$ $`x^4+12xy^3+3y^4,`$
$`swe`$ $`=`$ $`x^4+y^4+2z^4+12xyz^2,`$
$`cwe`$ $`=`$ $`x^4+y^4+z^4+t^4+12xyzt.`$
The automorphism group is $`3.S(4)`$, of order 72.

($`4^{\mathrm{H}+}`$) The smallest example is the $`[1,\frac{1}{2},1]_{4+}`$ code $`i_1=\{0,1\}`$, with automorphism group of order 2 (conjugation). The $`[12,6,6]_{4+}`$ dodecacode $`z_{12}`$ can be defined as the cyclic code with generator $`\omega 10100100101`$ (, see also ). $`Aut(z_{12})`$ is a semi-direct product of $`Z(3)^3`$ with $`S(4)`$ (where $`Z(n)`$ denotes a cyclic group of order $`n`$) and has order 648.

($`q^\mathrm{H}`$) Since the norm map from $`F_q`$ to $`F_\sqrt{q}`$ is surjective, there is an element $`aF_q`$ with $`a\overline{a}=1`$. Then $`[1a]`$ is self-dual.

($`q^\mathrm{E}`$) As in family $`4^\mathrm{H}`$, there is a restriction on $`n`$: if $`q3`$ $`(mod4)`$ then self-dual codes exist if and only if $`n`$ is a multiple of 4; for other values of $`q`$, $`n`$ need only be even . Provided $`q(3)`$ $`(mod4)`$, $`F_q`$ contains an element $`i`$ such that $`i^2=1`$, and then $`[1i]`$ is self-dual.

($`4^Z`$) The smallest example is the self-dual code $`i_1=\{0,2\}`$ of length 1. The octacode $`o_8`$ (, ) is the length 8 code generated by the vectors $`3(2001011)`$, or equivalently with generator matrix

$$\left[\begin{array}{cccccccc}1& 0& 0& 0& 2& 1& 1& 1\\ 0& 1& 0& 0& 3& 2& 1& 3\\ 0& 0& 1& 0& 3& 3& 2& 1\\ 0& 0& 0& 1& 3& 1& 3& 2\end{array}\right],$$
(38)
having minimal Lee weight 6 and minimal norm 8,

$$swe=x^8+16y^8+z^8+14x^4z^4+112xy^4z(x^2+z^2),$$

and $`|Aut(o_8)|=2.1344`$.

The most interesting property of the octacode is that when mapped to a binary code under the Gray map

$$000,101,211,310,$$
(39)
$`o_8`$ becomes the Nordstrom-Robinson code, a nonlinear binary code of length 16, minimal distance 6, containing 256 words (Section 14 of Chapter 1, Chapter xx (Helleseth-Kumar), , ). The latter is therefore a formally self-dual binary code, see Section 3.3.

The octacode reduces $`mod2`$ to the Hamming code $`e_8`$. There is another lift of $`e_8`$ to $`Z_4`$, namely the code $`_8`$, with generator matrix

$$\left[\begin{array}{cccccccc}1& 0& 0& 0& 0& 1& 1& 1\\ 0& 1& 0& 0& 3& 0& 1& 3\\ 0& 0& 1& 0& 3& 3& 0& 1\\ 0& 0& 0& 1& 3& 1& 3& 0\end{array}\right],$$
(40)
but the minimal Lee weight and norm are now both only 4. However, not all binary self-dual codes lift to self-dual codes over $`Z_4`$, e.g. $`\{00,11\}`$ does not.

###### Theorem 3

(a) Let $`C`$ be a binary self-dual code of length $`n`$. A necessary and sufficient condition for $`C`$ to be lifted to a self-dual code $`\widehat{C}`$ over $`Z_4`$ is that all weights in $`C`$ are divisible by 4. (b) If this condition is satisfied, $`\widehat{C}`$ can be chosen so that all norms are divisible by 8. (c) More generally, a self-dual code over $`Z_m`$, $`m`$ even, that reduces to a self-dual code $`mod2`$ lifts to $`Z_{2m}`$ precisely when all norms are divisible by $`2m`$, and in that case all norms in the lifted code can be arranged to be divisible by $`4m`$. Thus if a code lifts from $`Z_m`$ to $`Z_{2m}`$ then it lifts to $`Z_{2^km}`$ for all $`k`$. In particular, if a binary code lifts to $`Z_4`$ then it lifts to a self-dual code over the 2-adic integers.

#### Proof.

(a) (Necessity) Suppose $`vC`$ has weight $`wt(v)0`$ $`(mod4)`$, and let $`\widehat{v}\widehat{C}`$ be any lift of $`v`$. Then $`\mathrm{Norm}(\widehat{v})\mathrm{Norm}(v)`$ $`(mod4)`$ because for integers $`x,y`$ if $`xy`$ $`(mod2)`$ then $`x^2y^2`$ $`(mod4)`$.

(Sufficiency) Without loss of generality $`C`$ has a generator matrix of the form $`[IA]`$ where $`AA^{tr}I`$ $`(mod2)`$. Let $`B`$ be any lift of $`A`$ to $`Z_4`$. We wish to find $`\widehat{A}=B+2M`$ such that $`\widehat{A}\widehat{A}^{tr}I`$ $`(mod4)`$, since then we can take $`\widehat{C}=[I\widehat{A}]`$. We have

$$\widehat{A}\widehat{A}^{tr}BB^{tr}+2(MB^{tr}+BM^{tr})(mod4).$$

The condition on $`C`$ implies that $`BB^{tr}+I`$ has even coefficients and is zero on the diagonal. But then there exists a binary matrix $`M^{}`$ such that $`2(M^{}+M^{tr})=BB^{tr}+I`$, and we take $`M=M^{}(B^1)^{tr}`$. This completes the proof of (a).

(b) We need to show that we can choose $`\widehat{A}`$ so that the diagonal entries of $`\widehat{A}\widehat{A}^{tr}+I`$ are zero $`mod8`$. Set $`\widehat{A}^{}=\widehat{A}2L\widehat{A}`$, where $`L`$ is symmetric, so that

$$\widehat{A}^{}(\widehat{A}^{})^{tr}=\widehat{A}\widehat{A}^{tr}+4L+4L^2(mod8).$$

Let $`\mathrm{\Delta }=\frac{1}{4}(\widehat{A}\widehat{A}^{tr}+I)`$. Then we need $`L^2+L+\mathrm{\Delta }`$ $`(mod2)`$ to be symmetric with zero diagonal. It is easy to see that we can accomplish this provided $`\mathrm{trace}(\mathrm{\Delta })0`$ $`(mod2)`$ (consider, for instance, $`L=\left(\genfrac{}{}{0pt}{}{1}{1}\genfrac{}{}{0pt}{}{1}{0}\right)`$.) In fact, we have

$$1det(\widehat{A}\widehat{A}^{tr})1+4\mathrm{trace}\mathrm{\Delta }(mod8)$$

so trace $`\mathrm{\Delta }`$ is even.

The proof of (c) is analogous.

It follows from Theorem 3 that the Golay code $`g_{24}`$ can be lifted to $`Z_4`$. Since $`g_{24}`$ is an extended cyclic code, the lift can be easily performed by Graeffe’s method , . Suppose $`g_2(x)`$ divides $`x^n1`$ $`(mod2)`$, and we wish to find a monic polynomial $`g(x)`$ over $`Z_4`$ such that $`g(x)g_2(x)`$ $`(mod2)`$ and $`g(x)`$ divides $`x^n1`$ $`(mod4)`$. Let $`g_2(x)=e(x)d(x)`$, where $`e(x)`$ contains only even powers and $`d(x)`$ only odd powers. Then $`g(x)`$ is given by $`g(x^2)=\pm (e^2(x)d^2(x))`$. Applying this technique to the generator polynomial for $`g_{24}`$, that is, to $`g_2(x)=1+x+x^5+x^6+x^7+x^9+x^{11}`$ (see (27)), we obtain $`g(x)=1+x+2x^4x^5x^6x^7x^9+2x^{10}+x^{11}`$, and so

$$3(31002333032100000000000)$$
(41)
generates a self-dual code $`G_{24}`$ of length 24 which is the Golay code lifted to $`Z_4`$. Iterating this process enables us to lift cyclic or extended cyclic codes to $`Z_{2^m}`$ for arbitrarily large $`m`$.

(F1) Let $`q=5`$. Then

$$\left[\begin{array}{cccccc}1& v& v& 1& 0& 0\\ 0& 1& v& v& 1& 0\\ 0& 0& 1& v& v& 1\end{array}\right]$$
(42)
where $`v=(1+u)/2`$, generates a self-dual code of length 6 over $`F_5[u]/(u^2)`$.

The matrix (42) also generates self-dual codes from family $`q^\mathrm{H}`$. Suppose $`q`$ is a prime power such that $`v^2v1`$ has no solution in $`F_q`$, and let $`v`$ be a solution in $`F_{q^2}`$. Then (42) defines a Hermitian self-dual code over $`F_{q^2}`$ with minimal distance 4. In the case $`q=2`$ we get the hexacode.

(F3) The 2-adic Hamming code  is the self-dual code of length 8 with generator matrix

$$\left[\begin{array}{cccccccc}1& \lambda & \lambda 1& 1& 0& 0& 0& 1\\ 0& 1& \lambda & \lambda 1& 1& 0& 0& 1\\ 0& 0& 1& \lambda & \lambda 1& 1& 0& 1\\ 0& 0& 0& 1& \lambda & \lambda 1& 1& 1\end{array}\right],$$

where $`\lambda `$ is the 2-adic integer $`(1+\sqrt{7})/2`$. The 2-adic expansion of $`\lambda `$ is

$$\lambda =2+4+32+128+256+512+1024+2048+4096+32768+\mathrm{}$$

This is the cyclic code with generator

$$1,\lambda ,\lambda 1,1,0,0,0$$

with a 1 appended to each of the generators.

Similarly, the 2-adic self-dual Golay code of length 24 is the cyclic code with generator

$$1,1\lambda ,2\lambda ,4,\lambda 4,2\lambda 3,2\lambda +1,\lambda +3,4,3\lambda ,\lambda ,1,0,0,0,0,0,0,0,0,0,0,0,$$

where now $`\lambda =(1+\sqrt{23})/2`$, with a 1 appended to each of the 12 generators.

The 3-adic self-dual Golay code of length 12 is the cyclic code with generator

$$1,\lambda ,1,1,\lambda 1,1,0,0,0,0,0,$$

where $`\lambda =(1+\sqrt{11})/2`$, again with a 1 appended to each generator.

(F4) We shall not discuss these codes here, but refer the reader to Wood .

### 3.3 MacWilliams Theorems

MacWilliams (; see also ) discovered that the Hamming weight distribution of the dual of a linear code is determined just by the Hamming weight distribution of the code. There are versions of this theorem for most of our families of codes. Although there are several ways to state these identities, the simplest formulation is always in terms of the weight enumerator polynomials (it is for this reason that we insist that the weight enumerator should be a homogeneous polynomial).

###### Theorem 4

(MacWilliams and others.)

($`2`$) Three equivalent formulations of the result for binary self-dual codes are:

$`W_C^{}(x,y)`$ $`=`$ $`{\displaystyle \frac{1}{|C|}}W_C(x+y,xy),`$ (43)
$`{\displaystyle \underset{uC^{}}{}}x^{nwt(u)}y^{wt(u)}`$ $`=`$ $`{\displaystyle \frac{1}{|C|}}{\displaystyle \underset{uC}{}}(x+y)^{nwt(u)}(xy)^{wt(u)},`$ (44)
and, if $`\{A_0^{},A_1^{},\mathrm{}\}`$ is the weight distribution of $`C^{}`$,

$$A_k^{}=\frac{1}{|C|}\underset{i=0}{\overset{n}{}}A_iP_k(i)$$
(45)
where

$$P_k(x)=\underset{j=0}{\overset{k}{}}(1)^j\left(\genfrac{}{}{0pt}{}{x}{j}\right)\left(\genfrac{}{}{0pt}{}{nx}{kj}\right),k=0,\mathrm{},n,$$

is a Krawtchouk polynomial (, Chap. 5; etc.). There are analogous Krawtchouk polynomials for any alphabet, see , p. 151. For the remaining cases we give just the formulation in terms of weight enumerators.

($`3`$)

$`W_C^{}(x,y)`$ $`=`$ $`{\displaystyle \frac{1}{|C|}}W_C(x+2y,xy),`$
$`cwe_C^{}(x,y,z)`$ $`=`$ $`{\displaystyle \frac{1}{|C|}}cwe_C(x+y+z,x+\omega y+\overline{\omega }z,x+\overline{\omega }y+\omega z).`$
($`4^\mathrm{H}`$) and ($`4^{\mathrm{H}+}`$)

$`W_C^{}(x,y)`$ $`=`$ $`{\displaystyle \frac{1}{|C|}}W_C(x+3y,xy),`$
$`swe_C^{}(x,y,z)`$ $`=`$ $`{\displaystyle \frac{1}{|C|}}swe_C(x+y+2z,x+y2z,xy),`$
$`cwe_C^{}(x,y,z,t)`$ $`=`$ $`{\displaystyle \frac{1}{|C|}}cwe_C(x+y+z+t,x+yzt,xy+zt,xyz+t).`$
($`4^\mathrm{E}`$)

$`W_C^{}(x,y)`$ $`=`$ $`{\displaystyle \frac{1}{|C|}}W_C(x+3y,xy),`$
$`swe_C^{}(x,y,z)`$ $`=`$ $`{\displaystyle \frac{1}{|C|}}swe_C(x+y+2z,x+y2z,xy),`$
$`cwe_C^{}(x,y,z,t)`$ $`=`$ $`{\displaystyle \frac{1}{|C|}}cwe_C^{}(x+y+z+t,x+yzt,xyz+t,xy+zt).`$
($`q^\mathrm{H}`$)

$$W_C^{}(x,y)=\frac{1}{|C|}W_C(x+(q1)y,xy).$$
(46)
Let $`\lambda `$ be a nontrivial linear functional from $`F_q`$ to $`F_p`$, and set

$$\chi _\beta (x)=e^{2\pi i\lambda (\beta \overline{x})/p}.$$
(47)
The cwe for $`C^{}`$ is obtained from the cwe for $`C`$ by replacing each $`x_j`$ by

$$\underset{k=0}{\overset{q1}{}}\chi _{\xi _j}(\xi _k)x_k.$$

(We omit discussion of the swe, since there are several different ways in which it might be defined.)

($`q^\mathrm{E}`$) Same as for $`q^\mathrm{H}`$, but omitting the bar in (47).

($`4^Z`$)

$`W_C^{}(x,y)`$ $`=`$ $`{\displaystyle \frac{1}{|C|}}W_C(x+3y,xy)`$
$`swe_C^{}(x,y,z)`$ $`=`$ $`{\displaystyle \frac{1}{|C|}}swe_C(x+2y+z,xy,x2y+z)`$
$`cwe_C^{}(x,y,z,t)`$ $`=`$ $`{\displaystyle \frac{1}{|C|}}cwe_C(x+y+z+t,x+iyzit,xy+zt,xiyz+it).`$
($`m^Z`$)

$$W_C^{}(x,y)=\frac{1}{|C|}W_C(x+(m1)y,xy).$$

The cwe for $`C^{}`$ is obtained from the cwe for $`C`$ by replacing each $`x_j`$ by

$$\underset{k=0}{\overset{m1}{}}e^{2\pi ijk/m}x_k.$$
(48)
#### Proof.

We prove the result for family $`2`$. There are analogous proofs for the other cases, cf. Section 10 of Chapter 1, Section 8 of Chapter xx (Helleseth-Kumar), , \[191, Chap. 5\].

Let $`f`$ be a polynomial-valued function on $`F_2^n`$. Define the Fourier (or Hadamard) transform of $`f`$ by

$$\widehat{f}(u)=\underset{vF_2^n}{}(1)^{u.v}f(v),uF_2^n.$$

If $`C`$ is a linear code it is straightforward to verify that

$$\underset{uC^{}}{}f(u)=\frac{1}{|C|}\underset{uC}{}\widehat{f}(u).$$
(49)
(This is a version of the Poisson summation formula — cf. .) Now we set $`f(u)=x^{nwt(u)}y^{wt(u)}`$, and after some algebra (the details can be found on p. 126 of ) discover that

$$\widehat{f}(u)=(x+y)^{nwt(u)}(xy)^{wt(u)}.$$
(50)
Equations (49) , (50) together imply (44).

### Examples

(a) The repetition code $`C`$ over a field $`F_q`$ has Hamming weight enumerator

$$W_C(x,y)=x^n+(q1)y^n,$$

so from (46) we deduce that the dual code $`C^{}`$, the zero-sum code, has weight enumerator

$$W_C^{}(x,y)=\frac{1}{q}\left\{(x+(q1)y)^n+(q1)(xy)^n\right\}.$$

Note that when $`n=2`$, $`W_C^{}=W_C`$ (compare case (e) of Theorem 5).

(b) The binary codes $`i_2`$ and $`e_8`$ are self-dual, and indeed one easily verifies that their weight enumerators $`x^2+y^2`$ (25) and $`x^8+14x^4y^4+y^8`$ (26) are left unchanged if $`x`$ and $`y`$ are replaced by $`(x+y)/\sqrt{2}`$ and $`(xy)/\sqrt{2}`$.

### Remarks

1. The map that sends $`W_C(x,y)`$ to $`\frac{1}{|C|}W_C(x+y,xy)`$, or that sends $`\{A_0,A_1,\mathrm{}\}`$ to $`\{A_0^{},A_1^{},\mathrm{}\}`$ as in (45), is often called the MacWilliams or Krawtchouk transform. A remarkable theorem of Delsarte  — see Chapters xx (Brouwer), yy (Camion), zz (Levenshtein) — shows that this transform is useful even for nonlinear codes.

2. For the families $`2`$, $`4^\mathrm{H}`$, $`4^\mathrm{E}`$ and $`4^{\mathrm{H}+}`$ all the MacWilliams transforms have order 2, as they do for the Hamming weight enumerators for families $`3`$ and $`4^Z`$ and the swe for $`4^Z`$. For the cwe in families $`3`$ and $`4^Z`$ the square of the MacWilliams transform takes $`x_j`$ to $`x_j`$. However, this does not change the cwe of the code, and so, in all cases, if the MacWilliams transform is applied twice, the original weight enumerator is recovered.

3. The identity for the swe in family $`m^Z`$ is left to the reader. For (F1) we refer to Bachoc  and for (F4) to Wood . Duality fails for (F2) and weights are undefined in case (F3).

4. Shor and Laflamme  show that there is an analogue of the MacWilliams identity for quantum codes. There is also an analogue of the shadow .

### 3.4 Isodual and formally self-dual codes

Following , we say that a linear code which is equivalent to its dual is isodual. A (possibly nonlinear) code with the property that its weight enumerator coincides with its MacWilliams transform is called formally self-dual. An isodual code is automatically formally self-dual.

It is easy to prove that any self-dual code from family $`4^Z`$ produces a formally self-dual binary code using the Gray map (39) (, ). As already mentioned in Section 3.2, the octacode $`o_8`$ produces the (formally self-dual) Nordstrom-Robinson code in this way. Similarly,333We are indebted to Dave Forney for these remarks. a self-dual code from family $`4^{\mathrm{H}+}`$ produces an isodual binary code using the map

$$000,111,\omega 01,\overline{\omega }10.$$
(51)
We give several examples of this construction.

(i) The code $`d_3^+`$ (see Section 11.7) produces the isodual $`[6,3,3]`$ binary code with generator matrix

$$\left[\begin{array}{ccc}11\hfill & 11\hfill & 00\hfill \\ 11\hfill & 00\hfill & 11\hfill \\ 10\hfill & 10\hfill & 10\hfill \end{array}\right].$$
(52)
(The dual, which is a different code, is obtained by interchanging the last two columns.)

(ii) The shortened hexacode, $`h_5`$, (see Section 12.4) produces an isodual $`[10,5,4]`$ code.

(iii) The hexacode $`h_6`$ produces an isodual $`[12,6,4]`$ code. There is an additive but not linear version of the hexacode, $`h_6^{}`$, found by Ran and Snyders , generated by $`(0011\omega \overline{\omega })`$, which under the map (51) produces a second, inequivalent, isodual $`[12,6,4]`$ code. As members of the family $`4^{\mathrm{H}+}`$, however, $`h_6`$ and $`h_6^{}`$ are equivalent.

Further examples of formally self-dual codes will be mentioned in Remark 4 following Theorem 5. Isodual and formally self-dual codes have also been studied in , , , , , ,  (see also ).

## 4 Restrictions on weights

### 4.1 Gleason-Pierce Theorem

It is elementary that in a binary self-orthogonal code the weight of every vector is even, in a ternary self-dual code the weight of every vector is a multiple of 3, and in a Hermitian self-dual code over $`F_4`$ the weight of every vector is even. Furthermore, there are many well-known binary self-dual codes whose weights are divisible by 4 — see above. The following theorem, due to Gleason and Pierce, shows that these four are essentially the only possible nontrivial divisibility restrictions that can be imposed on the weights of self-dual codes.

###### Theorem 5

(Gleason and Pierce .) If $`C`$ is a self-dual code belonging to any of the families $`2`$ through $`m^Z`$ which has all its Hamming weights divisible by an integer $`c>1`$ then one of the following holds:

$$\begin{array}{ccc}(a)\hfill & |F|=2,c=2\hfill & (\text{so family }2)\hfill \\ (b)\hfill & |F|=2,c=4\hfill & (\text{so family }2)\hfill \\ (c)\hfill & |F|=3,c=3\hfill & (\text{so family }3)\hfill \\ (d)\hfill & |F|=4,c=2\hfill & (\text{so families }4^\mathrm{H}\text{}4^\mathrm{E}\text{}4^{\mathrm{H}+}\text{}4^Z)\hfill \\ (e)\hfill & \multicolumn{2}{c}{|F|=q,q\text{ arbitrary},c=2,\mathrm{and}}\end{array}$$

the Hamming weight enumerator of $`C`$ is

$$(x^2+(q1)y^2)^{n/2}.$$

#### Remarks.

1. The theorem may be proved by considering how the Hamming weight enumerator behaves under the MacWilliams transform — see  for details. An alternative proof of a somewhat more general result is given in  — see Theorem 13.5 of Chapter xx (Ward).

2. The same conclusion holds if “$`C`$ is self-dual” is replaced by “$`C`$ is formally self-dual”.

3. Note that there are no nontrivial examples from families $`q^\mathrm{H}`$, $`q^\mathrm{E}`$ or $`m^Z`$.

4. There are several points to be mentioned concerning case (e). Linear self-dual codes with weight enumerator $`(x^2+(q1)y^2)^{n/2}`$ always exist in families $`2`$, $`4^\mathrm{H}`$, $`4^\mathrm{E}`$, $`4^{\mathrm{H}+}`$, $`q^\mathrm{H}`$; exist in families $`q^\mathrm{E}`$ and $`m^Z`$ precisely when there is a square root of $`1`$ in $`F_q`$ or $`Z_m`$ respectively; in particular, they never exist in families $`3`$ or $`4^Z`$.

Furthermore, it is easy to see that any linear code over $`F_q`$ for $`q>2`$ with weight enumerator $`(x^2+(q1)y^2)^{n/2}`$ is a direct sum of codes of length 2. However, in the binary case there are many examples of linear codes with weight enumerator $`(x^2+y^2)^{n/2}`$ that are not self-dual: these have been classified for $`n16`$, see . These are examples of formally self-dual codes: see Section 3.4. There are also examples from family $`4^{\mathrm{H}+}`$, e.g. the additive code $`[1100,0110,0011,\omega \omega \omega \omega ]`$ with weight enumerator $`(x^2+3y^2)^2`$.

5. In some cases, analogous restrictions can be imposed on Euclidean norms of codewords. In particular, suppose $`C`$ is a self-dual code over $`Z_m`$ (that is, a code from families $`4^Z`$ or $`m^Z`$) where $`m`$ is even. Then the Euclidean norms of the codewords must be divisible by $`m`$, and may be divisible by $`2m`$ (, , , see also Theorem 3).

6. Codes from family (F1) with $`q=2`$ can also satisfy case (d) of the theorem, since they can be embedded in family $`4^{\mathrm{H}+}`$ via the map $`a+bua+b\omega `$.

### Examples

Many of the examples given in Section 3.2 satisfy one of these divisibility conditions:

($`2`$): all self-dual codes satisfy (a), and $`e_8`$ and $`g_{24}`$ satisfy (b). Note that any code satisfying (b) is self-orthogonal (from (22)).

($`3`$): a code satisfies (c) precisely when it is self-orthogonal

($`4^\mathrm{H}`$): a code satisfies (d) precisely when it is self-orthogonal

($`4^\mathrm{E}`$): a self-dual code satisfying (d) is a linearized binary code

($`4^{\mathrm{H}+}`$): The dodecacode $`z_{12}`$ satisfies (d). Any code satisfying (d) is self-orthogonal.

### 4.2 Type I and Type II codes

A binary self-dual code $`C`$ with all weights divisible by 4 is called doubly-even444The unqualified term “even” has been used to denote both Type I and Type II codes, and is therefore to be avoided when speaking of self-dual codes.  Use “singly-even” or “doubly-even” instead. or of Type II; if we do not impose this restriction then $`C`$ is singly-even or of Type I. We denote these two families by $`2_\mathrm{I}`$ and $`2_{\mathrm{II}}`$. A Type I code may or may not also be of Type II: the classes are not mutually exclusive. We say a code is strictly Type I if it is not of Type II.

Similarly, we will say that a self-dual code over $`Z_m`$, $`m`$ even, from the families $`4^Z`$ or $`m^Z`$ is of Type II if the Euclidean norms are divisible by $`2m`$, or of Type I if they are divisible by $`m`$. (This terminology was introduced in , , .) We denote these families by $`4_\mathrm{I}^Z`$ (or $`m_\mathrm{I}^Z`$) and $`4_{\mathrm{II}}^Z`$ (or $`m_{\mathrm{II}}^Z`$).

There is one other situation where a similar distinction can be made. An additive trace-Hermitian self-dual code over $`F_4`$ from the family $`4^{\mathrm{H}+}`$ is of Type II if the Hamming weights are even, or of Type I if odd weights may occur (if odd weights do occur then the code cannot be linear). We denote these two families by $`4_\mathrm{I}^{\mathrm{H}+}`$ and $`4_{\mathrm{II}}^{\mathrm{H}+}`$.

More generally, we will say that a binary code is doubly-even if all its weights are divisible by 4, or singly-even if its weights are even. It follows from (22) that a doubly-even code is necessarily self-orthogonal (and from (23) and (24) that Type II codes over $`Z_m`$ and $`F_4`$ are necessarily self-orthogonal).

In view of Theorem 5, in the past self-dual codes over $`F_3`$ have been called Type III codes, and Hermitian self-dual codes over $`F_4`$ have been called Type IV codes. However, we shall not use that terminology in this chapter.

## 5 Shadows

In the three cases where we can define a Type II code (see the previous section) we can also define a certain canonical translate of a code called its shadow . The weight enumerator of the shadow can be obtained from the weight enumerator of the code via a transformation analogous to the MacWilliams transform of Theorem 4.

We first discuss binary codes.

###### Lemma 1

Let $`C`$ be a self-orthogonal singly-even binary code, and let $`C_0`$ be the subset of doubly-even codewords. Then $`C_0`$ is a linear subcode of index 2 in $`C`$.

#### Proof.

From (22), $`\frac{1}{2}wt(u)`$ is a linear functional on $`C`$, and $`C_0`$ is its kernel.

###### Definition 1

. The shadow555A somewhat more general definition of shadow has been proposed in , but since it fails to possess the crucial properties (i) and (iii) of Theorem 6 we shall not discuss it here. $`S`$ of a self-orthogonal binary code $`C`$ is

$$S=\left\{\begin{array}{cc}C_0^{}C^{}\hfill & \text{if }C\text{ is singly-even}\hfill \\ C^{}\hfill & \text{if }C\text{ is doubly-even}\hfill \end{array}\right\}.$$

The weight enumerator of the shadow of $`C`$ will usually be denoted by $`S_C(x,y)`$.

#### Examples.

(i) If $`C`$ is the repetition code $`\{0^n,1^n\}`$ of even length $`n`$, then if $`n0`$ $`(mod4)`$, $`S=C^{}=`$ all even weight vectors, but if $`n2`$ $`(mod4)`$, $`S=`$ all odd weight vectors. (ii) If $`C=i_2i_2\mathrm{}i_2`$ then $`S`$ is the translate of $`C`$ by $`1010\mathrm{}10`$. (iii) Let $`C`$ be the $`[22,11,6]`$ shorter Golay code $`g_{22}`$, obtained by “subtracting” (see Section 11.3) $`i_2`$ from $`g_{24}`$, so that $`g_{22}`$ consists of all words of $`g_{24}`$ that begin 00 or 11, with these two coordinates deleted. Then $`S`$ consists of the remaining words of $`g_{24}`$ with the same two coordinates deleted.

###### Theorem 6

 The shadow $`S`$ has the following properties:

(i) $`S`$ is the set of “parity vectors” for $`C`$; that is,

$$S=\{uF_2^n:(u,v)\frac{1}{2}wt(v)mod2\text{for all}vC\}$$
(53)
(ii) $`S`$ is a coset of $`C^{}`$

(iii)

$$S_C(x,y)=\frac{1}{|C|}W_C(x+y,i(xy)).$$
(54)
#### Proof.

If $`C`$ is doubly-even then (i) and (ii) are immediate, and (iii) follows from the MacWilliams transform and the fact that the weights are divisible by 4. Suppose $`C`$ is singly-even, let $`C_0`$ be the doubly-even subcode, and let $`C_1=CC_0`$. Then

$$C_0CC^{}C_0^{}.$$
(55)
The first and last inclusions have index 2, so $`C_0^{}=C^{}(a+C^{})`$, say, where $`(a,u)=0`$ for $`uC_0`$, $`(a,v)=1`$ for $`vC_1`$. Thus $`S=C_0^{}C_0=a+C_0`$ has the properties stated in (i) and (ii). Also,

$`W_{C_0}(x,y)`$ $`=`$ $`{\displaystyle \frac{1}{2}}\left\{W_C(x,y)+W_C(x,iy)\right\},`$
$`W_{C_0^{}}(x,y)`$ $`=`$ $`{\displaystyle \frac{1}{|C|}}\{W_C(x+y,xy)+W_C(x+y,i(xy)\},`$
so

$$S_C(x,y)=W_{C_0^{}}W_C^{}=\frac{1}{|C|}W_C(x+y,i(xy)).\text{ }$$

If $`C`$ is a singly-even self-dual code with doubly-even subcode $`C_0`$, then $`C_0^{}`$ is the union of four translates of $`C_0`$, say $`C_0`$, $`C_1`$, $`C_2`$, $`C_3`$, with

$$C=C_0C_2,S=C_1C_3.$$
(56)
When $`n`$ is a multiple of 8 then $`C^{}=C_0C_1`$ and $`C^{\prime \prime }=C_0C_3`$ are both Type II codes (in the notation of Chapter xx (Pless), $`C^{}`$ and $`C^{\prime \prime }`$ are neighbors of $`C`$). If $`C`$ has a weight 2 word then $`C^{}`$ and $`C^{\prime \prime }`$ are equivalent.

Similar definitions for the shadow can be given in the other two cases mentioned. If $`C`$ is an additive trace-Hermitian self-orthogonal code over $`F_4`$, let $`C_0`$ be the subcode with even Hamming weights, and secondly, if $`C`$ is a self-orthogonal code over $`Z_m`$ ($`m`$ even) let $`C_0`$ be the subcode with Euclidean norms divisible by $`2m`$. In both cases the shadow is defined by:

$$S=\{\begin{array}{cc}C_0^{}C_0\hfill & \text{if}CC_0\hfill \\ C^{}\hfill & \text{if}C=C_0.\hfill \end{array}$$

If $`C`$ is self-dual from family $`4^{\mathrm{H}+}`$ then the quotient group $`C_0^{}/C_0`$ is isomorphic to $`Z(2)\times Z(2)`$. If $`C`$ is self-dual from family $`m^Z`$ then $`C_0^{}/C_0`$ is isomorphic to $`Z(2)\times Z(2)`$ if $`n`$ is even and to $`Z(4)`$ if $`n`$ is odd.

There are analogues of Theorem 6.

###### Theorem 7

Let $`C`$ be a self-orthogonal additive code over $`F_4`$, with shadow $`S`$.

(i) $`S=\{uF_4^n:(u,v)wt(v)(mod2)\text{for all }vC\}`$

(ii) $`S`$ is a coset of $`C^{}`$

(iii)

$$S_C(x,y)=\frac{1}{|C|}W_C(x+3y,yx),$$

$$swe_S(x,y,z)=\frac{1}{|C|}swe_C(x+y+2z,xy+2z,yx)$$

$$cwe_S(x,y,z,t)=\frac{1}{|C|}cwe_C(x+y+z+t,xy+z+t,x+yz+t,x+y+zt).$$

#### Remark.

It follows from Theorem 7 that there is a code equivalent to $`C`$ that has $`1^nS`$. For the number of vectors of weight $`n`$ in $`S`$ is

$$S_C(0,1)=\frac{1}{|C|}W_C(3,1)>0.$$

All vectors of full weight are equivalent.

###### Theorem 8

Let $`C`$ be a self-orthogonal linear code over $`Z_4`$, with shadow $`S`$.

(i) $`S=\{uZ_4^n:(u,v)\frac{1}{2}\mathrm{Norm}(v)(mod4)\text{for all }vC\}`$

(ii) $`S`$ is a coset of $`C^{}`$

(iii) $`swe_S(x,y,z)=\frac{1}{|C|}swe_C(x+2y+z,\eta (xy),x+2yz)`$, where $`\eta =e^{\pi i/4}`$,

$$cwe_S(x,y,z,t)=\frac{1}{|C|}cwe_C(x+y+z+t,\eta (x+iyzit),(xy+zt),\eta (xiyz+it)).$$

#### Remark.

It follows that the shadow contains a vector of the form $`\pm 1^n`$. (For $`cwe_S(0,1,0,1)=\frac{1}{|C|}cwe_C(2,0,2,0)=cwe_C(1,0,1,0)>0`$, since $`0^nC`$.) This observation, and a formula for the swe equivalent to ours, can be found in . In particular, a self-dual code from family $`4_{\mathrm{II}}^Z`$ contains a vector of the form $`\pm 1^n`$.

###### Theorem 9

Let $`C`$ be a self-orthogonal linear code over $`Z_m`$, $`m`$ even, with shadow $`S`$.

(i) $`S=\{uZ_m^n:(u,v)\frac{1}{2}\mathrm{Norm}(v)(modm)\text{for all }vC\}`$

(ii) $`S`$ is a coset of $`C^{}`$

(iii) The cwe of $`S`$ is obtained from the cwe of $`C`$ by replacing each $`x_j`$ by

$$\underset{k=0}{\overset{m1}{}}e^{2\pi i(j^2+2jk)/2m}x_k,$$

and then dividing by $`|C|`$.

The proofs are analogous to that of Theorem 6.

## 6 Invariant theory

### 6.1 An introduction to invariant theory

If $`C`$ is self-dual then its weight enumerator must be unchanged by the appropriate transformation from Theorem 4. As we will see, this imposes strong restrictions on the weight enumerator.

We begin by discussing the particular case of the weight enumerator $`W(x,y)`$ of a binary doubly-even self-dual code $`C`$. Since $`C`$ is self-dual, Theorem 4 implies

$`W(x,y)`$ $`=`$ $`{\displaystyle \frac{1}{2^{n/2}}}W(x+y,xy)`$ (57)
$`=`$ $`W({\displaystyle \frac{x+y}{\sqrt{2}}},{\displaystyle \frac{xy}{\sqrt{2}}})`$
(for $`W(x,y)`$ is homogeneous of degree $`n`$). Since all weights are divisible by 4, $`W(x,y)`$ only contains powers of $`y^4`$. Therefore

$$W(x,y)=W(x,iy).$$
(58)
The problem we wish to solve is to find all polynomials $`W(x,y)`$ satisfying (57) and (58).

#### Invariants.

Equation (57) says that $`W(x,y)`$ is unchanged, or invariant, under the linear transformation

$$\begin{array}{cc}& \text{replace }x\text{ by}\frac{x+y}{\sqrt{2}},\hfill \\ T_1:\hfill & \\ & \text{replace }y\text{ by}\frac{xy}{\sqrt{2}},\hfill \end{array}$$

or, in matrix notation,

$$T_1:\text{replace}\left(\genfrac{}{}{0pt}{}{x}{y}\right)\text{by}\frac{1}{\sqrt{2}}\left(\genfrac{}{}{0pt}{}{1}{1}\genfrac{}{}{0pt}{}{1}{1}\right)\left(\genfrac{}{}{0pt}{}{x}{y}\right).$$

Similarly, (58) says that $`W(x,y)`$ is also invariant under the transformation

$$\begin{array}{cc}& \text{replace }x\text{ by }x\hfill \\ T_2:\hfill & \\ & \text{replace }y\text{ by }iy\hfill \end{array}$$

or

$$T_2:\text{replace}\left(\genfrac{}{}{0pt}{}{x}{y}\right)\text{by}\left(\genfrac{}{}{0pt}{}{1}{0}\genfrac{}{}{0pt}{}{0}{i}\right)\left(\genfrac{}{}{0pt}{}{x}{y}\right).$$

Of course $`W(x,y)`$ must therefore be invariant under any combination $`T_1^2`$, $`T_1T_2`$, $`T_1T_2T_1,\mathrm{}`$ of these transformations. It is not difficult to show (as we shall see in the next section) that the matrices

$$\frac{1}{\sqrt{2}}\left(\genfrac{}{}{0pt}{}{1}{1}\genfrac{}{}{0pt}{}{1}{1}\right)\mathrm{and}\left(\genfrac{}{}{0pt}{}{1}{0}\genfrac{}{}{0pt}{}{0}{i}\right)$$

when multiplied together in all possible ways produce a group $`𝒢_1`$ containing 192 matrices.

So our problem now says: find the polynomials $`W(x,y)`$ which are invariant under all 192 matrices in the group $`𝒢_1`$.

#### How many invariants?

The first thing we want to know is how many invariants there are. This isn’t too precise, because of course if $`f`$ and $`g`$ are invariants, so is any constant multiple $`cf`$ and also $`f+g`$, $`fg`$ and the product $`fg`$. Also it is enough to study the homogeneous invariants (in which all terms have the same degree).

So the right question to ask is: how many linearly independent, homogeneous invariants are there of each degree $`d`$? Let’s call this number $`a_d`$.

A convenient way to handle the numbers $`a_0,a_1,a_2,\mathrm{}`$ is by combining them into a power series or generating function

$$\mathrm{\Phi }(\lambda )=a_0+a_1\lambda +a_2\lambda ^2+\mathrm{}.$$

Conversely, if we know $`\mathrm{\Phi }(\lambda )`$, the numbers $`a_d`$ can be recovered from the power series expansion of $`\mathrm{\Phi }(\lambda )`$.

At this point we invoke a beautiful theorem of T. Molien, published in 1897 (; see also , p. 21; , p. 110; , p. 301; , p. 259; , p. 86; , p. 29).

###### Theorem 10

(Molien) For any finite group $`𝒢`$ of complex $`m\times m`$ matrices, $`\mathrm{\Phi }(\lambda )`$ is given by

$$\mathrm{\Phi }(\lambda )=\frac{1}{|𝒢|}\underset{A𝒢}{}\frac{1}{det(I\lambda A)}.$$
(59)
We call $`\mathrm{\Phi }(\lambda )`$ the Molien series of $`𝒢`$. The proof of this theorem is given in the next section.

For our group $`𝒢_1`$, from the matrices corresponding to $`I`$, $`T_1`$, $`T_2,\mathrm{}`$ we get

$$\mathrm{\Phi }(\lambda )=\frac{1}{192}\left\{\frac{1}{(1\lambda )^2}+\frac{1}{1\lambda ^2}+\frac{1}{(1\lambda )(1i\lambda )}+\mathrm{}\right\}.$$
(60)
There are shortcuts, but it is quite feasible to work out the 192 terms directly (many are the same) and add them. The result is a surprise: everything collapses to give

$$\mathrm{\Phi }(\lambda )=\frac{1}{(1\lambda ^8)(1\lambda ^{24})}.$$
(61)
#### Interpreting $`\mathrm{\Phi }(\lambda )`$.

The very simple form of (61) is trying to tell us something. Expanding in powers of $`\lambda `$, we have

$`\mathrm{\Phi }(\lambda )`$ $`=`$ $`a_0+a_1\lambda +a_2\lambda ^2+\mathrm{}`$ (62)
$`=`$ $`(1+\lambda ^8+\lambda ^{16}+\lambda ^{24}+\mathrm{})(1+\lambda ^{24}+\lambda ^{48}+\mathrm{}).`$
We can deduce one fact immediately: $`a_d`$ is zero unless $`d`$ is a multiple of 8, i.e. the degree of a homogeneous invariant must be a multiple of 8. (This already proves that the length of a doubly-even binary self-dual code must be a multiple of 8.) But we can say more. The right-hand side of (62) is exactly what we would find if there were two “basic” invariants, of degrees 8 and 24, such that all invariants are formed from sums and products of them.

This is because two invariants, $`\theta `$, of degree 8, and $`\varphi `$, of degree 24, would give rise to the following invariants.

$$\begin{array}{ccc}& & \\ \text{Degree d}& \text{Invariants}& \text{Number }a_d\\ & & \\ 0& 1& 1\\ 8& \theta & 1\\ 16& \theta ^2& 1\\ 24& \theta ^3,\varphi & 2\\ 32& \theta ^4,\theta \varphi & 2\\ 40& \theta ^5,\theta ^2\varphi & 2\\ 48& \theta ^6,\theta ^3\varphi ,\varphi ^2& 3\\ \mathrm{}& \mathrm{}& \mathrm{}\end{array}$$
(63)
Provided all the products $`\theta ^i\varphi ^j`$ are linearly independent — which is the same thing as saying that $`\theta `$ and $`\varphi `$ are algebraically independent — the numbers $`a_d`$ in (63) are exactly the coefficients in

$`1+\lambda ^8+\lambda ^{16}+2\lambda ^{24}+2\lambda ^{32}+2\lambda ^{40}+3\lambda ^{48}+\mathrm{}`$ (64)
$`=(1+\lambda ^8+\lambda ^{16}+\lambda ^{24}+\mathrm{})(1+\lambda ^{24}+\lambda ^{48}+\mathrm{})`$
$`={\displaystyle \frac{1}{(1\lambda ^8)(1\lambda ^{24})}},`$
which agrees with (61). So if we can find two algebraically independent invariants of degrees 8 and 24, we will have solved our problem. The answer will be that any invariant of this group is a polynomial in $`\theta `$ and $`\varphi `$. Now $`\varphi _8`$ (Eq. (26)) and $`\varphi _{24}`$ (Eq. (29)), the weight enumerators of the Hamming and Golay codes, have degrees 8 and 24 and are invariant under the group. So we can take $`\theta =\varphi _8`$ and $`\varphi =\varphi _{24}`$. (It’s not difficult to verify that they are algebraically independent.) Actually, it is easier to work with

$$\varphi _{24}^{}=\frac{\varphi _8^3\varphi _{24}}{42}=x^4y^4(x^4y^4)^4$$
(65)
rather than $`\varphi _{24}`$ itself. So we have proved the following theorem, discovered by Gleason in 1970.

###### Theorem 11

Any invariant of the group $`𝒢_1`$ is a polynomial in $`\varphi _8`$ and $`\varphi _{24}^{}`$.

This also gives us the solution to our original problem:

###### Theorem 12

Any polynomial which satisfies Equations $`(`$57$`)`$ and $`(`$58$`)`$ is a polynomial in $`\varphi _8`$ and $`\varphi _{24}^{}`$.

Finally, we have characterized the weight enumerator of a doubly-even binary self-dual code.

###### Theorem 13

(Gleason .) The weight enumerator of any Type II binary self-dual code is a polynomial in $`\varphi _8`$ and $`\varphi _{24}^{}`$.

Alternative proofs of this astonishing theorem are given by Berlekamp et al. , and Broué and Enguehard  (see also Assmus and Mattson ). But the proof given here seems to be the most informative, and the easiest to understand and to generalize.

Notice how the exponents 8 and 24 in the denominator of (61) led us to guess the degrees of the basic invariants.

This behavior is typical, and is what makes the technique exciting to use. One starts with a group of matrices $`𝒢`$, computes the complicated-looking sum shown in (59), and simplifies the result. Everything miraculously collapses, leaving a final expression resembling (61) (although not always quite so simple — the precise form of the final expression is given in (91), (91)). This expression then tells the degrees of the basic invariants to look for.

#### Finding the basic invariants.

In general, finding the basic invariants is a simpler problem than finding $`\mathrm{\Phi }(\lambda )`$. In our applications we can often use the weight enumerators of codes having the appropriate properties, as in the above example, or basic invariants can be found by averaging, using the following simple result (proved in Section 6.2).

###### Theorem 14

If $`f(𝐱)=f(x_1,\mathrm{},x_m)`$ is any polynomial in $`m`$ variables, and $`𝒢`$ is a finite group of $`m\times m`$ matrices, then

$$\overline{f}(𝐱)=\frac{1}{|𝒢|}\underset{A𝒢}{}Af(𝐱)$$
(66)
is an invariant, where $`Af(𝐱)`$ denotes the polynomial obtained by applying the transformation $`A`$ to the variables in $`f`$.

Of course $`\overline{f}(𝐱)`$ may be zero. An example of the use of this theorem is given below.

To illustrate the use of Theorem 13, we use it to find the weight enumerator of the $`[48,24,12]`$ extended quadratic residue code $`XQ_{47}`$, using only the fact that it is a doubly-even self-dual code with minimal distance 12. This implies that the weight enumerator of the code, which is a homogeneous polynomial of degree 48, has the form

$$W(x,y)=x^{48}+A_{12}x^{36}y^{12}+\mathrm{}.$$
(67)
The coefficients of $`x^{47}y`$, $`x^{46}y^2,\mathrm{},x^{37}y^{11}`$ are zero. Here $`A_{12}`$ is the unknown number of codewords of weight 12. It is remarkable that, once we know Equation (67), the weight enumerator is completely determined by Theorem 13. For Theorem 13 says that $`W(x,y)`$ must be a polynomial in $`\varphi _8`$ and $`\varphi _{24}^{}`$. Since $`W(x,y)`$ is homogeneous of degree 48, $`\varphi _8`$ is homogeneous of degree 8, and $`\varphi _{24}^{}`$ is homogeneous of degree 24, this polynomial must be a linear combination of $`\varphi _8^6`$, $`\varphi _8^3\varphi _{24}^{}`$ and $`\varphi _{24}^2`$.

Thus Theorem 13 says that

$$W(x,y)=a_0\varphi _8^6+a_1\varphi _8^3\varphi _{24}^{}+a_2\varphi _{24}^2,$$
(68)
for some real numbers $`a_0`$, $`a_1`$, $`a_2`$. Expanding (68), we have

$`W(x,y)`$ $`=`$ $`a_0(x^{48}+84x^{44}y^4+2946x^{40}y^8+\mathrm{})+a_1(x^{44}y^4+38x^{40}y^8+\mathrm{})`$ (69)
$`+a_2(x^{40}y^8\mathrm{}),`$
and equating coefficients in (67), (69) we get

$$a_0=1,a_1=84,a_2=246.$$

Therefore $`W(x,y)`$ is uniquely determined. When these values of $`a_0`$, $`a_1`$, $`a_2`$ are substituted in (68) we find that

$`W(x,y)`$ $`=`$ $`x^{48}+17296x^{36}y^{12}+535095x^{32}y^{16}`$ (70)
$`+3995376x^{28}y^{20}+7681680x^{24}y^{24}+3995376x^{20}y^{28}`$
$`+535095x^{16}y^{32}+17296x^{12}y^{36}+y^{48}.`$
This is certainly faster than computing $`W`$ by examining each of the $`2^{24}`$ codewords.

There is a fair amount of algebra involved in computing (61). Here is a second example, simple enough for the calculations to be shown in full.

For a self-dual code from family $`q^\mathrm{H}`$, from (46) the Hamming weight enumerator satisfies

$$W(\frac{x+(q1)y}{\sqrt{q}},\frac{xy}{\sqrt{q}})=W(x,y).$$
(71)
Let us consider the problem of finding all polynomials which satisfy (71).

The solution proceeds as before. Equation (71) says that $`W(x,y)`$ must be invariant under the transformation

$$T_3:\text{replace}\left(\genfrac{}{}{0pt}{}{x}{y}\right)\text{by }A\left(\genfrac{}{}{0pt}{}{x}{y}\right),$$

where

$$A=\frac{1}{\sqrt{q}}\left(\genfrac{}{}{0pt}{}{1}{1}\genfrac{}{}{0pt}{}{q1}{1}\right).$$
(72)
Now $`A^2=I`$, so $`W(x,y)`$ must be invariant under the group $`𝒢_2`$ consisting of the two matrices $`I`$ and $`A`$.

To find how many invariants there are, we compute the Molien series $`\mathrm{\Phi }(\lambda )`$ from (59). We find

$`det(I\lambda I)`$ $`=`$ $`(1\lambda )^2,`$
$`det(I\lambda A)`$ $`=`$ $`det\left[\begin{array}{cc}1\frac{\lambda }{\sqrt{q}}& \frac{q1}{\sqrt{q}}\lambda \\ \frac{\lambda }{\sqrt{q}}& 1+\frac{\lambda }{\sqrt{q}}\end{array}\right]=1\lambda ^2,`$ (75)
$`\mathrm{\Phi }(\lambda )`$ $`=`$ $`{\displaystyle \frac{1}{2}}\left({\displaystyle \frac{1}{(1\lambda )^2}}+{\displaystyle \frac{1}{1\lambda ^2}}\right)`$ (76)
$`=`$ $`{\displaystyle \frac{1}{(1\lambda )(1\lambda ^2)}}.`$
which is even simpler than (61). Equation (6.1) suggests that there might be two basic invariants, of degrees 1 and 2 (the exponents in the denominator). If algebraically independent invariants of degrees 1 and 2 can be found, say $`g`$ and $`h`$, then (6.1) implies that any invariant of $`𝒢_2`$ is a polynomial in $`g`$ and $`h`$.

This time we shall use the method of averaging to find the basic invariants. Let us average $`x`$ over the group — i.e., apply Theorem 14 with $`f(x,y)=x`$. The matrix $`I`$ leaves $`x`$ unchanged, of course, and the matrix $`A`$ transforms $`x`$ into $`(1/\sqrt{q})(x+(q1)y)`$. Therefore the average,

$$\overline{f}(x,y)=\frac{1}{2}\left[x+\frac{1}{\sqrt{q}}\{x+(q1)y\}\right]=\frac{(\sqrt{q}+1)\{x+(\sqrt{q}1)y\}}{2\sqrt{q}},$$

is an invariant. Of course any scalar multiple of $`\overline{f}(x,y)`$ is also an invariant, so we may divide by $`(\sqrt{q}+1)/2\sqrt{q}`$ and take

$$g=x+(\sqrt{q}1)y$$
(77)
to be the basic invariant of degree 1. To get an invariant of degree 2 we average $`x^2`$ over the group, obtaining

$$\frac{1}{2}\left[x^2+\frac{1}{q}\{x+(q1)y\}^2\right].$$

This can be cleaned up by subtracting $`((q+1)/2q)g^2`$ (which of course is an invariant), and dividing by a suitable constant. The result is

$$h=y(xy),$$

the desired basic invariant of degree 2.

Finally $`g`$ and $`h`$ must be shown to be algebraically independent: it must be shown that no sum of the form

$$\underset{i,j}{}c_{ij}g^ih^j,c_{ij}\text{complex and not all zero},$$
(78)
is identically zero when expanded in powers of $`x`$ and $`y`$. This can be seen by looking at the leading terms. The leading term of $`g`$ is $`x`$, the leading term of $`h`$ is $`xy`$, and the leading term of $`g^ih^j`$ is $`x^{i+j}y^j`$. Since distinct summands in (78) have distinct leading terms, (78) can only add to zero if all the $`c_{ij}`$ are zero. Therefore $`g`$ and $`h`$ are algebraically independent. So we have proved:

###### Theorem 15

Any invariant of the group $`𝒢_2`$, or equivalently any polynomial satisfying $`(`$71$`)`$, or equivalently the Hamming weight enumerator of any self-dual code from family $`q^\mathrm{H}`$, is a polynomial in $`g=x+(\sqrt{q}1)y`$ and $`h=y(xy)`$.

At this point the reader should cry Stop!, and point out that self-dual codes from family $`q^\mathrm{H}`$ must have even length, and so every term in the weight enumerator must have even degree. But in Theorem 15, $`g`$ has degree 1.

Thus we haven’t made use of everything we know about the code. $`W(x,y)`$ must also be invariant under the transformation

$$\text{replace}\left(\genfrac{}{}{0pt}{}{x}{y}\right)\text{by }B\left(\genfrac{}{}{0pt}{}{x}{y}\right),$$

where

$$B=\left(\genfrac{}{}{0pt}{}{1}{0}\genfrac{}{}{0pt}{}{0}{1}\right)=I.$$

This rules out terms of odd degree. So $`W(x,y)`$ is now invariant under the group $`𝒢_3`$ generated by $`A`$ and $`B`$, which consists of $`I,A,I,A`$. The reader can easily work out that the new Molien series is

$`\mathrm{\Phi }_{𝒢_3}(\lambda )`$ $`=`$ $`{\displaystyle \frac{1}{2}}\{\mathrm{\Phi }_{𝒢_2}(\lambda )+\mathrm{\Phi }_{𝒢_2}(\lambda )\}`$ (79)
$`=`$ $`{\displaystyle \frac{1}{2}}\left\{{\displaystyle \frac{1}{(1\lambda )(1\lambda ^2)}}+{\displaystyle \frac{1}{(1+\lambda )(1\lambda ^2)}}\right\}`$
$`=`$ $`{\displaystyle \frac{1}{(1\lambda ^2)^2}}.`$
There are now two basic invariants, both of degree 2 (matching the exponents in the denominator of (79)), say $`g^2`$ and $`h`$, or the equivalent and slightly simpler pair $`g^{}=x^2+(q1)y^2`$ and $`h=y(xy)`$. Hence:

###### Theorem 16

The Hamming weight enumerator of any Hermitian self-dual code over $`F_q`$ is a polynomial in $`g^{}`$ and $`h`$.

#### The general plan of attack.

As these examples have illustrated, there are two stages in using invariant theory to solve a problem.

#### Stage I.

Convert the assumptions about the problem (e.g. the code) into algebraic constraints on polynomials (e.g. weight enumerators).

#### Stage II.

Use the invariant theory to find all possible polynomials satisfying these constraints.

### 6.2 The basic theorems of invariant theory

Groups of matrices. Given a collection $`A_1,\mathrm{},A_r`$ of $`m\times m`$ invertible matrices, we can form a group $`𝒢`$ from them by multiplying them together in all possible ways. Thus $`𝒢`$ contains the matrices $`I`$, $`A_1,A_2,\mathrm{},A_1A_2,\mathrm{},A_2A_1^1A_2^1A_3,\mathrm{}`$. We say that $`𝒢`$ is generated by $`A_1,\mathrm{},A_r`$. We will suppose that $`𝒢`$ is finite, which covers all the cases encountered in this chapter. (For infinite groups, see for example Dieudonné and Carroll , Rallis , Springer , Sturmfels , Weyl .)

#### Example.

Let us show that the group $`𝒢_1`$ generated by the matrices

$$M=\frac{1}{\sqrt{2}}\left(\genfrac{}{}{0pt}{}{1}{1}\genfrac{}{}{0pt}{}{1}{1}\right)\mathrm{and}J=\left(\genfrac{}{}{0pt}{}{1}{0}\genfrac{}{}{0pt}{}{0}{i}\right)$$

that was encountered in Section 6.1 does indeed have order 192. The key is to discover (by randomly multiplying matrices together) that $`𝒢_1`$ contains

$$\begin{array}{cccccc}\hfill J^2& =\hfill & \left(\begin{array}{cc}1& 0\\ 0& 1\end{array}\right),\hfill & \hfill E& =\hfill & (MJ)^3=\frac{1+i}{\sqrt{2}}\left(\begin{array}{cc}1& 0\\ 0& 1\end{array}\right),\hfill \\ \hfill E^2& =\hfill & i\left(\begin{array}{cc}1& 0\\ 0& 1\end{array}\right),\hfill & \hfill R& =\hfill & MJ^2M=\left(\begin{array}{cc}0& 1\\ 1& 0\end{array}\right).\hfill \end{array}$$

So $`𝒢_1`$ contains the matrices

$$\alpha \left(\begin{array}{cc}1& 0\\ 0& \pm 1\end{array}\right),\alpha \left(\begin{array}{cc}0& 1\\ \pm 1& 0\end{array}\right),\alpha \{1,i,1,i\},$$

which form a subgroup $`_1`$ of order 16. From this it is easy to see that $`𝒢_1`$ consists of the union of 12 cosets of $`_1`$:

$$𝒢_1=\underset{k=1}{\overset{12}{}}a_k_1,$$
(80)
where $`a_1,\mathrm{},a_6`$ are respectively

$$\left(\begin{array}{cc}1& 0\\ 0& 1\end{array}\right),\left(\begin{array}{cc}1& 0\\ 0& i\end{array}\right),\frac{1}{\sqrt{2}}\left(\begin{array}{cc}1& 1\\ 1& 1\end{array}\right),\frac{1}{\sqrt{2}}\left(\begin{array}{cc}1& 1\\ i& i\end{array}\right),\frac{1}{\sqrt{2}}\left(\begin{array}{cc}1& i\\ 1& i\end{array}\right),\frac{1}{\sqrt{2}}\left(\begin{array}{cc}1& i\\ i& 1\end{array}\right),$$

$`a_7=\eta a_1,\mathrm{},a_{12}=\eta a_6`$, and $`\eta =(1+i)/\sqrt{2}`$, an 8th root of unity. Thus $`𝒢_1`$ consists of the 192 matrices

$$\eta ^\nu \left(\begin{array}{cc}1& 0\\ 0& \alpha \end{array}\right),\eta ^\nu \left(\begin{array}{cc}0& 1\\ \alpha & 0\end{array}\right),\eta ^\nu \frac{1}{\sqrt{2}}\left(\begin{array}{cc}1& \beta \\ \alpha & \alpha \beta \end{array}\right),$$
(81)
for $`0\nu 7`$ and $`\alpha ,\beta \{1,i,1,i\}`$.

As a check, one verifies that every matrix in (81) can be written as a product of $`M`$’s and $`J`$’s; that the product of two matrices in (81) is again in (81); and that the inverse of every matrix in (81) is in (81). Therefore (81) is a group, and is the group generated by $`M`$ and $`J`$. Thus $`𝒢_1`$ is indeed equal to (81).

We have gone into this example in some detail to emphasize that it is important to begin by understanding the group thoroughly. (For an alternative way of studying $`𝒢_1`$, see \[34, pp. 160–161\].

#### Invariants.

To quote Hermann Weyl , “the theory of invariants came into existence about the middle of the nineteenth century somewhat like Minerva: a grown-up virgin, mailed in the shining armor of algebra, she sprang forth from Cayley’s Jovian head.” Invariant theory became one of the main branches of nineteenth century mathematics, but dropped out of fashion after Hilbert’s work: see Fisher  and Reid . In the past thirty years, however, there has been a resurgence of interest, with applications in algebraic geometry (Dieudonné and Carroll , Mumford and Fogarty ), physics (see for example Agrawala and Belinfante  and the references given there), combinatorics (Doubilet et al. , Rota , Stanley ) and coding theory (, , , ). Recently a number of monographs (Benson , Bruns and Herzog , Smith , Springer , Sturmfels ) and conference proceedings (, , , ) on invariant theory have appeared.

There are several different kinds of invariants, but here an invariant is defined as follows.

Let $`𝒢`$ be a group of $`g`$ $`m\times m`$ complex matrices $`A_1,\mathrm{},A_g`$, where the $`(i,k)^{\mathrm{th}}`$ entry of $`A_\alpha `$ is $`a_{ik}^{(\alpha )}`$. In other words $`𝒢`$ is a group of linear transformations on the variables $`x_1,\mathrm{},x_m`$, consisting of the transformations

$$T^{(\alpha )}:\text{replace }x_i\text{ by }x_i^{(\alpha )}=\underset{k=1}{\overset{m}{}}a_{ik}^{(\alpha )}x_k,i=1,\mathrm{},m$$
(82)
for $`\alpha =1,2,\mathrm{},g`$. It is worthwhile giving a careful description of how a polynomial $`f(𝐱)=f(x_1,\mathrm{},x_m)`$ is transformed by a matrix $`A_\alpha `$ in $`𝒢`$. The transformed polynomial is

$$A_\alpha f(𝐱)=f(x_1^{(\alpha )},\mathrm{},x_m^{(\alpha )})$$

where each $`x_i^{(\alpha )}`$ is replaced by $`_{k=1}^ma_{ik}^{(\alpha )}x_k`$. Another way of describing this is to think of $`𝐱=(x_1,\mathrm{},x_m)^T`$ as a column vector. Then $`f(𝐱)`$ is transformed into

$$A_\alpha f(𝐱)=f(A_\alpha 𝐱),$$
(83)
where $`A_\alpha 𝐱`$ is the usual product of a matrix and a vector. One can check that

$$B(Af(𝐱))=(AB)f(𝐱)=f(AB𝐱).$$
(84)
For example,

$$A=\left(\begin{array}{cc}1& 2\\ 0& 1\end{array}\right)$$

transforms $`x_1^2+x_2`$ into $`(x_1+2x_2)^2x_2`$.

#### Definition.

An invariant of $`𝒢`$ is a polynomial $`f(𝐱)`$ which is unchanged by every linear transformation in $`𝒢`$. In other words, $`f(𝐱)`$ is an invariant of $`𝒢`$ if

$$A_\alpha f(𝐱)=f(A_\alpha 𝐱)=f(𝐱)$$
(85)
for all $`\alpha =1,\mathrm{},g`$.

#### Example.

Let

$$𝒢_4=\{\left(\begin{array}{cc}1& 0\\ 0& 1\end{array}\right),\left(\begin{array}{cc}1& 0\\ 0& 1\end{array}\right)\},$$

a group of order $`g=2`$. Then $`x^2`$, $`xy`$ and $`y^2`$ are homogeneous invariants of degree 2.

Even if $`f(x)`$ isn’t an invariant, its average over the group,

$$\overline{f}(𝐱)=\frac{1}{g}\underset{\alpha =1}{\overset{g}{}}A_\alpha f(𝐱)$$
(86)
is, as was already stated in Theorem 14. To prove this, observe that any $`A_\beta 𝒢`$ transforms the right-hand side of (86) into

$$\frac{1}{g}\underset{\alpha =1}{\overset{g}{}}(A_\alpha A_\beta )f(𝐱),$$
(87)
by (84). As $`A_\alpha `$ runs through $`𝒢`$, so does $`A_\alpha A_\beta `$, if $`A_\beta `$ is fixed. Therefore (87) is equal to

$$\frac{1}{g}\underset{\gamma =1}{\overset{g}{}}A_\gamma f(𝐱),$$

which is $`\overline{f}(𝐱)`$. Therefore $`\overline{f}(𝐱)`$ is an invariant.

More generally, any symmetric function of the $`g`$ polynomials $`A_1f(𝐱),\mathrm{},A_gf(𝐱)`$ is an invariant of $`𝒢`$.

Clearly, if $`f(𝐱)`$ and $`h(𝐱)`$ are invariants of $`𝒢`$, so are $`f(𝐱)+h(𝐱)`$, $`f(𝐱)h(𝐱)`$, and $`cf(𝐱)`$ ($`c`$ complex); or in other words the set of invariants of $`𝒢`$, which we denote by $`𝒥(𝒢)`$, forms a ring.

One of the main problems of invariant theory is to describe $`𝒥(𝒢)`$. Since the transformations in $`𝒢`$ do not change the degree of a polynomial, it is enough to describe the homogeneous invariants (for any invariant is a sum of homogeneous invariants).

#### Basic invariants.

Our goal is to find a “basis” for the invariants of $`𝒢`$, that is, a set of basic invariants such that any invariant can be expressed in terms of this set. There are two different types of bases one might look for

#### Definition.

Polynomials $`f_1(𝐱),\mathrm{},f_r(𝐱)`$ are called algebraically dependent if there is a polynomial $`p`$ in $`r`$ variables with complex coefficients, not all zero, such that $`p(f_1(𝐱),\mathrm{},f_r(𝐱))`$ is identically zero. Otherwise $`f_1(𝐱),\mathrm{},f_r(𝐱)`$ are algebraically independent. A fundamental result from algebra is (Jacobson , vol. 3, p. 154):

###### Theorem 17

Any $`m+1`$ polynomials in $`m`$ variables are algebraically dependent.

The first type of basis we might look for is a set of $`m`$ algebraically independent invariants $`f_1(𝐱),\mathrm{}f_m(𝐱)`$. Such a set is indeed a “basis,” for by Theorem 17 any invariant is algebraically dependent on $`f_1,\mathrm{},f_m`$ and so is a root of a polynomial equation in $`f_1,\mathrm{},f_m`$. The following theorem guarantees the existence of such a basis.

###### Theorem 18

\[38, p. 357\] There always exist $`m`$ algebraically independent invariants of $`𝒢`$.

#### Proof.

Consider the polynomial

$$\underset{\alpha =1}{\overset{g}{}}(tA_\alpha x_i)$$

in the variables $`t`$, $`x_1,\mathrm{},x_m`$. Since one of the $`A_\alpha `$ is the identity matrix, $`t=x_1`$ is a zero of this polynomial. When the polynomial is expanded in powers of $`t`$, the coefficients are invariants, by the remark immediately following the proof of Theorem 14. Therefore $`x_1`$ is an algebraic function of invariants. Similarly each of $`x_2,\mathrm{},x_m`$ is an algebraic function of invariants. Now if the number of algebraically independent invariants were $`m^{}`$ $`(<m)`$, the $`m`$ independent variables $`x_1,\mathrm{},x_m`$ would be algebraic functions of the $`m^{}`$ invariants, a contradiction. Therefore the number of algebraically independent invariants is at least $`m`$. But by Theorem 17 this number cannot be greater than $`m`$.

#### Example.

For the preceding group $`𝒢_4`$, we may take $`f_1=(x+y)^2`$ and $`f_2=(xy)^2`$ as the algebraically independent invariants. Then any invariant is a root of a polynomial equation in $`f_1`$ and $`f_2`$. For example,

$$\begin{array}{ccc}\hfill x^2& =\hfill & \frac{1}{4}\left(\sqrt{f_1}+\sqrt{f_2}\right)^2,\hfill \\ \hfill xy& =\hfill & \frac{1}{4}(f_1f_2),\hfill \end{array}$$

and so on.

However, by far the most convenient description of the invariants is a set $`f_1,\mathrm{},f_l`$ of invariants with the property that any invariant is a polynomial in $`f_1,\mathrm{},f_l`$. Then $`f_1,\mathrm{},f_l`$ is called a polynomial basis (or an integrity basis) for the invariants of $`𝒢`$. Of course if $`l>m`$ then by Theorem 17 there will be polynomial equations, called syzygies, relating $`f_1,\mathrm{},f_l`$.

For example, $`f_1=x^2`$, $`f_2=xy`$, $`f_3=y^2`$ form a polynomial basis for the invariants of $`𝒢_4`$. The syzygy relating them is

$$f_1f_2f_2^2=0.$$

The existence of a polynomial basis, and a method of finding it, is given by the next theorem.

###### Theorem 19

(Noether ; \[327, p. 275\].) The ring of invariants of a finite group $`𝒢`$ of complex $`m\times m`$ matrices has a polynomial basis consisting of not more than $`\left(\genfrac{}{}{0pt}{}{m+g}{m}\right)`$ invariants, of degree not exceeding $`g`$, where $`g`$ is the order of $`𝒢`$. Furthermore this basis may be obtained by taking the average over $`𝒢`$ of all monomials

$$x_1^{b_1}x_2^{b_2}\mathrm{}x_m^{b_m}$$

of total degree $`b_i`$ not exceeding $`g`$.

#### Proof.

Let the group $`𝒢`$ consist of the transformations (82). Suppose

$$f(x_1,\mathrm{},x_m)=\underset{e}{}c_ex_1^{e_1}\mathrm{}x_m^{e_m},$$

$`c_e`$ complex, is any invariant of $`𝒢`$. (The sum extends over all $`e=e_1\mathrm{}e_m`$ for which there is nonzero term $`x_1^{e_1}\mathrm{}x_m^{e_m}`$ in $`f(x_1,\mathrm{},x_m)`$.) Since $`f(x_1,\mathrm{},x_m)`$ is an invariant, it is unchanged when we average it over the group, so

$`f(x_1,\mathrm{},x_m)`$ $`=`$ $`{\displaystyle \frac{1}{g}}\{f(x_1^{(1)},\mathrm{},x_m^{(1)})+\mathrm{}+f(x_1^{(g)},\mathrm{},x_m^{(g)})\}`$
$`=`$ $`{\displaystyle \frac{1}{g}}{\displaystyle \underset{e}{}}c_e\{(x_1^{(1)})^{e_1}\mathrm{}(x_m^{(1)})^{e_m}+\mathrm{}+(x_1^{(g)})^{e_1}\mathrm{}(x_m^{(g)})^{e_m}\}`$
$`=`$ $`{\displaystyle \frac{1}{g}}{\displaystyle \underset{e}{}}c_eJ_e(\mathrm{say}).`$
Every invariant is therefore a linear combination of the (infinitely many) special invariants

$$J_e=\underset{\alpha =1}{\overset{g}{}}(x_1^{(\alpha )})^{e_1}\mathrm{}(x_m^{(\alpha )})^{e_m}.$$

Now $`J_e`$ is (apart from a constant factor) the coefficient of $`u_1^{e_1}\mathrm{}u_m^{e_m}`$ in

$$P_e=\underset{\alpha =1}{\overset{g}{}}(u_1x_1^{(\alpha )}+\mathrm{}+u_mx_m^{(\alpha )})^e,$$
(88)
where $`e=e_1+\mathrm{}+e_m`$. In other words, the $`P_e`$ are the power sums of the $`g`$ quantities

$$u_1x_1^{(1)}+\mathrm{}+u_mx_m^{(1)},\mathrm{},u_1x_1^{(g)}+\mathrm{}+u_mx_m^{(g)}.$$

Any power sum $`P_e`$, $`e=1,2,\mathrm{}`$, can be written as a polynomial with rational coefficients in the first $`g`$ power sums $`P_1`$, $`P_2,\mathrm{},P_g`$. Therefore any $`J_e`$ for

$$e=\underset{i=1}{\overset{m}{}}e_i>g$$

(which is a coefficient of $`P_e`$) can be written as a polynomial in the special invariants

$$J_e\mathrm{with}e_1+\mathrm{}+e_mg$$

(which are the coefficients of $`P_1,\mathrm{},P_g`$). Thus any invariant can be written as a polynomial in those $`J_e`$ with $`_{i=1}^me_ig`$. The number of such $`J_e`$ is the number of $`e_1`$, $`e_2,\mathrm{},e_m`$ with $`e_i0`$ and $`e_1+\mathrm{}+e_mg`$, which is $`\left(\genfrac{}{}{0pt}{}{m+g}{m}\right)`$. Finally, $`\mathrm{deg}J_eg`$, and $`J_e`$ is obtained by averaging $`x_1^{e_1}\mathrm{}x_m^{e_m}`$ over the group.

#### Molien’s theorem.

Since we know from Theorem 19 that a polynomial basis always exists, we can go ahead with confidence and try to find it, using the methods described in Section 6.1. To discover when a basis has been found, we use Molien’s theorem (Theorem 10). This states that if $`a_d`$ is the number of linearly independent homogeneous invariants of $`𝒢`$ with degree $`d`$, and

$$\mathrm{\Phi }_𝒢(\lambda )=\underset{d=0}{\overset{\mathrm{}}{}}a_d\lambda ^d,$$

then

$$\mathrm{\Phi }_𝒢(\lambda )=\frac{1}{g}\underset{\alpha =1}{\overset{g}{}}\frac{1}{det(I\lambda A_\alpha )}.$$
(89)
The proof depends on the following theorem.

###### Theorem 20

\[201, p. 258\], \[278, p. 17\] The number of linearly independent invariants of $`𝒢`$ of degree 1 is

$$a_1=\frac{1}{g}\underset{\alpha =1}{\overset{g}{}}\text{trace}(A_\alpha ).$$

#### Proof.

Let

$$S=\frac{1}{g}\underset{\alpha =1}{\overset{g}{}}A_\alpha .$$

Changing the variables on which $`𝒢`$ acts from $`x_1,\mathrm{},x_m`$ to $`y_1,\mathrm{},y_m`$, where $`(y_1,\mathrm{},y_m)=(x_1,\mathrm{},x_m)T^{tr}`$, changes $`S`$ to $`S^{}=TST^1`$. We may choose $`T`$ so that $`S^{}`$ is diagonal (see \[38, p. 252\]). Now $`S^2=S`$, $`(S^{})^2=S^{}`$, hence the diagonal entries of $`S^{}`$ are 0 or 1. So with a change of variables we may assume

$$S=\left[\begin{array}{cccccc}1& & & & & 0\\ & \mathrm{}& & & & \\ & & 1& & & \\ & & & 0& & \\ & & & & \mathrm{}& \\ 0& & & & & 0\end{array}\right]$$

with say $`r`$ 1’s on the diagonal. Thus $`Sy_i=y_i`$ if $`1ir`$, $`Sy_i=0`$ if $`r+1im`$.

Any linear invariant of $`𝒢`$ is certainly fixed by $`S`$, so $`a_1r`$. On the other hand, by Theorem 14,

$$Sy_i=\frac{1}{g}\underset{\alpha =1}{\overset{g}{}}A_\alpha y_i$$

is an invariant of $`𝒢`$ for any $`i`$, and so $`a_1r`$.

Before proving Theorem 10 let us introduce some more notation. Equation (82) describes how $`A_\alpha `$ transforms the variables $`x_1,\mathrm{},x_m`$. The $`d^{\mathrm{th}}`$ induced matrix, denoted by $`A_\alpha ^{[d]}`$, describes how $`A_\alpha `$ transforms the products of the $`x_i`$ taken $`d`$ at a time, namely $`x_1^d,x_2^d,\mathrm{},x_1^{d1}x_2,\mathrm{}`$ (Littlewood \[184, p. 122\]). E.g.

$$A_\alpha =\left(\genfrac{}{}{0pt}{}{ab}{cd}\right)$$

transforms $`x_1^2`$, $`x_1x_2`$ and $`x_2^2`$ into

$`a^2x_1^2+2abx_1x_2+b^2x_2^2,`$
$`acx_1^2+(ad+bc)x_1x_2+bdx_2^2,`$
$`c^2x_1^2+2cdx_1x_2+d^2x_2^2`$
respectively. Thus the $`2^{\mathrm{nd}}`$ induced matrix is

$$A_\alpha ^{[2]}=\left[\begin{array}{ccc}a^2& 2ab& b^2\\ ac& ad+bc& bd\\ c^2& 2cd& d^2\end{array}\right],$$

#### Proof of Theorem 10.

To prove (89), note that $`a_d`$ is equal to the number of linearly independent invariants of degree 1 of $`𝒢^{[d]}=\{A_\alpha ^{[d]}:\alpha =1,\mathrm{},g\}`$. By Theorem 20,

$$a_d=\frac{1}{g}\underset{\alpha =1}{\overset{g}{}}\mathrm{trace}A_\alpha ^{[d]}.$$

Therefore, to prove Theorem 10, it is enough to show that the trace of $`A_\alpha ^{[d]}`$ is equal to the coefficient of $`\lambda ^d`$ in

$$\frac{1}{det(I\lambda A_\alpha )}=\frac{1}{(1\lambda \omega _1)\mathrm{}(1\lambda \omega _m)},$$
(90)
where $`\omega _1,\mathrm{},\omega _m`$ are the eigenvalues of $`A_\alpha `$. By a suitable change of variables we can make

$$A_\alpha =\left[\begin{array}{ccc}\omega _1& & 0\\ & \mathrm{}& \\ 0& & \omega _m\end{array}\right],A_\alpha ^{[d]}=\left[\begin{array}{ccccc}\omega _1^d& & & 0& \\ & \omega _2^d& & & \\ & & \mathrm{}\\ & & & \omega _1^{d1}\omega _2\\ & 0& & & \mathrm{}\end{array}\right],$$

and trace $`A_\alpha ^{[d]}=`$ sum of the products of $`\omega _1,\mathrm{},\omega _m`$ taken $`d`$ at a time. But this is exactly the coefficient of $`\lambda ^d`$ in the expansion of (90).

It is worth remarking that the Molien series does not determine the group. For example there are two groups of $`2\times 2`$ matrices of order 8 having

$$\mathrm{\Phi }(\lambda )=\frac{1}{(1\lambda ^2)(1\lambda ^4)}$$

(namely the dihedral group $`D_8`$ and the abelian group $`Z(2)\times Z(4)`$). In fact there exist abstract groups $`𝒜`$ and $``$ whose matrix representations can be paired in such a way that every representation of $`𝒜`$ has the same Molien series as the corresponding representation of $``$ (Dade ).

#### A standard form for the basic invariants.

The following notation is very useful in describing the ring $`𝒥(𝒢)`$ of invariants of a group $`𝒢`$. The complex numbers are denoted by $`C`$, and if $`p(𝐱)`$, $`q(𝐱),\mathrm{}`$ are polynomials, $`C[p(𝐱),q(𝐱),\mathrm{}]`$ denotes the set of all polynomials in $`p(𝐱),q(𝐱)`$, $`\mathrm{}`$ with complex coefficients. For example Theorem 11 just says that $`𝒥(𝒢_1)=C[\varphi _8,\varphi _{24}^{}]`$.

Also, $``$ will denote the usual direct sum operation. For example a statement like $`𝒥(𝒢)=RS`$ means that every invariant of $`𝒢`$ can be written uniquely in the form $`r+s`$ where $`rR`$, $`sS`$.

Using this notation we can now specify the most convenient form of polynomial basis for $`𝒥(𝒢)`$.

#### Definition.

A good polynomial basis for $`𝒥(𝒢)`$ consists of homogeneous invariants $`f_1,\mathrm{},f_l`$ $`(lm)`$ where $`f_1,\mathrm{},f_m`$ are algebraically independent and

$$𝒥(𝒢)=C[f_1,\mathrm{},f_m]\mathrm{if}l=m,$$
(91)
or, if $`l>m`$,

$$𝒥(𝒢)=C[f_1,\mathrm{},f_m]f_{m+1}C[f_1,\mathrm{},f_m]\mathrm{}f_lC[f_1,\mathrm{},f_m].$$
(92)
In words, this says that any invariant of $`𝒢`$ can be written as a polynomial in $`f_1,\mathrm{},f_m`$ (if $`l=m`$), or as such a polynomial plus $`f_{m+1}`$ times another such polynomial plus $`\mathrm{}`$ (if $`l>m`$). $`f_1,\mathrm{},f_m`$ are called primary invariants and $`f_{m+1},\mathrm{},f_l`$ (if present) are secondary invariants. Speaking loosely, (91) and (92) say that when describing an arbitrary invariant, $`f_1,\mathrm{},f_m`$ are “free” and can be used as often as needed, while $`f_{m+1},\mathrm{},f_l`$ are “transients” and can each be used at most once. Equations (91) and (92) are sometimes called a Hironaka decomposition of $`𝒥(𝒢)`$ (, p. 39).

For a good polynomial basis $`f_1,\mathrm{},f_l`$ we can say exactly what form the syzygies must take. If $`l=m`$ there are no syzygies. If $`l>m`$ there are $`\left(\genfrac{}{}{0pt}{}{lm+1}{2}\right)`$ syzygies expressing the products $`f_if_j`$ $`(m+1ijl)`$ in terms of $`f_1,\mathrm{},f_l`$.

It is important to note that the Molien series can be written down by inspection from the degrees of a good polynomial basis. Let $`d_1=\mathrm{deg}f_1,\mathrm{},d_l=\mathrm{deg}f_l`$. Then

$$\mathrm{\Phi }_𝒢(\lambda )=\frac{1}{_{i=1}^m(1\lambda ^{d_i})},\mathrm{if}l=m,$$
(93)
or

$$\mathrm{\Phi }_𝒢(\lambda )=\frac{1+_{j=l+1}^m\lambda ^{d_j}}{_{i=1}^m(1\lambda ^{d_i})},\mathrm{if}l>m.$$
(94)
(This is easily verified by expanding (93) and (94) in powers of $`\lambda `$ and comparing with (91) and (92).)

Some examples will make this clear.

(1) For the group $`𝒢_1`$ of Section 6.1, $`f_1=\varphi _8`$ and $`f_2=\varphi _{24}^{}`$ form a good polynomial basis, with degrees $`d_1=8`$, $`d_2=24`$. Indeed, from Theorem 11 and (61),

$$𝒥(𝒢_1)=C[\varphi _8,\varphi _{24}^{}]$$

and

$$\mathrm{\Phi }_{𝒢_1}(\lambda )=\frac{1}{(1\lambda ^8)(1\lambda ^{24})}.$$

(2) For the group $`𝒢_4`$ defined above, $`f_1=x^2`$, $`f_2=y^2`$, $`f_3=xy`$ is a good polynomial basis, with $`d_1=d_2=d_3=2`$. The invariants can be described as

$$𝒥(𝒢_4)=C[x^2,y^2]xyC[x^2,y^2].$$
(95)
In words, any invariant can be written uniquely as a polynomial in $`x^2`$ and $`y^2`$ plus $`xy`$ times another such polynomial. E.g.

$$(x+y)^4=(x^2)^2+6x^2y^2+(y^2)^2+xy(4x^2+4y^2).$$

The Molien series is

$$\mathrm{\Phi }_{𝒢_4}(\lambda )=\frac{1}{2}\left\{\frac{1}{(1\lambda )^2}+\frac{1}{(1+\lambda )^2}\right\}=\frac{1+\lambda ^2}{(1\lambda ^2)^2}$$

in agreement with (94) and (95). The single syzygy is $`x^2y^2=(xy)^2`$. Note that $`f_1=x^2`$, $`f_2=xy`$, $`f_3=y^2`$ is not a good polynomial basis, for the invariant $`y^4`$ is not in the ring $`C[x^2,xy]y^2C[x^2,xy]`$.

Fortunately the following result holds.

###### Theorem 21

(Hochster and Eagon \[134, Proposition 13\]) A good polynomial basis exists for the invariants of any finite group of complex $`m\times m`$ matrices.

For the proof see , ,  or .

So we know that for any group the Molien series can be put into the standard form of (93), (94) (with denominator consisting of a product of $`m`$ factors $`(1\lambda ^{d_i})`$ and numerator consisting of sum of powers of $`\lambda `$ with positive coefficients); and that a good polynomial basis (91), (92) can be found whose degrees match the powers of $`\lambda `$ occurring in the standard form of the Molien series.

On the other hand the converse is not true. It is not always true that when the Molien series has been put into the form (93), (94) (by cancelling common factors and multiplying top and bottom by new factors), then a good polynomial basis for $`𝒥(𝒢)`$ can be found whose degrees match the powers of $`\lambda `$ in $`\mathrm{\Phi }(\lambda )`$. This is shown by the following example, due to Stanley .

Let $`𝒢_6`$ be the group of order 8 generated by the matrices $`\mathrm{diag}\{1,1,1\}`$ and $`\mathrm{diag}\{1,1,i\}`$. The Molien series is

$`\mathrm{\Phi }_{𝒢_6}(\lambda )`$ $`=`$ $`{\displaystyle \frac{1}{(1\lambda ^2)^3}}`$ (96)
$`=`$ $`{\displaystyle \frac{1+\lambda ^2}{(1\lambda ^2)^2(1\lambda ^4)}}.`$ (97)
A good polynomial basis exists corresponding to (97), namely

$$𝒥(𝒢_6)=C[x^2,y^2,z^4]xyC[x^2,y^2,z^4],$$

but there is no good polynomial basis corresponding to (96).

#### Remarks.

(1) Shephard and Todd  have characterized those groups for which (91) holds, i.e. for which a good polynomial basis exists consisting only of algebraically independent invariants. These are the groups known as “unitary groups generated by reflections.” A complete list of the 37 irreducible groups (or families of groups) of this type is given in  and , p. 199.

(2) Sturmfels  gives an algorithm for computing a good polynomial basis for the ring of invariants of a finite group. The computer language MAGMA (, , ) has commands for computing Molien series and finding a good polynomial basis (and many other things).

(3) Relative invariants. If $`\chi `$ is a homomorphism from $`𝒢`$ into the multiplicative group of the complex numbers (i.e. a linear character of $`𝒢`$), then a polynomial $`f(𝐱)`$ is called a relative invariant of $`𝒢`$ with respect to $`\chi `$ if

$$Af(𝐱)=\chi (A)f(𝐱)\text{for all}A𝒢.$$

Molien’s theorem for relative invariants states that the number of linearly independent homogeneous relative invariants with respect to $`\chi `$ of degree $`\nu `$ is the coefficient of $`\lambda ^\nu `$ in the expansion of

$$\frac{1}{|𝒢|}\underset{A𝒢}{}\frac{\overline{\chi }(A)}{det|I\lambda A|}.$$

## 7 Gleason’s theorem and generalizations

We now make use of the machinery developed in the previous section to give a series of results that characterize the rings to which the various weight enumerators of self-dual codes belong. The first theorems of this type, for binary and ternary codes, were discovered by Gleason . The results can be proved by the generalizations of the arguments used to establish Theorem 13. We remind the reader that $`hwe`$, $`swe`$ and $`cwe`$ stand for Hamming, symmetrized and complete weight enumerators, respectively. The code under consideration is denoted by $`C`$ and its shadow by $`S`$.

In each case the conclusion is that the weight enumerator being considered must be an element of a certain ring $`R`$. We describe $`R`$ by giving its Molien series (also called a Hilbert series or Poincaré series)

$$\mathrm{\Phi }(\lambda )=\underset{n=0}{\overset{\mathrm{}}{}}(dim_CR_n)\lambda ^n,$$

where $`R_n`$ is the subspace of homogeneous polynomials in $`R`$ of degree $`n`$. We then give a good polynomial basis for $`R`$ (in the sense of (91), (91)).

In many cases $`R`$ is obtained (as described in the previous sections) as the ring of invariants of a certain matrix group $`G`$. If so then we start by giving generators for $`G`$, its order, and, if it is a well-known group, a brief description. We have preferred to give natural generators for $`G`$, rather than attempting to find a minimal but less-intuitive set — in most cases two generators would suffice. If $`G`$ is a reflection group we give its number in Shephard and Todd’s list (; , page 199).

In other cases (the symmetrized weight enumerator of a Hermitian self-dual code over $`F_4`$, (112), for example) the ring $`R`$ cannot be found directly as the ring of invariants of any group, but must be obtained by collapsing the ring of complete weight enumerators.

At the end of each subsection is a table that gives, for most of the rings mentioned, a list of codes whose weight enumerators provide a polynomial basis for the ring. The weight enumerators of the codes before the semicolon are primary invariants, those after the semicolon (if present) are secondary invariants.

For example, the first line of Table (103) is equivalent to Theorem 13.

### 7.1 Family $`2_\mathrm{I}`$: Binary self-dual codes

#### hwe of code $`C`$.

(, , , ) $`G=G_{16}=\frac{1}{\sqrt{2}}\left(\genfrac{}{}{0pt}{}{1}{1}\genfrac{}{}{0pt}{}{1}{1}\right),\left(\genfrac{}{}{0pt}{}{1}{0}\genfrac{}{}{0pt}{}{0}{1}\right)`$ dihedral group $`D_{16}`$ (Shephard and Todd #2b), order 16

$$\mathrm{\Phi }=\frac{1}{(1\lambda ^2)(1\lambda ^8)}$$

$$R:\frac{1}{\varphi _2,\theta _8},$$
(98)
where $`\varphi _2=x^2+y^2`$, $`\theta _8=x^2y^2(x^2y^2)^2`$. For example, since a Type II code is also a Type I code, the weight enumerator of $`g_{24}`$, (29), must be in this ring. It is:

$$\varphi _{24}=\varphi _2^{12}12\varphi _2^8\theta _8+6\varphi _2^4\theta _8^264\theta _8^2.$$

#### hwe of shadow $`S`$.

It follows from Theorem 6 that if $`C`$ has weight enumerator $`W(x,y)`$ then its shadow has weight enumerator $`S(x,y)=W((x+y)/\sqrt{2},i(xy)/\sqrt{2})`$. This map from $`W`$ to $`S`$ preserves multiplication and addition, so to evaluate it it suffices to consider the images of the generators of the above ring. We find that $`x^2+y^2`$ becomes $`2xy`$ and $`x^2y^2(x^2y^2)^2`$ becomes $`4(x^4y^4)^2`$. So $`S(x,y)`$ belongs to the ring

$$R:\frac{1}{xy,(x^4y^4)^2}.$$
(99)
In particular, every element of the shadow has weight congruent to $`n/2`$ $`mod4`$ (since this is true of the generators).

The shadow must satisfy an additional constraint. If $`C`$ is Type I, let $`W^{(j)}(x,y)`$ be the weight enumerator of coset $`C_j`$, $`j=0,\mathrm{},3`$ (see (56)). Then $`W^{(1)}(x,y)W^{(3)}(x,y)`$ is (up to sign) a multiplicative function on codes, i.e., if $`C`$ is the direct sum of two Type I codes $`C^{}`$ and $`C^{\prime \prime }`$, then $`W^{(1)}W^{(3)}`$ for $`C`$ is $`\pm 1`$ times the product of the polynomials $`W^{(1)}W^{(3)}`$ for $`C^{}`$ and $`C^{\prime \prime }`$. In order for this property to still hold when one (or both) of $`C^{}`$ and $`C^{\prime \prime }`$ is of Type II, we adopt the convention that for a Type II code, $`W^{(1)}W^{(3)}`$ is simply the weight enumerator of the code.

Then the additional condition satisfied by the shadow is that (if $`C`$ is Type I or Type II) $`W^{(1)}(x,y)W^{(3)}(x,y)`$ is a relative invariant for the group $`G_{192}`$ (see (101)) with respect to the character

$$\chi \left(\frac{1}{\sqrt{2}}\left(\genfrac{}{}{0pt}{}{1}{1}\genfrac{}{}{0pt}{}{1}{1}\right)\right)=i^n,\chi \left(\left(\genfrac{}{}{0pt}{}{1}{0}\genfrac{}{}{0pt}{}{0}{i}\right)\right)=\eta ^n$$

where $`\eta =(1+i)/\sqrt{2}`$ . An equivalent assertion is that $`W^{(1)}W^{(3)}`$ is an absolute invariant for the subgroup of $`G_{192}`$ with determinant 1.

It follows (see  for the proof) that for a Type I code $`W^{(1)}(x,y)W^{(3)}(x,y)`$ lies in the following ring:

$$\mathrm{\Phi }=\frac{1+\lambda ^{18}}{(1\lambda ^8)(1\lambda ^{12})}$$

$$R:\frac{1,xy(x^8y^8)(x^834x^4y^4+y^8)}{x^8+14x^4y^4+y^8,x^2y^2(x^4y^4)^2}.$$
(100)
One of the differences between binary codes of Types I and II is that whereas the weight enumerator of the former is invariant under a group of order only 16, the weight enumerator of the latter is invariant under a group of order 192 (see Eq. (101)). The above result restores the balance to a certain extent, by requiring $`W^{(1)}W^{(3)}`$ to be a relative invariant for the larger group.

### 7.2 Family $`2_{\mathrm{II}}`$: Doubly-even binary self-dual codes

#### hwe of $`C`$

(, , , )

$$G=G_{192}=\frac{1}{\sqrt{2}}\left(\genfrac{}{}{0pt}{}{1}{1}\genfrac{}{}{0pt}{}{1}{1}\right),\left(\genfrac{}{}{0pt}{}{1}{0}\genfrac{}{}{0pt}{}{0}{i}\right),\mathrm{order}192$$
(101)
(Shephard and Todd #9)

$$\mathrm{\Phi }=\frac{1}{(1\lambda ^8)(1\lambda ^{24})}$$

$$R:\frac{1}{x^8+14x^4y^4+y^8,x^4y^4(x^4y^4)^4}.$$
(102)
Codes whose weight enumerators give generators for the above rings:

$$\begin{array}{cc}& \\ \text{Ring}& \text{Codes}\hfill \\ & \\ \text{(}\text{98}\text{)}& i_2\text{ (}\text{25}\text{), }e_8\text{ (}\text{26}\text{)}\hfill \\ \text{(}\text{99}\text{)}& i_2\text{ (}\text{25}\text{), }e_8\text{ (}\text{26}\text{)}\hfill \\ \text{(}\text{100}\text{)}& e_8\text{ (}\text{26}\text{), }g_{24}\text{ (}\text{29}\text{); }d_{12}^+\text{}(d_{10}e_7f_1)^+\text{ (§}\text{11.3}\text{)}\hfill \\ \text{(}\text{102}\text{)}& e_8\text{ (}\text{26}\text{), }g_{24}\text{ (}\text{29}\text{)}\hfill \end{array}$$
(103)
#### Remark.

The above groups $`G_{16}`$ and $`G_{192}`$ are also the two-dimensional real and complex Clifford groups occurring in quantum coding theory , . At present this appears to be nothing more than a coincidence. However, in view of the other mysterious coincidences involving the Clifford groups, there may be a deeper explanation that is presently hidden (compare the remarks in Section 7.9).

### 7.3 Family $`3`$: Ternary codes

#### hwe of $`C`$

(; , , \[191, p. 620\])

$$G=\frac{1}{\sqrt{3}}\left[\genfrac{}{}{0pt}{}{1}{1}\genfrac{}{}{0pt}{}{2}{1}\right],\left[\genfrac{}{}{0pt}{}{1}{0}\genfrac{}{}{0pt}{}{0}{\omega }\right],\omega =e^{2\pi i/3},\mathrm{order}48$$

(Shephard & Todd #6)

$$\mathrm{\Phi }=\frac{1}{(1\lambda ^4)(1\lambda ^{12})}$$
(104)
$$R:\frac{1}{x^4+8xy^3,y^3(x^3y^3)^3}$$
(105)
#### cwe of $`C`$, $`1^nC`$

(; \[191, p. 617\]) (This forces the length to be a multiple of 12.)

$$G=\frac{1}{\sqrt{3}}\left[\begin{array}{ccc}1& 1& 1\\ 1& \omega & \overline{\omega }\\ 1& \overline{\omega }& \omega \end{array}\right],\left[\begin{array}{ccc}1& 0& 0\\ 0& 0& 1\\ 0& 1& 0\end{array}\right],\left[\begin{array}{ccc}0& 1& 0\\ 0& 0& 1\\ 1& 0& 0\end{array}\right],\left[\begin{array}{ccc}1& & \\ & \omega & \\ & & \omega \end{array}\right],$$

order 2592,

$$\mathrm{\Phi }=\frac{1+\lambda ^{24}}{(1\lambda ^{12})^2(1\lambda ^{36})}$$

$$R:\frac{1,\beta _6\pi _9^2}{\alpha _{12},\beta _6^2,\pi _9^4}$$
(106)
where

$`a=x^3+y^3+z^3,b=x^3y^3+y^3z^3+z^3x^3,`$
$`p=3xyz,\alpha _{12}=a(a^3+8p^3),`$
$`\beta _6=a^{12}12b,\pi _9=(x^3y^3)(y^3z^3)(z^3x^3).`$
#### cwe of $`C`$, not requiring that $`1^nC`$

 (Now the length is just a multiple of 4.)

$$G=\frac{1}{\sqrt{3}}\left[\begin{array}{ccc}1& 1& 1\\ 1& \omega & \overline{\omega }\\ 1& \overline{\omega }& \omega \end{array}\right],\left[\begin{array}{ccc}1& 0& 0\\ 0& 0& 1\\ 0& 1& 0\end{array}\right],\left[\begin{array}{ccc}1& & \\ & \omega & \\ & & \omega \end{array}\right],$$

order 96

$$\mathrm{\Phi }=\frac{1+4\lambda ^{12}+\lambda ^{24}}{(1\lambda ^4)(1\lambda ^{12})^2}.$$

$$R:\underset{i=0}{\overset{6}{}}f^{(i)}S$$

where $`S=C[\theta _4,\theta _6^2,t^{12}]`$, $`s=y+z`$, $`t=yz`$, $`\theta _4=x(x^3+s^3)`$, $`\theta _6=8x^620x^3s^3s^6`$, $`f^{(0)}=1`$, $`f^{(1)}=t^2\varphi _4\theta _6`$, $`\varphi _4=s(8x^3s^3)`$, $`f^{(2)}=t^4\varphi _4^2`$, $`f^{(3)}=t^6\theta _6`$, $`f^{(4)}=t^8\varphi _4`$, $`f^{(5)}=t^{10}\varphi _4^2\theta _6`$.

Codes:

$$\begin{array}{cc}& \\ \text{Ring}\hfill & \text{Codes}\hfill \\ & \\ \text{(}\text{105}\text{)}\hfill & t_4\text{ (}\text{30}\text{), }g_{12}\text{ (}\text{31}\text{)}\hfill \\ \text{(}\text{106}\text{)}\hfill & e_3^{4+}\text{ (§}\text{11.4}\text{), }g_{12}\text{ (}\text{31}\text{), }S(36)\text{ (§}\text{12.2}\text{); }XQ_{23}\text{ (§}\text{12.2}\text{)}\hfill \end{array}$$
(107)
### 7.4 Family $`4^\mathrm{H}`$: Self-dual codes over $`F_4`$ with Hermitian inner product

#### hwe of $`C`$

(; \[191, p. 621\]):

$$G=\frac{1}{2}\left(\begin{array}{cc}1& 3\\ 1& 1\end{array}\right),\left(\begin{array}{cc}1& 0\\ 0& 1\end{array}\right)=\text{Weyl group of type }G_2\text{ dihedral group }D_{12}$$

(Shephard & Todd #2b)

$$\mathrm{\Phi }=\frac{1}{(1\lambda ^2)(1\lambda ^6)}$$

$$R:\frac{1}{x^2+3y^2,y^2(x^2y^2)^2}$$
(108)
#### cwe of $`C`$, $`1^nC`$

(There must be some word of full weight, so this is not a severe restriction)

$$G=\frac{1}{2}\left[\begin{array}{cccc}\hfill 1& \hfill 1& \hfill 1& \hfill 1\\ \hfill 1& \hfill 1& \hfill 1& \hfill 1\\ \hfill 1& \hfill 1& \hfill 1& \hfill 1\\ \hfill 1& \hfill 1& \hfill 1& \hfill 1\end{array}\right],\left[\begin{array}{cccc}\hfill 1& & & \\ & \hfill 1& & \\ & & \hfill 1& \\ & & & \hfill 1\end{array}\right],\left[\begin{array}{cccc}0& 1& 0& 0\\ 1& 0& 0& 0\\ 0& 0& 0& 1\\ 0& 0& 1& 0\end{array}\right],\left[\begin{array}{cccc}1& 0& 0& 0\\ 0& 0& 1& 0\\ 0& 0& 0& 1\\ 0& 1& 0& 0\end{array}\right]$$

order 576

$$\mathrm{\Phi }=\frac{1+\lambda ^{12}}{(1\lambda ^2)(1\lambda ^6)(1\lambda ^8)(1\lambda ^{12})}$$

$$R:\frac{1,(x^2y^2)(x^2z^2)(x^2t^2)(y^2z^2)(y^2t^2)(z^2t^2)}{x^2+y^2+z^2+t^2,\text{(}\text{37}\text{)},f_8,f_{12}}$$
(109)
where

$`f_8`$ $`=`$ $`x^8+\mathrm{}(\text{4 terms})+14x^4y^4+\mathrm{}(\text{6 terms})+168x^2y^2z^2t^2=\text{cwe of }e_8F_4`$
$`f_{12}`$ $`=`$ $`(s_43x^2y^23z^2t^2)(s_43x^2z^23y^2t^2)(s_43x^2t^23y^2z^2),`$
$`s_4`$ $`=`$ $`x^2y^2+x^2z^2+\mathrm{}(\text{6 terms}).`$
#### cwe of $`C`$, assuming $`1^nC`$ and $`C`$ and $`\overline{C}`$ have same cwe:

$`G`$ $`=`$ $`\text{previous }G\text{ together with}\left[\begin{array}{cccc}1& 0& 0& 0\\ 0& 1& 0& 0\\ 0& 0& 0& 1\\ 0& 0& 1& 0\end{array}\right]`$
$``$ Weyl group of type $`F_4`$ (Shephard & Todd #28), order 1152
$$\mathrm{\Phi }=\frac{1}{(1\lambda ^2)(1\lambda ^6)(1\lambda ^8)(1\lambda ^{12})}$$

$$R:\frac{1}{x^2+y^2+z^2+t^2,\text{(}\text{37}\text{)},f_8,f_{12}}$$
(111)
#### swe of $`C`$, $`1^nC`$:

(Set $`t=z`$ in cwe)

$$\mathrm{\Phi }=\frac{1+\lambda ^{12}}{(1\lambda ^2)(1\lambda ^6)(1\lambda ^8)}$$

$$R:\frac{1,\{(x^2z^2)(y^2z^2)\}^3}{x^2+y^2+2z^2,\text{(}\text{36}\text{)},\{(x^2z^2)(y^2z^2)\}^2}$$
(112)
#### Remark.

If we try to apply invariant theory directly to the swe, we are led to the group

$$G=\frac{1}{2}\left(\begin{array}{ccc}\hfill 1& \hfill 1& \hfill 2\\ \hfill 1& \hfill 1& \hfill 2\\ \hfill 1& \hfill 1& \hfill 0\end{array}\right),\left(\begin{array}{ccc}0& 1& 0\\ 1& 0& 0\\ 0& 0& 1\end{array}\right),\left(\begin{array}{ccc}1& & \\ & 1& \\ & & 1\end{array}\right)$$

(Weyl group of type $`B_3`$, Shephard & Todd #2a) of order 48, with Molien series

$$\mathrm{\Phi }=\frac{1}{(1\lambda ^2)(1\lambda ^4)(1\lambda ^6)}.$$

However, the invariant of degree 4 is

$$\delta _4=(x^2z^2)(y^2z^2),$$

which cannot be obtained from the swe of any self-dual code of length 4. The ring of invariants here and the ring in (112) have the same quotient field. So there is no group whose ring of invariants is (112).

Codes:

$$\begin{array}{cc}& \\ \text{Ring}\hfill & \text{Codes}\hfill \\ & \\ \text{(}\text{108}\text{)}\hfill & i_2\text{ (}\text{3.2}\text{), }h_6\text{ (}\text{35}\text{)}\hfill \\ \text{(}\text{109}\text{)}\hfill & i_2\text{ (}\text{3.2}\text{), }h_6\text{ (}\text{35}\text{), }e_8F_4\text{}(e_7e_5)^+\text{ (§}\text{11.5}\text{); }d_{12}^{}\hfill \\ \text{(}\text{111}\text{)}\hfill & i_2\text{ (}\text{3.2}\text{), }h_6\text{ (}\text{35}\text{), }e_8F_4\text{}(e_7e_5)^+\text{ (§}\text{11.5}\text{)}\hfill \\ \text{(}\text{112}\text{)}\hfill & i_2\text{ (}\text{3.2}\text{), }h_6\text{ (}\text{35}\text{), }e_8F_4\text{}(e_7e_5)^+\text{ (§}\text{11.5}\text{)}\hfill \end{array}$$
(113)
Here $`d_{12}^{}`$ is the code obtained from $`d_{12}^+`$ of Section 11.3 by multiplying the last four coordinates by $`\omega `$.

### 7.5 Family $`4^\mathrm{E}`$: Self-dual codes over $`F_4`$ with Euclidean inner product

(This is inadequately treated in , where only even codes are considered.) Neither the hwe nor the swe can be obtained directly from invariant theory, but must be obtained by collapsing the cwe. Since $`(v,v)=0v_i^2=0v_i=0(v,1^n)=0`$, we may assume $`1^nC`$.

#### cwe of $`C`$

$$G=\frac{1}{2}\left(\begin{array}{cccc}\hfill 1& \hfill 1& \hfill 1& \hfill 1\\ \hfill 1& \hfill 1& \hfill 1& \hfill 1\\ \hfill 1& \hfill 1& \hfill 1& \hfill 1\\ \hfill 1& \hfill 1& \hfill 1& \hfill 1\end{array}\right),\left(\begin{array}{cccc}0& 1& 0& 0\\ 1& 0& 0& 0\\ 0& 0& 0& 1\\ 0& 0& 1& 0\end{array}\right),\left(\begin{array}{cccc}1& 0& 0& 0\\ 0& 0& 1& 0\\ 0& 0& 0& 1\\ 0& 1& 0& 0\end{array}\right)$$

order 192

$$\mathrm{\Phi }=\frac{1+\lambda ^{16}}{(1\lambda ^2)(1\lambda ^4)(1\lambda ^6)(1\lambda ^8)}$$

$$R:\frac{1,abcd(a^2b^2)(a^2c^2)\mathrm{}(c^2d^2)}{\text{symmetric polynomials in }a^2,b^2,c^2,d^2}$$
(114)
where

$`a=(+xyzt)/2,`$ $`b=(x+yzt)/2,`$
$`c=(xy+zt)/2,`$ $`d=(xyz+t)/2.`$
#### cwe of $`C`$, assuming $`\overline{C}`$ has same cwe as $`C`$:

$$G=\text{previous group together with}\left(\begin{array}{cccc}1& 0& 0& 0\\ 0& 1& 0& 0\\ 0& 0& 0& 1\\ 0& 0& 1& 0\end{array}\right)$$

(Weyl group of type $`B_4`$, Shephard & Todd #2a), order 384

$$\mathrm{\Phi }=\frac{1}{(1\lambda ^2)(1\lambda ^4)(1\lambda ^6)(1\lambda ^8)}$$

$$R:\text{symmetric polynomials in}a^2,b^2,c^2,d^2.$$
(115)
#### swe of $`C`$:

(Set $`t=z`$ in the above cwe)

$$\mathrm{\Phi }=\frac{1+\lambda ^8+\lambda ^{16}}{(1\lambda ^2)(1\lambda ^4)(1\lambda ^6)}$$

$$R:\frac{1,\{(x^2z^2)(y^2z^2)\}^2,\{(x^2z^2)(y^2z^2)\}^4}{x^2+y^2+2z^2,x^4+y^4+2z^4+12xyz^2,z^2(xy)^2(xyz^2)}.$$
(116)
#### hwe of $`C`$:

(Set $`t=z=y`$ in the cwe)

$$\mathrm{\Phi }=\frac{1+\lambda ^6}{(1\lambda ^2)(1\lambda ^4)}$$

$$R:\frac{1,y^2(x^2y^2)^2}{x^2+3y^2,y^2(xy)^2}.$$
(117)
Rather surprisingly, (114), (116), (117) appear to be new.

Codes: The following codes will be used:

$$\begin{array}{cc}\multicolumn{2}{c}{i_2=[11],cwe=x^2+y^2+z^2+t^2,swe=x^2+y^2+2z^2,hwe=x^2+3y^2}\\ \multicolumn{2}{c}{c_4=\left[\begin{array}{cccc}1& 1& 1& 1\\ 0& 1& \omega & \overline{\omega }\end{array}\right],\text{a [4,2,3] Reed-Solomon code,}}\\ \multicolumn{2}{c}{cwe=x^4+y^4+z^4+t^4+12xyzt,swe=x^4+y^4+2z^4+12xyz^2,}\\ \multicolumn{2}{c}{hwe=x^4+12xy^3+3y^4.}\\ c_6=\left[\begin{array}{cccccc}1& 1& 1& 1& 1& 1\\ 0& 0& 0& 1& \omega & \overline{\omega }\\ 1& \omega & \overline{\omega }& 0& 0& 0\end{array}\right],\hfill & \\ \multicolumn{2}{c}{cwe=x^6+\mathrm{}\text{(4 terms)}+6x^3yzt+\mathrm{}\text{(4 terms)}+9x^2y^2z^2+\mathrm{}\text{(4 terms)},}\\ \multicolumn{2}{c}{hwe=x^6+6x^3y^3+27x^2y^4+18xy^5+12y^6.}\end{array}$$
(118)
Codes:

$$\begin{array}{cc}& \\ \text{Ring}\hfill & \text{Codes}\hfill \\ & \\ \text{(}\text{114}\text{)}\hfill & i_2,c_4,c_6,e_8F_4;\mathrm{?}\hfill \\ \text{(}\text{115}\text{)}\hfill & i_2,c_4,c_6,e_8F_4\hfill \\ \text{(}\text{116}\text{)}\hfill & i_2,c_4,c_6;e_8F_4\hfill \\ \text{(}\text{117}\text{)}\hfill & i_2,c_4;c_6\hfill \end{array}$$
(119)
#### Remark.

The question mark in the first line of the table indicates that we do not have a code that produces the degree 16 polynomial in the numerator of (114). Such a code would necessarily be odd and have the property that the cwe of $`\overline{C}`$ is not equal to that of $`C`$. Presumably a random self-dual code would do, but we would prefer to find a code with some nice structure.

### 7.6 Family $`4_\mathrm{I}^{\mathrm{H}+}`$: Additive self-dual codes over $`F_4`$ using trace inner product

#### hwe of $`C`$:

$$G=\frac{1}{2}\left(\begin{array}{cc}\hfill 1& \hfill 3\\ \hfill 1& \hfill 1\end{array}\right),\mathrm{order}2$$

$$\mathrm{\Phi }=\frac{1}{(1\lambda )(1\lambda ^2)}$$

$$R:\frac{1}{x+y,y(xy)}$$
(120)
#### cwe of $`C`$, $`1^nC`$:

$$G=M_4=\frac{1}{2}\left(\begin{array}{cccc}\hfill 1& \hfill 1& \hfill 1& \hfill 1\\ \hfill 1& \hfill 1& \hfill 1& \hfill 1\\ \hfill 1& \hfill 1& \hfill 1& \hfill 1\\ \hfill 1& \hfill 1& \hfill 1& \hfill 1\end{array}\right),\alpha _4=\left(\begin{array}{cccc}0& 1& 0& 0\\ 1& 0& 0& 0\\ 0& 0& 0& 1\\ 0& 0& 1& 0\end{array}\right),\mathrm{order}8$$

$$\mathrm{\Phi }=\frac{1+\lambda ^3}{(1\lambda )(1\lambda ^2)^2(1\lambda ^4)}$$

$$R:\frac{1,BCD}{A,B^2+C^2,D^2,B^2C^2}$$
(121)
where

$$A=(x+y)/2,B=(xy)/2,C=(z+t)/2,D=(zt)/2.$$
(122)
#### swe of $`C`$, $`1^nC`$:

(Set $`t=z`$ in cwe)

$$\mathrm{\Phi }=\frac{1}{(1\lambda )(1\lambda ^2)(1\lambda ^4)}$$

$$R:\frac{1}{A,B^2+C^2,B^2C^2}$$
(123)
where

$$A=(x+y)/2,B=(xy)/2,C=z.$$
(124)
#### cwe of $`C`$, $`1^nS`$:

Note that $`(1^n,u)=wt(u)n_1(u)wt(u)`$ $`(mod2)`$ if and only if the number of 1’s in $`u`$ is even. So if $`1^nS`$, the cwe is invariant under $`\mathrm{diag}\{1,1,1,1\}`$.

$$G=M_4,\mathrm{diag}\{1,1,1,1\},\mathrm{order}6$$

$$\mathrm{\Phi }=\frac{1}{(1\lambda )^2(1\lambda ^2)(1\lambda ^3)}$$

$$R:\frac{1}{D,A+B+C,A^2+B^2+C^2,A^3+B^3+C^3}$$
(125)
where $`A`$, $`B,\mathrm{}`$ are as in (122).

#### swe of $`C`$, $`1^nS`$:

(Set $`t=z`$ in cwe)

$$\mathrm{\Phi }=\frac{1}{(1\lambda )(1\lambda ^2)(1\lambda ^3)}$$

$$R:\frac{1}{\text{symmetric polynomials in }A\text{}B\text{}C}$$
(126)
#### hwe of $`S`$:

$$\mathrm{\Phi }:\frac{1}{(1\lambda )(1\lambda ^2)}$$

$$R:\frac{1}{2y,\frac{1}{2}(x^2y^2)}$$
(127)
As a corollary, the weight of a vector in the shadow is congruent to $`n`$ $`(mod2)`$.

#### hwe of $`W^{(1)}W^{(3)}`$:

Again we use the terminology $`W^{(i)}`$, $`i=0,\mathrm{},3`$, for the cosets of $`C_0`$ in $`C_0^{}`$ (as in Sect. 5)

$$G=M_2=\frac{1}{2}\left(\begin{array}{cc}\hfill 1& \hfill 3\\ \hfill 1& \hfill 1\end{array}\right),\alpha _2=\left(\begin{array}{cc}\hfill 1& \hfill 0\\ \hfill 0& \hfill 1\end{array}\right)$$

with character $`\chi (M_2)=1`$, $`\chi (\alpha _2)=(1)^n`$ (Ker $`\chi S_3`$)

$$\mathrm{\Phi }=\frac{1}{(1\lambda ^2)(1\lambda ^3)}$$

$$R:\frac{1}{x^2+3y^2,y(x^2y^2)}.$$
(128)
#### cwe of $`S`$, $`1^nC`$:

Belongs to image of (121) under the map that sends $`(x,y,z,t)`$ to $`(x,y,z,t)\beta _4M_4`$:

$$R:\frac{1,ABD}{C,A^2+B^2,D^2,A^2B^2}$$
(129)
#### cwe of $`W^{(1)}W^{(3)}`$, $`1^nC`$:

$`G=M_4,\alpha _4,\beta _4`$ with character $`\chi (M_4)=1`$, $`\chi (\alpha _4)=\chi (\beta _4)=(1)^n`$, order 48

$$\mathrm{\Phi }=\frac{1}{(1\lambda )(1\lambda ^2)(1\lambda ^3)(1\lambda ^4)}$$

$$R:\frac{1}{D,A^2+B^2+C^2,ABC,A^4+B^4+C^4}$$
(130)
where

$$A=x+y,B=xy,C=z+t,D=zt.$$

#### swe of $`W^{(1)}W^{(3)}`$, $`1^nC`$:

$$\mathrm{\Phi }=\frac{1}{(1\lambda ^2)(1\lambda ^3)(1\lambda ^4)}$$

$$R:\frac{1}{A^2+B^2+C^2,ABC,A^4+B^4+C^4}$$
(131)
#### cwe of $`S`$, $`1^nS`$:

Belongs to image of (125) under the map $`xy`$, $`yx`$, $`zt`$, $`tz`$:

$$R:\frac{1}{D,AB+C,A^2+B^2+C^2,A^3B^3+C^3}$$
(132)
#### swe of $`S`$, $`1^nS`$:

Set $`D=0`$ in (132).

#### hwe of $`S`$, $`1^nS`$:

Same as (127).

#### cwe of $`W^{(1)}W^{(3)}`$, $`1^nS`$:

$`G=M_4,\beta _4=\mathrm{diag}\{1,1,1,1\}`$, with character $`\chi (M_4)=1`$, $`\chi (\beta _4)=(1)^n`$, order 12

$$\mathrm{\Phi }=\frac{1}{(1\lambda )^2(1\lambda ^2)(1\lambda ^3)}$$

$$R:\frac{1}{D,ABC,A^2+B^2+C^2,A^3B^3C^3}$$
(133)
#### Remark.

We may obtain $`W^{(1)}W^{(3)}`$ by applying $`\alpha _4`$ to $`W^{(0)}W^{(2)}`$, which in turn is obtained by applying $`\beta _4`$ to $`W^{(0)}+W^{(2)}`$.

### 7.7 Family $`4_{\mathrm{II}}^{\mathrm{H}+}`$: Additive even self-dual codes over $`F_4`$ using trace inner product

#### hwe of $`C`$:

Same as family $`4^\mathrm{H}`$, see (108).

#### cwe of $`C`$, $`1^nC`$:

$$G=M_4,\alpha _4,\beta _4,\text{order 48}$$

$$\mathrm{\Phi }=\frac{1+\lambda ^4}{(1\lambda ^2)^2(1\lambda ^4)(1\lambda ^6)}$$

$$R:\frac{1,ABCD}{D^2,A^2+B^2+C^2,A^4+B^4+C^4,A^6+B^6+D^6}$$
(134)
#### swe of $`C`$, $`1^nC`$:

(Set $`t=z`$ in cwe)

$$\mathrm{\Phi }=\frac{1}{(1\lambda ^2)(1\lambda ^4)(1\lambda ^6)}$$

$$R:\frac{1}{\text{symmetric polynomials in }A^2\text{}B^2\text{}C^2}$$
(135)
#### cwe of $`C`$ (not assuming $`1^nC`$):

$$G=M_4,\beta _4,\text{order 12}$$

$$\mathrm{\Phi }=\frac{1+\lambda ^2+2\lambda ^4}{(1\lambda ^2)^3(1\lambda ^6)}$$
(136)
Codes: The following codes will be used:

$`i_1`$ $`=`$ $`[1],cwe=swe=hwe=x+y`$
$`i_1^{}`$ $`=`$ $`[\omega ],cwe=swe=x+z`$
$`i_1^{\prime \prime }`$ $`=`$ $`[\overline{\omega }],cwe=x+t,swe=x+z`$
$`i_2`$ $`=`$ $`[11,\omega \omega ],\text{see (}\text{118}\text{)}`$
$`i_2^{}`$ $`=`$ $`[11,\omega \overline{\omega }],cwe=x^2+y^2+2zt,swe=x^2+y^2+2z^2,hwe=x^3+3y^2`$
$`c_3`$ $`=`$ $`[111,\omega \omega 0,\omega 0\omega ]`$
$`c_4`$ $`=`$ $`[1111,\omega (\omega 00)]`$
$`c_4^{}`$ $`=`$ $`[\omega \omega \omega \omega ,1(100)]`$
$$\begin{array}{cc}& \\ \text{Ring}\hfill & \text{Codes}\hfill \\ & \\ \text{(}\text{120}\text{)}\hfill & i_1,i_2\hfill \\ \text{(}\text{121}\text{)}\hfill & i_1,i_2,i_2^{},c_4;c_3\hfill \\ \text{(}\text{123}\text{)}\hfill & i_1,i_2,c_4\hfill \\ \text{(}\text{125}\text{)}\hfill & i_1^{},i_1^{\prime \prime },i_2,c_3^{}\hfill \\ \text{(}\text{126}\text{)}\hfill & i_1^{},i_2,c_3^{}\hfill \\ \text{(}\text{127}\text{)}\hfill & i_1,i_2\hfill \\ \text{(}\text{129}\text{)}\hfill & i_1,i_2,i_2^{},c_4;c_3\hfill \\ \text{(}\text{133}\text{)}\hfill & i_1^{},i_1^{\prime \prime },i_2,c_3\hfill \\ \text{(}\text{134}\text{)}\hfill & i_2,i_2^{},c_4^{},h_6;c_4\hfill \\ \text{(}\text{135}\text{)}\hfill & i_2,c_4^{},h_6\hfill \end{array}$$
(137)
### 7.8 Family $`q^\mathrm{H}`$: Codes over $`F_q`$, $`q`$ a square, with Hermitian inner product

The case $`q=4`$ has been studied in Section 7.4. The next case is $`q=9`$, but as little attention has been paid so far to codes over this field we shall not discuss the cwe or swe further. It is possible to say a little about the Hamming weight enumerator in the general case.

#### hwe of $`C`$

(See Theorem 16):

$$G=\frac{1}{\sqrt{q}}\left(\begin{array}{cc}1& q1\\ 1& 1\end{array}\right),\left(\begin{array}{cc}\hfill 1& \hfill 0\\ \hfill 0& \hfill 1\end{array}\right),\mathrm{order}4$$

$$\mathrm{\Phi }=\frac{1}{(1\lambda ^2)^2}$$

$$R:\frac{1}{x^2+(q1)y^2,y(xy)}$$
(138)
(This is somewhat unsatisfactory, since $`y(xy)`$ forces a vector of weight 1, which is impossible in a self-dual code.)

### 7.9 Family $`q^\mathrm{E}`$: Codes over $`F_q`$ with Euclidean inner product

The cases $`q=2,3`$ and 4 have been studied in Sections 7.1, 7.3, 7.5. As $`q`$ increases the results rapidly become more complicated.

We first discuss the case $`q=5`$ and then say a little about the general case.

#### cwe of $`C`$, $`q=5`$:

Let $`\xi =e^{2\pi i/5}`$.

$$G=\frac{1}{\sqrt{5}}(\xi ^{rs})_{r,s=0,\mathrm{},4},\mathrm{diag}\{1,\xi ,\xi ^1,\xi ^1,\xi \},\mathrm{order}240$$

$$\mathrm{\Phi }=\frac{\varphi (\lambda )}{(1\lambda ^4)(1\lambda ^6)(1\lambda ^{10})^2}$$
(139)
where $`\varphi (\lambda )`$ is a polynomial of degree 26, with $`\varphi (1)=60`$. A good basis for this ring would therefore involve about 65 polynomials! Such Behavior is typical of most groups — see Huffman and Sloane .

#### swe of $`C`$, $`q=5`$

$$G=\left(\begin{array}{ccc}1& 2& 2\\ 1& \xi +\xi ^4& \xi ^2+\xi ^3\\ 1& \xi ^2+\xi ^3& \xi +\xi ^4\end{array}\right),\mathrm{diag}\{1,\xi ,\xi ^4\},\left(\begin{array}{ccc}1& 0& 0\\ 0& 0& 1\\ 0& 1& 0\end{array}\right),$$

(the reflection group $`[3,5]`$, a three-dimensional representation of the icosahedral group, Shephard and Todd #23), order 120

$$\mathrm{\Phi }=\frac{1}{(1\lambda ^2)(1\lambda ^6)(1\lambda ^{10})}$$

$$R:\frac{1}{\alpha ,\beta ,\gamma }$$
(140)
where

$`\alpha `$ $`=`$ $`x^2+4yz`$
$`\beta `$ $`=`$ $`x^4yzx^2y^2z^2x(y^5+z^5)+2y^3z^3`$
$`\gamma `$ $`=`$ $`5x^6y^2z^24x^5(y^5+z^5)10x^4y^3z^3+10x^3(y^6z+yz^6)+5x^2y^4z^4`$
$`10x(y^7z^2+y^2z^7)+6y^5z^5+y^{10}+z^{10}.`$
Codes: $`[12]`$, $`[(100)(133)]`$ and either

$$d_5^{2+}=[(01234)(00000),(00000)(01234),1111111111]$$

or

$$e_{10}^+=[(00014)(00023),1111111111]$$
(141)
for the invariant of degree 10.

In  it was observed that these invariants were already known to Klein , . This paper then went on to remark that “it is worth mentioning that precisely the same invariants have recently been studied by Hirzebruch in connection with cusps of the Hilbert modular surface associated with $`Q(\sqrt{5})`$ — see , p. 306. However, there does not seem to be any connection between this work and ours”. An elegant explanation for this was soon found by Hirzebruch . The basic idea is to take a self-dual code over $`F_5`$ and to obtain from it (using a version of Construction A ) a lattice over $`Z[\sqrt{5}]`$. The theta series of this lattice is a Hilbert modular form which can be written down from the swe of the code. This produces an isomorphism between the ring of swe’s and the appropriate ring of Hilbert modular forms. The monograph  gives a comprehensive account of these connections.

Incidentally, we do not know if the cwe ring described by (139) collapses to (140).

#### hwe of $`C`$, $`q=5`$:

() (Set $`z=y`$ in swe)

$$\mathrm{\Phi }=\frac{1+\lambda ^{10}+\lambda ^{20}}{(1\lambda ^2)(1\lambda ^6)}$$

$$R:\frac{1,\overline{\gamma },\overline{\gamma }^2}{\overline{\alpha },\overline{\beta }}$$

where

$`\overline{\alpha }`$ $`=`$ $`x^2+4y^2,`$
$`\overline{\beta }`$ $`=`$ $`y^2(xy)^2(x^2+2xy+2y^2),`$
$`\overline{\gamma }`$ $`=`$ $`y^4(xy)^4(5x^2+12xy+8y^2).`$
#### cwe of $`C`$, $`q=5`$, $`1^nC`$:

(The group is now considerably larger, but the ring of invariants is no simpler)

$$G=\text{previous group},\mathrm{diag}\{1,\xi ,\xi ^2,\xi ^3,\xi ^4\}$$

$`\pm 5^{1+2}.Sp_2(5)`$, a Clifford group , , ,  (see also ), order 30000

$$\mathrm{\Phi }=\frac{1+3\lambda ^{20}+13\lambda ^{30}+18\lambda ^{40}+28\lambda ^{50}+34\lambda ^{60}+17\lambda ^{70}+4\lambda ^{80}+2\lambda ^{90}}{(1\lambda ^{10})(1\lambda ^{20})^2(1\lambda ^{30})^2}.$$

The sum of the coefficients in the numerator is 120, so again there is no possibility of giving a good basis.

The degree 10 invariant is the cwe of either of the codes of length 10 given in (141).

#### cwe of $`C`$, general $`q`$:

It is hard to say anything in general, but if $`q`$ is an odd prime $`p`$ we can at least describe the structure of the group $`G`$ under which the cwe is invariant.

$$G=M=\frac{1}{\sqrt{p}}(\xi ^{rs})_{r,s=0,\mathrm{},p1},J=\mathrm{diag}\{1,\xi ,\xi ^4,\xi ^9,\mathrm{}\},I.$$

If $`1^nC`$ then the cwe is invariant under the larger group $`G^+=G,P`$, where

$$P:x_jx_{j+1},\text{(subscripts }modp\text{)}$$

We use $`\mathrm{\Xi }(H)`$ to denote the center of a group $`H`$.

###### Theorem 22

(a) Suppose $`p1`$ $`(mod4)`$. Then $`G`$ has structure $`Z(2)\times SL_2(p)`$ and center $`\mathrm{\Xi }(G)=I`$. $`G^+`$ has structure $`Z(2)\times p^{1+2}`$ $`SL_2(p)`$ and $`\mathrm{\Xi }(G^+)=I,\xi I`$. (b) Suppose $`p3(mod4)`$. Then $`G`$ has structure $`Z(4)\times SL_2(p)`$ and $`\mathrm{\Xi }(G)=iI`$. $`G^+`$ has structure $`Z(4)\times p^{1+2}SL_2(p)`$ and $`\mathrm{\Xi }(G^+)=iI,\xi I`$. In either case $`G`$ and $`G^+`$ are preserved by the Galois group $`Gal(Q[\sqrt{p},\xi ]/Q)`$.

#### Remarks.

(i) The group $`G`$ was first studied in the present context by Gleason . The groups $`G`$ and $`G^+`$ (also for composite odd $`q`$, and with the appropriate modification for even $`q`$ as well) are a special case of the construction in . Weil obtains analogs of $`G^+`$, in which $`F_q`$ can be replaced by any locally compact abelian group isomorphic to its Pontrjagin dual.666We are grateful to N. D. Elkies for this comment.

(ii) The analogous results for $`p=2`$ are given in Sections 7.1 and 7.2. (iii) In both cases (a) and (b) $`G^+`$ is the full normalizer (with coefficients restricted to $`Q[\sqrt{p},\xi ]`$) of the extraspecial $`p`$-group $`E=P,Q`$, where $`Q=\mathrm{diag}\{1,\xi ,\xi ^2,\xi ^3,\mathrm{}\}`$ (cf. ).

#### Proof.

$`G`$ normalizes $`E`$, since $`MPM^1=Q^1`$, $`MQM^1=P`$, $`JPJ^1=\xi ^aPQ^2`$, $`JQJ^1=\xi ^bQ`$ for appropriate integers $`a`$ and $`b`$. (Note that $`\xi I=PQP^1Q^1E`$.) Thus we have a surjective homomorphism $`\varphi `$ from $`G`$ to $`SL_2(p):M\left(\genfrac{}{}{0pt}{}{0}{1}\genfrac{}{}{0pt}{}{1}{0}\right)`$, $`J\left(\genfrac{}{}{0pt}{}{1}{2}\genfrac{}{}{0pt}{}{0}{1}\right)`$. In particular $`G`$ is transitive on $`E/\xi I`$.

Suppose $`GE`$ is nontrivial. If there were a noncentral element of $`E`$ in $`G`$ then by the transitivity of $`G`$ it would follow that $`\xi ^cPG`$ and $`\xi ^dQG`$ for some $`c,d`$. But then $`\xi IG`$. This would force the length of $`C`$ to be a multiple of $`p`$, which is false (since there is always a code of length 4). Hence $`GE=\{I\}`$.

$`E`$ is irreducible, so the centralizer of $`E`$ consists only of multiples of $`I`$. It follows that $`\mathrm{ker}\varphi `$ consists of multiples of elements of $`E`$. But the fourth power of an element of $`\mathrm{ker}\varphi `$ would be in $`E`$, and this must be $`I`$. Thus $`\mathrm{ker}\varphi `$ is either $`I`$ or $`iI`$. If $`p1`$ $`(mod4)`$ then $`iQ[\sqrt{p},\xi ]`$, so the first possibility obtains. It remains to show that $`iIG`$ when $`p3`$ $`(mod4)`$. The matrix $`(MJ)^pM^2`$ is readily verified to belong to $`\mathrm{ker}\varphi `$. But $`det((MJ)^pM^2)=(detM)^{p+2}`$. Since $`M^2`$ maps $`x_j`$ to $`x_j`$, $`detM^2=1`$, so $`detM=\pm i`$. It follows that $`(MJ)^pM^2`$ is $`\pm iI`$.

###### Corollary 1

If $`p3`$ $`(mod4)`$ then a self-dual code over $`F_p`$ must have length divisible by 4.

#### Proof.

$`iIG`$.

The conclusion of Corollary 1 also holds for self-dual codes over $`F_q`$, $`q3`$ $`(mod4)`$ .

#### hwe of $`C`$, general $`q`$:

Belongs to the ring (138). If $`q3`$ $`(mod4)`$ we can say more ():

$$G=\frac{1}{\sqrt{q}}\left(\begin{array}{cc}\hfill 1& \hfill q1\\ \hfill 1& \hfill 1\end{array}\right),\left(\begin{array}{cc}i& 0\\ 0& i\end{array}\right),\mathrm{order}8$$

$$\mathrm{\Phi }=\frac{1+\lambda ^4}{(1\lambda ^4)^2}$$

$$R:\frac{1,x^2y^22xy^3+y^4}{x^4+4(q1)xy^3+(q1)(q3)y^4,x^3y+(q3)xy^3(q2)y^4}$$

### 7.10 Family $`4_\mathrm{I}^Z`$: Self-dual codes over $`Z_4`$

#### cwe of $`C`$:

()

$$G=M_4=\frac{1}{2}\left(\begin{array}{cccc}\hfill 1& \hfill 1& \hfill 1& \hfill 1\\ \hfill 1& \hfill i& \hfill 1& \hfill i\\ \hfill 1& \hfill 1& \hfill 1& \hfill 1\\ \hfill 1& \hfill i& \hfill 1& \hfill i\end{array}\right),\alpha _4=\mathrm{diag}\{1,i,1,i\},\mathrm{order}64$$

$$\mathrm{\Phi }=\frac{1+\lambda ^{10}}{(1\lambda )(1\lambda ^4)^2(1\lambda ^8)}$$

$$R:\frac{1,(BCD)^2(B^4C^4)}{A,B^4+C^4,D^4,B^4C^4}$$
(142)
where

$$A=x+z,B=y+t,C=xz,D=yt.$$
(143)
#### swe of $`C`$:

(Set $`t=y`$ in cwe)

$$\mathrm{\Phi }=\frac{1}{(1\lambda )(1\lambda ^4)(1\lambda ^8)}$$

$$R:\frac{1}{A,B^4+C^4,B^4C^4}$$
(144)
#### hwe of $`C`$:

(Set $`t=z=y`$ in cwe)

$$\mathrm{\Phi }=\frac{1+\lambda ^8}{(1\lambda )(1\lambda ^4)}$$

$$R:\frac{1,y^4(xy)^4}{x+y,y(xy)(x^2+xy+2y^2)}$$
(145)
#### cwe, $`1^nC`$

$$G=M_4,\alpha _4,\left(\begin{array}{cccc}0& 1& 0& 0\\ 0& 0& 1& 0\\ 0& 0& 0& 1\\ 1& 0& 0& 0\end{array}\right),\mathrm{order}1024$$

$$\mathrm{\Phi }=\frac{(1+\lambda ^{12})(1+\lambda ^{16})}{(1\lambda ^4)(1\lambda ^8)^2(1\lambda ^{16})}$$

$$R:\frac{(1,A^{12}+B^{12}+C^{12}+D^{12})\times (1,\sigma _{16})}{A^4+B^4+C^4+D^4,A^8+B^8+C^8+D^8,\sigma _8,A^4B^4C^4D^4}$$
(146)
where

$`\sigma _8`$ $`=`$ $`A^4D^4+B^4C^4,`$
$`\sigma _{16}`$ $`=`$ $`(ABCD)^2(A^4B^4+C^4D^4A^4C^4B^4D^4)`$
#### swe of $`C`$, $`\pm 1^nC`$

(Set $`t=y`$ in cwe)

$$\mathrm{\Phi }=\frac{1+\lambda ^{12}}{(1\lambda ^4)(1\lambda ^8)^2}$$

$$R:\frac{1,A^4B^4C^4}{A^4+B^4+C^4,A^8B^8C^8,B^4C^4}.$$
(147)
This ring may also be described as $`R_0B^4C^4R_0B^8C^8R_0`$, where $`R_0`$ is the ring of symmetric polynomials in $`A^4`$, $`B^4`$, $`C^4`$.

#### hwe of $`C`$, $`\pm 1^nC`$:

(Set $`t=z=y`$ in cwe)

$$\mathrm{\Phi }=\frac{(1+\lambda ^8)(1+\lambda ^{12})}{(1\lambda ^4)(1\lambda ^8)}$$

$$R:\frac{(1,y^2(x^2+3y^2)(x^2y^2)^2)\times (1,y^4(x^2y^2)^4)}{(x^2+3y^2)^2,y^4(xy)^4}$$
(148)
#### cwe of $`C`$, $`1^nS`$:

If $`1^nS`$, Part (i) of Theorem 8 implies that if a vector $`0^a1^b2^cd^dC`$ then $`bd+2c\frac{1}{2}(b+d)+2c`$ $`(mod4)`$, i.e. $`b3d`$ $`(mod8)`$, and so $`\beta _4=\mathrm{diag}\{1,\eta ,1,\eta ^5\}G`$.

$$G=M_4,\beta _4,\mathrm{order}192$$

$$\mathrm{\Phi }=\frac{1+\lambda ^{18}}{(1\lambda )(1\lambda ^4)(1\lambda ^8)(1\lambda ^{12})}$$

$$R:\frac{1,B^2C^2D^2(B^4C^4)(B^4+D^4)(C^4+D^4)}{A,B^4+C^4D^4,B^8+C^8+D^8,B^{12}+C^{12}D^{12}}$$
(149)
#### swe and hwe of $`C`$, $`\pm 1^nS`$:

Same as (144) and (145), respectively.

#### cwe of $`S`$:

the image of (142) under $`AB`$, $`B\eta C,CA`$, $`D\eta ^3D`$

$$\mathrm{\Phi }=\frac{(1+\lambda ^{10})}{(1\lambda )(1\lambda ^4)^2(1\lambda ^8)}$$

$$R:\frac{1,A^2C^2D^2(A^4C^4)}{B,A^4C^4,D^4,A^4C^4}$$
(150)
#### swe of $`S`$:

the image of (144) under $`AB`$, $`B\eta C`$, $`CA`$

$$\mathrm{\Phi }=\frac{1}{(1\lambda )(1\lambda ^4)(1\lambda ^8)}$$

$$R:\frac{1}{B,A^4C^4,A^4C^4}$$
(151)
It follows that the norms of vectors in the shadow are congruent to $`nmod8`$.

#### cwe of $`S`$, $`1^nC`$:

the image of (147) under $`AB`$, $`B\eta C`$, $`CA`$, $`D\eta ^3D`$.

#### swe of $`S`$, $`\pm 1^nC`$:

$$\mathrm{\Phi }=\frac{1+\lambda ^{12}}{(1\lambda ^4)(1\lambda ^8)^2}$$

$$R:\frac{1,A^4B^4C^4}{A^4+B^4C^4,A^8+B^8+C^8,A^4C^4}$$
(152)
#### cwe of $`S`$, $`1^nS`$:

$$R:\frac{1,A^2C^2D^2(A^4+C^4)(C^4+D^4)(A^4D^4)}{B,A^4C^4+D^4,A^8+C^8+D^8,A^{12}C^{12}+D^{12}}$$
(153)
#### swe of $`S`$, $`\pm 1^nS`$:

same as (151).

#### cwe of $`W^{(1)}W^{(3)}`$:

$$G=M_4,\gamma _4=\mathrm{diag}\{1,\eta ,1,\eta \},\mathrm{order}768,$$

with character $`\chi (M_4)=i^n`$, $`\chi (\gamma _4)=\eta ^n`$

$$\mathrm{\Phi }=\frac{1+\lambda ^{18}}{(1\lambda )(1\lambda ^4)(1\lambda ^8)(1\lambda ^{12})}$$

$$R:\frac{1,A^2B^2C^2(A^4+B^4)(A^4+C^4)(B^4C^4)}{D,\text{symmetric polynomials in}A^4,B^4,C^4}$$
(154)
#### swe of $`W^{(1)}W^{(3)}`$:

$$\mathrm{\Phi }=\frac{1+\lambda ^{18}}{(1\lambda ^4)(1\lambda ^8)(1\lambda ^{12})}$$

$$R:\text{omit }D\text{ from (}\text{154}\text{)}$$
(155)
(This ring has also been studied in .)

#### cwe of $`W^{(1)}W^{(3)}`$ with $`1^nC`$:

$`G=M_4,\beta _4,\gamma _4`$, order 6144, with character $`\chi (M_4)=i^n`$, $`\chi (\beta _4)=1`$, $`\chi (\gamma _4)=\eta ^n`$; $`\mathrm{ker}(\chi )`$ has order 3072

$$\mathrm{\Phi }=\frac{1+\lambda ^{32}}{(1\lambda ^4)(1\lambda ^8)(1\lambda ^{12})(1\lambda ^{16})}$$

$$R:\frac{1,A^2B^2C^2D^2(A^4+B^4)(A^4+C^4)(A^4D^4)(B^4C^4)(B^4+D^4)(C^4+D^4)}{\text{symmetric polynomials in }A^4,B^4,C^4,D^4}$$
(156)
#### swe of $`W^{(1)}W^{(3)}`$ with $`1^nC`$:

$$\mathrm{\Phi }=\frac{1}{(1\lambda ^4)(1\lambda ^8)(1\lambda ^{12})}$$

$$R:\frac{1}{\text{symmetric polynomials in }A^4,B^4,C^4}$$

### 7.11 Family $`4_{\mathrm{II}}^Z`$: Type II self-dual codes over $`Z_4`$

#### cwe of $`C`$, $`1^nC`$

,  In view of the remarks following Theorem 8, this is not a severe restriction.

$$G=M_4,\beta _4,\gamma _4,\mathrm{order}6144$$

$$\mathrm{\Phi }=\frac{(1+\lambda ^{16})(1+\lambda ^{32})}{(1\lambda ^8)^2(1\lambda ^{16})(1\lambda ^{24})}$$

$$R:\frac{(1,f_{16})\times (1,f_{32})}{A^8+B^8+C^8+D^8,f_8,A^{16}+\mathrm{}+D^{16},A^{24}+\mathrm{}+D^{24}}$$
(157)
where

$`f_8`$ $`=`$ $`A^4C^4+C^4D^4+D^4B^4+B^4A^4A^4D^4B^4C^4,`$
$`f_{16}`$ $`=`$ $`(ABCD)^4,`$
$`f_{32}`$ $`=`$ $`(ABCD)^2(A^4+C^4)(C^4+D^4)(D^4+B^4)(B^4+A^4)(A^4D^4)(B^4C^4)`$
#### swe of $`C`$, $`\pm 1^nC`$

$$\mathrm{\Phi }=\frac{1+\lambda ^{16}}{(1\lambda ^8)^2(1\lambda ^{24})}$$

$$R:\frac{1,\theta _{16}}{\theta _8,h_8,\theta _{24}}$$
(158)
where

$`\theta _8`$ $`=`$ $`x^8+28x^6z^2+70x^4z^4+28x^2z^6+z^8+128y^8,`$
$`\theta _{16}`$ $`=`$ $`\{x^2z^2(x^2+z^2)^24y^8\}\{(x^4+6x^2z^2+z^4)^264y^8\},`$
$`\theta _{24}`$ $`=`$ $`y^8(x^2z^2)^8,`$
$`h_8`$ $`=`$ $`\{xz(x^2+z^2)2y^4\}^2.`$
#### cwe of $`C`$, $`1^nC`$, Lee weights divisible by 4

()

$$G=M_4,\beta _4,\gamma _4,\left(\begin{array}{cccc}0& 0& 1& 0\\ 0& i& 0& 0\\ 1& 0& 0& 0\\ 0& 0& 0& i\end{array}\right)$$

(Shephard & Todd #2a), order 49152

$$\mathrm{\Phi }=\frac{1}{(1\lambda ^8)(1\lambda ^{16})^2(1\lambda ^{24})}$$

$$R:\frac{1}{f_{16},\text{symmetric polynomials in }A^8\text{}B^8\text{}C^8\text{}D^8}$$
(159)
#### swe of $`C`$, $`\pm 1^nC`$, Lee weights divisible by 4

() (Set $`t=y`$ in cwe)

$$\mathrm{\Phi }=\frac{1}{(1\lambda ^8)(1\lambda ^{16})(1\lambda ^{24})}$$

$$R:\frac{1}{\theta _8,\theta _{16},\theta _{24}}$$
(160)
However, the following result shows that the extra condition on the Lee weights may not be a good thing. For it was shown in  that most interesting linear codes over $`Z_4`$ do not have linear images under the Gray map.

###### Theorem 23

 If $`C`$ is a self-dual code over $`Z_4`$ with all Lee weights divisible by 4, then the binary image of $`C`$ under the Gray map (39) is linear.

For the proof, see .

#### Codes.

The following codes will be used: $`i_1`$ and $`𝒟_4^{}`$ are defined in Section 11.8, and $`o_8`$ is the octacode (38). $`𝒥_{10}`$ is the self-dual code with generator matrix

$$\left[\begin{array}{cccccccccc}1& 0& 1& 1& 1& 1& 1& 0& 1& 1\\ 0& 1& 0& 0& 0& 0& 3& 3& 1& 0\\ 0& 0& 2& 0& 0& 0& 0& 0& 0& 2\\ 0& 0& 0& 2& 0& 0& 0& 0& 0& 2\\ 0& 0& 0& 0& 2& 0& 0& 0& 0& 2\\ 0& 0& 0& 0& 0& 2& 0& 0& 0& 2\\ 0& 0& 0& 0& 0& 0& 2& 0& 2& 0\\ 0& 0& 0& 0& 0& 0& 0& 2& 2& 2\end{array}\right]$$

and $`|𝒥_{10}|=4^22^6`$ (). $`𝒥_{16}`$ has generator matrix

$$\left[\begin{array}{cccccccccccccccc}1& 0& 0& 0& 0& 0& 1& 1& 1& 0& 3& 3& 1& 0& 3& 2\\ 0& 1& 0& 0& 0& 0& 1& 0& 0& 1& 3& 3& 1& 1& 2& 3\\ 0& 0& 1& 0& 0& 0& 1& 0& 0& 0& 0& 2& 2& 0& 3& 3\\ 0& 0& 0& 1& 0& 0& 0& 1& 1& 1& 3& 0& 2& 3& 3& 1\\ 0& 0& 0& 0& 1& 0& 0& 1& 1& 1& 0& 0& 1& 1& 1& 1\\ 0& 0& 0& 0& 0& 1& 0& 0& 0& 0& 0& 3& 2& 0& 1& 1\\ 0& 0& 0& 0& 0& 0& 2& 0& 0& 0& 0& 2& 0& 2& 0& 2\\ 0& 0& 0& 0& 0& 0& 0& 2& 0& 0& 0& 0& 0& 2& 2& 2\\ 0& 0& 0& 0& 0& 0& 0& 0& 2& 0& 0& 0& 0& 2& 2& 2\\ 0& 0& 0& 0& 0& 0& 0& 0& 0& 2& 0& 0& 0& 2& 0& 0\end{array}\right]$$

and $`|𝒥_{16}|=4^62^4`$.

$`𝒦_{4m}`$ $`(m1`$, but note that $`𝒦_4𝒟_4^{}`$) is a self-dual code introduced by Klemm , having generator matrix

$$\left[\begin{array}{cccccc}1& 1& 1& \mathrm{}& 1& 1\\ 0& 2& 0& \mathrm{}& 0& 2\\ 0& 0& 2& \mathrm{}& 0& 2\\ .& .& .& \mathrm{}& .& .\\ 0& 0& 0& \mathrm{}& 2& 2\end{array}\right];$$
(161)
$`|𝒦_{4m}|=4^12^{4m2}`$, $`g=2^{4m1}(4m)!`$, $`cwe=(A^{4m}+B^{4m}+C^{4m}+D^{4m})/2`$ (see (143)).

Ring Codes    (142) $`i_1`$, $`𝒟_4^{}`$ in 2 versions (181), $`o_8`$; $`𝒥_{10}`$  (144) $`i_1,𝒟_4^{}`$, $`o_8`$  (145) $`i_1,𝒟_4^{}`$; $`o_8`$  (146) $`𝒦_4`$, $`𝒦_8`$, $`o_8`$, $`𝒦_{16}`$; $`𝒦_{12},𝒥_{16}`$  (147) $`𝒦_4`$, $`𝒦_8`$, $`o_8`$; $`𝒦_{12}`$  (148) $`𝒦_4`$, $`o_8`$; $`𝒦_8`$, $`𝒦_{12}`$  (157) $`𝒦_8`$, $`o_8`$, $`𝒦_{16}`$, $`𝒦_{24}`$; $`𝒥_{16}`$,?  (158) $`𝒦_8`$, $`o_8`$, $`𝒦_{24}`$; $`𝒥_{16}`$  (160) $`𝒦_8`$, $`𝒦_{16}`$, $`𝒦_{24}`$    (162)
Again the question mark indicates that we do not have a satisfactory code to produce the desired polynomial.

### 7.12 Family $`m^Z`$: Self-dual codes over $`Z_m`$

The Hamming weight enumerator of a self-dual code over $`Z_m`$ for general $`m`$ has been considered in .

## 8 Weight enumerators of maximally self-orthogonal codes

In some cases it is possible to prove results analogous to those in Section 7 for codes which are maximally self-orthogonal yet not self-dual, the $`[7,3,4]`$ Hamming code $`e_7`$ with weight enumerator $`p_7=x^7+7x^3y^4`$ being a typical example. A more trivial example is the zero code $`z_1=\{0\}`$, with weight enumerator $`p_1=x`$.

The following results are proved in .

For $`n`$ odd, let $`C`$ be an $`[n,\frac{1}{2}(n1)]`$ self-orthogonal binary code. Thus $`C^{}=C(1+C)`$. The weight enumerator of $`C`$ belongs to the module $`R=p_1C[x^2+y^2,x^2y^2(x^2y^2)^2]p_7C[x^2+y^2,x^2y^2(x^2y^2)^2]`$, which in the notation of the previous section would be described by

$$\mathrm{\Phi }=\frac{\lambda +\lambda ^7}{(1\lambda ^2)(1\lambda ^8)}$$

$$R:\frac{p_1,p_7}{x^2+y^2,x^2y^2(x^2y^2)^2}$$
(163)
(compare (98)). If in addition $`C`$ is doubly-even, the module is described by:

(a) if $`n=8m1`$,

$$\mathrm{\Phi }=\frac{\lambda ^7+\lambda ^{23}}{(1\lambda ^8)(1\lambda ^{24})}$$

$$R:\frac{p_7,p_{23}}{x^8+14x^4y^4+y^8,x^4y^4(x^4y^4)^4}$$
(164)
(b) if $`n=8m+1`$,

$$\mathrm{\Phi }=\frac{\lambda +\lambda ^{17}}{(1\lambda ^8)(1\lambda ^{24})}$$

$$R:\frac{p_1,p_{17}}{x^8+14x^4y^4+y^8,x^4y^4(x^4y^4)^4}$$
(165)
(compare (102)). Here $`p_{17}=x^{17}+17x^{13}y^4+187x^9y^8+51x^5y^{12}`$, $`p_{23}=x^{23}+506x^{15}y^8+1288x^{11}y^{12}+253x^7y^{16}`$.

#### Codes.

The code $`g_{23}`$ is the cyclic version of $`g_{24}`$ obtained by deleting any coordinate.

| Ring | Codes |
| --- | --- |
| (163) | $`i_2,e_8;z_1,e_7`$ |
| (164) | $`e_8,g_{24};e_7,g_{23}`$ |
| (165) | $`e_8,g_{24};z_1,(d_{10}e_7)^+`$ |

There are analogous results for ternary codes: see .

## 9 Upper bounds

Of course, we are interested not just in codes per se, but also in good (or, at the very least, interesting) codes, that is, codes with large minimal distance (Hamming, Lee, or Euclidean, as appropriate). In order to know if a particular code is good, it is necessary to know how good comparable codes could be; that is, for a given length and dimension, what is the optimal minimal distance? For general codes, this question was studied in Chapters xx (Levenshtein), yy (Brouwer) and zz (Litsyn); we are, of course, interested in self-dual codes. As one might imagine, the constraint of self-duality usually leads to stronger bounds.

We will concentrate most of our attention on binary codes (family $`2`$), pointing out analogues to other families as they arise.

Essentially all of the bounds we will be discussing are special cases of the linear programming (or LP) bound (Section 2.5 of Chapter yy (Brouwer)); that is, they rely on the fact that both the weight enumerator of the code and the weight enumerator of its dual are nonnegative. For a self-dual code, these weight enumerators are, of course, equal. So for Type II self-dual binary codes, for instance, we have the following:

###### Theorem 24

If there exists a Type II self-dual binary code of length $`n`$ and minimal distance $`d`$, then there exists a homogeneous polynomial $`W(x,y)`$ with nonnegative (integer) coefficients such that

$`2^{n/2}W(x+y,xy)`$ $`=`$ $`W(x,y)`$
$`W(1,y)`$ $`=`$ $`1+O(y^d)`$
$`W(x,iy)`$ $`=`$ $`W(x,y).`$
These conditions assert that the code is self-dual, that it has minimal distance $`d`$, and that it is of Type II, respectively.

The analogues for other classes of codes should be clear; in each case, the appropriate enumerator (Hamming, symmetrized, complete) is nonnegative, invariant under the appropriate transformations (see Section 7), and is zero on all terms of low weight. In some cases, we can add further constraints from shadow theory (Section 5), since the weight enumerator of the shadow of the code is also nonnegative. For instance:

###### Theorem 25

If there exists a Type I self-dual binary code of length $`n`$ and minimal distance $`d`$, then there exist homogeneous polynomials $`W(x,y)`$ and $`S(x,y)`$ with nonnegative (integer) coefficients such that

$`W(x,y)`$ $`=`$ $`2^{n/2}W(x+y,xy)`$
$`W(1,y)`$ $`=`$ $`1+O(y^d)`$
$`S(x,y)`$ $`=`$ $`2^{n/2}W(x+y,i(xy)).`$
Again there are analogues for each family for which shadows are well-defined ($`2`$, $`4^{\mathrm{H}+}`$, $`4^Z`$).

#### Remark.

For a code $`C`$ from family $`q^\mathrm{H}`$ (linear over $`F_q`$, $`q`$ a square, with Hermitian inner product), it can be shown that the polynomial

$$S(x,y)=q^{n/2}W((\sqrt{q}1)x+(\sqrt{q}+1)y,yx)$$

has nonnegative (but not necessarily integral) coefficients; note that this agrees with the shadow enumerator for $`q=4`$. This can be used to strengthen the LP bound in those cases. The known proof that this is nonnegative involves constructing a quantum code $`Q`$ from $`C`$ (); $`S(x,y)`$ is then the shadow enumerator of $`Q`$ (, proved nonnegative in ). There is surely a more direct proof.

One way to apply the linear programming bound is to ignore the constraint that the coefficients of $`W(x,y)`$ be nonnegative, and simply ask that the low order coefficients be as specified. This gives a surprisingly good bound for Type II binary codes. Recall from Theorem 13 that for $`C`$ of Type II, $`W(x,y)`$ lies in the ring

$$R=C[x^8+14x^4y^4+y^8,x^4y^4(x^4y^4)^4],$$

and if $`C`$ has length $`n`$, $`W(x,y)`$ has degree $`n`$. The subspace of $`R`$ of degree $`n`$ has dimension $`D=[\frac{n}{24}]+1`$. This lets us set the first $`D`$ coefficients of $`W(x,y)`$ arbitrarily; in particular, there exists a unique element $`W^{}(x,y)`$ of $`R`$ such that $`W^{}(1,y)=1+O(y^{4D})`$. This is known as the extremal enumerator, since $`W^{}`$ has the largest minimal distance of any Type II self-dual enumerator. It follows immediately that the minimal distance of any Type II code of length $`n`$ is bounded above by the minimal distance of $`W^{}`$.

###### Theorem 26

 The first nonzero coefficient of $`W^{}(1,y)`$ occurs precisely at degree $`4D`$; in particular, the minimal distance of a Type II self-dual binary code of length $`n`$ is at most $`4[n/24]+4`$.

In fact it is possible to use the Bürmann-Lagrange theorem (Theorem 32) to derive an explicit formula for the number of words of weight $`4D`$ in the extremal enumerator. Let $`\mu =[n/24]`$, so that $`D=\mu +1`$. Then we have

###### Theorem 27

(Mallows and Sloane .) $`A_{4\mu +4}^{}`$, the number of codewords of minimal nonzero weight $`4D=4\mu +4`$ in the extremal weight enumerator, is given by:

$$\left(\genfrac{}{}{0pt}{}{n}{5}\right)\left(\genfrac{}{}{0pt}{}{5\mu 2}{\mu 1}\right)/\left(\genfrac{}{}{0pt}{}{4\mu +4}{5}\right),\text{if}n=24\mu ,$$
(166)
$$\frac{1}{4}n(n1)(n2)(n4)\frac{(5\mu )!}{\mu !(4\mu +4)!},\text{if}n=24\mu +8,$$
(167)
$$\frac{3}{2}n(n2)\frac{(5\mu +2)!}{\mu !(4\mu +4)!},\text{if}n=24\mu +16,$$
(168)
and is never zero.

For the proof, see  or , Chapter 19. There is a similar formula for Type I binary codes — see , Chapter 19, Problem (12).

Results similar to Theorem 26 hold for other families:

###### Theorem 28

The minimal distance of a Type I binary self-dual code is at most $`2[n/8]+2`$. The minimal distance of a Type II binary self-dual code is at most $`4[n/24]+4`$. The minimal distance of a self-dual code from family $`3`$ is at most $`3[n/12]+3`$. The minimal distance of a self-dual code from family $`4^\mathrm{H}`$ is at most $`2[n/6]+2`$. The minimal distance of a Type II self-dual code from family $`4^{\mathrm{H}+}`$ is at most $`2[n/6]+2`$. The minimal distance of a self-dual code from families $`4^\mathrm{E}`$, $`4^{\mathrm{H}+}`$, $`q^\mathrm{H}`$ or $`q^\mathrm{E}`$ is at most $`[n/2]+1`$.

Note that the last bound is simply the Singleton bound, obtained from the ring $`C[x^2+(q1)y^2,y(xy)]`$ of (138). As we have already remarked in Section 7.8, this is not the correct ring (that is, the smallest ring containing all Hamming enumerators of self-dual codes). In some cases ($`q=4`$ or $`q=5`$), we know a smaller ring; however, since the ring is no longer free, it is much more difficult to use. In particular, it is no longer the case that we may set the leading coefficients arbitrarily. This leads to the extremal enumerator not being unique, making it difficult to determine its first nonzero coefficient. Similarly, any attempt to make an analogous argument for families $`4^Z`$ or $`m^Z`$ will have the problem that, in those cases, we are primarily interested in Lee weight or Euclidean norm, forcing us to work with the symmetrized weight enumerator. This is, of course, much more difficult to deal with than the Hamming enumerator. A partial solution to this problem is provided by Theorem 34 below.

In each case it can be shown (cf. ) that the bounds of Theorems 26 and 28 can be met for at most finitely many $`n`$: in fact, the next coefficient $`(A_{4\mu +8}^{})`$ after the leading nonzero coefficient in the extremal enumerator becomes negative for sufficiently large $`n`$. Furthermore, for any constant $`\alpha `$, the minimal distance can be within $`\alpha `$ of the bound only finitely often. For Type II binary codes, for instance, it was shown in  that the $`A_{4n+8}^{}`$ term first goes negative when $`n`$ is around 3720. Ma and Zhu  and Zhang  have recently determined precisely when the $`A_{4n+8}^{}`$ term first goes negative, and have obtained similar results for several other families. The following result incorporates the work of several authors.

###### Theorem 29

 Let $`C`$ be a self-dual code of length $`n`$ from one of the families $`2_\mathrm{I}`$, $`2_{\mathrm{II}}`$, $`3`$, $`4^\mathrm{H}`$; and let $`c=2,4,3,2`$, respectively, and $`\mu =[n/8]`$, $`[n/24]`$, $`[n/12]`$, $`[n/6]`$. Then the coefficient $`A_{c(\mu +2)}^{}`$ in the extremal Hamming weight enumerator is negative if and only if:

$$\begin{array}{cc}(2_\mathrm{I})\text{:}\hfill & n=8i(i4),8i+2(i5),8i+4(i6),8i+6(i7);\hfill \\ (2_{\mathrm{II}})\text{:}\hfill & n=24i(i154),24i+8(i159),24i+16(i164);\hfill \\ (3)\text{:}\hfill & n=12i(i70),12i+4(i75),12i+8(i78);\hfill \\ (4^\mathrm{H})\text{:}\hfill & n=6i(i17),6i+2(i20),6i+4(i22).\hfill \end{array}$$

In particular, the first time $`A_{4\mu +8}^{}`$ goes negative for Type II codes is at $`24\times 154=3696`$.

Of course other coefficients in the extremal weight enumerator may go negative before this. In the case of ternary self-dual codes, for example, family $`3`$, the extremal Hamming weight enumerator contains a negative coefficient for lengths 72, 96, 120 and all $`n144`$.

The best asymptotic bound presently known for Type II codes is the following.

###### Theorem 30

(Krasikov and Litsyn .) The minimal distance $`d`$ of a Type II binary code of length $`n`$ satisfies

$$d0.166315\mathrm{}n+o(n),n\mathrm{}.$$

The constant in this expression is the real root of $`8x^524x^4+40x^330x^2+10x1`$.

The proof uses a variant of the linear programming bound.

For Type I binary codes, the bound of Theorem 28 is especially weak. Ward  has shown that the minimal distance can be $`2[n/8]+2`$ precisely when $`n`$ is one of 2, 4, 6, 8, 12, 14, 22 or 24. This suggests that the bound can be greatly strengthened, which is indeed the case. Conway and Sloane  showed that $`d2[(n+6)/10]`$ for $`n>72`$, and Ward (, see also Chapter “Ward”) established $`dn/6+O(\mathrm{log}n)`$. It turns out, in fact, that the “correct” bound is $`4[n/24]+4`$ (except when $`n+2`$ is a multiple of 24), just as for Type II codes. The key to proving this fact is the observation that we have not yet used the shadow enumerator.

###### Theorem 31

(Rains .) Suppose $`C`$ is a $`[n,n/2,d]`$ self-dual binary code. Then $`d4[n/24]+4`$, except when $`n22`$ $`(mod24)`$, when $`d4[n/24]+6`$. If $`n`$ is a multiple of 24, any code meeting the bound is of Type II. If $`n22`$ $`(mod24)`$, any code meeting the bound can be obtained by shortening a Type II code of length $`n+2`$ that also meets the bound.

#### Proof (sketch).

From (98), $`W(x,y)`$ lies in the ring $`C[x^2+y^2,x^2y^2(x^2y^2)^2]`$; consequently we can write

$`W(1,y)`$ $`=`$ $`{\displaystyle \underset{j}{}}a_jy^{2j}`$
$`=`$ $`{\displaystyle \underset{i}{}}c_i(1+y^2)^{n/24i}(y^2(1y^2)^2)^i.`$
Applying the shadow transform, we have

$`S(1,y)`$ $`=`$ $`{\displaystyle \underset{j}{}}b_jy^{2j+t}`$
$`=`$ $`{\displaystyle \underset{i}{}}c_i(2y)^{n/24i}((1y^4)/2)^i,`$
where $`t=((n/2)mod4)`$. Suppose $`C`$ had minimal distance $`4[n/24]+6`$. This fact determines $`c_i`$ for $`0i2[n/24]+2`$, and in particular $`c_{2[n/24]+2}`$. On the other hand, we can also express $`c_{2[n/24]+2}`$ as a linear combination of the $`b_j`$ for small $`j`$. It turns out that these two expressions for $`c_{2[n/24]+2}`$ are incompatible; in particular, we find that a certain nonnegative linear combination of the $`b_j`$ is negative.

Rather than give the (somewhat messy) details of the proof, we will simply show how one can compute the coefficients in these linear combinations. This uses the Bürmann-Lagrange theorem:

###### Theorem 32

(Bürmann-Lagrange.) Let $`f(x)`$ and $`g(x)`$ be formal power series, with $`g(0)=0`$ and $`g^{}(0)0`$. If coefficients $`\kappa _{ij}`$ are defined by

$$x^jf(x)=\underset{0i}{}\kappa _{ij}g(x)^i,$$

then

$$\kappa _{ij}=\frac{1}{i}[\text{coeff. of }x^{i1}\text{ in }[jx^{j1}f(x)+x^jf^{}(x)]\left(\frac{x}{g(x)}\right)^i].$$

For proof and generalizations, see \[328, p. 133\], , , , .

For instance, to compute $`c_{2[n/24]+2}`$, we note that

$$\underset{i}{}c_i(1+y^2)^{n/24i}(y^2(1y^2)^2)^i=1+O(y^{4[n/24]+6}).$$

Dividing both sides by $`(1+y^2)^{n/2}`$ and substituting $`y=\sqrt{Y}`$, we get:

$$\underset{i}{}c_i\left(\frac{Y(1Y)^2}{(1+Y)^4}\right)^i=(1+Y)^{n/2}+O(Y^{2[n/24]+3}).$$

We can then apply Bürmann-Lagrange, with

$$f(Y)=(1+Y)^{n/2},g(Y)=Y(1Y)^2(1+Y)^4$$

to obtain

$`c_i`$ $`=`$ $`{\displaystyle \frac{1}{i}}[\text{coeff. of }Y^{i1}\text{ in }[\frac{d}{dY}(1+Y)^{n/2}]\left((1+Y)^4(1Y)^2\right)^i]`$
$`=`$ $`{\displaystyle \frac{n}{2i}}[\text{coeff. of }Y^{i1}\text{ in }(1+Y)^{n/21+4i}(1Y)^{2i}]`$
$`=`$ $`{\displaystyle \frac{n}{2i}}[\text{coeff. of }Y^{i1}\text{ in }(1+Y)^{n/21+6i}(1Y^2)^{2i}].`$
In particular, for $`i=2[n/24]+2`$,

$$c_{2[n/24]+2}=\frac{n}{4[n/24]+4}[\text{coeff. of }Y^{2[n/24]+1}\text{ in }(1+Y)^{n/2+12[n/24]+11}(1Y^2)^{4[n/24]4}].$$

It follows that $`c_{2[n/24]+2}0`$, with equality only when $`n22`$ $`(mod24)`$, since all coefficients of any power series of the form $`(1+Y)^a(1Y^2)^b`$ are positive whenever $`a`$, $`b>0`$.

Similarly, we find that the coefficients of the expansion of $`c_{2[n/24]+2}`$ in terms of the $`b_j`$ are positive. This proves the bound, except when $`n22`$ $`(mod24)`$; the proof that the bound holds in that case and that a code meeting the bound is even if $`n0`$ $`(mod24)`$ is left to the reader.

This bound agrees with the full linear programming bound for $`n200`$, and, most likely, for much larger $`n`$. However, it is likely that again it can only be attained for finitely many $`n`$.

There is also an analogue of this bound for Type I codes from family $`4^{\mathrm{H}+}`$.

###### Theorem 33

If $`C`$ is an additive self-dual code of length $`n`$ and minimal distance $`d`$ from family $`4^{\mathrm{H}+}`$, then $`d2[n/6]+2`$, except when $`n5(mod6))`$, when $`d2[n/6]+3`$. If $`n`$ is a multiple of 6, then any code meeting the bound is even.

We will call a code extremal if it meets the strongest of the applicable bounds from Theorems 28, 31, and 33. For Type II binary codes, ternary codes, and linear codes over $`GF(4)`$ this agrees with the historical usage. For Type I binary codes, however, “extremal” has generally been used to mean a code meeting the much weaker bound of Theorem 28; in the light of Theorem 31, it seems appropriate to change the definition.

Concerning codes over $`Z_4`$, Bonnecaze, Solé, Bachoc and Mourrain  show:

###### Theorem 34

Suppose $`C`$ is a Type II self-dual code over $`Z_4`$ of length $`n`$. Then the minimal Euclidean norm of $`C`$ is at most

$$8\left[\frac{n}{24}\right]+8.$$
(169)
The proof uses $`C`$ to define an even unimodular $`n`$-dimensional lattice $`\mathrm{\Lambda }(C)=\{\frac{1}{2}uR^n:u(mod4)C\}`$, and examines its theta series.

As usual, one can derive an analogue for Type I codes:

###### Theorem 35

 Suppose $`C`$ is a Type I self-dual code over $`Z_4`$ of length $`n`$. The minimal Euclidean norm of $`C`$ is at most

$$8\left[\frac{n}{24}\right]+8,$$
(170)
except when $`n23`$ $`(mod24)`$, in which case the bound is

$$8\left[\frac{n}{24}\right]+12.$$
(171)
If equality holds in (171) then $`C`$ is a shortened version of a Type II code of length $`n+1`$.

We say that codes meeting either of these bounds are norm-extremal. For Type II codes this agrees with the definition given in .

There should be an analogous concept of Lee-extremal, but at present we do not know what this is. Of course, the bounds (170) and (171) also apply to Lee weight. But this is not a satisfactory bound, since it is not even tight at length 24, where the highest attainable Lee weight is 12 rather than 16 (see Table XVI).

The fact that, from Theorem 31, an extremal binary code of length a multiple of 24 must be doubly-even suggests that these codes are likely to be particularly nice. Indeed, we have the following result, which is a consequence of the Assmus-Mattson theorem (see \[191, Chap. 6\], Theorem 11.14 of Chapter 1, Section 5 of Chapter xx (Tonchev)).

###### Theorem 36

Let $`C`$ be an extremal binary code of length $`24m`$. Then the codewords of $`C`$ of any given weight form a 5-design.

Similarly, the supports of the minimal codewords of an extremal ternary code of length $`12m`$ form a 5-design. For codewords of larger weight, the natural incidence structure is almost a 5-design, except that it may have repeated blocks. Similarly, for an extremal additive code over $`F_4`$ of length $`6m`$, the supports with multiplicities of the codewords of any fixed weight form a 5-design with repeated blocks. Harada  has shown that the $`Z_4`$-lift of the Golay code $`g_{24}`$ also yields 5-designs. More generally, one can show that the words of any fixed symmetrized type, in any of the 13 Lee-optimal self-dual codes of length 24 over $`Z_4`$, form a colored 5-design, possibly with repeated blocks . See also .

## 10 Lower bounds

There are two ways to obtain lower bounds on the optimum minimal distance of a code of length $`n`$. The first way, naturally, is simply to construct a good code. Just as for general linear codes, there is also a nonconstructive lower bound, analogous to the Gilbert-Varshamov bound (cf. Theorems 3.1, 3.4, 3.5 of Chapter 1).

We first consider the case of self-dual binary codes (family $`2`$).

###### Theorem 37

,  Let $`n`$ be any positive even integer. Let $`d_{GV}`$ be the largest integer such that

$$\underset{\genfrac{}{}{0pt}{}{0<i<d}{2|i}}{}\left(\genfrac{}{}{0pt}{}{n}{i}\right)<2^{n/21}+1.$$
(172)
Then there exists a self-dual binary code of length $`n`$ and minimal distance at least $`d_{GV}`$.

#### Proof

If we can show that the expected number of nonzero vectors of weight less than $`d_{GV}`$ in a random self-dual code of length $`n`$ is less than 1, it will immediately follow that there exists some self-dual code of length $`n`$ with no such vectors.

Let us therefore compute the average weight enumerator of the set of self-dual codes. Consider the group $`G`$ of binary matrices that preserve the quadratic form $`I`$. On the vector space of even weight vectors, modulo the all 1’s vector, the quadratic form becomes symplectic, and the group acts as the full symplectic group. In particular, it is therefore transitive on nonzero vectors of even weight, modulo $`1^n`$. It follows that the expected number of vectors of weight $`2i`$ in a random code must be proportional to $`\left(\genfrac{}{}{0pt}{}{n}{2i}\right)`$, except for $`i=0`$ or $`i=n/2`$. Thus the average weight enumerator has the form:

$`\overline{W}(x,y)`$ $`=`$ $`ax^n+b{\displaystyle \underset{1in/21}{}}\left({\displaystyle \genfrac{}{}{0pt}{}{n}{2i}}\right)x^{n2i}y^{2i}+cy^n`$
$`=`$ $`ax^n+cy^n+b({\displaystyle \frac{1}{2}}(x+y)^n+{\displaystyle \frac{1}{2}}(xy)^nx^ny^n).`$
Since every self-dual binary code contains the 0 vector and the all 1’s vector, $`\overline{W}(1,0)=\overline{W}(0,1)=1`$; since every self-dual code contains a total of $`2^{n/2}`$ vectors, $`\overline{W}(1,1)=2^{n/2}`$. Solving for $`a`$, $`b`$, and $`c`$, we find:

$$\overline{W}(x,y)=x^n+y^n+\frac{1}{2^{n/21}+1}\underset{1in/21}{}\left(\genfrac{}{}{0pt}{}{n}{2i}\right)x^{n2i}y^{2i}.$$

Thus the average number of nonzero vectors of weight less than $`d`$ is

$$\frac{1}{2^{n/21}+1}\underset{\genfrac{}{}{0pt}{}{0<i<d}{2|i}}{}\left(\genfrac{}{}{0pt}{}{n}{i}\right).\text{ }$$

###### Corollary 2

,  There exists an infinite sequence of self-dual $`[n_i,n_i/2,d_i]`$ binary codes, such that $`n_i`$ tends to infinity, and

$$\underset{i\mathrm{}}{lim\; inf}\frac{d_i}{n_i}\delta ,$$

where $`\delta .11002786`$ is the unique solution less than $`\frac{1}{2}`$ of

$$H_2(\delta )=\delta \mathrm{log}_2(\delta )(1\delta )\mathrm{log}_2(1\delta )=\frac{1}{2}.$$

#### Proof.

Take the logarithm of both sides of (172), divide by $`n`$, and let $`n`$ tend to infinity. The resulting inequality is

$$H_2(\delta )\frac{1}{2},$$

as desired.

Similar results hold if one restricts ones attention to codes of Type II:

###### Theorem 38

,  Let $`n`$ be any positive multiple of 8. Let $`d_{GV}`$ be the largest integer such that

$$\underset{\genfrac{}{}{0pt}{}{0<i<d}{4|i}}{}\left(\genfrac{}{}{0pt}{}{n}{i}\right)<2^{n/22}+1$$
(173)
Then there exists a doubly-even self-dual binary code of length $`n`$ and minimal distance at least $`d_{GV}`$.

#### Proof.

Again we compute the average weight enumerator. The key observation is that the function $`\frac{1}{2}wt(v)`$ induces a quadratic form on the space of even weight vectors modulo the all 1’s vector. The group of matrices that preserve this quadratic form is transitive on the kernel of this quadratic form; that is, vectors of weight divisible by 4, modulo $`1^n`$. This allows us to write down the average weight enumerator:

$$\overline{W}_{II}(x,y)=x^n+y^n+\frac{1}{2^{n/22}+1}\underset{0<i<n/4}{}\left(\genfrac{}{}{0pt}{}{n}{4i}\right)x^{n4i}y^{4i}.$$

Asymptotically, this agrees with Corollary 2 (as well as the Gilbert-Varshamov bound). For finite $`n`$, it is actually (slightly) stronger! That is, the constraint that the code be Type II makes it easier to find good codes.

Similar arguments prove:

###### Theorem 39

In each family from the list $`2_\mathrm{I}`$, $`2_{\mathrm{II}}`$, $`3`$, $`4^\mathrm{H}`$, $`4^\mathrm{E}`$, $`4_\mathrm{I}^{\mathrm{H}+}`$, $`4_{\mathrm{II}}^{\mathrm{H}+}`$, $`q^\mathrm{H}`$ and $`q^\mathrm{E}`$ there exists a sequence of self-dual codes with length tending to infinity satisfying

$$\underset{i\mathrm{}}{lim\; inf}\frac{d_i}{n_i}\delta ,$$

where

$$H_q(\delta )=\delta \mathrm{log}_q(q1)\delta \mathrm{log}_q(\delta )(1\delta )\mathrm{log}_q(1\delta )=\frac{1}{2}.$$

The result for families $`q^\mathrm{H}`$ and $`q^\mathrm{E}`$ was first given by Pless and Pierce .

Similar results hold for self-dual codes over $`Z_4`$:

###### Theorem 40

There exists a family of Type II self-dual codes over $`Z_4`$, with length tending to infinity, such that

$$\underset{i\mathrm{}}{lim\; inf}\frac{l_i}{2n_i}\delta ,$$

where $`l_i`$ is the minimal Lee weight of the $`i`$th code and $`\delta =H_2^1(1/2)`$, as before.

###### Theorem 41

There exists a family of Type II self-dual codes over $`Z_4`$, with length tending to infinity, such that

$$\underset{i\mathrm{}}{lim\; inf}\frac{N_i}{n_i}.34737283\mathrm{},$$

where $`N_i`$ is the minimal Euclidean norm of the $`i`$th code.

## 11 Enumeration of self-dual codes

### 11.1 Gluing theory

Gluing is a technique for building up self-dual codes from smaller codes, and is especially useful when one is attempting to classify all self-dual codes of a given length. Typically one finds that there are many codes with low minimal distance and only a few with high minimal distance. Gluing theory is good at finding all the codes of low distance.

The first formal description of gluing theory appeared in . It has also been used in , , , , , etc.

The theory applies to codes from any of the families that we have discussed in this chapter. Let $`C_1,\mathrm{},C_t`$ be self-orthogonal codes of lengths $`n_1,\mathrm{},n_t`$ with generator matrices $`G_1,\mathrm{},G_t`$. If $`C`$ is a self-dual code with the generator matrix shown in Fig. 1 then we say that $`C`$ is formed by gluing the components $`C_1,\mathrm{},C_t`$ together, and we write

$$C=(C_1C_2\mathrm{}C_t)^+$$
(174)
to indicate this process. (Whenever possible the subcodes are chosen so that every minimal weight codeword of $`C`$ belongs to one of the $`C_i`$.) The codewords in $`C`$ which contain a nonzero linear combination of the rows of the matrix $`X`$ are called glue words, since these hold the components together. A glue word has the form

$$u=u_1u_2\mathrm{}u_t,$$
(175)
where each glue element $`u_i`$ has length $`n_i`$. Since $`C`$ is self-dual, $`u_i`$ is in $`C_i^{}`$.

Let us choose coset representatives $`a_0=0`$, $`a_1,\mathrm{},a_{s1}`$ for $`C_i`$ in $`C_i^{}`$, where $`s=|C_i^{}|/|C_i|`$, so that

$$C_i^{}=\underset{j=0}{\overset{s1}{}}(a_j+C_i).$$

Then we can assume that each $`u_i`$ in (175) is one of $`a_0,\mathrm{},a_{s1}`$.

As illustrations we give the two indecomposable binary Type I self-dual codes of length 18 (see Tables II and VI), using the components from the list in Section 11.3. The first code is formed by gluing three copies of the component $`d_6`$ together:

$$\begin{array}{cccccccccccccccccc}& & & & & & & & & & & & & & & & & \\ 1\hfill & 1\hfill & 1\hfill & 1\hfill & & & & & & & & & & & & & & \\ & & 1\hfill & 1\hfill & 1\hfill & 1\hfill & & & & & & & & & & & & \\ & & & & & & & & & & & & & & & & & \\ & & & & & & 1\hfill & 1\hfill & 1\hfill & 1\hfill & & & & & & & & \\ & & & & & & & & 1\hfill & 1\hfill & 1\hfill & 1\hfill & & & & & & \\ & & & & & & & & & & & & & & & & & \\ & & & & & & & & & & & & 1\hfill & 1\hfill & 1\hfill & 1\hfill & & \\ & & & & & & & & & & & & & & 1\hfill & 1\hfill & 1\hfill & 1\hfill \\ & & & & & & & & & & & & & & & & & \\ 0\hfill & 1\hfill & 0\hfill & 1\hfill & 0\hfill & 1\hfill & 0\hfill & 0\hfill & 0\hfill & 0\hfill & 1\hfill & 1\hfill & 0\hfill & 1\hfill & 0\hfill & 1\hfill & 1\hfill & 0\hfill \\ 0\hfill & 1\hfill & 0\hfill & 1\hfill & 1\hfill & 0\hfill & 0\hfill & 1\hfill & 0\hfill & 1\hfill & 0\hfill & 1\hfill & 0\hfill & 0\hfill & 0\hfill & 0\hfill & 1\hfill & 1\hfill \\ 0\hfill & 0\hfill & 0\hfill & 0\hfill & 1\hfill & 1\hfill & 0\hfill & 0\hfill & 0\hfill & 0\hfill & 1\hfill & 1\hfill & 0\hfill & 0\hfill & 0\hfill & 0\hfill & 1\hfill & 1\hfill \end{array}$$
(176)
The three glue vectors shown are $`abc`$, $`cab`$ and $`bbb`$.

The second code is formed by gluing together $`d_{10}`$, $`e_7`$ and a “free” (or empty) component $`f_1`$:

$$\begin{array}{cccccccccccccccccc}& & & & & & & & & & & & & & & & & \\ 1\hfill & 1\hfill & 1\hfill & 1\hfill & & & & & & & & & & & & & & \\ & & 1\hfill & 1\hfill & 1\hfill & 1\hfill & & & & & & & & & & & & \\ & & & & 1\hfill & 1\hfill & 1\hfill & 1\hfill & & & & & & & & & & \\ & & & & & & 1\hfill & 1\hfill & 1\hfill & 1\hfill & & & & & & & & \\ & & & & & & & & & & & & & & & & & \\ & & & & & & & & & & 1\hfill & 1\hfill & 1\hfill & 0\hfill & 1\hfill & 0\hfill & 0\hfill & \\ & & & & & & & & & & 0\hfill & 1\hfill & 1\hfill & 1\hfill & 0\hfill & 1\hfill & 0\hfill & \\ & & & & & & & & & & 0\hfill & 0\hfill & 1\hfill & 1\hfill & 1\hfill & 0\hfill & 1\hfill & \\ & & & & & & & & & & & & & & & & & \\ 0\hfill & 1\hfill & 0\hfill & 1\hfill & 0\hfill & 1\hfill & 0\hfill & 1\hfill & 0\hfill & 1\hfill & 0\hfill & 0\hfill & 0\hfill & 0\hfill & 0\hfill & 0\hfill & 0\hfill & 1\hfill \\ 0\hfill & 1\hfill & 0\hfill & 1\hfill & 0\hfill & 1\hfill & 0\hfill & 1\hfill & 1\hfill & 0\hfill & 1\hfill & 1\hfill & 1\hfill & 1\hfill & 1\hfill & 1\hfill & 1\hfill & 0\hfill \end{array}$$
(177)
The two glue vectors shown are $`a0A`$ and $`cd0`$.

Of course a self-dual code has no (nonzero) glue. If a self-orthogonal code $`C`$ has a component $`B`$, say, which is self-dual, then $`C`$ is a direct sum $`C=BC^{}`$, where $`C^{}`$ is again self-orthogonal.

It may happen that there is a glue word in which only one $`u_i`$ is nonzero, in which case we say that the component $`C_i`$ has self-glue, and that $`u`$ is a self-glue vector. So if $`C`$ has a single component $`C_1`$ (say) with self-glue, we write $`C=C_1^+`$ (compare (174)).

A basic result of gluing theory is the following.

###### Theorem 42

If a self-dual code $`C`$ is formed by gluing together two codes $`C_1`$ and $`C_2`$ in such a way that there is no self-glue, then the quotient groups $`C_1^{}/C_1`$ and $`C_2^{}/C_2`$ are isomorphic.

We omit the easy proof. The isomorphism is given by $`u_1+C_1u_2+C_2`$ whenever there is a glue vector $`u_1u_2`$.

### 11.2 Automorphism groups of glued codes

One advantage of the gluing method is that it makes it much easier to find the automorphism group of a self-dual code $`C`$. We will denote the group by $`G(C)`$ rather than $`Aut(C)`$ in this section. It is essential that every automorphism of $`C`$ takes the set of component codes $`C_1,\mathrm{},C_t`$ to itself. We will always choose the components so that this is true.

This being the case, any automorphism in $`G(C)`$ will effect some permutation of the $`C_i`$, so that $`G(C)`$ will have a normal subgroup $`G_{01}`$ consisting of just those elements for which this permutation is trivial. The group of permutations of the components that are realized in this way we call $`G_2(C)`$ — it is isomorphic to the quotient group $`G(C)/G_{01}`$.

Let $`G_0(C)`$ be the normal subgroup of $`G_{01}`$ consisting of those automorphisms which, for every $`i`$, send each glue element $`u_i`$ into a vector in the same coset $`u_i+C_i`$, i.e. which fix the glue elements modulo the components. Then $`G_{01}/G_0(C)`$ is isomorphic to a group acting on the glue elements of each component: we call this group $`G_1(C)`$. Thus the full group $`G(C)`$ is compounded of the groups $`G_0(C)`$, $`G_1(C)`$ and $`G_2(C)`$, and has order

$$|G(C)|=|G_0(C)||G_1(C)||G_2(C)|.$$
(178)
Also $`G_0(C)`$ is the direct product of the groups $`G_0(C_i)`$. But in general $`G_1(C)`$ is only a subgroup of the direct product of the $`G_1(C_i)`$, and therefore must be computed directly for each $`C`$.

### 11.3 Family $`2`$: Enumeration of binary self-dual codes

The enumeration of binary self-dual codes of length $`n32`$ has been carried out in a series of papers: Pless  for $`n20`$; Conway (unpublished) for Type II of length 24; Pless and Sloane  for $`n=22`$, 24; Conway and Pless  for $`n=26`$ to 30 and Type II of length 32 (see also Pless ). Some errors in the last two references were corrected in Conway, Pless and Sloane . The results are summarized in Table I.

In this section we describe these codes, drawing heavily from the tables in .

Since (from (4)) there are at least 17493 inequivalent Type II codes of length 40, length 32 is probably a good place to stop.

Although the Type I codes of length 32 have not been classified, it is shown in  that there are precisely three inequivalent $`[32,16,8]`$ extremal Type I codes.

The following self-orthogonal codes will be used as components.

$`d_4:[1111]`$, glue: $`a=0011`$, $`b=0101`$, $`c=0110`$, $`|G_0|=4`$, $`G_1=S(3)`$ on $`\{a,b,c\}`$, $`|G_1|=6`$.

$`d_{2n}(n3)`$:

$$[111100\mathrm{},00111100\mathrm{},\mathrm{},\mathrm{}001111],$$
(179)
glue: $`a=0101\mathrm{}01`$, $`b=0000\mathrm{}11`$, $`c=0101\mathrm{}10`$, $`|G_0|=2^{n1}n!`$, $`|G_1|=2`$ (swap $`a`$ and $`c`$)

$`e_7:[(1110100)]`$, glue: $`a=1111111`$, $`G_0=L_3(2)`$, $`|G_0|=168`$, $`|G_1|=1`$.

$`e_8`$ is the $`[8,4,4]`$ Hamming code, see Section 3.2.

$`f_n:`$ If some coordinate positions contain very few codewords, it is often best to regard these places as containing the free (or empty) component $`f_n=\{0^n\}`$. In this case we label the coordinate positions by $`A`$, $`B`$, $`C,\mathrm{}`$, and use $`ABD`$ for example to denote the glue word $`110100\mathrm{}`$. Also $`|G_0|=1`$.

The above components are important in view of the following decomposition theorem for binary codes with low minimal distance.

###### Theorem 43

(a) If a self-orthogonal code $`C`$ has minimal distance 2 then $`C=i_2^kC^{}`$, where $`C^{}`$ has minimal distance at least 4. (b) If a self-orthogonal code $`C`$ is generated by words of weight 4 then $`C`$ is a direct sum of copies of the codes $`d_{2m}`$ $`(m2)`$, $`e_7`$ and $`e_8`$.

#### Proof.

(a) Suppose $`C`$ contains a word of weight 2, say $`u=1100\mathrm{}`$. Then any other word $`vC`$ must meet $`u`$ evenly, so begins $`00\mathrm{}`$ or $`11\mathrm{}`$ . Hence $`C=BC^{}`$ where $`B=[11]`$. (b) A set of mutually self-orthogonal words of weight 4 whose supports are linked is easily seen to be either a $`d_{2m}`$ for some $`m2`$, or an $`e_7`$ or $`e_8`$.

#### Remarks.

(1) Suppose $`C`$ is a self-dual code with minimal distance 4, and let $`C^{}`$ be the subcode generated by words of weight 4. Then $`C^{}`$ is as described in part (b) of the theorem, and $`C`$ can be regarded as being obtained by gluing $`C^{}`$ to some other subcode $`C^{\prime \prime }`$ (the latter may be the free component $`f_n`$).

(2) Generalizing Part (a) of the theorem, it is easy to show that any self-orthogonal code over a field $`F_q`$ with length $`n>2`$ and minimal distance 2 is decomposable (, Theorem 3).

The following are some additional components that will be used in Table II.

The code $`g_{24m}`$ $`(m=0,2,3,4,6,8)`$ is obtained by taking the words of the Golay code $`g_{24}`$ that vanish on $`m`$ digits (and then deleting those digits). For the  first-order Reed-Muller code $`g_{16}`$ the 8 digits must be a special octad, while for $`g_{18}`$ they must be an umbral hexad (see  for terminology). For $`0m6`$, $`g_{24m}`$ is a $`[24m,12m,8]`$ code.

The  half-Golay code $`h_{24}`$ consists of the Golay codewords that intersect a given tetrad evenly.

The odd Golay code $`h_{24}^+`$ is the $`[24,12,6]`$ Type I code generated by $`h_{24}`$ and an appropriate vector of weight 6. Alternatively, the odd Golay code may be obtained as follows. Let $`vF_2^{\mathrm{\hspace{0.17em}24}}`$ be a fixed vector of weight 4, say $`v=1^40^{24}`$. Then $`h_{24}^+=\{ug_{24}:wt(uv)\mathrm{even}\}\{u+v:ug_{24},wt(uv)\mathrm{odd}\}`$, with generator matrix

$$\begin{array}{cccccccccccccccccccccccc}& & & & & & & & & & & & & & & & & & & & & & & \\ 1& 1& 1& 1& 1& 1& 1& 1& 0& 0& 0& 0& 0& 0& 0& 0& 0& 0& 0& 0& 0& 0& 0& 0\\ 1& 1& 1& 1& 0& 0& 0& 0& 1& 1& 1& 1& 0& 0& 0& 0& 0& 0& 0& 0& 0& 0& 0& 0\\ 1& 1& 1& 1& 0& 0& 0& 0& 0& 0& 0& 0& 1& 1& 1& 1& 0& 0& 0& 0& 0& 0& 0& 0\\ 1& 1& 1& 1& 0& 0& 0& 0& 0& 0& 0& 0& 0& 0& 0& 0& 1& 1& 1& 1& 0& 0& 0& 0\\ 1& 1& 1& 1& 0& 0& 0& 0& 0& 0& 0& 0& 0& 0& 0& 0& 0& 0& 0& 0& 1& 1& 1& 1\\ & & & & & & & & & & & & & & & & & & & & & & & \\ 1& 1& 0& 0& 0& 0& 0& 0& 0& 0& 0& 0& 1& 1& 0& 0& 1& 0& 1& 0& 1& 0& 1& 0\\ 0& 0& 0& 0& 1& 1& 0& 0& 0& 0& 0& 0& 1& 0& 1& 0& 1& 1& 0& 0& 1& 0& 1& 0\\ 0& 0& 0& 0& 0& 0& 0& 0& 1& 1& 0& 0& 1& 0& 1& 0& 1& 0& 1& 0& 1& 1& 0& 0\\ & & & & & & & & & & & & & & & & & & & & & & & \\ 1& 0& 1& 0& 0& 0& 0& 0& 0& 0& 0& 0& 1& 0& 1& 0& 1& 0& 0& 1& 1& 0& 0& 1\\ 0& 0& 0& 0& 1& 0& 1& 0& 0& 0& 0& 0& 1& 0& 0& 1& 1& 0& 1& 0& 1& 0& 0& 1\\ 0& 0& 0& 0& 0& 0& 0& 0& 1& 0& 1& 0& 1& 0& 0& 1& 1& 0& 0& 1& 1& 0& 1& 0\\ & & & & & & & & & & & & & & & & & & & & & & & \\ 1& 0& 0& 0& 1& 0& 0& 0& 1& 0& 0& 0& 1& 0& 0& 0& 1& 0& 0& 0& 1& 0& 0& 0\end{array}$$

This code has weight enumerator $`x^{24}+64x^{18}y^6+375x^{16}y^8+960x^{14}y^{10}+1296x^{12}y^{12}+960x^{10}y^{14}+375x^8y^{16}+64x^8y^{18}+y^{24}`$, and $`Aut(h_{24}^+)`$ is the “sextet group” $`2^6\mathrm{:}3.S(6)`$, of order $`2^{10}.3^3.5=138240`$ (, \[71, p. 309\]).

The first 11 rows of the above matrix generate $`h_{24}`$; if the last row is replaced by

$$\begin{array}{cccccccccccccccccccccccc}& & & & & & & & & & & & & & & & & & & & & & & \\ 0& 1& 1& 1& 1& 0& 0& 0& 1& 0& 0& 0& 1& 0& 0& 0& 1& 0& 0& 0& 1& 0& 0& 0\end{array}$$

we get the Golay code $`g_{24}`$ itself; and if the last row is replaced by

$$\begin{array}{cccccccccccccccccccccccc}& & & & & & & & & & & & & & & & & & & & & & & \\ 1& 1& 1& 1& 0& 0& 0& 0& 0& 0& 0& 0& 0& 0& 0& 0& 0& 0& 0& 0& 0& 0& 0& 0\end{array}$$

we get $`(d_4^6)^+`$.

Under the action of $`Aut(g_{24})`$ there are two distinct ways to select tetrads $`t=\{c,d,e,f\}`$, $`u=\{a,b,e,f\}`$, $`v=\{a,b,c,d\}`$ so that $`t+u+v=0`$, depending on whether $`\{a,b,\mathrm{},f\}`$ is a special hexad or an umbral hexad (see Fig. 2). Correspondingly there are two  quarter-Golay codes $`q_{24}^+`$, $`q_{24}^{}`$, consisting of the codewords of $`g_{24}`$ that intersect all of $`t,u,v`$ evenly.

We refer to  and  for a description of the glue vectors for these codes.

Our first table (Table II) lists all indecomposable binary self-dual codes of length $`n22`$, together with the indecomposable Type II codes of length 24, using the $`+`$ notation of (174). For these codes (and for most of those in the following tables) there is only one way to glue the specified components together without introducing additional minimal-weight words. We have therefore omitted the glue words from the table. (However, more information about these codes, including the glue words, will be given in Table VI.)

The next table (Tables III and IV) gives the full list of all 85 (decomposable or indecomposable) Type II codes of length 32. This table is taken from , and is a corrected version of the table in . The codes are labeled from C1 to C85 in the first column (using the same order as in  and ). The second column gives the components (omitting the superscripts “$`+`$” to save space).

The third and fourth columns give the orders of the groups $`G_1(C)`$ and $`G_2(C)`$, and the fifth column gives the order of the full group, using (178), where $`|G_0(C)|`$ is the product of the orders of the $`G_0(C_i)`$ for the components. The latter are given in Table V. The next column gives $`A_4`$, the number of codewords of weight 4. The weight enumerator of the code is then (from Theorem 13)

$$(x^8+14x^4y^4+y^8)^4(56A_4)x^4y^4(x^4y^4)^4(x^8+14x^4y^4+y^8).$$

The last four columns give the number of self-dual codes (the “children”, cf. Chapter xx (Pless)) of lengths 30, 28, 26, 24 that arise from the code.

To save space, we have omitted the glue vectors from Tables III and IV. In many cases they are uniquely determined by the components, and in any case they can be found in full in , with corrections in .

The enumeration in Tables III and IV has been subjected to many checks, including the verification of the mass formula

$$\frac{1}{|Aut(C)|}=\frac{391266122896364123}{532283035423762022400}$$

(in agreement with (4)).

#### Remark.

There are just five Type II codes of length 32 with minimal distance 8: the quadratic residue code $`C81=q_{32}`$, generated by

$$(1001000110110111100010101110000)1;$$

the second-order Reed-Muller code $`C82=r_{32}`$, generated by

$$(1110010000010000001100000000000)1;$$

and the three codes $`C83=g_{16}^{2+}`$, $`C84=f_4^{8+}`$ and $`C85=f_2^{16+}`$. Explicit generator matrices for the last three are shown in Fig. 3.

#### Subtraction.

Suppose for concreteness that $`C`$ is a Type I code of length 26 with doubly even subcode $`C_0`$. Then we obtain a Type II code $`B`$ (say) of length 32 by gluing $`C_0`$ to $`d_6`$, as follows. Write $`C_0^{}=C_0C_1C_2C_3`$, as in Section 5, where $`C=C_0C_2`$, the shadow of $`C`$ is $`C_1C_3`$, and $`C_i=u_i+C_0`$ for $`i=1,2,3`$. Then $`B`$ is generated by

$$\begin{array}{cc}& \\ C_0& \\ & \\ & d_6\\ & \\ u_1& a\\ & \\ u_2& b\\ & \\ u_3& c\end{array}$$
(180)
This is a special case of the following construction. Let $`C`$, $`D`$ be any strictly Type I codes, of lengths $`n_1`$ and $`n_2`$, respectively, with $`C_0^{}=_{i=0}^3C_i`$, $`D_0^{}=_{i=0}^3D_i`$. Then $`B=_{i=0}^3C_i\times D_i`$ is self-dual if $`n_1+n_20`$ $`(mod4)`$, and is Type II if $`n_1+n_20`$ $`(mod8)`$. The weight enumerator of $`B`$ is then

$$\underset{i=0}{\overset{3}{}}W_{C_i}(x,y)W_{D_i}(x,y).$$

Several constructions in the literature (, Theorems 1 and 2; , Theorem 3.1, for example) are special cases of this construction. In (180) we have $`D=i_2^3`$.

In this way any Type I code of length 26 leads to a unique (up to equivalence) Type II code of length 32.

Conversely, all Type I codes of length 26 can be obtained by choosing a $`d_6`$ inside a Type II code of length 32 and inverting the above process.

More generally, suppose $`B`$ is a Type II code of length $`n`$. We choose a copy of $`D=i_2^m`$ so that $`D_0=d_{2m}B`$. Then we obtain a Type I code of length $`n2m`$ by taking the vectors $`v`$ such that $`vwB`$ for some $`wD`$. We call this process subtraction. Every Type I code of length $`n2m`$ can be obtained in this way by starting with a unique Type II code and subtracting an appropriate $`d_{2m}`$. Of course any Type II code of length $`n2m`$ is a direct summand of some Type II code of any greater length.

Table VI shows all (decomposable or indecomposable) codes of lengths $`n22`$ with minimal distance $`d4`$, as obtained by subtracting suitable codes $`d_{2m}`$ from one of the codes in Tables III and IV. The second column indicates the parent code in Tables III and IV and the $`d_{2m}`$ to be subtracted. The next two columns gives the components, with a § to indicate a Type II code, and the name (if any) given to this code in  or . The remaining columns give the orders of the glue groups $`G_1`$ and $`G_2`$, the weight distribution, and generators for the glue.

Table VII gives the self-dual codes (both Type I and Type II) of length 24 and minimal distance $`d4`$.

A complete list of all Type I or Type II self-dual codes of lengths $`n24`$ can be obtained by forming direct sums of the codes in Tables VI and VII in all possible ways with the codes $`i_2^m`$ $`(m=0,1,\mathrm{})`$.

There are over 1000 self-dual codes of lengths 26–30 (see Table I, , ). The highest minimal distance is 6, and there are respectively 1, 3 and 13 codes with $`d=6`$ of lengths 26, 28 and 30.

### 11.4 Family $`3`$: Enumeration of ternary self-dual codes

Ternary self-dual codes of lengths $`n20`$ (and the maximal self-orthogonal codes of lengths $`n19`$, $`n0`$ $`(mod4)`$ have been enumerated by Pless  and Mallows, Pless and Sloane  for $`n12`$, Conway, Pless and Sloane  for $`n16`$, and Pless, Sloane and Ward  for $`n20`$. Leon, Pless and Sloane  give a partial enumeration of the self-dual codes of length 24, making use of the complete list of Hadamard matrices of order 24, and show that there are precisely two codes with minimal distance 9 (cf. Table XII below).

We will make use of the following components.

$`e_3`$: , glue: $`\pm a`$, $`a=120`$. If the coordinates are labeled 1, 2, 3 then $`G_0`$ is generated by $`(1,2,3)`$ and $`(1,2)`$ $`\mathrm{diag}\{1,1,1\}`$ and has order 6; $`|G_1|=2`$.

$`t_4`$ is the $`[4,2,3]_3`$ tetracode, and $`g_{12}`$ is the $`[12,6,6]_3`$ ternary Golay code, see Section 3.2.

$`g_{10}`$ is the $`[10,4,6]_3`$ code consisting of the vectors $`u`$ such that $`00ug_{12}`$. If $`x`$ and $`y`$ are chosen so that $`11xg_{12}`$, $`12yg_{12}`$, then the glue words for $`g_{10}`$ can be taken to be $`\pm x`$, $`\pm y`$, $`\pm x\pm y`$. $`|G_0|=360`$, $`|G_1|=8`$.

$`p_{13}`$: Let $`Q_0`$, $`Q_1,\mathrm{},Q_{12}`$ be the points of a projective plane of order 3, labeled so that the 13 lines are represented by the cyclic shifts $`t_0`$, $`t_1,\mathrm{},t_{12}`$ of the vector $`t_0`$ given by

$$\begin{array}{ccccccccccccc}Q_0& Q_1& Q_2& Q_3& Q_4& Q_5& Q_6& Q_7& Q_8& Q_9& Q_{10}& Q_{11}& Q_{12}\\ 1& 1& 0& 1& 0& 0& 0& 0& 0& 1& 0& 0& 0\end{array}$$

(, p. 695, ). The vectors $`t_0,\mathrm{},t_{12}`$ generate a $`[13,7,4]_3`$ code $`p_{13}^{}`$. The dual is $`p_{13}`$, a $`[13,6,6]_3`$ self-orthogonal code consisting of the vectors $`_{i=0}^{12}a_it_i`$ with $`a_iF_3`$ and $`a_i=0`$, and having weight distribution $`A_0=1`$, $`A_6=156`$, $`A_9=494`$, $`A_{12}=78`$. $`G_0(p_{13})PGL_3(3)`$, of order 5616, $`|G_1(p_{13})|=2`$. The glue words are $`\pm t_0`$.

The indecomposable self-dual codes of lengths $`n16`$ are shown in Table VIII. $`H_8`$ denotes a suitably normalized version of the Hadamard matrix of order 8.

The analogue of Theorem 43 is: any self-orthogonal ternary code generated by words of weight 3 is a direct sum of copies of $`e_3`$ and $`t_4`$. A technique for classifying self-orthogonal codes generated by words of weight 6 (using “center sets”) is given in .

### 11.5 Family $`4^\mathrm{H}`$: Enumeration of Hermitian self-dual codes over $`F_4`$

These have been classified for lengths $`n16`$  — see Table IX.

We will make use of the following components.

$`d_{2n}`$ $`(n2)`$: generated by (179). There are 16 cosets of $`d_{2n}`$ in $`d_{2n}^{}`$, and as glue words we choose $`0`$, $`\omega ^\nu a`$, $`\omega ^\nu b`$, $`\omega ^\nu c`$, $`\omega ^\nu d`$, $`\omega ^\nu e`$, $`\nu \{0,1,2\}`$, where

$`a`$ $`=`$ $`1010\mathrm{}1010`$
$`b`$ $`=`$ $`0000\mathrm{}0011`$
$`c`$ $`=`$ $`1010\mathrm{}1001`$
$`d`$ $`=`$ $`1010\mathrm{}10\omega \overline{\omega }`$
$`e`$ $`=`$ $`1010\mathrm{}10\overline{\omega }\omega `$
Also $`|G_0|=2^{n1}n!`$, $`|G_1|=36`$ $`(n=2)`$, or 12 $`(n3`$).

$`e_5:[\omega \overline{\omega }\overline{\omega }\omega 0,0\omega \overline{\omega }\overline{\omega }\omega ]`$, glue: $`\omega ^\nu 1`$, $`\nu \{0,1,2\}`$, $`G_0=A(5)`$, of order 60, $`|G_1|=6`$.

$`h_6`$ is the hexacode, $`e_7F_4`$, $`e_8F_4`$ are $`F_4`$-versions of the Hamming codes in Sections 3.2, and $`1_n`$ is the $`[n,1,n]_4`$ repetition code.

#### Remarks.

(1) The group orders differ slightly form those in , since now we are allowing conjugation in the group.

(2) The dots and double-dots in the glue column indicate multiplication by $`\omega `$ or $`\omega ^2`$, respectively.

(3) The unique distance 6 code at length 14, $`q_{14}`$, is the $`[14,7,6]_4`$ extended quadratic residue code generated by

$$1(1\omega \overline{\omega }\omega \omega \overline{\omega }\overline{\omega }\overline{\omega }\overline{\omega }\omega \omega \overline{\omega }\omega ).$$

(4) The analogue of Theorem 43 is: (a) any self-orthogonal code with minimal distance 2 has $`i_2`$ as a direct summand; (b) any self-orthogonal code generated by words of weight 4 is a direct sum of copies of $`d_4`$, $`d_6`$, $`d_8,\mathrm{}`$, $`e_5`$, $`h_6`$, $`e_7`$ and $`e_8`$.

### 11.6 Family $`4^\mathrm{E}`$: Enumeration of Euclidean self-dual codes over $`F_4`$

Although even codes of length up to 14 were classified in , the odd codes do not seem to have been classified.

### 11.7 Family $`4^{\mathrm{H}+}`$: Enumeration of trace self-dual additive codes over $`F_4`$

These have been classified up to length 7 (and Type II code up to length 8) in , .

The analogue of Theorem 43 is the following. Let $`d_n`$ be the code of length $`n`$ generated by all even-weight binary vectors $`(n2)`$, and let $`i_2=[11,\omega \omega ]`$. Then any trace self-orthogonal additive code over $`F_4`$ generated by words of weight 2 is a direct sum of copies of $`i_2`$, $`d_2`$, $`d_3`$, $`d_4,\mathrm{}`$.

$`d_n^+`$ (mentioned in Table XIV) is the code of length $`n`$, containing $`2^n`$ words, generated by $`d_n`$ and $`\omega \omega \mathrm{}\omega `$.

### 11.8 Family $`4^Z`$: Enumeration of self-dual codes over $`Z_4`$

These have been classified for lengths up to 16 in the following papers: Conway and Sloane  for $`n9`$, Fields, Gaborit, Leon and Pless  for $`n15`$, and Pless, Leon and Fields  for Type II codes of length 16.

In this section we will present enough component codes to state the analogue of Theorem 43.

The smallest self-dual code is $`i_1=\{0,2\}`$. If a self-orthogonal code $`C`$ contains a vector of the form $`2^10^{n1}`$ then $`C=i_1C^{}`$ is decomposable. The next-simplest possible vectors are “tetrads”, of type $`\pm 1^40^{n4}`$. We list a number of self-orthogonal codes that are generated by tetrads; $`t`$ denotes the total number of tetrads in the code.

The first four codes have the property that the associated binary code $`C^{(1)}`$ is the self-dual code $`d_{2m}`$ of (179).

$`𝒟_{2m}`$ $`(m2)`$ is generated by the tetrads $`11130\mathrm{}0`$, $`0011130\mathrm{}0,\mathrm{},0\mathrm{}01113`$; $`|𝒟_{2m}|=4^{m1}`$, $`|Aut(𝒟_{2m})|=2.4!(m=2)`$ or $`2^2.2^m(m>2)`$, $`t=2(m1)`$. $`𝒟_{2m}^{}/𝒟_{2m}`$ is a group of type $`4^2`$ with generators $`v_1=0101\mathrm{}01`$, $`v_2=00\mathrm{}0011`$.

$`𝒟_{2m}^\mathrm{O}`$ $`(m2)`$ is generated by $`𝒟_{2m}`$ and the tetrad $`1300\mathrm{}0011`$ (or equivalently the vector $`2020\mathrm{}20`$); $`|𝒟_{2m}^\mathrm{O}|=4^{m1}2`$, $`|Aut(𝒟_{2m}^\mathrm{O})|=2^2.8`$ $`(m=2)`$ or $`2.2^{m1}.2m(m>2)`$, $`t=2m`$. $`(𝒟_{2m}^\mathrm{O})^{}/𝒟_{2m}^\mathrm{O}`$ is a cyclic group of order 4 generated by $`v_1`$ (if $`m`$ is odd), or a 4-group generated by $`v_1`$ and $`2v_2`$ (if $`m`$ is even).

$`𝒟_{2m}^+`$ $`(m2`$, but note that $`𝒟_4^+𝒟_4^\mathrm{O}`$) is generated by $`𝒟_{2m}`$ and $`2v_2`$; $`|𝒟_{2m}^+|=4^{m1}2`$, $`|Aut(𝒟_{2m}^+)|=2^m.2^{m+1}`$, $`t=4(m1)`$. $`(𝒟_{2m}^+)^{}/𝒟_{2m}^+`$ is a 4-group generated by $`2v_1`$ and $`v_2`$.

$`𝒟_{2m}^{}`$ $`(m2)`$ is the self-dual code generated by $`𝒟_{2m}^\mathrm{O}`$ and $`𝒟_{2m}^+`$; $`|𝒟_{2m}^{}|=4^{m1}2^2`$, $`|Aut(𝒟_{2m}^{})|=2^3.4!`$ $`(m=2)`$ or $`2^m.2^m.2m`$ $`(m>2)`$, $`t=4m`$. For use in (162) we note that there are two permutation-inequivalent versions of $`𝒟_4^{}`$, with generator matrices

$$(\mathrm{a})\left[\begin{array}{cccc}1& 1& 1& 1\\ 0& 2& 0& 2\\ 0& 0& 2& 2\end{array}\right],(\mathrm{b})\left[\begin{array}{cccc}1& 3& 3& 3\\ 0& 2& 0& 2\\ 0& 0& 2& 2\end{array}\right].$$
(181)
$`𝒟_4^{}`$ (in either version) has $`swe=x^4+6x^2z^2+z^4+8y^4`$.

$`_7`$ is generated by 1003110, 1010031, 1101003; $`|_7|=4^3`$, $`|Aut(_7)|=2.4!`$, $`t=8`$. $`_7^{}/_7`$ is a cyclic group of order 4 generated by 3111111.

$`_7^+`$ is the self-dual code generated by $`_7`$ and 2222222 (or equivalently by all cyclic shifts of 3110100); $`|_7^+|=4^32`$, $`|Aut(_7^+)|=2.168`$, $`t=14`$, $`swe=x^7+z^7+14y^4(x^3+z^3)`$ $`+7x^3z^3(x+z)+42xy^4z(x+z)`$. For both $`_7`$ and $`_7^+`$ the associated binary code $`C^{(1)}`$ is the Hamming code $`e_7`$.

$`_8`$ is the self-dual code generated by $`0u`$, $`u_7`$ and 30001011. An equivalent generator matrix has already been given in (40). $`|_8|=4^4`$, $`g=\mathrm{8.2.4}!=384`$, $`t=16`$, $`swe=x^8+16y^8+z^8+16y^4(x^4+z^4)+14x^4z^4+`$ $`48xy^4z(x^2+z^2)`$ $`+96x^2y^4z^2`$.

###### Theorem 44

Any self-orthogonal code over $`Z_4`$ generated by vectors of the form $`\pm 1^40^{n4}`$ is equivalent to a direct sum of copies of the codes

$$𝒟_{2m},𝒟_{2m}^\mathrm{O},𝒟_{2m}^+,𝒟_{2m}^{}(m=1,2,\mathrm{}),_7,_7^+,_8.$$

The (somewhat complicated) inclusions between the codes mentioned in the theorem can be seen in Fig. 1 of .

## 12 Extremal and optimal self-dual codes

Recall from Section 9 that we have defined a self-dual code from any of the families $`2`$ through $`q^\mathrm{E}`$ to be extremal if it meets the strongest of the applicable bounds from Theorems 28, 31 and 33, that is, if its minimal distance $`d`$ is equal to

($`2_\mathrm{I}`$) $`4\left[\frac{n}{24}\right]+4+ϵ`$, where $`ϵ=2`$ if $`n=2`$, 4 or 6, $`ϵ=2`$ if $`n22`$ $`(mod24)`$, and $`ϵ=0`$ otherwise,

($`2_{\mathrm{II}}`$) $`4\left[\frac{n}{24}\right]+4`$,

($`3`$) $`3\left[\frac{n}{12}\right]+3`$,

($`4^\mathrm{H}`$) $`2\left[\frac{n}{6}\right]+2`$,

($`4^\mathrm{E}`$) $`\left[\frac{n}{2}\right]+1`$,

($`4_\mathrm{I}^{\mathrm{H}+}`$) $`2\left[\frac{n}{6}\right]+2+ϵ^{}`$, where $`ϵ^{}=1`$ if $`n=1`$, $`ϵ^{}=1`$ if $`n5`$ $`(mod6)`$, and $`ϵ^{}=0`$ otherwise,

($`4_{\mathrm{II}}^{\mathrm{H}+}`$) $`2\left[\frac{n}{6}\right]+2`$,

($`q^\mathrm{H}`$), ($`q^\mathrm{E}`$) $`\left[\frac{n}{2}\right]+1`$.

We also defined a code over $`Z_4`$ to be norm-extremal if its minimal norm is

($`4^Z`$) $`8\left[\frac{n}{24}\right]+8+ϵ^{\prime \prime }`$

where $`ϵ^{\prime \prime }=4`$ if $`n23`$ $`(mod4)`$, $`ϵ^{\prime \prime }=0`$ otherwise.

It is very likely (although we do not have a proof) that the above bounds for families $`2`$ through $`q^\mathrm{E}`$ are the highest minimal distance that is permitted by the pure linear programming bound applied to the Hamming weight enumerator and (when relevant) the shadow enumerator.

In contrast, we call a code optimal if it has the highest minimal distance of any self-dual code of that length. An extremal code is automatically optimal.

In this section we will summarize what is presently known about extremal and optimal codes in the families we are considering. Earlier summaries of extremal codes and lattices have appeared in Chapter 7 of , . In the tables we have tried to list all known codes with the specified minimal distance (a period indicating that the list is complete), or else to indicate how many extremal codes are known. Whenever possible we have attempted to name at least one extremal code.

### 12.1 Family $`2`$: Binary codes

Type I codes meeting the $`d2[n/8]+2`$ bound of Theorem 28 (the old definition of extremal) were completely classified by Ward  (finishing the work begun in , , ): such codes exist if and only if $`n`$ is $`2(i_2)`$, $`4(i_2^2)`$, $`6(i_2^3)`$, $`8(e_8)`$, $`12(d_{12}^+)`$, $`14(e_7^{2+})`$, $`22(g_{22}^+)`$ or $`24(g_{24})`$ — compare Tables II and VI. In each case the code is unique.

However, there are many more Type I codes that are extremal in the new sense, and they have not yet been fully classified. It is known (Theorem 29) that extremal Type II codes do not exist for lengths $`3952`$ and presumably a similar bound applies to extremal Type I codes.

Table X shows the highest possible minimal distance for binary self-dual codes of lengths $`n72`$. This is based on earlier tables in Fig. 19.2 of ,  and . In the table $`d_I`$ (resp. $`d_{II}`$) denotes the highest minimal distance of any strictly Type I (resp. Type II) self-dual code.

### Remarks on Table X

The fourth column of the table gives the known codes having the indicated minimal distance. As mentioned above, a period indicates that the lists of codes is complete. (The enumeration for lengths $`n32`$ has already been discussed in Section 11.3.) When $`n`$ is a multiple of 8 a semicolon separates the Type I and Type II codes.

In the years since the manuscript of  was first circulated, a large number of sequels have been written, supplying additional examples of self-dual codes in the range of Table X. The bibliography includes all the manuscripts known to us, even though inevitably not all of them will be published. It was not possible to mention all these references in the table, so instead we list them here. This list also includes a number of older papers. Readers interested in extremal self-dual codes, especially of Type I, in the range of the table should therefore consult the following: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , .

Note that if we don’t distinguish between Type I and Type II codes, but just ask what is the highest minimal distance of a binary self-dual code, then the answer is known for all $`n60`$.

The symbol $`XQ_m`$ in any of these tables indicates an extended quadratic residue code of length $`m+1`$. Both quadratic residue codes and double circulant codes provide many examples of good self-dual codes (cf. Section 12 of Chapter 1, Chapter xx (Ward), Chapter yy (Pless), \[191, Chapter 16\]). There are two basic types of binary double circulant codes, having generator matrices of the form

$$\begin{array}{cccccccccc}& & & & & & & & & \\ 1& & & & & 0& 1& 1& 1& 1\\ & 1& & & & 1& & & & \\ & & 1& & & 1& & R& & \\ & & & 1& & 1& & & & \\ & & & & 1& 1& & & & \end{array}$$
(182)
or

$$\begin{array}{cccccccccc}& & & & & & & & & \\ 1& & & & & & & & & \\ & 1& & & & & & & & \\ & & 1& & & & & R& & \\ & & & 1& & & & & & \\ & & & & 1& & & & & \end{array},$$
(183)
where $`R`$ is a circulant matrix with first row $`r`$ (say). (182) is used only when the length is a multiple of 4. Such codes and their generalizations to other fields have been studied by many authors, including , , , , , , , , \[191, Chap. 16\], , , , , . Table XI, based on  and , gives a selection of double circulant binary codes. Code H86 (from ) is the shortest Type I self-dual code presently known with $`d=16`$. The first column gives the name of the codes, following , and the last column gives $`r`$, the initial row of $`R`$, in hexadecimal. The codes marked $`()`$ are not necessarily optimal. The minimal distance of the last two codes in the table was determined by Moore , . For these two codes $`r`$ has 1’s at the squares modulo 43 and 67, respectively. Moore remarked that the analogous code of length 168 might also have been extremal. However, Aaron Gulliver (personal communication, Nov. 1997) has shown that the minimal distance of this code is at most 28.

We see from Table X that there are extremal Type I codes (in the new sense) that are not also Type II codes at lengths

$$2,4,6,12,14,16,18,20,22,32,36,38,40,42,44,46,60,64,66,68$$

that such codes do not exist at length

$$8,10,24,26,28,30,34,48,50,52,54,58$$
(184)
and that their existence at lengths

$$56,62,70,72$$
(185)
is at present an open question. The nonexistence of the Type I codes of lengths in (184) is established by imposing the extra condition that the shadow enumerator must have integral coefficients.

Concerning extremal Type II codes, with $`d=4[n/24]+4`$, these exist for the following values of $`n`$:

$$8,16,24,32,40,48,56,64,80,88,104,136$$

but their existence at lengths 72 and 96 and all greater lengths is open. For lengths 8, 24, 32, 48, 80 and 104 we can use extended quadratic residue codes, and for lengths 40, 56, 64, 88, 136 we can use double circulant codes (see Table XI).

Only one $`[48,24,12]`$ code is presently known, $`XQ_{47}`$, which is generated by 1 and

$$1(01111011110010101110010011011000101011000010000)$$

(with 1’s at the nonzero squares modulo 47). Huffman  has shown that any Type II $`[48,24,12]`$ code with a nontrivial automorphism of odd order is equivalent to $`XQ_{47}`$. Houghten, Lam and Thiel (cf. ) are attempting to establish by direct search that $`XQ_{47}`$ is unique. As Table X shows, if $`n40`$ is congruent to 8 or 16 ($`mod24`$) there are often large numbers of extremal codes. It is easy to find $`[72,36,12]`$ Type II codes, for example $`XQ_{71}`$;  shows that there are at least 33 inequivalent codes with these parameters.

Concerning the existence of self-dual codes with a specified minimal distance, the following results were established in . Self-dual codes with minimal distance

$`d6`$ exist precisely for $`n22`$;

$`d8`$ exist precisely for $`n=24,32`$, and $`n36`$;

$`d10`$ exist precisely for $`n46`$;

$`d12`$ exist777The existence of a $`[70,35,12]`$ was not known when  was written, but such a code was later found by Scharlau and Schomaker . for $`n=48`$, 56, 60 and $`n64`$; perhaps for $`n=62`$; and do not exist for all other values of $`n`$. (As pointed out in , the $`[58,29,12]`$ self-dual code claimed in  is an error.)

Dougherty, Gulliver and Harada , extending work in , show that codes with

$`d14`$ exist for $`n78`$; perhaps for $`n=70`$, 72, 74, 76; and do not exist for all other values of $`n`$;

$`d16`$ exist for $`n=80`$, 86, 88, 96, 100–104, 112 and $`n120`$ (and possibly for other values of $`n`$).

### 12.2 Family $`3`$: Ternary codes

Table XII shows the highest possible minimal distance for ternary self-dual codes of lengths $`n72`$.

### Remarks on Table XII

For the entries at lengths $`n24`$, see the discussion in Section 11.4.

Extremal codes exist at lengths 4, 8, 12, 16, 20, 24, 28, 32, 36, 40, 44, 48, 56, 60 and 64. Extremal codes do not exist at lengths 72, 96, 120 and all $`n144`$, because then the extremal Hamming weight enumerator contains a negative coefficient. The existence of extremal codes in the remaining cases ($`n=52`$, 68, 76, $`\mathrm{}`$, 140) is undecided.

In Table XII, $`XQ_n`$ denotes an extended quadratic residue code of length $`n+1`$, and $`S(n)`$ denotes a Pless double circulant (or “symmetry”) code of length $`n`$ (see Section 5 of Chapter “coding-constructions”, , , , , ). A $`[28,14,9]_3`$ code was discovered by Cheng and R. Scharlau . Another such code was given by Kschischang and Pasupathy , namely the negacyclic code generated by the polynomial $`(x^2+x1)(x^6x^4+x^3+x^21)(x^6x^5x1)`$, i.e. by the vectors

$$(2002021222020010000000000000)_{},$$

where the subscript $``$ indicates that the code is negacyclic. Huffman  shows that there are at least 14 inequivalent $`[28,14,9]_3`$ codes with nontrivial automorphisms of odd order.

Ward  and Dawson  independently discovered that $`[40,20,12]_3`$ codes can be constructed using generator matrices of the form $`[I_{20}H_{20}]`$, where $`H_{20}`$ is a Hadamard matrix of order 20. There are three distinct Hadamard matrices of this order, and Dawson shows that all three produce $`[40,20,12]_3`$ codes. Harada  shows that these three codes are inequivalent. Dawson also shows that the same construction using the Paley-Hadamard matrix of order 32 leads to a $`[64,32,18]_3`$ self-dual code. A $`[64,32,18]_3`$ code $`B_{24}`$ (equivalent to Dawson’s) had been constructed earlier by Beenker .

The codes of length 32, 44, 52, 56 and 68 can be obtained by “subtracting” (see Section 11.3) a copy of $`t_4`$ from a code of length 4 greater.

Other constructions for ternary self-dual codes can be found in Harada  and Ozeki .

### 12.3 Family $`4^\mathrm{H}`$: Hermitian self-dual codes over $`F_4`$

Table XIII shows the highest possible minimal distance for Hermitian self-dual codes over $`F_4`$ of lengths $`n32`$.

### Remarks on Table XIII

A period in the “Codes” column indicates that the list is complete.

For the entries at lengths $`n16`$, see the discussion in Section 11.5.

Extremal codes exist at lengths 2, 4, 6, 8, 10, 14, 16, 18, 20, 22, 28 and 30. They do not exist at lengths 12, 24, 102, 108, 114, 120, 122 and all $`n126`$ (the larger $`n`$ being eliminated by the presence of negative coefficients in the extremal Hamming weight enumerator). The remaining lengths $`(26,32,34,\mathrm{})`$ are undecided.

The $`[18,9,8]_4`$ code $`S_{18}`$ generated by

$$1(1\omega \overline{\omega }\omega \omega \omega \overline{\omega }\overline{\omega }\overline{\omega }\overline{\omega }\overline{\omega }\overline{\omega }\omega \omega \omega \overline{\omega }\omega )$$

has a number of interesting properties (see , , , ). It has automorphism group $`3\times (PSL_2(16).4)`$, of order 48960  and is the unique $`[18,9,8]_4`$ code .

The long-standing question of the existence of a $`[24,12,10]_4`$ code was settled in the negative by Lam and Pless  (see also ). The code $`g_{24}F_4`$ is an example of a $`[24,12,8]_4`$ code.

### 12.4 Family $`4^{\mathrm{H}+}`$: Additive self-dual codes over $`F_4`$

Table XIV, taken from , shows the highest possible minimal distance for additive codes over $`F_4`$ of lengths $`n30`$ that are self-dual with respect to the trace inner product.

### Remarks on Table XIV

A period in the “Codes” column indicates that the list is complete.

Extremal Type I codes exist at lengths 1–6, 8–12, 14–18, 20–22 and 28–30, and do not exist at lengths 7, 13 and 25. Lengths 19, 23, 24, 26, 27 are undecided.

Many of the entries are copied from the table of Hermitian self-dual codes, Table XIII. The codes $`d_n^+`$ are defined in Section 11.7, $`h_6`$ is the hexacode, and $`h_5`$ is the $`[5,2.5,3]_{4+}`$ shortened hexacode, generated by $`(01\omega \omega 1)`$, with weight enumerator $`x^5+10x^2y^3+15xy^4+6y^5`$ and $`|Aut(h_5)|=120`$. Also, $`c_9`$, $`c_{15}`$, $`c_{21}`$, $`c_{23}`$, $`c_{25}`$ are cyclic codes with generators shown in Table XV. If no name is given, the code can be obtained by shortening a code of length one greater.

### 12.5 Family $`4^Z`$: Self-dual codes over $`Z_4`$

Table XVI gives the highest possible Hamming distance, Lee distance and Euclidean norm for codes over $`Z_4`$ of lengths $`n24`$. This is based on , , , ,  and . The columns headed # give the number of extremal codes.

### Remarks on Table XVI

The length 16 code $`C_{16}`$ is given in , where it is called 5\_f5. It has $`|Aut(C_{16})|=2^{5+10}3^25.7`$ and generator matrix

$$\left[\begin{array}{cccccccccccccccc}1& 1& 1& 1& 1& 1& 1& 1& 1& 1& 1& 1& 1& 1& 1& 1\\ 1& 0& 1& 1& 1& 1& 1& 1& 0& 0& 0& 0& 1& 0& 0& 0\\ 1& 1& 0& 1& 0& 0& 1& 1& 1& 1& 0& 0& 0& 1& 0& 0\\ 1& 1& 1& 0& 1& 0& 1& 0& 1& 0& 1& 0& 0& 0& 1& 0\\ 0& 0& 0& 0& 1& 1& 1& 1& 1& 1& 1& 0& 0& 0& 0& 1\\ & & & & & & & & & & & & & & & \\ 0& 0& 0& 0& 0& 2& 0& 0& 0& 0& 0& 2& 2& 0& 0& 2\\ 0& 0& 0& 0& 0& 0& 2& 0& 0& 0& 0& 2& 2& 2& 2& 2\\ 0& 0& 0& 0& 0& 0& 0& 2& 0& 0& 0& 0& 2& 2& 0& 2\\ 0& 0& 0& 0& 0& 0& 0& 0& 2& 0& 0& 0& 0& 2& 2& 2\\ 0& 0& 0& 0& 0& 0& 0& 0& 0& 2& 0& 2& 0& 2& 0& 2\\ 0& 0& 0& 0& 0& 0& 0& 0& 0& 0& 2& 2& 0& 0& 2& 2\end{array}\right]$$

The codes $`C_{17}`$ and $`C_{18}`$ mentioned in the table have generator matrices

$$\left[\begin{array}{ccccccccccccccccc}1& 0& 0& 0& 0& 0& 0& 0& 1& 2& 1& 1& 1& 1& 1& 1& 2\\ 0& 1& 0& 0& 0& 0& 0& 0& 1& 1& 0& 0& 0& 1& 2& 2& 0\\ 0& 0& 1& 0& 0& 0& 0& 0& 1& 3& 2& 0& 0& 2& 3& 2& 2\\ 0& 0& 0& 1& 0& 0& 0& 0& 1& 3& 0& 0& 0& 2& 0& 3& 0\\ 0& 0& 0& 0& 1& 0& 0& 0& 0& 1& 3& 3& 3& 3& 1& 1& 2\\ 0& 0& 0& 0& 0& 1& 0& 0& 0& 0& 0& 3& 1& 0& 2& 0& 3\\ 0& 0& 0& 0& 0& 0& 1& 0& 0& 0& 3& 2& 1& 0& 0& 0& 3\\ 0& 0& 0& 0& 0& 0& 0& 1& 0& 0& 1& 3& 2& 0& 0& 0& 3\\ 0& 0& 0& 0& 0& 0& 0& 0& 2& 2& 2& 2& 2& 0& 0& 0& 0\end{array}\right]$$

and

$$[\begin{array}{cccccccccccccccccc}1& 0& 0& 3& 0& 0& 0& 0& 0& 3& 2& 0& 3& 0& 2& 0& 0& 0\\ 0& 1& 0& 0& 3& 0& 0& 0& 0& 0& 3& 2& 2& 3& 0& 0& 0& 0\\ 0& 0& 1& 0& 0& 3& 0& 0& 0& 2& 0& 3& 0& 2& 3& 0& 0& 0\\ 0& 0& 0& 1& 0& 0& 3& 0& 0& 0& 0& 0& 3& 2& 0& 3& 0& 2\\ 0& 0& 0& 0& 1& 0& 0& 3& 0& 0& 0& 0& 0& 3& 2& 2& 3& 0\\ 0& 0& 0& 0& 0& 1& 0& 0& 3& 0& 0& 0& 2& 0& 3& 0& 2& 3\\ 0& 0& 0& 0& 0& 0& 1& 3& 0& 0& 3& 3& 0& 3& 3& 3& 2& 1\\ 0& 0& 0& 0& 0& 0& 0& 1& 3& 3& 0& 3& 3& 0& 3& 1& 3& 2\\ 0& 0& 0& 0& 0& 0& 0& 0& 2& 0& 2& 2& 0& 2& 2& 0& 2& 0\\ 0& 0& 0& 0& 0& 0& 0& 0& 0& 2& 2& 2& 2& 2& 2& 2& 2& 2\end{array},]$$

and automorphism groups of orders 576 and 144, respectively.

$`G_{24}`$ was defined in (41), and $`G_{19}`$ through $`G_{23}`$ are shortened versions of it.

Besides the norm-extremal codes of length 8, 12, 14–24 shown in the table, there are also norm-extremal codes of lengths 32 and 48 obtained by lifting binary extended quadratic residue codes to $`Z_4`$. The code of length 32 has minimal Lee weight 14 and minimal norm 16. Pless and Qian  have shown that the code of length 48 has minimal Lee weight 18 and minimal norm 24.

Further examples of good self-dual codes over $`Z_4`$ may be found in , , , , , , , , , , , , .

## 13 Further topics

### 13.1 Decoding self-dual codes

The problem of decoding self-dual codes is an extremely important one for applications, but we will not discuss it here. Decoding the binary Golay code, in particular, has been studied in many papers — see , , , \[71, Chapter 11\], , , , , , . See also , , and Section 8 of Chapter “codes-and-groups”.

### 13.2 Applications to projective planes

There is a very nice application of self-dual codes to projective planes. If $`n`$ is congruent to 2 $`(mod4)`$ then the incidence matrix of a projective plane of order $`n`$ generates a self-orthogonal code $`C_n`$, which when an overall parity-check is added becomes an $`[n^2+n+2`$, $`\frac{1}{2}(n^2+n+2),n+2]`$ Type II self-dual binary code (see ,  or Chapter “assmus” for the proof).

It was a famous unsolved problem to decide if a projective plane of order 10 could exist. The weight enumerator of $`C_{10}`$ was initially studied in  (see also ). Finally, after many years of work, Lam, Thiel and Swiercz  (see also ) succeeded in completing this project and showed that $`C_{10}`$ (and hence the putative plane of order 10) does not exist.

The possibility of the existence of a plane of order 18 (or 12, but then we do not obtain a self-dual code) remains an open question.

### 13.3 Automorphism groups of self-dual codes

Various topics concerning the automorphism groups of self-dual codes are discussed in chapter “codes-and-groups”, e.g. the full automorphism groups of extended quadratic residue codes, the occurrence of self-dual codes with a trivial group (see , , , , , ), and the existence of self-dual codes with any prescribed symmetry group ().

### 13.4 Open problems

Do there exist $`[72,36,16]`$ or $`[96,48,20]`$ Type II self-dual binary codes? (Cf. , , , , ).

Fill in the other gaps in Tables X, XII, XIII. No extremal Hermitian self-dual codes over $`F_4`$ of any length greater than 30 are presently known!

There is an interesting open question concerning self-dual codes of length 24. There exists a unique $`[24,12,8]`$ binary code, exactly two $`[24,12,9]_3`$ ternary codes, and no $`[24,12,10]_4`$ Hermitian or Euclidean self-dual code over $`F_4`$ (). But the possibility of an additive trace-self-dual code of length 24 over $`F_4`$ with minimal distance 10 remains open (see Table XIV). From Theorem 33, if such a code exists then it must be even. However, all our attempts so far to construct this code have failed, so it may not exist.

When is the first time a Type I binary code has a higher minimal distance than the best Type II code of the same length? (No such example is presently known.)

In this regard it is worth mentioning that there is a $`[32,17,8]`$ binary code , which has the same minimal distance as the best self-dual codes of length 32, yet contains twice as many codewords. There are similar examples in the ternary case — see Chapter “Brouwer”.

The Nordstrom-Robinson code (see Chapter 1) is an example of a nonlinear code that has a higher minimal distance than any self-dual (or even linear) code of the same length. However, as mentioned in Section 3.2, the Nordstrom-Robinson code should really be regarded as a self-dual linear code over $`Z_4`$ (the octacode $`o_8`$). When is the first time a non-self-dual $`[n,n/2,d]`$ binary linear code has a higher minimal distance than any $`[n,n/2,d^{}]`$ self-dual code? This certainly happens at length 40, but may happen at length 36 or 38.

Is there any difference asymptotically, as $`n\mathrm{}`$, between $`d/n`$ for the best binary codes, the best binary linear codes and the best binary self-dual codes?

Let $`\mathrm{\Omega }_n`$ denote the collection of binary self-dual codes that have the highest possible minimal distance at length $`n`$, and let $`L_n`$, $`U_n`$ be respectively the smallest and largest orders of $`Aut(C)`$, $`C\mathrm{\Omega }_n`$. When (if ever) is the first time that $`L_n=U_n=1`$? Is there an infinite sequence of values of $`n`$ with $`U_n>1`$? Show that $`L_n=1`$ for all sufficiently large $`n`$.

## 14 Self-dual codes and lattices

There are many connections and parallels between self-dual codes and lattice sphere packings. Our original intention was to end the chapter with an account of these connections, but constraints of space and time have not permitted this. Instead, we give a brief list of some of the parallels, to whet the reader’s appetite. For more information about the relationship between the two fields, see , , , , , , ,  and especially , .

| Coding concept | Lattice concept |
| --- | --- |
| Binary linear code | Lattice |
| Dual code | Dual lattice |
| Self-orthogonal code | Integral lattice |
| Self-dual code | Unimodular lattice |
| Doubly-even self-dual code | Even unimodular lattice |
| Hamming code $`e_8`$ | Root lattice $`E_8`$ (, p. 120) |
| Hexacode $`h_6`$ | Coxeter-Todd lattices $`K_{12}`$ (, p. 127) |
| Binary Golay code $`g_{24}`$ | Leech lattice $`\mathrm{\Lambda }_{24}`$ (, p. 131) |
| Minimal distance | Minimal norm |
| Number of minimal weight words | Kissing number |
| Weight enumerator $`W(x,y)`$ | Theta series |
| MacWilliams identity (Eq. (33)) | Jacobi identity (, p. 103) |
| (weight enumerator of dual code in terms | (theta series of dual lattice in terms |
| of weight enumerator of code) | of theta series of lattice) |
| Gleason’s theorem (Theorem 11) | Hecke’s theorem (, p. 187) |
| (weight enumerator of doubly-even | (theta series of even unimodular |
| code is polynomial in weight enumerators | lattice is polynomial in theta series |
| of $`e_8`$ and $`g_{24}`$) | of $`E_8`$ and $`\mathrm{\Lambda }_{24}`$) |

The similarity between the theorems of Gleason and Hecke is particularly striking, and we will end the chapter by saying a little more about this. Suppose $`C`$ is a binary code of length $`n`$. Construction A produces an $`n`$-dimensional sphere packing $`\mathrm{\Lambda }(C)`$, consisting of the points $`\frac{1}{\sqrt{2}}x`$ for $`xZ^n`$, $`x(mod2)C`$. If $`C`$ is linear, $`\mathrm{\Lambda }(C)`$ is a lattice; if $`C`$ is self-dual, $`\mathrm{\Lambda }(C)`$ is unimodular; and if $`C`$ is Type II, $`\mathrm{\Lambda }(C)`$ is an even unimodular lattice.

If $`C`$ is a linear code with weight enumerator $`W_C(x,y)`$, then $`W_C(\theta _3(2z),\theta _2(2z))`$ is the theta series of $`\mathrm{\Lambda }(C)`$, where

$$\theta _3(z)=\underset{m=\mathrm{}}{\overset{\mathrm{}}{}}q^{m^2},\theta _2(z)=\underset{m=\mathrm{}}{\overset{\mathrm{}}{}}q^{(m+1/2)^2},$$

where $`q=e^{\pi iz}`$, $`\mathrm{Im}(z)>0`$. This map gives an isomorphism between (a) the ring of weight enumerators of Type I self-dual codes, $`C[\varphi _2,\theta _8]`$ (see Eq. 98), and the ring of theta series of even-dimensional unimodular lattices, $`C[\theta _3^2,\mathrm{\Delta }_8]`$, where

$$\mathrm{\Delta }_8=q\underset{m=1}{\overset{\mathrm{}}{}}\{(1q^{2m1})(1q^{4m})\}^8;$$

and (b) the ring of weight enumerators of Type II self-dual codes, $`C[\varphi _8,\varphi _{24}^{}]`$ (Theorem 13), and the ring of theta series of even unimodular lattices, $`C[\mathrm{\Theta }_{E_8},\mathrm{\Delta }_{24}]`$, where

$`\mathrm{\Theta }_{E_8}(z)`$ $`=`$ $`1+240{\displaystyle \underset{m=1}{\overset{\mathrm{}}{}}}\sigma _3(m)q^{2m},`$
$`\mathrm{\Delta }_{24}`$ $`=`$ $`q^2{\displaystyle \underset{m=1}{\overset{\mathrm{}}{}}}(1q^{2m})^{24},`$
and $`\sigma _3(m)`$ is the sum of the cubes of the divisors of $`m`$. For further information see \[71, Chapter 7\].

The bibliography also contains a number of references that are concerned with particular constructions of lattices from self-dual codes, or of properties of lattices that are analogous to properties of self-dual codes mentioned in this chapter: , , , , , , , , , , , , , , , , , , , , , , , , , , , .

## Acknowledgements

Over the past 26 years NJAS has had the pleasure of collaborating with many of the people whose names are listed in the bibliography: he wishes to express his appreciation to all of them. We thank Eiichi Bannai, Dave Forney, Aaron Gulliver, Masaaki Harada, Cary Huffman, Michio Ozeki, Vera Pless and Patrick Solé for helpful comments on the manuscript of this chapter. We also thank Susan Pope for a superb typing job.

The bibliography uses the following abbreviations for journals:

| DCC | $`=`$ | Designs, Codes and Cryptography |
| --- | --- | --- |
| DM | $`=`$ | Discrete Mathematics |
| JCT | $`=`$ | Journal of Combinatorial Theory |
| PGIT | $`=`$ | IEEE Transactions on Information Theory |