arXiv:2009.04949v2 [cs.IT] 8 Jun 2021 kwcci oe,smrn metric. cod sum-rank Reed-Solomon codes, metric, skew-cyclic rank codes, Reed-Solomon earized C oe pt afterpecie itnei obtained. is distance prescribed sum-r their for half decoder to a up Finally, codes length). BCH code the to correspond it of lists akBHcdsba rvosykoncdsfrtesum-rank sum the that for is codes showing dimension known binary provided its previously for are metric beat on tables codes bound BCH it, lower sum-ra rank a to a and Thanks of described, set obtained. is defining code The then defini pairs. BCH are whose consecutive codes such distance, cyclic-skew-cyclic contains largest sum-rank B the minimum Sum-rank as wh defined pairs. prescribed codes consecutive with cyclic-skew-cyclic certain minimum codes, for contains the the poynomials given set on of of bound) defining is top BCH on distance matrices introduce sum-rank polynomials is (called sum-rank generator skew bound set of lower construct defining roots A fo of of to are pairs notion ideals using used The left codes. such are corresponding of polynomi they generators of Single and top versa). on non-commutative vice polynomials ar suitable skew (or codes a using of constructed Cyclic-skew-cyclic ideals ring, introduced. left are as characterized codes BCH rank ueo ahmtc,Uiest fNuhae,20 Neuchˆ 2000 Neuchˆatel, of [email protected]). University (e-mail: Mathematics, of tute ercaekon[3–1] u hyaetioe anyfor mainly tailored are they but [13]–[17], known are metric the defined applying are they fields. in finite that difficulties large is main rather practice over the in As constructions of erasures). code one with error-correcti known concerned next, efficient only show are an we we small with (unless and together algorithm distance sum-rank size, minimum finite-field large (see size, cases large particular with as [12] [11], metr metric II-B). Hamming rank Subsection the the recovers it and as [10] metric interest er sum-rank theoretical crisscross The of of [9]. also version extending multilayer correction, find or erasure multishot also and a in may or cryptosy They [8], public-key retriev McEliece’s compart- extending [7]. information in [5], private databases applications storage and partial-MDS-coded distributed [6], on sharing in par secret repair [4], mented for [3], codes codes [ space-time MDS coding optimal network multishot rate-diversity in [2], security and correction error C .Mr´nzP˜a swt h nttt fCmue Scien Computer of Institute the Mart´ınez-Pe˜nas with U. is ne Terms Index Abstract e osrcin fcnouinlcdsfrtesum-rank the for codes convolutional of constructions few A codes obtain to is objective the metrics, other to Similarly h u-akmti aefudapiain nuniversal in to applications respect found have with metric erasures sum-rank the and/or errors correcting ODES 2 × I hswr,cci-kwcci oe n sum- and codes cyclic-skew-cyclic work, this —In 2 iaymtie,frawd ag fls egh that lengths list of range wide a for matrices, binary BHcds ylccds aiui oe,lin- codes, Gabidulin codes, cyclic codes, —BCH 2 × 2 .I I. arcs(.. oe hs oeod are codewords whose codes (i.e., matrices NTRODUCTION u-akBHCdsand Codes BCH Sum-Rank ylcSe-ylcCodes Cyclic-Skew-Cyclic tl Switzerland. atel, eadteInsti- the and ce met Mart´ınez-Pe˜nasUmberto gset ng finite stem und, tial- ank CH ose ror 1], als nk es, ng d, ic al is e - . esecdwrsa it fmtie 3.Furthermore, (3). e.g., matrices small, of siz arbitrary lists list be as the can codewords equivalently, or, see II-B) we Subsection (see metric ℓ ik nmlihtlnal oe ewrs[] 2,adto and [2], [1], networks coded linearly locality multishot in links vrfiiefilso size of fields defined finite be may metric, over rank sum- codes the Reed-Solomon the and Linearized whenever metric respectively. Hamming [12] the [9], recovers codes metric rank Gabidulin and Reed-Solo [21] (generalized) cases codes Su particular [20]. as [19], recover codes codes Reed-Solomon sub-exponent linearized have are and sizes field bound Singleton the attains distance ufras rmlrefiiefil ieepnns.Therefo size exponents). of size fields finite-field finite large from also suffer [13 constructions code (convolutional constructions such oeta ml ausfor paramet values code small non-trivial that for Note techniques such by attainable erc(e uscinI-)nest elrei re to order in large the Moreover, be codes. to parameter component needs rank-metric meaningful II-B) use Subsection (see numbe metric rank-metri the constructions, over such m for constructions However, [1]. multi-level codes block and bloc [18], rank-metric codes with concatenation codes include convolutional stream constructions Hamming-metric in Other common scenarios. patterns ing erasure under correction erasure uhas such neeti h plctos(hycrepn to correspond (they applications the in interest n[]i o h orsodn xeso ftern metric rank codes: the [23]. in of considered extension subcodes corresponding subfield the over not defined is consider (42)) in subcodes [5] (see subfield considered in for [22] only metric bound size) sum-rank the lower the that code Delsarte’s Note However, well-known (i.e., the 29). dimension is [5] Lemma their larger and on code the estimate II-B Reed-Solomon over linearized Subsection distance, the (see sum-rank of minimum extension, the finite-field least mini- at extensi Their finite-field VII]. is smaller the Sec. over [5, distance, sum-rank in mum considered were codes Solomon length subfamilies, d obigsbedsboe fcranlnaie Reed-Solom thanks linearized certain distance of sum-rank subcodes subfield minimum being prescribed to a have codes ierya either as linearly = stenme ftrsi h u enn h sum-rank the defining sum the in terms of number the is h rtkonbokcdswoemnmmsum-rank minimum whose codes block known first The nti ok edsrb w e aiiso linear of families new two describe we work, this In Reed- linearized of subcodes subfield issue, this tackle To frw e arxi h ento ftesum-rank the of definition the in matrix per rows of n − n ylcse-ylccodes Cyclic-skew-cyclic m 2 k = 2 1 + m nlclyrpial oe [5]). codes repairable locally in 4 = ℓm u-akBHcodes BCH sum-rank per sa xoeti h nt-edszsof sizes finite-field the in exponent an as appears a eabtaiylre However, large. arbitrarily be may dimension , r o tanbeete ysc codes. such by either attainable not are n , k 2 2 or 4 = d Θ( m k rw,adsalfiiefil sizes finite-field small and grows, uhas such , ℓ n iiu u-akdistance sum-rank minimum and m ( m m ) 1 = Dfiiin4 n n fits of one and 4) (Definition where , 2 = Dfiiin3) h latter The 30). (Definition , ,frisac,aenot are instance, for ), m 2 or 2 = m 3 hl h code the while , sa bv and above as is or 3 ℓ m r loof also are , tl grows still outgoing ]–[17] mon of s if e ers. on, re, on ial ch ed m k c s 1 - r . 2 codes. They can be defined over arbitrarily small finite fields, We then introduce the notion of defining set (Definition 21) including 22 = 4 for m = 2 and for arbitrarily large ℓ, with and show that they characterize the corresponding cyclic-skew- code length n = ℓm (for such parameters, codewords can be cyclic code (Theorem 4). In Theorem 5, we show how to seen as lists of 2×2 binary matrices with list length ℓ, see (3) obtain the dimension of a cyclic-skew-cyclic code from its and Appendix A). In addition, we show that their dimension defining set. is in most cases higher than that obtained by Delsarte’s lower In Theorem 6, we obtain a family of cyclic-skew-cyclic bound (see Appendix A) for a given prescribed minimum linearized Reed-Solomon codes. Using such codes, we obtain sum-rank distance. To the best of our knowledge, the code in Theorem 7 a lower bound (called sum-rank BCH bound) on dimensions that we obtain in Appendix A are the highest the minimum sum-rank distance of cyclic-skew-cyclic codes known so far for m =2 and the finite-field size 22 =4 (i.e., whose defining set contains consecutive pairs. Sum-rank BCH codewords are lists of 2 × 2 binary matrices), for the given codes are then defined as the largest codes satisfying such a code lengths and minimum sum-rank distances. property (Definition 30). In Theorem 8, we describe the defining set of a sum-rank BCH code based on the pairs in its definition. Using this result A. Similar Codes in the Literature and Theorem 5, we obtain in Theorem 9 a lower bound on Here, we discuss related codes beyond other known codes the dimension of a sum-rank BCH code that can be easily endowed with the sum-rank metric [1], [13]–[18], which were computed from the pairs in its definition. discussed above. In Subsection VII-D we show that sum-rank BCH codes Cyclic-skew-cyclic codes form a family of codes that re- can be decoded with respect to the sum-rank metric up to cover as particular cases classical cyclic codes [24, Sec. 7.2] half their prescribed distance by decoding the larger linearized [25, Ch. 4] and skew-cyclic codes [12, Page 6] [26, Def. 1], Reed-Solomon code. whenever the sum-rank metric recovers the Hamming metric In Appendix A, we obtain tables with lower and upper and the rank metric, respectively (note that skew-cyclic codes bounds on the parameters of sum-rank BCH codes for m =2 are also good for the Hamming metric [26]). Mathematically, and the finite-field size 22 = 4. These tables show that the cyclic-skew-cyclic codes can be characterized simultaneously introduced sum-rank BCH codes beat previously known code as classical cyclic codes over some non-commutative finite dimensions for a given prescribed distance, for a wide range ring, and as skew-cyclic codes over some commutative finite of code lengths. ring (Theorem 1), using polynomials on top of skew polyno- mials (9) or vice versa (11). C. Organization The study of cyclic codes over general finite rings was initi- The remainder of the manuscript is organized as follows. ated in [27]. Not many works exist treating cyclic codes over In Section II, we provide some preliminaries, mainly the non-commutative finite rings [28]–[30], and they deal with definitions of the sum-rank metric and skew polynomial rings. general properties rather than particular code constructions. In Section III, we introduced cyclic-skew-cyclic codes and A wide range of works deal with skew-cyclic codes over characterize them as left ideals. In Section IV, we find a single commutative finite rings that are not fields [31]–[34]. However, generator for such left ideals and the corresponding generator no work has yet treated skew-cyclic codes over the commuta- matrix. In Section V, we introduce defining sets of cyclic- tive finite ring F ℓ , to the best of our knowledge. [x]/(x − 1) skew-cyclic codes, after defining appropriate evaluation maps Cyclic convolutional codes [35], [36] are similar to cyclic- for skew polynomials. We conclude the section by computing skew-cyclic codes in that they also make use of skew poly- the dimension of a cyclic-skew-cyclic code from its defining F ℓ nomials over the commutative finite ring [x]/(x − 1), for set. In Section VI, we revisit linearized Reed-Solomon codes F a finite field . However, they yield (infinite) convolutional and find a subfamily of such codes formed by cyclic-skew- codes rather than (finite) block codes. cyclic codes. In Section VII, we provide the sum-rank BCH Sum-rank BCH codes are both cyclic-skew-cyclic codes and bound and the definition of sum-rank BCH codes. We then subfield subcodes of certain linearized Reed-Solomon codes. describe their defining sets and conclude by giving a lower Furthermore, they recover classical BCH codes [37], [38] and bound on their dimensions. The section concludes by showing rank-metric BCH codes [39], whenever the sum-rank metric how to decode sum-rank BCH codes up to half their prescribed recovers the Hamming metric and the rank metric, respectively. distance. Section VIII concludes the manuscript.

B. Main Results II. PRELIMINARIES AND GENERAL SETTING We introduce cyclic-skew-cyclic codes in Definition 4, A. Main Finite Fields in This Work and characterize them as left ideals over a suitable non- In this work, q0 denotes the power of a prime number p. s commutative finite ring in Theorem 1. We also fix positive integers m, ℓ and s, and denote q = q0. In Theorem 2, we show that such ideals are generated by We will assume that the finite field with q elements a unique element satisfying certain properties, called minimal Fq = Fqs generator skew polynomial (Definition 7). We show how to 0 use such a left-ideal generator to obtain a generator matrix of contains all ℓth roots of unity, i.e., all roots of the polynomial ℓ the corresponding code in Theorem 3. x − 1 ∈ Fp[x]. This holds if, and only if, q − 1 is divisible 3 by ℓ, see [25, p. 110]. Observe that, if ℓ = 1, then we may To explain the name sum-rank metric, observe that, if m = assume that s =1. We refer to [40] for generalities on finite dimK (L) < ∞, then fields. (i) (i) (i) Throughout the manuscript, we will consider sum-rank c0,0 c0,1 ... c0,N−1 ℓ−1 (i) (i) (i) metrics (see Definition 1 below), for which we will consider  c1,0 c1,1 ... c1,N−1  wt (c)= Rk , the two finite-field extensions SR K . . .. . i=0  . . . .  X  (i) (i) (i)  Fq ⊆ Fqm and Fq ⊆ Fqm .  c c ... c  0 0  m−1,0 m−1,1 m−1,N−1   n  To relate these four fields, the following directed graph might where RkK (·) denotes rank over K, c ∈ L is subdivided as be helpful, where K −→ L means that the field L is a field in Definition 1, and extension of the field K, i.e., K is a subfield of L: m−1 (i) (i) cj = ch,jβh, Fqm h=0 ր տ X (i) F F m F F s where c ∈ K, for h = 0, 1,...,m − 1, for j = = q0 q = q0 . h,j տ ր 0, 1,...,N − 1 and for i = 0, 1,...,ℓ − 1, and where F q0 {β0,β1,...,βm−1} is an ordered basis of L over K. With such a matrix representation, we may consider c ∈ Ln as a Since we will define our main codes over Fqm , we will 0 list of ℓ matrices simply denote m×N ℓ F F m (C , C ,...,C ) ∈ K . (3) = q0 . (1) 1 2 ℓ ℓ Considering codes as subsets of Km×N  , endowed with B. The Sum-Rank Metric the sum-rank metric as above, may be important in some We fix another positive integer N and define a code length applications, but becomes cumbersome in our study. partition The sum-rank metric recovers the Hamming metric if m = n = ℓN = N + N + ··· + N . (2) N =1 [19, Ex. 36] and the rank metric if ℓ =1 [19, Ex. 37]. ℓ times See also [5, Sec. II-A]. We will show throughout the paper how our results particularize to these two important cases. The integer n will be the length of our main codes, and (2) will | {z } In most applications of the sum-rank metric, the objective is be the length partition that we will use in order to define the to obtain codes having simultaneously a large size and a large sum-rank metric, which was defined in [1, Sec. III-D] under minimum sum-rank distance, for a given code alphabet (pair the name extended rank distance. (K,L)) and length (pair (ℓ,N)). As in the classical Hamming- Definition 1 (Sum-Rank Metric [1]). Let K ⊆ L be a field metric case [25, Th. 2.4.1], there is a trade-off between the size F F m F F m extension (in our case, q0 ⊆ q0 or q ⊆ q ). Consider and minimum sum-rank distance of any code (linear or not) vectors c ∈ Ln to be subdivided according to the partition given by the [5, Cor. 2]. We refer to [24], n = ℓN as in (2): [25] for generalities on codes. c = (c(0), c(1),..., c(ℓ−1)) ∈ Ln, where Proposition 2 ([5]). With notation as in Definition 1, for a (i) (i) (i) (i) N finite-field extension K ⊆ L, and for a code C ⊆ Ln (which c = (c0 ,c1 ,...,cN−1) ∈ L , may be linear or not), it holds that for i =0, 1,...,ℓ − 1. We define the sum-rank weight for the extension K ⊆ L (i.e., the pair (K,L)) and length partition |C| ≤ |L|n−dSR(C)+1. (4) n = ℓN as in (2) (i.e., the pair (ℓ,N)) as the map wt : SR Codes achieving equality in (4) are called maximum sum- Ln −→ N given by rank distance (MSRD) codes. Maximum rank distance (MRD) ℓ−1 codes (e.g., Gabidulin codes [9], [12]) are also MSRD codes, i i i ( ) ( ) ( ) ℓN wtSR(c)= dimK c0 ,c1 ,...,cN−1 , but any MRD code requires |L| ≥ 2 , exponential in the K i=0 X D E  parameters n, ℓ and N. The first MSRD codes for sub- n for all c ∈ L subdivided as above. Here, dimK (·) denotes exponential field sizes |L| in n and ℓ are linearized Reed- Solomon codes [19], [20]. See Subsection VI-A. They require dimension over K and h·iK denotes K-linear span. We define the sum-rank distance for the same field extension and length |L| = Θ(ℓN ). By considering subfield subcodes, one can n n partition as the map dSR : L × L −→ N given by reduce the base ℓ at the expense of possibly reducing code size (relative to field size) and minimum sum-rank distance [5, Sec. dSR(c, d)=wtSR(c − d), VII]. The objective of this manuscript is to study the structure for all c, d ∈ Ln. Finally, for a code C ⊆ Ln (a code will of one family of subfield subcodes of linearized Reed-Solomon simply be any subset of Ln, linear or not), we define its codes (Section VII). In particular, we will obtain a better minimum sum-rank distance as estimate on their dimensions than previously known [5, Cor. 9]. This will lead to codes with larger size and minimum sum- N dSR(C) = min{dSR(c, d) | c, d ∈C, c 6= d}. rank distance than previous codes with |L| ≪ ℓ . 4

To consider subfield subcodes and the sum-rank metric, we The skew-cyclic intra-block shifting operator φ : Fn −→ Fn F F m will consider the two finite-field extensions q0 ⊆ q0 and is defined as F F m , as in Subsection II-A. Since we will only consider q ⊆ q (0) (1) (ℓ−1) the length partition n = ℓN as in (2), for ℓ and N fixed, we do φ c , c ,..., c = not need to write the dependency of the sum-rank metric on   the field extension and length partition. We will simply denote ψ(c(0)), ψ(c(1)),...,ψ(c(ℓ−1)) , by N N  n where ψ : F −→ F is the classical skew-cyclic shifting wt : F m −→ N, and SR q operator, given by 0 n (5) wt : F m −→ N, SR q0 ψ (c0,c1,...,cN−1) = (σ(cN−1), σ(c0),...,σ(cN−2)) . F F m F the sum-rank weights for the extensions q ⊆ q and q0 ⊆ F m q0 , respectively (analogously for the corresponding metrics). The operators in Definition 3 can be trivially extended to any field L and endomorphism σ : L −→ L. These operators C. Skew Polynomial Rings depend on the length partition n = ℓN, the field L and the field Skew polynomial rings over division rings (i.e., commu- endomorphism σ. However, we will not write this dependency tative or non-commutative fields) were originally defined by for simplicity. Ore [41]. However, in this work, we will need to consider The classical cyclic shifting operator [24, Sec. 7.2] [25, skew polynomial rings over commutative rings which are Ch. 4] is recovered from ϕ by setting N = 1, whereas the not necessarily integral domains. We refer to [42] for basic classical skew-cyclic shifting operator [12, Page 6] [26, Def. Algebra and to [43] for non-commutative Algebra. 1] is recovered from φ by setting ℓ = 1. Moreover, φ and Let R be an arbitrary commutative ring (with identity) and ϕ become the identity maps if m = N = 1 and ℓ = 1, let σ : R −→ R be a ring automorphism (we always assume respectively. that σ(1) = 1). The skew R[z; σ] is defined We may now define cyclic-skew-cyclic codes. i N N as the free module over R with basis {z | i ∈ }, being = Definition 4 (Cyclic-Skew-Cyclic Codes). We say that a code i j i+j {0, 1, 2,...}, and with product given by the rule z z = z , C ⊆ Fn is a cyclic-skew-cyclic code,or a CSC code for short, N for all i, j ∈ , and the rule if it is a (linear over F), and (6) za = σ(a)z, ϕ(C) ⊆C and φ(C) ⊆C. for all a ∈ R. Then R[z; σ] is a ring with identity 1 = z0. Analogously for any field L, instead of F, and any field It is commutative if, and only if, σ = Id (the identity endomorphism . automorphism), and it is an integral domain if, and only if, so σ : L −→ L is R. Furthermore, if R is a field, then R[z; σ] is both a left By the observations above, classical cyclic codes [24, Sec. and right Euclidean domain. 7.2] [25, Ch. 4] and classical skew-cyclic codes [12, Page 6] To define skew polynomial rings, we will mostly consider [26, Def. 1] are recovered from CSC codes by setting m = the field automorphism N =1 and ℓ =1, respectively.

σ : Fqm −→ Fqm q (7) a 7→ a , B. Algebraic Characterizations for all a ∈ Fqm . We will also consider σ restricted to some We now give an algebraic description of CSC codes, which subfields of Fqm , and we will also extend σ to polynomial in turn recovers those of classical cyclic codes and skew-cyclic rings over such subfields. Regardless of its domain, we will codes. First, we define always use the letter σ, as its definition can be easily inferred S′[x] F[z; σ] from the context. R′ = , where S′ = . (9) (xℓ − 1) (zN − 1) III. CYCLIC-SKEW-CYCLIC CODES The use of the prime symbol is due to the fact that we first A. The Definition consider R′, since it is simpler to describe and corresponds to the length partition in (2). However, we will use an alternative Recall that F = Fqm , as defined in (1), and that we consider 0 ′ vectors in Fn to be subdivided as follows: ring throughout the manuscript. We will assume that S is a ring, which holds if, e.g., m divides N. We are considering the c = (c(0), c(1),..., c(ℓ−1)) ∈ Fn, where (8) polynomial ring S′[x] as usual, where the variable x commutes (i) (i) (i) (i) FN c = (c0 ,c1 ,...,cN−1) ∈ , with all elements. In particular, we have that for i =0, 1,...,ℓ − 1. With this notation, we may define the zx = xz. following operators. ′ ℓ Definition 3 (Shifting Operators). The cyclic inter-block Ideals in S [x] are assumed to be left ideals. Hence (x − 1) ′ ℓ ′ shifting operator ϕ : Fn −→ Fn is defined as denotes the left ideal of S [x] generated by x −1 ∈ S [x], even though this ideal in particular is two-sided (since xz = zx and ϕ c(0), c(1),..., c(ℓ−1) = c(ℓ−1), c(0),..., c(ℓ−2) . xa = ax for all a ∈ F).     5

We may identify Fn with R′, as vector spaces over F, via Observe that Theorem 1 recovers the classical algebraic the vector space isomorphism µ : Fn −→ R′ given by characterizations of cyclic codes and skew-cyclic codes by setting m = N = 1 and ℓ = 1, respectively. In general, ℓ−1 N−1 Theorem 1 states that a CSC code is simultaneously a cyclic µ c(0), c(1),..., c(ℓ−1) = c(i)zj xi , (10)   j   code over the non-commutative finite ring S′, and a skew- i=0 j=0   X X cyclic code over the commutative finite ring S.     where c(i) = (c(i),c(i),...,c(i) ) ∈ FN , for i =0, 1,...,ℓ− Unless otherwise stated, we will identify C, µ(C) and ν(C), 0 1 N−1 Fn 1. We will often denote and we will denote by C both the CSC code in and the left ideal of R′ or R, indistinctly. c(x, z)= µ(c). It can be shown that R′ is naturally isomorphic to IV. GENERATORS OF CYCLIC-SKEW-CYCLIC CODES S[z; σ] F[x] A. Finding a Single Generator as a Left Ideal R = , where S = , (11) (zN − 1) (xℓ − 1) Cyclic codes over an arbitrary (commutative or not) finite where σ : F −→ F is extended uniquely to σ : S −→ S by ring are not always principal ideals [28], i.e., they do not setting σ(x)= x. always have a single generator. In fact, being principal is This is the first time that we need to extend σ to a larger equivalent to being splitting [28, Th. 3.2]. A similar result ring. First note that σ can be uniquely extended to σ : F[x] −→ holds for cyclic convolutional codes [44, Th. 3.5] [36, Sec. 4], F[x], satisfying that σ(x)= x. Second, σ : F[x] −→ F[x] can which make use of skew polynomials but are not CSC codes. ′ be uniquely extended to In this subsection, we will show that R (thus R ) is a principal left ideal ring (PIR), assuming that p does not divide F[x] F[x] ℓ F σ : −→ , (12) ℓ (i.e., x − 1 has simple roots in q). To that end, we will (m(x)) (m(x)) find a minimal generator skew polynomial of a CSC code that satisfying that σ(x)= x, where m(x) ∈ F[x], if and only if, will enable us to obtain a generator matrix (Subsection IV-B) and obtain the defining set (Subsection V-B) of the CSC code. σ(m(x)) ∈ (m(x)). From now on, let the polynomials m1(x), m2(x),..., mt(x) ∈ F[x] form the unique irreducible decomposition This is clearly the case for m(x)= xℓ − 1 since σ(xℓ − 1) = ℓ ℓ x − 1. We will see less trivial cases later on. x − 1= m1(x)m2(x) ··· mt(x) (14) Observe that S is a commutative ring, but it is not an integral domain in general, thus R is not an integral domain in general. of xℓ − 1 in the polynomial ring F[x]. Note that, in this case, the fact that zx = xz comes from rule Recall from Subsection II-A that we are assuming that Fq = F s ℓ (6) in the definition of skew polynomial rings and σ(x)= x. q0 contains all roots of x − 1. Recall from Subsection II-C We may also identify Fn with R as vector spaces over F. that σ : F −→ F is given by σ(a)= aq, for a ∈ F. Combining In this case, we may use ν : Fn −→ R given by these two facts, we deduce that σ(a)= a, for every root a of ℓ x − 1. Since the roots of mi(x) are a subset of the roots of N−1 ℓ−1 ℓ x − 1, its coefficients lie in Fq too, or in other words, ν c(0), c(1),..., c(ℓ−1) = c(i)xi zj , (13)  j  j=0 i=0 !   X X σ(mi(x)) = mi(x),   (i) (i) (i) (i) FN where c = (c0 ,c1 ,...,cN−1) ∈ , for i =0, 1,...,ℓ− for all i =1, 2,...,t. Hence, as in (12), we may extend σ to 1. F[x] F[x] We have the following algebraic characterization of CSC σ : −→ , codes. (mi(x)) (mi(x)) Theorem 1. Let C ⊆ Fn be a code, which we do not assume satisfying σ(x)= x, for i =1, 2,...,t. ℓ to be linear. The following are equivalent: Assume from now on that x − 1 has simple roots (i.e., p does not divide ℓ), then m (x) 6= m (x) if i 6= j. By the 1) C ⊆ Fn is a CSC code. i j B´ezout identities in the polynomial ring (F ∩ Fqs )[x] over the 2) µ(C) ⊆ R′ is a left ideal of R′. 0 finite field F∩Fqs , there exist ai(x),bi(x) ∈ (F∩Fqs )[x] such 3) ν(C) ⊆ R is a left ideal of R. 0 0 that Proof. For all c ∈ Fn, it holds that xℓ − 1 a (x) + b (x)m (x)=1, (15) i m (x) i i xµ(c)= µ(ϕ(c)) and zµ(c)= µ(φ(c)).  i  for i = 1, 2,...,t. Define the ith primitive idempotent [25, F Hence C is -linear, ϕ(C) ⊆C and φ(C) ⊆C if, and only if, Sec. 4.3] as µ(C) is F-linear, xµ(C) ⊆ µ(C) and zµ(C) ⊆ µ(C). The latter ′ three conditions are equivalent to µ(C) being a left ideal of R . ei(x)= ai(x)m1(x) ··· mi−1(x)mi+1(x) ··· mt(x) This proves the equivalence of items 1 and 2. The equivalence xℓ − 1 (16) = ai(x) ∈ (F ∩ Fqs )[x], with item 3 is analogous. m (x) 0  i  6

N for i =1, 2,...,t. Note that ei(x) is not idempotent in F[x], Finally, we can extend ρ0 to ρ by noting that ρ0(z − 1)=0. but its image in F[x]/(xℓ − 1) is (see (17) below). Note also This shows that ρ is well-defined and a ring morphism. F F s that, since ei(x) ∈ ( ∩ q0 )[x], then The fact that ρ and τ are bijective, i.e., ring isomorphisms, can be shown coefficient-wise by using that (18) is a ring σ(ei(x)) = ei(x), isomorphism. Similarly, the other statements of the theorem for i = 1, 2,...,t, and in fact, it lies in the center of R (or can be proven coefficient-wise using the Chinese Remainder R′) as it is constant in z. Theorem. We may now state and prove the following result. The following codes will be useful thanks to Lemma 5. Lemma 5. Define the rings Definition 6. Let πi : R1 × R2 ×···×Rt −→ Ri denote Si[z; σ] F[x] the projection map onto Ri, for i =1, 2,...,t. Given a CSC Ri = N , where Si = , (z − 1) (mi(x)) code C ⊆ R, we define its ith skew-cyclic component as for . The natural maps Si[z; σ] i =1, 2,...,t C(i) = π (ρ(C)) ⊆ R = , i i (zN − 1) ρ : R −→ R1 × R2 ×···×Rt, and τ : S[z; σ] −→ (S1 × S2 ×···×St)[z; σ], which is a skew-cyclic code of length N over the field Si (recall that mi(x) is irreducible) with field automorphism σ : given simply by projecting modulo the corresponding mi(x), Si −→ Si, for i =1, 2,...,t. N−1 ℓ j We may now state and prove the main result of this ρ (fj (x) + (x − 1))z =   subsection. j=0 X Theorem 2. If C ⊆ R is a CSC code, then it holds that N−1   j (1) (2) (t) (fj(x) + (m1(x)),...,fj (x) + (mt(x))) z , ρ(C)= C ×C ×···×C . j=0 X In addition, there exist unique g(x, z),h(x, z) ∈ S[z; σ] and analogously for τ, are well-defined ring isomorphisms. In satisfying the following three properties: addition, it holds that 1) Their projections onto Si[z; σ] are monic in z, for i = t ρ(ei(x)) = τ(ei(x)) = ei = (0,..., 1,..., 0) ∈ F , (17) 1, 2,...,t. 2) It holds that Ft where ei ∈ has all of its components equal to 0 except its C = (g(x, z)) ith component, which is equal to 1, for i =1, 2,...,t. N Finally, given fi(x, z) ∈ Ri, for i =1, 2,...,t, the unique in the ring R = S[z; σ]/(z − 1). f(x, z) ∈ R, such that ρ(f(x, z)) = (f1(x, z), f2(x, z),..., 3) It holds that ft(x, z)), is given by g(x, z)h(x, z)= h(x, z)g(x, z)= zN − 1 t t in the ring S[z; σ]. f(x, z)= ei(x)fi(x, z)= fi(x, z)ei(x), ′ i=1 i=1 In particular, C is a principal left ideal and R and R are X X e e PIRs. where fi(x, z) ∈ R is such that its projection onto Ri is Furthermore, the images of g(x, z) and h(x, z) in Si[z; σ], fi(x, z). Analogously for τ. denoted by gi(x, z),hi(x, z) ∈ Si[z; σ], are the minimal e Proof. By the Chinese Remainder Theorem [24, Sec. 10.9, Th. generator and check skew polynomials, respectively, of the (i) 5], the natural map ith skew-cyclic component C ⊆ Ri, for i = 1, 2,...,t. In particular, it holds that F[x] F[x] F[x] ℓ −→ ×···× (18) t t (x − 1) (m1(x)) (mt(x))       g(x, z)= ei(x)gi(x, z)= gi(x, z)ei(x), and = = i=1 i=1 S S1×S2×···×St Xt Xt (19) is a ring isomorphism. The map τ is just extending such a e e h(x, z)= ei(x)hi(x, z)= hi(x, z)ei(x), ring isomorphism to the corresponding skew polynomial rings. i=1 i=1 X X This can be done since σ commutes with the map in (18), e e which holds since σ(x) = x, for σ defined over all domains in the ring S[z; σ], for any gi(x, z), hi(x, z) ∈ S[z; σ] such that their projections onto Si[z; σ] are gi(x, z) and hi(x, z), S, S1, S2,..., St. Next, there is a natural surjective ring morphism respectively. e e Proof. It follows directly from Lemma 5 (mainly (17)) and (S1 × S2 ×···×St)[z; σ] −→ R1 × R2 ×···×Rt. the corresponding results for skew-cyclic codes (for instance, By composing it with τ, we obtain the ring morphism [26, Lemma 1] or [45, Th. 1, 2]). F[x] Theorem 2 motivates the following definition. ρ : [z; σ] −→ R × R ×···×R . 0 (xℓ − 1) 1 2 t   7

Definition 7. Let C ⊆ R be a CSC code, and let for i = 1, 2,...,t. Thus we deduce the result by using g(x, z),h(x, z) ∈ S[z; σ] be as in Theorem 2. We say that Theorem 2 and g(x, z) is the minimal generator skew polynomial of C, and ρ(e (x)g(x, z)) = e g (x, z), h(x, z) is the minimal check skew polynomial of C. i i i As expected, Definition 7 above recovers the classical for i =1, 2,...,t. definition of minimal generator and check skew polynomials Remark 8. It may happen that ki =0 for some i =1, 2,...,t. N (i) when ℓ =1 [45, Th. 1]. However, in the classical cyclic case This means that gi(x, z)= z − 1 and C = {0}. This also m = N =1, it holds that means that the ith term in the sum (22) does not exist.

g(x, z)= ei(x)+ ej (x)(z − 1), and The first important consequence of the previous theorem is i∈I j∈[t]\I obtaining a generator matrix of a CSC code over its defining X X (20) field, F. h(x, z)= ej (x)+ ei(x)(z − 1), j∈[t]\I i∈I Corollary 9. Let C ⊆ R be a CSC code, and let g(x, z) ∈ X X S[z; σ] be its minimal generator skew polynomial. Taking for a set . Hence the image of in coincides I ⊆ [t] g(x, z) R images in R, let with the unique idempotent generator of C [25, Th. 4.3.2], ℓ N ℓ which is ei(x) ∈ F[x]/(x − 1) [25, Th. 4.3.8 (vi)]. −1 −1 i∈I (h) h j ei(x)g(x, z)= g x z ∈ R,  i,j  P j=0 h=0 ! B. Finding a Generator Matrix and the Dimension X X and define   We next obtain a basis of a CSC code as a vector space from (0) (1) (ℓ−1) n its minimal generator skew polynomial. The assumptions and gi = (g , g ,..., g ) ∈ F , where i i i (23) (h) (h) (h) (h) FN notation will be as in Subsection IV-A. gi = (gi,0 ,gi,1 ,...,gi,N−1) ∈ , Theorem 3. Let C ⊆ R be a CSC code, and let g(x, z) ∈ for h =0, 1,...,ℓ − 1 and i =1, 2,...,t. Then the vectors S[z; σ] be its minimal generator skew polynomial. Given c ∈ u v g Fn (24) Fn and c(x, z)= ν(c) ∈ R, it holds that c(x, z) ∈C if, and ϕ (φ ( i)) ∈ , only if, there exist coefficients for u = 0, 1,...,di − 1, for v = 0, 1,...,ki − 1, for i = 1, 2,...,t, form a basis of C ⊆ Fn over F, and thus they form λ(i) ∈ F, (21) u,v the rows of a generator matrix of C over F. for u = 0, 1,...,di − 1, for v = 0, 1,...,ki − 1, for i = The second important consequence is finding the dimension 1, 2,...,t, such that of a CSC code from its minimal generator skew polynomial. t ki−1 di−1 Corollary 10. Let be a CSC code. Let (i) u v C ⊆ R g(x, z) ∈ S[z; σ] c(x, z)= λ x z ei(x)g(x, z) (22) u,v be its minimal generator skew polynomial, and let gi(x, z) ∈ i=1 v=0 u=0 ! X X X Si[z; σ] be its projection onto Si[z; σ], for i = 1, 2,...,t. It inside the ring R, where holds that t (i) ki = N − degz(gi(x, z)) and di = degx(mi(x)), dimF(C)= dimF C i=1   for i = 1, 2,...,t, denoting by degx(·) the degree in x, and Xt similarly for other variables. Furthermore, the coefficients = deg (mi(x)) (N − deg (gi(x, z))) in (21) are unique among coefficients in F satisfying (22). x z i=1 In particular, a basis of C over F is formed by the skew X t polynomials = n − degx(mi(x)) degz(gi(x, z)). u v x z e (x)g(x, z) ∈ R, i=1 i X (Recall that 0 ≤ deg (g (x, z)) ≤ N and deg (g (x, z)) = N for u = 0, 1,...,d − 1, for v = 0, 1,...,k − 1, for i = z i z i i i if, and only if, g (x, z)= zN − 1, for i =1, 2,...,t.) 1, 2,...,t. i Remark 11. Note that deg (g (x, z)) is needed in Corollaries Proof. By Theorem 2 and the corresponding result for skew- z i 9 and 10. It is left to the reader to verify that cyclic codes (see, e.g., [45, Th. 1]), it holds that deg (ei(x)g(x, z)) = deg (gi(x, z)), ki−1 z z gi(x, z),zgi(x, z),...,z gi(x, z) ∈ Ri considering ei(x)g(x, z) ∈ S[z; σ] and gi(x, z) ∈ Si[z; σ], for (i) form a basis of the skew-cyclic code C ⊆ Ri = i =1, 2,...,t. N Si[z; σ]/(z − 1) over the field Si, for i = 1, 2,...,t. We conclude by showing briefly which generator matrix one Furthermore, we obtain a basis of Si over F formed by obtains from (24) in the cases m = N = 1 (classical cyclic 2 di−1 1, x, x ,...,x ∈ Si, codes) and ℓ =1 (skew-cyclic codes). 8

First, if ℓ = 1, then t = 1, d1 = 1, e1(x)=1, S =∼ F where G0, G1,...,Gd ∈ K. We denote the set of such naturally, and we may consider g(x, z) = g(z) ∈ F[z; σ]. In linearized polynomials by LqK[y]. Finally, given a skew this case, the basis rows in (24) are polynomial of the form

g, φ(g), φ2(g),...,φk−1(g) ∈ FN , 2 d f(z)= f0 + f1z + f2z + ··· + fdz ∈ K[z; σ], where g ∈ FN is formed by the first N coefficients of where f ,f ,...,f ∈ K, we define its associated linearized g(z) in z, and k = N − deg (g(z)). Hence we recover the 0 1 d z polynomial as generator matrix of a skew-cyclic code as well as the well- known formula for its dimension (see, e.g., items 3 and 4 in σ q q2 qd f (y)= f0y + f1y + f2y + ··· + fdy ∈ LqK[y]. [45, Th. 1]).

Finally, if m = N =1, then as shown in (20), we have that The set LqK[y] forms a ring with usual addition and with composition of maps as multiplication. As the reader may g(x, z)= e (x)+ e (x)(z − 1), i j check, this ring is isomorphic as a ring to the skew polynomial i∈I j∈[t]\I X X ring K[z; σ] by mapping a skew polynomial to its associated for a set I ⊆ [t]. Then the rows of the generator matrix of C, linearized polynomial. given in (24), are The following result connects the arithmetic evaluation of

2 di−1 ℓ skew polynomials from Definition 12 with the conventional ei, ϕ(ei), ϕ (ei),...,ϕ (ei) ∈ F , for i ∈ I, evaluation of linearized polynomials. This result can be easily ℓ where ei ∈ F is formed by the coefficients of ei(x) ∈ deduced from [47, Lemma 2.4] and is also a particular case ℓ F[x]/(x − 1), for i = 1, 2,...,t. This generator matrix of [19, Lemma 24]. corresponds to obtaining a classical cyclic code as a direct F sum of the minimal cyclic codes generated by the primitive Lemma 14. Given a skew polynomial f(z) ∈ qm [z; σ], it holds that idempotents ei(x), for i ∈ I, and then appending the generator matrices of these minimal cyclic codes obtained from their f(1β)= f σ(β)β−1, corresponding idempotent as in [25, Th. 4.3.6]. σ for all β ∈ Fqm \{0}, where f (β) is the conventional σ V. SETS OF ROOTS OF CYCLIC-SKEW-CYCLIC CODES evaluation of the associated linearized polynomial f (y) ∈ L F m [y] in β, and where we denote by In this section, we provide a basic theory of defining sets q q of CSC codes that we will need later. Throughout this section, 1β = σ(β)β−1 we will assume that N = m, since this is the case of interest for defining sum-Rank BCH codes (Section VII). the conjugate of 1 with respect to β (see Subsection VI-A). We may now define the evaluation maps on the roots of A. Defining Appropriate Evaluation Maps unity that we will use to provide defining sets of CSC codes. In this subsection, we define the evaluation maps that we F F will consider in order to define roots of skew polynomials in Definition 15. Given a ∈ q and β ∈ qm \{0} such that ℓ R =∼ R′. They will enable us to consider defining sets. a =1, we define the evaluation maps We start by revisiting the main definition of arithmetic F F qm [x] qm [x] ∼ evaluation of skew polynomials from [46], [47], which reads Eva : −→ = Fqm and (xℓ − 1) (x − a) as follows. F F σ qm [z; σ] qm [z; σ] Ev : −→ =∼ Fqm Definition 12 ([46], [47]). Given a skew polynomial f(z) ∈ β (zm − 1) (z − σ(β)β−1) Fqm [z; σ] and a field element α ∈ Fqm , we define the as the natural projection maps onto the corresponding quotient evaluation of f(z) at α as the unique element f(α) ∈ Fqm left modules. such that there exists a skew polynomial g(z) ∈ Fqm [z; σ] satisfying that Observe that the evaluation maps in Definition 15 are well- f(z)= g(z)(z − α)+ f(α). defined since Definition 12 is consistent by the right Euclidean division (xℓ − 1) ⊆ (x − a) and (zm − 1) ⊆ (z − σ(β)β−1), property of the skew polynomial ring Fqm [z; σ] [41]. ℓ We now turn to the important class of linearized polynomi- where the first inclusion follows from a =1, and the second m qm als [40, Sec. 3.4]. inclusion follows from σ (β) = β = β and Lemma 14. As expected, it holds that Definition 13. Let K be a finite field of characteristic p. We σ β say that a conventional polynomial G(y) ∈ K[y] is a lin- Eva(f(x)) = f(a) and Evβ(g(z)) = g(1 ), earized polynomial with coefficients in K and automorphism F ℓ F m σ : K −→ K, given by σ(a) = aq, for a ∈ K, if it has the for f(x) ∈ qm [x]/(x − 1) and g(z) ∈ qm [z; σ]/(z − 1). form We will also find it useful to consider the following partial q q2 qd evaluation map and evaluation skew-cyclic codes. G(y)= G0y + G1y + G2y + ··· + Gdy , 9

ℓ Definition 16. Given a ∈ Fq such that a =1, we define the Proposition 18. Assume that p does not divide ℓ. Let a ∈ Fq ℓ partial evaluation map be such that a =1, and let mi(x) ∈ F[x] be the irreducible ℓ F F component of x − 1 in F[x] such that mi(a)=0. Consider qm [x] [z; σ] qm [x] [z; σ] (xℓ−1) (x−a) Fqm [z; σ] the partial evaluation maps defined with the following domains Eva,z : −→ =∼  (zm − 1)  (zm − 1) (zm − 1) and codomains: F as the ring morphism given by [x] F Eva,z : Si[z; σ]= [z; σ] −→ mdi [z; σ], (25) q0 m−1 (mi(x)) Eva,z f0(x)+ f1(x)z + ··· + fm−1(x)z =   F[x] F m−1 [z; σ] mdi [z; σ] f0(a)+ f1(a)z + ··· + fm−1(a)z ,  (mi(x)) q0 Eva,z : Ri = m −→ m , (26) ℓ  (z −1) (z − 1) where f0(x),f1(x),...,fm−1(x) ∈ Fqm [x]/(x − 1). Finally, we will denote where di = degx(mi(x)). Then the maps (25) and (26) are Fqm [z; σ] ring isomorphisms, which moreover satisfy that f(a,z)=Eva,z(f(x, z)) ∈ m , (z − 1) (i) Eva,z C = C(a),

F m x   q [ ] for any CSC code C ⊆ R (Definitions 6 and 17). In particular, (xℓ−1) [z; σ] for f(x, z) ∈ . it holds that  (zm − 1) (i) We will use the same definition and notation for dimF C = dimF (C(a)) .

Fqm [x] Fqm [x]   Eva,z : [z; σ] −→ [z; σ] =∼ Fqm [z; σ]. Furthermore, if g(x, z) ∈ S[z; σ] is the minimal generator (xℓ − 1) (x − a)     skew polynomial of C, and gi(x, z) is its image in Si[z; σ] (i) It is left to the reader to prove that Eva,z is a ring morphism. (the minimal generator skew polynomial of C by Theorem To this end, the reader might find it useful to use that σ(a)= 2), then we have that q F a = a (a ∈ q by assumption) to show that F g(a,z)= gi(a,z) ∈ mdi [z; σ], q0 Eva,z (f(x, z)g(x, z)) = f(a,z)g(a,z), which moreover is the minimal generator skew polynomial of . Fqm [x] C(a) (xℓ−1) [z; σ] for f(x, z),g(x, z) ∈ . Proof. The fact that the maps Ev are well-defined and ring  m  a,z (z − 1) morphisms can be proven in the same way as for the map in Assume that p does not divide ℓ (i.e., the roots of xℓ − 1 ∈ Definition 16. The fact that they are ring isomorphisms can ℓ Fp[x] are simple). Observe that, if a ∈ Fq is such that a =1, be seen from the fact that the natural evaluation map then F [x] F F[x] Eva : −→ mdi q0 F mdi [z; σ] ℓ [z; σ] (mi(x)) q0 (x −1) f(a,z) ∈ m , for f(x, z) ∈ m . (z − 1)  (z − 1) is a field isomorphism. The fact that g(a,z)= gi(a,z) follows from (19) and Recall that we are denoting di = degx(mi(x)) (Theorem F F m F ej (a)= δi,j , 3) and = q0 , where mi(x) ∈ [x] is the irreducible ℓ component of x − 1 in F[x] such that mi(a) = 0 (see where δi,j is the Kronecker delta, for j = 1, 2,...,t, which Subsection IV-A). We may now give the following useful in turn follows from (15) and (16). The rest of the statements definition. follow directly from g(a,z)= gi(a,z), the definitions and the Definition 17. Assume that p does not divide ℓ. Given a CSC fact that the maps (25) and (26) are ring isomorphisms. code C ⊆ R and an element a ∈ F such that aℓ = 1, we q What we will want from Proposition 18 is the following define its evaluation skew-cyclic code on a as important consequence. It follows directly from Lemma 5 and F mdi [z; σ] Proposition 18. q0 C(a)= {c(a,z) | c(x, z) ∈C}⊆ m , (z − 1) Corollary 19. Assume that p does not divide ℓ. Let xℓ − F which is a skew-cyclic code of length m over the field mdi 1= m1(x)m2(x) ··· mt(x) be the irreducible decomposition q0 ℓ F F of x − 1 in F[x], and choose a1,a2,...,at ∈ Fq such that with field automorphism σ : mdi −→ mdi , where mi(x) ∈ q0 q0 F ℓ F mi(ai)=0, for i =1, 2,...,t. Denote a = (a1,a2,...,at) ∈ [x] is the irreducible component of x − 1 in [x] such that Ft q. Then the map mi(a)=0, and where di = degx(mi(x)). F (i) [x] We have the following identification between C(a) and C ℓ [z; σ] F md1 [z; σ] F mdt [z; σ] (x −1) q0 q0 (Definition 6), whose connection is the fact that . Eva,z : −→ ×···× , mi(a)=0  (zm − 1) (zm − 1) (zm − 1) This also proves that C(a) is a skew-cyclic code. = R 10

given by Eva,z(f(x, z)) = (f(a1,z), f(a2,z),...,f(at,z)), Lemma 22. Given a ∈ Fq and β ∈ Fqm \{0} such that for f(x, z) ∈ R, is a ring isomorphism. In particular, for any aℓ =1, it holds that CSC code C ⊆ R, it holds that Eva,β(f(x, z)g(x, z))=0 if Eva,β(g(x, z))=0, Eva,z(C)= C(a1) ×C(a2) ×···×C(at), and t Fqm [x] (xℓ−1) [z; σ] dimF(C)= dimF(C(ai)), for f(x, z),g(x, z) ∈ .  m  i=1 (z − 1) X and, for a given c(x, z) ∈ R, the following are equivalent: Theorem 4. Assume that p does not divide ℓ. Given a CSC code C ⊆ R, the following hold: 1) c(x, z) ∈C. 2) , for all F such that ℓ . 1) Given c(x, z) ∈ R, it holds that c(x, z) ∈C if, and only c(a,z) ∈C(a) a ∈ q a =1 β if, c(a, 1 )=0, for all (a,β) ∈ TC. 3) c(ai,z) ∈C(ai), for all i =1, 2,...,t. 2) Given another CSC code C ⊆ R, it holds that C = C if, We conclude this subsection by defining total evaluation e and only if, TC = TC. maps. Proof. Item 2 follows immediatelye from item 1, hence we onlye Definition 20. Given a ∈ Fq and β ∈ Fqm \{0} such that prove item 1. aℓ =1, we define the total evaluation map First, if c(x, z) ∈C, then c(a, 1β)=0 by Lemma 22, since β Fqm [x] Fqm [x] g(x, z) divides c(x, z) on the right and g(a, 1 )=0, for all ℓ [z; σ] [z; σ] (x −1) (x−a) (a,β) ∈ TC. ∼ F m Eva,β : m −→ −1 = q β  (z − 1) (z − σ(β)β ) Conversely, assume that c(a, 1 )=0, for all (a,β) ∈ TC. ℓ Fix an element a ∈ Fq such that a = 1. By the assumption as the composition map β on c(x, z) and the definition of TC, it holds that c(a, 1 )=0, σ F β σ Eva,β = Evβ ◦ Eva,z. for all β ∈ qm \{0} such that g(a, 1 )=Evβ(g(a,z))=0. By the corresponding result for skew-cyclic codes [45, Th. By Lemma 14, the total evaluation map is also given by 2], we have that c(a,z) ∈ C(a), since g(a,z) is the minimal m−1 Eva,β f0(x)+ f1(x)z + ··· + fm−1(x)z generator skew polynomial of C(a) (Proposition 18). Thus, −1 m−1 −1 we have shown that c(a,z) ∈ C(a), for all a ∈ Fq such that = f0(a)+ f1(a)σ(β)β + ··· + fm−1(a)σ  (β)β ℓ m−1 −1 a = 1. By Corollary 19, we conclude that c(x, z) ∈ C, and = f0(a)β + f1(a)σ(β)+ ··· + fm−1(a)σ (β) β , we are done. (27)  We conclude by computing the dimension of a CSC code F ℓ where f0(x),f1(x),...,fm−1(x) ∈ qm [x]/(x − 1). We will from its defining set. sometimes use the notation Theorem 5. Assume that p does not divide ℓ. Let C ⊆ R be F m x q [ ] ℓ (xℓ−1) [z; σ] a CSC code. For a ∈ Fq such that a =1, define f(a, 1β)=Ev (f(x, z)), for f(x, z) ∈ . a,β  m  (z − 1) TC(a)= {β ∈ Fqm \{0} | (a,β) ∈ TC} (28) F σ = {β ∈ qm \{0} | Evβ(g(a,z))=0}, B. The Defining Set which satisfies that T (a) ∪{0}⊆ F m is a vector space over In this subsection, we show that the zeros of the minimal C q F . Let xℓ − 1 = m (x)m (x) ··· m (x) be the irreducible skew polynomial generator define a CSC code, as in the q 1 2 t decomposition of xℓ − 1 in F[x], and choose a ,a ,...,a ∈ particular cases of classical cyclic codes [25, Th. 4.4.2] and 1 2 t F such that m (a )=0, for i =1, 2,...,t. It holds that skew-cyclic codes [45, Th. 2]. We will use such defining sets q i i to obtain the sum-rank BCH bound (Theorem 7) and a lower t F F bound on the dimensions of sum-rank BCH codes (Theorem dim (C)= degx(mi(x)) m − dim q (TC(ai) ∪{0}) 9). i=1 X t  We start by the following definition. = n − degx(mi(x)) dimFq (TC(ai) ∪{0}). Definition 21 (Defining Set). Given a CSC code C ⊆ R i=1 X with minimal generator skew polynomial g(x, z) ∈ S[z; σ], Proof. The fact that TC(a)∪{0} is a vector space over Fq, for ℓ we define the defining set of C as a ∈ Fq such that a =1, follows directly from Lemma 14. ℓ Fix a ∈ Fq such that a = 1. Let g(x, z) ∈ S[z; σ] be TC = {(a,β) ∈ Fq × (Fqm \{0}) | ℓ the minimal generator skew polynomial of C. By Proposition a =1, Eva,β(g(x, z))=0}. 18, g(a,z) ∈ F mdi [z; σ] is the minimal generator skew q0 As the name suggests, the defining set of a CSC code polynomial of C(a). actually defines the CSC code. This is gathered in Theorem Consider the extended code over Fqm 4 below. We will need the following lemma, which follows C(a) ⊗ F m = {λc(a,z) | from the product rule [47, Th. 2.7], but can easily be proven q Fqm [z; σ] from scratch. λ ∈ F m ,c(a,z) ∈C(a)}⊆ , q (zm − 1) 11 which is also a skew-cyclic code. Using item 5 in [45, Th. A. Revisiting Linearized RS Codes F 2], we deduce that g(a,z) ∈ qm [z; σ] is also the minimal As before, we also consider the length partition n = ℓN generator skew polynomial of C(a) ⊗ Fqm , since it divides m (Subsection II-B). However, we need to assume that 1 ≤ ℓ ≤ z − 1 on the right. Furthermore, using Lemma 14, we can q − 1 and 1 ≤ N ≤ m. Therefore n ≤ (q − 1)m. see that TC(a) ∪ {0} is the set of roots of the linearized Recall that we consider σ : Fqm −→ Fqm given by σ(a)= polynomial associated to g(a,z) ∈ Fqm [z; σ] (Definition 13). q a , for all a ∈ Fqm . We need to define linear operators as in Thus, applying item 2 in [45, Th. 2] on the skew-cyclic code [19, Def. 20]. C(a) ⊗ Fqm , we deduce that its dimension over Fqm is given by Definition 23 (Linear operators [19]). Fix a ∈ Fqm , and i−1 define its ith norm as Ni(a) = σ (a) ··· σ(a)a, for i ∈ N. F F m F dim qm (C(a) ⊗ q )= m − dim q (TC(a) ∪{0}) . (29) F i F F Define the q-linear operator Da : qm −→ qm by The reader can also verify the identities i i Da(b)= σ (b)Ni(a), F m dimFqm (C(a) ⊗ q ) = dimF md (C(a)) , q i 0 for b ∈ Fqm and i ∈ N. dimF (C(a)) = deg (m (x)) dimF (C(a)) . x i mdi q0 F (30) We say that a,b ∈ qm are conjugate (with respect to −1 F m ) if there exists F m such that Combining Corollary 19 with (29) and (30) for a1,a2,...,at, q [z; σ] c ∈ q \{0} b = σ(c)c a we conclude that (see [46] [47, Eq. (2.5)]). Let A = {a0,a1,...,aℓ−1} ⊆ F t qm \{0} be a set of ℓ pair-wise non-conjugate elements. F dimF (C)= dimF(C(a )) Let Bi = {βi,0,βi,1,...,βi,N−1} ⊆ qm be a set of N i F F i=1 elements of qm that are linearly independent over q, for X t i =0, 1,...,ℓ−1. Denote B = (B0, B1,..., Bℓ−1) and define

= degx(mi(x)) m − dimFq (TC(ai) ∪{0}) , the matrix i=1 k×n X  D(A, B) = (D |D | ... |D ) ∈ F m , (31) and we are done. 0 1 ℓ−1 q To conclude, we discuss the cases ℓ =1 and m =1. where

First, in the skew-cyclic case ℓ =1, Definition 21 coincides βi,0 βi,1 ... βi,N−1 with [45, Def. 2] after removing the redundant unique root Dai (βi,0) Dai (βi,1) ... Dai (βi,N−1)  2 2 2  of unity a = 1. Note that [45, Def. 2] uses the associated D (βi, ) D (βi, ) ... D (βi,N ) Di = ai 0 ai 1 ai −1 , linearized polynomial (Definition 13) of the minimal generator  . . .. .  skew polynomial. Finally, Theorems 4 and 5 recover items 3  . . . .   k−1 k−1 k−1   D (βi, ) D (βi, ) ... D (βi,N )  and 2 in [45, Th. 2], respectively.  ai 0 ai 1 ai −1    We now turn to the classical cyclic case m =1. With nota- for i =0, 1,...,ℓ−1, for k =1, 2,...,n. Then the following tion as in (20), the reader may verify (using that ej (a)= δi,j definition is a particular case of [19, Def. 31]. if mi(a)=0) that Definition 24 (Linearized Reed-Solomon codes [19]). For F F TC = {(a,β) ∈ q × ( q \{0}) | k =1, 2,...,n, we define the linearized Reed-Solomon code mi(a)=0, for some i∈ / I}. of dimension k, set of pair-wise non-conjugate elements A and σ In other words, after removing the second component β ∈ linearly independent sets B, as the linear code Ck (A, B) ⊆ n k×n F m with generator matrix D(A, B) ∈ F m as in (31). Fq \{0}, TC is exactly the set of roots of unity that are roots q q of the idempotent generator of C. Such set is precisely the The following result is [19, Th. 4] and states that linearized set of roots of the minimal generator polynomial of C. Thus Reed-Solomon codes attain equality in (4), expressing size in Definition 21 coincides with the standard definition of defining terms of dimension. set of a classical cyclic code [24, Sec. 7.5] [25, Sec. 4.4]. Furthermore, Theorems 4 and 5 recover items (iii) and (iv) in Proposition 25 ([19]). For k = 1, 2,...,n, the linearized σ Fn [25, Th. 4.4.2]. Reed-Solomon code Ck (A, B) ⊆ qm in Definition 24 is a k-dimensional Fqm -linear MSRD code for the finite-field F F VI. CYCLIC-SKEW-CYCLIC LINEARIZED REED-SOLOMON extension q ⊆ qm and length partition n = ℓN as in (2). CODES That is, it satisfies that In this subsection, we revisit linearized Reed-Solomon σ dSR(Ck (A, B)) = n − k +1. codes [19], [20] and provide one of their subfamilies formed by CSC codes. They will be crucial for proving the sum-rank As observed in [19, Sec. 3] and [2, Subsec. IV-A], linearized BCH bound (Theorem 7) and defining sum-rank BCH codes Reed-Solomon codes recover (generalized) Reed-Solomon (Definition 30). codes [21] when m = N = 1, and they recover Gabidulin F F m s Recall that = q0 , by definition (1), and that q = q0 codes [9], [12] when ℓ = 1. These are the cases when the for some positive integer s. In this section, we will only work sum-rank metric particularizes to the Hamming metric and the with the finite-field extension Fq ⊆ Fqm . rank metric, respectively. 12

B. Non-Conjugate Roots of Unity In this subsection, we assume that: (1) N = m; (2) ℓ and m ℓ The next lemma is a general result on ℓth roots of unity and are coprime; (3) ℓ and q are coprime; and (4) x −1 has all of s its ℓ distinct roots in Fq (q = q ), i.e., ℓ divides q − 1. In the conjugacy with respect to Fqm [z; σ], but we have not been able 0 to find it in the literature. It will enable us to obtain linearized classical cyclic case m = 1, condition 2 is trivially satisfied, Reed-Solomon codes that are also CSC codes (Subsection whereas in the skew-cyclic case ℓ = 1, conditions 2, 3 and VI-C), which in turn will allow us to obtain Sum-Rank BCH 4 are all trivially satisfied. Note that condition 2 is satisfied codes (Subsection VII-A). whether ℓ =1 or m =1. Let a ∈ Fq be a primitive ℓth root of unity, meaning that Lemma 26. Recall that we are assuming throughout the the set of roots of xℓ − 1 is given by manuscript that Fq contains all ℓth roots of unity. Assume also that there are exactly ℓ distinct ℓth roots of unity, that is, p does 0 1 2 ℓ−1 A = a ,a ,a ,...,a ⊆ Fq \{0}. not divide ℓ. Then the following conditions are equivalent: ℓ  1) The roots of x −1 ∈ Fp[x] are pair-wise non-conjugate Such a primitive root always exists [25, Page 105] [40, Sec. with respect to Fqm [z; σ] (see Subsection VI-A). 2.4]. Since we are assuming that ℓ is coprime with both q 2) ℓ and m are coprime. and m, the set A is formed by ℓ distinct and pair-wise non- conjugate elements by Lemma 26. Proof. By assumption, we have ℓ distinct roots of xℓ − 1, all F inside F . Let a ∈ F be a primitive ℓth root of unity, meaning Next, let β ∈ qm be a normal element of the extension q q F F that all the ℓth roots of unity are given by a0,a1,...,aℓ−1. q ⊆ qm . In other words, Such primitive roots always exist [25, Page 105] [40, Sec. 2.4] 2 m−1 F (see also the next subsection). By Hilbert’s Theorem 90 [40, β, σ(β), σ (β),...,σ (β) ⊆ qm Ex. 2.33], there exist two distinct ℓth roots of unity ai and aj  F F that are conjugate if, and only if, forms a basis of qm over q. Recall that normal elements exist for any extension of finite fields [40, Th. 3.73]. We fix m − m− im i q 1 j q 1 jm a = (a ) q−1 = (a ) q−1 = a , an integer b ≥ 0. For i =0, 1,...,ℓ − 1, note that the element bi βa ∈ Fqm is also normal. Denote the corresponding basis where 0 ≤ i < j ≤ ℓ − 1. Now, since a is a primitive ℓth root by of unity, such a condition may happen if, and only if, ℓ and m share a common factor. bi bi m−1 bi Bi = βa , σ(β)a ,...,σ (β)a ⊆ Fqm (32) Remark 27. Note that, as a particular case of Lemma 26, the  bi bi bi (recall that a ∈ Fq, thus σ(a ) = a ). We define B = q − 1 elements in Fq \{0} are pair-wise non-conjugate with (B0, B1,..., Bℓ−1). respect to Fqm [z; σ] if, and only if, q − 1 and m are coprime (note that the assumptions in Lemma 26 above are trivially For k = 1, 2,...,n, the corresponding linearized Reed- σ Fn satisfied for ℓ = q − 1). Solomon code Ck (A, B) ⊆ qm (Definition 24) is given by Fk×n the generator matrix D(A, B) = (D0|D1| ... |Dℓ−1) ∈ qm , Remark 28. Applying the definition of conjugacy directly (see k×m where n = ℓm and D ∈ F m is given by Subsection VI-A), without making use of Hilbert’s Theorem i q

90, the reader may arrive at the fact that item 1 in Lemma bi bi m−1 bi qm−1 βa σ(β)a ... σ (β)a 26 is also equivalent to ℓ and q−1 being coprime. Indeed, σ(β)a(b+1)i σ2(β)a(b+1)i ... βa(b+1)i this latter condition is equivalent to ℓ and m being coprime,  σ2(β)a(b+2)i σ3(β)a(b+2)i ... σ(β)a(b+2)i  F , under the assumption that ℓ divides q −1 (i.e., q contains all  . . . .   . . .. .  ℓth roots of unity), as in Lemma 26 above. To see this, note    σk−1(β)a(b+k−1)i σk(β)a(b+k−1)i ... σk−2(β)a(b+k−1)i  that     m−1 qm − 1 for all i =0, 1,...,ℓ − 1. − m = (qi − 1) q − 1 We conclude with the main result of this section, whose i=1 proof is left to the reader. Xm−1 qi − 1 = (q − 1) Theorem 6. For , the linearized Reed-Solomon q − 1 k =1, 2,...,n i=1 ! σ Fn Fn X code Ck (A, B) ⊆ qm as above is a CSC code in qm with is divisible by ℓ if q − 1 is divisible by ℓ. In such a case, a field automorphism σ : Fqm −→ Fqm (Definition 4). qm−1 factor of ℓ divides q−1 if, and only if, it divides m.

VII. SUM-RANK BCH CODES C. Finding CSC Linearized RS Codes Combining Definition 24 and Lemma 26, we will describe a Throughout this section, we will make the same assumptions subfamily of linearized Reed-Solomon codes formed by CSC as in the beginning of Subsection VI-C, that is: (1) N = m; codes, which in addition recovers classical cyclic (generalized) (2) ℓ and m are coprime; (3) ℓ and q are coprime; and (4) ℓ ℓ Reed-Solomon codes and skew-cyclic Gabidulin codes when divides q − 1, i.e., x − 1 has all of its ℓ distinct roots in Fq s setting m = N =1 and ℓ =1, respectively. (q = q0). 13

A. The Sum-Rank BCH Bound Leading to SR-BCH Codes SR-BCH codes recover classical BCH codes [24, Sec. 7.6] b b In this subsection, we provide a lower bound on the mini- [25, Sec. 5.1] when m =1 (in that case, Cδ(a ,β)= Cδ(a , 1) F mum sum-rank distance of CSC codes based on their defining for any β ∈ qm \{0}), and they recover rank-metric BCH set (Definition 21), which will allow us to define Sum-Rank codes [39, Page 272] [45, Def. 7] when ℓ = 1 for the BCH codes (Definition 30). code length N = m. The latter are full-length skew-cyclic In order to prove our bound, we need the following lemma, Gabidulin codes [45, Sec. 5.2] if s = 1. Moreover, SR-BCH which is [5, Th. 7]. Recall from Subsection II-B that we denote codes form a subfamily of sum-rank alternant codes [5, Def. 0 12], which in turn recover classical alternant codes [24, Ch. by dSR and dSR the sum-rank metrics over the finite-field F F m F F m 12] when m =1. extensions q ⊆ q and q0 ⊆ q0 , respectively, for the length partition n = ℓm as in (2) for N = m. The motivation for defining SR-BCH codes as in Definition 30 is to obtain the largest CSC code (hence hopefully having Fn Lemma 29 ([5]). For a code C ⊆ qm (we do not assume maximum possible code size) for a prescribed distance in view that it is linear), it holds that of Theorem 7. This is shown in the following result. 0 Fn dSR (C ∩ ) ≥ dSR(C). (33) Proposition 31. With assumptions and notation as in Defi- nition 30, the SR-BCH code C (ab,β) ⊆ Fn is a CSC code. Theorem 7 (Sum-Rank BCH bound). Let a ∈ F be a δ q Moreover, it is the largest CSC code in Fn, with respect to set primitive ℓth root of unity and let β ∈ F m be a normal q inclusion, whose defining set contains the pairs in (34). element of the extension Fq ⊆ Fqm (see Subsection VI-C). Let Fn σ C ⊆ be a CSC code. If the defining set TC of C (Definition Proof. First, the linearized Reed-Solomon code Cδ−1(A, B) 21) contains the consecutive pairs in Fq × (Fqm \{0}), is a CSC code by Theorem 6. The reader may check that its Fn b b+1 b+δ−2 δ−2 dual code and the restriction of such a dual code to are a ,β , a , σ(β) ,..., a , σ (β) , (34) b also CSC codes. Thus Cδ(a ,β) is a CSC code. n for integers b ≥ 0 and 2 ≤ δ ≤ n, then it holds that Finally, if C ⊆ F is another CSC code whose defining set b contains the pairs in (34), then it holds that C⊆Cδ(a ,β) by 0 dSR(C) ≥ δ. the proof of Theorem 7, and we are done. Proof. If C satisfies the hypothesis, then by Theorem 4 and equation (27), it holds that B. The Defining Set of a SR-BCH Code In this subsection, we will give a method for finding the σ ⊥ Fn (35) C ⊆ Cδ−1(A, B) ∩ , defining set of a SR-BCH code directly from the pairs in σ (34), without explicitly computing its minimal generator skew where Cδ−1(A, B) is the (δ − 1)-dimensional linearized Reed- Solomon code (Definition 24) with A = {1,a,a2,...,aℓ−1} polynomial (Theorem 8). Thanks to Theorem 8, we will give, and B = (B0, B1,..., Bℓ−1) given by (32). in the following subsection, a lower bound on the dimension σ ⊥ Fn of SR-BCH codes that is easy to compute from the pairs (34). By [48, Th. 5], the dual Cδ−1(A, B) ⊆ qm is also an MSRD code, hence We will need the notion of minimal linearized polynomial, which we consider in a slightly more general form than in [40, σ ⊥ dSR Cδ−1(A, B) = n − (n − δ +1)+1= δ. (36) Sec. 3.4]. Combining (35), (36) and Lemma 29, we conclude that Definition 32. Given an extension K ⊆ L of finite fields of 0 dSR(C) ≥ δ. characteristic p and an arbitrary set B⊆ L, we say that G(y) ∈ (Definition 13) is the minimal linearized polynomial This bound recovers the well-known BCH bound [24, Sec. LqK[y] of in if it is the linearized polynomial of minimum 7.6, Th. 8] [25, Th. 4.5.3] (originally [37], [38]) in the classical B LqK[y] degree in L K[y] such that it is monic and G(β)=0, for all cyclic case m =1 and its rank-metric version [39, Prop. 1] in q β ∈B. the skew-cyclic case ℓ = 1. Note that [39, Prop. 1] is given for lengths N ≥ m, whereas here we only consider N = m. The minimal linearized polynomial of a given set exists We may now define Sum-Rank BCH codes with prescribed for any finite-field extension of characteristic p (to prove this, pe distance. consider, e.g., y − y ∈ LqK[y], where e = logp(q) logp |L|). Its uniqueness follows from the next lemma, whose proof Definition 30 (Sum-Rank BCH codes). Let a ∈ F be a q follows the same lines as [40, Th. 3.68] and is left to the primitive ℓth root of unity and let β ∈ F m be a normal q reader. element of the finite-field extension Fq ⊆ Fqm (see Subsection VI-C). Fix integers b ≥ 0 and 2 ≤ δ ≤ n. We define the Lemma 33. With notation as in Definition 32, let corresponding Sum-Rank BCH code (or SR-BCH code for F (y), G(y) ∈ LqK[y] be such that F (β)=0, for all β ∈B, short) with prescribed distance δ as and G(y) is the minimal linearized polynomial of B in LqK[y]. If F (y) and G(y) are the associated linearized polynomials C (ab,β)= Cσ (A, B)⊥ ∩ Fn, δ δ−1 of f(z),g(z) ∈ K[z; σ], respectively (see Definition 13), then σ Fn g(z) divides f(z) on the right in K[z; σ]. where Cδ−1(A, B) ⊆ qm is as in Definition 24, for A = {1, a, 2 ℓ−1 a , ..., a } and B = (B0, B1,..., Bℓ−1) given by Bi = We will also need the following three auxiliary lemmas. {βabi, σ(β)abi,...,σm−1(β)abi}, for i =0, 1,...,ℓ − 1. 14

ℓ Lemma 34. Let x − 1 = m1(x)m2(x) ··· mt(x) be the Then the conventional polynomial irreducible decomposition of xℓ − 1 in F[x], and choose G(y)= (y − β) ai ∈ Fq such that mi(ai)=0, for i = 1, 2,...,t. For each F m β∈V i =1, 2,...,t, let Bi = {βi,1,βi,2,...,βi,ki }⊆ q \{0} be Y a set that does not need to be linearly independent over F . q is the minimal linearized polynomial of B in LqF md [y]. q0 Let Gi(y) be the minimal linearized polynomial of Bi in F Proof. First, since B ⊆ Fqm , then V ⊆ Fqm , hence G(y) ∈ Lq mdi [y] (Definition 32), and assume that it is the associ- q0 F F F F qm [y]. Since V ⊆ qm is an q-linear vector space, we ated linearized polynomial of gi(z) ∈ qmdi [z; σ] (Definition 0 deduce from [40, Th. 3.52] that G(y) ∈ LqFqm [y]. 13), for i =1, 2,...,t. Finally, let gi(x, z) ∈ S[z; σ] be such F −1 Next, let F (y) ∈ Lq qm [y] be obtained from G(y) by that its projection onto Si[z; σ] is gi(x, z) = Evai,z(gi(z)), md raising each coefficient of G(y) to the q0 th power. Then F md md md where Evai,z : Si[z; σ] −→ mdi [z; σ] is the ring isomor- q q q q0 e F (β 0 ) = G(β) 0 = 0, for all β ∈ V. Since U 0 = U, phism from (25), for i =1, 2,...,t. Then the skew polynomial md then Vq0 = V, and therefore we deduce that F (β)=0, for t all β ∈V. Hence F (y)= G(y), thus the coefficients of G(y) g(x, z)= ei(x)gi(x, z) ∈ S[z; σ] (37) lie in F md . In other words, it holds that G(y) ∈ LqF md [y]. q0 q0 i=1 Now, let E(y) ∈ LqF md [y] be such that E(βi)=0, for X q0 is the minimal generator skew polynomiale of the largest CSC i =1, 2,...,k. Then umd qumd code C ⊆ R, with respect to set inclusion, whose defining set q0 0 0= E(βi) = E βi , TC contains the pairs   for i =1, 2,...,k, for u =0, 1,...,s/d − 1. In other words, (a ,β ) ∈ F × (F m \{0}), (38) i i,j q q E(β)=0, for all β ∈ U. Since the map β 7→ E(β) is linear F for j =1, 2,...,ki, for i =1, 2,...,t. over q, we conclude that E(β)=0, for all β ∈V. By the def- inition of G(y), it must holds that degy(G(y)) ≤ degy(E(y)), Proof. Fix an index i = 1, 2,...,t. By Lemma 33 and the and we are done. F paragraph prior to it, gi(z) ∈ qmdi [z; σ] exists, it is unique m 0 Next, we relate the defining sets of evaluation skew-cyclic and furthermore, it divides z − 1 on the right in F mdi [z; σ], q0 ℓ qm codes on roots of the same irreducible component of x − 1. since βi,j = βi,j , for j = 1, 2,...,ki. Since gi(z) divides m F md Lemma 36. Let be of degree less than , z − 1 on the right in q i [z; σ], it is the minimal generator g(x, z) ∈ S[z; σ] m 0 ′ ′ skew polynomial of the skew-cyclic code that it generates, and choose a,a ∈ Fq such that mi(a) = mi(a )=0, for m ℓ F md some i, 1 ≤ i ≤ t, where x − 1= m1(x)m2(x) ··· mt(x) is Ci = (gi(z)) ⊆ q i [z; σ]/(z −1), by item 5 in [45, Th. 2]. 0 the irreducible decomposition of xℓ − 1 in F[x]. The following Therefore, gi(x, z) ∈ Si[z; σ] is the minimal generator skew polynomial of hold: 1) There exists j = 0, 1, 2,...,di − 1, where di = (i) −1 jm C = Ev (Ci) ⊆ Ri, ′ q0 ai,z degx(mi(x)), such that a = a . 2) For β ∈ Fqm \{0}, we have that since Evai,z, given as in (26), is a ring isomorphism preserving jm degrees in z. β qjm βq0 g(a, 1 )=0 ⇐⇒ g a 0 , 1 =0. By Theorem 2, g(x, z) ∈ S[z; σ], given as in (37), is the minimal generator skew polynomial of the CSC code   As a consequence, for a CSC code C ⊆ R, we deduce −1 (1) (2) (t) that C = ρ C ×C ×···×C ⊆ R. jm jm q q TC a 0 = TC(a) 0 ,   It is only left to prove that C is the largest CSC code   with notation as in (28). in R whose defining set TC contains the pairs in (38). By Proposition 18, it holds that Ci = C(ai), for i =1, 2,...,t. Let Proof. Item 1 is a well-known result [25, Sec. 4.1] that follows β d −1 hm c(x, z) ∈ R be such that c(a , 1 i,j )=0, for j =1, 2,...,k , i q0 i i by observing that h=0 (x − a ) is the polynomial of for i = 1, 2,...,t. By Lemma 33, gi(z) divides c(ai,z) on minimum degree in F[x] that has a as a root, and hence it Q the right in R, thus c(ai,z) ∈ C(ai), for i = 1, 2,...,t. must coincide with mi(x). By Corollary 19, we conclude that c(x, z) ∈ C, and we are We now prove item 2. By equation (27), it holds that done. g(a, 1β)=0 if, and only if,

m−1 Lemma 35. Let B = {β1,β2,...,βk}⊆ Fqm be an arbitrary g0(a)β + g1(a)σ(β)+ ··· + gm−1(a)σ (β)=0, (39) set, let Z be a divisor of , and define d ∈ s ′ and similarly in the case of a , where g(x, z) = g0(x) + k m−1 umd g1(x)z + ··· + gm−1(x)z and gh(x) ∈ S, for h = q0 s U = βj | u =0, 1,..., − 1 , and 0, 1,...,m − 1. Since g (x) ∈ S, it holds that d h j=1 [ n o jm jm q0 q0 F m gh a = gh(a) , V = hUiFq ⊆ q .   15

for h =0, 1,...,m−1. Thus, equation (39) holds if, and only for λ =1, 2,...,ki, for i =1, 2,...,t. Hence, by Lemma 34, if, we have that since C is the largest CSC code containing such pairs (Propo- jm sition 31), we deduce that the linearized polynomial associated m−1 q0 e 0= g0(a)β + g1(a)σ(β)+ ··· + gm−1(a)σ (β) to the minimal generator skew polynomial of C(ab+ji ) is the qjm qjm qjm m−1 qjm = g0(a) 0 β 0 + ··· + gm−1(a) 0 σ (β) 0  minimal linearized polynomial of jm jm jm jm v q0 q0 q0 m−1 q0 q = g0 a β + ··· + gm−1 a σ β , Bi = {β 0 | v ∈{sjλ + mhλ (mod sm) | F and the result follows.     λ =1, 2,...,ki}} ⊆ qm F We may finally find the defining set of a SR-BCH in terms in Lq mdi [y], for i = 1, 2,...,t. By Lemma 35, such a q0 of the pairs (34), without explicitly computing its minimal minimal linearized polynomial is generator skew polynomial. G (y)= y − β , Theorem 8. Let a ∈ F be a primitive ℓth root of unity and let i q e β∈Vi β ∈ Fqm be a normal element of the extension Fq ⊆ Fqm (see Y   ℓ e Subsection VI-C). Fix integers b ≥ 0 and 2 ≤ δ ≤ n. Let x − e b+ji for i = 1, 2,...,t. By the definition of TC(a ) (see (28)), 1= m1(x)m2(x) ··· mt(x) be the irreducible decomposition ℓ Lemma 14 and Proposition 18, we conclude that item 1 holds, of x − 1 in F[x]. Define e b+ji i.e., TC(a )= Vi \{0}, for i =1, 2,...,t. b+j Ji = j ∈ N | 0 ≤ j ≤ δ − 2,mi(a )=0 Finally, item 2 follows from item 1 and Theorem 5. = {j , j ,...,j } ,  1 2 ki Remark 37. If, for some i =1, 2,...,t, it holds that Ji = ∅, where ki = |Ji|, and choose an arbitrary ji ∈ Ji, for i = then Bi = ∅ and Vi = {0}. Hence such a term does not Z 1, 2,...,t. There exist integers h1,h2,...,hki ∈ , satisfying appear in the sum in item 2 in Theorem 8. that 0 ≤ hλ ≤ di − 1 and e As usual, we conclude by discussing the cases m = 1 hλm b + ji ≡ (b + jλ)q0 (mod ℓ), (40) and ℓ = 1. In the classical cyclic case m = 1, Theorem 8 simply says that the defining set of a BCH code is the for λ = 1, 2,...,ki, for i = 1, 2,...,t. Define the Fq-linear e union of the cyclotomic sets that have a non-empty intersection vector subspace of Fqm : with the pairs in (34) [25, Eq. (5.1)]. In the skew-cyclic case qv Vi = β 0 | v ∈{sjλ + m(udi + hλ) (mod sm) | ℓ = 1, rank-metric BCH codes were also defined in terms of defining sets in [45, Def. 7]. However, the description in D s u =0, 1,..., − 1, λ =1, 2,...,ki} , Theorem 8 is new in this case to the best of our knowledge. di F  q Note that, setting s = 1 if ℓ = 1, then t = 1 and V1 = δ −2 F for i = 1, 2,...,t. The following properties hold for the hβ, σ(β),...,σ (β)i q , hence Theorem 8 is consistent with b n [45, Th. 6] for full-length skew-cyclic Gabidulin codes. corresponding SR-BCH code Cδ(a ,β) ⊆ F (Definition 30): b 1) The defining set of Cδ(a ,β) satisfies that e b+ji C. A Lower Bound on the Dimension of a SR-BCH Code b TCδ(a ,β) a = Vi \{0}, In this subsection, we will make use of Theorem 8 to obtain with notation as in (28), for i =1, 2,...,t. a simple lower bound on the dimension of SR-BCH codes. 2) The dimension of C (ab,β) over F is δ This bound only makes use of the first component of the pairs t in (34), and can be easily computed by using the corresponding b F F dim Cδ(a ,β) = n − degx(mi(x)) dim q (Vi). cyclotomic sets. We will show how to use it in Example 38, i=1  X and we will provide tables for a wide range of parameters in b Proof. Denote C = Cδ(a ,β) for simplicity. Appendix A. In those tables, it can be seen how our lower Z The existence of h1,h2,...,hki ∈ satisfying (40) and bound provides codes with a higher dimension for a given 0 ≤ hλ ≤ di − 1, for λ = 1, 2,...,ki, for i = 1, 2,...,t, minimum sum-rank distance than previously known (42). follows from item 1 in Lemma 36 and the fact that a is a Theorem 9. With assumptions and notation as in Theorem 8, primitive ℓth root of unity. By item 2 in Lemma 36, it holds it holds that that t sjλ q0 b+jλ b ski β ∈ TC a ⇐⇒ dimF Cδ(a ,β) ≥ n − di min m, , (41) h m di sjλ+mhλ q λ e i=1 q b+jλ 0 b+ji   β 0 ∈ TC a  = TC a .  X   where di = deg (mi(x)) as in Theorem 8, and    x In other words, the fact that TC contains the pairs in (34) is N b+j equivalent to the fact that TC contains the pairs ki = j ∈ | 0 ≤ j ≤ δ − 2,mi(a )=0 ≥ 0,

e sjλ+mhλ b+ji q0  a ,β , for i =1, 2,...,t.   16

We now briefly discuss the bound (41). First, in the classical {0}, {1, 4}, {2, 8}, {3, 12}, {5}, {6, 9}, {7, 13}, {10} and cyclic case m =1, the bound (41) is an equality and becomes {11, 14} (see [25, Sec. 4.1]). Choose δ =5 and b =1. Then the well-known formula the first components of the pairs in (34) are a1, a2, a3 and a4. t Thus we may assume that k1 =2 and d1 =2 (corresponding b 1 4 dimF Cδ(a , 1) = n − diεi, to a and a ), k2 = k3 =1 and d2 = d3 =2 (corresponding 2 3 i=1 to a and a , respectively), being all other k = 0. Thus the X i  lower bound (41) on the dimension of C (ab,β) yields where εi =1 if there exists an integer j such that 0 ≤ j ≤ δ−2 δ and m (ab+j )=0, and ε = 0 otherwise, for i = 1, 2,...,t. i i n − d1m − sk2 − sk3 = 18. In the skew-cyclic case ℓ =1, setting s =1 (which can always be done), we recover the dimension of full-length (N = m) On the other hand, the Singleton bound (4) and Delsarte’s skew-cyclic Gabidulin codes bound (42) provide 26 and 14 as upper and lower bounds on the dimension of the corresponding SR-BCH (see Table IV). dimF (Cδ(1,β)) = n − k1 = n − δ +1, In particular, we beat the previous known lower bound (42). since t = s = d1 =1 and k1 = δ − 1

[17] ——, “Faster decoding of rank metric convolutional codes,” in Inter- [51] H. Bartz, T. Jerkovits, S. Puchinger, and J. Rosenkilde, “Fast decoding national Symposium on Mathematical Theory of Networks and Systems, of codes in the rank, subspace, and sum-rank metric,” IEEE Trans. Info. 2018. Theory, pp. 1–1, 2021. [18] D. Napp, R. Pinto, and V. Sidorenko, “Concatenation of convolutional [52] E. R. Berlekamp and L. Welch, “Error correction of algebraic block codes and rank metric codes for multi-shot network coding,” Des., codes,” U.S. Patent 4,633,470, 1986. Codes, Crypto., vol. 86, no. 2, pp. 303–318, Feb. 2018. [53] G. N. Alfarano, F. J. Lobillo, A. Neri, and A. Wachter-Zeh, “Sum-rank [19] U. Mart´ınez-Pe˜nas, “Skew and linearized Reed–Solomon codes and product codes and bounds on the minimum distance,” 2021, Preprint: maximum sum rank distance codes over any division ring,” J. Algebra, arXiv:2105.15086. vol. 504, pp. 587–612, 2018. [20] X. Caruso and A. Durand, “Reed-Solomon-Gabidulin codes,” 2018, Preprint: arXiv:1812.09147. [21] I. S. Reed and G. Solomon, “Polynomial codes over certain finite fields,” Journal of the Society for Industrial and Applied Mathematics, vol. 8, no. 2, pp. 300–304, 1960. [22] P. Delsarte, “On subfield subcodes of modified Reed-Solomon codes,” IEEE Trans. Info. Theory, vol. 21, no. 5, pp. 575–576, Sep. 1975. [23] E. M. Gabidulin and P. Loidreau, “On subcodes of codes in rank metric,” in Proc. IEEE Int. Symp. Info. Theory, 2005, pp. 121–123. Umberto Mart´ınez-Penas˜ (S’15–M’18) received the B.Sc. and M.Sc. degrees [24] F. J. MacWilliams and N. J. A. Sloane, The Theory of Error-Correcting in Mathematics from the University of Valladolid, Spain, in 2013 and 2014, Codes. North-Holland Mathematical Library, 1983. respectively, and he received the Ph.D. degree in Mathematics from Aalborg [25] W. C. Huffman and V. Pless, Fundamentals of error-correcting codes. University, Denmark, in 2017. In 2018 and 2019, he was a Postdoctoral Fellow Cambridge University Press, Cambridge, 2003. at the Department of Electrical and Computer Engineering at the University of [26] D. Boucher, W. Geiselmann, and F. Ulmer, “Skew-cyclic codes,” Appl. Toronto, Canada. He is currently a Maˆıtre Assistant at the Institutes of Com- Alg. Engin. Comm. Comput., vol. 18, no. 4, pp. 379–389, 2007. puter Science and Mathematics at the University of Neuchˆatel, Switzerland. [27] I. F. Blake, “Codes over certain rings,” Information and Control, vol. 20, He was awarded an Elite Research Travel Grant (EliteForsk Rejsestipendium) no. 4, pp. 396–404, 1972. from the Danish Ministery of Education and Science in 2016, the Ph.D. [28] M. Greferath, “Cyclic codes over finite rings,” Discrete Mathematics, Dissertation Prize by the Danish Academy of Natural Sciences (Danmarks vol. 177, no. 1, pp. 273–277, 1997. Naturvidenskabelige Akademi, DNA) in 2018, and a Vicent Caselles Prize [29] Y. Hirano, “On finite rings over which all free codes are splitting,” Math. for Research in Mathematics by the Royal Spanish Mathematical Society J. Okayama Univ., vol. 58, pp. 133—-140, 2016. (Real Sociedad Matem´atica Espa˜nola, RSME) in 2019. His research interests [30] M. Greferath, “An introduction to ring-linear coding theory,” in Sala M., include algebra, algebraic coding, distributed storage, network coding, and Sakata S., Mora T., Traverso C., Perret L. (eds.) Gr¨obner Bases, Coding, information-theoretical security and privacy. and Cryptography. Springer, Berlin, Heidelberg, 2009, pp. 219–238. [31] D. Boucher and F. U. P. Sol´e, “Skew constacyclic codes over Galois rings,” Adv. Math. Communications, vol. 2, no. 3, pp. 273–292, 2008. APPENDIX A [32] P. U. S. Jitman, S. Ling, “Skew constacyclic codes over finite chain TABLES FOR BOUND (41) ON SOME NARROW-SENSE rings,” Adv. Math. Communications, vol. 6, no. 1, pp. 39–63, 2012. PRIMITIVE SR-BCH CODES [33] J. Gao, “Skew cyclic codes over Fp + vFp,” Journal of applied mathematics and informatics, vol. 31, no. 3-4, pp. 337–342, 2013. In this appendix, we provide tables of values for the Sin- [34] M. Shi, T. Yao, and P. Sol´e, “Skew cyclic codes over a non-chain ring,” Chinese Journal of Electronics, vol. 26, no. 3, pp. 544–547, 2017. gleton upper bound (4), our lower bound (41), and Delsarte’s [35] P. Piret, “Structure and constructions of cyclic convolutional codes,” lower bound (42). All of these are bounds on the dimension n IEEE Trans. Info. Theory, vol. 22, no. 2, pp. 147–155, 1976. dimF(C) of a SR-BCH code C ⊆ F . We only consider the [36] H. Gluesing-Luerssen and W. Schmale, “On cyclic convolutional codes,” Acta Applicandae Mathematicae, vol. 82, pp. 183—-237, 2004. parameters m =2, q0 =2, and different values of ℓ, s and n. [37] R. C. Bose and D. K. Ray-Chaudhuri, “On a class of error correcting If we represent codewords as lists of matrices, as in (3), then binary group codes,” Information and Control, vol. 3, no. 1, pp. 68–79, we may see the SR-BCH codes considered in this appendix 1960. [38] A. Hocquenghem, “Codes correcteurs d’erreurs,” Chiffres, vol. 2, pp. as subsets F2×2 ℓ 147–156, 1959. C ⊆ 2 , [39] L. Chaussade, P. Loidreau, and F. Ulmer, “Skew codes of prescribed F Fn distance or rank,” Des., Codes, Crypto., vol. 50, no. 3, pp. 267–284, but being linear over 4 seen as subsets C ⊆ 4 , n = 2ℓ. 2009. We consider ℓ = q − 1=2s − 1, extending the concept of [40] R. Lidl and H. Niederreiter, Finite Fields. Amsterdam: Encyclopedia of Mathematics and its Applications. Addison-Wesley, 1983, vol. 20. primitive BCH codes [25, Sec. 5.1], and b = 0, 1, being the [41] O. Ore, “Theory of non-commutative polynomials,” Annals of Mathe- latter case b = 1 an extension of narrow-sense BCH codes matics (2), vol. 34, no. 3, pp. 480–508, 1933. [25, Sec. 5.1]. Note also that, since ℓ = q − 1 is odd, then ℓ [42] S. Lang, Undergraduate Algebra, 3rd ed. Springer, New York, NY, 2005. and m =2 are coprime, and all assumptions at the beginning [43] T. Y. Lam, A First Course in Noncommutative Rings. Springer, New of Section VII are satisfied. York, NY, 1991, vol. GTM, 131. Bold numbers on the column corresponding to Theorem 9 [44] H. Gluesing-Luerssen and F.-L. Tsang, “A matrix ring description for cyclic convolutional codes,” Adv. Math. Communications, vol. 2, no. 1, (41) mean that the bound (41) beats (42). It is important to pp. 55–81, 2008. notice that the considered Singleton bound (4) is with respect [45] U. Mart´ınez-Pe˜nas, “On the roots and minimum rank distance of skew the prescribed distance δ, whereas the exact minimum sum- cyclic codes,” Des., Codes, Crypto., vol. 83, pp. 639–660, 2017. [46] T. Y. Lam, “A general theory of Vandermonde matrices,” Expositiones rank distance d of the corresponding sum-rank BCH code may Mathematicae, vol. 4, pp. 193–215, 1986. be strictly higher. For this reason, it may happen that n − d + [47] T. Y. Lam and A. Leroy, “Vandermonde and Wronskian matrices over 1

TABLE I m q0 = 2, m = 2, q0 = 4, s = 1, ℓ = 1, n = 2.

δ b Singleton (4) Theorem 9 (41) Delsarte (42) 2 0 1 1 1 2 1 1 1 1

TABLE II m q0 = 2, m = 2, q0 = 4, s = 2, ℓ = 3, n = 6.

δ b Singleton (4) Theorem 9 (41) Delsarte (42) 2 0 5 4 4 2 1 5 4 4 3 0 4 2 2 3 1 4 2 2

TABLE III m q0 = 2, m = 2, q0 = 4, s = 3, ℓ = 7, n = 14.

δ b Singleton (4) Theorem 9 (41) Delsarte (42) 2 0 13 12 11 2 1 13 11 11 3 0 12 9 8 3 1 12 8 8 4 0 11 6 5 4 1 11 5 5 5 0 10 3 2 5 1 10 5 2 6 0 9 3 -1 6 1 9 2 -1 7 0 8 0 -4 7 1 8 2 -4 20

TABLE IV m q0 = 2, m = 2, q0 = 4, s = 4, ℓ = 15, n = 30.

δ b Singleton (4) Theorem 9 (41) Delsarte (42) 2 0 29 28 26 2 1 29 26 26 3 0 28 24 22 3 1 28 22 22 4 0 27 20 18 4 1 27 18 18 5 0 26 16 14 5 1 26 18 14 6 0 25 16 10 6 1 25 16 10 7 0 24 14 6 7 1 24 12 6 8 0 23 10 2 8 1 23 8 2 9 0 22 6 -2 9 1 22 8 -2 10 0 21 6 -6 10 1 21 8 -6 11 0 20 6 -10 11 1 20 6 -10 12 0 19 4 -14 12 1 19 2 -14 14 0 17 0 -22 14 1 17 2 -22 21

TABLE V m q0 = 2, m = 2, q0 = 4, s = 5, ℓ = 31, n = 62.

δ b Singleton (4) Theorem 9 (41) Delsarte (42) 2 0 61 60 57 2 1 61 57 57 3 0 60 55 52 3 1 60 52 52 4 0 59 50 47 4 1 59 47 47 5 0 58 45 42 5 1 58 47 42 6 0 57 45 37 6 1 57 42 37 7 0 56 40 32 7 1 56 37 32 8 0 55 35 27 8 1 55 32 27 10 0 53 30 17 10 1 53 27 17 12 0 51 25 7 12 1 51 22 7 14 0 49 20 -3 14 1 49 17 -3 18 0 45 5 -23 18 1 45 7 -23 22 0 41 5 -43 22 1 41 7 -43 26 0 37 0 -63 26 1 37 2 -63 30 0 33 0 -83 30 1 33 2 -83 22

TABLE VI m q0 = 2, m = 2, q0 = 4, s = 6, ℓ = 63, n = 126.

δ b Singleton (4) Theorem 9 (41) Delsarte (42) 2 0 125 124 120 2 1 125 120 120 3 0 124 118 114 3 1 124 114 114 4 0 123 112 108 4 1 123 108 108 5 0 122 106 102 5 1 122 108 102 6 0 121 106 96 6 1 121 102 96 7 0 120 100 90 7 1 120 96 90 10 0 117 88 72 10 1 117 84 72 14 0 113 70 48 14 1 113 66 48 22 0 105 52 0 22 1 105 52 0 30 0 97 26 -48 30 1 97 28 -48 38 0 89 14 -96 38 1 89 16 -96 46 0 81 6 -144 46 1 81 8 -144 54 0 73 0 -192 54 1 73 2 -192 62 0 65 0 -240 62 1 65 2 -240 23

TABLE VII m q0 = 2, m = 2, q0 = 4, s = 7, ℓ = 127, n = 254.

δ b Singleton (4) Theorem 9 (41) Delsarte (42) 2 0 253 252 247 2 1 253 247 247 3 0 252 245 240 3 1 252 240 240 4 0 251 238 233 4 1 251 233 233 5 0 250 231 226 5 1 250 233 226 6 0 249 231 219 6 1 249 226 219 7 0 248 224 212 7 1 248 219 212 10 0 245 210 191 10 1 245 205 191 14 0 241 189 163 14 1 241 184 163 22 0 233 154 107 22 1 233 149 107 30 0 225 112 51 30 1 225 107 51 38 0 217 91 -5 38 1 217 86 -5 46 0 209 70 -61 46 1 209 65 -61 54 0 201 42 -117 54 1 201 44 -117 62 0 193 28 -173 62 1 193 23 -173