1. Introduction
Constacyclic codes play a crucial role in the theory of
error-correcting codes, serving as a natural extension of cyclic codes,
which are among the most extensively studied code types. Let be a finite commutative ring, and let
be a unit in . A -constacyclic code of length over the ring can be represented as an ideal in the
quotient ring . This representation underscores the
significance of constacyclic codes over rings as an important class of
linear codes due to their rich algebraic structure.
In recent years, there has been a growing research interest in the
study of constacyclic codes. However, the general classification of
constacyclic codes remains a challenging task. To date, only a limited
number of cases with specific lengths and defined over certain rings
have been classified. Let be a
commutative ring. Dinh and López-Permouth [18] studied the structures of cyclic and
negacyclic codes of length when
is not divisible by the
characteristic of the residue field . Moreover, Cao [4] investigated
the algebraic structure of -constacyclic codes of arbitrary length over a finite
commutative chain ring , where
.
An important example of a finite ring is . The structure of constacyclic codes
over has been extensively studied in the literature.
For , significant research has
been devoted to cyclic and constacyclic codes of length over the ring for
various prime numbers and
positive integers (cf. [10,11,15,8,14,2]).
For , Kai et al. [20] investigated -constacyclic codes of
arbitrary length over , where . Subsequently, Cao et al. [6,5]
studied -constacyclic codes of arbitrary length over , focusing on the case where is an even integer and . Sobhani [23] determined the structure of
-constacyclic
codes of length over , where . Moreover, Mahmoodi and Sobhani [21] provided a
complete classification of -constacyclic codes of length over , where .
Another important ring is which is local but not a chain ring, with units
of the form where
and .
Dinh et al. [16] determined the algebraic
structures of all constacyclic codes of length over , except for the -constacyclic codes, later
studied in [12]. For , Dinh et al. [17] classified all self-dual -constacyclic codes of length
over corresponding to the units , and . In our recent paper [1], we investigated
the structure and duals of -constacyclic codes of length
over for the units , and . Motivated by this, we aim to
extend our previous results by classifying -constacyclic codes of arbitrary
length over with , and given by
where and .
The paper is structured as follows. Section 2 introduces essential
preliminaries on finite rings and fundamental concepts in constacyclic
codes. Section 3 establishes a decomposition of each -constacyclic code of arbitrary
length over as a direct sum
of ideals over certain rings. These rings are further examined in
Section 4, where their ideals are classified into four
types. Section 5 investigates the structure of dual -constacyclic codes of arbitrary
length over over . Finally,
Section 6 determines their Hamming distance when the
code length is .
2. Preliminaries
In this paper, all rings considered are associative and commutative.
An ideal of a ring is called principal if it is generated
by a single element. A ring is a
principal ideal ring if each of its ideals is principal. A ring is called local if it has a unique
maximal ideal. A chain ring is a ring whose ideals are totally ordered
by inclusion. A ring is said to
be Frobenius if is
isomorphic (as an -module) to
, where denotes the Jacobson radical of
and its socle.
Let be a finite local
commutative ring with maximal ideal and residue field . For any
polynomial , we denote
by the polynomial
in obtained by
reducing each coefficient of
modulo . Two polynomials are said to be
coprime if there exist polynomials such that
A polynomial is
said to be regular if it is not a zero divisor; equivalently, in (see [22]).
The following result is a well-known property of finite commutative
chain rings.
Proposition 2.1. [18] Let be a finite commutative ring. The
following conditions are equivalent:
is a local ring whose
maximal ideal is principal (i.e.,
for some
element
is a local principal ideal
ring.
is a chain ring whose
ideals are
for , where is the nilpotency index of .
Moreover, for each , the cardinality of the ideal is given by
A linear code of length over a ring is an -submodule of . Let be a unit in . A linear code of length over is called a -constacyclic code if it satisfies
the following condition:
Each codeword can be represented as a polynomial . This identification leads us to the following
proposition.
Proposition 2.2. [19] A code of length over is a -constacyclic code if and only if
is an ideal of .
For -tuples and in , their inner product is defined as
Two -tuples and are considered orthogonal if . The dual code of a linear code of length over a ring is defined as
The following proposition is well known.
Proposition 2.3. [24] Consider a linear code of length over a finite Frobenius ring . Then,
In general, the dual of a -constacyclic code satisfies the
following proposition.
Proposition 2.4. [10] The dual of a -constacyclic code is a -constacyclic code.
The annihilator of an ideal in
a ring , denoted as , is defined as
For any polynomial with , the reciprocal polynomial is defined as
The following proposition establishes a relationship between the dual
and the annihilator of a -constacyclic code.
Proposition 2.5. [13] Let be a -constacyclic code of length over , i.e., an ideal of . Then,
Throughout this paper, we consider the rings: where is a prime number, and are positive integers. The Jacobson
radical and the socle of
are given by:
Moreover, the quotient ring is isomorphic
to as
an -module via the natural
isomorphism: for any .
Thus, is a Frobenius
ring.
Each unit in has the
form:
which can be rewritten as: where and , with:
Throughout this article, we assume , which ensures that
is a unit in .
Let be a positive integer.
Using the division algorithm, we write with . Since , we define: It
follows that .
Our objective is to study -constacyclic codes of length
over , where is an integer coprime to . By Proposition 2.2, these
codes correspond to the ideals of the ring:
The following ring homomorphisms will be used in subsequent sections:
3. Direct sum decomposition of -constacyclic codes over
Since is coprime with , the polynomial has a unique
factorization in : where the factors are monic, irreducible, and pairwise
coprime. Raising both sides to
gives: Since is a finite local ring and is a regular
element in , Hensel’s
Lemma [22]
ensures the existence of a unique factorization where are monic
and pairwise coprime polynomials in . Moreover, for each ,
Defining , it follows that
and are coprime. Hence, there
exist polynomials such that:
Setting it follows from [7, Theorem 3.2] that the following properties
hold:
The set forms a complete system of primitive pairwise
orthogonal idempotents, meaning that
The ring
decomposes as
For each , the mapping
is a ring isomorphism.
As a consequence, we obtain the following theorem.
Theorem 3.1. A subset of is an ideal if and
only if where is an ideal
of .
Thus, to classify all -constacyclic codes over , we need only to study the ideals
of . To this end, for each , we define:
Since , the universal property of quotient rings
guarantees that induces a
unique homomorphism satisfying
The following pairs of propositions will be used in the subsequent
sections.
Proposition 3.2. The polynomial is a unit in and .
Proof. It suffices to prove that is coprime to in and to in .
Since and are coprime in , there exist
polynomials such that
Given that , we can write in : for some . Substituting this into the
previous relation, we obtain in :
Since and are nilpotent in , the element is a unit in . Consequently, and are coprime in .
Now, applying to Eq. (2), we get:
By
definition of , we have and ,
leading to:
Since is nilpotent in , the element is a
unit in . We conclude that
and are coprime in . This proves that is a unit in both and , completing the
proof. 
Proposition 3.3. [3] In , we have the following
properties:
, and thus is nilpotent with nilpotency index
.
The ring is a
chain ring with the following ideal chain:
Each ideal contains elements, for all .
4. The ring
and its ideals
In this section, we classify the ideals of the ring and determine their
cardinalities. We start with the following proposition.
Proposition 4.1. Let be an ideal of the ring . Then, it can be expressed
as where
, , and is a
polynomial satisfying . Moreover, the ideal is defined as
Proof. Let and such that and . Then,
applying ,
For any , there exists
such that
By surjectivity of , there
exists
satisfying Thus, we obtain which
implies that
Consequently, we deduce
Finally, since , it follows that 
The following theorem provides a complete classification of the
distinct ideals of the ring .
Theorem 4.2. The distinct ideals of
are classified as
follows:
Type 1: The trivial ideals and .
Type 2: Ideals of the form , where .
Type 3: Ideals of the form , where , , and is either or a unit in . The parameter is given by:
Type 4: Ideals of the form , where , and is either or a unit in . The parameter is the same as given in (5).
Proof. The Type 1 ideals are trivial. Let be a non-trivial ideal of . We consider two cases:
If , then
by Proposition 4.1, can be expressed as , where
The set forms an ideal
of , implying that
for some . Applying Proposition 4.1 again, we
obtain: where and . Given that , it follows that
This classifies as Type
2.
If , we
note that is a
non-trivial ideal of ,
then for some . By Proposition 4.1 , the
ideal satisfies where and
Since , it follows that . As in the previous case, we have
for some .
Then
Considering , if , there exists a maximal such that
Thus, we write where is a unit. In , we have for some . Since , we deduce
Consequently, where is either or a unit in . Let be as defined in Eq. (5). If , then simplifies to , corresponding to Type 3. Otherwise, if , it remains , corresponding to Type 4.

Before computing the value of , we first establish the
following lemma.
Proof. In ,
with all computations carried out modulo , we obtain:
The last step is justified by the fact that the -terms in vanish after multiplication by
, since . On the other hand, by
Proposition 3.2, is a unit in . Thus, in , we obtain: 
Theorem 4.4. Let and define Then, where
Thus, we can write where is either
or a unit in
Proof. Consider , which is equivalent to for some , applying yields
Since is a chain
ring with maximal ideal and nilpotency index , we obtain with . Consequently, in , where .
Substituting this into Eq. (8),
we obtain:
Expanding and using , we
get:
Using Lemma 4.3,
Replacing this in Eq. (9), we get:
Using Eq. (7), we obtain:
We now consider two cases:
If , then . Since it follows that .
If , then .
Conversely, we have:
and
Therefore, .

We now count the number of codewords in each ideal of . For this, we introduce two
notions: the residue and the torsion of .
Clearly,
and are
ideals of . By
Proposition 3.3, they can
be expressed as , where . Now, consider the ring homomorphism
Since and , the first isomorphism theorem yields
The following lemma, whose proof is straightforward, provides
explicit expressions for and for any ideal in .
Lemma 4.5. With the notation of Theorem 4.2:
If , then
.
If , then
.
If is of type , then
and .
If is of type , then and .
If is of type
, then and .
By determining and in each case, we
can compute the cardinalities of all ideals in using Eq. (10) and Proposition 3.3.
5. Dual codes of -constacyclic codes over
In this section, we focus on the dual codes of -constacyclic codes of length
over the ring . By Theorem 3.1, where
is an ideal of for . By Eq. (1), we have
Therefore,
Thus, by Proposition 2.5,
We aim to determine , where is an ideal of . To this end, we first
establish the following three lemmas.
Lemma 5.1. Let be an ideal of . Then,
Proof. Let be an ideal of , where
Then, by Eq. (11), we obtain where
According to Propositions 2.3 and 2.5, we have Therefore,
It follows that 
Lemma 5.2. Let be an ideal of and two integers such that Then, we have:
Proof. Let where
and are two integers.
Since and ,
there exist two polynomials
and in such that
By the definition of , we obtain:
Similarly, we have:
Therefore, we necessarily have:
By Lemma 5.1, , and by Proposition 3.3, we
obtain
It follows that: 
Lemma 5.3. With the previous notation,
we have:
Proof. Firstly, it is clear that
and .
Now, let . Then, we have , which implies that there
exists
such that:
Therefore, we obtain:
This implies that: where . Since , we deduce that:
This shows that: 
We now proceed to determine the annihilator of each type of ideal.
For type 1 ideals, this is straightforward: if , then ; if
, then . For
other types, we first identify two integers and such that and , as given in Lemma 4.3. Once
these values are determined, we find a polynomial satisfying . Finally, applying Lemma 5.3, we
obtain .
Proposition 5.4. If is an ideal of type , then .
Proof. It is clear that . Therefore, we have . 
Proposition 5.5. If is an ideal of type , then:
Proof. Since , it suffices to determine a polynomial satisfying
By Theorem 4.4, we have
We now distinguish two cases:
If , then , and Eq. (14) simplifies to
In this case, choosing
leads to
If , we take
, yielding

Proposition 5.6. If , an
ideal of type , then:
Proof. Since , it suffices to determine a polynomial satisfying
Given that
it suffices that
By Theorem 4.4, this is equivalent to:
Then, we choose if and if , resulting in:

We now determine for any ideal in . If is of type 1, then when
, and when
. For other
types, we introduce the following notation: Let
Then, we can write where is either or a unit in
Corollary 5.7. If is an ideal of type , then .
Corollary 5.8. If is an ideal of type , then:
Proof. The result is immediate when . If , we have

Corollary 5.9. If , an
ideal of type , then:
Proof. It is similar to Corollary 5.8;
it suffices to substitute
with . 
6. Hamming distance of -constacyclic codes of length
over
The Hamming weight of a codeword , denoted by , represents the number of nonzero
components in the vector . The
Hamming distance between two vectors and , denoted by , is defined as .
For a linear code , the Hamming
distance is given by the
minimum weight among all nonzero codewords in .
In this section, we compute the Hamming distance of -constacyclic codes of length
over the ring . We begin by establishing the
structure of these codes, which can be derived from Theorem 4.2.
Corollary 6.1. -constacyclic codes of
length over the ring , i.e., ideals of can be classified as follows:
Type 1: The trivial ideals and .
Type 2: Ideals of the form , where .
Type 3: Ideals of the form , where
, , and is either or a unit in .
Type 4: Ideals of the form , where , and is either or a unit in .
Moreover,
where
The following lemma establishes a relationship between the Hamming
distance of a -constacyclic
code and its torsion .
Lemma 6.2. For any -constacyclic code of length over , we have
Proof. We first prove that .
Let be a nonzero polynomial in
, so that
. Since does not involve , both and share the same nonzero coefficients, which implies
Hence, we obtain
To prove the reverse inequality, let be a nonzero polynomial, and decompose it as where are polynomials that do not
involve .
If , then , leading
to
If , then is a nonzero element of
. Hence, . Moreover,
and share the same nonzero components,
while has more zero
components than . It follows
that
Thus, we conclude that ,
completing the proof. 
The previous lemma reduces the computation of the Hamming distance of
a -constacyclic code of length over to that of its torsion , which corresponds
to a -constacyclic code of the same length over .
Let be a nonzero -constacyclic code of
length over , where . We distinguish two cases:
If , then the chain of inclusions implies
By Proposition 3.3, .
Then, , which
implies that for
all .
If , writing with , we obtain Thus, each corresponds to the -constacyclic code over
, multiplied by
, leading to
The Hamming distance of constacyclic codes of length over is determined by the
following proposition.
Proposition 6.3. [9] Let be a -constacyclic code of length
over , where . The
Hamming distance
is given by
Thus, we establish the following theorem.
Theorem 6.4. Let be a -constacyclic code of length over . Then, its Hamming distance is
given by where satisfies , and if , then .