Manuscript Offprint
arXiv:2609.06244Rank and classification of -linear Hadamard codes
Abstract
The -additive codes are subgroups of . A -linear Hadamard code is a Hadamard code which is the Gray map image of a -additive code. A recursive construction of -additive Hadamard codes of type with and is known, as well as the linearity and the kernel of the corresponding -linear Hadamard codes of length . The rank of these codes, however, was not known: the values used in the literature had to be computed with a computer algebra system, one type at a time.
In this paper, we determine for every admissible triple and obtain an explicit closed formula. The proof computes the dimension of the space spanned by the binary coordinate functions of the code, viewed as Boolean functions of the binary digits of the message. We then use the rank formula, together with the known dimension of the kernel, to classify the family as far as these two invariants allow. Inside the family, we prove that the only pairs of distinct types of the same length sharing both invariants are for and for . Consequently, writing for the rank and for the dimension of the kernel, the number of distinct pairs among the codes of length is for , for , and for . In particular, the rank and the dimension of the kernel classify the family completely if and only if . We also determine all coincidences of these two invariants with the -linear, -linear, and -linear Hadamard codes of the same length. There is exactly one infinite family of coincidences with the -linear and -linear families, namely and for , and exactly five families of coincidences with the -linear codes.
Keywords: Hadamard code, Gray map, -linear code, -additive code, rank, kernel, classification.
2020 Mathematics Subject Classification: 94B25, 94B60.
1 Introduction
Let be the ring of integers modulo with . The set of -tuples over is denoted by , and in this paper the elements of are also called vectors. A code over of length is a nonempty subset of , and it is linear if it is a subspace of . Similarly, a nonempty subset of is a -additive code if it is a subgroup of the additive group of . A -additive code is a subgroup of . Note that a -additive code is a linear code over when , a -additive or -additive code when or ,
*This work has been granted by the Juan de la Cierva 2024 grant (JDC2024-053082-I), funded by Ministerio de Ciencia, Innovación y Universidades (MICIU/AEI/10.13039/501100011033) and co-funded by the European Social Fund Plus (FSE+).
respectively, and a -additive code when . The order of a vector , denoted by , is the smallest positive integer such that . Also, the order of a vector , denoted by , is the smallest positive integer such that .
Two binary codes and of length are said to be equivalent if there are a vector and a permutation of coordinates such that . The Hamming weight of a vector , denoted by , is the number of its nonzero coordinates, and the Hamming distance of two vectors is the number of coordinates in which they differ; hence, . The minimum distance of a code over is .
In [1], a Gray map from to is defined as , , and . There exist different generalizations of this Gray map, which go from to [2, 3, 4, 5, 6]. In this paper, we focus on Carlet's Gray map [2], from to , which is a particular case of the one given in [6, 7] satisfying [8]. Specifically,
where ; is the binary expansion of , that is, with ; and is a matrix of size whose columns are all the vectors in . Without loss of generality, we assume that the columns of are ordered in ascending order, by considering the elements of as the binary expansions of the elements of . Note that is the identity map and that is the Gray map given above. We define as the component-wise extended map of , and a Gray map from to , where , by
for any , where .
Let be a -additive code of length . We say that the Gray map image of , say , is a -linear code of length . Since is a subgroup of , it is isomorphic to , and we say that , or equivalently , is of type . Similarly, if is a -additive code, we say that its Gray map image is a -linear code of length . Since can be seen as a subgroup of , it is isomorphic to , and we say that , or equivalently , is of type . Note that a -linear code [9, 10] can be seen as a -linear code of type . In this case, we also say that the type of is directly . Unlike linear codes over finite fields, linear codes over rings do not have a basis, but there exists a generator matrix for these codes having minimum number of rows. If is a -additive code of type , then and there exists a generator matrix with rows.
A binary code of length , codewords and minimum distance is called a Hadamard code. Hadamard codes can be constructed from Hadamard matrices [11, 12]. Note that linear Hadamard codes are in fact first order Reed-Muller codes, or equivalently, the dual of extended Hamming codes [12]. It is also important to note that Hadamard codes are two weight codes, which have been widely studied in [13, 14]. Most Hadamard codes are, however, nonlinear, and their classification is still an open problem. One fruitful way of attacking it is to realise some of them as Gray map images of additive codes over rings or over mixed alphabets and then to decide which of the resulting codes are equivalent, each such result giving a partial classification of nonlinear Hadamard codes. The representation of the Kerdock, Preparata and Goethals codes [1] was the starting point of this point of view, and codes over go back to Blake [15] and Shankar [16].
From a more practical point of view, since Hadamard codes are optimal and have a high correction capability, they appear in different aspects related to the transmission of information, such as in digital communication with satellites [17], in CDMA phones to modulate the transmission of information and minimize interference with other transmissions [18] and, in general, in different OCDMA multiple access systems to allow access to multiple users asynchronously and simultaneously [19]. Other applications are found in cryptography [20] or in information hiding (steganography and watermarking) [21]. See [17] for more applications in other fields.
Two structural properties of codes over are the rank and the dimension of the kernel. The rank of a code over is simply the dimension of the linear span, , of . The kernel of a code over is defined as [22]. If the all-zero vector belongs to , then is a linear subcode of . Note also that if is linear, then . We denote the rank of as and the dimension of the kernel as . Both are equivalence invariants, so two codes with different pairs are nonequivalent; the converse is false in general, and it is exactly this that makes classification difficult.
The -additive codes such that after the Gray map give Hadamard codes are called -additive Hadamard codes and the corresponding images are called -linear Hadamard codes. Similarly, the -additive codes such that after the Gray map give Hadamard codes are called -additive Hadamard codes and the corresponding images are called -linear Hadamard codes. It is known that -linear Hadamard codes, that is, -linear Hadamard codes with , and -linear Hadamard codes with can be classified by using either the rank or the dimension of the kernel [23, 24]. Moreover, in [25], it is shown that each -linear Hadamard code is equivalent to a -linear Hadamard code with . Later, in [8, 26, 27, 28], a recursive construction for -linear Hadamard codes, with prime, is described, the linearity is established, and a partial classification by using the dimension of the kernel is obtained, giving the exact amount of nonequivalent such codes for some parameters. In [29], a complete classification of -linear Hadamard codes by using the rank and dimension of the kernel is provided, giving the exact amount of nonequivalent such codes. For any , the full classification of -linear Hadamard codes of length , with , , and prime, is given in [30, 31], by using just the dimension of the kernel.
This paper is concerned with the mixed alphabet with , and . A recursive construction of -additive Hadamard codes of type , with , and , was given in [32], where it was also proved that several other natural recursive constructions produce permutation equivalent codes. The corresponding binary codes are denoted by . In [33], it was shown that is linear if and only if , and that for the nonlinear ones the kernel is the Gray map image of the subcode of the elements of order at most two, and hence .
Those results give a complete classification for the lengths with . However, no general formula for the rank of was known. The rank values used in [33] were computed with MAGMA [34], type by type, for these lengths. Consequently, although the classification in that range was complete, there was no general description of the rank for arbitrary type, nor of which distinct types of the same length share both the rank and the dimension of the kernel. In particular, when two codes had the same values of these two invariants, their nonequivalence was established by computational equivalence tests. Thus, a general rank formula is needed to understand theoretically how far the rank and the dimension of the kernel alone distinguish -linear Hadamard codes for arbitrary length, and to identify precisely the cases in which an additional invariant is required.
The first and main contribution of this paper is the explicit determination of the rank of , given in Theorem 3.15. The proof is elementary but requires care. Since the row rank of a matrix equals its column rank, the rank of the code is the dimension of the space spanned by its binary coordinate functions, each of which is a Boolean function of the binary digits of the message. The coordinate functions attached to the coordinates in the and the parts span a space , which contains the digit functions and the quadratic carry functions. The lowest two binary digits of every coordinate in the part already lie in ; only the top digit can increase the rank, and we describe the space it contributes by an explicit and short list of generators. Every value produced by the formula agrees with the values obtained with MAGMA in [33, Tables 2–4].
The second contribution is the classification that the rank and the dimension of the kernel produce, together with a precise description of what they cannot do. Inside the family we prove, in Theorem 4.10, that the only pairs of distinct types with the same length, the same rank and the same dimension of the kernel are , where , and , where . Consequently, writing for the number of admissible types of length , the pair separates exactly classes for , then for , and then for every . In particular, classifies the whole family if and only if . This is Corollary 4.13, and it is the exact statement of what remains to be done by other means.
The third contribution is the comparison with the classical families by means of the same two invariants. We determine, in Theorem 4.15, all the coincidences with the -linear and the -linear Hadamard codes: there is exactly one infinite family, namely and , where , and for every other type the rank or the dimension of the kernel already separates. We also determine, in Proposition 4.22, all the coincidences with the -linear Hadamard codes; there are exactly five families.
The paper is organised as follows. Section 2 contains the preliminaries. We recall the construction of -linear Hadamard codes of type , with , and , given in [32], together with a direct description of the columns of their generator matrices , which replaces the recursive construction by a closed combinatorial statement and is the form used in all subsequent proofs. We also recall the linearity and kernel results given in [33]. Section 3 develops the Boolean function method and proves the rank formula. Section 4 carries out the classification by the rank and the dimension of the kernel, inside the family and against the classical families, and states precisely which pairs remain unseparated. Section 5 summarises the results.
2.1 The recursive construction of
We now recall the construction of [32]. Let denote the vectors having the elements repeated in every coordinate, the length being always clear from the context. Let , and be integers. The matrices , having rows of order 8, rows of order 4 and rows of order 2, are constructed recursively as follows. We start from
and then apply the three constructions below. If with is already constructed, we form
(3) where and . Construction (3) is applied until . If with and is already constructed, we form
where now , and Construction (4) is applied until . Finally, if with is already constructed, we form
and Construction (5) is applied until . Thus, in this way, we obtain .
Summarising, in order to reach from we first adds rows of order 8 by applying (3) exactly times, then add rows of order 4 by applying (4) exactly times, and finally add rows of order 2 by applying (5) exactly times. Note that the first row of is always , and that it has order 2; it is therefore one of the rows of order two, and it will play a distinguished role throughout. We denote by the -additive code generated by and by the corresponding -linear code.
Example 2.1. By using the constructions described in (3), (4), and (5), we obtain the following matrices , and , respectively, starting from given in (2):
2.2 A direct description of the columns of
The recursion defines the family, but for the proofs it is far more convenient to know directly which columns occur. We give such a description and check that it agrees with the recursion. It is stated for , since the remaining rows of order two are added by the duplication (5). Recall that an element of is a unit if and only if it is odd.
Definition 2.2. Let . We say that is primitive if at least one of its entries is odd, or equivalently if its entries do not all lie in the ideal . If is primitive and is the position of its first odd entry, we say that is normalized primitive when .
Normalization selects exactly one vector from each orbit under multiplication by a unit: if the first odd entry of is , then is normalized primitive, and this representative is unique because forces . For instance is primitive but not normalized; its first odd entry is 3 and, since in , its normalized representative is . The six normalized primitive vectors of are , , , , and . Note that normalization fixes the entry at the position only: neither the even entries before nor the entries after are forced to vanish.
Proposition 2.3. Let and . Delete from every column of its first entry, which is 1, 2 or 4 according to whether the additive coordinate lies in the , the or the part. Then, the sets of the remaining truncated columns are the following.
(i) The part consists of every vector of , each one occurring exactly once.
(ii) The part consists of every normalized primitive vector of , each one occurring exactly once.
(iii) The part consists of every vector , where is normalized primitive in and is arbitrary, each one occurring exactly once.
For , the matrix is obtained from by applying the duplication (5) exactly times.
Proof. For , the three assertions follow directly from (2): the part is , the part is , which is the unique normalized primitive vector of , and the part is , which is the unique normalized primitive vector of .
Suppose that the description holds for and that a new row of order 8 is added by (3). In the part, every old truncated column occurs twice, once with new entry 0 and once with new entry 1, so all the vectors of occur exactly once. In the part, the four repetitions of carry the new entries , so every old normalized primitive vector is extended by all four possible new entries; these are precisely the normalized primitive vectors of whose first odd entry occurs among the first positions. The extra block contributes the columns whose first entries lie in and whose new entry is 1, that is, precisely those whose first odd entry occurs in the new position. Hence, every normalized primitive vector of occurs exactly once, and no other primitive vector occurs. The same argument applies verbatim to the part, with repeated eight times with new entries and with the extra block , whose entries in the first positions lie in and whose new entry is 1.
Suppose now that the description holds for and that a new row of order 4 is added by (4). In the and the parts, the argument is unchanged. In the part, a row of order 4 can only have entries of order at most 4, that is, entries in , and the four repetitions of carry exactly the new entries ; so those columns are extended by all the values with , which is item (iii). The two inductions, on and then on , prove the three assertions. The last statement of the proposition is Construction (5) itself.
The type of the codes now follows by counting the coordinates of each kind.
Proposition 2.4 ([32]). Let , and , and let the type of be . Then, , , and . In particular, , and , the binary length of is with
and .
We illustrate Proposition 2.3 on the smallest nonlinear member of the family, which will be used repeatedly.
Example 2.5. Consider the matrix , given in (7). Delete the first entry of every column. In the part, the four truncated columns are , , , , that is, all of ; in the part the six truncated columns are , , , , , , exactly the six normalized primitive vectors of listed above; and in the part the four truncated columns are with , since (1) is the only normalized primitive vector of . This is what items (i), (ii) and (iii) assert. The type is , the binary length is , in accordance with , and .
2.3 Linearity and kernel of
We finally recall the following three results of [32] and [33].
Theorem 2.6 ([32]). Let , and be integers. Then, the -additive code generated by is a -additive Hadamard code; that is, is a binary Hadamard code of length with .
Theorem 2.7 ([33]). Let , and be integers.
(i) The code is linear if and only if ; equivalently, the linear members of the family are exactly the codes with .
(ii) Assume that is nonlinear and let be the subcode of consisting of all its elements of order at most two. Then, and .
(iii) If are the rows of , in any order, and , then is a basis of .
3 The rank of
In this section, we determine the rank of every code of the family. The rank of the -linear and of the -linear Hadamard codes was computed in [23, 24], and the rank of the -linear Hadamard codes in [29]; no such formula was available for the mixed alphabet , and the values used in [33] were obtained type by type with MAGMA [34]. Here, we obtain a closed formula valid for all , and .
Subsection 3.1 fixes the vocabulary of rows, coordinates, and digits and turns the rank into the dimension of a space of Boolean functions. This reduction, recorded in (13), is the basis of the whole section. The distinction between rows and coordinates is essential throughout: the coefficients multiply generator rows, whereas the parameters describe coordinates. The computation itself has four steps. We first determine the space spanned by the coordinate functions coming from the coordinates in the and parts. We then expand the three binary digits of a general coordinate in the part and show that the bottom two already lie in . Thus only the top digit can increase the rank, and we reduce this digit modulo to the short expression of Lemma 3.8. We then determine the dimension of the span of the reduced functions. Finally, the duplication (5) carries the result from to an arbitrary .
3.1 Generator rows, additive coordinates and binary coordinates
Five objects occur in the computations below, and confusing any two of them would make the arguments impossible to follow: generator rows, additive coordinates, message coefficients, binary message digits and binary coordinates. We fix their names here and use no others.
Let be a generator matrix of a -additive code of type , where , and correspond to the , , and -coordinate positions, respectively. The rows of are the generator rows, and the coordinate positions of are its additive coordinates. An additive coordinate lies in the part, in the part, or in the part according to whether the corresponding column of belongs to , , or . That column lists the values taken at that coordinate by the generator rows, and we identify an additive coordinate with its corresponding column whenever we refer to its entries.
Let , and denote the generator rows of of orders 8, 4, and 2, respectively. Then every additive codeword can be written uniquely as
(9) where , , and . The tuple is called the message of the codeword , and its entries are the message coefficients. A message coefficient tells how many times the corresponding generator row is added to itself. The set of all messages is , so and (9) defines a bijection .
For the rank computation, we replace each message coefficient by its binary digits, writing
with . From that point on, we regard the (), the (), and the () as independent variables over ; they are called the binary message digits, or simply the message digits. Thus, a message digit is one binary digit of one message coefficient, and is its own single digit. The same convention applies to every ring element occurring below. For , we always write with . We call the bottom digit and the top digit of and, when , we call the middle digit. The digits are extracted inside but are treated as elements of afterwards, since by (1) the Gray image is obtained from them by linear algebra over , and the rank is the dimension of a -span.
A position of is called a binary coordinate. The two kinds of position are always distinguished in the same way: an additive coordinate is named together with its part, as in “a coordinate in the part”, whereas “binary coordinate”, or simply “coordinate”, always means a position of the binary code.
We isolate next the consequence of (1) that will be used repeatedly below: at a given additive coordinate, the binary coordinate functions produced by the Gray map span exactly the same space as the binary digits of that coordinate. In our applications, however, the value at such a coordinate is not a fixed element of , since it varies with the message. We therefore write this value as , where runs over a finite parameter set , and apply to for each . As varies, each binary coordinate of the resulting Gray image defines a function on .
Lemma 3.1. Let , let be a finite set, and let be any map. For , let be the th binary digit of , that is, in for every . Let be defined by
for every . Then, the functions and span the same -subspace of the space of all maps .
Proof. Fix and apply (1) to . If the th column of is , then the th coordinate of is . Since this equality holds for every , we obtain the equality of functions
Hence, every belongs to the span of . Conversely, the zero column of gives the function . For each , the column equal to the th standard basis vector gives , and hence also belongs to the span of the functions . Therefore, the two families of functions span the same -subspace. When , we simply have .
Example 3.2. For , the columns of are , , , and . Hence, (11) gives , , , and . Thus, the four binary coordinate functions span the same space as .
We now introduce the matrix that turns the rank into a question about functions. For a message , let be the additive codeword given by (9). Fix any ordering of , and let be the binary matrix whose th row is . Thus, the rows of are all the codewords of . We call the binary evaluation matrix of .
For a binary coordinate , the th column of is the vector of values of the map given by , which we call the binary coordinate function of that position. Since digit extraction identifies , as a set, with , each is a Boolean function of the message digits, nonlinear in general. These nonlinear terms are the source of the additional rank computed below.
We now describe explicitly the binary coordinate functions for the code . Put , and consider an additive coordinate whose corresponding column has entries , listed in the same order as the generator rows. Writing a message as , the codeword takes at this coordinate the ring element , computed in , or according to the part in which the coordinate lies. Its binary digits are Boolean functions of the message digits. By (1), the one, two or four binary coordinate functions produced by the Gray map are -linear combinations of these digit functions, and by Lemma 3.1, they span the same space as those digits. Briefly, a binary coordinate selects the corresponding coordinate function, whereas changing the message moves the point at which it is evaluated.
Lemma 3.3. Let be a finite set, let , fix an ordering of , and let be the set of rows of the binary matrix . Then,
Proof. The rows of are exactly the elements of , possibly with repetitions, so the row space of is and is the row rank of . Over any field, the row rank equals the column rank. The columns of are the evaluation vectors . The map
is a -linear isomorphism: it is injective because two functions taking the same value at every point of are equal, and surjective because every vector in defines a function on . Hence, the span of the and the span of their evaluation vectors have the same dimension, and the latter is the column rank of .
Applying Lemma 3.3 with , we obtain
the identity on which the rest of this section rests. It is what makes the computation feasible. In the present Hadamard case, the matrix has rows and columns, so handling it directly is impractical in general. By contrast, (13) allows us to work with the coordinate functions , each of which has a short explicit description.
We close the subsection by fixing the notation used in the rest of the section. Throughout, we work with and pass to general only at the very end. We denote by the distinguished row of order 2, by the rows of order 8 and by the rows of order 4 of . Every additive codeword is then written uniquely as
where , , and . As in (10), we write in and in and regard afterwards as independent variables over . We will constantly use the set
(15) of the bottom binary digits of the message, which has elements.
We also recall the standard vocabulary of Boolean functions. If are independent binary variables, then every function has a unique expression , with ; this is its algebraic normal form. It is square-free because over , and the empty product is the constant function 1. The coefficients are recovered by , where is the indicator vector of , so the expression is indeed unique and, in particular, distinct square-free monomials are linearly independent as Boolean functions. This last fact justifies every dimension count below. For a list of binary variables and for , we write for its th elementary symmetric Boolean polynomial. Thus, and . When the list is indexed by a subset , we abbreviate , and similarly for and .
3.2 The space coming from the and the parts
We start with the coordinates over the two smaller alphabets. Each of them carries one or two binary coordinates, and the corresponding coordinate functions span a space consisting of the linear functions of the two lowest layers of message digits together with the products of two distinct elements of L; those products are the classical carries produced when two bottom digits are added.
Lemma 3.4. Let denote the -span of the binary coordinate functions of coming from the coordinates in the part or in the part. Then, has basis
where each product uv is listed once. Consequently,
Proof. By item (i) of Proposition 2.3, a column in the part of has the form , where and are arbitrary. Since and (mod 2), its binary coordinate function is . Choosing gives . Taking and to have exactly one nonzero entry gives , for each , while taking and to have exactly one nonzero entry gives , for each . Adding then gives each and each . Hence, the coordinates in the part span exactly the space with basis and .
Now, let be the column of a coordinate in the part, where is normalized primitive in by item (ii) of Proposition 2.3. Write the binary expansions and in . The entry of the additive codeword (14) at this coordinate is
Since and , the bottom digit of (18) is
and, adding the bits and and taking into account that the carry produced by that addition is the second elementary symmetric function of those bits, the top digit is
By Lemma 3.1, the two binary coordinates it produces span the same space as and .
Put , , and , and let . Then, (19) and (20) read
and the vector is primitive exactly when . Both and clearly belong to the space spanned by (16), and so do the functions obtained from the coordinates in the part; hence is contained in that space.
Conversely, all the functions in (16) occur. The elements , and were already obtained from the coordinates in the part. Choosing the coordinate whose column is normalized primitive with , and all higher digits equal to zero gives , hence ; note that normalization only forces , which is what we have chosen. Symmetrically, , gives , hence . Choosing the next two nonzero positions, say and , gives , and therefore ; and, in the same way, , gives , and , gives . Therefore, every product of two distinct elements of belongs to .
Finally, all the functions listed in (16) are distinct square-free monomials in the independent variables , hence linearly independent, so they form a basis. Counting them gives (17).
3.3 The three binary digits of a coordinate in the part
By item (iii) of Proposition 2.3, a coordinate in the part of has column
where is normalized primitive in and is arbitrary. We write the binary expansions
The entry of the additive codeword at a coordinate with column is
We compute its three binary digits in two steps. The first lemma expands one product; it is where the first genuinely nonlinear carry appears.
Lemma 3.5. With the notation (10) and (22), the bottom, middle and top binary digits of modulo 8 are, respectively,
and the middle and top binary digits of modulo 8 are
Proof. Expanding the product as an ordinary integer and deleting the multiples of 8 gives , where each of the six displayed products of digits is a bit and the sums are integer sums. The bottom digit is the bit , which gives . The two bits and occurring at the level of 2 add up to an integer in , whose lowest bit is in and whose carry is ; this proves the formula for and shows that the carry is added at the level of 4. At that level, the three bits , , and the carry are added, and only the parity of the result matters modulo 8; this gives .
For the second statement, by the same computation with one digit less, and multiplying by 2 shifts these two digits to the levels of 2 and 4 of a symbol modulo 8.
The second lemma is the rule that governs the carries of an arbitrary sum of bits. It is classical, and we include the short proof for completeness.
Lemma 3.6. Let and let be their ordinary integer sum. Then, for every , the th binary digit of equals . In particular, the bottom digit, the carry to the next digit and the direct carry to the third digit are , , and , respectively.
Proof. Fix an assignment of the . Then, is the Hamming weight of . On this assignment exactly of the products occurring in equal 1, so . Writing and applying Lucas' theorem modulo 2, and using the fact that has a single nonzero binary digit, we get . As is the th binary digit of and the assignment was arbitrary, the two Boolean functions coincide.
Lemma 3.7. Fix a coordinate in the part of , with column (21), and let () and () be the Boolean functions (24) and (25) attached to it by Lemma 3.5. Then, the bottom, the middle and the top binary digits of the entry (23) are, respectively,
Moreover, and . The space spanned by all the binary coordinate functions of is therefore
and hence .
Proof. By Lemma 3.5, the symbol (23) equals modulo 8, where , and are integer sums of bits. By Lemma 3.6, the binary digits of are , and , those of are and , and the bottom digit of is read in .
The bottom digit of the symbol is therefore , which is (26). At the level of 2, the digits of and of are added, so the middle digit is , which is (27), and the carry produced by that addition is . At the level of 4, we add the digit of , the digit of , the digit of and the carry , and only the parity matters modulo 8; this is (28).
Next, is a linear combination of the , hence lies in , and is a linear combination of the functions and , all of which belong to the basis (16) of .
For the last assertion, recall from Lemma 3.1 that the four binary coordinates produced by a coordinate with column (21) span the same space of Boolean functions as its three digits ,
and . Adding these spans over all the coordinates in the part, and adding the space produced by those in the and the parts, we conclude that all the binary coordinate functions of span with as in (29), because and lie in and the coordinates in the part therefore contribute nothing beyond except the functions . By (13), this gives .
3.4 The reduced top digit
The expression (28) looks complicated, but almost all of it disappears modulo . The next lemma performs that reduction and is the technical heart of the section. It shows that, modulo , the top digit depends on the coordinate through two data only, namely the set of positions where is odd and one linear form in the variables of . For a subset and a subset , we write
(30)
the last three sums being taken over all the subsets of S of size 2, 2 and 4, respectively.
Lemma 3.8. Let be the column of a coordinate in the part of , let and , and let the digits of and be as in (22). Put and . Then, , , and, modulo ,
where
Conversely, for every nonempty and every linear form in the variables of , there is a coordinate in the part of realising the pair .
Proof. Since is primitive, ; and since is normalized, its first odd entry satisfies , that is and , and therefore . All the remaining digits with and all the digits are free, because item (iii) of Proposition 2.3 imposes no further condition. The entries with are even, which is exactly the condition for , and their higher digits are free. Consequently, as the coordinate varies, the pair runs over all the pairs with and , so runs over all the linear forms in the variables of . This proves the last assertion, and it only remains to establish (31).
We reduce the five summands of (28) one by one, using the basis (16) of and writing and . Note first that vanishes unless , so and ; and that and , so .
The term belongs to . Next, by (24),
because and lie in , whereas does not, since is not an element of . Similarly, by (25), .
We now expand . First,
whose last sum lies in , being a combination of products of two distinct elements of , while its middle sum equals because exactly for and exactly for . Second,
again because . Third, . Adding the three contributions,
Combining this with the term obtained above and observing that , we get
Finally, and . Adding everything and writing , we obtain , which is (31).
Formula (31) is affine in , which is what makes the dimension count of the next subsection short: for each fixed , we only have to add the single function , obtained for , and the products with ranging over the variables of .
Example 3.9. Let . Then is forced, , , , , and . Moreover, , so is a linear form in the only, and (31) becomes . Hence, modulo , the top digits span , a space of dimension .
3.5 The additional carry space
We now compute the dimension of , where W is as in (29). By Lemma 3.8 and the fact that (31) is affine in , we have
where the bars denote images in the quotient by and
(34)
Indeed, for a fixed , the set of functions , with running over all the linear forms in , spans , because the map is -linear in and is allowed.
We compute the two pieces separately and then show that they meet only in . Throughout, “modulo ” means that the monomials occurring in (16), namely , the variables , , , , and the products of two distinct elements of , are deleted.
Lemma 3.10. The space has as a basis the set of monomials
(35)
and therefore
Proof. Write and set for . There are two kinds of generators.
Assume first that . Then
and no reduction modulo is needed, because all the displayed monomials have degree at least two and involve the variable together with a variable or with two distinct variables , and none of these monomials occurs in (16). Taking in (37) gives , and then taking and subtracting and gives . Conversely, every is by (37) a sum of monomials of these two shapes. Note that the constraint never restricts the choice of .
Assume now that with . Then, , and . If , the pairs containing contribute the products with , which are products of two distinct elements of and therefore lie in ; the pairs not containing contribute monomials with three distinct indices. If , all the pairs contribute monomials with three distinct indices. Hence, in both cases,
Every monomial occurring in (38) is of the form with , or of the form with and , which forces , or of the form with three distinct indices. All of them are listed in (35).
It remains to show that all the monomials of (35) occur. Taking with in (38), the second sum is empty and we obtain ; here the constraint is exactly , so all such monomials are obtained. Taking and , which automatically satisfies , the first sum reduces modulo the monomials already obtained and leaves ; every three-element subset is reached by choosing and . Finally, taking with and , which is legitimate because , formula (38) gives , and deleting and the monomial already obtained leaves ; every with arises in this way.
Therefore, is spanned by the monomials (35) and contains all of them. Being pairwise distinct square-free monomials, they are linearly independent and form a basis. Counting them gives , where we used .
Lemma 3.11. The space has dimension
Proof. Recall from (32) that with . If is a singleton, then , so . Since always belongs to , we obtain . The variables occur in no , so the two summands intersect trivially and . Note that none of the monomials involved lies in , since they all have degree at least two and none of them is a product of two distinct elements of .
We now compute . For a two-element subset , a three-element subset and a four-element subset of , put , , . Expanding
and separating the terms with from those with , we obtain
The functions , and are linearly independent: the monomial occurs only in , a monomial with three distinct indices occurs only in , and a product of four distinct variables occurs only in the corresponding .
Identify a subset with its indicator vector . By (40), the coefficient of , of or of in is , or , respectively. Hence, is the rank over of the matrix whose rows are indexed by the vectors of weight at least two and whose columns are indexed by the subsets with , the entry being . Each column is the evaluation vector of a distinct square-free monomial of degree 2, 3 or 4 in . Such monomials are linearly independent as functions on , and all of them vanish at every of weight at most one. So, a linear combination of them vanishing on all the vectors of weight at least two vanishes identically and is the zero combination. Hence, the columns are linearly independent, the rank is their number , and adding the dimensions contributed by the gives (39).
Proposition 3.12. Let and . Then,
Proof. By Lemma 3.10, the monomials occurring in have the shapes , , and . By the proof of Lemma 3.11, those occurring in have the shapes , , and . The two lists are disjoint, since a monomial of the first has degree two with one variable and one variable , or degree three with three variables , or contains a variable , whereas one of the second contains a variable , or has degree two with two variables , or degree three with two variables and one variable , or degree four with four variables . Consequently, and, by (33), . Adding (36) and (39), we obtain
and, since and , this equals the right-hand side of (41).
Example 3.13. Let and . Formula (41) gives . Explicitly, the basis of given by (35) is , of size , while has basis with , again of size 3. Note that does not occur: by Lemma 3.10, a monomial requires and , and can never satisfy both conditions. This is precisely why the count in (36) contains and not such monomials.
3.6 The rank formula
It only remains to add the rows of order 2. We recall the following result from [33, Theorem 10], which will also be used in Section 4.
Lemma 3.14. [33] Let , , and . Then,
Theorem 3.15. Let , and be integers. Then,
Equivalently,
and, if the binary length is , then
Proof. Assume first that . By (13) and (29), the rank of is the dimension of . By Lemma 3.4 and Proposition 3.12,
Using , , and , the right-hand side becomes
which is (43) for .
For , applying (42) exactly times gives , which is exactly the term in (43).
Expanding the binomial coefficients, , and , which proves (44). Finally, substituting from (8) into (44) and simplifying gives (45).
Example 3.16. Consider , of length , with generator matrix (7). Writing in , in and for the coefficient of the distinguished row, Lemma 3.4 gives the basis of , so ; and by Example 3.9, the top digits contribute, modulo , the two functions and . Hence, , in agreement with (43), which gives . Similarly, for of length , Lemma 3.4 gives and Example 3.13 gives a carry space of dimension 6, so , while (43) gives . Two larger values are and , of lengths and . All these values agree with the ones computed with MAGMA in [33, Tables 2–4].
The next corollary lists the values used repeatedly in Section 4. Each is obtained by substituting the displayed parameters into (43), and we omit the routine verification.
Corollary 3.17. For every value of t for which the third parameter is positive,
Remark 3.18. Formula (43) passes two immediate consistency checks. For , it gives , and, by (8), the length of this code is with ; hence , which is exactly the dimension of the binary linear Hadamard code of length , in agreement with item (i) of Theorem 2.7. This also explains why item (ii) of that theorem is stated only for the nonlinear members: in the linear case the dimension of the kernel is and not . For every nonlinear member, on the other hand, a direct comparison of (43) with shows that , as it must be for a nonlinear code.
4 Classification by the rank and the dimension of the kernel
Now that the rank is known in closed form, we can determine exactly how far the rank and the dimension of the kernel classify the -linear Hadamard codes. By item (i) of Theorem 2.7, the only linear member of length is , and linearity is an equivalence invariant, so it never has to be compared with a nonlinear one. By item (ii), a nonlinear member has , and by (8) its length is with . Hence, its length and kernel dimension determine
and conversely and . In other words, once the length and the dimension of the kernel are fixed, the whole triple is determined by the single parameter . Two nonlinear members of the family of the same length and with the same dimension of the kernel are therefore distinguished by alone, and the question is whether the rank sees .
Subsection 4.1 recalls the two comparison families with their length, rank and kernel. Subsection 4.2 introduces the reduced rank, a normalised form of the rank obtained by subtracting the part common to all Hadamard codes of the same length and kernel dimension. This reduces each comparison below into the comparison of two small polynomial expressions. It also reveals a fact that is not apparent from the original formulas: the ranks of the three families are values of one and the same polynomial. Subsections 4.3 and 4.4 then determine all the pairs inside the family that have the same length, rank, and kernel dimension, count the resulting classes and tabulate the invariants. Subsections 4.5 and 4.6 do the same against the two comparison families.
4.1 The comparison families
We recall the two constructions and the invariants that we will use. Throughout, a code with two superscripts is -linear, one with three superscripts and no bar is -linear, and one with a bar, as in , is -linear.
We begin with the -linear Hadamard codes. Deleting the coordinates in the part specialises the construction of Subsection 2.1 to the recursive construction of the -additive Hadamard codes of type with and given in [24, 35]. Indeed, both (3) and (4) become
where and up to a permutation of columns, and turns (5) into
where . Starting from
(49) and applying (47) and (48), we obtain the matrices of [24, 35]. We write for the code they generate and for its Gray image.
The same induction as in Proposition 2.3 describes the columns of : after deleting the first entry, the part consists of all the vectors of and the part of all the normalized primitive vectors of . Hence, and , so the binary length is with
By [24], is linear if and only if , and, for the nonlinear ones,
Finally, by [25], every -linear Hadamard code is equivalent to a -linear Hadamard code with and . In all the comparisons below, it therefore suffices to consider the family with and , the -linear Hadamard codes being automatically covered. To avoid ambiguity, we write the parameters of a -linear Hadamard code as whenever it is compared with a code .
We turn to the -linear Hadamard codes We recall the construction of [8], specialised to , which is the only case in which the rank of the comparison code is known. Put , and . Thus, is the ideal of whose elements have order at most . For integers and , let be the matrix whose columns are exactly all the vectors with
A row whose entries are taken from is said to have level and has order . Thus, the first rows have level 1, the next have level 2 and the last have level 3, and the first row is 1. Let be the -additive code generated by and its Gray image. By [8], is a binary Hadamard code of length with
It is linear if and only if . For a nonlinear one, that is, for or , its kernel has dimension
and its rank was determined in [29]:
Remark 4.1. The same construction produces the -linear Hadamard codes for every , whose length and kernel are known in general [8]. No formula for their rank is available for , however, so a comparison by means of the rank is simply not possible for those alphabets and we do not attempt one; it would require an invariant that does not depend on a rank formula. Here, we compare with the -linear, the -linear and the -linear Hadamard codes, which is exactly the range in which both classical invariants are computable on both sides.
4.2 The reduced rank
All the comparisons below have the same shape: two Hadamard codes of the same length and the same kernel dimension are given, and we must decide whether their ranks agree. It is therefore natural to subtract from the rank whatever depends on t and only and to compare what is left. We begin with the polynomial that carries the whole information.
Definition 4.2. For integers and , put
Comparing (56) with (43), we see at once that
The next lemma says that the same polynomial computes the ranks of the two comparison families. This is more than a curiosity: it is what makes the three comparisons below instances of one single computation.
Lemma 4.3. Let be a nonlinear -linear Hadamard code, that is, with and . Let be a -linear Hadamard code, with and . Then,
and
Proof. For (58), . This is exactly the second identity of (51). For (59), put in the expansion used in the proof of Theorem 3.15; a direct substitution gives . Moreover, , and hence
Since , the right-hand side is (55).
We can now define the reduced rank. Recall that a Hadamard code of length has codewords, and that all the codes considered here contain , so that their kernels are linear subcodes.
Definition 4.4. Let be a binary Hadamard code of length with , and put and . The reduced rank of is
Because and determine , the subtracted quantity depends only on the length and on the dimension of the kernel. The following statement, which is the only property of that we will use, therefore holds by construction.
Lemma 4.5. Let and be binary Hadamard codes of the same length with , and . Then, if and only if .
The point of the definition is that the reduced ranks of our three families are given by very small expressions. They are all built from the polynomial introduced next.
Definition 4.6. For an integer and an integer , put
Note that for every , because all the binomial coefficients occurring in (61) vanish for . Note also that, if , then
which is the form in which will usually be evaluated.
Proposition 4.7. The reduced ranks of the three families are the following.
(i) If is nonlinear and , then
(ii) If is a nonlinear -linear Hadamard code, or if is a nonlinear -linear Hadamard code with , that is, with , then
(iii) If is a nonlinear -linear Hadamard code with , and , then
Proof. Throughout, we use the identity
with . We also use the following reformulation of , valid for all : if then
To prove it, note first that . Hence, using (56), together with and , we obtain
The coefficient of m in the last line is , hence
by (62), which is (67).
Item (i). Here, and , so as in (46), and . By (57) and (67) with , , , we have
Here, , since . Hence, . Comparing with (60) gives (63).
Item (ii), first case. Here, and by (50), so and . By (58), , which is (64).
Item (ii), second case. Here, and , so by (54) and , while . Hence, and . Then, (59) with , together with , gives , which is again (64).
Item (iii). Here, because , so by (54), while by (53). Hence, , and . Put ; then , and therefore . By (59) and by (67) applied with , and ,
Now, directly from (61), and by (66). Moreover, and give . Collecting the four contributions, , and, since , the right-hand side equals , which is (65).
Item (ii) says that, as far as length, kernel dimension and rank are concerned, a nonlinear -linear Hadamard code with behaves exactly like a -linear one. Indeed, comparing the parameters computed in its two cases shows that and agree in all three. Whenever the case occurs below we therefore refer to the computation instead of repeating it.
We close the subsection by recording the first difference of , which is used both in Subsection 4.3 and in Subsection 4.6.
Lemma 4.8. For every and every ,
Proof. Using three times, together with ,
Since and , the right-hand side equals , which gives (68).
4.3 Collisions inside the family
We now determine every pair of distinct types of the same length whose codes have the same rank and the same kernel dimension. We call such a pair a collision, since it is a case in which the two classical invariants cannot decide. The following example is the smallest one.
Example 4.9. By Theorems 2.6 and 2.7, the nonlinear -linear Hadamard codes of length are , , , , , and . Their kernel dimensions are 7, 6, 5, 6, 5, 4, respectively, and, by Theorem 3.15. Note that neither the kernel dimension nor the rank alone classifies these six codes. Indeed, the pairs and have the same kernel dimension, while and also have the same rank. The pair does not classify them either, since and both have . In [33], these two codes had to be separated by a computer equivalence test.
Theorem 4.10. Let and be two nonlinear members of the family with distinct types, having the same length , the same rank and the same dimension of the kernel. Then, after interchanging them if necessary,
or
Conversely, each of the two displayed pairs does have equal length, equal rank and equal dimension of the kernel.
Proof. Let be the common dimension of the kernel and put as in (46). Then, , so and ; in particular
Moreover, : if , then because both equal , and then , so the two types would coincide. Write and , so . By Lemma 4.5 and item (i) of Proposition 4.7, the equality of the ranks means
Summing (68) for and using (70), we obtain . Multiplying by 6 and separating the term containing u gives
We first bound . For every integer , we have , so and the right-hand side of (71) is at most . On the other hand by (69), so the left-hand side is at least , and is a positive integer because . Therefore, , so , and only the ten pairs with remain.
For each of these ten pairs, (71) determines uniquely, because . Writing , we have , , and . The corresponding ten values of are
| (x,y) | (1,2) | (1,3) | (1,4) | (1,5) | (2,3) | (2,4) | (2,5) | (3,4) | (3,5) | (4,5) |
|---|---|---|---|---|---|---|---|---|---|---|
| u | 4 | 6 | 7 | 9 |
Only four of these values are integers, namely , and 9, corresponding to , , , and , respectively. The last two are excluded by the condition in (69), since and . Hence, exactly two possibilities remain: and . In the first case, , , , and . Moreover, , so and . The condition then gives . In the second case , , , and , so and . The condition gives . This proves the direct statement.
For the converse, Corollary 3.17 gives the two equalities and , while and . Moreover, all four codes have length by (8).
Example 4.11. The two collision families of Theorem 4.10 start at and respectively. Their first members are , with and length , and , with and length . Both pairs appear in [33, Tables 2–4] and both had to be separated there with MAGMA. Theorem 4.10 shows that these two families, continued for every larger , are the only obstructions inside the family: for any other pair of distinct types of the same length, the rank or the dimension of the kernel already differs.
4.4 The number of classes separated by the two invariants
We first count the admissible types, and then subtract the collisions.
Proposition 4.12. For , let be the number of triples with , , and , that is, the number of codes of length . Then,
Proof. Fix . By (8), we have , and the condition is equivalent to . Since is a nonnegative integer, it takes exactly the values , and this set is nonempty precisely when . This proves the first equality in (72).
For the closed form, write with and split the sum according to the parity of . If is even, then , and hence , where is the parity of . If is odd, then , and hence , where is the parity of . Summing the resulting two arithmetic progressions gives
A direct check shows that each of the six expressions equals . For instance, for , we obtain and , while for , we obtain and .
Corollary 4.13. For , the number of distinct values taken by the pair on the codes of length is
In particular, the pair classifies the whole family of length if and only if , in which case the number of nonequivalent codes of length is , that is, 1,1,2 and 3 for respectively.
Proof. The linear member has and every nonlinear member has , so the linear member contributes a value of of its own. Among the nonlinear members, two distinct types give the same pair exactly when they form one of the two collisions of Theorem 4.10, and each collision consists of exactly two types. The two collisions never share a type, because the first involves with and , while the second involves . Each of them therefore merges exactly two of the types into a single value of and reduces the count by one. Since the first exists precisely when and the second precisely when , the count is for , then for , and then for , which is (73).
Finally, for distinct types have distinct pairs . Since is an invariant of the equivalence class, the codes are then pairwise nonequivalent, and there are of them. The values , and follow from (72).
For , formula (72) gives , in agreement with the number of types listed in [33], while Corollary 4.13 gives distinct values of , respectively. The two counts start to differ at , which is exactly the length at which the first collision appears. Nevertheless, for , the codes of the same length were shown in [33] to be pairwise nonequivalent; in the collision cases, nonequivalence was established there by computer equivalence tests using MAGMA. Thus, the collisions reflect a failure of the pair to distinguish all the equivalence classes, rather than an equivalence between the corresponding codes.
Table 1 displays the individual codes, their invariants and the two counts for . It extends Tables 2–4 of [33], with one essential difference: the ranks now come from Theorem 3.15 instead of from a computer computation, so the table can be continued to any length without further work. The collisions are marked, and they are exactly the ones predicted by Theorem 4.10.
| Code | Code | Code | Code | Code | Code |
| (6,6) | (7,7) | (8,8) | (9,9) | (10,10) | (11,11) |
| (8,3) | (9,4) | (10,5) | (11,6) | (12,7) | (13,8) |
| (12,3) | (13,4) | (14,5) | (15,6) | (16,7) | |
| (13,4) | (14,5) | (19,5) | (20,6) | ||
| (19,4) | (15,6) | (16,7) | |||
| (20,5) | (21,6) | ||||
| (26,4) | (27,5) | ||||
| 2 | 3 | 4 | 5 | 7 | 8 |
| # 2 | # 3 | # 3 | # 4 | # 6 | # 6 |
| Code | Code | Code | Code | Code |
| (12,12) | (13,13) | (14,14) | (15,15) | (16,16) |
| (14,9) | (15,10) | (16,11) | (17,12) | (18,13) |
| (17,8) | (18,9) | (19,10) | (20,11) | (21,12) |
| (21,7) | (22,8) | (23,9) | (24,10) | (25,11) |
| (26,6) | (27,7) | (28,8) | (29,9) | (30,10) |
| (17,8) | (18,9) | (34,7) | (35,8) | (36,9) |
| (22,7) | (23,8) | (19,10) | (20,11) | (43,8) |
| (28,6) | (29,7) | (24,9) | (25,10) | (21,12) |
| (28,6) | (36,6) | (30,8) | (31,9) | (26,11) |
| (37,5) | (29,7) | (37,7) | (38,8) | (32,10) |
| (38,6) | (30,8) | (46,7) | (39,9) | |
| (49,5) | (39,7) | (31,9) | (47,8) | |
| (49,6) | (40,8) | (32,10) | ||
| (50,6) | (50,7) | (41,9) | ||
| (51,7) | (51,8) | |||
| (65,6) | (62,7) | |||
| (52,8) | ||||
| (66,7) | ||||
| (85,6) | ||||
| 10 | 12 | 14 | 16 | 19 |
| # 8 | # 10 | # 12 | # 14 | # 17 |
Table 1: Rank and dimension of the kernel of the -linear Hadamard codes of length , for . The unique linear code of each length is marked with an asterisk. The codes marked with form the collision pairs of Theorem 4.10, that is, the pairs having the same rank and the same kernel dimension. The last two rows give the number of types and the number of distinct values of for each .
4.5 Comparison with the -linear and the -linear Hadamard codes
We now compare the family with the two smaller classical families. By [25], it suffices to treat the -linear Hadamard codes with and , as explained in Subsection 4.1. The first lemma determines the parameters of the only possible partner.
Lemma 4.14. Let be nonlinear and let be a nonlinear -linear Hadamard code with the same length and the same dimension of the kernel. Then,
and such a code exists if and only if .
Proof. Equality of the lengths and of the kernel dimensions gives, by (8), (50) and (51), and . Subtracting the second identity from the first one gives , and then . A -linear Hadamard code with has , which is the condition ; and it is nonlinear because , with only when , which is excluded since is nonlinear. Conversely, if , the parameters (74) are admissible and define such a code.
Theorem 4.15. Let be nonlinear and let be a -linear or a -linear Hadamard code of the same length. If and have the same rank and the same dimension of the kernel, then and is permutation equivalent to , where is the common length; in particular . Conversely, for every , the two codes
have the same length , the same dimension of the kernel t-4 and the same rank .
Proof. Every -linear Hadamard code is equivalent to a -linear one with and by [25]. The rank and the dimension of the kernel are invariants of the equivalence class, so we may assume that with and . If is linear, it cannot have the same rank and kernel dimension as the nonlinear code , because a code is linear exactly when its rank equals its kernel dimension; so is nonlinear. By Lemma 4.14, and are given by (74).
By Lemma 4.5 and items (i) and (ii) of Proposition 4.7, the two ranks agree if and only if with , that is, by (62), if and only if
The three summands of (75) are nonnegative integers, so exactly one of them equals 1 and the other two vanish. The first summand is even, so it cannot be 1; hence , which forces , and then automatically. Consequently, (75) reduces to , which forces and , that is, and . So . By (8), the length relation reads , so . By (74), we get and . The condition gives . This proves the direct statement.
For the converse, Corollary 3.17 gives , while by (51), we have . Their kernel dimensions are and , respectively, and both codes have length by (8) and (50).
Example 4.16. The smallest instance of Theorem 4.15 occurs at : the codes and , both of length , have . For every other nonlinear type the two classical invariants already separate from all the -linear and -linear Hadamard codes of the same length. As an illustration, consider . In this case, the criterion (75) reads and hence cannot be satisfied. Indeed, by (63), the reduced rank of is , whereas the corresponding reduced rank of a -linear Hadamard code is 1. Concretely, is always exactly one less than the rank of the -linear Hadamard code with the same length and the same kernel dimension. In particular, they cannot have the same pair .
4.6 Comparison with the -linear Hadamard codes
This comparison is the longest, because the rank formulas for both families now involve quartic terms. However, the reduced rank reduces the comparison to a single Diophantine equation, which we then solve completely. We first fix the parameters of the possible partner.
Lemma 4.17. Let be nonlinear and let be a nonlinear -linear Hadamard code with the same length and the same dimension of the kernel.
(i) If , then
(ii) If a = 1, then and
Proof. For item (i), gives by (54), so (53) and (54) read and . Subtracting the second identity from the first one gives , that is the first half of (76), and substituting it back into the second identity gives .
For item (ii), a nonlinear -linear Hadamard code with has , because the linear ones are exactly those with . Hence, by (54), and the two identities read and . Subtracting gives and then .
The case a = 1 needs no new work.
Proposition 4.18. Let be nonlinear and let be a nonlinear -linear Hadamard code with the same length and the same dimension of the kernel. Then, the two ranks agree if and only if , and in that case b = 5 and c = t - 12, where is the common length; in particular .
Proof. By item (ii) of Proposition 4.7, the reduced rank of equals 1, and so does the reduced rank of every nonlinear -linear Hadamard code. Hence, by Lemma 4.5, the criterion is again (75), and the argument of the proof of Theorem 4.15 gives . Then (77) gives and ; and, since as computed there, . The condition gives .
We now treat the main case . The following lemma reduces everything to one equation between two nonnegative integer parameters.
Lemma 4.19. Let be nonlinear, let be a nonlinear -linear Hadamard code with having the same length and the same dimension of the kernel, and put
Then, , , , , and the two ranks agree if and only if
where
Proof. By item (i) of Lemma 4.17, we have , which is the value in (78), and because is a parameter of an existing code; also . Put ; then by (78). By Lemma 4.5 and items (i) and (iii) of Proposition 4.7, the two ranks agree if and only if . By (61), we have and , so ; and . Using (62), on the left-hand side, the criterion becomes
Now by (80), so the right-hand side of (81) equals . Substituting , we get . Moving the two terms containing to the left and the two quartic terms to the right gives exactly (79).
Equation (79) has a very rigid structure, which we now exploit. Note that
is at most when , equal to 1 when , and at least when . Its sign is therefore governed by the comparison of with : it is positive for and negative for , the only exception being , where forces and makes it vanish. The next two lemmas dispose of all the cases with and of all the cases with .
Lemma 4.20. In the situation of Lemma 4.19, suppose that . Then, (79) holds if and only if and m = 1.
Proof. By (82), we have for every , since . As , the left-hand side of (79) is therefore nonnegative, and it is zero exactly when m = 0. It thus suffices to compute the sign of for .
First, evaluating (80) at n = p and using 2p - 1 - 2p = -1, we have
Hence, , while for every .
Second, for we have, again from (80),
because and . Therefore, is strictly decreasing on the integers .
Consequently, if then for every , so (79) would force its left-hand side to be negative, which is impossible. If , then and for , so only survives. For we have , and the left-hand side of (79) is and the right-hand side is . Hence, .
Lemma 4.21. In the situation of Lemma 4.19, suppose that . Then .
Proof. Since , we have and, by (82), . Because , the left-hand side of (79) is therefore at most 0, and, more precisely,
(83) where we used , which is exactly the condition in (78), and . Substituting (80) into (83) and cancelling the common term on both sides, the inequality (83) becomes , that is,
where we recognised from (61).
We now show that (84) fails when . Assume . By Lemma 4.8 with , , and the quadratic is positive for every integer , because its minimum over the integers is attained at and at , where its value is . Hence, is nondecreasing on the nonnegative integers, so because . It therefore suffices to prove that . Using and , and , we get
For , we have , so , contradicting (84). Hence .
Proposition 4.22. Let be nonlinear and let be a nonlinear -linear Hadamard code of the same length , with the same rank and the same dimension of the kernel. Then the pair is one of the following five, and each of the five does have equal length, equal rank and equal dimension of the kernel:
Proof. The case is Proposition 4.18 and produces exactly the second line of (85). Assume therefore and adopt the notation (78); we must find all the solutions of (79) with , , and .
By Lemma 4.20, the only solution with is . By Lemma 4.21, every solution with has ; and in that case . It remains to examine the finitely many pairs with . For each of them, (82) gives , so (79) determines uniquely, namely , and the pair contributes a solution exactly when this quotient is a nonnegative integer satisfying . Table 2 lists, for each such pair, the numbers and and their quotient. The quotient is a nonnegative integer in exactly three of them, namely , and , with , and respectively, and in all three cases equals 0, 3 and 2, which are nonnegative as required.
We have therefore found exactly four solutions with , namely equal to , , and . Translating them back through (78) and Lemma 4.17 gives equal to , , and , respectively. In each case, the length relation (8) gives and then (76) gives c:
where the lower bound on is the condition , which in each case also guarantees . These are the first, third, fourth and fifth lines of (85).
Finally, the displayed values of follow by substituting the parameters into (43) and into item (ii) of Theorem 2.7; for instance and . Since the two codes of each line have the same length and the same dimension of the kernel by construction, and the same reduced rank by the criterion just solved, they have the same rank.
Table 2: The search of the proof of Proposition 4.22 over the pairs . Each cell displays the fraction and its value, the only candidate for ; it gives a solution of (79) only when it is a nonnegative integer, and the three cells where this happens are printed in bold. In the single cell of the row the denominator is 0 and the numerator is , so there (79) has no solution at all.
| p | n = 1 | n = 2 | n = 3 | n = 4 | n = 5 | n = 6 | ||
|---|---|---|---|---|---|---|---|---|
| 2 | 0 | -1 | ||||||
| 3 | 2 | 0 | ||||||
| 4 | 5 | 6 | ||||||
| 5 | 9 | 21 | ||||||
| 6 | 14 | 50 | ||||||
| 7 | 20 | 99 |
Remark 4.23. The entries of Table 2 follow at once from (80). For and , say, and , so and , giving the candidate and , which is the last line of (85). Of the five families, only the first was previously observed: the pair , was identified for in [33], where its members had to be separated with MAGMA at each individual length. The other four are new, and the last three are invisible below , and , which is why the computations available so far could not detect them.
The three comparisons together say precisely where a new idea is needed. Inside the family, two infinite sequences of pairs remain unseparated by the rank and the dimension of the kernel. Against the classical families, one such sequence remains for the -linear codes and five for the -linear codes. Moreover, for the alphabets with no comparison by the rank is possible at all, since no rank formula is known there. Separating these pairs, and reaching those alphabets, requires an invariant finer than the two classical ones.
5 Conclusions and further research
We have determined, in Theorem 3.15, the rank of the -linear Hadamard codes constructed recursively in [32], whose linearity and kernel were obtained in [33]. The computation splits into two transparent parts. The coordinate functions attached to the coordinates in the and the parts span the space of Lemma 3.4, which consists of the linear functions of the two lowest layers of message digits together with the quadratic carries, while the top binary digit of a coordinate in the part contributes the further carry space of Proposition 3.12. The technical key is Lemma 3.8: modulo , the top digit depends on the coordinate only through the set of positions where the corresponding column has odd entries, and through one linear form in the lowest digits of the message. Every value produced by the formula agrees with the values computed with MAGMA in [33, Tables 2–4].
We have then used the formula, together with the dimension of the kernel, to classify the family as far as these two invariants allow. Inside the family, the only pairs of distinct types of the same length sharing both invariants are the two pairs of Theorem 4.10. Hence, the number of distinct pairs is the one given in Corollary 4.13. For comparison with the previously studied -linear and -linear Hadamard families, the coincidences are the single family of Theorem 4.15 and the five families of Proposition 4.22. All of these comparisons rest on the reduced rank of Definition 4.4, which subtracts from the rank the part determined by the length and the kernel dimension, and thereby reduces each comparison to a short Diophantine problem. Along the way, we observed in Lemma 4.3 that the ranks of the -linear, -linear, and -linear Hadamard codes are values of the same polynomial , evaluated at , , and , respectively. This uniformity is also of independent interest and is what makes the three comparisons instances of a single computation.
Two remarks on the scope of these results are in order. First, the triple does not determine, up to equivalence, every -additive Hadamard code of that abstract type. Indeed, a generator matrix of type whose Gray image has rank 13, rather than the value 12 of , is exhibited in [32, Example 2.4]. All our statements therefore concern the recursively constructed family, together with the constructions already proved in [32] to give permutation equivalent codes. Second, as explained in Remark 4.1, the comparison with the -linear Hadamard codes has been carried out only for , because no rank formula is available for .
Several questions remain. The most immediate one is raised by the paper itself. The pairs left unseparated by Theorems 4.10 and 4.15 and by Proposition 4.22 are not pairs of equivalent codes: for , they were separated in [33] by computer equivalence tests. A complete classification at every length therefore requires an invariant finer than the rank and the dimension of the kernel, preferably one that can also be evaluated without a rank formula, so as to extend the comparison to the alphabets with .
The rank of is known only for [23, 24, 29], and in both cases it is a value of the single polynomial of Definition 4.2. For , this is (59), which reads . For a -linear Hadamard code has the same length and the same dimension of the kernel as the -linear code , and is equivalent to it by [25], so (58) gives . In both cases the first parameter enters shifted by one, and the degree in is . It would be interesting to know whether the rank for is again a value of a polynomial of the same general form. Next, the five families of (85) were obtained by solving (79). Although that solution is complete, the five coincidences arise from the algebraic form of the equation rather than from a structural explanation, and an explicit reason why and must have the same rank, would be more satisfactory. It would also be natural to extend the computation of Section 3 to -linear Hadamard codes with all the nonzero, or to -linear generalised Hadamard codes with prime, in the spirit of [26, 30, 31]; the method is not tied to three alphabets, and what has to be redone in general is the reduction of the top digit, which is where the combinatorics of the carries enters. Finally, the case , that is, the existence of -additive Hadamard codes, is still open, whereas the case cannot occur, as observed in [33].
References
[1] A. R. Hammons, P. V. Kumar, A. R. Calderbank, N. J. Sloane, P. Solé, The -linearity of Kerdock, Preparata, Goethals, and related codes, IEEE Transactions on Information Theory 40 (2) (1994) 301–319.
[2] C. Carlet, -linear codes, IEEE Transactions on Information Theory 44 (4) (1998) 1543–1547.
[3] J. Borges, C. Fernández-Córdoba, J. Rifà, Every -code is a binary propelinear code, Electronic Notes in Discrete Mathematics 10 (2001) 100–102.
[4] S. T. Dougherty, C. Fernández-Córdoba, Codes over , Gray map and self-dual codes, Advances in Mathematics of Communications 5 (4) (2011) 571–588.
[5] T. Honold, A. A. Nechaev, Weighted modules and representations of codes, Probl. Inf. Transm. 35 (3) (1999) 205–223.
[6] D. S. Krotov, On -dual binary codes, IEEE Transactions on Information Theory 53 (4) (2007) 1532–1537.
[7] M. Shi, R. Wu, D. S. Krotov, On -additive codes and their duality, IEEE Transactions on Information Theory 65 (6) (2019) 3841–3847.
[8] C. Fernández-Córdoba, C. Vela, M. Villanueva, On -linear Hadamard codes: kernel and partial classification, Designs, Codes and Cryptography 87 (2-3) (2019) 417–435.
[9] J. Borges, C. Fernández-Córdoba, J. Pujol, J. Rifà, M. Villanueva, -linear codes: generator matrices and duality, Designs, Codes and Cryptography 54 (2) (2010) 167–179.
[10] J. Borges, C. Fernández-Córdoba, J. Pujol, J. Rifà, M. Villanueva, -Linear Codes, Springer, 2022.
[11] E. F. Assmus, J. D. Key, Designs and Their Codes, Cambridge University Press, 1994.
[12] F. J. MacWilliams, N. J. A. Sloane, The Theory of Error-correcting Codes, Elsevier, 1977.
[13] M. Shi, T. Honold, P. Solé, Y. Qiu, R. Wu, Z. Sepasdar, The geometry of two-weight codes over , IEEE Transactions on Information Theory 67 (12) (2021) 7769–7781.
[14] M. Shi, Z. Sepasdar, A. Alahmadi, P. Solé, On two-weight -codes, Designs, Codes and Cryptography 86 (6) (2018) 1201–1209.
[15] I. F. Blake, Codes over integer residue rings, Information and Control 29 (4) (1975) 295–300.
[16] P. Shankar, On BCH codes over arbitrary integer rings, IEEE Transactions on Information Theory 25 (4) (1979) 480–483.
[17] K. J. Horadam, Hadamard matrices and their applications, Princeton University Press (2007).
[18] E. D. J. Smith, R. J. Blaikie, T. D. P., Performance enhancement of spectral-amplitude coding optical cdma using pulse-position modulation, IEEE Transactions on Communications 46 (1998) 1176–1185.
[19] J. F. Huang, C. C. Yang, S. P. Tseng, Complementary Walsh-Hadamard coded optical CDMA coder/decoders structured over arrayed-waveguide grating routers, Opt. Commun. 229 (2004) 241–248.
[20] K. Nyberg, Perfect nonlinear S-boxes, EUROCRYPT-91 LNCS 547 (1991) 378–385.
[21] G. J. Yu, C. S. Lu, H. Y. Liao, A message-based cocktail watermarking system, Pattern Recognition 36 (2003) 957–968.
[22] H. Bauer, B. Ganter, F. Hergert, Algebraic techniques for nonlinear codes, Combinatorica 3 (1) (1983) 21–33.
[23] D. S. Krotov, -linear Hadamard and extended perfect codes, Electronic Notes in Discrete Mathematics 6 (2001) 107–112.
[24] K. T. Phelps, J. Rifà, M. Villanueva, On the additive ( -linear and non- -linear) Hadamard codes: rank and kernel, IEEE Transactions on Information Theory 52 (1) (2006) 316–319.
[25] D. S. Krotov, M. Villanueva, Classification of the -linear Hadamard codes and their automorphism groups, IEEE Transactions on Information Theory 61 (2) (2015) 887–894.
[26] D. K. Bhunia, C. Fernández-Córdoba, M. Villanueva, On the linearity and classification of -linear generalized Hadamard codes, Designs, Codes and Cryptography 90 (2022) 1037–1058.
[27] C. Fernández-Córdoba, C. Vela, M. Villanueva, Equivalences among -linear Hadamard codes, Discrete Mathematics 343 (3) (2020) 111721.
[28] D. K. Bhunia, C. Fernández-Córdoba, C. Vela, M. Villanueva, On the equivalence of -linear generalized Hadamard codes, Designs, Codes and Cryptography 92 (2024) 999–1022.
[29] C. Fernández-Córdoba, C. Vela, M. Villanueva, On -linear Hadamard codes: rank and classification, IEEE Transactions on Information Theory 66 (2) (2019) 970–982.
[30] D. K. Bhunia, C. Fernández-Córdoba, M. Villanueva, On the constructions of -linear generalized Hadamard codes, Finite Fields and Their Applications 83 (2022) 102093.
[31] D. K. Bhunia, C. Fernández-Córdoba, M. Villanueva, Linearity and classification of -linear generalized Hadamard codes, Finite Fields and Their Applications 86 (2023) 102140.
[32] D. K. Bhunia, C. Fernández-Córdoba, M. Villanueva, On recursive constructions of -linear Hadamard codes, Advances in Mathematics of Communications 18 (2) (2024) 455–479.
[33] D. K. Bhunia, C. Fernández-Córdoba, M. Villanueva, Linearity and classification of -linear Hadamard codes, Designs, Codes and Cryptography 93 (2025) 4567–4594.
[34] W. Bosma, J. J. Cannon, C. Fieker, A. Steel, Handbook of Magma functions, Edition 2.25 (2020).
URL http://magma.maths.usyd.edu.au/magma/
[35] J. Rifà, F. I. Solov'eva, M. Villanueva, On the intersection of -additive perfect codes, IEEE transactions on information theory 54 (3) (2008) 1346–1356.