Symmetries of weight enumerators and applications to Reed-Muller codes

Gleason's 1970 theorem on weight enumerators of self-dual codes has played a crucial role for research in coding theory during the last four decades. Plenty of generalizations have been proved but, to our knowledge, they are all based on the symmetries given by MacWilliams' identities. This paper is intended to be a first step towards a more general investigation of symmetries of weight enumerators. We list the possible groups of symmetries, dealing both with the finite and infinite case, we develop a new algorithm to compute the group of symmetries of a given weight enumerator and apply these methods to the family of Reed-Muller codes, giving, in the binary case, an analogue of Gleason's theorem for all parameters.

starting from Gleason's theorem: for some lengths the corresponding codes are known, and it is useful to have their weight enumerators on record, in the other cases it is hoped that knowledge of the weight enumerator will assist in deciding the existence of the codes. The long-standing open problem on the existence of an extremal self-dual doubly-even code of length 72 [S73] is probably one of the main examples of the active research that has arisen from Gleason's theorem (see [B15] for a summary of the some of the most recent results about it). Many generalizations of Gleason's theorem to other family of self-dual codes have been proved, as documented in [NRS06]. All of them make use of MacWilliams' identities and their generalizations, which give a symmetry of the weight enumerator only if the code is self-dual or eventually formally self-dual. To our knowledge, there is no systematic research on other cases, that is codes for which MacWilliams' identities do not give a symmetry. However, many interesting families of codes (e.g. Reed-Muller codes) do not have this property, and it would be useful to have a similar result about their weight enumerators. This paper is intended to be a first step in this direction.
The following questions guided our work: (1) Which are the possible groups of symmetries of a weight enumerator?
(2) If we know a weight enumerator of a code, how can we compute efficiently its symmetries?
(3) Once that we have computed some symmetries of the weight enumerator of a code, can we prove that they are symmetries of other weight enumerators of codes belonging to the same family (as in the case of self-dual doubly-even codes)? (4) Can we determine, with these methods, new properties or unknown weight enumerators?
Note that answering these questions is in general quite difficult, since the nature of weight enumerator is essentially combinatorial while the codes are geometric objects. It is hence not evident how and if properties of codes will give rise to symmetries of their weight enumerators.
About the first two questions, a partial answer is given in [BO00] for general polynomials. In that paper the authors address the problem of finding symmetries of homogeneous two-variables polynomials and they develop an algorithm based on moving frames to compute their group of symmetries. In the paper this algorithm is implemented in Maple, but as the authors say, this computer algebra system has the weakness of a poor handling with both algebraic numbers and rational algebraic functions. We use some of their ideas to develop a new method which can be easily implemented in Magma [BCP97] and we concentrate on the case of weight enumerators.
A homogeneous polynomial p(x, y) ∈ C[x, y] defines a variety V (p(x, y)) in the projective line P 1 (C) (the set of "roots" of p(x, y)). The classical action of PGL 2 (C) on the projective line P 1 (C) (which is sharply 3-transitive) induces an action of the projection of the group of symmetries of p(x, y) in PGL 2 (C) on V (p(x, y)). By this simple observation, we can prove the following result.
Theorem A. The group of symmetries of the weight enumerator p(x, y) of a code is finite if and only #V (p(x, y)) ≥ 3.
If #V (p(x, y)) ≥ 3, the projection of the group of symmetries of the weight enumerator is a finite subgroup of PGL 2 (C), and these subgroups are classified by Blichfeldt in [B17] (see Theorem 3.1). Consequently, the group of symmetries is a central extension of one of these subgroups, and it is well-known that isomorphism classes of central extensions are counted by second cohomology groups. On the other hand, we provide an almost complete classification of linear codes for which #V (p(x, y)) < 3 (see Theorem 3.2). This answers completely the question about the possible groups of symmetry. Moreover, the sharply 3-transitive action of PGL 2 (C) on P 1 (C) provides a tool to develop an efficient algorithm to compute symmetries of a given weight enumerator.
In order to give an answer to question (3), one has to choose a family to study. In this paper we deal with the family of Reed Muller codes (affine or projective), for their importance in coding theory and their relation with algebraic geometry. Determining their weight enumerator is a difficult task that is related to the counting of F q -rational points on hypersurfaces. This connection between two difficult problems may lead to partial solutions, as shown in [E06] and [K13]. Along those lines, we contribute to the investigation of weight enumerators of Reed-Muller codes by studying their group of symmetries and the related invariant ring. In the case of binary Reed-Muller codes we have the complete picture, while in the other cases we present only partial results.
Theorem B. Let C = RM(r, m), i = ⌊ m−1 r ⌋ and j = ⌊ m−1 m−r−1 ⌋. Denote ζ ′ n a primitive n-th root of unity andS the projection of the group of symmetries of the weight enumerator w C (x, y) of C in PGL 2 (C). Then ( and, ifS ≠ D 4 , then w RM(r,m) and, ifS ≠ D 4 , then w RM(r,m) Remark 1.1. The polynomials in Theorem B are known (see the end of Section 2).
A crucial role is played by a divisibility condition proved by Ax in 1964 [A64] for the affine version of Reed-Muller codes. The counterpart for the projective version can be easily deduced.
Finally, the fourth question is very interesting from a coding theoretical point of view but is left unanswered in this paper whose aim is mainly to study symmetries of weight enumerators. The authors hope to answer it in future work.
In Section 2 we present the necessary background about coding theory, invariant theory and we recall some properties of Reed-Muller codes. Section 3 is devoted to the proof of Theorem A, the discussion of the possible finite groups of symmetries and a classification of codes with weight enumerators having an infinite group of symmetries. In Section 4 we present our algorithm for finding the group of symmetries of weight enumerators. Finally, Section 5 is concerned with the proof of Theorem B and some further results about Reed-Muller codes over larger fields.

Background
For the convenience of the reader we recall here some definitions and results of coding theory and invariant theory which will be useful in the sequel. Three standard references are [MS77], [HP10] and [RS02].
2.1. Codes and weight enumerators. A linear code C is a subspace of F n q , where n is a positive integer called the length of the code. A generator matrix of a linear code C is a matrix whose rows generate C. Elements of C are called codewords. The support of a codeword c ∈ C, denoted supp(c), is defined as supp(c) ∶= {i ∈ {1, . . . , n} c i ≠ 0}.
The weight wt(c) of a codeword c is the cardinality its support. The weight enumerator w C (x, y) is the polynomial If C ≤ F m q and D ≤ F n q are linear codes with generator matrices C and D respectively, their direct sum is the vector space C ⊕ D naturally embedded in F m+n q , i.e. the code with generator matrix A monomial transformation is a linear transformation of the form F n q → F n q , v → DP v, where D is an n × n diagonal matrix with non-zero diagonal entries, and P is an n × n permutation matrix. Two codes are said to be equivalent if one is the image of the other under a monomial transformation. Observe that in the case q = 2, a monomial transformation is just a permutation. It is easy to see that two equivalent codes have the same weight enumerator.
Convention: Since we are interested in weight enumerators, we will usually identify codes up to equivalence. In particular, a generator matrix of a code C will mean a generator matrix of some code equivalent to C.
An important relation between the weight enumerator of a code C and its dual C ⊥ is given by MacWilliams' Theorem.
Theorem (MacWilliams, [MS77]). Let C ≤ F n q be a linear code, and C ⊥ its dual. Then

2.2.
Symmetries and invariant ring. The group GL 2 (C) acts naturally on C[x, y] on the right: c d ∈ GL 2 (C), and p(x, y) ∈ C[x, y]. We set S(p(x, y)) ∶= Stab GL 2 (C) (p(x, y)), the group of symmetries of p(x, y).

Notation:
We denote by ζ n any n-th root of unity and by ζ ′ n any primitive n-th root of unity. We call C n the cyclic group of order n, D n the dihedral group of order 2n, V 4 the Klein four-group and S n and A n the symmetric group and the alternating group on n symbols, respectively.
Example 2.2. If C is self-dual, then #C = #C ⊥ = q n 2 and so MacWilliams' Theorem implies that A linear code satisfying (⋆) is called formally self dual. If G ≤ GL 2 (C) is a group of matrices, the ring is called the invariant ring of G.
Theorem (Gleason, [G70]). The weight enumerator of a self-dual binary linear code which is doubly-even, i.e. is divisible by 4, lies in the ring 3 (x, y) and w G 24 (x, y) are the weight enumerators of the extended Hamming code of length 8 and of the extended binary Golay code of length 24 respectively. This polynomial ring is the invariant ring of G ∶= ⟨d 4 , s 2 ⟩.
2.3. Reed-Muller codes. The Reed-Muller code RM q (r, m) on m variables, of degree r and defined over F q is the code where F q [x 1 , . . . , x m ] r is the set of polynomials in m variables with coefficients in F q and of degree at most r. The code RM q (r, m) encodes all hypersurfaces in A m (F q ) of degree at most r, so determining the weight enumerator of such a code is equivalent to counting F q -rational points of hypersurfaces in the affine space.
Similarly we can define the projective Reed-Muller code PRM q (r, m) on m variables, of degree r and defined over F q in the following way: r is the set of degree r homogeneous polynomials in m + 1 variables with coefficients in F q , and R is a set of representatives in F m+1 q of all the points of P m (F q ). Observe that changing the set of representatives R gives rise to an equivalent code.
If q = 2 we will usually omit the subscript and write RM(r, m) for RM 2 (r, m) and PRM(r, m) for PRM 2 (r, m).
Both Reed-Muller codes and projective Reed-Muller codes are divisible codes for certain parameters, as a consequence of a theorem by Ax.
Theorem (Ax ([A64]). For any integers r, m and prime power q = p v , the Reed-Muller code RM q (r, m) is divisible by q ⌊ m−1 r ⌋ and this is the largest power of the prime p with this property.
It follows from an easy argument relating the projective and affine zeroes of a homogeneous polynomial that the projective Reed-Muller code PRM q (r, m) is divisible by q ⌊ m r ⌋ . Note that in general Reed-Muller codes are not self-dual, but if q is a prime power and r, m are integers such that r < m(q − 1), then Finally, for some parameters the weight enumerators of Reed-Muller codes are known:

Group of Symmetries
This section is devoted to studying the possible groups of symmetries that a weight enumerator can have. In the first subsection, we prove Theorem A which allows us to decide if a polynomial has a finite or infinite group of symmetries.
If the group is finite, the classification of finite subgroups of PGL 2 (C) by Blichfeldt and the study of the second cohomology of these subgroups allow us to classify all possible finite groups of symmetries. This is treated in the second subsection.
The third subsection handles the case of infinite group of symmetries of weight enumerators and gives an almost complete classification of linear codes with this property.
3.1. Proof of Theorem A. For a homogeneous polynomial p(x, y) ∈ C[x, y] let V (p(x, y)) ⊆ P 1 (C) denote the projective variety defined by the vanishing of p(x, y), i.e.
Lemma 3.1. Let p(x, y) ∈ C[x, y] be a homogeneous polynomial of degree d, and let n = #V (p(x, y)). If n ≥ 3, then Proof. Let G ∶= S(p(x, y)). Since every g ∈ G fixes p(x, y), G acts on V (p(x, y)). Scalar matrices fix V (p(x, y)) point-wise, so this action induces an action ofḠ ⊆ PGL 2 (C), whereḠ is the image of G in PGL 2 (C). It is well-known that PGL 2 (C) acts sharply 3-transitively on P 1 (C). Since #V (p(x, y)) ≥ 3, every permutation of V is realized by at most oneḡ in PGL 2 (C), whenceḠ is finite.
Anyḡ ∈Ḡ has exactly d pre-images in G: if g ∈ G is such a pre-image, then all the pre-images in PGL 2 (C) are given by λg for λ ∈ C ∖ {0}. But There are n! permutations of V (p(x, y)), so at most n! elements inḠ. Thus #G ≤ n! d.
Theorem A is now an easy consequence.
Proof of Theorem A. If V (p(x, y)) ≥ 3, then S(p(x, y)) is finite by Lemma 3.1. If V (p(x, y)) < 3, then p(x, y) is conjugate to x n y m for m, n ∈ N ∪ {0}, which is easily seen to have an infinite group of symmetries.
3.2. The finite case. If a homogeneous polynomial p(x, y) ∈ C[x, y] has finite group of symmetries S(p(x, y)) ⊆ GL 2 (C), its imageS(p(x, y)) ⊆ PGL 2 (C) is also finite. The following theorem gives a classification of all finite subgroups of PGL 2 (C) up to conjugation.
Theorem 3.1 (Blichfeldt [B17]). If H ≤ PGL 2 (C) is finite, then H is conjugate to one of the following groups: It follows that S(p(x, y)) ⊆ GL 2 (C) is (up to conjugation) a central extension of the groups listed above by the cyclic group where d is the degree of p(x, y). These are classified by second cohomology groups, which are known to be the following: (1) If C n denotes the [n, 1, n] q repetition code for n ≥ 3 and q > 2, the direct sum C = C n ⊕ C 2n realizes the group C n : (2) The [n, 1, n] 2 repetition code for n ≥ 3 realizes D n : (3) The [12, 6, 6] 3 ternary Golay code realizes A 4 : w C (x, y) = x 12 + 264x 6 y 6 + 440x 3 y 9 + 24y 12 ⇒S(w C (x, y)) ≅ A 4 .
(4) The [8, 4, 4] extended Hamming code realizes S 4 : These examples can be deduced by straightforward calculations (for part 1 and 2) and using our algorithm in Section 4 (for part 3 and 4). It is however not clear if the group A 5 can be realized and how to realize it.
3.3. The infinite case. We proceed to the classification of codes with weight enumerators having infinite group of symmetries. We will need a lemma.
Lemma 3.2. Let C be a code over F q with q ≠ 2 such that all codewords of C have even weight. Let x, c ∈ C be codewords, with c of weight two and support supp(c) = {i, j}. Then there exists λ ∈ F q such that (x i , x j ) = (λc i , λc j ).
Proof. Suppose that (x i , x j ) ≠ (λc i , λc j ) for every λ ∈ F q . We show that for suitable µ ∈ F q , the codeword x + µc has odd weight. Since (x i , x j ) ≠ 0(c i , c j ) = (0, 0) we may assume without loss of generality that x i ≠ 0. If x j = 0, pick any µ ∈ F q ∖ {0, −x i c −1 i } (which is non-empty since q > 2). We have x i + µc i ≠ 0 and therefore supp(x + µc) = supp(x) ∪ {j} has odd cardinality. If x j ≠ 0, we can set µ = −x i c −1 i and find supp(x + µc) = supp(x) ∖ {i}, which has again odd cardinality.
As an immediate consequence we have: Corollary 3.1. Let C be a code over F q with q ≠ 2. Assume all codewords of C have even weight. Let c 1 , . . . , c r ∈ C of weight 2 such that c i ≠ λc j for any λ ∈ F q and i ≠ j. Then The first classification result is the following. Lemma 3.3. Let C be a linear code of even length n over F q with q ≠ 2. Suppose that w C (x, y) = (x 2 + ay 2 ) n 2 , a ∈ R ∖ {0}.
Then a = q − 1 and Proof. If n = 2 it is clear that C = ⟨(1, 1)⟩ Fq . Let n > 2. Expanding the above expression, we see that C has no codewords of odd weight. Moreover, the number of codewords of length 2 is a n−2 = an 2 ≠ 0. Let r ∶= a n−2 (q − 1) and let c 1 , . . . , c r be a set of codewords of weight 2 such that c i ≠ λc j for any λ ∈ F q and i ≠ j. They have disjoint supports by Corollary 3.1.
Let S ∶= ⋃ i supp c i and let C S ∶= ⟨c 1 , . . . , c r ⟩ Fq . Every codeword x ∈ C can be written as a sum x = y + z, y, z ∈ F n q , with supp(y) ⊆ S and supp(z)∩S = ∅. By Lemma 3.2, y is in C S ⊆ C and thus so is z. Consequently, C is the direct sum Now observe that C S is monomially equivalent to the code ⊕ r i=1 ⟨(1, 1)⟩ Fq , and hence its weight enumerator is w C S (x, y) = (x 2 + (q − 1)y 2 ) r . Therefore, we must have a = (q − 1). By induction, Let us now prove the classification theorem for codes whose weight enumerator has an infinite group of symmetries. Notice that the weight enumerator w C (x, y) of a code C satisfies #V (w C (x, y)) < 3 if an only if w C (x, 1) has at most two distinct roots in Z (the ring of algebraic integers).
Theorem 3.2. Let C ⊆ F n q be a linear code with weight enumerator w C (x, 1) ∈ Z[x] having at most two distinct roots in Z. Then only the following possibilities may hold: (a) w C (x, y) = x n and C = {0}; (b) w C (x, y) = (x + (q − 1)y) n and C = F n q ; (c) n is even, w C (x, y) = (x 2 + (q − 1)y 2 ) n 2 and, if q ≠ 2, C ≅ ⊕ n 2 i=1 ⟨(1, 1)⟩. Proof. Let −a, −b be the roots of w C (x, 1) in Z, so that w C (x) = (x + a) r (x + b) n−r for r ∈ N. The number of codewords in C of weight one is then l ∶= ra + (n − r)b.
First, assume that l ≠ 0 and let m = l (q − 1). Taking arbitrary linear combinations of the codewords of weight one gives a copy of F m q in C. Therefore, C = C 1 ⊕ C 2 , with C 1 = F m q and Consequently, −(q − 1) is a root of f ; we may assume w.l.o.g. that a = q − 1. We get Hence, either b = 0 and r = n, or (x+ (q − 1)y) divides (x+ by) n−r , which implies b = q − 1. Both cases give that w C (x, y) = (x + (q − 1)y) n . But this implies #C = w C (1, 1) = q n = #F n q , whence C = F n q , as desired.
Now assume C has no codewords of weight one, i.e. l = ra + (n − r)b = 0. If a is real then so is b, and both must be non-negative: since w C (x, y) is non-zero and has positive coefficients, w C (r, 1) > 0 for any real r > 0, so w C (x, 1) has only non-positive roots. Since ra = −(n − r)b, we must have a = b = 0 whence w C (x, 1) has only one root and C = {0}.
If a is non-real, then a and b are complex conjugate algebraic integers, and we must have r = s, which is possible only if n is even. Consequently, w C (x, y) = (x 2 + Tr(a)xy + N(a)y 2 ) n 2 where Tr(a) = a +ā and N(a) = aā. The fact that C has no codeword of weight one implies that Tr(a) = 0 and hence w C (x, y) = (x 2 + N(a)y 2 ) n 2 . If q ≠ 2, Lemma 3.3 gives the desired conclusion about C. If q = 2, we must show that N(a) = 1. Since a is an algebraic integer, N(a) ∈ Z. Since q = 2, the number of codewords of weight n is N(a) n 2 = 1 so that N(a) = ±1. But N(a) = −1 is impossible, since w C (x, y) has non-negative coefficients.
Note that Theorem 3.2 almost classifies, up to monomial equivalence, all linear codes having weight enumerator with at most two distinct roots in Z. The case q = 2 is left unsolved and seems to be a difficult problem. If q = 2, the sum of two codewords of weight 2 cannot have weight 3, so the argument in the proof of Lemma 3.3 does not work.
Question 3.1. Is it possible to classify binary codes of length n with weight enumerator (x 2 +y 2 ) n 2 ?
Let C and C ′ be two codes with weight enumerator (x 2 + y 2 ) n 2 and (x 2 + y 2 ) n ′ 2 respectively. Then C ⊕ C ′ has weight enumerator (x 2 + y 2 ) (n+n ′ ) 2 . Hence, if we let M ∶= {binary codes of length n and weight enumerator (x 2 + y 2 ) n 2 n ∈ 2N}, we have that (M, ⊕) is a semigroup; in order to answer positively to Question 3.1 it thus suffices to find all irreducible elements in M, which means to find a minimal set of generators of (M, ⊕). As usual, we consider elements in M as classes of codes up to equivalence.
We conclude this section showing a relation between our result and the Gleason-Pierce Theorem (cf. [Ken94]). Recall that a code is divisible if there exists an integer m > 1 such that the weight of every codeword of C is divisible by m. • or q arbitrary, m = 2 and w C (x, y) = (x 2 + (q − 1)y 2 ) n 2 .
Hence, Theorem 3.2 implies the following.
Corollary 3.2. For q > 4, if C is a formally self-dual divisible code of length 2n, then C is equivalent to the direct sum of n copies of ⟨(1, 1)⟩ Fq .

The algorithm
The proof of Lemma 3.1 gives an algorithm to find the stabilizer of every weight enumerator. Let C be a linear code. Suppose that its weight enumerator w C (x, y) is known and of degree n. 1. Set G ∶= ∅.
It has clearly infinitely many solutions depending on one complex parameter λ (the action of PGL 2 (C) is sharply 3-transitive, as we said). Call a, b, c, d one solution. x, y)).
This algorithm can be implemented easily in Magma, but there is a problem for Step 2: in C, we do not have access to the exact roots but only to approximations. There are two ways to solve this. The first one is to consider the splitting field of w C (x, 1) instead of C. This gives exact results but is computationally more expensive. The second one is to use approximations of the roots and control the error to find an approximated version of the stabilizer. This is done in the Master thesis of the second author [M15].
Proof. Everyḡ in PGL 2 (C) sends {z 1 , z 2 , z 3 , z j } to itself, for j = 4, 5, since it must preserve the cross ratio of these four points. Ifḡ sends z 4 to z j for j ∈ {1, 2, 3}, then from the fact thatḡ fixes {z 1 , z 2 , z 3 , z 5 } if follows that some element of this set is also sent to z j , contradicting the injectivity ofḡ. Thusḡz 4 = z 4 . But the only permutation of (z 1 , z 2 , z 3 , z 4 ) which fixes the cross ratio and sends z 4 to z 4 is the identity. Henceḡ fixes four points of P 1 (C). Since the action is sharply 3-transitive, g = id and the conclusion follows.

Reed-Muller codes
In this section we study Reed-Muller codes in deeper detail. The first subsection is focused on the binary Reed-Muller codes and contains the proof of Theorem B as well as a table listing the groups of symmetries of some small Reed-Muller codes. The second subsection gives some corresponding tables for Reed-Muller codes over larger fields, some classification results and remarks for further development.
Let us define the following polynomials: f 1 (x, y) = wĤ 3 (x, y), f 2 (x, y) = w G 24 (x, y), f 3 (x, y) = x 12 − 33x 8 y 4 − 33x 4 y 8 + y 12 . Recall that, by Gleason's Theorem, the invariant ring of B ∶= ⟨A, w⟩ is C[f 1 (x, y), f 2 (x, y)] and hence the invariant ring of B ′ ∶= ⟨A, w ′ ⟩ is simply C[f ′ 1 (x, y), f ′ 2 (x, y)] with f ′ i = f i ○ g for i = 1, 2. Moreover, if a polynomial is invariant under A but anti-invariant under w, it must be fixed by C ∶= ⟨A, wAw⟩ whence in the invariant ring of C which is C[f 1 (x, y), f 3 (x, y)]. Now it is easy to see that the anti-invariance under w implies that the polynomial is in fact in f 3 (x, y) ⋅ C[f 1 (x, y), f 2 (x, y)].

This implies finally that a polynomial is invariant under
3. Now if ζ 16 is not primitive, then f i ○ g = f i for i = 1, 2, 3. Therefore if p(x, y) is invariant (resp. anti-invariant) under w ′ , then it is also invariant (resp. anti-invariant) under w. Now p w (x, y) is the weight enumerator of the dual code and has positive coefficients, so anti-invariance under w is excluded. Moreover, p w (x, y) = p(x, y) if and only if C is formally self-dual, which is part 2 of the lemma.
Finally, if ζ 16 is primitive then w ′ is the v from part 3 of the lemma, and the proof is complete.
Let us continue with the proof of Theorem B.
Proof of Theorem B. Part 1 is trivial since these codes are simply the whole space F 2 m 2 . For part 4 observe that these Reed-Muller codes are precisely the self-dual doubly-even ones, and so the result follows from Gleason's Theorem. Now remark that part 2 (resp. part 3) is the dual version of part 5 (resp. part 6). Hence the result follows by replacing S with its conjugate by w, and by replacing the polynomials by their composition with w (where w is the Mac-Williams' transformation).
We are left with proving 5 and 6. For 5, we have i > 2 and so the divisibility condition and the symmetry in the variables x and y gives that the weight enumerator is invariant under the matrices Hence the corresponding group in PGL 2 (C) must contain ⟨d 2 i , t⟩ ≅ D 2 i . We want to show that this group of symmetries cannot be larger. Using Blichfeldt's Theorem again, this amounts to showing that this group cannot be isomorphic to some D k containing ⟨d 2 i , t⟩. It is not hard to prove that any such group must contain d k = 1 0 0 ζ k and therefore we simply need to show that our code cannot be divisible by some integer k > 2 i with 2 i k. The divisibility condition in Ax's theorem is a strict one, and so it cannot be divisible by a larger power of 2. Moreover, the minimum distance of RM(r, m) being 2 m−r (see [AK92]) we see that any integer by which the code is divisible must be a power of 2. Therefore the groupS(w C (x, y)) must be equal to D 2 i . It is now an easy exercise to show that a polynomial is symmetric with powers a multiple of 2 i if and only if it is in the ring C[x 2 i + y 2 i , x 2 i+1 + 2(2 i+1 − 1)x 2 i y 2 i + y 2 i+1 ], which is precisely the ring mentioned in the theorem.
For 6, the assertion about the invariant ring is the same as in 5, and the rest follows from Lemma 5.1, observing that these Reed-Muller codes are not formally self-dual.
The following table gives the group of symmetries in PGL 2 (C) of some small Reed-Muller codes up to conjugation. It was computed using known facts about the weight enumerators and the algorithm of Section 4. Theorem 5.1. If q is even, m is odd and 2r = m(q − 1) − 1 thenS(w RMq(r,m) (x, y)) ≅ S 4 .
Proof. Under these hypotheses RM q (r, m) is self-dual, so Gleason's theorem holds.
Notice that with the same arguments, one can prove a similar result for projective Reed-Muller codes.
Remark 5.1. Theorem 5.1 and 5.2 are the first steps in the understanding of a general picture for the groups of symmetries of Reed-Muller codes over larger fields. However, some of the arguments we used to prove Theorem B do not work in the general case.
The following two tables give some insight on the shape of the group of symmetries of some Reed-Muller codes over F 3 and F 4 . They are obtained using the algorithm presented in Section 4.
Notice that three cells are left empty, because for those parameters the calculation of the weight enumerator takes too much time.  Table 3.S(w RM 4 (r,m) (x, y)) r m 1 A remarkable case is that of RM 4 (1, 1): S(w RM 4 (1,1) (x, y)) = ⟨ 3−