# Symplectic QSD, LCD, and ACD Codes over a Non-Commutative Non-Unitary Ring of Order Nine

Sarra Manseri, Patrick Solé, Adel Alahmadi, Widyan Basaffar

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

To cite this version:

Sarra Manseri, Patrick Solé, Adel Alahmadi, Widyan Basaffar. Symplectic QSD, LCD, and ACD Codes over a Non-Commutative Non-Unitary Ring of Order Nine. Entropy, 2025, 27 (9), 10.3390/e27090973. [https://arxiv.org/abs/2009.09731](https://arxiv.org/abs/2009.09731)

HAL Id: hal-05267441

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

Submitted on 18 Sep 2025

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_2.png" /></figure>

Distributed under a Creative Commons Attribution 4.0 International License
Article

# Symplectic QSD, LCD, and ACD Codes over a Non-Commutative Non-Unitary Ring of Order Nine

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

## Abstract

We introduce quasi self-dual (QSD), linear complementary dual (LCD), and additive complementary dual (ACD) codes for the symplectic inner product over a non-commutative non-unitary ring of order 9. We establish connections with symplectic-self-orthogonal and LCD ternary codes. We characterize right-symplectic ACD codes.

**Keywords:** ternary codes; non-unitary ring; symplectic QSD codes; LCD codes; ACD codes

**MSC:** 94B05; 13H99

## 1. Introduction

Codes over non-unitary rings have received significant attention in the last five years [1,2] especially in the context of duality [3–6]. The notion of quasi self-dual codes (QSD) plays here the role of self-dual codes over unitary rings and finite fields.

Recently, Alahmadi et al. [7] derived a mass formula for self-orthogonal, QSD and self-dual codes of non-unitary rings of four elements. Later, this research was extended to non-unitary rings of the size of the square of an odd prime [5,6]. Furthermore, in [3], the concept of linear complementary dual (LCD) codes was characterized over a non-unitary ring of order four. Additive complementary dual (ACD) codes were introduced in [4]. Kushwaha et al. [8] pushed further, with a study in the characteristic three. These studies were conducted using the Euclidean inner product.

More recently, in a series of papers [9–11], we introduced and characterized self-orthogonal and QSD codes over non-unitary rings of the order of four under the symplectic inner product. Later, we classified all distinct symplectic-self-orthogonal and QSD codes over commutative non-unitary rings with four elements [9,11]. Additionally, [10] introduced symplectic LCD and ACD codes over a non-commutative non-unitary ring of size four, in which the authors focused on the study of symplectic left ACD and LCD codes. This motivated us to extend the study of left- and right-symplectic LCD and ACD codes to the non-commutative non-unitary ring of order nine. Therefore, in the present manuscript, we consider the case of a ring of order 9 and *E* in the notation of Fine [12]. By forgetting the module structure, our codes can be considered as additive codes over $F_9$, a viewpoint that allows us, for numerical examples, to use the additive codes Magma package [13]. Moreover, we introduce QSD, right (respectively, left) ACD, nice, and LCD codes for the symplectic inner product over that ring, here denoted by $E_3$. We establish connections with ternary symplectic-self-orthogonal

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

### check for updates

Academic Editor: Lu Wei

Received: 20 August 2025

Revised: 14 September 2025

Accepted: 17 September 2025

Published: 18 September 2025

**Citation:** Manseri, S.; Solé, P.; Alahmadi, A.; Basaffar, W. Symplectic QSD, LCD, and ACD Codes over a Non-Commutative Non-Unitary Ring of Order Nine. *Entropy* **2025**, *27*, 973. https://doi.org/10.3390/e27090973

**Copyright:** © 2025 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">¹ Department of Mathematics, Central China Normal University, Wuhan 430079, China; sarramanseri@gmail.com</footnote>

<footnote n="2">² I2M, (CNRS, University of Aix-Marseille, Centrale Marseille), 13009 Marseilles, France</footnote>

<footnote n="3">³ Research Group of Algebraic Structures and Applications, Mathematics Department, King Abdulaziz University, Jeddah 22254, Saudi Arabia; whbasaffar@kau.edu.sa</footnote>

<footnote>* Correspondence: sole@enst.fr (P.S.); analahmadi@kau.edu.sa (A.A.)</footnote>
and symplectic LCD codes. In particular, we use a multilevel construction from ternary symplectic-self-orthogonal codes to construct symplectic QSD codes. We investigate the right-symplectic LCD codes. Furthermore, we characterize free right-symplectic LCD codes over $\mathbb{F}_3$ in terms of a ternary generator matrix. Since non-trivial left-symplectic ACD codes do not exist, we introduce the concept of a right-symplectic ACD code over $\mathbb{F}_3$. Additionally, we establish several results for the existence of these codes.

This manuscript is organized as follows: The basic notions and notations used in the remainder of this paper are presented in the next section. Section 3 studies the symplectic QSD and LCD codes over $\mathbb{F}_3$. Section 4 treats right-symplectic ACD $\mathbb{F}_3$ codes. Section 5 provides the conclusion.

## 2. Preliminaries

### 2.1. Ternary Linear Codes

A linear code C having a dimension, $k$, and length, $n$, over the ternary field $\mathbb{F}_3$ is an $\mathbb{F}_3$ subspace of $\mathbb{F}_3^n$ of the $k$ dimension. Briefly, we say C is an $[n, k]$-code and its elements are known by codewords.

Denote the vector $(\mathbf{x}_1|\mathbf{x}_2)$ as the juxtaposition of two vectors, $\mathbf{x}_1, \mathbf{x}_2 \in \mathbb{F}_3^{2n}$. Let $\mathbf{x} = (\mathbf{x}_1|\mathbf{x}_2)$ and $\mathbf{y} = (\mathbf{y}_1|\mathbf{y}_2)$, where $\mathbf{x}_1 = (x_1, x_2, \dots, x_n)$, $\mathbf{x}_2 = (x_{n+1}, x_{n+2}, \dots, x_{2n}) \in \mathbb{F}_3^{2n}$, $\mathbf{y}_1 = (y_1, y_2, \dots, y_n)$, $\mathbf{y}_2 = (y_{n+1}, y_{n+2}, \dots, y_{2n}) \in \mathbb{F}_3^{2n}$ are the vectors of $\mathbb{F}_3^{2n}$.

The Euclidean and symplectic inner products of $\mathbf{x}$ and $\mathbf{y}$ are, respectively, defined by

$$ (\mathbf{x}, \mathbf{y})_e = \sum_{i=1}^{2n} x_i y_i \quad \text{and} \quad (\mathbf{x}, \mathbf{y})_s = (\mathbf{x}, \mathbf{y}\Omega_n^T)_e = (\mathbf{x}_1, \mathbf{y}_2)_e - (\mathbf{x}_2, \mathbf{y}_1)_e = \sum_{i=1}^{n} (x_i y_{n+i} - x_{n+i} y_i), $$

$$ \text{where } \Omega_n = \begin{bmatrix} 0_n & I_n \\ -I_n & 0_n \end{bmatrix} \text{ with } 0_n \text{ is the } n \times n \text{ zero matrix and } I_n \text{ is the identity matrix.} $$

Two vectors $\mathbf{x}$ and $\mathbf{y}$ are symplectic-orthonals if they satisfy $(\mathbf{x}, \mathbf{y})_s = 0$. Moreover, the vector space consists of all vectors of $\mathbb{F}_3^{2n}$ that are symplectic-orthogonal to each codeword in C, which is known by the symplectic dual of C, denoted by $C^{\perp s}$.

The code C is said to be **symplectic-self-orthogonal** (resp. **symplectic self-dual**) if $C \subseteq C^{\perp s}$ (resp. $C = C^{\perp s}$).

### 2.2. Non-Commutative Non-Unitary Ring of Nine Elements

Define the ring $\mathbb{F}_3$ on two generators, $a$ and $b$, under certain relations, such as:

$$ \mathbb{F}_3 = \langle a, b | \begin{array}{l} 3a = 3b = 0, ab = a, ba = b, a^2 = a, b^2 = b \end{array} \rangle. $$

Assume that $c = a + 2b$. According to [8], the ring $\mathbb{F}_3$ has characteristic 3 and 9 elements, given by

$$ \mathbb{F}_3 = \langle 0, a, b, c, 2a, 2b, 2c, a + b, a + c \rangle. $$

It is easy to derive the addition table of $\mathbb{F}_3$ and its multiplication table is in Table 1.

<table><caption>**Table 1.** Multiplication table for $\mathbb{F}_3$.</caption><thead><tr><th>×</th><th>0</th><th>a</th><th>b</th><th>c</th><th>2a</th><th>2b</th><th>2c</th><th>a + b</th><th>a + c</th></tr></thead><tbody><tr><th>0</th><td>0</td><td>0</td><td>0</td><td>0</td><td>0</td><td>0</td><td>0</td><td>0</td><td>0</td></tr><tr><th>a</th><td>0</td><td>a</td><td>b</td><td>c</td><td>2a</td><td>2b</td><td>2c</td><td>a + b</td><td>a + c</td></tr><tr><th>b</th><td>0</td><td>a</td><td>b</td><td>c</td><td>2a</td><td>2b</td><td>2c</td><td>a + b</td><td>a + c</td></tr><tr><th>c</th><td>0</td><td>0</td><td>0</td><td>0</td><td>0</td><td>0</td><td>0</td><td>0</td><td>0</td></tr><tr><th>2a</th><td>0</td><td>2a</td><td>2b</td><td>2c</td><td>a</td><td>b</td><td>c</td><td>a + c</td><td>a + b</td></tr><tr><th>2b</th><td>0</td><td>2a</td><td>2b</td><td>2c</td><td>a</td><td>b</td><td>c</td><td>a + c</td><td>a + b</td></tr><tr><th>2c</th><td>0</td><td>0</td><td>0</td><td>0</td><td>0</td><td>0</td><td>0</td><td>0</td><td>0</td></tr><tr><th>a + b</th><td>0</td><td>2a</td><td>2b</td><td>2c</td><td>a</td><td>b</td><td>c</td><td>a + c</td><td>a + b</td></tr><tr><th>a + c</th><td>0</td><td>a</td><td>b</td><td>c</td><td>2a</td><td>2b</td><td>2c</td><td>a + b</td><td>a + c</td></tr></tbody></table>
Thus, $E_3$ is a non-commutative ring without identity element with respect to the given multiplication and has a unique maximal ideal $\mathcal{J} = \{0, c, 2c\}$. So, the ring $E_3$ is local having a residue class field $E_3/\mathcal{J} \cong \mathbb{F}_3$.

Every element, $r \in E_3$, has a c-adic decomposition, expressed as $r = au + cv$, for unique scalars $u, v$ of $\mathbb{F}_3$. Furthermore, $ax = x, bx = x$, and $cx = 0$ for all $x \in E_3$.

Define a natural action of $\mathbb{F}_3$ on the ring $E_3$ as

$$r0 = 0r = 0, r1 = 1r = r, \text{ and } r2 = 2r = 2r.$$

This action is clearly distributive in the sense that, for any $r \in E_3$ and $u, v \in \mathbb{F}_3$, we have $r(u \oplus v) = ru + rv$, where $\oplus$ is denoted in the addition in $\mathbb{F}_3$.

The symplectic inner product of the two elements $u \in \mathbb{F}_3^{2n}$ and $r \in E_3^{2n}$, denoted by $(u, r)_s$ is defined as

$$(u, r)_s = \sum_{i=1}^{n} (u_i r_{n+i} - u_{n+i} r_i).$$

We define the reduction map modulo $\mathcal{J}$ as: $\alpha_{E_3} : E_3 \to E_3/\mathcal{J} \cong \mathbb{F}_3$ by

$$\begin{aligned}
\alpha_{E_3}(0) &= \alpha_{E_3}(c) = \alpha_{E_3}(2c) = 0, \\
\alpha_{E_3}(a) &= \alpha_{E_3}(b) = \alpha_{E_3}(a + c) = 1, \\
\alpha_{E_3}(2a) &= \alpha_{E_3}(2b) = \alpha_{E_3}(a + b) = 2.
\end{aligned}$$

This map can be extended naturally to a map from $E_3^n$ to $\mathbb{F}_3^n$.

## 2.3. Linear $E_3$ Codes

A linear code $C$ over $E_3$ or a linear $E_3$-code of length $n$ is a right $E_3$ submodule of $E_3^n$. A linear $E_3$-code $C$ is free if it is free as a right $E_3$-module.

An additive code over $E_3$ or an additive $E_3$-code of length $n$ is an additive subgroup of $E_3^n$.

For any linear code $C$ over $E_3$, there are the two ternary codes of length $n$ associated with $C$.

The residue code of $C$ is defined as

$$\mathrm{res}(C) = \{\alpha_{E_3}(\mathbf{r}) | \mathbf{r} \in C\}.$$

The torsion code of $C$ is

$$\mathrm{tor}(C) = \{\mathbf{u} \in \mathbb{F}_3^n | \mathbf{u} \in C\}.$$

From [2], we have $\mathrm{res}(C) \subseteq \mathrm{tor}(C)$. We denote $k_1$ as the dimension of $\mathrm{res}(C)$, and $k_1 + k_2$ as the dimension of $\mathrm{tor}(C)$. We say that a linear $E_3$ code, $C$, is of type $\{k_1, k_2\}$ and $|C| = |\mathrm{res}(C)| |\mathrm{tor}(C)| = 3^{2k_1+k_2}$. From [8], $C$ is free if, and only if, $k_2 = 0$.

The symplectic inner product between two codewords, $\mathbf{x} = (x_1, x_2, \dots, x_{2n})$, $\mathbf{y} = (y_1, y_2, \dots, y_{2n}) \in C$, is defined as

$$(\mathbf{x}, \mathbf{y})_s = \sum_{i=1}^{n} (x_i y_{n+i} - x_{n+i} y_i).$$

Under this symplectic inner product, the duals of an $E_3$ code, $C$, are defined as:

(1). The left-symplectic dual is defined as

$$C^{\perp L_s} = \{\mathbf{y} \in E_3^{2n} | (\mathbf{y}, \mathbf{x})_s = 0, \forall \mathbf{x} \in C\}.$$
(2). The right-symplectic dual of C is defined by

$$C^{\perp R_s} = \{ \mathbf{y} \in E_3^{2n} \mid (\mathbf{x}, \mathbf{y})_s = 0, \forall \mathbf{x} \in C \}.$$

An $E_3$ code C, is called **left-symplectic self-dual** if $C^{\perp L_s} = C$. Likewise, C is called **right-symplectic self-dual** if $C^{\perp R_s} = C$. Then, we set $C^{\perp s} = C^{\perp L_s} \cap C^{\perp R_s}$.

If any two codewords, $\mathbf{x}, \mathbf{y} \in C$, satisfy $(\mathbf{x}, \mathbf{y})_s = 0$, the code, C, is called a symplectic-self-orthogonal code. It is evident that C is symplectic-self-orthogonal if $C \subseteq C^{\perp s}$.

A linear code, C, of length $2n$ is called left-symplectic-nice (resp. right-symplectic-nice) if it verifies $|C||C^{\perp L_s}| = 9^{2n}$ (respectively, if $|C||C^{\perp R_s}| = 9^{2n}$).

**Remark 1.** In general, the relation "$|C||C^{\perp R_s}| = 9^{2n}$" does not hold. For example, let C be an additive $E_3$ code of length 4 with (additive) generator matrix, G, where

$$G = \begin{bmatrix} a & 2b & 0 & 0 \\ 0 & 0 & a & 2b \end{bmatrix}$$

Let $(y_1, y_2, y_3, y_4)$ be an arbitrary vector of $C^{\perp R_s}$, then

$$((a, 2b, 0, 0), (y_1, y_2, y_3, y_4))_s = 0 \text{ and } ((0, 0, a, 2b), (y_1, y_2, y_3, y_4))_s = 0.$$

These imply that, $ay_3 + 2by_4 = 0$ and $2ay_1 + by_2 = 0$. Since $ax = x$ and $bx = x$ for any $x \in E_3$, $y_3 + 2y_4 = 0$ and $2y_2 + y_1 = 0$. So, $y_4 = y_3$ and $y_2 = y_1$. Hence, $C^{\perp R_s} = \{(y_1, y_1, y_3, y_3) | y_1, y_3 \in E_3\}$.

It is easy to derive, $|C| = 9$ and $|C^{\perp R_s}| = 9^2$. Thus, $|C||C^{\perp R_s}| = 9^3 < 9^4$.

### 3. Symplectic QSD and LCD $E_3$ Codes

In this section, first we define the notion symplectic QSD codes over the ring $E_3$ and then prove their multilevel construction from ternary linear codes. Further, we investigate the symplectic LCD codes and characterize free symplectic LCD code over $E_3$ in term of ternary generator matrix.

A symplectic-self-orthogonal $E_3$ code with length $2n$ and $9^n$ elements is called symplectic quasi self-dual (**symplectic QSD**).

In the following result, we establish a necessary and sufficient condition for a linear $E_3$ code to be self-orthogonal under the symplectic inner product.

**Lemma 1.** A linear $E_3$ code C is symplectic-self-orthogonal if $\mathrm{res}(C) \subseteq \mathrm{tor}(C)^{\perp s}$.

**Proof.** Suppose C is symplectic-self-orthogonal. Let $\mathbf{x}$ be an arbitrary codeword of $\mathrm{res}(C)$, then there exists $\mathbf{x}a + \mathbf{y}c \in C$, such that $\alpha_{E_3}(\mathbf{x}a + \mathbf{y}c) = \mathbf{x}$. By definition, for any element $\mathbf{z} \in \mathrm{tor}(C)$, $\mathbf{z}c \in C$. From the symplectic-self-orthogonality of C, we have $(\mathbf{x}a + \mathbf{y}c, \mathbf{z}c)_s = (\mathbf{x}, \mathbf{z})_s c = 0$. This implies $(\mathbf{x}, \mathbf{z})_s = 0$. This means $\mathbf{z} \in \mathrm{res}(C)^{\perp s}$. Hence, $\mathrm{tor}(C) \subseteq \mathrm{res}(C)^{\perp s}$. So, $\mathrm{res}(C) \subseteq \mathrm{tor}(C)^{\perp s}$.

For the inverse assertion. Let $\mathbf{c}, \mathbf{c}' \in C$. By Theorem 3.5 in [8], there exist $\mathbf{x}, \mathbf{x}' \in \mathrm{res}(C)$ and $\mathbf{y}, \mathbf{y}' \in \mathrm{tor}(C)$ such that $\mathbf{c} = \mathbf{x}a + \mathbf{y}c$ and $\mathbf{c}' = \mathbf{x}'a + \mathbf{y}'c$. For an arbitrary linear code, C, over $E_3$. Using a procedure similar to that given in [10], obtain $\mathrm{tor}(C)^{\perp s} \subseteq \mathrm{res}(C)^{\perp s}$ as $\mathrm{res}(C) \subseteq \mathrm{tor}(C)$. Moreover, $\mathrm{res}(C) \subseteq \mathrm{tor}(C)^{\perp s} \subseteq \mathrm{res}(C)^{\perp s}$. This yields

$$(\mathbf{c}, \mathbf{c}')_s = (\mathbf{x}a + \mathbf{y}c, \mathbf{x}'a + \mathbf{y}'c)_s = (\mathbf{x}, \mathbf{x}')_s a + (\mathbf{x}, \mathbf{y}')_s c = 0.$$

Hence, C is symplectic-self-orthogonal over $E_3$. □
Next, we state the multilevel construction of symplectic QSD $E_3$ codes over from ternary linear codes.

**Theorem 1.** Let B be a ternary linear code of length $2n$. If B is a symplectic-self-orthogonal code, then the $E_3$ code, C, constructed through the relationship $C = Ba + B^{\perp s}c$ is symplectic QSD. Furthermore, $\text{res}(C) = B$ and $\text{tor}(C) = B^{\perp s}$.

**Proof.** We begin by proving that C is a linear $E_3$ code. Using the linearity of B and $B^{\perp s}$, we note that C is closed under the addition operation. Let $c \in C$ and $e \in E_3$, then $c = ba + b'c$, where $b \in B$, $b' \in B^{\perp s}$ and by c-adic decomposition of $e$, we have $e = ra + r'c$ where $r, r' \in \mathbb{F}_3$. So, we get

$$ 
\begin{aligned}
\mathbf{ce} &= (\mathbf{ba} + \mathbf{b}'c)(ra + r'c) = \mathbf{bara} + \mathbf{bar}'c + \mathbf{b}'cra + \mathbf{b}'cr'c \\
&= \mathbf{bra}^2 + \mathbf{br}'ac + \mathbf{b}'rca + \mathbf{b}'r'c^2 \\
&= \mathbf{bra} + \mathbf{br}'c.
\end{aligned}
$$

Therefore, $\mathbf{br}, \mathbf{br}' \in B$ since the code B is linear, $\mathbf{d} \in B$ and $r, r' \in \mathbb{F}_3$. From the symplectic-orthogonality of B, we see that $\mathbf{br}' \in B^{\perp s}$. We conclude that, $\mathbf{ce} \in C$. Hence, C is a linear $E_3$ code.

Let $\mathbf{c} = \mathbf{ba} + \mathbf{b}'c, \mathbf{c}' = \mathbf{da} + \mathbf{d}'c \in C$ for some $\mathbf{b}, \mathbf{d} \in B$ and $\mathbf{b}', \mathbf{d}' \in B^{\perp s}$. Then,

$$ 
\begin{aligned}
(c, c)' &= (\mathbf{ba} + \mathbf{b}'c, \mathbf{da} + \mathbf{d}'c)' \\
&= (\mathbf{b}, \mathbf{d})_s a^2 + (\mathbf{b}, \mathbf{d}')_s ac + (\mathbf{b}', \mathbf{d})_s ca + (\mathbf{b}', \mathbf{d}')_s c^2 \\
&= (\mathbf{b}, \mathbf{d})_s a + (\mathbf{b}, \mathbf{d}')_s c = 0.
\end{aligned}
$$

The last equality is derived because B is a symplectic-self-orthogonal code. Therefore, we have $C = Ba + B^{\perp s}c$. This implies that $|C| = |B||B^{\perp s}| = 9^n$. Consequently, C is a symplectic QSD code. Thus, the torsion and residue codes can be obtained by applying their definitions. $\square$

The following result demonstrates that Theorem 1 does not hold if B is not a symplectic-self-orthogonal code.

**Theorem 2.** For every $E_3$ code, C, given by $C = Ba + B^{\perp s}c$ where B is a ternary linear code. Then, C is always an additive code over $E_3$, but never a linear code over $E_3$, unless B is symplectic-self-orthogonal.

**Proof.** First, we have to prove that C is an additive code over $E_3$. Let $\mathbf{c}_1, \mathbf{c}_2 \in C$, then $\mathbf{c}_1 = \mathbf{b}_1a + \mathbf{b}'_1c$ and $\mathbf{c}_2 = \mathbf{b}_2a + \mathbf{b}'_2c$, where $\mathbf{b}_1, \mathbf{b}_2 \in B$ and $\mathbf{b}'_1, \mathbf{b}'_2 \in B^{\perp s}$. Thus, $\mathbf{c} + \mathbf{c}' = (\mathbf{b}_1 + \mathbf{b}_2)a + (\mathbf{b}'_1 + \mathbf{b}'_2)c$. From the linearity of B and $B^{\perp s}$ and the definition of C, it is easy to see that $\mathbf{c} + \mathbf{c}' \in C$. Hence, C is an additive code over $E_3$.

Now, suppose that C is a linear code over $E_3$ and there exists a codeword $\mathbf{b} \in B$. Then, a vector $\mathbf{b}'$ exists in $B^{\perp s}$, such that $\mathbf{c} = \mathbf{ba} + \mathbf{b}'c \in C$. Thus, let $e \in E_3$; then, $e$ has a c-adic decomposition form $e = ra + r'c$ with $r, r' \in \mathbb{F}_3$. Further,

$$ \mathbf{ce} = (\mathbf{ba} + \mathbf{b}'c)(ra + r'c) = \mathbf{bra}^2 + \mathbf{br}'ac + \mathbf{b}'rca + \mathbf{b}'r'c^2 = (\mathbf{br})a + (\mathbf{br}')c. $$

The last equality derived from $ca = c^2 = 0, a^2 = a, ac = c$. Using the linearity of C, we have $\mathbf{ce} \in C$ and $\mathbf{br}' \in B^{\perp s}$. Since $B^{\perp s}$ is a ternary linear code, we have $\mathbf{br}'r'^{-1} = \mathbf{b} \in B^{\perp s}$, where $r'^{-1}$ denotes the multiplicative inverse of $r' \in \mathbb{F}_3$. This yields $B \subseteq B^{\perp s}$. $\square$

Next, we characterize the symplectic QSD codes over $E_3$ in terms of their associated ternary codes.

**Corollary 1.** A linear $E_3$ code, C, of length $2n$ is symplectic QSD if $\text{res}(C) = \text{tor}(C)^{\perp s}$.

**Proof.** For the direct statement, suppose C is symplectic QSD; then, $|C| = 3^{2k_1+k_2} = 3^{2n}$. This means $k_1 = 2n - (k_1 + k_2)$. So, $\text{res}(C)$ and $\text{tor}(C)^{\perp s}$ have the same dimension.
Since C is symplectic-self-orthogonal, then by Lemma 1, $\mathrm{res}(C) \subseteq \mathrm{tor}(C)^{\perp s}$. Hence, $\mathrm{res}(C) = \mathrm{tor}(C)^{\perp s}$.

Conversely, since $\mathrm{res}(C) \subseteq \mathrm{tor}(C)$, then from the given hypotheses, $\mathrm{res}(C) = \mathrm{tor}(C)^{\perp s}$ and $\mathrm{tor}(C)^{\perp s} \subseteq \mathrm{res}(C)^{\perp s}$. These imply that, $\mathrm{res}(C)$ is ternary symplectic-self-orthogonal. By Theorem 2 and Theorem 3.5 in [8], the code, C, is symplectic QSD. □

The study of LCD codes with Euclidean inner product over non-unitary ring of order four first appeared in [4]. Further, the authors in [8] established right LCD $E_3$ codes. In addition, LCD codes under the symplectic inner product were introduced in [10]. In the following results, we extend this notion to codes over $E_3$.

A right-symplectic-nice code is said to be right-symplectic linear with complementary dual (right-symplectic LCD) if satisfies: $C \cap C^{\perp R_s} = \{0\}$; C is right-symplectic LCD if $C \oplus C^{\perp R_s} = E_3^{2n}$.

Likewise, a left-symplectic-nice code is called left-symplectic linear with complementary dual (left-symplectic LCD) if satisfies $C \cap C^{\perp L_s} = \{0\}$. Moreover, C is a left-symplectic LCD if $C \oplus C^{\perp L_s} = E_3^{2n}$.

**Remark 2.** Note that non-trivial left-symplectic LCD code does not exist over $E_3$. If $C \neq \{0\}$ is a nonzero linear $E_3$ code of length $2n$. Then, for any $\mathbf{y} \in C$, $\mathbf{y}c \in C$. We can see that $\mathbf{y}c = \mathbf{v}c$, where $\mathbf{v} \in \mathbb{F}_3^{2n}$. Since c is a left zero divisor, we have $(\mathbf{y}c, \mathbf{z})_s = 0$ for all $\mathbf{z} \in C$. This shows $\mathbf{y}c \in C^{\perp L_s}$. Thus, $C \cap C^{\perp L_s} \neq \{0\}$. Hence, the desired result achieved.

Henceforward, we consider the right-symplectic LCD codes as symplectic LCD and therefore only the right (symplectic) dual.

Using part (i) of Theorem 4.10 in [8], Proposition 2.1 in [14] and by following Lemma 5 in [10], we state the next Lemma.

**Lemma 2.** For any free linear $E_3$ code, C, of generator matrix, G, we have the following:

(1). $C = \langle G_3a \rangle_{E_3}$ where $G_3$ is a ternary matrix.

(2). $C^{\perp R_s} = \langle H_3\Omega a \rangle_{E_3}$ where $H_3$ is a ternary parity check matrix related to $G_3$.

**Proof.** The proof of (1) is achieved in the proof of Theorem 4.10 in [8].

To prove (2), we have $C = \langle G_3a \rangle_{E_3}$ for some ternary matrix $G_3$. Then, let $H_3$ be a parity check matrix of the linear code of generator matrix $G_3$. By Proposition 2.1 in [14], $H_3\Omega$ is a generator matrix of the symplectic dual of the ternary code whose generator matrix is $G_3$. Note that $(G_3a)\Omega(H_3\Omega a)^T = aG_3\Omega H_3^T a = 0$. Hence, $\langle H_3\Omega a \rangle_{E_3} \subseteq C^{\perp R_s}$.

For the converse inclusion, assume $\mathbf{z} = (z_1, z_2, \cdots, z_{2n}) \in C^{\perp R_s}$ and $G_3$ is in standard form, i.e., $G_3 = [I_k|M]$. Therefore, $G_3a = [I_k|M]a = \begin{bmatrix} \mathbf{r}_1a \\ \mathbf{r}_2a \\ \vdots \\ \mathbf{r}_k a \end{bmatrix}$ where $\mathbf{r}_1, \cdots, \mathbf{r}_k$ are the rows of $G_3$.

Furthermore, for all $0 \le i \le k$, we have $(\mathbf{r}_i a, \mathbf{z})_s = 0$. So, for any $1 \le i \le k$,

$$x_{i_1}a z_{i_1} + x_{i_2}a z_{i_2} + \cdots + x_{i_t}a z_{i_t} = 0,$$

for some $1 \le t \le k$ and $x_{i_j}$ are nonzero elements of $\mathbb{F}_3$. Since $ax = x$ for all $x \in E_3$, we get

$$x_{i_1}z_{i_1} + x_{i_2}z_{i_2} + \cdots + x_{i_t}z_{i_t} = 0.$$
Further, we obtain the next k equations:

$$
\begin{align*}
\beta_1 z_{n+1} + 0 + 0 + \dots + 0 + x_{k+i_1} z_{k+i_1} + \dots + x_{i_1 i_1} z_{i_1 i_1} &= 0, \\
0 + \beta_2 z_{n+2} + 0 + \dots + 0 + x_{k+i_2} z_{k+i_2} + \dots + x_{i_2 i_2} z_{i_2 i_2} &= 0, \\
\vdots \\
0 + 0 + \dots + 0 + \beta_k z_k + x_{k+i_k} z_{k+i_k} + \dots + x_{i_k i_k} z_{i_k i_k} &= 0.
\end{align*}
$$

where for each $0 \le t \le k$, $\beta_t$'s are 1 or 2 and the indices $k+i_t, \cdots i_t$ of $\mathbf{z}$ correspond to the nonzero positions of $\mathbf{r}_t a$. Moreover, there are at most $2n-k$ free variables in the previous $k$ equations, then there are $9^{2n-k}$ solutions of $\mathbf{z}$. This implies that $|\mathbf{C}^{\perp R_s}| \le 9^{2n-k}$. Since $|\langle H_3 \Omega a \rangle_{E_3}| = 9^{2n-k}$ and $\langle H_3 \Omega a \rangle_{E_3} \subseteq \mathbf{C}^{\perp R_s}$, we conclude that $\mathbf{C}^{\perp R_s} = \langle H_3 \Omega a \rangle_{E_3}$. $\square$

**Proposition 1.** Let C be a linear $E_3$ code having length $2n$. Then, C is a free code if it is right-symplectic-nice.

**Proof.** We have C is a linear code over $E_3$, then $|C||C^{\perp R_s}| = 3^{2k_1+k_2} \times 9^{2n-k_1} = 3^{4n+k_2}$. Hence, C is right-symplectic-nice if $k_2 = 0$. $\square$

**Corollary 2.** Every symplectic LCD code, C, over $E_3$ is free.

**Proof.** Using the definition of symplectic LCD code, we found that C is right-symplectic-nice. By Proposition 1 the code, C, is free. $\square$

Now, we construct symplectic LCD codes over $E_3$ from ternary symplectic LCD codes.

**Proposition 2.** Let B be a symplectic LCD ternary $[2n, k]$ code having a generator matrix $G_3$. Then, the $E_3$ code $C = \langle G_3a \rangle_{E_3}$ is a symplectic LCD $E_3$ code.

**Proof.** We have $C = \langle G_3a \rangle_{E_3}$; then, by statement (2) of Lemma 2, $C^{\perp R_s} = \langle H_3 \Omega a \rangle_{E_3}$ where $H_3$ is a parity check matrix of the matrix $G_3$ and $H_3 \Omega$ is a generator matrix of the ternary symplectic dual code related to $G_3$.

Further, $|C||C^{\perp R_s}| = 3^{2k} \times 9^{2n-k} = 9^{2n}$. This implies that C is right-symplectic-nice.

To prove that $C \cap C^{\perp R_s} = \{0\}$, assume (if possible) $0 \ne \mathbf{z}$ in $C \cap C^{\perp R_s}$. Then, there are two possibilities:

(1). Let $\mathbf{z} = \mathbf{y}c$ where $0 \ne \mathbf{y} \in \mathbb{F}_3^{2n}$ and $G_3$ is in standard form. By investigation of the matrix $G_3a$, we conclude that $\mathbf{y}$ can be expressed as a sum of scalar multiples of some rows of $G_3$. Hence, $\mathbf{y} \in B$. Likewise, we can prove that $\mathbf{y} \in B^{\perp s}$.

Consequently, $0 \ne \mathbf{y} \in B \cap B^{\perp s}$, this contradicts with B is a ternary symplectic LCD code.

(2). Suppose $\mathbf{z}$ is not a product of a ternary vector by $c$, then

$$
\mathbf{z} = \sum \mathbf{g}_i a u_i \text{ and } \mathbf{z} = \sum \mathbf{g}_j a v_j.
$$

where $\mathbf{g}_i a$ is a row of $G_3a$ for some (distinct) $i$ and $u_i \in E_3$ and $\mathbf{g}_j a$ is a row of $H_3 \Omega a$ for some (distinct) $j$ and $v_j \in E_3$. Therefore,

$$
\mathbf{z} = \sum \mathbf{g}_i u_i \text{ also } \mathbf{z} = \sum \mathbf{g}_j v_j
$$

where $\mathbf{g}_i$ is a row of $G_3$ for some (distinct) $i, j$ and $u_i, v_i \in E_3$.

From the multiplication table of $E_3$, we have $\mathbf{z}a = \sum \mathbf{g}_{i_1}$ and $\mathbf{z} = \sum \mathbf{g}_{j_1}$, where $\mathbf{g}_{i_1}$ is a row of $G_3$ for some distinct $i_1$ and $\mathbf{g}_{j_1}$ is a row of $H_3 \Omega$ for some distinct $j_1$.

Therefore, $\sum \mathbf{g}_{i_1} a - \sum \mathbf{g}_{j_1} a = (\sum \mathbf{g}_{i_1} - \sum \mathbf{g}_{j_1}) a = 0$. This implies that, $\sum \mathbf{g}_{i_1} - \sum \mathbf{g}_{j_1} = 0,$
so $\sum g_{i_t} = \sum g_{j_t} \in B \cap B^{\perp s}$. This implies that $B \cap B^{\perp s} \neq \{0\}$, which contradicts the fact that B is a symplectic LCD code.

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

The example below presents a symplectic LCD E₃ code constructed according to Proposition 2.

**Example 1.** Let B be the ternary [4,2] code of generator matrix $G_3 = \begin{bmatrix} 1 & 0 & 1 & 1 \\ 0 & 1 & 2 & 1 \end{bmatrix}$.

Since $G_3\Omega G_3^T = \begin{bmatrix} 0 & 1 \\ 2 & 0 \end{bmatrix}$ is a non-singular matrix over $\mathbb{F}_3$; then, by Theorem 1 in [15], B is a ternary symplectic LCD code of length 4. Then, by Proposition 2, $\langle G_3a \rangle_{E_3}$ is a symplectic LCD E₃ code.

Now, we verify the conditions of the definition of symplectic LCD E₃ code to prove that the code $\langle G_3a \rangle_{E_3}$ is symplectic LCD over E₃.

Assume, $C = \langle G_3a \rangle_{E_3} = \left\langle \begin{bmatrix} a & 0 & a & a \\ 0 & a & 2a & a \end{bmatrix} \right\rangle_{E_3}$. Then, C can be represented by the set

$$C = \{(ax, ax', ax + 2ax', ax + ax') | x, x' \in E_3\} = \{(x, x', x + 2x', x + x') | x, x' \in E_3\}.$$

For any $(y, y', z, z') \in C$, we have

$$((a, 0, a, a), (y, y', z, z'))_s = 0 \text{ and } ((0, a, 2a, a), (y, y', z, z'))_s = 0.$$

These imply, $az + 2ay + 2ay' = 0$ and $az' + ay + 2ay' = 0$. Thus, $z + 2y + 2y' + z' + y + 2y' = 0$. So, $z = y + y'$ and $z' = 2y + y'$. Hence,

$$C^{\perp R_s} = \{(y, y', y + y', 2y + y') | y, y' \in E_3\}.$$

Clearly, $|C^{\perp R_s}| = 9^2$, $|C| = 9^2$. Then, $|C||C^{\perp R_s}| = 9^4$. Furthermore, $C \cap C^{\perp R_s} = \{0\}$. Therefore, C is symplectic LCD E₃ code.

The inverse statement of Proposition 2 is partially true, as the following proposition states.

**Proposition 3.** A free symplectic LCD E₃ code, C, is the E₃-span by the matrix Ga with G is a generator matrix of a ternary symplectic LCD code B.

**Proof.** Since C is free, then by part (1) of Lemma 2, C is the E₃-span by the matrix Ga where G is a generator matrix of the ternary code B. Moreover, from part (2) of Lemma 2, $C^{\perp R_s}$ is generated by the matrix $H\Omega a$, where H is a parity check matrix of B. Since C is symplectic LCD, $C \cap C^{\perp R_s} = \{0\}$. Further, suppose $(0 \neq x) \in B \cap B^{\perp R_s}$, then $xa \in C \cap C^{\perp R_s}$; this contradicts $C \cap C^{\perp R_s} = \{0\}$. Therefore, B is a ternary symplectic LCD code. □

**Corollary 3.** For any symplectic LCD code, C, over E₃, the ternary codes $\text{tor}(C)$ and $\text{res}(C)$ are symplectic LCD codes.

**Proof.** Since C is symplectic LCD code, then by Corollary 2, C is free. Then, by Proposition 3, C is the E₃-span by the matrix Ga where G is a generator matrix of ternary symplectic LCD code. From the freeness of C, we have $\text{res}(C) = \text{tor}(C)$ and G will be a generator matrix for both $\text{res}(C)$ and $\text{tor}(C)$. □
## 4. Symplectic ACD Codes

In this section, we introduce the right-symplectic-nice and left-symplectic-nice additive codes, as well as right-symplectic ACD and left-symplectic ACD $E_3$ codes. We provide some criteria for the existence of the right-symplectic ACD $E_3$ codes. Moreover, for additive, linear and free $E_3$ codes, in terms of their torsion and residue codes, we also determine the residue and torsion codes of the right-symplectic dual of such codes. At the end, we show that any linear $E_3$ code is free if, and only if, its right and left-symplectic duals have the same residue code.

An additive $E_3$ code of length $2n$ is called right-symplectic-nice (respectively, left-symplectic-nice) code if $|C||C^{\perp R_s}| = 9^{2n}$ (respectively, $|C||C^{\perp L_s}| = 9^{2n}$).

A right-symplectic-nice additive $E_3$ code, $C$, is called right-symplectic additive complementary dual (right-symplectic ACD) if $C \cap C^{\perp R_s} = \{0\}$.

Likewise, a left-symplectic-nice additive $E_3$ code, $C$, is called left-symplectic additive complementary dual (left-symplectic ACD) if $C \cap C^{\perp L_s} = \{0\}$.

**Lemma 3.** Let $C$ be an additive $E_3$ code. Then, the right-symplectic dual of $C$ is a free linear $E_3$ code and its left-symplectic dual is a non-free linear $E_3$ code.

**Proof.** Firstly, we have to prove that $C^{\perp R_s}$ and $C^{\perp L_s}$ are linear codes over $E_3$. Let $\mathbf{z}, \mathbf{z}' \in C^{\perp R_s}$ and $\mathbf{y} \in C$. Then,

$$ (\mathbf{y}, \mathbf{z} + \mathbf{z}')_s = (\mathbf{y}, \mathbf{z})_s + (\mathbf{y}, \mathbf{z}')_s = 0 + 0 = 0. $$

Hence, $\mathbf{z} + \mathbf{z}' \in C^{\perp R_s}$. Thus, for any $\mathbf{z} \in C^{\perp R_s}$, $u \in E_3$ and $\mathbf{y} \in C$, we have

$$ (\mathbf{y}, \mathbf{z}r)_s = (\mathbf{y}, \mathbf{z})_s r = 0. $$

So, $\mathbf{z}r \in C^{\perp R_s}$. Further, $C^{\perp R_s}$ is a right submodule of $E_3^{2n}$. This shows that $C^{\perp R_s}$ is a linear $E_3$ code.

Next, we prove that $C^{\perp R_s}$ is free code. Let $\mathbf{z} = \mathbf{u}c \in C^{\perp R_s}$ where $\mathbf{u} \in \mathbb{F}_3^{2n}$. Then according to multiplication table of $E_3$, for any $\mathbf{y} \in C$, we get $(\mathbf{y}, \mathbf{z})_s = (\mathbf{y}, \mathbf{u}c)_s = tc = 0$. This implies, $\mathbf{t}$ is multiple of 3. Therefore, $(\mathbf{y}, \mathbf{u}a)_s = (\mathbf{y}, \mathbf{u}a)_s = ta = 0$. This means $\mathbf{u}a \in C^{\perp R_s}$. By Theorem 4.12 in [8], consequently $C^{\perp R_s}$ is free.

Now, we have to prove $C^{\perp L_s}$ is also linear over $E_3$. Let $\mathbf{x}, \mathbf{x}' \in C^{\perp L_s}$ and $\mathbf{y} \in C$. Then,

$$ (\mathbf{x} + \mathbf{x}', \mathbf{y})_s = (\mathbf{z}, \mathbf{y})_s + (\mathbf{z}', \mathbf{y})_s = 0 + 0 = 0. $$

So, $\mathbf{x} + \mathbf{x}' \in C^{\perp L_s}$. Therefore, let $\mathbf{x} \in C^{\perp R_s}$, $\mathbf{y} \in C$ and let $r \in E_3$, then $r = ea + e'c$ where $e, e' \in \mathbb{F}_3$. Thus,

$$ (\mathbf{x}r, \mathbf{y})_s = (\mathbf{x}(ea + e'c), \mathbf{y})_s = (\mathbf{x}ea, \mathbf{y})_s + (\mathbf{x}e'c, \mathbf{y})_s. $$

Since $(\mathbf{x}a, \mathbf{y})_s = (\mathbf{x}b, \mathbf{y})_s = (\mathbf{x}, \mathbf{y})_s = 0$, we get $(\mathbf{x}ea, \mathbf{y})_s + (\mathbf{x}e'c, \mathbf{y})_s = (\mathbf{x}e, \mathbf{y})_s + 0 = (\mathbf{x}, \mathbf{y})_s e = 0$. So, $(\mathbf{x}r, \mathbf{y})_s = 0$. Hence, $\mathbf{x}r \in C^{\perp L_s}$. Consequently, $C^{\perp L_s}$ is a linear $E_3^{2n}$ code.

It remains to prove $C^{\perp L_s}$ is not a free code. Suppose $C^{\perp L_s}$ is free over $E_3$. Since $c$ is left zero divisor, we get $\langle cI_{2n} \rangle_{\mathbb{F}_3} \subseteq C^{\perp L_s}$. Thus, according to Theorem 4.12 in [8], $\langle aI_{2n} \rangle_{\mathbb{F}_3} \subseteq C^{\perp L_s}$. These yield $|C^{\perp L_s}| \ge 9^n \times 9^n = 9^{2n}$. Since $C^{\perp L_s} \subseteq E_3^{2n}$, we have $|C^{\perp L_s}| \le 9^{2n}$. Hence, $C^{\perp L_s} = E_3^{2n}$. This implies that $C = \{0\}$, which is impossible. Hence, $C^{\perp L_s}$ is not a free $E_3$ code. $\square$

**Theorem 3.** Let $C$ be a linear code over $E_3$ of length $2n$. Then, $C = (C^{\perp R_s})^{\perp R_s}$ if $C$ is right-symplectic-nice.
**Proof.** Assume, $(C^{\perp R_s})^{\perp R_s} = C$. By Lemma 3, $C^{\perp R_s}$ is a free linear $E_3$ code. Thus, from Proposition 1, $C^{\perp R_s}$ is right-symplectic-nice. This yields $|C^{\perp R_s}| |(C^{\perp R_s})^{\perp R_s}| = |C||C^{\perp R_s}| = 9^{2n}$. Hence, $C$ is right-symplectic-nice.

Conversely, assume $C$ is right-symplectic-nice. From Proposition 1, we have $C$ is free. Furthermore, by Lemma 3, $C^{\perp R_s}$ is free. Thus, by Lemma 2, for any $\mathbf{y} \in C$ and $\mathbf{z} \in C^{\perp R_s}$, we assume $\mathbf{y} = \mathbf{1}\mathbf{a}$ and $\mathbf{z} = \mathbf{t}\mathbf{a}$ for some $\mathbf{1}, \mathbf{t}' \in \mathbb{F}_3^{2n}$. Then, $\mathbf{0} = (\mathbf{y}, \mathbf{z})_s = (\mathbf{1}\mathbf{a}, \mathbf{t}\mathbf{a})_s = (\mathbf{1}, \mathbf{t})_s a^2 = (\mathbf{1}, \mathbf{t})_s a = 2(\mathbf{t}, \mathbf{1})_s a = 2(\mathbf{z}, \mathbf{y})_s$. So, $(\mathbf{z}, \mathbf{y})_s = \mathbf{0}$, for any $\mathbf{z} \in C^{\perp R_s}$. Then, $\mathbf{y} \in (C^{\perp R_s})^{\perp R_s}$. This shows that $C \subseteq (C^{\perp R_s})^{\perp R_s}$. Furthermore, $C, C^{\perp R_s}$ are both right-symplectic-nice, which means $|C||C^{\perp R_s}| = |(C^{\perp R_s})^{\perp R_s}||C^{\perp R_s}|$. So, $(C^{\perp R_s})^{\perp R_s} = |C|$. This together with $C \subseteq (C^{\perp R_s})^{\perp R_s}$ imply that $C = (C^{\perp R_s})^{\perp R_s}$. $\square$

The next result characterizes the one-sided duals of a symplectic LCD $E_3$ code.

**Proposition 4.** Let $C$ be a symplectic LCD $E_3$ code, then $C^{\perp R_s}$ is symplectic LCD but $C^{\perp L_s}$ is not.

**Proof.** Suppose $C$ is symplectic LCD code. Then, $C$ is right-symplectic-nice with $C \cap C^{\perp R_s} = \{\mathbf{0}\}$. By Theorem 3, $(C^{\perp R_s})^{\perp R_s} = C$. Thus, $|C^{\perp R_s}| |(C^{\perp R_s})^{\perp R_s}| = |C^{\perp R_s}| |C| = 9^{2n}$. Furthermore, $C^{\perp R_s} \cap (C^{\perp R_s})^{\perp R_s} = C^{\perp R_s} \cap C = \mathbf{0}$. These imply that $C^{\perp R_s}$ is a symplectic LCD $E_3$ code.

Further, from Lemma 3, $C^{\perp L_s}$ is non-free linear $E_3$ code. Hence, by Proposition 1, $C^{\perp L_s}$ is not right-symplectic-nice. So, $C^{\perp L_s}$ is not symplectic LCD. $\square$

**Proposition 5.** If $C$ is a right-symplectic ACD $E_3$ code with $3^t$ elements then $t$ is even.

**Proof.** By Lemma 3, $C^{\perp R_s}$ is free. This yields, $C^{\perp R_s} = 9^{k_1} = 3^{2k_1}$. Since $C$ is right-symplectic ACD, then $|C||C^{\perp R_s}| = 9^{2n}$. Thus, $|C| = 3^{4n-2k_1}$. Hence, $t = 4n-2k_1$; this means $t$ is even. $\square$

Next, we construct the right-symplectic ACD codes over $E_3$.

**Proposition 6.** Let $C$ be an additive $E_3$ code of length $2n$ with $C \cap C^{\perp R_s} = C_c \cap C^{\perp R_s} = \{\mathbf{0}\}$ and $|C^{\perp R_s}| |C| < 9^{2n}$. Then, for any nonzero element $\mathbf{y} = \mathbf{z} + \mathbf{z}'c \in C + C_c$, if $\mathbf{y} \in C^{\perp R_s}$, then $\mathbf{z}$ is a multiple of a ternary vector by $c, \mathbf{z} \neq \mathbf{0}, \mathbf{z}'c \neq \mathbf{0}$ and $\mathbf{z} \in C \setminus C_c$.

**Proof.** Let $\mathbf{0} \neq \mathbf{y} = \mathbf{z} + \mathbf{z}'c \in C + C_c$, where $\mathbf{z}, \mathbf{z}' \in C$. We suppose that $\mathbf{y} \in C^{\perp R_s}$. Then, we get the following cases:

(1). If $\mathbf{z} = \mathbf{0}$ and $\mathbf{z}'c = \mathbf{0}$, then $\mathbf{y} = \mathbf{0}$ which is not possible.

(2). If $\mathbf{z} = \mathbf{0}$ and $\mathbf{z}'c \neq \mathbf{0}$, then $\mathbf{y} = \mathbf{z}'c \in C^{\perp R_s}$. This implies that, $\mathbf{0} \neq \mathbf{y} \in C_c \cap C^{\perp R_s} = \{\mathbf{0}\}$ which is not possible.

(3). If $\mathbf{z} \neq \mathbf{0}$ and $\mathbf{z}'c = \mathbf{0}$, then $\mathbf{y} = \mathbf{z} \in C^{\perp R_s}$. This shows that $\mathbf{0} \neq \mathbf{y} \in C \cap C^{\perp R_s} = \mathbf{0}$ which leads to a contradiction.

(4). If $\mathbf{z} \neq \mathbf{0}$ and $\mathbf{z}'c \neq \mathbf{0}$, then $\mathbf{y} = \mathbf{z} + \mathbf{z}'c$. Suppose, $\mathbf{z}$ is not a multiple of a ternary vector by $c$. So, $\mathbf{z}c \neq \mathbf{0}$. By Lemma 3, $C^{\perp R_s}$ is a free linear $E_3$ code. This together with $\mathbf{y} \in C^{\perp R_s}$, we obtain $\mathbf{y}c = (\mathbf{z} + \mathbf{z}'c)c = \mathbf{z}c \in C^{\perp R_s}$. Thus, $\mathbf{z}c \in C_c \cap C^{\perp R_s} = \{\mathbf{0}\}$ which is not possible. Hence, $\mathbf{z}$ is a multiple of a ternary vector by $c$. Further, if $\mathbf{z} \in C_c$, then $\mathbf{y} \in C_c$, also $\mathbf{y} \in C_c \cap C^{\perp R_s} = \{\mathbf{0}\}$. It again leads to a contradiction. Hence, $\mathbf{z} \in C \setminus C_c$. By (1), (2), (3), and (4), if $\mathbf{0} \neq \mathbf{y} = \mathbf{z} + \mathbf{z}'c \in C^{\perp R_s}$, then $\mathbf{z} \neq \mathbf{0}, \mathbf{z}'c \neq \mathbf{0}, \mathbf{z}$ is a multiple of a ternary vector by $c$, and $\mathbf{z} \in C \setminus C_c$. This completes the proof. $\square$

**Theorem 4.** Let $C$ be an additive $E_3$ code of length $2n$. If $|C||C^{\perp R_s}| < 9^{2n}$ and $C \cap C^{\perp R_s} = C_c \cap C^{\perp R_s} = \{\mathbf{0}\}$, then $C$ can be extended to a right-symplectic ACD code over $E_3$ by adding some elements of $C_c$.
**Proof.** (1). First, we show that $Cc \not\subseteq C$. Suppose $B = \langle C \rangle_{E_3} = Ca + Cc = \{za + z'c | z, z' \in C \setminus Cc\}$.

Since $c$ is a left zero-divisor, we suppose that $z$ and $z'$ are not multiples of a ternary vectors by $c$. Clearly, $B$ is a free linear $E_3$ code and $B^{\perp R_s} = C^{\perp R_s}$. From Lemma 2 and Proposition 2, $B$ is right-symplectic-nice.

If $Cc \subseteq C$, according to [8], we define a map $\pi_1 : C \to B$ by

$$ \pi_1(\mathbf{0}) = \mathbf{0}, \pi_1(\mathbf{z}) = \mathbf{za} \text{ and } \pi_1(\mathbf{zc}) = \mathbf{zc}, \text{ for any } \mathbf{z} \in C \setminus Cc. $$

Note that, for any $z, z' \in C$, $\pi_1(z + z') = \pi_1(z) + \pi_1(z')$. It is clear that $\pi_1$ is a surjective linear mapping over $\mathbb{F}_3$. Thus, $|C| \ge |B|$ since $\pi_1$ is surjective. Thus, $|C||C^{\perp R_s}| \ge |B||C^{\perp R_s}| = |B||B^{\perp R_s}| = 9^{2n}$. So, $|C||C^{\perp R_s}| \ge 9^{2n}$ which contradicts the hypothesis. Hence, $Cc \not\subseteq C$. Moreover, $C$ can be extended to a right-symplectic-nice code by adding some codewords of $Cc$.

(2). Now, we prove that a vector $z'c$ exists in $Cc \setminus C$ such that $z + z'c \notin C^{\perp R_s}$ for any $z \in C$. Assume this is not true, i.e., there is a codeword $z$ of $C$ such that $z + z'c \in C^{\perp R_s}$ for any $z'c \in Cc \setminus C$. Then, by Proposition 6, a ternary vector $y$ exists such that $z = yc$ and $z$ in $C \setminus Cc$.

Suppose for any $z'_1c, z'_2c \in C \setminus Cc$ with $z'_1c \neq z'_2c$, there are $z_1, z_2 \in C$ such that $z_1 + z'_1c, z_2 + z'_2c \in C^{\perp R_s}$.

If possible, let $z_1 = z_2$, then $(z'_1 + 2z'_2)c = (z_1 + z'_1c) + 2(z_2 + z'_2c) \in C^{\perp R_s}$ (since $C^{\perp R_s}$ is a linear code over $E_3$ and $z_1 + z'_1c, z_2 + z'_2c \in C^{\perp R_s}$).

Thus, $z'_1 + 2z'_2 \in C$ as $z'_1, z'_2 \in C$. This yields $(z'_1 + 2z'_2)c \in Cc$. So, $(z'_1 + 2z'_2)c \in Cc \cap C^{\perp R_s} = \{\mathbf{0}\}$. Therefore, $z'_1c = z'_2c$ which is not possible.

Hence, we have $z_1 \neq z_2$. Let us define $\pi_2 : B \to C$. We will discuss the following cases:

(2.1). For any $z \in C \setminus Cc$, if $zc \in Cc \setminus C$, we define $\pi_2$ as

$$ \pi_2(\mathbf{0}) = \mathbf{0}, \pi_2(\mathbf{za}) = \mathbf{z} \text{ and } \pi_2(\mathbf{zc}) = \mathbf{y}. $$

where, $y$ is the given vector satisfies $y + za \in C^{\perp R_s}$. For all $z, z' \in B$, $\pi_2(z + z') = \pi_2(z) + \pi_2(z')$. Thus, it is easy to see that $\pi_2$ is injective linear map over $\mathbb{F}_3$. Therefore, if $\pi_2(zc) \neq \pi_2(z'c)$, then $y \neq y'$, as for $zc, z'c \in Cc$, there exist $y, y' \in C$ such that $y + zc, y + zc \in C^{\perp R_s}$ with $y \neq y'$.

(2.2). For any $z \in C \setminus Cc$, if $zc \in Cc \setminus C$, we define $\pi_2$ by

$$ \pi_2(\mathbf{0}) = \mathbf{0}, \pi_2(\mathbf{za}) = \mathbf{z} \text{ and } \pi_2(\mathbf{zc}) = \mathbf{zc}. $$

For all $z, z' \in B$, $\pi_2(z + z') = \pi_2(z) + \pi_2(z')$. Furthermore, $\pi_2$ is injective $\mathbb{F}_3$-linear map.

For both cases, since $\pi_2$ is injective, we have $|C| \ge |B|$. This yields $|C||C^{\perp R_s}| \ge |B||B^{\perp R_s}| = 9^{2n}$. So, $|C||C^{\perp R_s}| \ge 9^{2n}$, this is a contradiction.

Hence, $z'c \in Cc \setminus C$ such that $z + z'c \notin C^{\perp R_s}$ for any $z \in C$.

At this time, we add $zc$ to $C$ to get a new code $D$. We can check that, $D \cap D^{\perp R_s} = \{\mathbf{0}\}$. If $D$ is right-symplectic-nice, then $D$ is right-symplectic ACD. Otherwise, repeat steps (1) and (2) for $D$. $\square$

The definitions of the associated ternary codes (i.e., residue and torsion codes) of a linear $E_3$ code can be extended into an additive $E_3$ code $C$. Clearly, these codes are linear codes. Consider, $\dim(\mathrm{res}(C)) = d_1$ and $\dim(\mathrm{tor}(C)) = d_2$.

For a linear $E_3$ code, $C$, of generator matrix $G$ in the form given in Corollary 4.11 in [8]. Then, $\dim(\mathrm{res}(C) = k_1 = d_1$ and $\dim(\mathrm{tor}(C)) = k_1 + k_2 = d_1 + k_2 = d_2$, where $k_2$ is the
F3-dimension of the set of all codewords of C which are scalar multiples of c ∈ E3 and which can not be obtained from the upper two blocks of G.

For any codeword r of the code, C, we can write it in c-adic decomposition form as
r = ua + vc with u, v are ternary vectors, so that α_{E3}(r) = u.

**Theorem 5.** For any additive E<sub>3</sub> code, C, of length 2n. We have

$$
C^{\perp R_s} = \langle \mathrm{res}(C)^{\perp s} \rangle_{E_3} \text{ and } |C^{\perp R_s}| = 9^{2n-\dim(\mathrm{res}(C))} = 9^{2n-d_1}.
$$

**Proof.** For any **z** ∈ C, there exists **v** ∈ res(C) such that **z**a = **v**a. Let **u** ∈ res(C)<sub>⊥R<sub>s</sub></sub>. Then,

$$
(\mathbf{z}, \mathbf{u}\mathbf{a})_s = (\mathbf{z}\mathbf{a}, \mathbf{u}\mathbf{a})_s = (\mathbf{v}\mathbf{a}, \mathbf{u}\mathbf{a})_s = (\mathbf{v}, \mathbf{u})_s a^2 = (\mathbf{v}, \mathbf{u})_s a = 0.
$$

$$
(\mathbf{z}, \mathbf{u}\mathbf{b})_s = (\mathbf{z}\mathbf{a}, \mathbf{u}\mathbf{b})_s = (\mathbf{v}\mathbf{a}, \mathbf{u}\mathbf{b})_s = (\mathbf{v}\mathbf{b}, \mathbf{u}\mathbf{b})_s = (\mathbf{v}, \mathbf{u})_s b = 0.
$$

These show that **u**a, **u**b ∈ C⊥R<sub>s</sub>. Hence, ⟨res(C)⊥<sub>s</sub>⟩<sub>E<sub>3</sub></sub> ⊆ C⊥R<sub>s</sub> since a and b are generators of E<sub>3</sub> and **u**a, **u**a ∈ C⊥R<sub>s</sub>. Clearly, ⟨res(C)⊥<sub>s</sub>⟩<sub>E<sub>3</sub></sub> = ⟨res(C)⟩<sub>E<sub>3</sub></sub>⊥R<sub>s</sub>.

Now, we have to prove C⊥<sub>R<sub>s</sub></sub> ⊆ ⟨res(C)⊥<sub>s</sub>⟩<sub>E<sub>3</sub></sub>. Let x ∈ res(C), then there exists
xa + yc ∈ C⊥<sub>R<sub>s</sub></sub> such that α<sub>E<sub>3</sub></sub>(xa + yc) = x.

Since c is a left-zero divisor, then for any z ∈ C⊥<sub>R<sub>s</sub></sub>, we get

$$
(xa, z)_s = (xa + yc, z)_s = 0 \text{ and } (xb, z)_s = (xa, z)_s = 0.
$$

This yields $\mathbf{z} \in \langle \mathrm{res}(C) \rangle_{\mathrm{E}_3}^{\perp R_s}$. So, $C^{\perp R_s} \subseteq \langle \mathrm{res}(C) \rangle_{\mathrm{E}_3}^{\perp R_s}$.

Consequently, $C^{\perp R_s} = \langle \mathrm{res}(C)^{\perp s} \rangle_{E_3}$. Further, $|C^{\perp R_s}| = |\langle \mathrm{res}(C)^{\perp s} \rangle_{E_3}| = 9^{2n-d_1}$. $\square$

The following result derives a sufficient condition for an additive E₃ code to be right-
symplectic ACD.

**Proposition 7.** Let C be an additive E<sub>3</sub> code of length 2n. Then, C is a right-symplectic ACD code if the next statements hold:

(1). The ternary code res(C) is symplectic LCD.

(2). $\mathrm{tor}(C) \cap C^{\perp R_s} = \{0\}$.

(3). $3^{d_1+d_2} \times 9^{2n-d_1} = 9^{2n}$ (i.e., $d_1 = d_2$).

**Proof.** First, it is clear that, |C| = |res(C)||tor(C)| = 3<sup>d<sub>1</sub> + d<sub>2</sub></sup> and by Theorem 5, |C<sup>⊥R<sub>s</sub></sup>| = 9<sup>2n-d<sub>1</sub></sup>. So, |C||C<sup>⊥R<sub>s</sub></sup>| = 9<sup>2n</sup>. This demonstrates that C is a right-symplectic-nice E<sub>3</sub> code. The final step is to show that C ∩ C<sup>⊥R<sub>s</sub></sup> = {0}. If it is possible, let 0 ≠ **z** = (z<sub>1</sub>, z<sub>2</sub>, ..., z<sub>2n</sub>) ∈ C ∩ C<sup>⊥R<sub>s</sub></sup>. As tor(C) ∩ C<sup>⊥R<sub>s</sub></sup> = {0}, **z** is not a multiple of ternary vector by **c**. This yields α<sub>E<sub>3</sub></sub>(**z**) ≠ 0. Thus, for any **y** = (y<sub>1</sub>, y<sub>2</sub>, ..., y<sub>2n</sub>) ∈ C, we have (y, **z**)s = 0. As α<sub>E<sub>3</sub></sub> is a (ring) morphism, we get

$$
\begin{align*}
(\alpha_{E_3}(\mathbf{y}), \alpha_{E_3}(\mathbf{z}))_s &= \sum_{i=1}^{n} (\alpha_{E_3}(y_i)\alpha_{E_3}(z_{n+i}) - \alpha_{E_3}(y_{n+i})\alpha_{E_3}(z_i)) \\
&= \alpha_{E_3}\left(\sum_{i=1}^{n} (y_i z_{n+i} - y_{n+i} z_i)\right) = \alpha_{E_3}\left((\mathbf{y}, \mathbf{z})_s\right) \\
&= \alpha_{E_3}(0) = 0.
\end{align*}
$$

This derived that α<sub>E<sub>3</sub></sub>(**z**) ∈ res(C)<sub>⊥</sub><sup>s</sup>, which contradicts that res(C) is symplectic LCD.
Hence, **z** = **0**. So, C ∩ C<sub>⊥R<sub>s</sub></sub> = {**0**}.

Hence, C is a right-symplectic ACD code over E<sub>3</sub>. □

The inverse statement of Corollary 3 is also true, as the corollary below establishes.
**Corollary 4.** Let C be a free linear E₃ code with residue code is ternary symplectic LCD, then C is symplectic LCD.

**Proof.** Since res(C) is a symplectic LCD code, then to prove C is symplectic LCD is sufficient to check the conditions (2) and (3) of Proposition 7. We have C is an additive E₃ code, then by Theorem 5,

$$ 
\begin{aligned}
\mathrm{tor}(C)c \cap C^{\perp R_s} &= \mathrm{tor}(C)c \cap \langle \mathrm{res}(C)^{\perp s} \rangle_{E_3} = \mathrm{res}(C)c \cap \langle \mathrm{res}(C)^{\perp s} \rangle_{E_3} \\
&= \mathrm{res}(C)c \cap \mathrm{res}(C)^{\perp s}c = (\mathrm{res}(C) \cap \mathrm{res}(C)^{\perp s})c \\
&= \{0\}.
\end{aligned}
$$

This shows that condition (2) is satisfied. Therefore, from the freeness of C, we get $d_1 = d_2$, so $3^{d_1+d_2} \times 9^{2n-d_1} = 9^{d_1} \times 9^{2n-d_1} = 9^{2n}$. This yields condition (3) is satisfied.

Hence, C is right-symplectic ACD. Moreover, C is a symplectic LCD code over E₃. □

We determine the residue and torsion codes of the right-symplectic dual codes of additive E₃ codes as the following theorem shows.

**Theorem 6.** Let C be an additive code over E₃ of length 2n. Then,

$$ \mathrm{res}(C^{\perp R_s}) = \mathrm{tor}(C^{\perp R_s}) = \mathrm{res}(C)^{\perp s}. $$

**Proof.** By Lemma 3, $C^{\perp R_s}$ is a free linear code, then $\mathrm{res}(C^{\perp R_s}) = \mathrm{tor}(C^{\perp R_s})$. Then, we have to check that $\mathrm{res}(C^{\perp R_s}) \subseteq \mathrm{res}(C)^{\perp s}$. Let $xa + yc \in C^{\perp R_s}$ and $x'a + y'c \in C$ where $x, x', y, y' \in \mathbb{F}_3^{2n}$. Then, $\alpha_{E_3}(xa + yc) = x \in \mathrm{res}(C^{\perp R_s})$ and $\alpha_{E_3}(x'a + y'c) = x' \in \mathrm{res}(C)$. Since $\alpha_{E_3}$ is a ring morphism and $(x'a + y'c, xa + yc)_s = 0$, we get

$$ \alpha_{E_3}((x'a + y'c, xa + yc)_s) = (\alpha_{E_3}(x'a + y'c), \alpha_{E_3}(xa + yc))_s = (x', x)_s = 0. $$

This implies that $x \in \mathrm{res}(C)^{\perp s}$. So, $\mathrm{res}(C^{\perp R_s}) \subseteq \mathrm{res}(C)^{\perp s}$.

To prove that $\mathrm{res}(C)^{\perp s} \subseteq \mathrm{res}(C^{\perp R_s})$, suppose x is an arbitrary element of $\mathrm{res}(C)^{\perp s}$. Let $z = ya + y'c \in C$ where $y, y' \in \mathbb{F}_3^{2n}$. Then, $\alpha_{E_3}(z) = y \in \mathrm{res}(C)$. So,

$$ (z, xa)_s = (ya + y'c, xa)_s = (ya, xa)_s + (y'c, xa)_s = (ya, xa)_s = (y, x)_s a + 0 = 0. $$

This shows that $xa \in C^{\perp R_s}$. Thus, $x \in \mathrm{res}(C^{\perp R_s})$ as $\alpha_{E_3}(xa) = x$. Hence, $\mathrm{res}(C)^{\perp s} \subseteq \mathrm{res}(C^{\perp R_s})$. Therefore, $\mathrm{res}(C^{\perp R_s}) = \mathrm{res}(C)^{\perp s}$. □

**Corollary 5.** For any linear E₃ code, C, we have $\mathrm{tor}(C)^{\perp s} \subseteq \mathrm{tor}(C^{\perp R_s})$. Particularly, if C is free, then $\mathrm{tor}(C^{\perp R_s}) = \mathrm{tor}(C)^{\perp s}$.

**Proof.** First we have, $\mathrm{res}(C) \subseteq \mathrm{tor}(C)$ as C is a linear E₃ code, then $\mathrm{tor}(C)^{\perp s} \subseteq \mathrm{res}(C)^{\perp s}$. By Theorem 6, $\mathrm{res}(C^{\perp R_s}) = \mathrm{res}(C)^{\perp s} \supseteq \mathrm{tor}(C)^{\perp s}$. According to Lemma 3, $C^{\perp R_s}$ is free, so $\mathrm{tor}(C^{\perp R_s}) = \mathrm{res}(C^{\perp R_s})$. Hence, $\mathrm{tor}(C)^{\perp s} \subseteq \mathrm{tor}(C^{\perp R_s})$. Therefore, if C is free, then $\mathrm{tor}(C) = \mathrm{res}(C)$. Thus, $\mathrm{tor}(C)^{\perp s} = \mathrm{res}(C)^{\perp s}$. By Lemma 3 and Theorem 6, $\mathrm{tor}(C^{\perp R_s}) = \mathrm{res}(C^{\perp R_s}) = \mathrm{res}(C)^{\perp s}$. Hence, $\mathrm{tor}(C^{\perp R_s}) = \mathrm{tor}(C)^{\perp s}$. □

The converse statement of Proposition 7 partially holds.

**Proposition 8.** For an additive E₃ code, C, of length 2n. We have, $\mathrm{tor}(C)c \cap C^{\perp R_s} = \{0\}$, $\mathrm{res}(C)$ is a ternary symplectic LCD code and $3^{d_1+d_2} \times 9^{2n-d_1} = 9^{2n}$ (i.e., $d_1 = d_2$) if C is a right-symplectic ACD code over E₃ with $Cc \cap C^{\perp R_s} = \{0\}$.
**Proof.** Let $z \in \operatorname{tor}(C)c \cap C^{\perp R_s}$. Then, $z \in \operatorname{tor}(C)c$; this means $z = tc$ with $t \in \operatorname{tor}(C)$. By the definition of the torsion code, $z \in C$. This together with $z \in C^{\perp R_s}$ imply that $z \in C \cap C^{\perp R_s}$. Since $C$ is right-symplectic ACD code, $z = 0$. Hence, $\operatorname{tor}(C)c \cap C^{\perp R_s} = \{0\}$.

We have $|C| = |\operatorname{res}(C)||\operatorname{tor}(C)| = 3^{d_1+d_2}$ and by Theorem 5, $|C^{\perp R_s}| = 9^{2n-d_1}$. Therefore, $|C||C^{\perp R_s}| = 3^{d_1+d_2} \times 9^{2n-d_1}$. Since $C$ is right-symplectic-nice, $3^{d_1+d_2} \times 9^{2n-d_1} = 9^{2n}$. Hence, $d_1 = d_2$. Now, let $r \in \operatorname{res}(C) \cap \operatorname{res}(C)^{\perp s}$. By Theorem 6, $r \in \operatorname{res}(C)^{\perp s} = \operatorname{res}(C^{\perp R_s})$. Thus, there are $ra + ta \in C$ and $ra + t'a \in C^{\perp R_s}$ such that $\alpha_{E_3}(ra + ta) = \alpha_{E_3}(ra + t'a) = r$. From the linearity of $C^{\perp R_s}$ over $E_3$, we get $(ra + t'a)c = rc \in C^{\perp R_s}$. Therefore, $(ra + t'a)c = rc \in Cc$. So, $(ra + t'a)c \in Cc \cap C^{\perp R_s} = \{0\}$. Thus, $rc = 0$, also $r = 0$. Hence, $\operatorname{res}(C)$ is a ternary symplectic LCD code. $\square$

**Proposition 9.** Let $C$ be an additive code of length $2n$ over $E_3$. Then, $\operatorname{tor}(C^{\perp L_s}) \subseteq \operatorname{res}(C)^{\perp s}$. Equality holds if $C$ is linear.

**Proof.** Let $z = ra + tc \in C^{\perp L_s}$ where $r, t \in \mathbb{F}_3^{2n}$. Then, $\alpha_{E_3}(z) = \alpha_{E_3}(ra + tc) = r$ is an arbitrary codeword of $\operatorname{res}(C^{\perp L_s})$. Therefore, let $t' \in \operatorname{tor}(C)$, then $t'c \in C$. This together with $z \in C^{\perp L_s}$, we get

$$0 = (z, t'c)_s = (ra + tc, t'c)_s = (ra, t'c)_s + (tc, t'c)_s = (r, t')_s c.$$

This yields $(r, t')_s = 0$. Hence, $r \in \operatorname{tor}(C^{\perp L_s})$. So, $\operatorname{tor}(C^{\perp L_s}) \subseteq \operatorname{res}(C)^{\perp s}$.

Now, suppose that $C$ is a linear code. Then, let $z \in C$. By [8, Theorem 3.5], $z = xa + yc$ for some $x \in \operatorname{res}(C)$ and $y \in \operatorname{tor}(C)$. Let $y' \in \operatorname{tor}(C)^{\perp s}$, we have $\operatorname{res}(C) \subseteq \operatorname{tor}(C)$. Then, we obtain

$$(y'a, z)_s = (y'a, y'a + yc)_s = (y'a, xa)_s + (y'a, yc)_s = (y', x)_s a + (y', y)_s c = 0 + 0 = 0.$$

Hence, $y'a \in C^{\perp L_s}$. This implies that, $\alpha_{E_3}(y'a) = y' \in \operatorname{res}(C^{\perp L_s})$. So, $\operatorname{tor}(C)^{\perp s} \subseteq \operatorname{res}(C^{\perp L_s})$. Therefore, $\operatorname{res}(C^{\perp L_s}) = \operatorname{tor}(C)^{\perp s}$. $\square$

**Proposition 10.** For a linear $E_3$ code, $C$, of length $2n$. We have,

$C$ is free if, and only if, $\operatorname{res}(C^{\perp R_s}) = \operatorname{res}(C^{\perp L_s})$.

**Proof.** Suppose $C$ is a linear $E_3$ code. By Theorem 6, $\operatorname{res}(C^{\perp R_s}) = \operatorname{res}(C)^{\perp s}$. According to Proposition 9, $\operatorname{res}(C^{\perp L_s}) = \operatorname{tor}(C)^{\perp s}$. Since $C$ is free, $\operatorname{res}(C) = \operatorname{tor}(C)$. Thus, $\operatorname{res}(C)^{\perp s} = \operatorname{tor}(C)^{\perp s}$. Hence, $\operatorname{res}(C^{\perp R_s}) = \operatorname{res}(C^{\perp L_s})$.

For the inverse assertion. Assume, $C$ is a linear $E_3$ code with $\operatorname{res}(C^{\perp R_s}) = \operatorname{res}(C^{\perp L_s})$. By Theorem 6 and Proposition 9, $\operatorname{tor}(C)^{\perp s} = \operatorname{res}(C)^{\perp s}$. So, $\operatorname{tor}(C) = \operatorname{res}(C)$. Hence, $C$ is free. $\square$

In what follows, we give an example to describe Theorem 4 and Proposition 7.

**Example 2.** Let $C$ be an additive $E_3$ code of length 4 and additive generator matrix

$$G = \begin{bmatrix} a & 2b & 0 & 0 \\ 0 & 0 & a & 2b \end{bmatrix}$$

Let $(y, y', z, z') \in C^{\perp R_s}$. Then,

$((a, 2b, 0, 0), (y, y', z, z'))_s = 0 \text{ and } ((0, 0, a, 2b), (y, y', z, z'))_s = 0.$$
These imply that $az + 2bz' = 0$ and $2ay + by' = 0$. Since $ax = bx = x$ for any $x \in E_3$, we get $z + 2z' = 0$ and $2y + y' = 0$. So, $z' = z$ and $y' = y$. Hence, $C^{\perp R_s} = \{(y, y, z, z) | y, z \in E_3\}$. It is easy to derive, $C \cap C^{\perp R_s} = C_c \cap C^{\perp R_s} = \{0\}$. Furthermore, $|C| = 9$ and $|C^{\perp R_s}| = 9^2$. So, $|C||C^{\perp R_s}| = 9^3 < 9^4$. We add $(a, 2b, 0, 0)c = (c, 2c, 0, 0)$ and $(0, 0, a, 2b)c = (0, 0, 2c, c)$ to G, then we get $G'$ where

$$G' = \begin{bmatrix} a & 2b & 0 & 0 \\ 0 & 0 & a & 2b \\ c & 2c & 0 & 0 \\ 0 & 0 & c & 2c \end{bmatrix}$$

Let $C'$ be the additive $E_3$-code of length 4 with an additive generator matrix $G'$. Then, according to Theorem 4, $C'$ is right-symplectic ACD over $E_3$.

To prove $C'$ is right-symplectic ACD, we check is this code satisfies the conditions of Proposition 7. First, we prove that $\text{res}(C')$ is ternary symplectic LCD code. Let $(z_1, z_2, z_3, z_4) \in \text{res}(C')^{\perp s}$. Then,

$$((y, y', z, z'), (1, 2, 0, 0))_s = 0 \text{ and } ((y, y', z, z'), (0, 0, 1, 2))_s = 0.$$

Thus, $2z + z' = 0$ and $2y + y' = 0$. So, $z' = z_3$ and $y' = y$. Hence, $\text{res}(C')^{\perp s} = \{(y, y, z, z) | z \in \mathbb{F}_3\}$. This gives $\text{res}(C') \cap \text{res}(C')^{\perp s} = \{0\}$. Hence, $\text{res}(C')$ is a ternary symplectic LCD.

Clearly, $\text{res}(C')$ has the generator matrix $G'_1 = \begin{bmatrix} 1 & 2 & 0 & 0 \\ 0 & 0 & 1 & 2 \end{bmatrix}$ and the generator matrix of $\text{tor}(C')$ is $G'_2 = \begin{bmatrix} 1 & 2 & 0 & 0 \\ 0 & 0 & 1 & 2 \end{bmatrix}$. These show that $d_1 = d_2 = 2$.

Therefore, $\text{tor}(C')c$ has generator matrix $\begin{bmatrix} c & 2c & 0 & 0 \\ 0 & 0 & c & 2c \end{bmatrix}$.

By Theorem 5, $C^{\perp R_s} = \langle \text{res}(C')^{\perp s} \rangle_{E_3}$. It is easy to see that, $\text{tor}(C')c \cap C^{\perp R_s} = \{0\}$. Hence, $C'$ is right-symplectic ACD code over $E_3$ according to Proposition 7.

## 5. Conclusions

We have introduced symplectic QSD, LCD, and ACD codes over non-commutative non-unitary local ring $E_3$ with nine elements. Using symplectic-self-orthogonal ternary linear codes, we have given the multi-level construction of symplectic QSD codes. We have shown the relationship between symplectic LCD $E_3$ codes and ternary symplectic LCD codes. Further, the right-symplectic ACD $E_3$ codes were introduced and for the existence of such codes, and several conditions have been stated. We have also characterized the right-symplectic ACD codes over $E_3$.

The construction of quantum codes can be achieved by deriving classical codes over finite fields with the symplectic-self-orthogonal property [14,15]. Therefore, these codes could be applied to construct quantum codes over this ring.

Additionally, it will be interesting to derive a mass formula for symplectic QSD and self-dual $E_3$ codes and classify them in modest lengths. Moreover, the absence of non-trivial symplectic left LCD codes over $E_3$ makes the study of symplectic left hull codes over this ring a natural direction for future work.

**Author Contributions:** Conceptualization, S.M., P.S., A.A. and W.B.; Methodology, S.M. and P.S.; Validation, S.M., A.A. and W.B.; Formal analysis, S.M.; Investigation, S.M. and P.S.; Resources, S.M., P.S. and A.A.; Data curation, S.M., P.S. and W.B.; Writing—original draft, S.M.; Writing—review & editing, S.M., P.S., A.A. and W.B.; Visualization, W.B.; Supervision, P.S.; Project administration, P.S. and A.A.; Funding acquisition, P.S., A.A. and W.B. All authors have read and agreed to the published version of the manuscript.
**Funding:** The Deanship of Scientific Research (DSR) at King Abdulaziz University (KAU), Jeddah, Saudi Arabia has funded this project, under grant no. (KEP-PhD-66-130-42).

**Data Availability Statement:** The raw data supporting the conclusions of this article will be made available by the authors on request.

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

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

## References

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

2. Alahmadi, A.; Altassan, A.; Basaffar, W.; Shoaib, H.; Bonnecaze, A.; Solé, P. Type IV codes over a non-unital ring. *J. Algebra Appl.* **2022**, *21*, 2250142.

3. Alahmadi, A.; Melaibari, A.; Solé, P. Duality of Codes Over Non-Unital Rings of Order Four. *IEEE Access* **2023**, *11*, 53120–53133.

4. 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.

5. Alahmadi, A.; Alshuhail, A.; Betty, R.A.; Galvez, L.; Solé, P. The Mass Formula for Self-Orthogonal and Self-Dual Codes over a Non-Unitary Non-Commutative Ring. *Mathematics* **2024**, *15*, 862.

6. Alahmadi, A.; Alshuhail, A.; Solé, P. The mass formula for self-orthogonal and self-dual codes over a non-unitary commutative ring. *AIMS Math. 2023*, *8*, 24367–24378.

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

8. Kushwaha, A.; Yadav, S.; Prakash, S. The Quasi self-dual, Right LCD and ACD codes over a noncommutative non-unital ring. *J. Algebra Comb. Discrete Struct. Appl.* **2024**, *11*, 207–225.

9. Manseri, S.; Betty, R.A.; Galvez, L.; Solé, P. Symplectic codes over a non-unitary ring. *J. Algebra Appl.* **2025**, in press.

10. Manseri, S.; Solé, P. Symplectic ACD codes over a non-commutative non-unitary ring. *Comput. Appl. Math.* **2025**, *44*, 140.

11. Manseri, S.; Alahmadi, A.; Basaffar, W.; Betty, R.A.; Galvez, L.; Solé, P. Symplectic-QSD codes over a non-unital non-local ring. *J. Algebra Appl.* **2025**, submitted.

12. Fine, B. Classification of Finite rings of Order $p^2$. *Math. Mag.* **1993**, *66*, 248–252.

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

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

15. Xu, H.Q.; Du, W. Constructions of symplectic LCD MDS codes. *Bull. Malays. Math. Sci. Soc.* **2021**, *44*, 3377–3390.

**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.