This section investigates the hulls of linear codes and the hulls of their duals over the considered non-unitary rings. Moreover, their structures were determined and expressed in terms of their binary associated codes.
3.1. The Hulls of -Codes
3.1.1. Left and Right Hulls of -Codes
We shall investigate the right-hull and left-hull for an -code in the subsequent results.
Theorem 4. Let be a linear code of length n over , then
- 1.
- 2.
.
Proof. For statement
. By Definition 4 and Theorem 9 of [
25], we have
And,
Moreover,
Also,
Hence, the expected results follow. □
Hereafter, suppose and .
Corollary 2. If is an -code of length n, then Proof. The desired result follows immediately from Theorem 4. □
Theorem 5. If is an -code, then the following two statements hold.
- 1.
. Furthermore, the equality holds if is free.
- 2.
.
Proof. For the first statement, we have which is also linear over . This implies that . From the Statement 1 of Theorem 4, we have . Therefore, if is free, then . Thus, .
The second statement follows immediately from the linearity of over and Statement 2 of Theorem 4. □
Definition 3. A linear -code is said to be left self-dual (left-SD) (respectively, right self-dual (right-SD)) if (respectively, ).
Definition 4. A left-nice -code is called left-LCD if . Similarly, a right-nice -code is said to be right-LCD if it satisfies .
Note that an -code is said to be left-SD if , and right-SD if . Therefore, if , then is said to be left-LCD. Similarly is right-LCD if .
Using the properties of left and right hull codes, we study left-SD, right-SD, right-LCD and left-LCD codes over .
Lemma 1. Let be a linear code over , then
- (i).
is left-SD if and only if .
- (ii).
is right-SD if and only if and .
Proof. By previous definition and Theorems 1 and 4, Corollary 1, we have is left-SD if and only if and if and only if and . Equivalently, . This completes the proof of statement .
On the other hand, is right-SD if and only if and if and only if and . Equivalently, and . Hence, the proof of statement is completed. □
Lemma 2. Let be a linear code over of length n. Then, the following statements hold:
- 1.
is right-LCD if and only if .
- 2.
is left-LCD if and only if is free and .
Proof. Using Theorems 4 and 5, we have
is right-LCD if and only if if and only if . Equivalently, .
is left-LCD if and only if if and only if . Equivalently, and is free (by Theorem 5). □
3.1.2. The Two-Sided Hull of -Codes
Based on the properties of the associated codes of -codes, we determine the hull codes over in the following theorem.
Theorem 6. If is a linear -code, then Proof. Since and are linear -codes, is also a linear over . By Theorem 1, we have . Therefore,
And,
Consequently, these achieve the desired outcome. □
Proof. By Theorem 4, we have
.
The last equality follows from . Therefore,
.
By combining these results with Theorem 7 in [
25], the desired result follows. □
Theorem 7. If is a linear code over , thenFurthermore, equality holds when the code is free. Proof. To prove the first inclusion, we have . Therefore, . Thus, .
Statement 1 of Theorem 5 establishes the second inclusion, that is . Hence,
If is free, then . So, . Consequently, and . These together with yield the desired result. □
Proposition 2. Let be a linear code over of length n and , then = .
Proof. By Proposition 1, we have
Since
,
and
, we get
Hence,
. Therefore, the proof is completed. □
Corollary 4. If is a linear code over of , then is of .
Proof. The proof follows by applying from definition of the type of a linear -code, Theorem 6 and Proposition 2. □
Proposition 3. If is a linear code over of length n and , then
Proof. From Theorem 6, we have
Hence, the proof is completed. □
Next, we determine the conditions for -code to be self-orthogonal, self-dual or LCD by analyzing the properties of its hull code.
Lemma 3. Let be a linear code over . Then, is self-orthogonal code over if and only if is a binary self-orthogonal code and .
Proof. By definition, is self-orthogonal over if and only if , if and only if and . By Theorem 1 and Corollary 1, this is equivalent to and Equivalently, and . Hence, if and only if and is a binary self-orthogonal code. □
Lemma 4. Let be a linear code over . Then, is self-dual if and only if .
Proof. By Corollary 1, Theorems 1 and 6, we have
is self-dual if and only if and if and only if and .
This equivalent to , and , . Equivalently, . □
Lemma 5. Let be an -code of length n. Then, is LCD if and only if it is free and .
Proof. is an LCD -code if and only if . By Theorem 6, this is equivalent to . Theorem 7 and Corollary 4 imply that and . Therefore, the proof is completed. □
Through the subsequent example, we show that the freeness condition in Lemma 5 is essential.
Example 1. Let be an -code of length 3 and defined asTherefore,And,Therefore,By Theorem 6, we have , proving that is not LCD. However, . Note that is not a free code. Corollary 5. LCD codes over are always free.
Proof. The result follows immediately from Lemma 5. □
For any linear code over a finite field, its hull coincides with the hull of its dual. The following proposition shows that this property also holds for codes over . However, in general this does not hold for codes over and .
Proposition 4. Any linear -code satisfies Proof. By Definition 3 and Corollary 9 in [
25], we have
This completes the proof. □
Define the map from to by
The map can be extended naturally to a map from to . Moreover, to every -code of length n, there is an additive -code .
Theorem 8. Let be a linear code over . Then, Proof. By applying
on
, we get
. By Theorem 12 of [
25], we have
. This implies that
. Hence,
. □
Now, we state the following theorem which relates the number of linear codes over with hulls of a given size to the number of additive codes over with trace hulls of specific cardinality.
Theorem 9. The number of linear codes over where has cardinality is equal to the number of additive codes over where has size .
Proof. This is a direct consequence of Theorem 8. □
3.2. The Hull of -Codes
In the following result, we characterize the residue and torsion codes of the hulls of an -code and its dual, thereby establishing their cardinalities.
Theorem 10. If is a linear -code, then the associated codes of are given by: Proof. By applying the definition of the residue and torsion codes of
and Theorem 2, we have
And,
Hence, the proof is derived. □
Proposition 5. Let be an -code of and , then has cardinality .
Proof. Since
is a linear
-code,
is also linear over
, therefore
This completes the proof. □
Next, we characterize the residue and torsion codes for the hull of the dual of an -code.
Theorem 11. Let be a linear code over of length n; then, the associated codes of are Proof. Note that
. By Theorem 3 of [
25],
and
. Furthermore,
And,
□
Theorem 12. Let be a linear code over of length n, then Proof. Let
; then, by Theorem 1 of [
25],
where
and
. By Theorem 11, we have
. This yields
. Consequently,
. This proves that
.
Furthermore, , the last equality follows from Theorem 11. Hence, . □
It is evident that, for a linear code over finite fields or the ring , we have . However, this property does not generalize to codes over as shown in the example bellow.
Example 2. Let be the linear -code of length 2 defined by . Then, .
Therefore, and . This proves that .
Theorem 13. If is an -code of length n, then . Furthermore, equality holds if .
Proof. Let
, then by Theorem 1 of [
25],
where
and
. By Theorem 10, we have
. This implies that
(by Theorem 12). Thus,
. Hence,
.
Furthermore, if
, then by Theorems 10 and 11,
. Consequently,
We conclude that
. □
In the following results, we establish self-orthogonal, LCD and self-dual codes over via their hull codes.
Lemma 6. A linear -code is self-orthogonal if and only if is a binary self-orthogonal code.
Proof. By the definition of self-orthogonal code over and Theorem 10, we have
is self-orthogonal if and only if if and only if and if and only if . Equivalently, is a binary self-orthogonal code. □
Lemma 7. Let be a linear code of length n over . Then, is self-dual if and only if is a binary self-dual code and .
Proof. From the definition of self-dual code over , Theorems 2 and 10, we have
is self-dual if and only if if and only if , and , if and only if and . Hence, the desired result follows. □
Lemma 8. An -code is LCD over if and only if is the zero code.
Proof. The code is LCD if and only if . Equivalently, . Since and by Theorem 10, this equivalent to . □
Define the map
from
to
as follows
This map can be extended naturally to a map from
to
. Moreover, to every
-code
of length
n, there is an additive
-code
.
We note that Theorem 8 cannot be generalized to codes over , as the next example illustrates.
Example 3. Let be the linear code of length 2 over defined by . Then, and . Therefore, and . It is easy to see that .
From our previous study, one can see that if and is a linear -code of , then has , where , if and , if .
Let be an -code; then, always implies . But this is not true for codes over . For example, let be the linear -code of length 2 and with generator matrix . Then, and . Thus, by Theorem 10, and . Consequently, has and has . We note that and and .
3.3. The Hull of -Codes
In what follows, we determine the hull of -codes and their dual.
Theorem 14. Let be an -code of length n, thenMoreover, Proof. Since is a linear -code, then we have
And,
Furthermore, since
is a linear
-code, then
□
Theorem 15. For any -code of length n, we have Proof. By Theorem 3, we have and .
Using a similar procedure to the proof of Theorem 14, we obtain
Also,
Therefore,
. Hence, the result is derived. □
The following example illustrates that the hull of an -code and the hull of its dual are not generally equal.
Example 4. Let be an -code of length 3, where and are the binary codes generated by the following matrices, respectively.Therefore, can be written as and by Theorem 3, we have and where, . Furthermore, and . This proves that . Theorem 16. Let be an -code of length n, then . Furthermore, equality holds if .
Proof. Since , then by Theorems 3 and 15, we have . Therefore, the equality holds if . □
Next, we investigate self-orthogonal, LCD, and self-dual codes over through their hull codes.
Lemma 9. For any linear -code of length n, we have which is self-orthogonal over if and only if the code is self-orthogonal.
Proof. By definition and Theorem 14, is self-orthogonal if and only if . This is equivalent to and . Equivalently, . Hence, the proof is derived. □
Lemma 10. Let be a linear code over , then is an LCD code if and only if and .
Proof. By definition and Theorems 14 and 15, we have which is LCD if and only if if and only if and . Equivalently, and . □
Lemma 11. An -code is self-dual if and only if and is a binary self-dual code.
Proof. From the definition of self-dual codes over , Theorems 3, 14 and 15, we have
is self-dual if and only if and if and only if and . Equivalently, and . Hence, the proof is completed. □
Consider the map
from
to
, defined by
Thus, the map
can be extended naturally to a map from
to
, and to each
-code
of length
n, there is an additive
-code
.
It is noteworthy that Theorem 8 does not generalize to codes over . A counterexample is given in the following.
Example 5. Let be the linear code of length 2 where with and . Therefore, by Theorem 14 , so . Thus, . Obviously, .