1 Introduction

In 1973, (Delsarte and Levenshtein 1998) defined additive codes in terms of association schemes as subgroups of the underlying abelian group. These codes are interesting, because their coordinates are partitioned into two parts such that each part is a linear code over different alphabet. Brouwer et al. (1998) have studied mixed binary/ternary error-correcting codes and presented upper and lower bounds for their maximal size. Recently, Borges et al. (2010) have introduced \({\mathbb {Z}}_2{\mathbb {Z}}_4\)-additive codes as submodules of \({\mathbb {Z}}_2^\alpha \times {\mathbb {Z}}_4^\beta \), where \(\alpha \) and \(\beta \) are positive integers. In Borges et al. (2010), the duality of \({\mathbb {Z}}_2{\mathbb {Z}}_4\)-additive codes are considered by defining an inner product different from the usual Euclidean inner product. Abualrub et al. (2014) have studied the cyclic structure of \({\mathbb {Z}}_2{\mathbb {Z}}_4\)-additive codes for the first time, where a minimal spanning set for these codes is presented, and generator polynomials of \({\mathbb {Z}}_2{\mathbb {Z}}_4\)-additive codes and their duals codes are determined. Extending the methods given in Borges et al. (2010); Aydogdu and Siap (2015) have studied \({\mathbb {Z}}_{p^r}{\mathbb {Z}}_{p^s}\)-additive codes and presented their generator and parity-check matrices in standard form. Also, generalizing the methods in Borges et al. (2010) and Abualrub et al. (2014), Aydogdu et al. (2017a, 2017b) have studied \({\mathbb {Z}}_2{\mathbb {Z}}_2[u]\)-cyclic codes and \({\mathbb {Z}}_2{\mathbb {Z}}_2[u^3]\)-cyclic codes. In another work, (Borges et al. 2018) have defined \({\mathbb {Z}}_2\)-double cyclic codes, and obtained the form of generator polynomials of these codes and their duals codes. We note that \({\mathbb {Z}}_2{\mathbb {Z}}_2[u^3]\)-cyclic codes are generalization of both \({\mathbb {Z}}_2{\mathbb {Z}}_2[u]\)-cyclic codes and \({\mathbb {Z}}_2\)-double cyclic codes. In recent times, various families of linear codes are studied over mixed alphabets and obtained good and some new optimal codes as their Gray images (Borges et al. 2012; Bilal et al. 2011; Diao et al. 2020; Dinh et al. 2020, 2021, 2020; Hou and Gao 2021; Li et al. 2020; Meng and Gao 2021; Rifà-Pous et al. 2011; Yao et al. 2020; Yao and Zhu 2020). Motivated by these studies, in this paper, we study \({\mathbb {Z}}_2{\mathbb {Z}}_2[u^4]\)-cyclic codes and determine the generator polynomials of \({\mathbb {Z}}_2{\mathbb {Z}}_2[u^4]\)-cyclic codes and their duals.

2 \({\mathbb {Z}}_2{\mathbb {Z}}_2[u^4]\)-linear codes

Let \({\mathbb {Z}}_2=\{0,1 \}\) be the binary field, and \(\mathrm {R}\) denotes the commutative ring \({\mathbb {Z}}_2+u{\mathbb {Z}}_2+u^2{\mathbb {Z}}_2+u^3{\mathbb {Z}}_2 = \{a+ub+u^2c+u^3d \mid a, b,c,d \in {\mathbb {Z}}_2\}\), where \(u^4=0\). \(\mathrm {R}\) is a finite chain ring with nilpotent element u of index 4. Clearly, \(\mathrm {R}\) contains \({\mathbb {Z}}_2\) as a proper subring. We use the notation \({\mathbb {Z}}_2\mathrm {R}:= {\mathbb {Z}}_2\times \mathrm {R}= \{\left( c_1 \mid c_2 \right) | c_1 \in {\mathbb {Z}}_2 \ \text{ and }\ c_2\in \mathrm {R}\}\). \({\mathbb {Z}}_2\mathrm {R}\) is a commutative group with respect to component wise addition. To multiply the elements of \(\mathrm {R}\) with the elements of \({\mathbb {Z}}_2\mathrm {R}\), we consider the mapping \(\delta : \mathrm {R}\rightarrow {\mathbb {Z}}_2\) defined by

$$\begin{aligned} \delta (a+ub+u^2c+u^3d)=a. \end{aligned}$$

Clearly, \(\delta \) is a ring homomorphism. Now, for any \(d \in \mathrm {R}\) and \(\left( c_1 \mid c_2\right) \in {\mathbb {Z}}_2\mathrm {R}\), define a product ‘\(*\)’ as \( d *\left( c_1\mid \ c_2\right) = \left( \delta (d)c_1 \mid dc_2\right) \). This product is well defined and \({\mathbb {Z}}_2\mathrm {R}\) is an \(\mathrm {R}\)-module with respect to the product ‘\(*\)’. Extending the product ‘\(*\)’ to \({\mathbb {Z}}_2^r \times \mathrm {R}^s\) such that for any \(d \in \mathrm {R}\) and \(c = \left( c_{10},c_{11},\ldots ,c_{1r-1} \mid \right. \left. c_{20},c_{21},\ldots ,c_{2s-1}\right) \in {\mathbb {Z}}_2^r \times \mathrm {R}^s\), we define

$$\begin{aligned} d*c = \left( \delta (d)c_{10},\delta (d)c_{11},\ldots ,\delta (d)c_{1r-1} \mid dc_{20},dc_{21},\ldots ,dc_{2s-1}\right) . \end{aligned}$$

This extended multiplication is also well defined and \({\mathbb {Z}}_2^r \times \mathrm {R}^s\) is an \(\mathrm {R}\)-module.

Definition 1

A non-empty subset \(\mathrm {C}\) of \({\mathbb {Z}}_2^r \times \mathrm {R}^s\) is called a \({\mathbb {Z}}_2[u^4]\)-linear code of length (rs) if \(\mathrm {C}\) is an \(\mathrm {R}\)-submodule of \({\mathbb {Z}}_2^r \times \mathrm {R}^s\).

Recall that the Gray map \(\phi :\mathrm {R}\mapsto {\mathbb {Z}}_2^4\) is defined as \(\phi (a+bu+cu^2+du^3)=(a+b+c+d, c+d, b+d, d)\) (Özger et al. 2014). We extend this map component wise to \(\Phi :{\mathbb {Z}}_2^r \times \mathrm {R}^s \mapsto {\mathbb {Z}}_2^{r+4s}\) such that for any \(c = \left( c_{1\,0},c_{1\,1},\ldots ,c_{1\,r-1} \mid c_{2\,0},c_{2\,1},\ldots ,c_{2\,s-1}\right) \in {\mathbb {Z}}_2^r \times \mathrm {R}^s\),

$$\begin{aligned} \Phi (c)= \left( c_{1\,0},c_{1\,1},\ldots ,c_{1\,r-1} \mid \phi (c_{2\,0}),\phi (c_{2\,1}),\ldots ,\phi (c_{2\,s-1})\right) . \end{aligned}$$

Clearly, \(\Phi \) is a linear map. Also, if \(\mathrm {C}\) is a \({\mathbb {Z}}_2\mathrm {R}\)-linear code of length (rs), then \(\Phi (\mathrm {C})\) is a binary linear code of length \(r+4s\).

2.1 Generator and parity-check matrices of \({\mathbb {Z}}_2{\mathbb {Z}}_2[u^4]\)-linear codes

In this section, we present the generator matrix of a \({\mathbb {Z}}_2\mathrm {R}\)-linear code \(\mathrm {C}\) of length (rs) in standard form. Here we note that \(\mathrm {C}\) is a binary linear code of length r when \(s=0\), and an \(\mathrm {R}\)-linear code of length s when \(r=0\). From the definition of \(\phi \), we see that \(\mathrm {R}\) is group isomorphic to \({\mathbb {Z}}_2^4\). Thus, as an additive group, a \({\mathbb {Z}}_2\mathrm {R}\)-linear code \(\mathrm {C}\) of block length (rs) is isomorphic to \({\mathbb {Z}}_2^{k_0} \times {\mathbb {Z}}_2^{4k_1} \times {\mathbb {Z}}_2^{3k_2}\times {\mathbb {Z}}_2^{2k_3} \times {\mathbb {Z}}_2^{k_4} \). In this case we say that \(\mathrm {C}\) is of type \((r,s;k_0;k_1,k_2,k_3,k_4)\).

Theorem 1

(Aydogdu 2019) Let \(\mathrm {C}\) be a \({\mathbb {Z}}_2\mathrm {R}\)-linear code of type \((r,s;k_0;k_1,k_2,k_3,k_4)\). Then \(\mathrm {C}\) is permutation equivalent to a \({\mathbb {Z}}_2\mathrm {R}\)-linear code with standard generator matrix of the form

$$\begin{aligned} G_S=\left( \begin{array}{cc|ccccc} I_{k_o}&{}{\bar{A}}_{01}&{}0 &{}0 &{}0 &{}0 &{}u^3T_{01} \\ 0 &{}S_{01} &{}I_{k_1}&{}A_{01} &{}A_{02} &{}A_{03} &{}A_{04} \\ 0 &{}S_{11} &{} 0 &{}uI_{k_2}&{}uA_{12} &{}uA_{13} &{}uA_{14} \\ 0 &{}S_{21} &{}0 &{}0 &{}u^2I_{k_3}&{}u^2A_{23} &{}u^2A_{24} \\ 0 &{}0 &{}0 &{}0 &{}0 &{}u^3I_{k_4} &{}u^3A_{34} \\ \end{array} \right) , \end{aligned}$$

where \(S_{01},S_{11}, S_{21} \) are binary matrices and \(A_{01},A_{02},A_{03},A_{04},A_{12},A_{13},A_{14},A_{23},A_{24}A_{34}\) are matrices over \(\mathrm {R}\). Furthermore, \(\mathrm {C}\) contains \(2^{k_0}2^{4k_1}2^{3k_2}2^{2k_3}2^{k_4}\) codewords.

Example 1

Let \(\mathrm {C}\) be a \({\mathbb {Z}}_2\mathrm {R}\)-linear code of length (2, 5) generated by the matrix

$$\begin{aligned} G=\left( \begin{array}{cc|ccccc} 1 &{} 1 &{} 0 &{}0 &{} u^2 &{}u^2 &{}u^2 \\ 1 &{} 1 &{} 1 &{} 1 &{} 0 &{}1+u &{}u+u^3 \\ 0 &{} 1 &{} 0 &{} u &{} 0 &{}u+u^2 &{}u+u^2 \\ 0 &{} 1 &{}0 &{} u &{} u^2 &{}u &{}u+u^3 \\ 1 &{} 1 &{}0 &{}0 &{} u^2 &{}u^2+u^3 &{}u^2+u^3\\ \end{array} \right) . \end{aligned}$$

Then, \(\mathrm {C}\) is permutation equivalent to a \({\mathbb {Z}}_2\mathrm {R}\)-linear code with generator matrix in standard form

$$\begin{aligned} G_s=\left( \begin{array}{cc|ccccc} 1 &{} 1 &{} 0 &{}0 &{} 0 &{}0 &{}u^3 \\ 0 &{} 0 &{} 1 &{} 1 &{} 0 &{}1+u &{}u \\ 0 &{} 1 &{} 0 &{} u &{} 0 &{}u+u^2 &{}u+u^2 \\ 0 &{} 0 &{}0 &{} 0 &{} u^2 &{}u^2 &{}u^2+u^3 \\ 0 &{} 0 &{}0 &{}0 &{} 0 &{}u^3 &{}u^3\\ \end{array} \right) . \end{aligned}$$

Clearly, \(\mathrm {C}\) is of type (2, 5; 1; 1, 1, 1, 1) and contains \(2^1\cdot 2^{4\cdot 1}\cdot 2^{3\cdot 1}\cdot 2^{2\cdot 1}\cdot 2^1=2048\) codewords.

Now, we present the standard form of generator matrix of the dual code \(\mathrm {C}^\bot \) of a \({\mathbb {Z}}_2\mathrm {R}\)-linear code of type \((r,s;k_0;k_1,k_2,k_3,k_4)\). For this, we first define an inner product in \({\mathbb {Z}}_2^r \times \mathrm {R}^s\).

Definition 2

The inner product of any two elements \(x=\Big (x_{1\,0},x_{1\,1},\ldots ,x_{1\,r-1}\mid x_{2\,0},x_{2\,1},\ldots , x_{2\,s-1}\Big )\) and \(y=\left( y_{1\,0},y_{1\,1},\ldots ,y_{1\,r-1}\mid y_{2\,0},y_{2\,1},\ldots ,y_{2\,s-1}\right) \) in \({\mathbb {Z}}_2^r \times \mathrm {R}^s\) is defined as

$$\begin{aligned}=u^3\left[ \sum \limits _{i=0}^{r-1}x_{1i}\,y_{1i}\right] +\sum \limits _{j=0}^{s-1}x_{2j}\,y_{2j}.\end{aligned}$$

Definition 3

The dual code \(\mathrm {C}^\bot \) of a \({\mathbb {Z}}_2\mathrm {R}\)-linear code \(\mathrm {C}\) is defined as

$$\begin{aligned} \mathrm {C}^\bot = \{y \in {\mathbb {Z}}_2^r \times \mathrm {R}^s \mid [ y \cdot c]=0 \ \text{ for } \text{ all }\ c\in \mathrm {C}\}. \end{aligned}$$

From the definition of \(\mathrm {C}^\bot \), it is easy to see that \(\mathrm {C}^\bot \) is also a \({\mathbb {Z}}_2\mathrm {R}\)-linear code.

Theorem 2

(Aydogdu 2019) Let \(\mathrm {C}\) be a \({\mathbb {Z}}_2\mathrm {R}\)-linear code of type \((r,s; k_0; k_1, k_2,k_3,k_4)\) with the generator matrix as in Theorem . Then the generator matrix of the dual code \(\mathrm {C}^\bot \) is given by

where

and \(M^\prime \) denotes the transpose of the matrix M.

Example 2

Let \(\mathrm {C}\) be a \({\mathbb {Z}}_2\mathrm {R}\)-linear code of type (2, 5; 1; 1, 1, 1, 1) generated by the matrix in standard form

Then the parity-check matrix of \(\mathrm {C}\) is

and, therefore, \(\mathrm {C}^\bot \) is of type (2, 5; 1; 1, 1, 1, 1).

3 \({\mathbb {Z}}_2{\mathbb {Z}}_2[u^4]\)-cyclic codes

In this section, we generalize the Definition 3.1 given in Aydogdu et al. (2017a) and define \({\mathbb {Z}}_2\mathrm {R}\)-cyclic codes. A \({\mathbb {Z}}_2\mathrm {R}\)-linear code of length (rs) is cyclic if the simultaneous cyclic shifts of r coordinates and s coordinates leaves the code invariant. Here, we study the structural properties of \({\mathbb {Z}}_2\mathrm {R}\)-cyclic codes of length (rs) by determining their generator polynomials for odd s, while r is set to be arbitrary.

Definition 4

A \({\mathbb {Z}}_2\mathrm {R}\)-linear code \(\mathrm {C}\) of length (rs) is called a \({\mathbb {Z}}_2\mathrm {R}\)-cyclic code if \((c_{1\,r-1},c_{10},\ldots , c_{1r-2}\mid c_{2\,s-1},c_{20},\ldots ,c_{2\,s-2})\in \mathrm {C}\) whenever \((c_{1\,0},c_{1\,1},\ldots ,c_{1\,r-1}\mid c_{20},c_{21},\ldots ,c_{2\,s-1})\in \mathrm {C}\).

Let \( {\mathrm {R}_{4,r,s}[x] = \frac{{\mathbb {Z}}_2[x]}{\langle x^r-1 \rangle } \times \frac{\mathrm {R}[x]}{\langle x^s-1\rangle }}\), \( {{\mathbb {Z}}_{2,r}[x] = \frac{{\mathbb {Z}}_2[x]}{\langle x^r-1\rangle }}\) and \( {\mathrm {R}_{4,s}[x]=\frac{\mathrm {R}[x]}{\langle x^s-1\rangle }}\). Identifying each \(c=(c_{1\,0},c_{1\,1}, \ldots ,c_{1\,r-1}\mid c_{2\,0},c_{2\,1},\ldots ,c_{2\,s-1})\in {\mathbb {Z}}_2^r \times \mathrm {R}^s\) with a pair of polynomials \( (c_{1\,0}+c_{1\,1}x+\cdots +c_{1\,r-1}x^{r-1}\mid c_{2\,0}+c_{2\,1}x+\cdots +c_{2\,s-1}x^{s-1})\in \mathrm {C}\), we have a one-one correspondence between \({\mathbb {Z}}_2^r \times \mathrm {R}^s\) and \(\mathrm {R}_{4,r,s}[x]\). Now for any \(f(x) =\sum f_i x^i \in \mathrm {R}[x]\) and \( (c_1(x) \mid c_2(x)) \in \mathrm {R}_{4,r,s}[x]\), we define the product \(f(x) *\left( c_1(x) \mid c_2(x) \right) = \left( \delta (f(x) )c_1(x) \mid f(x) c_2(x) \right) \), where \(\delta (f(x))=\sum \delta (f_i) x^i\). Following these notations, it can easily be shown that \(\mathrm {R}_{4,r,s}[x]\) is an \(\mathrm {R}[x]\)-module with respect to the product ‘\(*\)’.

Let \(c=(c_{1\,0},c_{1\,1},\ldots ,c_{1\,r-1} \mid c_{2\,0},c_{2\,1},\ldots ,c_{2\,s-1})\) be an element in \({\mathbb {Z}}_2^r\times \mathrm {R}^s\) and i be an integer. We denote the ith shift of c by

$$\begin{aligned} c^{(i)}=(c_{1\,0-i},c_{11-i},\ldots ,c_{1r-1-i} \mid c_{2\,0-i},c_{2\,1-i},\ldots ,c_{2\,s-1-i}) \end{aligned}$$

where the subscripts are taken modulo r and s, respectively. Following these notations, it is easy to see that \(x *c(x)=(c_{1\,0}x+c_{1\,1}x^2+\cdots +c_{1\,r-1}x^r \mid c_{2\,0} x+c_{2\,1} x^2+\cdots +c_{2\,s-1}x^s)=(c_{1\,r-1}+c_{1\,0}x+\cdots +c_{1\,r-2}x^{r-1} \mid c_{2\,s-1} +c_{2\,0} x+\cdots +c_{2\,s-2} x^{s-1})\), which is the cyclic shift of c in \({\mathbb {Z}}_2^r \times \mathrm {R}^s \). More generally, \(x^i *c(x) = c^{(i)}(x)\). The cyclic codes in the present setting are \(\mathrm {R}[x]\)-submodules of the residue class ring \(\mathrm {R}_{4,r,s}[x]\), in fact they generalize both binary cyclic codes and cyclic codes over \(\mathrm {R}\).

Theorem 3

A \({\mathbb {Z}}_2\mathrm {R}\)-linear code \(\mathrm {C}\) of length (rs) is cyclic in \({\mathbb {Z}}_2^r \times \mathrm {R}^s\) if and only if \(\mathrm {C}\) is an \(\mathrm {R}[x]\)-submodule of \(\mathrm {R}_{4,r,s}[x]\).

Let \(\mathrm {C}_r\) and \(\mathrm {C}_s\) be the canonical projections of a \({\mathbb {Z}}_2\mathrm {R}\)-cyclic code \(\mathrm {C}\) of length (rs) on first r coordinates and last s coordinates, respectively. Then, \(\mathrm {C}_r\) is a binary cyclic code of length r and \(\mathrm {C}_s\) is a cyclic code of length s over \(\mathrm {R}\). These codes are well studied in the literature (MacWilliams and Sloane 1975; Özger et al. 2014). We now extend these known structures and obtain the generator polynomials of a \({\mathbb {Z}}_2\mathrm {R}\)-cyclic code by taking the back projection of \(\mathrm {C}_s\) in \(\mathrm {R}_{4,r,s}\).

Now onward s denote an odd integer and r an arbitrary integer. Also, we denote the gcd of two polynomials f(x) and g(x) by \(\left( f(x),g(x)\right) \). The following result gives the form of generator polynomials of cyclic codes of odd length over \(\mathrm {R}\).

Theorem 4

(Özger et al. 2014) Let \(\mathrm {C}\) be a cyclic code of length n over \(\mathrm {R}\), n odd. Then, \(\mathrm {C}=\left\langle g(x),ua_1(x),u^2a_2(x),\right. \left. u^3a_3(x)\right\rangle =\langle g(x)+ua_1(x)+u^2a_2(x)+u^3a_3(x)\rangle \), where \(g(x),a_1(x),a_2(x)\) and \(a_3(x)\) are binary polynomials such that \(a_3(x)\big |a_2(x)\big |a_1(x)\big |g(x)\big |(x^n-1)\).

The following result gives the generator polynomials for a \({\mathbb {Z}}_2\mathrm {R}\)-cyclic code \(\mathrm {C}\) of length (rs).

Theorem 5

Let \(\mathrm {C}\) be a \({\mathbb {Z}}_2\mathrm {R}\)-cyclic code \(\mathrm {C}\) of length (rs). Then, \(\mathrm {C}=\Big \langle \left( f(x) \mid 0\right) , (l(x) \mid g(x)+ua_1(x)+ u^2a_2(x)+u^3a_3(x)) \Big \rangle \), where \(f(x),l(x),g(x),a_1(x),a_2(x)\) and \(a_3(x)\) are binary polynomials such that \(a_3(x)\big | a_2(x)\big |a_1(x)\big |g(x)\big |(x^s-1)\) and \(f(x) \big | (x^r-1)\).

Proof

Consider the projection mapping \( \pi : \mathrm {C}\rightarrow \mathrm {R}_{4,s}[x]\) such that \((c_1(x) \mid c_2(x) ) \mapsto c_2(x) \). Clearly \(\pi \) is an \(\mathrm {R}[x]\)-module homomorphism with kernel \({\text {ker}}(\pi )=\{(a(x) \mid 0)\in \mathrm {C}\mid a(x) \in {\mathbb {Z}}_{2,r}[x]\}\). Since \( {\mathbb {Z}}_{2,r}[x]\) is a principal ideal ring, the set \( {K=\{a(x) \in {\mathbb {Z}}_{2,r}[x] \mid (a(x)\mid 0)\in \mathrm {C}\}}\) is a principal ideal. Therefore, there exists \(f (x)\in {\mathbb {Z}}_{2,r}[x], f(x)\big |(x^r-1)\) such that \(K=\langle f(x) \rangle \), and therefore, \({\text {ker}}(\pi )= \langle (f(x) \mid 0) \rangle \). On the other hand, the homomorphic image of \(\mathrm {C}\) under \(\pi \) is an ideal of \(\mathrm {R}_{4,s}[x]\). From Theorem 4, we have \(\pi (\mathrm {C})=\langle g(x)+ua_1(x)+u^2a_2(x)+u^3a_3(x)\rangle \). This implies \((l(x) \mid g(x)+ua_1(x)+u^2a_2(x)+u^3a_3(x) )\in \mathrm {C}\) for some \(l(x)\in {\mathbb {Z}}_{2,r}[x]\). Therefore, \(\langle (f(x) \mid 0), (l(x) \mid g(x)+ua_1(x)+u^2a_2(x)+u^3a_3(x) ) \rangle \subseteq \mathrm {C}\). To show \( \mathrm {C}\subseteq \langle (f(x) \mid 0), (l(x) \mid g(x)+ua_1(x)+u^2a_2(x)+u^3a_3(x) ) \rangle \), let \((p_1(x) \mid p_2(x))\in \mathrm {C}\). This implies \(p_2(x)\in \mathrm {C}_s\) and \(p_2(x)=\lambda (x)(g(x)+ua_1(x)+u^2a_2(x)+u^3a_3(x))\) for some \(\lambda (x)\in \mathrm {R}[x]\). Furthermore,

$$\begin{aligned}&(p_1(x) \mid p_2(x))-\lambda (x)(l(x) \mid g(x)+ua_1(x)+u^2a_2(x)+u^3a_3(x) ) \\&=(p_1(x)-\lambda (x)l(x) \mid 0) \\&=\lambda ^\prime (x)(f(x) \mid 0), \end{aligned}$$

for some \(\lambda ^\prime (x)\in {\mathbb {Z}}_2[x]\). This implies \((p_1(x)\mid p_2(x))\in \langle (f(x) \mid 0), (l(x) \mid g(x)+ua_1(x)+u^2a_2(x)+u^3a_3(x) ) \rangle \), and therefore, \( \mathrm {C}\subseteq \langle (f \mid 0), (l \mid g(x)+ua_1(x)+u^2a_2(x)+u^3a_3(x) ) \rangle \). \(\square \)

Remark 1

From Theorem 5, it is obvious that f(x) is a monic polynomial of least degree such that \((f(x) \mid 0)\in \mathrm {C}\). Also, for any \((a(x) \mid 0)\in \mathrm {C}\), f(x) divides a(x).

Theorem 6

Let \(\mathrm {C}=\left\langle \left( f(x) \mid 0\right) , \left( l(x) \mid g(x)+ua_1(x)+u^2a_2(x)+u^3a_3(x) \right) \right\rangle \) be a \({\mathbb {Z}}_2\mathrm {R}\)-cyclic code of length (rs). Then, f(x) divides \( \frac{x^s-1}{a_3(x)}l(x)\).

Proof

Consider

$$\begin{aligned} \frac{x^s-1}{a_3(x)} \left( l(x) \mid g(x) +ua_1(x)+u^2a_2(x)+u^3a_3(x) \right)&= \left( \delta \left( \frac{x^s-1}{a_3(x)}\right) l(x) ~ \bigg | ~ 0\right) \\&= \left( \frac{x^s-1}{a_3(x)} l(x) ~ \bigg | ~ 0\right) \in \mathrm {C}. \end{aligned}$$

This implies that f(x) divides \( \frac{x^s-1}{a_3(x)} l(x) \) from Remark 1. \(\square \)

Corollary 1

Let \(\mathrm {C}=\left\langle \left( f(x) \mid 0\right) , \left( l(x) \mid g(x)+ua_1(x)+u^2a_2(x)+u^3a_3(x) \right) \right\rangle \) be a \({\mathbb {Z}}_2\mathrm {R}\)-cyclic code of length (rs). Then, f(x) divides \( \frac{x^s-1}{a_3(x)}(l(x),f(x))\).

Theorem 7

Let \(\mathrm {C}=\left\langle \left( f(x) \mid 0\right) , \left( l(x) \mid g(x)+ua_1(x)+u^2a_2(x)+u^3a_3(x) \right) \right\rangle \) be a \({\mathbb {Z}}_2\mathrm {R}\)-cyclic code of length (rs). Then \(\text {deg}(l(x) )<\text {deg}(f(x) )\).

Proof

Assume \(\text {deg}(l(x) ) \ge \text {deg}(f (x))\). Since f(x) is a monic polynomial, we can apply division algorithm. To that end, there exist polynomials q(x) and r(x) in \({\mathbb {Z}}_2[x]\) such that \(l(x) = f(x) q(x) +r(x)\), where \(r(x)=0\) or \(0 \le \text {deg}(r(x)) < \text {deg}(f (x))\). Therefore

$$\begin{aligned} \langle (f(x) \mid 0), (l(x) \mid&\ g(x)+ua_1(x)+u^2a_2(x)+u^3a_3(x) ) \rangle \\&= \langle (f (x)\mid 0), (f(x) q(x) +r(x) \mid g(x)+ua_1(x)\\&\quad +u^2a_2(x)+u^3a_3(x) ) \rangle \\&= \langle (f(x) \mid 0),q(x)(f(x) \mid 0)+(r(x) \mid g(x)+ua_1(x)\\&\quad +u^2a_2(x)+u^3a_3(x) )\rangle \\&= \langle (f(x) \mid 0), (r(x) \mid g(x)+ua_1(x)+u^2a_2(x)+u^3a_3(x) ) \rangle . \end{aligned}$$

As \(\text {deg}(r(x)) < \text {deg}(f (x))\), we may assume that \(\text {deg}(l(x) )<\text {deg}(f (x))\). \(\square \)

The following result present a minimal spanning set for a \({\mathbb {Z}}_2\mathrm {R}\)-cyclic code that given in Theorem 5.

Theorem 8

Let \(\mathrm {C}=\left\langle \left( f(x) \mid 0\right) , \left( l(x) \mid g(x)+ua_1(x)+u^2a_2(x)+u^3a_3(x) \right) \right\rangle \) be a \({\mathbb {Z}}_2\mathrm {R}\)-cyclic code of length (rs) such that \(g(x)h(x)=x^s-1, g(x)=a_1(x)b_1(x),a_1(x)=a_2(x)b_2(x)\) and \(a_2(x)=a_3(x)b_3(x)\). Then, \(S=S_1\cup S_2 \cup S_3\cup S_4\cup S_5\) forms a minimal spanning set for \(\mathrm {C}\) as an \(\mathrm {R}[x]\)-submodule of \(\mathrm {R}_{4,r,s}\), where

$$\begin{aligned} S_1&= \bigcup _{i=0}^{r-\text {deg}(f)-1}x^i *\left( f \mid 0\right) \\ S_2&= \bigcup _{i=0}^{s-\text {deg}(g)-1}x^i*\left( l \mid g+ua_1+u^2a_2+u^3a_3 \right) \\ S_3&= \bigcup _{i=0}^{\text {deg}(g)-\text {deg}(a_1)-1}x^i*\left( l h \mid ua_1h+u^2a_2h+u^3a_3h \right) \\ S_4&= \bigcup _{i=0}^{\text {deg}(a_1)-\text {deg}(a_2)-1}x^i*\left( l hb_1 \mid u^2a_2hb_1+u^3a_3hb_1 \right) \\ S_5&= \bigcup _{i=0}^{\text {deg}(a_2)-\text {deg}(a_3)-1}x^i*\left( l hb_1b_2 \mid u^3a_3hb_1b_2 \right) . \end{aligned}$$

Proof

Let c be a codeword in \(\mathrm {C}\). Then there exist \(d_1\) and \(d_2\) in \(\mathrm {R}[x]\) such that

$$\begin{aligned} c&= d_1 *(f \mid 0) + d_2 *(l \mid g+ua_1+u^2a_2+u^3a_3) \nonumber \\&= (\delta (d_1) f \mid 0) + d_2 *(l \mid g+ua_1+u^2a_2+u^3a_3). \end{aligned}$$
(1)

We first show that \(d_1 *(f\mid 0)\in {\text {span}}(S_1)\). If \(\text {deg}(\delta (d_1 ))< r-\text {deg}(f)\), then \(d_1 *(f_1 \mid 0)\in \) \({\text {span}}(S_1)\). Otherwise, by division algorithm, there exist \(q_1 \), \(r_1 \in {\mathbb {Z}}_2[x]\) such that \(\delta (d_1 ) = q_1 \frac{x^r-1}{f } + r_1 \ \text{ with }\ r_1=0 \ \text{ or } \ 0\le \text {deg}(r_1 )<r-\text {deg}(f)\). Then

$$\begin{aligned} (\delta (d_1 )f \mid 0)&= \left( \left( q_1 \frac{x^r-1}{f }+r_1 \right) f \mid 0\right) \\&= (q_1(x^r-1)+r_1f \mid 0 )\\&= q_1 (x^r-1\mid 0) + r_1(f\mid 0)\\&= r_1 (f \mid 0) \in {\text {span}}(S_1) . \end{aligned}$$

If \(\text {deg}(d_2)< s-\text {deg}(g)\), then \(d_2 *(l \mid g+ua_1+u^2a_2+u^3a_3) \in \ {\text {span}}(S_2)\) and \(c\in {\text {span}}(S)\). Otherwise, by division algorithm, we have \(d_2 = q_2 h +r_2 \) with \(r_2=0\) or \(0\le \text {deg}(r_2 )<s-\text {deg}(g)\), \(q_2,r_2 \in \mathrm {R}[x]\). Therefore

$$\begin{aligned} d_2 *(l \mid g+ua_1+u^2a_2+u^3a_3)&= (q_2 h +r_2 )(l \mid g+ua_1+u^2a_2+u^3a_3)\\&= q_2*(lh \mid ua_1h+u^2a_2h+u^3a_3h) \\&\quad + r_2*(l \mid g+ua_1+u^2a_2+u^3a_3). \end{aligned}$$

Since \(\text {deg}(r_2 )<s-\text {deg}(g)\), \(r_2*(l \mid g+ua_1+u^2a_2+u^3a_3) \in {\text {span}}(S_2)\). Also, if \(\text {deg}(q_2 )<\text {deg}(g)-\text {deg}(a_1)\), \(q_2*(lh \mid ua_1h+u^2a_2h+u^3a_3h) \in {\text {span}}(S_3) \), and therefore, \(c\in {\text {span}}(S)\). Otherwise, compute \(q_2 = q_3 b_1 +r_3 \), where \(r_3=0 \ \text{ or }\ 0\le \text {deg}(r_3 )<\text {deg}(g)-\text {deg}(a_1)\). Then

$$\begin{aligned} q_2*(lh \mid ua_1h+u^2a_2h+u^3a_3h)&= (q_3 b_1 +r_3 )*(lh \mid ua_1h+u^2a_2h+u^3a_3h) \\&= q_3*(l hb_1 \mid u^2a_2hb_1+u^3a_3hb_1) \\&\quad + r_3 *(lh \mid ua_1h+u^2a_2h+u^3a_3h) \end{aligned}$$

Clearly, \(r_3 *(lh \mid ua_1h+u^2a_2h+u^3a_3h)\in {\text {span}}(S_3)\). If \(\text {deg}(q_3)< \text {deg}(a_1)-\text {deg}(a_2)\), then \(q_3*(l hb_1 \mid u^2a_2hb_1+u^3a_3hb_1) \in {\text {span}}(S_4)\), and therefore, \(c\in {\text {span}}(S)\). Otherwise, compute \(q_3 = q_4 b_2 +r_4 \) with \(r_4=0 \ \text{ or }\ 0\le \text {deg}(r_4 )<\text {deg}(a_1)-\text {deg}(a_2)\). Then

$$\begin{aligned} q_3*(l hb_1 \mid u^2a_2hb_1+u^3a_3hb_1)&= (q_4 b_2 +r_4 )*(lhb_1 \mid u^2a_2hb_1+u^3a_3hb_1) \nonumber \\&= q_4*(l hb_1b_2 \mid u^3a_3hb_1b_2) \\&\quad + r_4 *(lhb_1 \mid u^2a_2hb_1+u^3a_3hb_1) \end{aligned}$$

Again, since \(\text {deg}(r_4 )<\text {deg}(a_1)-\text {deg}(a_2)\), \(r_4 *(lhb_1 \mid u^2a_2hb_1+u^3a_3hb_1) \in span(S_4)\). Now, we show \(q_4*(l hb_1b_2 \mid u^3a_3hb_1b_2) \in {\text {span}}(S_1 \cup S_5)\). If \(\text {deg}(q_4)<\text {deg}(a_2)-\text {deg}(a_3)\) then we are done. Otherwise, compute \(q_4 = q_5 b_3 +r_5 \) with \(r_5=0 \ \text{ or }\ 0\le \text {deg}(r_5 )<\text {deg}(a_2)-\text {deg}(a_3)\). This implies that

$$\begin{aligned} q_4*(l hb_1b_2 \mid u^3a_3hb_1b_2)&= (q_5 b_3 +r_5 )*(l hb_1b_2 \mid u^3a_3hb_1b_2) \nonumber \\&= q_5*(l hb_1b_2b_3 \mid 0) + r_5 *(lhb_1b_2 \mid u^3a_3hb_1b_2). \end{aligned}$$

Since \(x^s-1=a_3b_1b_2b_3h\), and \(f \big |\frac{x^s-1}{a_3}\) (from Theorem 6), we have \(q_5*(l hb_1b_2b_3 \mid 0) \in span(S_1)\). Also, since \(r_5*(lhb_1b_2 \mid u^3a_3hb_1b_2) \in span(S_5)\), we finally see \(c \in span(S)\). Therefore, \(\mathrm {C}\) is spanned by S. \(\square \)

Corollary 2

Let \(\mathrm {C}=\left\langle \left( f(x) \mid 0\right) , \left( l(x) \mid g(x)+ua_1(x)+u^2a_2(x)+u^3a_3(x) \right) \right\rangle \) be a \({\mathbb {Z}}_2\mathrm {R}\)-cyclic code such that \(f(x) \big |(x^r-1)\), \(a_3(x)\big |a_2(x)\big |a_1(x)\big |g(x) \big |(x^s-1)\). Then,

$$\begin{aligned} |\mathrm {C}|=2^{r-\text {deg}(f)}16^{s-\text {deg}(g)} 8^{\text {deg}(g)-\text {deg}(a_1)} 4^{\text {deg}(a_1)-\text {deg}(a_2)} 2^{\text {deg}(a_2)-\text {deg}(a_3)}. \end{aligned}$$

Corollary 3

Let \(\mathrm {C}=\left\langle \left( f(x) \mid 0\right) , \left( l(x) \mid g(x)+ua_1(x)+u^2a_2(x)+u^3a_3(x) \right) \right\rangle \) be a \({\mathbb {Z}}_2\mathrm {R}\)-cyclic code such that \(f(x) \big |(x^r-1)\), \(a_3(x)\big |a_2(x)\big |a_1(x)\big |g(x) \big |(x^s-1)\) and \(\mathrm {C}^\bot \) be its dual code. Then

$$\begin{aligned} |\mathrm {C}^\bot |= 2^{\text {deg}(f)} 16^{\text {deg}(a_3)} 8^{\text {deg}(a_2)-\text {deg}(a_3)} 4^{\text {deg}(a_1)-\text {deg}(a_2)} 2^{\text {deg}(g)-\text {deg}(a_1)}. \end{aligned}$$

Proof

The result follows as \(|\mathrm {C}|=2^{r-\text {deg}(f)}16^{s-\text {deg}(g)} 8^{\text {deg}(g)-\text {deg}(a_1)} 4^{\text {deg}(a_1)-\text {deg}(a_2)} 2^{\text {deg}(a_2)-\text {deg}(a_3)}\) from Corollary 2 and \(|\mathrm {C}||\mathrm {C}^\bot |=2^r16^s\). \(\square \)

Note that, if \(\mathrm {C}=\langle (f(x) \mid 0), (l(x) \mid g(x)+ua_1(x)+u^2a_2(x)+u^3a_3(x) ) \rangle \) is a \({\mathbb {Z}}_2\mathrm {R}\)-cyclic code of length (rs), then the canonical projection \(\mathrm {C}_s\) is an \(\mathrm {R}\)-cyclic code generated by \(g(x)+ua_1(x)+u^2a_2(x)+u^3a_3(x)\). Also, it can easily be seen that the spanning set of an \(\mathrm {R}\)-cyclic codes of odd length given in Özger et al. (2014) is a special case of Theorem 8 for \(r=0\).

Theorem 9

Let \(\mathrm {C}=\left\langle \left( f(x) \mid 0\right) , \left( l(x) \mid g(x)+ua_1(x)+u^2a_2(x)+u^3a_3(x) \right) \right\rangle \) be a \({\mathbb {Z}}_2\mathrm {R}\)-cyclic code of type \((r,s;k_0;k_1,k_2,k_3,k_4)\) such that \(f(x) \big |(x^r-1)\), \(a_3(x)\big |a_2(x)\big |a_1(x)\big |g(x) \big | (x^s-1)\). Then, \(k_0=r-\text {deg}(f,lhb_1b_2)\), \(k_1=s-\text {deg}(g)\), \(k_2=\text {deg}(g)-\text {deg}(a_1)\), \(k_3=\text {deg}(a_1)-\text {deg}(a_2)\) and \(k_4=\text {deg}(a_2)-\text {deg}(a_3)-\text {deg}(f)+\text {deg}(f,lhb_1b_2)\).

Proof

From Theorems 1 and 8, we have \(k_0\) is the dimension of the projection of the space generated by \( \left( f \mid 0\right) \) and \(\left( l hb_1b_2 \mid u^3a_3hb_1b_2 \right) \) on first r coordinates. Clearly, the polynomials f and \(l hb_1b_2\) generates this space. Since the projection of \(\mathrm {R}_{4,r,s}\) on first r coordinates is a principal ideal in \(\mathbb {Z}_{2,r}[x]\), the monic polynomial \((f, l hb_1b_2)\) generates this projection space. Thus, \(k_0=r-\text {deg}(f,lhb_1b_2)\). Furthermore, the parameters \(k_1, k_2\) and \(k_3\) are clear from Theorem 8. Finally, as \(|\mathrm {C}|=2^{r-\text {deg}(f)}16^{s-\text {deg}(g)} 8^{\text {deg}(g)-\text {deg}(a_1)} 4^{\text {deg}(a_1)-\text {deg}(a_2)} 2^{\text {deg}(a_2)-\text {deg}(a_3)}=2^{k_0}16^{k_1}8^{k_2}4^{k_3}2^{k_4}\), we have \(k_4=\text{ deg }(a_2)-\text {deg}(a_3)- \text {deg}(f)+\text {deg}(f,lhb_1b_2)\). \(\square \)

4 Duals of \({\mathbb {Z}}_2{\mathbb {Z}}_2[u^4]\)-cyclic codes

In this section, we study the structure of duals of \({\mathbb {Z}}_2\mathrm {R}\)-cyclic codes. We determine the generator polynomials of these codes. The following result shows that the dual of a \({\mathbb {Z}}_2\mathrm {R}\)-cyclic code is also cyclic.

Theorem 10

Let \(\mathrm {C}\) be a \({\mathbb {Z}}_2\mathrm {R}\)-cyclic code of length (rs) and \(\mathrm {C}^\bot \) be its dual. Then \(\mathrm {C}^\bot \) is also a \({\mathbb {Z}}_2\mathrm {R}\)-cyclic code of length (rs). Furthermore, \(\mathrm {C}^\bot = \left\langle \left( {\hat{f}}(x) \mid 0\right) , \left( {\hat{l}}(x) \mid {\hat{g}}(x)+u{\hat{a}}_1(x)+ u^2{\hat{a}}_2(x)+u^3{\hat{a}}_3(x) \right) \right\rangle \), where \({\hat{f}}(x),{\hat{g}}(x),{\hat{l}}(x),{\hat{a}}_1(x),{\hat{a}}_2(x),{\hat{a}}_3(x) \in {\mathbb {Z}}_2[x]\) with \({\hat{f}}(x) \big |(x^r-1)\) and \({\hat{a}}_3(x) \big |{\hat{a}}_2(x) \big |{\hat{a}}_1(x) \big |{\hat{g}}(x) \big |(x^s-1)\).

Proof

Let \(v_1=\left( a_{1\,0},a_{1\,1},\ldots ,a_{1\,r-1}\mid b_{1\,0},b_{1\,1},\ldots ,b_{1\,s-1}\right) \in \mathrm {C}\) and \(v_2=\left( a_{2\,0},a_{2\,1}, \ldots , a_{2\,r-1} \mid b_{2\,0}, b_{2\,1}, \right. \left. \ldots , b_{2\,s-1}\right) \in \mathrm {C}^\bot \). Since \(v_1\in \mathrm {C}\) and \(\mathrm {C}\) is cyclic, we have \((v_1)^{(m-1)}\in \mathrm {C}\), where \(m=\mathrm {lcm}\{r,s\}\). Then

$$\begin{aligned} 0&= [(v_1)^{(m-1)}\cdot v_2] \\&= u^3(a_{1\,1}a_{2\,0}+\cdots +a_{1\,r-1}a_{2\,r-2} +a_{1\,0}a_{2\,r-1} )\\&\quad +( b_{1\,1}b_{2\,0}+\cdots +b_{1\,s-1}b_{2\,s-2}+b_{1\,0}b_{2\,s-1})\\&= u^3(a_{1\,0}a_{2\,r-1}+a_{1\,1}a_{2\,0}+\cdots +a_{1\,r-1}a_{2\,r-2} )\\&\quad +(b_{1\,0}b_{2\,s-1}+ b_{1\,1}b_{2\,0}+\cdots +b_{1\,s-1}b_{2\,s-2})\\&= [v_1\cdot v_2^{(1)}]. \end{aligned}$$

As \(v_1\) is an arbitrary element of \(\mathrm {C}\), \(v_2^{(1)} \in \mathrm {C}^\bot \). Therefore, \(\mathrm {C}^\bot \) is a \({\mathbb {Z}}_2\mathrm {R}\)-cyclic code. \(\square \)

Let \(f(x)=f_0+f_1x+\cdots +f_nx^n, f_n\ne 0\) be a polynomial of degree n. Then, the reciprocal polynomial \(f^*(x)\) of f(x) is defined as \(f^*(x)=f_n+f_{n-1}x+\cdots +f_0x^n\), i.e., \(f^*(x)=x^nf(1/x)\).

Theorem 11

(Srinivasulu and Bhinthwal 2017) Let f and g be two binary polynomials such that \(\mathrm {deg}(f)\ge \mathrm {deg}(g)\). Then

1.:

\(\mathrm {deg}(f)\ge \mathrm {deg}(f^*)\), and equality holds if \(x \not \mid f\);

2.:

\((fg)^*=f^*g^*\);

3.:

\((f+g)^*=f^*+x^{\mathrm {deg}(f)-\mathrm {deg}(g)} g^*\);

4.:

\(g \mid f\Rightarrow g^*\mid f^*\) and

5.:

\((f,g)^*=(f^*,g^*)\).

Let \(m=\text {lcm}(r,s)\) and \(\theta _m(x)=\sum _{i=0}^{m-1}x^i\). Then it is easy to show that \(x^m-1=(x^r-1)\theta _{\frac{m}{r}}(x^r)=(x^s-1)\theta _{\frac{m}{s}}(x^s)\). Similar to [Borges2010, Definition 4.3], now we define a bilinear map \(\psi \) and study the orthogonal properties of elements of \( \mathrm {R}_{4,r,s}[x]\) under \(\psi \).

Definition 5

Let \(v_1(x)=(a_1(x)\mid b_1(x))\) and \(v_2(x)=(a_2(x)\mid b_2(x))\) be any two elements in \(\mathrm {R}_{4,r,s}[x]\). Let \( \psi :\mathrm {R}_{4,r,s}[x] \times \mathrm {R}_{4,r,s}[x]\mapsto \frac{\mathrm {R}[x]}{\langle x^m-1\rangle }\) be a mapping, such that

$$\begin{aligned} \psi (v_1(x),v_2(x))= & {} u^3 a_1(x)\theta _{\frac{m}{r}}(x^r)x^{m-1-deg(a_2(x))}a_2^*(x)\nonumber \\&\quad + b_1(x)\theta _{\frac{m}{s}}(x^s)x^{m-1-deg(b_2(x))} b_2^*(x) \ \mathrm \ {mod}(x^m-1). \end{aligned}$$

Lemma 1

Let \(v_1=(a_1\mid b_1)\) and \(v_2=(a_2\mid b_2)\) be elements in \({\mathbb {Z}}_2^r \times \mathrm {R}^s\) with associated polynomials \(v_1(x)=(a_1(x)\mid b_1(x))\) and \(v_2(x)=(a_2(x)\mid b_2(x))\) in \(\mathrm {R}_{4,r,s}[x]\). Then \(v_1\) is orthogonal to \(v_2\) and all its cyclic shifts if and only if \(\psi (v_1(x),v_2(x))=0\).

Proof

Let \(v_1=(a_{1\,0},a_{1\,1},\ldots ,a_{1\,r-1}\mid b_{1\,0},b_{1\,1},\ldots ,b_{1\,s-1}), v_2=(a_{2\,0},a_{2\,1}, \ldots , a_{2\,r-1} \mid b_{2\,0}, b_{2\,1}, \ldots , b_{2\,s-1}) \in {\mathbb {Z}}_2^r \times \mathrm {R}^s\), and \(v_2^{(i)}=(a_{2\,0-i},a_{2\,1-i}, \ldots , a_{2\,r-1-i} \mid b_{2\,0-i}, b_{2\,1-i}, \ldots ,b_{2\,s-1-i})\) be the i-th shift of \(v_2\). Then, \(v_1 \cdot v_2^{(i)}=0\) if and only if \(u^3\sum _{j=0}^{r-1}a_{1j}a_{2j-i}+\sum _{k=0}^{s-1}b_{1k}b_{2k-i}=0\). Now, from the definition of \(\psi \), we have

$$\begin{aligned} \psi (v_1(x),v_2(x))&= u^3\sum _{e=0}^{r-1}\left( \theta _{\frac{m}{r}}(x^r)\sum _{j=0}^{r-1}a_{1j}a_{2j-e}x^{m-1-e}\right) \nonumber \\&\quad + \sum _{t=0}^{s-1}\left( \theta _{\frac{m}{s}}(x^s)\sum _{k=0}^{s-1}b_{1k}b_{2k-t}x^{m-1-t}\right) \nonumber \\&=\theta _{\frac{m}{r}}(x^r) \left( u^3\sum _{e=0}^{r-1}\sum _{j=0}^{r-1}a_{1j}a_{2j-e}x^{m-1-e}\right) \nonumber \\&\quad + \theta _{\frac{m}{s}}(x^s)\left( \sum _{t=0}^{s-1}\sum _{k=0}^{s-1}b_{1k}b_{2k-t}x^{m-1-t}\right) \end{aligned}$$
(2)

Rearranging the terms in (2) and denoting the summation: \(u^3\sum _{j=0}^{r-1}a_{1j}a_{2j-i}+\sum _{k=0}^{s-1}b_{1k}b_{2k-i}\) by \(S_i\), we get

$$\begin{aligned} \psi (v_1(x),v_2(x))= \sum _{i=0}^{m-1}S_ix^{m-1-k}\ \ \mathrm {mod}\ (x^m-1). \end{aligned}$$

Therefore, \(\psi (v_1(x),v_2(x))=0\) if and only if \(S_i=0\) for all \(0\le i\le m-1\). The result follows as \(v_1 \cdot v_2^{(i)}=S_i, 0\le i \le m-1\). \(\square \)

The following result is a straightforward generalization of [Borges et al. (2010), Lemma 2].

Lemma 2

Let \(v_1(x)=\left( a_1(x)\mid b_1(x)\right) \) and \(v_2(x)=\left( a_2(x)\mid b_2(x)\right) \) be any two elements in \(\mathrm {R}_{4,r,s}[x]\) such that \(\psi \left( v_1(x),v_2(x)\right) =0\).

  1. 1.

    If \(a_1(x) =0\) or \(a_2(x)=0\), then \(b_1(x) b_2^*(x) =0\ \mathrm {mod}\ ( x^s-1)\).

  2. 2.

    If \(b_1(x) =0\) or \(b_2(x)=0\), then \(a_1(x) a_2^*(x) =0\ \mathrm {mod}\ (x^r-1)\).

Proof

Let \(a_1(x) =0\) or \(a_2(x)=0\). Then \(\psi \left( v_1(x),v_2(x) \right) =0+b_{1}(x) \theta _{\frac{m}{s}}(x^s)x^{m-\text {deg}(b_{2}(x))-1}b_{2}^*(x) =0\ \mathrm {mod}\ (x^m-1)\). This implies that \(b_{1}(x) \theta _{\frac{m}{s}}(x^s)x^{m-\text {deg}(b_{2}(x))-1}b_{2}^*(x) = (x^m-1)g(x)\) for some \(g(x) \in {\mathbb {Z}}_2[x]\). Taking \(f(x) =x^{\text {deg}(b_{2}(x))+1}g(x)\), we get \(b_{1}(x) \theta _{\frac{m}{s}}(x^s)x^{m}b_{2}^*(x) =f(x)(x^m-1)\), and therefore, \(b_{1}(x) (x^m-1)x^{m}b_{2}^*(x) =(x^m-1)(x^s-1)f(x)\). Since x and \(x^s-1\) are relatively prime, we have \(b_1 (x) b_2^*(x) =0\ \mathrm {mod}\ (x^s-1)\). Part (2) can be proved similarly. \(\square \)

Theorem 12

Let \(\mathrm {C}=\left\langle \left( f(x) \mid 0\right) , \left( l(x) \mid g(x)+ua_1(x)+u^2a_2(x)+u^3a_3(x) \right) \right\rangle \) be a \({\mathbb {Z}}_2\mathrm {R}\)-cyclic code of length (rs), where \(gh=x^s-1, g=a_1b_1,a_1=a_2b_2\) and \(a_2=a_3b_3\). Then

1.:

\(\frac{(f,hl)}{(f,l)}l \in \langle f,hl\rangle \);

2.:

\(\frac{(f,hlb_1)}{(f,hl)}hl \in \langle f,hlb_1\rangle \) and

3.:

\(\frac{(f,hlb_1b_2)}{(f,hlb_1)}hlb_1 \in \langle f,hlb_1b_2\rangle \).

Proof

Let \(hlb_1=\left( f, hlb_1\right) t_1\) and \(f=\left( f, hlb_1b_2 \right) t_2\). Then, there exist \(t_3\in {\mathbb {Z}}_2[x]\) such that \(hlb_1b_2=\left( f,\ hlb_1b_2 \right) t_1t_3\) with \((t_2,t_3)=1\). This in turns gives \(p_1t_2 + p_2t_3=1\) for some \(p_1,p_2\in {\mathbb {Z}}_2[x]\). Thus, \(p_1\frac{f}{\left( f, hlb_1b_2 \right) }+p_2\frac{hlb_1b_2}{\left( f, hlb_1b_2 \right) t_1}=1\), and therefore, \(p_1ft_1+p_2hlb_1b_2=\frac{(f,hlb_1b_2)}{(f,hlb_1)}hlb_1\). Hence, \(\frac{(f,hlb_1b_2)}{(f,hlb_1)}hlb_1 \in \langle f,hlb_1b_2\rangle \). Similarly, we can see that \(\frac{(f,hl)}{(f,l)}l \in \langle f,hl\rangle \) and \(\frac{(f,hlb_1)}{(f,hl)}hl \in \langle f,hlb_1\rangle \). \(\square \)

Theorem 13

Let \(\mathrm {C}=\left\langle \left( f(x) \mid 0\right) , \left( l(x) \mid g(x)+ua_1(x)+u^2a_2(x)+u^3a_3(x) \right) \right\rangle \) be a \({\mathbb {Z}}_2\mathrm {R}\)-cyclic code of length (rs) and \(\mathrm {C}^\bot \!=\! \left\langle \left( {\hat{f}}(x) \mid 0\right) , \left( {\hat{l}}(x) \mid {\hat{g}}(x)\!+\!u{\hat{a}}_1(x)\!+\!u^2{\hat{a}}_2(x)\!+\! u^3{\hat{a}}_3(x) \right) \right\rangle \) be the dual code of \(\mathrm {C}\). Then

$$\begin{aligned} {\hat{f}}(x)= \frac{x^r-1}{(f(x),l(x))^*}. \end{aligned}$$

Proof

Let \(\mathrm {C}_r\) be the projection of \(\mathrm {C}\) on first r coordinates. Then \(\mathrm {C}_r=\langle f,l \rangle \), which is cyclic in \({\mathbb {Z}}_2[x]/\langle x^r-1\rangle \). Since \({\mathbb {Z}}_2[x]/\langle x^r-1\rangle \) is a principal ideal ring, \(\mathrm {C}_r=\langle ( f,l) \rangle \), and therefore, \(\left( \mathrm {C}_r\right) ^\bot =\left\langle \frac{x^r-1}{( f,l)^*}\right\rangle \). From the definition of the dual, we have, for any \((a \mid b)\in \mathrm {C}\), \(\psi (({\hat{f}} \mid 0),(a \mid b))=0\ \mathrm {mod} \ (x^m-1)\). This implies that \({\hat{f}}a^*=0\ \mathrm {mod} \ (x^r-1) \). Thus \({\hat{f}} \in \left( \mathrm {C}_r\right) ^\bot \) and \(\frac{x^r-1}{( f,l)^*}\) divides \({\hat{f}}\). On the other hand, as \({\hat{f}}f^*=0\ \mathrm {mod} \ (x^r-1) \) and \({\hat{f}}l^*=0\ \mathrm {mod} \ (x^r-1) \) implies that \({\hat{f}}(f,l)^*=0\ \mathrm {mod} \ (x^r-1) \). Hence \({\hat{f}} \) divides \( \frac{x^r-1}{( f,l)^*} \), and therefore, \({\hat{f}}= \frac{x^r-1}{(f,l)^*}\). \(\square \)

Theorem 14

Let \(\mathrm {C}=\left\langle \left( f(x) \mid 0\right) , \left( l(x) \mid g(x)+ua_1(x)+u^2a_2(x)+u^3a_3(x) \right) \right\rangle \) be a \({\mathbb {Z}}_2\mathrm {R}\)-cyclic code of length (rs) and \(\mathrm {C}^\bot = \left\langle \left( {\hat{f}}(x) \mid 0\right) , \left( {\hat{l}}(x) \mid {\hat{g}}(x)+u{\hat{a}}_1(x)+u^2{\hat{a}}_2(x)+u^3{\hat{a}}_3(x) \right) \right\rangle \) be the dual code of \(\mathrm {C}\). Then

$$\begin{aligned} {\hat{g}}(x)= \frac{(x^s-1)(f(x), l(x)h(x)b_1(x)b_2(x))^*}{f^*(x) a_3^*(x)}.\end{aligned}$$

Proof

Since \((0 \mid u^3 g)=(0 \mid u^3 a_3b_1b_2b_3), (0 \mid u^3 a_1h)=(0 \mid u^3a_3b_2b_3h) \in \mathrm {C}\) and \((b_1, h )=1\), we have \((0 \mid u^3 a_3 b_2b_3)\in \mathrm {C}\). Again, as \((0 \mid u^3 a_2 b_1h)=(0 \mid u^3a_3b_1b_3h) \in \mathrm {C}\) and \((b_2, b_1h)=1\), we have \((0 \mid u^3 a_3b_3) \in \mathrm {C}\). Finally, as \((lhb_1b_2 \mid u^3 a_3 b_1 b_2 h)\in \mathrm {C}\) and \((b_3, b_1b_2h)=1\), there exist \(p \in Z_2[x]\) such that \((l h b_1b_2p \mid u^3a_3 ) \in \mathrm {C}\), and therefore, \(\left( 0 \ \big | \ u^3 \frac{f}{(f,lhb_1b_2)}a_3 \right) \in \mathrm {C}\).

Now, from definition of \(\psi \) and from Lemma 1, we have

$$\begin{aligned}&\psi \left( ({\hat{l}} \mid {\hat{g}}(x)+u{\hat{a}}_1(x)+u^2{\hat{a}}_2(x)+u^3{\hat{a}}_3(x) ), \left( 0 \ \big | \ u^3 \frac{f}{(f,lhb_1b_2)}a_3 \right) \right) \nonumber \\&\quad =0\ \ \mathrm {mod}\ (x^m-1). \end{aligned}$$
(3)

Furthermore, from Lemma 2, (3) is equivalent to

$$\begin{aligned} {\hat{g}} \frac{f^*}{(f,lhb_1b_2)^*}a_3^*=0 \ \ \mathrm {mod}\ (x^s-1). \end{aligned}$$

Therefore

$$\begin{aligned} {\hat{g}}= \frac{(x^s-1)(f,lhb_1b_2)^*}{f^*a_3^*}. \end{aligned}$$

\(\square \)

Remark 2

From Theorem 4, we have \(\mathrm {C}=\langle g+ua_1+u^2a_2+u^3a_3\rangle =\langle g,ua_1,u^2a_2,u^3a_3 \rangle \). Thus \(u^ia_i = m_i (g+ua_1+u^2a_2+u^3a_3)\), for some \(m_i \in \mathrm {R}[x],\ i= 1,2,3\).

Theorem 15

Let \(\mathrm {C}=\left\langle \left( f(x) \mid 0\right) , \left( l(x) \mid g(x)+ua_1(x)+u^2a_2(x)+u^3a_3(x) \right) \right\rangle \) be a \({\mathbb {Z}}_2\mathrm {R}\)-cyclic code of length (rs) and \(\mathrm {C}^\bot = \Big \langle \left( {\hat{f}}(x) \mid 0\right) , \Big ({\hat{l}}(x) \mid {\hat{g}}(x)+u{\hat{a}}_1(x)+u^2{\hat{a}}_2(x)+u^3{\hat{a}}_3(x) \Big ) \Big \rangle \) be the dual code of \(\mathrm {C}\). Then,

$$\begin{aligned} {\hat{a}}_1(x)= \frac{(x^s-1)(f(x), l(x)h(x)b_1(x))^*}{a_2^*(x) (f(x),l(x)h(x)b_1(x)b_2(x))^*}.\end{aligned}$$

Proof

From Theorem 12 part (3), we have \(\frac{(f,hlb_1b_2)}{(f,hlb_1)}hlb_1 = P_1 f + Q_1 hlb_1b_2\), for some \(P_1, Q_1 \in {\mathbb {Z}}_2[x]\). Thus, \((f \mid 0),\ (lhb_1 \mid u^2a_2hb_1 + u^3 a_3h b_1),\ (lhb_1b_2 \mid u^3 a_3h b_1b_2) \in \mathrm {C}\) implies that \(\left( 0 \ \Big | \ \frac{(f, lhb_1b_2)}{(f, lhb_1)}\left[ u^2a_2hb_1 + u^3 a_3h b_1 \right] +u^3 a_3h b_1b_2Q_1 \right) \in \mathrm {C}\). Since \((0 \mid u^2a_1h+u^3a_2h) \in \mathrm {C}\) and \((a_1,b_1)=1\), we have \(\left( 0 \ \big | \ \frac{(f, lhb_1b_2)}{(f, lhb_1)}\left[ u^2a_2h \right] +u^3 Q^\prime \right) \in \mathrm {C}\), for some polynomial \(Q^\prime \in \mathrm {C}\). Again, as \((0 \mid u^2g+u^3a_1)\in \mathrm {C}\) and \((g,h)=1\) implies that \(\left( 0 \ \big | \ \frac{(f, lhb_1b_2)}{(f, lhb_1)}\left[ u^2a_2 \right] +u^3 Q \right) \in \mathrm {C}\), for some \(Q \in \mathrm {C}\). Also, there exist \({\hat{m}}_1 \in \mathrm {R}[x]\) such that \((\delta ({\hat{m}}_1)l \mid {\hat{m}}_1 ({\hat{g}}+u{\hat{a}}_1+u^2{\hat{a}}_2+u^3{\hat{a}}_3))=(\delta ({\hat{m}}_1) \mid u{\hat{a}}_1)\in \mathrm {C}^\bot \).

Now, by Lemma 1, we have \(\psi \left( (\delta ({\hat{m}}_1) \mid u{\hat{a}}_1), \left( 0 \ \big | \ \frac{(f, lhb_1b_2)}{(f, lhb_1)}\left[ u^2a_2 \right] +u^3 Q \right) \right) =0\ \ \mathrm {mod}\ (x^m-1)\). This is equivalent to

$$\begin{aligned} {\hat{a}}_1 \frac{(f, lhb_1b_2)^*}{(f, lhb_1)^*} a_2^*=0\ \ \mathrm {mod}\ (x^s-1). \end{aligned}$$

Therefore

$$\begin{aligned} {\hat{a}}_1= \frac{(x^s-1)(f, lhb_1)^*}{a_2^*(f,lhb_1b_2)^*}. \end{aligned}$$

\(\square \)

Theorem 16

Let \(\mathrm {C}=\left\langle \left( f(x) \mid 0\right) , \left( l(x) \mid g(x)+ua_1(x)+u^2a_2(x)+u^3a_3(x) \right) \right\rangle \) be a \({\mathbb {Z}}_2\mathrm {R}\)-cyclic code of length (rs) and \(\mathrm {C}^\bot = \Big \langle \left( {\hat{f}}(x) \mid 0\right) , \Big ({\hat{l}}(x) \mid {\hat{g}}(x)+u{\hat{a}}_1(x)+u^2{\hat{a}}_2(x)+u^3{\hat{a}}_3(x) \Big ) \Big \rangle \) be the dual code of \(\mathrm {C}\). Then,

$$\begin{aligned} {\hat{a}}_2(x)= \frac{(x^s-1)(f(x), l(x)h(x))^*}{a_1^*(x) (f(x),l(x)h(x)b_1(x))^*}. \end{aligned}$$

Proof

Again, from Theorem 12 part (2), we have \(\frac{(f,lhb_1)}{(f,lh)}lh = P_2 f + Q_2lhb_1\), for some \(P_2,Q_2\in {\mathbb {Z}}_2[x]\). Thus, \((f \mid o), (lh \mid ua_1h+ u^2 a_2 h +u^3a_3 h ), (lhb_1 \mid u^2 a_2 h b_1 +u^3a_3 hb_1 ) \in \mathrm {C}\) implies \(\left( 0 \ \big | \ \frac{(f, lhb_1)}{(f, lh)} \left[ ua_1h+ \right. \right. \left. \left. u^2 a_2 h +u^3a_3 h \right] +Q_2 \left[ u^2 a_2 h b_1 +u^3a_3 hb_1 \right] \right) \in \mathrm {C}\). Since \(( 0 \mid ug+ u^2a_1+u^3a_2) \in \mathrm {C}\) and \((g, h)=1\), we get \( \left( 0 \ \big | \ \frac{(f, lhb_1)}{(f, lh)} \left[ ua_1 \right] +u^2Q^{\prime \prime } \right) \in \mathrm {C}\), for some \(Q^{\prime \prime }\) in \(\mathrm {R}[x]\) . Also, there exist \({\hat{m}}_2 \in \mathrm {R}[x]\) (from Remark 2) such that \((\delta ({\hat{m}}_2)l \mid {\hat{m}}_2 ({\hat{g}}+u{\hat{a}}_1+u^2{\hat{a}}_2+u^3{\hat{a}}_3))=(\delta ({\hat{m}}_2) \mid u^2{\hat{a}}_2)\in \mathrm {C}^\bot \). Therefore, from Lemma 1, we have \(\psi \left( (\delta ({\hat{m}}_2) \mid u^2{\hat{a}}_2), \left( 0 \ \big | \ \frac{(f, lhb_1)}{(f, lh)} \left[ ua_1 \right] +u^2Q^{\prime \prime } \right) \right) =0\ \ \mathrm {mod}\ (x^m-1)\), which is further equivalent to

$$\begin{aligned} {\hat{a}}_2 \frac{(f, lhb_1)^*}{(f, lh)^*}a_1^*=0\ \ \mathrm {mod}\ (x^s-1). \end{aligned}$$

Thus,

$$\begin{aligned} {\hat{a}}_2= \frac{(x^s-1)(f, lh)^*}{a_1^*(f,lhb_1)^*}. \end{aligned}$$

\(\square \)

Theorem 17

Let \(\mathrm {C}=\left\langle \left( f(x) \mid 0\right) , \left( l(x) \mid g(x)+ua_1(x)+u^2a_2(x)+u^3a_3(x) \right) \right\rangle \) be a \({\mathbb {Z}}_2\mathrm {R}\)-cyclic code of length (rs) and \(\mathrm {C}^\bot = \Big \langle \left( {\hat{f}}(x) \mid 0\right) , \Big ({\hat{l}}(x) \mid {\hat{g}}(x)+u{\hat{a}}_1(x)+u^2{\hat{a}}_2(x)+u^3{\hat{a}}_3(x) \Big ) \Big \rangle \) be the dual code of \(\mathrm {C}\). Then

$$\begin{aligned} {\hat{a}}_3(x)= \frac{(x^s-1)(f(x), l(x))^*}{g^*(x) (f(x),l(x)h(x))^*}. \end{aligned}$$

Proof

Since \((f \mid 0), (l \mid g+ua_1+u^2a_2+u^3a_3 ) \) and \((lh \mid ua_1h+u^2a_2h+u^3a_3h ) \in \mathrm {C}\), and by Theorem 12 part (1), we have \(( 0 \ \big |\ \frac{(f,lh)}{(f,l)} \left[ g+ua_1+u^2a_2+u^3a_3 \right] + Q_3 \left[ ua_1h+u^2a_2h+u^3a_3h \right] ) \in \mathrm {C}\), for some \(Q_3 \in \mathrm {R}[x]\). As \((0 \mid u^3 {\hat{a}}_3 )\in \mathrm {C}^\bot \), \(\psi \left( \left( 0 \mid u^3 {\hat{a}}_3 \right) , \left( 0 \ \big |\ \frac{(f,lh)}{(f,l)} \left[ g+ua_1+u^2a_2+u^3a_3 \right] + Q_3 \left[ ua_1h+u^2a_2h+u^3a_3h \right] \right) \right) =0\ \ \mathrm {mod}\ (x^m-1).\)

This is equivalent to

$$\begin{aligned} {\hat{a}}_3 \frac{(f,lh)^*}{(f,l)^*} g^*=0 \ \ \mathrm {mod}\ (x^s-1). \end{aligned}$$

Therefore

$$\begin{aligned} {\hat{a}}_3= \frac{(x^s-1)(f, l)^*}{g^*(f,lh)^*}. \end{aligned}$$

\(\square \)

Now, we determine the explicit form of l(x) in \({\mathbb {Z}}_{2,r}[x]\). Note that \((g+ua_1+u^2a_2+u^3a_3)^*=g^*+ux^{\text {deg}{(g)}-\text {deg}{(a_1)}}a_1^*+u^2x^{\text {deg}{(g)}-\text {deg}{(a_2)}}a_2^*+u^3x^{\text {deg}{(g)}-\text {deg}{(a_3)}}a_3^*\).

Lemma 3

Let \(\mathrm {C}=\left\langle \left( f(x) \mid 0\right) , \left( l(x) \mid g(x)+ua_1(x)+u^2a_2(x)+u^3a_3(x) \right) \right\rangle \) be a \({\mathbb {Z}}_2\mathrm {R}\)-cyclic code of length (rs) such that \(gh=x^s-1, g=a_1b_1,a_1=a_2b_2\) and \(a_2=a_3b_3\). Then \(f \big | lhb_1b_2b_3\).

Proof

As \(hb_1b_2b_3 (l \mid g+ua_1+u^2a_2+u^3a_3 ) = (lhb_1b_2b_3 \mid 0) \in \mathrm {C}\), we have \(f \big | lhb_1b_2b_3\) from Remark 1. \(\square \)

Lemma 4

Let \(\mathrm {C}=\left\langle \left( f(x) \mid 0\right) , \left( l(x) \mid g(x)+ua_1(x)+u^2a_2(x)+u^3a_3(x) \right) \right\rangle \) be a \({\mathbb {Z}}_2\mathrm {R}\)-cyclic code of length (rs) and \(\mathrm {C}^\bot = \Big \langle \left( {\hat{f}}(x) \mid 0\right) , ({\hat{l}}(x) \mid {\hat{g}}(x)+u{\hat{a}}_1(x)+u^2{\hat{a}}_2(x)+u^3{\hat{a}}_3(x) ) \Big \rangle \) be the dual code of \(\mathrm {C}\). Then, \(\theta _{\frac{m}{s}}(x^s) {\hat{g}}a_1^*, \theta _{\frac{m}{s}}(x^s){\hat{g}}g^*, \theta _{\frac{m}{s}}(x^s) {\hat{g}} a_2^*, \theta _{\frac{m}{s}}(x^s) {\hat{a}}_1 g^*, \theta _{\frac{m}{s}}(x^s) {\hat{a}}_1 a_1^*\) and \(\theta _{\frac{m}{s}}(x^s) {\hat{a}}_2 g^*\) are congruent to 0 modulo \((x^m-1)\).

Proof

Consider

$$\begin{aligned} \theta _{\frac{m}{s}}(x^s) {\hat{g}}a_1^*&= \frac{\theta _{\frac{m}{s}}(x^s) (x^s-1)(f,lhb_1b_2)^*a_1^*}{f^*a_3^*}\\&= \frac{(x^m-1)(f,lhb_1b_2)^*a_3^*b_3^*b_2^*}{f^*a_3^*} \\&= \frac{(x^m-1)(fb_3,lhb_1b_2b_3)^*a_3^*b_2^*}{f^*a_3^*} \\&\equiv 0 ~~~~~~~~\text{ mod }~(x^m-1) \end{aligned}$$

from Lemma 3. The other part of the result can be proved with similar arguments. \(\square \)

Theorem 18

Let \(\mathrm {C}=\left\langle \left( f(x) \mid 0\right) , \left( l(x) \mid g(x)+ua_1(x)+u^2a_2(x)+u^3a_3(x) \right) \right\rangle \) be a \({\mathbb {Z}}_2\mathrm {R}\)-cyclic code of length (rs) and \(\mathrm {C}^\bot = \Big \langle \left( {\hat{f}}(x) \mid 0\right) , ({\hat{l}}(x) \mid {\hat{g}}(x)+u{\hat{a}}_1(x)+u^2{\hat{a}}_2(x)+u^3{\hat{a}}_3(x) ) \Big \rangle \) be the dual code of \(\mathrm {C}\). Let \(\rho =\frac{l^*(x)}{(f(x),l(x))^*}\). Then

$$\begin{aligned} {\hat{l}}(x)= \frac{x^r-1}{f^*(x)}\lambda (x), \end{aligned}$$

where

$$\begin{aligned} \lambda (x) = \rho ^{-1}\left[ \frac{(f,lhb_1b_2)^*}{(f,l)^*}x^{m-\text {deg}{({a}_3)}+\text {deg}{(l)}} + \frac{(f,lhb_1)^*}{(f,lhb_1b_2)^*} \frac{f^*}{(f,l)^*} x^{m-\text {deg}{({a}_2)}+\text {deg}{(l)}} + \right. \\ \left. \frac{(f,lh)^*}{(f,lhb_1)^*} \frac{f^*}{(f,l)^*} x^{m-\text {deg}{({a}_1)}+\text {deg}{(l)}} + \frac{f^*}{(f,lh)^*} x^{m-\text {deg}{(g)}+\text {deg}{(l)}} \right] \text{ mod }~ \left( \frac{f^*}{(f,l)^*} \right) \end{aligned}$$

Proof

As \(({\hat{l}} \mid {\hat{g}}+u{\hat{a}}_1+u^2{\hat{a}}_2+u^3{\hat{a}}_3 ) \in \mathrm {C}^\bot \) and \((f \mid 0)\in \mathrm {C}\), we have \(\psi ((f \mid 0),({\hat{l}} \mid {\hat{g}}+u{\hat{a}}_1+u^2{\hat{a}}_2+u^3{\hat{a}}_3 ))=0~~ \text{ mod }~(x^m-1)\). From Lemma 2, it follows that \({\hat{l}}f^*=0~~ \mathrm {mod}~(x^r-1)\). Then \({\hat{l}}=\frac{x^r-1}{f^*}\lambda \) for some \(\lambda \in {\mathbb {Z}}_2[x]\). Again, as \(({\hat{l}} \mid {\hat{g}}+u{\hat{a}}_1+u^2{\hat{a}}_2+u^3{\hat{a}}_3 )\in \mathrm {C}^\bot \) and \((l \mid g+ua_1+u^2a_2+u^3a_3 )\in \mathrm {C}\), \(\psi (({\hat{l}} \mid {\hat{g}}+u{\hat{a}}_1+u^2{\hat{a}}_2+u^3{\hat{a}}_3 ),(l \mid g+ua_1+u^2a_2+u^3a_3 ))=0~~ \text{ mod }~(x^m-1)\). This implies that

$$\begin{aligned}&u^3 {\hat{l}} l^*\theta _{\frac{m}{r}}(x^r) x^{m-\text {deg}{(l)}-1}+ \left( {\hat{g}}+u{\hat{a}}_1+u^2{\hat{a}}_2+u^3{\hat{a}}_3 \right) \left( g+ua_1+u^2a_2+u^3a_3 \right) ^*\nonumber \\&\theta _{\frac{m}{s}}(x^s) x^{m-\text {deg}{(g)}-1}=0~~ \text{ mod }~(x^m-1). \end{aligned}$$
(4)

Rewriting (4), we have

$$\begin{aligned}&u^3 {\hat{l}} l^*\theta _{\frac{m}{r}}(x^r) x^{m-\text {deg}{(l)}-1}+ \left( {\hat{g}}+u{\hat{a}}_1+u^2{\hat{a}}_2+u^3{\hat{a}}_3 \right) \nonumber \\&\quad \left( g^*+ux^{\text {deg}{(g)}-\text {deg}{(a_1)}}a_1^*+u^2x^{\text {deg}{(g)}-\text {deg}{(a_2)}}a_2^*\right. \nonumber \\&\left. \quad + u^3x^{\text {deg}{(g)}-\text {deg}{(a_3)}}a_3^*\right) \theta _{\frac{m}{s}}(x^s) x^{m-\text {deg}{(g)}-1} =0~~ \text{ mod }~(x^m-1). \end{aligned}$$
(5)

Or

$$\begin{aligned}&u^3 {\hat{l}} l^*\theta _{\frac{m}{r}}(x^r) x^{m-\text {deg}{(l)}-1}+ \theta _{\frac{m}{s}}(x^s) \nonumber \\&\quad \left[ x^{m-\text {deg}{(g)}-1} {\hat{g}} g^*+ u x^{m-\text {deg}{(a_1)}-1} {\hat{g}} a_1^*+ u^2 x^{m-\text {deg}{(a_)}-1} {\hat{g}} a_2^*\right. \nonumber \\&\left. \qquad + u^3 x^{m-\text {deg}{(a_3)}-1} {\hat{g}} a_3^*+ u x^{m-\text {deg}{(g)}-1} {\hat{a}}_1 g^*+ u^2 x^{m-\text {deg}{(a_1)}-1} {\hat{a}}_1 a_1^*+ u^3 x^{m-\text {deg}{(a_2)}-1} {\hat{a}}_1 a_2^*\right. \nonumber \\&\left. \qquad + u^2 x^{m-\text {deg}{(g)}-1} {\hat{a}}_2 g^*+ u^3 x^{m-\text {deg}{(a_1)}-1} {\hat{a}}_2 a_1^*+ u^3 x^{m-\text {deg}{(g)}-1} {\hat{a}}_3 g^*\right] \nonumber \\&\quad =0 \text{ mod }~(x^m-1). \end{aligned}$$
(6)

From Lemma 4, the summands in (6) containing other than \(u^3\) is 0 mod \((x^m-1)\). This in turn gives

$$\begin{aligned}&u^3 {\hat{l}} l^*\theta _{\frac{m}{r}}(x^r) x^{m-\text {deg}{(l)}-1}+ \theta _{\frac{m}{s}}(x^s) \nonumber \\&\quad \left[ u^3 x^{m-\text {deg}{(a_3)}-1} {\hat{g}} a_3^*+ u^3 x^{m-\text {deg}{(a_2)}-1} {\hat{a}}_1 a_2^*+ u^3 x^{m-\text {deg}{(a_1)}-1} {\hat{a}}_2 a_1^*\right. \nonumber \\&\left. \quad + u^3 x^{m-\text {deg}{(g)}-1} {\hat{a}}_3 g^*\right] =0~~~~ \text{ mod }~(x^m-1). \end{aligned}$$
(7)

Substituting the values \({\hat{l}}, {\hat{g}}, {\hat{a}}_1, {\hat{a}}_2\) and \({\hat{a}}_3\) in (7), we get

$$\begin{aligned}&u^3 \frac{(x^r-1)}{f^*}l^*\lambda \theta _{\frac{m}{r}}(x^r) x^{m-\text {deg}{(l)}-1}+ \theta _{\frac{m}{s}}(x^s) \left[ u^3 x^{m-\text {deg}{(a_3)}-1} \frac{(x^s-1)(f,lhb_1b_2)^*}{f^*a_3^*} a_3^*\right. \nonumber \\&\left. \quad + u^3 x^{m-\text {deg}{(a_2)}-1} \frac{(x^s-1)(f,lhb_1)^*}{(f,lhb_1b_2)^*a_2^*} a_2^*+ u^3 x^{m-\text {deg}{(a_1)}-1} \frac{(x^s-1)(f,lh)^*}{(f,lhb_1)^*a_1^*} a_1^*\right. \nonumber \\&\left. \quad +u^3 x^{m-\text {deg}{(g)}-1} \frac{(x^s-1)(f,l)^*}{(f,lh)^*a_1^*} g^*\right] =0~\text{ mod }~(x^m-1). \end{aligned}$$
(8)

Rewriting (8), we get

$$\begin{aligned}&u^3 \frac{(x^m-1)(f,l)^*}{f^*}\nonumber \\&\quad \left[ \frac{l^*}{(f,l)^*}\lambda x^{m-\text {deg}{(l)}-1} + \frac{(f,lhb_1b_2)^*}{(f,l)^*} x^{m-\text {deg}{(a_3)}-1} + \frac{(f,lhb_1)^*}{(f,lhb_1b_2)^*} \frac{f^*}{(f,l)^*} x^{m-\text {deg}{(a_2)}-1} +\right. \nonumber \\&\left. \quad \frac{(f,lh)^*}{(f,lhb_1)^*} \frac{f^*}{(f,l)^*} x^{m-\text {deg}{(a_1)}-1} + \frac{f^*}{(f,lh)^*} x^{m-\text {deg}{(g)}-1} \right] \nonumber \\&\quad =0~ \text{ mod }~(x^m-1). \end{aligned}$$
(9)

This is equivalent, over \({\mathbb {Z}}_2\), to

$$\begin{aligned}&\frac{(x^m-1)(f,l)^*}{f^*} \left[ \frac{l^*}{(f,l)^*}\lambda x^{m-\text {deg}{(l)}-1} + \frac{(f,lhb_1b_2)^*}{(f,l)^*} x^{m-\text {deg}{(a_3)}-1} \right. \nonumber \\&\left. \quad + \frac{(f,lhb_1)^*}{(f,lhb_1b_2)^*} \frac{f^*}{(f,l)^*} x^{m-\text {deg}{(a_2)}-1} \right. \nonumber \\&\left. \quad + \frac{(f,lh)^*}{(f,lhb_1)^*} \frac{f^*}{(f,l)^*} x^{m-\text {deg}{(a_1)}-1} + \frac{f^*}{(f,lh)^*} x^{m-\text {deg}{(g)}-1} \right] =0~\text{ mod }~(x^m-1).\nonumber \\ \end{aligned}$$
(10)

Since \(\frac{f^*}{ (f,l)^*}\) divides \(x^m-1\), (10) is equivalent to

$$\begin{aligned}&\left[ \frac{l^*}{(f,l)^*}\lambda x^{m-\text {deg}{(l)}-1} + \frac{(f,lhb_1b_2)^*}{(f,l)^*} x^{m-\text {deg}{(a_3)}-1} + \frac{(f,lhb_1)^*}{(f,lhb_1b_2)^*} \frac{f^*}{(f,l)^*} x^{m-\text {deg}{(a_2)}-1} \right. \nonumber \\&\qquad \left. + \frac{(f,lh)^*}{(f,lhb_1)^*} \frac{f^*}{(f,l)^*} x^{m-\text {deg}{(a_1)}-1} + \frac{f^*}{(f,lh)^*} x^{m-\text {deg}{(g)}-1} \right] \nonumber \\&\quad =0~~~~ \text{ mod }~~\left( \frac{f^*}{ (f,l)^*}\right) . \end{aligned}$$
(11)

Also, since \(\frac{f^*}{ (f,l)^*}\) and \(\frac{l^*}{ (f,l)^*}\) are relatively prime, \(\frac{l^*}{ (f,l)^*}\) is invertible modulo \(\left( \frac{f^*}{ (f,l)^*} \right) \). Thus,

$$\begin{aligned} \lambda = \rho ^{-1}\left[ \frac{(f,lhb_1b_2)^*}{(f,l)^*}x^{m-\text {deg}{({a}_3)}+\text {deg}{(l)}} + \frac{(f,lhb_1)^*}{(f,lhb_1b_2)^*} \frac{f^*}{(f,l)^*} x^{m-\text {deg}{({a}_2)}+\text {deg}{(l)}} \right. \\ \quad \left. + \frac{(f,lh)^*}{(f,lhb_1)^*} \frac{f^*}{(f,l)^*} x^{m-\text {deg}{({a}_1)}+\text {deg}{(l)}} + \frac{f^*}{(f,lh)^*} x^{m-\text {deg}{(g)}+\text {deg}{(l)}} \right] \text{ mod }~~~~~~~~~ \left( \frac{f^*}{(f,l)^*} \right) . \end{aligned}$$

\(\square \)

Corollary 4

Let \(\mathrm {C}=\left\langle \left( f(x) \mid 0\right) , \left( l(x) \mid g(x)+ua_1(x)+u^2a_2(x)+u^3a_3(x) \right) \right\rangle \) be a \({\mathbb {Z}}_2\mathrm {R}\)-cyclic code such that \(f (x)\big | l(x)\). Then \({\hat{l}}(x)=0\) and \(\mathrm {C}^\bot = \langle ({\hat{f}}(x) \mid 0), (0 \mid {\hat{g}}(x)+u{\hat{a}}_1(x)+u^2{\hat{a}}_2(x)+u^3{\hat{a}}_3(x) ) \rangle \).

Proof

If f divides l, from Theorem 18, we have

$$\begin{aligned} \lambda&=\rho ^{-1}\left[ x^{m-\text {deg}{({a}_3)}+\text {deg}{(l)}} + x^{m-\text {deg}{({a}_2)}+\text {deg}{(l)}} \right. \\&\quad \left. + x^{m-\text {deg}{({a}_1)}+\text {deg}{(l)}} + x^{m-\text {deg}{(g)}+\text {deg}{(l)}} \right] ~~~~~ (\text{ mod }~~~~ 1) \\&= 0. \end{aligned}$$

Therefore, \({\hat{l}}=0\). \(\square \)

Corollary 5

Let \(\mathrm {C}=\left\langle g(x)+ua_1(x)+u^2a_2(x)+u^3a_3(x) \right\rangle \) be an \(\mathrm {R}\)-cyclic code of odd length n, where \(a_3(x) \big | a_2(x) \big | a_1(x) \big | g(x)\big | (x^n-1)\) over \({\mathbb {Z}}_2\). Then, \(\mathrm {C}^\bot = \Big \langle \frac{x^n-1}{a_3^*(x)}+u \frac{x^n-1}{a_2^*(x)}+u^2\frac{x^n-1}{a_1^*(x)}+u^3\frac{x^n-1}{g^*(x)}\Big \rangle \).

Summarizing the results from Theorems 13 to 18, we have the following result.

Theorem 19

Let \(\mathrm {C}=\left\langle \left( f(x) \mid 0\right) , \left( l(x) \mid g(x)+ua_1(x)+u^2a_2(x)+u^3a_3(x) \right) \right\rangle \) be a \({\mathbb {Z}}_2\mathrm {R}\)-cyclic code of length (rs) and \(\mathrm {C}^\bot = \left\langle \left( {\hat{f}}(x) \mid 0\right) , \Big ({\hat{l}}(x) \mid {\hat{g}}(x)+u{\hat{a}}_1(x)+u^2{\hat{a}}_2(x)+u^3{\hat{a}}_3(x) \Big ) \right\rangle \) be dual code of \(\mathrm {C}\). Then,

  1. 1.

    \({\hat{f}}(x)= \frac{x^r-1}{(f(x),l(x))^*}\);

  2. 2.

    \({\hat{g}}(x)= \frac{(x^s-1)(f(x), l(x)h(x)b_1(x)b_2(x))^*}{f^*(x) a_3^*(x)}\);

  3. 3.

    \({\hat{a}}_1(x)= \frac{(x^s-1)(f(x), l(x)h(x)b_1(x))^*}{a_2^*(x) (f(x),l(x)h(x)b_1(x)b_2(x))^*}\);

  4. 4.

    \({\hat{a}}_2(x)= \frac{(x^s-1)(f(x), l(x)h(x))^*}{a_1^*(x) (f(x),l(x)h(x)b_1(x))^*}\);

  5. 5.

    \({\hat{a}}_3(x)= \frac{(x^s-1)(f(x), l(x))^*}{g^*(x) (f(x),l(x)h(x))^*}\) and

  6. 6.

    \({\hat{l}}(x)= \frac{x^r-1}{f^*(x)}\lambda (x)\), where

    $$\begin{aligned} \lambda (x) = \rho ^{-1}\left[ \frac{(f,lhb_1b_2)^*}{(f,l)^*}x^{m-\text {deg}{({a}_3)}+\text {deg}{(l)}} + \frac{(f,lhb_1)^*}{(f,lhb_1b_2)^*} \frac{f^*}{(f,l)^*} x^{m-\text {deg}{({a}_2)}+\text {deg}{(l)}} + \right. \\ \left. \frac{(f,lh)^*}{(f,lhb_1)^*} \frac{f^*}{(f,l)^*} x^{m-\text {deg}{({a}_1)}+\text {deg}{(l)}} + \frac{f^*}{(f,lh)^*} x^{m-\text {deg}{(g)}+\text {deg}{(l)}} \right] \text{ mod }~~~~~~~~~ \left( \frac{f^*}{(f,l)^*} \right) . \end{aligned}$$

Example 3

Let \(\mathrm {C}=\langle (x^4+x^3+x^2+x+1 \mid 0), (x+1 \mid x+1)\rangle \) be a \({\mathbb {Z}}_2\mathrm {R}\)-cyclic code of length (5, 5). Then \(\mathrm {C}\) is of type (5, 5; 1; 4, 0, 0, 0), and the Gray image of \(\mathrm {C}\) under \(\phi \) is an optimal binary code with parameters [25, 17, 4]. Let \(f(x)=x^4+x^3+x^2+x+1\) and \(l(x)=g(x)=a_1(x)=a_2(x)=a_3(x)=x+1\). If \(\mathrm {C}^\bot = \langle ({\hat{f}}(x) \mid 0), (0 \mid {\hat{g}}(x)+u{\hat{a}}_1(x)+u^2{\hat{a}}_2(x)+u^3{\hat{a}}_3(x) ) \rangle \) is the dual code of \(\mathrm {C}\), then from Theorem 19, we have \({\hat{g}}(x)={\hat{a}}_1(x)={\hat{a}}_2(x)= x^4+x^3+x^2+x+1, \ {\hat{a}}_3(x)=1\) and \({\hat{f}}(x)=x^5-1\). Since \(\rho = \frac{l}{(f,l)}=x+1\) and \(\frac{f}{(f,l)}=x^4+x^3+x^2+x+1\), we get \(\rho ^{-1}=x^3+x \ (\text{ mod }\ x^4+x^3+x^2+x+1)\), \(\lambda =x^3+x \ (\text{ mod }\ x^4+x^3+x^2+x+1)\) and \({\hat{l}}=x^4+x^3+x^2+x\). Therefore, \(\mathrm {C}^\bot =\langle (x^5-1 \mid 0),(x^4+x^3+x^2+x \mid (1+u+u^2)(x^4+x^3+x^2+x+1)+u^3)\rangle \). The type of \(\mathrm {C}^\bot \) is (5, 5; 0; 1, 0, 0, 4), and Gray image of \(\mathrm {C}^\bot \) under \(\phi \) is a binary [25, 8, 5]-linear code.

5 Separable \({\mathbb {Z}}_2\mathrm {R}\)-cyclic codes

A \({\mathbb {Z}}_2\mathrm {R}\)-cyclic code of block length (rs) is called separable if \(\mathrm {C}=\mathrm {C}_r \times \mathrm {C}_s\). Let \(\mathrm {C}=\langle (f(x)\mid 0),(0\mid g(x)+ua_1(x)+u^2a_2(x)+u^3a_3(x))\rangle \) be a separable \({\mathbb {Z}}_2\mathrm {R}\)-cyclic code of block length (rs), s odd. Also, let the dual code of \(\mathrm {C}\) be \(\mathrm {C}^\bot =\langle ({\hat{f}}(x)\mid 0),({\hat{l}}(x)\mid {\hat{g}}(x)+u{\hat{a}}_1(x)+u^2{\hat{a}}_2(x)+u^3{\hat{a}}_3(x))\rangle \). Then from Theorem 19, we have \({\hat{f}}=\frac{x^r-1}{f^*}\), \({\hat{g}}=\frac{x^s-1}{a^*_3}\), \({\hat{a}}_1=\frac{x^s-1}{a_2^*}\), \({\hat{a}}_2=\frac{x^s-1}{a_1^*}\) and \({\hat{a}}_3=\frac{x^s-1}{g^*}\). Furthermore, as \(\frac{f^*}{(f,l)^*}=1\), we have \(\lambda =0\). This in turn gives \({\hat{l}}=0\).

The generator matrix of \(\mathrm {C}\) is permutation equivalent to a matrix of the form

$$\begin{aligned} G_S=\left( \begin{array}{cc|ccccc} I_{k_o}&{}{\bar{A}}_{01}&{}0 &{}0 &{}0 &{}0 &{}0 \\ \hline 0 &{}0 &{}I_{k_1}&{}A_{01} &{}A_{02} &{}A_{03} &{}A_{04} \\ 0 &{}0 &{} 0 &{}uI_{k_2}&{}uA_{12} &{}uA_{13} &{}uA_{14} \\ 0 &{}0 &{}0 &{}0 &{}u^2I_{k_3}&{}u^2A_{23} &{}u^2A_{24} \\ 0 &{}0 &{}0 &{}0 &{}0 &{}u^3I_{k_4} &{}u^3A_{34} \\ \end{array} \right) , \end{aligned}$$
(12)
Table 1 Gray images of \({\mathbb {Z}}_2\mathrm {R}\)-cyclic codes

The following theorem gives generator polynomials of a separable \({\mathbb {Z}}_2\mathrm {R}\)-cyclic code and its dual.

Theorem 20

Let \(\mathrm {C}=\langle (f(x)\mid 0),(0\mid g(x)+ua_1(x)+u^2a_2(x)+u^3a_3(x))\rangle \) be a separable \({\mathbb {Z}}_2\mathrm {R}\)-cyclic code of length (rs) and \(\mathrm {C}^\bot \) be the dual code of \(\mathrm {C}\). Then,

1.:

\(\mathrm {C}^\bot \) is also a separable \({\mathbb {Z}}_2\mathrm {R}\)-cyclic code of block length (rs);

2.:

\(\mathrm {C}^\bot =\left\langle \left( \frac{x^r-1}{f^*(x)} ~\big |~ 0\right) , \left( 0 ~\big |~ \frac{x^s-1}{a_3^*(x)}+u \frac{x^s-1}{a_2^*(x)}+u^2\frac{x^s-1}{a_1^*(x)}+u^3\frac{x^s-1}{g^*(x)}\right) \right\rangle \) and

3.:

\(d(\mathrm {C})= \mathrm {min}\{d_H(\mathrm {C}_r),d_H(\mathrm {C}_s)\}\).

Remark 3

Let \(\mathrm {C}=\langle (f(x)\mid 0),(l(x) \mid g(x)+ua_1(x)+u^2a_2(x)+u^3a_3(x))\rangle \) be a \({\mathbb {Z}}_2\mathrm {R}\)-cyclic code. If \(f(x)\big |l(x)\), then \(\mathrm {C}\) is separable.

Remark 4

If \(\mathrm {C}\) is a non-separable \({\mathbb {Z}}_2\mathrm {R}\)-cyclic code of block length (rs), then \(d_{min}(\mathrm {C})\ge \mathrm {min} \{d_H(\mathrm {C}_r),d_H(\mathrm {C}_s)\}\).

Example 4

Let \(\mathrm {C}=\langle (x+1\mid 0),(0\mid x^2+x+1)\rangle \) be a separable \({\mathbb {Z}}_2\mathrm {R}\)-cyclic code of block length (3, 3). Then, from Theorem 20, the dual code of \(\mathrm {C}\) is \(\mathrm {C}^\bot =\langle (x^2+x+1\mid 0),(0\mid x+1)\rangle \). Clearly, \(\mathrm {C}\) and \(\mathrm {C}^\bot \) are of the types (3, 3; 2; 1, 0, 0, 0) and (3, 3; 1; 2, 0, 0, 0), respectively. Also, the Gray image of \(\mathrm {C}^\bot \) under \(\phi \) is a binary linear code with parameters [15, 9, 2].

Table 1 presents some good binary codes obtained as Gray images of \({\mathbb {Z}}_2\mathrm {R}\)-cyclic codes. Note that the parameters marked with ‘\(*\)’ denotes the optimal binary codes according to the online database (Grassl 2022).

6 Conclusions

This paper is devoted to study \({\mathbb {Z}}_2\mathrm {R}\)-cyclic codes of length (rs), where \(\mathrm {R}= {\mathbb {Z}}_2+u{\mathbb {Z}}_2+u^2{\mathbb {Z}}_2+u^3{\mathbb {Z}}_2\) with \(u^4=0\). We first determined generator polynomials of \({\mathbb {Z}}_2\mathrm {R}\)-cyclic codes, and presented a minimal spanning set. Furthermore, we gave the relationship between \({\mathbb {Z}}_2\mathrm {R}\)-cyclic codes and their duals for odd integral values of s. Binary optimal codes obtained as Gray images of \({\mathbb {Z}}_2\mathrm {R}\)-cyclic codes are listed. Generalizing these results and determining the structure of dual codes of \({\mathbb {Z}}_2{\mathbb {Z}}_2[u^k]\)-cyclic codes is a future interesting problem.