On the application of $M$-projective curvature tensor

in general relativity

Kaushik Chattopadhyay*, Arindam Bhattacharyya** and Dipankar Debnath***

*Department of Mathematics,

Jadavpur University, Kolkata-700032, India

<EMAIL_ADDRESS>
**Department of Mathematics,

Jadavpur University, Kolkata-700032, India

<EMAIL_ADDRESS>
***Department of Mathematics,

Bamanpukur High School(H.S), Nabadwip, India

<EMAIL_ADDRESS>
###### Abstract

In this paper the application of the $M$-projective curvature tensor in the
general theory of relativity has been studied. Firstly, we have proved that an
$M$-projectively flat quasi-Einstein spacetime is of a special class with
respect to an associated symmetric tensor field, followed by the theorem that
a spacetime with vanishing $M$-projective curvature tensor is a spacetime of
quasi-constant curvature. Then we have proved that an $M$-projectively flat
quasi-Einstein spacetime is infinitesimally spatially isotropic relative to
the unit timelike vector field $\xi$. In the next section we have proved that
an $M$-projectively flat Ricci semi-symmetric quasi-Einstein spacetime
satisfying a definite condition is an $N(\frac{2l-m}{6})$-quasi Einstein
spacetime. In the last section, we have firstly proved that an
$M$-projectively flat perfect fluid spacetime with torse-forming vector field
$\xi$ satisfying Einstein field equation with cosmological constant represents
an inflation, then we have found out the curvature of such spacetime, followed
by proving the theorem that the spacetime also becomes semi-symmetric under
these conditions. Lastly, we have found out the square of the length of the
Ricci tensor in this type of spacetime and also proved that if an
$M$-projectively flat perfect fluid spacetime satisfying Einstein field
equation with cosmological constant, with torse-forming vector field $\xi$
admits a symmetric $(0,2)$ tensor $\alpha$ parallel to $\nabla$ then either
$\lambda=\frac{k}{2}(p-\sigma)$ or $\alpha$ is a constant multiple of $g$.

M.S.C.2010: Primary 53C25 ; Secondary 53D10, 53C44.

Keywords: $M$-projective curvature tensor, Riemannian curvature tensor, torse-
forming vector field, Einstein equation.

##  1 Introduction

An Einstein manifold is a Riemannian or pseudo-Riemannian manifold whose Ricci
tensor S of type $(0,2)$ is non-zero and proportional to the metric tensor.
Einstein manifolds form a natural subclass of various classes of Riemannian or
semi-Riemannian manifolds by a curvature condition imposed on their Ricci
tensor [4]. Also in Riemannian geometry as well as in general relativity
theory, the Einstein manifold plays a very important role.

Chaki and Maity [18] generalised the concept of Einstein manifold and
introduced the notion of quasi-Einstein manifold. According to them, a
Riemannian or semi-Riemannian manifold is said to be a quasi-Einstein manifold
if its Ricci tensor S of type $(0,2)$ is non-zero and satisfies the condition

$\displaystyle\ S(U,V)=lg(U,V)+mA(U)A(V),$ (1.1)

where $l$ and $m$ are two non-zero real-valued scalar functions and $A$ is a
non-zero $1$-form equivalent to the unit vector field $\xi$, i.e.
$g(U,\xi)=A(U)$, $g(\xi,\xi)=1$. If $m=0$ then the manifold becomes Einstein.
Quasi-Einstein manifolds are denoted by $(QE)_{n}$, where $n$ is the dimension
of the manifold. The notion of quasi-Einstein manifolds arose during the study
of exact solutions of the Einstein field equations as well as during the
considerations of quasi-umbilical hypersurfaces of semi-Euclidean spaces. For
instance, the Robertson-Walker spacetime is a quasi-Einstein manifold. Also,
quasi-Einstein manifolds can be taken as a model of perfect fluid spacetime in
general relativity. The importance of quasi-Einstein spacetimes lies in the
fact that 4-dimensional semi-Riemannian manifolds are related to study of
general relativistic fluid spacetimes, where the unit vector field $\xi$ is
taken as timelike velocity vector field, that is, $g(\xi,\xi)=-1$.

In the recent papers [1], [23], the application of quasi-Einstein spacetime
and generalised quasi-Einstein spacetime in general relativity have been
studied. Many more works have been done in the spacetime of general relativity
[2], [15], [25], [26], [29], [30], [31].

Let $(M_{n},g)$ be an $n$-dimensional differentiable manifold of class
$C^{\infty}$ with the metric tensor $g$ and the Riemannian connection
$\nabla$. In 1971 G. P. Pokhariyal and R. S. Mishra
$(\cite[cite]{[\@@bibref{}{jmh10}{}{}]})$ defined the $M$-projective curvature
tensor as follows

$\displaystyle\tilde{P}(U,V)W=R(U,V)W-\frac{1}{2(n-1)}[S(V,W)U-S(U,W)V$
$\displaystyle\leavevmode\nobreak\ \leavevmode\nobreak\ \leavevmode\nobreak\
\leavevmode\nobreak\ \leavevmode\nobreak\ \leavevmode\nobreak\
\leavevmode\nobreak\ \leavevmode\nobreak\ \leavevmode\nobreak\
\leavevmode\nobreak\ \leavevmode\nobreak\ \leavevmode\nobreak\
\leavevmode\nobreak\ \leavevmode\nobreak\ +g(V,W)QU-g(U,W)QV],$ (1.2)

where $R$ and $S$ are the curvature tensor and the Ricci tensor of $M_{n}$,
respectively. Such a tensor field $\tilde{P}$ is known as the $M$-projective
curvature tensor. Some authors studied the properties and applications of this
tensor [10], [14], [20] and [21]. In 2010, S. K. Chaubey and R. H. Ojha
investigated the M-projective curvature tensor of a Kenmotsu manifold [24].

The concept of perfect fluid spacetime arose while discussing the structure of
this universe. Perfect fluids are often used in the general relativity to
model the idealised distribution of matter, such as the interior of a star or
isotropic pressure. The energy-momentum tensor $\tilde{T}$ of a perfect fluid
spacetime is given by the following equation

$\tilde{T}(U,V)=pg(U,V)+(\sigma+p)A(U)A(V),$ (1.3)

where $\sigma$ is the energy-density and $p$ is the isotropic pressure, $A$ is
defined earlier and the unit vector field $\xi$ is timelike, i.e.
$g(\xi,\xi)=-1$. Einstein field equation with cosmological constant([6]) is
given by

$S(U,V)-\frac{\tilde{r}}{2}g(U,V)+\lambda g(U,V)=k\tilde{T}(U,V),$ (1.4)

where, $S$ is the Ricci tensor, $\tilde{r}$ is the scalar curvature of the
spacetime while $\lambda$, $k$ are the cosmological constant and the
gravitational constant respectively. It’s used to describe the dark energy of
this universe in modern cosmology, which is responsible for the possible
acceleration of this universe. The equations $(1.3)$ and $(1.4)$ together give

$S(U,V)=(\frac{\tilde{r}}{2}-\lambda+pk)g(U,V)+k(\sigma+p)A(U)A(V).$ (1.5)

Comparing to the equation $(1.1)$ we can say the tensor of the equation
$(1.5)$ represents the tensor of a quasi-Einstein manifold.

The $k$-nullity distribution $N(k)$ of a Riemannian manifold $M$ is defined by

$\displaystyle N(k):p\rightarrow N_{p}(k)=$ $\displaystyle\\{W\in
T_{p}(M):R(U,V)W=k[g(V,W)U-g(U,W)V]\\},$ (1.6)

for all $U,V\in T_{p}M$, where $k$ is a smooth function. For a quasi-Einstein
manifold $M$, if the generator $\xi$ belongs to some $N(k)$, then $M$ is said
to be $N(k)$-quasi-Einstein manifold [19] . Özgür and Tripathi proved that for
an $n$-dimensional $N(k)$-quasi Einstein manifold [8], $k=\frac{l+m}{n-1}$,
where $l$ and $m$ are the respective scalar functions and $n$ is the dimension
of the manifold.

In this paper we have first derived some theorems on $M$-projectively flat
spacetimes. After that we have introduced the concept of Ricci semi-symmetric
spacetime with vanishing $M$-projective curvature tensor. Lastly we introduced
the concept of torse-forming vector field in this spacetime and derived some
theorems on it, thereby finding the curvature of the spacetime and finding the
square of the length of the Ricci tensor for this spacetime with torse-forming
vector field.

##  2 Preliminaries

Consider a quasi-Einstein spacetime with associated scalars $l$, $m$ and
associated $1$-form $A$. Then by $(1.1)$, we have

$r=4l-m,$ (2.1)

where $r$ is a scalar curvature of the spacetime. If $\xi$ is a unit timelike
vector field, then $g(\xi,\xi)=-1$. Again from the equation $(1.1)$, we have

$S(\xi,\xi)=m-l,$ (2.2)

For all vector fields $U$ and $V$ we have the following equation,

$g(QU,V)=S(U,V),$ (2.3)

where $Q$ is the symmetric endomorphism of the tangent space at each point of
the manifold corresponding to the Ricci tensor $S$. From the equation $(1.5)$
and $(2.3)$ we can get

$QU=(\frac{\tilde{r}}{2}-\lambda+pk)U+k(\sigma+p)A(U)\xi.$ (2.4)

If the unit timelike vector field $\xi$ is a torse-forming vector field ([5],
[16]) then it satisfies the following equation,

$\nabla_{U}\xi=U+A(U)\xi.$ (2.5)

In [28] Venkatesha and H. A. Kumara proved that:

Theorem 2.1: On a perfect fluid spacetime with torse-forming vector field
$\xi$, the following relation holds

$(\nabla_{U}A)(V)=g(U,V)+A(U)A(V).$ (2.6)

Considering a frame field and taking a contraction over $U$ and $V$ from the
equation $(1.5)$ we get,

$\tilde{r}=4\lambda+k(\sigma-3p).$ (2.7)

##  3 $M$-projectively flat quasi-Einstein spacetime

In this section we consider a quasi-Einstein spacetime with vanishing
$M$-projective curvature tensor. If a spacetime with dimension $n=4$ is
$M$-projectively flat then from the equation $(1.2)$ we have

$R(U,V)W=\frac{1}{6}[S(V,W)U-S(U,W)V+g(V,W)QU-g(U,W)QV].$ (3.1)

Using the equation $(2.3)$ in the equation $(1.1)$ we get

$QU=lU+mA(U)\xi.$ (3.2)

Using the equations (1.1), (3.2) and taking the inner product with $T$ from
$(3.1)$ we get

$\displaystyle\tilde{R}(U,V,W,T)=\frac{l}{3}[g(V,W)g(U,T)-g(U,W)g(V,T)]$
$\displaystyle\leavevmode\nobreak\ \leavevmode\nobreak\ \leavevmode\nobreak\
\leavevmode\nobreak\ \leavevmode\nobreak\ \leavevmode\nobreak\
\leavevmode\nobreak\ \leavevmode\nobreak\ \leavevmode\nobreak\
\leavevmode\nobreak\ \leavevmode\nobreak\ \leavevmode\nobreak\
\leavevmode\nobreak\ \leavevmode\nobreak\ \leavevmode\nobreak\
\leavevmode\nobreak\ \leavevmode\nobreak\
+\frac{m}{6}[g(U,T)A(V)A(W)+g(V,W)A(U)A(T)$ $\displaystyle\leavevmode\nobreak\
\leavevmode\nobreak\ \leavevmode\nobreak\ \leavevmode\nobreak\
\leavevmode\nobreak\ \leavevmode\nobreak\ \leavevmode\nobreak\
\leavevmode\nobreak\ \leavevmode\nobreak\ \leavevmode\nobreak\
\leavevmode\nobreak\ \leavevmode\nobreak\ \leavevmode\nobreak\
\leavevmode\nobreak\ \leavevmode\nobreak\ \leavevmode\nobreak\
\leavevmode\nobreak\ -g(V,T)A(U)A(W)-g(U,W)A(V)A(T)].$ (3.3)

Now taking

$D(U,V)=\sqrt{\frac{l}{3}}g(U,V)+\frac{m}{2\sqrt{3l}}A(U)A(V),$ (3.4)

from the equation $(3.3)$ we have

$\tilde{R}(U,V,W,T)=D(V,W)D(U,T)-D(U,W)D(V,T).$ (3.5)

It is known that an $n$-dimensional Riemannian or semi-Riemannian manifold
whose curvature tensor $\tilde{R}$ of type $(0,4)$ satisfies the condition
$(3.5)$, is called a special manifold with the associated symmetric tensor $D$
and is denoted by the symbol $\psi(D)_{n}$, where $D$ is a symmetric tensor
field of type $(0,2)$. Recently, these types of manifolds are studied in [9]
and [27]. With the use of the equations (3.4) and (3.5) we can state the
following theorem:

Theorem 3.1: An $M$-projectively flat quasi-Einstein spacetime is
$\psi(D)_{4}$, where $D$ is the associated symmetric tensor field.

In [7] B. Y. Chen and K. Yano introduced the concept of quasi-constant
curvature. A manifold is said to be a manifold of quasi-constant curvature if
it satisfies the following condition

$\displaystyle\tilde{R}(U,V,W,T)=p[g(V,W)g(U,T)-g(U,W)g(V,T)]$
$\displaystyle\leavevmode\nobreak\ \leavevmode\nobreak\ \leavevmode\nobreak\
\leavevmode\nobreak\ \leavevmode\nobreak\ \leavevmode\nobreak\
\leavevmode\nobreak\ \leavevmode\nobreak\ \leavevmode\nobreak\
\leavevmode\nobreak\ \leavevmode\nobreak\ \leavevmode\nobreak\
\leavevmode\nobreak\ \leavevmode\nobreak\ \leavevmode\nobreak\
\leavevmode\nobreak\ \leavevmode\nobreak\ \leavevmode\nobreak\
+q[g(U,T)\eta(V)\eta(W)-g(V,T)\eta(U)\eta(W)$
$\displaystyle\leavevmode\nobreak\ \leavevmode\nobreak\ \leavevmode\nobreak\
\leavevmode\nobreak\ \leavevmode\nobreak\ \leavevmode\nobreak\
\leavevmode\nobreak\ \leavevmode\nobreak\ \leavevmode\nobreak\
\leavevmode\nobreak\ \leavevmode\nobreak\ \leavevmode\nobreak\
\leavevmode\nobreak\ \leavevmode\nobreak\ \leavevmode\nobreak\
\leavevmode\nobreak\ \leavevmode\nobreak\ \leavevmode\nobreak\
+g(V,W)\eta(U)\eta(T)-g(U,W)\eta(V\eta(T)],$ (3.6)

where $\tilde{R}$ is the scalar curvature of type (0, 4), $p$ and $q$ are
scalar functions while $g(U,\nu)=\eta(U)$, $\nu$ is the unit vector field,
$\eta$ is the respective $1$-form and $g(\nu,\nu)=1$. Thus in the view of
$(3.3)$ and $(3.6)$ we state the following theorem:

Theorem 3.2: A spacetime with vanishing $M$-projective curvature tensor is a
spacetime of quasi-constant curvature.

Now, let us consider the space
$\xi^{\perp}=\\{X:g(X,\xi)=0,\forall\leavevmode\nobreak\
X\in{\mathchoice{\raisebox{0.0pt}{$\displaystyle\chi$}}{\raisebox{0.0pt}{$\textstyle\chi$}}{\raisebox{0.0pt}{$\scriptstyle\chi$}}{\raisebox{0.0pt}{$\scriptscriptstyle\chi$}}}(M)\\}$.
Let $U$, $V$, $W$ $\in$ $\xi^{\perp}$, then the equation $(3.3)$ will imply

$R(U,V)W=\frac{l}{3}[g(V,W)U-g(U,W)V].$ (3.7)

So, we can state the following theorem:

Theorem 3.3: An $M$-projectively flat quasi-Einstein spacetime becomes an
$N(\frac{l}{3})$-quasi Einstein spacetime provided $U$, $V$, $W$ $\in$
$\xi^{\perp}$, $\xi$ is a unit timelike vector field and $l$ is a non-zero
real-valued scalar function.

We also derive the following corollary:

Corollary 3.1: An $M$-projectively flat quasi-Einstein spacetime satisfies the
following results,

$\displaystyle\leavevmode\nobreak\ \leavevmode\nobreak\ \leavevmode\nobreak\
\leavevmode\nobreak\ (i)R(U,\xi)V=\frac{m-2l}{6}g(U,V)\xi,$
$\displaystyle\leavevmode\nobreak\ \leavevmode\nobreak\ \leavevmode\nobreak\
\leavevmode\nobreak\ (ii)R(U,\xi)\xi=\frac{m-2l}{6}U,$

where $U$, $V$ $\in$ $\xi^{\perp}$, $\xi$ is a unit timelike vector field and
$l$, $m$ are two non-zero real-valued scalar functions.

After Riemannian manifolds, Lorentzian manifolds form the most important
subclass of pseudo-Riemannian manifolds. They are important in applications of
general relativity. A principal premise of general relativity is that
spacetime can be modelled as a $4$-dimensional Lorentzian manifold of
signature $(3,1)$ or, equivalently, $(1,3)$. With a signature of $(3,1)$ or
$(1,3)$, the manifold is also time-orientable. A Lorentzian manifold is called
infinitesimally spatially isotropic $(\cite[cite]{[\@@bibref{}{jmh6}{}{}]})$
relative to a unit timelike vector field $\xi$ if its curvature tensor $R$
satisfies the relation

$R(X,Y)Z=\alpha[g(Y,Z)X-g(X,Z)Y],$ (3.9)

for all $X$, $Y$, $Z$ $\in$ $\xi^{\perp}$ and $R(X,\xi)\xi=\beta X$ for all
$X\in\xi^{\perp}$, $\alpha$ and $\beta$ are two non-zero real-valued
functions.

From the equation $(3.7)$ and the result $(ii)$ of corollary $(3.1)$ it is
obvious that the manifold is infinitesimally spatially isotropic. Thus we can
state the following theorem:

Theorem 3.4: An $M$-projectively flat quasi-Einstein spacetime is
infinitesimally spatially isotropic relative to the unit timelike vector field
$\xi$.

##  4 $M$-projectively flat Ricci semi-symmetric quasi-Einstein spacetime

In this section we consider a quasi-Einstein spacetime which is Ricci semi-
symmetric. An $n$-dimensional semi-Riemannian manifold is said to be Ricci
semi-symmetric if the tensor $R.S$ and the Tachibana tensor $\tilde{Q}(g,S)$
are linearly dependent, i.e.,

$R(U,V)\cdot S(W,T)=F_{S}\tilde{Q}(g,S)(W,T;U,V)$ (4.1)

holds on $U_{S}$ where $U_{S}=\\{x\in M:S\neq\frac{r}{n}g\leavevmode\nobreak\
at\leavevmode\nobreak\ x\\}$ and $F_{S}$ is a scalar function on $U_{S}$. Now
we know that

$R(U,V)\cdot S(W,T)=-S(R(U,V)W,T)-S(W,R(U,V)T),$ (4.2)

using the equation $(4.1)$ we have

$F_{S}\tilde{Q}(g,S)(W,T;U,V)=-S(R(U,V)W,T)-S(W,R(U,V)T).$ (4.3)

We also know that

$(U\wedge_{g}V)W=g(V,W)U-g(U,W)V.$ (4.4)

Now if it is a Ricci semi-symmetric quasi-Einstein spacetime then using the
equations $(4.2)$, $(4.3)$ and $(4.4)$ we get

$\displaystyle S(R(U,V)W,T)+S(W,R(U,V)T)=F_{S}[g(V,W)S(U,T)-g(U,W)S(V,T)$
$\displaystyle\leavevmode\nobreak\ \leavevmode\nobreak\ \leavevmode\nobreak\
\leavevmode\nobreak\ \leavevmode\nobreak\ \leavevmode\nobreak\
\leavevmode\nobreak\ \leavevmode\nobreak\ \leavevmode\nobreak\
\leavevmode\nobreak\ \leavevmode\nobreak\ \leavevmode\nobreak\
\leavevmode\nobreak\ \leavevmode\nobreak\ \leavevmode\nobreak\
\leavevmode\nobreak\ \leavevmode\nobreak\ \leavevmode\nobreak\
\leavevmode\nobreak\ \leavevmode\nobreak\ \leavevmode\nobreak\
\leavevmode\nobreak\ \leavevmode\nobreak\ \leavevmode\nobreak\
\leavevmode\nobreak\ \leavevmode\nobreak\ \leavevmode\nobreak\
\leavevmode\nobreak\ \leavevmode\nobreak\ \leavevmode\nobreak\
\leavevmode\nobreak\ \leavevmode\nobreak\ \leavevmode\nobreak\
\leavevmode\nobreak\ \leavevmode\nobreak\ \leavevmode\nobreak\
\leavevmode\nobreak\ \leavevmode\nobreak\ \leavevmode\nobreak\
\leavevmode\nobreak\ \leavevmode\nobreak\ \leavevmode\nobreak\
\leavevmode\nobreak\ \leavevmode\nobreak\ \leavevmode\nobreak\
\leavevmode\nobreak\ +g(V,T)S(W,U)-g(U,T)S(V,W)].$ (4.5)

Since we know $\tilde{R}(U,V,W,T)=-\tilde{R}(U,V,T,W)$, thus using the
equation $(1.1)$ in the equation $(4.5)$ we obtain

$\displaystyle A(R(U,V)W)A(T)+A(W)A(R(U,V)T)$
$\displaystyle=F_{S}[g(V,W)A(U)A(T)-g(U,W)A(V)A(T)$
$\displaystyle+g(V,T)A(W)A(U)-g(U,T)A(V)A(W)],$ (4.6)

putting $T=\xi$ in the equation $(4.6)$ and applying the result
$g(R(U,V)\xi,\xi)=g(R(\xi,\xi)U,V)$ we get,

$A(R(U,V)W)=F_{S}[g(V,W)A(U)-g(U,W)A(V)],$ (4.7)

applying the equation $(3.3)$ from $(4.7)$ we get,

$(F_{S}-\frac{2l-m}{6})[g(V,W)A(U)-g(U,W)A(V)]=0.$ (4.8)

So, if $g(V,W)A(U)-g(U,W)A(V)\neq 0$ then

$F_{S}=\frac{2l-m}{6},$ (4.9)

thus using the equations $(4.7)$ and $(4.9)$ we get,

$R(U,V)W=\frac{2l-m}{6}[g(V,W)U-g(U,W)V],$ (4.10)

from the equations $(1.6)$ and $(4.10)$ we observe that the spacetime becomes
an $N(\frac{2l-m}{6})$-quasi Einstein spacetime provided
$g(V,W)A(U)-g(U,W)A(V)\neq 0$. This leads us to the next theorem:

Theorem 4.1: An $M$-projectively flat Ricci semi-symmetric quasi-Einstein
spacetime with $g(V,W)A(U)-g(U,W)A(V)\neq 0$ is an $N(\frac{2l-m}{6})$-quasi
Einstein spacetime, where $l$ and $m$ are two non-zero real valued scalar
functions.

##  5 $M$-projectively flat perfect fluid spacetime with torse-forming vector
field

If a manifold is $M$-projectively flat then using the divergence $\nabla$ to
both the sides of the equation $(3.1)$ we get

$(\nabla_{U}S)(V,W)-(\nabla_{V}S)(U,W)=0,$ (5.1)

using the equation $(2.3)$ we get,

$g((\nabla_{U}Q)V-(\nabla_{V}Q)U,W)=0.$ (5.2)

From the equation $(2.7)$ since we observe $\tilde{r}$ is a constant thus
using the equation $(2.4)$ we get

$k(\sigma+p)[(\nabla_{U}A)(V)\xi+A(V)\nabla_{U}\xi-(\nabla_{V}A)(U)\xi-A(U)\nabla_{V}\xi]=0,$
(5.3)

using the equations $(2.5)$ and $(2.6)$ we get

$k(\sigma+p)[g(V,\xi)U-g(U,\xi)V]=0,$ (5.4)

since $k$ is the gravitational constant hence $k\neq 0$. Thus
$g(V,\xi)U-g(U,\xi)V\neq 0$ implies

$\sigma+p=0,$ (5.5)

which means either $\sigma=p=0$ (empty spacetime) or the perfect fluid
satisfies the vacuum-like equation of state. This allows us to derive the
following theorem:

Theorem 5.1: An $M$-projectively flat perfect fluid spacetime with torse-
forming vector field $\xi$ satisfying Einstein field equation with
cosmological constant is either an empty spacetime or satisfies the vacuumlike
equation of state, provided $g(V,\xi)U-g(U,\xi)V\neq 0$.

Now $\sigma+p=0$ means the fluid behaves as a cosmological constant [13]. This
is also termed as Phantom Barrier [22]. Now in cosmology we know such a choice
$\sigma=-p$ leads to rapid expansion of the spacetime which is now termed as
inflation [17]. In $1981$, to explain the conditions observed in the universe,
astrophysicist Alan Guth proposed cosmic inflation [3]. The term inflation
refers to the explosively rapid expansion of spacetime that occurred a tiny
fraction of a second after the Big Bang. So, we obtain the following theorem:

Theorem 5.2: an $M$-projectively flat perfect fluid spacetime with torse-
forming vector field $\xi$ satisfying Einstein field equation with
cosmological constant represents an inflation.

Now putting $\sigma+p=0$ from the equation $(1.5)$ we get,

$S(U,V)=[\lambda+\frac{k}{2}(\sigma-p)]g(U,V),$ (5.6)

thus the equation $(2.4)$ becomes

$QU=[\lambda+\frac{k}{2}(\sigma-p)]U.$ (5.7)

Using the equations $(5.6)$ and $(5.7)$ in the equation $(3.1)$ we get

$R(U,V)W=\\{\frac{2\lambda+k(\sigma-p)}{6}\\}[g(V,W)U-g(U,W)V].$ (5.8)

Hence we can state the following theorem:

Theorem 5.3: An $M$-Projectively flat perfect fluid spacetime with torse-
forming vector field $\xi$, satisfying Einstein field equation with
cosmological constant is of constant curvature
$\frac{2\lambda+k(\sigma-p)}{6}$.

Consequently we obtain the following theorem as:

Theorem 5.4: An $M$-projectively flat perfect fluid spacetime with torse-
forming vector field $\xi$ satisfying Einstein field equation with
cosmological constant is an Einstein spacetime.

From the equation $(5.8)$ we easily obtain

$\displaystyle(R(U,V)\cdot\tilde{R})(X,Y,Z,W)=-\tilde{R}(R(U,V)X,Y,Z,W)-\tilde{R}(X,R(U,V)Y,Z,W)$
$\displaystyle-\tilde{R}(X,Y,R(U,V)Z,W)-\tilde{R}(X,Y,Z,R(U,V)W)=0,$ (5.9)

which implies the manifold is semi-symmetric. Hence we obtain the following
theorem:

Theorem 5.5: An $M$-projectively flat perfect fluid spacetime with torse-
forming vector field $\xi$ satisfying Einstein field equation with
cosmological constant is a semi-symmetric spacetime.

Replacing $U$ by $QU$ from the equation $(5.6)$ we get

$S(QU,V)=[\lambda+\frac{k}{2}(\sigma-p)]g(QU,V).$ (5.10)

Using the equation $(5.6)$which becomes

$S(QU,V)=[\lambda+\frac{k}{2}(\sigma-p)]S(U,V)=[\lambda+\frac{k}{2}(\sigma-p)]^{2}g(U,V).$
(5.11)

Considering a frame field and taking a contraction over $U$ and $V$ from the
equation $(5.11)$ we get

$||Q||^{2}=4[\lambda+\frac{k}{2}(\sigma-p)]^{2}=[2\lambda+k(\sigma-p)]^{2}.$
(5.12)

Hence we can state the following theorem:

Theorem 5.6: The square of the length of the Ricci tensor of an
$M$-projectively flat perfect fluid spacetime with torse-forming vector field
$\xi$ satisfying Einstein field equation with cosmological constant is
$[2\lambda+k(\sigma-p)]^{2}$.

The Ricci identity is given by

$\nabla^{2}_{U,V}\alpha(X,Y)-\nabla^{2}_{V,U}\alpha(X,Y)=\alpha(R(U,V)X,Y)+\alpha(X,R(U,V)Y),$
(5.13)

where $\alpha$ is a symmetric $(0,2)$ tensor. Now if $\alpha$ is parallel to
$\nabla$ then

$\nabla\alpha=0,$ (5.14)

which further implies

$\nabla^{2}\alpha=0.$ (5.15)

Thus from the equation $(5.13)$ we get

$\alpha(R(U,V)X,Y)+\alpha(X,R(U,V)Y)=0.$ (5.16)

Thus from the equation $(5.8)$ we get

$\displaystyle\\{\frac{2\lambda+k(\sigma-p)}{6}\\}[g(V,X)\alpha(U,Y)-g(U,X)\alpha(V,Y)$
$\displaystyle+g(V,Y)\alpha(U,X)-g(U,Y)\alpha(V,X)]=0.$ (5.17)

Putting $X=Y=V=\xi$ in the equation $(5.17)$ we get,

$-\\{\frac{2\lambda+k(\sigma-p)}{3}\\}[\alpha(U,\xi)+A(U)\alpha(\xi,\xi)]=0,$
(5.18)

which means either $\lambda=\frac{k}{2}(p-\sigma)$ or

$\alpha(U,\xi)=-A(U)\alpha(\xi,\xi).$ (5.19)

Now taking the derivative of $\alpha(\xi,\xi)$ with respect to $V$ and using
the equations $(2.5)$ and $(5.19)$ we get

$V(\alpha(\xi,\xi))=0.$ (5.20)

Taking the derivative of the equation $(5.19)$ with respect to $V$ and using
the equation $(5.20)$ we get

$V(\alpha(U,\xi))=-\alpha(\xi,\xi)V(g(U,\xi)).$ (5.21)

Since $\alpha$ is parallel with respect to $\nabla$ thus using the equation
$(2.5)$ from the equation $(5.21)$ we get

$\alpha(U,V)=-\alpha(\xi,\xi)g(U,V).$ (5.22)

Therefore we obtain the following theorem as:

Theorem 5.7: If an $M$-projectively flat perfect fluid spacetime satisfying
Einstein field equation with cosmological constant, with torse-forming vector
field $\xi$ admits a symmetric $(0,2)$ tensor $\alpha$ parallel to $\nabla$
then either $\lambda=\frac{k}{2}(p-\sigma)$ or $\alpha$ is a constant multiple
of $g$.

## References

  * [1] A. A. Shaikh, D. Y. Yoon and S. K. Hui (2009). ”On quasi-Einstein spacetime”, Tsukuba J. Math. 33(2), 305-326, http://doi.org/10.21099/tkbjm/1267209423.

  * [2] A. Bhattacharyya, T. De and D. Debnath (2009). ”Space time with generalized covariant recurrent energy momentum tensor”, Tamsui Oxford Journal of Mathematical Sciences 25(3), 269-276. https://www.researchgate.net/publication/242597683.

  * [3] Alan H. Guth (1981). ”Inflationary universe: A possible solution to the horizon and flatness problems”, Carnegie Observatories Astrophysics Series, Vol. 2, Measuring and Modeling the Universe, Cambridge Univ. Press, Cambridge, https://doi.org/10.1103/PhysRevD.23.347.

  * [4] A. L. Besse (1987). ”Einstein manifolds”, Ergeb. Math. Grenzgeb., 3. Folge, Bd. 10. Berlin, Heidelberg, New York : Springer-Verlag, ISBN: 978-3-540-74311-8.

  * [5] A. M. Blaga (2017). ”Solitons and geometrical structures in a perfect fluid spacetime”, http://doi.org/10.1216/rmj.2020.50.41.

  * [6] B. O’Neill (1983). ”Semi-Riemannian geometry and application to relativity”, Pure and applied mathematics, Academic press. Inc. New York, ISBN: 9780080570570.

  * [7] B. Y. Chen and K. Yano (1972). ”Hypersurfaces of a conformally flat space”, Tensor (N.S.) 26, 315-321, https://www.researchgate.net/publication/266853315.

  * [8] C. Özgür and M. M. Tripathi (2007). ”On the concircular curvature tensor of an $N(k)$-Einstein manifold”, Math. Pannon. 18, 95-100, http://doi.org/10.4134/JKMS.2005.42.5.883.

  * [9] D. G. Prakasha and B. S. Hadimani (2017). ”$\eta$-Ricci soliton on para-Sasakian manifolds”, J. Geom. 108, 383-392, https://doi.org/10.1007/s00022-016-0345-z.

  * [10] F. O. Zengin (2012). ”$M$-projectively flat spacetimes”, Math. Rep. 4, no. 4, 363-370 https://www.researchgate.net/publication/267090824.

  * [11] G. P. Pokhariyal and R. S. Mishra (1971). ”Curvature tensors and their relativistic significance”, Yokohama Math. J. 19(2), 97-103, http://repository.ias.ac.in/31212/.

  * [12] H. Karcher (1982). ”Infinitesimale charakterisierung von Friedmann-Univeren”, Arch. Math. 38, 58-64, https://doi.org/10.1007/BF01304758.

  * [13] H. Stephani, D. Kramer, M. MacCallum, C. Hoenselaers and E. Herlt (2003). ”Exact Solutions of Einstein’s Field Equations Cambridge Monogr. on Math. Phys. Cambridge Univ. Press, 2nd edition, Cambridge, https://doi.org/10.1017/CBO9780511535185.

  * [14] K. Chattopadhyay, A. Bhattacharyya and D. Debnath (2020). ”A Study of spacetimes with vanishing $M$-projective curvature tensor”, Accepted, Journal of the Tensor Society of India.

  * [15] K. Chattopadhyay, N. Bhunia and A. Bhattacharyya (2018). ”On Ricci-symmetric mixed generalized quasi Einstein spacetime”, Bull. Cal. Math. Soc. 110(6), 513-524, https://www.researchgate.net/publication/343136926.

  * [16] K. Yano (1994). ”On torse-forming direction in Riemannian spaces”, Proc. Imp. Acad. Tokyo. 20, 340-345, http:/doi.org/10.3792/pia/1195572958.

  * [17] L. Amendola and S. Tsujikawa (2010). ”Dark Energy: Theory and Observations”, Cambridge Univ. Press, Cambridge, ISBN: 9780521516006.

  * [18] M. C. Chaki and R. K. Maity (2000). ”On quasi-Einstein manifolds”, Publ. Math. Debrecen 57, 297-306, http://publi.math.unideb.hu/load_pdf.php?p=641.

  * [19] M. M. Tripathi and J. S. Kim (2007). ”On N(k)-Einstein manifolds”, Commun. Korean Math. Soc. 22(3), 411-417, https://doi.org/10.4134/CKMS.2007.22.3.411.

  * [20] R. H. Ojha (1975). ”A note on the $M$-projective curvature tensor”, Indian J. Pure Appl. Math. 8(12), 1531-1534, https://insa.nic.in/writereaddata/UpLoadedFiles/IJPAM/20005a78_1531.pdf.

  * [21] R. H. Ojha (1986). ”$M$-projectively flat Sasakian manifolds”, Indian J. Pure Appl. Math. 17(4), 481-484, https://insa.nic.in/writereaddata/UpLoadedFiles/IJPAM/20005a4e_481.pdf.

  * [22] S. Chakraborty, N. Mazumder and R. Biswas (2011). ”Cosmological evolution across phantom crossing and the nature of the horizon”, Astrophys. Space Sci. Libr. 334, 183-186, http://doi.org/10.1007/s10509-011-0704-z.

  * [23] S. Güler and S. A. Demirbaǧ (2016). ”A study of generalized quasi-Einstein spacetime with application in general relativity”, International Journal of Theoretical Physics 55, 548-562, http://doi.org/10.1007/s10773-015-2692-1.

  * [24] S. K. Chaubey and R. H. Ojha (2010). ”On the $M$-projective curvature tensor of a Kenmotsu manifold”, Diff. Geom. Dyn. Syst. 12, 52-60, https://www.researchgate.net/publication/265403632.

  * [25] S. Mallick, Y. J. Suh and U. C. De (2016). ”A spacetime with pseudo-projective curvature tensor”, J. Math. Phys. 57, Paper ID 062501, https://doi.org/10.1063/1.4952699.

  * [26] S. Ray-Guha (2006). ”On perfect fluid pseudo Ricci symmetric spacetime”, Tensor (N.S.) 67, 101-107, https://www.researchgate.net/publication/263047376.

  * [27] Venkatesha and D. M. Naik (2017). ”Certain results on K-para contact and para Sasakian manifold”, J. Geom. 108, 939-952, https://doi.org/10.1007/s00022-017-0387-x.

  * [28] Venkatesha and H. A. Kumara (2019). ”Ricci soliton and geometrical structure in a perfect fluid spacetime with torse-forming vector field”, Afr. Mat., http://doi.org/10.1007/s13370-019-00679-y.

  * [29] Z. Ahsan and M. Ali (2017). ”Curvature tensor for the spacetime of general relativity”, Int. J. of Geom. Methods Mod. Phys. 14(5), 1750078(13 pages), https://doi.org/10.1142/S0219887817500785.

  * [30] Z. Ahsan and M. Ali (2015). ”Quasi-conformal curvature tensor for the spacetime of general relativity”, Palestine Journal of Mathematics, ISSN- 2219-5688, 4(1), 233-240.

  * [31] Z. Ahsan and S. A. Siddiqui (2009). ”Concircular curvature tensor and fluid spacetimes”, Internat. J. Theoret. Phys. 48, 3202-3212, http://doi.org/10.1007/s10773-009-0121-z.


# Linear codes in the folded Hamming distance and
the quasi MDS property

Umberto Martínez-Peñas<EMAIL_ADDRESS>IMUVa-Mathematics Research
Institute,
University of Valladolid, Spain  Rubén Rodríguez-Ballesteros
<EMAIL_ADDRESS><EMAIL_ADDRESS>IMUVa-Mathematics
Research Institute,
University of Valladolid, Spain

###### Abstract

In this work, we study linear codes with the folded Hamming distance, or
equivalently, codes with the classical Hamming distance that are linear over a
subfield. This includes additive codes. We study MDS codes in this setting and
define quasi MDS (QMDS) codes and dually QMDS codes, which attain a more
relaxed variant of the classical Singleton bound. We provide several general
results concerning these codes, including restriction, shortening, weight
distributions, existence, density, geometric description and bounds on their
lengths relative to their field sizes. We provide explicit examples and a
binary construction with optimal lengths relative to their field sizes, which
beats any MDS code.

Keywords: Additive codes, finite geometry, folded Hamming distance, MDS codes,
polynomial ideal codes, weight distributions.

##  1 Introduction

In this manuscript, we study linear codes in the folded Hamming distance or,
equivalently, codes in the classical Hamming distance which are linear over a
subfield (this includes additive codes).

We define quasi MDS codes (or QMDS codes), which lie in between classical MDS
codes and almost MDS codes [11] (their dimensions are larger than those of
almost MDS codes for a given minimum distance). We show that their duals are
not QMDS in general and then define dually QMDS codes (both themselves and
their duals are QMDS), which lie between classical MDS codes and near MDS
codes [9]. As we show in Section 6, there exist dually QMDS codes whose
lengths relative to their field size beat the MDS conjecture [2]. This makes
them an interesting family of codes to study, since they have better
parameters than almost and near MDS codes and at the same time can be longer
than any classical MDS code.

Linear codes in the folded Hamming distance have been studied in the context
of byte error correction [10], low density MDS codes [6, 24] and recently in
relation to quantum codes [3]. Notice also that linear codes in the folded
Hamming distance can be seen as array or matrix codes with the Hamming
distance defined column-wise [6, 24]. In particular, they are a special case
of linear codes in the sum-rank distance [20]. However, most properties and
constructions discussed in this manuscript simply do not hold for the sum-rank
distance in general [7].

Interestingly, most capacity-achieving and efficient list-decodable codes turn
out to be QMDS or dually QMDS codes in the folded Hamming distance. Such codes
fall under the umbrella family of polynomial ideal codes [5, 21], which
include in particular folded Reed–Solomon codes and (univariate) multiplicity
codes (see [5]). We show their dually QMDS property in Section 4.

The contributions of this manuscript are as follows. In Section 2, we provide
some preliminary definitions and results on the folded Hamming distance,
mainly concerning duality and code equivalence. In Section 3, we introduce
QMDS and dually QMDS codes, characterize their minimum distances and
dimensions and study their restricted and shortened codes. In Section 4, we
explicitly show the existence of dually QMDS for all parameters for large
field sizes (using polynomial ideal codes) and then show that the family of
dually QMDS codes is dense. In Section 5, we study their weight distributions,
which make use of the previous results on restriction and shortening, and
which will be later used for bounds on code lengths. In Section 6, we study
how long (dually) QMDS codes can be. We provide two upper bounds on the code
length relative to their field sizes, some examples of QMDS codes and a
general binary construction of dually QMDS codes with optimal lengths, longer
than any MDS code. Finally, in Section 7, we provide a 1-1 correspondence
between equivalence classes of linear codes in the folded Hamming distance and
equivalence classes of pseudo arcs, which are useful for constructing MSRD
codes and PMDS codes [17, 19].

##  2 The folded Hamming distance

In this section, we introduce the folded Hamming distance, define duality and
characterize its linear isometries. In the following, $\mathbb{F}_{q}$ denotes
the finite field with $q$ elements. We will also denote
$[n]=\\{1,2,\ldots,n\\}$ and $[m,n]=\\{m,m+1,\ldots,n\\}$ for integers $m\leq
n$.

######  Definition 1.

For $\mathbf{c}=(\mathbf{c}_{1},\ldots,\mathbf{c}_{n})\in\mathbb{F}_{q}^{rn}$,
where $\mathbf{c}_{i}\in\mathbb{F}_{q}^{r}$ for $i\in[n]$, its folded Hamming
weight is defined as ${\rm
w}_{F}(\mathbf{c})=\lvert\\{i\in[n]:\mathbf{c}_{i}\neq 0\\}\rvert$. We define
the folded Hamming distance between
$\mathbf{c},\mathbf{d}\in\mathbb{F}_{q}^{rn}$ as ${\rm
d}_{F}(\mathbf{c},\mathbf{d})={\rm w}_{F}(\mathbf{c}-\mathbf{d})$. In general,
a code is a subset $\mathcal{C}\subseteq\mathbb{F}_{q}^{rn}$. We define the
minimum folded Hamming distance of $\mathcal{C}$ as ${\rm
d}(\mathcal{C})=\min\\{{\rm
d}_{F}(\mathbf{c},\mathbf{d}):\mathbf{c},\mathbf{d}\in\mathcal{C},\mathbf{c}\neq\mathbf{d}\\}$.

If $\mathcal{C}\subseteq\mathbb{F}_{q}^{rn}$ is $\mathbb{F}_{q}$-linear,
notice that $d={\rm d}(\mathcal{C})=\min\\{{\rm
w}_{F}(\mathbf{c}):\mathbf{c}\in\mathcal{C}\setminus\\{0\\}\\}$. If $k$ is its
dimension, then we say that $\mathcal{C}$ is a code of type $[n,r,k,d]$.

Clearly, $\mathbb{F}_{q}$-linear codes in $\mathbb{F}_{q}^{rn}$ with the
folded Hamming distance are the same as $\mathbb{F}_{q}$-linear codes in
$\mathbb{F}_{q^{r}}^{n}$ with the classical Hamming distance, due to the
following. Let
$\boldsymbol{\beta}=(\beta_{1},\ldots,\beta_{r})\in\mathbb{F}_{q^{r}}^{r}$ be
an ordered basis of $\mathbb{F}_{q^{r}}$ over $\mathbb{F}_{q}$. Define the
expansion map
$\varepsilon_{\boldsymbol{\beta}}:\mathbb{F}_{q^{r}}\longrightarrow\mathbb{F}_{q}^{r}$
by
$\varepsilon_{\boldsymbol{\beta}}(c_{1}\beta_{1}+\cdots+c_{r}\beta_{r})=(c_{1},\ldots,c_{r})$,
for $c_{1},\ldots,c_{r}\in\mathbb{F}_{q}$. If we extend it componentwise, it
is obvious that
$\varepsilon_{\boldsymbol{\beta}}:\mathbb{F}_{q^{r}}^{n}\longrightarrow\mathbb{F}_{q}^{rn}$
is an $\mathbb{F}_{q}$-linear isometry considering the classical Hamming
distance in $\mathbb{F}_{q^{r}}^{n}$ and the folded Hamming distance in
$\mathbb{F}_{q}^{rn}$. Note, however, that over infinite fields (such as
$\mathbb{R}$) there may be no field extension of degree $r$ for every positive
integer $r$.

Notice that additive codes with the classical Hamming distance in
$\mathbb{F}_{q}^{n}$, where $q=p^{r}$ and $p$ is prime, are thus equivalent to
$\mathbb{F}_{p}$-linear codes with the folded Hamming distance in
$\mathbb{F}_{p}^{rn}$.

We will focus on duality based on the usual inner product in
$\mathbb{F}_{q}^{rn}$, given as follows.

######  Definition 2.

We define the inner product between
$\mathbf{c},\mathbf{d}\in\mathbb{F}_{q}^{rn}$ as
$\mathbf{c}\cdot\mathbf{d}=c_{1}d_{1}+\cdots+c_{rn}d_{rn}$, where
$\mathbf{c}=(c_{1},\ldots,c_{rn})$ and $\mathbf{d}=(d_{1},\ldots,d_{rn})$.
Given an $\mathbb{F}_{q}$-linear code
$\mathcal{C}\subseteq\mathbb{F}_{q}^{rn}$, we define its dual as
$\mathcal{C}^{\perp}=\\{\mathbf{d}\in\mathbb{F}_{q}^{rn}:\mathbf{c}\cdot\mathbf{d}=0,\textrm{
for all }\mathbf{c}\in\mathcal{C}\\}$.

Notice that the usual inner product in $\mathbb{F}_{q}^{rn}$ is not
$\mathbb{F}_{q^{r}}$-bilinear when considered in $\mathbb{F}_{q^{r}}^{n}$ via
the maps $\varepsilon_{\boldsymbol{\beta}}$. However, when considering
$\mathbb{F}_{q^{r}}$-linear codes, their duals with respect to the usual inner
products in $\mathbb{F}_{q^{r}}^{n}$ and $\mathbb{F}_{q}^{rn}$ coincide if we
use appropriate expansion maps.

######  Proposition 3.

Let $\mathcal{C}\subseteq\mathbb{F}_{q^{r}}^{n}$ be an
$\mathbb{F}_{q^{r}}$-linear code and let
$\mathcal{C}^{\perp}\subseteq\mathbb{F}_{q^{r}}^{n}$ denote its dual with
respect to the usual inner product in $\mathbb{F}_{q^{r}}^{n}$. If
$\boldsymbol{\beta}=(\beta_{1},\ldots,\beta_{r})$ and
$\boldsymbol{\alpha}=(\alpha_{1},\ldots,\alpha_{r})$ are dual ordered bases of
$\mathbb{F}_{q^{r}}$ over $\mathbb{F}_{q}$ (i.e., ${\rm
Tr}(\beta_{i}\alpha_{j})=\delta_{i,j}$, where ${\rm Tr}$ is the trace of
$\mathbb{F}_{q^{r}}$ over $\mathbb{F}_{q}$), then

$\varepsilon_{\boldsymbol{\beta}}\left(\mathcal{C}^{\perp}\right)=\varepsilon_{\boldsymbol{\alpha}}(\mathcal{C})^{\perp}.$

(Dual bases of $\mathbb{F}_{q^{r}}$ over $\mathbb{F}_{q}$ always exist, see
[16, p. 54].)

###### Proof.

By counting dimensions over $\mathbb{F}_{q}$, we only need to show that
$\varepsilon_{\boldsymbol{\beta}}\left(\mathcal{C}^{\perp}\right)\subseteq\varepsilon_{\boldsymbol{\alpha}}(\mathcal{C})^{\perp}$.
Now this holds since, given $\mathbf{c}=(c_{1},\ldots,c_{n})\in\mathcal{C}$
and $\mathbf{d}=(d_{1},\ldots,d_{n})\in\mathcal{C}^{\perp}$, with
$\varepsilon_{\boldsymbol{\beta}}(c_{i})=(c_{i,1},\ldots,c_{i,r})$ and
$\varepsilon_{\boldsymbol{\alpha}}(d_{i})=(d_{i,1},\ldots,d_{i,r})$, for
$i\in[n]$, we have that

$0={\rm Tr}(0)={\rm
Tr}\left(\sum_{i=1}^{n}c_{i}d_{i}\right)=\sum_{i=1}^{n}\sum_{j=1}^{r}\sum_{k=1}^{r}c_{i,j}d_{i,k}{\rm
Tr}(\beta_{j}\alpha_{k})=\sum_{i=1}^{n}\sum_{j=1}^{r}c_{i,j}d_{i,j}.$

∎

Finally, we notice that the folded Hamming distance in $\mathbb{F}_{q}^{rn}$
coincides with the sum-rank distance in such a space by considering a vector
in $\mathbb{F}_{q}^{rn}$ as a tuple of $n$ matrices over $\mathbb{F}_{q}$ of
size $1\times r$. See [20] for more information on the sum-rank distance. In
particular, the $\mathbb{F}_{q}$-linear isometries for the folded Hamming
distance are known, see [18, Th. 2].

######  Proposition 4 ([18]).

Let $\phi:\mathbb{F}_{q}^{rn}\longrightarrow\mathbb{F}_{q}^{rn}$ be an
$\mathbb{F}_{q}$-linear vector space isomorphism. Then ${\rm
w}_{F}(\phi(\mathbf{c}))={\rm w}_{F}(\mathbf{c})$, for all
$\mathbf{c}\in\mathbb{F}_{q}^{rn}$, if and only if there exist invertible
matrices $A_{1},\ldots,A_{n}\in{\rm GL}_{r}(\mathbb{F}_{q})$ and a permutation
$\sigma:[n]\longrightarrow[n]$ such that, for all
$\mathbf{c}_{1},\ldots,\mathbf{c}_{n}\in\mathbb{F}_{q}^{r}$,

$\phi(\mathbf{c}_{1},\ldots,\mathbf{c}_{n})=\left(\mathbf{c}_{\sigma(1)}A_{1},\ldots,\mathbf{c}_{\sigma(n)}A_{n}\right).$

######  Definition 5.

We say that two linear codes
$\mathcal{C},\mathcal{C}^{\prime}\subseteq\mathbb{F}_{q}^{rn}$ are equivalent
if there is an $\mathbb{F}_{q}$-linear isometry for the folded Hamming
distance $\phi:\mathbb{F}_{q}^{rn}\longrightarrow\mathbb{F}_{q}^{rn}$ such
that $\mathcal{C}^{\prime}=\phi(\mathcal{C})$.

The following result is straightforward from Proposition 4.

######  Corollary 6.

Two linear codes are equivalent if, and only if, so are their duals.

However, note that the results that we will obtain in this manuscript are
either unkown or simply do not hold for the sum-rank distance in general. For
instance, MacWilliams equations (Theorem 5) do not exist in general for the
sum-rank distance [7].

Throughout the remainder of the manuscript, linear will mean
$\mathbb{F}_{q}$-linear.

##  3 Quasi MDS codes

In this section, we provide a relaxed version of the Singleton bound and
define and study QMDS and dually QMDS codes.

Item 1 in the following proposition follows from the classical Singleton bound
for linear or non-linear codes in the classical Hamming distance [14, Th.
2.4.1]. Item 2 is straightforward from Item 1, and Item 3 is the dual
statement.

######  Proposition 7.

Let $\mathcal{C}$ be a linear code of type $[n,r,k,d]$ and let
$\mathcal{C}^{\perp}$ be its dual, of type $[n,r,rn-k,d^{\perp}]$. Then

  1. 1.

$k\leq r(n-d+1)$,

  2. 2.

$d\leq n-\lceil\frac{k}{r}\rceil+1=n-\lfloor\frac{k-1}{r}\rfloor$, and

  3. 3.

$d^{\perp}\leq\lfloor\frac{k}{r}\rfloor+1=\lceil\frac{k+1}{r}\rceil$.

As usual, a linear code is MDS if it attains the bound in Item 1. If $r\mid k$
(necessary for the code to be MDS), then Items 1 and 2 coincide. However, when
$r\nmid k$, the second bound may be attained but the first one cannot. This
motivates the following definition.

######  Definition 8.

We say that a linear code of type $[n,r,k,d]$ is quasi-MDS or QMDS if
$d=n-\lceil\frac{k}{r}\rceil+1=n-\lfloor\frac{k-1}{r}\rfloor$. A linear MDS
code is a QMDS code such that $r\mid k$.

The dual of a linear MDS code is MDS, also for the folded Hamming distance.
The following result has been independently proven in [6, Lemma 3.3], [24, Th.
1] and [3, Th. 9].

######  Proposition 9 ([3, 6, 24]).

A linear code $\mathcal{C}\subseteq\mathbb{F}_{q}^{rn}$ is MDS if, and only
if, so is its dual.

However, this is not the case for QMDS codes in general.

######  Example 10.

Over any field, the linear code of type $[3,3,4,2]$ with the following
generator matrix is QMDS but its dual is of type $[3,3,5,1]$, thus not QMDS:

$G=\left(\begin{array}[]{ccc|ccc|ccc}1&0&0&1&0&0&0&0&0\\\ 0&1&0&0&1&0&0&0&0\\\
0&0&1&0&0&0&0&1&0\\\ 1&0&0&0&1&0&1&0&0\end{array}\right).$

This motivates the following definition (we will give examples in Sections 4
and 6).

######  Definition 11.

A linear code is dually QMDS if both itself and its dual are QMDS.

######  Remark 12.

A $q$-analog of QMDS and dually QMDS codes have been considered before [8],
called quasi maximum rank distance (QMRD) and dually QMRD codes. However, in
the rank metric there exist linear MRD codes for any choice of parameters
[12]. In contrast, QMDS and dually QMDS codes may attain lengths and finite-
field sizes not achievable by MDS codes as we show in Section 6. Other
properties make the folded-Hamming-metric counterpart different in essence,
such as the density results (Section 4) or their applications in practice [3,
5, 6].

A first observation is that the dually QMDS property is preserved by
equivalence, which follows from Corollary 6.

######  Proposition 13.

A code that is equivalent to a dually QMDS code is also dually QMDS.

We may also characterize dually QMDS codes in terms of the sum of the
distances of the code and its dual.

######  Proposition 14.

Let $\mathcal{C}$ be a linear code of type $[n,r,k,d]$ and let
$\mathcal{C}^{\perp}$ be its dual, of type $[n,r,rn-k,d^{\perp}]$. If $r\mid
k$, then either $d+d^{\perp}=n+2$ or $d+d^{\perp}\leq n$, whereas if $r\nmid
k$, then $d+d^{\perp}\leq n+1$. Furthermore, the following hold:

  1. 1.

$\mathcal{C}$ is MDS if, and only if, $\mathcal{C}^{\perp}$ is MDS if, and
only if, $d+d^{\perp}=n+2$.

  2. 2.

$\mathcal{C}$ is dually QMDS and $r\nmid k$ if, and only if,
$d+d^{\perp}=n+1$.

###### Proof.

If we add the Singleton bounds for $\mathcal{C}$ and $\mathcal{C}^{\perp}$
(Items 2 and 3 in Proposition 7), we obtain

$d+d^{\perp}\leq\left(n-\left\lceil\frac{k}{r}\right\rceil+1\right)+\left(\left\lfloor\frac{k}{r}\right\rfloor+1\right)\leq
n+2.$

Notice however that, if $r\nmid k$, then
$\lceil\frac{k}{r}\rceil=\lfloor\frac{k}{r}\rfloor+1$, which implies in this
case that $d+d^{\perp}\leq n+1$. Note also that, if $r\mid k$ and
$d+d^{\perp}=n+1$, then $\mathcal{C}$ is MDS but $\mathcal{C}^{\perp}$ is not
(or viceversa), which is not possible by Proposition 9. Thus if $r\mid k$ and
$d+d^{\perp}<n+2$, then $d+d^{\perp}\leq n$.

In particular, $d+d^{\perp}=n+2$ may only happen if $r\mid k$, in which case
it must also hold that $k=r(n-d+1)$ and $rn-k=r(n-d^{\perp}+1)$, and
$\mathcal{C}$ (thus $\mathcal{C}^{\perp}$) is MDS. Conversely, if
$\mathcal{C}$ (thus $\mathcal{C}^{\perp}$) is MDS, then we have
$d+d^{\perp}=n+2$, and Item 1 is proven.

Similarly, if $r\nmid k$ and $d+d^{\perp}=n+1$, then equalities in both Items
2 and 3 in Proposition 7 must hold, i.e., $\mathcal{C}$ is dually QMDS. The
reversed implication is straightforward and Item 2 is proven. ∎

As in the classical case of MDS codes, we may characterize QMDS codes in terms
of their generator and parity-check matrices. We start with the following
result, which generalizes [14, Cor. 1.4.14 & Th. 1.4.15] from $r=1$ to $r\geq
1$ in general. For a $k\times(rn)$ matrix $G=(G_{1}|\ldots|G_{n})$, where
$G_{i}$ is of size $k\times r$, we say that $G_{i}$ is the $i$th column block
of $G$ formed by $r$ columns.

######  Proposition 15.

Let $\mathcal{C}$ be a linear code of type $[n,r,k,d]$ with generator matrix
$G$ and parity-check matrix $H$.

  1. 1.

$d$ is the maximum number such that the submatrix formed by the $r(n-d+1)$
columns of any set of $n-d+1$ column blocks of $G$ has rank $k$.

  2. 2.

$d-1$ is the maximum number such that the submatrix formed by the $r(d-1)$
columns of any set of $d-1$ column blocks of $H$ has rank $r(d-1)$.

###### Proof.

For Item 1, $d$ is the minimum number such that it is possible to obtain zeros
in $n-d$ column blocks by making (nontrivial) linear combinations with the
rows of $G$. As a consequence, any submatrix formed by the columns of $G$ in
$n-d+1$ column blocks must have rank $k$ since $k\leq r(n-d+1)$, and there
exists $n-d$ column blocks in $G$ whose $r(n-d)$ columns form a matrix of rank
lower than $k$.

For Item 2, since $HG^{\intercal}=0$, any set of $n-d+1$ column blocks of $G$
has maximum rank if, and only if, it is not possible to obtain zeros in
$n-(n-d+1)=d-1$ column blocks in nontrivial linear combinations of the rows of
$H$. In other words, any submatrix formed by the columns of $H$ in $d-1$
column blocks must have rank $r(d-1)$ since $r(d-1)\leq rn-k$. ∎

As a consequence, we obtain the following characterizations of QMDS codes,
which recovers the characterizations of classical MDS codes [14, Th. 2.4.3]
when $r=1$.

######  Corollary 16.

Let $\mathcal{C}$ be a linear code of type $[n,r,k,d]$ with generator matrix
$G$ and parity-check matrix $H$. The following are equivalent:

  1. 1.

$\mathcal{C}$ is QMDS.

  2. 2.

Any $k\times r\lceil\frac{k}{r}\rceil$ submatrix of $G$ formed by
$\lceil\frac{k}{r}\rceil$ column blocks has rank $k$.

  3. 3.

Any $(rn-k)\times r(n-\lceil\frac{k}{r}\rceil)$ submatrix of $H$ formed by
$n-\lceil\frac{k}{r}\rceil$ column blocks has rank
$r(n-\lceil\frac{k}{r}\rceil)$.

In particular, $\mathcal{C}$ is dually QMDS if, and only if, any $k\times
r\lceil\frac{k}{r}\rceil$ submatrix of $G$ formed by $\lceil\frac{k}{r}\rceil$
column blocks has rank $k$ and any $k\times r\lfloor\frac{k}{r}\rfloor$
submatrix of $G$ formed by $\lfloor\frac{k}{r}\rfloor$ column blocks has rank
$r\lfloor\frac{k}{r}\rfloor$.

######  Remark 17.

Note that Proposition 9 follows immediately from the previous corollary.

We now turn to restricted and shortened codes. Apart from being of interest on
their own, we will use them when computing the weight distribution of dually
QMDS codes in Section 5.

######  Definition 18.

Given $I\subseteq[n]$, we define the projection
$\pi_{I}:\mathbb{F}_{q}^{rn}\longrightarrow\mathbb{F}_{q}^{r|I|}$ such that
$\pi_{I}(\mathbf{c}_{1},\ldots,\mathbf{c}_{n})$ $=(\mathbf{c}_{i})_{i\in I}$,
for $\mathbf{c}_{1},\ldots,\mathbf{c}_{n}\in\mathbb{F}_{q}^{r}$.

######  Definition 19.

Given a code $\mathcal{C}\subseteq\mathbb{F}_{q}^{rn}$ and $I\subseteq[n]$, we
define the restricted code $\mathcal{C}^{I}=\pi_{I}(\mathcal{C})$, the null
subcode $\mathcal{C}(I)=\mathcal{C}\cap\ker(\pi_{I})$ and the shortened code
$\mathcal{C}_{I}=\pi_{I}(\mathcal{C}([n]\setminus I))$.

Restricting and shortening QMDS codes yield again QMDS codes.

######  Proposition 20.

Let $\mathcal{C}$ be a linear code of type $[n,r,k,d]$.

  1. 1.

$\mathcal{C}$ is QMDS if, and only if, $\mathcal{C}^{I}$ is of dimension $k$
for all $I\subseteq[n]$ with $r|I|\geq k$.

  2. 2.

If $\mathcal{C}$ is QMDS, then $\mathcal{C}^{I}$ is of dimension $k^{I}$ with
$r(|I|-1)<k^{I}\leq r|I|$ for all $I\subseteq[n]$ with $r|I|<k$.

  3. 3.

$\mathcal{C}$ is QMDS if, and only if, $\mathcal{C}_{I}=0$ for all
$I\subseteq[n]$ with $r(n-|I|)\geq k$.

  4. 4.

If $\mathcal{C}$ is QMDS, then $\mathcal{C}_{I}$ is of dimension $k_{I}$ with
$k-r(n-|I|)\leq k_{I}<k-r(n-|I|)+r$ for all $I\subseteq[n]$ with $r(n-|I|)<k$.

Furthermore, if $\mathcal{C}$ is QMDS, then so are $\mathcal{C}^{I}$ and
$\mathcal{C}_{I}$, for all $I\subseteq[n]$.

###### Proof.

Item 1 (including the fact that $\mathcal{C}^{I}$ is QMDS) follows directly
from Corollary 16.

For Item 3, we have $d>n-\lceil\frac{k}{r}\rceil$ if, and only if,
$\mathcal{C}_{I}=0$ for all $I\subseteq[n]$ with $|I|\leq
n-\lceil\frac{k}{r}\rceil$, which is equivalent to $r(n-|I|)\geq k$.

Next we prove Item 2. Let $I\subseteq[n]$ with $r|I|<k$. Consider a generator
matrix $G$ of $\mathcal{C}$, and let $G_{I}$ be the submatrix of $G$ formed by
the column blocks indexed by $I$. Since $G_{I}$ is of size $k\times(r|I|)$ and
$r|I|<k$, there can be at most $r-1$ columns in $G_{I}$ that linearly depend
on the rest of the columns of $G_{I}$ (otherwise there is a $k\times
r\lceil\frac{k}{r}\rceil$ submatrix of $G$ of rank smaller than $k$,
contradicting Corollary 16). Hence $k^{I}=\dim(\mathcal{C}^{I})\geq
r|I|-(r-1)>r(|I|-1)$ and any nonzero linear code in $\mathbb{F}_{q}^{r|I|}$ of
such a dimension is QMDS.

Finally we prove Item 4. Let $I\subseteq[n]$ with $r(n-|I|)<k$. We have
$k-k_{I}=\dim(\pi_{[n]\setminus I}(\mathcal{C}))\leq r(n-|I|)$. Thus

${\rm d}(\mathcal{C}_{I})\geq d=n-\left\lceil\frac{k}{r}\right\rceil+1\geq
n-\left\lceil\frac{r(n-|I|)+k_{I}}{r}\right\rceil+1=|I|-\left\lceil\frac{k_{I}}{r}\right\rceil+1.$

By the Singleton bound, $\mathcal{C}_{I}$ is QMDS and the inequalities above
are equalities. In particular, $k_{I}+r(n-|I|)\leq
r\lceil\frac{k}{r}\rceil<k+r$, hence $k_{I}<k-r(n-|I|)+r$. ∎

Similarly, any restriction and shortening of a dually QMDS code is again a
dually QMDS code. Moreover, their dimensions characterize the dually QMDS
property.

######  Theorem 1.

For a linear code $\mathcal{C}$ of type $[n,r,k,d]$, the following are
equivalent:

  1. 1.

$\mathcal{C}$ is dually QMDS.

  2. 2.

$\dim(\mathcal{C}^{I})=k$ if $r|I|\geq k$ and $\dim(\mathcal{C}^{I})=r|I|$ if
$r|I|<k$, for all $I\subseteq[n]$.

  3. 3.

$\dim(\mathcal{C}_{I})=k-r(n-|I|)$ if $r(n-|I|)\leq k$ and
$\dim(\mathcal{C}_{I})=0$ if $r(n-|I|)>k$, for all $I\subseteq[n]$.

Furthermore, if $\mathcal{C}$ is dually QMDS, then so are $\mathcal{C}^{I}$
and $\mathcal{C}_{I}$, for all $I\subseteq[n]$.

###### Proof.

We first show that Item 2 implies Item 1. We will repeatedly use
$(\mathcal{C}^{I})^{\perp}=(\mathcal{C}^{\perp})_{I}$ (see [14, Th. 1.5.7]).
First, from $\dim(\mathcal{C}^{I})=k$ if $r|I|\geq k$, we deduce that
$\mathcal{C}$ is QMDS by Proposition 20. Next, if
$|I|\leq\lfloor\frac{k}{r}\rfloor$, then

$\dim((\mathcal{C}^{\perp})_{I})=\dim((\mathcal{C}^{I})^{\perp})=r|I|-\dim(\mathcal{C}^{I})=r|I|-r|I|=0,$

which means that ${\rm
d}(\mathcal{C}^{\perp})\geq\lfloor\frac{k}{r}\rfloor+1$, and we conclude that
$\mathcal{C}$ is dually QMDS.

Using $(\mathcal{C}^{I})^{\perp}=(\mathcal{C}^{\perp})_{I}$, one can similarly
show that Item 3 implies Item 1. Therefore, we only need to prove that Item 1
implies Items 2 and 3, and that $\mathcal{C}^{I}$ and $\mathcal{C}_{I}$ are
dually QMDS.

Assume that $\mathcal{C}$ is dually QMDS. First, $\mathcal{C}^{I}$ and
$\mathcal{C}_{I}$ are QMDS by Proposition 20. Using that
$(\mathcal{C}^{I})^{\perp}=(\mathcal{C}^{\perp})_{I}$,
$(\mathcal{C}_{I})^{\perp}=(\mathcal{C}^{\perp})^{I}$ and that
$\mathcal{C}^{\perp}$ is also QMDS, we deduce that both $\mathcal{C}^{I}$ and
$\mathcal{C}_{I}$ are dually QMDS, again by Proposition 20.

We now compute dimensions. If $r|I|\geq k$, then $\dim(\mathcal{C}^{I})=k$ by
Proposition 20. Now assume that $r|I|<k$. Since $\mathcal{C}^{\perp}$ is QMDS
and $r(n-|I|)>\dim(\mathcal{C}^{\perp})$, then
$\dim((\mathcal{C}^{\perp})_{I})=0$ by Proposition 20. Using again
$(\mathcal{C}^{I})^{\perp}=(\mathcal{C}^{\perp})_{I}$, we have

$\dim(\mathcal{C}^{I})=r|I|-\dim((\mathcal{C}^{I})^{\perp})=r|I|-\dim((\mathcal{C}^{\perp})_{I})=r|I|.$

We now turn to $\mathcal{C}_{I}$. First, using once again
$(\mathcal{C}^{I})^{\perp}=(\mathcal{C}^{\perp})_{I}$, we have that

$\dim(\mathcal{C}_{I})=\dim(((\mathcal{C}^{\perp})^{I})^{\perp})=r|I|-\dim((\mathcal{C}^{\perp})^{I}).$

Using the formula for $\dim((\mathcal{C}^{\perp})^{I})$ already computed
(since $\mathcal{C}^{\perp}$ is dually QMDS), we obtain the formula for
$\dim(\mathcal{C}_{I})$ given in the proposition. ∎

We now illustrate how the dimension formulas in Theorem 1 do not hold for all
QMDS codes.

######  Example 21.

Consider the QMDS code $\mathcal{C}$ of type $[3,3,4,2]$ from Example 10. If
$I=\\{3\\}$, then $\dim(\mathcal{C}^{I})=2\neq 3$ and if $I=\\{1,2\\}$, then
$\dim(\mathcal{C}_{I})=2\neq 1$.

##  4 Existence and density of dually QMDS codes

In this section we show that dually QMDS codes exist for all parameters given
a sufficiently large finite field. We first give an existential result, which
also shows that the family of such codes is dense (they appear with
probability approaching $1$ for large fields). Then we show that the explicit
codes known as polynomial ideal codes [5, 21] are dually QMDS covering general
parameters for sufficiently large finite fields. Later in Section 6, we
explore dually QMDS over small finite fields relative to their code length.

For the existence and density, we will make use of the DeMillo-Lipton-
Schwartz-Zippel bound [15, Lemma 16.2]. We denote by
$\mathbb{F}_{q}[x_{1},x_{2},\dots,x_{m}]$ the polynomial ring in $m$ variables
$x_{1},x_{2},$ $\ldots,x_{m}$ over $\mathbb{F}_{q}$. For
$F\in\mathbb{F}_{q}[x_{1},x_{2},\dots,x_{m}]$, we consider $\deg(F)$ as its
total degree and we denote
$Z(F)=\\{\mathbf{a}\in\mathbb{F}_{q}^{m}:F(\mathbf{a})=0\\}$.

######  Lemma 22 (DeMillo-Lipton-Schwartz-Zippel [15]).

Let $F\in\mathbb{F}_{q}[x_{1},x_{2},\dots,x_{m}]$. Then

$|Z(F)|\leq\deg(F)\cdot q^{m-1}.$

######  Proposition 23.

Let $n,k,r$ be positive integers and let $\mathbb{F}_{q}$ be a finite field
such that $k\leq rn$ and

$C(n,r,k):=k\binom{n}{\lceil\frac{k}{r}\rceil}\binom{r\lceil\frac{k}{r}\rceil}{k}+r\left\lfloor\frac{k}{r}\right\rfloor\binom{n}{\lfloor\frac{k}{r}\rfloor}\binom{k}{r\lfloor\frac{k}{r}\rfloor}<q.$

  1. 1.

There exists at least one dually QMDS code $\mathcal{C}$ of type $[n,r,k,d]$,
$d=n-\lceil\frac{k}{r}\rceil+1$.

  2. 2.

The probability that a code $\mathcal{C}$ of type $[n,r,k,d]$ (where $d$ is
not fixed) chosen uniformly at random is dually QMDS is at least
$1-\frac{C(n,r,k)}{q}$.

###### Proof.

We only need to prove Item 2. Choosing a code of type $[n,r,k,d]$ (where $d$
is not fixed) uniformly at random is equivalent to choosing a full-rank
$k\times(rn)$ matrix $G$ over $\mathbb{F}_{q}$ (modulo multiplying on the left
by invertible $k\times k$ matrices over $\mathbb{F}_{q}$). We consider the
entries of $G$ as variables $x_{1},x_{2},\ldots,x_{m}$ with $m=krn$, and an
instantiation of $G$ consists in choosing a point in $\mathbb{F}_{q}^{m}$
uniformly at random and evaluating the variables $x_{1},x_{2},\ldots,x_{m}$ in
such a point.

By Corollary 16, $G$ generates a dually QMDS code if any $k\times
r\lceil\frac{k}{r}\rceil$ submatrix of $G$ formed by $\lceil\frac{k}{r}\rceil$
column blocks has rank $k$ (QMDS condition), and any $k\times
r\lfloor\frac{k}{r}\rfloor$ submatrix of $G$ formed by
$\lfloor\frac{k}{r}\rfloor$ column blocks has rank
$r\lfloor\frac{k}{r}\rfloor$ (dual QMDS condition). This condition holds if
all of the involved minors are nonzero, i.e., the product of all such minors
is nonzero. Such a product is a polynomial
$F\in\mathbb{F}_{q}[x_{1},x_{2},\ldots,x_{m}]$ of degree $\deg(F)=C(n,r,k)<q$.
The probability that a point in $\mathbb{F}_{q}^{m}$, chosen uniformly at
random, does not lie in $Z(F)$ is

$\frac{q^{m}-|Z(F)|}{q^{m}}\geq\frac{q^{m}-\deg(F)q^{m-1}}{q^{m}}=1-\frac{C(n,r,k)}{q},$

by Lemma 22, and we are done. ∎

Noting that $C(n,r,k)$ only depends on $n,r,k$ and not on $q$, we conclude the
following.

######  Corollary 24.

Dually QMDS codes are dense in the set of codes of type $[n,r,k,d]$ (where $d$
is not fixed) since the probability that a uniformly random code of such a
type is dually QMDS tends to $1$ as $q$ tends to infinity.

######  Remark 25.

In particular, the probability that a uniformly random code of type
$[n,r,k,d]$ (where $d$ is not fixed) is QMDS but not dually QMDS tends to $0$
as $q$ tends to infinity. That is, the family of such codes is sparse.

######  Remark 26.

As shown in [13], maximum rank distance (MRD) codes which are linear over a
subfield are not dense in general. Together with Corollary 24, this shows an
essential difference between MRD and MDS codes that are linear over subfields.
The question remains open in general for the sum-rank distance [20] (for MSRD
codes that are linear over a subfield).

We now turn to an explicit construction that works for any choice of $n,r,k$,
called polynomial ideal codes, introduced in [5], and their generalization
[21]. However, their field size $q$ is far from optimal in general (we will
explore small field sizes in Section 6).

######  Definition 27 (Polynomial ideal codes [5, 21]).

Let $F_{1},F_{2},\ldots,F_{n}\in\mathbb{F}_{q}[x]$ be pairwise coprime
polynomials of degree $r$. By the Chinese remainder theorem, we have the
$\mathbb{F}_{q}$-linear vector space isomorphism

$\varphi:\frac{\mathbb{F}_{q}[x]}{\left(\prod_{i=1}^{n}F_{i}\right)}\longrightarrow\mathbb{F}_{q}^{rn}:F\mapsto\left(F\textrm{
mod }F_{i}\right)_{i=1}^{n},$

where $F$ mod $G$ denotes the remainder of the Euclidean division of $F$ by
$G$, which we identify with a vector in $\mathbb{F}_{q}^{\deg(G)}$ by writing
its coefficients as a list. For $k\in[rn]$, we define the polynomial ideal
code

$\mathcal{C}^{PI}_{k}(F_{1},F_{2},\ldots,F_{n})=\\{\varphi(F):F\in\mathbb{F}_{q}[x],\deg(F)<k\\}.$

Given also $A_{1},\ldots,A_{n}\in{\rm GL}_{r}(\mathbb{F}_{q})$, we define the
generalized polynomial ideal code

$\mathcal{C}^{PI}_{k}(F_{1},\ldots,F_{n};A_{1},\ldots,A_{n})=\\{(\mathbf{c}_{1}A_{1},\ldots,\mathbf{c}_{n}A_{n}):(\mathbf{c}_{1},\ldots,\mathbf{c}_{n})\in\mathcal{C}^{CR}_{k}(F_{1},\ldots,F_{n})\\}.$

Polynomial ideal codes recover as particular cases codes which are known to
have good list-decoding properties, such as folded Reed–Solomon codes and
multiplicity codes, see [5].

Clearly, generalized polynomial ideal codes are equivalent to polynomial ideal
codes by Proposition 4. However, they will be necessary to express duals, as
we show later.

First, we show that generalized polynomial ideal codes are always QMDS.

######  Theorem 2.

The generalized polynomial ideal code
$\mathcal{C}^{PI}_{k}(F_{1},\ldots,F_{n};A_{1},\ldots,A_{n})$ from Definition
27 is QMDS of type $[n,r,k,d]$, $d=n-\lceil\frac{k}{r}\rceil+1$.

###### Proof.

It is enough to prove the result for polynomial ideal codes (i.e., $A_{i}$ the
identity matrix for all $i\in[n]$), by Proposition 4.

First, clearly the code is linear. We now show that it has dimension $k$. It
is enough to show that if $F\in\mathbb{F}_{q}[x]$ of $\deg(F)<k$ satisfies
$\varphi(F)=0$, then $F=0$, since the vector space of polynomials of degree
less than $k$ has dimension $k$. The condition $\varphi(F)=0$ means that
$\prod_{i=1}^{n}F_{i}$ divides $F$ since $F_{1},F_{2},\ldots,F_{n}$ are
pairwise coprime. However, $\deg(\prod_{i=1}^{n}F_{i})=rn\geq k>\deg(F)$, thus
it must hold that $F=0$.

Now we show the QMDS property. Let $F\in\mathbb{F}_{q}[x]$ be such that $F\neq
0$ and $\deg(F)<k$. Assume that $d={\rm
d}_{F}(\mathcal{C}^{PI}_{k}(F_{1},F_{2},\ldots,F_{n}))={\rm
w}_{F}(\varphi(F))$. Without loss of generality, we may assume that $F$ mod
$F_{i}=0$, for $i\in[n-d]$. That is, $\prod_{i=1}^{n-d}F_{i}$ divides $F$
since $F_{1},F_{2},\ldots,F_{n-d}$ are pairwise coprime. Therefore

$r(n-d)=\deg\left(\prod_{i=1}^{n-d}F_{i}\right)\leq\deg(F)<k\leq r(n-d+1),$

where the last inequality is the Singleton bound (Proposition 7). This means
that $\lceil\frac{k}{r}\rceil=n-d+1$, i.e.,
$\mathcal{C}^{PI}_{k}(F_{1},F_{2},\ldots,F_{n})$ is QMDS and we are done. ∎

It remains to show that duals of generalized polynomial ideal codes are again
QMDS. Such duals are hard to describe even in particular cases [21]. However,
when $F_{i}$ completely factorizes in $\mathbb{F}_{q}$, then the duals are of
the same form [21, Th. 3.4].

######  Theorem 3 ([21]).

Let $a_{i,j}\in\mathbb{F}_{q}$, for $i\in[n]$ and $j\in[r]$, be such that
$\\{a_{i,1},\ldots,a_{i,r}\\}\cap\\{a_{j,1},\ldots,a_{j,r}\\}=\varnothing$ if
$i\neq j$ and such that $F_{i}=(x-a_{i,1})\cdots(x-a_{i,r})$, for $i\in[n]$.
Then for all $A_{1},\ldots,A_{n}\in{\rm GL}_{r}(\mathbb{F}_{q})$, there exist
$B_{1},\ldots,B_{n}\in{\rm GL}_{r}(\mathbb{F}_{q})$ such that

$\mathcal{C}^{PI}_{k}(F_{1},\ldots,F_{n};A_{1},\ldots,A_{n})^{\perp}=\mathcal{C}^{PI}_{k}(F_{1},\ldots,F_{n};B_{1},\ldots,B_{n}).$

Combining Theorems 2 and 3, we deduce the following.

######  Corollary 28.

Let $a_{i,j}\in\mathbb{F}_{q}$, for $i\in[n]$ and $j\in[r]$, be such that
$\\{a_{i,1},\ldots,a_{i,r}\\}\cap\\{a_{j,1},\ldots,a_{j,r}\\}=\varnothing$ if
$i\neq j$ and such that $F_{i}=(x-a_{i,1})\cdots(x-a_{i,r})$, for $i\in[n]$.
Then for all $A_{1},\ldots,A_{n}\in{\rm GL}_{r}(\mathbb{F}_{q})$, the linear
code $\mathcal{C}^{PI}_{k}(F_{1},\ldots,F_{n};A_{1},\ldots,A_{n})$ is dually
QMDS.

Notice that these codes may be constructed for $n=q$ (choosing
$a_{i,1}=\ldots=a_{i,r}$, for all $i\in[n]$, which yields multiplicity codes).
Observe that MDS codes (such that $r|k$) exist for $n=q^{r}+1$. In Section 6,
we will construct dually QMDS codes for $n=2^{r+1}-1$ over $\mathbb{F}_{2}$
for some dimensions that are not multiples of $r$.

######  Remark 29.

We will see in Proposition 35 that a subcode of a QMDS code of the right
dimension is again QMDS. In this way, one can obtain QMDS of any dimension for
any length $n\leq q^{r}+1$ by using extended Reed–Solomon codes. However, as
we show in Remark 37, such subcodes are not always dually QMDS. To the best of
our knowledge, the codes in Corollary 28 are the only dually QMDS codes that
cover all possible lengths and dimensions (given sufficiently large fields).

##  5 Weight distributions

In this section, we study weight distributions of linear codes in the folded
Hamming distance.

######  Definition 30.

The (folded) weight distribution of a linear code
$\mathcal{C}\subseteq\mathbb{F}_{q}^{rn}$ is defined as the numbers
$A_{j}\left(\mathcal{C}\right)=\lvert\left\\{\mathbf{c}\in\mathcal{C}:\text{w}_{F}(\mathbf{c})=j\right\\}\rvert$,
for $j\in[0,n]$.

We start by computing the weight distribution of dually QMDS codes. As in the
classical MDS case, the weight distribution of dually QMDS codes only depends
on their parameters, i.e., two dually QMDS codes of the same parameters have
the same distribution. We later obtain a stronger result (Theorem 6) using
MacWilliams equations. However, we give now a simple proof that only relies on
Theorem 1.

######  Theorem 4.

Let $\mathcal{C}$ be a dually QMDS code of type $[n,r,k,d]$. Then $A_{0}=1$,
$A_{j}=0$ for all $j\in[d-1]$, and if $j\in[d,n]$, then

$A_{j}=\binom{n}{j}\sum_{i=0}^{j-d}(-1)^{i}\binom{j}{i}\big{(}q^{k-r(n-j+i)}-1\big{)}.$

###### Proof.

The only non-trivial cases are those with $j\in[d,n]$. By Theorem 1, for
$I\subseteq[n]$,

$|\mathcal{C}_{I}|=\left\\{\begin{array}[]{ll}q^{k-r(n-|I|)}&\textrm{ if
}r(n-|I|)\leq k,\\\ 1&\textrm{ if }r(n-|I|)>k.\end{array}\right.$ (1)

Note that $N_{t}=\sum_{|I|=n-t}|\mathcal{C}_{I}|$ counts the number of words
in $\mathcal{C}$ with folded weight $\leq n-t$, counted once for each
$\mathcal{C}_{I}$ they appear in, where $\lvert I\rvert=n-t$. By (1), we have

$N_{t}=\left\\{\begin{array}[]{ll}\binom{n}{t}q^{k-rt}&\textrm{ if }rt\leq
k,\\\ \binom{n}{t}&\textrm{ if }rt>k.\end{array}\right.$

By the inclusion-exclusion principle, we deduce that

$A_{j}=\sum_{i=0}^{j}(-1)^{i}\binom{n-j+i}{i}N_{n-j+i}=$
$\sum_{i=0}^{\lfloor\frac{k}{r}\rfloor+j-n}(-1)^{i}\binom{n-j+i}{i}\binom{n}{n-j+i}q^{k-r(n-j+i)}+\sum_{i=\lfloor\frac{k}{r}\rfloor+j-n+1}^{j}(-1)^{i}\binom{n-j+i}{i}\binom{n}{n-j+i}.$

Using $\binom{n-j+i}{i}\binom{n}{n-j+i}=\binom{n}{j}\binom{j}{i}$ and
$\sum_{i=j-v+1}^{j}(-1)^{i}\binom{j}{i}=-\sum_{i=0}^{j-v}(-1)^{i}\binom{j}{i}$,
we get

$A_{j}=\binom{n}{j}\sum_{i=0}^{\lfloor\frac{k}{r}\rfloor+j-n}(-1)^{i}\binom{j}{i}\big{(}q^{k-r(n-j+i)}-1\big{)},$

for $j\in[d,n]$. Now, if $r\nmid k$, then we obtain the desired formula since
$\lfloor\frac{k}{r}\rfloor+j-n=\lceil\frac{k}{r}\rceil-1+j-n=j-d$. Finally, if
$r\mid k$, then $\lfloor\frac{k}{r}\rfloor+j-n=\frac{k}{r}-1+j-n=j-d+1$, but
the $(j-d+1)$th term in the sum is zero, and we obtain again the desired
formula. ∎

In fact, when the code is not dually QMDS, we have certain degrees of freedom
for the weight distribution of the code. We show this stronger result in
Theorem 6 below. To prove it, we will need MacWilliams equations for the
folded Hamming distance, which are of interest on their own and are new to the
best of our knowledge.

######  Theorem 5 (MacWilliams Equations).

Let $\mathcal{C}$ be a code of type $[n,r,k,d]$, and let
$A_{j}=A_{j}\left(\mathcal{C}\right)$ and
$A_{j}^{\perp}=A_{j}\left(\mathcal{C}^{\perp}\right)$, for $j\in[0,n]$. Then,
for $v\in[0,n]$,

$\sum_{j=0}^{n-v}\binom{n-j}{v}A_{j}=q^{k-rv}\sum_{j=0}^{v}\binom{n-j}{n-v}A_{j}^{\perp}.$

###### Proof.

Denote $k={\rm dim}\left(\mathcal{C}\right)$ and $k_{I}={\rm
dim}\left(\mathcal{C}^{I}\right)$, for $I\subseteq[n]$. We have

$\sum_{j=0}^{n-v}\binom{n-j}{v}A_{j}=\sum_{\lvert I\rvert=v}q^{k-k_{I}},$ (2)

for $v\in[0,n]$, since both sides count the pairs $(\mathbf{c},I)$ such that
$\mathbf{c}\in\mathcal{C}$, $I\subseteq[n]$, $\lvert I\rvert=v$, and
$\pi_{I}(\mathbf{c})=\mathbf{0}$. First, for $\mathbf{c}\in\mathcal{C}$ such
that ${\rm w}_{F}(\mathbf{c})=j$, there are $\binom{n-j}{v}$ possible sets
$I\subseteq[n]$ with $|I|=v$ and $\pi_{I}(\mathbf{c})=\mathbf{0}$. Second,
given $I\subseteq[n]$ with $|I|=v$, there are $q^{k-k_{I}}$ words in
$\mathcal{C}$ with zeros in the $v$ blocks of $I$, since ${\rm
dim}\left(\mathcal{C}\cap\ker(\pi_{I})\right)={\rm
dim}\left(\mathcal{C}\right)-{\rm
dim}\left(\pi_{I}(\mathcal{C})\right)=k-k_{I}$.

Next, the right-hand side of (2) equals

$q^{k-rv}\sum_{\lvert
I\rvert=v}\left\lvert\left(\mathcal{C}^{I}\right)^{\perp}\right\rvert=q^{k-rv}\sum_{\lvert
I\rvert=v}\sum_{j=0}^{v}A_{j}\left(\left(\mathcal{C}^{I}\right)^{\perp}\right)=q^{k-rv}\sum_{j=0}^{v}\sum_{\lvert
I\rvert=v}A_{j}\left(\left(\mathcal{C}^{I}\right)^{\perp}\right).$ (3)

Now we prove that

$\sum_{\lvert
I\rvert=v}A_{j}\left(\left(\mathcal{C}^{\perp}\right)_{I}\right)=\binom{n-j}{v-j}A_{j}^{\perp}.$
(4)

Both numbers count the possible pairs $(\mathbf{c},I)$ such that
$\mathbf{c}\in\mathcal{C}^{\perp}$, $\text{w}_{F}(\mathbf{c})=j$,
$I\subseteq[n]$, $\lvert I\rvert=v$, and $\pi_{[n]\setminus
I}(\mathbf{c})=\mathbf{0}$. First, for $I\subseteq[n]$ with $|I|=v$, there are
$A_{j}\left(\left(\mathcal{C}^{\perp}\right)_{I}\right)$ words in
$\mathcal{C}^{\perp}$ with weight $j$ and with zeros outside the $v$ blocks of
$I$. Second, for $\mathbf{c}\in\mathcal{C}^{\perp}$ such that ${\rm
w}_{F}(\mathbf{c})=j$, there are $\binom{n-j}{n-v}=\binom{n-j}{v-j}$ possible
sets $I\subseteq[n]$ such that $|I|=v$ and $\pi_{[n]\setminus
I}(\mathbf{c})=\mathbf{0}$.

The theorem follows by using that (2) and (3) are equal, and applying (4)
together with
$\left(\mathcal{C}^{I}\right)^{\perp}=\left(\mathcal{C}^{\perp}\right)_{I}$
(see [14, Th. 1.5.7]). ∎

In order to give the strengthening of Theorem 4, we need the following
preliminary lemma.

######  Lemma 31.

Consider the matrices
$M_{n}=\left((-1)^{n-i+j}\binom{j}{n-i}\right)_{i=0,j=0}^{n,n}$ and
$N_{n}=\left(\binom{n-j}{i}\right)_{i=0,j=0}^{n,n}$, of size
$(n+1)\times(n+1)$ over $\mathbb{Z}$, where $\binom{u}{v}=0$ if $v>u$. Then
$N_{n}=M_{n}^{-1}$.

###### Proof.

We prove that $M_{n}N_{n}=I_{n+1}$, the identity of size $n+1$. The product of
the $i$th row of $M_{n}$ and the $j$th column of $N_{n}$ is

$\sum_{\ell=0}^{n}(-1)^{n-i+\ell}\binom{\ell}{n-i}\binom{n-j}{\ell}.$ (5)

If $i<j$, then clearly (5) equals $0$. If $i=j$, then (5) becomes
$(-1)^{2(n-i)}\binom{n-i}{n-i}\binom{n-i}{n-i}=1$. Finally, if $i>j$, then (5)
becomes

$\sum_{\ell=n-i}^{n-j}(-1)^{n-i+\ell}\binom{\ell}{n-i}\binom{n-j}{\ell}=\sum_{\ell=0}^{i-j}(-1)^{\ell}\binom{n-i+\ell}{n-i}\binom{n-j}{i-j-\ell}.$
(6)

Now, we have that
$(1+x)^{-n+i-1}=\sum_{u=0}^{\infty}(-1)^{u}\binom{n-i+u}{n-i}x^{u}$ (see [1,
p. 56]) and $(1+x)^{n-j}=\sum_{v=0}^{n-j}\binom{n-j}{v}x^{v}$. Using these
series expansions in $\mathbb{Z}[\\![x]\\!]$, it is straightforward to see
that the right-hand side of (6) coincides with the $(i-j)$th coefficient of
$(1+x)^{-n+i-1}(1+x)^{n-j}=(1+x)^{i-j-1}$, which is zero. Therefore (6) equals
zero if $i>j$ and we are done. ∎

We may now prove the above mentioned strengthening of Theorem 4.

######  Theorem 6.

Let $\mathcal{C}$ be a linear code of type $[n,r,k,d]$, and denote
$d^{\perp}={\rm d}(\mathcal{C})$ and $A_{j}=A_{j}(\mathcal{C})$, for
$j\in[0,n]$. Then for $j\in[n-d^{\perp}+1,n]$, it holds

$A_{j}=\sum_{i=0}^{j-n+d^{\perp}-1}(-1)^{i}\left(\binom{n}{j}\binom{j}{i}(q^{k-r(n-j+i)}-1)-\sum_{v=d}^{n-d^{\perp}}\binom{n-j+i}{i}\binom{n-v}{n-j+i}A_{v}\right).$

In particular, the whole weight distribution of $\mathcal{C}$ is determined by
$A_{d},A_{d+1},\ldots,A_{n-d^{\perp}}$.

###### Proof.

Denote $A^{\perp}_{j}=A_{j}(\mathcal{C}^{\perp})$. Using
$A_{0}=A^{\perp}_{0}=1$, $A_{1}=\ldots=A_{d-1}=0$ and
$A^{\perp}_{1}=\ldots=A^{\perp}_{d^{\perp}-1}=0$ in Theorem 5, we have, for
$u\in[0,d^{\perp}-1]$,

$\sum_{j=n-d^{\perp}+1}^{n-u}\binom{n-j}{u}A_{j}=\binom{n}{u}(q^{k-ru}-1)-\sum_{v=d}^{n-d^{\perp}}\binom{n-v}{u}A_{v}.$

We can rewrite these equations in matrix form as

$\left(\begin{array}[]{ccccc}\binom{d^{\perp}-1}{0}&\binom{d^{\perp}-2}{0}&\ldots&\binom{1}{0}&\binom{0}{0}\\\
\binom{d^{\perp}-1}{1}&\binom{d^{\perp}-2}{1}&\ldots&\binom{1}{1}&0\\\
\vdots&\vdots&\ddots&\vdots&\vdots\\\
\binom{d^{\perp}-1}{d^{\perp}-1}&0&\ldots&0&0\end{array}\right)\left(\begin{array}[]{c}A_{n-d^{\perp}+1}\\\
A_{n-d^{\perp}+2}\\\ \vdots\\\ A_{n}\end{array}\right)$
$=\left(\begin{array}[]{ccccc}\binom{n}{0}(q^{k}-1)&\binom{n-d}{0}&\binom{n-d+1}{0}&\ldots&\binom{d^{\perp}}{0}\\\
\binom{n}{1}(q^{k-r}-1)&\binom{n-d}{1}&\binom{n-d+1}{1}&\ldots&\binom{d^{\perp}}{1}\\\
\vdots&\vdots&\vdots&\ddots&\vdots\\\
\binom{n}{d^{\perp}-1}(q^{k-r(d^{\perp}-1)}-1)&\binom{n-d}{d^{\perp}-1}&\binom{n-d+1}{d^{\perp}-1}&\ldots&\binom{d^{\perp}}{d^{\perp}-1}\end{array}\right)\left(\begin{array}[]{c}1\\\
-A_{d}\\\ \vdots\\\ -A_{n-d^{\perp}}\end{array}\right).$

Since the matrix on the left-hand side is $N_{d^{\perp}-1}$, we may solve such
linear equations by multiplying by $M_{d^{\perp}-1}$ on the left on both
sides, by Lemma 31. This tedious calculation yields

$\begin{split}A_{j}&=\sum_{i=n-j}^{d^{\perp}-1}(-1)^{n-j+i}\left(\binom{i}{n-j}\binom{n}{i}(q^{k-ir}-1)-\sum_{v=d}^{n-d^{\perp}}\binom{i}{n-j}\binom{n-v}{i}A_{v}\right)\\\
&=\sum_{i=0}^{j-n+d^{\perp}-1}(-1)^{i}\left(\binom{n-j+i}{n-j}\binom{n}{n-j+i}(q^{k-(i+n-j)r}-1)-\sum_{v=d}^{n-d^{\perp}}\binom{n-j+i}{n-j}\binom{n-v}{n-j+i}A_{v}\right),\end{split}$

for $j\in[n-d^{\perp}+1,n]$, and the theorem follows by using
$\binom{n-j+i}{n-j}\binom{n}{n-j+i}=\binom{n}{j}\binom{j}{i}$. ∎

######  Remark 32.

In the case of dually QMDS codes, we have $d+d^{\perp}\in\\{n+1,n+2\\}$ by
Proposition 14. In that case, we have $d>n-d^{\perp}$ and clearly Theorem 6
recovers Theorem 4 (notice that for linear MDS codes, Theorem 6 gives
$A_{n-d^{\perp}+1}=A_{d-1}=0$ as expected). In all other cases, it holds that
$d+d^{\perp}\leq n$ and we have $n-d-d^{\perp}+1\geq 1$ degrees of freedom for
the weight distribution of the code according to Theorem 6.

We conclude by noting that QMDS codes that are not dually QMDS never have the
same weight distribution as dually QMDS codes. This fact follows by combining
Theorems 4 and 5. It also follows by using Theorem 1 and noting that the first
proof we gave of Theorem 4 only depends on the dimensions of the restricted
codes.

######  Corollary 33.

A linear code $\mathcal{C}$ of type $[n,k,r,d]$ is dually QMDS if, and only
if, its weight distribution $A_{j}(\mathcal{C})$, $j\in[n]$, is given as in
Theorem 4.

######  Example 34.

Consider the code $\mathcal{C}$ of type $[3,3,4,2]$ from Example 10 over
$\mathbb{F}_{2}$, which is QMDS but not dually QMDS. We observe that
$A_{2}(\mathcal{C})\geq 4$, since it has the following codewords of folded
weight $2$: $(1,0,0|1,0,0|0,0,0)$, $(0,1,0|0,1,0|0,0,0)$,
$(0,0,1|0,0,0|0,1,0)$ and $(1,1,0|0,0,0|1,0,0)$. However, according to Theorem
4, a dually QMDS code of type $[3,3,4,2]$ over $\mathbb{F}_{2}$ satisfies
$A_{2}=3$. Since there exists a dually QMDS code of type $[3,3,4,2]$ over
$\mathbb{F}_{2}$ (a restriction of the code in Construction 1 for $r=3$), we
conclude that there exist two QMDS codes with the same parameters and
different weight distributions, in contrast with dually QMDS codes.

##  6 Long QMDS codes over small fields

In this section, we study how long QMDS and dually QMDS codes can be over a
given (preferably small) finite field. We give two bounds and an optimal-
length binary construction.

We start with a simple upper bound on the length $n$ of QMDS codes given by
the distance $d$ and the field size. This result is inspired by the discussion
at the beginning of [22] and we prove it for arbitrary (linear or nonlinear)
codes.

######  Theorem 7.

Let $\mathcal{C}\subseteq\mathbb{F}_{q}^{rn}$ be a (linear or nonlinear) code
of size $q^{k}$ and minimum distance $d=n-\lceil\frac{k}{r}\rceil+1\geq 3$ (in
particular, if $\mathcal{C}$ is linear, then it is QMDS). Then

$n\leq d-3+q^{r\lceil\frac{k}{r}\rceil-k}(q^{r}+1)\leq d-3+q^{r-1}(q^{r}+1).$

In particular, $\lceil\frac{k}{r}\rceil\leq
q^{r\lceil\frac{k}{r}\rceil-k}(q^{r}+1)-2\leq q^{r-1}(q^{r}+1)-2$.

###### Proof.

Let $I=[n]\setminus[d-3]$. Clearly $|\mathcal{C}^{I}|=q^{k}$ and ${\rm
d}(\mathcal{C}^{I})\geq 3$. Thus we may apply the classical Hamming bound to
$\mathcal{C}^{I}$, i.e., the balls $\mathcal{B}(\mathbf{c},1)$ of folded
Hamming radius $1$ around every codeword $\mathbf{c}\in\mathcal{C}^{I}$ are
pairwise disjoint. Thus

$q^{k}\left(1+(n-d+3)(q^{r}-1)\right)=|\mathcal{C}^{I}|\cdot|\mathcal{B}(\mathbf{0},1)|\leq|\mathbb{F}_{q}^{r|I|}|=q^{r(n-d+3)}.$

This inequality can be rearranged as follows,

$\begin{split}n&\leq d-3+\frac{q^{r(n-d+3)-k}-1}{q^{r}-1}\\\
&=d-3+\frac{q^{r(\lceil\frac{k}{r}\rceil+2)-k}-1}{q^{r}-1}\\\
&=d-3+q^{r\lceil\frac{k}{r}\rceil-k}\cdot\frac{q^{2r}-1}{q^{r}-1}+\frac{q^{r\lceil\frac{k}{r}\rceil-k}-1}{q^{r}-1}\\\
&<d-3+q^{r\lceil\frac{k}{r}\rceil-k}(q^{r}+1)+1,\end{split}$

where in the last inequality we use that $0\leq r\lceil\frac{k}{r}\rceil-k<r$,
and we are done. ∎

Notice that if $d$ is unrestricted, then the previous bound does not imply
that $n$ is restricted by $q$ or $r$ (although $k$ is). However, in the case
of dually QMDS codes, we can obtain bounds on $d$ and $n$ in terms of $q$ and
$r$ based on their weight distributions (Theorem 4). This result generalizes
[14, Cor. 7.4.3] from $r=1$ to $r\geq 1$.

######  Theorem 8.

Let $\mathcal{C}$ be a dually QMDS code of type $[n,r,k,d]$ and denote
$d^{\perp}=d(\mathcal{C}^{\perp})$. Let
$\varepsilon=r-(r\lceil\frac{k}{r}\rceil-k)\in[r]$ and
$\delta=r-(k-r\lfloor\frac{k}{r}\rfloor)\in[r]$.

  1. 1.

If $k>r$, then $d\leq
q^{r}-1+\left\lfloor\frac{q^{r}-1}{q^{\varepsilon}-1}\right\rfloor$.

  2. 2.

If $k<r(n-1)$, then $d^{\perp}=\lceil\frac{k+1}{r}\rceil\leq
q^{r}-1+\left\lfloor\frac{q^{r}-1}{q^{\delta}-1}\right\rfloor$.

In particular, if $r<k<r(n-1)$, then

$n\leq\left\\{\begin{array}[]{ll}2q^{r}-2&\textrm{ if }r\mid k,\\\
2q^{r}-3+\left\lfloor\frac{q^{r}-1}{q^{\varepsilon}-1}\right\rfloor+\left\lfloor\frac{q^{r}-1}{q^{\delta}-1}\right\rfloor&\textrm{
if }r\nmid k.\end{array}\right.$

###### Proof.

The bound on $n$ follows by adding the bounds in Items 1 and 2 and using
Proposition 14 for $d+d^{\perp}$. Moreover, Item 2 is the dual statement of
Item 1, hence we only prove the latter.

If $r\nmid k$, then $k>r$ implies $d^{\perp}\geq 2$ and $d=n+1-d^{\perp}\leq
n-1$ by Proposition 14. If $r\mid k$, then $k>r$ implies $k\geq 2r$, hence
$d^{\perp}\geq 3$, thus $d=n+2-d^{\perp}\leq n-1$ too. Therefore in both cases
($r\mid k$ or not), we may consider $A_{d+1}$. By Theorem 4, we have that

$A_{d+1}=\binom{n}{d+1}\left(q^{k+r(d+1-n)}-1-(d+1)\big{(}q^{k+r(d-n)}-1\big{)}\right)\geq
0.$

Now, we have $k+r(d-n)=k-r(\lceil\frac{k}{r}\rceil-1)=\varepsilon$, and the
previous inequality is equivalent to
$q^{\varepsilon+r}-1\geq(d+1)\left(q^{\varepsilon}-1\right)$. Therefore

$d+1\leq\frac{q^{\varepsilon+r}-1}{q^{\varepsilon}-1}=\frac{q^{\varepsilon+r}-q^{r}+q^{r}-1}{q^{\varepsilon}-1}=q^{r}+\frac{q^{r}-1}{q^{\varepsilon}-1}.$

∎

We now turn to constructions. The first observation is that QMDS codes of
lower dimension may be easily obtained from a given QMDS code (e.g., a given
linear MDS code), as follows.

######  Proposition 35.

Let $\mathcal{C}$ be a QMDS code of type $[n,r,k,d]$ and let $k^{\prime}$ be
an integer such that $r(\lceil\frac{k}{r}\rceil-1)<k^{\prime}<k$ (thus
$\lceil\frac{k^{\prime}}{r}\rceil=\lceil\frac{k}{r}\rceil$). Then any linear
subcode of $\mathcal{C}$ of dimension $k^{\prime}$ is QMDS of type
$[n,r,k^{\prime},d]$.

######  Corollary 36.

Let $\mathcal{C}$ be a linear MDS code of type $[n,r,r(n-1),2]$, which exists
over any field (take, e.g., the dual of the classical repetition code). For
any integer $k$ with $r(n-2)<k<r(n-1)$, any linear subcode of $\mathcal{C}$ of
dimension $k$ is a QMDS code of type $[n,r,k,2]$.

Thus there exist QMDS codes of dimension $r(n-2)<k<r(n-1)$ for any length $n$
over any field. Thus the last bound in Theorem 8 does not hold for general
QMDS codes when $r(n-2)<k<r(n-1)$. Moreover, since the distance is $2$, this
result also shows that the bound on $n$ in Theorem 7 does not hold if $d\geq
3$ is not satisfied.

######  Remark 37.

Notice that the QMDS codes from Corollary 36 may not be dually QMDS codes if
$n$ is longer than the bound in Theorem 8. In particular, one may not always
obtain a dually QMDS code by choosing a subcode of a dually QMDS code as in
Proposition 35.

Next we give a construction of optimal-length binary dually QMDS codes, longer
than any MDS code. We first give an example.

######  Example 38.

The linear code over $\mathbb{F}_{2}$ with the following generator matrix is
dually QMDS of type $[7,2,3,6]$:

$G=\left(\begin{array}[]{cc|cc|cc|cc|cc|cc|cc}1&0&1&0&1&0&1&0&1&0&1&0&0&0\\\
0&1&0&1&0&1&0&1&1&0&0&0&1&0\\\ 1&1&1&0&0&1&0&0&0&1&0&1&0&1\end{array}\right).$

The distance of the code is $6$ since any nontrivial $\mathbb{F}_{2}$-linear
combination of the rows of $G$ has exactly one zero block. Thus the code is
QMDS. Moreover, since the rows of any block of $G$ span the whole space
$\mathbb{F}_{2}^{2}$, then the dual has distance $2$ and thus the code is
dually QMDS.

In order to provide the general construction, we need the following technical
lemma.

######  Lemma 39.

Let $r$ be a positive integer and let
$\mathbf{e}_{1},\ldots,\mathbf{e}_{r}\in\mathbb{F}_{2}^{r}$ be the vectors of
the standard basis (i.e., $e_{i,j}=\delta_{i,j}$). Let
$I=\\{i_{1},\ldots,i_{t}\\}\subseteq[r+1]$ with $1\leq
i_{1}<i_{2}<\ldots<i_{t}\leq r+1$ and $t\geq 1$ (i.e., $I\neq\varnothing$).
Finally, define $\mathbf{u}_{I,i}=\mathbf{e}_{i}$ for $i\in[i_{t}-1]$,
$\mathbf{u}_{I,i}=\mathbf{e}_{i-1}$ for $i\in[i_{t}+1,r+1]$,
$\mathbf{u}_{I,i_{t}}=\sum_{j=1}^{t-1}\mathbf{e}_{i_{j}}$ if $t\geq 2$ and
$\mathbf{u}_{I,i_{t}}=\mathbf{0}$ if $t=1$. Then, for any nonempty
$J\subseteq[r+1]$, it holds that $\sum_{i\in J}\mathbf{u}_{I,i}=\mathbf{0}$
if, and only if, $J=I$.

###### Proof.

First $\sum_{i\in
J}\mathbf{u}_{I,i}=2\sum_{j=1}^{t-1}\mathbf{e}_{i_{j}}=\mathbf{0}$ if $J=I$.
Now assume that $J\neq I$. If $i_{t}\notin J$, then all the components of
$\sum_{i\in J}\mathbf{u}_{I,i}$ corresponding to $J\neq\varnothing$ equal $1$,
hence $\sum_{i\in J}\mathbf{u}_{I,i}\neq\mathbf{0}$. If $i_{t}\in J$, then
there exists $j\in I\setminus J$ or $j\in J\setminus I$ with $j\neq i_{t}$. If
$j<i_{t}$, then the $j$th component of $\sum_{i\in J}\mathbf{u}_{I,i}$ must be
$1$, and if $j>i_{t}$, then the $(j-1)$th component of $\sum_{i\in
J}\mathbf{u}_{I,i}$ must be $1$, thus $\sum_{i\in
J}\mathbf{u}_{I,i}\neq\mathbf{0}$ and we are done. ∎

######  Construction 1.

Let $r$ be a positive integer and enumerate all the nonempty subsets of
$[r+1]$ as $I_{1},I_{2},\ldots,I_{n}$, where $n=2^{r+1}-1$. Let
$\mathcal{C}\subseteq\mathbb{F}_{2}^{n}$ be the linear code with generator
matrix

$G=\left(\begin{array}[]{c|c|c|c}\mathbf{u}_{I_{1},1}&\mathbf{u}_{I_{2},1}&\ldots&\mathbf{u}_{I_{n},1}\\\
\vdots&\vdots&\ddots&\vdots\\\
\mathbf{u}_{I_{1},r+1}&\mathbf{u}_{I_{2},r+1}&\ldots&\mathbf{u}_{I_{n},r+1}\end{array}\right),$

where $\mathbf{u}_{I_{i},j}$ is as in the previous lemma, for $i\in[n]$ and
$j\in[r+1]$.

######  Theorem 9.

The linear code in Construction 1 is dually QMDS of type
$[2^{r+1}-1,r,r+1,2^{r+1}-2]$.

###### Proof.

Consider a nonzero codeword
$\mathbf{c}=(\mathbf{c}_{1},\ldots,\mathbf{c}_{n})\in\mathcal{C}$, where
$\mathbf{c}_{i}\in\mathbb{F}_{2}^{r}$, for $i\in[n]$. There exists a nonzero
$\mathbf{x}=(x_{1},\ldots,x_{r+1})\in\mathbb{F}_{2}^{r+1}$ such that
$\mathbf{c}=\mathbf{x}G$. Define $J=\\{j\in[r+1]:x_{j}\neq 0\\}$. Since
$J\neq\varnothing$, there exists $i\in[n]$ such that $J=I_{i}$. By Lemma 39,
we deduce that $\mathbf{c}_{i}=\sum_{j\in J}\mathbf{u}_{J,j}=\mathbf{0}$,
whereas if $\ell\in[n]\setminus\\{i\\}$, then $\mathbf{c}_{\ell}=\sum_{j\in
J}\mathbf{u}_{I_{\ell},j}\neq\mathbf{0}$ since $J\neq I_{\ell}$. In other
words, ${\rm w}_{F}(\mathbf{c})=n-1$, and therefore ${\rm
d}(\mathcal{C})=n-1$. Since the generator matrix $G$ is clearly of full rank
$r+1$, we conclude that $\mathcal{C}$ is QMDS of type
$[2^{r+1}-1,r,r+1,2^{r+1}-2]$. Finally, for every $i\in[n]$, the rows in the
$i$th block of $G$, $\mathbf{u}_{I_{i},1},\ldots,\mathbf{u}_{I_{i},r+1}$, span
the whole space $\mathbb{F}_{2}^{r}$, thus there cannot be a codeword in
$\mathcal{C}^{\perp}$ of folded weight $1$. We conclude that ${\rm
d}(\mathcal{C})\geq 2$, which means that $\mathcal{C}^{\perp}$ is also QMDS
and $\mathcal{C}$ is dually QMDS. ∎

######  Remark 40.

The distance $d=2^{r+1}-2$ of the code in Construction 1 attains the bound in
Item 1 in Theorem 8. Observe that in that theorem, $\varepsilon=1$, thus such
a bound is

$q^{r}-1+\frac{q^{r}-1}{q^{\varepsilon}-1}=2^{r}-1+\frac{2^{r}-1}{2-1}=2^{r+1}-2=d.$

Moreover, for an arbitrary MDS code over $\mathbb{F}_{q}$ of distance $d$ and
size $q^{rk}$, it is known [22] that $n\leq 2q^{r}-2$ if $r<k<r(n-1)$. In the
case $q=2$, we obtain $n\leq 2^{r+1}-2$, but the code in Construction 1
attains the length $n=2^{r+1}-1$, thus is longer than any MDS code. Tighter
bounds for MDS codes hold for prime fields [2], coinciding with the MDS
conjecture.

From the proof of Theorem 9 we also conclude the following property.

######  Corollary 41.

The linear code in Construction 1 is a one-weight or constant-weight code,
that is, all of its nonzero codewords have the same weight.

Furthermore, these are the longest QMDS codes of dimension $k$ with $r+1\leq
k\leq 2r$ over $\mathbb{F}_{2}$.

######  Proposition 42.

Let $r$ and $k$ be positive integers such that $r+1\leq k\leq 2r$. If there
exists a QMDS code of type $[n,r,k,n-1]$ over $\mathbb{F}_{2}$, then $n\leq
2^{r+1}-1$.

###### Proof.

By choosing an $(r+1)$-dimensional subcode, we may assume that there exists a
QMDS code of type $[n,r,r+1,n-1]$ over $\mathbb{F}_{2}$ by Proposition 35.
Consider a generator matrix of the code $G=(G_{1}|\ldots|G_{n})$, where
$G_{i}$ is a binary $(r+1)\times r$ matrix. If
$\mathbf{v}_{i,1},\ldots,\mathbf{v}_{i,r+1}\in\mathbb{F}_{2}^{r}$ denote the
rows of $G_{i}$, then there must exist a nonempty $I_{i}\subseteq[r+1]$ such
that $\sum_{j\in I_{i}}\mathbf{v}_{i,j}=\mathbf{0}$. Therefore, given a
nonzero $\mathbf{x}=(x_{1},\ldots,x_{r+1})\in\mathbb{F}_{2}^{r+1}$, the
codeword $\mathbf{c}=\mathbf{x}G$ is zero at least in the $i$th block if it
holds that $I_{i}=\\{j\in[r+1]:x_{j}=0\\}$ ($I_{i}$ is the support of
$\mathbf{x}$). Since the code has distance $n-1$, then the nonempty sets
$I_{1},\ldots,I_{n}$ must be all distinct, and thus $n\leq 2^{r+1}-1$. ∎

In fact, for $r+2\leq k\leq 2r$, lengths $n=2^{r+1}-1$ are not achievable over
$\mathbb{F}_{2}$ by dually QMDS codes.

######  Proposition 43.

Assume that $r\geq 2$ and $r+2\leq k\leq 2r$. If there exists a dually QMDS
code of type $[n,r,k,n-1]$ over $\mathbb{F}_{2}$, then

$n\leq\frac{4}{3}(2^{r}-1)+1<2^{r+1}-2.$

###### Proof.

By Theorem 8, we have that

$n-1=d\leq 2^{r}-1+\frac{2^{r}-1}{2^{\varepsilon}-1},$

where $\varepsilon=r-(r\lceil\frac{k}{r}\rceil-k)=r-(2r-k)=k-r\geq 2$.
Therefore, we conclude that

$n-1\leq 2^{r}-1+\frac{2^{r}-1}{4-1}=\frac{4}{3}(2^{r}-1),$

and we are done. ∎

We conclude the section with some examples of binary linear QMDS codes that
are longer than any possible MDS code.

######  Example 44.

The linear code over $\mathbb{F}_{2}$ with the following generator matrix is
QMDS of type $[9,2,13,3]$:

$G=\left(\begin{array}[]{cccccccccccc|cc|cc|cc}1&0&0&0&0&0&0&0&0&0&0&0&1&0&1&0&0&0\\\
0&1&0&0&0&0&0&0&0&0&0&0&0&1&0&0&0&1\\\ 0&0&1&0&0&0&0&0&0&0&0&0&0&0&1&0&0&1\\\
0&0&0&1&0&0&0&0&0&0&0&0&1&0&1&1&0&0\\\ 0&0&0&0&1&0&0&0&0&0&0&0&0&1&1&0&0&0\\\
0&0&0&0&0&1&0&0&0&0&0&0&0&0&0&1&0&1\\\ 0&0&0&0&0&0&1&0&0&0&0&0&1&0&1&0&1&0\\\
0&0&0&0&0&0&0&1&0&0&0&0&1&1&0&0&0&1\\\ 0&0&0&0&0&0&0&0&1&0&0&0&0&1&1&0&0&1\\\
0&0&0&0&0&0&0&0&0&1&0&0&0&0&0&1&1&1\\\ 0&0&0&0&0&0&0&0&0&0&1&0&1&0&0&0&1&1\\\
0&0&0&0&0&0&0&0&0&0&0&1&1&1&0&1&0&1\\\
0&0&0&0&0&0&0&0&0&0&0&0&1&1&1&1&1&1\end{array}\right).$

Notice that a (linear or nonlinear) MDS code of distance $d=3$ must satisfy
$n\leq q^{r}+1$ by Theorem 7. In the case $q=r=2$ as in this example, it must
satisfy $n\leq 5$. However, the QMDS code of distance $d=3$ in this example
satisfies $n=9$. Note also that, for this code,
$\lceil\frac{k+1}{r}\rceil=7>6\geq
2^{r}-1+\lfloor\frac{2^{r}-1}{2^{\delta}-1}\rfloor$, thus the bound on $k$ in
Theorem 8, Item 2, does not hold for general QMDS codes.

######  Example 45.

The linear code over $\mathbb{F}_{2}$ with the following generator matrix is
dually QMDS of type $[6,2,5,4]$:

$G=\left(\begin{array}[]{cc|cc|cc|cc|cc|cc}1&0&0&0&0&1&0&0&0&1&1&1\\\
0&1&0&0&0&0&1&1&0&1&0&1\\\ 0&0&1&0&1&1&0&0&0&1&0&1\\\
0&0&0&1&0&0&1&1&1&0&1&0\\\ 0&0&0&0&1&0&0&1&1&0&0&1\end{array}\right).$

According to the MDS conjecture, a (linear or nonlinear) MDS code in
$\mathbb{F}_{2}^{rn}$ with $r=2$ must satisfy $n\leq 2^{r}+1=5$. However, the
dually QMDS code in this examples satisfies $n=6$.

##  7 Pseudo arcs: A geometric description

In this section, we provide a finite-geometry counterpart of linear codes in
the folded Hamming distance, which coincides with what is called arcs or
pseudo arcs in the finite-geometry literature [3]. They generalize projective
systems associated to linear codes in the classical Hamming distance [23] and
partial spreads [4]. Furthermore, pseudo arcs are the building blocks of
recent general families of MSRD and PMDS codes with small field sizes [17,
19].

######  Definition 46.

A pseudo arc of type $[n,r,m,t]$ is a tuple
$\mathcal{H}=(\mathcal{H}_{i})_{i=1}^{n}$ such that

  1. 1.

$\mathcal{H}_{i}\subseteq\mathbb{F}_{q}^{m}$ is an ($\mathbb{F}_{q}$-linear)
subspace of $\dim(\mathcal{H}_{i})=r$, for all $i\in[n]$.

  2. 2.

$t$ is the maximum positive integer such that $\mathcal{H}_{i}\cap(\sum_{j\in
J}\mathcal{H}_{j})=0$, for all $i\in[n]$ and all
$J\subseteq[n]\setminus\\{i\\}$ with $|J|=t-1$ (i.e., any $t$ of the subspaces
are in direct sum).

######  Remark 47.

A partial spread [4] is a pseudo arc of type $[n,r,m,t]$ with $t\geq 2$.

######  Remark 48.

Definition 46 coincides with the definition at the beginning of [3, Sec. 4]
after projectivization, except the parameter $t$ is not considered to be
maximum in [3].

We need to consider nondegenerate pseudo arcs in order to associate them to
linear codes in the folded Hamming distance.

######  Definition 49.

A pseudo arc $\mathcal{H}=(\mathcal{H}_{i})_{i=1}^{n}$ of type $[n,r,m,t]$ is
nondegenerate if $\sum_{i=1}^{n}\mathcal{H}_{i}=\mathbb{F}_{q}^{m}$.

We will now define a correspondence between pseudo arcs and linear codes in
the folded Hamming distance.

######  Definition 50.

Let $\mathcal{H}=(\mathcal{H}_{i})_{i=1}^{n}$ be a pseudo arc of type
$[n,r,m,t]$. We say that $\mathbf{h}=(\mathbf{h}_{i,j})_{i=1,j=1}^{n,r}$ is a
basis of $\mathcal{H}$ if
$\mathbf{h}_{i,1},\ldots,\mathbf{h}_{i,r}\in\mathbb{F}_{q}^{m}$ are $m\times
1$ column vectors forming a basis of $\mathcal{H}_{i}$, for $i\in[n]$. Next,
define the $m\times(rn)$ matrix

$H_{\mathbf{h}}=(\mathbf{h}_{1,1},\ldots,\mathbf{h}_{1,r}|\ldots|\mathbf{h}_{n,1},\ldots,\mathbf{h}_{n,r}).$

Finally, we define the linear code
$\mathcal{C}_{\mathbf{h}}\subseteq\mathbb{F}_{q}^{rn}$ as that with parity-
check matrix $H_{\mathbf{h}}$.

Conversely, given a linear code $\mathcal{C}\subseteq\mathbb{F}_{q}^{rn}$ of
dimension $k=rn-m$ with a (full rank) parity-check matrix $H$, if
$\mathbf{h}_{i,j}\in\mathbb{F}_{q}^{m\times 1}$ is the $((i-1)r+j)$th column
of $H$, then we define $\mathcal{H}_{H}=(\mathcal{H}_{i})_{i=1}^{n}$, where
$\mathcal{H}_{i}$ is the subspace generated by
$\mathbf{h}_{i,1},\ldots,\mathbf{h}_{i,r}$, for $i\in[n]$.

We have the following exact correspondence between parameters.

######  Theorem 10.

  1. 1.

If $\mathcal{H}=(\mathcal{H}_{i})_{i=1}^{n}$ is a nondegenerate pseudo arc of
type $[n,r,m,t]$ with basis $\mathbf{h}$, then $\mathcal{C}_{\mathbf{h}}$ is a
linear code of type $[n,r,k,d]$ with $k=rn-m$ and $d=t+1$.

  2. 2.

If $\mathcal{C}$ is a linear code of type $[n,r,k,d]$ and $H$ is one of its
parity-check matrices, then $\mathcal{H}_{H}$ is a nondegenerate pseudo arc of
type $[n,r,m,t]$ with $m=rn-k$ and $t=d-1$.

###### Proof.

Item 2 is proven similarly, thus we only prove Item 1. The fact that
$\mathcal{H}$ is nondegenerate is equivalent to $H_{\mathbf{h}}$ having rank
$m$. Thus $k=\dim(\mathcal{C}_{\mathbf{h}})=rn-m$. Finally $d=t+1$ follows by
combining Proposition 15 (Item 2) and Definition 46 (Item 2). ∎

######  Remark 51.

A similar connection is made in [17]. However, the notion of degenerateness of
pseudo arcs is not considered there. In particular, the relations between the
corresponding parameters could only be given in [17] as bounds (which are not
always tight) instead of as exact equalities.

However the correspondence in Definition 50 is not bijective. In fact, for
every pseudo arc, we may obtain multiple codes, and viceversa. In order to
obtain a bijection, we need to consider equivalent codes (Definition 5) and
equivalent pseudo arcs, which we now define.

######  Definition 52.

Given pseudo arcs $\mathcal{H}=(\mathcal{H}_{i})_{i=1}^{n}$ and
$\mathcal{H}^{\prime}=(\mathcal{H}^{\prime}_{i})_{i=1}^{n}$, both of type
$[n,r,m,t]$, an equivalence between them is a pair $(\varphi,\sigma)$, where
$\sigma:[n]\longrightarrow[n]$ is a permutation and
$\varphi:\mathbb{F}_{q}^{m}\longrightarrow\mathbb{F}_{q}^{m}$ is a vector
space isomorphism such that
$\mathcal{H}^{\prime}_{\sigma(i)}=\varphi(\mathcal{H}_{i})$, for all
$i\in[n]$. If it exists, we say that $\mathcal{H}$ and $\mathcal{H}^{\prime}$
are equivalent (and clearly one is degenerate if, and only if, so is the
other).

We may now obtain a bijection between equivalence classes of linear codes
(Definition 5) and pseudo arcs (Definition 52).

######  Theorem 11.

  1. 1.

Let $\mathcal{H}$ and $\mathcal{H}^{\prime}$ be equivalent nondegenerate
pseudo arcs with bases $\mathbf{h}$ and $\mathbf{h}^{\prime}$, respectively.
Then $\mathcal{C}_{\mathbf{h}}$ and $\mathcal{C}_{\mathbf{h}^{\prime}}$ are
equivalent.

  2. 2.

Let $\mathcal{C}$ and $\mathcal{C}^{\prime}$ be equivalent linear codes in
$\mathbb{F}_{q}^{rn}$ with parity-check matrices $H$ and $H^{\prime}$,
respectively. Then $\mathcal{H}_{H}$ and $\mathcal{H}_{H^{\prime}}$ are
equivalent.

###### Proof.

Item 2 is proven similarly, thus we only prove Item 1. Let
$\mathcal{H}=(\mathcal{H}_{i})_{i=1}^{n}$ and
$\mathcal{H}^{\prime}=(\mathcal{H}^{\prime}_{i})_{i=1}^{n}$, both of type
$[n,r,m,t]$, and let $(\varphi,\sigma)$ be the equivalence between them. There
exists an invertible matrix $B\in{\rm GL}_{m}(\mathbb{F}_{q})$ such that
$\varphi(\mathbf{x})=B\mathbf{x}$, for every $m\times 1$ column vector
$\mathbf{x}\in\mathbb{F}_{q}^{m}$. Now the equality
$\mathcal{H}^{\prime}_{\sigma(i)}=\varphi(\mathcal{H}_{i})$ means that there
exists an invertible matrix $A_{i}\in{\rm GL}_{r}(\mathbb{F}_{q})$ such that

$B(\mathbf{h}_{i,1},\ldots,\mathbf{h}_{i,r})=(\mathbf{h}^{\prime}_{\sigma(i),1},\ldots,\mathbf{h}^{\prime}_{\sigma(i),r})A_{i},$
(7)

for every $i\in[n]$. Let $P_{\sigma}$ be the only $(rn)\times(rn)$ matrix over
$\mathbb{F}_{q}$ such that
$(\mathbf{c}_{1},\ldots,\mathbf{c}_{n})P_{\sigma}=(\mathbf{c}_{\sigma(1)},\ldots,\mathbf{c}_{\sigma(n)})$,
for all $\mathbf{c}_{1},\ldots,\mathbf{c}_{n}\in\mathbb{F}_{q}^{r}$. Then (7)
is equivalent to

$BH_{\mathbf{h}}=H_{\mathbf{h}^{\prime}}P_{\sigma}{\rm
Diag}(A_{1},\ldots,A_{n}),$

where ${\rm Diag}(A_{1},\ldots,A_{n})$ denotes the block diagonal matrix with
$A_{1},\ldots,A_{n}$ in the main diagonal. Thus we deduce that
$\mathcal{C}_{\mathbf{h}}^{\perp}$ and
$\mathcal{C}_{\mathbf{h}^{\prime}}^{\perp}$ are equivalent by Proposition 4.
Hence $\mathcal{C}_{\mathbf{h}}$ and $\mathcal{C}_{\mathbf{h}^{\prime}}$ are
equivalent by Corollary 6, and we are done. ∎

Combining Theorems 10 and 11, we conclude the following.

######  Corollary 53.

The correspondence in Definition 50 induces a bijection between equivalent
classes of linear codes of type $[n,r,k,d]$ and equivalent classes of
nondegenerate pseudo arcs of type $[n,r,m,t]$ with $m=rn-k$ and $t=d-1$.

As a consequence, all of the results in this paper concerning linear codes in
the folded Hamming distance can be immediately translated to results for
nondegenerate pseudo arcs. We leave the details to the reader.

## Acknowledgements

This work has been supported by MCIN/AEI/10.13039/501100011033 and the
European Union NextGenerationEU/PRTR (Grant no. TED2021-130358B-I00), and by
MICIU/AEI/ 10.13039/501100011033 and ERDF/EU (Grant no. PID2022-138906NB-C21).

## References

  * [1] M. Aigner and S. Axler.  A course in enumeration, volume 238 of Graduate Texts in Mathematics.  Springer-Verlag Berlin Heidelberg, 2007.
  * [2] S. Ball.  On sets of vectors of a finite vector space in which every subset of basis size is a basis.  J. Eur. Math. Soc., 14(3):733–748, 2012.
  * [3] S. Ball, G. Gamboa, and M. Lavrauw.  On additive MDS codes over small fields.  Adv. Math. Commun., 17(4):1–17, 2023.
  * [4] A. Beutelspacher.  Partial spreads in finite projective spaces and partial designs.  Mathematische Zeitschrift, 145(3):211–229, Oct 1975.
  * [5] S. Bhandari, P. Harsha, M. Kumar, and M. Sudan.  Ideal-theoretic explanation of capacity-achieving decoding.  IEEE Trans. Info. Theory, 70(2):1107–1123, 2024.
  * [6] M. Blaum and R. M. Roth.  On lowest density MDS codes.  IEEE Trans. Info. Theory, 45(1):46–59, 1999.
  * [7] E. Byrne, H. Gluesing-Luerssen, and A. Ravagnani.  Fundamental properties of sum-rank-metric codes.  IEEE Trans. Info. Theory, 67(10):6456–6475, 2021.
  * [8] J. de la Cruz, E. Gorla, H. H. López, and A. Ravagnani.  Weight distribution of rank-metric codes.  Des., Codes, Crypto., 86:1–16, 2018.
  * [9] S. M. Dodunekov and I. N. Landjev.  On near-MDS codes.  J. Geometry, 54:30–43, 1995.
  * [10] T. Etzion.  Perfect byte-correcting codes.  IEEE Trans. Info. Theory, 44(7):3140–3146, 1998.
  * [11] A. Faldum and W. Willems.  Codes of small defect.  Des., Codes, Crypto., 10:341–350, 1997.
  * [12] E. M. Gabidulin.  Theory of codes with maximum rank distance.  Prob. Info. Transmission, 21(1):1–12, 1985.
  * [13] A. Gruica and A. Ravagnani.  Common complements of linear subspaces and the sparseness of MRD codes.  SIAM J. Appl. Algebra Geom., 6(2):79–110, 2022.
  * [14] W. C. Huffman and V. Pless.  Fundamentals of error-correcting codes.  Cambridge University Press, Cambridge, 2003.
  * [15] S. Jukna.  Extremal combinatorics: with applications in computer science, volume 571 of Graduate Texts in Mathematics.  Springer-Verlag Berlin Heidelberg, 2011.
  * [16] R. Lidl and H. Niederreiter.  Finite Fields, volume 20 of Encyclopedia of Mathematics and its Applications.  Addison-Wesley, Amsterdam, 1983.
  * [17] S. Liu and C. Xing.  Maximally recoverable local repairable codes from subspace direct sum systems.  IEEE Trans. Info. Theory, 69(4):2300–2310, 2022.
  * [18] U. Martínez-Peñas.  Hamming and simplex codes for the sum-rank metric.  Des., Codes, Crypto., 88:1521––1539, 2020.
  * [19] U. Martínez-Peñas.  A general family of MSRD codes and PMDS codes with smaller field sizes from extended Moore matrices.  SIAM J. Disc. Math., 36(3):1868–1886, 2022.
  * [20] U. Martínez-Peñas, M. Shehadeh, and F. R. Kschischang.  Codes in the Sum-Rank Metric, Fundamentals and Applications.  Found. Trends Commun. Inf. Theory, 19(5):814–1031, 2022.
  * [21] N. Ron-Zewi, S. Venkitesh, and M. Wootters.  Efficient list-decoding of polynomial ideal codes with optimal list size.  2024\.  Preprint: arXiv:2401.14517.
  * [22] R. Singleton.  Maximum distance q-nary codes.  IEEE Trans. Info. Theory, 10(2):116–118, April 1964.
  * [23] M. A. Tsfasman and S. G. Vlăduţ.  Geometric approach to higher weights.  IEEE Trans. Info. Theory, 41(6):1564–1588, 1995.
  * [24] L. Xu, V. Bohossian, J. Bruck, and D. G. Wagner.  Low-density MDS codes and factors of complete graphs.  IEEE Trans. Info. Theory, 45(6):1817–1826, 1999.