On $\mathbb{Z}_{\text{8}}$ -Linear Hadamard Codes: Rank and Classification

The <inline-formula> <tex-math notation="LaTeX">$\mathbb {Z}_{2^{s}}$ </tex-math></inline-formula>-additive codes are subgroups of <inline-formula> <tex-math notation="LaTeX">$\mathbb {Z}^{n}_{2^{s}}$ </tex-math></inline-formula>, and can be seen as a generalization of linear codes over <inline-formula> <tex-math notation="LaTeX">$\mathbb {Z}_{2}$ </tex-math></inline-formula> and <inline-formula> <tex-math notation="LaTeX">$\mathbb {Z}_{4}$ </tex-math></inline-formula>. A <inline-formula> <tex-math notation="LaTeX">$\mathbb {Z}_{2^{s}}$ </tex-math></inline-formula>-linear Hadamard code is a binary Hadamard code which is the Gray map image of a <inline-formula> <tex-math notation="LaTeX">$\mathbb {Z}_{2^{s}}$ </tex-math></inline-formula>-additive code. It is known that either the rank or the dimension of the kernel can be used to give a complete classification for the <inline-formula> <tex-math notation="LaTeX">$\mathbb {Z}_{4}$ </tex-math></inline-formula>-linear Hadamard codes. However, when <inline-formula> <tex-math notation="LaTeX">$s > 2$ </tex-math></inline-formula>, the dimension of the kernel of <inline-formula> <tex-math notation="LaTeX">$\mathbb {Z}_{2^{s}}$ </tex-math></inline-formula>-linear Hadamard codes of length <inline-formula> <tex-math notation="LaTeX">$2^{t}$ </tex-math></inline-formula> only provides a complete classification for some values of <inline-formula> <tex-math notation="LaTeX">$t$ </tex-math></inline-formula> and <inline-formula> <tex-math notation="LaTeX">$s$ </tex-math></inline-formula>. In this paper, the rank of these codes is computed for <inline-formula> <tex-math notation="LaTeX">$s=3$ </tex-math></inline-formula>. Moreover, it is proved that this invariant, along with the dimension of the kernel, provides a complete classification, once <inline-formula> <tex-math notation="LaTeX">$t\geq 3$ </tex-math></inline-formula> is fixed. In this case, the number of nonequivalent such codes is also established.


I. INTRODUCTION
Let Z 2 s be the ring of integers modulo 2 s with s ≥ 1.The set of n-tuples over Z 2 s is denoted by Z n 2 s .In this paper, the elements of Z n 2 s will also be called vectors over Z 2 s of length n.A binary code of length n is a nonempty subset of Z n 2 , and it is linear if it is a subspace of Z n 2 .A nonempty subset of Z n 2 s is a Z 2 s -additive code if it is a subgroup of Z n 2 s .Note that, when s = 1, a Z 2 s -additive code is a binary linear code and, when s = 2, it is a quaternary linear code or a linear code over Z 4 .
Let S n be the symmetric group of permutations on the set {1, . . ., n}.Two binary codes, C 1 and C 2 , are said to be equivalent if there is a vector a ∈ Z n 2 and a permutation of coordinates π ∈ S n such that C 2 = {a + π(c) : c ∈ C 1 }.Two Z 2 s -additive codes, C 1 and C 2 , are said to be permutation equivalent if they differ only by a permutation of coordinates, that is, if there is a permutation of coordinates π such that The Hamming weight of a binary vector u ∈ Z n 2 , denoted by wt H (u), is the number of nonzero coordinates of u.The Hamming distance of two binary vectors u, v ∈ Z n 2 , denoted by d H (u, v), is the number of coordinates in which they differ.Note that d H (u, v) = wt H (v − u).The minimum distance of a binary code C is d(C) = min{d H (u, v) : u, v ∈ C, u = v}.The Lee weight of an element i ∈ Z 2 s is wt L (i) = min{i, 2 s − i} and the Lee weight of a vector u = (u 1 , u 2 , . . ., u In [15], a Gray map from Z 4 to Z 2 2 is defined as φ(0) = (0, 0), φ(1) = (0, 1), φ(2) = (1, 1) and φ(3) = (1, 0).There exist different generalizations of this Gray map, which go from Z 2 s to Z 2 s−1 2 [6], [8], [9], [16].The one given in [8] by Carlet is the map φ : Z 2 s → Z 2 s−1 2 defined as follows: φ(u) = (u s−1 , . . ., u s−1 ) + (u 0 , . . ., u s−2 )Y, where u ∈ Z 2 s , [u 0 , u 1 , . . ., u s−1 ] 2 is the binary expansion of u, that is u = s−1 i=0 2 i u i (u i ∈ {0, 1}), and Y is a matrix of size (s − 1) × 2 s−1 which columns are the elements of Z s−1 2 .Note that (u s−1 , . . ., u s−1 ) and (u 0 , . . ., u s−2 )Y are binary vectors of length 2 s−1 , and that the rows of Y form a basis of a first order Reed-Muller code after adding the all-one row.This generalization can be defined in terms of the elements of a Hadamard code [16].In this paper, we will focus on Carlet's Gray map φ, which is a particular case of the one presented in [16] satisfying that s−1 i=0 λ i φ(2 i ) = φ( s−1 i=0 λ i 2 i ) (λ i ∈ {0, 1}), as it was shown in [13] and will be recalled later.Then, we define Φ : as the component-wise Gray map φ.
Let C be a Z 2 s -additive code of length n.We say that its binary image C = Φ(C) is a Z 2 s -linear code of length 2 s−1 n.Since C is a subgroup of Z n 2 s , it is isomorphic to an abelian structure Z t1 × Z ts 2 , and we say that C, or equivalently C = Φ(C), is of type (n; t 1 , . . ., t s ).Note that |C| = 2 st1 2 (s−1)t2 • • • 2 ts .Unlike linear codes over finite fields, linear codes over rings do not have a basis, but there exists a generator matrix for these codes.If C is a Z 2 s -additive code of type (n; t 1 , . . ., t s ), then a generator matrix of C with minimum number of rows has exactly t 1 + • • • + t s rows.
Two structural properties of binary codes are the rank and the dimension of the kernel.The rank of a binary code C is simply the dimension of the linear span, C , of C. The kernel of a binary code C is defined as K(C) = {x ∈ Z n 2 : x+C = C} [3].If the all-zero vector belongs to C, then K(C) is a linear subcode of C. Note also that if C is linear, then K(C) = C = C .We denote the rank of a binary code C as rank(C) and the dimension of the kernel as ker(C).These parameters can be used to distinguish between nonequivalent binary codes, since equivalent ones have the same rank and dimension of the kernel.
A binary code of length n, 2n codewords and minimum distance n/2 is called a Hadamard code.Hadamard codes can be constructed from Hadamard matrices [2], [19].Note that linear Hadamard codes are in fact first order Reed-Muller codes, or equivalently, the dual of extended Hamming codes [19,Ch.13 §3].The Z 2 s -additive codes that, under the Gray map Φ, give a Hadamard code are called Z 2 s -additive Hadamard codes and the corresponding binary images are called Z 2 s -linear Hadamard codes.
The Z 4 -linear Hadamard codes of length 2 t can be classified by using either the rank or the dimension of the kernel [17], [20].Specifically, it is known that for a Z 4 -linear Hadamard code C of type For any integer t ≥ 3 and each t 1 ∈ {1, . . ., (t+1)/2 }, there is a unique (up to equivalence) Z 4 -linear Hadamard code of type (2 t−1 ; t 1 , t + 1 − 2t 1 ), and all these codes are pairwise nonequivalent, except for t 1 = 1 and t 1 = 2, where the codes are equivalent to the linear Hadamard code [17].Therefore, the number of nonequivalent Z 4 -linear Hadamard codes of length 2 t is t−1 2 for all t ≥ 3, and it is 1 for t = 1 and t = 2.
Linear codes over Z p s , which are a generalization of Z 2 sadditive codes, were studied by Blake [4] and Shankar [21] in 1975 and 1979, respectively.Nevertheless, the study of codes over rings increased significantly after the publication of some good properties of linear codes over Z 4 and the definition of the Gray map [15].After that, Z 2 s -additive codes and their images under the Gray map are deeply studied, for example, in [8], [14], and [22].In [16], Krotov studied Z 2 slinear Hadamard codes and their dual codes by using different generalizations of the Gray map.Recently, in [1], considering Carlet's generalization of the Gray map, two-weight Z 2 s -linear codes are studied.Note that Z 2 s -linear Hadamard codes are in fact a particular case of these two-weight codes.
In [13], the dimension of the kernel of Z 2 s -linear Hadamard codes is given.It is shown that the kernel do not classify these codes, since there are nonequivalent codes having the same dimension of the kernel.As a consequence, a partial classification for these codes is established.In this paper, in order to classify the Z 8 -linear Hadamard codes of length 2 t , for any t ≥ 3, we compute the rank of these codes.Moreover, we prove that this invariant, along with the dimension of the kernel, provides a complete classification, once we fix t ≥ 3. Note that, unlike for s = 2, in the case s = 3, it is necessary to use both invariants.This correspondence is organized as follows.In Section II, we describe the recursive construction of the Z 2 s -linear Hadamard codes of type (n; t 1 , . . ., t s ), introduced in [13].In Section III, we give some known results and prove new ones related to the Carlet's generalized Gray map.In Section IV, we compute the rank of the Z 8 -linear Hadamard codes in terms of the parameters t 1 , t 2 and t 3 , by finding a set of linear independent vectors of the span.In Section V, we show that, for s = 3, a complete classification can be given by using both invariants: the rank and dimension of the kernel.Finally, in Section VI, we give some conclusions and further research on this topic.

II. RECURSIVE CONSTRUCTION OF Z 2 s -LINEAR HADAMARD CODES
The description of generator matrices having minimum number of rows for Z 4 -additive Hadamard codes, as long as recursive constructions of these matrices, are given in [17].In [13], [16], these results are generalized for any s > 2. In this section, we describe the recursive construction of the generator matrices of the Z 2 s -additive Hadamard codes, introduced in [13].
Any matrix A t1,...,ts can be obtained by applying the following recursive construction.We start with A 1,0,...,0 = (1).Then, if we have a matrix A = A t1,...,ts , for any i ∈ {1, . . ., s}, we may construct the matrix (2) Finally, permuting the rows of A i , we obtain a matrix A t 1 ,...,t s , where t j = t j for j = i and t i = t i + 1.Note that any permutation of columns of A i gives also a matrix A t 1 ,...,t s .
Then, after permuting the rows of A 1 , we have the matrix which is different to the matrix A 2,0,1 of Example 2.1.These two matrices A 2,0,1 generate permutation equivalent codes.
Remark 2.1: Let H t1,0,0 be a Z 8 -additive Hadamard code of type (n; t 1 , 0, 0).Let By construction, we have that each one of the 8 q elements of Z q 8 appears 8 t 1 −1 8 q = 8 t1−q−1 times as a column of W .Therefore, there exist a permutation of coordinates ρ ∈ S n such that Note also that w i is the 8 t1−q−1 -fold replication of w q+1 i for all 2 ≤ i ≤ q + 1.

III. PROPERTIES OF THE GENERALIZED GRAY MAP
In this section, we give some known results on the Carlet's generalized Gray map and we present new results, which will be used in the next section to establish the rank of the Z 8linear Hadamard codes.
Let e i be the vector that has 1 in the ith position and the binary expansions of u and v, respectively.The operation " " on Z 2 s is defined as All the remaining results, given in this section, are only proved for s = 3, that is, for Z 8 -linear Hadamard codes.In this case, the generalized Gray map φ : Lemma 3.2: Let q be a positive integer and [q 0 , q 1 , q 2 , . ..] 2 its binary expansion.Then, q−1 3 + q 0 q−1 2 + (q 0 + q 1 )(q − 1) + q 0 (q 0 + q 1 ) ≡ 1 mod 2.
Proof.These congruences can be proved easily considering the different values of q modulo 4, as in the proof of Lemma 3.2.
Let π 8 = . By induction, taking into account that (q − 1) 0 ≡ q 0 +1 mod 2 and (q−1) 1 ≡ q 0 +q 1 +1 mod 2, and using again the properties of π k 8 and the fact that By applying again the induction hypothesis to Φ(w q 2 + w q i + w q j + w q r + k), and noting that for any z ∈ Z n 8 we have 3≤i<j<r≤q x,y∈{i,j,r}, x<y Φ(z + w q x + w q y ) = (q − 4) 3≤i<j≤q Φ(z + w q i + w q j ) and 3≤i<j<r≤q x∈{i,j,r} Φ(z+w q x ) = q−3 2 q i=3 Φ(z+w q i ), we obtain that 3≤i<j<r≤q Φ(w q 2 + w q i + w q j + w q r + k) = 3≤i<j<r≤q Φ(w q 2 + w q i + w q j + w q r )+ By replacing (5) into expression (4), and using items (i), (iii) and (iv) of Lemma 3.3, we have that (3) holds.
Proof.We prove this lemma by induction on the integer q ≥ 1.It is easy to check by computer that for q ≤ 5 the result holds.Suppose that q ≥ 6 and the statement is true for all positive integers until q − 1.
Let r i be the multiplicity of w i , i ∈ {1, . . ., t 1 }, that is, the number of elements w i that appear in the multiset S = {s 1 , . . ., s q }.If there is an element w i with multiplicity r i ≥ 4, then we may consider that s q = s q−1 = s q−2 = s q−3 = w i .Note that the right-hand side of the equation of the statement can be easily rewritten by replacing q by q − 4 and adding Φ(4w j ).Moreover, by Corollary 3.1, the left-hand side of the equation is Φ( q−4 i=1 s i )+Φ(4w j ).Therefore, we may assume that r i ≤ 3 for all i ∈ {1, . . ., t 1 }.
Let W be the set containing the elements of S without repetition.On the one hand, if w 1 ∈ S, taking into account the multiplicity of each element in W and Remark 2.1, we may assume that W = {w 2 , . . ., w d }, where On the other hand, if w 1 ∈ S, we assume that q > r 1 + r 2 .Otherwise, if q = r 1 + r 2 , since q ≥ 6 and r 1 , r 2 ≤ 3, then we have to show that the statement is true for Φ(w 2 + w 2 + w 2 + w 1 + w 1 + w 1 ), which can be checked easily.Since q > r 1 + r 2 , we can order all elements s 1 , . . ., s q as above, placing the r 1 vectors w 1 just before the r d vectors w d .Consider . We have that q−(r1+r d ) i=1 s i = (y, . . ., y) is a fold replication of y.Then, q i=1 s i is a fold replication of The result holds if the statement is true for Φ( q−(r1+r d ) i=1 ) for all k ∈ {0, . . ., 7}.Moreover, as before, we may assume that (r 1 + k • r d ) < 4, so we have to check that the statement is true for Φ( q−(r1+r d ) i=1 ), where r = (r 1 + k • r d ) mod 4, or equivalently for Φ( q−(r1+r d )+r i=1 ), where s i = w 1 for all i ∈ {q − (r 1 + r d ) + 1, . . ., q − (r 1 + r d ) + r} if r ≥ 1.
In order to verify the statement, we consider π8 (Φ( )) under different cases depending on the value of r 2 ∈ {1, 2, 3}.First, consider that r 2 = 1, i.e., s 1 = w 2 and s i = w 2 for all i ∈ {2, 3, . . ., q}.Then, by using the same arguments as in the proof of Lemma 3.4, we have that the result holds.Next, consider that r 2 = 2.By induction hypothesis, taking into account that (q − 2) 0 ≡ q 0 mod 2 and (q − 2) 1 ≡ q 1 + 1 mod 2, and using again the properties of π 8 and the fact that Φ • π 8 = π8 • Φ, we have that By applying again the induction hypothesis to the terms of (6) having more than four addends, that is, Φ(w and By replacing ( 7) and ( 8) into expression (6), and using items (i) and (ii) of Lemma 3.3, we have that ( 6) is equal to Note that all the terms that are missing in order to obtain the result appear repeated in pairs, so they sum to zero.The case with r 2 = 3 can also be proved by using similar arguments.Therefore, the result holds.Lemma 3.6: Let H t1,0,0 be a Z 8 -additive Hadamard code of type (n; t 1 , 0, 0).Let w i be the ith row of A t1,0,0 , 1 ≤ i ≤ t 1 .Then, given i, j, k ∈ {1, . . ., t 1 }, Proof.Suppose that 2 ≤ i < j < k.By Remark 2.1, it is enough to see that (9) holds for w 2 , w 3 , w 4 .In fact, it is enough to show that it is true for w 3  2 , w 3 3 , k for all k ∈ {0, 1, . . ., 7}.Let A be the right-hand side of (9).
The sum of the four vectors in ( 11) is a zero vector, since x + y + z = 0, so A 1 = Φ(2w 3 2 + w 3 3 + 1) + Φ(w 3 2 + 2w 3  3 + 1) and ( 10) holds.For k = 2, it is easy to see that the result holds by Lemma 3.5.For k = 3, it follows also from Lemma 3.5, the previous result for k = 1, and the fact that Φ(2w i + 1) = Φ(2w i ) + Φ(1) for all 1 ≤ i ≤ t 1 .Finally, for the rest of the cases, if and the result holds since w k appears 4 times in A.
), the result is equivalent to prove (14) with k = 1.Finally, if k = 1, it is equivalent to (10) with k = 1, and if i = 1 (or j = 1), it is equivalent to (12) with k = 1.Therefore, the result holds.
Lemma 3.7: Let H t1,0,0 be a Z 8 -additive Hadamard code of type (n; t 1 , 0, 0).Let w i be the ith row of A t1,0,0 , 1 ≤ i ≤ t 1 .Then, given i, j, k ∈ {1, . . ., t 1 }, Proof.First, if 2 ≤ i < j < k, by Remark 2.1, the above equations can be showed to be true by checking that they hold for w 3  2 , w 3 3 , k for all k ∈ {0, 1, . . ., 7}.It is also easy to see that they hold if some of the elements i, j, k are equal, or at least one of them is equal to 1.

IV. RANK OF Z 8 -LINEAR HADAMARD CODES
The rank of a Z 4 -linear Hadamard code of type (2 t−1 ; t 1 , t 2 ), where t [20].In this section, we establish the rank of a Z 8 -linear Hadamard code of type (2 t−2 ; t 1 , t 2 , t 3 ), where t + 1 = 3t 1 + 2t 2 + t 3 , in terms of the parameters t 1 , t 2 and t 3 by finding a set of linear independent vectors that generate the span of the code.
Let B 2 = {w 1 , w 2 , . . ., w t1 , 2w 1 , . . ., 2w t1 , 4w 1 , . . ., 4w t1 } be a 2-basis of H and recall that ord(w i ) = 8 for all i ∈ {1, . . ., t 1 }.Let u ∈ H.We know that u = 3t1 i=1 λ i b i , where b i ∈ B 2 is the ith element of B 2 and λ i ∈ {0, 1}.Let (Computer Science Section) in 2005 from the same university.In 2000 she joined the Department of Computer Science at the Universitat Autònoma de Barcelona, and in 2005 the Department of Information and Communications Engineering at the same university.In 2008, she joined the Fundación Española para la Ciencia y la Tecnología and she did a one year research stay at Auburn University under a Fulbright grant.From 2009, she is within the Department of Information and Communications Engineering at the Universitat Autònoma de Barcelona where currently is an Associate Professor.Her research interests include subjects related to combinatorics, coding theory and graph theory.Carlos Vela was born in Sevilla, Spain, in November 1992.He received the B.Sc. degree in Mathematics and the M.Sc.degree in Computer Science and AI from the Universidad de Sevilla, Spain, in 2014 and 2015, respectively, and the Ph.D. degree in Computer Science from the Universitat Autònoma de Barcelona, Spain, in 2018.He worked at the Information and Communications Engineering Department of the Universitat Autònoma de Barcelona while pursuing his Ph.D. degree.His research interests include subjects related to algebra and coding theory.Mercè Villanueva was born in Roses, Catalonia, in January 1972.She received the B.Sc. degree in Mathematics in 1994 from the Autonomous University of Barcelona, the M.Sc.degree in Computer Science in 1996, and the Ph.D. degree in Science (Computer Science Section) in 2001 from the same university.In 1994 she joined the Department of Information and Communications Engineering, at the Autonomous University of Barcelona, as an Assistant Professor, and was promoted to Associate Professor in 2002.Her research interests include subjects related to combinatorics, algebra, coding theory, and graph theory.