Rank equivalent and rank degenerate skew cyclic codes

Two skew cyclic codes can be equivalent for the Hamming metric only if they have the same length, and only the zero code is degenerate. The situation is completely different for the rank metric, where lengths of codes correspond to the number of outgoing links from the source when applying the code on a network. We study rank equivalences between skew cyclic codes of different lengths and, with the aim of finding the skew cyclic code of smallest length that is rank equivalent to a given one, we define different types of length for a given skew cyclic code, relate them and compute them in most cases. We give different characterizations of rank degenerate skew cyclic codes using conventional polynomials and linearized polynomials. Some known results on the rank weight hierarchy of cyclic codes for some lengths are obtained as particular cases and extended to all lengths and to all skew cyclic codes. Finally, we prove that the smallest length of a linear code that is rank equivalent to a given skew cyclic code can be attained by a pseudo-skew cyclic code. Throughout the paper, we find new relations between linear skew cyclic codes and their Galois closures.


Introduction
Codes in the rank metric have numerous applications, such as network coding [10,13,16] or cryptography [7]. Among these codes, cyclic codes and skew cyclic codes have been considered in [1,2,4,5,6,7,12], since they have simple algebraic descriptions and fast encoding and decoding algorithms.
In the network coding model of [10,13,16], the length of a rank-metric code corresponds to the number of outgoing links from the source or the number of packets needed to be sent by the source. Whereas it is obvious how to increase the length of a code and preserve at the same time its rank-metric properties, just by appending zeroes, it is not obvious whether a rank-metric code can be shortened (which would mean that it is degenerate) nor how. On the other hand, skew cyclic codes of smaller length have faster encoding and decoding algorithms.
In contrast with the Hamming-metric case, skew cyclic codes may be rank equivalent and have different lengths. Moreover, many non-zero skew cyclic codes are rank degenerate.
The aim of this paper is to study rank equivalences between skew cyclic codes, focusing on equivalences that commute with the shifting operators, and study in which way skew cyclic codes can be rank degenerate.
Both problems have direct consequences on the generalized rank weights [10] of skew cyclic codes, which measure the information leakage by wiretapping links in the network, following the model of [10,13,16]. In particular, from our study we will obtain as particular cases the main results in [4], which give exact characterizations of cyclic codes with minimal generalized rank weights by means of their root sets when their length and field size are coprime. Our results have such consequences for all lengths, do not require computing roots (or may require computing roots of linearized polynomials, which can be done efficiently) and can be applied to all skew cyclic codes.
After some preliminaries in Section 2, the results in this paper are as follows: in Section 3, we define different types of length for skew cyclic codes, regarding the rank metric, and establish some inequalities between them. In Section 4, we use the polynomial description of the Galois closure of skew cyclic codes to compute most of the lengths defined in the previous section. In Section 5, we treat cyclic codes and relate their polynomial description to that of their Galois closures (by means of generator and check polynomials, idempotent generators and root sets), giving at the end several characterizations of rank degenerate cyclic codes and obtaining the results in [4] as particular cases. In Section 6, we proceed as in the previous section, but for general skew cyclic codes, using their linearized-polynomial description. Finally in Section 7, we see that, although the linear code of minimum length that is rank equivalent to a given skew cyclic code need not be skew cyclic, it may be chosen as pseudo-skew cyclic in many cases.

Definitions and preliminaries
Fix a prime power q and positive integers m and n, and let F q s denote the finite field with q s elements for a positive integer s. A code C ⊆ F n q m will be called linear if it is F q m -linear. In general, linearity will mean F q m -linearity. The number n is called the length of the code C.
We will denote the coordinate indices in F n q m from 0 to n − 1, and consider them as integers modulo n. Given a vector c ∈ F n q m , we define its rank weight [5] as the dimension of the F q -linear vector space generated by its components. We denote it by wt R (c).
Define the shifting operator s n : F n q m −→ F n q m as s n (c 0 , c 1 , . . . , c n−1 ) = (c n−1 , c 0 , . . . , c n−2 ), for every c = (c 0 , c 1 , . . . , c n−1 ) ∈ F n q m . For any integer r ≥ 0, define also the r-th Frobenius and q r -shifting operators as θ r , σ r,n : F n q m −→ F n q m , respectively, where θ r acts by raising every component of a vector to the power q r and σ r,n = θ r • s n .
Observe that cyclic codes are q 0 -cyclic (or q m -cyclic), that is, they are also skew cyclic. Skew cyclic codes were introduced in [5] for r = 1 and n = m, and then independently in [6] for r = 1 and in [1] for general parameters.
Denote [i] = q i , for any integer i ≥ 0. Following [17], for a given linear code C ⊆ F n q m , we define its Galois closure as , which is the smallest linear Galois closed space containing C, and we also define , which is the biggest linear Galois closed space contained in C. Recall from [17,Lemma 2] On the other hand, if V ⊆ F n q m and V ′ ⊆ F n ′ q m are linear Galois closed spaces, we say that a map φ : V −→ V ′ is a rank equivalence if it is a vector space isomorphism and wt R (φ(c)) = wt R (c), for all c ∈ V . We say that two codes C and C ′ are rank equivalent if there exists a rank equivalence between linear Galois closed spaces V and V ′ that contain C and C ′ , respectively. This definition of rank equivalent linear codes was introduced in [13, Definition 5].
By [13,Theorem 5], rank equivalent codes not only perform exactly in the same way regarding rank error and erasure correction, but also information leakage on networks (see [13,Remark 5]). Moreover, rank equivalences can be easily described, as the following lemma states, which is a particular case of [13, Theorem 5]: Lemma 1. A vector space isomorphism φ : V −→ V ′ between linear Galois closed spaces is a rank equivalence if, and only if, there exist β ∈ F * q m and an n × n ′ matrix A over F q that maps bijectively V to V ′ and such that φ(c) = βcA, for all c ∈ V .
As in [13,Definition 6], we say that a linear code C ⊆ F n q m is rank degenerate if it is rank equivalent to a linear code with smaller length (see also [9] for an alternative equivalent definition of rank degenerate codes). In network coding this means that the code C may be implemented (with the same performance) on a network with less outgoing links or where the source needs to send less packets [13,16].

Lengths and Galois closures
Following the model in [10,13,16], given a linear code C ⊆ F n q m , the length n represents the number of outgoing links of a network where C is implemented, or the number of packets needed to be sent from the source, whereas m represents the packet length. If C is rank equivalent to a code with length n ′ = n, then it may be implemented as a linear code in a network with n ′ outgoing links and with exactly the same performance [13]. However we may want to implement C as a skew cyclic code, and hence we need it to be rank equivalent to a skew cyclic code of length n ′ .
On the other hand, encoding and decoding of skew cyclic codes is faster if the length is smaller, and we may always increase their lengths preserving their rank-metric properties just by appending zeroes on the right of each codeword.
This motivates the following definitions: Definition 2. Given a linear code C ⊆ F n q m , an element a ∈ F * q = F q \ {0} and an integer r ≥ 0, we define the following numbers: 1. The rank length, l R (C), as the minimum n ′ such that C is rank equivalent to a linear code of length n ′ .
2. The r-th skew length, l Sk,r (C), as the minimum n ′ such that C is rank equivalent to a linear skew cyclic code of order r and length n ′ , if such a code exists. We define l Sk,r (C) = ∞ otherwise. 3. The (a, r)-shift length, l Sh,a,r (C), as the minimum n ′ such that C is rank equivalent to a linear code of length n ′ by a rank equivalence φ such that a(σ r,n ′ •φ) = φ•σ r,n , if such a code exists. We define l Sh,a,r (C) = ∞ otherwise. 4. The period length, l P (C), as the minimum integer 1 ≤ p ≤ n that generates the ideal modulo n defined as {p ′ | c i+p ′ = c i , ∀i, ∀(c 0 , c 1 , . . . , c n−1 ) ∈ C}, which necessarily divides n.
We also say that an integer 1 ≤ p ≤ n is an a-period of C if c i+p = ac i , for all i = 0, 1, 2 . . . , n − 1 and all (c 0 , c 1 , . . . , c n−1 ) ∈ C.

Remark 1.
In the definition of l Sh,a,r (C), the rank equivalence φ that commutes with the q r -shifting operators is supposed to be defined between linear Galois closed spaces that are cyclic, in order to make sense (see Lemma 2 below).

Remark 2.
Assume that V and V ′ are linear cyclic Galois closed spaces. If a rank equivalence φ : V −→ V ′ satisfies that a(σ r,n ′ • φ) = φ • σ r,n , for some r ≥ 0 and a ∈ F * q , then φ(σ s,n (c)) = β 1−[s−r] (βσ r,n (c)A) [s−r] for all c ∈ V , where A and β are as in Lemma 1. Hence, φ sends q s -cyclic codes to q s -cyclic codes, for any s ≥ 0.
We have the following on the skew cyclic structure of linear Galois closed spaces: If V ⊆ F n q m is linear and Galois closed, then it is skew cyclic of some order if, and only if, it is skew cyclic of all orders. Given a linear code C ⊆ F n q m , if it is skew cyclic of some order, then C * and C 0 are skew cyclic (of all orders).
Proof. Since θ 1 (V ) ⊆ V , it holds that θ r (V ) = V , for all r ≥ 0. Hence, if we fix two integers r, s ≥ 0, we have that σ r,n (V ) ⊆ V if, and only if, σ s,n (V ) ⊆ V , and the first statement follows.
For the second statement, assume that C is q r -cyclic. It holds that and similarly for C 0 , and we are done.
By the discussion after [13,Lemma 10], it follows that l R (C) is equal to the k-th generalized rank weight of C [10, Definition 2], for k = dim(C), which is the dimension of C * by [9,Corollary 17]. That is, We may establish now the following relations between the different types of lengths: For any integers r, s ≥ 0, a linear q s -cyclic code C ⊆ F n q m and an element a ∈ F * q , it holds that 1. l R (C) ≤ l Sk,s (C) ≤ l Sh,a,r (C).

Proof.
In item 1, the first inequality is trivial and the second one follows from Remark 2.
To prove item 2, we see that puncturing in the first l P (C) coordinates gives a rank equivalence from C * to a linear Galois closed subspace of F l P (C) q m that commutes with σ r,n , and the inequality follows.
We now prove item 3. First, l R (C) = dim(C * ) = dim(C * * ) = l R (C * ) by (1). Now, if φ is a rank equivalence between C and a skew cyclic code C ′ such that a(σ r,n ′ •φ) = φ•σ r,n , then φ preserves Galois closures, and hence C * is rank equivalent to C ′ * by φ. It follows that l Sh,a,r (C) ≥ l Sh,a,r (C * ), being the reversed inequality obvious. On the other hand, it follows from the definitions that l P (C) = l P (C * ).
Finally, item 4 is proven in the same way as the fact that l Sh,a,r (C) ≥ l Sh,a,r (C * ). The fact that l Sk,r (C * ) = l R (C * ) follows from the definitions.

Corollary 1.
For any linear skew cyclic code C ⊆ F n q m and any i = R, (Sk, r), (Sh, a, r), P , we have the following Singleton-type bounds: where d R denotes the minimum rank distance. Proof. The case i = R follows from the classical Singleton bound [5] and the fact that there exists a linear code of length l R (C) that is rank equivalent to C. The rest of the bounds follow from this case and the previous proposition.
Remark 3. If we denote by d R,r (C) the r-th generalized rank weight of a linear skew cyclic code C ⊆ F n q m (see [10,Definition 2]), for 1 ≤ r ≤ k, then using that l R (C) = d R,k (C), the monotonicity of generalized rank weights [10,Lemma 4] and Proposition 1, we obtain the following generalized Singleton-type bounds:

Using the conventional-polynomial representation of Galois closures
It is well-known [8, Chapter 4] that a linear cyclic code C ⊆ F n q m can be represented as an ideal C(x) in the quotient ring F q m [x]/(x n − 1), and it has unique polynomials , called generator and check polynomials, respectively, such that g(x) is monic and of minimal degree among those with residue class in C(x), and g( There are two more descriptions of linear cyclic codes. If g(x) and h(x) are coprime (which holds if q and n are coprime), then there exists a unique idempotent polynomial On the other hand, for a given polynomial , let Z(f (x)) denote the set of its roots in its splitting field. If q and n are coprime, then we may associate C with the root set Z(g(x)). This gives a bijective correspondence between linear cyclic codes in F n q m and root sets of divisors of x n − 1 [8,Section 4.4].
In this section we will focus on this conventional-polynomial representation of linear cyclic codes (in contrast with the linearized-polynomial representation in the following sections), which may be used for the Galois closure of any linear skew cyclic code by Lemma 2. Observe that the r-th Frobenius map θ r induces a ring automorphism θ r : and h(x) are coprime, then there exists a unique linear cyclic code C c such that C ⊕ C c = F n q m , called the cyclic complementary code of C. Its generator and check polynomials are h(x) and g(x), respectively, its idempotent generator is 1 − e(x) and its root set is Z(h(x)) = Z(x n − 1) \ Z(g(x)).
We have the following expected characterizations: Lemma 3. Given a linear cyclic code C ⊆ F n q m as in the beginning of this section, the following are equivalent:

(If g(x)
and h(x) are coprime) C c is Galois closed.
Proof. It is enough to note the following: ) as generator polynomial, since it generates θ 1 (C)(x) and θ 1 preserves monic polynomials and degrees. Hence the equivalence between items 1 and 2 follows.
Finally, the equivalence between items 1 and 6 follows from the fact that h(x) and g(x) are the generator and check polynomials of C c , respectively.
We now characterize rank equivalences that commute with the q r -shifting operators in terms of generator matrices. For a matrix X over F q m with n columns, we define σ r,n (X) as the matrix such that its i-th row is the q r -shifted i-th row of X.
Recall from [17, Lemma 1] that linear Galois closed spaces are those with a basis of vectors in F n q , that is, a generator matrix with coefficients in F q .

Proposition 2.
For linear cyclic Galois closed spaces V ⊆ F n q m and V ′ ⊆ F n ′ q m , and a rank equivalence φ : V −→ V ′ , where we define β and A as in Lemma 1, the following are equivalent for a given a ∈ F * q and r ≥ 0: In particular, choosing G with coefficients in F q , the second item reads s n (G)A = aβ [r]−1 Gs n ′ (A). Therefore, if any of the previous items hold, then Proof. For any vector c ∈ V , it is a straightforward computation to verify that condition 1 is equivalent to Therefore, the equivalence between items 1 and 2 follows from the linearity of φ and the semi-linearity of the q r -shifting operators.
where indices i are taken modulo n, and a i denotes the i-th row in A.
On the other hand, if On the other hand, the check polynomials of V and V ′ can be easily used to see whether there exists such a rank equivalence between them, which is the first main result of this section: q m be linear cyclic Galois closed spaces with the same dimension k and check polynomials h(x) and h ′ (x), respectively. Given a ∈ F * q , an integer r ≥ 0 and β ∈ F * q m such that β [r] = bβ, for some b ∈ F * q , the following are equivalent: 3. (If q and n are coprime) abZ(h ′ (x)) = Z(h(x)).
Proof. It is obvious that items 2 and 3 are equivalent. We next prove the equivalence between items 1 and 2: We first prove that item 1 implies item 2. Let h(x) = h 0 + h 1 x + · · · + h k x k . Assume that there exists a rank equivalence φ : V −→ V ′ satisfying item 1. Let g(x) = g 0 +g 1 x+ · · ·+g n−k x n−k be the generator polynomial of V , and let g = (g 0 , g 1 , . . It holds that a i σ i r,n ′ (f ) = φ(σ i r,n (g)), for i = 0, 1, 2, . . . , k. In polynomial representation, we have that σ i r,n (g) corresponds to x i g(x), and , and we are done. Now we prove that item 2 implies item 1 for i = 0, 1, 2, . . . , k − 1, which defines a rank equivalence between V and V ′ by Lemma 1, and see that this formula also holds for i = k. If that happens, then the equality a(σ r,n ′ • φ) = φ • σ r,n holds on a basis of V and then it holds on all V . To see that Equation (3) also holds for i = k, we may argue as in the converse implication by using again that (ab) k h ′ (x) = h(abx).
Observe from the previous proof that each of such equivalences is constructed by Equation (3) using a polynomial f (x) ∈ V ′ (x) with coefficients in F q and such that Taking a = b = 1, we obtain the following particular case: be as in the previous theorem. The following are equivalent: On the other hand, given a polynomial f (x) ∈ F q m [x], we define its order as the minimum positive integer e such that f (x) divides x e − 1 (in F q m [x]), and denote it by ord(f (x)). In general, for a ∈ F q , we define the a-order of f (x) as the minimum positive integer e such that f (x) divides x e − a e (in F q m [x]), if one such e exists, and denote it by ord a (f (x)). If no such e exists, we define ord a (f (x)) = ∞.
We may now prove the second main result of this section: For an integer s ≥ 0 and a linear q s -cyclic code C ⊆ F n q m , where h 0 (x) is the check polynomial of C * , it holds that 3. More generally, if a ∈ F * q , then e = l Sh,a,0 (C) = ord a (h 0 (x)) and e is an a e -period of C. 4. More generally, if a ∈ F * q and r ≥ 0, then In particular, l R (C) = l Sk,s (C) = l Sh,1,r (C) = l P (C) if, and only if, deg(h 0 (x)) = ord(h 0 (x)), which holds if, and only if, h 0 (x) = x e − 1, for some positive integer e.
Proof. First of all, we have seen that l R (C) = dim(C * ), and this dimension is deg(h 0 (x)).
Hence item 1 follows. Now, the equality l Sh,1,0 (C) = ord(h 0 (x)) in item 2 follows from item 3 by choosing a = 1, and it is straightforward to see that ord(h 0 (x)) is equal to l P (C).
Item 3 follows now from item 4, since β [0] = β, for all β ∈ F q m . Moreover, since x e f (x) = a e f (x), for all f (x) ∈ C(x), we see that e is an a e -period of C.
Next we prove item 4. Assume that there exists a rank equivalence φ : C * −→ V ′ , where V ′ is a linear cyclic Galois closed space of length e and a(σ r,n ′ • φ) = φ • σ r,n . By the previous theorem, the check polynomial of V ′ is (ab) −k h 0 (abx), k = dim(C * ), with notation as in the previous theorem. Hence, we see that h 0 (x) divides x e − (ab) e , since h 0 (abx) divides x e − 1.
Conversely, if h 0 (x) divides x e − (ab) e , we may define the linear cyclic Galois closed space V ′ ⊆ F e q m with check polynomial h ′ (x) = (ab) −k h 0 (abx), which divides x e − 1. Then there exists a rank equivalence φ : C * −→ V ′ as before by the previous theorem.
Therefore, choosing the elements b and β that minimize the number e, we see that l Sh,a,r (C) = ord ab (h 0 (x)), and item 4 follows.

Remark 5.
We see from the previous theorem that there are three instances of h 0 (x) that give an easy description of C and where l R (C) is attained by a linear skew cyclic code: 1. h 0 (x) = x e − 1, for some positive integer e ≤ n. This case has two subcases: (a) e = n, which corresponds to the case where C is not rank degenerate.
(b) e < n, in which case C is rank degenerate in a special way: e divides n and C is constructed by repeating n/e times a linear skew cyclic code C ′ ⊆ F e q m that is not rank degenerate.

2.
There exists an a ∈ F * q and a positive integer e < n with h 0 (x) = x e − a e . In this case, e divides n, a n = 1 and again C is constructed by repeating n/e times a linear skew cyclic code C ′ ⊆ F e q m that is not rank degenerate. Observe that a n = 1 since x e − a e divides x n − 1. Then we see that a e ((a −1 x) e − 1) divides (a −1 x) n − 1 = x n − 1, hence x e − 1 divides x n − 1, which implies that e divides n.
In the next sections we will give results on C in terms of its structure, and relate it to the structure of C * and C 0 .
Now fix a linear cyclic code C ⊆ F n q m , whose generator and check polynomials are g(x) and h(x), respectively. It is well-known that h ⊥ (x) and g ⊥ (x) are the generator and check polynomials of C ⊥ , respectively [8, Theorem 4. 2.7]. The following proposition explains the previous notation: Proposition 3. The generator and check polynomials of C * are g * (x) and h 0 (x), respectively, and the generator and check polynomials of C 0 are g 0 (x) and h * (x), respectively. In particular, Proof. Taking ideals, it holds that C(x) = m−1 i=0 C [i] (x), and C [i] has θ i (g(x)) as generator polynomial. It is well-known that the generator polynomial of the sum of cyclic codes is the greatest common divisor of their generator polynomials [8, Theorem 4. 3.7].
Hence the polynomial g * (x) is the generator polynomial of C * . Similarly g 0 (x) is the generator polynomial of C 0 , using now that the generator polynomial of the intersection of cyclic codes is the least common multiple of their generator polynomials [8, Theorem 4. 3.7].
On the other hand, we have that θ i (g(x))θ i (h(x)) = θ i (x n − 1) = x n − 1, for i = 0, 1, 2, . . . , m − 1. Hence the greatest common divisor of the polynomials θ i (g(x)) and the least common multiple of the polynomials θ i (h(x)) satisfy the same. That is, g * (x)h 0 (x) = x n − 1, and h 0 (x) is the check polynomial of C * . Similarly for C 0 .
Finally, since g ⊥ (x) is the check polynomial of C ⊥ , it follows that (g ⊥ ) * (x) is the check polynomial of (C ⊥ ) 0 . On the other hand, since g * (x) is the generator polynomial of C * , it holds that (g * ) ⊥ (x) is the check polynomial of (C * ) ⊥ . Since (C ⊥ ) 0 = (C * ) ⊥ , it follows that (g * ) ⊥ (x) = (g ⊥ ) * (x). The remaining equalities are proven in the same way.
On the other hand, we have the following relations of idempotent generators and cyclic complementaries.

Proposition 4. Assume that g(x)
and h(x) are coprime and e(x) is the idempotent generator of C. Then C * and C 0 have 1 − m−1 i=0 (1 − θ i (e(x))) and m−1 i=0 θ i (e(x)) as idempotent generators, respectively. Moreover it holds that Proof. First, the idempotent generator of the intersection of cyclic codes is the product of their idempotent generators [8, Theorem 4. 3.7], hence m−1 i=0 θ i (e(x)) is the idempotent generator of C 0 .
On the other hand, C c has h(x) as generator polynomial, thus (C c ) * has h * (x) as generator polynomial by the previous proposition. Moreover, C 0 has h * (x) as check polynomial, also by the previous proposition. Therefore (C c ) * = (C 0 ) c . Similarly we may prove that (C c ) 0 = (C * ) c .
Finally, It holds that m−1 i=0 (1 − θ i (e(x))) is the idempotent generator of (C c ) 0 by the first part of this proof. Using that (C c ) 0 = (C * ) c , we see that 1 − m−1 i=0 (1 − θ i (e(x))) is the idempotent generator of C * .
In addition, we may easily see that C c and C ⊥ are rank equivalent: Proposition 5. Assume that g(x) and h(x) are coprime. Then C c and C ⊥ are rank equivalent.
Proof. There exists a permutation of indices that maps C c to C ⊥ by [8,Theorem 4.4.9], which obviously defines a rank equivalences between them.
We will now relate C, C * and C 0 by means of the defining root set of C. We will relate l R (C ⊥ ) with the parameter η q (C) introduced in [4], which will allow us to easily derive the main results in that paper.
If q and n are coprime, let m ′ ≥ m be such that F q m ′ is the splitting field of g(x). Let α 1 , α 2 , . . . , α n−k ∈ F q m ′ be the simple roots of g(x), and assume that they are ordered in the following way: there exist 1 = m 0 < m 1 < m 2 < . . . < m t = n − k + 1 such that α m i , α m i +1 , . . . , α m i+1 −1 are roots of the minimal polynomial µ i (x) ∈ F q [x] of α m i over F q , for i = 0, 1, . . . , t − 1.
We have the following relations, which in particular compute the root set corresponding to C * and C 0 : Proposition 6. If q and n are coprime, then 1. µ q (g(x)) = g 0 (x).
by looking at their roots. By the same argument as in Lemma 3, we see that Fix a positive integer r. Since θ r is a ring isomorphism, we see that θ r (g(x)) also divides θ r (µ q (g(x))) = µ q (g(x)) in F q m [x]. Hence µ q (g(x)) is divisible by the least common multiple of the polynomials θ r (g(x)), r = 0, 1, 2, . . . , m − 1.
By the same discussion, since Z(θ i (g(x))) = Z(g(x)) [i] , we have that Z(g 0 (x)) = On the other hand, denoting Z = Z(x n −1) and using that g and item 2 follows. Item 3 follows from item 1 and Proposition 3.
Proof. The first two equalities follow from Theorem 2, item 1, and Proposition 3. If q and n are coprime, then the next three equalities follow from the same results as before together with Proposition 6 and Equation (7). Finally, the last four equalities follow from the same results as before together with Theorem 2, items 2 and 3.
The following characterizations of rank degenerate cyclic codes follow: The following conditions are equivalent: 1. C is rank degenerate. That is, l R (C) < n.
, where e(x) is the idempotent generator of C.
) of degree less than n.

Skew cyclic codes, linearized polynomials and root spaces
In this section we will fix a positive integer r and assume that m divides rn, and will use the linearized-polynomial description of skew cyclic codes given in [1,5,6,12] to give similar characterizations of lengths and rank degenerateness as in the previous section for general skew cyclic codes. By the discussion after [12,Remark 2], assuming that m divides rn does not leave any skew cyclic code out of study regarding the lengths l i (C).
Denote by L q r F q m [x] the ring of q r -linearized polynomials over F q m (see [5,14,15] or [11,Chapter 3]), that is, polynomials of the form , and where we consider composition of maps ⊗ as product. We also define the q r -degree of F (x) as deg q r (F (x) Recall that q r -linearized polynomials over F q m define F q r -linear maps between field extensions of F q r and their compositions as such define again q r -linearized polynomials over F q m . This ring constitutes an Euclidean domain on the right and on the left [5,14,15], but we will always consider divisibility on the right. We will also use the term "conventional" to refer to the usual product and divisibility of polynomials.
Since m divides rn, x [rn] − x commutes with every other q r -linearized polynomial over F q m and the left ideal (x [rn] − x) is two-sided. Thus, we may consider the ring , which is isomorphic to F n q m as a vector space. Linear q r -cyclic codes correspond to left ideals in L q r F q m [x]/(x [rn] − x) [1,5,6]. Fix one C ⊆ F n q m . It has unique generator polynomial G(x) and check polynomial H(x) with the same properties as in the usual case [1,6,12]: G(x) is of minimal degree and monic, and Recall that, since q r -linearized polynomials induce F q rlinear maps, their root sets are F q r -linear vector spaces. We may denote by . This definition is consistent, since two q r -polynomials F 1 (x) and F 2 (x) have the same roots in On the other hand, the s-th Frobenius map θ s defines also a ring automorphism θ s : L q r F q m [x] −→ L q r F q m [x] using the same formula as in the conventional case (2) and induces a ring automorphism of In this section we will consider the q r -cyclic structure of linear Galois closed spaces. However, describing generator and check polynomials of C ⊥ , C * and C 0 is not as straightforward as in the conventional case. Given a q r -polynomial As in the previous section, we have the following: Proof. Since θ 1 leaves the set {F (x), θ 1 (F (x)), . . . , θ m−1 (F (x))} invariant and is a ring automorphism, it holds that θ 1 (F * (x)) = F * (x) and θ 1 (F 0 (x)) = F 0 (x). Observing that θ 1 (F ⊥ (x)) = θ 1 (F (x)) ⊥ and θ 1 (F ⊤ (x)) = θ 1 (F (x)) ⊤ , we see that θ 1 (F * (x)) = F * (x) and θ 1 (F 0 (x)) = F 0 (x). Hence the result follows.

Remark 7.
Observe that taking r = m, we obtain a q m -linearized description of cyclic codes and n may be arbitrary. Observe that L q m F q m [x] is commutative and naturally isomorphic to F q m [x] by the map given in [11,Definition 3.58]: In particular, , and coincide by the previous ring isomorphism to the definitions in (4), (5) and (6), respectively. Hence the results in this section give those in the previous one that have to do with divisibility of generator and check polynomials. However, the root description will be essentially different. As we will see, it will not be necessary to assume that q and n are coprime, and finding roots of linearized polynomials can always be done efficiently (see [11,Chapter 3]).
Before going on, we will establish a result analogous to Proposition 3. In the linearized case, if G(x) and H(x) are coprime on both sides, then there exist an idempotent generator E(x) of C by [12,Theorem 2], and the linear skew cyclic code with generator and check polynomials H(x) and G(x), respectively, is a complementary space of C by [12,Proposition 5]. We denote it by C c . It also has an idempotent generator given by x − E(x) [12, Proposition 5].

Proposition 7. The following are equivalent:
It is proven in [2,5,6] that H ⊥ (x) is the generator polynomial of C ⊥ . We now find its check polynomial: It is shown in [2] that C ⊥ has a parity check matrix of the form  By On the other hand, we have the following: and analogously replacing ⊥ by ⊤ in the last two equalities.
Proof. The first two equalities are straightforward computations. For the last two equalities, it is enough to observe again that θ i (F ⊥ (x)) = θ i (F (x)) ⊥ and use the previous two equalities. Analogously replacing ⊥ by ⊤.
We know from Lemma 2 that C * and C 0 are skew cyclic of all orders. In the previous sections we used their cyclic (or q 0 -cyclic) nature and their conventional generator and check polynomials. We may relate them with the generator and check polynomials obtained in the previous proposition.
For that purpose, we define the operator L : which coincides with the map in (14) for r = m.
Proposition 9. Let the notation be as in the previous proposition, and let g * (x), g 0 (x) be the generator (conventional) polynomials of C * and C 0 , respectively, and let h 0 (x) and h * (x) be their check (conventional) polynomials, respectively. Then G * (x) = L(g * (x)), H 0 (x) = L(h 0 (x)), G 0 (x) = L(g 0 (x)), and H * (x) = L(h * (x)). On the other hand, we have the following relations between the root spaces of the generator and check polynomials of C, C * and C 0 , as in Proposition 6.

Proposition 10. It holds that
7 Attaining the rank length by pseudo-skew cyclic codes So far we have tried to find the linear skew cyclic code of smallest length that is rank equivalent to a given one C. We have given upper bounds on that length and seen that a general lower bound is l R (C), although it is not clear that this length can be attained by a linear skew cyclic code that is rank equivalent to C.
On the other hand, in this section we will see that the length l R (C) is always attained by some linear pseudo-skew cyclic code. As skew cyclic codes, pseudo-skew cyclic codes were introduced in [5] for r = 1 and n = m, and then independently in [6] for r = 1 and in [2] for general parameters. They are not invariant by q r -shifting operators, but have similar conventional-polynomial and linearized-polynomial representations.
We start by defining the well-known pseudo-cyclic codes: be of degree n. For a linear code C ⊆ F n q m , we define C f (x) (x) as the image of C in F q m [x]/(f (x)) by the linear vector space isomorphism F n q m −→ F q m [x]/(f (x)) given by (c 0 , c 1 , . . . , c n−1 ) → c 0 + c 1 x + · · · + c n−1 x n−1 .
Then we say that C is pseudo-cyclic if C f (x) (x) is an ideal in F q m [x]/(f (x)), for some f (x) ∈ F q m [x] of degree n.
Fix now a linear cyclic code C ⊆ F n q m , and let the notation be as in Section 5. We have the following: Theorem 5. The map φ : F q m [x]/(h 0 (x)) −→ (g * (x))/(x n − 1) given by φ(f (x)) = f (x)g * (x) is well-defined, maps ideals to ideals and constitutes a rank equivalence when seeing its domain and codomain as linear Galois closed spaces. Proof. First of all, it is well-defined since h 0 (x)g * (x) = x n − 1. It is linear since it preserves additions and φ(p(x)f (x)) = p(x)φ(f (x)), for all p(x), f (x) ∈ F q m [x]. For the same reason it maps ideals to ideals.
On the other hand, if f (x)g * (x) = 0 in the quotient (g * (x))/(x n −1), then f (x)g * (x) = p(x)(x n − 1) for some polynomial p(x) ∈ F q m [x], which implies that f (x) = p(x)h 0 (x). Therefore, φ is one to one. Since it is obviously onto, we conclude that it is a vector space isomorphism.
Finally, since g * (x) ∈ F q [x], we see that φ maps polynomials of degree less that k with coefficients in F q to polynomials with coefficients in F q , and hence it is a rank equivalence by Lemma 1.
Therefore the following consequence follows immediately: Corollary 5. The length l R (C) is attained by a linear pseudo-cyclic code that is an ideal in the quotient ring F q m [x]/(h 0 (x)).

Remark 8.
If h 0 (x) = x e − 1, for some positive integer e, then the pseudo-cyclic code in the previous corollary is actually cyclic. This also follows from Remark 5.
In a completely analogous way, we may state similar results for the general skew cyclic case. However, in this case we may only construct quotient rings with two-sided ideals, since the ring of linearized polynomials is not commutative. For that purpose, we consider the the center of L q r F q m [x], denoted by C(L q r F q m [x]) and defined as the set of q r -polynomials over F q m that commute with every other q r -polynomial over F q m . It is well-known that where l = lcm(m, r) and d = gcd(m, r). We may now proceed exactly as in the conventional case: ) such that deg q r (F (x)) = n. For a linear code C ⊆ F n q m , we define C F (x) (x) as the image of C in L q r F q m [x]/(F (x)) by the linear vector space isomorphism F n q m −→ L q r F q m [x]/(F (x)) given by (c 0 , c 1 , . . . , c n−1 ) → c 0 x + c 1 x [r] + · · · + c n−1 x [(n−1)r] .
Then we say that C is pseudo-skew cyclic (of order r) if C F (x) (x) is a left ideal in L q r F q m [x]/(F (x)), for some F (x) ∈ C(L q r F q m [x]) such that deg q r (F (x)) = n.
Fix now a linear q r -cyclic code C ⊆ F n q m , and let the notation be as in Section 6. We have the following: is well-defined, maps left ideals to left ideals and constitutes a rank equivalence when seeing its domain and codomain as linear Galois closed spaces. Proof. Analogous to that of Theorem 5, taking into account the non-commutativity of the symbolic product of linearized polynomials.
Hence the following consequence follows immediately: Corollary 6. If H 0 (x) is central, then the length l R (C) is attained by a linear pseudoskew cyclic code that is a left ideal in the quotient ring L q r F q m [x]/(H 0 (x)).