CODES OVER LOCAL RINGS OF ORDER 16 AND BINARY CODES

. We study codes over the commutative local Frobenius rings of order 16 with maximal ideals of size 8. We deﬁne a weight preserving Gray map and study the images of these codes as binary codes. We study self-dual codes and determine when they exist.


Introduction
It has become the standard now in many areas of coding theory to assume that the underlying alphabet of a code is a finite Frobenius ring. One of the early papers using this was [8] in which binary codes were constructed via a non-linear Gray map from quaternary codes. This work was followed by papers where Gray maps were defined from all of the rings of order 4, see [3], and then to other rings, see [2,7,12]. In general, Gray maps have been a central feature of the study of codes over rings. Self-dual and formally self-dual codes are important classes of codes and they have canonical connections to finite designs and unimodular lattices. Formally selfdual and self-dual codes have Hamming weight enumerators that are held invariant by the action of the MacWilliams relations. It is a long standing question to determine if there are codes that correspond to each polynomial, with non-negative integer coefficients, that is held invariant by the action of the MacWilliams relations. One such open question is to determine when there are extremal Type II codes of length 24k.
In [11], foundational results were given for codes over finite Frobenius rings. Namely, Wood shows that both MacWilliams theorems, namely the theorem which determines the weight enumerator of the orthogonal and the theorem that determines equivalences of codes, hold for codes over these rings. Wood's results were for codes over arbitrary Frobenius rings, but for the remainder of this paper we shall assume that rings in the paper are commutative. It is well known that any finite commutative Frobenius ring is isomorphic via the Chinese Remainder Theorem to a direct product of local Frobenius rings. This isomorphism carries many of the important structural aspects of a code. Hence, there is a great significance to studying codes over local Frobenius rings. Specifically, codes over local Frobenius rings can be thought of as the foundation of codes in general. In the non-commutative case, we do not have the Chinese Remainder Theorem and so we cannot necessarily reduce many coding theory questions to codes over local rings.
In this paper, we study codes over commutative local Frobenius rings of order 16 with |J(R)| = 8. We define a Gray map to the binary Hamming space and define a Lee weight based on the Hamming weight of the Gray image. This Gray map is a canonical extension of the usual Gray maps as defined over the local rings of order 4. Our Gray map is presented in a very general form which can be applied to any local Frobenius ring of order 16 with a maximal ideal of size 8. Then we study self-dual and formally self-dual codes over these rings and examine their binary images.

Definitions and notations
The rings in this paper, which are used as alphabets for codes, have a multiplicative identity and are assumed to be commutative and finite. A ring is a local ring if it has a unique maximal ideal and a chain ring is a local ring where the ideals are linearly ordered by inclusion. It follows that the ideals in a chain ring are principal and that the ideals are of the form with γ e−1 = 0. The number e is said to be the index of nilpotency of the ring.
For a module M over a ring R define M = Hom Z (M, C * ). Note that C * can be replaced with Q/Z if we want to use an additive model rather than a multiplicative one. Suppose R is a finite ring. The following are equivalent: (1) R is a Frobenius ring; (2) as a left module, R ∼ = R R; (3) as a right module R ∼ = R R . We shall only be concerned with rings that are Frobenius in this paper. It has been established, see [11], that this is the class of rings which can serve as a useful alphabet for codes.
Since we assume all rings are commutative, it simplifies the following definitions. The Jacobson radical J(R) of a ring R can be characterized as the intersection of all maximal ideals. In a commutative local ring the Jacobson radical is necessarily the unique maximal ideal. The socle of a ring R, Soc(R), is defined as the sum of all the minimal ideals of the ring.
In Theorem 3.10 (4a) of [10], the list of local Frobenius rings of order 16 with Jacobson radical of size 8 was presented. Five of the rings are chain rings, and Z 16 and seven of them are non-chain rings, In all of these rings we have that the maximal ideal m is the Jacobson radical of the ring and m ⊥ = Soc(R). For the non-chain rings we have m 2 = Soc(R). For the chain rings we have m 3 = Soc(R). In both cases we have that |Soc(R)| = 2.
Remark 1. The nilpotency of J(R) for any ring under consideration is less than or equal to 4. From this we see that the group of units for each ring is isomorphic to either C 2 × C 2 × C 2 or C 2 × C 4 . Of the 12 rings being considered, the only 3 rings with the group of units isomorphic to Given a ring R, we say that a code of length n is a subset of R n . If the code is a submodule we say that the code is linear. If C is a code then the weight enumerator with respect to a weight, denoted by wt, is where N is the maximum weight for a vector of length n. We attach to the ambient space the Euclidean inner-product, namely [v, w] = v i w i . We define an orthogonal with respect to this inner-product, namely C ⊥ = {v | [v, w] = 0, ∀w ∈ C}. The code C ⊥ is always linear whether or not C is and it follows from the foundational results in [11] that |C||C ⊥ | = |R| n when C is a linear code over Frobenius ring R.
If C = C ⊥ we say that the code C is self-dual and if C ⊆ C ⊥ we say that the code C is self-orthogonal. If a code C satisfies W C (x, y) = W C ⊥ (x, y) then we say that the code is formally self-dual with respect to that weight.

Local rings of order 16
In this section, let R be a local Frobenius ring of order 16 with a maximal ideal of size 8. Then R/J(R) ∼ = F 2 . In any case, there exist u, v, w ∈ R with J(R) = u, v and Soc(R) = w = {0, w}. If R is a chain ring, we actually have J(R) = u , J(R) 2 = v and Soc(R) = w where v = u 2 and w = u 3 . The ideals for such a ring are described in Figure 1.
In the non-chain ring case there are three intermediate ideals all of cardinality 4 which are u , v and u + v . The ideals for such a ring are described in Figure 2.
Every element of these rings can be written uniquely in the form a + bu + cv + dw where a, b, c, d ∈ {0, 1}. Note that we are not saying that the group structure of the additive group is C 4 2 , but rather that the elements have a unique representation of this form. We shall use the fact that every element can be written in this form to construct a Gray map for any ring in this family.
There are two local rings of order 4 that are not fields, namely F 2 + uF 2 and Z 4 . Both of these have a well known Gray map. It is possible to describe both Gray maps as Φ : Figure 2. Diagram for the non-chain ring Notice that in both of these rings we are able to write the elements as a+bv where a, b ∈ F 2 . Note that this is not saying that the group structure is C 2 × C 2 but rather that the elements can be placed into that form. We can extend these maps to rings where the elements can be written as a + bu + cv + dw where a, b, c, d ∈ {0, 1}. Namely, we view the elements as being of the form (a+cv)+(b+dv)u and apply the order 4 Gray map twice (allowing for an abuse of notation), that is, once in terms of u and then in terms of v. Specifically, we apply this Gray map to the element α + βu where α = a + bv and β = c + dv to get (β, α + β). Then we apply the Gray map to α and β. Namely, we send α to (b, a + b) and β to (d, c + d). Hence we make the following definition of the Gray map. For a finite local Frobenius ring R of order 16 with Jacobson radical of size 8, we define the Gray map φ : R → F 4 2 as , then by comparing the first coordinates d = d . Comparing the second and third coordinates gives that b = b and c = c . Then comparing the fourth coordinates we have a = a . Hence the map is bijective.
In many ways it is the non-linear case which is the most interesting, as it is in the case for the quaternary Gray map. For the ring F 2 [u, v]/ u 2 , v 2 we have that φ(C ⊥ ) = φ(C) ⊥ , however this is not true in general for the rings of characteristic 2. For example, it is not true for Let w L (x) denote the Lee weight of the element x ∈ R where w L (x) is defined to be the Hamming weight of φ(x). It can be seen that Note that the weight is odd if and only if the element is a unit. This is important in that what we want is that the weights of the elements in the maximal ideal all have even weight and that the non-zero element in the socle has the largest weight. The reason for this becomes apparent in Theorem 4.6. Notice the map φ is not necessarily linear but it is weight preserving.
In [7], another Gray map equivalent to φ was defined. It is also possible to define another Gray map on the local rings of order 16 with a maximal ideal of size 8. On the set {1, u, v, w} define a poset where 1 ≤ u, 1 ≤ v, u ≤ w, v ≤ w and u and v are not comparable. This poset is given in the following diagram: View the elements of the ring as an F 2 vector space with basis 1, u, v, w. For Then extend ψ linearly over F 2 . Note that the Lee weight increases with respect to the ordering of the poset and that the Lee weights defined for ψ and φ are the same. Additionally, this vector space can be viewed as the mod 2 group algebra of the Klein-4 group, where the Hamming weight respect to the basis of group elements corresponds to the Lee weight as we have defined it. Proof. Follows from a straightforward computation.
The rank of a code C is the minimum number of generators of C. Let d L (C) denote the minimum Lee weight of all non-zero vectors in C. Using the same proof as was given in [6], we have the following. Theorem 3.3. Let C be a linear code over R, then Using the Lee weight we can now define the following Lee weight enumerator: where wt L (c) is the weight of a codeword c ∈ C. Notice that 4n is the maximal Lee weight of any vector of length n. This weight enumerator coincides with the Hamming weight enumerator of the image of the code We shall say that a formally self-dual code code is Type II if all Lee weights in the code are doubly-even, Type I if all Lee weights are even and Type 0 otherwise.
An example of a Type 0 formally self-dual code will be given in Theorem 4.9.

Self-dual codes
Self-dual codes are an important class of codes. They have numerous connections to unimodular lattices and design theory. In this section, we shall describe self-dual codes over local Frobenius rings of order 16 and examine their images under the Gray map.
We shall determine the existence for Type I and Type II self-dual codes. It will be shown that there are no Type 0 self-dual codes.  Proof. The result follows from the previous theorem noting that the image of the all w vector by the Gray map is the all-one vector.
The following well known lemma is easily proven. Lemma 4.2. If C and D are self-dual codes over a Frobenius ring R of length n and m respectively then C × D is a self-dual code of length nm. If C and D are formally self-dual codes of length n and m respectively then C × D is a formally self-dual code of length nm.
We shall now examine the existence of self-dual codes. Proof. Let R be a local Frobenius ring of order 16 with a maximal ideal of size 8 that is not a chain ring. There are precisely 3 ideals of order 4 namely u , v and u + v . Given an ideal a of order 4, a ⊥ is an ideal of order 4. Take an ideal a, if a = a ⊥ then there is a self-dual code of length 1. If a = a ⊥ , then a ⊥ is one of the other ideals. Hence the third ideal must be a self-dual code of length 1.
If the ring is a chain ring then there is a unique ideal of order 4, hence its orthogonal must be of size 4 so it must be self-dual.
Since all the elements in the self-dual code are in the maximal ideal, the Lee weights must all be even. Hence the code is Type I.
Notice that this lemma implies that there are either one or three self-dual codes of length 1 in this case. For chain rings there can be only one self-dual code of length 1 since there is only one ideal of the proper order. The image under the Gray map of any of these possible length 1 codes is a [4, 2, 2] binary self-dual code. It is possible that all three ideals are self-dual codes of length 1. For example, in the ring F 2 [u, v]/ u 2 , v 2 , uv = vu , the codes u , v and u + v are all self-dual codes of length 1. In the ring F 2 [u, v]/ u 2 + v 2 , uv only the ideal u + v is self-dual. In this ring u ⊥ = v .
For the rings in our collection of characteristic 4, we have that 2 is always a self-dual code of length 1. In the ring Z 4 [x]/ x 2 − 2x , 2 is the only self-dual code of length 1 and in the ring Z 4 [x]/ x 2 there are three, namely 2 , x and x + 2 . Lemma 4.3 leads to the following theorem.  Proof. We know that there are three ideals of order 4 in R, namely u , v and u + v . Moreover, each of these ideals contain the socle which is {0, w}. If there is only one self-dual code then the other ideals of order 4 are duals of each other. Assume that the ideals α and β are duals of each other. Then α = {0, α, w, α + w} and β = {0, β, w, β + w}. In either case, the ideals have two elements with Lee weight 2, one element with Lee weight 0 and one element with Lee weight 4. Hence they have identical Lee weight enumerators. Thus α and β are Type I Lee formally self-dual codes that are not self-dual of length 1.
As an example of the previous theorem, consider the ring F 2 [u, v]/ u 2 + v 2 , uv . The ideals u and v are Lee formally self-dual codes that are not self-dual. The image of both of these codes is the linear [4, 2, 2] binary self-dual code. This shows that the image of Lee formally self-dual code that is not self-dual can in fact be self-dual.
We shall now examine the case for Type II codes.
Theorem 4.6. There exist Type II self-dual codes of length 2 for all local non-chain Frobenius rings of order 16 with maximal ideal of size 8.
Proof. Let R be a local non-chain Frobenius ring of order 16 with Soc(R) = w . Consider the code Since J(R) 2 = Soc(R), we have that x 2 ∈ Soc(R). Then 2y = 0 for all y in Soc(R) since it is isomorphic to the field with two elements. Hence, the code C is selforthogonal. Then the code has |C| = 16 and is of length 2 with C ⊆ C ⊥ . Therefore C = C ⊥ and C is self-dual. If v ∈ C − {0} is of the form (x, x), x ∈ J(R), then the Lee weight is 2 + 2 = 4 unless x = w where the Lee weight is 4 + 4 = 8. If v ∈ C is of the form (x, x + w), x ∈ m, then if x = w the Lee weight is 2 + 2 = 4 and if x = w then v has Lee weight 4. Hence C is a Type II self-dual code.
The code φ(C), where C is the code given in Theorem 4.6, is equivalent to the [8,4,4] binary Hamming code. We give an example for a specific ring which describes the code in Theorem 4.6.
Example 3. Let C be a code over R = Z 4 [x]/ x 2 − 2x generated by the following matrix Then G generates a Type II self-dual code over R.
In [13], the authors find a Type II self-dual code over F 2 [u, v]/ u 2 , v 2 whose image under φ is the extended binary Golay code.
Notice that in the chain ring case, J(R) 2 may not be Soc(R) so the above construction may not work. For example, over Z 16 which is a chain ring with Jacobson radical of size 8, the construction would give the generator matrix 2 2 0 8 . However, the vector (2, 2) has [(2, 2), (2, 2)] = 8 = 0 and the vector is not self-orthogonal. However, we can prove the following similar result. Proof. Let γ be the generator of the maximal ideal in a chain ring R of order 16 with | γ | = 8. Consider the code generated by the following matrix: Note that each vector has even Hamming weight in the code generated by the first three rows of the matrix with elements in the maximal ideal. Therefore all of these vectors have doubly-even Lee weight.
The only vectors in the code with odd Hamming weight have a γ 3 in them which has Lee weight 4 so these vectors have doubly-even Lee weight as well. Then note that γ 3 ∈ Soc(R) so γ 3 + γ 3 = 0 which gives that the rows are mutually orthogonal. Hence the code is a Type II self-dual code.
Corollary 2. There exist Type II codes of all even lengths over local non-chain Frobenius rings of order 16 with maximal ideal of size 8. There exist Type II codes of all lengths a multiple of 4 over local Frobenius chain rings of order 16 with maximal ideal of size 8.
Proof. Follows from Lemma 4.2 and noticing that the Cartesian product of Type II codes is Type II.
Of course, if the image of a Type II self-dual code is linear then it must be a self-dual code since it contains only doubly-even binary codewords. However, the binary code may be non-linear and so not self-dual.  Proof. The code (1, 0) is a Type 0 Lee formally self-dual code of length 2. Then apply the Cartesian product and we have Type 0 Lee formally self-dual codes of all even lengths.
Of course, if a local Frobenius non-chain ring of order 16 with maximal ideal of size 8 has only one self-dual code of length 1 then there exist Lee formally self-dual codes of length 1. In these cases, Lee formally self-dual codes exist for all lengths.
We can use the generating element of a self-dual code of length 1 to construct other self-dual codes.
Theorem 4.10. Let C be a self-orthogonal code of length n over a local Frobenius ring R of order 16 with a maximal ideal of size 8. Let α be a principal generator of the self-dual code of length 1. Then C, (C ⊥ ∩ αR n ) is a self-dual code of length n.
Proof. In the non-chain ring case there exists a self-dual code of length 1 either generated by u, v or u + v. Call this element that generates the self-dual code α.
In the chain ring case there is a unique choice for α. Consider vectors v, v ∈ C and αw, αw ∈ C ⊥ . Note that w, w may not be in C ⊥ , but any vector in this intersection C ⊥ ∩ αR n is of the form αw for some vector w. Then = 0 + 0 + 0 + α 2 [w, w ] = 0, since α 2 = 0. Hence the code is self-orthogonal. Then we have Then C ⊥ ∩ C, αR n = C, (C ⊥ ∩ αR n ) . Therefore the code is self-dual.
Notice that it is possible that there is more than one α that could be used in the previous theorem. We shall now illustrate this point and show two different cases in the construction of this self-dual code. Consider the ring R = Z 4 [x]/ x 2 . Let C be the self-orthogonal code C = {(β, β) | β ∈ m}, where m is the unique maximal ideal which is 2, x . The code C can be seen as generated by the vectors (2,2) and (x, x). Take the code C 1 = C, (C ⊥ ∩ xR n ) . This code C 1 can be seen as C, ( (3x, x) ) . Notice that (3, 1) is an element of the code C ⊥ . As such C, (C ⊥ ∩ xR n ) = C, xC ⊥ . By the theorem, C 1 is a self-dual code of length 2. Now consider the code C 2 = C, (C ⊥ ∩ 2R n ) . The code C 2 can be seen as C, ( (2x + 2, 2) ) . Notice here that C 2 = C, 2C ⊥ since (2x + 2, 2) = 2(β 1 , β 2 ) for any (β 1 , β 2 ) ∈ C ⊥ . Note however that (2x + 2, 2) is in C ⊥ . These examples show why the theorem requires C, (C ⊥ ∩ αR n ) rather than simply C, αC ⊥ and the difference a choice of α can make.
We shall now investigate when free self-dual codes exist. A code C is free if it is isomorphic to R k for some integer k.
Lemma 4.11. Let C be a free self-dual code of length n over a local Frobenius ring R of order 16 with a maximal ideal of size 8. Then n is even.
Proof. Since C is a free self-dual code, |C| 2 = |R| n . This gives |R| 2k = |R| n for an integer k which gives that n is even. Proof. Since R/J(R) ∼ = F 2 and 1 = −a 2 − b 2 we have that either a or b is a unit and the other is in J(R). Assume a is a unit. Now, a 2 = 1 + s where s ∈ J(R) 2 .
Finally, we show that there is no a, b ∈ Z 4 [x]/ x 3 − 2, 2x with a 2 + b 2 = −1. To that end, assume there is a, b with a 2 + b 2 = −1. We have seen in the proof of Lemma 4.12, that we may assume a is a unit and b ∈ J(Z 4 [x]/ x 3 − 2, 2x ). Then a and 1 + b are units. Note that since 2 ∈ Soc(Z 4 [x]/ x 3 − 2, 2x ), we have that 2b = 0. Then we have (1 + b) 2 = 1 + 2b The following corollary is a direct consequence of Lemma 4.13 and Theorem 4.14.  4.15. Let S be a subring of the Frobenius ring R. If C is a self-dual code in S n with generator matrix of the form (I n 2 | A) then C ⊆ R n is a free self-dual code.
Proof. Since the generator matrix is of the form (I n 2 | A) then the generated code has size |R| n 2 . Then if v i , w j ∈ S n and α i , β i ∈ R we have that giving that the code is self-orthogonal. Therefore, the code is self-dual.
We can use this lemma to find free self-dual codes even when Lemma 4.13 may not apply. For rings of characteristic 4, the ring contains Z 4 as a subring. The following matrix generates a free self-dual code in Z  In order to get self-dual codes over the local rings of order 16 which have an element γ with γ 2 = −1, we can apply the building-up construction. Hence, we can obtain self-dual codes over the following rings by the building-up construction: F 2 [u, v]/ u 2 , v 2 , F 2 [u, v]/ u 2 +v 2 , uv , Z 4 [x, y]/ x 2 −2, xy−2, y 2 , 2x, 2y , For more detailed information about the building-up construction see [4].

Construction of formally self-dual codes
In this section, we shall investigate a construction technique of formally self-dual codes. If X is either an n×n circulant or symmetric matrix over R then the code generated by the matrix [I n |X] is a formally self-dual code of length 2n.
Proof. In Theorems 5.1 and 5.2 of [14], these results were proven specifically for R = Z 4 [x]/ x 2 . Those proofs work verbatim when R is since in these rings, for any element c ∈ R we have w L (c) = w L (−c).
Note that the matrix G = [I n |X] does not have to generate a formally selfdual code over Z 4 [x, y]/ x 2 , xy − 2, y 2 , 2x, 2y , Z 4 [x, y]/ x 2 − 2, xy − 2, y 2 , 2x, 2y ,  Then G generates a formally self-dual code where w is the generator of the socle of the corresponding ring and u is a generator of one of the ideals of order 4.