--- abstract: 'In this paper we provide a large family of rank-metric codes, which contains properly the codes recently found by Longobardi and Zanella (2021) and by Longobardi, Marino, Trombetti and Zhou (2021). These codes are ${{\mathbb F}}_{q^{2t}}$-linear of dimension $2$ in the space of linearized polynomials over ${{\mathbb F}}_{q^{2t}}$, where $t$ is any integer greater than $2$, and we prove that they are maximum rank distance codes. For $t\ge 5$, we determine their equivalence classes and these codes turn out to be inequivalent to any other construction known so far, and hence they are really new.' address: - 'Alessandro Neri, <span class="nodecor">Max-Planck-Institute for Mathematics in the Sciences, Inselstraße 22, 04103 Leipzig, Germany</span>' - 'Paolo Santonastaso, <span class="nodecor">Dipartimento di Matematica e Fisica, Università degli Studi della Campania "Luigi Vanvitelli", Viale Lincoln, 5, I–81100 Caserta, Italy</span>' - 'Ferdinando Zullo, <span class="nodecor">Dipartimento di Matematica e Fisica, Università degli Studi della Campania "Luigi Vanvitelli", Viale Lincoln, 5, I–81100 Caserta, Italy</span>' author: - Alessandro Neri - Paolo Santonastaso - Ferdinando Zullo bibliography: - 'main.bib' title: Extending two families of maximum rank distance codes --- Introduction ============ Codes endowed with the rank-metric have gained a lot of interest in the last decade due to their numerous applications. In particular, the turning point was the groundbreaking work of Silva, Kötter and Kschischang @silva2008rank, in which they proposed rank metric codes as tools for dealing with linear random network coding. However, the origin of rank-metric codes is due to Delsarte's seminal paper @de78 in 1978, where they were first defined for a pure combinatorial interest. Few years later, Gabidulin rediscovered them independently @ga85a. The first applications were due to Roth in @roth1991maximum for crisscross deletion correction, and to Gabidulin, Paramonov and Tretjakov in @gabidulin1991ideals for a cryptosystem based on rank-metric codes. From a mathematical point of view, rank-metric codes have been shown to possess connections with many subjects, such as semifield theory @sheekey2016new, linear sets in finite geometry @polverino2020connections, tensorial algebra @byrne2019tensor, skew algebras @ACLN20+ [@elmaazouz2021], matroid theory @gorla2020rank and many more. All these connections testify the rich structure that rank-metric code possess. Formally, rank-metric codes are sets of $n \times m$ matrices over a finite field ${{\mathbb F}}_q$, endowed with the rank metric. This is the metric defined by the rank distance, where the rank distance between two matrices is the rank of their difference. There is also another representation of rank-metric codes, which allows to endow them with stronger algebraic properties. When $n=m$, one may indeed identify the space ${{\mathbb F}_{q}}^{n\times n}$, with the ring of $\sigma$-polynomials with coefficients in ${\mathbb{F}_{q^n}}$, where $\sigma$ is a generator of $\operatorname{Gal}({\mathbb{F}_{q^n}}/{{\mathbb F}_{q}})$. This allows also to introduce a notion of ${\mathbb{F}_{q^n}}$-linearity of a rank-metric code. Among rank-metric codes, of particular interest is the family of *maximum rank distance (MRD)* codes. These are codes that have optimal parameters: for the given size and minimum rank distance, they have the maximum cardinality. The first construction of a family of MRD codes was due already to Delsarte @de78 and independently to Gabidulin @ga85a. The codes of this family are now known as *Gabidulin codes* and for many years were essentially the only known constructions, until Sheekey came up with a broader family of MRD codes, named *twisted Gabidulin codes*. The flexibility of the parameters of these families is one of the main reasons that made Gabidulin and twisted Gabidulin codes very appealing. Another large family of MRD codes was later given by Trombetti and Zhou in @trombetti2018new. Except from that, almost all the other known MRD construction have all very specific restriction on some of the parameters: for instance, the MRD codes @BZZ [@csajbok2018anewfamily; @csajbok2018maximum; @csajbok2018linearset; @MMZ; @ZZ] exist only for $n \in \{6,7,8\}$. Very recently, two classes of $2$-dimensional ${\mathbb{F}_{q^n}}$-linear MRD codes have been introduced for any even $n$. One was given in @longobardizanellascatt and the second in @longobardi2021large. The arguments used there for showing that these codes are MRD exploited the correspondence of MRD codes with scattered linear sets @polverino2020connections and in particular with scattered polynomials. In this paper we provide a wider family of $2$-dimensional ${\mathbb{F}_{q^n}}$-linear MRD codes properly containing the two families introduced in @longobardizanellascatt [@longobardi2021large]; see Theorem \[th:newfamily\]. In order to show that they are MRD, we first give in Theorem \[th:rankfs\] a more general argument which allows to extend any construction of MRD codes based on $\sigma$-polynomials to any other generator $\theta$ of $\operatorname{Gal}({\mathbb{F}_{q^n}}/{{\mathbb F}_{q}})$ under certain hypotheses. We then focus on the study of the equivalence of these codes. We first prove that the codes in this wider family are all inequivalent to all the other ${\mathbb{F}_{q^n}}$-linear MRD codes known so far; see Proposition \[prop:not\_Gabidulin\] and Theorem \[th:no\_twisted\]. Afterwards, we concentrate on the equivalence problem within this new family: in Theorem \[th:equivspecialcase\] and in Corollary \[cor:inequivalence\_newMRD\], we characterize for which parameters two of these codes are equivalent. This also allows to derive results on the number of equivalence classes of codes in the new family: in Theorem \[th:numexact\] we provide the exact but implicit number of these equivalence classes, while in Theorem \[th:lowbound\] we give an explicit lower bound. The paper is structured as follows. Section \[sec:preliminaries\] collects all the basic ingredients we need throughout the paper. In Section \[sec:newfamily\] we introduce the new family of codes, showing that they are MRD. Section \[sec:equivalence\] is dedicated to the study of the equivalence classes of the new codes. Finally, we recap our findings and list some open problems in Section \[sec:conclusions\]. Preliminaries {#sec:preliminaries} ============= In this section we give a recap on the important notions and results needed for the paper. We start introducing rank-metric codes and their representation as linearized polynomials. We then recall the notion of maximum rank distance (MRD) codes and explain the two most prominent infinite families of MRD codes known up to now. Finally, we give a short description of the invariants studied in @neri2020equivalence, which will be used for determining code inequivalence. For the interested reader, we refer to the survey on rank-metric codes written by Sheekey @sheekeysurvey, which provides an exhaustive study on rank-metric codes in various frameworks. We start fixing the following notation. Let $p$ be a prime and $r$ a positive integer. We fix $q=p^r$ and denote by ${{\mathbb F}_{q}}$ the finite field with $q$ elements. Moreover, we fix a positive integer $t$, let $n=2t$, and consider the extension field ${\mathbb{F}_{q^n}}$ of degree $n$ over ${{\mathbb F}_{q}}$. It is well-known that this extension is Galois and that the Galois group $\operatorname{Gal}({\mathbb{F}_{q^n}}/{{\mathbb F}_{q}})$ is cyclic. For the rest of the paper we will use $\sigma$ and $\theta$ to denote generators of $\operatorname{Gal}({\mathbb{F}_{q^n}}/{{\mathbb F}_{q}})$. Recall that for a Galois extension of the form ${\mathbb{F}_{q^n}}/{{\mathbb F}_{q}}$, the *norm* of an element $\alpha \in {\mathbb{F}_{q^n}}$ is defined as $$\mathrm{N}_{q^n/q}(\alpha):= \prod_{\rho\in\operatorname{Gal}({\mathbb{F}_{q^n}}/{{\mathbb F}_{q}})}\rho(\alpha).$$ Rank-metric codes and linearized polynomials {#sec:rankmetric_linearized} -------------------------------------------- Rank-metric codes were introduced by Delsarte @de78 in 1978 and they have been intensively investigated in recent years because of their applications in crisscross error correction @roth1991maximum, cryptography @gabidulin1991ideals and network coding @silva2008rank. Formally, on the set of matrices ${{\mathbb F}}_q^{n\times m}$ we can define the *rank-metric*, as $$d(A,B) = \mathrm{rk}\,(A-B), \qquad \mbox{ for } A,B\in{{\mathbb F}_{q}}^{n\times m}.$$ A *rank-metric code* is a subset $\operatorname{\mathcal{C}}$ of ${{\mathbb F}}_q^{n \times m}$ endowed with the rank metric. The *minimum rank distance* of $\operatorname{\mathcal{C}}$ is defined as $$d := d(\operatorname{\mathcal{C}}) =\min\{ d(A,B) \colon A,B \in \operatorname{\mathcal{C}},\,\, A\neq B \}.$$ Moreover, if $\operatorname{\mathcal{C}}$ is an ${{\mathbb F}_{q}}$-linear subspace of ${{\mathbb F}_{q}}^{n\times m}$, we will also say that the code is ${{\mathbb F}_{q}}$-linear, and in this case the minimum rank distance is also equal to $$d(\operatorname{\mathcal{C}})= \min\{ \operatorname{rk}(A) \colon A \in \operatorname{\mathcal{C}},\,\, A\neq 0 \}.$$ Delsarte showed in @de78 that the parameters of a rank-metric code must satisfy a Singleton-like bound, that reads as $$|\operatorname{\mathcal{C}}| \leq q^{\max\{m,n\}(\min\{m,n\}-d+1)}.$$ When equality holds, we call $\operatorname{\mathcal{C}}$ a *maximum rank distance* (*MRD* for short) code. It was shown that MRD codes exist for any choice of $q,n,m,d$; see @de78 [@ga85a]. In this paper we will focus on the case of square matrices, that is when $n=m$.[^1] In this case there is an alternative way to see the ${{\mathbb F}_{q}}$-algebra of $n\times n$ matrices as the algebra of *$\sigma$-polynomials*. Formally, let $\sigma$ be a generator of $\operatorname{Gal}({\mathbb{F}_{q^n}}/{{\mathbb F}_{q}})$. A $\sigma$-polynomial is an element of the form $$f(x):=\sum_{i=0}^{n-1}f_i x^{\sigma^i}, \quad f_i \in {\mathbb{F}_{q^n}}.$$ The set of $\sigma$-polynomials forms a ring with the usual addition and the *composition*, given by $$(f_ix^{\sigma^i})\circ (g_jx^{\sigma^j})=f_i\sigma^i(g_j)x^{\sigma^{i+j}},$$ on $\sigma$-monomials, and then extended by distributivity. We denote this ring by ${{\mathcal L}}_{n,\sigma}$. It is well-known that $$\label{eq:isom_sigma} ({{\mathcal L}}_{n,\sigma},+,\circ)\cong(\operatorname{End}_{{{\mathbb F}_{q}}}({\mathbb{F}_{q^n}}),+,\circ),$$where the $\sigma$-polynomial $f(x)$ is identified with the endomorphism of ${\mathbb{F}_{q^n}}$ $$\alpha \longmapsto \sum_{i=0}^{n-1}f_i \sigma^i(\alpha).$$ However, a different choice of the generator $\sigma$ only gives a different representation of an element, but the ring ${{\mathcal L}}_{n,\sigma}$ does not depend on this choice. Hence, ${{\mathcal L}}_{n,\sigma}$ is the same for any choice of $\sigma$, and one can just consider ${{\mathcal L}}_{n,q}:={{\mathcal L}}_{n,\theta}$, where $\theta$ is the $q$-Frobenius isomorphism of ${\mathbb{F}_{q^n}}$, mapping each $\alpha \in {\mathbb{F}_{q^n}}$ to $\alpha^q$. Thus, one can speak of $\sigma$-polynomials just in ${{\mathcal L}}_{n,q}$. Notice that ${{\mathcal L}}_{n,q}$ is isomorphic to the algebra of *$q$-linearized polynomials* modulo the two-sided ideal generated by $x^{q^n}-x$; see @wu2013linearized. We remark that the isomorphism given in holds in a more general setting and not only over finite fields. For instance, one can define $\sigma$-polynomials over any field ${{\mathbb L}}$ with $\sigma \in \operatorname{Aut}({{\mathbb L}})$, and obtain $({{\mathcal L}}_{n,\sigma},+,\circ)\cong(\operatorname{End}_{{{\mathbb K}}}({{\mathbb L}}),+,\circ)$, where ${{\mathbb K}}={{\mathbb L}}^\sigma$ and $n=[{{\mathbb L}}:{{\mathbb K}}]$; see e.g. @Gow. More generally, there is a similar isomorphism also for *any* Galois extension of fields or of rings @chase1969galois [Theorem 1.3], which have been exploited for the development of a more general theory of rank-metric codes @augot2013rank [@ACLN20+; @kamche2019rank; @elmaazouz2021]. Thanks to the isomorphism in , we immediately get that $({{\mathcal L}}_{n,\sigma},+,\circ)$ is also isomorphic to the ${{\mathbb F}_{q}}$-algebra ${{\mathbb F}_{q}}^{n\times n}$, since ${\mathbb{F}_{q^n}}$ is an $n$-dimensional ${{\mathbb F}_{q}}$-vector space. Thus, rank-metric codes can equivalently be represented as subsets of ${{\mathcal L}}_{n,q}$. Here, we will speak of *kernel* and *rank* of a $\sigma$-polynomial meaning by this the kernel and rank of the corresponding endomorphism. This naturally defines the rank-metric directly on ${{\mathcal L}}_{n,q}$. There is a very special $\sigma$-polynomial that is central for many aspects of Galois theory and duality theories. This is the case of the *trace map*, defined as $$\mathrm{Tr}_{q^n/q}(x):=\sum_{i=0}^{n-1}x^{\sigma^i}.$$ The trace maps induces a nondegenerate symmetric ${{\mathbb F}_{q}}$-bilinear form $\langle \cdot,\cdot\rangle$ on ${\mathbb{F}_{q^n}}$, given by $$\langle \alpha,\beta\rangle=\mathrm{Tr}_{q^n/q}(\alpha\beta).$$ The *adjoint* of a $\sigma$-polynomial $f(x)=f_0x+f_1x^{\sigma}+\ldots+f_{n-1}x^{\sigma^{n-1}}$ with respect to the trace bilinear form is $$f^\top(x)=\sum_{i=0}^{n-1}{\sigma^{n-i}}(f_i)x^{\sigma^{n-i}},$$ that is the $\sigma$-polynomial satisfying $$\mathrm{Tr}_{q^n/q}(f(\alpha)\beta)=\mathrm{Tr}_{q^n/q}(\alpha{f}^\top(\beta)), \qquad \mbox{ for every } \alpha,\beta \in {\mathbb{F}_{q^n}}.$$ In this framework, the *adjoint code* $\operatorname{\mathcal{C}}^\top$ of a rank-metric code $\operatorname{\mathcal{C}}\subseteq {{\mathcal L}}_{n,q}$ is $$\operatorname{\mathcal{C}}^\top= \{{f}^\top(x) \in {{\mathcal L}}_{n,q} \colon f(x) \in \operatorname{\mathcal{C}}\}.$$ Two rank-metric codes $\operatorname{\mathcal{C}}_1, \operatorname{\mathcal{C}}_2\subseteq{{\mathcal L}}_{n,q}$ are said to be *equivalent* if there exist two invertible $\sigma$-polynomials $f_1(x),f_2(x) \in {{\mathcal L}}_{n,q}$ and a field automorphism $\rho \in \mathrm{Aut}({\mathbb{F}_{q^n}})$ such that $$\operatorname{\mathcal{C}}_1=f_1 \circ \operatorname{\mathcal{C}}_2^\rho \circ f_2= \{ f_1 \circ g^\rho \circ f_2 \colon g \in \operatorname{\mathcal{C}}_2\},$$ where $g^\rho(x):=\sum_{i=0}^{n-1}\rho(a_i)x^{\sigma^i}$ if $g(x)=\sum_{i=0}^{n-1}a_ix^{\sigma^i}$. In addition, a useful tool for studying equivalence of codes is represented by the idealizers. They have been introduced in @liebhold2016automorphism and used to study equivalence and automorphisms of Gabidulin codes. Formally, the *left* and *right idealizers* of a rank-metric code $\operatorname{\mathcal{C}}\subseteq{{\mathcal L}}_{n,q}$ are defined as $$L(\operatorname{\mathcal{C}})\coloneqq\{\varphi(x) \in {{\mathcal L}}_{n,q} \colon \varphi \circ f \in \operatorname{\mathcal{C}}\, \text{for all} \, f \in \operatorname{\mathcal{C}}\},$$ $$R(\operatorname{\mathcal{C}})\coloneqq\{\varphi(x) \in {{\mathcal L}}_{n,q} \colon f \circ \varphi \in \operatorname{\mathcal{C}}\, \text{for all} \, f \in \operatorname{\mathcal{C}}\}.$$ Such structures have been also investigated in @lunardon2018nuclei under the name of middle and right nuclei. We conclude this section recalling a useful characterization result established in @mcguire2019characterization (see also @csajbok2019characterization) for determining the rank of a $\sigma$-polynomial. There, it was shown that it is sufficient to caluclate the rank of a possibly smaller matrix build up with the coefficient of the $\sigma$-polynomial. @mcguire2019characterization [Theorem 6] Let $f(x)=\sum_{i=0}^ka_ix^{\sigma^i}$ be an element of ${{\mathcal L}}_{n,\sigma}$ with $\sigma$-degree $k$. Then $$\mathrm{rk}(f)=n-k+\mathrm{rk}(C_f C_f^{\sigma} \cdot \ldots \cdot C_f^{\sigma^{n-1}}-I_k),$$ where $$C_f=\left( \begin{matrix} 0 & 0 & \cdots & 0 & -a_0/a_k \\ 1 & 0 & \cdots & 0 & -a_1/a_k \\ 0 & 1 & \cdots & 0 & -a_2/a_k \\ \vdots & \vdots & \ddots & \vdots & \vdots \\ 0 & 0 & \cdots & 1 & -a_{k-1}/a_k \end{matrix} \right),$$ $C_f^{\sigma^i}$ is the matrix obtained from $C_f$ by applying $\sigma^i$ to each of its entries and $I_k$ is the identity matrix of order $k$. Gabidulin and twisted Gabidulin codes {#sec:gab_and_tGab} ------------------------------------- In this subsection, we survey on the known constructions of ${\mathbb{F}_{q^n}}$-linear MRD codes, represented as subspaces of ${{\mathcal L}}_{n,q}$. First, we need to specify what is meant by ${\mathbb{F}_{q^n}}$-linearity. The isomorphism described in gives a natural intepretation of this notion as ${\mathbb{F}_{q^n}}$-subspaces of ${{\mathcal L}}_{n,q}$. However, this definition is not taking into account equivalence of codes, that is, one may have a rank-metric code ${{\mathcal C}}\subseteq {{\mathcal L}}_{n,q}$ which is not an ${\mathbb{F}_{q^n}}$-subspace, but it is equivalent to an ${\mathbb{F}_{q^n}}$-subspace of ${{\mathcal L}}_{n,q}$. With this in mind, one can extend the notion of ${\mathbb{F}_{q^n}}$-linearity to codes which *are equivalent to* an ${\mathbb{F}_{q^n}}$-subspace of ${{\mathcal L}}_{n,q}$. Sheekey characterized these codes in terms of their idealizers; see @sheekeysurvey [Definition 12]. Formally, we will say that a rank-metric code ${{\mathcal C}}\subseteq {{\mathcal L}}_{n,q}$ is *${\mathbb{F}_{q^n}}$-linear* if $L(\operatorname{\mathcal{C}})$ contains a subring isomorphic to $$\mathcal{F}_n:=\{\alpha x \colon \alpha \in {{\mathbb F}}_{q^n}\}\simeq {{\mathbb F}}_{q^n}.$$ In @de78, Delsarte gave the first construction for ${\mathbb{F}_{q^n}}$-linear MRD codes, and few years later, Gabidulin in @ga85a presented the same class of MRD codes by using linearized polynomials. These codes were then generalized to $\sigma$-polynomials for any generator $\sigma$ of $\operatorname{Gal}({\mathbb{F}_{q^n}}/{{\mathbb F}_{q}})$ by Kshevetskiy and Gabidulin in @Gabidulins, and they are now known as *Gabidulin codes*. Formally, for a given generator $\sigma$ of $\operatorname{Gal}({\mathbb{F}_{q^n}}/{{\mathbb F}_{q}})$ and a positive integer $k\leq n$, the $k$-dimensional *$\sigma$-Gabidulin code* is $${{\mathcal G}}_{k,\sigma}=\langle x,x^{\sigma},\ldots,x^{\sigma^{k-1}} \rangle_{{{\mathbb F}}_{q^n}}.$$ It is easy to see that ${{\mathcal G}}_{k,\sigma}$ is an ${\mathbb{F}_{q^n}}$-linear MRD code and $L({{\mathcal G}}_{k,\sigma})=R({{\mathcal G}}_{k,\sigma})\simeq {{\mathbb F}}_{q^n}$; see @liebhold2016automorphism [@lunardon2018generalized]. Five years ago, Sheekey generalized the family of $\sigma$-Gabidulin codes to what are now known as *twisted Gabidulin codes*. Formally, the $k$-dimensional *$\sigma$-twisted Gabidulin code* $\mathcal{H}_{k,\sigma}(\eta,h)$ is $$\mathcal{H}_{k,\sigma}(\eta,h)=\{a_0x+a_1x^{\sigma}+\ldots+a_{k-1}x^{\sigma^{k-1}}+\sigma^h(a_0)\eta x^{\sigma^{k}} \colon a_i \in {{\mathbb F}}_{q^n}\},$$ where $h \in \{0,\ldots,n-1\}$ and $\eta \in {{\mathbb F}}_{q^n}$ is such that ${\mathrm{N}}_{q^n/q}(\eta)\neq (-1)^{nk}$. In the same paper Sheekey showed that $\mathcal{H}_{k,\sigma}(\eta,h)$ is an ${{\mathbb F}}_q$-linear MRD code. Lunardon, Trombetti and Zhou in @lunardon2018generalized determined the automorphism group of $\sigma$-twisted Gabidulin codes and studied their equivalence. Moreover, they also determined their left and right idealizers: if $\eta \neq 0$, then $$L(\mathcal{H}_{k,\sigma}(\eta,h))\simeq{{\mathbb F}}_{q^{\gcd(n,h)}} \quad \mbox{ and } \quad R(\mathcal{H}_{k,\sigma}(\eta,h))\simeq{{\mathbb F}}_{q^{\gcd(n,k-h)}}.$$ As a consequence, $\mathcal{H}_{k,\sigma}(\eta,h)$ is ${\mathbb{F}_{q^n}}$-linear if and only if $h=0$. Further examples of ${\mathbb{F}_{q^n}}$-linear MRD codes can be found in @BZZ [@csajbok2018anewfamily; @csajbok2018maximum; @csajbok2018linearset; @MMZ; @ZZ] which exist only for $n \in \{6,7,8\}$ and in @longobardi2021large [@longobardizanellascatt] which exist for every $n$ even. Equivalence of rank-metric codes -------------------------------- In this section we recall some known results on the equivalence of rank-metric codes, which will be crucial for showing that the family of codes we are going to introduce is really new. For this purpose, we will use a technique based on applying suitable automorphisms of the Galois group $\operatorname{Gal}({\mathbb{F}_{q^n}}/{{\mathbb F}_{q}})$ to the code and checking the space that their images span. This technique was initiated by Overbeck in @overbeck2008structural as a structural attack on code-based cryptosystems based on Gabidulin codes. The same idea was elaborated in @horlemann2017new for a different purpose: there, Gabidulin codes were partially characterized in terms of the span of the code with its image under a single automorphism, under the additional assumption to have an MRD code. This characterization was later completed in @neri2020systematic, where the assumption of the code being MRD was dropped. The same strategy was used for the first time to derive code inequivalence results in @puchinger2018construction. This was later generalized to two automorphisms in @giuzzi2019identifiers, in order to characterize twisted Gabidulin codes and study their invariants; see also @zullo2018linear [Section 5.5]. Finally, the general technique for code inequivalence was developed in @neri2019invariants [@neri2020equivalence] and was used to give a full characterization of punctured Gabidulin codes and provide a lower bound on their equivalence classes; see also @neri2019PhD [Chapter 7]. We first recall a crucial result from @neri2020equivalence. In the following, for any rank-metric code ${{\mathcal C}}\subseteq {{\mathcal L}}_{n,q}$ and any automorphism $\sigma \in \operatorname{Gal}({\mathbb{F}_{q^n}}/{{\mathbb F}_{q}})$, we denote by $\sigma({{\mathcal C}})$ the rank-metric code $$\sigma({{\mathcal C}}):=\left\{x^\sigma \circ f(x) : f(x)\in {{\mathcal C}}\right\}\subseteq {{\mathcal L}}_{n,q}.$$ \[<span class="nodecor">@neri2020equivalence [Lemma 3.1], @neri2019invariants [Lemma 2]</span>\]\[prop:equivalence\_sum\] Let $\operatorname{\mathcal{C}}_1,\operatorname{\mathcal{C}}_2\subseteq {{\mathcal L}}_{n,q}$ be two ${\mathbb{F}_{q^n}}$-linear rank-metric codes and let $\sigma_1,\ldots,\sigma_r \in \operatorname{Gal}({\mathbb{F}_{q^n}}/{{\mathbb F}_{q}})$. If $\operatorname{\mathcal{C}}_1$ and $\operatorname{\mathcal{C}}_2$ are equivalent, then $\sigma_1(\operatorname{\mathcal{C}}_1)+\ldots+\sigma_r(\operatorname{\mathcal{C}}_1)$ and $\sigma_1(\operatorname{\mathcal{C}}_2)+\ldots+\sigma_r(\operatorname{\mathcal{C}}_2)$ are also equivalent. In particular, $$\dim_{{\mathbb{F}_{q^n}}}(\sigma_1(\operatorname{\mathcal{C}}_1)+\ldots+\sigma_r(\operatorname{\mathcal{C}}_1))=\dim_{{\mathbb{F}_{q^n}}}(\sigma_1(\operatorname{\mathcal{C}}_2)+\ldots+\sigma_r(\operatorname{\mathcal{C}}_2)).$$ Always in @neri2020equivalence, the following particular case has been considered. Let $\operatorname{\mathcal{C}}$ be an ${\mathbb{F}_{q^n}}$-linear rank-metric code. For a fixed $\sigma$ generator of $\operatorname{Gal}({\mathbb{F}_{q^n}}/{{\mathbb F}_{q}})$, and for a non-negative integer $i$, let $$s_i^\sigma(\operatorname{\mathcal{C}}):=\dim_{{{\mathbb F}}_{q^n}}(\operatorname{\mathcal{C}}+\sigma(\operatorname{\mathcal{C}})+\ldots+\sigma^i(\operatorname{\mathcal{C}})).$$ Then, the sequence $\{s_i^\sigma(\operatorname{\mathcal{C}})\}_{i \in \mathbb N}$ is invariant under code equivalence. This provides a useful criterion to determine when two codes are not equivalent. Of particular interest, the sequences $\{s_i^\sigma(\operatorname{\mathcal{C}})\}_{i\in \mathbb N}$ when $\operatorname{\mathcal{C}}$ is a Gabidulin or a twisted Gabidulin code were completely determined and are given by $$\label{eq:gabidulin_sequence} s_i^\sigma({{\mathcal G}}_{k,\sigma})=k+i, \quad \mbox{ for every } i \leq n-k,$$ $$\label{eq:twisted_sequence} s_i^\sigma({{\mathcal H}}_{k,\sigma}(\eta,0))=\begin{cases}k & \mbox { if } i=0 \\ k+i+1 & \mbox{ if } 1\leq i \leq n-k-1\end{cases}$$ We will also make use of the following notation. Let $f(x)=\sum_{i=0}^{n-1}a_ix^{\sigma^i} \in {{\mathcal L}}_{n,q}$, the $\sigma$-*support* of $f$ is defined as follows $\mathrm{supp}_{\sigma}(f)=\{i \colon a_i\ne 0 \}$. Clearly, if $f(x),g(x) \in {{\mathcal L}}_{n,q}$ such that $\mathrm{supp}_{\sigma}(f)\ne \mathrm{supp}_{\sigma}(g)$, then the $f(x)$ and $g(x)$ are ${\mathbb{F}_{q^n}}$-linearly independent. This definition can be extended to set of linearized polynomials as done in @lunardon2018generalized: let $\operatorname{\mathcal{C}}$ be a rank-metric code in ${{\mathcal L}}_{n,q}$, then the *universal $\sigma$-support* ${{\mathcal S}}_{\sigma}(\mathcal{C})$ of $\mathcal{C}$ is defined as the subset of ${\mathbb Z/n\mathbb Z}=\{0,\ldots,n-1\}$ $${{\mathcal S}}_{\sigma}({{\mathcal C}})=\bigcup _{f \in {{\mathcal C}}} \operatorname{supp}_{\sigma}(f).$$ One may immediately notice that if $\mathrm{supp}_{\sigma}(f)$ is not contained in ${{\mathcal S}}_\sigma(\mathcal{C})$, then $f(x)\notin \operatorname{\mathcal{C}}$. A new family of MRD codes {#sec:newfamily} ========================= Let us consider the following situation. Let $\sigma$ be a generator of $\mathrm{Gal}({\mathbb{F}_{q^n}}/{{\mathbb F}_{q}})$ and let $s$ be an integer coprime to $n$ and take the extension field of degree $ns$ over ${{\mathbb F}_{q}}$. Let $\overline{\sigma}$ be an element of $\operatorname{Gal}({{\mathbb F}}_{q^{ns}}/{{\mathbb F}_{q}})$ that is an extension of $\sigma$, that is, $\overline{\sigma}|_{{\mathbb{F}_{q^n}}}=\sigma$. We remark that an extension of $\sigma$ always exists over finite fields. Now, observe that $\langle\overline{\sigma}^s\rangle=\operatorname{Gal}({{\mathbb F}}_{q^{ns}}/{{\mathbb F}}_{q^s})$, as shown in the following remark. Suppose that $\sigma:x \in {\mathbb{F}_{q^n}}\mapsto x^{q^i} \in {\mathbb{F}_{q^n}}$, with $\gcd(i,n)=1$. Let $\overline{\sigma}: x \in {{\mathbb F}}_{q^{ns}} \mapsto x^{q^j} \in {{\mathbb F}}_{q^{ns}} \in \operatorname{Gal}({{\mathbb F}}_{q^{ns}}/{{\mathbb F}}_{q})$ be an extension of $\sigma$. Since $\overline{\sigma}|_{{\mathbb{F}_{q^n}}}=\sigma$, then $j=i+\ell n$, for a non negative integer $\ell$. Now, $\overline{\sigma}^s: x \in {{\mathbb F}}_{q^{ns}} \mapsto x^{q^{s(i+\ell n)}} \in {{\mathbb F}}_{q^{ns}}$, and since $\gcd(i,n)=1$, we get that $\gcd(j,n)=\gcd(i+\ell n,n)=1$ and hence $\langle\overline{\sigma}^s\rangle=\operatorname{Gal}({{\mathbb F}}_{q^{ns}}/{{\mathbb F}}_{q^s})$. Define the maps $\Psi_{\sigma,s}$ and $\Phi_{\sigma,s}$ as $$\begin{array}{rccl} \Psi_{\sigma,s} : &{{\mathcal L}}_{n,\sigma} & \longrightarrow & {{\mathcal L}}_{n,\overline{\sigma}^s} \\ &\sum_i f_ix^{\sigma^i} & \longmapsto & \sum_i f_ix^{\overline{\sigma}^{si}}, \end{array}$$ $$\begin{array}{rccl} \Phi_{\sigma,s} : &{{\mathcal L}}_{n,\sigma} & \longrightarrow & {{\mathcal L}}_{n, \sigma^s} \\ &\sum_i f_ix^{\sigma^i} & \longmapsto & \sum_i f_ix^{\sigma^{si}}. \end{array}$$ Observe that the map $\Phi_{\sigma,s}$ is a bijection, while the map $\Psi_{\sigma,s}$ is only injective. \[th:rankfs\] Let $s$ be an integer coprime to $n$ and take the extension field of degree $ns$ over ${{\mathbb F}_{q}}$ and let $\sigma$ be a generator of $\mathrm{Gal}({\mathbb{F}_{q^n}}/{{\mathbb F}_{q}})$. Let $f(x) \in {{\mathcal L}}_{n,\sigma}$. Then $\operatorname{rk}(\Psi_{\sigma,s}(f))=\operatorname{rk}(\Phi_{\sigma,s}(f))$. Denote by $k$ the $\sigma$-degree of $f(x)$. Then $$\mathrm{rk}(\Phi_{\sigma,s}(f))=n-k+\mathrm{rk}_{{\mathbb{F}_{q^n}}}(C_{\Phi_{\sigma,s}(f)} C_{\Phi_{\sigma,s}(f)}^{\sigma^s} \cdot \ldots \cdot C_{\Phi_{\sigma,s}(f)}^{\sigma^{s(n-1)}}-I_k)$$ and $$\mathrm{rk}(\Psi_{\sigma,s}(f))=n-k+\mathrm{rk}_{{{\mathbb F}}_{q^{ns}}}(C_{\Psi_{\sigma,s}(f)} C_{\Psi_{\sigma,s}(f)}^{\overline{\sigma}^s} \cdot \ldots \cdot C_{\Psi_{\sigma,s}(f)}^{\overline{\sigma}^{s(n-1)}}-I_k).$$ Since $C_{\Phi_{\sigma,s}(f)}=C_{\Psi_{\sigma,s}(f)} \in {\mathbb{F}_{q^n}}^{k\times k}$ and $\overline{\sigma}\in \mathrm{Gal}({{\mathbb F}}_{q^{ns}}/{{\mathbb F}}_{q})$ such that $\overline{\sigma}|_{{\mathbb{F}_{q^n}}}=\sigma$, it follows that $$C_{\Phi_{\sigma,s}(f)} C_{\Phi_{\sigma,s}(f)}^{\sigma^s} \cdot \ldots \cdot C_{\Phi_{\sigma,s}(f)}^{\sigma^{s(n-1)}}=C_{\Psi_{\sigma,s}(f)} C_{\Psi_{\sigma,s}(f)}^{\overline{\sigma}^s} \cdot \ldots \cdot C_{\Psi_{\sigma,s}(f)}^{\overline{\sigma}^{s(n-1)}},$$ and hence $\operatorname{rk}(\Psi_{\sigma,s}(f))=\operatorname{rk}(\Phi_{\sigma,s}(f))$. As a natural consequence one can get the following result on rank-metric codes. \[cor:s\] Let $s$ be an integer coprime to $n$. Let $\mathcal{C}$ be an ${{\mathbb F}}_p$-linear rank-metric code of ${{\mathcal L}}_{n,\sigma}$ and let $\overline{\sigma}\in \mathrm{Gal}({{\mathbb F}}_{q^{ns}}/{{\mathbb F}}_{q})$ be an extension of $\sigma$. Suppose that $\Psi_{\sigma,s}(\operatorname{\mathcal{C}})\subseteq {{\mathcal L}}_{n,\overline{\sigma}^s}$ has minimum distance $d$. Then $\Phi_{\sigma,s}(\mathcal{C})\subseteq {{\mathcal L}}_{n,\sigma^s}$ has minimum distance $d$. In the spirit of @lunardon2018generalized [Theorem 3.2], Corollary \[cor:s\] can be specialized to MRD codes as follows. \[cor:s2\] Let $s$ be an integer coprime to $n$. Let $\mathcal{C}$ be an ${{\mathbb F}}_p$-linear MRD code of ${{\mathcal L}}_{n,\sigma}$ with minimum distance $d$ and let $\overline{\sigma}\in \mathrm{Gal}({{\mathbb F}}_{q^{ns}}/{{\mathbb F}}_{q})$ be an extension of $\sigma$. Assume that $\Psi_{\sigma,s}(\operatorname{\mathcal{C}}) \subseteq {{\mathcal L}}_{n,\overline{\sigma}^s}$ has minimum distance at least $d$. Then $\Phi_{\sigma,s}(\mathcal{C})\subseteq {{\mathcal L}}_{n,\sigma^s}$ is an MRD code. The assumption on $\Psi_{\sigma,s}(\operatorname{\mathcal{C}}) \subseteq {{\mathcal L}}_{n,\overline{\sigma}^s}$ in Corollary \[cor:s2\] is satisfied by all the known examples of MRD codes, that is the minimum distance of $\operatorname{\mathcal{C}}\subseteq {{\mathcal L}}_{n,\sigma}$ coincides with the minimum distance of $\Psi_{\sigma,s}(\operatorname{\mathcal{C}})$, for any $s$. So, one could use Corollary \[cor:s2\] and the fact that $\theta$-Gabidulin codes and $\theta$-twisted Gabidulin codes are MRD when $\theta$ is the $q$-Frobenius automorphism, to prove that $\sigma$-Gabidulin and $\sigma$-twisted Gabidulin codes are MRD, for every generator $\sigma$ of $\operatorname{Gal}({\mathbb{F}_{q^n}}/{{\mathbb F}_{q}})$. This is indeed the technique used in @Gabidulins for $\sigma$-Gabidulin codes and in @lunardon2018generalized for $\sigma$-twisted Gabidulin codes. Recently, in @longobardi2021large and in @longobardizanellascatt two families of MRD codes that exist for infinitely many values of $n$ were presented. We recall them via the following two theorems. \[<span class="nodecor">@longobardizanellascatt [Theorem 2.4]</span>\]\[th:scattLZ\] Let $n=2t$, $t \geq 3$, $q$ be an odd prime power and let $\sigma$ be a generator of $\mathrm{Gal}({\mathbb{F}_{q^n}}/{{\mathbb F}_{q}})$. If $t$ is even, or $t$ is odd and $q\equiv 1 \pmod{4}$, then the rank-metric code $$\operatorname{\mathcal{C}}=\langle x,\psi(x) \rangle_{{\mathbb{F}_{q^n}}},$$ with $\psi(x)=x^\sigma+x^{\sigma^{t-1}}-x^{\sigma^{t+1}}+x^{\sigma^{2t-1}}$, is an MRD code. \[<span class="nodecor">@longobardi2021large [Theorem 3.1]</span>\] \[th:scatteredLMTZ\] Let $n=2t$, $t \geq 3$, let $q$ be an odd prime power and let $\theta \colon x \in {\mathbb{F}_{q^n}}\longmapsto x^q \in {\mathbb{F}_{q^n}}$. For each $h \in {{\mathbb F}}_{q^n} \setminus {{\mathbb F}}_{q^t}$ such that ${\mathrm{N}}_{q^n/q^t}(h)=-1$, the rank-metric code $$\operatorname{\mathcal{C}}_{h,t}=\langle x,\psi_{h,t}(x) \rangle_{{\mathbb{F}_{q^n}}},$$ where $$\psi_{h,t}(x)=x^\theta+x^{\theta^{t-1}}+h\theta(h)x^{\theta^{t+1}}+h\theta^{-1}(h^{-1})x^{\theta^{2t-1}} \in {{\mathcal L}}_{n,q} ,$$ is an MRD code. In the following result we extend the above constructions, by using Corollary \[cor:s2\]. \[th:newfamily\] Let $n=2t$, $t \geq 3$, $q$ be an odd prime power and let $\sigma$ be a generator of $\mathrm{Gal}({\mathbb{F}_{q^n}}/{{\mathbb F}_{q}})$. For any $h \in {{\mathbb F}}_{q^n}$ such that ${\mathrm{N}}_{q^n/q^t}(h)=-1$, the rank-metric code $$\mathcal{C}_{h,t,\sigma}= \langle x, \psi_{h,t,\sigma}(x) \rangle_{{{\mathbb F}}_{q^n}},$$ with $$\psi_{h,t,\sigma}(x)=x^\sigma +x^{\sigma^{t-1}}+h\sigma(h)x^{\sigma^{t+1}}+h\sigma^{-1}(h^{-1})x^{\sigma^{2t-1}},$$ is an MRD code. First assume that $h \notin {{\mathbb F}}_{q^t}$. Let $\sigma\colon x \in {\mathbb{F}_{q^n}}\mapsto x^{q^s}\in {\mathbb{F}_{q^n}}$, with $\gcd(s,n)=1$, and consider $\Psi_{\theta,s}(\operatorname{\mathcal{C}}_{h,t,\theta})\subseteq {{\mathcal L}}_{n,\overline{\sigma}}$, where $\theta\colon x \in {\mathbb{F}_{q^n}}\mapsto x^{q}\in {\mathbb{F}_{q^n}}$ and $\overline{\sigma}\colon x \in {{\mathbb F}}_{q^{ns}} \mapsto x^{q^s}\in {{\mathbb F}}_{q^{ns}}$. We now show that $\Psi_{\theta,s}(\operatorname{\mathcal{C}}_{h,t,\theta})$ is an MRD code. First note that $h \notin {{\mathbb F}}_{q^{st}}$. Indeed if $h \in {{\mathbb F}}_{q^{st}}$, then $h \in {{\mathbb F}}_{q^{2t}} \cap {{\mathbb F}}_{q^{st}} = {{\mathbb F}}_{q^t}$, a contradiction. Moreover, since $\overline{\sigma}$ is a generator of $\mathrm{Gal}({{\mathbb F}}_{q^{ns}}/{{\mathbb F}}_{q^s})$ then $\overline{\sigma}^t(h)h={\mathrm{N}}_{q^n/q^t}(h)=-1$. By applying Theorem \[th:scatteredLMTZ\], $\psi_{\theta,s}(\operatorname{\mathcal{C}}_{h,t,\theta})$ is a rank-metric code of ${{\mathcal L}}_{n,\overline{\sigma}}$ having minimum distance $n-1$. Corollary \[cor:s2\] implies that $\Phi_{\theta,s}(\operatorname{\mathcal{C}}_{h,t,\theta})=\operatorname{\mathcal{C}}_{h,t,\sigma}$ is an MRD code contained in ${{\mathcal L}}_{n,\sigma}$. If $h$ is in ${{\mathbb F}}_{q^t}$, then ${\mathrm{N}}_{q^n/q^t}(h)=h^2=-1$ and hence $h \in {{\mathbb F}}_{q^2}$. So, if $h \in {{\mathbb F}_{q}}$ then $$\psi_{h,t,\sigma}(x)=x^\sigma+x^{\sigma^{t-1}}-x^{\sigma^{t+1}}+x^{\sigma^{2t-1}},$$ and if $h \in {{\mathbb F}}_{q^2}\setminus {{\mathbb F}_{q}}$ (and hence $t$ is even) then $$\psi_{h,t,\sigma}(x)=x^\sigma+x^{\sigma^{t-1}}+x^{\sigma^{t+1}}-x^{\sigma^{2t-1}}=x^\theta+x^{\theta^{t-1}}-x^{\theta^{t+1}}+x^{\theta^{2t-1}},$$ where $\theta=\sigma^{t-1}$, so that the rank-metric code $\operatorname{\mathcal{C}}_{h,t,\sigma}$ is MRD because of Theorem \[th:scattLZ\]. When choosing $\sigma$ as $x\in {\mathbb{F}_{q^n}}\mapsto x^{q}\in {\mathbb{F}_{q^n}}$, the MRD codes $\operatorname{\mathcal{C}}_{h,t,\sigma}$ coincide with the MRD codes in Theorem \[th:scatteredLMTZ\]. Whereas, if $h$ is in ${{\mathbb F}}_{q^t}$ in Theorem \[th:newfamily\], then the MRD code $\operatorname{\mathcal{C}}_{h,t,\sigma}$ coincide with those in Theorem \[th:scattLZ\], as already pointed out in Theorem \[th:newfamily\]. Let $V$ be a $2$-dimensional vector space over ${\mathbb{F}_{q^n}}$ and let $\Lambda={\mathrm{PG}}(V,{{\mathbb F}}_{q^n})$. Let $U$ be an ${{\mathbb F}_{q}}$-subspace of $V$ of dimension $k$, then the set of points $$L_U=\{{\langle}{\bf u} {\rangle}_{\mathbb{F}_{q^n}} : {\bf u}\in U\setminus \{{\bf 0} \}\}\subseteq \Lambda$$ is said to be an ${{\mathbb F}_{q}}$-*linear set of rank $k$*. The ${{\mathbb F}_{q}}$-linear set $L_U$ is called *scattered* if $|L_U|=\frac{q^k-1}{q-1}$. We refer to @lavrauw2015field and @polverino2010linear for comprehensive references on linear sets. Let $L_U$ be an ${{\mathbb F}_{q}}$-linear set of rank $n$ in $\Lambda$. Since ${\rm P\Gamma L}(1,q^n)$ is $3$-transitive on ${\mathrm{PG}}(1,q^n)$, we can suppose that (up to ${\rm P\Gamma L}(1,q^n)$-equivalence) $L_U$ does not contain the point $\langle(0,1)\rangle_{{\mathbb{F}_{q^n}}}$, so that there exists $f(x) \in {{\mathcal L}}_{n,q}$ such that $L_U$ is ${\rm P\Gamma L}(1,q^n)$-equivalent to $$L_f=\{ \langle (x,f(x)) \rangle_{{\mathbb{F}_{q^n}}} \colon x \in {\mathbb{F}_{q^n}}^* \}.$$ Sheekey in @sheekey2016new called a $\sigma$-polynomial $f(x)$ *scattered* if $L_f$ turns out to be a scattered ${{\mathbb F}_{q}}$-linear set. In @sheekey2016new, it was shown a correspondence between scattered linear sets of $\mathrm{PG}(1,q^n)$ and ${\mathbb{F}_{q^n}}$-linear MRD codes in ${{\mathcal L}}_{n,q}$, which has been later generalized in @csajbok2017maximum [@lunardon2017mrd; @polverino2020connections; @sheekeyVdV; @zini2020scattered]. In particular, the linear set $L_f$ is scattered if and only if $\mathcal{C}_f=\langle x,f(x)\rangle_{{\mathbb{F}_{q^n}}}$ is an MRD code. So, under the assumption of Theorem \[th:newfamily\], we have proved that the $\psi_{h,t,\sigma}(x)$ is a scattered polynomial. In @longobardi2021large [@longobardizanellascatt], the results are stated using the terminology of linear sets. In the next section we study in details the equivalence issue of the codes in Theorem \[th:newfamily\] with themselves and with the other known ${\mathbb{F}_{q^n}}$-linear MRD codes, proving that the family of $\operatorname{\mathcal{C}}_{h,t,\sigma}$'s contains new MRD codes. Study of the equivalence of the new family {#sec:equivalence} ========================================== This section is dedicated to the equivalence of the new family of codes ${{\mathcal C}}_{h,t,\sigma}$. We first discuss their novelty, showing that they are not equivalent to any family of ${\mathbb{F}_{q^n}}$-linear MRD codes known. Later, we study their equivalence classes, characterizing exactly when two codes of the form ${{\mathcal C}}_{h,t,\sigma}$ and ${{\mathcal C}}_{k,t,\theta}$ are equivalent. From these results we can deduce the exact number of equivalence classes of such codes. However, since this formula is a bit involved, we also provide a more effective lower bound. We fix here the following notation that will be kept for the whole section. From now on, we consider $\sigma$ to be a generator of $\operatorname{Gal}({\mathbb{F}_{q^n}}/{{\mathbb F}_{q}})$ and $h\in{\mathbb{F}_{q^n}}$ to be such that $\sigma^t(h)h=-1$. Furthermore, we fix $n=2t$, for some positive integer $t \geq 5$. Notice that this assumption on $t$ is taken in order to ease the computations, even though the codes ${{\mathcal C}}_{h,t,\sigma}$ are MRD also for $t=3,4$. When $t=3$ the inequivalence with the other known ${\mathbb{F}_{q^n}}$-linear MRD codes such as Gabidulin codes, twisted Gabidulin codes and those in @csajbok2018anewfamily [@csajbok2018maximum; @csajbok2018linearset; @MMZ; @ZZ] has been proved in @BZZ [Section 4]. However when $t \in \{3,4\}$ the computations of this section become more complicated, since some of the arguments that we are going to use do not work. We warn the reader that for these two cases some of the results presented might not be true. We first start with an auxiliary result which will be widely used in this section. \[lem:auxiliary\] Let $h\in{\mathbb{F}_{q^n}}$ be such that ${\mathrm{N}}_{q^n/q^t}(h)=\sigma^t(h)h=-1$. Then $\sigma^2(h)h\neq 1$. Since $q$ is odd, then necessarily $h \neq \pm 1$. Assume now by contradiction that $\sigma^2(h)h=1$, or equivalently $\sigma^2(h)=h^{-1}$, and $\sigma^t(h)h=-1$. Then $$h=\sigma^n(h)=\underbrace{\sigma^2\circ\ldots\circ\sigma^2}_{t \mbox{ \tiny{times} }}(h)=\begin{cases} h & \mbox{ if } t \mbox{ is even,}\\ h^{-1} & \mbox{ if } t \mbox{ is odd,} \end{cases}$$ which implies that $t$ is even. Moreover, we have $\sigma^4(h)=h$ and let $t\equiv t' \pmod{4}$ with $t' \in\{0,2\}$, hence $$-1=\sigma^t(h)h=( \sigma^{t'}\circ(\sigma^4\circ\ldots\circ\sigma^4))(h) h=\sigma^{t'}(h)h=\begin{cases} \sigma^2(h)h & \mbox{ if } t \equiv 2 \, \pmod{4},\\ h^2 & \mbox{ if } t \equiv 0 \, \pmod{4}. \end{cases}$$ Since $q$ is odd, $1\neq -1$ and we get a contradiction if $t\equiv 2\, \pmod{4}$. If instead $t \equiv 0 \, \pmod{4}$, we have $h^2=-1$, and therefore $h \in {{\mathbb F}}_{q^2}$, which in turn implies $\sigma^2(h)=h$. Thus, we have simultaneously $h^2=1$ and $h^2=-1$, which yields a contradiction. Inequivalence with Gabidulin and twisted Gabidulin codes -------------------------------------------------------- Here we compare the construction of the family ${{\mathcal C}}_{h,t,\sigma}$ with the two most prominent family of ${\mathbb{F}_{q^n}}$-linear MRD codes, namely Gabidulin and twisted Gabidulin codes. \[prop:not\_Gabidulin\] Let ${{\mathcal G}}_{2,\theta}$ be a $2$-dimensional Gabidulin code. Then ${{\mathcal G}}_{2,\theta}$ is not equivalent to ${{\mathcal C}}_{h,t,\sigma}$, for any $h$ such that $\sigma^t(h)h=-1$ and any generators $\sigma,\theta$ of $\operatorname{Gal}({\mathbb{F}_{q^n}}/{{\mathbb F}_{q}})$. Since both $\sigma$ and $\theta$ generate $\operatorname{Gal}({\mathbb{F}_{q^n}}/{{\mathbb F}_{q}})$, then we can write $\theta=\sigma^s$ for some $s$ coprime with $n$. Moreover, ${{\mathcal G}}_{2,\theta}$ is equivalent to ${{\mathcal G}}_{2,\theta^{-1}}$, hence, without loss of generality we can suppose $0<s<t$. Suppose that ${{\mathcal G}}_{2,\sigma^s}$ and ${{\mathcal C}}_{h,t,\sigma}$ are equivalent, then by Proposition \[prop:equivalence\_sum\] and we must have $s_1^{\sigma^s}({{\mathcal C}}_{h,t,\sigma})=3$, that is $\dim_{{\mathbb{F}_{q^n}}}({{\mathcal D}})=3$, where ${{\mathcal D}}:={{\mathcal C}}_{h,t,\sigma}+\sigma^{s}({{\mathcal C}}_{h,t,\sigma})$. We have $${{\mathcal D}}=\langle x, x^{\sigma^s}, \psi_{h,t,\sigma}(x), x^{\sigma^s}\circ \psi_{h,t,\sigma}(x) \rangle_{{\mathbb{F}_{q^n}}}.$$ Notice that the first three generators are clearly linearly indpendent, since the first two have disjoint $\sigma$-supports and the $\sigma$-support of $\psi_{h,t,\sigma}(x)$ is not contained in $\{0,s\}$. Thus, we must have $x^{\sigma^s}\circ \psi_{h,t,\sigma}(x)\in \langle x,x^{\sigma^s},\psi_{h,t,\sigma}(x)\rangle_{{\mathbb{F}_{q^n}}}$, that implies $$\operatorname{supp}_\sigma(x^{\sigma^s}\circ \psi_{h,t,\sigma}(x))=\{s+1,t+s-1,t+s+1,s-1\}\subseteq \{0,1,s,t-1,t+1,2t-1\}.$$ However, due to the restriction on $s$ being coprime with $2t$, this can never happen. \[th:no\_twisted\] Let ${{\mathcal H}}_{\eta,\theta}:={{\mathcal H}}_{2,\theta}(\eta,0)$ be a $2$-dimensional ${\mathbb{F}_{q^n}}$-linear twisted Gabidulin code, and let $t\geq 5$. Then ${{\mathcal H}}_{\eta,\theta}$ is not equivalent to ${{\mathcal C}}_{h,t,\sigma}$, for any admissible choice of $h$, $\eta$ and any generators $\sigma, \theta$ of $\operatorname{Gal}({\mathbb{F}_{q^n}}/{{\mathbb F}_{q}})$. Since both $\sigma$ and $\theta$ generate $\operatorname{Gal}({\mathbb{F}_{q^n}}/{{\mathbb F}_{q}})$, then we can write $\theta=\sigma^s$ for some $s$ coprime with $n$. Moreover, ${{\mathcal H}}_{\eta,\theta}$ is equivalent to ${{\mathcal H}}_{\eta',\theta^{-1}}$, hence, without loss of generality we can suppose $0<s<t$. So, from now on, we are assuming $$\label{eq:conditions_on_s} 1\leq s \leq t-1, \qquad \gcd(s,2t)=1$$ Suppose that ${{\mathcal H}}_{\eta,\sigma^s}$ and ${{\mathcal C}}_{h,t,\sigma}$ are equivalent, then by Proposition \[prop:equivalence\_sum\] and we must have $s_1^{\sigma^s}({{\mathcal C}}_{h,t,\sigma})=4$ and $s_2^{\sigma^s}({{\mathcal C}}_{h,t,\sigma})=5$. The first assertion has to be true. In fact, if $s_1^{\sigma^s}({{\mathcal C}}_{h,t,\sigma})=2$, then ${{\mathcal C}}_{h,t,\sigma}$ has rank one elements and cannot be MRD. Moreover, if $s_1^{\sigma^s}({{\mathcal C}}_{h,t,\sigma})=3$, since ${{\mathcal C}}_{h,t,\sigma}$ is MRD, then it must be a Gabidulin code (see e.g. @horlemann2017new [Theorem 4.8]). However, by Proposition \[prop:not\_Gabidulin\], this is not possible. Hence, we deduce that $s_1^{\sigma^s}({{\mathcal C}}_{h,t,\sigma})=4$. Assume now that $s_2^{\sigma^s}({{\mathcal C}}_{h,t,\sigma})=5$, and define $${{\mathcal D}}:={{\mathcal C}}_{h,t,\sigma}+\sigma^{s}({{\mathcal C}}_{h,t,\sigma}).$$ We first show that $x^{\sigma^{2s}} \notin {{\mathcal D}}$. Assume on the contrary that $x^{\sigma^{2s}} \in {{\mathcal D}}$. This implies that $2s\in{{\mathcal S}}_{\sigma}({{\mathcal D}})=\{0,1,s-1,s,s+1,t-1,t+1,t+s-1,t+s+1,-1\}$. Recalling our assumptions on $s$, it is easy to observe that we can only have $$2s\in \{s+1,t-1,t+1,t+s-1\}.$$ . If this happens then $s=1$. This translates in $$x^{\sigma^2}\in \langle x, x^{\sigma}, x^{\sigma^{t-1}}+h\sigma(h)x^{\sigma^{t+1}}+h\sigma^{-1}(h^{-1})x^{\sigma^{2t-1}}, x^{\sigma^2}+x^{\sigma^{t}}+\sigma(h)\sigma^2(h)x^{\sigma^{t+2}}\rangle_{{\mathbb{F}_{q^n}}}={{\mathcal D}}.$$ It is easy to see that this is not possible. Indeed, the only generator of ${{\mathcal D}}$ whose $\sigma$-support contains $2$ is $f(x)=x^{\sigma^2}+x^{\sigma^{t}}+\sigma(h)\sigma^2(h)x^{\sigma^{t+2}}$, and its $\sigma$-support is disjoint from the $\sigma$-supports of the other generators. . Then $$x^{\sigma^{2s}}\in \langle x, x^{\sigma^{s}}, x^\sigma+x^{\sigma^{2s}}+h\sigma^{-1}(h^{-1})x^{\sigma^{2s+1}}, x^{\sigma^{s+1}}+x^{\sigma^{s-2}}+\sigma^s(h)\sigma^{s-1}(h^{-1})x^{\sigma^{s-1}}\rangle_{{\mathbb{F}_{q^n}}}={{\mathcal D}}.$$ The only generator of ${{\mathcal D}}$ whose $\sigma$-support contains $2s$ is $f(x)=x^\sigma+x^{\sigma^{2s}}+h\sigma^{-1}(h^{-1})x^{\sigma^{2s+1}}$, and its $\sigma$-support is disjoint from the $\sigma$-supports of the other generators, due to the conditions that imply $s\geq 3$. Analogously one can exclude these two cases. At this point, since we are assuming $s_2^{\sigma^s}({{\mathcal C}}_{h,t,\sigma})=5$, we must have $$g(x):=x^{\sigma^{2s+1}}+x^{\sigma^{2s+t-1}}+\sigma^{2s}(h)\sigma^{2s+1}(h)x^{\sigma^{2s+t+1}}+\sigma^{2s}(h)\sigma^{2s-1}(h^{-1})x^{\sigma^{2s-1}} \in {{\mathcal D}}',$$ where ${{\mathcal D}}':={{\mathcal D}}+\langle x^{\sigma^{2s}}\rangle_{{\mathbb{F}_{q^n}}}$. This is equivalent to say $\operatorname{supp}_{\sigma}(g)\subseteq {{\mathcal S}}_\sigma({{\mathcal D}}')$, i.e. $$\label{eq:containment}\{2s-1,2s+1,2s+t-1,2s+t+1\} \subseteq \{0,1,-1,t-1,t+1,s,s-1,s+1,s+t-1,s+t+1,2s\}$$ and in particular $2s+1\in {{\mathcal S}}_\sigma({{\mathcal D}})$. One can observe that, due to the conditions , we can only have $$2s+1 \in \{-1,t-1,t+s-1\}.$$ . This means $s=t-1$ and becomes $$\{-3,-1,t-3,t-1\}\subseteq \{0,1,-1,t-2,t-1,t,t+1,-2\}.$$ However, since $t\geq 5$, this is not possible. . In this case can be written as $$\{-3,-1,2s-1,2s+1\}\subseteq\{0,1,-1,s,s-1,s+1,2s,2s+1,2s+3,3s+1,3s+3 \}$$ Since $t\geq 5$ and $2s+1=t-1$, and because of , we have $s\geq 3$ and $t\geq 8$. With this range of parameters it is immediate to see that $-3 \notin {{\mathcal S}}_\sigma({{\mathcal D}}')$, so also this case is not possible. . This means $s=t-1$ and becomes $$\{-5,-3,t-5,t-3\}\subseteq \{0,1,-1,t-3,t-2,t-1,t+1,-4,-3,\}.$$ Since we are assuming $t\geq 5$, it is easy to see that $-5$ and $t-5$ do no belong to ${{\mathcal S}}_\sigma({{\mathcal D}}')$. This finally shows that $s_2^{\sigma^s}({{\mathcal C}}_{h,t,\sigma})=6$, and thus ${{\mathcal C}}_{h,t,\sigma}$ and ${{\mathcal H}}_{\eta,\sigma^s}$ cannot be equivalent due to Proposition \[prop:equivalence\_sum\]. Note that neither the equivalence of a code ${{\mathcal C}}_{h,t,\sigma}$ with any other twisted Gabidulin code ${{\mathcal H}}_{2,\theta}(\eta,h)$ is possible. Indeed, as discussed in Section \[sec:gab\_and\_tGab\], if $h \neq 0$ then the left idealizer of ${{\mathcal H}}_{2,\theta}(\eta,h)$ is isomorphic to a finite field of cardinality $q^{\gcd(h,n)}$. Therefore, ${{\mathcal H}}_{2,\theta}(\eta,h)$ is not an ${\mathbb{F}_{q^n}}$-linear code, while ${{\mathcal C}}_{h,t,\sigma}$ is ${\mathbb{F}_{q^n}}$-linear and has left idealizer isomorphic to ${\mathbb{F}_{q^n}}$; by @lunardon2018nuclei [Proposition 4.1] these codes cannot be equivalent. Equivalence among themselves ---------------------------- In this section we investigate the equivalence issue for codes within the family introduced in Theorem \[th:newfamily\]. We start with the following remark. \[rem:h\] Let $\rho \in \mathrm{Aut}({\mathbb{F}_{q^n}})$. One can easily check that $\mathrm{N}_{q^n/q^t}(\rho(h))=\rho(\mathrm{N}_{q^n/q^t}(h))=\rho(-1)=-1$ and $(\operatorname{\mathcal{C}}_{h,t,\sigma})^\rho=\operatorname{\mathcal{C}}_{\rho(h),t,\sigma}$. Hence we can immediately derive that $\operatorname{\mathcal{C}}_{h,t,\sigma}$ and $\operatorname{\mathcal{C}}_{\rho(h),t,\sigma}$ are equivalent. \[th:equivspecialcase\] Let $t\geq 5$ and consider $\mathcal{C}_{h,t,\sigma}$ and $\operatorname{\mathcal{C}}_{k,t,\sigma^s}$. Then the following hold: - If $s = 1$, then $\mathcal{C}_{h,t,\sigma}$ and $\operatorname{\mathcal{C}}_{k,t,\sigma^s}$ are equivalent if and only if there exists $\rho \in \mathrm{Aut}({\mathbb{F}_{q^n}})$ such that $$\rho(h)=\left\{ \begin{array}{ll} \pm k, & \text{if}\,\, t \not\equiv 2 \pmod{4},\\ l k,\,\,\text{where}\,l^{q^2+1}=1, & \text{if}\,\, t \equiv 2 \pmod{4}. \end{array} \right.$$ - If $s = -1$, $\mathcal{C}_{h,t,\sigma}$ and $\operatorname{\mathcal{C}}_{k,t,\sigma^s}$ are equivalent if and only if there exists $\rho \in \mathrm{Aut}({\mathbb{F}_{q^n}})$ $$\rho(h)=\left\{ \begin{array}{ll} \pm k^{-1}, & \text{if}\,\, t \not\equiv 2 \pmod{4},\\ l k^{-1},\,\text{where}\,l^{q^2+1}=1, & \text{if}\,\, t \equiv 2 \pmod{4}. \end{array} \right.$$ - If $s = t-1$, with $t$ even, then $\mathcal{C}_{h,t,\sigma}$ and $\operatorname{\mathcal{C}}_{k,t,\sigma^s}$ are equivalent if and only if there exists $\rho \in \mathrm{Aut}({\mathbb{F}_{q^n}})$ such that $$\rho(h)=\left\{ \begin{array}{ll} \pm k, & \text{if}\,\, t \not\equiv 2 \pmod{4},\\ l k,\,\text{where}\,l^{q^2+1}=1, & \text{if}\,\, t \equiv 2 \pmod{4}. \end{array} \right.$$ - If $s = t+1$, with $t$ even, then $\mathcal{C}_{h,t,\sigma}$ and $\operatorname{\mathcal{C}}_{k,t,\sigma^s}$ are equivalent if and only if there exists $\rho \in \mathrm{Aut}({\mathbb{F}_{q^n}})$ such that $$\rho(h)=\left\{ \begin{array}{ll} \pm k^{-1}, & \text{if}\,\, t \not\equiv 2 \pmod{4},\\ l k^{-1},\,\text{where}\,l^{q^2+1}=1, & \text{if}\,\, t \equiv 2 \pmod{4}. \end{array} \right.$$ . Suppose that $\mathcal{C}_{h,t,\sigma}$ and $\operatorname{\mathcal{C}}_{k,t,\sigma}$ are equivalent, so there exists an isometry $\varphi$ such that $\varphi(\operatorname{\mathcal{C}}_{h,t,\sigma})=\operatorname{\mathcal{C}}_{k,t,\sigma}$. So, $\varphi(p(x))=f_1 \circ p(x)^\rho \circ f_2(x)$, for $f_1(x)$ and $f_2(x)$ two invertible $\sigma$-polynomials in ${{\mathcal L}}_{n,q}$ and $\rho \in \mathrm{Aut}({\mathbb{F}_{q^n}})$. By @sheekeyVdV [Proposition 3.8], it follows that we may assume $f_1(x)=x^{\sigma^i}$ for some $i \in \{0,\ldots,n-1\}$. We may also assume $\rho$ to be the identity map and $i=0$, since by Remark \[rem:h\] the code $\operatorname{\mathcal{C}}_{h,t,\sigma}$ is equivalent to $\operatorname{\mathcal{C}}_{\sigma^i(\rho(h)),t,\sigma}$. Since $\varphi(x) \in \operatorname{\mathcal{C}}_{k,t,\sigma}$ then $\varphi(x)=ax+b\psi_{k,t,\sigma}(x)$, which implies that $f_2(x)=ax+b\psi_{k,t,\sigma}(x)$. Also, since $\varphi( \psi_{h,t,\sigma}(x)) \in \operatorname{\mathcal{C}}_{k,t,\sigma}$ then $\varphi(\psi_{h,t,\sigma}(x))=cx+d\psi_{k,t,\sigma}(x)$. In particular, one gets $$\label{eq:s=1prima} cx+d\psi_{k,t,\sigma}(x)=\psi_{h,t,\sigma}(ax)+\psi_{k,t,\sigma}(b\psi_{h,t,\sigma}(x)).$$ Arguing as in @longobardi2021large [Case 1 and Case 2, Proof of Theorem 4.2] one gets that $h=lk$, with $l=\pm 1$ if $t\not\equiv 2\pmod{4}$ and $l\in {{\mathbb F}}_{q^4}$ such that $l^{q^2+1}=1$ if $t\equiv 2\pmod{4}$. Conversely, assume that $h=lk$, with $l=\pm 1$ if $t\not\equiv 2\pmod{4}$ and $l\in {{\mathbb F}}_{q^4}$ such that $l^{q^2+1}=1$ if $t\equiv 2\pmod{4}$. If $t \not \equiv 2\pmod{4}$ then the two codes $\operatorname{\mathcal{C}}_{h,t,\sigma}$ and $\operatorname{\mathcal{C}}_{k,t,\sigma}$ coincide, and hence they are equivalent. Now, suppose that $t \equiv 2\pmod{4}$. Choose $a \in {{\mathbb F}}_{q^4}$ such that $$\sigma^3(a)\sigma(a^{-1})=l\sigma(l),$$ and $d=\sigma(a)$. As in @longobardi2021large [Case 1, Proof of Theorem 4.2], one can show that $$\label{eq:systems=1} \begin{cases} d=\sigma(a)=\sigma^{t-1}(a),\\ dh\sigma(h)=\sigma^{t+1}(a)k\sigma(k),\\ dh\sigma^{-1}(h^{-1})=\sigma^{-1}(a)k\sigma^{-1}(k^{-1}), \end{cases}$$ so that $$d\psi_{h,t,\sigma}(x)=\psi_{k,t,\sigma}(ax).$$ Consider $\tau(x)=ax$, then $$\operatorname{\mathcal{C}}_{k,t,\sigma}\circ \tau=\langle ax,d\psi_{h,t,\sigma}(x)\rangle_{{\mathbb{F}_{q^n}}}=\operatorname{\mathcal{C}}_{h,t,\sigma},$$ and the two codes $\operatorname{\mathcal{C}}_{k,t,\sigma}$ and $\operatorname{\mathcal{C}}_{h,t,\sigma}$ are equivalent. . Our aim is first to prove that $\operatorname{\mathcal{C}}_{k,t,\sigma^{-1}}$ is equivalent to $\operatorname{\mathcal{C}}_{k^{-1},t,\sigma}$, and then we use the case $s=1$. So, now we need find $b,c\in {\mathbb{F}_{q^n}}^*$ such that $$\label{eq:s=-1map} cx=\psi_{k,t,\sigma^{-1}}(b\psi_{k^{-1},t,\sigma}(x)),$$ which is enough to prove that $\operatorname{\mathcal{C}}_{k,t,\sigma^{-1}}$ is equivalent to $\operatorname{\mathcal{C}}_{k^{-1},t,\sigma}$. Indeed, suppose we have found such $b$ and $c$, then the map $\psi_{k,t,\sigma^{-1}}(x)$ is invertible, otherwise we would get a contradiction to , and $\psi_{k,t,\sigma^{-1}}(\operatorname{\mathcal{C}}_{k^{-1},t,\sigma})=\langle \psi_{k,t,\sigma^{-1}}(x),cx\rangle_{{\mathbb{F}_{q^n}}}= \operatorname{\mathcal{C}}_{k,t,\sigma^{-1}}$. Equation can be written as follows: $$\begin{aligned} cx= &\, (\sigma(k)k\sigma^{t+1}(b)+\sigma(k^{-1})\sigma^2(k)\sigma(b))x^{\sigma^{2}} \\ & +(\sigma^{t-1}(b)-\sigma^{-1}(k^{-2})k\sigma^{t-2}(k)\sigma^{-1}(b))x^{\sigma^{t-2}} \\ & +(\sigma(k)k \sigma^{t+1}(b)+ \sigma^{-1}(k^{-1})k\sigma^{-1}(b)+\sigma(k^{-1})k^{-1}\sigma(b)-\sigma^{t-1}(k^{-1})k^{-1}\sigma^{t-1}(b))x^{\sigma^{t}} \\ & +(\sigma^{-1}(k^{-1})k\sigma^{-1}(b)-\sigma^{t-1}(k^{-1})\sigma^{-2}(k)\sigma^{t-1}(b))x^{\sigma^{2t-2}} \\ & +(\sigma(b)+\sigma^{t-1}(b)+\sigma(k^2)k^2\sigma^{t+1}(b)+\sigma^{-1}(k^{-2})k^2 \sigma^{-1}(b)) x \\ & +(\sigma(b)+\sigma^2(k)k\sigma^2(k^{-1})\sigma^{t+1}(b))x^{\sigma^{t+2}}.\end{aligned}$$ Now, we choose $$b=\frac{1}{k^{-1}\sigma^{-1}(k^{-1})-k^{-1}\sigma(k)}.$$ and we show that the following conditions hold: $$\label{eq:systemxxxx} \begin{cases} \sigma(k)k\sigma^{t+1}(b)+\sigma(k^{-1})\sigma^2(k)\sigma(b)&=0,\\ \sigma^{t-1}(b)+\sigma^{-1}(k^{-2})k\sigma^{-2}(k^{-1})\sigma^{-1}(b)&=0,\\ \sigma(k)k \sigma^{t+1}(b)+ \sigma^{-1}(k^{-1})k\sigma^{-1}(b)+\sigma(k^{-1})k^{-1}\sigma(b)+\sigma^{-1}(k)k^{-1}\sigma^{t-1}(b)&=0,\\ c=\sigma(b)+\sigma^{t-1}(b)+\sigma^2(k)k^2\sigma^{t+1}(b)+\sigma^{-1}(k^{-2})k^2 \sigma^{-1}(b)&\ne 0. \end{cases}$$ The first two equations give the same condition, which corresponds to $$\label{eq:s=-s'bqs+1} \sigma^{t+1}(b)=-k^{-1}\sigma(k^{-2})\sigma^2(k)\sigma(b).$$ By applying $\sigma^{t-2}$ to , we have $$\label{eq:s=-s'bqs+12} \sigma^{-1}(b)=\sigma^{-2}(k)\sigma^{-1}(k)k^{-1}\sigma^{t-1}(b).$$ By replacing and in the third equation of and after some manipulations, we obtain $$\label{eq:s=-s'intermediate} ( \sigma(k^{-1})k^{-1} -\sigma(k^{-1})\sigma^2(k))\sigma(b) +( \sigma^{-1}(k)k^{-1}-\sigma^{-2}(k)\sigma^{-1}(k) )\sigma^{t-1}(b)=0.$$ Applying $\sigma^2$ to , we derive $$\begin{aligned} \label{eq:s=-s'condsub} ( \sigma^2(k^{-1})\sigma^3(k^{-1}) -\sigma^3(k^{-1})\sigma^4(k))\sigma^3(b) +( \sigma(k)\sigma^2(k^{-1})-k\sigma(k) )\sigma^{t+1}(b)&=0,\end{aligned}$$ and using , we obtain $$( \sigma^2(k^{-1})\sigma^3(k^{-1}) -\sigma^4(k^{-1})\sigma^3(k))\sigma^3(b) -(-\sigma(k^{-1})\sigma^{2}(k) + k^{-1}\sigma(k^{-1}) )\sigma(b)=0,$$ which is satisfied because of the choice of $b$. Now we show that $c$ cannot be zero. By contradiction, let us assume that $$\sigma(b)+\sigma^{t-1}(b)+\sigma^{t+1}(b)+\sigma^{-1}(k^{-2})k^2 \sigma^{-1}(b)=0.$$ Since $b$ satisfies and , we get $$\label{eq:s=-s'condfinal} \sigma^{3}(b)(1-\sigma^{2}(k)\sigma^{4}(k)) =- \sigma^{t+1}(b)(1-\sigma^{2}(k)k)=0,$$ and by $$(\sigma^3(k^{-1})\sigma^4(k) -\sigma^3(k^{-1})\sigma^2(k^{-1})) \sigma^3(b)= (-\sigma^{2}(k)k +1)\sigma^2(k^{-1})\sigma(k)\sigma^{t+1}(b)$$ Now, substituting the above equation in we obtain $$\sigma^2(k^{-1})\sigma(k)\sigma^{3}(b)(1-\sigma^{2}(k)\sigma^{4}(k)) =- (-1+\sigma^4(k)\sigma^2(k) )\sigma^3(k^{-1})\sigma^2(k^{-1}) \sigma^3(b),$$ that is $$\sigma^3(b)(-1+\sigma^4(k)\sigma^2(k) )(\sigma^2(k^{-1})\sigma(k)-\sigma^3(k^{-1})\sigma^2(k^{-1}))=0.$$ However, this yields to a contradiction, since $\sigma^2(k)k \neq 1$ because of Lemma \[lem:auxiliary\]. At this point, we use the fact that we are dealing with an equivalence relation. Thus, $\operatorname{\mathcal{C}}_{h,t,\sigma}$ is equivalent to $\operatorname{\mathcal{C}}_{k,t,\sigma^{-1}}$ if and only if $\operatorname{\mathcal{C}}_{h,t,\sigma}$ is equivalent to $\operatorname{\mathcal{C}}_{k^{-1},t,\sigma}$. The assertion follows by Case I, by substituting $k$ with $k^{-1}$. . The first step is to prove that $\operatorname{\mathcal{C}}_{k,t,\sigma^{t-1}}$ is equivalent to $\operatorname{\mathcal{C}}_{k,t,\sigma}$, and then we use the case $s=1$. We divide the discussion in two cases. Assume that $t\equiv 2 \pmod{4}$. We prove the existence of $a,d \in {\mathbb{F}_{q^n}}^*$ such that $$d \psi_{k,t,\sigma^{t-1}}(x)=\psi_{k,t,\sigma}(ax),$$ that is $$\label{eq:casesb=0s=(t-1)s'} \begin{cases} d=\sigma(a)=\sigma^{t-1}(a),\\ dk\sigma(k)=-k\sigma(k)\sigma^{t+1}(a),\\ dk\sigma^{-1}(k^{-1})=-k\sigma^{-1}(k^{-1})\sigma^{-1}(a). \end{cases}$$ A solution to is given by $a \in {{\mathbb F}}_{q^4}$ such that $a^{q^2-1}=-1$ and $d=\sigma(a)$. As for Case I we have that denoting $\tau(x)=ax$, then $$\operatorname{\mathcal{C}}_{k,t,\sigma}\circ \tau=\langle ax,d\psi_{k,t,\sigma^{t-1}}(x)\rangle_{{\mathbb{F}_{q^n}}}=\operatorname{\mathcal{C}}_{k,t,\sigma^{t-1}},$$ and the two codes $\operatorname{\mathcal{C}}_{k,t,\sigma^{t-1}}$ and $\operatorname{\mathcal{C}}_{h,t,\sigma}$ are equivalent. The assertion then follows by the Case I. Suppose that $t\equiv 0 \pmod{4}$. We find $b,c\in {\mathbb{F}_{q^n}}^*$ such that $$\label{eq:s=t-1map} cx=\psi_{k,t,\sigma^{t-1}}(b\psi_{k,t,\sigma}(x)),$$ which is enough to prove that $\operatorname{\mathcal{C}}_{k,t,\sigma^{t-1}}$ is equivalent to $\operatorname{\mathcal{C}}_{k,t,\sigma}$. Equation reads as $$\begin{aligned} cx+d\psi_{k,t,\sigma^{t-1}}(x)& =\psi_{k,t,\sigma}(ax) \\ & + (\sigma(b)-\sigma^2(k^{-1})k\sigma^{t+1}(b))x^{\sigma^{2}}\\ & +(\sigma^{t-1}(k)\sigma^{t-2}(k^{-1})\sigma^{t-1}(b)-k\sigma^{-1}(k^{-1})\sigma^{-1}(b))x^{\sigma^{t-2}} \\ & +(\sigma(b)+\sigma^{t-1}(b)-k^2\sigma(k)\sigma^{t+1}(b)-k^2\sigma^{-1}(b))x^{\sigma^{t}} \\ & +(\sigma^{t-1}(b)+\sigma^{t-2}(k)k\sigma^{-1}(b))x^{\sigma^{2t-2}}\\ & -(-\sigma(k)\sigma^2(k)\sigma(b)+k\sigma(k)\sigma^{t+1}(b))x^{\sigma^{t+2}} \\ & +(-\sigma(b)k^{-1}\sigma(k)+k^{-1}\sigma^{t-1}(k)\sigma^{t-1}(b)+k\sigma(k)\sigma^{t+1}(b)+k\sigma^{-1}(k^{-1})\sigma^{-1}(b)) x.\end{aligned}$$ By choosing $$\displaystyle b=\frac{\sigma^{-1}(\omega)}{\sigma^{-1}(h^{-1})-\sigma(h)},$$ with $\omega \in {{\mathbb F}}_{q^4}$ such that $\omega^{q^2-1}=-1$ and $$c=-\sigma(b)k^{-1}\sigma(k)-k^{-1}\sigma^{-1}(k^{-1})\sigma^{t-1}(b)+k\sigma(k)\sigma^{t+1}(b)+k\sigma^{-1}(k^{-1})\sigma^{-1}(b) \ne0$$ Equation is satisfied, and so $\operatorname{\mathcal{C}}_{k,t,\sigma^{t-1}}$ and $\operatorname{\mathcal{C}}_{k,t,\sigma}$ are equivalent. The assertion follows by Case I. . Let us prove that $\operatorname{\mathcal{C}}_{k,t,\sigma^{t+1}}$ is equivalent to $\operatorname{\mathcal{C}}_{k^{-1},t,\sigma}$, and then we use again the case $s=1$. We divide the discussion in two cases. First assume that $t \equiv 0 \pmod{4}$. We prove the existence of $a,d \in {\mathbb{F}_{q^n}}^*$ such that $$d \psi_{k,t,\sigma^{t+1}}(x)=\psi_{k,t,\sigma}(ax),$$ that is $$\label{eq:casesb=0s=(t+1)s'} \begin{cases} -dk^{-1}\sigma(k)=\sigma(a) \\ dk^{-1}\sigma^{t-1}(k)=\sigma^{t-1}(a) \\ d=\sigma(k)k\sigma^{t+1}(a) \\ d=\sigma^{-1}(k^{-1})\sigma^{-1}(a) . \end{cases}$$ A solution to is given by $a=l k$, with $l\in {{\mathbb F}}_{q^4}$ such that $l^{q^2+1}=-1$, and $d=-k\sigma(l)$. As for Case I we have that denoting $\tau(x)=ax$, then $$\operatorname{\mathcal{C}}_{k,t,\sigma}\circ \tau=\langle ax,d\psi_{k,t,\sigma^{t+1}}(x)\rangle_{{\mathbb{F}_{q^n}}}=\operatorname{\mathcal{C}}_{k,t,\sigma^{t-1}},$$ and the two codes $\operatorname{\mathcal{C}}_{k,t,\sigma^{t+1}}$ and $\operatorname{\mathcal{C}}_{h,t,\sigma}$ are equivalent. The assertion then follows by the Case I. Finally, assume $t \equiv 2 \pmod{4}$. We find $b,c \in {\mathbb{F}_{q^n}}^*$ such that $$\label{eq:s=t+1prima} cx=\psi_{k,t,\sigma^{t+1}}(b\psi_{k^{-1},t,\sigma}(x)),$$ that is $$\begin{aligned} cx&= (\sigma(k)k\sigma^{t+1}(b)-\sigma(k^{-1})\sigma^2(k)\sigma(b))x^{\sigma^{2}}\\ &+(\sigma^{t-1}(b)+\sigma^{-1}(k^{-2})k\sigma^{t-2}(k)\sigma^{-1}(b))x^{\sigma^{t-2}}\\ &+(\sigma(k)k \sigma^{t+1}(b)+ \sigma^{-1}(k^{-1})k\sigma^{-1}(b)-\sigma(k^{-1})k^{-1}\sigma(b)+\sigma^{t-1}(k^{-1})k^{-1}\sigma^{t-1}(b))x^{\sigma^{t}}\\ &+(\sigma^{-1}(k^{-1})k\sigma^{-1}(b)+\sigma^{t-1}(k^{-1})\sigma^{-2}(k)\sigma^{t-1}(b))x^{\sigma^{2t-2}}\\ &+(\sigma(b)+\sigma^{t-1}(b)-\sigma^2(k)k^2\sigma^{t+1}(b)-\sigma^{-1}(k^{-2})k^2 \sigma^{-1}(b)) x\\ &+(\sigma(b)-k\sigma^2(k)\sigma^2(k^{-1})\sigma^{t+1}(b))x^{\sigma^{t+2}}.\end{aligned}$$ Arguing as in Case II, we can choose $$b=\frac{\sigma^{-1}(\omega)}{h\sigma(h^{-1})-h\sigma^{-1}(h)},$$ with $\omega\in {{\mathbb F}}_{q^4}$ such that $\omega^{q^2-1}=-1$, and $$c=\sigma(b)+\sigma^{t-1}(b)-\sigma^2(k)k^2\sigma^{t+1}(b)-\sigma^{-1}(k^{-2})k^2 \sigma^{-1}(b)\ne0.$$ With this choice of $b$ and $c$, is satisfied, so that the two codes ${{\mathcal C}}_{k,t,\sigma}$ and ${{\mathcal C}}_{k^{-1},t,\sigma^{t+1}}$ are equivalent. The assertion follows again by Case I. Theorem \[th:equivspecialcase\] characterizes all the cases in which two codes ${{\mathcal C}}_{h,t,\sigma}$ and ${{\mathcal C}}_{k,t,\theta}$ are equivalent, when we restrict to have $\theta=\sigma^{s}$, for $s \in \{1,t-1,t+1,2t-1\}$. We now analyze the cases in which $\theta=\sigma^{s}$ with $s \notin \{1,t-1,t+1,2t-1\}$, showing that two codes of the form ${{\mathcal C}}_{h,t,\sigma}$ and ${{\mathcal C}}_{k,t,\theta}$ are never equivalent. The following computations will be crucial for the study of these remaining cases. These computations aim to describe the codes obtained from ${{\mathcal C}}_{h,t,\sigma}$ together with some automorphism applied to it. The first thing to observe is that ${{\mathcal D}}_{h,t,\sigma}^{(j)}:={{\mathcal C}}_{h,t,\sigma}+\sigma^{j}({{\mathcal C}}_{h,t,\sigma})$ can have dimension $2$, $3$ or $4$, and when $j$ is coprime with $n=2t$, then the only possibility is that $\dim_{{\mathbb{F}_{q^n}}}({{\mathcal D}})=4$; cf. Proposition \[prop:not\_Gabidulin\]. However, an interesting object comes when we choose $j=t$. Indeed, one can easily check that $$\label{eq:c_plus_ct}{{\mathcal D}}_{h,t,\sigma}^{(t)}=\langle x, x^{\sigma^t}, x^{\sigma}+h\sigma(h)x^{\sigma^{t+1}}, x^{\sigma^{t-1}}+h\sigma^{-1}(h^{-1})x^{\sigma^{2t-1}} \rangle_{{\mathbb{F}_{q^n}}}.$$ This object has a nice and compact description and it will be crucial for determining the inequivalence of codes of ${{\mathcal C}}_{h,t,\sigma}$ and ${{\mathcal C}}_{h,t,\theta}$. In order to derive these results, we need to apply another automorphism to ${{\mathcal D}}_{h,t,\sigma}^{(t)}$. \[prop:d\_plus\_sigma\] The following hold: $$\begin{aligned} s_1^{\sigma^s}({{\mathcal D}}_{h,t,\sigma}^{(t)})&=6, \qquad \mbox{ for } s \in \{1,-1,t-1,t+1\},\\ s_1^{\sigma^s}({{\mathcal D}}_{h,t,\sigma}^{(t)})&\geq 7, \qquad \mbox{ for } s \not\in \{1,-1,t-1,t+1\}, \end{aligned}$$ In order to lighten the notation, let us write ${{\mathcal D}}:={{\mathcal D}}_{h,t,\sigma}^{(t)}$. With straightforward computations we derive $$\begin{aligned} {{\mathcal D}}+\sigma({{\mathcal D}})&=\langle x, x^\sigma,x^{\sigma^t}, x^{\sigma^{t+1}}, x^{\sigma^{2}}+\sigma(h)\sigma^{2}(h)x^{\sigma^{t+2}}, x^{\sigma^{t-1}}+h\sigma^{-1}(h^{-1})x^{\sigma^{2t-1}}\rangle_{{\mathbb{F}_{q^n}}}, \\ {{\mathcal D}}+\sigma^{t-1}({{\mathcal D}})&=\langle x, x^{\sigma^{t-1}},x^{\sigma^t},x^{\sigma^{2t-1}}, x^{\sigma}+h\sigma(h)x^{\sigma^{t+1}}, x^{\sigma^{2t-2}}+\sigma^{-1}(h^{-1})\sigma^{-2}(h)x^{\sigma^{t-2}} \rangle_{{\mathbb{F}_{q^n}}},\\ {{\mathcal D}}+\sigma^{t+1}({{\mathcal D}})&=\langle x, x^{\sigma}, x^{\sigma^t}, x^{\sigma^{t+1}}, x^{\sigma^{t+2}}+\sigma(h^{-1})\sigma^2(h^{-1})x^{\sigma^{2}}, x^{\sigma^{t-1}}+h\sigma^{-1}(h^{-1})x^{\sigma^{2t-1}} \rangle_{{\mathbb{F}_{q^n}}},\\ {{\mathcal D}}+\sigma^{2t-1}({{\mathcal D}})&=\langle x, x^{\sigma^{t-1}}, x^{\sigma^t}, x^{\sigma^{2t-1}}, x^{\sigma}+h\sigma(h)x^{\sigma^{t+1}}, x^{\sigma^{t-2}}+\sigma^{-1}(h)\sigma^{-2}(h^{-1})x^{\sigma^{2t-2}} \rangle_{{\mathbb{F}_{q^n}}}. \end{aligned}$$ In all the four cases, the generators of the code have disjoint $\sigma$-supports, showing that the dimension is $6$. Let us assume now that $s\notin\{1.t-1,t+1,2t-1\}$. Then $$\begin{aligned} {{\mathcal D}}+\sigma^{s}({{\mathcal D}})=\langle x, x^{\sigma^t}, x^{\sigma^s},x^{\sigma^{s+t}},f_1(x), f_2(x), f_3(x), f_4(x) \rangle_{{\mathbb{F}_{q^n}}}, \end{aligned}$$ where $$\begin{array}{rlrl} f_1(x)\!\!\!\!&= x^{\sigma}+h\sigma(h)x^{\sigma^{t+1}}, & f_2(x)\!\!\!\!&= x^{\sigma^{t-1}}+h\sigma^{-1}(h^{-1})x^{\sigma^{2t-1}},\\ f_3(x)\!\!\!\!&=x^{\sigma^{s+1}}+\sigma^s(h)\sigma^{s+1}(h)x^{\sigma^{t+s+1}}, \qquad & f_4(x)\!\!\!\! &=x^{\sigma^{s+t+1}}+\sigma^s(h)\sigma^{s-1}(h^{-1})x^{\sigma^{s-1}}. \end{array}$$ First, observe that the $\sigma$-supports of the first six polynomials are pairwise distinct, thus they are ${\mathbb{F}_{q^n}}$-linearly independent and ${{\mathcal V}}:=\langle x, x^{\sigma^t}, x^{\sigma^s},x^{\sigma^{s+t}},f_1(x), f_2(x)\rangle_{{\mathbb{F}_{q^n}}}$ is a $6$-dimensional ${\mathbb{F}_{q^n}}$-subspace. Moreover, the union of their $\sigma$-supports is $$\mathcal P=\{0,s,t,s+t,1,t+1,t-1,2t-1\}.$$ Now, assume by contradiction that $f_3(x),f_4(x)\in{{\mathcal V}}$. This implies that $\operatorname{supp}_\sigma(f_3(x))=\{s+1,t+s+1\}\subseteq\mathcal P$. Due to the assumptions on $s$, the only case for which this is possible is $s\in\{t-2,2t-2\}$. In both cases, it is immediate to see that $\operatorname{supp}_\sigma(f_4(x))=\{t-3,2t-3\}$ is not contained in $\mathcal P=\{0,t-2,t,2t-2,1,t+1,t-1,2t-1\}$, yielding a contradiction. From the computations of ${{\mathcal D}}_{h,t,\sigma}^{(t)}+\sigma^{j}({{\mathcal D}}_{h,t,\sigma}^{(t)})$, for $j \in \{1,t-1,t+1,2t-1\}$ in the proof of Proposition \[prop:d\_plus\_sigma\], we can immediately observe that $$\begin{aligned} {{\mathcal D}}_{h,t,\sigma}^{(t)}+\sigma({{\mathcal D}}_{h,t,\sigma}^{(t)})&={{\mathcal D}}_{h,t,\sigma}^{(t)}+\sigma^{t+1}({{\mathcal D}}_{h,t,\sigma}^{(t)}) \\ {{\mathcal D}}_{h,t,\sigma}^{(t)}+\sigma^{t-1}({{\mathcal D}}_{h,t,\sigma}^{(t)}) &={{\mathcal D}}_{h,t,\sigma}^{(t)}+\sigma^{2t-1}({{\mathcal D}}_{h,t,\sigma}^{(t)}). \end{aligned}$$ This also suggests to consider another space that is highly nongeneric, which is $$\begin{aligned} {{\mathcal T}}:= & {{\mathcal D}}_{h,t,\sigma}^{(t)}+\sigma({{\mathcal D}}_{h,t,\sigma}^{(t)})+\sigma^{t-1}({{\mathcal D}}_{h,t,\sigma}^{(t)})+\sigma^{t+1}({{\mathcal D}}_{h,t,\sigma}^{(t)})+\sigma^{2t-1}({{\mathcal D}}_{h,t,\sigma}^{(t)}) \\ =& {{\mathcal D}}_{h,t,\sigma}^{(t)}+\sigma({{\mathcal D}}_{h,t,\sigma}^{(t)})+\sigma^{t-1}({{\mathcal D}}_{h,t,\sigma}^{(t)}). \end{aligned}$$ A straightforward computation shows that $${{\mathcal T}}= \langle x, x^\sigma, x^{\sigma^{t-1}},x^{\sigma^t}, x^{\sigma^{t+1}}, x^{\sigma^{2t-1}}, x^{\sigma^{2}}+\sigma(h)\sigma^{2}(h)x^{\sigma^{t+2}},x^{\sigma^{t-2}}+\sigma^{-1}(h)\sigma^{-2}(h^{-1})x^{\sigma^{2t-2}} \rangle_{{\mathbb{F}_{q^n}}}.$$ Since all the generators have disjoint $\sigma$-supports, then $\dim_{{\mathbb{F}_{q^n}}} ({{\mathcal T}})=8$. Moreover, we can express this code as $${{\mathcal T}}= {{\mathcal C}}_{h,t,\sigma}+\sigma({{\mathcal C}}_{h,t,\sigma})+\sigma^{t-1}({{\mathcal C}}_{h,t,\sigma})+\sigma^t({{\mathcal C}}_{h,t,\sigma})+\sigma^{t+1}({{\mathcal C}}_{h,t,\sigma})+\sigma^{2t-1}({{\mathcal C}}_{h,t,\sigma}).$$ \[cor:inequivalence\_newMRD\] If $s \notin \{1,-1,t-1,t+1\}$, then ${{\mathcal C}}_{h,t,\sigma}$ and ${{\mathcal C}}_{k,t,\sigma^s}$ are not equivalent. Assume by contradiction that ${{\mathcal C}}_{h,t,\sigma}$ and ${{\mathcal C}}_{k,t,\sigma^s}$ are equivalent. Hence, by Proposition \[prop:equivalence\_sum\] also ${{\mathcal C}}_{h,t,\sigma}+\sigma^{st}({{\mathcal C}}_{h,t,\sigma})$ and ${{\mathcal C}}_{k,t,\sigma^s}+\sigma^{st}({{\mathcal C}}_{k,t,\sigma^s})={{\mathcal D}}_{k,t,\sigma^s}^{(t)}$ are equivalent. Moreover, observe that $\sigma^{st}=\sigma^t$, which means that ${{\mathcal C}}_{h,t,\sigma}+\sigma^{st}({{\mathcal C}}_{h,t,\sigma})={{\mathcal D}}_{h,t,\sigma}^{(t)}$. Using again Proposition \[prop:equivalence\_sum\], we also derive that $s_1^{\sigma^s}({{\mathcal D}}_{h,t,\sigma}^{(t)})= s_1^{\sigma^s}({{\mathcal D}}_{h,t,\sigma^s}^{(t)})$, but this contradicts Proposition \[prop:d\_plus\_sigma\]. As a byproduct of all the results obtained in this section, we can also determine the exact number and a lower bound on the number of equivalence classes of the codes $\operatorname{\mathcal{C}}_{h,t,\sigma}$. \[th:numexact\] The number of equivalence classes of the codes ${{\mathcal C}}_{h,t,\sigma}$ is $$\frac{\varphi(t)}{4rtj_t}\sum_{i=0}^{2rt-1} \deg ( \gcd(x^{p^{rt}+1}+1,x^{j_t(p^i-1)}-1)),$$ where $$j_t=\begin{cases} 2 & \mbox{ if } t \not\equiv 2 \, \pmod{4},\\ p^{2r}+1 & \mbox{ if } t \equiv 2 \, \pmod{4}, \\ \end{cases}$$ and $\varphi$ is the Euler's totient function. We start by determining the number of orbits of $A_{h,t}$ under the action of $\operatorname{Aut}({\mathbb{F}_{q^n}})$, where $$A_{h,t}:=\begin{cases} \{h,-h\} & \mbox{ if } t \not\equiv 2 \, \pmod{4}\\ \{lh \, : \, l^{q^2+1}=1 \} & \mbox{ if } t \equiv 2 \, \pmod{4}. \end{cases}$$ First, observe that we can reduce ourselves to study this action. For each $\rho \in \operatorname{Aut}({\mathbb{F}_{q^n}})$, either we have $\rho(A_{h,t})=A_{h,t}$ or $\rho(A_{h,t})\cap A_{h,t}=\emptyset$. This is because in both cases $A_{h,t}$ is of the form $K h$, where $K$ is the multiplicative subgroup of ${\mathbb{F}_{q^n}}^*$ given by $$K=\begin{cases} \{\pm 1\} & \mbox{ if } t \not\equiv 2 \, \pmod{4}, \\ \{l \, : \, l^{q^2+1}=1\} & \mbox{ if } t \equiv 2 \, \pmod{4}. \end{cases}$$ Therefore, we have that $\rho(K)$ is a subgroup of ${\mathbb{F}_{q^n}}^*$ with the same order. Since ${\mathbb{F}_{q^n}}^*$ is cyclic, then $\rho(K)=K$ and thus $\rho(Kh)=K\rho(h)$. Hence, we can just consider whether $\rho(h)\in A_{h,t}$ or not. In particular, $G:=\operatorname{Aut}({\mathbb{F}_{q^n}})$ acts on the set $$X:=\{A_{h,t}\, :\, \sigma^t(h)h=-1 \},$$ and denote by $|X/G|$ the number of orbits of the action of $G$ on $X$. This can be computed by means of Burnside's lemma, which reads as $$\label{eq:burnside}|X/G|=\frac{1}{|G|}\sum_{g \in G} |X^g|,$$ where $X^g=\{x \in X \, : \, g(x)=x\}$. Let $x:=A_{h,t}$ and let $\theta$ denote the $p$-Frobenius automorphism of ${\mathbb{F}_{q^n}}$, that is $\theta(\alpha)=\alpha^p$ for every $\alpha \in {\mathbb{F}_{q^n}}$. Then, each $\rho$ can be written as $\theta^i$ for some $i \in {\mathbb Z/2rt\mathbb Z}$. In particular, $$\begin{aligned} X^{\theta^i}&=\left\{A_{h,t} \,: \, \theta^{rt}(h)=-h^{-1}, \theta^{i}(h) \in A_{h,t} \right\} \\ &=\bigcup_{\kappa \in K}\left\{A_{h,t} \,: \, \theta^{rt}(h)=-h^{-1}, \theta^{i}(h)=\kappa h \right\} \\ &= \bigcup_{\kappa \in K}\left\{A_{h,t} \,: \, h^{p^{rt}+1}+1=0, h^{p^i}-\kappa h=0 \right\}\\ &= \Big\{A_{h,t} \,: \, h^{p^{rt}+1}+1=0, \prod_{\kappa \in K}(h^{p^i-1}-\kappa )=0 \Big\}\\ &= \left\{A_{h,t} \,: \, h^{p^{rt}+1}+1=0, h^{j_t(p^i-1)}-1=0 \right\}.\end{aligned}$$ Since we have to consider only one representative for each set $A_{h,t}$, we deduce $$\label{eq:gcd_degree} |X^{\theta^i}|=\frac{1}{j_t}\deg(\gcd(x^{p^{rt}+1}+1,x^{j_t(p^i-1)}-1)).$$ Thus, combining this with the fact that $$\varphi(2t)=\begin{cases} 2\varphi(t) & \mbox{ if } t \mbox{ is even }\\ \varphi(t) & \mbox{ if } t \mbox{ is odd} \end{cases}$$ we can conclude that the number of inequivalent codes of the form $\operatorname{\mathcal{C}}_{h,t,\sigma}$ in ${{\mathcal L}}_{n,q}$ is $$\frac{\varphi(t)}{4rtj_t}\sum_{i=0}^{2rt-1} \deg ( \gcd(x^{p^{rt}+1}+1,x^{j_t(p^i-1)}-1)).$$ In some cases we can state the number of inequivalent classes of Theorem \[th:numexact\] in a more direct way. Assume that either $p\equiv 1 \,\pmod{4}$ or $rt$ is even. Then we have $$\begin{cases} p^{rt}+1 &\equiv 2 \, \pmod{4}, \\ j_t(p^{i}-1) \!\!\!&\equiv 0 \, \pmod{4}, \end{cases}$$ and by @mcguiretrinomials [Remark 4.1] we obtain that $$|X^{\theta^i}|=\gcd(p^{rt}+1,j_t(p^i-1)).$$ This is for instance the case for $t\equiv 2 \, \pmod{4}$, that is $t=2t'$ with $t'$ odd, in which $j_t=p^{2r}+1$. It is easy to see that $p^{2r}+1$ divides $p^{2rt'}+1$, and we have $$|X^{\theta^i}|=(p^{2r}+1)\gcd(p^{2r(t'-1)}-p^{2r(t'-2)}+\ldots +1,p^i-1).$$ So, the number of inequevalent classes of the codes $\operatorname{\mathcal{C}}_{h,t,\sigma}$ is $$\frac{\varphi(t)}{4rt}\sum_{i=0}^{2rt-1} \gcd(p^{2r(t'-1)}-p^{2r(t'-2)}+\ldots +1,p^i-1).$$ Unfortunately, the result of Theorem \[th:numexact\] is quite implicit. However, we can give the following more explicit lower bound. \[th:lowbound\] The number of equivalence classes of the codes ${{\mathcal C}}_{h,t,\sigma}$ is at least $$\begin{dcases} \left\lfloor\dfrac{\varphi(t)(q^t+1)}{4rt(q^2+1)}\right\rfloor & \mbox{ if } t\equiv 2 \pmod{4}, \\ \left\lfloor\dfrac{\varphi(t)(q^t+1)}{8rt}\right\rfloor & \mbox{ if } t \not\equiv 2 \pmod{4}, \end{dcases}$$ where $\varphi$ is the Euler's totient function. The number of pairs $(h,\sigma)\in {{\mathbb F}}_{q^n}\times \operatorname{Gal}({\mathbb{F}_{q^n}}/{{\mathbb F}_{q}})$ such that the codes ${{\mathcal C}}_{h,t,\sigma}$ are proved to be MRD is $(q^t+1)\varphi(2t)$. Moreover, combining Theorem \[th:equivspecialcase\] with Corollary \[cor:inequivalence\_newMRD\], we know that each equivalence class has $N$ elements, where $$N\leq \begin{cases} 16rt & \mbox{ if } t\equiv 0 \pmod{4}, \\ 8rt & \mbox{ if } t \equiv 1,3 \pmod{4}, \\ 8rt(q^2+1) & \mbox{ if } t\equiv 2 \pmod{4}. \end{cases}$$ This follows from the fact that in Theorem \[th:equivspecialcase\] the exponent $s$ can be equal to $t-1$ and $t+1$ if and only if $t$ is even – otherwise $\sigma^s$ is not a generator of $\operatorname{Gal}({\mathbb{F}_{q^n}}/{{\mathbb F}_{q}})$. Thus, combining this with the fact that $$\varphi(2t)=\begin{cases} 2\varphi(t) & \mbox{ if } t \mbox{ is even }\\ \varphi(t) & \mbox{ if } t \mbox{ is odd} \end{cases}$$ we obtain a lower bound on the number of equivalence classes of the codes ${{\mathcal C}}_{h,t,\sigma}$: $$\dfrac{\varphi(2t)(q^t+1)}{N}\geq \begin{dcases} \dfrac{\varphi(t)(q^t+1)}{4rt(q^2+1)} & \mbox{ if } t\equiv 2 \pmod{4}, \\ \dfrac{\varphi(t)(q^t+1)}{8rt} & \mbox{ if } t \not\equiv 2 \pmod{4}. \end{dcases}$$ Right idealizer and adjoint --------------------------- In this section we complete the study on the new family of codes, by analyzing their right idealizer and their adjoint. \[prop:right\_idealizer\] Let $t\geq 5$. The right idealizer of $\mathcal{C}_{h,t,\sigma}$ is $$R({{\mathcal C}}_{h,t,\sigma})=\begin{cases} \left\{ax \colon a \in {{\mathbb F}}_{q^2}\right\} & \mbox{ if $t$ is even, } \\ \big\{ax+b\psi_{h,t,\sigma}(x) \colon a \in {{\mathbb F}}_{q}, b=\frac{\delta}{\sigma(h)-\sigma^{-1}(h^{-1})},\delta^q+\delta=0\big\} & \mbox{ if $t$ is odd. } \end{cases}$$ In particular, $R(\mathcal{C}_{h,t,\sigma})\simeq {{\mathbb F}}_{q^2}$. Let $f(x)$ be an element in $R(\mathcal{C}_{h,t,\sigma})$. Hence, $f(x)\in R(\mathcal{C}_{h,t,\sigma})$, so that there exists $a,b \in {{\mathbb F}}_{q^{2t}}$ such that $$f(x)=ax+b\psi_{h,t,\sigma}(x).$$ Moreover, $\psi_{h,t,\sigma}(f(x))=\psi_{h,t,\sigma}(ax)+\psi_{h,t,\sigma}(b\psi_{h,t,\sigma}(x)) \in \operatorname{\mathcal{C}}_{h,t,\sigma}$, that is there exist $c,d \in {{\mathbb F}}_{q^{2t}}$ such that $$\psi_{h,t,\sigma}(ax)+\psi_{h,t,\sigma}(b\psi_{h,t,\sigma}(x))=cx+d\psi_{h,t,\sigma}(x).$$ So that, one can argue as in the second part of the proof of @longobardi2021large [Theorem 4.2], obtaining that $b=0$ if $t$ is even and $$b=\frac{\delta}{\sigma(h)-\sigma^{-1}(h^{-1})},$$ otherwise. In the first case, we have again System with $h=k$, which implies $a \in {{\mathbb F}}_{q^2}$. In the latter case, System with $h=k$ implies $a \in {{\mathbb F}}_q$. It is easy to check that these maps are in $R(\operatorname{\mathcal{C}}_{h,t,\sigma})$. Since $R(\operatorname{\mathcal{C}}_{h,t,\sigma})$ is a finite field (see @lunardon2018nuclei [Corollary 5.6]), and we have $|R(\mathcal{C}_{h,t,\sigma})|=q^2$, then $R(\mathcal{C}_{h,t,\sigma})\simeq {{\mathbb F}}_{q^2}$. As a consequence of Proposition \[prop:right\_idealizer\], we may deduce an alternative proof of Proposition \[prop:not\_Gabidulin\]. Indeed, the right idealizer of a Gabidulin code is isomorphic to ${\mathbb{F}_{q^n}}$ (see @morrison2014equivalence [@liebhold2016automorphism]) and it is well-known that equivalent codes have isomorphic idealizers; see @lunardon2018nuclei [Proposition 4.1]. However, the same approach does not work for showing that the codes ${{\mathcal C}}_{h,t,\sigma}$ are not equivalent to $2$-dimensional twisted Gabidulin codes, since in this case the right idealizers are isomorphic. If $t\geq 5$, then the code $\operatorname{\mathcal{C}}_{h,t,\sigma}^\top$ is equivalent to $\operatorname{\mathcal{C}}_{h,t,\sigma}$. Note that $$\operatorname{\mathcal{C}}_{h,t,\sigma}^\top=\langle x, {\psi}_{h,t,\sigma}^\top(x) \rangle_{{\mathbb{F}_{q^n}}},$$ which turns out to be equivalent to $\operatorname{\mathcal{C}}'=\langle x, g(x) \rangle_{{\mathbb{F}_{q^n}}}$, with $$g(x)=h{\psi}_{h,t,\sigma}^\top(h^{-1}x)=x^\sigma-x^{\sigma^{t-1}}-h\sigma(h)x^{\sigma^{t+1}}+h\sigma^{-1}(h^{-1})x^{\sigma^{2t-1}}.$$ As already done in Theorem \[th:equivspecialcase\], it is enough to find $b,c \in {\mathbb{F}_{q^n}}^*$ such that $$\label{eq:condbcadjoint} cx=\psi_{h,t,\sigma}(bg(x)).$$ Choosing $$b=\frac{\sigma^{-1}(h)}{\sigma(h)\sigma^{-1}(h)-1},$$ and $$c=\sigma(b)h^{-1}\sigma(h)-\sigma^{t-1}(b)h^{-1}\sigma^{-1}(h^{-1})-\sigma^{t+1}(b)h\sigma(h)+\sigma^{-1}(b)h\sigma^{-1}(h^{-1}),$$ and performing similar calculations as in the proof of @longobardi2021large [Theorem 4.6], turns out to be verified and so $\operatorname{\mathcal{C}}_{h,t,\sigma}^\top$ and $\operatorname{\mathcal{C}}_{h,t,\sigma}$ are equivalent. Conclusions and open problems {#sec:conclusions} ============================= In this paper we have
{'source': 'arXiv_out/2104'}