ISSN 2148-838X J. Algebra Comb. Discrete Appl. 10(2) • 87–96 Received: 16 March 2021 Accepted: 31 October 2022 Journal of Algebra Combinatorics Discrete Structures and Applications Lee weight distributions of trace codes over Fq + uFq from irreducible cyclic codes Research Article Gerardo Vega Abstract: The construction of two or few-weight codes from trace codes over the ring Fq + uFq, where u2 = 0, was recently presented in [4]. For such construction, the defining sets for the trace codes are given in terms of cyclotomic classes, and for some of these classes, it is shown that it is possible to obtain the Lee weight distributions of the corresponding trace codes. Motivated by this construction, and by the p-ary semiprimitive irreducible cyclic codes over a prime field Fp, the Lee weight distributions of an infinite family of p-ary three-weight codes from trace codes over the ring Fp + uFp, was recentely found in [11]. In this work, we prove that the Lee weight distribution problem for the trace codes constructed in accordance with either [4] or [11], is equivalent to the weight distribution problem for the irreducible cyclic codes. With this equivalence in mind, and by using the already known weight distributions of an infinite family of irreducible cyclic codes (semiprimitive and not semiprimitive), we follow the open problem suggested in the Conclusion of [11] to determine the Lee weight distribution of an infinite family of trace codes over the ring Fq + uFq, that includes the infinite family found in [11]. 2010 MSC: 94B15 · 11T71 Keywords: Codes over a ring, Trace codes, Semiprimitive codes and cyclotomic classes, Irreducible cyclic codes 1. Introduction Consider the ring R = Fq + uFq, with u2 = 0, and, for any positive integer m, the ring extension R = Fqm + uFqm. A trace code, CL, with defining set L = {d1,d2, · · · ,dn}⊆ R∗ is defined by CL = {(Tr(xd1),Tr(xd2), · · · ,Tr(xdn)) |x ∈ R} , (1) where R∗ is the group of units of R, and Tr is the trace function from R to R defined as Gerardo Vega; Dirección General de Cómputo y de Tecnologías de Información y Comunicación, Universidad Nacional Autónoma de México, 04510 Ciudad de México, Mexico (gerardov@unam.mx). 87 https://orcid.org/0000-0002-4957-6575 G. Vega / J. Algebra Comb. Discrete Appl. 10(2) (2023) 87–96 Tr(a + ub) = m−1∑ j=0 (aq j + ubq j ) . For any a,b ∈ Fqm. It is clear that Tr(a + ub) = TrFqm/Fq (a) + uTrFqm/Fq (b) , where “TrFqm/Fq " denotes the standard trace mapping from Fqm to Fq. Note that CL is a linear code over R of length n, that is CL is a particular kind of R-submodule of Rn. In analogy to the ring Z4, the Gray map φ from R to F2q is defined by φ(a + ub) = (b,a + b) , for all a,b ∈ Fq . This map is extended naturally into a map from Rn to F2nq . Remark 1.1. The Lee weight, wL, over Rn is defined in terms of the standard Hamming weight, wH, of the Gray image as follows wL(a + ub) = wH(b) + wH(a + b) , for all a,b ∈ Fnq . Similar to the Hamming distance, dH, the Lee distance, dL, over Rn is defined as dL(x,y) = wL(x−y) for all x,y ∈ Rn. Moreover if x = a1 + ub1 and y = a2 + ub2, then dL(x,y) = wH(b1 − b2) + wH(a1 − a2 + b1 −b2) = wH(b1 −b2,a1 −a2 + b1 −b2) = wH((b1,a1 + b1)− (b2,a2 + b2)) = dH(φ(x),φ(y)). Thus φ is a distance-preserving map or isometry from (Rn,dL) to (F2nq ,dH). We recall that the Hamming weight enumerator, HamC(z), of a linear code C of length n over a finite field is defined as the polynomial HamC(z) = ∑n j=0 Ajz j, where Aj (0 ≤ j ≤ n) denote the number of codewords with Hamming weight j in the code C. The sequence (A0 = 1,A1, · · · ,An) is called the weight distribution of the code. In a similar way for a trace code CL, defined through (1), let Aj (0 ≤ j ≤ 2n) be the number of codewords with Lee weight j in the linear code CL of length n over R, then the Lee weight enumerator of CL, LeeCL(z), is defined by LeeCL(z) = ∑2n j=0 Ajz j. Through different choices of the defining set L, and particularly when Fq is either the binary field (F2) or a prime field (Fp), several optimal or nearly optimal codes from trace codes of the form CL where recently found ([4, 5, 8, 9, 11–16]). Particularly, the construction of two or few-weight codes from trace codes over the ring Fq + uFq, was recently presented in [4]. For such construction, the defining sets for the trace codes are given in terms of cyclotomic classes, and for some of these classes, it is shown that it is possible to obtain the Lee weight distributions of the corresponding trace codes. Motivated by this construction, and by the p-ary semiprimitive irreducible cyclic codes over a prime field Fp, the Lee weight distributions of an infinite family of p-ary three-weight codes from trace codes over the ring Fp + uFp, was recently constructed in [11]. One of the purposes of this work is to show that there exists a direct identity between Lee weight enumerators of the trace codes constructed by [4], [8], [9] and [11], and the Hamming weight enumerators of the irreducible cyclic codes. In other words, we are going to prove that the Lee weight distribution problem for the trace codes constructed following [4], [8], [9] or [11], is equivalent to the standard Hamming weight distribution problem for the irreducible cyclic codes. With this equivalence in mind, we then follow the open problem suggested in the Conclusion of [11], and determine the Lee weight distribution of trace codes of the form CL in terms of other class of irreducible cyclic codes, with known or well-understood 88 G. Vega / J. Algebra Comb. Discrete Appl. 10(2) (2023) 87–96 weight distribution. For this purpose, we use the already known weight distributions of an infinite family irreducible cyclic codes (semiprimitive and not semiprimitive, [17]), to determine the Lee weight distribution of a new infinite family of trace codes of the form CL, that includes the infinite family constructed in [11]. This work is organized as follows: In Section 2, we set up some new notations and recall some definitions, particularly those related with the irreducible cyclic codes. Section 3 will show the relationship between the Lee weight distribution problem for some trace codes and the Hamming weight distribution problem for the irreducible cyclic codes. In Section 4, it is shown that all the Lee weight distributions reported in [4], [8], [9], and [11] can be obtained easily as particular instances of such relationship, which gives us a simplified view for all these Lee weight distributions. In Section 5 we use the already known weight distributions of an infinite family irreducible cyclic codes to determine the Lee weight distribution of a new infinite family of trace codes. Finally, Section 6 is devoted to conclusions. 2. Background material Let Fq be a finite field of order q, where q = pt for some prime p and for some positive integer t. A subset C of vectors or codewords in Fnq is called an [n,l] linear code over Fq if C is an l-dimensional subspace of Fnq : n is called the length and l is called the dimension of C. An M-weight code (either over a finite field or over a ring) is a code such that the cardinality of the set of nonzero weights is M. A linear code C over a finite field Fq of length n, is cyclic if (c0,c1, . . . , cn−1) ∈ C implies (cn−1,c0,c1, . . . ,cn−2) ∈ C. Cyclic codes have wide applications in storage and communication systems because, unlike encoding and decoding algorithms for linear codes, encoding/decoding algorithms for cyclic codes can be implemented easily and efficiently by employing shift registers with feedback connections ([6, p. 209]). By identifying the vector (c0,c1, . . . ,cn−1) ∈ Fnq with the polynomial c0+c1x+. . .+cn−1xn−1 ∈ Fq[x], it follows that any linear code C of length n over Fq corresponds to a subset of the residue class ring Fq[x]/〈xn−1〉. Moreover, it is well known that the linear code C is cyclic if and only if the corresponding subset is an ideal of Fq[x]/〈xn −1〉 (see for example [3, Theorem 9.36]). Now, note that every ideal of Fq[x]/〈xn − 1〉 is principal. In consequence, if C is a cyclic code of length n over Fq, then C = 〈g(x)〉, where g(x) is a monic polynomial, such that g(x) | (xn − 1). This polynomial is unique, and it is called the generator polynomial of C ([6, Theorem 1, p. 190]). On the other hand, the polynomial h(x) = (xn −1)/g(x) is referred to as the parity check polynomial of C. As usual in cyclic codes, we always assume that the length n of any cyclic code is relatively prime to q. Thus, xn −1 has no repeated factors ([6, p. 196]). A cyclic code over Fq is called irreducible (reducible) if its parity check polynomial is irreducible (reducible) over Fq. Let v and w be integers, such that gcd(v,w) = 1. Then, the smallest positive integer i, such that wi ≡ 1 (mod v), is called the multiplicative order of w modulo v, and is denoted by ordv(w). From now on, m will denote a positive integer, and by using γ we will denote a fixed primitive element of Fqm. For any integer a, the polynomial ha(x) ∈ Fq[x] will denote the minimal polynomial of γ−a ([3, Definition 1.81]). In addition, C(a) will denote the irreducible cyclic code whose parity check polynomial is ha(x). Note that C(a) is an [n,l] linear code, where n = qm−1 gcd(qm−1,a), and l = deg(ha(x)) = ordn(q) is a divisor of m. For any positive divisor e of qm − 1 and for any 0 ≤ i ≤ e− 1, we define D(e,q m) i := γ i〈γe〉, where 〈γe〉 denotes the subgroup of F∗qm generated by γe. The cosets D (e,qm) i are called the cyclotomic classes of order e in Fqm. An alternative definition for an irreducible cyclic code is as follows: Definition 2.1. [7, Definition 2.2] Let n be a positive divisor of qm−1, write e = (qm−1)/n, and let ω 89 G. Vega / J. Algebra Comb. Discrete Appl. 10(2) (2023) 87–96 be a primitive n-th root of unity in Fqm. Then, an irreducible cyclic code of length n over Fq, is the set {(TrFqm/Fq (yω i))n−1i=0 |y ∈ Fqm} . Remark 2.2. Note that, thanks to Delsarte’s Theorem (see for example [1]), the parity-check polynomial of the irreducible cyclic code under the previous definition is h−e(x), if ω = γe. Let v and w be integers, such that gcd(v,w) = 1. We say that w is semiprimitive modulo v, if there exists a positive integer j, such that wj ≡−1 (mod v). According to Definition 3 in [17], an irreducible cyclic code C(a) of dimension m over Fq is called semiprimitive if µ ≥ 2 and p is semiprimitive modulo µ, where µ = gcd(q m−1 q−1 ,a) (recall q = p t). 3. A relationship between the Hamming and the Lee weight enu- merators Let n be a positive divisor of qm − 1, and write e = (qm − 1)/n. For each β ∈ Fqm define c(n,e,β) as the vector of length n over Fq, given by c(n,e,β) = (TrFqm/Fq (βγ ei))n−1i=0 . (2) Now, since the elements γei (0 ≤ i < n) are the n roots of the unity in Fqm, we have, in accordance with Definition 2.1, that the irreducible cyclic code C(e) can be described as C(e) = {c(n,e,β) |β ∈ Fqm} . Remark 3.1. C(e) is an irreducible cyclic code of length n, whose dimension will be m iff ordn(q) = m. We will now focus our attention on the trace codes of the form CL, and for this purpose we are going to fix the defining set in terms of the cyclotomic class D(e,q m) 0 , where e is any divisor of q m − 1. Therefore, from now on CLe will denote the trace code defined through (1), where the defining set Le = D (e,qm) 0 + uFqm. Since, |D (e,qm) 0 | = qm−1 e , the length of trace code CLe is q2m−qm e . For a ∈ R (recall R = Fqm + uFqm) define the evaluation map Ev(a) as Ev(a) = (Tr(ax))x∈Le . Thus CLe = {Ev(a) |a ∈ R}. Next, we will show that there exists a direct relationship between the Lee weight of some codewords in CLe and the Hamming weight of the codewords in the irreducible cyclic code C(e). Theorem 3.2. Let n be a positive divisor of qm − 1, and write e = (qm − 1)/n. Consider CLe and C(e) as before. Let a ∈ R, then (i) If a = 0, then wL(Ev(a)) = 0. (ii) If β ∈ F∗qm and a = uβ, then wL(Ev(a)) = 2qmwH(c(n,e,β)), where c(n,e,β) is the codeword in C(e) given by (2). 90 G. Vega / J. Algebra Comb. Discrete Appl. 10(2) (2023) 87–96 (iii) If α ∈ F∗qm, β ∈ Fqm, and a = α + uβ, then wL(Ev(a)) = 2 q−1 eq (q2m −qm). Proof. Part (i) is direct. Suppose that a = uβ, for some β ∈ F∗qm. Let x = w + uw′ ∈ Le, where w ∈ D(e,q m) 0 and w ′ ∈ Fqm. Therefore ax = uβw and Tr(ax) = uTrFqm/Fq (βw). Taking Gray map yields φ(Ev(a)) = φ((uTrFqm/Fq (βw))w,w′) = (TrFqm/Fq (βw),TrFqm/Fq (βw))w,w′ , where (uTrFqm/Fq (βw))w,w′ is the vector of length q2m−qm e whose elements are all possible evalu- ations of uTrFqm/Fq (βw) by taking w ′ ∈ Fqm and w ∈ D (e,qm) 0 = 〈γ e〉 (in a similar way for (TrFqm/Fq (βw),TrFqm/Fq (βw))w,w′) . Now, by considering Remark 1.1, we have wL(Ev(a)) = 2wH((TrFqm/Fq (βw))w,w′) = 2qmwH((TrFqm/Fq (βw))w) = 2qmwH((TrFqm/Fq (βγ ei))n−1i=0 ) = 2qmwH(c(n,e,β)) , where the last equality comes from (2). Lastly, suppose a = α + uβ ∈ R∗, with α ∈ F∗qm and β ∈ Fqm. Let x = w + uw′ ∈ Le, where w ∈ D (e,qm) 0 and w ′ ∈ Fqm. Therefore, ax = αw + u(αw′ + βw) and Tr(ax) = TrFqm/Fq (αw) + uTrFqm/Fq (αw ′ + βw). Taking Gray map yields φ(Ev(a)) = φ((TrFqm/Fq (αw) + uTrFqm/Fq (αw ′ + βw))w,w′) = (TrFqm/Fq (αw ′ + βw),TrFqm/Fq (αw ′ + βw + αw))w,w′ . By considering Remark 1.1 again, wL(Ev(a)) = wH((TrFqm/Fq (αw ′ + βw),TrFqm/Fq (αw ′ + βw + αw))w,w′) . Thus the Lee weight of the codeword Ev(a) ∈ CLe is equal to 2 q2m−qm e −Z(a), where Z(a) = ]{(w,w′) ∈ D(e,q m) 0 ×Fqm |TrFqm/Fq (αw ′ + βw) = 0}+ ]{(w,w′) ∈ D(e,q m) 0 ×Fqm |TrFqm/Fq (αw ′ + βw + αw) = 0} . If χ′ and χ are, respectively, the canonical additive characters of Fq and Fqm (see for example [3, Chapter 5]), then χ′ and χ are related by χ′(TrFqm/Fq (ε)) = χ(ε) for all ε ∈ Fqm. Therefore 91 G. Vega / J. Algebra Comb. Discrete Appl. 10(2) (2023) 87–96 Z(a) = 1 q ∑ w∈D(e,q m) 0 ∑ w′∈Fqm ∑ s∈Fq χ′(TrFqm/Fq (s(αw ′ + βw))) + 1 q ∑ w∈D(e,q m) 0 ∑ w′∈Fqm ∑ s∈Fq χ′(TrFqm/Fq (s(αw ′ + βw + αw))) = 2 q2m −qm eq + 1 q ∑ w∈D(e,q m) 0 ∑ s∈F∗q χ(sβw) ∑ w′∈Fqm χ(sαw′) + 1 q ∑ w∈D(e,q m) 0 ∑ s∈F∗q χ(s(βw + αw)) ∑ w′∈Fqm χ(sαw′) = 2 q2m −qm eq , because ∑ w′∈Fqm χ(sαw ′) = 0. Thus wL(Ev(a)) = 2 q−1 eq (q2m −qm). The previous theorem strongly suggests the existence of a relationship between Hamming and the Lee weight enumerators. We establish this result by means of the following: Corollary 3.3. With our current notation, let n be a positive divisor of qm −1 such that ordn(q) = m. Fix e = (qm − 1)/n. Let HamC(e)(z) and LeeCLe (z) be, respectively, the Hamming and the Lee weight enumerators of C(e) and CLe. Then the Gray image of CLe is a code over Fq of length 2 q2m−qm e and size q2m. Furthermore, the Lee weight enumerator of CLe (and therefore the Hamming weight enumerator of its Gray image) is LeeCLe (z) = HamC(e)(z 2qm) + (q2m −qm)z2 q−1 eq (q2m−qm) . (3) Proof. This is a direct consequence of Theorem 3.2 and Remark 3.1. What (3) is saying is that if C(e) is an M-weight code, then the trace code CLe (or alternatively its Gray image) is an (M + 1)-weight code. As elaborated below, this property and particularly (3), is in complete accordance with the Lee weight enumerators recently reported in [4], [8], [9] and [11]. 4. In perspective with some already reported Lee weight distri- butions Let q and n be as before, and suppose that gcd(q,n) = 1. Just by looking at the length n it is possible to determine the existence or nonexistence of either a one-weight or a semiprimitive two-weight irreducible cyclic code of dimension ordn(q) over any finite field Fq. We recall such characterization by means of the following: Theorem 4.1. [17, Theorem 4] Let n and m be positive integers, such that gcd(n,q) = 1 and m = ordn(q). Fix e = (qm − 1)/n and µ = gcd(q m−1 q−1 ,e). Then, either there exists a one-weight, or a semiprimitive two-weight irreducible cyclic code C(e) of length n, and dimension m iff µ = 1, or p is semiprimitive modulo µ. If such code exists then its Hamming weight enumerator is 1 + (qm −1) µ ((µ−1)z (q−1)qm/2 eq (qm/2−(−1)s) + z (q−1)qm/2 eq (qm/2+(−1)s(µ−1))) , 92 G. Vega / J. Algebra Comb. Discrete Appl. 10(2) (2023) 87–96 where s = (mt)/ordµ(p) (recall that q = pt). From previous theorem note that if µ = 1, then e | (q−1), and C(e) is a one-weight irreducible cyclic code of length n and dimension m, whose Hamming weight enumerator is HamC(e)(z) = 1+(q m−1)z q−1 eq qm. But if e | (q − 1) then it is easy to see that gcd(m,e) = gcd(q m−1 q−1 ,e) = µ = 1, and the condition in [4, Theorem 3.3] is fulfilled. This, of course, is right because Corollary 3.3 tells us that CLe is a two-weight trace code of length q 2m−qm e over R, whose Lee weight enumerator is LeeCLe (z) = HamC(e)(z 2qm) + (q2m −qm)z2 q−1 eq (q2m−qm) = 1 + (qm −1)z2 q−1 eq q2m + (q2m −qm)z2 q−1 eq (q2m−qm) , which is the same Lee weight enumerator reported in [4, Theorem 3.3]. If µ = 2 in Theorem 4.1, then q and p are an odd integers. Therefore, clearly, p is semiprimitive modulo µ. Thus, C(e) is a two-weight irreducible cyclic code of length n and dimension m, whose Hamming weight enumerator is HamC(e)(z) = 1 + (qm −1) 2 (z (q−1)(qm−qm/2) eq + z (q−1)(qm+qm/2) eq ) , and by Corollary 3.3, CLe is a three-weight trace code of length q2m−qm e over R, whose Lee weight enumerator is LeeCLe (z) = 1 + (qm −1) 2 (z 2(q−1)(q2m−q3m/2) eq + z 2(q−1)(q2m+q3m/2) eq ) + (q2m −qm)z2 q−1 eq (q2m−qm) , which is the same Lee weight enumerator reported in [4, Theorem 3.7]. In fact, in the particular case when e = 2, µ = gcd(q m−1 q−1 ,e) = 2. That is, in this case, we have (µ = e = 2)|(p− 1) and D (2,qm) 0 = Q, where Q is the set of all square elements of F∗qm. Therefore, as is correctly pointed out in [4, Remark 3.8], [9, Theorem 1] is a special case of [4, Theorem 3.7]. Now, suppose that q = p and that e > 2 is an integer such that e | pr + 1 | pm −1, for some integer r, and let l be the smallest integer such that e | pl + 1. But, under these conditions, it is easy to see that 2l | m, and therefore µ = gcd(p m−1 p−1 ,e) = e, and ordµ(p) = 2l. Thus, Theorem 4.1 tell us that C(e) is a two-weight irreducible cyclic code over the prime field Fp, of length p m−1 e and dimension m, whose Hamming weight enumerator, HamC(e)(z), is 1 + (pm −1) e ((e−1)z (p−1)pm/2 ep (pm/2−(−1) m 2l ) + z (p−1)pm/2 ep (pm/2+(−1) m 2l (e−1))) , and by Corollary 3.3, CLe is a three-weight trace code of length p2m−pm e over the prime ring R = Fp+uFp, whose Lee weight enumerator is LeeCLe (z) = 1 + (pm −1) e [(e−1)z 2(p−1)p3m/2 ep (pm/2−(−1) m 2l ) + z 2(p−1)p3m/2 ep (pm/2+(−1) m 2l (e−1))] + (p2m −pm)z2 p−1 ep (p2m−pm) , 93 G. Vega / J. Algebra Comb. Discrete Appl. 10(2) (2023) 87–96 which is the same Lee weight enumerator reported in [11, Table 1] (in such table N = e). Note that the conditions e | (q −1) or µ = e are quite restrictive, but fortunately Theorem 4.1 tells us that we can get rid of it, and we show this by means of the following: Example 4.2. Let q = p = 5 and n = 3. Then m = ord3(5) = 2, e = (p2 − 1)/3 = 8, and µ = gcd(p 2−1 p−1 ,e) = 2. By Theorem 4.1, C(8) is a two-weight irreducible cyclic code over F5, of length 3 and dimension 2, whose Hamming weight enumerator is HamC(8)(z) = 1 + 12z 2 + 12z3. Now, by Corollary 3.3, the Gray image of CL8 is a three-weight code over the prime field F5, of length 2 p2m−pm e = 150, and size p2m = 625, whose Hamming weight enumerator is LeeCL8 (z) = 1 + 12z 100 + 12z150 + 600z120. In this example, in addition that e - (q−1) and e 6= µ, also note that (e = 8) - 5r +1, for any positive integer r. Therefore the three-weight trace code in Example 4.2 is new in the context of [4], [9] and [11], but not the binary case of [8]. Up to now we used Theorem 4.1 to construct two or three-weight trace codes of the form CLe. In fact, since Theorem 4.1 is a characterization, there are no others two or three-weight trace codes of the form CLe. However, as is outlined below, it possible to construct M-weight trace codes of the form CLe, with M > 3. Let e be a divisor of qm−1. Suppose that µ = gcd(m,e) = gcd(q m−1 q−1 ,e) = 3, and that p ≡ 1 (mod 3) (that is p is not semiprimitive modulo µ). Under these conditions, and with the help of [2, Theorem 18], C(e) is a three-weight irreducible cyclic code over Fq, of length qm−1 e and dimension m, whose Hamming weight enumerator is 1 + qm −1 3 (z (q−1)(qm−c1q m 3 ) eq + z (q−1)(qm−1 2 (c1−9d1)q m 3 ) eq + z (q−1)(qm−1 2 (c1+9d1)q m 3 ) eq ) , where c1 and d1 are uniquely given by 4qm/3 = c21 + 27d 2 1, c1 ≡ 1 (mod 3) and gcd(c1,p) = 1. Through a direct application of Corollary 3.3, over the earlier Hamming weight enumerator, it is easy to see that CLe is a four-weight trace code, whose Lee weight enumerator is precisely the Lee weight distribution reported in the first part of [4, Table II]. In a quite similar way, it is easy to see that the Lee weight distribution reported in the first part of [4, Table III], is just the result of direct application of Corollary 3.3 over the Hamming weight enumerator reported in [2, Theorem 20]. Lastly, note that the families of codes in the second parts of [4, Table II and Table III] are three- weight trace codes that come, as we already explained above, from two-weight semiprimitive irreducible cyclic codes. 5. The Lee weight distribution of an extended family of trace codes over Fq + uFq We are now going to follow the open problem suggested in the Conclusion of [11], and determine the Lee weight distribution of trace codes of the form CLe in terms of other class of irreducible cyclic codes, with known or well-understood weight distribution. For this purpose, we recall the following result. Theorem 5.1. [17, Theorem 10] Let n, m and r be three positive integers, such that gcd(n,q) = 1, m = ordn(q), and r ≥ 1. If r ≥ 2, suppose that the prime factors of r divide n but not (qm − 1)/n, and that qm ≡ 1 (mod 4), if 4 | r. Fix µ = gcd(q m−1 q−1 , qm−1 n ). Assume also that µ = 1 or p is semiprimitive modulo µ. Then, the weight enumerator polynomial of any [nr,mr] irreducible cyclic code is (1 + (qm −1) µ ((µ−1)z (q−1)qm/2 eq (qm/2−(−1)s) + z (q−1)qm/2 eq (qm/2+(−1)s(µ−1))))r , 94 G. Vega / J. Algebra Comb. Discrete Appl. 10(2) (2023) 87–96 where s = (mt)/ordµ(p). Combining previous theorem with Corollary 3.3 we get: Theorem 5.2. Let n, m and r be three positive integers, such that gcd(n,q) = 1, m = ordn(q), and r ≥ 1. If r ≥ 2, suppose that the prime factors of r divide n but not (qm − 1)/n, and that qm ≡ 1 (mod 4), if 4 | r. Fix µ = gcd(q m−1 q−1 , qm−1 n ), e = q m−1 n , and e′ = q mr−1 nr . Assume also that µ = 1 or p is semiprimitive modulo µ. Then the Gray image of CLe′ is a code over Fq of length 2 q2mr−qmr e′ and size q2mr. Furthermore, the Lee weight enumerator of CLe′ is (1 + (qm −1) µ ((µ−1)zf(q)(q m/2−(−1)s) + zf(q)(q m/2+(−1)s(µ−1))))r + (q2mr −qmr)z2 q−1 e′q (q 2mr−qmr) , where s = (mt)/ordµ(p), and f(q) = 2qmr(q−1)qm/2 eq . Proof. This is a direct consequence of Theorem 5.1 and Corollary 3.3. Example 5.3. Let q = p = 5, n = 8, and r = 2. Then m = ord8(5) = 2, µ = gcd( qm−1 q−1 , qm−1 n ) = 3, e = q m−1 n = 3, e′ = q mr−1 nr = 39, s = 1, and clearly p is semiprimitive modulo µ, and r divide n but not (qm − 1)/n. Thus, the Gray image of CL39 is a five-weight code over the prime field F5, of length 2q 2mr−qmr e′ = 20000, and size q2mr = 58, whose Hamming weight enumerator is LeeCL39 (z) = (1 + 8z5000 + 16z10000)2 + 390000z16000 = 1 + 16z5000 + 96z10000 + 256z15000 + 390000z16000 + 256z20000. Finally, note that Theorem 5.1 includes all the semiprimitive irreducible cyclic codes, when r = 1. Therefore, the new infinite family of trace codes of the form CLe, described in Theorem 5.2, includes the infinite family found in [11]. 6. Conclusion In this work, we showed that there exists an identity between Lee weight enumerators of the trace codes of the form CLe, and the Hamming weight enumerators of the irreducible cyclic codes of the form C(e). In other words, we proved that the Lee weight distribution problem for the trace codes constructed following [4], [8], [9] or [11], is equivalent to the standard Hamming weight distribution problem for the irreducible cyclic codes. In fact, this identity allowed us to present a simplified view for all the Lee weight distributions reported in these works. Finally, we used the already known weight distributions of an infinite family irreducible cyclic codes (semiprimitive and not semiprimitive), to determine the Lee weight distribution of a new infinite family of trace codes of the form CLe, that includes the infinite family found in [11]. As a future work, it could be interesting to explore the possible existence of an identity, like that in Corollary 3.3, for trace codes of the form CLe when they are defined over a different ring (for example, a semi-local ring similar to that in [10]). Acknowledgment: The author want to express his gratitude to the anonymous referee for his valuable suggestions. 95 G. Vega / J. Algebra Comb. Discrete Appl. 10(2) (2023) 87–96 References [1] P. Delsarte, On subfield subcodes of Reed-Solomon codes, IEEE Trans. Inf. Theory 21(5) (1975) 575–576. [2] C. Ding, J. Yang, Hamming weights in irreducible cyclic codes, Discrete Math. 313(4) (2013) 434–446. [3] R. Lidl, H. Niederreiter, Finite Fields, Cambridge Univ. Press, Cambridge, U.K. (1997). [4] H. Liu, Y. Maouche, Two or few-weight trace codes over Fq + uFq, IEEE Trans. Inf. Theory 65(5) (2019) 2696–2703. [5] G. Luo, X. Cao, G. Xu, S. Xu, A new class of optimal linear codes with flexible parameters, Discrete Appl. Math. 237 (2018) 126–131. [6] F. J. MacWilliams, N. J. A. Sloane, The Theory of Error-Correcting Codes, The Netherlands: North- Holland, Amsterdam (1977). [7] B. Schmidt, C. White, All two-weight irreducible cyclic codes?, Finite Fields and Their Appl. 8 (2002) 1–17. [8] M. Shi, Y. Liu, P. Solé, Optimal two-weight codes from trace codes over F2 + uF2, IEEE Commun. Lett. 20(12) (2016) 2346–2349. [9] M. Shi, R. Wu, Y. Liu, P. Solé, Two and three weight codes over Fp +uFp, Cryptogr. Commun. 9(5) (2017) 637–646. [10] M. Shi, Y. Guan, P. Solé, Two new families of two-weight codes, IEEE Trans. Inf. Theory 63(10) (2017) 6240–6246. [11] M. Shi, T. Helleseth, P. Solé, Three-weight codes from semiprimitive irreducible cyclic codes, Preprint, 2019. [12] M. Shi, Y. Guan, C. Wang, P. Solé, Few-weight codes from trace codes over Rk, Bulletin of the Australian Mathematical Society, 98(1) (2018) 167–174. [13] M. Shi, Y. Liu, P. Solé, Optimal binary codes from trace codes over a non-chain ring, Discrete Applied Mathematics 219 (2017) 176–181. [14] M. Shi, L. Qian, P. Solé, Few-weight codes from trace codes over a local ring, Applicable Algebra Eng. Commun. Computin. 29 (2018) 335–350. [15] M. Shi, H. Zhu, P. Solé, Optimal three-weight cubic codes, Appl. Comput. Math. 17(2) (2018) 175–184. [16] M. Shi, R. Wu, L. Qian, L. Sok, P. Solé, New Classes of p-Ary Few Weight Codes, Bulletin of the Malaysian Mathematical Sciences Society 42(4) (2019) 1393–1412. [17] G. Vega, A characterization of all semiprimitive irreducible cyclic codes in terms of their lengths, Applicable Algebra Eng. Commun. Computin. 30(5) (2019) 441–452. 96 https://doi.org/10.1109/TIT.1975.1055435 https://doi.org/10.1109/TIT.1975.1055435 https://doi.org/10.1016/j.disc.2012.11.009 https://www.amazon.com/Finite-Fields-Encyclopedia-Mathematics-Applications/dp/0521065674 https://doi.org/10.1109/TIT.2019.2891562 https://doi.org/10.1109/TIT.2019.2891562 https://doi.org/10.1016/j.dam.2017.11.020 https://doi.org/10.1016/j.dam.2017.11.020 https://www.elsevier.com/books/the-theory-of-error-correcting-codes/macwilliams/978-0-444-85193-2 https://www.elsevier.com/books/the-theory-of-error-correcting-codes/macwilliams/978-0-444-85193-2 https://doi.org/10.1006/ffta.2000.0293 https://doi.org/10.1006/ffta.2000.0293 https://doi.org/10.1109/LCOMM.2016.2614934 https://doi.org/10.1109/LCOMM.2016.2614934 https://doi.org/10.1007/s12095-016-0206-5 https://doi.org/10.1007/s12095-016-0206-5 https://doi.org/10.1109/TIT.2017.2742499 https://doi.org/10.1109/TIT.2017.2742499 https://doi.org/10.1017/S0004972718000291 https://doi.org/10.1017/S0004972718000291 https://doi.org/10.1016/j.dam.2016.09.050 https://doi.org/10.1016/j.dam.2016.09.050 https://doi.org/10.1007/s00200-017-0345-8 https://doi.org/10.1007/s00200-017-0345-8 https://mathscinet.ams.org/mathscinet-getitem?mr=MR3792337 https://mathscinet.ams.org/mathscinet-getitem?mr=MR3792337 https://doi.org/10.1007/s40840-017-0553-1 https://doi.org/10.1007/s40840-017-0553-1 https://doi.org/10.1007/s00200-019-00385-z https://doi.org/10.1007/s00200-019-00385-z Introduction Background material A relationship between the Hamming and the Lee weight enumerators In perspective with some already reported Lee weight distributions The Lee weight distribution of an extended family of trace codes over Fq+uFq Conclusion References