# Gray Images of Cyclic Codes over $\mathbb{Z}_{p^{2}}$ and
$\mathbb{Z}_{p}\mathbb{Z}_{p^{2}}$††thanks: This research is supported by the
National Natural Science Foundation of China (12071001).

Xuan Wang, Minjia Shi
Key Laboratory of Intelligent Computing and Signal Processing, Ministry of
Education,
School of Mathematical Sciences, Anhui University, Hefei, 230601, China

###### Abstract

In the paper, we firstly study the algebraic structures of
$\mathbb{Z}_{p}\mathbb{Z}_{p^{k}}$-additive cyclic codes and give the
generator polynomials and the minimal spanning set of these codes. Secondly, a
necessary and sufficient condition for the
$\mathbb{Z}_{p}\mathbb{Z}_{p^{2}}$-additive cyclic code whose Gray image is
linear (not necessarily cyclic) over $\mathbb{Z}_{p}$ is given. Moreover, as
for some special families of cyclic codes over $\mathbb{Z}_{p^{2}}$ and
$\mathbb{Z}_{p}\mathbb{Z}_{p^{2}}$, the linearity of the Gray images is
determined.

Keywords: Gray images, $\mathbb{Z}_{p}\mathbb{Z}_{p^{2}}$-Additive cyclic
codes, Minimal spanning sets

##  1 Introduction

Denote by $\mathbb{Z}_{p}$ and $\mathbb{Z}_{p^{k}}$ be the rings of integers
modulo $p$ and $p^{k}$, respectively. Let $\mathbb{Z}_{p}^{n}$ and
$\mathbb{Z}_{p^{k}}^{n}$ be the space of $n$-tuples over $\mathbb{Z}_{p}$ and
$\mathbb{Z}_{p^{k}}$, respectively. A $p$-ary code is a non-empty subset $C$
of $\mathbb{Z}_{p}^{n}$. If the subset is a vector space, then we say $C$ is a
linear code. Similarly, a non-empty subset $\mathcal{C}$ of
$\mathbb{Z}_{p^{k}}^{n}$ is a linear code if $\mathcal{C}$ is a submodule of
$\mathbb{Z}_{p^{k}}^{n}$.

In $1994$, Hammons et al. [16] showed that some well-known codes can be seen
as Gray images of linear codes over $\mathbb{Z}_{4}$. Later, Calderbank et al.
[11] gave the structure of cyclic codes over $\mathbb{Z}_{p^{k}}$. Besides,
Ling et al. [19] studied $\mathbb{Z}_{p^{k}}$-linear codes, and characterized
the linear cyclic codes over $\mathbb{Z}_{p^{2}}$ whose Gray images are linear
cyclic codes.

In $1973$, Delsarte [12] first defined and studied the additive codes in terms
of association schemes. Borges et al. [9, 8] studied the generator
polynomials, dual codes and binary images of the
$\mathbb{Z}_{2}\mathbb{Z}_{4}$-additive codes. Since then, a lot of work has
been devoted to characterizing $\mathbb{Z}_{2}\mathbb{Z}_{4}$-additive codes.
Dougherty et al. [13] constructed one weight
$\mathbb{Z}_{2}\mathbb{Z}_{4}$-additive codes and analyzed their parameters.
Benbelkacem et al. [4] studied $\mathbb{Z}_{2}\mathbb{Z}_{4}$-additive
complementary dual codes and their Gray images. In fact, these codes can be
viewed as a generalization of the linear complementary dual (LCD for short)
codes [21] over finite fields. Bernal et al. [5] introduced a decoding method
of the $\mathbb{Z}_{2}\mathbb{Z}_{4}$-linear codes. More structure properties
of $\mathbb{Z}_{2}\mathbb{Z}_{4}$-additive codes can be found in [6, 10].

Moreover, the additive codes over different mixed alphabets have also been
intensely studied, for example, $\mathbb{Z}_{2}\mathbb{Z}_{2}[u]$-additive
codes [7], $\mathbb{Z}_{2}\mathbb{Z}_{2^{s}}$-additive codes [2],
$\mathbb{Z}_{p^{r}}\mathbb{Z}_{p^{s}}$-additive codes [3],
$\mathbb{Z}_{2}\mathbb{Z}_{2}[u,v]$-additive codes [25],
$\mathbb{Z}_{p}\mathbb{Z}_{p^{k}}$-additive codes [24] and
$\mathbb{Z}_{p}(\mathbb{Z}_{p}+u\mathbb{Z}_{p})$-additive codes [28], and so
on. It is worth mentioning that $\mathbb{Z}_{2}\mathbb{Z}_{4}$-additive cyclic
codes form an important family of $\mathbb{Z}_{2}\mathbb{Z}_{4}$-additive
codes, many optimal binary codes can be obtained from the images of this
family of codes. In $2014$, Abualrub et al. [1] discussed
$\mathbb{Z}_{2}\mathbb{Z}_{4}$-additive cyclic codes. In addition, in [14],
the authors discussed the rank and kernel dimension of the
$\mathbb{Z}_{2}\mathbb{Z}_{4}$-linear codes. Later, Shi et al. [23] generated
the results about rank and kernel to $\mathbb{Z}_{3}\mathbb{Z}_{9}$. In
$2021$, Shi et al. [22] defined the $\mathbb{Z}_{2}\mathbb{Z}_{4}$-additive
quasi-cyclic codes and gave the conditions for the code to be self-dual and
additive complementary dual (ACD for short), respectively. More details of
$\mathbb{Z}_{2}\mathbb{Z}_{4}$-additive cyclic codes can be found in [1, 8,
9].

Motivated by [9], [19] and [27], this paper is devoted to studying the
algebraic structures and the Gray images of cyclic codes over
$\mathbb{Z}_{p^{2}}$ and $\mathbb{Z}_{p}\mathbb{Z}_{p^{2}}$, respectively. The
paper is organized as follows. In Section 2, we recall the necessary concepts
and properties on $\mathbb{Z}_{p}\mathbb{Z}_{p^{k}}$-additive cyclic codes and
Gray maps. In section 3, we give the algebra structures of a
$\mathbb{Z}_{p}\mathbb{Z}_{p^{2}}$-additive cyclic code. In Section 4, we
study the Gray image of a $\mathbb{Z}_{p}\mathbb{Z}_{p^{2}}$-additive cyclic
code, and give a necessary and sufficient condition for the image to be
linear. In Section 5, we presented some special families of codes whose Gray
images are linear.

##  2 Preliminaries

In the following sections, assume $p$ an odd prime number.

###  2.1 Gray Map and Gray Image

In [19], the classical Gray map
$\phi:\mathbb{Z}_{p^{2}}\rightarrow\mathbb{Z}_{p}^{p}$ is defined as

$\phi(\theta)=\theta_{0}(1,1,\cdots,1)+\theta_{1}(0,1,\cdots,p-1),$

where $\theta=\theta_{0}p+\theta_{1}\in\mathbb{Z}_{p^{2}}$,
$0\leqslant\theta_{0},\theta_{1}<p$ and $\phi(\theta)$ is a vector of length
$p$. The homogeneous weight [19] $wt_{hom}$ on $\mathbb{Z}_{p^{2}}$ is

$wt_{hom}(x)=\begin{cases}p,&\text{if}\quad x\in
p\mathbb{Z}_{p^{2}}\setminus\\{0\\},\\\ p-1,&\text{if}\quad x\notin
p\mathbb{Z}_{p^{2}},\\\ 0,&\text{if}\quad x=0.\end{cases}$

The homogeneous distance is $d_{hom}(\bm{u},\bm{v})=wt_{hom}(\bm{u}-\bm{v})$,
where $\bm{u},\bm{v}\in\mathbb{Z}_{p^{2}}^{n}$. Then $\phi$ is an isometry
from $(\mathbb{Z}_{p^{2}}^{n},d_{hom})$ to $(\mathbb{Z}_{p}^{pn},d_{H})$,
where $d_{H}$ is the Hamming distance on $\mathbb{Z}_{p}^{p}$.

For positive integers $\alpha$ and $\beta$, let $n=\alpha+p\beta$ and
$\Phi:\mathbb{Z}_{p}^{\alpha}\times\mathbb{Z}_{p^{2}}^{\beta}\rightarrow\mathbb{Z}_{p}^{n}$
be an extension of the Gray map $\phi$, which is defined as:

$\Phi(\bm{x},\bm{y})=(\bm{x},\phi(y_{1}),\phi(y_{2}),\cdots,\phi(y_{\beta}))$

for any $\bm{x}\in\mathbb{Z}_{p}^{\alpha}$, and
$\bm{y}=(y_{1},y_{2},\cdots,y_{\beta})\in\mathbb{Z}_{p^{2}}^{\beta}$. The
$p$-ary code $C=\Phi(\mathcal{C})$ is called a
$\mathbb{Z}_{p}\mathbb{Z}_{p^{2}}$-linear code or the $p$-ary image of a
$\mathbb{Z}_{p}\mathbb{Z}_{p^{2}}$-additive code. We denote $\langle C\rangle$
the linear span of the codewords of $C$.

###  2.2 $\mathbb{Z}_{p}\mathbb{Z}_{p^{k}}$-Additive Cyclic Codes

Recall some definitions about $\mathbb{Z}_{p}\mathbb{Z}_{p^{k}}$-additive
cyclic codes in [24, 29].

The code $\mathcal{C}$ is called a $\mathbb{Z}_{p}\mathbb{Z}_{p^{k}}$-additive
code with parameter $(\alpha,\beta)$ if it is a subgroup of
$\mathbb{Z}_{p}^{\alpha}\times\mathbb{Z}_{p^{k}}^{\beta}$, where $k\geqslant
2$ is an integer and $\gcd(\beta,p)=1$. Obviously, $\mathcal{C}$ is a
$\mathbb{Z}_{p^{k}}$-submodule of
$\mathbb{Z}_{p}^{\alpha}\times\mathbb{Z}_{p^{k}}^{\beta}$. Moreover,
$\mathcal{C}$ is a subgroup of
$\mathbb{Z}_{p}^{\alpha}\times\mathbb{Z}_{p^{k}}^{\beta}$, and from the
theorem of finite abelian groups, it is isomorphic to an abelian structure
$\mathbb{Z}_{p}^{\gamma_{0}+\gamma_{k}}\times\mathbb{Z}_{p^{k}}^{\gamma_{1}}\times\mathbb{Z}_{p^{k-1}}^{\gamma_{2}}\times\cdots\times\mathbb{Z}_{p^{2}}^{\gamma_{k-1}}$
where $\gamma_{i}\geqslant 0$ are integers for $i=0,1,\cdots,k$. Thus, the
size of $\mathcal{C}$ is
$p^{\gamma_{0}+\gamma_{k}+k\gamma_{1}+(k-1)\gamma_{2}+\cdots+2\gamma_{k-1}}$.

Let $X$ be the set of $\mathbb{Z}_{p}$ coordinate positions, and $Y$ be the
set of $\mathbb{Z}_{p^{k}}$ coordinate positions, so $|X|=\alpha$ and
$|Y|=\beta$. In general, say the first $\alpha$ positions corresponds to the
set $X$ and the last $\beta$ positions corresponds to the set $Y$. Let
$\mathcal{C}_{X}$ and $\mathcal{C}_{Y}$ be the punctured codes of
$\mathcal{C}$ by deleting the coordinates outside $X$ and $Y$, respectively.

Throughout this paper, the order of a codeword $\bm{v}$ (or a vector) is the
additive order, i.e., the smallest positive integer $s$ such that
$s\bm{v}=\bm{0}$. Then the subcode $\mathcal{C}_{p}$ is defined as

$\mathcal{C}_{p}=\left\\{\bm{c}\in\mathcal{C}:p\bm{c}=\bm{0}\right\\}.$

Let $\kappa$ be the dimension of the $p$-ary linear code
$(\mathcal{C}_{p})_{X}$. If $\alpha=0$, then $\kappa=0$. Consisting of all
these parameters, we will say that $\mathcal{C}$ is of type
$(\alpha,\beta;\gamma_{0},\gamma_{1},\cdots,\gamma_{k};\kappa)$.

When $k=2$, the type is always written as
$(\alpha,\beta;\gamma,\delta;\kappa)$, i.e., the code is isomorphic to
$\mathbb{Z}_{p}^{\gamma}\times\mathbb{Z}_{p^{2}}^{\delta}$. Let $\kappa_{1}$
be the dimension of the linear subcode
$\\{(\bm{u}_{1},\bm{0})\in\mathcal{C}\\}$ and $\kappa_{2}=\kappa-\kappa_{1}$.
Similarly, it’s known that the linear subcode
$\\{(\bm{0},\bm{v}_{2})\in\mathcal{C}\\}$ is isomorphic to
$\mathbb{Z}_{p^{2}}^{\delta_{2}}$ for some
$0\leqslant\delta_{2}\leqslant\delta$, then let
$\delta_{1}=\delta-\delta_{2}$. A $\mathbb{Z}_{p}\mathbb{Z}_{p^{2}}$-additive
code $\mathcal{C}$ is called separable if
$\mathcal{C}=\mathcal{C}_{X}\times\mathcal{C}_{Y}$. By definition, a
$\mathbb{Z}_{p}\mathbb{Z}_{p^{2}}$-additive code is separable if and only if
$\kappa_{2}=\delta_{1}=0$; that is $\kappa=\kappa_{1}$ and
$\delta=\delta_{2}$.

######  Definition 1.

[1, 29] A subset $\mathcal{C}$ of
$\mathbb{Z}_{p}^{\alpha}\times\mathbb{Z}_{p^{k}}^{\beta}$ is called a
$\mathbb{Z}_{p}\mathbb{Z}_{p^{k}}$-additive cyclic code if it satisfies the
following conditions:

  1. (1)

$\mathcal{C}$ is a $\mathbb{Z}_{p}\mathbb{Z}_{p^{k}}$-additive code;

  2. (2)

For any codeword
$\bm{u}=(\bm{u}^{\prime},\bm{u}^{\prime\prime})=(u^{\prime}_{0},u^{\prime}_{1},\cdots,u^{\prime}_{\alpha-1},u^{\prime\prime}_{0},u^{\prime\prime}_{1},\cdots,u^{\prime\prime}_{\beta-1})\in\mathcal{C}$,
its cyclic shift

$\pi(\bm{u})=(\pi(\bm{u}^{\prime}),\pi(\bm{u}^{\prime\prime}))=(u^{\prime}_{\alpha-1},u^{\prime}_{0},\cdots,u^{\prime}_{\alpha-2},u^{\prime\prime}_{\beta-1},u^{\prime\prime}_{0},\cdots,u^{\prime\prime}_{\beta-2})$

is also in $\mathcal{C}$.

######  Remark 1.

[8, 3] Since $\kappa=\kappa_{1}+\kappa_{2}$ and
$\delta=\delta_{1}+\delta_{2}$, where $\kappa_{1}$ is the dimension of the
subcode $\\{(\bm{u}_{1},\bm{0})\in\mathcal{C}\\}$ and $\delta_{2}$ is the
dimension of the subcode $\\{(\bm{0},\bm{v}_{2})\in\mathcal{C}\\}$ whose
codewords are all of order $p^{2}$, then the generator matrix can be written
as:

$\mathcal{G}_{S}=\begin{pmatrix}\begin{array}[]{cccc|ccccc}I_{\kappa_{1}}&T&T^{\prime}_{p_{1}}&T_{p_{1}}&\bm{0}&\bm{0}&\bm{0}&\bm{0}&\bm{0}\\\
\bm{0}&I_{\kappa_{2}}&T^{\prime}_{p_{2}}&T_{p_{2}}&pT_{2}&pT_{\kappa_{2}}&\bm{0}&\bm{0}&\bm{0}\\\
\bm{0}&\bm{0}&\bm{0}&\bm{0}&pT_{1}&pT^{\prime}_{1}&pI_{\gamma-\kappa}&\bm{0}&\bm{0}\\\
\hline\cr\bm{0}&\bm{0}&S_{\delta_{1}}&S_{p}&S_{11}&S_{12}&R_{1}&I_{\delta_{1}}&\bm{0}\\\
\bm{0}&\bm{0}&\bm{0}&\bm{0}&S_{21}&S_{22}&R_{2}&R_{\delta_{1}}&I_{\delta_{2}}\\\
\end{array}\end{pmatrix},$ (1)

where $I_{r}$ is the identity matrix of size $r\times r$;
$T_{p_{i}},T^{\prime}_{p_{i}},S_{\delta_{1}}$ and $S_{p}$ are matrices over
$\mathbb{Z}_{p}$; $T_{1},T_{2},T_{\kappa_{2}},T^{\prime}_{1}$ and $R_{i}$ are
matrices over $\mathbb{Z}_{p^{2}}$ with entries in $\mathbb{Z}_{p}$; and
$S_{ij}$ are matrices over $\mathbb{Z}_{p^{2}}$. Besides, $S_{\delta_{1}}$ and
$T_{\kappa_{2}}$ are square matrices of full rank $\delta_{1}$ and
$\kappa_{2}$, respectively.

Let $\mathcal{G}$ be the generator matrix of a
$\mathbb{Z}_{p}\mathbb{Z}_{p^{2}}$-additive cyclic code, then $\mathcal{G}$
and $\mathcal{G}_{S}$ should be permutation-equivalent, i.e., the codes
generated by $\mathcal{G}$ and $\mathcal{G}_{S}$ are permutation-equivalent.
Moreover, if the rows of $\mathcal{G}$ are arranged as $\mathcal{G}_{S}$, we
call $\mathcal{G}$ is in the form of $\mathcal{G}_{S}$.

##  3 Structures of $\mathbb{Z}_{p}\mathbb{Z}_{p^{k}}$-Additive Cyclic Codes

This section is devoted to giving the structures and the minimal spanning set
of $\mathbb{Z}_{p}\mathbb{Z}_{p^{k}}$-additive cyclic codes in terms of
polynomials.

###  3.1 Generator Polynomials of $\mathbb{Z}_{p}\mathbb{Z}_{p^{k}}$-Additive
Cyclic Codes

In [1], the authors studied the $\mathbb{Z}_{2}\mathbb{Z}_{4}$-additive cyclic
codes. Recall that there exists a bijection between
$\mathbb{Z}_{p}^{\alpha}\times\mathbb{Z}_{p^{k}}^{\beta}$ and
$R_{\alpha,\beta}=R_{\alpha}\times
R_{\beta}=\mathbb{Z}_{p}[x]/(x^{\alpha}-1)\times\mathbb{Z}_{p^{k}}[x]/(x^{\beta}-1)$
given by

$(u^{\prime}_{0},\cdots,u^{\prime}_{\alpha-1},u^{\prime\prime}_{0},\cdots,u^{\prime\prime}_{\beta-1})\longmapsto(u^{\prime}_{0}+\cdots+u^{\prime}_{\alpha-1}x^{\alpha-1},u^{\prime\prime}_{0}+\cdots+u^{\prime\prime}_{\beta-1}x^{\beta-1}).$

Hence, any codeword can be regarded as a vector or as a polynomial. This
subsection is devoted to giving the structures of
$\mathbb{Z}_{p}\mathbb{Z}_{p^{k}}$-additive cyclic codes in terms of
polynomials. For simplicity, $a$, $b$, $f$ always refer to the polynomials
$a(x),b(x),f(x)$. Denote the $p$-ary reduction of a polynomial
$h\in\mathbb{Z}_{p^{k}}[x]$ by $\overline{h}\equiv h\pmod{p}$. Then define the
following multiplication

$h\star(c_{1},c_{2})=(\overline{h}c_{1},hc_{2}),$

where $(c_{1},c_{2})\in R_{\alpha,\beta}$ and the products of the right side
are the standard polynomial products in $\mathbb{Z}_{p}[x]/(x^{\alpha}-1)$ and
$\mathbb{Z}_{p^{k}}[x]/(x^{\beta}-1)$.

Let $\mathcal{C}$ be a $\mathbb{Z}_{p}\mathbb{Z}_{p^{k}}$-additive cyclic
code, and we will determine the set of generators for $\mathcal{C}$ as a
$\mathbb{Z}_{p^{k}}[x]$-submodule of
$R_{\alpha,\beta}=\mathbb{Z}_{p}^{\alpha}\times\mathbb{Z}_{p^{k}}^{\beta}$.
Define the map
$\Psi:\mathcal{C}\rightarrow\mathbb{Z}_{p^{k}}[x]/(x^{\beta}-1)$, where
$\Psi((g_{1},g_{2}))=g_{2}$. Obviously, $\Psi$ is a module homomorphism. Then,
we claim that its image is a $\mathbb{Z}_{p^{k}}[x]$-submodule of
$\mathbb{Z}_{p^{k}}[x]/(x^{\beta}-1)$ and its kernel is a submodule of
$\mathcal{C}$. Moreover, the image of $\Psi$ can be regarded as an ideal in
the ring $\mathbb{Z}_{p^{k}}[x]/(x^{\beta}-1)$. Note that
$\ker(\Psi)=\\{(a,0)\in\mathcal{C}\mid
a\in\mathbb{Z}_{p}[x]/(x^{\alpha}-1)\\}$, then we define the set $I$ to be

$I=\\{a\in\mathbb{Z}_{p}[x]/(x^{\alpha}-1)\mid(a,0)\in\ker(\Psi)\\}.$

It’s clear that $I$ is an ideal and hence a cyclic code in the ring
$\mathbb{Z}_{p}[x]/(x^{\alpha}-1)$. More details about these ideals can be
seen in [11].

By the first isomorphism theorem and [11, Theorem 6], we have

$\mathcal{C}/\ker(\Psi)\cong\langle
f_{0},pf_{1},\cdots,p^{k-1}f_{k-1}\rangle=\langle f\rangle,$

where $f_{k-1}\mid f_{k-2}\mid\cdots\mid f_{1}\mid f_{0}\mid(x^{\beta}-1)$ and
$f=f_{0}+pf_{1}+\cdots+p^{k-1}f_{k-1}$.

Thus, any $\mathbb{Z}_{p}\mathbb{Z}_{p^{k}}$-additive cyclic code can be
generated as a $\mathbb{Z}_{p^{k}}[x]$-submodule of $R_{\alpha,\beta}$ by two
elements of the form $(a,0)$ and $(b,f)$ for some
$b\in\mathbb{Z}_{p}[x]/(x^{\alpha}-1)$, i.e., any element in the code
$\mathcal{C}$ can be described as

$d_{1}\star(a,0)+d_{2}\star(b,f),$

where $d_{1},d_{2}\in\mathbb{Z}_{p^{k}}[x]$. In fact, $d_{1}$ can be
restricted in the ring $\mathbb{Z}_{p}[x]$. Hence, we get

$\mathcal{C}=\langle(a,0),(b,f)\rangle,$

with $p$-ary polynomials $a$, $b$.

Summarize the above discussions, we have the following proposition.

######  Proposition 1.

The multiplication $\star$ above is well-defined and $R_{\alpha,\beta}$ is a
$\mathbb{Z}_{p^{k}}[x]$-module with respect to this multiplication. Moreover,
a code $\mathcal{C}$ is a $\mathbb{Z}_{p}\mathbb{Z}_{p^{k}}$-additive cyclic
code if and only if $\mathcal{C}$ is a $\mathbb{Z}_{p^{k}}[x]$-submodule of
$R_{\alpha,\beta}$.

The following theorem will give the generator polynomial of a
$\mathbb{Z}_{p}\mathbb{Z}_{p^{k}}$-additive cyclic code.

######  Theorem 1.

Let $\mathcal{C}$ be a $\mathbb{Z}_{p}\mathbb{Z}_{p^{k}}$-additive cyclic code
of type $(\alpha,\beta;\gamma_{0},\gamma_{1},\cdots,\gamma_{k};\kappa)$ with
$\gcd(\beta,p)=1$. Then $\mathcal{C}$ can be identified as

  1. (1)

$\mathcal{C}=\langle(a,0)\rangle$, where $a\mid(x^{\alpha}-1)\pmod{p}$;

  2. (2)

$\mathcal{C}=\langle(b,f)\rangle$, where
$f=f_{0}+pf_{1}+p^{2}f_{2}+\cdots+p^{k-1}f_{k-1}$ with $f_{k-1}\mid
f_{k-2}\mid\cdots\mid f_{1}\mid f_{0}\mid(x^{\beta}-1)$;

  3. (3)

$\mathcal{C}=\langle(a,0),(b,f)\rangle$, where $a\mid(x^{\alpha}-1)\pmod{p}$,
$f=f_{0}+pf_{1}+p^{2}f_{2}+\cdots+p^{k-1}f_{k-1}$ with $f_{k-1}\mid
f_{k-2}\mid\cdots\mid f_{1}\mid f_{0}\mid(x^{\beta}-1)$ and $b$ is a
polynomial over $\mathbb{Z}_{p}$ satisfying $\deg(b)<\deg(a)$. Moreover,
$a\mid h_{k-1}b$, where $f_{k-1}h_{k-1}=x^{\beta}-1$.

###### Proof.

It’s sufficient to show that $\deg(b)<\deg(a)$ and $a\mid h_{k-1}b$.

  * •

Suppose $\deg(b)\geqslant\deg(a)$, then using the division algorithm (over
$\mathbb{Z}_{p}$), we have $b=qa+r$ for some polynomials $q$ and $r$ over
$\mathbb{Z}_{p}$, where $\deg(r)<\deg(a)$. Thus,

$D=\langle(a,0),(r,f)\rangle=\langle(a,0),(b,f)\rangle=C,$

since $(b,f)=q\star(a,0)+(r,f)$.

  * •

Since $f_{k-1}\mid f_{k-2}\mid\cdots\mid f_{1}\mid f_{0}$, then
$h_{k-1}f\equiv 0\pmod{(x^{\beta}-1)}$. Consider that

$\Psi\left(\frac{x^{\beta}-1}{f_{k-1}}\star(b,f)\right)=\Psi\left(\left(h_{k-1}b,0\right)\right)=0.$

Hence,

$\left(h_{k-1}b,0\right)\in\ker(\Psi)\subseteq\mathcal{C}\quad\textnormal{and}\quad
a\mid h_{k-1}b.$

Thus, we complete the proof. ∎

######  Example 1.

Using Magma, the polynomial $x^{8}-1$ over $\mathbb{Z}_{3^{2}}$ can be
factored as

$x^{8}-1=(x-1)(x+1)(x^{2}+1)(x^{2}+4x+8)(x^{2}+5x+8).$

Then,
$\mathcal{C}_{1}=\langle(x^{2}-1,0),(x-1,(x^{2}+5x+8)(x^{2}+1)(x+1)+3(x^{2}+1)(x+1))\rangle$
can be regarded as a $\mathbb{Z}_{3}\mathbb{Z}_{3^{2}}$-additive cyclic code.

Similarly, the polynomial $x^{8}-1$ over $\mathbb{Z}_{3^{3}}$ can be factored
as

$x^{8}-1=(x-1)(x+1)(x^{2}+1)(x^{2}+22x+26)(x^{2}+5x+26).$

Then,
$\mathcal{C}_{2}=\langle(x^{2}-1,0),(x-1,(x^{2}+5x+26)(x^{2}+1)(x+1)+3(x^{2}+1)(x+1)+9(x+1))\rangle$
can be regarded as a $\mathbb{Z}_{3}\mathbb{Z}_{3^{3}}$-additive cyclic code.

###  3.2 Minimal Spanning Set of $\mathbb{Z}_{p}\mathbb{Z}_{p^{k}}$-Additive
Cyclic Codes

In this subsection, we will give the minimal spanning set of a
$\mathbb{Z}_{p}\mathbb{Z}_{p^{k}}$-additive cyclic code.

######  Theorem 2.

Let $\mathcal{C}=\langle(a,0),(b,f)\rangle$ be a
$\mathbb{Z}_{p}\mathbb{Z}_{p^{k}}$-additive cyclic code of type
$(\alpha,\beta;\gamma_{0},\gamma_{1},\cdots,\gamma_{k};\kappa)$ with
$\gcd(\beta,p)=1$, where $f=f_{0}+pf_{1}+p^{2}f_{2}+\cdots+p^{k-1}f_{k-1}$
with $f_{k-1}\mid f_{k-2}\mid\cdots\mid f_{1}\mid f_{0}\mid(x^{\beta}-1)$. Let
$\deg(f_{i})=t_{i}$, $\deg(a)=t_{a}$, then we define

$T_{1}=\bigcup_{i=0}^{\alpha-
t_{a}-1}\left\\{x^{i}\star(a,0)\right\\},T_{2}=\bigcup_{i=0}^{\beta-
t_{0}-1}\left\\{x^{i}\star(b,f)\right\\},$

and

$S_{j}=\bigcup_{i=0}^{t_{j}-t_{j+1}-1}\left\\{x^{i}\star(\overline{h_{j}}b,h_{j}f)\right\\},$

where $h_{j}f_{j}\equiv x^{\beta}-1\pmod{p^{k}}$, $j=0,1,\cdots,k-2$. Then
$S=T_{1}\cup T_{2}\cup S_{0}\cup S_{1}\cup\cdots\cup S_{k-2}$ forms a minimal
spanning set for $\mathcal{C}$ as a $\mathbb{Z}_{p^{k}}$-module. Moreover, we
have $\gamma_{0}=\alpha-t_{a}$, $\gamma_{1}=\beta-t_{0}$,
$\gamma_{i}=t_{i-2}-t_{i-1}$ for $2\leqslant i\leqslant k$.

###### Proof.

Let $c$ be a codeword of $\mathcal{C}$, then there exist polynomials
$\lambda_{1},\mu_{1}\in\mathbb{Z}_{p^{k}}[x]$ such that

$c=\overline{\lambda_{1}}\star\left(a,0\right)+\mu_{1}\star\left(b,f\right).$

  1. (1)

If $\deg(\overline{\lambda_{1}})\leqslant\alpha-\deg(a)-1$, then
$\overline{\lambda_{1}}\star(a,0)$ can be spanned by $T_{1}$. Otherwise, by
the division algorithm, we get two polynomials
$\lambda_{2},\mu_{2}\in\mathbb{Z}_{p^{k}}[x]$ such that

$\overline{\lambda_{1}}=\left(\frac{x^{\alpha}-1}{a}\right)\overline{\lambda_{2}}+\overline{\mu_{2}},$

where $\overline{\mu_{2}}=0$ or
$\deg(\overline{\mu_{2}})\leqslant\alpha-\deg(a)-1$. Hence,

$\overline{\lambda_{1}}\star(a,0)=\overline{\mu_{2}}\star(a,0).$

Thus, we can assume that $\overline{\lambda_{1}}\star(a,0)$ is spanned by
$T_{1}$.

  2. (2)

If $\deg(\mu_{1})\leqslant\beta-\deg(f)-1=\beta-t_{0}-1$, then
$\mu_{1}\star(b,f)$ is spanned by $T_{2}$. Otherwise, by the division
algorithm, we get

$\mu_{1}=\left(\frac{x^{\beta}-1}{f_{0}}\right)q_{0}+r_{0}=h_{0}q_{0}+r_{0},$

where $r_{0}=0$ or $\deg(r_{0})\leqslant\beta-t_{0}-1$, which implies that

$\mu_{1}\star(b,f)=q_{0}\star(\overline{h_{0}}b,h_{0}f)+r_{0}\star(b,f).$

Obviously, $r_{0}\star(b,f)$ is spanned by $T_{2}$. Thus, we only need to
consider $q_{0}\star(\overline{h_{0}}b,h_{0}f)$.

  3. (3)

The degree of $q_{0}$ is important. If $\deg(q_{0})\leqslant t_{0}-t_{1}-1$,
then we are done. Otherwise, by division algorithm again, we have

$q_{0}=\left(\frac{x^{\beta}-1}{h_{0}f_{1}}\right)q_{1}+r_{1}=\frac{h_{1}}{h_{0}}q_{1}+r_{1},$

for some $q_{1},r_{1}\in\mathbb{Z}_{p^{k}}[x]$ with $r_{1}=0$ or
$\deg(r_{1})\leqslant t_{0}-t_{1}-1$. Thus,

$q_{0}\star(\overline{h_{0}}b,h_{0}f)=q_{1}\star(\overline{h_{1}}b,h_{1}f)+r_{1}\star(\overline{h_{0}}b,h_{0}f),$

which implies that $r_{1}\star(\overline{h_{0}}b,h_{0}f)$ is spanned by
$S_{0}$.

  4. (4)

As for $q_{1}$, we have similar discussion. For general, if
$\deg(q_{j})\leqslant t_{j}-t_{j+1}-1$ for some $0\leqslant j\leqslant k-3$,
then we are done. Otherwise, by division algorithm again, we have

$q_{j}=\left(\frac{x^{\beta}-1}{h_{j}f_{j+1}}\right)q_{j+1}+r_{j+1}=\frac{h_{j+1}}{h_{j}}q_{j+1}+r_{j+1},$

for some $q_{j+1},r_{j+1}\in\mathbb{Z}_{p^{k}}[x]$ with $r_{j+1}=0$ or
$\deg(r_{j+1})\leqslant t_{j}-t_{j+1}-1$. Thus,

$q_{j}\star(\overline{h_{j}}b,h_{j}f)=q_{j+1}\star(\overline{h_{j+1}}b,h_{j+1}f)+r_{j+1}\star(\overline{h_{j}}b,h_{j}f),$

which implies that $r_{j+1}\star(\overline{h_{j}}b,h_{j}f)$ is spanned by
$S_{j}$. Note that $h_{k-2}f=p^{k-1}h_{k-2}f_{k-1}$ but
$h_{k-1}f=h_{k-1}f_{k-1}=x^{\beta}-1=0$. Therefore, if $j=k-2$, then

$q_{k-2}\star(\overline{h_{k-2}}b,h_{k-2}f)=q_{k-1}\star(\overline{h_{k-1}}b,0)+r_{k-1}\star(\overline{h_{k-2}}b,h_{k-2}f).$

Since $a\mid\frac{x^{\beta}-1}{f_{k-1}}b=h_{k-1}b$, then
$q_{k-2}\star(\overline{h_{k-2}}b,h_{k-2}f)$ is spanned by $T_{1}$ and
$S_{k-2}$.

Therefore, $S=T_{1}\cup T_{2}\cup S_{0}\cup S_{1}\cup\cdots\cup S_{k-2}$ is a
spanning set. Moreover, no element in $S$ is a linear combination of the other
elements, so $S$ is minimal. On the other hand, the order of the codewords
spanned by $S_{j}$ is just $p^{k-1-j}$. Then $\gamma_{0}=\alpha-t_{a}$,
$\gamma_{1}=\beta-t_{0}$, and $\gamma_{i}=t_{i-2}-t_{i-1}$ for $2\leqslant
i\leqslant k$. ∎

######  Remark 2.

If $k=2$, we get $\mathcal{C}=\langle(a,0),(b,fh+pf)\rangle$ with
$fhg=x^{\beta}-1$, where $a,b\in\mathbb{Z}_{p}[x]$ and
$f,g,h\in\mathbb{Z}_{p^{2}}[x]$. Moreover, if $p=2$, then Theorem 1 and
Theorem 2 are actually [1, Theorem 11] and [1, Theorem 13], respectively.

Straightforward from the proof [8, Theorem 5 & Proposition 6] and Theorem 2,
it’s easy to get the following result.

######  Proposition 2.

Let $\mathcal{C}=\langle(a,0),(b,fh+pf)\rangle$ be a
$\mathbb{Z}_{p}\mathbb{Z}_{p^{2}}$-additive cyclic code of type
$(\alpha,\beta;\gamma,\delta=\delta_{1}+\delta_{2};\kappa=\kappa_{1}+\kappa_{2})$
with $fhg=x^{\beta}-1$ and $\gcd(\beta,p)=1$. Then

$\displaystyle\gamma=\alpha-\deg(a)+\deg(h),\quad\delta=\deg(g),\quad\kappa=\alpha-\deg(\gcd(a,b\overline{g})),$
$\displaystyle\kappa_{1}=\alpha-\deg(a),\quad\kappa_{2}=\deg(a)-\deg(\gcd(a,b\overline{g})),$

where $\overline{g}\equiv g\pmod{p}$.

######  Example 2.

Let
$\mathcal{C}=\langle(x^{2}-1,0),(x-1,(x^{2}+5x+8)(x^{2}+1)(x+1)+3(x^{2}+1)(x+1))\rangle$
be a $\mathbb{Z}_{3}\mathbb{Z}_{9}$-additive cyclic code with $\alpha=4$ and
$\beta=8$. Here, $f=(x^{2}+1)(x+1)$, $h=x^{2}+5x+8$ and $g=(x-1)(x^{2}+4x+8)$,
then its type is $(4,8;4,3;3)$. Moreover, by Theorem 2, the minimal spanning
set of $\mathcal{C}$ is the set of polynomials corresponding to the rows of
the following matrix:

$\left(\begin{array}[]{cccc|cccccccc}2&0&1&0&0&0&0&0&0&0&0&0\\\
0&2&0&1&0&0&0&0&0&0&0&0\\\ \hline\cr 2&1&0&0&2&7&8&8&6&1&0&0\\\
0&2&1&0&0&2&7&8&8&6&1&0\\\ 0&0&2&1&0&0&2&7&8&8&6&1\\\ \hline\cr
0&0&1&2&3&6&6&0&6&3&3&0\\\ 2&0&0&1&0&3&6&6&0&6&3&3\\\ \end{array}\right).$

For instance, $(2100\ 27886100)$ means
$(x-1,x^{5}+6x^{4}+8x^{3}+8x^{2}+7x+2)$. Moreover, this matrix can be regarded
as a generator matrix of $\mathcal{C}$.

For a linear code over $\mathbb{Z}_{p}$, it’s call optimal if its parameter
$[n,k,d]$ is the same as the best linear code (BKLC) in the database [15].
And, the code with parameter $[n,k,d]$ is called almost optimal if the
$[n,k,d+1]$ code exists and is optimal. Many optimal and almost optimal codes
are obtained by the Gray images, and the parameters are listed in Tables 2 and
1. Furthermore, the Gray images of many cyclic codes over $\mathbb{Z}_{p^{2}}$
obtained from $x^{n}-$ are nonlinear.

In [15], when fixed the length $n$, the dimension $k$, the best known linear
codes have indirect, multi-step constructions in many cases. Therefore, it’s
desirable to obtain them by another method, for example, in the form of the
Gray images of cyclic codes over $\mathbb{Z}_{p^{2}}$ and
$\mathbb{Z}_{p}\mathbb{Z}_{p^{2}}$.

However, notice that this paper is devoted to giving the structures for the
cyclic codes whose Gray images are linear over $\mathbb{Z}_{p}$, rather than
searching for new BKLCs.

Table 1: Gray images of cyclic codes over $\mathbb{Z}_{p}\mathbb{Z}_{p^{2}}$

$p$ | $(\alpha,\beta)$ | Generators | Gary Image
---|---|---|---
$p=3$ | $(2,5)$ |  |  $f=x^{4}+x^{3}+x^{2}+x+1$, $h=1$,
---
$g=x-1$, $a=0$, $b=x+1$
$[17,2,12]^{\dagger}$
$p=3$ | $(8,4)$ |  |  $f=x+1$, $h=x^{2}+1$, $g=x-1$,
---
$a=0$, $b=x^{7}+2x^{6}+x^{5}+x$
$[20,4,12]^{\dagger}$
$p=3$ | $(5,8)$ |  |  $f=x^{5}+5x^{4}+4x^{3}+4x^{2}+3x+8$, $h=x^{2}+5x+8$,
---
$g=x-1$, $a=0$, $b=x^{3}+x^{2}+2x+2$
$[29,4,18]^{\dagger}$
$p=3$ | $(6,8)$ |  |  $f=x^{5}+5x^{4}+4x^{3}+4x^{2}+3x+8$, $h=x^{2}+5x+8$,
---
$g=x-1$, $a=0$, $b=x^{3}+2x^{2}+x+1$
$[30,4,19]^{\dagger}$
$p=5$ | $(3,4)$ |  |  $f=x^{2}+19x+18$, $h=x+7$, $g=x-1$,
---
$a=0$, $b=2x+1$
$[23,3,18]^{\dagger}$
$p=5$ | $(6,4)$ |  |  $f=x^{2}+19x+18$, $h=x+7$, $g=x-1$,
---
$a=0$, $b=x^{3}+2x^{2}+3x+4$
$[26,3,20]^{\dagger}$
$p=5$ | $(5,8)$ |  |  $f=x^{6}+8x^{5}+7x^{4}+x^{2}+8x+7$, $h=x+7$,
---
$g=x-1$, $a=0$, $b=x^{3}+3x+4$
$[45,3,35]^{\dagger}$
$p=5$ | $(6,8)$ |  |  $f=x^{6}+8x^{5}+7x^{4}+x^{2}+8x+7$, $h=x+7$,
---
$g=x-1$, $a=0$, $b=x^{4}+2x^{3}+x^{2}+1$
$[46,3,36]^{\dagger}$
$p=7$ | $(0,6)$ |  |  $f=x^{4}+32x^{3}+13x^{2}+12x+30$,
---
$h=x+18$, $g=x-1$, $a=b=0$
$[42,3,35]^{\dagger}$
$p=7$ | $(4,6)$ |  |  $f=x^{4}+32x^{3}+13x^{2}+12x+30$, $h=x+18$,
---
$g=x-1$, $a=0$, $b=x^{2}+2x+1$
$[46,3,39]^{\dagger}$

  * $\dagger$

means the code is optimal.

  * $\ddagger$

means the code is almost optimal.

Table 2: Gray images of cyclic codes over $\mathbb{Z}_{p^{2}}$

$p$ | $n$ | $f$ | $h$ | $g$ | Gray Image
---|---|---|---|---|---
$p=3$ | $4$ | $(x+1)$ | $(x^{2}+1)$ | $(x-1)$ | $[12,4,6]^{\dagger}$
$p=3$ | $5$ | $(x^{4}+x^{3}+x^{2}+x+1)$ | $1$ | $(x-1)$ | $[15,2,10]^{\ddagger}$
$p=3$ | $7$ | $(x^{6}+x^{5}+x^{4}+x^{3}+x^{2}+x+1)$ | $1$ | $(x-1)$ | $[21,2,14]^{\ddagger}$
$p=3$ | $8$ | $(x+1)(x^{2}+1)(x^{2}+4x+8)$ | $(x^{2}+5x+8)$ | $(x-1)$ | $[24,4,15]^{\dagger}$
$p=3$ | $8$ | $(x+1)(x^{2}+1)(x^{2}+5x+8)$ | $(x^{2}+4x+8)$ | $(x-1)$ | $[24,4,15]^{\dagger}$
$p=5$ | $4$ | $(x+1)(x+18)$ | $(x+7)$ | $(x-1)$ | $[20,3,15]^{\dagger}$
$p=5$ | $4$ | $(x+1)(x+7)$ | $(x+18)$ | $(x-1)$ | $[20,3,15]^{\dagger}$
$p=5$ | $4$ | $(x+1)(x+7)(x+18)$ | $1$ | $(x-1)$ | $[20,2,16]^{\dagger}$
$p=5$ | $7$ | $(x^{6}+x^{5}+x^{4}+x^{3}+x^{2}+x+1)$ | $1$ | $(x-1)$ | $[35,2,28]^{\ddagger}$
$p=5$ | $8$ | $(x+1)(x+7)(x^{2}+7)(x^{2}-7)$ | $(x-7)$ | $(x-1)$ | $[40,3,30]^{\ddagger}$
$p=5$ | $8$ | $(x+1)(x-7)(x^{2}+7)(x^{2}-7)$ | $(x+7)$ | $(x-1)$ | $[40,3,30]^{\ddagger}$
$p=5$ | $8$ | $(x^{7}+x^{6}+x^{5}+x^{4}+x^{3}+x^{2}+x+1)$ | $1$ | $(x-1)$ | $[40,2,32]^{\ddagger}$

  * $\dagger$

means the code is optimal.

  * $\ddagger$

means the code is almost optimal.

##  4 $p$-ary Images of $\mathbb{Z}_{p}\mathbb{Z}_{p^{2}}$-Additive Cyclic
Codes

In [9] and [27], the authors studied the Gray images of the cyclic codes over
$\mathbb{Z}_{4}$ and $\mathbb{Z}_{2}\mathbb{Z}_{4}$, respectively. This
section is devoted to generalizing the results about Gray images to
$\mathbb{Z}_{p^{2}}$ and $\mathbb{Z}_{p}\mathbb{Z}_{p^{2}}$, respectively. In
[26], the Gray map $\Phi$ defined for quaternary codes satisfies
$\Phi(\bm{u}+\bm{v})=\Phi(\bm{u})+\Phi(\bm{v})+\Phi(2\bm{u}\ast\bm{v})$, where
$\ast$ denotes the componentwise product of two vectors. As for the codes over
$\mathbb{Z}_{p^{2}}$ and $\mathbb{Z}_{p}\mathbb{Z}_{p^{2}}$, we have a similar
result. Now, we reprove [17, Lemma 2] by [23, Lemma 2] and a slightly
different proof.

######  Lemma 1.

Let
$\bm{u}=(u_{1},\cdots,u_{\alpha+\beta}),\bm{v}=(v_{1},\cdots,v_{\alpha+\beta})\in\mathbb{Z}_{p}^{\alpha}\times\mathbb{Z}_{p^{2}}^{\beta}$,
then

$\Phi(\bm{u}+\bm{v})=\Phi(\bm{u})+\Phi(\bm{v})+\Phi(pP(\bm{u},\bm{v})),$ (2)

where
$P(\bm{u},\bm{v})=\left(P(u_{1},v_{1}),\cdots,P(u_{\alpha+\beta},v_{\alpha+\beta})\right)$
and

$P(u_{i},v_{i})\equiv\sum_{a=1}^{p-1}\sum_{b=p-a}^{p-1}\frac{\prod_{m=0}^{p-1}(u_{i}-m)(v_{i}-m)}{(u_{i}-a)(v_{i}-b)}\pmod{p}=\begin{cases}1,&\overline{u}_{i}+\overline{v}_{i}\geqslant
p,\\\ 0,&\overline{u}_{i}+\overline{v}_{i}<p,\\\ \end{cases}$ (3)

with $\overline{u}_{i}\equiv u_{i}\pmod{p}$, $\overline{v}_{i}\equiv
v_{i}\pmod{p}$.

###### Proof.

It’s sufficient to show the values of $P(u_{i},v_{i})$ in (3). Note that

$\sum_{a=1}^{p-1}\sum_{b=p-a}^{p-1}\frac{\prod_{m=0}^{p-1}(x-m)(y-m)}{(x-a)(y-b)}\equiv\sum_{a+b\geqslant
p}\frac{(x^{p}-x)(y^{p}-y)}{(x-a)(y-b)}\pmod{p},$

since $x^{p}-x\equiv\prod_{m=0}^{p-1}(x-m)\pmod{p}$ when $p$ is prime. For
$0\leqslant x,y\leqslant p-1$, if $x\neq a$ or $y\neq b$, then

$\frac{(x^{p}-x)(y^{p}-y)}{(x-a)(y-b)}\equiv 0\pmod{p}.$

Then, according to the famous Wilson’s Theorem: $(p-1)!\equiv-1\pmod{p}$, we
have

$\sum_{a+b\geqslant
p}\frac{(x^{p}-x)(y^{p}-y)}{(x-a)(y-b)}\equiv\sum_{\begin{subarray}{c}a+b\geqslant
p,\\\
x=a,y=b\end{subarray}}\frac{(x^{p}-x)(y^{p}-y)}{(x-a)(y-b)}\pmod{p}=\begin{cases}1,&x+y\geqslant
p,\\\ 0,&x+y<p.\\\ \end{cases}$

The equality (3) holds since $P(x,y)=P(\bar{x},\bar{y})$ when
$x,y\in\mathbb{Z}_{p^{2}}$. ∎

######  Lemma 2.

Let $\mathcal{C}$ be a $\mathbb{Z}_{p}\mathbb{Z}_{p^{2}}$-additive code. The
$\mathbb{Z}_{p}\mathbb{Z}_{p^{2}}$-linear code $C=\Phi(\mathcal{C})$ is linear
if and only if $pP(\bm{u},\bm{v})\in\mathcal{C}$ for all
$\bm{u},\bm{v}\in\mathcal{C}$.

###### Proof.

Assume that $C$ is linear, then for any $\bm{u},\bm{v}\in\mathcal{C}$, we have
$\Phi(\bm{u}),\Phi(\bm{v}),\Phi(\bm{u}+\bm{v})\in C$. Thus, by Lemma 1,
$\Phi(pP(\bm{u},\bm{v}))\in C$. Considering that $\phi(px)=\phi(py)$ if and
only if $px=py$, then $pP(\bm{u},\bm{v})\in\mathcal{C}$, which is important
and occurs many times in this paper.

Conversely, for every $\bm{x},\bm{y}\in C$, there exist
$\bm{u}^{\prime},\bm{v}^{\prime}\in\mathcal{C}$ such that
$\bm{x}=\Phi(\bm{u}^{\prime})$ and $\bm{y}=\Phi(\bm{v}^{\prime})$. Thus,
$pP(\bm{u}^{\prime},\bm{v}^{\prime})\in\mathcal{C}$, which implies that
$\bm{u}^{\prime}+\bm{v}^{\prime}+(p-1)pP(\bm{u}^{\prime},\bm{v}^{\prime})\in\mathcal{C}$.
Hence, by Lemma 1,

$\Phi(\bm{u}^{\prime}+\bm{v}^{\prime}+(p-1)pP(\bm{u}^{\prime},\bm{v}^{\prime}))=\Phi(\bm{u}^{\prime}+\bm{v}^{\prime})+(p-1)\Phi(pP(\bm{u}^{\prime},\bm{v}^{\prime}))\in
C.$

Thus,

$\displaystyle\bm{x}+\bm{y}$
$\displaystyle=\Phi(\bm{u}^{\prime})+\Phi(\bm{v}^{\prime})=\Phi(\bm{u}^{\prime})+\Phi(\bm{v}^{\prime})+p\Phi(pP(\bm{u}^{\prime},\bm{v}^{\prime}))$
$\displaystyle=\Phi(\bm{u}^{\prime}+\bm{v}^{\prime})+(p-1)\Phi(pP(\bm{u}^{\prime},\bm{v}^{\prime}))\in
C,$

and we complete the proof. ∎

######  Remark 3.

It’s important that $\Phi(pP(\bm{u},\bm{v}))\in\Phi(\mathcal{C})$ if and only
if $pP(\bm{u},\bm{v})\in\mathcal{C}$. Recall the characteristic function of
$S$ defined in [19, Section IV] as:

$f(x,y)=\left((x^{p}-x)(y^{p}-y)\sum_{i=1}^{p-1}\frac{1}{x-i}\prod_{(i,j)\in
S}\frac{1}{y-j}\right)^{p-1}.$

where $S$ is the set of the ordered pairs $(i,j)\in\mathbb{Z}_{p}^{2}$ with
$i+j\geqslant p$. Then $f(x,y)\equiv\left(P(x,y)\right)^{p-1}\pmod{p}$.
Furthermore, let $L=\\{1+2i|1\leqslant i\leqslant(p-1)/2\\}\cup\\{p-1\\}$ by
$L$, which gives the degrees of terms of $P(x,y)$ by [17, Lemma 4].

###  4.1 $p$-ary Images of Cyclic Codes over $\mathbb{Z}_{p^{2}}$

Note that in [19], linear cyclic codes over $\mathbb{Z}_{p^{2}}$ whose Gray
images are linear cyclic codes over $\mathbb{Z}_{p}$ are characterized. In
this subsection, we will give the necessary and sufficient condition of the
Gray image to be linear (not necessarily cyclic) of some cyclic code over
$\mathbb{Z}_{p^{2}}$.

In this section, the elements of the cyclic code $\mathcal{C}=\langle
fh+pf\rangle$ over $\mathbb{Z}_{p^{2}}$ are always regarded as polynomials,
where $fhg=x^{n}-1$ and $\gcd(n,p)=1$. Moreover, it’s easy to check that
$\mathcal{C}=\langle fh,pfg\rangle=\langle fh,pf\rangle$ (see Lemma 6 or [27,
Proposition 5] for binary case), since $h$ and $g$ are coprime. Then the
subcode $\mathcal{C}_{p}$ of $\mathcal{C}$ whose codewords are of order $p$
(and the zero polynomial is in $\mathcal{C}_{p}$) is also a cyclic code, and
$\mathcal{C}_{p}=\langle pf\rangle$ (see Lemma 7 or [27, Proposition 6] for
binary case).

Recall some results in [20]. Let $\ast$ denote the componentwise product of
two vectors. For convenience, the componentwise product of $i$ vectors
$\bm{u}$ is written as $\bm{u}^{i}$. Moreover, the componentwise product
$a\ast b$ of two polynomials $a$ and $b$ is defined as:

$a\ast
b=\left(\sum_{i=0}^{m}a_{i}x^{i}\right)\ast\left(\sum_{i=0}^{m}b_{i}x^{i}\right)=\sum_{i=0}^{m}a_{i}b_{i}x^{i}.$

And the componentwise product of two sets $A,B$ is defined as: $A\ast
B=\\{a\ast b|a\in A,b\in B\\}$.

From now on, denote the principal ideal generated by
$f\in\mathbb{Z}_{p}[x]/(x^{n}-1)$ with $\gcd(n,p)=1$ by $\langle
f\rangle_{p}^{n}$, then we have

######  Proposition 3.

Let $\mathcal{C}=\langle fh+pf\rangle$ be a cyclic code over
$\mathbb{Z}_{p^{2}}$ of length $n$ with $fhg=x^{n}-1$ and $\gcd(n,p)=1$, then
for every positive integer $i$, we have

$pI^{i}=p\underbrace{\langle fh\rangle\ast\dots\ast\langle
fh\rangle}_{i}=\\{p\underbrace{v_{1}\ast\dots\ast
v_{i}}_{i}|v_{1},\dots,v_{i}\in\mathcal{C}\\},$

and

$I_{i}=\underbrace{\langle\overline{fh}\rangle_{p}^{n}\ast\dots\ast\langle\overline{fh}\rangle_{p}^{n}}_{i}=\\{\underbrace{\overline{v_{1}}\ast\dots\ast\overline{v_{i}}}_{i}|v_{1},\dots,v_{i}\in\mathcal{C}\\}.$

###### Proof.

The equalities hold since for every polynomial (codeword) $v\in\mathcal{C}$,
$pfh\mid pv$ and $\overline{fh}\mid\overline{v}$. ∎

######  Proposition 4.

Let $\mathcal{C}=\langle fh+pf\rangle$ be a cyclic code over
$\mathbb{Z}_{p^{2}}$ of length $n$ with $fhg=x^{n}-1$ and $\gcd(n,p)=1$, then
the following statements are equivalent:

  1. (1)

$\Phi(\mathcal{C})$ is a $p$-ary linear code,

  2. (2)

$pP(\overline{r_{1}fh},\overline{r_{2}fh})\in\langle pf\rangle$ for any
$r_{1},r_{2}\in\mathbb{Z}_{p^{2}}[x]$,

  3. (3)

$pI^{\ell}\subseteq\langle pf\rangle$ (or equivalently,
$I_{\ell}\subseteq\langle\overline{f}\rangle_{p}^{n}$) for every $\ell\in
L=\\{1+2i|1\leqslant i\leqslant(p-1)/2\\}\cup\\{p-1\\}$.

###### Proof.

First, we prove $(1)$ and $(2)$ are equivalent. It’s easy to check that
$pm_{1}m_{2}=p\overline{m}_{1}\overline{m}_{2}$ if
$m_{1},m_{2}\in\mathbb{Z}_{p^{2}}$, where $\overline{m}_{1}\equiv
m_{1}\pmod{p}$ and $\overline{m}_{2}\equiv m_{2}\pmod{p}$. It’s known that
$\Phi(\mathcal{C})$ is linear if and only if for any
$\bm{u},\bm{v}\in\mathcal{C}$,
$pP(\overline{\bm{u}},\overline{\bm{v}})\in\mathcal{C}$, where
$\overline{\bm{u}}\equiv\bm{u}\pmod{p}$ and
$\overline{\bm{v}}\equiv\bm{v}\pmod{p}$. Since $\mathcal{C}$ is a cyclic code,
then $\bm{u}=r_{1}G$, $\bm{v}=r_{2}G$ for some polynomials $r_{1}$,
$r_{2}\in\mathbb{Z}_{p^{2}}[x]$, where $G=fh+pf$. Hence,
$pP(\overline{r_{1}G},\overline{r_{2}G})\in\mathcal{C}_{p}$, i.e.,
$pP(\overline{r_{1}fh},\overline{r_{2}fh})\in\langle pf\rangle$.

As for $(1)$ and $(3)$, note that $I^{\ell}$ is the set of all the
componentwise products of $\ell$ codewords. If $(3)$ holds, then $(2)$ holds,
hence $\Phi(\mathcal{C})$ is linear. On the other hand, if $(1)$ holds, then
by [17, Theorem 2], $\Phi(pI^{\ell})$, $\ell\in L$ are generators of
$\Phi(\mathcal{C})$. Equivalently, $pI^{\ell}\subseteq\langle pf\rangle$. ∎

Let $c$ be a divisor of $x^{n}-1\in\mathbb{F}_{p}[x]$, then $\left(c\otimes
c\otimes\cdots\otimes c\right)_{j}$ is defined to be the polynomial whose
roots are the products $\xi^{i_{1}}\xi^{i_{2}}\cdots\xi^{i_{j}}$, where $j$ is
a positive integer and $\xi^{i_{1}},\xi^{i_{2}},\cdots,\xi^{i_{j}}$ are roots
of $c$. For convenience, denote $\left(c\otimes c\otimes\cdots\otimes
c\right)_{j}$ by $c_{j}$, which is called the $j_{th}$ circle product of $c$.
For example, $c_{2}=(c\otimes c)_{2}$ and $c_{3}=(c\otimes c\otimes c)_{3}$.
In general, $c_{j}\mid x^{n}-1$ since $c\mid x^{n}-1$. Equivalently, the roots
of $c_{j}$ form a subset (not necessarily a subgroup) of the group of the
$n$-th roots of unity. In addition,
$0\leqslant\deg(c_{i})\leqslant\deg(c_{i+1})\leqslant n$, $i\geqslant 1$.

Denote the set of roots of $x^{n}-1$ by $U_{n}$, then the set of roots of
$c_{j}$ is a subset of $U_{n}$.

######  Example 3.

It’s known that the roots of
$c=x^{2}+1=(x-\xi)(x-\xi^{-1})\in\mathbb{Z}_{3}[x]$ are in the extension field
$\mathbb{F}_{9}$. Let $S=\\{1,-1\\}$, then

$S+S=\\{-2,0,2\\},\quad S+S+S=\\{-3,-1,1,3\\}.$

That’s to say, the roots of $c_{2}$ and $c_{3}$ are

$S_{1}=\\{\xi^{-2},\xi^{0},\xi^{2}\\}=\\{1,-1\\}\subseteq
U_{4},\quad\textnormal{and}\quad
S_{2}=\\{\xi^{-3},\xi^{-1},\xi,\xi^{3}\\}=\\{\xi,\xi^{-1}\\}\subseteq U_{4},$

respectively. Hence, $c_{2}=x^{2}-1$ and $c_{3}=x^{2}+1$.

######  Lemma 3.

Let $c$ and $d$ be two polynomials in $\mathbb{Z}_{p}[x]$ such that
$x^{n}-1=cd$, where $\gcd(n,p)=1$. Denote the $j_{th}$ circle product of $c$
by $c_{j}$ and let $e_{j}$ be the polynomial such that $c_{j}e_{j}=x^{n}-1$
for $j=2,\cdots,p$. Then $J_{i}\subseteq\langle e_{i}\rangle_{p}^{n}$, where
$J=J_{1}=\langle d\rangle_{p}^{n}$ and $J_{i+1}=J_{i}\ast J$ for
$i=1,2,\cdots,p-1$.

###### Proof.

Let $s_{i}(x)=a_{1}^{i}(x)d(x)\ast a_{2}^{i}(x)d(x)\ast\cdots\ast
a_{i}^{i}(x)d(x)\in J_{i}$ for $i=1,2,\cdots,p$ and $S_{i}(x)$ be the Mattson-
Solomon polynomials of $s_{i}$. Then, by [20, Ch.8.§6. Theorem 22], we have

$S_{i}(x)=\sum_{k=0}^{n-1}s_{i}(z^{k})x^{k}=\frac{1}{n^{i-1}}A_{1}^{i}(x)A_{2}^{i}(x)\cdots
A_{i}^{i}(x),$

where $z$ is a primitive $n$-th root of unity in some extension field of
$\mathbb{Z}_{p}$, $A_{j}^{i}(x)$ is the Mattson-Solomon polynomials of
$a_{j}^{i}(x)d(x)$ with $1\leqslant j\leqslant i$ and

$A_{j}^{i}(x)=\sum_{k=0}^{n-1}a_{j}^{i}(z^{k})d(z^{k})x^{k}.$

Since $x^{n}-1=d(x)c(x)$, then $d(z^{k})\neq 0$ if and only if $c(z^{k})=0$.
Thus,

$\displaystyle S_{i}(x)$
$\displaystyle=\frac{1}{n^{i-1}}\left(\sum_{k_{1}=0}^{n-1}a_{1}^{i}(z^{k_{1}})d(z^{k_{1}})x^{k_{1}}\right)\cdots\left(\sum_{k_{i}=0}^{n-1}a_{i}^{i}(z^{k_{i}})d(z^{k_{i}})x^{k_{i}}\right)$
$\displaystyle=\frac{1}{n^{i-1}}\left(\sum_{c(z^{k_{1}})=0}a_{1}^{i}(z^{k_{1}})d(z^{k_{1}})x^{k_{1}}\right)\cdots\left(\sum_{c(z^{k_{i}})=0}a_{i}^{i}(z^{k_{i}})d(z^{k_{i}})x^{k_{i}}\right)$
$\displaystyle=\frac{1}{n^{i-1}}\left(\sum_{c_{i}(z^{k})=0}\sum_{k_{1}+\cdots+k_{i}=k}a_{1}^{i}(z^{k_{1}})d(z^{k_{1}})\cdots
a_{i}^{i}(z^{k_{i}})d(z^{k_{i}})x^{k}\right).$

It follows that if $s_{i}(z^{k})\neq 0$, then $c_{i}(z^{k})=0$ for some
$0\leqslant k\leqslant n-1$. Equivalently, if $e_{i}(z^{k})=0$, then
$s_{i}(z^{k})=0$. This means $e_{i}(x)$ divides $s_{i}(x)$ and
$s_{i}(x)\in\langle e_{i}(x)\rangle_{p}^{n}$. Thus, $J_{i}\subseteq\langle
e_{i}\rangle_{p}^{n}$. ∎

It’s clear that two polynomials over a field are coprime (over some extension
of $\mathbb{Z}_{p}$) if and only if their roots are totally distinct. Using
this simple property, we give the following lemma.

######  Lemma 4.

Keep the notations in Proposition 4 and Lemma 3. If $\overline{f}$ is coprime
with $\overline{g_{i}}$, then
$I_{i}\subseteq\langle\overline{f}\rangle_{p}^{n}$. Conversely, if there
exists a polynomial $s_{i}\in
I_{i}\subseteq\langle\overline{f}\rangle_{p}^{n}$ such that $s_{i}(z^{j})\neq
0$ for all $j\in K_{i}=\\{k|\overline{g_{i}}(z^{k})=0,0\leqslant k\leqslant
n-1\\}$, then $\overline{f}$ is coprime with $\overline{g_{i}}$, where $z$ is
a primitive $n$-th root of unity in some extension field of $\mathbb{Z}_{p}$,
and $\overline{g_{i}}$ is the $i_{th}$ circle product of $\overline{g}$,
$i\geqslant 1$.

###### Proof.

By Proposition 4 and [19, Theorem 4.13], the case $\overline{f}=1$ or
$\overline{g}=1$ is trivial. From now on, assume that $\overline{f}\neq 1$ and
$\overline{g_{i}}\neq 1$. Let $e_{i}$ be the polynomial such that
$g_{i}e_{i}=\overline{g_{i}}\overline{e_{i}}=x^{n}-1$.

The first statement follows from Lemma 3. So it’s sufficient to consider the
last statement.

Obviously, $K_{i}\neq\emptyset$ since $1\neq\overline{g}\mid x^{n}-1$. Let
$s_{i}(x)=\overline{\lambda_{i}}(x)\overline{f}(x)\in
I_{i}\subseteq\langle\overline{f}\rangle_{p}^{n}$ be the polynomial that
satisfies the condition. Using the Mattson-Solomon transform, we obtain

$S_{i}(x)=\sum_{j=0}^{n-1}s_{i}(z^{j})x^{j}=\sum_{j=0}^{n-1}\overline{\lambda_{i}}(z^{j})\overline{f}(z^{j})x^{j}.$

Then for every $k\in K_{i}$,
$\overline{\lambda_{i}}(z^{k})\overline{f}(z^{k})\neq 0$. It follows that
$\overline{f}(z^{k})\neq 0$. We deduce that $\overline{g_{i}}(z^{k})=0$
implies that $\overline{f}(z^{k})\neq 0$. Equivalently, if
$\overline{f}(z^{k})=0$, then $\overline{g_{i}}(z^{k})\neq 0$. Namely,
$\overline{e_{i}}(z^{k})=0$. Therefore, $\overline{f}$ divides
$\overline{e_{i}}$ and $\overline{f}$ is coprime with $\overline{g}_{i}$. ∎

By the above lemmas, we give the necessary and sufficient condition on the
linearity of the Gray image of some cyclic code over $\mathbb{Z}_{p^{2}}$.

######  Theorem 3.

Let $\mathcal{\mathcal{C}}=\langle fh+pf\rangle$ be a linear cyclic code over
$\mathbb{Z}_{p^{2}}$ of length $n$ with $fhg=x^{n}-1$ and $\gcd(n,p)=1$. Then
$\Phi(\mathcal{\mathcal{C}})$ is linear if and only if $\overline{f}$ is
coprime with $\overline{g_{\ell}}$ for all $\ell\in L$, where
$\overline{g_{\ell}}$ is the $\ell_{th}$ circle product of $\overline{g}$.

###### Proof.

The sufficiency follows from Proposition 4 and Lemma 4.

Assume that $\Phi(\mathcal{C})$ is linear, then
$I_{\ell}\subseteq\langle\overline{f}\rangle_{p}^{n}$ for every $\ell\in L$.
Let $s_{i}(x)=s_{i-1}(x)\ast x^{m_{i}}d(x)\in I_{i}$ and $S_{i}(x)$ be the
Mattson-Solomon polynomials of $s_{i}$, where $s_{i-1}(x)\in I_{i-1}$ and
$s_{1}(x)=d(x)$, $d=\overline{fh}$, and $0\leqslant m_{i}\leqslant n-1$. Then
for $i\geqslant 2$, by [20, Ch.8.§6. Theorem 22], we have

$S_{i}(x)=\sum_{k\in K_{i}}s_{i}(z^{k})x^{k}=\frac{1}{n}\left(\sum_{t\in
K_{i-1}}s_{i-1}(z^{t})x^{t}\right)\left(\sum_{j\in
K_{1}}z^{jm_{i}}d(z^{j})x^{j}\right),$

where $z$ is a primitive $n$-th root of unity in some extension field of
$\mathbb{Z}_{p}$.

We claim that there exists $0\leqslant m_{i}\leqslant n-1$ such that
$s_{i}(z^{k})\neq 0$ for every $k\in K_{i}$.

Use induction on $i$. The case $i=1$ holds trivially, since
$s_{1}(z^{k})=z^{0}d(z^{k})\neq 0$ for every $k\in K_{1}$. Then assume that
$s_{i-1}(z^{t})\neq 0$ for every $t\in K_{i-1}$. For every $k\in K_{i}$,
define

$\Gamma_{k}^{i}(x)=\frac{1}{n}\sum_{j\in
J_{i}(k)}s_{i-1}(z^{k-j})d(z^{j})x^{j},$

where

$J_{i}(k)=\\{j|d(z^{j})\neq 0,s_{i-1}(z^{k-j})\neq 0\\}.$

If $k\in K_{i}$ and $j\in K_{1}$, then $k-j\in K_{i-1}$, which implies that
$s_{i-1}(z^{k-j})\neq 0$ and $J_{i}(k)\neq\emptyset$. Since
$s_{i-1}(z^{k-j})d(z^{j})\neq 0$ for every $j\in K_{1}$, then $\Gamma_{k}^{i}$
is a nonzero polynomial whose degree is at most $n-1$. Then there exists an
integer $0\leqslant m_{i}\leqslant n-1$ such that
$\Gamma_{k}^{i}(z^{m_{i}})=s_{i}(z^{k})\neq 0$. Thus, the claim holds.

From the claim, $s_{\ell}\in I_{\ell}$ is the polynomial such that for every
$j\in K_{\ell}$, $s_{\ell}(z^{j})\neq 0$. By Lemma 4, $\overline{f}$ is
coprime with $\overline{g_{\ell}}$, where $\ell\in L$. ∎

######  Remark 4.

The Gray images of the codes are called trivial in which $f=1$, or $g=1$, or
$g=x^{m}-1$ for some $m\mid n$, since the Gray images are always linear.
Assume that $f\neq 1$ and let $\Gamma$ be the set of roots of $\overline{g}$.
It’s known that $\overline{g_{i}}$ is the polynomial whose roots are just in
the set $\Gamma^{i}$ for some integer $i$, where

$\Gamma^{i}=\Gamma\cdots\Gamma=\\{\xi_{1}\dots\xi_{i}|\xi_{j}\in\Gamma,1\leqslant
j\leqslant i\\}\subseteq U_{n}.$

It follows that $ab\in\Gamma^{i+j}$ if $a\in\Gamma^{i}$ and $b\in\Gamma_{j}$.
Therefore, the nontrivial linear Gray image exists if
$\overline{f}\mid(1+x^{e}+x^{2e}+\dots+x^{n-e})$, where $e$ is the order of
$\overline{g}$ and $e<n$. Furthermore,
$\overline{f}\mid(1+x^{e}+x^{2e}+\dots+x^{n-e})$ if and only if $\overline{f}$
is coprime with $\overline{g_{i}}$ for every positive integer $i$.

In Section 5, for some special $n$, the linear Gray images of the cyclic codes
obtained from $x^{n}-1$ are all trivial. Thus, it’s a difficult but
interesting topic to find the nontrivial linear Gray image as optimal codes.

###  4.2 $p$-ary Images of $\mathbb{Z}_{p}\mathbb{Z}_{p^{2}}$-Additive Cyclic
Codes

In this subsection, we will give a necessary and sufficient condition of the
$p$-ary image of a $\mathbb{Z}_{p}\mathbb{Z}_{p^{2}}$-additive cyclic code to
be linear.

######  Lemma 5.

About $\Phi(\mathcal{C}_{Y})$, we have the following two assertions:

  1. (1)

Let $\mathcal{C}$ be a $\mathbb{Z}_{p}\mathbb{Z}_{p^{2}}$-additive code such
that $\Phi(\mathcal{C})$ is linear, then $\Phi(\mathcal{C}_{Y})$ is also
linear.

  2. (2)

Let $\mathcal{C}$ be a $\mathbb{Z}_{p}\mathbb{Z}_{p^{2}}$-additive code of
length $n$ with $\gcd(n,p)=1$. If $\mathcal{C}_{p}$ is separable, then
$\Phi(\mathcal{C})$ is linear if and only if $\Phi(\mathcal{C}_{Y})$ is
linear.

###### Proof.

As for $(1)$, for any
$\bm{u}=(u,u^{\prime}),\bm{v}=(v,v^{\prime})\in\mathcal{C}$,
$pP(\bm{u},\bm{v})=(\bm{0},pP(u^{\prime},v^{\prime}))\in\mathcal{C}_{p}\subseteq\mathcal{C}$,
which means $pP(u^{\prime},v^{\prime})\in\mathcal{C}_{Y}$. Thus,
$\Phi(\mathcal{C}_{Y})$ is linear. As for $(2)$, we only need to consider the
sufficiency. If $\Phi(\mathcal{C}_{Y})$ is linear and
$u^{\prime},v^{\prime}\in\mathcal{C}_{Y}$, then
$pP(u^{\prime},v^{\prime})\in\mathcal{C}_{Y}$, which means there exists
$\bm{w}=(w,pP(u^{\prime},v^{\prime}))\in\mathcal{C}$. Thus,
$pP(u^{\prime},v^{\prime})\in(\mathcal{C}_{p})_{Y}$. Hence,
$(\bm{0},pP(u^{\prime},v^{\prime}))\in\mathcal{C}_{p}\subseteq\mathcal{C}$
since $\mathcal{C}_{p}$ is separable and $\bm{0}\in(\mathcal{C}_{p})_{X}$. ∎

######  Lemma 6.

Let $\mathcal{C}=\langle(a,0),(b,fh+pf)\rangle$ be a
$\mathbb{Z}_{p}\mathbb{Z}_{p^{2}}$-additive cyclic code with
$fhg=x^{\beta}-1$. Then $\mathcal{C}$ can be also generated by $(a,0)$,
$(b\overline{g},pfg)$ and $(b^{\prime},fh)$, where
$b^{\prime}=b-\overline{\mu}b\overline{g}$ and $\lambda h+\mu g=1$.

###### Proof.

Similar to the proof of [9, Lemma 10]. ∎

######  Lemma 7.

Let $\mathcal{C}=\langle(a,0),(b,fh+pf)\rangle$ be a
$\mathbb{Z}_{p}\mathbb{Z}_{p^{2}}$-additive cyclic code with
$fhg=x^{\beta}-1$, then the subcode $\mathcal{C}_{p}$ is generated by
$(a,0),(b\overline{g},pfg)$ and $(0,pfh)$.

###### Proof.

According to the definition, $\mathcal{C}_{p}\subseteq\mathcal{C}$ is the
subcode which contains all codewords of order $p$. Obviously, the order of any
codeword $\bm{u}\in\langle(a,0),(b\overline{g},pfg),(0,pfh)\rangle$ is $p$.

Note that $\mathcal{C}=\mathcal{C}_{p}$ if and only if $\deg(g)=0$, i.e.,
$g=1$ by Proposition 2. In this case. $fh=x^{\beta}-1=0=pfh$ when regarded as
vectors. Let $\lambda=0$ and $\mu=1$, then $b^{\prime}=b-b=0$ and the result
follows from Lemma 6.

From now on, assume that $\mathcal{C}\neq\mathcal{C}_{p}$. Let
$\bm{0}\neq\bm{v}\in\mathcal{C}_{p}$, then there exist polynomials
$d_{1},d_{2}\in\mathbb{Z}_{p^{2}}[x]$ such that

$\bm{v}=\overline{d_{1}}\star(a,0)+d_{2}\star(b,fh+pf),\quad
p\bm{v}=(0,pd_{2}fh)=0.$

Using the division algorithm, $d_{2}=qg+d^{\prime}_{2}$ for some $q$ and
$d^{\prime}_{2}$, where $\deg(d^{\prime}_{2})<\deg(g)$. Then $pd_{2}fh\equiv
pd^{\prime}_{2}fh\pmod{(x^{\beta}-1)}$ and $pd_{2}fh\equiv
pd^{\prime}_{2}fh\pmod{p^{2}}$. Since $pd^{\prime}_{2}fh$ is a polynomial with
degree smaller than $\beta$, then $pd^{\prime}_{2}fh\equiv 0\pmod{p^{2}}$. If
$fh\equiv 0\pmod{p}$, then $p(b,fh+pf)=0$, which implies that
$\mathcal{C}=\mathcal{C}_{p}$, contradiction. Thus, we have
$d^{\prime}_{2}\equiv 0\pmod{p}$ and $d^{\prime}_{2}=pk$ for some nonzero
polynomial $k$. Hence, $d_{2}=qg+pk$ and

$\displaystyle\bm{v}$
$\displaystyle=\overline{d_{1}}\star(a,0)+(qg+pk)\star(b,fh+pf)$
$\displaystyle=\overline{d_{1}}\star(a,0)+q\star(b\overline{g},pfg)+k\star(0,fh).$

Therefore, $\bm{v}\in\langle(a,0),(b\overline{g},pfg),(0,pfh)\rangle$ and we
conclude the proof. ∎

From [3] and the matrix (1) in Remark 1, the generator matrix
$\mathcal{G}_{p}$ of $\mathcal{C}_{p}$ has the form:

$\mathcal{G}_{p}=\begin{pmatrix}\begin{array}[]{ccc|ccc}I_{\kappa_{1}}&A&B&\bm{0}&\bm{0}&\bm{0}\\\
\bm{0}&I_{\kappa_{2}}&C&pT^{\prime}_{2}&\bm{0}&\bm{0}\\\
\bm{0}&\bm{0}&\bm{0}&pT_{1}&pI_{\gamma-\kappa}&\bm{0}\\\
\bm{0}&\bm{0}&\bm{0}&pS&pR&pI_{\delta}\\\ \end{array}\end{pmatrix}.$ (4)

Comparing Lemma 6 and Lemma 7, the subcodes generated by $(b^{\prime},fh)$ and
the last $\delta$ rows of (1) in Remark 1 should be permutation-equivalent.
Then any codeword generated by the last $\delta_{2}$ rows should belong to
$\langle(b^{\prime},fh)\rangle$, up to equivalence.

######  Lemma 8.

Let $\mathcal{C}=\langle(a,0),(b,fh+pf)\rangle$ be a
$\mathbb{Z}_{p}\mathbb{Z}_{p^{2}}$-additive cyclic code with
$fhg=x^{\beta}-1$. Let $\mathcal{C}^{\prime}$ be the subcode generated by
$(b^{\prime},fh)$ and $S=\\{\bm{u}=(\bm{0},u^{\prime})\in\mathcal{C}\\}$,
where $b^{\prime}=b-\overline{\mu}b\overline{g}$ and $\lambda h+\mu g=1$. Then
$\mathcal{C}^{\prime}$ is cyclic and

$\mathcal{C}^{\prime}=\left\langle(b^{\prime},fh),\left(0,\frac{pfga}{\gcd(a,b\overline{g})}\right)\right\rangle.$

###### Proof.

Denote by $\mathcal{I}$ the ideal generated by the two generators. Note that

$\left(0,\frac{pfga}{\gcd(a,b\overline{g})}\right)=-\frac{b\overline{g}}{\gcd(a,b\overline{g})}\star(a,0)+\frac{a}{\gcd(a,b\overline{g})}\star(b\overline{g},pfg)\in\mathcal{C}^{\prime},$
(5)

since $a,b\in\mathbb{Z}_{p}[x]/(x^{\alpha}-1)$. Then
$\mathcal{I}\subseteq\mathcal{C}^{\prime}$ and it’s sufficient to show
$S\subseteq\mathcal{I}$.

By Lemma 6, every codeword $(0,c)$ can be written as:

$(0,c)=a_{1}\star(a,0)+a_{2}\star(b\overline{g},pfg)+a_{3}\star(b^{\prime},fh),$
(6)

for some $a_{1},a_{2},a_{3}\in\mathbb{Z}_{p^{2}}[x]/(x^{\beta}-1)$, then we
have the following two cases.

The order of $(0,c)$ is $p$ if and only if
$\overline{a_{1}}a+\overline{a_{2}}b\overline{g}=0$, and
$\overline{a_{1}}\frac{a}{\gcd(a,b\overline{g})}=-\overline{a_{2}}\frac{b\overline{g}}{\gcd(a,b\overline{g})}$.
Hence, $\frac{a}{\gcd(a,b\overline{g})}\mid\overline{a_{2}}$ since
$\frac{a}{\gcd(a,b\overline{g})}$ and
$\frac{b\overline{g}}{\gcd(a,b\overline{g})}$ are coprime. Thus,
$\overline{a_{2}}=\overline{d}\frac{a}{\gcd(a,b\overline{g})}$ for some
$\overline{d}$. Therefore,

$a_{1}\star(a,0)+a_{2}\star(b\overline{g},pfg)=(0,a_{2}pfg)=d\star\left(0,\frac{pfga}{\gcd(a,b\overline{g})}\right)\in\mathcal{I},$

where $d$ is the Hensel lift of $\overline{d}$.

If the order of $(0,c)$ is $p^{2}$, by (1) in Remark 1, we can get
$(0,c)=(0,c_{1})+(0,c_{2})$, where the order of $(0,c_{1})$ is $p$ and
$(0,c_{2})\in\langle(b^{\prime},fh)\rangle$. By the above proof,
$(0,c_{1})\in\mathcal{I}$. Therefore, $S\subseteq\mathcal{I}$ and
$\mathcal{C}^{\prime}=\mathcal{I}$ is cyclic. ∎

Next we will give a necessary and sufficient condition for the Gray image to
be linear.

######  Theorem 4.

Let $\mathcal{C}=\langle(a,0),(b,fh+pf)\rangle$ be a
$\mathbb{Z}_{p}\mathbb{Z}_{p^{2}}$-additive cyclic code with
$fhg=x^{\beta}-1$. Then $\Phi(\mathcal{C})$ is linear if and only if
$\overline{f^{\prime}}=\overline{f}a/\gcd(a,\overline{b}g)$ is coprime with
$\overline{g_{\ell}}$ for every $\ell\in L$.

###### Proof.

Let $\bm{u}=(u,u^{\prime})$, $\bm{w}=(w,w^{\prime})\in\mathcal{C}$. Obviously,
if $\bm{u}\in\mathcal{C}_{p}$, then $pP(\bm{u},\bm{w})=\bm{0}\in\mathcal{C}$.
Note that by Lemma 6 and Lemma 7,
$\mathcal{C}=\langle(a,0),(b\overline{g},pfg)(b^{\prime},fh)\rangle$ and
$\mathcal{C}_{p}=\langle(a,0),(b\overline{g},pfg)(0,pfh)\rangle$, where
$\lambda h+\mu g=1$. Then, we only need to consider the codewords that are not
in $\mathcal{C}_{p}$ and $(b^{\prime},fh)$ will always be one generator of
such codewords. Since $pP(\bm{u},\bm{w})=(\bm{0},pP(u^{\prime},w^{\prime}))$,
we define the set $S=\\{\bm{u}=(\bm{0},u^{\prime})\in\mathcal{C}\\}$ and the
subcode
$\mathcal{C}^{\prime}=\langle(b^{\prime},fh),S\rangle\subseteq\mathcal{C}$.
Comparing with (1) in Remark 1, the generator matrix of $\mathcal{C}^{\prime}$
is (permutation-equivalent) in the following form:

$\left(\begin{array}[]{ccc|ccc}\bm{0}&\bm{0}&\bm{0}&pT_{1}&pI_{\gamma-\kappa}&\bm{0}\\\
\bm{0}&\bm{0}&S^{\prime}&S^{\prime\prime}&R&I_{\delta}\\\ \end{array}\right).$
(7)

For any codeword $\bm{u}\notin\mathcal{C}^{\prime}$, by (1) in Remark 1, its
order is $p$, then $pP(\bm{u},\bm{w})=(\bm{0},\bm{0})\in\mathcal{C}^{\prime}$.
Thus, we only need to consider the codewords
$\bm{u},\bm{w}\in\mathcal{C}^{\prime}$. Obviously,
$pP(\bm{u},\bm{w})=(\bm{0},pP(u^{\prime},w^{\prime}))\in
S\subseteq\mathcal{C}^{\prime}\subseteq\mathcal{C}$. Therefore,
$\Phi(\mathcal{C})$ is linear if and only if
$pP(\bm{u},\bm{w})\in\mathcal{C}^{\prime}$ for any
$\bm{u},\bm{w}\in\mathcal{C}^{\prime}$, which means, for all
$\bm{u},\bm{w}\in\mathcal{C}^{\prime}$,
$pP(\bm{u},\bm{w})\in\mathcal{C}^{\prime}$, i.e., $\Phi(\mathcal{C}^{\prime})$
is linear.

By Lemma 8, $\mathcal{C}^{\prime}$ is cyclic and

$\mathcal{C}^{\prime}=\left\langle(b^{\prime},fh),\left(0,\frac{pfga}{\gcd(a,b\overline{g})}\right)\right\rangle.$

Let $f^{\prime}=\frac{fa}{\gcd(a,b\overline{g})}$,
$h^{\prime}=\frac{h\gcd(a,b\overline{g})}{a}$ and $g^{\prime}=g$. It’s clear
that $f^{\prime}g^{\prime}h^{\prime}=x^{\beta}-1$ with $f^{\prime}$,
$g^{\prime}$ and $h^{\prime}$ coprime factors. Thus, we have
$\mathcal{C}^{\prime}=\langle(b^{\prime},f^{\prime}h^{\prime}),(0,pf^{\prime})\rangle$.
Obviously, the codewords of order $p$ in $\mathcal{C}^{\prime}$ belong to $S$,
i.e., the left part is all zero vector. Then,
$\mathcal{C}^{\prime}_{p}=\langle(0,pf^{\prime}h^{\prime}),(0,pf^{\prime})\rangle=\langle(0,pf^{\prime})\rangle$
is separable since $\langle(0,pf^{\prime})\rangle=\\{0\\}\times\langle
pf^{\prime}\rangle$. By Lemma 5, $\Phi(\mathcal{C}^{\prime})$ is linear if and
only if $\Phi(\mathcal{C}^{\prime}_{Y})$ is linear. Moreover,
$\mathcal{C}^{\prime}_{Y}=\langle
f^{\prime}h^{\prime},pf^{\prime}\rangle=\langle
f^{\prime}h^{\prime}+pf^{\prime}\rangle$ since
$f^{\prime}h^{\prime}g^{\prime}=x^{\beta}-1$. According to Theorem 3,
$\Phi(\mathcal{C}^{\prime}_{Y})=\Phi(\langle
f^{\prime}h^{\prime}+pf^{\prime}\rangle)$ is linear if and only if
$\gcd(\overline{f^{\prime}},\overline{g^{\prime}_{\ell}})=1$ for every
$\ell\in L$. ∎

######  Remark 5.

Let $\mathcal{C}=\langle(a,0),(b,fh+pf)\rangle$ be a
$\mathbb{Z}_{p}\mathbb{Z}_{p^{2}}$-additive cyclic code with
$fhg=x^{\beta}-1$. Similar to the proof of [9, Theorem 12], it’s easy to
obtain that $\Phi(\mathcal{C})$ is linear if $g=1$ or $g=x^{s}-1$ with
$s\mid\beta$. And these linear Gray images are called trivial. Similar to
Remark 4, the nontrivial linear Gray image exists if

$\gcd\left(\frac{a}{\gcd(a,b\overline{g})},x^{e}-1\right)=1,\quad\textnormal{and}\quad\overline{f}\mid(1+x^{e}+x^{2e}+\dots+x^{n-e}),$

where $e$ is the order of $\overline{g}$ and $e<n$.

######  Example 4.

Let $\mathcal{C}=\langle(x-1,0),(1,fh+3f)\rangle$ be a
$\mathbb{Z}_{3}\mathbb{Z}_{9}$-additive cyclic code of type $(\alpha\geqslant
2,11;\gamma,\delta;\kappa)$. Since
$x^{11}-1=(x-1)(x^{5}+7x^{4}-x^{3}+x^{2}+6x-1)(x^{5}+3x^{4}-x^{3}+x^{2}+2x-1)$,
then let $p_{5}=x^{5}+7x^{4}-x^{3}+x^{2}+6x-1$ and
$q_{5}=x^{5}+3x^{4}-x^{3}+x^{2}+2x-1$. Both of $p_{5}$ and $q_{5}$ are basic
irreducible polynomials over $\mathbb{Z}_{9}$. Then the linearity of
$\Phi(\mathcal{C})$ is listed in Table 3.

Table 3: Linearity of $\Phi(\mathcal{C})$ with $\mathcal{C}=\langle(x-1,0),(1,fh+3f)\rangle$: $f$ | $g$ | $h$ | Linearity
---|---|---|---
$-$ | $1$ | $-$ | Linear
$-$ | $x-1$ | $-$ | Linear
$p_{5}$ | $q_{5}$ | $x-1$ | Nonlinear
$1$ | $q_{5}$ | $(x-1)p_{5}$ | Linear
$x-1$ | $q_{5}$ | $p_{5}$ | Nonlinear
$q_{5}$ | $p_{5}$ | $x-1$ | Nonlinear
$x-1$ | $p_{5}$ | $q_{5}$ | Nonlinear
$1$ | $p_{5}$ | $(x-1)q_{5}$ | Linear
$1$ | $(x-1)p_{5}$ | $q_{5}$ | Linear
$q_{5}$ | $(x-1)p_{5}$ | $1$ | Nonlinear
$1$ | $(x-1)q_{5}$ | $p_{5}$ | Linear
$p_{5}$ | $(x-1)q_{5}$ | $1$ | Nonlinear

##  5 Linearity of Gray Images of Some Special Cyclic Codes over
$\mathbb{Z}_{p^{2}}$

Let $\langle fh+pf\rangle$ be a cyclic code over $\mathbb{Z}_{p^{2}}$ and
$fhg=x^{n}-1$. By Theorem 3, the linearity of the Gray image are determined
completely. In this section, assume that $q$ is prime and $p\neq q$.

######  Example 5.

Let $n=q^{2}$ with the prime $q$ and $x^{n}-1=(x-1)ab$, where
$\overline{a}=1+x+\cdots+x^{q-1}$ and
$\overline{b}=1+x^{q}+x^{2q}+\cdots+x^{(q-1)q}$ are both irreducible over
$\mathbb{F}_{p}$.

From now on, assume that $f\neq 1$, $g\neq 1$ and $g\neq x-1$. It’s easy to
check that $\overline{a}\otimes\overline{a}=x^{q}-1$ and
$\overline{b}\otimes\overline{b}=x^{q^{2}}-1$, which implies
$\Phi(\mathcal{C})$ is linear only if $g\mid(x-1)a$.

Note that $\overline{g_{2}}=\dots=\overline{g_{p}}=(x-1)\overline{a}$ whenever
$g=a$ or $g=(x-1)a$. Thus, $\Phi(\mathcal{C})$ is linear if and only if
$\overline{f}$ is coprime with $(x-1)\overline{a}$, i.e., $f=b$, since the
roots of $\overline{b}$ are not $q_{th}$ roots of unity.

Then the linearity of the Gray image of the code $\mathcal{C}=\langle
fh,pf\rangle$ is listed in Table 4.

Table 4: Linearity of the codes in Example 5 Length | $f$ | $g$ | $h$ | Linearity
---|---|---|---|---
Any | $1$ | $\ast$ | $\ast$ | Linear
Any | $\ast$ | $1$ | $\ast$ | Linear
Any | $\ast$ | $x-1$ | $\ast$ | Linear
$q^{2}$ | $a$ | $(x-1)b$ | $1$ | Nonlinear
$q^{2}$ | $a$ | $b$ | $x-1$ | Nonlinear
$q^{2}$ | $b$ | $(x-1)a$ | $1$ | Linear
$q^{2}$ | $b$ | $a$ | $x-1$ | Linear
$q^{2}$ | $x-1$ | $a$ | $b$ | Nonlinear
$q^{2}$ | $x-1$ | $b$ | $a$ | Nonlinear
$q^{2}$ | $x-1$ | $ab$ | $1$ | Nonlinear
$q^{2}$ | $(x-1)a$ | $b$ | $1$ | Nonlinear
$q^{2}$ | $(x-1)b$ | $a$ | $1$ | Nonlinear
Table 5: Linearity of $\Phi(\mathcal{C})$ with $\mathcal{C}=\langle(a,0),(b,fh+pf)\rangle$ $\alpha$ | $\beta$ | $f$ | $g$ | $h$ | Linearity
---|---|---|---|---|---
- | - | - | $1$ | - | Linear
- | - | $1$ | $-$ | - | Linear
- | - | - | $x-1$ | - | Linear
- | $ts$ | - | $x^{s}-1$ | - | Linear

######  Example 6.

Let $\mathcal{C}=\langle(a,0),(b,fh+pf)\rangle$ be a
$\mathbb{Z}_{3}\mathbb{Z}_{9}$-additive cyclic code of type
$(\alpha,\beta;\gamma,\delta;\kappa)$. Then the linearity of
$\Phi(\mathcal{C})$ of some special $\mathcal{C}$ are listed in Table 5.

Let $n$ and $m$ be two positive integers such that $\gcd(n,m)=1$, then the
least positive integer $k$ for which $m^{k}\equiv 1\pmod{n}$ is called the
multiplicative order of $m$ modulo $n$.

Assume that $n$ and $p$ are coprime, then the cyclotomic coset of $p$ modulo
$n$ containing $i$ is defined by

$C_{i}=\\{(i\cdot p^{j}\pmod{n})\in\mathbb{Z}_{n}:j=0,1,\cdots\\}.$

######  Theorem 5.

Let $n$ be odd prime and $\ell=(n-1)/2$ be the multiplicative order of $p$
modulo $n$, then the following statements hold:

$(1)$ over $\mathbb{Z}_{p^{2}}$, we have $x^{n}-1=(x-1)f_{1}f_{2}$, where
$\overline{f_{1}}$ and $\overline{f_{2}}$ are two irreducible polynomials of
degree $\ell$ over $\mathbb{F}_{p}$;

$(2)$ $\overline{f}_{i}\otimes\overline{f}_{i}=\frac{x^{n}-1}{x-1}$,
$\overline{f}_{i}\otimes\overline{f}_{i}\otimes\overline{f}_{i}=x^{n}-1$ and
$\gcd(\overline{f_{i}},\overline{f_{j}}\otimes\overline{f_{j}})=\overline{f_{i}}$,
where $i=1,2$;

$(3)$ the Gray image of the cyclic code $\langle fh+pf\rangle$ over
$\mathbb{Z}_{p^{2}}$ is linear if and only if $f=1$ or $g\in\\{1,x-1\\}$,
where $fgh=(x-1)f_{1}f_{2}=x^{n}-1$.

###### Proof.

By [18, Theorem 2.45 & Theorem 2.47], it’s known that
$x^{n}-1=(x-1)\overline{f_{1}}\overline{f_{2}}$, where $\overline{f_{1}}$ and
$\overline{f_{2}}$ are two irreducible polynomials of degree $\ell$ over
$\mathbb{F}_{p}$. Then, using Hensel’s lemma, we can get
$x^{n}-1=(x-1)f_{1}f_{2}$ and the first statement $(1)$ holds.

As for $(2)$, $\mathbb{Z}_{n}$ (actually, $\mathbb{Z}_{n}$ is a field) can be
partitioned into three parts, $C_{0}$, $C_{1}$ and $C_{i}$ for some $i$ and
the sizes of $C_{1}$ and $C_{i}$ are both $\ell$. Obviously,
$C_{1}=\\{1,p,p^{2},\cdots,p^{\ell-1}\\}$, since $\ell$ is the multiplicative
order of $p$ modulo $n$. Note that $p$ is the square (quadratic residue modulo
$n$) of some element in
$\mathbb{Z}_{n}^{\ast}=\mathbb{Z}_{n}\setminus\\{0\\}$. Thus, all the elements
in $C_{1}$ are all the squares of $\mathbb{Z}_{n}^{\ast}$. Equivalently,
$C_{i}$ is the set of all non-squares (quadratic non-residue modulo $n$) in
$\mathbb{Z}_{n}^{\ast}$.

Recall the quadratic character $\eta$ (see [18, Example 5.10]) on
$\mathbb{Z}_{n}^{\ast}$ and the integer-valued function $\upsilon$ (see [18,
Definition 6.22]) of $\mathbb{Z}_{n}$, where

$\eta(x)=\begin{cases}1,&x\ \textnormal{is a square},\\\ -1,&x\ \textnormal{is
a non-square},\\\
\end{cases}\quad\textnormal{and}\quad\upsilon(y)=\begin{cases}-1,&y\in\mathbb{Z}_{n}^{\ast},\\\
n-1,&y=0.\\\ \end{cases}$

Let $N(a_{1}x_{1}^{2}+a_{2}x_{2}^{2}=x_{0})$ be the number of solutions of the
equation $a_{1}x_{1}^{2}+a_{2}x_{2}^{2}=x_{0}$ in $\mathbb{Z}_{n}^{2}$, where
$a_{1},a_{2}\in\mathbb{Z}_{n}^{\ast}$. Thus, for every
$x_{0}\in\mathbb{Z}_{n}$, by [18, Lemma 6.24], we have

$N(a_{1}x_{1}^{2}+a_{2}x_{2}^{2}=x_{0})=n+\upsilon(x_{0})\eta(-a_{1}a_{2})\geqslant
n-(n-1)=1>0.$

Hence, every element in $\mathbb{Z}_{n}^{\ast}$ is the sum of two squares, and
also the sum of two non-squares. Note that
$N(a_{1}x_{1}^{2}+a_{2}x_{2}^{2}=0)=$ Therefore,

$C_{1}+C_{1}=C_{i}+C_{i}=\mathbb{Z}_{n}^{\ast},$

where the sum $A+B$ of two sets $A$ and $B$ is the set $\\{a+b|a\in A,b\in
B\\}$. Therefore, the roots of $\overline{f}_{1}$ are also the roots of
$\overline{f}_{2}\otimes\overline{f}_{2}$, whose roots are
$\mathbb{Z}_{n}^{\ast}$.

Moreover, it’s easy to check that

$C_{1}+C_{1}+C_{1}=C_{i}+C_{i}+C_{i}=\mathbb{Z}_{n},$

which implies that
$\overline{f}_{i}\otimes\overline{f}_{i}\otimes\overline{f}_{i}=x^{n}-1$,
$i=1,2$.

As for $(3)$, it’s easy to check that $\overline{g_{3}}=x^{n}-1$ when $g\neq
1$ and $g\neq x-1$. Hence, the Gray image is linear if and only if $f=1$. ∎

######  Remark 6.

If $p=2$, then the item $(3)$ of Theorem 5 will be a little different. It
should be modified as the Gray image is linear if and only if $f=1$ or
$g\in\\{1,x-1\\}$, or $f=x-1$, $g=f_{i}$ for some $i$. For example, over
$\mathbb{Z}_{4}$, we have

$x^{7}-1=(x+3)(x^{3}+2x^{2}+x+3)(x^{3}+3x^{2}+2x+3).$

Let $f=x-1$, $g=x^{3}+2x^{2}+x+3$, $h=x^{3}+3x^{2}+2x+3$, then the Gray image
of the cyclic code $\langle fh+2f\rangle$ is linear.

##  6 Conclusions

In this paper, we studied the $p$-ary images (Gray images) of cyclic codes
over $\mathbb{Z}_{p^{2}}$ and $\mathbb{Z}_{p}\mathbb{Z}_{p^{2}}$. The main
contributions of this paper are the following:

  1. (1)

We defined the polynomial $P(x_{1},x_{2})$, a characteristic function with
lower degree than $f(x,y)$ defined in [19, Secction IV]. Note that the degrees
of terms of $P(x_{1},x_{2})$ plays an important role in this paper.

  2. (2)

We gave the generator polynomials of a
$\mathbb{Z}_{p}\mathbb{Z}_{p^{k}}$-additive cyclic code (See Theorem 1), which
is a generalization of [1, Theorem 11].

  3. (3)

We obtained the minimal spanning set of a
$\mathbb{Z}_{p}\mathbb{Z}_{p^{k}}$-additive cyclic code (See Theorem 2) and
when $k=2$, we gave the relation between its type and generator polynomials
(See Proposition 2). And some optimal codes (See Tables 2 and 1) are found by
different ways from the methods mentioned in [15].

  4. (4)

We presented a necessary and sufficient condition of the Gray image of
$\mathbb{Z}_{p}\mathbb{Z}_{p^{2}}$-additive cyclic code to be linear (See
Theorem 3 and Theorem 4). We determined some special
$\mathbb{Z}_{p}\mathbb{Z}_{p^{2}}$-additive cyclic codes with
$\gcd(\beta,p)=1$ whose Gray images are linear $p$-ary codes. Specially, if
$\alpha=0$, they are the linear cyclic codes over $\mathbb{Z}_{p^{2}}$ whose
Gray images are linear. As for the linear cyclic Gray image, see [19, Theorem
4.13].

  5. (5)

We determined the linearity of the Gray images for two classes of cyclic codes
(See Example 5 and Theorem 5).

In fact, for some codes, the Gray image is linear if and only if
$\overline{f}$ and $\overline{g_{p}}$ are coprime. The readers interested in
the Gray images can characterize such cyclic codes and give the condition. For
this work, cyclotomic cosets may be necessary. Moreover, it’s also an
interesting topic to find the condition for the Gray image of the case $p\mid
n$ or a $\mathbb{Z}_{p^{k}}$-cyclic code to be linear.

##  7 Conflict of Interest

The authors have no conflicts of interest to declare that are relevant to the
content of this article.

##  8 Data Deposition Information

Our data can be obtained from the authors upon reasonable request.

## References

  * [1] Abualrub T., Siap I., Aydin N.: $\mathbb{Z}_{2}\mathbb{Z}_{4}$-additive cyclic codes. IEEE Transactions on Information Theory 60(3), 1508–1514 (2014).
  * [2] Aydogdu I., Siap I.: The structure of $\mathbb{Z}_{2}\mathbb{Z}_{2^{s}}$-additive codes: bounds on the minimum distance. Appl. Math. Inf. Sci.. 7(6), 2271–2278 (2013).
  * [3] Aydogdu I., Siap I.: On $\mathbb{Z}_{p^{r}}\mathbb{Z}_{p^{s}}$-additive codes. Linear Multilinear Algebra. 63(10), 2089-2102 (2015).
  * [4] Benbelkacema N., Borges J., Dougherty S. T., Ferńandez C.: On ${\mathbb{Z}}_{2}{\mathbb{Z}}_{4}$-additive complementary dual codes and related LCD codes. Finite Fields Appl.. 62, 101622 (2020).
  * [5] Bernal J. J., Borges J., Ferńandez C., Villanueva M.: Permutation decoding of ${\mathbb{Z}}_{2}{\mathbb{Z}}_{4}$-linear codes. Des. Codes Cryptogr.. 76(2), 269–277 (2015).
  * [6] Bilal M., Borges J., Dougherty S. T., Ferńandez C.: Maximum distance separable codes over $\mathbb{Z}_{4}$ and $\mathbb{Z}_{2}\times\mathbb{Z}_{4}$. Des. Codes Cryptogr.. 61(1): 31–40 (2011).
  * [7] Borges J., Ferńandez C.: A characterization of $\mathbb{Z}_{2}\mathbb{Z}_{2}[u]$-linear codes. Des. Codes. Cryptogr.. 86(7), 1377–1389 (2018).
  * [8] Borges J., Ferńandez-Cordoba C., Ten-Valls R.: $\mathbb{Z}_{2}\mathbb{Z}_{4}$-additive cyclic codes, generator polynomials, and dual codes. IEEE Transactions on Information Theory 62(11), 6348–6354 (2016).
  * [9] Borges J., Dougherty S. T., Ferńandez-Cordoba C., Ten-Valls R.: Binary images of ${\mathbb{Z}_{2}\mathbb{Z}_{4}}$-additive cyclic codes. IEEE Transactions on Information Theory 64(12), 7551–7556 (2018).
  * [10] Borges J., Dougherty, S. T., Fernńandez C., Ten-Valls R.: $\mathbb{Z}_{2}\mathbb{Z}_{4}$-additive cyclic codes: kernel and rank. IEEE Trans. Inform. Theory. 65(4), 2119–2127 (2019).
  * [11] Calderbank A. R., Sloane N. J. A.: Modular and $p$-adic cyclic codes. Designs, Codes and Cryptography 6(1), 21–35 (1995).
  * [12] Delsarte P.: An algebraic approach to the association schemes of coding theory. Philips Research Reports. Supplements 10(2), 1-97(1973).
  * [13] Dougherty S. T., Liu H., Yu L.: One weight $\mathbb{Z}_{2}\mathbb{Z}_{4}$-additive codes. AAECC. 27(2), 123–138 (2016).
  * [14] Fernández-Córdoba C., Pujol J., Villanueva M.: ${\mathbb{Z}_{2}\mathbb{Z}_{4}}$-linear codes: rank and kernel. Designs, Codes and Cryptography 56(1), 43–59 (2010).
  * [15] Grassl M.: Bounds on the minimum distance of linear codes and quantum codes. Online available at http://www.codetables.de. Accessed on 2022-03-14.
  * [16] Hammons A. R., Kumar P. V., Calderbank A. R., Sloane N. J. A., Solé P.: The $\mathbb{Z}_{4}$-linearity of Kerdock, Preparata, Goethals, and related codes. IEEE Transactions on Information Theory 40(2), 301–319 (1994).
  * [17] Li X., Shi M., Wang S.: Rank and pairs of rank and dimension of kernel of $\mathbb{Z}_{p}\mathbb{Z}_{p^{2}}$-linear codes, arXiv: 2207. 12631 (2022).
  * [18] Lidl R., Niederreiter H.: Finite Fields. Cambridge University Press, Cambridge (1997).
  * [19] Ling S., Blackford J.T.: $\mathbb{Z}_{p^{k+1}}$-linear codes. IEEE Transactions on Information Theory 48(9), 2592–2605 (2002).
  * [20] MacWilliams F. J., Sloane N. J. A.: The Theory of Error-Correcting Codes. North-Holland Publishing Company, Amsterdam, New York, Oxford (1975).
  * [21] Massey J. L.: Linear codes with complementary dual. Discrete Math.. 106/107:337–342 (1992).
  * [22] Shi M., Li S., Solé P.. ${\mathbb{Z}_{2}\mathbb{Z}_{4}}$-additive quasi-cyclic codes, IEEE Transactions on Information Theory, 67(11): 7232-7239 (2021).
  * [23] Shi M., Wang S., Li X.: $\mathbb{Z}_{p}\mathbb{Z}_{p^{2}}$ linear codes: rank and kernel. arXiv:2205.13981.
  * [24] Shi M., Wu R., Krotov D. S.: On $\mathbb{Z}_{p}\mathbb{Z}_{p^{k}}$-additive codes and their duality. IEEE Transactions on Information Theory 65(6), 3841–3847 (2019).
  * [25] Shi M., Wang, C., Wu R., Hu Y., Chang Y.: One-weight and two-weight $\mathbb{Z}_{2}\mathbb{Z}_{2}[u,v]$-additive codes, Cryptography and Communications, Discrete Structures, Boolean Functions and Sequences. 12(3), 443-454 (2020).
  * [26] Wan Z.: Quaternary Codes. World Scientific, Singapore (1997).
  * [27] Wolfmann J.: Binary images of cyclic codes over $\mathbb{Z}_{4}$. IEEE Transactions on Information Theory 47(5), 1773-1779 (2001).
  * [28] Wu R., Shi M.: Some classes of mixed alphabet codes with few weights, IEEE Communications Letters, 22(5), 1431-1434 (2021)
  * [29] Yao T., Zhu S.: $\mathbb{Z}_{p}\mathbb{Z}_{p^{s}}$-additive cyclic codes are asymptotically good. Cryptography and Communications 12(2), 253–264 (2020).