1 Introduction

Cyclic codes over finite rings have been much studied in recent years, particularly after the significant result obtained in [1], where certain interesting nonlinear binary codes were constructed through a Gray map from \(\mathbb {Z}_{4}\) to \(\mathbb {F}_{2}^{2}\). The Gray map employed in [1] is an isometry from Lee weight over \(\mathbb {Z}_{4}\) to Hamming weight over \(\mathbb {F}_{2}^{2}\), which helped to explain the apparent duality of the nonlinear binary codes. Since then several recent papers dealt with codes over finite commutative rings. The case of noncommutative rings have been studied in different contexts by very few authors (see [2, 4, 5, 7,8,9]). Recently the ring \(M_{2}(\mathbb {F}_{2})\) was studied in the context of space time codes [7]. Subsequently, in [4] the theory of cyclic codes over \(M_{2}(\mathbb {F}_{2})\) was developed. One got a characterization of cyclic codes and their duals as right ideals in terms of two generators and the existence of infinitely many nontrivial cyclic codes for the Euclidean product. But these codes were derived in the case of odd length. Thus, a natural question is the generalization to even length.

In this paper, we will focus on cyclic codes of odd length over the ring \(A=M_{2}(\mathbb {F}_{2}+u\mathbb {F}_{2})\), where u 2 = 0, which enables us to construct even length codes over \(M_{2}(\mathbb {F}_{2})\) using a Gray map. An important fact is that the ring A is not a finite chain or commutative ring. We will define a Gray map ϕ from \(M_{2}(\mathbb {F}_{2}+u\mathbb {F}_{2})\) to \({M_{2}^{2}}(\mathbb {F}_{2})\) which preserves the Bachoc weight [2]. Thus, images of cyclic codes of odd length over A under ϕ are binary quasi-cyclic codes of even length over \(M_{2}(\mathbb {F}_{2})\). This is one of the questions introduced in [4].

In Section 2, we will start with a short description of the ring \(M_{2}(\mathbb {F}_{2}+u\mathbb {F}_{2})\) and show that \(M_{2}(\mathbb {F}_{2}+u\mathbb {F}_{2})\cong \mathbb {F}_{4}+v\mathbb {F}_{4}+u\mathbb {F}_{4}+uv\mathbb {F}_{4}\),where v 2 = 0 and u v = v u. Hence, the ring \(M_{2}(\mathbb {F}_{2}+u\mathbb {F}_{2})\) has the similar structure of \(\mathbb {F}_{2}+u\mathbb {F}_{2}+v\mathbb {F}_{2}+uv\mathbb {F}_{2}\) which was introduced in [6], So, refer to that work, we will define a Gray map from \(M_{2}(\mathbb {F}_{2}+u\mathbb {F}_{2})\) to \(\mathbb {F}_{4}^{4}\) and extend the definition of Lee weight in [3].

In Section 3, the structure of cyclic codes of odd length over \(M_{2}(\mathbb {F}_{2}+u\mathbb {F}_{2})\) will be obtained. In Section 4, the Bachoc weight will be introduced over \(M_{2}(\mathbb {F}_{2}+u\mathbb {F}_{2})\). We will define a right \(\mathbb {F}_{2}\)-module isometry from \(M_{2}(\mathbb {F}_{2}+u\mathbb {F}_{2})\) to \(\mathbb {F}_{4}+v\mathbb {F}_{4}+u\mathbb {F}_{4}+uv\mathbb {F}_{4}\) using their respective Bachoc weight and Lee weight. This ideal for the isometry map comes from [5] in which an isometric map from \(M_{2}(\mathbb {F}_{2})\) to \(\mathbb {F}_{4}^{2}\) was defined. In Section 5, we will give some examples of cyclic codes of length 3 and 5 over \(M_{2}(\mathbb {F}_{2}+u\mathbb {F}_{2})\) , and show their images under the Gray maps ϕ are optimal quaternary quasi-cyclic codes of length 12 and 20 over \(\mathbb {F}_{4}\), respectively.

2 Linear codes over \(M_{2}(\mathbb {F}_{2}+u\mathbb {F}_{2})\)

Let \(A=M_{2}(\mathbb {F}_{2}+u\mathbb {F}_{2})\), where u 2 = 0. Then A is a non-commutative ring of matrices of order 2 over the ring \(\mathbb {F}_{2}+u\mathbb {F}_{2}\). Clearly \(A=M_{2}(\mathbb {F}_{2})+uM_{2}(\mathbb {F}_{2})\simeq M_{2}(\mathbb {F}_{2})[u]/\langle u^{2}\rangle \). Here we present some preliminaries that are required to introduce linear and cyclic codes over A. Following [2], \(M_{2}(\mathbb {F}_{2})=\mathbb {F}_{2}[\zeta ]+i\mathbb {F}_{2}[\zeta ]\), where ζ and i are elements in A satisfying the relation i ζ = ζ 2 i. A possible choice of ζ and i given by Bachoc [2] are \(i=\left (\begin {array}{cc} 0 & 1 \\ 1 & 0 \end {array} \right )\) and \(\zeta =\left (\begin {array}{cc} 0 & 1 \\ 1 & 1 \end {array} \right )\). Setting v = 1 + i and identifying the subring \(\mathbb {F}_{2}[\zeta ]\) with \(\mathbb {F}_{4}\) follows that \(M_{2}(\mathbb {F}_{2})=\mathbb {F}_{4}+v\mathbb {F}_{4}\). This implies that

$$A=\mathbb{F}_{4}+v\mathbb{F}_{4}+u\mathbb{F}_{4}+uv\mathbb{F}_{4},$$

where v 2 = u 2 = 0 and u v = v u.

We recall, in the case of \(\mathbb {F}_{2}+u\mathbb {F}_{2}\), Lee weight was defined in [3] as w L (0) = 0, w L (1) = w L (1 + u) = 1, w L (u) = 2, and accordingly a Gray map from \((\mathbb {F}_{2}+u\mathbb {F}_{2})^{n}\) to \(\mathbb {F}_{2}^{2n}\) was defined by sending a + u b to (b, a + b) with \(a,b\in \mathbb {F}_{2}^{n}\). We will adopt a similar technique here to define the Gray map from A to \(\mathbb {F}_{4}^{4}\). It follows:

$$\begin{array}{@{}rcl@{}} \theta :A\to \mathbb{F}_{4}^{4}, a+bu+cv+duv\to (d,c+d,b+d,a+b+c+d), \end{array} $$

where a, b, c, d are in \(\mathbb {F}_{4}\). For any e = a + b u + c v + d u v in A, we extend the definition of the Lee weight as

$$w_{L}(e)= w_{H}(d)+w_{H}(d+c)+w_{H}(d+b)+w_{H}(d+c+b+a), $$

where w H (−) denotes Hamming weight of the element − of \(\mathbb {F}_{4}\).

Definition 1

(1) A linear code \(\mathcal {C}\) of length n over the ring A is an A-submodule of A n.

(2) Let c = (c 0, c 1,⋯ , c n− 1) be a vector of A n. Then Lee weight of c is defined as

$$w_{L}(c)=w_{L}(c_{0})+w_{L}(c_{1})+\cdots+w_{L}(c_{n-1}).$$

(3) Let \(\mathcal {C}\) be a linear code over A. Then Lee distance of \(\mathcal {C}\) is defined as

$$d_{L}(\mathcal{C})=\min\{w_{L}(c)=\sum\limits_{i = 0}^{n-1}w_{L}(c_{i})|c=(c_{0},c_{1},\cdots,c_{n-1})\in \mathcal{C}\}.$$

Extending the map 𝜃 to vectors, by definition of Lee distance, we have the following theorem.

Theorem 1

If \(\mathcal {C}\) is a linear code over A of length n , size M and Lee distance d . Then \(\theta (\mathcal {C})\) is a code over \(\mathbb {F}_{4}\) of length 4n , size M and Hamming distance d .

3 Cyclic codes over \(M_{2}(\mathbb {F}_{2}+u\mathbb {F}_{2})\)

Let A[x] be the ring of polynomials over A. We have a natural homomorphic mapping from A to the field \(\mathbb {F}_{4}\). For any eA, let \(\tilde {e}\) denote the polynomial reduction modulo u and v. Now we define a polynomial reduction mapping \(\mu : A[x]\to \mathbb {F}_{4}[x]\) such that

$$f(x)=\sum\limits_{i = 0}^{n-1}e_{i}x^{j}\to \sum\limits_{i = 0}^{n-1}\tilde{e_{i}}x^{j}.$$

A monic polynomial f over A[x] is said to be a basic irreducible polynomial if its projection μ(f) is irreducible over \(\mathbb {F}_{4}[x]\). As right modules we have the Chinese Remainder Theorem as follows. In the sequel, we will drop interrminate x for polynomials when the context is clear.

Proposition 1

Let n be an odd number. Then

$$\frac{A[x]}{\langle x-1\rangle}=\oplus_{j = 1}^{t}\frac{A[x]}{\langle f_{j}\rangle}$$

where\(x^{n}-1={\prod }_{j = 1}^{t}f_{j}\) and f j ’s are irreducible polynomials over \(\mathbb {F}_{4}\).

Proof

The proof follows by a natural application of Chinese Remainder theorem to the right module \(\frac {A[x]}{\langle x-1\rangle }\) using the method similar to that given in [7] □

We shall prove the results below using the same techniques in [2] with the condition n being an odd number.

Proposition 2

If f is an irreducible polynomial over \(\mathbb {F}_{4}\) , then the only right A-modules of \(R_{f}=\frac {A[x]}{\langle f\rangle }\) have two types

  1. I:

    〈0〉,〈1〉,〈u〉,〈v〉,〈u〉 + 〈v 〉,〈 u v.

  2. II:

    u + v h α where h α is a unit in \(\frac {\mathbb {F}_{4}[x]}{\langle f\rangle _{\mathbb {F}_{4}[x]}}\) .

Proof

Let I be a nonzero ideal of R f and let 0 ≠ gA[x] with g + 〈f〉∈ I and g∉〈f〉. Then there exist \(g_{1},g_{2},g_{3},g_{4}\in \mathbb {F}_{4}[x]\) such that g = g 1 + u g 2 + v g 3 + u v g 4. Consider the polynomial g 1(x), we obtain that

$$\gcd(g_{1}(x),f(x))=f(x)\text{ or }1. $$

If gcd(g 1(x), f(x)) = 1 for some g 1(x) ∈ A[x], then there exists \(g_{1}^{\prime }\in \mathbb {F}_{4}[x]\) such that g 1 g1′ + 〈f(x)〉 = 1 + 〈f(x)〉. Let \(g^{\prime }=g_{1}^{\prime }-u((g_{1}^{\prime })^{2}g_{2}-v((g_{1}^{\prime })^{2}g_{3}-vu(g_{4}(g_{1}^{\prime })^{2}+ 2(g_{1}^{\prime })^{3}g_{2}g_{3})\). Then we have g g + 〈f(x)〉 = 1 + 〈f(x)〉. This means that I = R f . Now assume that gcd(g 1(x), f(x)) = f(x) for any element g + 〈f(x)〉∈ I, then g + 〈f(x)〉 = u g 2 + v g 3 + u v g 4 + 〈f(x)〉.

If gcd(g 2(x), f(x)) = f(x), then g + 〈f(x)〉 = v g 3(x) + u v g 4(x). It follows that I = 〈v〉 or I = 〈u v〉.

If gcd(g 2(x), f(x)) = 1 exists, arguing as in the proof of g 1(x), one deduces that there is a \(g_{2}^{-1}\in \mathbb {F}_{4}[x]\) such that \(g_{2}g_{2}^{-1}= 1\). This implies that \(uv=g\cdot vg_{2}^{-1}\in I\). It follows that u g 2 + v g 3 = gu v g 4I.

If gcd(g 3(x), f(x)) = f(x), then uI. This means that I = 〈u〉.

If gcd(g 3(x), f(x)) = 1, then u + v h α I where \(h_{\alpha }=g_{2}^{-1}g_{3}\) is a unit of \(\mathbb {F}_{4}[x]\). Now one obtains two cases as follows:

Case A: 〈u + v h α 〉 = I.

Case B: \(\langle u+vh_{\alpha }\rangle \lvertneqq I\). Then there exists u + v h β I where \(h_{\beta }\in \mathbb {F}_{4}[x]\), but it is not in 〈u + v h α 〉. This implies that v(h α h β ) ∈ I. Since h α h β ∉〈f(x)〉, vI. Thus, we obtain that I = 〈u〉 + 〈v〉. □

Let h be a factor of x n − 1 in \(\mathbb {F}_{4}[x]\). We denote by \(\hat {h}=\frac {x^{n}-1}{g}\).

Proposition 3

Let x n − 1 = f 1 f 2f t where f i (1 ≤ it) are irreducible pairwise-coprime polynomials in \(\mathbb {F}_{4}[x]\) . Then any ideal in \(\frac {A[x]}{\langle x^{n}-1\rangle }\) is a sum of ideals of the form \(\langle \hat {f}_{i}+\langle x^{n}-1\rangle \rangle ,\langle u\hat {f}_{i}+\langle x^{n}-1\rangle \rangle ,\langle (u+vh_{\alpha })\hat {f}_{i}+\langle x^{n}-1\rangle \rangle \) for1 ≤ it . where h α is a unit of \(\frac {\mathbb {F}_{4}[x]}{{\langle x^{n}-1\rangle }}\) .

Proof

By the Chinese Remainder Theorem, we have

$$\frac{A[x]}{\langle x^{n}-1\rangle}=\frac{A[x]}{\bigcap_{i = 1}^{m}\langle f_{i}\rangle}=\bigoplus\limits_{i = 1}^{m}\frac{A[x]}{\langle f_{i}\rangle}.$$

Thus, any ideal of is of the form ⊕ I i , where I i is an ideal of \(\frac {A[x]}{\langle f_{i}\rangle }\). By Proposition 2, for 1 ≤ it, we have

$$I_{i}\in \{\langle 1+\langle f_{i}\rangle\rangle, \langle u+\langle f_{i}\rangle\rangle, \langle v+\langle f_{i}\rangle\rangle, \langle u+vh_{\alpha}+\langle f_{i}\rangle\rangle\}.$$

Then I i correspond to the form \(\langle \hat {f}_{i}+\langle x^{n}-1\rangle \rangle ,\langle u\hat {f}_{i}+\langle x^{n}-1\rangle \rangle ,\langle (u+vh_{\alpha })\hat {f}_{i}+\langle x^{n}-1\rangle \rangle \) in \(\frac {A[x]}{\langle x^{n}-1\rangle }\). Consequently, I is sum of ideals of the forms \(\langle \hat {f}_{i}+\langle x^{n}-1\rangle \rangle ,\langle u\hat {f}_{i}+\langle x^{n}-1\rangle \rangle ,\langle (u+vh_{\alpha })\hat {f}_{i}+\langle x^{n}-1\rangle \rangle \), where 1 ≤ it. □

From now on, in order to simplify notation, we will just write a 0 + a 1 x + a 2 x 2 + ⋯ + a n− 1 x n− 1 for the corresponding coset a 0 + a 1 x + a 2 x 2 + ⋯ + a n− 1 x n− 1 + 〈x n − 1〉 in \(\frac {A[x]}{\langle x^{n}-1\rangle }\). Next, we give the main result in this section.

Theorem 2

Let \(\mathcal {C}\) be a cyclic code of odd length n over A. Then there exists a unit h α in \(\frac {\mathbb {F}_{4}[x]}{{\langle x^{n}-1\rangle }}\) and a family pairwise coprime monic polynomials F 0, F 1,⋯ , F 6 in \(\mathbb {F}_{4}[x]\) such that F 0 F 1F 6 = x n − 1and \(\mathcal {C}=\langle \hat {F}_{1}\rangle \oplus \langle u\hat {F}_{2}\rangle \oplus \langle v\hat {F}_{3}\rangle \oplus \langle uv\hat {F}_{4}\rangle \oplus \langle (u+vh_{\alpha })\hat {F_{5}}\rangle \oplus (\langle u\hat {F}_{6}\rangle +\langle v\hat {F}_{6}\rangle )\) .

Proof

Let x n − 1 = f 1 f 2f m be a factorization of x n − 1 into a product of monic basic irreducible pairwise coprime polynomials. By Proposition 3, \(\mathcal {C}\) is a sum of ideals of the form \(\langle \hat {f}_{i}+\langle x^{n}-1\rangle \rangle ,\langle u\hat {f}_{i}+\langle x^{n}-1\rangle \rangle ,\langle (u+vh_{\alpha })\hat {f}_{i}+\langle x^{n}-1\rangle \rangle \), where 1 ≤ it. After reordering if necessary, we can assume that

$$\begin{array}{@{}rcl@{}} \mathcal{C}&=&\langle \hat{f}_{k_{1}+ 1}\rangle\oplus\cdots\oplus\langle \hat{f}_{k_{1}+k_{2}}\rangle\\ &&\oplus\, \langle u\hat{f}_{k_{1}+k_{2}+ 1}\rangle\oplus\cdots\oplus\langle u\hat{f}_{k_{1}+k_{2}+k_{3}}\rangle\\ &&\oplus\,\langle v\hat{f}_{k_{1}+k_{2}+k_{3}+ 1}\rangle\oplus\cdots\oplus\langle v\hat{f}_{k_{1}+\cdots+k_{4}}\rangle\\ &&\oplus\,\langle uv\hat{f}_{k_{1}+\cdots+k_{4}+ 1}\rangle\oplus\cdots\oplus \langle uv\hat{f}_{k_{1}+\cdots+k_{5}}\rangle\\ &&\oplus\, \langle (u+vh_{\alpha})\hat{f}_{k_{1}+\cdots+k_{5}+ 1}\rangle \oplus\cdots\oplus \langle (u+vh_{\alpha})\hat{f}_{k_{1}+\cdots+k_{6}}\rangle\\ &&\oplus\,(\langle u\hat{f}_{k_{1}+\cdots+k_{6}+ 1}\rangle+\langle v\hat{f}_{k_{1}+\cdots+k_{6}+ 1}\rangle)\oplus\cdots\oplus(\langle u\hat{f}_{m}\rangle+\langle v\hat{f}_{m}\rangle), \end{array} $$

where k 1,⋯ , k 6 ≥ 0 and k 1 + ⋯ + k 6 + 1 ≤ t.

Let k 0 = 0 and k 7 be nonnegative integers such that k 1 + ⋯ + k 7 = t. Next, we define

$$\begin{array}{@{}rcl@{}} \begin{aligned} &F_{0}=f_{k_{0}+ 1}{\cdots} f_{k_{0}+k_{1}},&F_{1}=f_{k_{0}+k_{1}+ 1}{\cdots} f_{k_{0}+k_{1}+k_{2}},\\ &F_{2}=f_{k_{0}+k_{1}+k_{2}+ 1}{\cdots} f_{k_{0}+k_{1}+k_{2}+k_{3}},&F_{3}=f_{k_{0}+\cdots+k_{3}+ 1}{\cdots} f_{k_{0}+\cdots+k_{4}},\\ &F_{4}=f_{k_{0}+\cdots+k_{4}+ 1}{\cdots} f_{k_{0}+\cdots+k_{5}},&F_{5}=f_{k_{0}+\cdots+k_{5}+ 1}{\cdots} f_{k_{0}+\cdots+k_{6}},\\ &F_{6}=f_{k_{0}+\cdots+k_{6}+ 1}{\cdots} f_{t}. \end{aligned} \end{array} $$

Then, by our construction, it is clear that F 0, F 1,⋯ , F 6 are pairwise coprime, F 0 F 1F 6 = x n − 1 , and

$$\begin{array}{@{}rcl@{}} \mathcal{C}&=&\langle \hat{F}_{1}\rangle\oplus \langle u\hat{F}_{2}\rangle\oplus \langle v\hat{F}_{3}\rangle\oplus\langle uv\hat{F}_{4}\rangle\oplus\langle (u+vh_{\alpha})\hat{F}_{5}\rangle\\ &&\oplus\, (\langle u\hat{F}_{6}\rangle+\langle v\hat{F}_{6}\rangle). \end{array} $$

Let \(R=\frac {\mathbb {F}_{4}[x]}{\langle x^{n}-1\rangle _{\mathbb {F}_{4}[x]}}\) with \(\langle x^{n}-1\rangle _{\mathbb {F}_{4}[x]}\) being the ideal of \(\mathbb {F}_{4}[x]\) generated by x n − 1.

Proposition 4

Let \(\mathcal {C}\) be a cyclic code of odd length n over A. Then there exist polynomials F, G, H, K, Q in \(\mathbb {F}_{4}[x]\) which are factors of x n − 1such that

$$\mathcal{C}=\langle F\rangle_{R}+u\langle G\rangle_{R}+v\langle H\rangle_{R}+uv\langle K\rangle_{R}+(u+vh_{\alpha})\langle Q\rangle_{R},$$

where h α is a unit of R and 〈−〉 R is an ideal of R generated by −. Moreover,

$$|\mathcal{C}|= 4^{5n-(\text{deg}F+\text{deg}G+\text{deg}H+\text{deg}K+\text{deg}Q)}.$$

Proof

By Theorem 2, \(\mathcal {C}=\langle \hat {F}_{1}\rangle \oplus \langle u\hat {F}_{2}\rangle \oplus \langle v\hat {F}_{3}\rangle \oplus \langle uv\hat {F}_{4}\rangle \oplus \langle (u+vh_{\alpha })\hat {F}_{5}\rangle \oplus (\langle u\hat {F}_{6}\rangle +\langle v\hat {F}_{6}\rangle )\). Note that \(\langle \hat {F}_{i}\rangle =\langle \hat {F}_{i}\rangle _{R}+u\langle \hat {F}_{i}\rangle _{R}+v\langle \hat {F}_{i}\rangle _{R}+uv\langle \hat {F}_{i}\rangle _{R}\) for 0 ≤ i ≤ 6, we have

$$\begin{array}{@{}rcl@{}} \mathcal{C}&=&\langle \hat{F}_{1}\rangle_{R}+u\langle \hat{F}_{1}\rangle_{R}+v\langle \hat{F}_{1}\rangle_{R}+uv\langle \hat{F}_{1}\rangle_{R}\\ &&+\,u\langle \hat{F}_{2}\rangle_{R}+uv\langle \hat{F}_{2}\rangle_{R}\\ &&+\,v\langle \hat{F}_{3}\rangle_{R}+uv\langle \hat{F}_{3}\rangle_{R}\\ &&+\,uv\langle \hat{F}_{4}\rangle_{R}\\ &&+\,(u+vh_{\alpha})\langle \hat{F}_{5}\rangle_{R}+uv\langle \hat{F}_{5}\rangle_{R}\\ &&+\,u\langle \hat{F}_{6}\rangle_{R}+v\langle \hat{F}_{6}\rangle_{R}+uv\langle \hat{F}_{6}\rangle_{R}\\ &=&\langle \hat{F}_{1}\rangle_{R}\\ &&+\,u(\langle \hat{F}_{1}\rangle_{R}+\langle \hat{F}_{2}\rangle_{R}+\langle \hat{F}_{6}\rangle_{R})\\ &&+\,v(\langle \hat{F}_{1}\rangle_{R}+\langle \hat{F}_{3}\rangle_{R}+\langle \hat{F}_{6}\rangle_{R})\\ &&\,+uv(\langle \hat{F}_{1}\rangle_{R}+\langle \hat{F}_{2}\rangle_{R}+\langle \hat{F}_{3}\rangle_{R}+\langle \hat{F}_{4}\rangle_{R}+\langle \hat{F}_{5}\rangle_{R}+\langle \hat{F}_{6}\rangle_{R})\\ &&+\,(u+vh_{\alpha})\langle \hat{F}_{5}\rangle_{R}. \end{array} $$

Let

$$\begin{array}{@{}rcl@{}} &&F=\hat{F}_{1}\\ &&G=\hat{F}_{1}+\hat{F}_{2}+\hat{F}_{6}\\ &&H=\hat{F}_{1}+\hat{F}_{3}+\hat{F}_{6}\\ &&K=\hat{F}_{1}+\hat{F}_{2}+\hat{F}_{3}+\hat{F}_{4}+\hat{F}_{5}+\hat{F}_{6}\\ &&Q=\hat{F}_{5}. \end{array} $$

Next, we show that \(\langle G\rangle _{R}=\langle \hat {F}_{1}\rangle _{R}+\langle \hat {F}_{2}\rangle _{R}+\langle \hat {F}_{6}\rangle _{R}\), \(\langle H\rangle _{R}=\langle \hat {F}_{1}\rangle _{R}+\langle \hat {F}_{3}\rangle _{R}+\langle \hat {F}_{6}\rangle _{R}\) and \(\langle K\rangle _{R}=\langle \hat {F}_{1}\rangle _{R}+\langle \hat {F}_{2}\rangle _{R}+\langle \hat {F}_{3}\rangle _{R}+\langle \hat {F}_{4}\rangle _{R}+\langle \hat {F}_{5}\rangle _{R}+\langle \hat {F}_{6}\rangle _{R}\).

For any distinct i, j ∈{0,1,⋯ ,6}, we have \(x^{n}-1|\hat {F}_{i}\hat {F}_{j}\), so that F i F j = 0 in \(\frac {\Lambda [x]}{\langle x^{n}-1\rangle }\). Moreover, for i = 1,⋯ ,6, \(\{F_{i}, \hat {F}_{i}\}\) are coprime pairs, hence, there exist \(b_{0i},b_{1i}\in \mathbb {F}_{4}[x]\) such that \(b_{0i}F_{i}+b_{1i}\hat {F_{i}}= 1\).

Take b 0i F i + b 1i F̂ i = 1 for i = 2,⋯ ,6, then there exist polynomials w 1,⋯ , w 6 in \(\mathbb {F}_{4}[x]\) such that

$$w_{1}F_{2}{\cdots} F_{6}+w_{2}\hat{F}_{2}F_{3}{\cdots} F_{6}+\cdots+w_{6}F_{2}{\cdots} F_{5}\hat{F}_{6}= 1.$$

Multiplying both sides of the above equation by \(\hat {F}_{1}\) yields

$$\hat{F}_{1}=w_{1}\hat{F}_{1}F_{2}{\cdots} F_{6}.$$

By the hypothesis, we obtain that

$$G=\hat{F}_{1}+\hat{F}_{2}+\hat{F}_{6},$$

which implies that

$$w_{1}FF_{2}{\cdots} F_{6}= w_{1}\hat{F}_{1}F_{2}{\cdots} F_{6}.$$

Hence

$$w_{1}GF_{2}{\cdots} F_{6}=\hat{F}_{1}.$$

This implies that \(\hat {F}_{1}\in \langle G\rangle _{R}\). Continuing this process, we have

$$\begin{array}{@{}rcl@{}} &&\hat{F}_{1},\hat{F}_{2},\hat{F}_{6}\in \langle G\rangle_{R}\\ &&\hat{F}_{1},\hat{F}_{3},\hat{F}_{6}\in \langle H\rangle_{R}\\ &&\hat{F}_{1},\hat{F}_{2},\hat{F}_{3},\hat{F}_{4},\hat{F}_{5},\hat{F}_{6}\in \langle K\rangle_{R} \end{array} $$

Consequently, by Theorem 2, \(\mathcal {C}=\langle F\rangle _{R}+u\langle G\rangle _{R}+v\langle H\rangle _{R}+uv\langle K\rangle _{R}+(u+vh_{\alpha })\langle Q\rangle _{R}\). Since \(|\mathbb {F}_{4}|= 4\), |〈F R | = 4n−degF, hence,

$$|\mathcal{C}|= 4^{5n-(\text{deg}F+\text{deg}G+\text{deg}H+\text{deg}K+\text{deg}Q)}. $$

4 Right \(\mathbb {F}_{2}\)-module isometry

We take A as a natural extension of the ring \(M_{2}(\mathbb {F}_{2})\), accordingly, we can extend the definition of the Bachoc weight which was introduced in [2] from \(M_{2}(\mathbb {F}_{2})\) to this ring. Let W B be the Bachoc weight over A and w B be the ordinary Bachoc weight of \(M_{2}(\mathbb {F}_{2})\)-codes, and so we set

$$W_{B}(X =X_{1}+uX_{2})= w_{B}(X_{2}) + w_{B}(X_{1}+X_{2}), \text{ for any } X_{1},X_{2}\in M_{2}(\mathbb{F}_{2}). $$

The definition of the weight immediately leads to a Gray map from A to \({M_{2}^{2}}(\mathbb {F}_{2})\) which naturally extends to A n:

$$\begin{array}{@{}rcl@{}} \varphi :A\to {M_{2}^{2}}(\mathbb{F}_{2}), X_{1}+uX_{2} \to (X_{2},X_{1}+X_{2}) \end{array} $$

Note that φ extends to a distance preserving isometry:

$$\varphi: (A^{n}, \text{ Bachoc weight) } \to (M_{2}^{2n}(\mathbb{F}_{2}), $$

Bachoc weight).

Consider the mapping ϕ defined as

$$\begin{array}{@{}rcl@{}} &&\phi: M_{2}(\mathbb{F}_{2}+u\mathbb{F}_{2})\longrightarrow\mathbb{F}_{4}+u\mathbb{F}_{4}+v\mathbb{F}_{4}+uv\mathbb{F}_{4}\\ &&\qquad \left( \begin{array}{cc} a_{1}+ub_{1} & a_{2}+ub_{2}\\ (a_{2}+a_{3})+u(b_{2}+b_{3}) & (a_{1}+a_{2}+a_{4})+u(b_{1}+b_{2}+b_{4}) \end{array} \right)\\ &&\quad \longrightarrow (a_{1}+a_{2}w)+u(b_{1}+b_{2}w)+v(a_{3}+a_{4}w)+uv(b_{3}+b_{4}w), \end{array} $$

where a i , b j in \(\mathbb {F}_{2}\) for 1 ≤ i, j ≤ 4. It is easy to show that ϕ is a left \(\mathbb {F}_{2}\)-module isomorphism. Note that W B (X = X 1 + u X 2) = w B (X 2) + w B (X 1 + X 2) = w L (ϕ(X)) for all XA, ϕ is a right \(\mathbb {F}_{2}\)-module isometry. Thus, we have the following theorem.

Theorem 3

If \(\mathcal {C}\) is a cyclic code over A of length n, size M and minimum Bachoc distance d, then \(\phi (\mathcal {C})\) is a linear code over \(\mathbb {F}_{4}\) of length 4n , size M and minimum Hamming distance d.

5 Examples

A linear code \(\mathcal {C}\) of length n over A is called an optimal code if the quaternary code \(\theta (\mathcal {C})\) in Theorem 1 has the largest minimum Hamming distance for the given length and the dimension. Now, some optimal codes of length 3 and 5 over A are shown as the following examples. All the computations of minimum distance were performed in Magma (http://magma.maths.usyd.edu.au/magma/).

Example 1

The case when n = 3, we see the factorization of x 3 − 1 = (x + 1)(x + w)(x + w 2). Now,let f 1 = x + 1, f 2 = x + w and f 3 = x + w 2, some optimal codes of length 3 over A are shown as follows:

Generators

Im𝜃

f 3, u f 1, v f 1

[12,11,2]

f 1, v f 2 f 3

[12,10,2]

f 1,(u + v)f 2 f 3

[12,10,2]

u f 1, v f 1,(u + v)f 2 f 3

[12,8,4]

u f 1, v f 1, u v f 2 f 3

[12,7,4]

Example 2

The case when n = 5, we see the factorization of x 5 − 1 = (x + 1)(x 2 + w x + 1)(x 2 + w 2 x + 1). Now, let f 1 = x + 1, f 2 = x 2 + w x + 1 and f 3 = x 2 + w 2 x + 1, some optimal codes of length 5 over A are shown as follows:

Generators

Im𝜃

f 1, v f 2 f 3

[20,18,2]

f 1,(u + v)f 2 f 3

[20,18,2]

f 3,(u + v)f 1 f 2

[20,16,3]

u f 2, v f 2,(u + v)f 1

[20,15,4]

6 Conclusion

In [4], a theory of cyclic codes over \(M_{2}(\mathbb {F}_{2})\) was developed giving a characterization of cyclic codes and their duals as right ideals in terms of two generators, and showing the existence of infinitely many nontrivial cyclic codes for the Euclidean product. But these codes were derived in the case of odd length. In this paper, based on these results, we derive the structure theorem of cyclic codes of odd length over the ring \(M_{2}(\mathbb {F}_{2}+u\mathbb {F}_{2})\) which leads to even length codes over \(M_{2}(\mathbb {F}_{2})\). We also provide some optimal cyclic codes of even length over \(\mathbb {F}_{4}\). Also we obtain an isometric map from \(M_{2}(\mathbb {F}_{2}+u\mathbb {F}_{2})\) to \(\mathbb {F}_{4}+v\mathbb {F}_{4}+u\mathbb {F}_{4}+uv\mathbb {F}_{4}\) using their respective Bachoc weight and Lee weight.