1 Introduction

Linear codes with a rich algebraic structure are important in real communication systems due to the potential for developing their encoding and decoding algorithms. One of these codes is the class of cyclic codes over finite fields. Cyclic codes over the finite field \(\mathbb {F}_q\) are in one-to-one correspondence with ideals of the polynomial ring \(\mathbb {F}_q[x]\). The class of cyclic codes has undergone a series of generalizations to broader classes with other algebraic structures. The class of quasi-cyclic (QC) codes generalizes the shift index of cyclic codes so that it is not limited to a single cyclic shift, while constacyclic codes generalize the shift constant of cyclic codes to any nonzero element in the field. The algebraic structures of QC and constacyclic codes over finite fields are fully described in [3, 4] and [2, 6] respectively. In [8, 12, 18], generalized quasi-cyclic (GQC) codes were presented as an in-depth generalization of QC codes. Unlike QC codes, the block lengths of GQC codes are not necessarily equal. On the other hand, [10, 13] generalized the shift constant of QC codes to any nonzero element, and hence the class of quasi-twisted (QT) codes is obtained. However, the block lengths of a QT code are equal. In [1], a comprehensive class of codes was introduced, the class of multi-twisted (MT) codes. This class contains cyclic codes, constacyclic codes, QC codes, QT codes, and GQC codes as subclasses. MT codes are similar to GQC codes in that the block lengths are not necessarily equal, and they are similar to QT codes in that the shift constants are not necessarily equal to one, moreover, different shift constants can be used for different blocks of a MT code. Another advantage of studying the class of MT codes is that it contains codes and subcodes with best-known parameters according to the database [11] that cannot be obtained as constacyclic or QT codes. We refer the interested reader to [1, Sect. 6] and Example 1 for some of these codes. Algebraic structures for MT codes were described in [5, 17].

Due to the the invariance of QC, QT, and GQC codes under some linear transformations, they obtained the algebraic structure of modules over principal ideal domains [14, 16]. Thus, any of these codes can be generated by a generator polynomial matrix (GPM) that satisfies some identical equation. GPM entries are elements in a principal ideal domain (PID), thus the Hermite normal form [7] is used to identify each code by a unique reduced matrix called the reduced GPM. In [16], the identical equation of the reduced GPM was used to construct a GPM for the Euclidean dual of a GQC code. The Euclidean dual of a code is defined as the set of all vectors that yield a zero Euclidean inner product with each codeword in the code. In [9], the Euclidean inner product on the vector space \(\mathbb {F}_q^n\) was generalized to the Galois inner product, and was used to determine the Galois duals of constacyclic codes. Later, the Galois duals of MT codes was discussed in [5].

Our contribution to this paper is divided into several parts. In the first part, we generalize the description of GQC codes in [16] to describe MT codes as free modules over the PID \(\mathbb {F}_q[x]\). We thus identify a MT code by the unique Hermite normal form of its GPM. Analogously, we set up an identical equation for the GPM. We take advantage of the proven fact that the Euclidean dual of a MT code is also MT and provide a GPM formula for this dual. Precisely, we use the identical equation of the MT code to deduce a GPM for its Euclidean dual. Although we imitate [16], our result generalizes [16] to the inclusive class of MT codes. Specifically, we prove formulas for GPMs of the Euclidean duals of QC, QT, GQC, and MT codes from their identical equations.

In the second part, we aim to obtain a generalization of the first result by replacing the Euclidean inner product with the Galois inner product. We define the Galois inner product as in [9] and demonstrate several interesting properties of Galois duals of MT codes. Unlike the Euclidean inner product, the Galois inner product is asymmetric. Consequently, the set of vectors that have zero Galois inner product with all codewords of a linear code will differ if we are going to make these vectors to the left or to the right of the Galois inner product. Therefore, it is necessary to differentiate between the right Galois dual and the left Galois dual of a linear code. To study these duals for MT codes, we inspect the application of a finite field automorphism to a MT code. This produces a MT code with the same block lengths but possibly different shift constants. We deduce the reduced GPM of the resulting MT code and the matrix that satisfies its identical equation from their counterparts of the original MT code. We then prove that the right and left Galois duals of a linear code are the images of its Euclidean dual under some automorphisms. Thus the right and left Galois duals of a MT code are also MT. We prove formulas for their shift constants, their reduced GPMs, and the matrices that satisfy their identical equations. To our knowledge, right and left Galois duals have not appeared simultaneously in any previous study. For instance, the Galois dual introduced in [15] coincides with our definition of the right Galois dual, while the Galois dual introduced in [5] coincides with our definition of the left Galois dual. We find it useful to simultaneously include these two distinct Galois duals in our study. This allowed us to prove their interrelated properties, see Theorem 10. Some of these properties generalize the traditional properties of the Euclidean dual of a linear code. For example, the right (respectively, left) Galois dual of the left (respectively, right) Galois dual is the original code.

Another significant advantage of including the right and left Galois duals simultaneously in our study is to inspect the two-sided Galois dual of a MT code, which we define as the intersection of these two duals. For a MT code, although both its right and left Galois duals are MT, its two-sided Galois dual is not necessarily MT. We use a sufficient condition under which the two-sided Galois dual of a MT code is MT as well. Under this condition, we aim to describe a GPM of the two-sided Galois dual. We begin this direction in a more general context in Theorems 1116. A particular case of these theorems leads to some constraints whose solution produces the reduced GPM of the two-sided Galois dual and the matrix satisfying the identical equation. With the aid of the trace map over a finite field extension, we provide an auxiliary equation that helps in solving these constraints. An illustrative example shows in detail how to find a solution that satisfies these constraints. Furthermore, two remarkable cases of the two-sided Galois dual of a MT code are considered. The first is when the right and left Galois duals are identical. We establish a necessary and sufficient condition on any linear code to have equal right and left Galois duals. The second is when the right and left Galois duals trivially intersect. An application of the latter case is given in Corollary 5, which presents the condition on a MT code equivalent to writing the vector space as a direct sum of the right and left Galois duals of the code.

The remaining sections are organized as follows. Section 2 summarizes some preliminaries to MT codes, their properties, GPMs, identical equations, and reduced forms of their GPMs. In Sect. 3, we present our results regarding the Euclidean duals of MT codes. However, the results for the right, left, and two-sided Galois duals of a MT code are presented in Sect. 4.

2 The algebraic structure of a MT code

Let \(\mathbb {F}_q\) be the finite field of order q, where \(q=p^e\) is a prime power. A code \(\mathcal {C}\) over \(\mathbb {F}_q\) of length n is linear if it is a subspace of \(\mathbb {F}_q^n\), and hence we can define the dimension of \(\mathcal {C}\). The Euclidean inner product on \(\mathbb {F}_q^n\) is a symmetric bilinear form defined by

$$\begin{aligned} \langle \textbf{a},\textbf{b}\rangle =\sum _{i=0}^{n-1} a_i b_i \end{aligned}$$

for any \(\textbf{a}=\left( a_0,a_1,\ldots ,a_{n-1}\right) , \textbf{b}=\left( b_0,b_1,\ldots ,b_{n-1}\right) \in \mathbb {F}_q^n\). The Euclidean dual \(\mathcal {C}^\perp \) of \(\mathcal {C}\) is defined by

$$\begin{aligned} \mathcal {C}^\perp =\left\{ \textbf{a}\in \mathbb {F}_q^n \ \mid \ \langle \textbf{a},\textbf{c}\rangle =0 \ \forall \ \textbf{c}\in \mathcal {C} \right\} . \end{aligned}$$

If \(\mathcal {C}\) is linear of length n and dimension k, one can easily show that \(\mathcal {C}^\perp \) is linear of dimension \(n-k\) and \(\left( \mathcal {C}^\perp \right) ^\perp =\mathcal {C}\).

A linear code is called cyclic if it is invariant under the cyclic shift of its codewords by one coordinate. That is, \(\mathcal {C}\) is cyclic if and only if

$$\begin{aligned} \left( c_0, c_1, \ldots , c_{n-2}, c_{n-1} \right) \in \mathcal {C} \Rightarrow \left( c_{n-1}, c_0, \ldots , c_{n-3}, c_{n-2} \right) \in \mathcal {C}. \end{aligned}$$

It is convenient to represent the codewords of a cyclic code as polynomials in the quotient ring \(\mathscr {R}=\mathbb {F}_q[x] / \langle x^n-1 \rangle \). Precisely, \(\left( c_0, c_1, \ldots , c_{n-2}, c_{n-1} \right) \in \mathcal {C}\) has the polynomial representation \(c_0 + c_1 x +\cdots + c_{n-2} x^{n-2} + c_{n-1} x^{n-1}\in \mathscr {R}\). This representation gives cyclic codes the structure of ideals in \(\mathscr {R}\). The cyclic shift property of cyclic codes is generalized to constacyclic codes. Let \(0\ne \lambda \in \mathbb {F}_q\). A linear code \(\mathcal {C}\) is called constacyclic with a shift constant \(\lambda \) if

$$\begin{aligned} \left( c_0, c_1, \ldots , c_{n-2}, c_{n-1} \right) \in \mathcal {C} \Rightarrow \left( \lambda c_{n-1}, c_0, \ldots , c_{n-3}, c_{n-2} \right) \in \mathcal {C}. \end{aligned}$$

In polynomial representation, a constacyclic code over \(\mathbb {F}_q\) of length n and shift constant \(\lambda \) is an ideal in the quotient ring \(\mathscr {R}_\lambda =\mathbb {F}_q[x] / \langle x^n-\lambda \rangle \). But any ideal in \(\mathscr {R}_\lambda \) corresponds to an ideal in \(\mathbb {F}_q[x]\) containing \(x^n-\lambda \). The latter has a unique monic generator polynomial g(x) that satisfies the identical equation \(a(x)g(x)=x^n-\lambda \); this is because \(\mathbb {F}_q[x]\) is a PID. Thus, constacyclic codes over \(\mathbb {F}_q\) of length n and shift constant \(\lambda \) are in one-to-one correspondence with ideals of \(\mathbb {F}_q[x]\) generated by monic divisors of \(x^n-\lambda \). We aim to present analogous correspondence in the class of MT codes.

A linear code \(\mathcal {C}\) over \(\mathbb {F}_q\) of length n is called \(\ell \)-QC if it is invariant under the cyclic shift of its codewords by \(\ell \) coordinates. Thus, \(\mathcal {C}\) is \(\ell \)-QC if and only if

$$\begin{aligned} \left( c_{1}, c_{2}, \ldots , c_{n}\right) \in \mathcal {C} \Rightarrow \left( c_{n-\ell +1}, \dots , c_{n}, c_{1}, c_{2},\ldots , c_{n-\ell }\right) \in \mathcal {C}. \end{aligned}$$

The smallest positive integer \(\ell \) with this property is called the index of \(\mathcal {C}\) and denoted by \(\ell \). Indeed, the index divides the code length n and their quotient is called the co-index of \(\mathcal {C}\), denoted by m. A codeword of a QC code \(\mathcal {C}\) of index \(\ell \) and length \(m\ell \) can be partitioned as

$$\begin{aligned} \textbf{c}=\left( c_{0,1}, c_{0,2}, \ldots , c_{0,\ell }, c_{1,1}, c_{1,2}, \ldots , c_{1,\ell }, \ldots , c_{m-1,1}, c_{m-1,2}, \ldots , c_{m-1,\ell } \right) . \end{aligned}$$
(1)

A linear code \(\mathcal {C}\) is QC of index \(\ell \) and co-index m if and only if

$$\begin{aligned} \left( c_{m-1,1}, c_{m-1,2}, \ldots , c_{m-1,\ell }, c_{0,1}, c_{0,2}, \ldots , c_{0,\ell }, \ldots , c_{m-2,1}, c_{m-2,2}, \ldots , c_{m-2,\ell } \right) \end{aligned}$$

is a codeword for every \(\textbf{c}\in \mathcal {C}\) in the form of (1). QC codes generalize cyclic codes (when \(\ell =1\)) but not constacyclic codes, however QT codes do. For a nonzero \(\lambda \in \mathbb {F}_q\), a linear code \(\mathcal {C}\) over \(\mathbb {F}_q\) of length n is called \((\ell ,\lambda )\)-QT if

$$\begin{aligned} \left( c_{1}, c_{2}, \ldots , c_{n}\right) \in \mathcal {C} \Rightarrow \left( \lambda c_{n-\ell +1}, \dots , \lambda c_{n}, c_{1}, c_{2},\ldots , c_{n-\ell }\right) \in \mathcal {C}. \end{aligned}$$

The index of \(\mathcal {C}\) is the smallest positive integer \(\ell \) with this property, while \(\lambda \) is called the shift constant of \(\mathcal {C}\). The index of a QT code divides its length and their quotient is the co-index m. Similar to QC codes, a linear code \(\mathcal {C}\) of length \(m\ell \) is \((\ell ,\lambda )\)-QT if and only if

$$\begin{aligned} \left( \lambda c_{m-1,1}, \lambda c_{m-1,2},\!\ldots , \lambda c_{m-1,\ell }, c_{0,1}, c_{0,2},\!\ldots , c_{0,\ell },\!\ldots , c_{m-2,1}, c_{m-2,2}, \!\ldots , c_{m-2,\ell } \right) \end{aligned}$$

is a codeword for every \(\textbf{c}\in \mathcal {C}\) in the form of (1). Let \(T_{(\ell ,\lambda )}\) be the automorphism of \(\mathbb {F}_q^{m\ell }\) such that

$$\begin{aligned} \begin{aligned}&T_{(\ell ,\lambda )}\left( a_{0,1}, a_{0,2}, \ldots , a_{0,\ell }, a_{1,1}, a_{1,2}, \ldots , a_{1,\ell }, \ldots , a_{m-1,1}, a_{m-1,2}, \ldots , a_{m-1,\ell } \right) \\&\quad \!=\! \left( \!\lambda a_{m-1,1},\!\lambda a_{m-1,2},\!\ldots \!,\!\lambda a_{m-1,\ell }\!,\!a_{0,1}\!,\!a_{0,2}\!,\!\ldots \!,\!a_{0,\ell } \!,\!\ldots \!,\!a_{m-2,1}\!,\!a_{m-2,2}\!,\!\ldots \!,\!a_{m-2,\ell }\!\right) \!. \end{aligned} \end{aligned}$$

We view \(\mathbb {F}_q^{m\ell }\) as an \(\mathbb {F}_q[x]\)-module by defining the action of x as the action of \(T_{\ell ,\lambda }\). Since an \((\ell ,\lambda )\)-QT code over \(\mathbb {F}_q\) of length \(m\ell \) is a \(T_{\ell ,\lambda }\)-invariant \(\mathbb {F}_q\)-subspace of \(\mathbb {F}_q^{m\ell }\), it is an \(\mathbb {F}_q[x]\)-submodule of \(\mathbb {F}_q^{m\ell }\). To exhibit a polynomial representation for QT codes, let \(\phi : \mathbb {F}_q^{m\ell } \rightarrow \mathscr {R}_\lambda ^\ell \) be the \(\mathbb {F}_q[x]\)-module isomorphism defined by

$$\begin{aligned} \phi :\left( a_{0,1}, a_{0,2}, \ldots , a_{0,\ell }, a_{1,1}, a_{1,2}, \ldots , a_{1,\ell }, \ldots , a_{m-1,1}, a_{m-1,2}, \ldots , a_{m-1,\ell } \right) \\ \mapsto \left( a_1(x), a_2(x), \ldots , a_\ell (x)\right) \end{aligned}$$

where \(a_j(x)=a_{0,j}+a_{1,j} x+a_{2,j} x^2+\cdots +a_{m-1,j}x^{m-1}\in \mathscr {R}_\lambda \) for \(1\le j \le \ell \). The polynomial representation of an \((\ell ,\lambda )\)-QT code \(\mathcal {C}\subseteq \mathbb {F}_q^{m\ell }\) is \(\phi \left( \mathcal {C}\right) \). Specifically, the codeword given by (1) is represented by the polynomial vector

$$\begin{aligned} \begin{aligned} \textbf{c}(x)=&\left( c_{0,1}+c_{1,1} x+c_{2,1} x^2+\cdots +c_{m-1,1}x^{m-1}, \right. \\&\qquad \qquad c_{0,2}+c_{1,2} x+c_{2,2} x^2+\cdots +c_{m-1,2}x^{m-1}, \ldots ,\\&\qquad \qquad \qquad \qquad \left. c_{0,\ell }+c_{1,\ell } x+c_{2,\ell } x^2+\cdots +c_{m-1,\ell }x^{m-1}\right) \in \mathscr {R}_\lambda ^\ell . \end{aligned} \end{aligned}$$

Thus, \((\ell ,\lambda )\)-QT codes are in one-to-one correspondence with the \(\mathbb {F}_q[x]\)-submodules of \(\mathscr {R}_\lambda ^\ell \), and thus are in one-to-one correspondence with the \(\mathbb {F}_q[x]\)-submodules of \(\left( \mathbb {F}_q[x]\right) ^\ell \) containing the submodule

$$\begin{aligned} M=\left( (x^m-\lambda )\mathbb {F}_q[x] \right) ^\ell . \end{aligned}$$

We do not distinguish between representing an \((\ell ,\lambda )\)-QT code as a \(T_{\ell ,\lambda }\)-invariant subspace of \(\mathbb {F}_q^{m\ell }\) or representing it as an \(\mathbb {F}_q[x]\)-submodule of \(\left( \mathbb {F}_q[x]\right) ^\ell \) that contains M. MT codes provide an additional generalization of QT codes by generalizing the \(\ell \) block lengths of length m into \(\ell \) blocks that are not necessarily equal.

Definition 1

Let \(m_1, m_2, \ldots ,m_\ell \) be positive integers and \(\Lambda =\left( \lambda _1, \lambda _2, \ldots , \lambda _\ell \right) \), where \(0\ne \lambda _j \in \mathbb {F}_q\) for \(1\le j\le \ell \). A \(\Lambda \)-MT code over \(\mathbb {F}_q\) of index \(\ell \) and block lengths \((m_1,m_2,\ldots ,m_\ell )\) is an \(\mathbb {F}_q[x]\)-submodule of \(\left( \mathbb {F}_q[x]\right) ^\ell \) that contains the submodule

$$\begin{aligned} \begin{aligned} M_\Lambda = \bigoplus _{j=1}^{\ell } \left( \left( x^{m_j}-\lambda _j\right) \mathbb {F}_q[x]\right) = \left( \left( x^{m_1}-\lambda _1\right) \mathbb {F}_q[x]\right) \oplus \cdots \oplus \left( \left( x^{m_\ell }-\lambda _\ell \right) \mathbb {F}_q[x]\right) . \end{aligned} \end{aligned}$$

From its definition, a MT code \(\mathcal {C}\) of index \(\ell \) is a linear code over \(\mathbb {F}_q[x]\) of length \(\ell \). A generator matrix for \(\mathcal {C}\) as a linear code over \(\mathbb {F}_q[x]\) is called GPM because its entries are polynomials over \(\mathbb {F}_q\). Since a GPM is a matrix over the PID \(\mathbb {F}_q[x]\), one might ask for its unique Hermite normal form, which we call the reduced GPM.

Theorem 1

There is a one-to-one correspondence between \(\left( \lambda _1, \lambda _2, \ldots , \lambda _\ell \right) \)-MT codes over \(\mathbb {F}_q\) of index \(\ell \) and block lengths \((m_1,m_2,\ldots ,m_\ell )\) and \(T_{\Lambda }\)-invariant \(\mathbb {F}_q\)-subspaces of \(\mathbb {F}_q^{n}\), where \(n=m_1+m_2+\cdots +m_\ell \) and \(T_{\Lambda }\) is the automorphism of \(\mathbb {F}_q^n\) given by

$$\begin{aligned} \begin{aligned}&T_{\Lambda }:\left( a_{0,1},\ldots , a_{m_1-1,1},a_{0,2},\ldots , a_{m_2-1,2},\ldots , a_{0,\ell },\ldots , a_{m_\ell -1,\ell }\right) \\&\qquad \mapsto \left( \lambda _1 a_{m_1-1,1},a_{0,1},\ldots , a_{m_1-2,1}, \lambda _2 a_{m_2-1,2},a_{0,2},\ldots , a_{m_2-2,2},\ldots ,\right. \\&\left. \qquad \qquad \qquad \qquad \qquad \qquad \qquad \qquad \qquad \qquad \qquad \lambda _\ell a_{m_\ell -1,\ell },a_{0,\ell },\ldots , a_{m_\ell -2,\ell }\right) . \end{aligned} \end{aligned}$$
(2)

Proof

For \(1\le j\le \ell \), let \(\mathscr {R}_{m_j,\lambda _j}=\mathbb {F}_q[x]/\langle x^{m_j}-\lambda _j\rangle \) and \(\pi _j:\mathbb {F}_q[x]\rightarrow \mathscr {R}_{m_j,\lambda _j}\) be the projection homomorphism. Then \(\pi =\oplus _{j=1}^\ell \pi _j: \left( \mathbb {F}_q[x]\right) ^\ell \rightarrow \oplus _{j=1}^\ell \mathscr {R}_{m_j,\lambda _j}\) is a surjective homomorphism with kernel \(M_\Lambda \). Actually, \(\pi \) defines a one-to-one correspondence between \(\mathbb {F}_q[x]\)-submodules of \(\oplus _{j=1}^\ell \mathscr {R}_{m_j,\lambda _j}\) and \(\mathbb {F}_q[x]\)-submodules of \(\left( \mathbb {F}_q[x]\right) ^\ell \) that contain \(M_\Lambda \). Hence, \(\left( \lambda _1, \lambda _2, \ldots , \lambda _\ell \right) \)-MT codes over \(\mathbb {F}_q\) of index \(\ell \) and block lengths \((m_1,m_2,\ldots ,m_\ell )\) are precisely the submodules of \(\oplus _{j=1}^\ell \mathscr {R}_{m_j,\lambda _j}\).

We view \(\mathbb {F}_q^{n}\) as an \(\mathbb {F}_q[x]\)-module by defining the action of x as the action of \(T_{\Lambda }\). Then the \(\mathbb {F}_q[x]\)-submodules of \(\mathbb {F}_q^{n}\) are precisely the \(T_{\Lambda }\)-invariant \(\mathbb {F}_q\)-subspaces of \(\mathbb {F}_q^{n}\). Let \(\phi : \mathbb {F}_q^n\rightarrow \oplus _{j=1}^\ell \mathscr {R}_{m_j,\lambda _j}\) be the \(\mathbb {F}_q\)-vector space isomorphism defined by

$$\begin{aligned} \left( a_{0,1},\ldots , a_{m_1-1,1},\ldots , a_{0,\ell },\ldots , a_{m_\ell -1,\ell }\right) \mapsto \left( a_1(x),a_2(x),\ldots ,a_\ell (x)\right) \end{aligned}$$
(3)

where \(a_j(x)=a_{0,j}+a_{1,j}x+\cdots + a_{m_j-1,j}x^{m_j-1}\) for \(1\le j\le \ell \). This gives the commutative diagram of \(\mathbb {F}_q\)-vector space isomorphisms

(4)

where \(\psi : \left( a_1(x), a_2(x), \ldots , a_\ell (x)\right) \mapsto \left( x a_1(x),x a_2(x), \ldots ,x a_\ell (x)\right) \). Since \(a_j(x)\in \mathscr {R}_{m_j,\lambda _j}\) for \(1\le j\le \ell \), the multiplication \(x a_j(x)\) is carried modulo \(x^{m_j}-\lambda _j\). Then \(x\phi \left( \textbf{a}\right) =\phi \left( T_{\Lambda }(\textbf{a})\right) \) for any \(\textbf{a}\in \mathbb {F}_q^{n}\), and \(\phi \) is an \(\mathbb {F}_q[x]\)-module isomorphism.

If \(\mathcal {C}\) is a \(\left( \lambda _1, \lambda _2, \ldots , \lambda _\ell \right) \)-MT code over \(\mathbb {F}_q\) of index \(\ell \) and block lengths \((m_1,m_2,\ldots ,m_\ell )\), then \(\phi ^{-1}\circ \pi \left( \mathcal {C}\right) \) is a \(T_{\Lambda }\)-invariant \(\mathbb {F}_q\)-subspace of \(\mathbb {F}_q^{n}\). Conversely, the image of any \(T_{\Lambda }\)-invariant \(\mathbb {F}_q\)-subspace of \(\mathbb {F}_q^{n}\) under the map \(\pi ^{-1}\circ \phi \) is an \(\mathbb {F}_q[x]\)-submodule of \(\left( \mathbb {F}_q[x]\right) ^\ell \) that contains \(M_\Lambda \). \(\square \)

Hereinafter, by a MT code we mean a \(T_{\Lambda }\)-invariant subspace of \(\mathbb {F}_q^{n}\) or a submodule of \(\left( \mathbb {F}_q[x]\right) ^\ell \) that contains \(M_\Lambda \), and the used algebraic structure is determined from the context. On the other hand, the polynomial representation of a MT-code is the corresponding submodule of \(\oplus _{j=1}^\ell \mathscr {R}_{m_j,\lambda _j}\).

Let \(\mathcal {C}\) be a \(\left( \lambda _1, \lambda _2, \ldots , \lambda _\ell \right) \)-MT code over \(\mathbb {F}_q\) of index \(\ell \), block lengths \((m_1,m_2,\ldots ,m_\ell )\), and an \(r\times n\) generator matrix G that generates \(\mathcal {C}\) as an \(\mathbb {F}_q\)-subspace of \(\mathbb {F}_q^{n}\). Let \(\phi \) be the map defined by (3) and let

$$\begin{aligned} \left( G_{i,1}(x), G_{i,2}(x),\ldots , G_{i,\ell }(x)\right) =\phi \left( \textrm{row}_i\left( G\right) \right) \end{aligned}$$

for \(i=1,2,\ldots , r\). Then \(\mathcal {C}\) (as an \(\mathbb {F}_q[x]\)-submodule of \(\left( \mathbb {F}_q[x]\right) ^\ell \)) has a GPM of the form

$$\begin{aligned} \begin{pmatrix} G_{1,1}(x) &{} G_{1,2}(x) &{} G_{1,3}(x) &{} \cdots &{} G_{1,\ell }(x)\\ G_{2,1}(x) &{} G_{2,2}(x) &{} G_{2,3}(x) &{} \cdots &{} G_{2,\ell }(x)\\ \vdots &{} \vdots &{} \vdots &{} \ddots &{} \vdots \\ G_{r,1}(x) &{} G_{r,2}(x) &{} G_{r,3}(x) &{} \cdots &{} G_{r,\ell }(x)\\ x^{m_1}-\lambda _1 &{} 0 &{} 0 &{} \cdots &{} 0\\ 0 &{} x^{m_2}-\lambda _2 &{} 0 &{} \cdots &{} 0\\ \vdots &{} \vdots &{} \vdots &{} \ddots &{} \vdots \\ 0 &{} 0 &{} 0 &{} \cdots &{} x^{m_\ell }-\lambda _\ell \end{pmatrix}. \end{aligned}$$

Reducing this matrix to the Hermite normal form yields the reduced GPM \(\textbf{G}\) of \(\mathcal {C}\). In fact, \(\left( \mathbb {F}_q[x]\right) ^\ell \) and \(M_\Lambda \) are free modules of rank \(\ell \) over the PID \(\mathbb {F}_q[x]\) and \(M_\Lambda \subseteq \mathcal {C}\subseteq \left( \mathbb {F}_q[x]\right) ^\ell \), then \(\mathcal {C}\) has rank \(\ell \). Consequently, the reduced GPM \(\textbf{G}=\left[ g_{i,j}\right] \) is upper triangular of rank \(\ell \) and size \(\ell \times \ell \) such that, for \(1\le i\le \ell \),

  1. 1.

    \(g_{i,i}\ne 0\) is monic and

  2. 2.

    \(\deg \left( g_{h,i}\right) <\deg \left( g_{i,i}\right) \) for all \(1\le h<i\).

It is worth noting that \(\mathcal {C}=\oplus _{j=1}^{\ell }\mathcal {C}_j\), where \(\mathcal {C}_j\) is a \(\lambda _j\)-constacyclic code of length \(m_j\) and generator polynomial \(g_j\left( x\right) \) for \(1\le j\le \ell \), if and only if the reduced GPM of \(\mathcal {C}\) is the diagonal matrix \(\textbf{G}=\textrm{diag}\left[ g_1\left( x\right) , \ldots , g_\ell \left( x\right) \right] \).

Theorem 2

Let \(\mathcal {C}\) and \(\mathcal {C}'\) be two \(\Lambda \)-MT codes of index \(\ell \) and block lengths \(\left( m_1,m_2,\ldots ,m_\ell \right) \). Let \(\textbf{G}\) and \(\textbf{G}'\) be GPMs for \(\mathcal {C}\) and \(\mathcal {C}'\) respectively. Then, \(\mathcal {C}'\subseteq \mathcal {C}\) if and only if \(\textbf{G}'=\textbf{Y}\textbf{G}\) for some matrix \(\textbf{Y}\). If \(\textbf{G}\) and \(\textbf{G}'\) are the reduced GPMs, then \(\textbf{Y}\) is upper triangular.

Proof

We have \(\mathcal {C}'\subseteq \mathcal {C}\) if and only if \(\textbf{G}\) generates the rows of \(\textbf{G}'\) if and only if \(\textbf{G}'=\textbf{Y}\textbf{G}\) for some matrix \(\textbf{Y}\). Suppose \(\textbf{G}\) and \(\textbf{G}'\) are in the reduced form. Then \(\textbf{Y}\) is upper triangular because \(\textbf{G}\) and \(\textbf{G}'\) are upper triangular with nonzero diagonal entries and \(\textbf{F}_q[x]\) is an integral domain. \(\square \)

The diagonal matrix

$$\begin{aligned} \begin{aligned} \textbf{D}&=\textrm{diag}\left[ x^{m_1}- \lambda _1,x^{m_2}-\lambda _2,\ldots ,x^{m_\ell }-\lambda _\ell \right] \\&=\begin{pmatrix} x^{m_1}-\lambda _1 &{} 0 &{} \ldots &{} 0\\ 0 &{} x^{m_2}-\lambda _2 &{} \ldots &{} 0\\ \vdots &{} \vdots &{} \ddots &{} \vdots \\ 0 &{} 0 &{} \ldots &{} x^{m_\ell }-\lambda _\ell \end{pmatrix} \end{aligned} \end{aligned}$$

is the reduced GPM of the \(\Lambda \)-MT code \(M_\Lambda \). But any \(\Lambda \)-MT code \(\mathcal {C}\) with a GPM \(\textbf{G}\) contains \(M_\Lambda \). Then from Theorem 2, there is a matrix \(\textbf{A}\) such that

$$\begin{aligned} \textbf{A}\textbf{G}=\textbf{D}. \end{aligned}$$
(5)

Equation (5) is called the identical equation of \(\textbf{G}\). The matrix \(\textbf{A}\) plays a fundamental role in constructing a GPM for the Euclidean and Galois duals of a MT code. If \(\textbf{A}=\left[ a_{i,j}\right] \) is the matrix that satisfies the identical equation of the reduced GPM, then \(\textbf{A}\) is upper triangular and for \(1\le i\le \ell \)

  1. 1.

    \(a_{i,i}=\frac{x^{m_i}-\lambda _i}{g_{i,i}}\) and

  2. 2.

    \(\deg \left( a_{i,h}\right) <\deg \left( a_{i,i}\right) \) for all \(i< h\le \ell \).

In particular, \(\textbf{A}\) and \(\textbf{G}\) commute when \(\mathcal {C}\) is \((\ell ,\lambda )\)-QT.

Theorem 3

Let \(\mathcal {C}\) be an \((\ell ,\lambda )\)-QT code with a GPM \(\textbf{G}\) and let \(\textbf{A}\) be the matrix that satisfies the identical equation of \(\textbf{G}\). Then \(\textbf{G}\textbf{A}=\textbf{D}\).

Proof

Assume \(\textbf{G}\textbf{A}=\textbf{B}\). Then \(\textbf{B}\textbf{G}=\textbf{G}\textbf{A}\textbf{G}=\textbf{G} \textbf{D}=\left( x^m-\lambda \right) \textbf{G}=\textbf{D}\textbf{G}\). That is, \(\left( \textbf{B}-\textbf{D}\right) \textbf{G}=\textbf{0}\). Rows of \(\textbf{G}\) form a basis for \(\mathcal {C}\), then \(\left( \textbf{B}-\textbf{D}\right) =\textbf{0}\) and \(\textbf{B}=\textbf{D}\). \(\square \)

The following result can be proven in a similar way to Corollary 3.1 in [5].

Theorem 4

Let \(\mathcal {C}\) be a \(\Lambda \)-MT code over \(\mathbb {F}_q\) of index \(\ell \) and block lengths \(\left( m_1,m_2,\ldots ,m_\ell \right) \) and let \(\textbf{G}=[g_{i,j}]\) be an upper triangular GPM of \(\mathcal {C}\). Then \(\mathcal {C}\) has dimension

$$\begin{aligned} k=\sum _{j=1}^{\ell }\left( m_j-\textrm{deg}(g_{j,j})\right) . \end{aligned}$$

as an \(\mathbb {F}_q\)-vector space. Equivalently, \(k=\deg \left( \textrm{det}\left( \textbf{A}\right) \right) \), where \(\textbf{A}\) is the matrix that satisfies the identical equation of \(\textbf{G}\) and \(\textrm{det}\left( \textbf{A}\right) \) is the determinant of \(\textbf{A}\).

Example 1

Let \(\mathcal {C}\) be the (2, 1)-MT code over \(\mathbb {F}_3\) of index \(\ell =2\), block lengths \(\left( m_1,m_2\right) =\left( 20,40\right) \), and the reduced GPM

$$\begin{aligned} \textbf{G}= \begin{pmatrix} g_{1,1} &{} g_{1,2}\\ 0 &{} x^{40}+2 \end{pmatrix} \end{aligned}$$

where \(g_{1,1}= 2+ x+2 x^2+ x^3+ x^4+2 x^5+ x^7+ x^9+2 x^{10}+ x^{11}+2 x^{13}+x^{14}\) and \(g_{1,2}= x+ x^4+ x^5+ x^7+2 x^9+2 x^{11}+2 x^{12}+ x^{13}+ x^{14}+ x^{16}+ x^{17}+2 x^{19}+2 x^{21}+2 x^{24}+2 x^{25}+2 x^{27}+ x^{29}+ x^{31}+ x^{32}+2 x^{33}+2 x^{34}+2 x^{36}+2 x^{37}+x^{39}\). The matrix that satisfies the identical equation of \(\textbf{G}\) is

$$\begin{aligned} \textbf{A}=\begin{pmatrix} 2+2 x + x^4 + x^5+x^6 &{} \quad 2x(1+x)^4\\ 0 &{} 1 \end{pmatrix}. \end{aligned}$$

From Theorem 4, \(\mathcal {C}\) has dimension \(k=(20-14)+(40-40)=6\). The minimum distance of \(\mathcal {C}\) is found to be 36. According to [11], \(\mathcal {C}\) has the best-known parameters [60, 6, 36] for a linear code over \(\mathbb {F}_3\).

Definition 2

An \(\ell \)-GQC code over \(\mathbb {F}_q\) of block lengths \((m_1,m_2,\ldots ,m_\ell )\) is a MT code of index \(\ell \), block lengths \(\left( m_1,m_2,\ldots ,m_\ell \right) \), and shift constants \(\lambda _j=1\) for \(1\le j\le \ell \).

From Theorem 1, an \(\ell \)-GQC code can be thought of as:

  1. 1.

    An \(\mathbb {F}_q[x]\)-submodule of \(\left( \mathbb {F}_q[x]\right) ^\ell \) that contains \(\oplus _{j=1}^{\ell } \left( \left( x^{m_j}-1\right) \mathbb {F}_q[x]\right) \).

  2. 2.

    An invariant \(\mathbb {F}_q\)-subspace of \(\mathbb {F}_q^{n}\), where \(n=\sum _{j=1}^\ell m_j\), under the automorphism

    $$\begin{aligned} \begin{aligned}&\left( a_{0,1},\ldots , a_{m_1-1,1},a_{0,2},\ldots , a_{m_2-1,2},\ldots , a_{0,\ell },\ldots , a_{m_\ell -1,\ell }\right) \mapsto \\&\left( a_{m_1-1,1}, a_{0,1}, \ldots , a_{m_1-2,1}, a_{m_2-1,2}, a_{0,2}, \ldots , a_{m_2-2,2}, \ldots ,\right. \\&\left. \qquad \qquad \qquad \qquad \qquad \qquad \qquad \qquad a_{m_\ell -1,\ell }, a_{0,\ell }, \ldots , a_{m_\ell -2,\ell } \right) . \end{aligned} \end{aligned}$$
  3. 3.

    An \(\mathbb {F}_q[x]\)-submodule of \(\oplus _{j=1}^\ell \mathscr {R}_{m_j,1}\), where \(\mathscr {R}_{m_j,1}=\mathbb {F}_q[x]/\langle x^{m_j}-1\rangle \).

3 Euclidean duals of MT codes

In this section, we focus on discussing the Euclidean duals of MT codes. Unless otherwise stated in this section, let \(\mathcal {C}\) denote a \(\Lambda \)-MT code over \(\mathbb {F}_q\) of index \(\ell \) and block lengths \(\left( m_1,m_2,\ldots ,m_\ell \right) \), where \(\Lambda =\left( \lambda _1,\lambda _2,\ldots ,\lambda _\ell \right) \) while \(0\ne \lambda _j\in \mathbb {F}_q\) and \(m_i\) is a positive integer for \(1\le j\le \ell \). We also let \(\textbf{G}\) be a GPM for \(\mathcal {C}\), and we denote the matrix that satisfies the identical equation of \(\textbf{G}\) by \(\textbf{A}\). In the following result, we prove that the Euclidean dual \(\mathcal {C}^\perp \) of \(\mathcal {C}\) is not only linear, but also MT with the same block lengths but possibly different shift constants. However, the main result of this section is to derive a formula for a GPM of \(\mathcal {C}^\perp \). This will be achieved with the aid of the identical equation of \(\textbf{G}\).

Theorem 5

The Euclidean dual \(\mathcal {C}^\perp \) of \(\mathcal {C}\) is \(\Delta \)-MT of block lengths \(\left( m_1,m_2,\ldots ,m_\ell \right) \), where \(\Delta =\left( \frac{1}{\lambda _1},\frac{1}{\lambda _2},\ldots ,\frac{1}{\lambda _\ell } \right) \).

Proof

From Theorem 1, \(\mathcal {C}\) is a \(T_{\Lambda }\)-invariant subspace of \(\mathbb {F}_q^{n}\), where \(n=\sum _{j=1}^\ell m_j\) and \(T_{\Lambda }\) is the automorphism given by (2). Let \(N=\textrm{lcm}\left( t_1 m_1,t_2 m_2,\ldots , t_\ell m_\ell \right) \), where \(t_j\) is the multiplicative order of \(\lambda _j\) for \(1\le j\le \ell \). Observe that applying \(T_{\Lambda }\) exactly N times to any \(\textbf{a}\in \mathbb {F}_q^{n}\) keeps \(\textbf{a}\) unchanged. Thus \(T_{\Lambda }^N\) is the identity map on \(\mathbb {F}_q^{n}\). If we can show that \(T_{\Delta }\left( \mathcal {C}^\perp \right) =\mathcal {C}^\perp \), then \(\mathcal {C}^\perp \) is \(\Delta \)-MT. To do this, consider any \(\textbf{b}\in \mathcal {C}^\perp \) and \(\textbf{c}\in \mathcal {C}\). Then

$$\begin{aligned} \langle \textbf{c}, T_{\Delta }\left( \textbf{b}\right) \rangle =\langle T_{\Lambda }^N\left( \textbf{c}\right) , T_{\Delta }\left( \textbf{b}\right) \rangle =\langle T_{\Lambda }\circ T_{\Lambda }^{N-1}\left( \textbf{c}\right) , T_{\Delta }\left( \textbf{b}\right) \rangle =\langle T_{\Lambda }^{N-1}\left( \textbf{c}\right) , \textbf{b}\rangle =0 \end{aligned}$$

because \(T_{\Lambda }^{N-1}\left( \textbf{c}\right) \in \mathcal {C}\). Then, \(T_{\Delta }\left( \textbf{b}\right) \in \mathcal {C}^\perp \) and \(T_{\Delta }\left( \mathcal {C}^\perp \right) \subseteq \mathcal {C}^\perp \). Equality holds since \(T_{\Delta }\) is a vector space automorphism. \(\square \)

Now we define some matrices that are jointly related to the matrix that satisfies the identical equation of the reduced GPM of \(\mathcal {C}\).

Definition 3

For a MT code \(\mathcal {C}\), let \(\textbf{G}=[g_{i,j}]\) be the reduced GPM of \(\mathcal {C}\) and let \(\textbf{A}=[a_{i,j}]\) be the matrix that satisfies the identical equation of \(\textbf{G}\). For \(1\le j\le \ell \), denote the degree of \(\deg \left( g_{j,j}\right) \) by \(d_j\), i.e., \(d_j=\deg \left( g_{j,j}\right) \).

  1. 1.

    Let \(\textbf{A}\left( \frac{1}{x}\right) \) be the matrix obtained from \(\textbf{A}\) when x is replaced by \(\frac{1}{x}\).

  2. 2.

    Let \(\textbf{A}^*\) be the matrix obtained after multiplying the (ij)-th entry of \(\textbf{A}\left( \frac{1}{x}\right) \) by \(x^{m_i-d_j}\).

  3. 3.

    (Eliminate the negative exponents in \(\textbf{A}^*\)) Let \(\textbf{A}^{**}\) be the matrix obtained from \(\textbf{A}^*\) by reducing the (ij)-th entry (for \(i<j\)) of \(\textbf{A}^*\) modulo \(\left( x^{m_i}-\frac{1}{\lambda _i}\right) \). Specifically, \(x^{-\mu }\) is replaced by \(\lambda _i x^{m_i-\mu }\) for \(\mu \ge 1\).

  4. 4.

    Let \(\textbf{H}=\left( \textbf{A}^{**}\right) ^t\), where \(^t\) stands for matrix transpose.

From Theorem 5, \(\mathcal {C}^\perp \) is \(\Delta \)-MT code, where \(\Delta =\left( \frac{1}{\lambda _1},\frac{1}{\lambda _2},\ldots ,\frac{1}{\lambda _\ell } \right) \). For \(1\le h\le \ell \), let

$$\begin{aligned} \pi _h:\mathbb {F}_q[x]\rightarrow \mathscr {R}_{m_h,\frac{1}{\lambda _h}}=\mathbb {F}_q[x]/\langle x^{m_h}-\lambda _h^{-1}\rangle \end{aligned}$$

be the projection homomorphism and let \(\pi =\oplus _{h=1}^\ell \pi _h\). View \(\mathbb {F}_q^{n}\) as an \(\mathbb {F}_q[x]\)-module by defining the action of x as the action of \(T_{\Delta }\). Define the \(\mathbb {F}_q[x]\)-module isomorphism \(\phi \) by

$$\begin{aligned}{} & {} \mathbb {F}_q^n\rightarrow \oplus _{h=1}^\ell \mathscr {R}_{m_h,\frac{1}{\lambda _h}}\\{} & {} \left( b_{0,1},\ldots , b_{m_1-1,1},\ldots , b_{0,\ell },\ldots , b_{m_\ell -1,\ell }\right) \mapsto \left( b_1(x),b_2(x),\ldots ,b_\ell (x)\right) \end{aligned}$$

where \(b_h (x)=b_{0,h}+b_{1,h}x+\cdots + b_{m_h-1,h}x^{m_h-1}\) for \(1\le h\le \ell \). Similar to (4), we construct the commutative diagram

figure a

where \(\psi : \left( b_1(x), b_2(x), \ldots , b_\ell (x)\right) \mapsto \left( x b_1(x),x b_2(x), \ldots ,x b_\ell (x)\right) \).

Let us fix a positive integer \(j\le \ell \) and argue as in Definition 3. Suppose that the jth column of \(\textbf{A}\) is

$$\begin{aligned} \left( a_{1,j}(x), a_{2,j}(x), \ldots , a_{\ell ,j}(x) \right) ^t \end{aligned}$$

where \(\deg \left( a_{h,j}(x)\right) < \deg \left( a_{h,h}(x)\right) \le m_h\) for \(h< j\), \(a_{h,j}(x)=0\) for \(h>j\), and \(\deg \left( a_{j,j}(x)\right) < m_j\) or \(a_{j,j}(x)=x^{m_j}-\lambda _j\). Then the jth column of \(\textbf{A}^*\) is

$$\begin{aligned} \left( x^{m_1-d_j}a_{1,j}\left( \frac{1}{x}\right) , x^{m_2-d_j}a_{2,j}\left( \frac{1}{x}\right) , \ldots , x^{m_\ell -d_j}a_{\ell ,j}\left( \frac{1}{x}\right) \right) ^t, \end{aligned}$$

where \(d_j=\deg \left( g_{j,j}\right) \). The jth row of \(\textbf{H}\) is the jth column of \(\textbf{A}^{**}\) and it satisfies

$$\begin{aligned} \pi \left( \textrm{row}_j\left( \textbf{H}\right) \right) =\pi \left( \left( \textrm{column}_j\left( \textbf{A}^*\right) \right) ^t\right) . \end{aligned}$$

Let \(\textbf{a}_j=T_{\Delta }^{d_j-1}\left( \phi ^{-1}\left( \pi \left( \textrm{row}_j\left( \textbf{H}\right) \right) \right) \right) \). Then

$$\begin{aligned} \textbf{a}_j=\left( a_{m_1-1,1,j},\ldots ,a_{0,1,j},a_{m_2-1,2,j}, \ldots ,a_{0,2,j},\ldots ,a_{m_\ell -1,\ell ,j},\ldots ,a_{0,\ell ,j} \right) \end{aligned}$$
(6)

where \(\pi _h\left( a_{h,j}(x)\right) =a_{0,h,j}+a_{1,h,j}x +\cdots +a_{m_h-2,h,j}x^{m_h-2}+a_{m_h-1,h,j}x^{m_h-1}\) for \(1\le h\le \ell \). Since \(\mathcal {C}^\perp \) is \(T_{\Delta }\)-invariant, \(\textrm{row}_j\left( \textbf{H}\right) \in \mathcal {C}^\perp \) if and only if \(\textbf{a}_j\) gives zero inner product with each codeword in \(\mathcal {C}\) and that is actually what we will show in the next result.

Lemma 1

For any positive integer \(j\le \ell \), \(\textrm{row}_j\left( \textbf{H}\right) \in \mathcal {C}^\perp \).

Proof

For \(1\le h\le \ell \), let \(t_h\) be the multiplicative order of \(\lambda _h\), let \(N=\textrm{lcm}\left( t_1m_1,t_2m_2,\ldots ,t_\ell m_\ell \right) \), and let \(N_h=N/( m_h t_h)\). Then

$$\begin{aligned} \frac{x^N-1}{ x^{m_h}-\lambda _h}&=\frac{x^{m_h t_h N_h}- \lambda _h^{t_h N_h}}{ x^{m_h}-\lambda _h}\\&=x^{N-m_h}+\lambda _h x^{N-2m_h}+\lambda _h^2 x^{N-3m_h}+\cdots +\lambda _h^{t_h N_h-2}x^{m_h}+\lambda _h^{t_h N_h-1}. \end{aligned}$$

Let \(\textbf{T}=\textrm{diag}\left[ \frac{x^N-1}{x^{m_1}-\lambda _1}, \ldots , \frac{x^N-1}{x^{m_\ell }-\lambda _\ell }\right] \). From (5),

$$\begin{aligned} \textbf{A}\left( \textbf{G}\textbf{T}\right) =\textbf{A} \textbf{G}\textbf{T}=\textbf{D}\textbf{T}=(x^N-1)\textbf{I}_\ell . \end{aligned}$$

Applying the same argument in the proof of Theorem 3, we get

$$\begin{aligned} \left( \textbf{G}\textbf{T} \right) \textbf{A}=(x^N-1)\textbf{I}_\ell . \end{aligned}$$
(7)

Reducing the (ij)-th entry of (7) modulo \(\left( x^N-1\right) \) leads to

$$\begin{aligned}&\sum _{h=1}^{\ell } g_{i,h}\left( \frac{x^N-1}{x^{m_h}-\lambda _h} \right) a_{h,j}\nonumber \\&\quad =\!\sum _{h=1}^{\ell } \!\left( \!x^{N-m_h}+\lambda _h x^{N-2m_h} +\lambda _h^2 x^{N-3m_h}+\cdots +\lambda _h^{t_h N_h-2}x^{m_h}+\lambda _h^{t_h N_h-1}\!\right) \!g_{i,h}a_{h,j}\nonumber \\&\quad \equiv 0 \pmod {x^N-1}. \end{aligned}$$
(8)

In fact, \(\textbf{G}\) is the reduced GPM of \(\mathcal {C}\). Then \(g_{i,h}=0\) for \(h<i\), \(\deg \left( g_{i,h} \right) <m_h\) for any \(h>i\), and \(\deg \left( g_{i,i} \right) <m_i\) or \(g_{i,i}=x^{m_i}-\lambda _i\). If \(g_{i,i}=x^{m_i}-\lambda _i\), then \(g_{i,i}\left( \frac{x^N-1}{x^{m_i}-\lambda _i} \right) a_{i,j}\equiv 0\pmod {x^N-1}\). Thus, in all cases, \(g_{i,h}\) in (8) can be replaced by

$$\begin{aligned} \pi _h\left( g_{i,h}\right) =g_{0,i,h}+g_{1,i,h}x+\cdots +g_{m_h-2,i,h}x^{m_h-2}+g_{m_h-1,i,h}x^{m_h-1}. \end{aligned}$$

Similarly, \(a_{h,j}=0\) for \(h>j\), \(\deg \left( a_{h,j} \right) <m_h\) for \(h<j\), and \(\deg \left( a_{j,j} \right) <m_j\) or \(a_{j,j}=x^{m_j}-\lambda _j\). If \(a_{j,j}=x^{m_j}-\lambda _j\), then \(g_{i,j}\left( \frac{x^N-1}{x^{m_j}-\lambda _j} \right) a_{j,j}\equiv 0 \pmod {x^N-1}\). Thus, in all cases, \(a_{h,j}\) in (8) can be replaced by

$$\begin{aligned} \pi _h\left( a_{h,j}\right) =a_{0,h,j}+a_{1,h,j}x+\cdots +a_{m_h-2,h,j}x^{m_h-2}+a_{m_h-1,h,j}x^{m_h-1}. \end{aligned}$$

Then

$$\begin{aligned} \begin{aligned}&\sum _{h=1}^{\ell } \left( x^{N-m_h}+\lambda _h x^{N-2m_h}+\lambda _h^2 x^{N-3m_h}+\cdots +\lambda _h^{t_h N_h-2}x^{m_h}+\lambda _h^{t_h N_h-1}\right) \\&\qquad \left( g_{0,i,h}+g_{1,i,h}x+\cdots +g_{m_h-2,i,h}x^{m_h-2}+g_{m_h-1,i,h}x^{m_h-1}\right) \\&\qquad \left( a_{0,h,j}+a_{1,h,j}x+\cdots +a_{m_h-2,h,j}x^{m_h-2}+a_{m_h-1,h,j}x^{m_h-1}\right) \\&\quad \equiv 0 \pmod {x^N-1}. \end{aligned} \end{aligned}$$
(9)

For any integer \(0\le \nu \le N-1\), the sum of the coefficients of \(x^{N-\nu -1}\) and \(x^{2N-\nu -1}\) in (9) is zero. What this shows is that the inner product of \(\textbf{a}_j\) [see Eq. (6)] and \(T_{\Lambda }^{\nu }\left( \phi ^{-1}\left( \pi \left( \textrm{row}_i\left( \textbf{G}\right) \right) \right) \right) \) (for any \(1\le i\le \ell \) and \(0\le \nu \le N-1\)) is zero. Thus, \(\textrm{row}_j\left( \textbf{H}\right) \in \mathcal {C}^\perp \) because of our discussion before the lemma. \(\square \)

Lemma 2

The matrix \(\textbf{H}\) is a GPM of a \(\Delta \)-MT code.

Proof

Our aim is to prove that \(\textbf{B}\textbf{H}=\textrm{diag}\left[ x^{m_1}-\frac{1}{\lambda _1},\ldots , x^{m_\ell }-\frac{1}{\lambda _\ell }\right] \) for some polynomial matrix \(\textbf{B}\). Replacing x with \(\frac{1}{x}\) in (5) gives \(\textbf{A}\left( \frac{1}{x}\right) \textbf{G}\left( \frac{1}{x}\right) =\textbf{D}\left( \frac{1}{x}\right) \) as matrices over the ring \(\mathbb {F}_q\left[ x,\frac{1}{x}\right] \). From Definition 3,

$$\begin{aligned} \textrm{diag}\left[ x^{m_1},\ldots ,x^{m_\ell }\right] \textbf{A} \left( \frac{1}{x}\right) =\textbf{A}^*\textrm{diag}\left[ x^{d_1},\ldots ,x^{d_\ell }\right] . \end{aligned}$$

Thus,

$$\begin{aligned} \textbf{A}^* \textrm{diag}\left[ x^{d_1},\ldots ,x^{d_\ell }\right] \textbf{G}\left( \frac{1}{x}\right)&=\textrm{diag}\left[ x^{m_1}, \ldots ,x^{m_\ell }\right] \textbf{D}\left( \frac{1}{x}\right) \\&=-\textrm{diag}\left[ x^{m_1}-\frac{1}{\lambda _1},\ldots , x^{m_\ell }-\frac{1}{\lambda _\ell }\right] \textrm{diag}\left[ \lambda _1,\ldots ,\lambda _\ell \right] . \end{aligned}$$

For \(1\le j\le \ell \), \(\deg (a_{j,j})=m_j-d_j\). Thus, the diagonal elements of \(\textbf{A}^*\) have no negative powers of x. Again from Definition 3, there is a strictly upper triangular matrix \(\textbf{S}\) such that

$$\begin{aligned} \textbf{A}^{**}=\textbf{A}^*+\textrm{diag}\left[ x^{m_1}- \frac{1}{\lambda _1},\ldots ,x^{m_\ell }-\frac{1}{\lambda _\ell }\right] \textbf{S}. \end{aligned}$$

Therefore,

$$\begin{aligned}&\textbf{A}^{**}\textrm{diag}\left[ x^{d_1},\ldots ,x^{d_\ell }\right] \textbf{G}\left( \frac{1}{x}\right) \\&\qquad \qquad =-\textrm{diag}\left[ x^{m_1}-\frac{1}{\lambda _1}, \ldots , x^{m_\ell }-\frac{1}{\lambda _\ell }\right] \textrm{diag} \left[ \lambda _1,\ldots ,\lambda _\ell \right] \\&\qquad \qquad \quad + \textrm{diag}\left[ x^{m_1}-\frac{1}{\lambda _1}, \ldots ,x^{m_\ell }-\frac{1}{\lambda _\ell }\right] \textbf{S}\ \textrm{diag}\left[ x^{d_1},\ldots ,x^{d_\ell }\right] \textbf{G}\left( \frac{1}{x}\right) \\&\qquad \qquad =\textrm{diag}\left[ x^{m_1}-\frac{1}{\lambda _1},\ldots , x^{m_\ell }-\frac{1}{\lambda _\ell }\right] \textbf{U} \end{aligned}$$

where

$$\begin{aligned} \textbf{U}=-\textrm{diag}\left[ \lambda _1,\ldots ,\lambda _\ell \right] + \textbf{S}\ \textrm{diag}\left[ x^{d_1},\ldots ,x^{d_\ell }\right] \textbf{G} \left( \frac{1}{x}\right) . \end{aligned}$$

Note that \(\textbf{U}\) is an upper triangular invertible matrix because its determinant is a unit in \(\mathbb {F}_q\left[ x,\frac{1}{x}\right] \). Then,

$$\begin{aligned} \textbf{A}^{**}\textrm{diag}\left[ x^{d_1},\ldots ,x^{d_\ell }\right] \textbf{G}\left( \frac{1}{x}\right) \textbf{U}^{-1}=\textrm{diag}\left[ x^{m_1}-\frac{1}{\lambda _1},\ldots , x^{m_\ell }-\frac{1}{\lambda _\ell }\right] \end{aligned}$$

and

$$\begin{aligned} \left( \textrm{diag}\left[ x^{d_1},\ldots ,x^{d_\ell }\right] \textbf{G}\left( \frac{1}{x}\right) \textbf{U}^{-1}\right) ^t \textbf{H} =\textrm{diag}\left[ x^{m_1}-\frac{1}{\lambda _1},\ldots , x^{m_\ell }-\frac{1}{\lambda _\ell }\right] . \end{aligned}$$

Let

$$\begin{aligned} \textbf{B}=\left( \textrm{diag}\left[ x^{d_1},\ldots ,x^{d_\ell }\right] \textbf{G}\left( \frac{1}{x}\right) \textbf{U}^{-1}\right) ^t. \end{aligned}$$

Then \(\textbf{B}\) is lower triangular such that

$$\begin{aligned} \textbf{B}\textbf{H}=\textrm{diag}\left[ x^{m_1}-\frac{1}{\lambda _1},\ldots , x^{m_\ell }-\frac{1}{\lambda _\ell }\right] . \end{aligned}$$

The diagonal elements of \(\textbf{B}\) and \(\textbf{H}\) are polynomials with nonzero constant terms, thus the entries of \(\textbf{B}\) are elements of \(\mathbb {F}_q[x]\). Therefore, \(\textbf{H}\) is a GPM for some \(\Delta \)-MT code. \(\square \)

So far, Lemmas 1 and 2 show that \(\textbf{H}\) is a GPM of a \(\Delta \)-MT subcode of \(\mathcal {C}^\perp \). Now we apply the standard dimension argument to show that this subcode is \(\mathcal {C}^\perp \).

Lemma 3

The matrix \(\textbf{H}\) is a GPM of a \(\Delta \)-MT code of dimension \(n-k\) as an \(\mathbb {F}_q\)-subspace of \(\mathbb {F}_q^n\), where \(n=\sum _{j=1}^\ell m_j\) and k is the dimension of \(\mathcal {C}\).

Proof

Suppose \(\textbf{H}'\) is the Hermite normal form of \(\textbf{H}\) and let \(\textbf{B}'\) be the matrix that satisfies the identical equation of \(\textbf{H}'\). Then, there is an invertible polynomial matrix \(\textbf{U}\) such that \(\textbf{H}'=\textbf{U}\textbf{H}\). From Theorem 4 and Definition 3, the dimension of the subcode generated by \(\textbf{H}\) is

$$\begin{aligned} \begin{aligned} \deg \left( \textrm{det}\left( \textbf{B}'\right) \right)&= n-\deg \left( \textrm{det}\left( \textbf{H}'\right) \right) = n-\deg \left( \textrm{det}\left( \textbf{U}\right) \textrm{det} \left( \textbf{H}\right) \right) \\&=n-\deg \left( \textrm{det}\left( \textbf{H}\right) \right) =n-\deg \left( \textrm{det}\left( \textbf{A}\right) \right) =n-k. \end{aligned} \end{aligned}$$

\(\square \)

What we proved in Lemmas 1, 2 and 3 can be summarized in the following theorem.

Theorem 6

Let \(\mathcal {C}\) be a \(\Lambda \)-MT code over \(\mathbb {F}_q\) with reduced GPM \(\textbf{G}\) and let \(\textbf{A}\) be the matrix that satisfies the identical equation of \(\textbf{G}\). The polynomial matrix \(\textbf{H}\) given in Definition 3 is a GPM for \(\mathcal {C}^\perp \).

Example 2

We continue with the (2, 1)-MT code \(\mathcal {C}\) discussed in Example 1. From Theorem 5, \(\mathcal {C}^\perp \) is (2, 1)-MT over \(\mathbb {F}_3\) of length 60 and dimension 54. A GPM for \(\mathcal {C}^\perp \) can be obtained from Definition 3 and Theorem 6 as follows:

$$\begin{aligned}{} & {} \begin{aligned} \textbf{A}&=\begin{pmatrix} 2+2 x + x^4 + x^5+x^6 &{} \quad 2x(1+x)^4\\ 0 &{} 1 \end{pmatrix}.\\ \textbf{A}\left( \frac{1}{x}\right)&=\begin{pmatrix} x^{-6} + x^{-5} + x^{-4} +2 x^{-1} +2 &{} \quad 2x^{-1}(x^{-1}+1)^4\\ 0 &{} 1 \end{pmatrix}. \end{aligned}\\{} & {} \begin{aligned} \textbf{A}^*&=\begin{pmatrix} x^{20-14}\left( x^{-6} + x^{-5} + x^{-4} +2 x^{-1} +2\right) &{} \quad 2x^{20-40}x^{-1}(x^{-1}+1)^4\\ 0 &{} x^{40-40} \end{pmatrix}\\&=\begin{pmatrix} 1 + x + x^{2} +2 x^{5} +2x^6 &{} \quad 2x^{-25}+ 2x^{-24}+ 2x^{-22}+2x^{-21}\\ 0 &{} 1 \end{pmatrix}.\\ \textbf{A}^{**}&=\begin{pmatrix} 1 + x + x^{2} +2 x^{5} +2x^6 &{} \quad x^{-5}+ x^{-4}+ x^{-2}+x^{-1}\\ 0 &{} 1 \end{pmatrix}\\&=\begin{pmatrix} 1 + x + x^{2} +2 x^{5} +2x^6 &{} \quad 2x^{15} + 2x^{16} + 2x^{18} + 2x^{19}\\ 0 &{} 1 \end{pmatrix}.\\ \textbf{H}&=\begin{pmatrix} 1 + x + x^{2} +2 x^{5} +2x^6 &{} 0 \\ 2x^{15} + 2x^{16} + 2x^{18} + 2x^{19}&{} 1 \end{pmatrix}. \end{aligned} \end{aligned}$$

The reduced GPM of \(\mathcal {C}^\perp \) is

$$\begin{aligned} \textbf{H}'=\begin{pmatrix} 1 &{} 2x+2x^2+x^3+x^4+x^5 \\ 0 &{} 2+2x+2x^2+x^5+x^6 \end{pmatrix} \end{aligned}$$

which can be obtained by reducing \(\textbf{H}\) to its Hermite normal form.

Since the class of MT codes contains QC, QT, and GQC codes as subclasses, the following special cases are direct consequences of Theorem 6.

Corollary 1

Let \(\mathcal {C}\) be a QC code over \(\mathbb {F}_q\) of index \(\ell \), co-index m, and reduced GPM \(\textbf{G}=[g_{i,j}]\). Let \(\textbf{A}\) denote the matrix satisfying the identical equation of \(\textbf{G}\). Then \(\mathcal {C}^\perp \) is QC of index \(\ell \), co-index m, and a GPM

$$\begin{aligned} \textbf{H}=\left( \textbf{A}\left( \frac{1}{x}\right) \textrm{diag}\left[ x^{m-d_1},\ldots ,x^{m-d_\ell }\right] \pmod {x^m-1}\right) ^t \end{aligned}$$

where \(d_j=\deg \left( g_{j,j}\right) \) for \(1\le j\le \ell \).

Corollary 2

Let \(\mathcal {C}\) be a QT code over \(\mathbb {F}_q\) of index \(\ell \), co-index m, shift constant \(\lambda \), and reduced GPM \(\textbf{G}=[g_{i,j}]\). Let \(\textbf{A}\) denote the matrix satisfying the identical equation of \(\textbf{G}\). Then \(\mathcal {C}^\perp \) is QT of index \(\ell \), co-index m, shift constant \(\frac{1}{\lambda }\), and a GPM

$$\begin{aligned} \textbf{H}=\left( \textbf{A}\left( \frac{1}{x}\right) \textrm{diag}\left[ x^{m-d_1},\ldots ,x^{m-d_\ell }\right] \pmod {x^m-\frac{1}{\lambda }}\right) ^t \end{aligned}$$

where \(d_j=\deg \left( g_{j,j}\right) \) for \(1\le j\le \ell \).

Corollary 3

Let \(\mathcal {C}\) be a GQC code over \(\mathbb {F}_q\) of index \(\ell \), block lengths \((m_1,m_2,\ldots ,m_\ell )\), and reduced GPM \(\textbf{G}=[g_{i,j}]\). Let \(\textbf{A}\) denote the matrix satisfying the identical equation of \(\textbf{G}\). Then \(\mathcal {C}^\perp \) is GQC of index \(\ell \), block lengths \((m_1,m_2,\ldots ,m_\ell )\), and a GPM \(\textbf{H}\), where

$$\begin{aligned} \textrm{Column}_j\left( \textbf{H}\right) =\textrm{row}_j \left( \textbf{A}\left( \frac{1}{x}\right) \textrm{diag}\left[ x^{m_j-d_1},\ldots ,x^{m_j-d_\ell }\right] \pmod {x^{m_j}-1}\right) \end{aligned}$$

and \(d_j=\deg \left( g_{j,j}\right) \) for \(1\le j\le \ell \).

4 Right, left, and two-sided Galois duals

In this section, we aim to generalize the result of Sect. 3 by replacing the Euclidean inner product with the Galois inner product. Furthermore, we present the two-sided Galois inner product of MT codes which has not been previously discussed in any study. Throughout this section, \(q=p^e\) where p is a prime and e is a positive integer. Recall that the Frobenius automorphism of \(\mathbb {F}_{q}\), denoted \(\sigma \), is defined by \(\sigma \left( \alpha \right) =\alpha ^p\) for each \(\alpha \in \mathbb {F}_{q}\). The Galois group of \(\mathbb {F}_{q}\) is finite, cyclic, and generated by \(\sigma \). The least positive integer t such that \(\sigma ^t\left( \alpha \right) =\alpha \) for all \(\alpha \in \mathbb {F}_{q}\) is \(t=e\). Thus, the order of \(\sigma \) in the Galois group is e. Then \(\sigma \) extends to a ring automorphism of \(\mathbb {F}_{q}[x]\) by defining it on polynomials over \(\mathbb {F}_{q}\) as follows:

$$\begin{aligned} \sigma \left( a_0+a_1 x +\cdots +a_m x^m\right) = \sigma \left( a_0\right) +\sigma \left( a_1\right) x +\cdots +\sigma \left( a_m\right) x^m. \end{aligned}$$

In a natural way, \(\sigma \) extends to an automorphism of the ring of matrices over \(\mathbb {F}_{q}[x]\). For an \(\ell \times \ell \) matrix \(\textbf{Y}=\left[ y_{i,j}\right] \) over \(\mathbb {F}_{q}[x]\), define

$$\begin{aligned} \sigma \left( \textbf{Y}\right) =\left[ \sigma \left( y_{i,j}\right) \right] . \end{aligned}$$

Let \(0\le \mu < e\) and let \(\upsilon =\textrm{gcd}\left( e,\mu \right) \). Since \(\upsilon \) divides e, \(\mathbb {F}_{q}\) has \(\mathbb {F}_{p^\upsilon }\) as a subfield. The automorphism \(\sigma ^\mu \) of \(\mathbb {F}_{q}\) fixes an element \(\alpha \in \mathbb {F}_{q}\), i.e., \(\sigma ^\mu \left( \alpha \right) =\alpha \), if and only if \(\alpha \in \mathbb {F}_{p^\upsilon }\). In the ring of polynomials \(\mathbb {F}_{q}[x]\), \(\sigma ^\mu \) only fixes all polynomials over \(\mathbb {F}_{p^\upsilon }\). However, in the ring of matrices over \(\mathbb {F}_{q}[x]\), \(\sigma ^\mu \) only fixes all matrices over \(\mathbb {F}_{p^\upsilon }[x]\). Now, we examine the action of \(\sigma ^\mu \) on vectors of \(\mathbb {F}_{q}^n\) as an introduction to study its effect on linear codes over \(\mathbb {F}_{q}\) of length n.

Definition 4

Let e be a positive integer and let \(\sigma \) be the Frobenius automorphism of \(\mathbb {F}_{q}\). For \(0\le \mu < e\), the map \(\sigma ^\mu :\mathbb {F}_{q}^n\rightarrow \mathbb {F}_{q}^n\) is defined by

$$\begin{aligned} \sigma ^\mu : \left( a_1,a_2,\ldots ,a_n\right) \mapsto \left( \sigma ^\mu \left( a_1\right) ,\sigma ^\mu \left( a_2\right) , \ldots ,\sigma ^\mu \left( a_n\right) \right) . \end{aligned}$$

Since \(\sigma ^\mu \left( \textbf{a}+\textbf{b}\right) =\sigma ^\mu \left( \textbf{a}\right) +\sigma ^\mu \left( \textbf{b}\right) \) for any \(\textbf{a},\textbf{b}\in \mathbb {F}_{q}^n\), \(\sigma ^\mu \) defines an additive group automorphism on \(\mathbb {F}_{q}^n\). For a linear code \(\mathcal {C}\) over \(\mathbb {F}_{q}\) of length n, let \(\sigma ^\mu \left( \mathcal {C}\right) =\left\{ \sigma ^\mu \left( \textbf{c}\right) \ \mid \ \textbf{c}\in \mathcal {C}\right\} \). The map \(\sigma ^\mu :\mathcal {C}\rightarrow \sigma ^\mu \left( \mathcal {C}\right) \) is a group isomorphism; it is a group automorphism if and only if \(\sigma ^\mu \left( \mathcal {C}\right) =\mathcal {C}\), i.e., \(\mathcal {C}\) is invariant under \(\sigma ^\mu \). We know that \(\left( a_1,a_2,\ldots ,a_n\right) \in \mathbb {F}_{q}^n\) is fixed under \(\sigma ^\mu \) if and only if \(a_i\in \mathbb {F}_{p^\upsilon }\) for every \(1\le i\le n\), where \(\upsilon =\textrm{gcd}\left( e,\mu \right) \). From the uniqueness of the reduced row echelon form of a generator matrix of a linear code, \(\mathcal {C}\) is invariant under \(\sigma ^\mu \) if and only if \(\mathcal {C}\) has a basis that is a subset of \(\mathbb {F}_{p^\upsilon }^n\). Henceforth, for any \(0\le \mu < e\) and some \(\lambda _1, \lambda _2,\ldots , \lambda _\ell \in \mathbb {F}_{q}\), let

$$\begin{aligned} \sigma ^\mu \left( \Lambda \right) =\left( \sigma ^\mu \left( \lambda _1\right) , \sigma ^\mu \left( \lambda _2\right) ,\ldots ,\sigma ^\mu \left( \lambda _\ell \right) \right) \end{aligned}$$

and

$$\begin{aligned} \sigma ^\mu \left( \Delta \right) =\left( \sigma ^\mu \left( \frac{1}{\lambda _1}\right) , \sigma ^\mu \left( \frac{1}{\lambda _2}\right) ,\ldots ,\sigma ^\mu \left( \frac{1}{\lambda _\ell }\right) \right) . \end{aligned}$$

Theorem 7

Let \(\mathcal {C}\) be a linear code over \(\mathbb {F}_{q}\) of length n and dimension k. For any \(0\le \mu <e\), \(\sigma ^\mu \left( \mathcal {C}\right) \) is a linear code over \(\mathbb {F}_{q}\) of length n and dimension k. Moreover, \(\mathcal {C}\) and \(\sigma ^\mu \left( \mathcal {C}\right) \) are isomorphic as additive groups. Suppose \(\mathcal {C}\) is \(\Lambda \)-MT of block lengths \(\left( m_1,m_2,\ldots ,m_\ell \right) \). Then \(\sigma ^\mu \left( \mathcal {C}\right) \) is \(\sigma ^\mu \left( \Lambda \right) \)-MT of block lengths \(\left( m_1,m_2,\ldots ,m_\ell \right) \). Let \(\textbf{G}\) be the reduced GPM of \(\mathcal {C}\) and \(\textbf{A}\) the matrix that satisfies the identical equation of \(\textbf{G}\). Then the reduced GPM of \(\sigma ^\mu \left( \mathcal {C}\right) \) is \(\sigma ^\mu \left( \textbf{G}\right) \) and \(\sigma ^\mu \left( \textbf{A}\right) \) is the matrix that satisfies the identical equation of \(\sigma ^\mu \left( \textbf{G}\right) \).

Proof

Since \(\sigma ^\mu \left( \mathcal {C}\right) \) is the image of \(\mathcal {C}\) under a group isomorphism, \(\sigma ^\mu \left( \mathcal {C}\right) \) is an abelian group. Also, \(\sigma ^\mu \left( \mathcal {C}\right) \) is linear over \(\mathbb {F}_{q}\) because \(\alpha \sigma ^\mu \left( \textbf{c}\right) =\sigma ^\mu \left( \sigma ^{e-\mu }\left( \alpha \right) \textbf{c}\right) \in \sigma ^\mu \left( \mathcal {C}\right) \) for every \(\alpha \in \mathbb {F}_{q}\) and \(\textbf{c}\in \mathcal {C}\). In addition, \(\sigma ^\mu \left( \mathcal {C}\right) \) has dimension k because \(\mid \mathcal {C}\mid =\mid \sigma ^\mu \left( \mathcal {C}\right) \mid \). Let \(\mathcal {C}\) be \(\Lambda \)-MT, then for any \(\textbf{c}\in \mathcal {C}\), we have

$$\begin{aligned} T_{\sigma ^\mu \left( \Lambda \right) }\left( \sigma ^\mu \left( \textbf{c}\right) \right) =\sigma ^\mu \left( T_{\Lambda }\left( \textbf{c}\right) \right) \in \sigma ^\mu \left( \mathcal {C}\right) . \end{aligned}$$

Thus \(\sigma ^\mu \left( \mathcal {C}\right) \) is \(T_{\sigma ^\mu \left( \Lambda \right) }\)-invariant. Applying \(\sigma ^\mu \) to the matrix Eq. (5) yields

$$\begin{aligned} \sigma ^\mu \left( \textbf{A}\right) \sigma ^\mu \left( \textbf{G}\right) = \sigma ^\mu \left( \textbf{D}\right) =\textrm{diag}\left[ x^{m_1}-\sigma ^\mu \left( \lambda _1\right) ,\ldots ,x^{m_\ell }-\sigma ^\mu \left( \lambda _\ell \right) \right] . \end{aligned}$$
(10)

Therefore, \(\sigma ^\mu \left( \textbf{G}\right) \) is a GPM of a \(\sigma ^\mu \left( \Lambda \right) \)-MT code \(\mathcal {C}'\) over \(\mathbb {F}_{q}\) of block lengths \(\left( m_1,m_2,\ldots ,m_\ell \right) \). Since \(\sigma ^\mu \) preserves the degree of the polynomials, we see that \(\sigma ^\mu \left( \textbf{G}\right) \) is in Hermite normal form and \(\mathcal {C}'\) has dimension k. Furthermore, \(\mathcal {C}'\subseteq \sigma ^\mu \left( \mathcal {C}\right) \) since the rows of \(\sigma ^\mu \left( \textbf{G}\right) \) are codewords in \(\sigma ^\mu \left( \mathcal {C}\right) \). By the standard dimension argument, \(\mathcal {C}' = \sigma ^\mu \left( \mathcal {C}\right) \). Thus \(\sigma ^\mu \left( \textbf{G}\right) \) is the reduced GPM of \(\sigma ^\mu \left( \mathcal {C}\right) \). Specifically, (10) shows that \(\sigma ^\mu \left( \textbf{A}\right) \) is the matrix that satisfies the identical equation of \(\sigma ^\mu \left( \textbf{G}\right) \). \(\square \)

In [9], the Galois inner product is defined as an intrinsic generalization of the Euclidean inner product. Let \(\textbf{a}=\left( a_1,a_2,\ldots ,a_n\right) \) and \(\textbf{b}=\left( b_1,b_2,\ldots ,b_n\right) \) be two vectors in \(\mathbb {F}_{q}^n\). The Euclidean inner product of \(\textbf{a}\) and \(\textbf{b}\), denoted \(\langle \textbf{a},\textbf{b}\rangle \), is a symmetric bilinear form. For a fixed non-negative integer \(\kappa <e\), define the \(\kappa \)-Galois inner product of \(\textbf{a}\) and \(\textbf{b}\) by the formula

$$\begin{aligned} \langle \textbf{a},\textbf{b}\rangle _\kappa =\sum _{i=1}^n a_i \sigma ^\kappa \left( b_i\right) =\sum _{i=1}^n a_i b_i^{p^\kappa }. \end{aligned}$$

Clearly, \(\langle \textbf{a},\textbf{b}\rangle _\kappa \) and \(\langle \textbf{b},\textbf{a}\rangle _\kappa \) are not necessarily equal. For any \(\alpha \in \mathbb {F}_{q}\), \(\langle \alpha \textbf{a},\textbf{b}\rangle _\kappa =\alpha \langle \textbf{a},\textbf{b}\rangle _\kappa \) and \(\langle \textbf{a},\alpha \textbf{b}\rangle _\kappa =\alpha ^{p^\kappa }\langle \textbf{a},\textbf{b}\rangle _\kappa \). Thus, the Galois inner product is neither symmetric nor bilinear. In fact, \(\langle \textbf{a},\textbf{b}\rangle =\langle \textbf{a},\textbf{b}\rangle _0\) for every \(\textbf{a},\textbf{b}\in \mathbb {F}_{q}^n\). For a linear code \(\mathcal {C}\) over \(\mathbb {F}_{q}\) of length n, the Euclidean inner product is used to define the Euclidean dual \(\mathcal {C}^\perp \) of \(\mathcal {C}\). On using the same imitation for the Galois inner product, we have to define two distinct duals: the right \(\kappa \)-Galois dual \(\mathcal {C}^{\perp _\kappa }\) and the \(\kappa \)-left Galois dual \(\mathcal {C}_{\perp _\kappa }\).

Definition 5

Let \(\kappa <e\) be a non-negative integer and let \(\mathcal {C}\) be a linear code over \(\mathbb {F}_{q}\) of length n. Define the right \(\kappa \)-Galois dual of \(\mathcal {C}\) as follows:

$$\begin{aligned} \mathcal {C}^{\perp _\kappa }=\left\{ \textbf{a}\in \mathbb {F}_{q}^n \ \mid \ \langle \textbf{c},\textbf{a} \rangle _\kappa =0 \ \forall \ \textbf{c}\in \mathcal {C}\right\} . \end{aligned}$$

Theorem 8

Let \(\kappa <e\) be a non-negative integer and let \(\mathcal {C}\) be a linear code over \(\mathbb {F}_{q}\) of length n and dimension k. The right \(\kappa \)-Galois dual \(\mathcal {C}^{\perp _\kappa }\) of \(\mathcal {C}\) is a linear code over \(\mathbb {F}_{q}\) of length n and dimension \(n-k\). In fact, \(\mathcal {C}^{\perp _\kappa }=\sigma ^{e-\kappa }\left( \mathcal {C}^\perp \right) = \left( \sigma ^{e-\kappa }\mathcal {C}\right) ^\perp \). Suppose that \(\mathcal {C}\) is \(\Lambda \)-MT of block lengths \(\left( m_1,m_2,\ldots ,m_\ell \right) \). Then \(\mathcal {C}^{\perp _\kappa }\) is \(\sigma ^{e-\kappa }\left( \Delta \right) \)-MT of block lengths \(\left( m_1,m_2,\ldots ,m_\ell \right) \) and has the reduced GPM \(\sigma ^{e-\kappa }\left( \textbf{H}\right) \), where \(\textbf{H}\) is the reduced GPM of \(\mathcal {C}^\perp \).

Proof

Observe that \(\langle \textbf{a},\textbf{b}\rangle _\kappa =\langle \textbf{a},\sigma ^{\kappa }\textbf{b}\rangle \) for any \(\textbf{a},\textbf{b}\in \mathbb {F}_{q}^n\). Thus \(\mathcal {C}^{\perp _\kappa }=\sigma ^{e-\kappa }\left( \mathcal {C}^\perp \right) \). Also observe that \(\langle \sigma ^{e-\kappa }\textbf{a},\textbf{b}\rangle =0\) if and only if \(\langle \textbf{a},\sigma ^{\kappa }\textbf{b}\rangle =0\). Thus \(\sigma ^{e-\kappa }\left( \mathcal {C}^\perp \right) =\left( \sigma ^{e-\kappa }\mathcal {C}\right) ^\perp \). Since \(\sigma ^{e-\kappa }: \mathcal {C}^\perp \rightarrow \mathcal {C}^{\perp _\kappa }\) is a group isomorphism, \(\mathcal {C}^{\perp _\kappa }\) is linear of dimension \(n-k\) by Theorem 7. Now assume that \(\mathcal {C}\) is \(\Lambda \)-MT and recall from Theorem 5 that \(\mathcal {C}^\perp \) is \(\Delta \)-MT. Then by Theorem 7, \(\mathcal {C}^{\perp _\kappa }\) is \(\sigma ^{e-\kappa }\left( \Delta \right) \)-MT with reduced GPM \(\sigma ^{e-\kappa }\left( \textbf{H}\right) \). \(\square \)

Analogously to Definition 5 and Theorem 8, we define and investigate the left \(\kappa \)-Galois dual.

Definition 6

Let \(\kappa <e\) be a non-negative integer and let \(\mathcal {C}\) be a linear code over \(\mathbb {F}_{q}\) of length n. The left \(\kappa \)-Galois dual \(\mathcal {C}_{\perp _\kappa }\) of \(\mathcal {C}\) is defined as the subset of \(\mathbb {F}_{q}^n\) for which \(\left( \mathcal {C}_{\perp _\kappa }\right) ^{\perp _\kappa }=\mathcal {C}\), or in other words,

$$\begin{aligned} \mathcal {C}_{\perp _\kappa }=\left\{ \textbf{a}\in \mathbb {F}_{q}^n \ \mid \ \langle \textbf{a},\textbf{c} \rangle _\kappa =0 \ \forall \ \textbf{c}\in \mathcal {C}\right\} . \end{aligned}$$

Theorem 9

Let \(\kappa <e\) be a non-negative integer and let \(\mathcal {C}\) be a linear code over \(\mathbb {F}_{q}\) of length n and dimension k. The left \(\kappa \)-Galois dual \(\mathcal {C}_{\perp _\kappa }\) of \(\mathcal {C}\) is a linear code over \(\mathbb {F}_{q}\) of length n and dimension \(n-k\). In fact, \(\mathcal {C}_{\perp _\kappa }=\sigma ^{\kappa }\left( \mathcal {C}^\perp \right) = \left( \sigma ^{\kappa }\mathcal {C}\right) ^\perp \). Suppose that \(\mathcal {C}\) is \(\Lambda \)-MT of block lengths \(\left( m_1,m_2,\ldots ,m_\ell \right) \). Then \(\mathcal {C}_{\perp _\kappa }\) is \(\sigma ^\kappa \left( \Delta \right) \)-MT of block lengths \(\left( m_1,m_2,\ldots ,m_\ell \right) \) and has the reduced GPM \(\sigma ^{\kappa }\left( \textbf{H}\right) \), where \(\textbf{H}\) is the reduced GPM of \(\mathcal {C}^\perp \).

Proof

Observe that \(\langle \textbf{a},\textbf{b}\rangle _\kappa =\langle \textbf{a},\sigma ^\kappa \textbf{b}\rangle =\sigma ^\kappa \left( \langle \sigma ^{e-\kappa }\textbf{a},\textbf{b}\rangle \right) \) for any \(\textbf{a},\textbf{b}\in \mathbb {F}_{q}^n\). Thus \(\mathcal {C}_{\perp _\kappa }=\sigma ^{\kappa }\left( \mathcal {C}^\perp \right) =\left( \sigma ^{\kappa }\mathcal {C}\right) ^\perp \). Since \(\sigma ^{\kappa }: \mathcal {C}^\perp \rightarrow \mathcal {C}_{\perp _\kappa }\) is a group isomorphism, \(\mathcal {C}_{\perp _\kappa }\) is linear of dimension \(n-k\) by Theorem 7. The last part can be proven in a way similar to that of Theorem 8. \(\square \)

In the literature and to the extent of our knowledge, left and right Galois duals were not jointly discussed in the same study. For instance, the Galois dual of a linear code is defined in [15] similar to our definition of the right Galois dual. Whereas in [5], the Galois dual is defined similar to our definition of the left Galois dual. We found it useful to include both Galois duals so that we can examine their interrelationships. One of these benefits is the following result.

Theorem 10

Let \(\kappa <e\) be a non-negative integer and let \(\mathcal {C}\) be a linear code over \(\mathbb {F}_{q}\). Then

  1. 1.

    \(\left( \mathcal {C}^{\perp _\kappa }\right) _{\perp _\kappa }=\mathcal {C}\).

  2. 2.

    \(\left( \sigma ^\kappa \mathcal {C}\right) ^{\perp _\kappa }=\mathcal {C}^{\perp }=\sigma ^\kappa \left( \mathcal {C}^{\perp _\kappa }\right) \).

  3. 3.

    \(\left( \sigma ^{e-\kappa } \mathcal {C}\right) _{\perp _\kappa }=\mathcal {C}^{\perp }=\sigma ^{e-\kappa }\left( \mathcal {C}_{\perp _\kappa }\right) \).

  4. 4.

    \(\mathcal {C}^{\perp _\kappa }=\left( \sigma ^{2(e-\kappa )} \mathcal {C}\right) _{\perp _\kappa }=\sigma ^{2(e-\kappa )}\left( \mathcal {C}_{\perp _\kappa }\right) \).

  5. 5.

    \(\mathcal {C}_{\perp _\kappa }=\left( \sigma ^{2\kappa } \mathcal {C}\right) ^{\perp _\kappa }=\sigma ^{2\kappa }\left( \mathcal {C}^{\perp _\kappa }\right) \).

  6. 6.

    \(\mathcal {C}^{\perp _\kappa }=\mathcal {C}_{\perp _{e-\kappa }}\).

  7. 7.

    \(\mathcal {C}^{\perp _\kappa }=\mathcal {C}_{\perp _\kappa }\) if and only if \(\sigma ^{2\kappa }\left( \mathcal {C}\right) =\mathcal {C}\).

Proof

By Theorems 8 and 9, we have

  1. 1.

    \(\left( \mathcal {C}^{\perp _\kappa }\right) _{\perp _\kappa }=\left( \left( \sigma ^{e-\kappa }\mathcal {C}\right) ^\perp \right) _{\perp _\kappa }=\sigma ^{\kappa }\left( \left( \sigma ^{e-\kappa }\mathcal {C}\right) ^{\perp \perp }\right) =\sigma ^{\kappa }\left( \sigma ^{e-\kappa }\mathcal {C}\right) =\mathcal {C}\).

  2. 2.

    \(\left( \sigma ^\kappa \mathcal {C}\right) ^{\perp _\kappa }=\left( \sigma ^{e-\kappa }\left( \sigma ^\kappa \mathcal {C}\right) \right) ^{\perp }=\mathcal {C}^{\perp }\). But, by Theorem 8, \(\mathcal {C}^\perp =\sigma ^{\kappa }\left( \mathcal {C}^{\perp _\kappa }\right) \).

  3. 3.

    \(\left( \sigma ^{e-\kappa } \mathcal {C}\right) _{\perp _\kappa }=\left( \sigma ^\kappa \left( \sigma ^{e-\kappa } \mathcal {C}\right) \right) ^{\perp }=\mathcal {C}^{\perp }\). But, by Theorem 9, \(\mathcal {C}^\perp =\sigma ^{e-\kappa }\left( \mathcal {C}_{\perp _\kappa }\right) \).

  4. 4.

    The result follows by replacing \(\mathcal {C}\) with \(\sigma ^{e-\kappa } \mathcal {C}\) in \(\left( \sigma ^\kappa \mathcal {C}\right) ^{\perp _\kappa }=\left( \sigma ^{e-\kappa } \mathcal {C}\right) _{\perp _\kappa }=\sigma ^{e-\kappa }\left( \mathcal {C}_{\perp _\kappa }\right) \) and using \(\left( \sigma ^{e-\kappa } \mathcal {C}\right) _{\perp _\kappa }=\sigma ^{e-\kappa }\left( \mathcal {C}_{\perp _\kappa }\right) \).

  5. 5.

    The result follows by replacing \(\mathcal {C}\) with \(\sigma ^\kappa \mathcal {C}\) in \(\left( \sigma ^{e-\kappa } \mathcal {C}\right) _{\perp _\kappa }=\left( \sigma ^\kappa \mathcal {C}\right) ^{\perp _\kappa }=\sigma ^\kappa \left( \mathcal {C}^{\perp _\kappa }\right) \) and using \(\left( \sigma ^\kappa \mathcal {C}\right) ^{\perp _\kappa }=\sigma ^\kappa \left( \mathcal {C}^{\perp _\kappa }\right) \).

  6. 6.

    From 2 and 3, \(\mathcal {C}^{\perp _\kappa }=\sigma ^{e-\kappa }\left( \mathcal {C}^{\perp }\right) =\mathcal {C}_{\perp _{e-\kappa }}\).

  7. 7.

    Assume that \(\sigma ^{2\kappa }\left( \mathcal {C}\right) =\mathcal {C}\). Then \(\mathcal {C}_{\perp _\kappa }=\left( \sigma ^{2\kappa } \mathcal {C}\right) ^{\perp _\kappa }=\mathcal {C}^{\perp _\kappa }\). Conversely, assume that \(\mathcal {C}_{\perp _\kappa }=\mathcal {C}^{\perp _\kappa }\). It follows that \(\left( \sigma ^{2\kappa } \mathcal {C}\right) ^{\perp _\kappa }=\mathcal {C}^{\perp _\kappa }\), hence

    $$\begin{aligned}\mathcal {C}=\left( \mathcal {C}^{\perp _\kappa }\right) _{\perp _\kappa }=\left( \left( \sigma ^{2\kappa } \mathcal {C}\right) ^{\perp _\kappa }\right) _{\perp _\kappa }=\sigma ^{2\kappa } \left( \mathcal {C}\right) .\end{aligned}$$

\(\square \)

Throughout Theorems 1116, we will adopt the following notations without introducing them. Let \(\kappa <e\) be a non-negative integer and choose a positive integer \(\tau \) such that \(e\mid 4\kappa \tau \). Let \(\lambda _j\in \mathbb {F}_{p^\upsilon }\) for \(1\le j\le \ell \), where \(\upsilon =\textrm{gcd}\left( e,2\kappa \tau \right) \). Let \(\mathcal {C}\) be a \(\Lambda \)-MT code over \(\mathbb {F}_{q}\) of block lengths \(\left( m_1,m_2,\ldots ,m_\ell \right) \). The reduced GPM of \(\mathcal {C}\) is \(\textbf{G}\), while \(\textbf{A}\) is the matrix that satisfies the identical equation of \(\textbf{G}\). The reduced GPM of \(\mathcal {C}^\perp \) is \(\textbf{H}\), while \(\textbf{B}\) is the matrix that satisfies the identical equation of \(\textbf{H}\). Our first goal is to provide some results for the codes \(\mathcal {C}^{\perp _\kappa }\) and \(\sigma ^{2\kappa \tau }\left( \mathcal {C}^{\perp _\kappa }\right) \).

Theorem 11

Both \(\mathcal {C}^{\perp _\kappa }\) and \(\sigma ^{2\kappa \tau }\left( \mathcal {C}^{\perp _\kappa }\right) \) are \(\sigma ^{e-\kappa }\left( \Delta \right) \)-MT codes over \(\mathbb {F}_{q}\) of block lengths \(\left( m_1,m_2,\ldots ,m_\ell \right) \).

Proof

Since \(\sigma ^{2\kappa \tau }:\mathcal {C}^{\perp _\kappa }\rightarrow \sigma ^{2\kappa \tau }\left( \mathcal {C}^{\perp _\kappa }\right) \) is a group isomorphism, Theorems 7 and 8 assert that \(\sigma ^{2\kappa \tau }\left( \mathcal {C}^{\perp _\kappa }\right) \) is a \(\sigma ^{2\kappa \tau }\left( \sigma ^{e-\kappa }\left( \Delta \right) \right) \)-MT code. In fact, \(\sigma ^{2\kappa \tau }\left( \sigma ^{e-\kappa }\left( \Delta \right) \right) =\sigma ^{e-\kappa }\left( \Delta \right) \) because \(\sigma ^{e-\kappa }\left( \Delta \right) \in \mathbb {F}_{p^\upsilon }^\ell \) and \(\sigma ^{2\kappa \tau }\) fixes all elements of \(\mathbb {F}_{p^\upsilon }\). \(\square \)

Theorem 12

The reduced GPM of \(\mathcal {C}^{\perp _\kappa }\) is \(\sigma ^{e-\kappa }\left( \textbf{H}\right) \), while the reduced GPM of \(\sigma ^{2\kappa \tau }\left( \mathcal {C}^{\perp _\kappa }\right) \) is \(\sigma ^{\kappa (2\tau -1)}\left( \textbf{H}\right) \).

Proof

This is evident from Theorem 7 after noticing that \(\mathcal {C}^{\perp _\kappa }=\sigma ^{e-\kappa }\left( \mathcal {C}^\perp \right) \) and \(\sigma ^{2\kappa \tau }\left( \mathcal {C}^{\perp _\kappa }\right) = \sigma ^{2\kappa \tau }\left( \sigma ^{e-\kappa }\left( \mathcal {C}^\perp \right) \right) =\sigma ^{\kappa (2\tau -1)}\left( \mathcal {C}^\perp \right) \). \(\square \)

There is another result to be obtained from Theorem 12 by applying \(\sigma ^{e-\kappa }\) and \(\sigma ^{\kappa (2\tau -1)}\) to the identical equation of \(\textbf{H}\). Namely, \(\sigma ^{e-\kappa }\left( \textbf{B}\right) \) and \(\sigma ^{\kappa (2\tau -1)}\left( \textbf{B}\right) \) are the two matrices that satisfy the identical equations of \(\sigma ^{e-\kappa }\left( \textbf{H}\right) \) and \(\sigma ^{\kappa (2\tau -1)}\left( \textbf{H}\right) \) respectively.

Theorem 13

The following conditions are equivalent.

  1. 1.

    \(\mathcal {C}^{\perp _\kappa }=\sigma ^{2\kappa \tau }\left( \mathcal {C}^{\perp _\kappa }\right) \).

  2. 2.

    \(\sigma ^{2\kappa \tau }\left( \mathcal {C}\right) =\mathcal {C}\).

  3. 3.

    \(\textbf{G}\) is a matrix over \(\mathbb {F}_{p^\upsilon }[x]\).

Proof

Applying Theorem 10(2) recursively yields \(\sigma ^{2\kappa \tau }\left( \mathcal {C}^{\perp _\kappa }\right) = \left( \sigma ^{2\kappa \tau }\mathcal {C}\right) ^{\perp _\kappa }\). Assume that \(\mathcal {C}^{\perp _\kappa }=\sigma ^{2\kappa \tau }\left( \mathcal {C}^{\perp _\kappa }\right) \). Then

$$\begin{aligned} \mathcal {C}=\left( \mathcal {C}^{\perp _\kappa }\right) _{\perp _\kappa }= \left( \sigma ^{2\kappa \tau }\left( \mathcal {C}^{\perp _\kappa }\right) \right) _{\perp _\kappa } =\left( \left( \sigma ^{2\kappa \tau }\mathcal {C}\right) ^{\perp _\kappa }\right) _{\perp _\kappa } =\sigma ^{2\kappa \tau }\left( \mathcal {C}\right) . \end{aligned}$$

Conversely, assume that \(\sigma ^{2\kappa \tau }\left( \mathcal {C}\right) =\mathcal {C}\). Then \(\mathcal {C}^{\perp _\kappa }=\left( \sigma ^{2\kappa \tau }\mathcal {C} \right) ^{\perp _\kappa }=\sigma ^{2\kappa \tau }\left( \mathcal {C}^{\perp _\kappa }\right) \).

By Theorem 7, \(\sigma ^{2\kappa \tau }\left( \textbf{G}\right) \) is the reduced GPM of \(\sigma ^{2\kappa \tau }\left( \mathcal {C}\right) \). By the uniqueness of the reduced GPM, \(\mathcal {C}=\sigma ^{2\kappa \tau }\left( \mathcal {C}\right) \) if and only if \(\sigma ^{2\kappa \tau }\left( \textbf{G}\right) =\textbf{G}\). Writing \(\textbf{G}=\left[ g_{i,j}\right] \) where \(g_{i,j}\in \mathbb {F}_{q}[x]\) for \(1\le i,j\le \ell \), then \(\sigma ^{2\kappa \tau }\left( \textbf{G}\right) =\textbf{G}\) if and only if \(\sigma ^{2\kappa \tau }\) fixes \(g_{i,j}\) for all ij. That is, \(\mathcal {C}=\sigma ^{2\kappa \tau }\left( \mathcal {C}\right) \) if and only if \(g_{i,j}\in \mathbb {F}_{p^\upsilon }[x]\) for all ij. \(\square \)

Theorem 14

The code \(\mathcal {C}^{\perp _\kappa } \cap \sigma ^{2\kappa \tau }\left( \mathcal {C}^{\perp _\kappa }\right) \) is \(\sigma ^{e-\kappa }\left( \Delta \right) \)-MT of block lengths \(\left( m_1,m_2,\ldots ,m_\ell \right) \) and is invariant under \(\sigma ^{2\kappa \tau }\).

Proof

The first result is immediate from Theorem 11. Note that \(\sigma ^{4\kappa \tau }\) acts as the identity on \(\mathbb {F}_{q}^n\) because \(e\mid 4\kappa \tau \). Hence,

$$\begin{aligned} \sigma ^{2\kappa \tau }\left( \mathcal {C}^{\perp _\kappa } \cap \sigma ^{2\kappa \tau }\left( \mathcal {C}^{\perp _\kappa }\right) \right) \subseteq \mathcal {C}^{\perp _\kappa } \cap \sigma ^{2\kappa \tau }\left( \mathcal {C}^{\perp _\kappa }\right) . \end{aligned}$$

This inequality turns into equality because \(\sigma ^{2\kappa \tau }\) is a group isomorphism. Hence, \(\mathcal {C}^{\perp _\kappa } \cap \sigma ^{2\kappa \tau }\left( \mathcal {C}^{\perp _\kappa }\right) \) is \(\sigma ^{2\kappa \tau }\)-invariant. \(\square \)

Theorem 15

Let \(\mathcal {S}\) be a \(\sigma ^{e-\kappa }\left( \Delta \right) \)-MT subcode of \(\mathcal {C}^{\perp _\kappa } \cap \sigma ^{2\kappa \tau }\left( \mathcal {C}^{\perp _\kappa }\right) \). Then \(\mathcal {S}\) is \(\sigma ^{2\kappa \tau }\)-invariant if and only if there exist upper triangular matrices \(\textbf{X}\) and \(\textbf{Y}\) over \(\mathbb {F}_{p^\upsilon }[x]\) and \(\mathbb {F}_{q}[x]\), respectively, such that

  1. 1.

    \(\textbf{Y}\sigma ^{e-\kappa }\left( \textbf{H}\right) \) is a GPM of \(\mathcal {S}\),

  2. 2.

    \(\textbf{Y}\sigma ^{e-\kappa }\left( \textbf{H}\right) \) is a matrix over \(\mathbb {F}_{p^\upsilon }[x]\), and

  3. 3.

    \(\textbf{X}\textbf{Y}=\sigma ^{e-\kappa }\left( \textbf{B}\right) \).

In this case, \(\mathcal {S}\) has dimension \(\deg \left( \textrm{det}\left( \textbf{X} \right) \right) \).

Proof

Assume that \(\mathcal {S}\) is invariant under \(\sigma ^{2\kappa \tau }\). Let \(\textbf{P}\) be the reduced GPM of \(\mathcal {S}\) and let \(\textbf{X}\) be the matrix that satisfies the identical equation of \(\textbf{P}\). By Theorems 2 and 12, there exists an upper triangular matrix \(\textbf{Y}\) such that \(\textbf{P}=\textbf{Y}\sigma ^{e-\kappa }\left( \textbf{H}\right) \) because \(\mathcal {S}\subseteq \mathcal {C}^{\perp _\kappa }\). Since \(\mathcal {S}\) is \(\sigma ^{2\kappa \tau }\)-invariant, \(\sigma ^{2\kappa \tau }\) fixes \(\textbf{P}\). Thus \(\textbf{P}\) is over \(\mathbb {F}_{p^\upsilon }[x]\), then so is \(\textbf{X}\) because \(\lambda _j\in \mathbb {F}_{p^\upsilon }\) for \(1\le j\le \ell \). But \(\textbf{X}\textbf{Y}\sigma ^{e-\kappa }\left( \textbf{H}\right) =\textbf{X}\textbf{P}=\sigma ^{e-\kappa }\left( \textbf{B}\right) \sigma ^{e-\kappa }\left( \textbf{H}\right) \), then \(\textbf{X}\textbf{Y}=\sigma ^{e-\kappa }\left( \textbf{B}\right) \). The dimension of \(\mathcal {S}\) is immediate from Theorem 4.

Conversely, suppose that \(\mathcal {S}\) has a GPM \(\textbf{Y}\sigma ^{e-\kappa }\left( \textbf{H}\right) \) over \(\mathbb {F}_{p^\upsilon }[x]\). We know that \(\sigma ^{2\kappa \tau }\) fixes all matrices over \(\mathbb {F}_{p^\upsilon }[x]\). Then \(\textbf{Y}\sigma ^{e-\kappa }\left( \textbf{H}\right) \) is a GPM for \(\sigma ^{2\kappa \tau }\left( \mathcal {S}\right) \). That is, \(\sigma ^{2\kappa \tau }\left( \mathcal {S}\right) =\mathcal {S}\). \(\square \)

In Theorem 16, we continue to use the general setting used above; however, the main result of this section will be an immediate consequence of it. Specifically, setting \(\tau =1\) yields a result that fits the two-sided Galois dual of a MT code. This is described in Corollary 4.

Theorem 16

Let \(\textbf{X}\) and \(\textbf{Y}\) be upper triangular matrices over \(\mathbb {F}_{p^\upsilon }[x]\) and \(\mathbb {F}_{q}[x]\), respectively, such that

  1. 1.

    \(\textbf{Y}\sigma ^{e-\kappa }\left( \textbf{H}\right) \) is a matrix over \(\mathbb {F}_{p^\upsilon }[x]\),

  2. 2.

    \(\textbf{X}\textbf{Y}=\sigma ^{e-\kappa }\left( \textbf{B}\right) \), and

  3. 3.

    \(\deg \left( \textrm{det}\left( \textbf{X}\right) \right) \) is maximum among all matrices that satisfy these conditions, or equivalently, \(\deg \left( \textrm{det}\left( \textbf{Y}\right) \right) \) is minimum among all matrices that satisfy these conditions.

Then \(\mathcal {C}^{\perp _\kappa } \cap \sigma ^{2\kappa \tau }\left( \mathcal {C}^{\perp _\kappa }\right) \) has a GPM \(\textbf{Y}\sigma ^{e-\kappa }\left( \textbf{H}\right) \) and dimension \(\deg \left( \textrm{det}\left( \textbf{X}\right) \right) \). Furthermore, \(\textbf{X}\) is the matrix that satisfies the identical equation of \(\textbf{Y}\sigma ^{e-\kappa }\left( \textbf{H}\right) \).

Proof

Theorem 15 and the maximality of \(\deg \left( \textrm{det}\left( \textbf{X}\right) \right) \) allow us to conclude that \(\textbf{Y}\sigma ^{e-\kappa }\left( \textbf{H}\right) \) is a GPM for the largest \(\sigma ^{2\kappa \tau }\)-invariant \(\sigma ^{e-\kappa }\left( \Delta \right) \)-MT subcode of \(\mathcal {C}^{\perp _\kappa } \cap \sigma ^{2\kappa \tau }\left( \mathcal {C}^{\perp _\kappa }\right) \). Certainly, this is \(\mathcal {C}^{\perp _\kappa } \cap \sigma ^{2\kappa \tau }\left( \mathcal {C}^{\perp _\kappa }\right) \) by Theorem 14. \(\square \)

Let \(\mathcal {C}\) be a linear code. We define the two-sided Galois dual of \(\mathcal {C}\) to be the intersection of its right and left Galois duals. Since \(\mathcal {C}\) is linear, its two-sided Galois dual is linear because both \(\mathcal {C}^{\perp _\kappa }\) and \(\mathcal {C}_{\perp _\kappa }\) are linear. But if \(\mathcal {C}\) is MT, then the two-sided Galois dual is not necessarily MT. Specifically, if \(\mathcal {C}\) is \(\Lambda \)-MT, then \(\mathcal {C}^{\perp _\kappa }\) is \(\sigma ^{e-\kappa }\left( \Delta \right) \)-MT and \(\mathcal {C}_{\perp _\kappa }\) is \(\sigma ^{\kappa }\left( \Delta \right) \)-MT. A sufficient condition to ensure that the two-sided Galois dual is MT is \(\sigma ^{e-\kappa }\left( \Delta \right) =\sigma ^{\kappa }\left( \Delta \right) \), or equivalently, \(\lambda _j\in \mathbb {F}_{p^\upsilon }\) for \(1\le j\le \ell \), where \(\upsilon =\textrm{gcd}\left( e,2\kappa \right) \). Motivated by this condition, we start with the following definition for the two-sided Galois dual of a MT code.

Definition 7

Let e be a positive integer and let \(\kappa <e\) be a non-negative integer. Choose \(\lambda _j\in \mathbb {F}_{p^\upsilon }\) for \(1\le j\le \ell \), where \(\upsilon =\textrm{gcd}\left( e,2\kappa \right) \). Let \(\mathcal {C}\) be a \(\Lambda \)-MT code over \(\mathbb {F}_{q}\). Define the two-sided \(\kappa \)-Galois dual of \(\mathcal {C}\) by \(\mathcal {C}^{\perp _\kappa }\cap \mathcal {C}_{\perp _\kappa }\).

The condition \(\lambda _j\in \mathbb {F}_{p^\upsilon }\) for all \(1\le j\le \ell \) in Definition 7 ensures that \(\mathcal {C}^{\perp _\kappa }\cap \mathcal {C}_{\perp _\kappa }\) is \(\sigma ^\kappa \Delta \)-MT. This condition was previously used in Theorems 1116 if \(\tau =1\) is chosen. Furthermore, in case \(\tau =1\), Theorem 10 shows that \(\sigma ^{2\kappa \tau }\left( \mathcal {C}^{\perp _\kappa }\right) \) can be replaced by \(\mathcal {C}_{\perp _\kappa }\). Therefore, Theorems 1116 have proved the following result describing the two-sided Galois dual of a MT code.

Corollary 4

Let e be a positive integer and let \(\kappa <e\) be a non-negative integer such that \(e\mid 4\kappa \). Define \(\upsilon =\textrm{gcd}\left( e,2\kappa \right) \) and let \(\mathcal {C}\) be a \(\left( \lambda _1,\lambda _2,\ldots ,\lambda _\ell \right) \)-MT code over \(\mathbb {F}_{q}\), where \(\lambda _j\in \mathbb {F}_{p^\upsilon }\) for \(1\le j\le \ell \). Let \(\textbf{G}\) be the reduced GPM of \(\mathcal {C}\), let \(\textbf{H}\) be the reduced GPM of \(\mathcal {C}^\perp \), and let \(\textbf{B}\) be the matrix that satisfies the identical equation of \(\textbf{H}\). Then

  1. 1.

    \(\mathcal {C}^{\perp _\kappa }=\mathcal {C}_{\perp _\kappa }\) if and only if \(\sigma ^{2\kappa }\left( \mathcal {C}\right) =\mathcal {C}\) if and only if \(\textbf{G}\) is a matrix over \(\mathbb {F}_{p^\upsilon }[x]\).

  2. 2.

    Let \(\textbf{X}\) and \(\textbf{Y}\) be upper triangular matrices over \(\mathbb {F}_{p^\upsilon }[x]\) and \(\mathbb {F}_{q}[x]\), respectively, such that

    1. (a)

      \(\textbf{Y}\sigma ^{e-\kappa }\left( \textbf{H}\right) \) is a matrix over \(\mathbb {F}_{p^\upsilon }[x]\),

    2. (b)

      \(\textbf{X}\textbf{Y}=\sigma ^{e-\kappa }\left( \textbf{B}\right) \), and

    3. (c)

      \(\deg \left( \textrm{det}\left( \textbf{X}\right) \right) \) is maximum among all matrices that satisfy these conditions, or equivalently, \(\deg \left( \textrm{det}\left( \textbf{Y}\right) \right) \) is minimum among all matrices that satisfy these conditions.

    Then \(\mathcal {C}^{\perp _\kappa } \cap \mathcal {C}_{\perp _\kappa }\) has a GPM \(\textbf{Y}\sigma ^{e-\kappa }\left( \textbf{H}\right) \) and dimension \(\deg \left( \textrm{det}\left( \textbf{X}\right) \right) \). Furthermore, \(\textbf{X}\) is the matrix that satisfies the identical equation of \(\textbf{Y}\sigma ^{e-\kappa }\left( \textbf{H}\right) \).

Remark 1

  1. (1)

    In Corollary 4, we observed that \(\mathcal {C}^{\perp _\kappa }=\mathcal {C}_{\perp _\kappa }\) if and only if \(\textbf{G}\) is a matrix over \(\mathbb {F}_{p^\upsilon }[x]\). From Definition 3, this is the case if and only if \(\textbf{H}\) is over \(\mathbb {F}_{p^\upsilon }[x]\), hence will be \(\sigma ^{e-\kappa }\left( \textbf{H}\right) \) and \(\sigma ^{e-\kappa }\left( \textbf{B}\right) \) as well. In this case, the conditions given in Corollary 4 are satisfied by \(\textbf{X}=\sigma ^{e-\kappa }\left( \textbf{B}\right) \) and \(\textbf{Y}=\textbf{I}_\ell \). More precisely, \(\mathcal {C}^{\perp _\kappa }=\mathcal {C}_{\perp _\kappa }\) if and only if the conditions given in Corollary 4 are satisfied by an invertible \(\textbf{Y}\). On the other hand, the case of an invertible \(\textbf{X}\) is examined in Corollary 5.

  2. (2)

    There is a pair \(\left( \textbf{X},\textbf{Y}\right) \) that satisfies the conditions of Corollary 4. To see this, consider the set \(S=\left\{ \left( \textbf{X}_i,\textbf{Y}_i\right) \right\} _{i\in \mathcal {I}}\) of all pairs that satisfy the first two conditions of Corollary 4. Clearly \(\left( \textbf{I}_\ell ,\sigma ^{e-\kappa }\left( \textbf{B}\right) \right) \in S\). Thus S is not empty. Moreover, S is totally ordered by \(\deg \left( \textrm{det}\left( \textbf{X}_i\right) \right) \). Since \(0\le \deg \left( \textrm{det}\left( \textbf{X}_i\right) \right) \le \deg \left( \textrm{det}\left( \textbf{B}\right) \right) \) for every \(i\in \mathcal {I}\), there is a maximal element \(\left( \textbf{X},\textbf{Y}\right) \in S\).

  3. (3)

    It is not straightforward to determine matrices \(\textbf{X}\) and \(\textbf{Y}\) that satisfy the conditions given in Corollary 4. This is because these matrices have entries in different rings, \(\mathbb {F}_{p^\upsilon }[x]\) and \(\mathbb {F}_{q}[x]\). We propose an auxiliary equation that may be useful in determining such matrices. If \(\alpha \in \mathbb {F}_{q}\), the trace of \(\alpha \), written \(\textrm{Tr}\left( \alpha \right) \), is defined by

    $$\begin{aligned} \textrm{Tr}\left( \alpha \right) =\alpha +\sigma ^\upsilon \left( \alpha \right) + \sigma ^{2\upsilon }\left( \alpha \right) +\cdots +\sigma ^{e-\upsilon }\left( \alpha \right) \in \mathbb {F}_{p^\upsilon }. \end{aligned}$$

    For any \(a,b\in \mathbb {F}_{p^\upsilon }\) and \(\alpha ,\beta \in \mathbb {F}_{q}\), we have \(\textrm{Tr}\left( a \alpha +b \beta \right) =a \textrm{Tr}(\alpha )+ b \textrm{Tr}(\beta )\). We can extend \(\textrm{Tr}\) to an additive group homomorphism from \(\mathbb {F}_{q}[x]\) to \(\mathbb {F}_{p^\upsilon }[x]\) by defining

    $$\begin{aligned} \textrm{Tr}\left( a_0+a_1 x +\cdots +a_m x^m\right) = \textrm{Tr}(a_0)+\textrm{Tr}(a_1) x +\cdots +\textrm{Tr}(a_m) x^m. \end{aligned}$$

    Similarly, for matrices over \(\mathbb {F}_{q}[x]\), \(\textrm{Tr}\) defines a group homomorphism. If \(\textbf{Y}=\left[ y_{i,j}\right] \) is a matrix over \(\mathbb {F}_{q}[x]\), we define \(\textrm{Tr}\left( \textbf{Y}\right) =\left[ \textrm{Tr}\left( y_{i,j}\right) \right] \). Definitely, \(\textrm{Tr}\left( \textbf{Y}\right) \) is a matrix over \(\mathbb {F}_{p^\upsilon }[x]\).

    Suppose \(\textbf{X}\) and \(\textbf{Y}\) as defined in Corollary 4. For any \(0\le i\le (e-\upsilon )/\upsilon \), the automorphism \(\sigma ^{i \upsilon }\) fixes \(\textbf{X}\) in the ring of matrices over \(\mathbb {F}_{q}[x]\). Therefore,

    $$\begin{aligned} \textbf{X}\sigma ^{i\upsilon }\left( \textbf{Y}\right) =\sigma ^{i\upsilon }\left( \sigma ^{e-\kappa }\left( \textbf{B}\right) \right) \quad \text {for } i=0,1,\ldots , \frac{e-\upsilon }{\upsilon }. \end{aligned}$$
    (11)

    By summing (11) over all values of i, we get the auxiliary equation

    $$\begin{aligned} \textbf{X}\textrm{Tr}\left( \textbf{Y}\right) =\textrm{Tr}\left( \sigma ^{e-\kappa }\left( \textbf{B}\right) \right) . \end{aligned}$$
    (12)

    All matrices in (12) are over \(\mathbb {F}_{p^\upsilon }[x]\). In Example 3 below, we will indicate how to use (12) to determine matrices that satisfy the conditions given in Corollary 4.

  4. (4)

    Some extra conditions must be taken into account when one aims to make \(\textbf{Y}\sigma ^{e-\kappa }\left( \textbf{H}\right) \) the reduced GPM of \(\mathcal {C}^{\perp _\kappa }\cap \mathcal {C}_{\perp _\kappa }\). In this situation, \(\textbf{X}=\left[ x_{i,j}\right] \) is the matrix that satisfies the identical equation of the reduced GPM. Then for each \(1\le i\le \ell \), \(x_{i,i}\) is a nonzero monic polynomial and \(\deg {x_{i,j}}<\deg {x_{i,i}}\) for all \(j>i\).

It is worthwhile to present a complete example illustrating the process of determining the reduced GPM of the right Galois dual, the left Galois dual, and the two-sided Galois dual of a MT code.

Example 3

Let \(\theta \) be a root of the irreducible polynomial \(x^4+x+1 \in \mathbb {F}_2[x]\). We represent \(\mathbb {F}_{16}\) as the set \(\left\{ a+b\theta +c\theta ^2+d\theta ^3\mid a,b,c,d \in \mathbb {F}_2 \right\} \). Consider the \(\left( 1,\theta ^{10},\theta ^{10}\right) \)-MT code \(\mathcal {C}\) over \(\mathbb {F}_{16}\) of block lengths \(\left( 3,4,4\right) \) whose reduced GPM is

$$\begin{aligned} \textbf{G}=\begin{pmatrix} \theta ^5+\theta ^{10}x+x^2 \ {} &{}\ 0 \ {} &{}\ \theta ^2+\theta ^7x+ \theta ^{12} x^2+\theta ^2 x^3 \\ 0\ {} &{}\ 1\ {} &{}\ 1+\theta x+\theta ^{5} x^2+\theta ^2 x^3\\ 0\ {} &{}\ 0\ {} &{}\ \theta ^{10}+x^4\\ \end{pmatrix}. \end{aligned}$$

The matrix that satisfies the identical equation of \(\textbf{G}\) is

$$\begin{aligned} \textbf{A}=\begin{pmatrix} \theta ^{10}+x\ {} &{}\ 0\ {} &{}\ \theta ^2\\ 0\ {} &{}\ \theta ^{10}+x^4\ {} &{}\ 1+\theta x+\theta ^5 x^2+\theta ^2 x^3\\ 0\ {} &{}\ 0\ {} &{}\ 1\\ \end{pmatrix}. \end{aligned}$$

The dimension of \(\mathcal {C}\) is \(k=5\) and its minimum distance is \(d_{\textrm{min}}=5\), that is, [11, 5, 5] over \(\mathbb {F}_{16}\). It follows from Theorem 5 that \(\mathcal {C}^\perp \) is \(\left( 1,\theta ^5,\theta ^5\right) \)-MT of block lengths \(\left( 3,4,4 \right) \) and dimension 6. Theorem 6 provides a GPM for \(\mathcal {C}^\perp \) whose Hermite normal form is

$$\begin{aligned} \textbf{H}=\begin{pmatrix} 1\ {} &{}\ \theta ^9\ {} &{}\ \theta ^9+x+\theta x^2 +\theta ^9 x^3\\ 0\ {} &{}\ \theta ^5+x\ {} &{}\ \theta ^{12} x +\theta ^4 x^2+\theta ^{13} x^3\\ 0\ {} &{}\ 0\ {} &{}\ \theta ^5+x^4\\ \end{pmatrix}. \end{aligned}$$

The matrix that satisfies the identical equation of \(\textbf{H}\) is

$$\begin{aligned} \textbf{B}=\begin{pmatrix} 1+x^3\ {} &{}\ \theta ^4+\theta ^{14} x+\theta ^9 x^2\ {} &{}\ \theta ^4+\theta ^{14} x+\theta ^9 x^2\\ 0\ {} &{}\ 1+\theta ^{10} x+\theta ^5 x^2+x^3\ {} &{}\ \theta ^{7} x +\theta ^{13} x^2\\ 0\ {} &{}\ 0\ {} &{}\ 1\\ \end{pmatrix}. \end{aligned}$$

We consider the 3-Galois inner product on \(\mathbb {F}_{16}^{11}\). Observe that \(\lambda _1=1\) and \(\lambda _2=\lambda _3=\theta ^{10}\) are elements of \(\mathbb {F}_{p^\upsilon }=\mathbb {F}_4=\{0,1,\theta ^5,\theta ^{10}\}\), where \(\upsilon =\textrm{gcd}\left( e,2\kappa \right) =2\). Theorem 8 ensures that \(\mathcal {C}^{\perp _3}\) is \(\left( 1,\theta ^{10},\theta ^{10} \right) \)-MT of block lengths \(\left( 3,4,4 \right) \) and dimension 6. Moreover, the reduced GPM of \(\mathcal {C}^{\perp _3}\) is

$$\begin{aligned} \sigma ^{e-3}\left( \textbf{H}\right) =\sigma \left( \textbf{H}\right) =\begin{pmatrix} 1\ {} &{}\ \theta ^3\ {} &{}\ \theta ^3+x+\theta ^2 x^2 +\theta ^3 x^3\\ 0\ {} &{}\ \theta ^{10}+x\ {} &{}\ \theta ^9 x +\theta ^8 x^2+\theta ^{11} x^3\\ 0\ {} &{}\ 0\ {} &{}\ \theta ^{10}+x^4\\ \end{pmatrix}, \end{aligned}$$

and the matrix that satisfies its identical equation is

$$\begin{aligned} \sigma ^{e-3}\left( \textbf{B}\right) =\sigma \left( \textbf{B}\right) =\begin{pmatrix} 1+x^3\ {} &{}\ \theta ^8+\theta ^{13} x+\theta ^3 x^2\ {} &{}\ \theta ^8+\theta ^{13} x+\theta ^3 x^2\\ 0\ {} &{}\ 1+\theta ^5 x+\theta ^{10} x^2+x^3\ {} &{}\ \theta ^{14} x +\theta ^{11} x^2\\ 0\ {} &{}\ 0\ {} &{}\ 1\\ \end{pmatrix}. \end{aligned}$$

However, Theorem 9 ensures that \(\mathcal {C}_{\perp _3}\) is \(\left( 1,\theta ^{10},\theta ^{10} \right) \)-MT of block lengths \(\left( 3,4,4 \right) \) and dimension 6. Moreover, the reduced GPM of \(\mathcal {C}_{\perp _3}\) is

$$\begin{aligned} \sigma ^{3}\left( \textbf{H}\right) =\begin{pmatrix} 1\ {} &{}\ \theta ^{12}\ {} &{}\ \theta ^{12}+x+\theta ^8 x^2 +\theta ^{12} x^3\\ 0\ {} &{}\ \theta ^{10}+x\ {} &{}\ \theta ^{6} x +\theta ^2 x^2+\theta ^{14} x^3\\ 0\ {} &{}\ 0\ {} &{}\ \theta ^{10}+x^4\\ \end{pmatrix}, \end{aligned}$$

and the matrix that satisfies its identical equation is

$$\begin{aligned} \sigma ^{3}\left( \textbf{B}\right) =\begin{pmatrix} 1+x^3\ {} &{}\ \theta ^2+\theta ^{7} x+\theta ^{12} x^2\ {} &{}\ \theta ^2+\theta ^{7} x+\theta ^{12} x^2\\ 0\ {} &{}\ 1+\theta ^{5} x+\theta ^{10} x^2+x^3\ {} &{}\ \theta ^{11} x +\theta ^{14} x^2\\ 0\ {} &{}\ 0\ {} &{}\ 1\\ \end{pmatrix}. \end{aligned}$$

It remains to compute the reduced GPM of the two-sided 3-Galois dual of \(\mathcal {C}\) with the aid of Corollary 4. Since not all entries of \(\textbf{G}\) are elements of \(\mathbb {F}_{4}[x]\), we conclude that \(\mathcal {C}^{\perp _3}\ne \mathcal {C}_{\perp _3}\). Suppose \(\textbf{X}=\left[ x_{i,j}\right] \) and \(\textbf{Y}=\left[ y_{i,j}\right] \) are upper triangular matrices that satisfy the conditions given in Corollary 4. That is, \(\textrm{det}\left( \textbf{X}\right) \) has the maximum possible degree, the product \(\textbf{Y}\sigma \left( \textbf{H}\right) \) yields a matrix over \(\mathbb {F}_4[x]\), and

$$\begin{aligned} \begin{aligned} \textbf{X}\textbf{Y}&=\begin{pmatrix} x_{11}\ {} &{}\ x_{12} \ {} &{}\ x_{13}\\ 0\ {} &{}\ x_{22} \ {} &{}\ x_{23}\\ 0\ {} &{}\ 0\ {} &{}\ x_{33}\\ \end{pmatrix} \begin{pmatrix} y_{11}\ {} &{}\ y_{12} \ {} &{}\ y_{13}\\ 0\ {} &{}\ y_{22} \ {} &{}\ y_{23}\\ 0\ {} &{}\ 0\ {} &{}\ y_{33}\\ \end{pmatrix} \\&=\sigma \left( \textbf{B}\right) =\begin{pmatrix} 1+x^3\ {} &{}\ \theta ^3 (1+x)(\theta ^5 +x)\ {} &{}\ \theta ^3 (1+x)(\theta ^5 +x)\\ 0\ {} &{}\ (\theta ^{10} +x)^3\ {} &{}\ \theta ^{11} x(\theta ^3+x)\\ 0\ {} &{}\ 0\ {} &{}\ 1\\ \end{pmatrix} \end{aligned} \end{aligned}$$
(13)

where \(x_{i,j}\in \mathbb {F}_{4}[x]\) and \(y_{i,j}\in \mathbb {F}_{16}[x]\) for \(1\le i,j \le 3\). In addition, by using the trace map \(\textrm{Tr}:\alpha \mapsto \alpha +\alpha ^{4}\) for any \(\alpha \in \mathbb {F}_{16}\), we utilize the auxiliary equation (12):

$$\begin{aligned} \begin{aligned} \textbf{X}\textrm{Tr}\left( \textbf{Y}\right)&=\begin{pmatrix} x_{11}\ {} &{}\ x_{12} \ {} &{}\ x_{13}\\ 0\ {} &{}\ x_{22} \ {} &{}\ x_{23}\\ 0\ {} &{}\ 0\ {} &{}\ x_{33}\\ \end{pmatrix} \begin{pmatrix} \textrm{Tr}\left( y_{11}\right) \ {} &{}\ \textrm{Tr}\left( y_{12}\right) \ {} &{}\ \textrm{Tr}\left( y_{13}\right) \\ 0\ {} &{}\ \textrm{Tr}\left( y_{22}\right) \ {} &{}\ \textrm{Tr}\left( y_{23}\right) \\ 0\ {} &{}\ 0\ {} &{}\ \textrm{Tr}\left( y_{33}\right) \\ \end{pmatrix}\\&=\textrm{Tr}\left( \sigma ^{e-\kappa }\left( \textbf{B}\right) \right) =\begin{pmatrix} 0\ {} &{}\ \theta ^{10}(1+x)(\theta ^{5} +x)\ {} &{}\ \theta ^{10}(1+x)(\theta ^{5} +x)\\ 0\ {} &{}\ 0\ {} &{}\ \theta ^{10} x (1+x)\\ 0\ {} &{}\ 0\ {} &{}\ 0\\ \end{pmatrix}. \end{aligned} \end{aligned}$$
(14)

From (14), \(\textrm{Tr}\left( y_{11}\right) =\textrm{Tr}\left( y_{22}\right) =\textrm{Tr}\left( y_{33}\right) =0\) since \(x_{11},x_{22},x_{33}\ne 0\). From (13), \(x_{33}=y_{33}=1\). Observe that \(x_{22}\) divides \((\theta ^{10}+x)^3\) by (13) and divides \(\theta ^{10}x(1+x)\) by (14), and thus \(x_{22}=1\). Since \(\textbf{Y}\sigma \left( \textbf{H}\right) \) is assumed to be in the reduced form, \(\deg {x_{23}}<\deg {x_{22}}=0\) and hence \(x_{23}=0\). From (13), \(y_{22}=(\theta ^{10}+x)^3\) and \(y_{23}=\theta ^{11} x(\theta ^3+x)\). In the same way, observe that \(x_{11}\) divides \(1+x^3=(1+x)(\theta ^5+x)(\theta ^{10}+x)\) by (13) and divides \(\theta ^{10}(1+x)(\theta ^{5} +x)\) by (14). Thus, the maximum possible degree of \(x_{11}\) is obtained by taking \(x_{11}=(1+x)(\theta ^{5} +x)\), and then \(y_{11}=\theta ^{10}+x\). From (13),

$$\begin{aligned} (1+x)(\theta ^{5} +x)y_{12}+(\theta ^{10}+x)^3 x_{12}=\theta ^3 (1+x)(\theta ^{5} +x). \end{aligned}$$

Then \((1+x)(\theta ^{5} +x)\) divides \(x_{12}\). Thus, \(x_{12}= 0\) and \(y_{12}=\theta ^3\) since otherwise \(\deg {x_{12}}\ge 2=\deg {x_{11}}\). Again from (13),

$$\begin{aligned} (1+x)(\theta ^{5} +x)y_{13}+ x_{13}=\theta ^3 (1+x)(\theta ^5 +x). \end{aligned}$$

Then \((1+x)(\theta ^{5} +x)\) divides \(x_{13}\). Thus, \(x_{13}=0\) and \(y_{13}=\theta ^3\) since otherwise \(\deg {x_{13}}\ge 2=\deg {x_{11}}\). It is easy to check that this solution makes the entries of \(\textbf{Y}\sigma \left( \textbf{H}\right) \) elements of \(\mathbb {F}_4[x]\). So far, the conditions given in Corollary 4 have been satisfied for

$$\begin{aligned} \textbf{X}=\begin{pmatrix} (1+x)(\theta ^{5} +x)\ {} &{}\ 0 \ {} &{}\ 0\\ 0\ {} &{}\ 1 \ {} &{}\ 0\\ 0\ {} &{}\ 0\ {} &{}\ 1\\ \end{pmatrix}\ \text { and }\ \textbf{Y}= \begin{pmatrix} \theta ^{10}+x\ {} &{}\ \theta ^3 \ {} &{}\ \theta ^3\\ 0\ {} &{}\ (\theta ^{10}+x)^3 \ {} &{}\ \theta ^{11} x(\theta ^3+x)\\ 0\ {} &{}\ 0\ {} &{}\ 1\\ \end{pmatrix}. \end{aligned}$$

Therefore, the reduced GPM of the two-sided 3-Galois dual of \(\mathcal {C}\) is

$$\begin{aligned} \begin{aligned} \textbf{Y}\sigma \left( \textbf{H}\right)&= \begin{pmatrix} \theta ^{10}+x &{} \theta ^3 &{} \theta ^3\\ 0 &{} (\theta ^{10}+x)^3 &{} \theta ^{11} x(\theta ^3+x)\\ 0 &{} 0 &{} 1\\ \end{pmatrix}\begin{pmatrix} 1 &{} \theta ^3 &{} \theta ^3+x+\theta ^2 x^2 +\theta ^3 x^3\\ 0 &{} \theta ^{10}+x &{} \theta ^9 x +\theta ^8 x^2+\theta ^{11} x^3\\ 0 &{} 0 &{} \theta ^{10}+x^4\\ \end{pmatrix}\\&=\begin{pmatrix} \theta ^{10}+x\ {} &{}\ 0\ {} &{}\ 0\\ 0\ {} &{}\ \theta ^{10}+x^4\ {} &{}\ 0\\ 0\ {} &{}\ 0\ {} &{}\ \theta ^{10}+x^4\\ \end{pmatrix}. \end{aligned} \end{aligned}$$

The dimension of \(\mathcal {C}^{\perp _3}\cap \mathcal {C}_{\perp _3}\) is \(\deg \left( \textrm{det}\left( \textbf{X}\right) \right) =2\). The diagonalizability of the reduced GPM of \(\mathcal {C}^{\perp _3}\cap \mathcal {C}_{\perp _3}\) indicates that \(\mathcal {C}^{\perp _3}\cap \mathcal {C}_{\perp _3}\) is the direct sum of constacyclic codes. More precisely, \(\mathcal {C}^{\perp _3}\cap \mathcal {C}_{\perp _3}=\mathcal {C}_1\oplus \textbf{0}\oplus \textbf{0}\), where \(\mathcal {C}_1\) is the cyclic code of length 3 over \(\mathbb {F}_{16}\) with generator polynomial \(\theta ^{10}+x\) and \(\textbf{0}\) is the zero code of length 4.

We conclude this section with an application of Corollary 4 concerning when the right and the left Galois duals trivially intersect. Obviously, \(\mathcal {C}^{\perp _\kappa }\cap \mathcal {C}_{\perp _\kappa }=\{\textbf{0}\}\) if and only if the first two conditions of Corollary 4 can only be satisfied by an invertible \(\textbf{X}\), hence zero is the maximum of \(\deg \left( \textrm{det}\left( \textbf{X}\right) \right) \). We remark that these two conditions are always satisfied by an invertible \(\textbf{X}\), for instance \(\textbf{X}=\textbf{I}_\ell \) and \(\textbf{Y}=\sigma ^{e-\kappa }\left( \textbf{B}\right) \). However, if these two conditions are never satisfied except for an invertible \(\textbf{X}\), then \(\mathcal {C}^{\perp _\kappa }\cap \mathcal {C}_{\perp _\kappa }=\{\textbf{0}\}\). The following is a particular case that requires the code dimension to be half the code length.

Corollary 5

Let e be a positive integer and let \(\kappa <e\) be a non-negative integer such that \(e\mid 4\kappa \). Define \(\upsilon =\textrm{gcd}\left( e,2\kappa \right) \) and let \(\mathcal {C}\) be a \(\left( \lambda _1,\lambda _2,\ldots ,\lambda _\ell \right) \)-MT code over \(\mathbb {F}_{q}\) of length n and dimension n/2, where \(\lambda _j\in \mathbb {F}_{p^\upsilon }\) for \(1\le j\le \ell \). Let \(\textbf{H}\) be the reduced GPM of \(\mathcal {C}^\perp \) and let \(\textbf{B}\) be the matrix that satisfies the identical equation of \(\textbf{H}\). Let \(\textbf{X}\) and \(\textbf{Y}\) be upper triangular matrices over \(\mathbb {F}_{p^\upsilon }[x]\) and \(\mathbb {F}_{q}[x]\), respectively, such that

  1. 1.

    \(\textbf{Y}\sigma ^{e-\kappa }\left( \textbf{H}\right) \) is a matrix over \(\mathbb {F}_{p^\upsilon }[x]\), and

  2. 2.

    \(\textbf{X}\textbf{Y}=\sigma ^{e-\kappa }\left( \textbf{B}\right) \).

Then \(\mathbb {F}_{q}^n=\mathcal {C}^{\perp _\kappa }\oplus \mathcal {C}_{\perp _\kappa }\) if and only if the above conditions can only be satisfied by an invertible \(\textbf{X}\).

Proof

From Corollary 4, there exist \(\textbf{X}\) and \(\textbf{Y}\) such that \(\deg {\left( \textrm{det}\left( \textbf{X}\right) \right) }\) is the dimension of \(\mathcal {C}^{\perp _\kappa }\cap \mathcal {C}_{\perp _\kappa }\). If the given conditions can only be satisfied by an invertible \(\textbf{X}\), then \(\mathcal {C}^{\perp _\kappa }\cap \mathcal {C}_{\perp _\kappa }\) has dimension zero. Therefore, \(\mathcal {C}^{\perp _\kappa }\cap \mathcal {C}_{\perp _\kappa }=\{\textbf{0}\}\) and \(\mathbb {F}_{q}^n=\mathcal {C}^{\perp _\kappa }\oplus \mathcal {C}_{\perp _\kappa }\) because both \(\mathcal {C}^{\perp _\kappa }\) and \(\mathcal {C}_{\perp _\kappa }\) have dimension n/2.

Conversely, suppose that \(\textbf{X}\) and \(\textbf{Y}\) satisfy the given conditions. From Theorem 15, there exists a subcode \(\mathcal {S}\) of \(\mathcal {C}^{\perp _\kappa }\cap \mathcal {C}_{\perp _\kappa }\) such that \(\mathcal {S}\) has dimension \(\deg \left( \textrm{det}\left( \textbf{X} \right) \right) \). Assume that \(\mathbb {F}_{q}^n=\mathcal {C}^{\perp _\kappa }\oplus \mathcal {C}_{\perp _\kappa }\). Then \(\mathcal {S}\subseteq \mathcal {C}^{\perp _\kappa }\cap \mathcal {C}_{\perp _\kappa }=\{\textbf{0}\}\), and hence \(\deg {\left( \textrm{det}\left( \textbf{X}\right) \right) }=0\). That is, \(\textbf{X}\) is invertible. \(\square \)

Example 4

Consider \(p=3\) and \(e=4\). We can identify the elements of \(\mathbb {F}_{81}\) with polynomials of the form \(a_0+a_1 \theta +a_2 \theta ^2+a_3 \theta ^3\), where \(a_i\in \mathbb {F}_3\) for \(0\le i\le 3\) and \(\theta \) is a root of the irreducible polynomial \(x^4+x+2\in \mathbb {F}_3[x]\). Let \(\mathcal {C}\) be the \(\left( \theta ^{50},\theta ^{20}\right) \)-MT code over \(\mathbb {F}_{81}\) of block lengths (4, 8) and reduced GPM

$$\begin{aligned} \textbf{G}=\begin{pmatrix} 1 \ {} &{}\ 2+\theta ^5 x^2+ \theta ^{10} x^4 \\ 0\ {} &{}\ \theta ^{55}+\theta ^{10} x^2+\theta ^{45} x^4+ x^6\\ \end{pmatrix}. \end{aligned}$$

We found that \(\mathcal {C}\) has parameters [12, 6, 2] over \(\mathbb {F}_{81}\). The matrix that satisfies the identical equation of \(\textbf{G}\) is

$$\begin{aligned} \textbf{A}=\begin{pmatrix} x^4-\theta ^{50} \ {} &{}\ \theta ^{25}+2 x^2 \\ 0\ {} &{}\ \theta ^{5}+ x^2\\ \end{pmatrix}, \end{aligned}$$

from which we conclude that \(\mathcal {C}\) has a dimension equal to half the code length. By Theorems 5 and 6, the Euclidean dual \(\mathcal {C}^\perp \) of \(\mathcal {C}\) is \(\left( \theta ^{30},\theta ^{60} \right) \)-MT with a GPM whose reduced form is

$$\begin{aligned} \textbf{H}=\begin{pmatrix} \theta ^{15}+x^2 \ {} &{}\ \theta ^{75}+ x^2 \\ 0\ {} &{}\ \theta ^{50}+ \theta ^5 x^2 +x^4\\ \end{pmatrix}, \end{aligned}$$

and the matrix that satisfies the identical equation of \(\textbf{H}\) is

$$\begin{aligned} \textbf{B}=\begin{pmatrix} \theta ^{55}+x^2 \ {} &{}\ 2 \\ 0\ {} &{}\ \theta ^{50}+ \theta ^{45} x^2 +x^4\\ \end{pmatrix}. \end{aligned}$$

Take \(\kappa =1\) and notice that \(\lambda _1, \lambda _2\in \mathbb {F}_{3^\upsilon }=\mathbb {F}_{9}\), where \(\upsilon =\textrm{gcd}\left( e,2\kappa \right) =2\). In fact, \(\mathbb {F}_{9}=\left\{ 0,1,\theta ^{10},\theta ^{20},\theta ^{30}, \theta ^{40},\theta ^{50},\theta ^{60},\theta ^{70}\right\} \). Suppose that \(\textbf{X}\) and \(\textbf{Y}\) satisfy the conditions given in Corollary 5. We show that \(\textbf{X}\) is invertible. With this hypothesis, the matrix obtained from

$$\begin{aligned} \textbf{Y}\sigma ^3\left( \textbf{H}\right) = \begin{pmatrix} y_{11}\ {} &{}\ y_{12}\\ 0\ {} &{}\ y_{22} \\ \end{pmatrix}\begin{pmatrix} \theta ^{5}+x^2 \ {} &{}\ \theta ^{25}+ x^2 \\ 0\ {} &{}\ (\theta ^{25}+ x^2)(\theta ^{45}+ x^2)\\ \end{pmatrix} \end{aligned}$$
(15)

has entries in \(\mathbb {F}_9[x]\) and

$$\begin{aligned} \textbf{X}\textbf{Y}=\begin{pmatrix} x_{11}\, &{}\, x_{12}\\ 0\ {} &{}\ x_{22}\\ \end{pmatrix} \begin{pmatrix} y_{11}\, &{}\, y_{12}\\ 0\, &{}\, y_{22}\\ \end{pmatrix} =\begin{pmatrix} \theta ^{45}+x^2 \, &{}\, 2 \\ 0\, &{}\, (\theta ^{5}+ x^2)(\theta ^{65}+ x^2)\\ \end{pmatrix}. \end{aligned}$$
(16)

From (15), \(\left( \theta ^{45}+x^2\right) \) divides \(y_{11}\) and \((\theta ^{5}+ x^2)(\theta ^{65}+ x^2)\) divides \(y_{11}\) because it is required to make \(y_{11}\left( \theta ^{5}+x^2\right) \) and \(y_{22}\left( \theta ^{25}+ x^2\right) \left( \theta ^{45}+ x^2\right) \) elements in \(\mathbb {F}_{9}[x]\). It follows from (16) that \(x_{11}=x_{22}=1\) and, hence, \(\textbf{X}\) is invertible. By Corollary 5, \(\mathbb {F}_{81}^{12}\) can be written as the direct sum of the right and left 1-Galois duals of \(\mathcal {C}\), that is, \(\mathbb {F}_{81}^{12}=\mathcal {C}^{\perp _1}\oplus \mathcal {C}_{\perp _1}\).