# Hulls of Linear Codes over Non-Unitary Rings of Four Elements

Sarra Manseri, Patrick Solé, Adel Alahmadi, Asmaa Melaibari

► To cite this version:

Sarra Manseri, Patrick Solé, Adel Alahmadi, Asmaa Melaibari. Hulls of Linear Codes over Non-Unitary Rings of Four Elements. Mathematics, 2026, 14, 10.3390/math14050788. hal-05528910

HAL Id: hal-05528910

https://hal.science/hal-05528910v1

Submitted on 26 Feb 2026

**HAL** is a multi-disciplinary open access
archive for the deposit and dissemination of sci-
entific research documents, whether they are pub-
lished or not. The documents may come from
teaching and research institutions in France or
abroad, or from public or private research centers.

L'archive ouverte pluridisciplinaire HAL, est
destinée au dépôt et à la diffusion de documents
scientifiques de niveau recherche, publiés ou non,
émanant des établissements d'enseignement et de
recherche français ou étrangers, des laboratoires
publics ou privés.

<figure><img src="image_1.png" /></figure>

Distributed under a Creative Commons CC BY 4.0 - Attribution - International License
Article

# Hulls of Linear Codes over Non-Unitary Rings of Four Elements

Sarra Manseri<fnref n="1" />,*, Patrick Solé<fnref n="2" />, Adel Alahmadi<fnref n="3" /> and Asmaa Melaibari<fnref n="4" />

## Abstract

In this paper, we explore the hull of linear codes over the non-unitary rings of order four, namely *E*, *I* and *H*. Initially, we determine the binary associated codes of the hull over each ring; then, we characterize the hulls in terms of these codes. Furthermore, we establish the connection between the hull of any linear code over these rings and the hull of its dual. Finally, we classify linear codes over each ring with prescribed hull sizes under permutation equivalence for short lengths.

**Keywords:** binary codes; non-unitary rings; hull; left and right hulls; permutation equivalence

**MSC:** Primary 94B05; Secondary 16L30

## 1. Introduction

In coding theory, the Euclidean hull or simply the hull of a linear code over a finite field is the intersection of the code and its dual under the Euclidean inner product. In 1990, Assmus and Key introduced this notion, and they used it to classify finite projective planes [1]. This concept has gathered much interest from researchers due its role in computing automorphism groups of a linear code and determining the complexity of algorithms for studying the permutation equivalence of two linear codes [2,3]. Furthermore, the hull code generalizes the notions of linear complementary dual (LCD) codes, self-orthogonal and self-dual codes, which correspond to, respectively, a trivial hull, a hull equal to starting code, a hull equal to both the code and its dual.

Another motivation for the study of hull of linear codes emerged from the construction of entanglement-assisted quantum error correcting codes (EAQECCs) initiated by Bowen [4]. Following this, Brun et al. [5] proved that it is possible to construct quantum codes via any classical linear codes by using pre-shared entanglement between the encoder and decoder and relaxing the duality condition. Subsequently, the authors in [6] have shown that an EAQECC can be generated from a classical linear code of given hull dimension.

The characterization and classification of self-orthogonal and self-dual codes have continued to be a primary focus of research due to their diverse applications [7–9]. Pless [10] established the first classifications of binary self-orthogonal codes of odd length *n* for $3 \le n \le 19$ and binary self-dual codes of even length with $2 \le n \le 20$, and followed by Bouyukliev et al. [11] gave a classification binary optimal self-orthogonal codes of length

<figure><img src="image_2.png" /></figure>

Check for updates

Academic Editor: Valery G. Romanovskij

Received: 1 January 2026

Revised: 12 February 2026

Accepted: 20 February 2026

Published: 26 February 2026

**Copyright:** © 2026 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the [Creative Commons Attribution (CC BY) license](https://creativecommons.org/licenses/by/4.0/).

<footnote n="1">¹ Mathematics Department, Central China Normal University, Wuhan 430079, China</footnote>

<footnote n="2">² I2M, CNRS, Aix Marseille University, 13288 Marseilles, France; patrick.sole@telecom-paris.fr</footnote>

<footnote n="3">³ Research Group of Algebraic Structures and Applications (ASA), Mathematics Department, Faculty of Science, King Abdulaziz University, Jeddah 21589, Saudi Arabia; analahmadi@kau.edu.sa</footnote>

<footnote n="4">⁴ Department of Mathematics and Statistics, Faculty of Science, University of Jeddah, Jeddah 21589, Saudi Arabia; amelaibari@uj.edu.sa</footnote>

<footnote>* Correspondence: manserisarra@mails.ccnu.edu.cn</footnote>
up to 40 and dimension up to 10. Furthermore, binary LCD codes were also classified by Araya and Harada [12] for small lengths based on the mass formula obtained in [13]. On the other hand, the classification of linear codes with various hulls of specified order over finite fields or unitary rings has received limited attention. Sendrier [14] derived a mass formula for linear codes over finite fields with prescribed hull dimensions, although its expression involves complex summation terms. Subsequently, Li and Shi [15] obtained a closed-form mass formula for binary linear codes with various hull dimensions, thereby simplifying Sendrier's original expression. Also, they showed that almost all binary linear codes with a *l*-dimensional hull are odd-like codes with odd-like duals for fixed *l*. Dougherty and Saltürk [16] studied the hull of both linear and additive codes over four Frobenius rings of order 4 and derived formulas to count codes with hulls of a given size. However, to the best of our knowledge, no one has investigated hulls of codes over non-unitary rings. Therefore, the study of hulls of codes over non-unitary rings will be an interesting addition to further extend the boundaries of the non-unitary rings and add more research directions for further developments.

Recently, researchers have carried out extensive study of codes from finite fields and rings with unity to the non-unitary rings and explored numerous families of codes over this setting. For example, Alhamadi et al. [17] initiated the investigation of quasi self-dual (QSD) over the commutative, non-unitary, ring *I* of order four (note that a QSD code of length *n* over non-unitary rings of four elements is a self-orthogonal code of size 2ⁿ). Meanwhile, Kim and Roe constructed more QSD *I*-codes [18]. In [19,20], the authors explored QSD over the different non-unitary rings of four elements *E* and *H*, respectively, since every code over these three rings can be regarded as an additive $\mathbb{F}_4$-code. This allowed the authors of [21] to classify self-orthogonal and self-dual codes over both rings *I* and *E*, under permutation equivalence. In a similar way, QSD codes over *H* were classified in [19]. On the other hand, Shi et al. [22] introduced LCD codes over *E*. Later, the authors in [23] extended the study of LCD and self-dual codes to the non-commutative non-unitary ring of order prime square. The present study was motivated by the aforementioned identified research gap concerning the hulls of codes over the three non-unitary rings of order four, *E*, *I* and *H*. We further characterized the hull codes and the hull of their dual in terms of their associated binary codes. Also, we studied the right and left hulls of *E*-codes and examined their fundamental properties. We showed that the property of a code and its dual having identical hulls over a finite field remains valid over the ring *E* but not over the rings *I* and *H*. Additionally, we derived a mass formula for linear *I*-codes with various hull sizes and types. We classified all linear *E*-codes having left and right hulls of specific sizes, linear codes with a given hull order over both rings *I* and *H*, under permutation equivalence, for certain small lengths.

This manuscript consists of four sections. In Section 2, we have provided basic results on the hull for codes over finite field and given some foundational results about the three non-unitary rings of order four and the linear codes over them. Section 3 is devoted to the hull structure of linear codes and their dual over each ring. In Section 4, we have determined a mass formula for linear *I*-codes with various hull sizes and classify these codes up to length 4. Furthermore, we have classified *E*-codes with prescribed left and right hull sizes, as well as *H*-codes with given hull order, for certain small lengths under the permutation equivalence. The last section concludes this article and proposes several open problems for further study.
## 2. Preliminary

### 2.1. Additive and Linear Codes

Let $\mathbb{F}_2$ to be the finite field of order 2. A linear code $\mathcal{C}$ of length $n$ over $\mathbb{F}_2$ is a $k$-dimensional subspace of $\mathbb{F}_2^n$. We say $\mathcal{C}$ is a binary $[n,k]$-code if it has length $n$ and dimension $k$ over $\mathbb{F}_2$.

The dual of $\mathcal{C}$ with respect the standard inner product is denoted by $\mathcal{C}^{\perp}$ and is defined as

$$ \mathcal{C}^{\perp} = \{ \mathbf{x} \in \mathbb{F}_2^n | \langle \mathbf{x}, \mathbf{x}' \rangle = 0, \mathbf{x}' \in \mathcal{C} \}. $$

The hull of a binary linear code $\mathcal{C}$ is $\mathrm{Hull}(\mathcal{C}) = \mathcal{C} \cap \mathcal{C}^{\perp}$.

For any binary linear codes $C_1$ and $C_2$, the relative hull of $C_1$ with respect to $C_2$ is denoted by $\mathrm{Hull}_{C_2}(C_1)$ and defined as

$$ \mathrm{Hull}_{C_2}(C_1) = C_1 \cap C_2^{\perp}. $$

It is clear that $\mathrm{Hull}(C_1) = \mathrm{Hull}_{C_1}(C_1)$.

The following proposition of [24] is helpful in our further study.

**Proposition 1 ([24]).** Let $\mathcal{C}$ be a binary $[n,k]$-code and $\mathcal{C}'$ be a binary $[n,k']$-code. Then,

$$ k - \dim(\mathrm{Hull}_{\mathcal{C}'}(\mathcal{C})) = k' - \dim(\mathrm{Hull}_{\mathcal{C}}(\mathcal{C}')). $$

Denote by $\mathbb{F}_4$ the finite field of order 4. An additive code over $\mathbb{F}_4$ or an additive $\mathbb{F}_4$-code of length $n$ is an $\mathbb{F}_2$-additive subgroup of $\mathbb{F}_4^n$.

Suppose $\omega \in \mathbb{F}_4$ such that $\omega^2 = \omega + 1$. Then, $\mathbb{F}_4 = \mathbb{F}_2[\omega]$. Let $\mathcal{T}$ be the trace map $\mathcal{T}: \mathbb{F}_4 \to \mathbb{F}_2$ defined as $\mathcal{T}(x) = x + x^2$. Let $\mathbf{x}, \mathbf{y} \in \mathbb{F}_4^n$; then, the trace inner product is $\langle \mathbf{x}, \mathbf{y} \rangle_T = \mathcal{T}(\mathbf{x} \cdot \mathbf{y}^2) = \mathcal{T}(\sum_{i=1}^n x_i \cdot y_i^2)$.

For any additive $\mathbb{F}_4$-code $\mathcal{C}$, the trace dual $\mathcal{C}^{\perp_T}$ of $\mathcal{C}$ is defined as $\mathcal{C}^{\perp_T} = \{\mathbf{x} \in \mathbb{F}_4^n | \mathbf{x}, \mathbf{y} >_T = 0 \text{ for any } \mathbf{y} \in \mathcal{C}\}$, and the trace hull $\mathrm{Hull}_T(\mathcal{C})$ of $\mathcal{C}$ is defined by $\mathrm{Hull}_T(\mathcal{C}) = \mathcal{C} \cap \mathcal{C}^{\perp_T}$.

### 2.2. Codes over Non-Unitary Rings

This section introduces the basic definitions and results related to the given three non-unitary rings and linear codes over these rings.

Denote $\mathcal{R}$ to be one of three rings: $E, I, H$. Each ring is defined by relations on two generators $a$ and $b$. For all three rings, we write $c = a + b$.

A linear code $\mathcal{C}$ over $\mathcal{R}$ (or simply called an $\mathcal{R}$-code) of length $n$ is defined as a left $\mathcal{R}$-submodule of $\mathcal{R}^n$.

We equip $\mathcal{R}^n$ with the standard inner product $\langle \mathbf{x}, \mathbf{y} \rangle = \sum_{i=1}^n x_i y_i$, where $\mathbf{x} = (x_1, x_2, \cdots, x_n)$, $\mathbf{y} = (y_1, y_2, \cdots, y_n) \in \mathcal{R}^n$. Under this inner product, we define the following two duals of a linear $\mathcal{R}$-code $\mathcal{C}$ of length $n$.

(1). The right dual: The right dual of an $\mathcal{R}$-code $\mathcal{C}$ is defined by

$$ \mathcal{C}^{\perp_R} = \{ \mathbf{y} \in \mathcal{R}^n | \langle \mathbf{x}, \mathbf{y} \rangle = 0, \mathbf{x} \in \mathcal{C} \}. $$

(2). The left dual: The left dual of an $\mathcal{R}$-code $\mathcal{C}$ is defined by

$$ \mathcal{C}^{\perp_L} = \{ \mathbf{y} \in \mathcal{R}^n | \langle \mathbf{y}, \mathbf{x} \rangle = 0, \mathbf{x} \in \mathcal{C} \}. $$

An $\mathcal{R}$-code $\mathcal{C}$ of length $n$ is said to be left-nice (resp. right nice) if $|\mathcal{C}||\mathcal{C}^{\perp_L}| = 4^n$ (resp. $|\mathcal{C}||\mathcal{C}^{\perp_R}| = 4^n$).
The two-sided dual code (or simply the dual code) of an R-code C, denoted by C⊥ and defined as C⊥ = C_R ⊕ C_L. Therefore, a linear R-code C is said to be self-orthogonal if C ⊆ C⊥ and self-dual if C = C⊥.

### 2.2.1. The Ring E

The ring E is defined by

$$E = \langle a, b \mid 2a = 2b = 0, a^2 = a, b^2 = b, ab = a, ba = b \rangle.$$

This ring is non-commutative and non-unital ring of characteristic two. Thus, E is local with maximal ideal J = {0, c}.

Let $\alpha_E$ be the map of reduction modulo the maximal ideal J defined as $\alpha_E : E \to E/J \simeq \mathbb{F}_2$ with $\alpha_E(0) = \alpha_E(c) = 0$ and $\alpha_E(a) = \alpha_E(b) = 1$.

By inspection, a c-adic decomposition of any element $r \in E$ can be expressed as $r = ar_1 + cr_1$, for unique scalars $r_1, r_2 \in \mathbb{F}_2$.

Two codes over $\mathbb{F}_2$ of length $n$ can be associated canonically with the E-code C. The residue code $\text{res}_E(C)$ and the torsion code $\text{tor}_E(C)$ are defined as:

$$\text{res}_E(C) = \{\alpha_E(\mathbf{x}) \mid \mathbf{x} \in C\} \quad \text{tor}_E(C) = \{\mathbf{y} \in \mathbb{F}_2^n \mid c\mathbf{y} \in C\}.$$

Note that residue and torsion codes of C satisfy: $\text{res}_E(C) \subseteq \text{tor}_E(C)$. An E-code C is said of type $\{k_1, k_2\}$ if $\text{res}_E(C)$ has dimension $k_1$ and $\text{tor}_E(C)$ has dimension $k_1 + k_2$. Thus, $|C| = |\text{res}_E(C)| |\text{tor}_E(C)| = 2^{2k_1} \times 2^{k_2}$. If $k_2 = 0$, the code C is considered to be free. Equivalently, $\text{res}_E(C) = \text{tor}_E(C)$. For our further investigations, we recall from [25] the following results.

**Theorem 1** ([25], Theorem 7). For any linear code C over E, we have $C = \text{ares}_E(C) \oplus c \text{ tor}_E(C)$.

**Corollary 1** ([25], Corollary 5). If C is a linear code over E of length n, $C^\perp = \text{ator}_E(C)^\perp \oplus c \text{ res}_E(C)^\perp$.

### 2.2.2. The Ring I

The ring I is defined by

$$I = \langle 2a = 2b = 0, a^2 = b, ab = 0 \rangle.$$

Thus, I consists of the elements $\{0, a, b, c\}$. Moreover, this ring is commutative non-unitary ring of characteristic two. Thus, I is a local ring with maximal ideal $m = \{0, b\}$ and each element of I can be written uniquely as $au + bv$, where $u, v \in \mathbb{F}_2$.

Let $\alpha_I$ be the map of reduction modulo the maximal ideal m defined as $\alpha_I : I \to I/m \simeq \mathbb{F}_2$ with $\alpha_I(0) = \alpha_I(b) = 0$ and $\alpha_I(a) = \alpha_I(c) = 1$. This mapping can be extended naturally from $I^n$ to $\mathbb{F}_2^n$.

Two codes over $\mathbb{F}_2$ of length $n$ can be associated canonically with the I-code C. The residue code $\text{res}_I(C)$ and the torsion code $\text{tor}_I(C)$ are defined as:

$$\text{res}_I(C) = \{\alpha_I(\mathbf{x}) \mid \mathbf{x} \in C\}, \quad \text{tor}_I(C) = \{\mathbf{y} \in \mathbb{F}_2^n \mid c\mathbf{y} \in C\}.$$

Note that $\text{res}_I(C) \subseteq \text{tor}_I(C)$ and $|C| = |\text{res}_I(C)| |\text{tor}_I(C)| = 2^{2k_1+k_2}$, where $k_1$ is the dimension of $\text{res}_I(C)$ and the dimension of $\text{tor}_I(C)$ is $k_1 + k_2$. In this case, we say that C is of type $\{k_1, k_2\}$. If $k_1 = 0$, then C is regarded as a free code, and $\text{res}_I(C) = \text{tor}_I(C)$.

**Theorem 2** ([25], Theorem 4). If C is a linear I-code of length n, then $C^\perp = a \text{ res}_I(C)^\perp \oplus b \mathbb{F}_2^n$
### 2.2.3. The Ring H

Define the ring H as

$$H = \langle a, b | 2a = 2b = 0, a^2 = 0, b^2 = b, ab = 0 \rangle.$$

H is a commutative ring of characteristic 2 and has no identity element for multiplication. Moreover, it is a semi-local ring with two maximal ideals $m_a = \{0, a\}$ and $m_b = \{0, b\}$.

Let $\alpha_a : H \to \mathbb{F}_2$ be the map of reduction modulo $m_a$, and $\alpha_b : H \to \mathbb{F}_2$ be the map of reduction modulo $m_b$. These maps are defined, respectively, as

$$\alpha_b(0) = \alpha_b(b) = 0, \quad \alpha_b(a) = \alpha_b(c) = 1, \text{ and } \alpha_a(0) = \alpha_a(a) = 0, \quad \alpha_a(b) = \alpha_a(c) = 1.$$

Two codes over $\mathbb{F}_2$ of length $n$ can be associated canonically with the H-code $C$.

The code $C_a$ is defined as $C_a := \alpha_b(C)$ and the code $C_b$ defined as $C_b := \alpha_a(C)$. With this, $C$ can be written as $C = aC_a \oplus bC_b$. Assume $k_a = \dim(C_a)$ and $k_b = \dim(C_b)$.

The following theorem will be used in the later sections.

**Theorem 3** ([25], Theorem 22). For an H-code $C = aC_a \oplus bC_b$ of length $n$, we have $C^\perp = a\mathbb{F}_2^n \oplus bC_b^\perp$.

## 3. Hulls of Codes over Non-Unitary Rings

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.

**Definition 1.** For any linear R-code $C$, the left hull $Hull_L(C)$ (respectively, the right hull $Hull_R(C)$) of $C$ is defined by $Hull_L(C) := C \cap C^{\perp L}$ (respectively, $Hull_R(C) := C \cap C^{\perp R}$).

Note that, if $C$ is a linear R-code, then its left and right hull codes are also linear.

**Definition 2.** The two-sided hull (or simply, the hull) code of a linear R-code $C$ is defined as $Hull(C) = C \cap C^\perp$.

### 3.1. The Hulls of E-Codes

#### 3.1.1. Left and Right Hulls of E-Codes

We shall investigate the right-hull and left-hull for an E-code in the subsequent results.

**Theorem 4.** Let $C$ be a linear code of length $n$ over $E$, then

1. $Hull_L(C) = aHull(res_E(C)) \oplus cHull(res_E(C))(tor_E(C))$.

2. $Hull_R(C) = aHull_{tor_E(C)}(res_E(C)) \oplus \text{ctor}_E(C)$.

**Proof.** For statement (1). By Definition 4 and Theorem 9 of [25], we have

$$\mathrm{res}_E(Hull_L(C)) = \mathrm{res}_E(C \cap C^{\perp L}) = \mathrm{res}_E(C) \cap \mathrm{res}_E(C)^\perp = Hull(\mathrm{res}_E(C)).$$

And,

$$\mathrm{tor}_E(Hull_L(C)) = \mathrm{tor}_E(C \cap C^{\perp L}) = \mathrm{tor}_E(C) \cap \mathrm{res}_E(C)^\perp = Hull_{\mathrm{res}_E(C)}(\mathrm{tor}_E(C)).$$

Moreover,

$$\mathrm{res}_E(Hull_R(C)) = \mathrm{res}_E(C \cap C^{\perp R}) = \mathrm{res}_E(C) \cap \mathrm{tor}_E(C)^\perp = Hull_{\mathrm{tor}_E(C)}(\mathrm{res}_E(C)).$$
Also,

$$ \mathrm{tor}_E(\mathrm{Hull}_L(C)) = \mathrm{tor}_E(C \cap C^{\perp L}) = \mathrm{tor}_E(C) \cap \mathbb{F}_2^n = \mathrm{tor}_E(C). $$

Hence, the expected results follow. □

Hereafter, suppose $s = \dim(\mathrm{Hull}_{\mathrm{tor}_E(C)}(\mathrm{res}_E(C)))$ and $t = \dim(\mathrm{Hull}(\mathrm{res}_E(C)))$.

**Corollary 2.** If $C$ is an E-code of length $n$, then

$$ |\mathrm{Hull}_R(C)| = 2^{s+k_1+k_2} \quad \text{and} \quad |\mathrm{Hull}_L(C)| = 2^{s+t+k_2}. $$

**Proof.** The desired result follows immediately from Theorem 4. □

**Theorem 5.** If $C$ is an E-code, then the following two statements hold.

1. $\mathrm{Hull}(\mathrm{res}_E(C)) \subseteq \mathrm{Hull}_{\mathrm{res}_E(C)}(\mathrm{tor}_E(C))$. Furthermore, the equality holds if $C$ is free.

2. $\mathrm{Hull}_{\mathrm{tor}_E(C)}(\mathrm{res}_E(C)) \subseteq \mathrm{tor}_E(C)$.

**Proof.** For the first statement, we have $C^{\perp L}$ which is also linear over $E$. This implies that $\mathrm{res}_E(\mathrm{Hull}_L(C)) \subseteq \mathrm{tor}_E(\mathrm{Hull}_L(C))$. From the Statement 1 of Theorem 4, we have $\mathrm{Hull}(\mathrm{res}_E(C)) \subseteq \mathrm{Hull}_{\mathrm{res}_E(C)}(\mathrm{tor}_E(C))$. Therefore, if $C$ is free, then $\mathrm{res}_E(C) = \mathrm{tor}_E(C)$. Thus, $\mathrm{Hull}_{\mathrm{res}_E(C)}(\mathrm{tor}_E(C)) = \mathrm{tor}_E(C) \cap \mathrm{res}_E(C)^{\perp} = \mathrm{res}_E \cap \mathrm{res}_E(C)^{\perp} = \mathrm{Hull}(\mathrm{res}_E(C))$.

The second statement follows immediately from the linearity of $C^{\perp R}$ over $E$ and Statement 2 of Theorem 4. □

**Definition 3.** A linear E-code $C$ is said to be left self-dual (left-SD) (respectively, right self-dual (right-SD)) if $C = C^{\perp L}$ (respectively, $C = C^{\perp R}$).

**Definition 4.** A left-nice E-code $C$ is called left-LCD if $\mathrm{Hull}_L(C) = \{0\}$. Similarly, a right-nice E-code $C$ is said to be right-LCD if it satisfies $\mathrm{Hull}_R(C) = \{0\}$.

Note that an E-code $C$ is said to be left-SD if $\mathrm{Hull}_L(C) = C = C^{\perp L}$, and right-SD if $\mathrm{Hull}_R(C) = C = C^{\perp R}$. Therefore, if $\mathrm{Hull}_L(C) = \{0\}$, then $C$ is said to be left-LCD. Similarly $C$ is right-LCD if $\mathrm{Hull}_R(C) = \{0\}$.

Using the properties of left and right hull codes, we study left-SD, right-SD, right-LCD and left-LCD codes over $E$.

**Lemma 1.** Let $C$ be a linear code over $E$, then

(i). $C$ is left-SD if and only if $\mathrm{tor}_E(C) = \mathrm{res}_E(C) = \mathrm{res}_E^{\perp}(C)$.

(ii). $C$ is right-SD if and only if $\mathrm{res}_E(C) = \{0\}$ and $\mathrm{tor}_E(C) = \mathbb{F}_2^n$.

**Proof.** By previous definition and Theorems 1 and 4, Corollary 1, we have $C$ is left-SD if and only if $\mathrm{Hull}_L(C) = C$ and $\mathrm{Hull}_L(C) = C^{\perp L}$ if and only if $\mathrm{Hull}(\mathrm{res}_E(C)) = \mathrm{res}_E(C) = \mathrm{res}_E^{\perp}(C)$ and $\mathrm{Hull}_{\mathrm{res}_E(C)}(\mathrm{tor}_E(C)) = \mathrm{tor}_E(C) = \mathrm{res}_E^{\perp}(C)$. Equivalently, $\mathrm{tor}_E(C) = \mathrm{res}_E(C) = \mathrm{res}_E^{\perp}(C)$. This completes the proof of statement (i).

On the other hand, $C$ is right-SD if and only if $\mathrm{Hull}_R(C) = C$ and $\mathrm{Hull}_L(C) = C^{\perp R}$ if and only if $\mathrm{Hull}_{\mathrm{tor}_E(\mathrm{res}_E(C))} = \mathrm{res}_E(C) = \mathrm{tor}_E^{\perp}(C)$ and $\mathrm{tor}_E(C) = \mathbb{F}_2^n$. Equivalently, $\mathrm{tor}_E(C) = \mathbb{F}_2^n$ and $\mathrm{res}_E(C) = \{0\}$. Hence, the proof of statement (ii) is completed. □

**Lemma 2.** Let $C$ be a linear code over $E$ of length $n$. Then, the following statements hold:

1. $C$ is right-LCD if and only if $C = \{0\}$.

2. $C$ is left-LCD if and only if $C$ is free and $\mathrm{Hull}(\mathrm{res}_E(C)) = \{0\}$.
**Proof.** Using Theorems 4 and 5, we have

$C$ is right-LCD if and only if $\mathrm{res}_E(Hull_R(C)) = \mathrm{tor}_E(Hull_R(C)) = \{0\}$ if and only if $\mathrm{tor}_E(C) = \mathrm{Hull}_{\mathrm{tor}_E(C)}(\mathrm{res}_E(C)) = \{0\}$. Equivalently, $\mathrm{res}_E(C) = \mathrm{tor}_E(C) = \{0\}$.

$C$ is left-LCD if and only if $\mathrm{res}_E(Hull_L(C)) = \mathrm{tor}_E(Hull_L(C)) = \{0\}$ if and only if $\mathrm{Hull}(\mathrm{res}_E(C)) = \mathrm{Hull}_{\mathrm{res}_E(C)}(\mathrm{tor}_E(C)) = \{0\}$. Equivalently, $\mathrm{Hull}(\mathrm{res}_E(C)) = \{0\}$ and $C$ is free (by Theorem 5). $\square$

### 3.1.2. The Two-Sided Hull of E-Codes

Based on the properties of the associated codes of E-codes, we determine the hull codes over E in the following theorem.

**Theorem 6.** If $C$ is a linear E-code, then

$$ \mathrm{Hull}(C) = a\mathrm{Hull}_{\mathrm{tor}_E(C)}(\mathrm{res}_E(C)) \oplus c\mathrm{Hull}_{\mathrm{res}_E(C)}(\mathrm{tor}_E(C)). $$

**Proof.** Since $C$ and $C^\perp$ are linear E-codes, $\mathrm{Hull}(C)$ is also a linear over E. By Theorem 1, we have $\mathrm{Hull}(C) = a\mathrm{res}_E(\mathrm{Hull}(C) \oplus \mathrm{ctor}_E(\mathrm{Hull}(C)))$. Therefore,

$$ \mathrm{res}_E(\mathrm{Hull}(C)) = \mathrm{res}_E(C \cap C^\perp) = \mathrm{res}_E(C) \cap \mathrm{res}_E(C^\perp) = \mathrm{res}_E(C) \cap \mathrm{tor}_E(C)^\perp = \mathrm{Hull}_{\mathrm{tor}_E(C)}(\mathrm{res}_E(C)). $$

And,

$$ \mathrm{tor}_E(\mathrm{Hull}(C)) = \mathrm{tor}_E(C \cap C^\perp) = \mathrm{tor}_E(C) \cap \mathrm{tor}_E(C^\perp) = \mathrm{tor}_E(C) \cap \mathrm{res}_E(C)^\perp = \mathrm{Hull}_{\mathrm{res}_E(C)}(\mathrm{tor}_E(C)). $$

Consequently, these achieve the desired outcome. $\square$

**Corollary 3.** If $C$ is an E-code, then

$$ \mathrm{Hull}(C) = \mathrm{Hull}_L(C) \cap \mathrm{Hull}_R(C). $$

**Proof.** By Theorem 4, we have

$$ \begin{aligned} \mathrm{res}_E(\mathrm{Hull}_L(C) \cap \mathrm{Hull}_R(C)) &= \mathrm{res}_E(\mathrm{Hull}_L(C)) \cap \mathrm{res}_E(\mathrm{Hull}_R(C)) = \mathrm{Hull}(\mathrm{res}_E(C) \cap \mathrm{Hull}_{\mathrm{tor}_E(C)}(\mathrm{res}_E(C))) \\ &= \mathrm{res}_E(C) \cap \mathrm{res}_E(C)^\perp \cap \mathrm{tor}_E(C)^\perp = \mathrm{res}_E(C) \cap \mathrm{tor}_E(C)^\perp. \end{aligned} $$

The last equality follows from $\mathrm{res}_E(C) \subseteq \mathrm{tor}_E(C)$. Therefore,

$$ \begin{aligned} \mathrm{tor}_E(\mathrm{Hull}_L(C) \cap \mathrm{Hull}_R(C)) &= \mathrm{tor}_E(\mathrm{Hull}_L(C)) \cap \mathrm{tor}_E(\mathrm{Hull}_R(C)) = \mathrm{Hull}_{\mathrm{res}_E(C)}(\mathrm{tor}_E(C)) \cap \mathrm{tor}_E(C) \\ &= \mathrm{tor}_E(C) \cap \mathrm{res}_E(C)^\perp \cap \mathrm{tor}_E(C) = \mathrm{tor}_E(C) \cap \mathrm{res}_E(C)^\perp. \end{aligned} $$

By combining these results with Theorem 7 in [25], the desired result follows. $\square$

**Theorem 7.** If $C$ is a linear code over E, then

$$ \mathrm{Hull}_{\mathrm{tor}_E(C)}(\mathrm{res}_E(C)) \subseteq \mathrm{Hull}(\mathrm{res}_E(C)) \subseteq \mathrm{Hull}_{\mathrm{res}_E(C)}(\mathrm{tor}_E(C)). $$

Furthermore, equality holds when the code $C$ is free.

**Proof.** To prove the first inclusion, we have $\mathrm{tor}_E(C)^\perp \subseteq \mathrm{res}_E(C)^\perp$. Therefore, $\mathrm{res}_E(C) \cap \mathrm{tor}_E(C)^\perp \subseteq \mathrm{res}_E(C) \cap \mathrm{res}_E(C)^\perp$. Thus, $\mathrm{Hull}_{\mathrm{tor}_E(C)}(\mathrm{res}_E(C)) = \mathrm{res}_E(C) \cap \mathrm{tor}_E(C)^\perp \subseteq \mathrm{Hull}(\mathrm{res}_E(C)) = \mathrm{res}_E(C) \cap \mathrm{res}_E(C)^\perp$.

Statement 1 of Theorem 5 establishes the second inclusion, that is $\mathrm{Hull}(\mathrm{res}_E(C)) \subseteq \mathrm{Hull}_{\mathrm{res}_E(C)}(\mathrm{tor}_E(C))$. Hence, $\mathrm{Hull}_{\mathrm{tor}_E(C)}(\mathrm{res}_E(C)) \subseteq \mathrm{Hull}(\mathrm{res}_E(C)) \subseteq \mathrm{Hull}_{\mathrm{res}_E(C)}(\mathrm{tor}_E(C))$.

If $C$ is free, then $\mathrm{res}_E(C) = \mathrm{tor}_E(C)$. So, $\mathrm{res}_E(C)^\perp = \mathrm{tor}_E(C)^\perp$. Consequently, $\mathrm{Hull}_{\mathrm{tor}_E(C)}(\mathrm{res}_E(C)) = \mathrm{Hull}_{\mathrm{res}_E(C)}(\mathrm{res}_E(C)$ and $\mathrm{Hull}_{\mathrm{res}_E(C)}(\mathrm{tor}_E(C)) = \mathrm{Hull}_{\mathrm{res}_E(C)}(\mathrm{res}_E(C)$. These together with $\mathrm{Hull}_{\mathrm{res}_E(C)}(\mathrm{res}_E(C)) = \mathrm{Hull}(\mathrm{res}_E(C))$ yield the desired result. $\square$
**Proposition 2.** Let $C$ be a linear code over $E$ of length $n$ and type $\{k_1, k_2\}$, then $\dim(\mathrm{tor}_E(\mathrm{Hull}(C))) = s + k_2$.

**Proof.** By Proposition 1, we have

$\dim(\mathrm{res}_E(C)) - \dim(\mathrm{Hull}_{\mathrm{tor}_E(C)}(\mathrm{res}_E(C))) = \dim(\mathrm{tor}_E(C)) - \dim(\mathrm{Hull}_{\mathrm{res}_E(C)}(\mathrm{tor}_E(C)))$. Since $\dim(\mathrm{res}_E(C)) = k_1$, $\dim(\mathrm{tor}_E(C)) = k_1 + k_2$ and $\dim(\mathrm{Hull}_{\mathrm{tor}_E(C)}(\mathrm{res}_E(C))) = s$, we get

$$k_1 - s = k_1 + k_2 - \dim(\mathrm{Hull}_{\mathrm{res}_E(C)}(\mathrm{tor}_E(C))).$$

Hence, $\dim(\mathrm{tor}_E(\mathrm{Hull}(C))) = \dim(\mathrm{Hull}_{\mathrm{res}_E(C)}(\mathrm{tor}_E(C))) = s + k_2$. Therefore, the proof is completed. $\square$

**Corollary 4.** If $C$ is a linear code over $E$ of type $\{k_1, k_2\}$, then $\mathrm{Hull}(C)$ is of type $\{s, k_2\}$.

**Proof.** The proof follows by applying from definition of the type of a linear $E$-code, Theorem 6 and Proposition 2. $\square$

**Proposition 3.** If $C$ is a linear code over $E$ of length $n$ and type $\{k_1, k_2\}$, then $|\mathrm{Hull}(C)| = 2^{k_2+2s}$.

**Proof.** From Theorem 6, we have

$$|\mathrm{Hull}(C)| = |\mathrm{Hull}_{\mathrm{tor}_E(C)}(\mathrm{res}_E(C))| |\mathrm{Hull}_{\mathrm{res}_E(C)}(\mathrm{tor}_E(C))| = 2^s \times 2^{s+k_2}.$$

Hence, the proof is completed. $\square$

Next, we determine the conditions for $E$-code to be self-orthogonal, self-dual or LCD by analyzing the properties of its hull code.

**Lemma 3.** Let $C$ be a linear code over $E$. Then, $C$ is self-orthogonal code over $E$ if and only if $\mathrm{res}_E(C)$ is a binary self-orthogonal code and $\mathrm{tor}_E(C) \subseteq \mathrm{res}(C)^\perp$.

**Proof.** By definition, $C$ is self-orthogonal over $E$ if and only if $\mathrm{Hull}(C) = C$, if and only if $\mathrm{res}_E(\mathrm{Hull}(C)) = \mathrm{res}_E(C)$ and $\mathrm{tor}_E(\mathrm{Hull}(C)) = \mathrm{tor}_E(C)$. By Theorem 1 and Corollary 1, this is equivalent to $\mathrm{Hull}_{\mathrm{tor}_E(C)}(\mathrm{res}_E(C))\mathrm{res}_E(C)$ and $\mathrm{Hull}_{\mathrm{res}_E(C)}(\mathrm{tor}_E(C)) = \mathrm{tor}_E(C)$. Equivalently, $\mathrm{tor}_E(C) \subseteq \mathrm{res}_E^\perp(C)$ and $\mathrm{res}_E(C) \subseteq \mathrm{tor}_E^\perp(C) \subseteq \mathrm{res}_E^\perp(C)$. Hence, $\mathrm{Hull}(C) = C$ if and only if $\mathrm{tor}_E(C) \subseteq \mathrm{res}_E^\perp(C)$ and $\mathrm{res}_E(C)$ is a binary self-orthogonal code. $\square$

**Lemma 4.** Let $C$ be a linear code over $E$. Then, $C$ is self-dual if and only if $\mathrm{tor}_E(C) = \mathrm{res}_E^\perp(C)$.

**Proof.** By Corollary 1, Theorems 1 and 6, we have

$C$ is self-dual if and only if $\mathrm{Hull}(C) = C$ and $\mathrm{Hull}(C) = C^\perp$ if and only if $\mathrm{res}_E(\mathrm{Hull}(C)) = \mathrm{res}_E(C) = \mathrm{res}_E(C^\perp)$ and $\mathrm{tor}_E(\mathrm{Hull}(C)) = \mathrm{tor}_E(C) = \mathrm{tor}_E(C^\perp)$.

This equivalent to $\mathrm{Hull}_{\mathrm{tor}_E(C)}(\mathrm{res}_E(C)) = \mathrm{res}_E(C)$, $\mathrm{Hull}_{\mathrm{tor}_E(C)}(\mathrm{res}_E(C)) = \mathrm{tor}_E^\perp(C)$ and $\mathrm{Hull}_{\mathrm{res}_E(C)}(\mathrm{tor}_E(C)) = \mathrm{tor}_E(C)$, $\mathrm{Hull}_{\mathrm{res}_E(C)}(\mathrm{tor}_E(C)) = \mathrm{res}_E^\perp(C)$. Equivalently, $\mathrm{tor}_E(C) = \mathrm{res}_E^\perp(C)$. $\square$

**Lemma 5.** Let $C = \mathrm{ares}_E(C) \oplus \mathrm{ctor}_E(C)$ be an $E$-code of length $n$. Then, $C$ is LCD if and only if it is free and $\mathrm{Hull}(\mathrm{res}_E(C)) = \{0\}$.

**Proof.** $C$ is an LCD $E$-code if and only if $\mathrm{Hull}(C) = \{0\}$. By Theorem 6, this is equivalent to $\mathrm{Hull}_{\mathrm{tor}_E(C)}(\mathrm{res}_E(C)) = \mathrm{Hull}_{\mathrm{res}_E(C)}(\mathrm{tor}_E(C)) = 0$. Theorem 7 and Corollary 4 imply that $k_2 = 0$ and $\mathrm{Hull}(\mathrm{res}_E(C)) = \{0\}$. Therefore, the proof is completed. $\square$
Through the subsequent example, we show that the freeness condition in Lemma 5 is essential.

**Example 1.** Let $C$ be an $E$-code of length 3 and type $\{1, 1\}$ defined as

$$C = \{ 000, aa0, bb0, ba0, ab0, c00, 0c0, cc0 \}.$$

Therefore,

$$\mathrm{res}_E(C) = \{000, 110\} \quad \text{and} \quad \mathrm{tor}_E(C) = \{000, 100, 010, 110\}.$$

And,

$$\mathrm{res}_E(C)^\perp = \{000, 110\} \quad \text{and} \quad \mathrm{tor}_E(C)^\perp = \{000, 001\}.$$

Therefore,

$$\mathrm{Hull}_{\mathrm{tor}_E(C)}(\mathrm{res}_E(C)) = \{0\} \quad \text{and} \quad \mathrm{Hull}_{\mathrm{tor}_E(C)}(\mathrm{res}_E(C)) = \{000, 110\}.$$

By Theorem 6, we have $\mathrm{Hull}(C) = \{000, cc0\}$, proving that $C$ is not LCD. However, $\mathrm{Hull}_{\mathrm{tor}_E(C)}(\mathrm{res}_E(C)) = \{0\}$. Note that $C$ is not a free code.

**Corollary 5.** LCD codes over $E$ are always free.

**Proof.** The result follows immediately from Lemma 5. $\square$

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 $E$. However, in general this does not hold for codes over $I$ and $H$.

**Proposition 4.** Any linear $E$-code $C$ satisfies

$$\mathrm{Hull}(C^\perp) = \mathrm{Hull}(C).$$

**Proof.** By Definition 3 and Corollary 9 in [25], we have

$$\mathrm{Hull}(C^\perp) = C^\perp \cap (C^\perp)^\perp = C^\perp \cap C = \mathrm{Hull}(C).$$

This completes the proof. $\square$

Define the map $\lambda_E$ from $E$ to $\mathbb{F}_4$ by $\lambda_E(0) = 0$, $\lambda_E(a) = \omega$, $\lambda_E(b) = \omega^2$, and $\lambda_E(c) = 1$.

The map $\lambda_E$ can be extended naturally to a map from $E^n$ to $\mathbb{F}_4^n$. Moreover, to every $E$-code $C$ of length $n$, there is an additive $\mathbb{F}_4$-code $\lambda_E(C)$.

**Theorem 8.** Let $C$ be a linear code over $E$. Then,

$$\lambda_E(\mathrm{Hull}(C)) = \mathrm{Hull}_T(\lambda_E(C)).$$

**Proof.** We have

$$\begin{align*}
\lambda_E(\mathrm{Hull}(C)) &= \lambda_E(C \cap C^\perp) = \lambda_E(C) \cap \lambda_E(C^\perp) \\
&= \lambda_E(C) \cap \lambda_E(C)^{\perp T} \quad (\text{this follows from [25], Theorem 12}). \\
&= \mathrm{Hull}_T(\lambda_E(C)).
\end{align*}$$

<figure><img src="image_3.png" /></figure>
Now, we state the following theorem which relates the number of linear codes over E with hulls of a given size to the number of additive codes over $\mathbb{F}_4$ with trace hulls of specific cardinality.

**Theorem 9.** The number of linear codes over E where $\text{Hull}(C)$ has cardinality $2^{k_2+2s}$ is equal to the number of additive codes $\lambda_E(C)$ over $\mathbb{F}_4$ where $\text{Hull}_T(\lambda_E(C))$ has size $2^{k_2+2s}$.

**Proof.** This is a direct consequence of Theorem 8. □

## 3.2. The Hull of I-Codes

In the following result, we characterize the residue and torsion codes of the hulls of an I-code and its dual, thereby establishing their cardinalities.

**Theorem 10.** If $C$ is a linear I-code, then the associated codes of $\text{Hull}(C)$ are given by:

$$ \text{res}_I(\text{Hull}(C)) = \text{Hull}(\text{res}_I(C)) \quad \text{and} \quad \text{tor}_I(\text{Hull}(C)) = \text{tor}_I(C). $$

**Proof.** By applying the definition of the residue and torsion codes of $C$ and Theorem 2, we have

$$ \text{res}_I(\text{Hull}(C)) = \text{res}_I(C) \cap \text{res}_I(C^{\perp}) = \text{res}_I(C) \cap \text{res}_I(C^{\perp}) = \text{Hull}(\text{res}_I(C)). $$

And,

$$ \text{tor}_I(\text{Hull}(C)) = \text{tor}_I(C) \cap \text{tor}_I(C^{\perp}) = \text{tor}_I(C) \cap \mathbb{F}_2^n = \text{tor}_I(C). $$

Hence, the proof is derived. □

**Proposition 5.** Let $C$ be an I-code of type $\{k_1, k_2\}$ and $l = \dim(\text{Hull}(\text{res}_I(C)))$, then $\text{Hull}(C)$ has cardinality $2^l \times 2^{k_1+k_2}$.

**Proof.** Since $C$ is a linear I-code, $\text{Hull}(C)$ is also linear over $I$, therefore

$$ |\text{Hull}(C)| = |\text{res}_I(\text{Hull}(C))| \times |\text{tor}_I(\text{Hull}(C))| = |\text{Hull}(\text{res}_I(C))| \times |\text{tor}_I(C)| = 2^l \times 2^{k_1+k_2}. $$

This completes the proof. □

Next, we characterize the residue and torsion codes for the hull of the dual of an I-code.

**Theorem 11.** Let $C$ be a linear code over $I$ of length $n$; then, the associated codes of $\text{Hull}(C^{\perp})$ are

$$ \text{res}_I(\text{Hull}(C^{\perp})) = \text{Hull}(\text{res}_I(C)) \quad \text{and} \quad \text{tor}_I(\text{Hull}(C^{\perp})) = \mathbb{F}_2^n. $$

**Proof.** Note that $\text{Hull}(C^{\perp}) = C^{\perp} \cap (C^{\perp})^{\perp}$. By Theorem 3 of [25], $\text{res}_I((C^{\perp})^{\perp}) = (\text{res}_I(C^{\perp}))^{\perp} = (\text{res}_I(C^{\perp})^{\perp}) = \text{res}_I(C)$ and $\text{tor}_I((C^{\perp})^{\perp}) = \mathbb{F}_2^n$. Furthermore,

$$ \text{res}_I(\text{Hull}(C^{\perp})) = \text{res}_I(C^{\perp}) \cap \text{res}_I((C^{\perp})^{\perp}) = (\text{res}_I(C))^{\perp} \cap \text{res}_I(C) = \text{Hull}(\text{res}_I(C)). $$

And,

$$ \text{tor}_I(\text{Hull}(C^{\perp})) = \text{tor}_I(C^{\perp}) \cap \text{tor}_I((C^{\perp})^{\perp}) = \mathbb{F}_2^n \cap \mathbb{F}_2^n = \mathbb{F}_2^n. $$

□
**Theorem 12.** Let $C$ be a linear code over $I$ of length $n$, then

$$ \mathrm{Hull}(C^{\perp}) = a\mathrm{Hull}(\mathrm{res}_I(C)) \oplus b\mathbb{F}_2^n. $$

**Proof.** Let $\mathbf{x} \in \mathrm{Hull}(C^{\perp})$; then, by Theorem 1 of [25], $\mathbf{x} = a\mathbf{u} + b\mathbf{v}$ where $\mathbf{u} \in \mathrm{res}_I(\mathrm{Hull}(C^{\perp}))$ and $\mathbf{v} \in \mathbb{F}_2^n$. By Theorem 11, we have $\mathrm{res}_I(\mathrm{Hull}(C^{\perp})) = \mathrm{Hull}(\mathrm{res}_I(C))$. This yields $\mathbf{u} \in \mathrm{res}_I(\mathrm{Hull}(C))$. Consequently, $\mathbf{x} \in a\mathrm{Hull}(\mathrm{res}_I(C)) + b\mathbb{F}_2^n$. This proves that $\mathrm{Hull}(C^{\perp}) \subseteq a\mathrm{Hull}(\mathrm{res}_I(C)) \oplus b\mathbb{F}_2^n$.

Furthermore, $|\mathrm{Hull}(C^{\perp})| = |\mathrm{res}_I(\mathrm{Hull}(C^{\perp}))| \times |\mathrm{tor}_I(\mathrm{Hull}(C^{\perp}))| = |\mathrm{Hull}(\mathrm{res}_I(C))| \times |\mathbb{F}_2^n|$, the last equality follows from Theorem 11. Hence, $\mathrm{Hull}(C^{\perp}) = a\mathrm{Hull}(\mathrm{res}_I(C)) \oplus b\mathbb{F}_2^n$. $\square$

It is evident that, for a linear code $C$ over finite fields or the ring $E$, we have $\mathrm{Hull}(C) = \mathrm{Hull}(C^{\perp})$. However, this property does not generalize to codes over $I$ as shown in the example below.

**Example 2.** Let $C$ be the linear $I$-code of length 2 defined by $C = \{00, aa, bb, cc\}$. Then, $C^{\perp} = C^{\perp\perp} = \{00, aa, 0b, b0, bb, ac, ca, cc\}$.

Therefore, $\mathrm{Hull}(C) = C$ and $\mathrm{Hull}(C^{\perp}) = C^{\perp}$. This proves that $\mathrm{Hull}(C) \neq \mathrm{Hull}(C^{\perp})$.

**Theorem 13.** If $C$ is an $I$-code of length $n$, then $\mathrm{Hull}(C) \subseteq \mathrm{Hull}(C^{\perp})$. Furthermore, equality holds if $\mathrm{tor}_I(C) = \mathbb{F}_2^n$.

**Proof.** Let $\mathbf{x} \in \mathrm{Hull}(C)$, then by Theorem 1 of [25], $\mathbf{x} = a\mathbf{u} + b\mathbf{v}$ where $\mathbf{u} \in \mathrm{res}_I(\mathrm{Hull}(C))$ and $\mathbf{v} \in \mathbb{F}_2^n$. By Theorem 10, we have $\mathrm{res}_I(\mathrm{Hull}(C)) = \mathrm{Hull}(\mathrm{res}_I(C))$. This implies that $\mathbf{x} \in a\mathrm{Hull}(\mathrm{res}_I(C)) + b\mathbb{F}_2^n = \mathrm{Hull}(C^{\perp})$ (by Theorem 12). Thus, $\mathbf{x} \in \mathrm{Hull}(C^{\perp})$. Hence, $\mathrm{Hull}(C) \subseteq \mathrm{Hull}(C^{\perp})$.

Furthermore, if $\mathrm{tor}_I(C) = \mathbb{F}_2^n$, then by Theorems 10 and 11, $\mathrm{tor}_I(\mathrm{Hull}(C)) = \mathrm{tor}_I(\mathrm{Hull}(C^{\perp}))$. Consequently,

$$ |\mathrm{Hull}(C)| = |\mathrm{Hull}(\mathrm{res}_I(C))| \times |\mathbb{F}_2^n| = |\mathrm{res}_I(\mathrm{Hull}(C^{\perp}))| \times |\mathrm{tor}_I(\mathrm{Hull}(C^{\perp}))| = |\mathrm{Hull}(C^{\perp})|. $$

We conclude that $\mathrm{Hull}(C^{\perp}) = \mathrm{Hull}(C)$. $\square$

In the following results, we establish self-orthogonal, LCD and self-dual codes over $I$ via their hull codes.

**Lemma 6.** A linear $I$-code $C$ is self-orthogonal if and only if $\mathrm{res}_I(C)$ is a binary self-orthogonal code.

**Proof.** By the definition of self-orthogonal code over $I$ and Theorem 10, we have

$C$ is self-orthogonal if and only if $\mathrm{Hull}(C) = C$ if and only if $\mathrm{res}_I(\mathrm{Hull}(C)) = \mathrm{res}_I(C)$ and $\mathrm{tor}_I(\mathrm{Hull}(C)) = \mathrm{tor}_I(C)$ if and only if $\mathrm{Hull}(\mathrm{res}_I(C)) = \mathrm{res}_I(C)$. Equivalently, $\mathrm{res}_I(C)$ is a binary self-orthogonal code. $\square$

**Lemma 7.** Let $C$ be a linear code of length $n$ over $I$. Then, $C$ is self-dual if and only if $\mathrm{res}_I(C)$ is a binary self-dual code and $\mathrm{tor}_E(C) = \mathbb{F}_2^n$.

**Proof.** From the definition of self-dual code over $I$, Theorems 2 and 10, we have

$C$ is self-dual if and only if $\mathrm{Hull}(C) = C = C^{\perp}$ if and only if $\mathrm{res}_I(\mathrm{Hull}(C)) = \mathrm{res}_I(C)$, $\mathrm{res}_I(\mathrm{Hull}(C)) = \mathrm{res}_I(C^{\perp})$ and $\mathrm{tor}_I((\mathrm{Hull}(C))) = \mathrm{tor}_I(C)$, $\mathrm{tor}_I((\mathrm{Hull}(C))) = \mathrm{tor}_I(C^{\perp})$ if and only if $\mathrm{Hull}(\mathrm{res}_I(C)) = \mathrm{res}_I(C) = \mathrm{res}_I(C^{\perp})$ and $\mathrm{tor}_I(C) = \mathbb{F}_2^n$. Hence, the desired result follows. $\square$
**Lemma 8.** An I-code C is LCD over I if and only if C is the zero code.

**Proof.** The code C is LCD if and only if $Hull(C) = \{0\}$. Equivalently, $res_I(Hull(C)) = tor_I(Hull(C)) = \{0\}$. Since $tor_I(C) \supseteq res_I(C)$ and by Theorem 10, this equivalent to $res_I(C) = tor_I(C) = 0$. □

Define the map $\lambda_I$ from I to $\mathbb{F}_4$ as follows

$$ \lambda_I(0) = 0, \lambda_I(a) = \omega, \lambda_I(b) = 1 \text{ and } \lambda_I(c) = \omega^2. $$

This map can be extended naturally to a map from $I^n$ to $\mathbb{F}_4^n$. Moreover, to every I-code C of length n, there is an additive $\mathbb{F}_4$-code $\lambda_I(C)$.

We note that Theorem 8 cannot be generalized to codes over I, as the next example illustrates.

**Example 3.** Let C be the linear code C of length 2 over I defined by $C = \{00, aa, b0, 0b, bb, ac, ca, cc\}$. Then, $C^{\perp} = C$, $\lambda_I(C) = \{00, 10, 01, 11, ww, ww^2, w^2w, w^2w^2\}$ and $\lambda_I(C)^{\perp T} = \{00, 0w\}$. Therefore, $\lambda_I(Hull(C)) = \lambda_I(C)$ and $Hull_T(\lambda_I(C)) = \lambda_I(C) \cap \lambda_I(C)^{\perp T} = \{00, 0w\}$. It is easy to see that $\lambda_I(Hull(C)) \neq Hull_T(\lambda_I(C))$.

From our previous study, one can see that if $R \in \{E, I\}$ and C is a linear R-code of type $\{k_1, k_2\}$, then $Hull(C)$ has type $\{t_1, t_2\}$, where $t_1 = s, t_2 = k_2$ if $R = E$ and $t_1 = l, t_2 = k_1 + k_2 - l$ if $R = I$.

Let C be an E-code; then, $Hull(C) \subseteq C$ always implies $t_i \le k_i$. But this is not true for codes over I. For example, let C be the linear I-code of length 2 and type $\{1, 1\}$ with generator matrix $G = \begin{bmatrix} a & b \\ 0 & b \end{bmatrix}$. Then, $res_I(C) = \{00, 10\}$ and $tor_I(C) = \{00, 01, 10, 11\}$. Thus, by Theorem 10, $res_I(Hull(C)) = Hull(res_I(C)) = \{0\}$ and $tor_I(Hull(C)) = tor_I(C)$. Consequently, C has type $\{1, 1\}$ and $Hull(C)$ has type $\{0, 2\}$. We note that $t_2 = 2$ and $k_2 = 1$ and $2 \nleq 1$.

### 3.3. The Hull of H-Codes

In what follows, we determine the hull of H-codes and their dual.

**Theorem 14.** Let $C = aC_a \oplus bC_b$ be an H-code of length n, then

$$ \mathrm{Hull}(C) = aC_a \oplus b\mathrm{Hull}(C_b). $$

$$ \text{Moreover, } |\mathrm{Hull}(C)| = 2^{k_a+\dim(\mathrm{Hull}(C_b))}. $$

**Proof.** Since $Hull(C)$ is a linear H-code, then we have

$$ \begin{aligned} \alpha_a(Hull(C)) &= \alpha_a(C \cap C^{\perp}) = \alpha_a(C) \cap \alpha_a(C^{\perp}) \\ &= C_b \cap C_b^{\perp} \quad (\text{by Theorem 3}) \\ &= Hull(C_b). \end{aligned} $$

And,

$$ \begin{aligned} \alpha_b(Hull(C)) &= \alpha_b(C \cap C^{\perp}) = \alpha_b(C) \cap \alpha_b(C^{\perp}) \\ &= \alpha_b(C) \cap \mathbb{F}_2^n \quad (\text{by Theorem 3}) \\ &= C_a \cap \mathbb{F}_2^n \\ &= C_a. \end{aligned} $$
Furthermore, since Hull($C$) is a linear $H$-code, then $Hull(C) = a \alpha_b(Hull(C)) \oplus b \alpha_a(Hull(C)) = aC_a + bHull(C_b)$. □

**Theorem 15.** For any $H$-code $C = aC_a \oplus bC_b$ of length $n$, we have

$$Hull(C^{\perp}) = a\mathbb{F}_2^n \oplus bHull(C_b).$$

**Proof.** By Theorem 3, we have $\alpha_a((C^{\perp})^{\perp}) = (\alpha_a(C^{\perp}))^{\perp} = ((\alpha_a(C))^{\perp})^{\perp} = (C_b^{\perp})^{\perp} = C_b$ and $\alpha_b((C^{\perp})^{\perp}) = \mathbb{F}_2^n$.

Using a similar procedure to the proof of Theorem 14, we obtain

$$\begin{aligned}
\alpha_a(Hull(C^{\perp})) &= \alpha_a(C^{\perp} \cap (C^{\perp})^{\perp}) \\
&= \alpha_a(C^{\perp}) \cap \alpha_a((C^{\perp})^{\perp}) \\
&= C_b^{\perp} \cap C_b \\
&= Hull(C_b).
\end{aligned}$$

Also,

$$\begin{aligned}
\alpha_b(Hull(C^{\perp})) &= \alpha_b(C^{\perp} \cap (C^{\perp})^{\perp}) \\
&= \alpha_b(C^{\perp}) \cap \alpha_b((C^{\perp})^{\perp}) \\
&= \mathbb{F}_2^n \cap \mathbb{F}_2^n \\
&= \mathbb{F}_2^n.
\end{aligned}$$

Therefore, $Hull(C^{\perp}) = a \alpha_b(Hull(C^{\perp})) \oplus b \alpha_a(Hull(C^{\perp})) = a\mathbb{F}_2^n \oplus bHull(C_b)$. Hence, the result is derived. □

The following example illustrates that the hull of an $H$-code and the hull of its dual are not generally equal.

**Example 4.** Let $C = aC_a \oplus bC_b$ be an $H$-code of length 3, where $C_a$ and $C_b$ are the binary codes generated by the following matrices, respectively.

$$G_a = \begin{pmatrix} 1 & 1 & 0 \end{pmatrix} \qquad G_b = \begin{pmatrix} 1 & 0 & 1 \\ 0 & 1 & 1 \end{pmatrix}$$

Therefore, $C$ can be written as $C = \{000, aa0, b0b, 0bb, bb0, cab, acb, cc0\}$ and by Theorem 3, we have $C^{\perp} = a\mathbb{F}_2^3 \cup \{bbb, cbb, bcb, bbc, ccb, cbc, ccc\}$, and $C^{\perp \perp} = a\mathbb{F}_2^3 \cup D$ where, $D = \{b0b, 0bb, bb0, bba, abb, bab, 0cc, c0c, cc0, cab, acb, cb0, bc0, bca, cba, cca, 0cb, 0bc, abc, acc, c0b, b0c, bac, cac\}$. Furthermore, $Hull(C) = \{000, aa0\}$ and $Hull(C^{\perp}) = a\mathbb{F}_2^3$. This proves that $Hull(C^{\perp}) \neq Hull(C)$.

**Theorem 16.** Let $C$ be an $H$-code of length $n$, then $Hull(C) \subseteq Hull(C^{\perp})$. Furthermore, equality holds if $C_a = \mathbb{F}_2^n$.

**Proof.** Since $C_a \subseteq \mathbb{F}_2^n$, then by Theorems 3 and 15, we have $Hull(C) \subseteq Hull(C^{\perp})$. Therefore, the equality holds if $C_a = \mathbb{F}_2^n$. □

Next, we investigate self-orthogonal, LCD, and self-dual codes over $H$ through their hull codes.

**Lemma 9.** For any linear $H$-code $C$ of length $n$, we have $C$ which is self-orthogonal over $H$ if and only if the code $C_b$ is self-orthogonal.
**Proof.** By definition and Theorem 14, $\mathcal{C}$ is self-orthogonal if and only if $Hull(\mathcal{C}) = \mathcal{C}$. This is equivalent to $\alpha_a(Hull(\mathcal{C})) = \alpha_a(\mathcal{C})$ and $\alpha_b(Hull(\mathcal{C})) = \alpha_b(\mathcal{C})$. Equivalently, $Hull(C_b) = C_b$. Hence, the proof is derived. □

**Lemma 10.** Let $\mathcal{C}$ be a linear code over $H$, then $\mathcal{C}$ is an LCD code if and only if $C_a = \{0\}$ and $Hull(C_b) = \{0\}$.

**Proof.** By definition and Theorems 14 and 15, we have $\mathcal{C}$ which is LCD if and only if $Hull(\mathcal{C}) = \{0\}$ if and only if $\alpha_a(Hull(\mathcal{C})) = \{0\}$ and $\alpha_b(Hull(\mathcal{C})) = \{0\}$. Equivalently, $C_a = \{0\}$ and $Hull(C_b) = \{0\}$. □

**Lemma 11.** An H-code $\mathcal{C}$ is self-dual if and only if $C_a = \mathbb{F}_2^n$ and $C_b$ is a binary self-dual code.

**Proof.** From the definition of self-dual codes over $H$, Theorems 3, 14 and 15, we have

$\mathcal{C}$ is self-dual if and only if $Hull(\mathcal{C}) = \mathcal{C}$ and $Hull(\mathcal{C}) = \mathcal{C}^{\perp}$ if and only if $\alpha_a(Hull(\mathcal{C})) = \alpha_a(\mathcal{C}) = \alpha_a(\mathcal{C}^{\perp})$ and $\alpha_b(Hull(\mathcal{C})) = \alpha_b(\mathcal{C}) = \alpha_b(\mathcal{C}^{\perp})$. Equivalently, $C_a = \mathbb{F}_2^n$ and $Hull(C_b) = C_b = C_b^{\perp}$. Hence, the proof is completed. □

Consider the map $\lambda_H$ from $H$ to $\mathbb{F}_4$, defined by

$$ \lambda_H(0) = 0, \lambda_H(a) = \omega, \lambda_H(b) = 1 \text{ and } \lambda_H(c) = \omega^2. $$

Thus, the map $\lambda_H$ can be extended naturally to a map from $H^n$ to $\mathbb{F}_4^n$, and to each H-code $\mathcal{C}$ of length $n$, there is an additive $\mathbb{F}_4$-code $\lambda_H(\mathcal{C})$.

It is noteworthy that Theorem 8 does not generalize to codes over $H$. A counterexample is given in the following.

**Example 5.** Let $\mathcal{C}$ be the linear code $\mathcal{C}$ of length 2 where $\mathcal{C} = a\mathcal{C}_a + b\mathcal{C}_b = \{00, a0, 0b, ab\}$ with $\mathcal{C}_a = \{00, 10\}$ and $\mathcal{C}_b = \{00, 10\}$. Therefore, by Theorem 14 $Hull(\mathcal{C}) = a\mathcal{C}_a + bHull(C_b) = \{00, a0\}$, so $\lambda_H(Hull(\mathcal{C})) = \{00, w0\}$. Thus, $Hull_T(\lambda_H(\mathcal{C})) = \{0001\}$. Obviously, $\lambda_H(Hull(\mathcal{C})) \neq Hull_T(\lambda_H(\mathcal{C}))$.

## 4. Classification of R-Codes with Various Hull Sizes

One of the fundamental topics in coding theory is the classification of linear codes. Alahmadi et al. [21] established mass formulas for self-orthogonal and self-dual codes over the non-unitary rings $E$ and $I$, and later classified quasi self-dual codes over $H$ in [19]. In [23], the authors presented the classification of LCD codes over a finite non-unitary local ring of prime square order.

In this section, we establish the general mass formula for linear codes over the non-unitary ring $I$ with various hull orders. Additionally, we provide a classification of linear codes over $E$ with given left and right hull sizes, and over $H$ with a given hull size, for short lengths. All computations were performed using MAGMA 1.21.1 [26].

An R-code $\mathcal{C}$ is permutation-equivalent to an R-code $\mathcal{D}$ if and only if there exists a coordinate permutation from $\mathcal{C}$ to $\mathcal{D}$.

The mass formula of number of binary $[n, k]$-codes with $k'$-dimensional hull is given in [14]. We recall it in the following theorem.

**Theorem 17** ([14], Theorem 2). Define $A_{n,k,k'}$ as the number of binary $[n, k]$-codes with $k'$-dimensional hull. Then,

$$ A_{n,k,k'} = \sum_{j=k'}^{k} \begin{bmatrix} n-2j \\ k-j \end{bmatrix}_2 \begin{bmatrix} j \\ k' \end{bmatrix}_2 (-1)^{j-k'} 2^{\binom{j-k'}{2}} \sigma_{n,k'}. $$
Where $\begin{bmatrix} i \\ j \end{bmatrix}_2$ is the 2-ary Gaussian binomial coefficient, $\binom{n}{m}$ is the usual binomial coefficient and $\sigma_{n,k'}$ is the number of binary self-orthogonal $[n,k']$-codes.

### 4.1. Classification over E

Suppose $\dim(\mathrm{Hull}(\mathrm{res}_E(C))) = t$ and $\dim(\mathrm{Hull}_{\mathrm{tor}_E(C)}(\mathrm{res}_E(C))) = s$. In this subsection we classify all permutation inequivalent non-trivial linear codes over the ring $E$ of length at most 4 and type $(k_1, k_2)$ with a left hull of size $2^{t+t'}$ where $t' = s + k_2$ and a right hull of size $2^{s+k_1+k_2}$. Therefore, we list them in Tables 1 and 2 for $t+t' \le 4$ and $s \in \{0, 1, 2\}$. The number of these codes is denoted by $\mathrm{Number}_E$.

**Example 6.** For $n = 4$, $\{k_1, k_2\} = \{1, 1\}$, $s = 0$, and $(t, t') = (1, 2)$.

There are exactly five inequivalent E-codes of type $\{1, 1\}$ with a right hull of size 4 generated by the following matrices:

$$ \left\{ \begin{bmatrix} a & 0 & 0 & 0 \\ c & 0 & 0 & 0 \\ 0 & c & 0 & 0 \end{bmatrix}, \begin{bmatrix} a & a & 0 & 0 \\ c & 0 & c & 0 \\ 0 & c & c & 0 \end{bmatrix}, \begin{bmatrix} a & a & a & 0 \\ c & 0 & c & 0 \\ 0 & c & 0 & 0 \end{bmatrix}, \begin{bmatrix} a & a & a & a \\ c & 0 & c & c \\ 0 & c & 0 & 0 \end{bmatrix}, \begin{bmatrix} a & a & 0 & 0 \\ c & 0 & 0 & 0 \\ 0 & c & 0 & 0 \end{bmatrix} \right\} $$

The first four codes have an automorphism group of order two, while the fifth code has an automorphism group of order four.

On the other hand, there are three inequivalent E-codes with a left hull of size 8 generated by the matrices below:

$$ \left\{ \begin{bmatrix} a & a & 0 & 0 \\ c & c & 0 & 0 \\ 0 & 0 & c & 0 \end{bmatrix}, \begin{bmatrix} a & a & 0 & 0 \\ c & c & 0 & 0 \\ 0 & 0 & c & c \end{bmatrix}, \begin{bmatrix} a & a & a & a \\ c & 0 & 0 & c \\ 0 & c & c & 0 \end{bmatrix} \right\} $$

Here, the first two codes have an automorphism group of order four, whereas the third E-code has an automorphism group of order eight.

<table><caption>**Table 1.** The number of inequivalent E-codes with a left hull of size $2^{t+t'}$.</caption><thead><tr><th>n</th><th>{k<sub>1</sub>, k<sub>2</sub>}</th><th>(t, t')</th><th>Number<sub>E</sub></th><th>Properties</th><th>n</th><th>{k<sub>1</sub>, k<sub>2</sub>}</th><th>(t, t')</th><th>Number<sub>E</sub></th><th>Properties</th></tr></thead><tbody><tr><td rowspan="5">2</td><td>{0, 1}</td><td>(0, 1)</td><td>2</td><td rowspan="5">left-LCD</td><td rowspan="5">4</td><td>{1, 1}</td><td>(1, 2)</td><td>3</td><td rowspan="5"></td></tr><tr><td>{0, 2}</td><td>(0, 2)</td><td>1</td><td>{1, 2}</td><td>(0, 2)</td><td>3</td></tr><tr><td>{1, 0}</td><td>(0, 0)</td><td>1</td><td></td><td>(1, 2)</td><td>3</td></tr><tr><td>(1, 1)</td><td></td><td>1</td><td></td><td>(1, 3)</td><td>2</td></tr><tr><td>{2, 0}</td><td>(0, 0)</td><td>1</td><td>left-LCD</td><td>{1, 3}</td><td>(0, 3)</td><td>2</td></tr><tr><td rowspan="10">3</td><td>{1, 0}</td><td>(0, 0)</td><td>1</td><td rowspan="10">left-LCD</td><td rowspan="10"></td><td></td><td>(1, 3)</td><td>2</td><td rowspan="10">left-LCD</td></tr><tr><td>(1, 1)</td><td></td><td>1</td><td></td><td>{2, 0}</td><td>(0, 0)</td><td>4</td></tr><tr><td>{1, 1}</td><td>(0, 1)</td><td>2</td><td></td><td></td><td>(1, 1)</td><td>1</td></tr><tr><td>(1, 1)</td><td></td><td>2</td><td></td><td></td><td>(2, 2)</td><td>1</td></tr><tr><td>(1, 2)</td><td></td><td>1</td><td></td><td></td><td>(0, 1)</td><td>5</td></tr><tr><td>{1, 2}</td><td>(0, 2)</td><td>2</td><td></td><td></td><td>(1, 1)</td><td>1</td></tr><tr><td>(1, 2)</td><td></td><td>2</td><td></td><td></td><td>(2, 2)</td><td>2</td></tr><tr><td>{2, 0}</td><td>(0, 0)</td><td>2</td><td rowspan="2">left-LCD</td><td>{2, 2}</td><td>(0, 2)</td><td>1</td></tr><tr><td>(1, 1)</td><td></td><td>1</td><td></td><td>(1, 2)</td><td>1</td></tr><tr><td></td><td></td><td></td><td></td><td></td><td>(2, 2)</td><td>1</td></tr><tr><td>{2, 1}</td><td>(0, 1)</td><td>2</td><td></td><td></td><td>{3, 0}</td><td>(0, 0)</td><td>2</td><td rowspan="2">left-LCD</td></tr><tr><td>(1, 1)</td><td></td><td>1</td><td></td><td></td><td></td><td>(1, 1)</td><td>2</td></tr><tr><td rowspan="2">4</td><td>{1, 0}</td><td>(0, 0)</td><td>2</td><td rowspan="2">left-LCD</td><td rowspan="2"></td><td>{3, 1}</td><td>(0, 1)</td><td>2</td><td rowspan="2"></td></tr><tr><td>{1, 1}</td><td>(1, 1)</td><td>3</td><td></td><td>(1, 1)</td><td>2</td></tr></tbody></table>
<table><caption>**Table 2.** The number of inequivalent E-codes with a right hull of size $2^{s+k_1+k_2}$.</caption><thead><tr><th>n</th><th>{k<sub>1</sub>, k<sub>2</sub>}</th><th>s</th><th>Number<sub>E</sub></th><th>Properties</th><th>n</th><th>{k<sub>1</sub>, k<sub>2</sub>}</th><th>s</th><th>Number<sub>E</sub></th><th>Properties</th></tr></thead><tbody><tr><td rowspan="6">2</td><td>{0,1}</td><td>0</td><td>2</td><td rowspan="6">right-SD</td><td rowspan="6">5</td><td>{0,1}</td><td>0</td><td>5</td><td rowspan="6">right-SD</td></tr><tr><td>{0,2}</td><td>0</td><td>1</td><td>{0,2}</td><td>0</td><td>10</td></tr><tr><td>{1,0}</td><td>0</td><td>2</td><td>{0,3}</td><td>0</td><td>10</td></tr><tr><td>{1,1}</td><td>0</td><td>2</td><td>{0,4}</td><td>0</td><td>5</td></tr><tr><td>{2,0}</td><td>0</td><td>1</td><td>{0,5}</td><td>0</td><td>1</td></tr><tr><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td rowspan="12">3</td><td>{0,1}</td><td>0</td><td>3</td><td rowspan="12">right-SD</td><td rowspan="12"></td><td>{1,0}</td><td>0</td><td>3</td><td rowspan="12">right-SD</td></tr><tr><td>{0,2}</td><td>0</td><td>3</td><td>{1,1}</td><td>1</td><td>2</td></tr><tr><td>{0,3}</td><td>0</td><td>1</td><td>{1,2}</td><td>0</td><td>7</td></tr><tr><td>{1,0}</td><td>0</td><td>2</td><td></td><td>1</td><td>4</td></tr><tr><td>{1,1}</td><td>0</td><td>4</td><td></td><td>0</td><td>11</td></tr><tr><td></td><td>1</td><td>1</td><td></td><td>1</td><td>4</td></tr><tr><td>{1,2}</td><td>0</td><td>3</td><td></td><td>{1,3}</td><td>0</td><td>12</td></tr><tr><td>{2,0}</td><td>0</td><td>2</td><td></td><td></td><td>1</td><td>2</td></tr><tr><td></td><td>1</td><td>1</td><td></td><td></td><td></td><td></td></tr><tr><td>{2,1}</td><td>0</td><td>3</td><td></td><td></td><td></td><td></td></tr><tr><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td rowspan="20">4</td><td>{0,1}</td><td>0</td><td>4</td><td rowspan="20">right-SD</td><td rowspan="20"></td><td>{2,0}</td><td>0</td><td>5</td><td rowspan="20">right-SD</td></tr><tr><td>{0,2}</td><td>0</td><td>6</td><td>{2,1}</td><td>1</td><td>4</td></tr><tr><td>{0,3}</td><td>0</td><td>4</td><td></td><td></td><td></td><td></td></tr><tr><td>{0,4}</td><td>0</td><td>1</td><td></td><td></td><td></td><td></td></tr><tr><td>{1,0}</td><td>0</td><td>2</td><td></td><td></td><td></td><td></td></tr><tr><td></td><td>1</td><td>2</td><td></td><td></td><td></td><td></td></tr><tr><td>{1,1}</td><td>0</td><td>5</td><td></td><td></td><td></td><td></td></tr><tr><td></td><td>1</td><td>3</td><td></td><td></td><td></td><td></td></tr><tr><td>{1,2}</td><td>0</td><td>7</td><td></td><td></td><td></td><td></td></tr><tr><td></td><td>1</td><td>3</td><td></td><td></td><td></td><td></td></tr><tr><td>{1,3}</td><td>0</td><td>4</td><td></td><td></td><td></td><td></td></tr><tr><td>{2,0}</td><td>0</td><td>4</td><td></td><td></td><td></td><td></td></tr><tr><td></td><td>1</td><td>1</td><td></td><td></td><td></td><td></td></tr><tr><td>{2,1}</td><td>0</td><td>6</td><td></td><td></td><td></td><td></td></tr><tr><td>{2,2}</td><td>0</td><td>5</td><td></td><td></td><td></td><td></td></tr><tr><td>{3,0}</td><td>0</td><td>2</td><td></td><td></td><td></td><td></td></tr><tr><td></td><td>1</td><td>2</td><td></td><td></td><td></td><td></td></tr><tr><td>{3,1}</td><td>0</td><td>4</td><td></td><td></td><td></td><td></td></tr></tbody></table>

## 4.2. Classification over I

This subsection derives a mass formula for linear codes over *I* of given type and length with prescribed hull size. In the following theorem, we determine the number of *I*-codes with hull codes of given sizes.

**Theorem 18.** Let $N_I^l(n, k_1, k_2)$ denote the number of distinct *I*-codes of length *n* and type $\{k_1, k_2\}$, with a hull of size $2^{l+k_1+k_2}$. Then, we have

$$N_I^l(n, k_1, k_2) = 2^{k_1(n-k_1-k_2)} \left[ \begin{array}{c} n-k_1 \\ k_2 \end{array} \right]_2 A_{n,k_1,l}.$$

**Proof.** For any *I*-code *C* of type $\{k_1, k_2\}$ and length *n*. Define a map $F : \text{res}_I(C) \to \mathbb{F}_2^n/\text{tor}_I(C)$ by: for each $\mathbf{x} \in \text{res}_I(C)$, $F(\mathbf{x}) = \{\mathbf{y} \in \mathbb{F}_2^n | \mathbf{x} + \mathbf{y} \in C\}$. Obviously, $C = \{\mathbf{x} + \mathbf{y} | \mathbf{x} \in \text{res}_I(C), \mathbf{y} \in F(\mathbf{x})\}$. Then,
There are $2^{k_1(n-k_1-k_2)}$ choices for the map $F$. The residue code is contained in $\begin{bmatrix} n-k_1 \\ k_2 \end{bmatrix}_2$ possible torsion codes. Proposition 5 implies that $|Hull(C)| = 2^{l+k_1+k_2}$. Therefore, by Theorem 17, there are $A_{n,k_1,l}$ residue codes with $l$-dimensional hull. Hence, the number of $l$-codes of length $n$ and type$\{k_1, k_2\}$ with a hull of cardinality $2^{l+k_1+k_2}$ is equal to the product of the previous three independent factors. $\square$

The corollary below follows from the counting technique under the group action and Theorem 18.

**Corollary 6.** For any given $n, k_1, k_2$ with $0 \le k_1, k_2 \le n$, we have

$$ \sum_{C} \frac{n!}{|Aut(C)|} = N_{l}^{l}(n, k_{1}, k_{2}). $$

where $Aut(C)$ is the automorphism group of $C$ and $C$ runs over distinct representatives of equivalence classes under a permutation action of $I$-codes of length $n$ and type$\{k_1, k_2\}$, with a hull of size $2^{l+k_1+k_2}$.

**Example 7.** Let $l = 2$ and $\mathfrak{F}$ be the set of inequivalent $I$-codes of length 4 and type$\{2, 1\}$ whose hull code has a size $2^5$. The generator matrices of these codes are given as follows:

$$ \left\{ \begin{bmatrix} a & 0 & a & b \\ 0 & a & 0 & a \\ 0 & 0 & b & 0 \end{bmatrix}, \begin{bmatrix} a & 0 & a & b \\ 0 & a & 0 & a \\ 0 & 0 & 0 & b \end{bmatrix}, \begin{bmatrix} a & 0 & a & b \\ 0 & a & 0 & a \\ 0 & 0 & b & b \end{bmatrix}, \begin{bmatrix} a & 0 & c & 0 \\ 0 & a & b & c \\ 0 & 0 & b & 0 \end{bmatrix}, \begin{bmatrix} a & 0 & c & 0 \\ 0 & a & b & c \\ 0 & 0 & 0 & b \end{bmatrix}, \begin{bmatrix} a & 0 & a & 0 \\ 0 & a & b & c \\ 0 & 0 & b & b \end{bmatrix}, \begin{bmatrix} a & 0 & a & b \\ 0 & a & 0 & c \\ 0 & 0 & b & b \end{bmatrix} \right\}. $$

The $I$-codes generated by the first five codes have an automorphism group of order four, while those generated by the last two have an automorphism group of order eight. Therefore,

$$ \sum_{C \in \mathfrak{F}} \frac{4!}{|Aut(C)|} = 5(\frac{24}{4}) + 2(\frac{24}{8}) = 36. $$

From Theorem 18, we have

$$ N_{l}^{2}(4, 2, 1) = 2^{2(4-2-1)} \times \begin{bmatrix} 4-2 \\ 1 \end{bmatrix}_{2} \times A_{4,2,2} = 4 \times 3 \times 3 = 36, $$

this shows that there are seven $I$-codes of length 4 and type$\{2, 1\}$, with a hull of size $2^5$, up to permutation equivalence.

Alahmadi et al. [21] determined the mass formulas for self-orthogonal codes over $I$. Next, we determine such number from the number of linear $I$-codes with prescribed hull size given in Theorem 18.

**Proposition 6.** The number of self-orthogonal $I$-codes of length $n$ and type$\{k_1, k_2\}$ is equal to

$$ 2^{k_1(n-k_1-k_2)} \begin{bmatrix} n-k_1 \\ k_2 \end{bmatrix}_2 \sigma_{n,k_1}. $$

**Proof.** By Lemma 6, an $I$-code is self-orthogonal if and only if its residue code is binary self-orthogonal. Thus, a binary self-orthogonal $[n, k_1]$-code is an $[n, k_1]$-code with
$k_1$-dimensional hull. By Theorem 17, $A_{n,k_1,k_1} = \sigma_{n,k_1}$. Hence, the desired result follows immediately from Theorem 18 by taking $l = k_1$. □

In Table 3, we classify all inequivalent non-zero $I$-codes with prescribed lengths and types, with a hull of size $2^{l+k_1+k_2}$ where $0 \le l \le 3$, under permutation equivalence. The number of such codes is denoted by $Number_I(l)$.

<table><caption>**Table 3.** The number of inequivalent $I$-codes with a hull of size $2^{l+k_1+k_2}$.</caption><thead><tr><th>n</th><th>{k<sub>1</sub>, k<sub>2</sub>}</th><th>Number<sub>I</sub>(0)</th><th>Properties</th><th>n</th><th>{k<sub>1</sub>, k<sub>2</sub>}</th><th>Number<sub>I</sub>(1)</th><th>Properties</th><th>n</th><th>{k<sub>1</sub>, k<sub>2</sub>}</th><th>Number<sub>I</sub>(2)</th><th>Properties</th></tr></thead><tbody><tr><td rowspan="6">2</td><td>{0,1}</td><td>2</td><td rowspan="6">SO [21]<br/>QSD [21]</td><td rowspan="3">2</td><td>{1,0}</td><td>2</td><td rowspan="3">QSD [21]<br/>SD [21]</td><td rowspan="3">4</td><td>{2,0}</td><td>10</td><td rowspan="3">SO [21]<br/>SO</td></tr><tr><td>{0,2}</td><td>1</td><td>{1,1}</td><td>1</td><td>{2,1}</td><td>7</td></tr><tr><td>{1,0}</td><td>2</td><td>{1,0}</td><td>4</td><td>{2,2}</td><td>1</td></tr><tr><td>{1,1}</td><td>1</td><td rowspan="2">SO [21]</td><td rowspan="2">3</td><td>{1,1}</td><td>6</td><td rowspan="2">QSD [21]<br/>SO [21]</td><td rowspan="2">5</td><td>{2,0}</td><td>36</td><td rowspan="2">SO [21]<br/>SO [21]</td></tr><tr><td>{2,0}</td><td>1</td><td>{1,2}</td><td>1</td><td>{2,1}</td><td>62</td></tr><tr><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td rowspan="12">3</td><td>{0,1}</td><td>3</td><td rowspan="12">SO [21]<br/>QSD [21]</td><td rowspan="4">4</td><td>{2,0}</td><td>4</td><td rowspan="4">SO [21]</td><td rowspan="4">6</td><td>{2,2}</td><td>17</td><td rowspan="4">SO [21]<br/>SO [21]</td></tr><tr><td>{0,2}</td><td>3</td><td>{2,1}</td><td>1</td><td>{2,3}</td><td>1</td></tr><tr><td>{0,3}</td><td>1</td><td rowspan="3">{1,0}</td><td rowspan="3">{2,0}</td><td rowspan="3">{3,0}</td><td rowspan="3">{3,1}</td><td rowspan="3">{3,2}</td><td rowspan="3">{2,0}</td><td rowspan="3">154</td><td rowspan="3">SO</td></tr><tr><td>{1,0}</td><td>5</td><td>{1,1}</td><td>23</td><td rowspan="3">SO [21]<br/>QSD [21]<br/>SO [21]</td><td rowspan="3">{2,1}</td><td rowspan="3">470</td><td rowspan="3">SO</td></tr><tr><td>{1,1}</td><td>6</td><td>{1,2}</td><td>14</td><td>{2,2}</td><td>317</td><td rowspan="3">QSD</td></tr><tr><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>{1,2}</td><td>2</td><td rowspan="4">SO [21]</td><td rowspan="4">{2,2}</td><td rowspan="4">{3,1}</td><td rowspan="4">{2,3}</td><td rowspan="4">{2,4}</td><td rowspan="4">{3,0}</td><td rowspan="4">{3,1}</td><td rowspan="4">{3,2}</td><td rowspan="4">{4,0}</td><td rowspan="4">154</td><td rowspan="4">SO</td></tr><tr><td>{2,0}</td><td>5</td><td>{1,3}</td><td>2</td><td rowspan="3">QSD [21]<br/>SO [21]</td><td rowspan="3">{2,2}</td><td rowspan="3">{2,3}</td><td rowspan="3">{4,1}</td><td rowspan="3">46</td><td rowspan="3">QSD</td></tr><tr><td>{2,1}</td><td>2</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>{3,0}</td><td>1</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td rowspan="12">4</td><td>{0,1}</td><td>4</td><td rowspan="12">SO [21]</td><td rowspan="4">{2,2}</td><td rowspan="4">{3,1}</td><td rowspan="4">{4,0}</td><td rowspan="4">{4,1}</td><td rowspan="4">{4,2}</td><td rowspan="4">{3,3}</td><td rowspan="4">{2,3}</td><td rowspan="4">{3,0}</td><td rowspan="4">{3,1}</td><td rowspan="4">{2,2}</td><td rowspan="4">{2,1}</td><td rowspan="4">{2,0}</td><td rowspan="4">{2,1}</td><td rowspan="4">{2,3}</td><td rowspan="4">{2,4}</td><td rowspan="4">3</td><td rowspan="4">SO</td></tr><tr><td>{0,2}</td><td>6</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>{0,3}</td><td>4</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>{0,4}</td><td>1</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>{1,0}</td><td>8</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>{1,1}</td><td>18</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>{1,2}</td><td>12</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>{1,3}</td><td>2</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>{2,0}</td><td>24</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>{2,1}</td><td>22</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>{2,2}</td><td>4</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>{3,0}</td><td>10</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>{3,1}</td><td>2</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>{4,0}</td><td>1</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr></tbody></table>

### 4.3. Classification over $H$

To classify linear $H$-codes of order $2^{k_a+k_b}$ with hull codes of size $2^{k_a+m}$, we have to find all codes that are permutation equivalent to $aC_a + bC_b$ for each pair $(C_a, C_b)$ (with $C_b$ which is a $m$-dimensional hull).

Here, we write SDR for System of Distinct Representatives, where its elements are representative of subsets (the double cosets) in a set (the group $S_n$) partition. By applying Theorem 6 in [19] and Theorem 14, we have the following corollary, its proof left as an exercise.

**Corollary 7.** Let $T_a$ be the set of all (permutation) inequivalent binary codes of length $n$ and $T_b^m$ be the set of all (permutation) inequivalent binary codes of length $n$ with $m$-dimensional hull. Then, the set of all $H$-codes of length $n$ and size $2^{k_a+k_b}$ with hull codes of order $2^{k_a+m}$ is the disjoint union

$$ \bigcup_{\substack{C_a \in T_a \\ C_b \in T_b^m}} A_{C_a, C_b}. $$

where $A_{C_a, C_b} := \{aC_a + b\sigma(C_b) \mid \sigma \text{ runs over an SDR of Aut}(C_a) \setminus S_n / \text{Aut}(C_b)\}$ and Aut$(C_a)$, Aut$(C_b)$ denote the permutation groups of $C_a$ and $C_b$, respectively.
Based on Lemma 10 and Corollary 7, we have the classification algorithm for H-codes of length n and size $2^{k_a+k_b}$ with hull codes of cardinality $2^{k_a+m}$ as follows:

* Find a list of all inequivalent binary $[n, k_a]$-codes and stored as $T_a$.

* Find a list of all inequivalent binary $[n, k_b]$-codes with m-dimensional hull and stored as $T_b^m$.

* For every pair $(C_a, C_b) \in T_a \times T_b^m$

* Compute the groups Aut($C_a$) and Aut($C_b$).

* Find a list $\sigma_1, \sigma_2, \dots, \sigma_r$ of representatives of Aut($C_a$)\$S_n/Aut(C_b)$.

* For $i = 1 \dots r$, compute $aC_a + b\sigma_i(C_b)$.

The number of codes in $T_a$ can be obtained from https://mathe2.uni-bayreuth.de/frib/codes/tables_6.html (20 December 2025) and the classification of codes in $T_b^0$ and $T_b^1$ are available in http://www.math.is.tohoku.ac.jp/~mharada/LCD2/ (25 December 2025) and https://ahu-coding.github.io/code3/ (10 December 2025), respectively.

**Example 8.** For $n = 3$, $k_a = 1$, $k_b = 2$ and $m = 1$, let $S$ be the set of H-codes of length $n$ having the following additive generator matrices:

$$S = \left\{ \begin{bmatrix} a & a & 0 \\ b & 0 & b \\ 0 & b & 0 \end{bmatrix}, \begin{bmatrix} a & a & 0 \\ b & 0 & 0 \\ 0 & b & b \end{bmatrix}, \begin{bmatrix} a & 0 & 0 \\ b & 0 & b \\ 0 & b & 0 \end{bmatrix}, \begin{bmatrix} a & 0 & 0 \\ b & b & 0 \\ 0 & 0 & b \end{bmatrix}, \begin{bmatrix} a & a & a \\ b & 0 & b \\ 0 & b & 0 \end{bmatrix} \right\}.$$

By Theorem 14, the hull of these codes have the following matrices, respectively:

$$\begin{bmatrix} a & a & 0 \\ b & 0 & b \end{bmatrix}, \begin{bmatrix} a & a & 0 \\ 0 & b & b \end{bmatrix}, \begin{bmatrix} a & 0 & 0 \\ b & 0 & b \end{bmatrix}, \begin{bmatrix} a & 0 & 0 \\ b & b & 0 \end{bmatrix}, \begin{bmatrix} a & a & a \\ b & 0 & b \end{bmatrix}.$$

These show that the hull of each H-code in $S$ has a size 4. Hence, there are exactly five inequivalent codes over H of length $n$ and size 8 with a hull of size 4.

The classification of non-zero inequivalent H-codes of order $2^{k_a+k_b}$ with a hull of size $2^{k_a+m}$, where $m \in \{0, 1\}$ is summarized in Table 4. The number of such codes is denoted by $\text{Number}_H(m)$.

<table><caption>**Table 4.** The number of inequivalent H-codes of size $2^{k_a+k_b}$ with a hull of size $2^{k_a+m}$.</caption><thead><tr><th>n</th><th>(k<sub>b</sub>, k<sub>b</sub>)</th><th>|T<sub>a</sub>|</th><th>|T<sub>b</sub><sup>0</sup>|</th><th>Number<sub>H</sub>(0)</th><th>Properties</th><th>n</th><th>(k<sub>b</sub>, k<sub>b</sub>)</th><th>|T<sub>a</sub>|</th><th>|T<sub>b</sub><sup>1</sup>|</th><th>Number<sub>H</sub>(1)</th><th>Properties</th></tr></thead><tbody><tr><td rowspan="10">2</td><td>(0,1)</td><td>1</td><td>1</td><td>1</td><td>LCD</td><td rowspan="3">2</td><td>(0,1)</td><td>1</td><td>1</td><td>1</td><td>SO</td></tr><tr><td>(0,2)</td><td>1</td><td>1</td><td>1</td><td>LCD</td><td>(1,1)</td><td>2</td><td>1</td><td>2</td><td>QSD [19]</td></tr><tr><td>(1,0)</td><td>2</td><td>1</td><td>2</td><td>SO</td><td>(2,1)</td><td>1</td><td>1</td><td>1</td><td>SD</td></tr><tr><td>(1,1)</td><td>2</td><td>1</td><td>3</td><td rowspan="5">QSD</td><td rowspan="5">3</td><td>(0,1)</td><td>1</td><td>1</td><td>1</td><td>SO</td></tr><tr><td>(1,2)</td><td>2</td><td>1</td><td>2</td><td>(0,2)</td><td>1</td><td>1</td><td>1</td><td></td></tr><tr><td>(2,0)</td><td>1</td><td>1</td><td>1</td><td>(1,1)</td><td>3</td><td>1</td><td>5</td><td>SO</td></tr><tr><td>(2,1)</td><td>1</td><td>1</td><td>1</td><td>(1,2)</td><td>3</td><td>1</td><td>5</td><td></td></tr><tr><td>(2,2)</td><td>1</td><td>1</td><td>1</td><td>(2,1)</td><td>3</td><td>1</td><td>5</td><td>QSD [19]</td></tr><tr><td rowspan="2">3</td><td>(0,1)</td><td>1</td><td>2</td><td>2</td><td>LCD</td><td rowspan="2">(2,2)</td><td>(2,2)</td><td>3</td><td>1</td><td>5</td><td></td></tr><tr><td>(0,2)</td><td>1</td><td>2</td><td>2</td><td>LCD</td><td>(3,1)</td><td>1</td><td>1</td><td>1</td><td>SO</td></tr></tbody></table>
<table><caption>Table 4. *Cont.*</caption><thead><tr><th>n</th><th>(k<sub>b</sub>, k<sub>b</sub>)</th><th>|T<sub>a</sub>|</th><th>|T<sub>b</sub><sup>0</sup>|</th><th>Number<sub>H</sub>(0)</th><th>Properties</th><th>n</th><th>(k<sub>b</sub>, k<sub>b</sub>)</th><th>|T<sub>a</sub>|</th><th>|T<sub>b</sub><sup>1</sup>|</th><th>Number<sub>H</sub>(1)</th><th>Properties</th></tr></thead><tbody><tr><td></td><td>(0,3)</td><td>1</td><td>1</td><td>1</td><td>LCD</td><td></td><td>(3,2)</td><td>1</td><td>1</td><td>1</td><td></td></tr><tr><td></td><td>(1,0)</td><td>3</td><td>1</td><td>3</td><td rowspan="3">SO</td><td rowspan="3">4</td><td>(0,1)</td><td>1</td><td>2</td><td>2</td><td rowspan="3">SO</td></tr><tr><td></td><td>(1,1)</td><td>3</td><td>2</td><td>8</td><td>(0,2)</td><td>1</td><td>1</td><td>1</td></tr><tr><td></td><td>(1,2)</td><td>3</td><td>2</td><td>8</td><td>(0,3)</td><td>1</td><td>2</td><td>2</td></tr><tr><td></td><td>(1,3)</td><td>3</td><td>1</td><td>3</td><td rowspan="3">SO</td><td>(1,1)</td><td>4</td><td>2</td><td>12</td><td rowspan="3">SO</td></tr><tr><td></td><td>(2,0)</td><td>3</td><td>1</td><td>3</td><td>(1,2)</td><td>4</td><td>1</td><td>11</td></tr><tr><td></td><td>(2,1)</td><td>3</td><td>2</td><td>8</td><td>(1,3)</td><td>4</td><td>2</td><td>12</td></tr><tr><td></td><td>(2,2)</td><td>3</td><td>2</td><td>8</td><td rowspan="3">SO</td><td>(2,1)</td><td>6</td><td>2</td><td>22</td><td rowspan="3">SO</td></tr><tr><td></td><td>(2,3)</td><td>3</td><td>1</td><td>3</td><td>(2,2)</td><td>6</td><td>1</td><td>23</td></tr><tr><td></td><td>(3,0)</td><td>1</td><td>1</td><td>1</td><td>(2,3)</td><td>6</td><td>2</td><td>22</td></tr><tr><td></td><td>(3,1)</td><td>1</td><td>2</td><td>2</td><td rowspan="3">SO</td><td>(3,1)</td><td>4</td><td>2</td><td>12</td><td rowspan="3">QSD [19]</td></tr><tr><td></td><td>(3,2)</td><td>1</td><td>2</td><td>2</td><td>(3,2)</td><td>4</td><td>1</td><td>11</td></tr><tr><td></td><td>(3,3)</td><td>1</td><td>1</td><td>1</td><td>(3,3)</td><td>4</td><td>2</td><td>12</td></tr><tr><td rowspan="10">4</td><td>(0,1)</td><td>1</td><td>2</td><td>2</td><td>LCD</td><td></td><td>(4,1)</td><td>1</td><td>2</td><td>2</td><td rowspan="3">SO</td></tr><tr><td>(0,2)</td><td>1</td><td>4</td><td>4</td><td>LCD</td><td></td><td>(4,2)</td><td>1</td><td>1</td><td>1</td></tr><tr><td>(0,3)</td><td>1</td><td>2</td><td>2</td><td>LCD</td><td></td><td>(4,3)</td><td>1</td><td>2</td><td>2</td></tr><tr><td>(0,4)</td><td>4</td><td>1</td><td>1</td><td rowspan="3">SO</td><td rowspan="3">5</td><td>(0,1)</td><td>1</td><td>2</td><td>2</td><td rowspan="3">SO</td></tr><tr><td>(1,0)</td><td>4</td><td>1</td><td>4</td><td>(0,2)</td><td>1</td><td>4</td><td>4</td></tr><tr><td>(1,1)</td><td>4</td><td>2</td><td>14</td><td>(0,3)</td><td>1</td><td>4</td><td>4</td></tr><tr><td>(1,2)</td><td>4</td><td>4</td><td>30</td><td rowspan="3">SO</td><td>(0,4)</td><td>1</td><td>2</td><td>2</td><td rowspan="3">SO</td></tr><tr><td>(1,3)</td><td>4</td><td>2</td><td>14</td><td>(1,1)</td><td>5</td><td>2</td><td>20</td></tr><tr><td>(1,4)</td><td>4</td><td>1</td><td>4</td><td>(1,2)</td><td>5</td><td>4</td><td>48</td></tr><tr><td>(2,0)</td><td>6</td><td>1</td><td>6</td><td rowspan="3">SO</td><td>(1,3)</td><td>5</td><td>4</td><td>48</td><td rowspan="3">SO</td></tr><tr><td>(2,1)</td><td>6</td><td>2</td><td>24</td><td>(1,4)</td><td>5</td><td>2</td><td>20</td></tr><tr><td>(2,2)</td><td>6</td><td>4</td><td>56</td><td>(2,1)</td><td>10</td><td>2</td><td>57</td></tr><tr><td>(2,3)</td><td>6</td><td>2</td><td>24</td><td rowspan="3">SO</td><td>(2,2)</td><td>10</td><td>2</td><td>160</td><td rowspan="3">SO</td></tr><tr><td>(2,4)</td><td>6</td><td>1</td><td>6</td><td>(2,3)</td><td>10</td><td>4</td><td>160</td></tr><tr><td>(3,0)</td><td>4</td><td>1</td><td>4</td><td>(2,4)</td><td>10</td><td>2</td><td>57</td></tr><tr><td>(3,1)</td><td>4</td><td>2</td><td>14</td><td rowspan="3">SO</td><td>(3,1)</td><td>10</td><td>2</td><td>57</td><td rowspan="3">SO</td></tr><tr><td>(3,2)</td><td>4</td><td>4</td><td>30</td><td>(3,2)</td><td>10</td><td>4</td><td>160</td></tr><tr><td>(3,3)</td><td>4</td><td>2</td><td>14</td><td>(3,3)</td><td>10</td><td>4</td><td>160</td></tr><tr><td>(3,4)</td><td>4</td><td>1</td><td>4</td><td rowspan="3">SO</td><td>(3,4)</td><td>10</td><td>2</td><td>57</td><td rowspan="3">QSD [19]</td></tr><tr><td>(4,0)</td><td>1</td><td>1</td><td>1</td><td>(4,1)</td><td>5</td><td>2</td><td>20</td></tr><tr><td>(4,1)</td><td>1</td><td>2</td><td>2</td><td>(4,2)</td><td>5</td><td>4</td><td>48</td></tr><tr><td>(4,2)</td><td>1</td><td>4</td><td>4</td><td rowspan="3">SO</td><td>(4,3)</td><td>5</td><td>4</td><td>48</td><td rowspan="3">SO</td></tr><tr><td>(4,3)</td><td>1</td><td>2</td><td>2</td><td>(4,4)</td><td>5</td><td>2</td><td>20</td></tr><tr><td>(4,4)</td><td>1</td><td>1</td><td>1</td><td>(5,1)</td><td>1</td><td>2</td><td>2</td></tr><tr><td></td><td></td><td></td><td></td><td></td><td></td><td>(5,2)</td><td>1</td><td>4</td><td>4</td><td rowspan="3">SO</td></tr><tr><td></td><td></td><td></td><td></td><td></td><td></td><td>(5,3)</td><td>1</td><td>4</td><td>4</td></tr><tr><td></td><td></td><td></td><td></td><td></td><td></td><td>(5,4)</td><td>1</td><td>2</td><td>2</td></tr></tbody></table>

## 5. Conclusions

In this manuscript, we studied the hulls of linear codes over $\mathbb{R}$. We characterized these hulls in terms of their associated binary codes. Moreover, we established the hull of the dual codes over $\mathbb{R}$. Also, we investigated both the left and right hulls of $\mathcal{E}$-codes and determined their residue and torsion codes. Furthermore, we derived a mass formula of linear $\mathcal{I}$-code with prescribed hull order. Thus, we classified linear codes with various hull sizes over the considered rings for short lengths under permutation equivalence. In future work, we plan to investigate the symplectic hull over these rings (see ref. [27]).) and extend the present study to other non-unitary rings appearing in Fine's classification [28].
**Author Contributions:** Conceptualization, S.M.; methodology, S.A., P.S.; Software, S.M.; validation, S.M., P.S., A.A. and A.M.; investigation, S.M. and P.S.; resources, S.M., P.S. and A.A.; data curation, S.M.; writing—original draft preparation, S.M. writing—review and editing, S.M. and P.S.; visualization, S.M., P.S., A.A. and A.M.; supervision, P.S. and A.A.; funding acquisition, A.A. All authors have read and agreed to the published version of the manuscript.

**Funding:** Funded by the Deanship of Scientific Research (DSR), King Abdulaziz University, Jeddah, Saudi Arabia under grant no. (KEP-Msc-10-130-41).

**Acknowledgments:** This project was funded by the Deanship of Scientific Research (DSR), King Abdulaziz University, Jeddah, Saudi Arabia under grant no. (KEP-Msc-10-130-41). The authors, therefore, acknowledge with thanks DSR technical and financial support.

**Data Availability Statement:** The original contributions presented in this study are included in the article. Further inquiries can be directed to the corresponding author.

**Conflicts of Interest:** The authors declare no conflicts of interest.

## References

1. Assmus, E.F., Jr.; Key, J.D. Affine and projective planes. *Discret. Math.* **1990**, *83*, 161–187.

2. Leon, J.S. Permutation group algorithms based on partitions, I: Theory and algorithms. *J. Symb. Comput.* **1991**, *12*, 533–583.

3. Sendrier, N. Finding the permutation between equivalent linear codes: The support splitting algorithm. *IEEE Trans. Inf. Theory* **2000**, *46*, 1193–1203.

4. Bowen, G. Entanglement required in achieving entanglement-assisted channel capacities. *Phys. Rev. A.* **2002**, *66*, 052313-1-052313-8.

5. Brun, T.; Devetak, I.; Hsieh, M. H. Correcting quantum errors with entanglement. *Science* **2006**, *314*, 436–439.

6. Guenda, K.; Jitman, S.; Gulliver, T.A. Constructions of good entanglement-assisted quantum error correcting codes. *Des. Codes Cryptogr.* **2018**, *86*, 121–136.

7. Calderbank, A.R.; Rains, E.M.; Shor, P.; Sloane, N.J. Quantum error correction via codes over GF(4). *IEEE Trans. Inf. Theory* **1998**, *44*, 1369–1387.

8. Ketkar, A.; Klappenecker, A.; Kumar, S; Sarvepalli, P.K; Nonbinary stabilizer codes over finite fields. *IEEE Trans. Inf. Theory* **2006**, *52*, 4892–4914

9. Li, Y.; Zhu, S.; Martánez-Moro, E. The hull of two classical propagation rules and their applications. *IEEE Trans. Inf. Theory* **2023**, *69*, 6500–6511.

10. Pless, V. A classification of self-orthogonal codes over GF(2). *Discret. Math.* **1972**, *3*, 209–246.

11. Bouyukliev, I.; Bouyuklieva, S.; Gulliver, T.A.; Ostergard, P.R.J. Classification of optimal binary self-orthogonal codes. *J. Combinat. Math. Combinat. Comput.* **2006**, *59*, 33.

12. Araya, M.; Harada, M. On the classification of linear complementary dual codes. *Discret. Math.* **2019**, *342*, 270–278.

13. Carlet, C.; Mesnager, S.; Tang, C.; Qi, Y. New characterization and parametrization of LCD codes. *IEEE Trans. Inf. Theory* **2019**, *65*, 39–49.

14. Sendrier, N. On the dimension of the hull. *SIAM J. Discrete Math.* **1997**, *10*, 282–293.

15. Li, S.; Shi, M. Characterization and classification of binary linear codes with various hull dimensions from an improved mass formula. *IEEE Trans. Inf. Theory* **2023**, *70*, 3357–3372.

16. Dougherty, S.T.; Saltürk, E. The number of codes over rings of order 4 containing a hull of given type. *Adv. Math. Commun.* **2025**, *19*, 11–35.

17. Alahmadi, A.; Altassan, A.; Basaffar, W.; Bonnecaze, A.; Shoaib, H.; Solé, P. Quasi type IV codes over a non-unital ring. *Appl. Algebra Eng. Commun. Comput.* **2021**, *32*, 217–228.

18. Kim, J.L.; Roe, Y.G. Construction of quasi-self-dual codes over a commutative non-unital ring of order 4. *Appl. Algebra Engrg. Comm. Comput.* **2022**, *353*, 393–406.

19. Alahmadi, A.; Alkathiry, A.; Altassan, A.; Basaffar, W.; Bonnecaze, A.; Shoaib, H.; Solé, P. Type IV codes over a non-local non-unital ring. *Proyecciones* **2020**, *39*, 963–78.

20. Deb, S.; Kikani, I.; Gupta, M.K. On the classification of codes over non-unital ring of order 4. *Discret. Math. Algorithms Appl.* **2022**, *16*, 2350076.

21. Alahmadi, A.; Alshuhail, A.; Betty, R.A Galvez, L. and Solé, P. Mass formula for self-orthogonal and self-dual codes over non-unital rings of order four. *Mathematics* **2023**, *11*, 4736.

22. Shi, M.; Li, S.; Kim, J. L.; Solé, P. LCD and ACD codes over a noncommutative non-unital ring with four elements. *Cryptogr. Commun.* **2022**, *14*, 627–640.
23. Kushwaha, A.; Debnath, I.; Prakash, O. Classification of LCD and self-dual codes over a finite non-unital local ring. *arXiv* **2025**, arXiv:2501.03016.

24. Anderson, S.E.; Camps-Moreno, E.; López, H.H.; Matthews, G.L.; Ruano, D; Soprunov, I. Relative hulls and quantum codes. *IEEE Trans. Inf. Theory* **2024**, *70*, 3190–3201.

25. Alahmadi, A.; Melaibari, A; Solé, P. Duality of codes over non-unital rings of order four. *IEEE Access* **2023**, *11*, 53120–53133.

26. Bosma, W.; Cannon, J.; Playoust, C. The magma algebra system I: The user language. *J. Symb. Comput.* **1997**, *24*, 235–265.

27. Li, Y.; Zhu, S. On symplectic hulls of linear codes and related applications. *J. Appl. Math. Comput.* **2024**, *70*, 2603–2622.

28. Fine, B. Classification of finite rings of order $p^2$. *Math. Mag.* **1993**, *66*, 248–252.

**Disclaimer/Publisher's Note:** The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.