#  $q$-Polymatroids and Their Relation to Rank-Metric Codes

Heide Gluesing-Luerssen and Benjamin Jany Corresponding author. Department of
Mathematics, University of Kentucky, Lexington KY 40506-0027, USA;
<EMAIL_ADDRESS>HGL was partially supported by the grant #422479 from the
Simons Foundation.Department of Mathematics, University of Kentucky, Lexington
KY 40506-0027, USA<EMAIL_ADDRESS>
(March 10, 2022)

###### Abstract

It is well known that linear rank-metric codes give rise to $q$-polymatroids.
Analogously to matroid theory one may ask whether a given $q$-polymatroid is
representable by a rank-metric code. We provide an answer by presenting an
example of a $q$-matroid that is not representable by any linear rank-metric
code and, via a relation to paving matroids, provide examples of various
$q$-matroids that are not representable by ${\mathbb{F}}_{q^{m}}$-linear rank-
metric codes. We then go on and introduce deletion and contraction for
$q$-polymatroids and show that they are mutually dual and correspond to
puncturing and shortening of rank-metric codes. Finally, we introduce a
closure operator along with the notion of flats and show that the generalized
rank weights of a rank-metric code are fully determined by the flats of the
associated $q$-polymatroid.

Keywords: Rank-metric codes, $q$-matroids, $q$-polymatroids, representability.

##  1 Introduction

Rank-metric codes – originally introduced by Delsarte [11] and later
independently re-discovered by Gabidulin [12] as well as Roth [24] – have been
in the focus of algebraic coding theory throughout the last 15 years thanks to
their suitability for communication networks. Their coding-theoretic
properties have been studied in detail, and various constructions of optimal
codes, such as MRD codes, have been found. For details we refer to the vast
literature.

In this paper we focus on the algebraic and combinatorial aspects of rank-
metric codes and study them with the aid of associated $q$-polymatroids. We
will focus on linear rank-metric codes, that is, subspaces of some matrix
space ${\mathbb{F}}_{q}^{n\times m}$, endowed with the rank metric. On various
occasions we will consider ${\mathbb{F}}_{q^{m}}$-linear rank-metric codes,
that is, codes that turn into ${\mathbb{F}}_{q^{m}}$-subspaces of
${\mathbb{F}}_{q^{m}}^{n}$ under a suitable identification of
${\mathbb{F}}_{q}^{n\times m}$ with ${\mathbb{F}}_{q^{m}}^{n}$. Not
surprisingly, the algebraic and combinatorial properties of a rank-metric code
depend on the ‘degree of linearity’.

In [19] Jurrius/Pellikaan introduce $q$-matroids and show that
${\mathbb{F}}_{q^{m}}$-linear rank-metric codes give rise to $q$-matroids,
thus providing a vast variety of examples of $q$-matroids. As the terminology
indicates, $q$-matroids form the $q$-analogue of matroids: instead of subsets
of a finite set one considers subspaces of a finite-dimensional vector space
over a finite field. Furthermore, Jurrius/Pellikaan present various
cryptomorphic definitions of $q$-matroids. In [7] (and the precursor [6]),
Byrne and co-authors considerably extend the list of cryptomorphic
definitions. As has been shown in [19, 6, 7], the theory of $q$-matroids
nicely parallels the theory of matroids. It should be noted that $q$-matroids
appeared already much earlier in the Ph.D. thesis [10] but remained unnoticed
in the coding community until [19].

While ${\mathbb{F}}_{q^{m}}$-linear rank-metric codes give rise to
$q$-matroids, this is not the case for ${\mathbb{F}}_{q}$-linear rank-metric
codes. However, as shown by Gorla and co-authors in [16] as well as Shiromoto
[25] and Ghorpade/Johnson [13], ${\mathbb{F}}_{q}$-linear rank-metric codes
induce $q$-polymatroids. This means that the rank function attains rational
values. As for classical polymatroids this seemingly slight generality in the
rank function causes $q$-polymatroids to be much less rigid than $q$-matroids.
An even further generalization appears in [4], where Britz and co-authors
study $q$-demimatroids associated with rank-metric codes.

In this paper we will make further contributions to the theory of
$q$-polymatroids. Different from [16, 13, 25] we will study $q$-polymatroids
over general $n$-dimensional ${\mathbb{F}}_{q}$-vector spaces $E$ rather than
${\mathbb{F}}_{q}^{n}$. This forces us to revisit a duality result from [16]
and show that the equivalence class of the dual $q$-polymatroid does not
depend on the choice of the non-degenerate symmetric bilinear form on $E$. The
purpose of this slight generalization becomes clear only when we study
deletions and contractions as the latter naturally lead to general ground
spaces. Special care in the choice of the bilinear forms is needed to show
that deletion and contraction are mutually dual (up to equivalence). With all
notions properly in place, we then show that deletion and contraction
correspond to puncturing and shortening of rank-metric codes.

Naturally, one may wonder whether a given $q$-polymatroid is representable in
the sense that it arises from a rank-metric code. Making use of non-
representable (classical) matroids, we present some $q$-matroids that are not
representable by ${\mathbb{F}}_{q^{m}}$-linear rank-metric codes, thereby
answering an open problem in [19] in the negative. We then go a step further
and present a $q$-matroid that is not representable by any
${\mathbb{F}}_{q}$-linear rank-metric code. It remains an open question
whether representability of a $q$-matroid by an ${\mathbb{F}}_{q}$-linear code
implies representability by an ${\mathbb{F}}_{q^{m}}$-linear code.

It is known from [16] that if $m\geq n$, then the column $q$-polymatroid of an
MRD code is the uniform $q$-matroid of rank $n-d+1$, where $d$ is the rank
distance of the code. It is easily seen that this is not the case for $m<n$.
However, it turns out that for $m=n-1$ the $q$-polymatroid is fully determined
by the parameters $(m,d,q)$ of the MRD code (and is not a $q$-matroid unless
$d=1$), while this is not the case anymore if $m<n-1$.

Finally, we introduce a closure operator and the corresponding notion of flats
for $q$-polymatroids. They generalize the analogous notions for matroids and
$q$-matroids. However, just like for polymatroids, the lattice of flats of a
$q$-polymatroid does not enjoy the same properties as for $q$-matroids.
Nonetheless, if the $q$-polymatroid arises from a rank-metric code, the
collection of flats turns out to be closely related to the code: the
generalized weights of the code are fully determined by the flats. In this
context, we will also clarify a subtle issue between the various definitions
of generalized weights for square ${\mathbb{F}}_{q^{m}}$-linear rank-metric
codes.

Notation: Throughout, let ${\mathbb{F}}={\mathbb{F}}_{q}$ be a field of order
$q$ and $E$ be a finite-dimensional ${\mathbb{F}}$-vector space. We write
$V\leq W$ if $V$ is a subspace of the vector space $W$. A $k$-dimensional
subspace is called a $k$-space. The collection of subspaces of a vector space
$X$ is denoted by ${\mathcal{V}}(X)$. The notation $[n]$ is used for the set
$\\{1,\ldots,n\\}$. Finally, $e_{i},i\in[\ell],$ and
$E_{ij},i\in[\ell],j\in[m],$ denote the standard basis vectors in
${\mathbb{F}}^{\ell}$ and the standard basis matrices in
${\mathbb{F}}^{\ell\times m}$, respectively (that is, $E_{ij}$ has entry $1$
at position $(i,j)$ and $0$ elsewhere).

##  2 Preliminaries on $q$-Polymatroids

The following definition is from [16, Def. 4.1] of Gorla et al., with the sole
difference that we require rank functions to assume rational values.

######  Definition 2.1.

Set ${\mathcal{V}}={\mathcal{V}}(E)$. A _$q$ -rank function_ on $E$ is a map
$\rho:{\mathcal{V}}\longrightarrow{\mathbb{Q}}_{\geq 0}$ satisfying:

  * (R1)

Dimension-Boundedness: $0\leq\rho(V)\leq\dim V$ for all $V\in{\mathcal{V}}$;

  * (R2)

Monotonicity: $V\leq W\Longrightarrow\rho(V)\leq\rho(W)$ for all
$V,W\in{\mathcal{V}}$;

  * (R3)

Submodularity: $\rho(V+W)+\rho(V\cap W)\leq\rho(V)+\rho(W)$ for all
$V,W\in{\mathcal{V}}$.

A _$q$ -polymatroid ($q$-PM) on $E$_ is a pair $(E,\rho)$, where
$\rho:{\mathcal{V}}\longrightarrow{\mathbb{Q}}_{\geq 0}$ is a $q$-rank
function. The value $\rho(E)$ is called the _rank_ of the $q$-PM. If $\rho$ is
the zero map, we call the $q$-PM _trivial_.

The following additional notions for $q$-PMs will be useful.

######  Definition 2.2.

Let ${\mathcal{M}}=(E,\rho)$ be a $q$-PM. A number $\mu\in{\mathbb{Q}}_{>0}$
is a _denominator_ of $\rho$ (and ${\mathcal{M}}$) if
$\mu\rho(V)\in{\mathbb{N}}_{0}$ for all $V\in{\mathcal{V}}(E)$. The smallest
denominator is called the _principal denominator_. A $q$-PM with principal
denominator $1$ (i.e., $\rho(V)\in{\mathbb{N}}_{0}$ for all $V$) is called a
_$q$ -matroid_. We declare $1$ the principal denominator of the trivial
$q$-PM.

Let us relate our definition to the literature. First of all, a $q$-matroid in
the sense of Jurrius/ Pellikaan [19] is exactly a $q$-matroid as defined
above. Next, as already mentioned, our definition coincides with that in [16,
Def. 4.1] by Gorla et al. except that our rank functions take rational values.
As we will see in Section 3, this is indeed the case for the $q$-PMs induced
by rank-metric codes. Finally, for any $r\in{\mathbb{N}}$ a
$(q,r)$-polymatroid as in [25, Def. 2] by Shiromoto can be turned into a
$q$-PM with denominator $r$ by dividing the rank function by $r$. Conversely,
given a $q$-PM $(E,\rho)$ with denominator $\mu$, then $(E,\mu\rho)$ is a
$(q,\lceil\mu\rceil)$-polymatroid in the sense of [25]. Finally, denominators
arise for the definition of independent spaces of $q$-PMs; see [14].

######  Remark 2.3.

  * (1)

Every denominator $\mu$ of a $q$-PM $(E,\rho)$ satisfies $\mu\geq 1$. Indeed,
by (R1) $\rho(V)\leq 1$ for all $1$-spaces $V$, and by (R3) $\rho$ is the zero
map if and only if $\rho(V)=0$ for all $1$-spaces $V$.

  * (2)

Let $(E,\rho)$ be a non-trivial $q$-PM. For $V\in{\mathcal{V}}(E)$ write
$\rho(V)=\alpha_{V}/\beta_{V}$ with $\alpha_{V},\,\beta_{V}\in{\mathbb{N}}$
relatively prime. Then the principal denominator is given by

$\mu=\frac{\text{lcm}\\{\beta_{V}\mid
V\in{\mathcal{V}}(E)\\}}{\gcd\\{\alpha_{V}\mid V\in{\mathcal{V}}(E)\\}},$

and $\mu{\mathbb{N}}$ is the set of all denominators of $(E,\rho)$.

The following $q$-matroids will occur occasionally. They can also be found at
[19, Ex. 4]. One easily verifies that the map $\rho$ is indeed a rank
function.

######  Definition 2.4.

Let $\dim E=\ell$. Fix $k\in[\ell]$ and define $\rho(V)=\min\\{k,\dim V\\}$
for $V\in{\mathcal{V}}(E)$. Then $(E,\rho)$ is a $q$-matroid. It is called the
_uniform matroid on $E$ of rank $k$_ and denoted by ${\mathcal{U}}_{k}(E)$.

Some of the basic properties for $q$-matroids derived in [19, Sec. 3] hold
true for $q$-PMs as well. We spell out the following ones, which we will need
later on. The proofs are identical to the ones in [19, Prop. 6 and 7].

######  Proposition 2.5.

Let $(E,\rho)$ be a $q$-PM.

  * (a)

Let $V,W\in{\mathcal{V}}(E)$. Suppose
$\rho(V+\mbox{$\langle{x}\rangle$})=\rho(V)$ for all $x\in W$. Then
$\rho(V+W)=\rho(V)$.

  * (b)

Let $V\in{\mathcal{V}}(E)$ and $X,Y\in{\mathcal{V}}(E)$ be $1$-spaces such
that $\rho(V)=\rho(V+X)=\rho(V+Y)$. Then $\rho(V+X+Y)=\rho(V)$.

The following notion of equivalence is from [16, Def. 4.4].

######  Definition 2.6.

Two $q$-PMs ${\mathcal{M}}_{i}=(E_{i},\rho_{i}),\,i=1,2,$ are _equivalent_ ,
denoted by ${\mathcal{M}}_{1}\approx{\mathcal{M}}_{2}$, if there exists an
${\mathbb{F}}$-isomorphism $\alpha\in\mbox{\rm
Hom}_{{\mathbb{F}}}(E_{1},E_{2})$ such that $\rho_{2}(\alpha(V))=\rho_{1}(V)$
for all $V\in{\mathcal{V}}(E_{1})$.

At this point we want to briefly discuss a more general notion of equivalence
for $q$-PMs.

######  Remark 2.7.

Two $q$-PMs ${\mathcal{M}}_{i}=(E_{i},\rho_{i}),\,i=1,2,$ are _scaling-
equivalent_ if there exists an ${\mathbb{F}}$-isomorphism $\alpha\in\mbox{\rm
Hom}_{{\mathbb{F}}}(E_{1},E_{2})$ and $a\in{\mathbb{Q}}_{>0}$ such that
$\rho_{2}(\alpha(V))=a\rho_{1}(V)$ for all $V\in{\mathcal{V}}(E_{1})$. This
notion makes sense for $q$-PMs because there exist non-trivial $q$-PMs that do
not attain the upper bound in (R1) non-trivially. We briefly elaborate. Let us
call a $q$-PM ${\mathcal{M}}=(E,\rho)$ _exact_ if there exists some nonzero
space $\hat{V}\in{\mathcal{V}}$ such that $\rho(\hat{V})=\dim\hat{V}$.
Clearly, a non-trivial $q$-matroid is exact, but there exist non-trivial non-
exact $q$-PMs; see 3.14 in the next section. It follows immediately from the
submodularity in (R3) that a $q$-PM ${\mathcal{M}}=(E,\rho)$ is exact if and
only if there exists a $1$-space $V$ such that $\rho(V)=1$. This implies that
any denominator of an exact $q$-PM is an integer. One can turn a non-exact
$q$-PM $(E,\rho)$ into an exact one using scaling-equivalence. Indeed, suppose
$\rho(V)<\dim V$ for all $V\in{\mathcal{V}}(E)\setminus 0$. Let
$a=\max\\{\rho(V)/\dim V\mid V\in{\mathcal{V}}(E)\setminus 0\\}$. Then
$a\in{\mathbb{Q}}_{>0}$ and there exists $\hat{V}\in{\mathcal{V}}(E)$ such
that $a=\rho(\hat{V})/\dim\hat{V}$. Thus $(E,a^{-1}\rho)$ is an exact $q$-PM.

We close this section with introducing the dual $q$-PM. It is a
straightforward generalization of duality of matroids based on the rank
function (see, e.g. [21, Prop. 2.1.9]), but requires more details when
replacing set-theoretic complements by orthogonal spaces. Since we define
$q$-PMs over arbitrary ground spaces, we need to specify a non-degenerate
symmetric bilinear form, and, not surprisingly, the dual rank function depends
on the choice of this form. But as we will see, different forms lead to
equivalent dual $q$-PMs. This generality is needed in order to discuss
deletions and contractions later on. Part of the following result is from [16,
4.5–4.7] (see also [19, Thm. 42] for $q$-matroids).

######  Theorem 2.8.

Let $\langle{\cdot}\mid{\cdot}\rangle$ be a non-degenerate symmetric bilinear
form on $E$. For $V\in{\mathcal{V}}(E)$ define $V^{\perp}=\\{w\in
E\mid\mbox{$\langle{v}\mid{w}\rangle$}=0\text{ for all }v\in V\\}$. Let
${\mathcal{M}}=(E,\rho)$ be a $q$-PM and set

$\rho^{*}(V)=\dim V+\rho(V^{\perp})-\rho(E).$ (2.1)

Then $\rho^{*}$ is a $q$-rank function on $E$ and
${\mathcal{M}}^{*}=(E,\rho^{*})$ is a $q$-PM. It is called the _dual_ of
${\mathcal{M}}$. Furthermore, ${\mathcal{M}}^{**}={\mathcal{M}}$, where
${\mathcal{M}}^{**}=({\mathcal{M}}^{*})^{*}$ is the bidual, and
${\mathcal{M}}$ and ${\mathcal{M}}^{*}$ have the same set of denominators.
Finally, the equivalence class of ${\mathcal{M}}^{*}$ does not depend on the
choice of the non-degenerate symmetric bilinear form. More precisely, if
$\langle\\!\mbox{$\langle{\cdot}\mid{\cdot}\rangle$}\\!\rangle$ is another
non-degenerate symmetric bilinear form on $E$ and
${\mathcal{M}}^{\hat{*}}=(E,\rho^{\hat{*}})$ is the resulting dual $q$-PM,
then ${\mathcal{M}}^{\hat{*}}\approx{\mathcal{M}}^{*}$.

###### Proof.

The fact that $\rho^{*}$ is a $q$-rank function and the identity
$\rho^{**}=\rho$ have been proven in [16, Thms. 4.6, 4.7]. The statement about
the denominators is obvious. It remains to show the very last statement. Thus,
let $\langle\\!\mbox{$\langle{\cdot}\mid{\cdot}\rangle$}\\!\rangle$ be another
non-degenerate symmetric bilinear form on $E$. For $V\in{\mathcal{V}}(E)$
denote by $V^{\perp}$ and $V^{\mathchoice{\mathrel{\hbox
to0.0pt{$\displaystyle\perp$\hss}\mkern
2.0mu{\displaystyle\perp}}}{\mathrel{\hbox
to0.0pt{$\textstyle\perp$\hss}\mkern 2.0mu{\textstyle\perp}}}{\mathrel{\hbox
to0.0pt{$\scriptstyle\perp$\hss}\mkern
2.0mu{\scriptstyle\perp}}}{\mathrel{\hbox
to0.0pt{$\scriptscriptstyle\perp$\hss}\mkern
2.0mu{\scriptscriptstyle\perp}}}}$ the orthogonal spaces of $V$ with respect
to $\langle{\cdot}\mid{\cdot}\rangle$ and
$\langle\\!\mbox{$\langle{\cdot}\mid{\cdot}\rangle$}\\!\rangle$, respectively.
Let $v_{1},\ldots,v_{\ell}$ be a basis of $E$ and
$\psi:E\longrightarrow{\mathbb{F}}^{\ell}$ be the associated coordinate map.
Let
$Q=(\mbox{$\langle{v_{i}}\mid{v_{j}}\rangle$}),\,\hat{Q}=(\langle\\!\mbox{$\langle{v_{i}}\mid{v_{j}}\rangle$}\\!\rangle)\in{\mathbb{F}}^{\ell\times\ell}$
be the Gram matrices associated to the bilinear forms. Then $Q,\,\hat{Q}$ are
symmetric and nonsingular and we have
$\mbox{$\langle{v}\mid{w}\rangle$}=\psi(v)Q\psi(w)\mbox{${}^{\sf T}$}$ and
$\langle\\!\mbox{$\langle{v}\mid{w}\rangle$}\\!\rangle=\psi(v)\hat{Q}\psi(w)\mbox{${}^{\sf
T}$}$ for all $v,w\in E$. Define the automorphism

$\phi:E\longrightarrow E,\ v\longmapsto\psi^{-1}(\psi(v)\hat{Q}Q^{-1}).$ (2.2)

Now we have for any $V\in{\mathcal{V}}(E)$ and $w\in E$

$\displaystyle w\in\phi(V)^{\perp}$
$\displaystyle\Longleftrightarrow\psi(\phi(v))Q\psi(w)\mbox{${}^{\sf
T}$}=0\text{ for all }v\in V$
$\displaystyle\Longleftrightarrow\psi(v)\hat{Q}Q^{-1}Q\psi(w)\mbox{${}^{\sf
T}$}=0\text{ for all }v\in V$ $\displaystyle\Longleftrightarrow w\in
V^{\mathchoice{\mathrel{\hbox to0.0pt{$\displaystyle\perp$\hss}\mkern
2.0mu{\displaystyle\perp}}}{\mathrel{\hbox
to0.0pt{$\textstyle\perp$\hss}\mkern 2.0mu{\textstyle\perp}}}{\mathrel{\hbox
to0.0pt{$\scriptstyle\perp$\hss}\mkern
2.0mu{\scriptstyle\perp}}}{\mathrel{\hbox
to0.0pt{$\scriptscriptstyle\perp$\hss}\mkern
2.0mu{\scriptscriptstyle\perp}}}}.$

Hence $V^{\mathchoice{\mathrel{\hbox to0.0pt{$\displaystyle\perp$\hss}\mkern
2.0mu{\displaystyle\perp}}}{\mathrel{\hbox
to0.0pt{$\textstyle\perp$\hss}\mkern 2.0mu{\textstyle\perp}}}{\mathrel{\hbox
to0.0pt{$\scriptstyle\perp$\hss}\mkern
2.0mu{\scriptstyle\perp}}}{\mathrel{\hbox
to0.0pt{$\scriptscriptstyle\perp$\hss}\mkern
2.0mu{\scriptscriptstyle\perp}}}}=\phi(V)^{\perp}$ and thus
$\rho^{*}(\phi(V))=\rho^{\hat{*}}(V)$ for all $V\in{\mathcal{V}}(E)$. This
shows that ${\mathcal{M}}^{*}$ and ${\mathcal{M}}^{\hat{*}}$ are equivalent. ∎

The next result has been proven in [16] for $q$-PMs on ${\mathbb{F}}^{\ell}$,
endowed with the standard dot product. Thanks to the just proven invariance of
the dual, it generalizes as follows without the need to specify bilinear
forms.

######  Proposition 2.9 ([16, Prop. 4.7]).

Let ${\mathcal{M}}=(E,\rho)$ and $\hat{{\mathcal{M}}}=(\hat{E},\hat{\rho})$ be
$q$-PMs. Then ${\mathcal{M}}\approx\hat{{\mathcal{M}}}$ implies
${\mathcal{M}}^{*}\approx\hat{{\mathcal{M}}}^{*}$.

######  Example 2.10 ([19, Ex. 47]).

It is easy to see that ${\mathcal{U}}_{k}(E)^{*}={\mathcal{U}}_{\dim E-k}(E)$.

In Section 5 we will show that duality of $q$-PMs corresponds to duality of
rank-metric codes and is compatible with duality of puncturing and shortening
of codes. In [14] we study independent spaces and bases and their behavior
under dualization.

##  3 Rank-Metric Codes and the Induced $q$-Polymatroids

In this section we study $q$-PMs associated to linear rank-metric codes as
introduced in [16]. We first collect some well-known facts for codes in
${\mathbb{F}}^{n\times m}$. As usual, we endow ${\mathbb{F}}^{n\times m}$ with
the rank-metric, defined as $\mbox{${\rm d}$}(A,B)={\rm rk}(A-B)$. Hence
$\mbox{${\rm d}$}(A,0)={\rm rk}(A)$ for all $A\in\mbox{${\mathbb{F}}^{n\times
m}$}$.

Throughout, a _rank-metric code_ is meant to be linear, that is, it is a
subspace of the metric space $(\mbox{${\mathbb{F}}^{n\times m}$},\mbox{${\rm
d}$})$. Part (a)–(c) of the following proposition is standard knowledge on
rank-metric codes, see for instance [15], and Part (d) can be found in [23,
Lem. 28]. For $V\leq{\mathbb{F}}^{\ell}$ denote by
$V^{\perp}\leq{\mathbb{F}}^{\ell}$ the orthogonal space with respect to the
standard dot product.

######  Definition/Proposition 3.1.

Let ${\mathcal{C}}\leq\mbox{${\mathbb{F}}^{n\times m}$}$ be a rank-metric
code.

  * (a)

The _rank distance_ of ${\mathcal{C}}$ is defined as $\mbox{${\rm d}_{\rm
rk}$}({\mathcal{C}})=\min\\{{\rm rk}(M)\mid M\in{\mathcal{C}}\setminus 0\\}$.

  * (b)

If $d=\mbox{${\rm d}_{\rm rk}$}({\mathcal{C}})$, then
$\dim({\mathcal{C}})\leq\max\\{m,n\\}(\min\\{m,n\\}-d+1)$, which is known as
the _Singleton bound_. If
$\dim({\mathcal{C}})=\max\\{m,n\\}(\min\\{m,n\\}-d+1)$, then ${\mathcal{C}}$
is called an _MRD code_.

  * (c)

The _dual code_ of ${\mathcal{C}}$ is defined as
${\mathcal{C}}^{\perp}=\\{M\in\mbox{${\mathbb{F}}^{n\times m}$}\mid{\rm
tr}(MN\mbox{${}^{\sf T}$})=0\text{ for all }N\in{\mathcal{C}}\\}$, where ${\rm
tr}(\cdot)$ denotes the trace of the given matrix. If ${\mathcal{C}}$ is an
MRD code with rank distance $d$, then ${\mathcal{C}}^{\perp}$ is an MRD code
with rank distance $\min\\{m,n\\}-d+2$.

  * (d)

For $V\in{\mathcal{V}}({\mathbb{F}}^{n})$ and
$W\in{\mathcal{V}}({\mathbb{F}}^{m})$ we define the following subspaces of
${\mathcal{C}}$, which are known as _shortenings_ :

${\mathcal{C}}(V,{\rm c})=\\{M\in{\mathcal{C}}\mid\mbox{\rm colsp}(M)\leq
V\\}\ \text{ and }\ {\mathcal{C}}(W,{\rm r})=\\{M\in{\mathcal{C}}\mid\mbox{\rm
rowsp}(M)\leq W\\},$

where $\mbox{\rm colsp}(M)$ and $\mbox{\rm rowsp}(M)$ denote the column space
and row space of $M$, respectively. Then $\mbox{${\mathbb{F}}^{n\times
m}$}(V,{\rm c})^{\perp}=\mbox{${\mathbb{F}}^{n\times m}$}(V^{\perp},{\rm c})$
and $\mbox{${\mathbb{F}}^{n\times m}$}(W,{\rm
r})^{\perp}=\mbox{${\mathbb{F}}^{n\times m}$}(W^{\perp},{\rm r})$ and

$\displaystyle\dim{\mathcal{C}}(V^{\perp},{\rm c})$
$\displaystyle=\dim{\mathcal{C}}-m\dim V+\dim{\mathcal{C}}^{\perp}(V,{\rm
c}),$ (3.1) $\displaystyle\dim{\mathcal{C}}(W^{\perp},{\rm r})$
$\displaystyle=\dim{\mathcal{C}}-n\dim W+\dim{\mathcal{C}}^{\perp}(W,{\rm
r}).$

Now we are ready to introduce $q$-PMs associated to a rank-metric code. The
following definition and the first statement are from [16]. The statements in
(3.2) are immediate consequences of Proposition 3.1(d).

######  Proposition 3.2 ([16, Thm. 5.3]).

Let ${\mathcal{C}}\leq{\mathbb{F}}^{n\times m}$ be a nonzero rank-metric code.
Define the maps

$\displaystyle\rho_{\rm c}:$
$\displaystyle{\mathcal{V}}({\mathbb{F}}^{n})\longrightarrow{\mathbb{Q}}_{\geq
0},\quad V\longmapsto\frac{\dim{\mathcal{C}}-\dim{\mathcal{C}}(V^{\perp},{\rm
c})}{m},$ $\displaystyle\rho_{\rm r}:$
$\displaystyle{\mathcal{V}}({\mathbb{F}}^{m})\longrightarrow{\mathbb{Q}}_{\geq
0},\quad W\longmapsto\frac{\dim{\mathcal{C}}-\dim{\mathcal{C}}(W^{\perp},{\rm
r})}{n}.$

Then $\rho_{\rm c}$ and $\rho_{\rm r}$ are $q$-rank functions with
denominators $m$ and $n$, respectively. Furthermore,

$\rho_{\rm c}(V)=\dim V-\frac{1}{m}\dim{\mathcal{C}}^{\perp}(V,{\rm c})\
\text{ and }\ \rho_{\rm r}(W)=\dim
W-\frac{1}{n}\dim{\mathcal{C}}^{\perp}(W,{\rm r}).$ (3.2)

The denominators $m$ and $n$ are in general not principal. Note that in the
notation we suppress the dependence of these maps on the code ${\mathcal{C}}$.

######  Definition 3.3.

Let ${\mathcal{C}}\leq{\mathbb{F}}^{n\times m}$ be a nonzero rank-metric code.
The $q$-PMs ${\mathcal{M}}_{\rm c}({\mathcal{C}}):=({\mathbb{F}}^{n},\rho_{\rm
c})$ and ${\mathcal{M}}_{\rm r}({\mathcal{C}}):=({\mathbb{F}}^{m},\rho_{\rm
r})$ are called the _column $q$-polymatroid_ and _row $q$-polymatroid_ of
${\mathcal{C}}$, respectively. Their ranks are $\dim{\mathcal{C}}/m$ and
$\dim{\mathcal{C}}/n$, respectively.

The expressions in (3.2) show immediately that if
${\mathcal{C}}_{1}\leq{\mathcal{C}}_{2}$, then $\rho_{{\rm
c},1}(V)\leq\rho_{{\rm c},2}(V)$ for all
$V\in{\mathcal{V}}({\mathbb{F}}^{n})$, where $\rho_{{\rm c},i}$ is the column
rank function of ${\mathcal{C}}_{i}$. Similarly for the row $q$-PM. This has
also been proven in [13, Lem. 22].

Equivalence of codes, in the following (standard) sense, translates into
equivalence of the associated $q$-PMs.

######  Definition 3.4.

Let ${\mathcal{C}},\,{\mathcal{C}}^{\prime}\leq\mbox{${\mathbb{F}}^{n\times
m}$}$ be rank-metric codes. We call ${\mathcal{C}}$ and
${\mathcal{C}}^{\prime}$ _equivalent_ if there exist matrices $X\in{\rm
GL}_{n}({\mathbb{F}}),\,Y\in{\rm GL}_{m}({\mathbb{F}})$ such that
${\mathcal{C}}^{\prime}=X{\mathcal{C}}Y:=\\{XMY\mid M\in{\mathcal{C}}\\}$. If
$n=m$, we call ${\mathcal{C}},\,{\mathcal{C}}^{\prime}$ _transposition-
equivalent_ if there exist matrices $X,Y\in{\rm GL}_{n}({\mathbb{F}})$ such
that ${\mathcal{C}}^{\prime}=X{\mathcal{C}}\mbox{${}^{\sf
T}$}Y:=\\{XM\mbox{${}^{\sf T}$}Y\mid M\in{\mathcal{C}}\\}$.

The proof of the next result is straightforward with (3.2) by noting that
${\mathcal{C}}^{\prime}=X{\mathcal{C}}Y$ implies
$({\mathcal{C}}^{\prime})^{\perp}=(X^{-1})\mbox{${}^{\sf
T}$}{\mathcal{C}}^{\perp}(Y^{-1})\mbox{${}^{\sf T}$}$ and
${\mathcal{C}}^{\prime}=X{\mathcal{C}}\mbox{${}^{\sf T}$}Y$ implies
$({\mathcal{C}}^{\prime})^{\perp}=(X^{-1})\mbox{${}^{\sf
T}$}({\mathcal{C}}^{\perp})\mbox{${}^{\sf T}$}(Y^{-1})\mbox{${}^{\sf T}$}$.
For an alternative proof see [16, Prop. 6.7].

######  Proposition 3.5.

Let ${\mathcal{C}},\,{\mathcal{C}}^{\prime}\leq\mbox{${\mathbb{F}}^{n\times
m}$}$ be rank-metric codes.

  * (a)

Suppose ${\mathcal{C}},\,{\mathcal{C}}^{\prime}$ are equivalent, say
${\mathcal{C}}^{\prime}=X{\mathcal{C}}Y$ for some $X\in{\rm
GL}_{n}({\mathbb{F}}),\,Y\in{\rm GL}_{m}({\mathbb{F}})$. Then
${\mathcal{M}}_{\rm c}({\mathcal{C}})$ and ${\mathcal{M}}_{\rm
c}({\mathcal{C}}^{\prime})$ are equivalent via $\beta\in\mbox{\rm
Hom}_{{\mathbb{F}}}({\mathbb{F}}^{n},{\mathbb{F}}^{n})$ given by
$x\mapsto(X\mbox{${}^{\sf T}$})^{-1}x$. Similarly, ${\mathcal{M}}_{\rm
r}({\mathcal{C}})$ and ${\mathcal{M}}_{\rm r}({\mathcal{C}}^{\prime})$ are
equivalent via the isomorphism $\alpha\in\mbox{\rm
Hom}_{{\mathbb{F}}}({\mathbb{F}}^{m},{\mathbb{F}}^{m})$ given by $x\mapsto
x(Y\mbox{${}^{\sf T}$})^{-1}$.

  * (b)

Let $n=m$ and suppose ${\mathcal{C}},\,{\mathcal{C}}^{\prime}$ are
transposition-equivalent, say
${\mathcal{C}}^{\prime}=X{\mathcal{C}}\mbox{${}^{\sf T}$}Y$ for $X,Y\in{\rm
GL}_{n}({\mathbb{F}})$. Then ${\mathcal{M}}_{\rm c}({\mathcal{C}})$ and
${\mathcal{M}}_{\rm r}({\mathcal{C}}^{\prime})$ are equivalent via $\alpha$
and ${\mathcal{M}}_{\rm r}({\mathcal{C}})$ and ${\mathcal{M}}_{\rm
c}({\mathcal{C}}^{\prime})$ are equivalent via $\beta$ with $\alpha,\beta$ as
in (a).

Equivalence allows us to easily introduce ${\mathbb{F}}_{q^{m}}$-linear rank-
metric codes. Recall that ${\mathbb{F}}={\mathbb{F}}_{q}$. Let $\omega$ be a
primitive element of the field extension ${\mathbb{F}}_{q^{m}}$ and
$f=x^{m}-\sum_{i=0}^{m-1}f_{i}x^{i}\in{\mathbb{F}}[x]$ be its minimal
polynomial over ${\mathbb{F}}$. We define the companion matrix

$\Delta_{f}=\begin{pmatrix}&1&&\\\ &&\ddots&\\\ &&&1\\\
f_{0}&f_{1}&\cdots&f_{m-1}\end{pmatrix}\in{\rm GL}_{m}({\mathbb{F}}).$ (3.3)

Let $\psi:{\mathbb{F}}_{q^{m}}\longrightarrow{\mathbb{F}}^{m}$ be the
coordinate map with respect to the basis $(1,\omega,\ldots,\omega^{m-1})$.
Extending this map entry-wise, we obtain, for any $n$, an isomorphism

$\Psi:{\mathbb{F}}_{q^{m}}^{n}\longrightarrow{\mathbb{F}}^{n\times m},\
\begin{pmatrix}x_{1}&\cdots&x_{n}\end{pmatrix}\longmapsto\begin{pmatrix}\psi(x_{1})\\\
\vdots\\\ \psi(x_{n})\end{pmatrix}.$ (3.4)

Now multiplication of
$c:=\sum_{i=0}^{m-1}c_{i}\omega^{i}\in{\mathbb{F}}_{q^{m}}$ by $\omega$
corresponds to right multiplication of its coordinate vector
$\psi(c)=(c_{0},\ldots,c_{m-1})\in{\mathbb{F}}^{m}$ by $\Delta_{f}$.
Therefore, an ${\mathbb{F}}$-linear subspace ${\mathcal{C}}$ of
${\mathbb{F}}_{q^{m}}^{n}$ is ${\mathbb{F}}_{q^{m}}$-linear if and only if its
image $\Psi({\mathcal{C}})\leq{\mathbb{F}}^{n\times m}$ is invariant under
right multiplication by $\Delta_{f}$. Recall further that
${\mathbb{F}}[\Delta_{f}]$ is a subfield of order $q^{m}$ of
${\mathbb{F}}^{m\times m}$, and more generally, if $s$ is a divisor of $m$,
then ${\mathbb{F}}[\Delta_{f}^{(q^{m}-1)/(q^{s}-1)}]$ is a subfield of order
$q^{s}$. Allowing different bases for the coordinate map, we arrive at the
following definition.

######  Definition 3.6.

Let ${\mathcal{C}}\leq{\mathbb{F}}^{n\times m}$ be a rank-metric code (hence
an ${\mathbb{F}}$-linear subspace). Let $s$ be a divisor of $m$ and set
$M=(q^{m}-1)/(q^{s}-1)$. Then ${\mathcal{C}}$ is _right
${\mathbb{F}}_{q^{s}}$-linear_ if there exists an $X\in{\rm
GL}_{m}({\mathbb{F}})$ such that the code ${\mathcal{C}}X$ is invariant under
right multiplication by $\Delta_{f}^{M}$. _Left linearity_ over
${\mathbb{F}}_{q^{n}}$ and its subfields is defined analogously.

Clearly, the qualifiers right/left are needed only in the case where
${\mathbb{F}}_{q^{s}}$ is a subfield of both ${\mathbb{F}}_{q^{m}}$ and
${\mathbb{F}}_{q^{n}}$. Note that for $\tilde{{\mathcal{C}}}:={\mathcal{C}}X$
we have $\tilde{{\mathcal{C}}}(V,{\rm c})={\mathcal{C}}(V,{\rm c})X$ for all
$V\in{\mathcal{V}}({\mathbb{F}}^{n})$. Furthermore, if $\tilde{{\mathcal{C}}}$
is invariant under right multiplication by $\Delta_{f}^{M}$, then so is
$\tilde{{\mathcal{C}}}(V,{\rm c})$. Hence $\tilde{{\mathcal{C}}}(V,{\rm c})$
is right ${\mathbb{F}}_{q^{s}}$-linear (see also [19, Lem. 19] for the case
$s=m$), and thus its dimension over ${\mathbb{F}}$ is a multiple of $s$. All
of this leads to the following remark.

######  Remark 3.7.

Let ${\mathcal{C}}\leq{\mathbb{F}}^{n\times m}$ be a right
${\mathbb{F}}_{q^{s}}$-linear rank-metric code for some subfield
${\mathbb{F}}_{q^{s}}$ of ${\mathbb{F}}_{q^{m}}$. Then $\mu=m/s$ is a
denominator of the column $q$-PM ${\mathcal{M}}_{\rm c}({\mathcal{C}})$. In
particular, for $s=m$ the $q$-PM ${\mathcal{M}}_{\rm c}({\mathcal{C}})$ is a
$q$-matroid. These are exactly the $q$-matroids studied in [19]. Of course,
the column $q$-PM of a code ${\mathcal{C}}\leq{\mathbb{F}}^{n\times m}$ may be
a $q$-matroid even if ${\mathcal{C}}$ is not right
${\mathbb{F}}_{q^{m}}$-linear. This is for instance the case for MRD codes in
${\mathbb{F}}^{n\times m}$ if $m\geq n$ (see Proposition 3.8). Analogous
statements hold for the row $q$-PM.

Let us return to general rank-metric codes in ${\mathbb{F}}^{n\times m}$. From
now on we will focus on the associated column $q$-PMs. The discussion of the
row $q$-PMs is analogous. On several occasions we will have to pay close
attention to the cases $n\leq m$ versus $n>m$. We first record the following
simple fact, which is immediate with Proposition 3.2 (see also [16, Prop. 6.2]
and [19, Lem. 30]). Let ${\mathcal{C}}\leq{\mathbb{F}}^{n\times m}$ be a
nonzero rank-metric code with rank distance $d$ and let $d^{\perp}$ be the
rank distance of ${\mathcal{C}}^{\perp}$. Then for any
$V\in{\mathcal{V}}({\mathbb{F}}^{n})$

$\rho_{\rm
c}(V)=\begin{cases}{\displaystyle\frac{\dim{\mathcal{C}}}{m}},&\text{if }\dim
V>n-d,\\\\[4.30554pt] \dim V,&\text{if }\dim V<d^{\perp}.\end{cases}$ (3.5)

Together with 3.1(b),(c) this immediately leads to the following result for
MRD codes if $n\leq m$. Note the similarity to the well-known correspondence
between MDS block codes and uniform matroids.

######  Proposition 3.8 ([16, Cor. 6.6]).

Let $n\leq m$ and ${\mathcal{C}}\leq\mbox{${\mathbb{F}}^{n\times m}$}$ be an
MRD code with $\mbox{${\rm d}_{\rm rk}$}({\mathcal{C}})=d$. Let $\rho_{\rm c}$
be the rank function of the associated column $q$-PM ${\mathcal{M}}_{\rm
c}({\mathcal{C}})$. Then

$\rho_{\rm c}(V)=\min\\{n-d+1,\dim V\\}\ \text{ for all
}V\in{\mathcal{V}}({\mathbb{F}}^{n}).$

Hence ${\mathcal{M}}_{\rm c}({\mathcal{C}})$ is the uniform matroid
${\mathcal{U}}_{n-d+1}({\mathbb{F}}^{n})$. In particular, ${\mathcal{M}}_{\rm
c}({\mathcal{C}})$ is a $q$-matroid, i.e., its principal denominator is $1$.

In order to discuss the $q$-PM associated to MRD codes for $m\leq n$ we need
the following lemma.

######  Lemma 3.9.

Let ${\mathcal{C}}\leq\mbox{${\mathbb{F}}^{n\times m}$}$ be a rank metric code
with $\mbox{${\rm d}_{\rm rk}$}({\mathcal{C}})=d$. Let
$V\in{\mathcal{V}}({\mathbb{F}}^{n})$ and $\dim V=v$. Then
$\dim{\mathcal{C}}(V,{\rm c})\leq\max\\{m,v\\}(\min\\{m,v\\}-d+1)$.

###### Proof.

First assume that $V=\mbox{\rm colsp}(I_{v}\\!\mid\\!0)\mbox{${}^{\sf
T}$}=\mbox{$\langle{e_{1},\ldots,e_{v}}\rangle$}$, where
$e_{i}\in{\mathbb{F}}^{n}$ is the $i$-th standard basis vector. Then we have a
rank-preserving, thus injective, linear map

$\pi:{\mathcal{C}}(V,{\rm c})\longrightarrow{\mathbb{F}}^{v\times m},\
\begin{pmatrix}M\\\ 0\end{pmatrix}\longmapsto M.$

Hence $\text{im}(\pi)$ is a rank-metric code in ${\mathbb{F}}^{v\times m}$ of
rank distance at least $d$, and the upper bound for $\dim{\mathcal{C}}(V,{\rm
c})$ follows from the Singleton bound. For the general case where
$V=\mbox{$\langle{x_{1},\ldots,x_{v}}\rangle$}$, choose $Y\in{\rm
GL}_{n}({\mathbb{F}})$ such that $Yx_{i}=e_{i}$ for $i\in[v]$ and set
${\mathcal{C}}^{\prime}=Y{\mathcal{C}}$. Then ${\mathcal{C}}^{\prime}$ has
rank distance $d$ as well and $Y{\mathcal{C}}(V,{\rm
c})={\mathcal{C}}^{\prime}(YV,{\rm c})$. Since
$YV=\mbox{$\langle{e_{1},\ldots,e_{v}}\rangle$}$, the upper bound on
$\dim{\mathcal{C}}(V,{\rm c})$ follows from the first part of this proof. ∎

Now we obtain the following information about the column $q$-PM of an MRD code
if $m\leq n$.

######  Theorem 3.10.

Let $m\leq n$ and ${\mathcal{C}}\leq\mbox{${\mathbb{F}}^{n\times m}$}$ be an
MRD code with $\mbox{${\rm d}_{\rm rk}$}({\mathcal{C}})=d$. Furthermore,
denote the dimension of $V\in{\mathcal{V}}({\mathbb{F}}^{n})$ by $v$. Then the
rank function $\rho_{\rm c}$ of the associated column $q$-PM
${\mathcal{M}}_{\rm c}({\mathcal{C}})$ satisfies

$\rho_{\rm c}(V)=\left\\{\begin{array}[]{cl}v,&\text{if }v\leq
m-d+1,\\\\[3.01385pt] \frac{n(m-d+1)}{m},&\text{if }v\geq
n-d+1.\end{array}\right.$

Furthermore $\rho_{\rm c}(V)\geq\max\\{1,v/m\\}(m-d+1)$ if $v\in[m-d+2,n-d]$.

###### Proof.

For $v\geq n-d+1$ we have $\rho_{\rm
c}(V)=m^{-1}\dim{\mathcal{C}}=nm^{-1}(m-d+1)$ thanks to (3.5). Next, using
(3.2) and the fact that $\mbox{${\rm d}_{\rm
rk}$}({\mathcal{C}}^{\perp})=m-d+2$ we arrive immediately at $\rho_{\rm
c}(V)=v$ if $v\leq m-d+1$. The remaining statement follows from (3.2) along
with Lemma 3.9, which applied to ${\mathcal{C}}^{\perp}$ yields
$\dim{\mathcal{C}}^{\perp}(V,{\rm c})\leq m(v-m+d-1)$ if $v\leq m$ and
$\dim{\mathcal{C}}^{\perp}(V,{\rm c})\leq v(d-1)$ if $v\geq m$. ∎

If $m=n-1$, the interval $[m-d+2,n-d]$ is empty for any $d$. Thus we have

######  Corollary 3.11.

Let ${\mathcal{C}}\leq{\mathbb{F}}^{n\times(n-1)}$ be an MRD code. Then
${\mathcal{M}}_{\rm c}({\mathcal{C}})$ is fully determined by the parameters
$(n,\mbox{${\rm d}_{\rm rk}$}({\mathcal{C}}),|{\mathbb{F}}|)$ and is not a
$q$-matroid (unless $\mbox{${\rm d}_{\rm rk}$}({\mathcal{C}})=1$).

######  Remark 3.12.

In the situation of 3.10 the denominator $m$ is not necessarily principal
(even if the code is not linear over a subfield of ${\mathbb{F}}_{q^{m}}$).
This is for instance the case for a $[7\times 6;4]$-MRD code:
$n(m-d+1)/m=7/2$, and thus the principal denominator is $2$.

If $m<n-1$, the column $q$-PM of an MRD code ${\mathcal{C}}$ in
${\mathbb{F}}^{n\times m}$ is not fully determined by the parameters
$(n,m,\mbox{${\rm d}_{\rm rk}$}({\mathcal{C}}),|{\mathbb{F}}|)$. This is
illustrated by the following example.

######  Example 3.13.

In ${\mathbb{F}}_{2}^{5\times 2}$ consider the codes
${\mathcal{C}}_{1}=\mbox{$\langle{A_{1},\dots,A_{5}}\rangle$}$ and
${\mathcal{C}}_{2}=\mbox{$\langle{B_{1},\ldots,B_{5}}\rangle$}$, where

$\displaystyle A_{1}=\begin{pmatrix}1&1\\\ 1&0\\\ 0&0\\\ 1&0\\\
0&0\end{pmatrix},\ A_{2}=\begin{pmatrix}1&1\\\ 1&1\\\ 1&0\\\ 0&1\\\
0&0\end{pmatrix},\ A_{3}=\begin{pmatrix}0&0\\\ 0&0\\\ 1&1\\\ 0&0\\\
0&1\end{pmatrix},\ A_{4}=\begin{pmatrix}0&0\\\ 0&1\\\ 0&0\\\ 0&0\\\
1&1\end{pmatrix},\ A_{5}=\begin{pmatrix}1&0\\\ 0&1\\\ 1&1\\\ 0&0\\\
0&1\end{pmatrix},$ $\displaystyle B_{1}=\begin{pmatrix}1&0\\\ 0&1\\\ 0&0\\\
0&0\\\ 0&0\end{pmatrix},\ B_{2}=\begin{pmatrix}0&0\\\ 1&0\\\ 0&1\\\ 0&0\\\
0&0\end{pmatrix},\ B_{3}=\begin{pmatrix}0&0\\\ 0&0\\\ 1&0\\\ 0&1\\\
0&0\end{pmatrix},\ B_{4}=\begin{pmatrix}0&0\\\ 0&0\\\ 0&0\\\ 1&0\\\
0&1\end{pmatrix},\ B_{5}=\begin{pmatrix}0&1\\\ 0&0\\\ 0&1\\\ 0&0\\\
1&0\end{pmatrix}.$

Both codes are MRD with rank distance $d=2$; in fact, ${\mathcal{C}}_{2}$ is a
(${\mathbb{F}}_{2^{5}}$-linear) Gabidulin code. The $q$-PMs
${\mathcal{M}}_{\rm c}({\mathcal{C}}_{1})$ and ${\mathcal{M}}_{\rm
c}({\mathcal{C}}_{2})$ are not equivalent. Indeed, denote the two rank
functions by $\rho_{\rm c}^{i},\,i=1,2,$ and consider $\rho_{\rm c}^{i}(V)$
for $\dim V\in\\{2,3\\}=[m-d+2,n-d]$. For the $155$ subspaces of
${\mathbb{F}}_{2}^{5}$ of dimension $2$ the map $\rho_{\rm c}^{1}$ assumes the
value $1$ exactly once and the values $3/2$ and $2$ exactly 28 and 126 times,
respectively. On the other hand, $\rho_{\rm c}^{2}$ assumes the values $3/2$
and $2$ exactly 31 and 124 times, respectively, and never takes the value $1$.

We briefly return to the notion of scaling equivalence and non-exactness from
2.7.

######  Example 3.14.

For $q$-PMs induced by rank-metric codes non-exactness is a very restrictive
property. Indeed, the first identity in (3.2) shows that

${\mathcal{M}}_{\rm c}({\mathcal{C}})\text{ is not exact
}\Longleftrightarrow{\mathcal{C}}^{\perp}(V,{\rm c})\neq 0\text{ for all
}V\in{\mathcal{V}}({\mathbb{F}}^{n})\setminus 0.$ (3.6)

In particular, non-exactness of ${\mathcal{M}}_{\rm c}({\mathcal{C}})$ implies
$\mbox{${\rm d}_{\rm rk}$}({\mathcal{C}}^{\perp})=1$. An example of a code
satisfying (3.6) is for instance
${\mathcal{C}}=\mbox{$\langle{E_{13},\,E_{23},\,E_{33},\,E_{12}+E_{22}+E_{41}+E_{43}}\rangle$}\leq{\mathbb{F}}_{2}^{3\times
4}$ (recall the notation from Section 1) with dual code
${\mathcal{C}}^{\perp}=\mbox{$\langle{E_{11},\,E_{21},\,E_{31},\,E_{41}+E_{43},\,E_{12}+E_{43},\,E_{22}+E_{43},\,E_{32},E_{42}}\rangle$}$.
The column $q$-PM ${\mathcal{M}}_{\rm c}({\mathcal{C}})$ can be rescaled with
factor $3/2$, leading to an exact $q$-PM ${\mathcal{M}}^{\prime}$. It turns
out that ${\mathcal{M}}^{\prime}={\mathcal{M}}_{{\rm
c}}({\mathcal{C}}^{\prime})$ for the code
${\mathcal{C}}^{\prime}\leq{\mathbb{F}}_{2}^{4\times 4}$ given by
${\mathcal{C}}^{\prime}=\langle
E_{11},E_{12},E_{21},E_{22},E_{31},E_{32},E_{13}+E_{23}+E_{44}$,
$E_{14}+E_{24}+E_{43}+E_{44}\rangle$. It is not clear to us whether
representability of $q$-PMs by rank-metric codes (see the next section) is
preserved under rescaling.

We close this section with the following important result showing that duality
of $q$-PMs corresponds to trace-duality of codes. Recall duality of $q$-PMs
from 2.8.

######  Theorem 3.15 ([16, Thm. 8.1]).

Let ${\mathcal{C}}\leq{\mathbb{F}}^{n\times m}$ be a rank-metric code and
${\mathcal{C}}^{\perp}\leq{\mathbb{F}}^{n\times m}$ be dual. Then
${\mathcal{M}}_{\rm c}({\mathcal{C}})^{*}={\mathcal{M}}_{\rm
c}({\mathcal{C}}^{\perp})$, where ${\mathcal{M}}_{\rm c}({\mathcal{C}})^{*}$
is the dual of ${\mathcal{M}}_{\rm c}({\mathcal{C}})$ w.r.t. the standard dot
product on ${\mathbb{F}}^{n}$. Analogously, ${\mathcal{M}}_{\rm
r}({\mathcal{C}})^{*}={\mathcal{M}}_{\rm r}({\mathcal{C}}^{\perp})$.

##  4 Representability of $q$-Polymatroids

In this section we discuss representability of $q$-PMs via rank-metric codes.
We will present various examples of $q$-matroids that are not representable
via ${\mathbb{F}}_{q^{m}}$-linear rank-metric codes (thereby answering a
question from [19, Sec. 11]). A smaller example of such a non-representable
$q$-matroid appeared in [9], which came out after the first version of the
paper at hand. Later in this section we will show that that $q$-matroid is not
even representable via any ${\mathbb{F}}_{q}$-linear rank-metric code. We
first fix the following notions of representability. Recall
${\mathbb{F}}_{q^{m}}$-linearity from 3.6. As before,
${\mathbb{F}}={\mathbb{F}}_{q}$.

######  Definition 4.1.

Let $E$ be an $n$-dimensional ${\mathbb{F}}$-vector space and
${\mathcal{M}}=(E,\rho)$ be a $q$-PM.

  * (a)

${\mathcal{M}}$ is said to be ${\mathbb{F}}^{n\times m}$-_representable_ if
there exists a rank-metric code ${\mathcal{C}}\leq\mbox{${\mathbb{F}}^{n\times
m}$}$ such that ${\mathcal{M}}\approx{\mathcal{M}}_{\rm c}({\mathcal{C}})$.

  * (b)

Suppose ${\mathcal{M}}$ is a $q$-matroid. Then ${\mathcal{M}}$ is said to be
${\mathbb{F}}_{q^{m}}$-_representable_ if there exists a right
${\mathbb{F}}_{q^{m}}$-linear code
${\mathcal{C}}\leq\mbox{${\mathbb{F}}^{n\times m}$}$ such that
${\mathcal{M}}\approx{\mathcal{M}}_{\rm c}({\mathcal{C}})$.

We start with ${\mathbb{F}}_{q^{m}}$-representability of $q$-matroids. It will
be necessary to consider ${\mathbb{F}}_{q^{m}}$-linear codes as subspaces of
${\mathbb{F}}_{q^{m}}^{n}$, as is indeed common. Consider the isomorphism
$\Psi:{\mathbb{F}}_{q^{m}}^{n}\longrightarrow{\mathbb{F}}^{n\times m}$ from
(3.4). Then with any ${\mathbb{F}}_{q^{m}}$-subspace ${\mathcal{C}}$ of
${\mathbb{F}}_{q^{m}}^{n}$ we can associate the column $q$-PM
${\mathcal{M}}_{\rm c}(\Psi({\mathcal{C}}))$, which is in fact a $q$-matroid.
We denote this $q$-matroid by ${\mathcal{M}}_{G}$, where
$G\in{\mathbb{F}}_{q^{m}}^{k\times n}$ is a generator matrix of
${\mathcal{C}}$ (that is, its rows form a basis of ${\mathcal{C}}$). This is
the approach taken in [19]. The following lemma has been proven in [19, Sec.
5]. It determines the rank function of ${\mathcal{M}}_{G}$ with the aid of
$G$. For self-containment we include a short proof using our notation.

######  Lemma 4.2.

Let ${\mathcal{C}}\leq{\mathbb{F}}_{q^{m}}^{n}$ be an
${\mathbb{F}}_{q^{m}}$-linear rank-metric code with generator matrix
$G\in{\mathbb{F}}_{q^{m}}^{k\times n}$, where
$k=\dim_{{\mathbb{F}}_{q^{m}}}{\mathcal{C}}$. Consider the associated
$q$-matroid ${\mathcal{M}}_{G}=({\mathbb{F}}^{n},\rho_{\rm c})$. Let
$V\in{\mathcal{V}}({\mathbb{F}}^{n})$ with $\dim V=t$, and let
$Y\in{\mathbb{F}}^{n\times t}$ be such that $V=\mbox{\rm colsp}(Y)$. Then

$\rho_{\rm c}(V)={\rm rk}_{{\mathbb{F}}_{q^{m}}}(GY).$

###### Proof.

Clearly ${\rm rk}_{{\mathbb{F}}_{q^{m}}}(GY)$ does not depend on the choice of
$Y$. Since $Y$ has entries in ${\mathbb{F}}$, any
$x\in{\mathbb{F}}_{q^{m}}^{n}$ satisfies $xY=0\Longleftrightarrow
Y\mbox{${}^{\sf T}$}x\mbox{${}^{\sf T}$}=0\Longleftrightarrow Y\mbox{${}^{\sf
T}$}\Psi(x)=0\Longleftrightarrow\mbox{\rm colsp}(\Psi(x))\leq V^{\perp}$. Set
$\tilde{{\mathcal{C}}}=\Psi({\mathcal{C}})\leq{\mathbb{F}}^{n\times m}$. Then
the space $\tilde{{\mathcal{C}}}(V^{\perp},{\rm c})$ satisfies
$\Psi^{-1}(\tilde{{\mathcal{C}}}(V^{\perp},{\rm c}))=\\{x\in{\mathcal{C}}\mid
xY=0\\}$. Let $\pi_{Y}:{\mathcal{C}}\longrightarrow{\mathbb{F}}_{q^{m}}^{t}$
be the ${\mathbb{F}}_{q^{m}}$-linear map given by $x\longmapsto xY$. Then
$\ker\pi_{Y}=\Psi^{-1}(\tilde{{\mathcal{C}}}(V^{\perp},{\rm c}))$ and
$\text{im}\,\pi_{Y}=\mbox{\rm rowsp}_{{\mathbb{F}}_{q^{m}}}(GY)$. Now the
desired statement follows from

$\rho_{\rm
c}(V)=\frac{\dim_{{\mathbb{F}}}\tilde{{\mathcal{C}}}-\dim_{{\mathbb{F}}}\tilde{{\mathcal{C}}}(V^{\perp},{\rm
c})}{m}=\
\dim_{{\mathbb{F}}_{q^{m}}}\tilde{{\mathcal{C}}}-\dim_{{\mathbb{F}}_{q^{m}}}\Psi^{-1}(\tilde{{\mathcal{C}}}(V^{\perp},{\rm
c}))={\rm rk}_{{\mathbb{F}}_{q^{m}}}(GY).\qed$

######  Remark 4.3.

The above lemma generalizes as follows. Consider a general rank-metric code
${\mathcal{C}}\leq{\mathbb{F}}^{n\times m}$ with ${\mathbb{F}}$-dimension $k$.
Taking the pre-image under $\Psi$ of a basis of ${\mathcal{C}}$, we obtain a
matrix $G\in{\mathbb{F}}_{q^{m}}^{k\times n}$ such that
$\Psi^{-1}({\mathcal{C}})=\mbox{\rm rowsp}_{{\mathbb{F}}}(G)$, where the
latter is defined as the ${\mathbb{F}}$-subspace of ${\mathbb{F}}_{q^{m}}^{n}$
generated by the rows of $G$. Denote its ${\mathbb{F}}$-dimension by
$\mbox{$\text{\rm rowrk}_{{\mathbb{F}}}$}(G)$. Then it is easy to see that for
$V$ as in Lemma 4.2 we have $\rho_{\rm c}(V)=\mbox{$\text{\rm
rowrk}_{{\mathbb{F}}}$}(GY)/m$.

We return to ${\mathbb{F}}_{q^{m}}$-representability of $q$-matroids. Of
course, a $q$-matroid ${\mathcal{M}}=({\mathbb{F}}^{n},\rho)$ may be
representable over some field ${\mathbb{F}}_{q^{m}}$, but not over any smaller
field extension of ${\mathbb{F}}$. This is for instance the case for
${\mathcal{M}}={\mathcal{M}}_{G}$, where

$G=\begin{pmatrix}1&0&0&\alpha\\\
0&1&\alpha^{2}&\alpha^{4}\end{pmatrix}\in{\mathbb{F}}_{2^{4}}^{2\times 4},$

where $\alpha^{4}+\alpha+1=0$. It can be verified with SageMath or any other
computer algebra system that
${\mathcal{M}}_{G}=({\mathbb{F}}_{2}^{4},\rho_{\rm c})$ is not representable
over ${\mathbb{F}}_{2^{l}}$ for $l\leq 3$. In fact, ${\mathcal{M}}_{G}$ is not
even ${\mathbb{F}}_{2}^{4\times l}$-representable for any $l\leq 3$.

We now construct $q$-matroids that are not
${\mathbb{F}}_{q^{m}}$-representable for any $m\in{\mathbb{N}}$. In order to
do so, we will make use of non-representable (classical) matroids. Recall that
a matroid is a pair $M=(X,r)$, where $X$ is a finite set and
$r:2^{X}\longrightarrow{\mathbb{N}}_{0}$ satisfies (R1)–(R3) from 2.1 if we
replace the dimension, resp. sum, of subspaces by the cardinality, resp.
union, of subsets. The rank of $M$ is defined as $r(X)$. A matroid $M=(X,r)$
is called _representable_ over the field $F$ if there exists
$k\in{\mathbb{N}}$ and a matrix $G\in F^{k\times|X|}$ with columns indexed by
the elements of $X$, such that for any subset $A\subseteq X$ we have
$r(A)={\rm rk}(G_{A})$, where $G_{A}\in F^{k\times|A|}$ is the submatrix of
$G$ consisting of the columns with indices in $A$. It is easy to see that if
such a matrix exists then we may choose $k=r(X)$.

The next result will provide us with a crucial link between $q$-matroids and
matroids.

######  Theorem 4.4.

Let ${\mathcal{M}}=({\mathbb{F}}^{n},\rho)$ be a $q$-matroid and
${\mathcal{B}}=\\{v_{1},\ldots,v_{n}\\}$ be a basis of ${\mathbb{F}}^{n}$.
Define

$r:2^{{\mathcal{B}}}\longrightarrow{\mathbb{N}}_{0},\quad
A\longmapsto\rho(\mbox{$\langle{A}\rangle$}).$

Then $({\mathcal{B}},r)$ is a matroid, denoted by
$M({\mathcal{M}},{\mathcal{B}})$. Furthermore, if ${\mathcal{M}}$ is
${\mathbb{F}}_{q^{m}}$-representable, then $M({\mathcal{M}},{\mathcal{B}})$ is
${\mathbb{F}}_{q^{m}}$-representable.

###### Proof.

1) We show that $r$ is indeed a rank function. (R1) and (R2) are clear. For
(R3) let $A,B\subseteq{\mathcal{B}}$. By basic Linear Algebra
$\mbox{$\langle{A\cup
B}\rangle$}=\mbox{$\langle{A}\rangle$}+\mbox{$\langle{B}\rangle$}$ and
$\mbox{$\langle{A\cap
B}\rangle$}=\mbox{$\langle{A}\rangle$}\cap\mbox{$\langle{B}\rangle$}$, and
therefore

$\displaystyle r(A\cup B)+r(A\cap B)$ $\displaystyle=\rho(\mbox{$\langle{A\cup
B}\rangle$})+\rho(\mbox{$\langle{A\cap
B}\rangle$})=\rho(\mbox{$\langle{A}\rangle$}+\mbox{$\langle{B}\rangle$})+\rho(\mbox{$\langle{A}\rangle$}\cap\mbox{$\langle{B}\rangle$})$
$\displaystyle\leq\rho(\mbox{$\langle{A}\rangle$})+\rho(\mbox{$\langle{B}\rangle$})=r(A)+r(B).$

2) We now turn to the statement about representability. Let
${\mathcal{M}}={\mathcal{M}}_{G}$ for some $G\in{\mathbb{F}}_{q^{m}}^{k\times
n}$. Define the matrix $X=(v_{1},\ldots,v_{n})$, which is in ${\rm
GL}_{n}({\mathbb{F}})$, and set $G^{\prime}:=GX$. Index the columns of
$G^{\prime}$ by $v_{1},\ldots,v_{n}$, and for any $A\subseteq{\mathcal{B}}$
denote by $G^{\prime}_{A}$ the submatrix of $G^{\prime}$ with columns indexed
by $A$. Let now $A=\\{v_{a_{1}},\ldots,v_{a_{l}}\\}$ be any subset of
${\mathcal{B}}$ and $Y\in{\mathbb{F}}^{n\times l}$ be the matrix with columns
$v_{a_{1}},\ldots,v_{a_{l}}$. Then $\mbox{$\langle{A}\rangle$}=\mbox{\rm
colsp}(Y)$ and thus

$r(A)=\rho(\mbox{$\langle{A}\rangle$})={\rm rk}(GY)={\rm
rk}(G^{\prime}X^{-1}Y)={\rm rk}(G^{\prime}(e_{a_{1}},\ldots,e_{a_{l}}))={\rm
rk}(G^{\prime}_{A}).$

This shows that the matroid $M({\mathcal{B}},r)$ is represented by the matrix
$G^{\prime}\in{\mathbb{F}}_{q^{m}}^{k\times n}$. ∎

Having established this particular relation between $q$-matroids and induced
matroids, we now turn to a class of matroids that can be interpreted as such
induced matroids. They form a special case of paving matroids. A matroid is
called _paving_ if no circuit has cardinality less than the rank of the
matroid. The following result is well known; see [21, 1.3.10] for a more
general statement. We include an elementary proof which generalizes
immediately to $q$-matroids.

######  Proposition 4.5.

Let ${\mathcal{B}}$ be a set with $|{\mathcal{B}}|=n$ and let $k\in[n]$. Let
${\mathcal{A}}$ be a collection of $k$-subsets of ${\mathcal{B}}$ such that
$|A\cap B|\leq k-2$ for all distinct $A,\,B\in{\mathcal{A}}$. Define the map

$r:2^{{\mathcal{B}}}\longrightarrow{\mathbb{N}}_{0},\
X\longmapsto\begin{cases}\quad k-1,&\text{if }X\in{\mathcal{A}},\\\
\min\\{|X|,k\\},&\text{if }X\not\in{\mathcal{A}}.\end{cases}$

Then $r$ is a rank function on ${\mathcal{B}}$. We denote the resulting
matroid by $M_{{\mathcal{B}},{\mathcal{A}}}$. The circuits are given by the
subsets in ${\mathcal{A}}$ and all $(k+1)$-subsets that do not contain a
subset in ${\mathcal{A}}$.

###### Proof.

(R1) and (R2) are clear. For (R3) we have to show $r(A\cup B)\leq
r(A)+r(B)-r(A\cap B)$ for all subsets $A,B\subseteq{\mathcal{B}}$. We may
assume $A\not\subseteq B$ and $B\not\subseteq A$ for otherwise the statement
is clear. Note that $r(A\cup B)\leq k$ for all subsets. Consider
$S:=r(A)+r(B)-r(A\cap B)$ and note that $S\geq r(A)+r(B)-|A\cap B|$. We
proceed by cases.
1) If $r(A)=r(B)=k$, then $S=2k-r(A\cap B)\geq k$.
2) If $r(A)=|A|$ and $r(B)=k$, then $S\geq|A|+k-|A\cap
B|\geq|A|+k-(|A|-1)=k+1$.
3) If $r(A)=|A|$ and $r(B)=|B|$, then $S\geq|A|+|B|-|A\cap B|=|A\cup B|\geq
r(A\cup B)$.
4) If $A,\,B\in{\mathcal{A}}$, then $S\geq 2k-2-|A\cap B|\geq k$.
5) If $A\in{\mathcal{A}}$ and $r(B)=k$, then $S\geq 2k-1-|A\cap B|\geq
2k-1-(k-1)=k$.
6) If $A\in{\mathcal{A}}$ and $r(B)=|B|$, then $S\geq k-1+|B|-|A\cap B|\geq
k-1+|B|-(|B|-1)=k$. ∎

The $q$-analogue reads as follows. The proof is entirely analogous to the
previous one: just replace cardinality and union of subsets by dimension and
sum of subspaces, respectively.

######  Proposition 4.6.

Let $n\in{\mathbb{N}}$ and fix an integer $k\in[n]$. Let ${\mathcal{S}}$ be a
collection of $k$-spaces in ${\mathbb{F}}^{n}$ such that $\dim(V\cap W)\leq
k-2$ for all distinct $V,\,W\in{\mathcal{S}}$. Define the map

$\rho:{\mathcal{V}}({\mathbb{F}}^{n})\longrightarrow{\mathbb{N}}_{0},\
V\longmapsto\begin{cases}\quad k-1,&\text{if }V\in{\mathcal{S}},\\\
\min\\{\dim V,k\\},&\text{if }V\not\in{\mathcal{S}}.\end{cases}$

Then $({\mathbb{F}}^{n},\rho)$ is a $q$-matroid. We denote it by
${\mathcal{M}}_{n,{\mathbb{F}},{\mathcal{S}}}$.

We can easily link the two constructions.

######  Proposition 4.7.

Let ${\mathcal{B}}$ be a basis of ${\mathbb{F}}^{n}$ and let ${\mathcal{A}}$
be a collection of $k$-subsets of ${\mathcal{B}}$ such that $|A\cap B|\leq
k-2$ for all distinct $A,\,B\in{\mathcal{A}}$. Set
${\mathcal{S}}=\\{\mbox{$\langle{A}\rangle$}\mid A\in{\mathcal{A}}\\}$. Then
$\dim(V\cap W)\leq k-2$ for all $V,\,W\in{\mathcal{S}}$ and
$M_{{\mathcal{B}},{\mathcal{A}}}=M({\mathcal{M}}_{n,{\mathbb{F}},{\mathcal{S}}},\,{\mathcal{B}})$.

###### Proof.

It is easy to see that $\dim(V\cap W)\leq k-2$ for all
$V,\,W\in{\mathcal{S}}$. For the second statement let
$M_{{\mathcal{B}},{\mathcal{A}}}=({\mathcal{B}},r)$ and
${\mathcal{M}}_{n,{\mathbb{F}},{\mathcal{S}}}=({\mathbb{F}}^{n},\rho)$. Then
we have for any subset $X\subseteq{\mathcal{B}}$

$r(X)=\Bigg{\\{}\begin{array}[]{cl}k-1,&\text{if
}X\in{\mathcal{A}},\\\\[2.15277pt] \min\\{|X|,k\\},&\text{if
}X\not\in{\mathcal{A}},\end{array}\Bigg{\\}}\ \text{ and }\
\rho(\mbox{$\langle{X}\rangle$})=\Bigg{\\{}\begin{array}[]{cl}k-1,&\text{if
}\mbox{$\langle{X}\rangle$}\in{\mathcal{S}},\\\\[2.15277pt]
\min\\{\dim\mbox{$\langle{X}\rangle$},k\\},&\text{if
}\mbox{$\langle{X}\rangle$}\not\in{\mathcal{S}}.\end{array}\Bigg{\\}}$

This proves the desired statement. ∎

Now we are ready to present examples of $q$-matroids with ground space
${\mathbb{F}}^{n}$ that are not ${\mathbb{F}}_{q^{m}}$-representable for any
$m\in{\mathbb{N}}$. In each case the non-representability follows from the
non-representability of the associated matroid with the aid of 4.4. The
following examples are universal in the sense that they apply to a large class
of fields ${\mathbb{F}}$.

######  Example 4.8.

  * (a)

The Vamos Matroid [21, Ex. 2.1.25]: Let $n=8,\,k=4$ and

${\mathcal{A}}=\big{\\{}\\{1,2,3,4\\},\,\\{1,4,5,6\\},\,\\{2,3,5,6\\},\,\\{1,4,7,8\\},\,\\{2,3,7,8\\}\big{\\}}.$

The matroid $V_{8}:=M_{[8],{\mathcal{A}}}$ is known as the Vamos matroid. It
is not representable over any field [21, p. 169, Ex. 7(e)]. In fact, it is the
smallest such matroid. Choose any finite field ${\mathbb{F}}$ and let $\xi$ be
a bijection between $[n]$ and a fixed basis ${\mathcal{B}}$ of
${\mathbb{F}}^{n}$. Then 4.4 and 4.7 tell us that the $q$-matroid
${\mathcal{M}}_{8,{\mathbb{F}}_{q},{\mathcal{S}}}$, where
${\mathcal{S}}=\\{\mbox{$\langle{\xi(A)}\rangle$}\mid A\in{\mathcal{A}}\\}$,
is not ${\mathbb{F}}_{q^{m}}$-representable for any $m\in{\mathbb{N}}$. A
similar example can be constructed for $n=9,\,k=3$ and the non-Pappus matroid
[21, Ex. 1.5.15].

  * (b)

The Fano Matroid [21, Ex. 1.5.7]: Let $n=7,\,k=3$ and

${\mathcal{A}}=\big{\\{}\\{1,2,4\\},\,\\{2,3,5\\},\,\\{3,4,7\\},\,\\{1,5,7\\},\,\\{2,6,7\\},\,\\{4,5,6\\},\,\\{1,3,6\\}\big{\\}},$

which is the set of lines in the Fano plane. The matroid
$F_{7}:=M_{[7],{\mathcal{A}}}$ is called the Fano matroid. It is not
representable over any field of odd characteristic [21, Prop. 6.4.8]. Thus, if
$q$ is odd then the corresponding $q$-matroid
${\mathcal{M}}_{7,{\mathbb{F}}_{q},{\mathcal{S}}}$, where
${\mathcal{S}}=\\{\mbox{$\langle{\xi(A)}\rangle$}\mid A\in{\mathcal{A}}\\}$,
is not ${\mathbb{F}}_{q^{m}}$-representable for any $m$ (here $\xi$ is a
bijection between $[7]$ and a basis of ${\mathbb{F}}_{q}^{7}$).

  * (c)

The non-Fano Matroid: If one omits one of the sets in the collection
${\mathcal{A}}$ in (b), one obtains the non-Fano matroid
$F_{7}^{-}:=M_{[7],{\mathcal{A}}^{\prime}}$, which is not representable over
any field of even characteristic [21, Prop. 6.4.8]. Thus we have the analogous
conclusion as in (b) for $q$-matroids with even $q$.

It remains an open question whether any of the above $q$-matroids is
${\mathbb{F}}^{n\times m}$-representable. However, we have the following
smaller example of a $q$-matroid ${\mathcal{M}}$ that is not
${\mathbb{F}}^{n\times m}$-representable for any $m$. It has been shown very
recently in [9, Sec. 3.3] that ${\mathcal{M}}$ is not
${\mathbb{F}}_{q^{m}}$-representable. This shows that the converse of 4.4 is
not true because every matroid over a groundset of cardinality 4 is
representable over any field of size at least $3$. In fact, the $q$-matroid of
the following theorem together with all possible choices of bases
${\mathcal{B}}$ in 4.4 lead – up to isomorphism – to the uniform matroid of
rank $2$ or to the paving matroids $M_{[4],{\mathcal{A}}}$ with
${\mathcal{A}}=\\{\\{1,2\\}\\}$ or ${\mathcal{A}}=\\{\\{1,2\\},\\{3,4\\}\\}$
(see the notation of 4.5). The latter two matroids are representable over
every field.

######  Theorem 4.9.

Let ${\mathbb{F}}={\mathbb{F}}_{2}$ and consider
${\mathcal{S}}=\\{V_{0},V_{1},V_{2},V_{3}\\}\subset{\mathcal{V}}({\mathbb{F}}^{4})$,
where

$V_{0}=\mbox{$\langle{1000,\,0100}\rangle$},V_{1}=\mbox{$\langle{0010,\,0001}\rangle$},V_{2}=\mbox{$\langle{1001,\,0111}\rangle$},V_{3}=\mbox{$\langle{1011,\,0110}\rangle$}.$

(We may also choose any other partial spread of size $4$). Let
${\mathcal{M}}={\mathcal{M}}_{4,{\mathbb{F}},{\mathcal{S}}}$ (see 4.6), that
is ${\mathcal{M}}=({\mathbb{F}}^{4},\rho)$, where

$\rho(V)=1\text{ for }V\in{\mathcal{S}}\ \text{ and }\ \rho(V)=\min\\{2,\dim
V\\}\text{ otherwise}.$

Then ${\mathcal{M}}$ is not ${\mathbb{F}}^{4\times m}$-representable for any
$m\in{\mathbb{N}}$.

###### Proof.

Assume to the contrary that there exists $m\in{\mathbb{N}}$ and a rank-metric
code ${\mathcal{C}}\leq{\mathbb{F}}^{4\times m}$ such that

$\rho(V)=\frac{\dim{\mathcal{C}}-\dim{\mathcal{C}}(V^{\perp},{\rm c})}{m}\
\text{ for all }V\in{\mathcal{V}}({\mathbb{F}}^{4}).$

Using $V={\mathbb{F}}^{4}$, we see that $\dim{\mathcal{C}}=2m$. Furthermore,
the above values of $\rho(V)$ and the identity
${\mathcal{S}}=\\{V_{0}^{\perp},\ldots,V_{3}^{\perp}\\}$ lead to

$\dim{\mathcal{C}}(V,{\rm c})=\left\\{\begin{array}[]{cl}0,&\text{if }\dim
V\leq 1\text{ or $[\dim V=2$ and $V\not\in{\mathcal{S}}]$},\\\ m,&\text{if
}V\in{\mathcal{S}}\text{ or }\dim V=3.\end{array}\right.$ (4.1)

The conditions $\dim{\mathcal{C}}(V_{0},{\rm c})=\dim{\mathcal{C}}(V_{1},{\rm
c})=m$ and $\dim{\mathcal{C}}(V,{\rm c})=0$ if $\dim V=1$ imply that
${\mathcal{C}}$ has a basis of the form

$\begin{pmatrix}A_{1}\\\ 0\end{pmatrix},\ldots,\begin{pmatrix}A_{m}\\\
0\end{pmatrix},\begin{pmatrix}0\\\
B_{1}\end{pmatrix},\ldots,\begin{pmatrix}0\\\ B_{m}\end{pmatrix},$ (4.2)

where ${\mathcal{A}}=\mbox{$\langle{A_{1},\ldots,A_{m}}\rangle$}$ and
${\mathcal{B}}=\mbox{$\langle{B_{1},\ldots,B_{m}}\rangle$}$ are MRD codes in
${\mathbb{F}}^{2\times m}$. As for the spaces $V_{2}$ and $V_{3}$ note that

$V_{2}=\mbox{\rm rowsp}\begin{pmatrix}1&0&0&1\\\
0&1&1&1\end{pmatrix}=\mbox{\rm rowsp}\big{(}I_{2}\mid S\mbox{${}^{\sf
T}$}\big{)},\quad V_{3}=\mbox{\rm rowsp}\begin{pmatrix}1&0&1&1\\\
0&1&1&0\end{pmatrix}=\mbox{\rm rowsp}\big{(}I_{2}\mid T\mbox{${}^{\sf
T}$}\big{)},$

where

$S=\begin{pmatrix}0&1\\\ 1&1\end{pmatrix},\
T=S^{2}=S^{-1}=\begin{pmatrix}1&1\\\ 1&0\end{pmatrix}.$

Clearly, a matrix $M\in{\mathcal{C}}$ is in ${\mathcal{C}}(V_{2},{\rm c})$ if
and only if $M=\mbox{$\left(\begin{smallmatrix}{A}\\\\[1.72218pt]
{SA}\end{smallmatrix}\right)$}$ for some $A\in{\mathcal{A}}$. Hence there
exist linearly independent matrices
$\mbox{$\left(\begin{smallmatrix}{\tilde{A}_{i}}\\\\[1.72218pt]
{S\tilde{A}_{i}}\end{smallmatrix}\right)$},i=1,\ldots,m$, in ${\mathcal{C}}$.
But then $\tilde{A}_{1},\ldots,\tilde{A}_{m}\in{\mathcal{A}}$ must be linearly
independent. Thus ${\mathcal{B}}=S{\mathcal{A}}$. Using the space $V_{3}$ we
obtain similarly ${\mathcal{B}}=T{\mathcal{A}}$. Hence
${\mathcal{A}}=T^{-1}S{\mathcal{A}}$, and the latter is $T{\mathcal{A}}$. In
other words, ${\mathcal{A}}$ is $T$-invariant. Note that $\\{0,I,T,T^{2}\\}$
is the subfield ${\mathbb{F}}_{4}$, and in particular, $T^{2}=I+T$. All of
this shows that ${\mathcal{A}}$ is an ${\mathbb{F}}_{4}$-vector space (thus
has even dimension over ${\mathbb{F}}_{2}$) and has an
${\mathbb{F}}_{2}$-basis of the form
$A_{1},\ldots,A_{\ell},TA_{1},\ldots,TA_{\ell}$, where $\ell=m/2$. Using this
basis of ${\mathcal{A}}$, (4.2) reads as

$\begin{pmatrix}A_{1}\\\ 0\end{pmatrix},\ldots,\begin{pmatrix}A_{\ell}\\\
0\end{pmatrix},\begin{pmatrix}TA_{1}\\\
0\end{pmatrix},\ldots,\begin{pmatrix}TA_{\ell}\\\
0\end{pmatrix},\begin{pmatrix}0\\\
TA_{1}\end{pmatrix},\ldots,\begin{pmatrix}0\\\
TA_{\ell}\end{pmatrix},\begin{pmatrix}0\\\
(I+T)A_{1}\end{pmatrix},\ldots,\begin{pmatrix}0\\\
(I+T)A_{\ell}\end{pmatrix}.$

This shows that ${\mathcal{C}}$ contains the matrices
$\left(\begin{smallmatrix}{A_{i}+TA_{i}}\\\\[1.72218pt]
{A_{i}+TA_{i}}\end{smallmatrix}\right)$ for $i=1,\ldots,\ell$, and therefore
$\dim{\mathcal{C}}(V,{\rm c})\geq\ell$ for
$V=\mbox{$\langle{1010,0101}\rangle$}$. This contradicts (4.1) and we conclude
that there is no code ${\mathcal{C}}\leq{\mathbb{F}}^{4\times m}$ that
represents the $q$-matroid ${\mathcal{M}}$. ∎

It is not yet clear whether there exists a $q$-matroid
${\mathcal{M}}=({\mathbb{F}}^{n},\rho)$ and $m\in{\mathbb{N}}$ such that
${\mathcal{M}}$ is not ${\mathbb{F}}_{q^{m}}$-representable but
${\mathbb{F}}^{n\times m}$-representable.

##  5 Deletions and Contractions

We define deletion and contraction for $q$-PMs and show that they correspond
to puncturing and shortening of rank-metric codes.

######  Definition 5.1.

Let ${\mathcal{M}}=(E,\rho)$ be a $q$-PM and $X\in{\mathcal{V}}(E)$.

  * (a)

Define $\rho|_{X}:{\mathcal{V}}(X)\longrightarrow{\mathbb{Q}}_{\geq 0},\
W\longmapsto\rho(W)$. Then ${\mathcal{M}}|_{X}:=(X,\rho|_{X})$ is a $q$-PM on
$X$ and is called the _restriction_ of ${\mathcal{M}}$ to $X$.

  * (b)

Fix a non-degenerate symmetric bilinear form
$\langle{\cdot}\mid{\cdot}\rangle$ on $E$. The restriction of ${\mathcal{M}}$
to $X^{\perp}$ is called the _deletion_ of $X$ from ${\mathcal{M}}$ w.r.t.
$\langle{\cdot}\mid{\cdot}\rangle$, and the resulting $q$-PM
$({\mathcal{M}}|_{X^{\perp}},\rho|_{X^{\perp}})$ is denoted by
$({\mathcal{M}}\setminus X)_{\langle\cdot\mid\cdot\rangle}$ or simply
${\mathcal{M}}\setminus X$ if the bilinear form is clear from the context.

In (a), it is clear that $\rho|_{X}$ satisfies (R1)–(R3) from 2.1 and thus is
a $q$-rank function. In (b), the deletion $({\mathcal{M}}\setminus
X)_{\langle\cdot\mid\cdot\rangle}$ truly depends on
$\langle{\cdot}\mid{\cdot}\rangle$: different choices of the bilinear form
lead in general to non-equivalent $q$-PMs. However, for any bilinear forms
$\langle{\cdot}\mid{\cdot}\rangle$ and
$\langle\\!\mbox{$\langle{\cdot}\mid{\cdot}\rangle$}\\!\rangle$ on $E$ with
orthogonal spaces $V^{\perp}$ and $V^{\mathchoice{\mathrel{\hbox
to0.0pt{$\displaystyle\perp$\hss}\mkern
2.0mu{\displaystyle\perp}}}{\mathrel{\hbox
to0.0pt{$\textstyle\perp$\hss}\mkern 2.0mu{\textstyle\perp}}}{\mathrel{\hbox
to0.0pt{$\scriptstyle\perp$\hss}\mkern
2.0mu{\scriptstyle\perp}}}{\mathrel{\hbox
to0.0pt{$\scriptscriptstyle\perp$\hss}\mkern
2.0mu{\scriptscriptstyle\perp}}}}$, respectively, we obviously have
$X^{\perp}=Y^{\mathchoice{\mathrel{\hbox
to0.0pt{$\displaystyle\perp$\hss}\mkern
2.0mu{\displaystyle\perp}}}{\mathrel{\hbox
to0.0pt{$\textstyle\perp$\hss}\mkern 2.0mu{\textstyle\perp}}}{\mathrel{\hbox
to0.0pt{$\scriptstyle\perp$\hss}\mkern
2.0mu{\scriptstyle\perp}}}{\mathrel{\hbox
to0.0pt{$\scriptscriptstyle\perp$\hss}\mkern
2.0mu{\scriptscriptstyle\perp}}}}$ for
$Y=(X^{\perp})^{\mathchoice{\mathrel{\hbox
to0.0pt{$\displaystyle\perp$\hss}\mkern
2.0mu{\displaystyle\perp}}}{\mathrel{\hbox
to0.0pt{$\textstyle\perp$\hss}\mkern 2.0mu{\textstyle\perp}}}{\mathrel{\hbox
to0.0pt{$\scriptstyle\perp$\hss}\mkern
2.0mu{\scriptstyle\perp}}}{\mathrel{\hbox
to0.0pt{$\scriptscriptstyle\perp$\hss}\mkern
2.0mu{\scriptscriptstyle\perp}}}}$ and thus
${\mathcal{M}}|_{X^{\perp}}={\mathcal{M}}|_{Y^{\mathchoice{\mathrel{\hbox
to0.0pt{$\displaystyle\perp$\hss}\mkern
2.0mu{\displaystyle\perp}}}{\mathrel{\hbox
to0.0pt{$\textstyle\perp$\hss}\mkern 2.0mu{\textstyle\perp}}}{\mathrel{\hbox
to0.0pt{$\scriptstyle\perp$\hss}\mkern
2.0mu{\scriptstyle\perp}}}{\mathrel{\hbox
to0.0pt{$\scriptscriptstyle\perp$\hss}\mkern
2.0mu{\scriptscriptstyle\perp}}}}}$.

We now turn to contractions.

######  Theorem 5.2.

Let ${\mathcal{M}}=(E,\rho)$ be a $q$-PM and $X\in{\mathcal{V}}(E)$. Let
$\pi:E\longrightarrow E/X$ be the canonical projection. We define the map

$\rho_{E/X}:{\mathcal{V}}(E/X)\longrightarrow{\mathbb{Q}}_{\geq 0},\quad
V\longmapsto\rho(\pi^{-1}(V))-\rho(X).$

Then ${\mathcal{M}}/X:=(E/X,\rho_{E/X})$ is a $q$-PM, called the _contraction_
of $X$ from ${\mathcal{M}}$.

###### Proof.

We have to show that $\rho_{E/X}$ satisfies (R1)–(R3).
(R1) Let $V\in{\mathcal{V}}(E/X)$. Then $X\leq\pi^{-1}(V)$ and thus the
monotonicity of $\rho$ implies $\rho_{E/X}(V)\geq 0$. Next,
$\pi^{-1}(V)=X\oplus A$ for some $A\in{\mathcal{V}}(E)$. Then $\dim A=\dim V$
and submodularity of $\rho$ yields
$\rho_{E/X}(V)=\rho(\pi^{-1}(V))-\rho(X)\leq\rho(A)\leq\dim A=\dim V$.
(R2) $V_{1}\leq V_{2}\leq E/X$ implies $\pi^{-1}(V_{1})\leq\pi^{-1}(V_{2})$
and therefore $\rho_{E/X}(V_{1})\leq\rho_{E/X}(V_{2})$.
(R3) Let $V,\,W\leq E/X$. Then $\pi^{-1}(V+W)=\pi^{-1}(V)+\pi^{-1}(W)$ and
$\pi^{-1}(V\cap W)=\pi^{-1}(V)\cap\pi^{-1}(W)$ and therefore

$\displaystyle\rho_{E/X}(V\\!+\\!W)\\!+\\!\rho_{E/X}(V\cap W)$
$\displaystyle=\rho\big{(}\pi^{-1}(V)+\pi^{-1}(W)\big{)}-\rho(X)+\rho\big{(}\pi^{-1}(V)\\!\cap\\!\pi^{-1}(W)\big{)}-\rho(X)$
$\displaystyle\leq\rho(\pi^{-1}(V))+\rho(\pi^{-1}(W))-2\rho(X)=\rho_{E/X}(V)+\rho_{E/X}(W).\qed$

Deletion and contraction are mutually dual in the following sense. Since
duality is involved, we need to pay special attention to the choice of the
non-degenerate symmetric bilinear form. For $\dim X=1$, the following result
also appears in [19, Thm. 60]. However, the proof given there does not apply
if $X\leq X^{\perp}$ and yields a weaker form of equivalence between the
matroids. Also in [5, Lem. 12] the result below is proven for a weaker form of
equivalence. Recall from 2.6 that in this paper equivalence of $q$-PMs is
based on linear isomorphisms between the ground spaces.

######  Theorem 5.3.

Let ${\mathcal{M}}=(E,\rho)$ be a $q$-PM and $X\in{\mathcal{V}}(E)$. Then

$({\mathcal{M}}\setminus X)^{*}\approx{\mathcal{M}}^{*}/X\ \text{ and }\
{\mathcal{M}}\setminus X\approx({\mathcal{M}}^{*}/X)^{*}.$

###### Proof.

We will show the first equivalence. The second one follows from from
biduality; see 2.8 and 2.9. We need some preparation. Recall from 2.8 that the
dual of a $q$-PM depends on the choice of the non-degenerate symmetric
bilinear form (NSBF) and that different choices lead to equivalent dual
$q$-PMs. Hence for the first equivalence we need NSBFs on $E$ and on
$X^{\perp}$, the latter being the ground space of ${\mathcal{M}}\setminus X$.
Note that if $\langle{\cdot}\mid{\cdot}\rangle$ is an NSBF on $E$, then the
restriction of $\langle{\cdot}\mid{\cdot}\rangle$ to the resulting orthogonal
$X^{\perp}$ is in general degenerate. For this reason we proceed as follows.
Choose a subspace $Y\in{\mathcal{V}}(E)$ such that $X\oplus Y=E$. Choose NSBFs
$\mbox{$\langle{\cdot}\mid{\cdot}\rangle$}_{X}$ on $X$ and
$\mbox{$\langle{\cdot}\mid{\cdot}\rangle$}_{Y}$ on $Y$ and define

$\mbox{$\langle{x_{1}+y_{1}}\mid{x_{2}+y_{2}}\rangle$}:=\mbox{$\langle{x_{1}}\mid{x_{2}}\rangle$}_{X}+\mbox{$\langle{y_{1}}\mid{y_{2}}\rangle$}_{Y}\
\text{ for all }\ x_{1},x_{2}\in X,\,y_{1},y_{2}\in Y.$

It is easy to verify that $\langle{\cdot}\mid{\cdot}\rangle$ is a NSBF on $E$.
Denoting the resulting orthogonal of a subspace $V\in{\mathcal{V}}(E)$ by
$V^{\perp}$, we observe $X^{\perp}=Y$ and thus $X\oplus X^{\perp}=E$.
Furthermore, for any subspace $Z\leq X^{\perp}$ we have

$Z^{\mathchoice{\mathrel{\hbox to0.0pt{$\displaystyle\perp$\hss}\mkern
2.0mu{\displaystyle\perp}}}{\mathrel{\hbox
to0.0pt{$\textstyle\perp$\hss}\mkern 2.0mu{\textstyle\perp}}}{\mathrel{\hbox
to0.0pt{$\scriptstyle\perp$\hss}\mkern
2.0mu{\scriptstyle\perp}}}{\mathrel{\hbox
to0.0pt{$\scriptscriptstyle\perp$\hss}\mkern
2.0mu{\scriptscriptstyle\perp}}}}=Z^{\perp}\cap X^{\perp},$ (5.1)

where $Z^{\mathchoice{\mathrel{\hbox to0.0pt{$\displaystyle\perp$\hss}\mkern
2.0mu{\displaystyle\perp}}}{\mathrel{\hbox
to0.0pt{$\textstyle\perp$\hss}\mkern 2.0mu{\textstyle\perp}}}{\mathrel{\hbox
to0.0pt{$\scriptstyle\perp$\hss}\mkern
2.0mu{\scriptstyle\perp}}}{\mathrel{\hbox
to0.0pt{$\scriptscriptstyle\perp$\hss}\mkern
2.0mu{\scriptscriptstyle\perp}}}}$ denotes the orthogonal of $Z$ in
$X^{\perp}$ w.r.t. $\mbox{$\langle{\cdot}\mid{\cdot}\rangle$}_{Y}$. Now we
have compatible NSBFs on $E$ and $X^{\perp}$ and can turn to the stated
equivalence $({\mathcal{M}}\setminus X)^{*}\approx{\mathcal{M}}^{*}/X$.

Note that we have a well-defined isomorphism

$\xi:E/X\longrightarrow X^{\perp},\quad v+X\longmapsto\hat{x},$

where $v=x+\hat{x}$ is the unique decomposition of $v$ into $x\in X$ and
$\hat{x}\in X^{\perp}$. We show that

$(\rho^{*})_{E/X}(V)=(\rho|_{X^{\perp}})^{*}(\xi(V))\ \text{ for all }\
V\in{\mathcal{V}}(E/X).$ (5.2)

Let $\pi:E\longrightarrow E/X$ be the canonical projection and
$V\in{\mathcal{V}}(E/X)$. Then $\pi^{-1}(V)=\xi(V)\oplus X$ and thus
$\pi^{-1}(V)^{\perp}=\xi(V)^{\perp}\cap X^{\perp}$. Now we compute

$\displaystyle(\rho^{*})_{E/X}(V)$
$\displaystyle=\rho^{*}(\pi^{-1}(V))-\rho^{*}(X)$
$\displaystyle=\dim\pi^{-1}(V)+\rho(\pi^{-1}(V)^{\perp})-\rho(E)-\big{(}\dim
X+\rho(X^{\perp})-\rho(E)\big{)}$ $\displaystyle=\dim\pi^{-1}(V)-\dim
X+\rho(\pi^{-1}(V)^{\perp})-\rho(X^{\perp})$
$\displaystyle=\dim\xi(V)+\rho(\xi(V)^{\perp}\cap X^{\perp})-\rho(X^{\perp})$
$\displaystyle=\dim\xi(V)+\rho|_{X^{\perp}}(\xi(V)^{\perp}\cap
X^{\perp})-\rho|_{X^{\perp}}(X^{\perp})$
$\displaystyle=\dim\xi(V)+\rho|_{X^{\perp}}(\xi(V)^{\mathchoice{\mathrel{\hbox
to0.0pt{$\displaystyle\perp$\hss}\mkern
2.0mu{\displaystyle\perp}}}{\mathrel{\hbox
to0.0pt{$\textstyle\perp$\hss}\mkern 2.0mu{\textstyle\perp}}}{\mathrel{\hbox
to0.0pt{$\scriptstyle\perp$\hss}\mkern
2.0mu{\scriptstyle\perp}}}{\mathrel{\hbox
to0.0pt{$\scriptscriptstyle\perp$\hss}\mkern
2.0mu{\scriptscriptstyle\perp}}}})-\rho|_{X^{\perp}}(X^{\perp})$
$\displaystyle=(\rho|_{X^{\perp}})^{*}(\xi(V)),$

where the penultimate step follows from (5.1) and the last step is the very
definition of $(\rho|_{X^{\perp}})^{*}(\xi(V))$ for the chosen NSBF on
$X^{\perp}$. ∎

The rest of this section is devoted to the relation between deletion and
contraction of $q$-PMs induced by rank-metric codes and puncturing and
shortening of the codes. We focus on row puncturing and shortening, which will
correspond to deletion and contraction of the associated column $q$-PM. The
following terminology is from [8, Sec. 3]. For the rest of this section,
$X^{\perp}$ denotes the orthogonal of $X\leq{\mathbb{F}}^{n}$ w.r.t. the
standard dot product.

######  Definition 5.4.

Let $u\in[n]$ and $\pi_{u}:\mbox{${\mathbb{F}}^{n\times
m}$}\longrightarrow{\mathbb{F}}^{(n-u)\times m}$ be the projection onto the
last $n-u$ rows. Let ${\mathcal{C}}\leq{\mathbb{F}}^{n\times m}$ be a rank-
metric code. We define

${\mathcal{C}}_{u}=\\{M\in{\mathcal{C}}\mid M_{ij}=0\text{ for }i\leq u\\},$

that is, ${\mathcal{C}}_{u}$ is the subcode consisting of all matrices of
${\mathcal{C}}$ whose first $u$ rows are zero. Let $A\in{\rm
GL}_{n}({\mathbb{F}})$.

  * (a)

The _puncturing_ of ${\mathcal{C}}$ w.r.t. $A$ and $u$ is defined as the code

$\Pi({\mathcal{C}},A,u)=\pi_{u}(A{\mathcal{C}})\leq{\mathbb{F}}^{(n-u)\times
m}.$

  * (b)

The _shortening_ of ${\mathcal{C}}$ w.r.t. $A$ and $u$ is defined as the code

$\Sigma({\mathcal{C}},A,u)=\pi_{u}((A{\mathcal{C}})_{u})\leq{\mathbb{F}}^{(n-u)\times
m}.$

In 3.1(d) we called the space ${\mathcal{C}}(V,{\rm c})$ a shortening of
${\mathcal{C}}$. This is consistent because ${\mathcal{C}}(V,{\rm c})$ is
isomorphic (even isometric w.r.t. the rank metric) to
$\Sigma({\mathcal{C}},A,u)$, where $u=\dim V$ and $A=(A_{1}\mid
A_{2})\mbox{${}^{\sf T}$}\in{\rm GL}_{n}({\mathbb{F}})$ such that $\mbox{\rm
colsp}(A_{1})=V^{\perp}$.

Now we are ready to relate deletion and contraction of $q$-PMs induced by
rank-metric codes to puncturing and shortening of the codes, respectively. The
following result is a direct $q$-analogue of the well-known relation between
matroids and linear block codes; see [17, Sec. 1.6.4].

######  Theorem 5.5.

Let ${\mathcal{C}}\leq{\mathbb{F}}^{n\times m}$ be a rank-metric code and
${\mathcal{M}}={\mathcal{M}}_{\rm c}({\mathcal{C}})$ be the associated column
$q$-PM. Let $X\in{\mathcal{V}}({\mathbb{F}}^{n})$ and set $\dim X=u$. Choose
any matrix $A\in{\rm GL}_{n}({\mathbb{F}})$ of the form
$A=\left(\begin{smallmatrix}B\\\\[1.29167pt] D\end{smallmatrix}\right)$, where
$D\in{\mathbb{F}}^{(n-u)\times n}$ is such that $\mbox{\rm
rowsp}(D)=X^{\perp}$. Then

${\mathcal{M}}\setminus X\approx{\mathcal{M}}_{\rm c}(\Pi({\mathcal{C}},A,u))\
\text{ and }\ {\mathcal{M}}/X\approx{\mathcal{M}}_{\rm
c}(\Sigma({\mathcal{C}},(A^{-1})\mbox{${}^{\sf T}$},u)).$

###### Proof.

We start with the first equivalence. Let $\rho$ be the rank function of
${\mathcal{M}}_{\rm c}({\mathcal{C}})$ and $\rho^{\prime}$ be the rank
function of ${\mathcal{M}}_{\rm c}({\mathcal{C}}^{\prime})$, where
${\mathcal{C}}^{\prime}=\Pi({\mathcal{C}},A,u)$. Thus

$\rho^{\prime}:{\mathcal{V}}({\mathbb{F}}^{n-u})\longrightarrow{\mathbb{Q}}_{\geq
0},\
V\longmapsto\frac{\dim{\mathcal{C}}^{\prime}-\dim{\mathcal{C}}^{\prime}(V^{\perp},{\rm
r})}{m}.$

Consider the isomorphism

$\psi:{\mathbb{F}}^{n-u}\longrightarrow X^{\perp},\ v\longmapsto vD.$

Then $\psi(V)\leq X^{\perp}$ for all $V\in{\mathcal{V}}({\mathbb{F}}^{n-u})$
and therefore $\rho_{{\mathcal{M}}\setminus X}(\psi(V))=\rho(\psi(V))$ by the
very definition of deletion. Now the desired equivalence
${\mathcal{M}}\setminus X\approx{\mathcal{M}}_{\rm c}(\Pi({\mathcal{C}},A,u))$
follows if we can show that

$\rho^{\prime}(V)=\rho(\psi(V))\text{ for all
}V\in{\mathcal{V}}({\mathbb{F}}^{n-u}).$ (5.3)

In order to do so, let $V\in{\mathcal{V}}({\mathbb{F}}^{n-u})$ and let
$Z\in{\mathbb{F}}^{t\times(n-u)}$ be such that $V=\mbox{\rm rowsp}(Z)$. From
the very definition of the matrices involved we obtain

$\displaystyle{\mathcal{C}}(X,{\rm c})$
$\displaystyle=\\{M\in{\mathcal{C}}\mid\mbox{\rm colsp}(M)\leq
X\\}=\\{M\in{\mathcal{C}}\mid DM=0\\},$
$\displaystyle{\mathcal{C}}(\psi(V)^{\perp},{\rm c})$
$\displaystyle=\\{M\in{\mathcal{C}}\mid\mbox{\rm
colsp}(M)\leq\psi(V)^{\perp}\\}=\\{M\in{\mathcal{C}}\mid ZDM=0\\},$
$\displaystyle{\mathcal{C}}^{\prime}(V^{\perp},{\rm c})$
$\displaystyle=\\{N\in{\mathcal{C}}^{\prime}\mid\mbox{\rm colsp}(N)\leq
V^{\perp}\\}=\\{N\in{\mathcal{C}}^{\prime}\mid ZN=0\\}.$

Furthermore, we have the surjective linear map

$\xi_{D}:{\mathcal{C}}\longrightarrow{\mathcal{C}}^{\prime},\ M\longmapsto DM$

and observe that ${\mathcal{C}}(X,{\rm
c})=\ker\xi_{D}\leq{\mathcal{C}}(\psi(V)^{\perp},{\rm c})$ as well as
$\xi_{D}\big{(}{\mathcal{C}}(\psi(V)^{\perp},{\rm
c})\big{)}={\mathcal{C}}^{\prime}(V^{\perp},{\rm c})$. Hence we conclude

$\dim{\mathcal{C}}-\dim{\mathcal{C}}^{\prime}=\dim{\mathcal{C}}(X,{\rm
c})=\dim{\mathcal{C}}(\psi(V)^{\perp},{\rm
c})-\dim{\mathcal{C}}^{\prime}(V^{\perp},{\rm c}).$

As a consequence,

$\frac{\dim{\mathcal{C}}^{\prime}-\dim{\mathcal{C}}^{\prime}(V^{\perp},{\rm
c})}{m}=\frac{\dim{\mathcal{C}}-\dim{\mathcal{C}}(\psi(V)^{\perp},{\rm
c})}{m},$

and this establishes (5.3).
We now turn to the second equivalence. Applying the first equivalence to the
code ${\mathcal{C}}^{\perp}$ we obtain ${\mathcal{M}}_{\rm
c}({\mathcal{C}}^{\perp})\setminus X\approx{\mathcal{M}}_{\rm
c}(\Pi({\mathcal{C}}^{\perp},A,u))$. With the aid of Theorems 5.3 and 3.15
this leads to

${\mathcal{M}}_{\rm c}({\mathcal{C}})/X\approx({\mathcal{M}}_{\rm
c}({\mathcal{C}}^{\perp})\setminus X)^{*}\approx{\mathcal{M}}_{\rm
c}(\Pi({\mathcal{C}}^{\perp},A,u))^{*}={\mathcal{M}}_{\rm
c}(\Pi({\mathcal{C}}^{\perp},A,u)^{\perp}).$

Now the desired equivalence follows from
$\Pi({\mathcal{C}}^{\perp},A,u)^{\perp}=\Sigma({\mathcal{C}},(A^{-1})\mbox{${}^{\sf
T}$},u)$, which has been proven in [8, Thm. 3.5] (and is true for $n\leq m$
and $n>m$). ∎

##  6 Flats of a $q$-Polymatroid

In this section we return to general $q$-PMs and introduce flats. As in
(classical) matroid theory, a flat is, by definition, an inclusion-maximal
space for a given rank. Flats naturally come with a closure operator. We
derive some basis properties of the closure operator and flats and will
illustrate that – just like for classical polymatroids – the lattice of flats
is not semimodular and (without the associated rank values) does not fully
determine the $q$-PM. In fact, a $q$-PM may have the same flats as a
$q$-matroid without being a $q$-matroid itself. On the positive side, we show
that the generalized weights of a rank-metric code are fully determined by the
flats of the associated $q$-PM, and the rank-distance is determined by the
hyperplanes.

Throughout let ${\mathcal{M}}=(E,\rho)$ be a $q$-PM.

######  Definition 6.1.

A space $F\in{\mathcal{V}}(E)$ is called a _flat_ of ${\mathcal{M}}$ if

$\rho(F+\mbox{$\langle{x}\rangle$})>\rho(F)\text{ for all }x\in E\setminus F.$

We denote the collection of flats by ${\mathcal{F}}({\mathcal{M}})$, or simply
${\mathcal{F}}$. A flat $H$ is called a _hyperplane_ if there is no flat
strictly between $H$ and $E$. Furthermore, we define the _closure operator_ of
${\mathcal{M}}$ as

${\rm cl}:{\mathcal{V}}(E)\longrightarrow{\mathcal{V}}(E),\quad
V\longmapsto\sum_{\genfrac{}{}{0.0pt}{1}{\dim X=1}{\rho(V+X)=\rho(V)}}X.$

Clearly, $E\in{\mathcal{F}}({\mathcal{M}})$, and
$0\in{\mathcal{F}}({\mathcal{M}})$ if and only if ${\mathcal{M}}$ has no loops
(by definition, a loop is a $1$-space of rank zero). With the aid of 2.5(a) we
obtain immediately

$\rho(V)=\rho({\rm cl}(V))\text{ for all }V\in{\mathcal{V}}(E).$ (6.1)

Flats can be regarded as ‘rank-closed’ subspaces.

######  Proposition 6.2.

A subspace $F\in{\mathcal{V}}(E)$ is a flat of ${\mathcal{M}}$ if and only if
$F={\rm cl}(F)$.

###### Proof.

If $F={\rm cl}(F)$ and $x\not\in F$, then
$\rho(F+\mbox{$\langle{x}\rangle$})>\rho(F)$. Hence $F$ is a flat. Conversely,
let $F$ be a flat and let $x\in{\rm cl}(F)$. Then
$\rho(F+\mbox{$\langle{x}\rangle$})=\rho(F)$, and thus $x\in F$. Hence $F={\rm
cl}(F)$. ∎

The closure operator satisfies the following properties.

######  Theorem 6.3.

Let $V,W\in{\mathcal{V}}(E)$. Then

  * (CL1)

$V\leq{\rm cl}(V)$.

  * (CL2)

If $V\leq W$, then ${\rm cl}(V)\leq{\rm cl}(W)$.

  * (CL3)

${\rm cl}(V)={\rm cl}({\rm cl}(V))$.

###### Proof.

(CL1) is obvious.
(CL2) Let $V\leq W$ and let $x\in{\rm cl}(V)$. We want to show that $x\in{\rm
cl}(W)$. This is clear if $x\in V$, and thus we assume that $x\not\in V$.
Choose $U\in{\mathcal{V}}(E)$ such that $W=V\oplus U$. Then

$\displaystyle\rho(W+\mbox{$\langle{x}\rangle$})$ $\displaystyle=\rho((V\oplus
U)+(V\oplus\mbox{$\langle{x}\rangle$}))$ $\displaystyle\leq\rho(V\oplus
U)+\rho(V\oplus\mbox{$\langle{x}\rangle$})-\rho((V\oplus
U)\cap(V\oplus\mbox{$\langle{x}\rangle$}))$
$\displaystyle=\rho(W)+\rho(V)-\rho((V\oplus
U)\cap(V\oplus\mbox{$\langle{x}\rangle$}))$
$\displaystyle=\rho(W)+\rho(V)-\rho(V)=\rho(W),$

where the penultimate step follows from $V\leq(V\oplus
U)\cap(V\oplus\mbox{$\langle{x}\rangle$})\leq
V\oplus\mbox{$\langle{x}\rangle$}$ together with
$\rho(V\oplus\mbox{$\langle{x}\rangle$})=\rho(V)$. All of this shows that
$\rho(W+\mbox{$\langle{x}\rangle$})=\rho(W)$ and therefore $x\in{\rm cl}(W)$.
(CL3) Let $V\in{\mathcal{V}}(E)$. Then ${\rm cl}(V)\leq{\rm cl}({\rm cl}(V))$
follows from (CL1) since ${\rm cl}(V)$ is a subspace. For the converse let
$x\in{\rm cl}({\rm cl}(V))$. With the aid of (CL1) and (6.1) we obtain

$\rho(V)\leq\rho(V+\mbox{$\langle{x}\rangle$})\leq\rho({\rm
cl}(V)+\mbox{$\langle{x}\rangle$})=\rho({\rm cl}(V))=\rho(V).$

Thus we have equality across, and this shows that $x\in{\rm cl}(V)$. ∎

Flats satisfy the following simple properties.

######  Theorem 6.4.

Let ${\mathcal{F}}$ be the collection of flats of ${\mathcal{M}}$. Then

  * (F1)

$E\in{\mathcal{F}}$.

  * (F2)

If $F_{1},F_{2}\in{\mathcal{F}}$, then $F_{1}\cap F_{2}\in{\mathcal{F}}$.

###### Proof.

(F1) is clear from 6.1. For (F2) let $F_{1},F_{2}\in{\mathcal{F}}$. Then (CL2)
yields ${\rm cl}(F_{1}\cap F_{2})\subseteq{\rm cl}(F_{1})\cap{\rm
cl}(F_{2})=F_{1}\cap F_{2}$. Thus $F_{1}\cap F_{2}\in{\mathcal{F}}$ thanks to
6.2. ∎

From (CL2), 6.2, and (F2) we immediately obtain

######  Proposition 6.5.

Any $V\in{\mathcal{V}}(E)$ satisfies ${\rm
cl}(V)=\bigcap_{\genfrac{}{}{0.0pt}{2}{F\in{\mathcal{F}}}{V\leq F}}F$.

For $q$-matroids, the closure operator and the flats satisfy further
properties, which we briefly discuss. Note first that for any $q$-PM
${\mathcal{M}}$ the collection ${\mathcal{F}}$ of flats forms a lattice under
inclusion: the _meet_ and _join_ of two flats $F_{1},\,F_{2}\in{\mathcal{F}}$
are $F_{1}\wedge F_{2}:=F_{1}\cap F_{2}$ and $F_{1}\vee F_{2}:={\rm
cl}(F_{1}+F_{2})$, respectively. The flat ${\rm
cl}(0)=\bigcap_{F\in{\mathcal{F}}}F$ is the unique minimal element of the
lattice ${\mathcal{F}}$. Furthermore, we say that $F_{2}$ _covers_ $F_{1}$ if
$F_{1}\lneq F_{2}$ and there exists no $F\in{\mathcal{F}}$ such that
$F_{1}\lneq F\lneq F_{2}$. For instance, the hyperplanes of ${\mathcal{F}}$
are the flats covered by $E$.

The first statement below has been proven in [19, Thm. 68] whereas the second
one can be found in [6, Prop. 26, Thm. 28, Cor. 29, Thm. 31] and [7, Cor. 70].
Note that these result generalize the according properties for matroids; see
[21, pp. 26 and 32].

######  Theorem 6.6.

Let ${\mathcal{M}}=(E,\rho)$ be a $q$-matroid with closure operator ${\rm cl}$
and collection of flats ${\mathcal{F}}$. Then:

  * (CL4)

MacLane-Steinitz exchange axiom: For all $V\in{\mathcal{V}}(E)$ and all
vectors $x,y\in E\setminus{\rm cl}(V)$ we have
$\mbox{$\langle{y}\rangle$}\leq{\rm
cl}(V+\mbox{$\langle{x}\rangle$})\Longleftrightarrow\mbox{$\langle{x}\rangle$}\leq{\rm
cl}(V+\mbox{$\langle{y}\rangle$})$.

  * (F3)

For all $F\in{\mathcal{F}}$ and vectors $x\in E\setminus F$ there exists a
unique cover $F^{\prime}\in{\mathcal{F}}$ of $F$ such that
$\mbox{$\langle{x}\rangle$}\leq F^{\prime}$.

Furthermore, ${\mathcal{F}}$ is a semimodular lattice (that is, for all
$F_{1},F_{2}\in{\mathcal{F}}$ such that $F_{1}$ covers $F_{1}\wedge F_{2}$,
the flat $F_{1}\vee F_{2}$ covers $F_{2}$). As a consequence, all maximal
chains between any two fixed elements in ${\mathcal{F}}$ have the same length.
Finally, if ${\mathcal{F}}$ is a collection of subspaces of $E$ satisfying
(F1)–(F3), then ${\mathcal{F}}$ is the collection of flats of the $q$-matroid
$(E,\rho)$ defined by $\rho(V)=\text{h}({\rm cl}(V))$, where the latter is the
length of a maximal chain from ${\rm cl}(0)$ to ${\rm cl}(V)$. It follows that
all hyperplanes have the same rank.

The first of the following examples illustrates that neither (F3) nor (CL4) is
true for $q$-PMs. This comes to no surprise, since (F3) and (CL4) do not hold
for classical polymatroids either. The second example shows that the lattice
of flats (without rank values) carries insufficient information to distinguish
$q$-PMs from $q$-matroids. Of course, thanks to 6.5 and (6.1) the flats
together with their rank values uniquely determine the $q$-PM.

######  Example 6.7.

  * (a)

Consider the code
${\mathcal{C}}_{1}=\mbox{$\langle{A_{1},\dots,A_{5}}\rangle$}\leq{\mathbb{F}}_{2}^{5\times
2}$ from 3.13. It can be verified that ${\mathcal{M}}_{\rm c}({\mathcal{C}})$
has 81 flats and 29 hyperplanes. Furthermore, the collection of flats does not
satisfy (CL4) and (F3). Unsurprisingly, the hyperplane axioms known for
$q$-matroids (see [7, Def. 12]) do not hold either, and in particular, the
hyperplanes do not all have the same rank.

  * (b)

Let ${\mathbb{F}}={\mathbb{F}}_{2}$ and
${\mathcal{C}}=\mbox{$\langle{E_{12}+E_{23}+E_{33},\,E_{12}+E_{13}+E_{33},\,E_{12}+E_{13}+E_{21}+E_{32}}\rangle$}\leq{\mathbb{F}}^{3\times
3}$. It is straightforward to verify that the associated column $q$-PM
${\mathcal{M}}=({\mathbb{F}}^{3},\,\rho_{\rm c})$ is not a $q$-matroid but has
the same collection of flats as the $q$-matroid ${\mathcal{M}}_{G}$, where

$G=\begin{pmatrix}1&0&\alpha\\\
0&1&\alpha\end{pmatrix}\in{\mathbb{F}}_{4}^{2\times 3}.$

As a consequence, ${\mathcal{F}}({\mathcal{M}})$ and the closure operator
satisfy (F1)–(F3) and (CL1)–(CL4).

The rest of this section is devoted to showing that the generalized weights of
a rank-metric code in ${\mathbb{F}}^{n\times m}$ can be determined by the
flats of the associated column $q$-PM if $m>n$. For $m<n$, the corresponding
result is true for the row $q$-PM, and for $m=n$ both $q$-PMs are needed. In
order to be aligned with most of the literature on rank-metric codes, we will
assume $m\geq n$. For further details on generalized weights and anticodes we
refer to [22], from which the next definition is taken.

######  Definition 6.8 ([22, Def. 22 and 23]).

Let $m\geq n$ and ${\mathcal{C}}\leq\mbox{${\mathbb{F}}^{n\times m}$}$ be a
code.

  * (a)

We define ${\rm maxrk}({\mathcal{C}})=\max\\{{\rm rk}(M)\mid
M\in{\mathcal{C}}\\}$. We call the code ${\mathcal{C}}$ an _optimal anticode_
if $\dim{\mathcal{C}}=m\,{\rm maxrk}({\mathcal{C}})$.

  * (b)

For $i=1,\ldots,\dim{\mathcal{C}}$ the _$i$ -th generalized weight_ of
${\mathcal{C}}$ is defined as

$a_{i}({\mathcal{C}})=\frac{1}{m}\min\\{\dim({\mathcal{A}})\mid{\mathcal{A}}\leq\mbox{${\mathbb{F}}^{n\times
m}$}\text{ is an optimal anticode},\dim({\mathcal{C}}\cap{\mathcal{A}})\geq
i\\}.$

In [16] it has been shown that the generalized weights can be computed from
the associated $q$-PMs of the code. We will derive the generalized weights in
a slightly different form, and, since we need the ideas of the proof later on,
we also briefly sketch the proof. In [16, Thm. 7.2] the result has been used
to characterize optimal anticodes with the aid of $q$-PMs.

######  Theorem 6.9 ([16, Thm. 7.1]).

Let $m\geq n$ and ${\mathcal{C}}\leq\mbox{${\mathbb{F}}^{n\times m}$}$ be a
code. Define

$\displaystyle a_{i}^{\rm c}({\mathcal{C}})$ $\displaystyle=n-\max\\{\dim
V\mid V\in{\mathcal{V}}({\mathbb{F}}^{n}),\,\rho_{\rm c}(V)\leq\rho_{\rm
c}({\mathbb{F}}^{n})-i/m\\},$ $\displaystyle a_{i}^{\rm r}({\mathcal{C}})$
$\displaystyle=m-\max\\{\dim W\mid
W\in{\mathcal{V}}({\mathbb{F}}^{m}),\,\rho_{\rm r}(W)\leq\rho_{\rm
r}({\mathbb{F}}^{m})-i/n\\}.$

Then for all $i=1,\ldots,\dim{\mathcal{C}}$

$a_{i}({\mathcal{C}})=\begin{cases}\qquad a_{i}^{\rm
c}({\mathcal{C}}),&\text{if }m>n,\\\\[2.58334pt] \ \min\\{a_{i}^{{\rm
c}}({\mathcal{C}}),a_{i}^{{\rm r}}({\mathcal{C}})\\},&\text{if
}m=n.\end{cases}$

###### Proof.

Let first $m>n$. It is well known [20, Thm. 3] that the optimal anticodes in
${\mathbb{F}}^{n\times m}$ are the spaces of the form
$\mbox{${\mathbb{F}}^{n\times m}$}(V,{\rm c})$ for any
$V\in{\mathcal{V}}({\mathbb{F}}^{n})$. Furthermore
$\dim\mbox{${\mathbb{F}}^{n\times m}$}(V,{\rm c})=m\dim V$. Since
${\mathcal{C}}\cap\mbox{${\mathbb{F}}^{n\times m}$}(V^{\perp},{\rm
c})={\mathcal{C}}(V^{\perp},{\rm c})$ and $m^{-1}\dim{\mathcal{C}}=\rho_{\rm
c}({\mathbb{F}}^{n})$, the very definition of $\rho_{\rm c}$ leads to

$\dim({\mathcal{C}}\cap\mbox{${\mathbb{F}}^{n\times m}$}(V^{\perp},{\rm
c}))\geq i\Longleftrightarrow\rho_{\rm c}(V)\leq\rho_{\rm
c}({\mathbb{F}}^{n})-i/m.$ (6.2)

Now the statement follows from $n-\dim V=\dim
V^{\perp}=m^{-1}\dim\mbox{${\mathbb{F}}^{n\times m}$}(V^{\perp},{\rm c})$. In
the case $m=n$, the optimal anticodes are of the form ${\mathbb{F}}^{m\times
m}(V,{\rm c})$ and ${\mathbb{F}}^{m\times m}(V,{\rm r})$, where
$V\in{\mathcal{V}}({\mathbb{F}}^{m})$. This implies that we have to take the
row and column $q$-PM into account, and again the statement follows. ∎

Let us briefly relate $a_{i}^{\rm c}({\mathcal{C}})$ to certain invariants
introduced in the literature.

######  Remark 6.10.

  * (a)

In [13, Def. 10] the authors introduce generalized weights of $q$-PMs. Since
their definition of $q$-PMs differs from ours, we need to be careful when
comparing the two notions of generalized weights. Let us start with a $q$-PM
${\mathcal{M}}=({\mathbb{F}}^{n},\rho)$ in our sense and let $\mu$ be a
denominator of ${\mathcal{M}}$. Set $\tau:=\mu\rho$. Then
${\mathcal{M}}^{\prime}:=({\mathbb{F}}^{n},\tau)$ is a $(q,\mu)$-polymatroid
in the sense of [13, Def. 1]. In [13, Def. 10] the authors define the $i$-th
generalized weight of ${\mathcal{M}}^{\prime}$ as
$d_{i}({\mathcal{M}}^{\prime})=\min\\{\dim
X\mid\tau({\mathbb{F}}^{n})-\tau(X^{\perp})\geq i\\}$. Suppose now that
${\mathcal{M}}={\mathcal{M}}_{\rm c}({\mathcal{C}})$ for some rank-metric code
${\mathcal{C}}\leq\mbox{${\mathbb{F}}^{n\times m}$}$. Then $\mu:=m$ is a
denominator and the equivalence
$\rho(V)\leq\rho({\mathbb{F}}^{n})-i/m\Longleftrightarrow\tau({\mathbb{F}}^{n})-\tau(V)\geq
i$ shows that $d_{i}({\mathcal{M}}^{\prime})=a^{i}_{\rm c}({\mathcal{C}})$ for
all $i$.

  * (b)

In [4, Thm. 8] the authors associate a $q$-demimatroid to a rank-metric code.
A $q$-demimatroid is a generalization of a $q$-PM that does not require
submodularity, but captures a certain duality relation; see [4, p. 1505]. More
precisely, to the code ${\mathcal{C}}\leq{\mathbb{F}}^{n\times m}$ they
associate the $q$-demimatroid $({\mathbb{F}}^{n},s,t)$ defined by
$s(V)=\dim{\mathcal{C}}(V,{\rm c})$ and $t(V)=\dim{\mathcal{C}}^{\perp}(V,{\rm
c})$. Neither of these functions is submodular, but they satisfy the required
duality relation thanks to (3.1). In [4, p. 1507] the authors introduce
various combinatorial invariants of such $q$-demimatroids, and it is
straightforward to verify that $a_{i}^{\rm c}({\mathcal{C}})$ equals their
$\sigma_{i}$ for all $i$. The power of their approach comes to light in
particular in [4, Sec. 4.2 and 4.3], where the authors provide a very nice and
short proof of the Wei duality for the generalized weights of a rank-metric
code with the aid of the associated $q$-demimatroid.

We return to 6.9 and consider the case $m=n$ in further detail. As we show
next, for $i=1$ we have $a_{1}({\mathcal{C}})=a_{1}^{\rm
c}({\mathcal{C}})=a_{1}^{\rm r}({\mathcal{C}})$.

######  Corollary 6.11.

Let ${\mathcal{C}}\leq{\mathbb{F}}^{m\times m}$ be a code. Then $a_{1}^{\rm
c}({\mathcal{C}})=a_{1}^{\rm r}({\mathcal{C}})$ and therefore

$\displaystyle\mbox{${\rm d}_{\rm rk}$}({\mathcal{C}})$
$\displaystyle=m-\max\\{\dim V\mid
V\in{\mathcal{V}}({\mathbb{F}}^{m}),\,\rho_{\rm c}(V)\leq\rho_{\rm
c}({\mathbb{F}}^{m})-1/m\\}$ $\displaystyle=m-\max\\{\dim V\mid
V\in{\mathcal{V}}({\mathbb{F}}^{m}),\,\rho_{\rm r}(V)\leq\rho_{\rm
r}({\mathbb{F}}^{m})-1/m\\}.$

Recall from 3.2 that $\rho_{\rm c}({\mathbb{F}}^{m})=\rho_{\rm
r}({\mathbb{F}}^{m})=m^{-1}\dim{\mathcal{C}}$ for any code
${\mathcal{C}}\leq{\mathbb{F}}^{m\times m}$. Thus the above inequalities can
be written as $\rho_{\rm c}(V)\leq(\dim{\mathcal{C}}-1)/m$ and $\rho_{\rm
r}(V)\leq(\dim{\mathcal{C}}-1)/m$.

###### Proof.

It is well known [22, Thm. 30] that $\mbox{${\rm d}_{\rm
rk}$}({\mathcal{C}})=a_{1}({\mathcal{C}})$, the first generalized weight.
Hence it suffices to show $a_{1}^{\rm c}({\mathcal{C}})=a_{1}^{\rm
r}({\mathcal{C}})$. Let $d=\mbox{${\rm d}_{\rm rk}$}({\mathcal{C}})$ and
$M\in{\mathcal{C}}$ be such that ${\rm rk}(M)=d$. Let $V=\mbox{\rm colsp}(M)$
and $W=\mbox{\rm rowsp}(M)$ and set ${\mathcal{A}}={\mathbb{F}}^{m\times
m}(V,{\rm c})$ and ${\mathcal{A}}^{\prime}={\mathbb{F}}^{m\times m}(W,{\rm
r})$. Then ${\mathcal{A}}$ and ${\mathcal{A}}^{\prime}$ are optimal anticodes
of dimension $md$ and ${\mathcal{C}}\cap{\mathcal{A}}\neq
0\neq{\mathcal{C}}\cap{\mathcal{A}}^{\prime}$. Thus (6.2) yields $\rho_{\rm
c}(V^{\perp})\leq\rho_{\rm c}({\mathbb{F}}^{m})-1/m$ and, similarly,
$\rho_{\rm r}(W^{\perp})\leq\rho_{\rm r}({\mathbb{F}}^{m})-1/m$. Since $V$ and
$W$ are clearly of minimal dimension satisfying
${\mathcal{C}}\cap{\mathcal{A}}\neq
0\neq{\mathcal{C}}\cap{\mathcal{A}}^{\prime}$, all of this shows that
$a_{1}^{\rm c}({\mathcal{C}})=a_{1}^{\rm r}({\mathcal{C}})$. ∎

For $i>1$ and ${\mathcal{C}}\leq{\mathbb{F}}^{m\times m}$ we have in general
$a_{i}^{{\rm c}}({\mathcal{C}})\neq a_{i}^{{\rm r}}({\mathcal{C}})$, and it
depends on $i$ which of the two is the minimum. Our next example shows that
this is even the case for _vector rank-metric codes_ (that is,
${\mathbb{F}}_{q^{m}}$-linear codes in ${\mathbb{F}}_{q^{m}}^{m}$). As a
consequence, the generalized weights in 6.8 do not coincide with the
generalized weights introduced in [18]. The example also addresses a small
oversight in [22] and shows that [22, Thm. 28] is only true for codes in
${\mathbb{F}}_{q^{m}}^{n}$ with $n<m$.

######  Example 6.12.

Let $q=2$ and $m=6$. Let $\omega\in{\mathbb{F}}_{2^{6}}$ be a primitive
element with minimal polynomial $f=x^{6}+x^{4}+x^{3}+x+1$. Consider the
generator matrix

$G=\begin{pmatrix}1&0&0&\omega^{9}&0&0\\\ 0&1&0&0&\omega^{18}&0\\\
0&0&1&0&0&\omega^{18}\end{pmatrix}\in{\mathbb{F}}_{2^{6}}^{3\times 6}.$

Note that, in fact, the entries of $G$ are in the subfield
${\mathbb{F}}_{2^{3}}$. Using the isomorphism $\Psi$ from (3.4), we obtain the
rank-metric code $\Psi(\mbox{\rm
rowsp}_{{\mathbb{F}}_{2^{6}}}(G))={\mathcal{C}}:=\mbox{$\langle{A_{j}\Delta_{f}^{i}\mid
j=1,2,3,\,i=0,\ldots,m-1}\rangle$}$, where $\Delta_{f}$ is as in (3.3) and
$A_{j}$ is the image of the $j$-th row of $G$ under $\Psi$. Thus
$\dim_{{\mathbb{F}}_{2}}{\mathcal{C}}=18$. By construction, the row spaces of
the matrices $A_{1},A_{2},A_{3}$ are contained in the $3$-dimensional subspace
$\hat{V}:=\Psi({\mathbb{F}}_{2^{3}})\leq{\mathbb{F}}_{2}^{6}$. It turns out
that $\dim{\mathcal{C}}(\hat{V},{\rm r})=9$ (which implies $a_{9}^{\rm r}\leq
3$). SageMath computations lead to the following data

$\begin{array}[]{|c||c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|}\hline\cr
i&1&2&3&4&5&6&7&8&9&10&11&12&13&14&15&16&17&18\\\ \hline\cr\hline\cr
a_{i}^{\rm c}&2&2&2&2&2&2&4&4&4&4&4&4&6&6&6&6&6&6\\\ \hline\cr a_{i}^{\rm
r}&2&2&2&3&3&3&3&3&3&5&5&5&6&6&6&6&6&6\\\ \hline\cr\end{array}$

We see that, for instance $a_{9}^{\rm r}<a_{9}^{\rm c}$, whereas $a_{10}^{\rm
r}>a_{10}^{\rm c}$. This implies that the generalized weights
$a_{i}({\mathcal{C}})$ in general do not coincide with $a_{i}^{\rm
c}({\mathcal{C}})$. In [18] the latter are defined to be the generalized
weights of ${\mathcal{C}}$ (see [18, Cor. 4.4, Thm. 5.4] and [22, Thm. 18]).
This shows that the definitions of generalized weights in [22, Def. 23] and
[18] do not agree for ${\mathbb{F}}_{q^{m}}$-linear codes in
${\mathbb{F}}_{q^{m}}^{m}$.

We return to general codes in ${\mathbb{F}}^{n\times m}$. Our next result
shows that the generalized weights of a rank-metric code are determined by the
flats of the $q$-PM. It is straightforward to check that this is the analogue
of [2, Thm. 3], where the generalized weights of a linear block code are
determined via cocircuits of suitable truncations of the associated matroid.
The complements of these cocircuits are, by definition, flats of a certain
rank in the original matroid. The only difference to our result below is the
inequality (rather than equality) in $\rho_{\rm c}(V)\leq\rho_{\rm
c}({\mathbb{F}}^{n})-i/m$ below. This is needed because – in contrast to
matroids and $q$-matroids – for $q$-PMs equality may not be attained.

######  Theorem 6.13.

Let $m\geq n$ and ${\mathcal{C}}\leq\mbox{${\mathbb{F}}^{n\times m}$}$ be a
code. Let ${\mathcal{F}}_{\rm c}$ and ${\mathcal{F}}_{\rm r}$ be the sets of
flats of the $q$-PMs ${\mathcal{M}}_{\rm
c}({\mathcal{C}})=({\mathbb{F}}^{n},\rho_{\rm c})$ and ${\mathcal{M}}_{\rm
r}({\mathcal{C}})=({\mathbb{F}}^{m},\rho_{\rm r})$, respectively. Define

$\displaystyle b_{i}^{\rm c}({\mathcal{C}})$ $\displaystyle=n-\max\\{\dim
V\mid V\in{\mathcal{F}}_{\rm c},\,\rho_{\rm c}(V)\leq\rho_{\rm
c}({\mathbb{F}}^{n})-i/m\\},$ $\displaystyle b_{i}^{\rm r}({\mathcal{C}})$
$\displaystyle=m-\max\\{\dim W\mid W\in{\mathcal{F}}_{\rm r},\,\rho_{\rm
r}(W)\leq\rho_{\rm r}({\mathbb{F}}^{m})-i/n\\}.$

Then for all $i=1,\ldots,\dim{\mathcal{C}}$

$a_{i}({\mathcal{C}})=\begin{cases}\qquad b_{i}^{\rm
c}({\mathcal{C}}),&\text{if }m>n,\\\\[2.58334pt] \min\\{b_{i}^{{\rm
c}}({\mathcal{C}}),b_{i}^{{\rm r}}({\mathcal{C}})\\},&\text{if
}m=n.\end{cases}$

Furthermore, if $n=m$ then $b_{1}^{{\rm c}}({\mathcal{C}})=b_{1}^{{\rm
r}}({\mathcal{C}})$.

###### Proof.

We will show $b_{i}^{\rm c}({\mathcal{C}})=a_{i}^{\rm c}({\mathcal{C}})$ for
all $i$. The proof for $b_{i}^{\rm r}({\mathcal{C}})=a_{i}^{\rm
r}({\mathcal{C}})$ is analogous. Clearly, $a_{i}^{\rm c}({\mathcal{C}})\leq
b_{i}^{\rm c}({\mathcal{C}})$ for all $i$. For the converse inequality, let
$V\in{\mathcal{V}}({\mathbb{F}}^{n})$ such that $\rho_{\rm c}(V)\leq\rho_{\rm
c}({\mathbb{F}}^{n})-i/m$. Consider ${\rm cl}(V)$, the closure of $V$. Then
$\dim V\leq\dim{\rm cl}(V)$ by (CL1) and $\rho_{\rm c}({\rm
cl}(V))\leq\rho_{\rm c}({\mathbb{F}}^{n})-i/m$ thanks to (6.1). All of this
implies the desired inequality $b_{i}^{\rm c}({\mathcal{C}})\leq a_{i}^{\rm
c}({\mathcal{C}})$ for all $i$. The last statement for $i=1$ follows from
6.11. ∎

Our final result allows us to determine the rank distance of a rank-metric
code via the hyperplanes of the associated $q$-PM.

######  Corollary 6.14.

Let ${\mathcal{C}}\leq\mbox{${\mathbb{F}}^{n\times m}$}$ be a code.

  * (a)

If $m>n$, then $\mbox{${\rm d}_{\rm rk}$}({\mathcal{C}})=n-\max\\{\dim H\mid
H\text{ is a hyperplane in }{\mathcal{M}}_{\rm c}({\mathcal{C}})\\}$.

  * (b)

If $m=n$, then $\mbox{${\rm d}_{\rm rk}$}({\mathcal{C}})=n-w$, where

$w=\max\\{\dim H\\!\mid\\!H\text{ is a hyperplane in }{\mathcal{M}}_{\rm
c}({\mathcal{C}})\\}=\max\\{\dim H\\!\mid\\!H\text{ is a hyperplane in
}{\mathcal{M}}_{\rm r}({\mathcal{C}})\\}.$

###### Proof.

It is well known [22, Thm. 30] that $\mbox{${\rm d}_{\rm
rk}$}({\mathcal{C}})=a_{1}({\mathcal{C}})$. Suppose first that $m>n$. Denote
by ${\mathcal{F}}_{\rm c}$ the collection of flats of the $q$-PM
${\mathcal{M}}_{\rm c}({\mathcal{C}})$. 6.13 implies $\mbox{${\rm d}_{\rm
rk}$}({\mathcal{C}})=n-v$, where $v=\max\\{\dim V\mid V\in{\mathcal{F}}_{\rm
c},\,\rho_{\rm c}(V)\leq\rho_{\rm c}({\mathbb{F}}^{n})-1/m\\}$. Let
$V\in{\mathcal{F}}_{\rm c}$ be such that $\dim V=v$ and $\rho_{\rm
c}(V)\leq\rho_{\rm c}({\mathbb{F}}^{n})-1/m$. Suppose $V$ is not a hyperplane.
Then there exists $V^{\prime}\in{\mathcal{F}}_{\rm c}$ such that $V\lneq
V^{\prime}\lneq{\mathbb{F}}^{n}$. Since all these spaces are flats we have
$\rho_{\rm c}(V)<\rho_{\rm c}(V^{\prime})<\rho_{\rm c}({\mathbb{F}}^{n})$.
Using that $m$ is a denominator of ${\mathcal{M}}_{\rm c}({\mathcal{C}})$,
this yields $\rho_{\rm c}(V^{\prime})\leq\rho_{\rm c}({\mathbb{F}}^{n})-1/m$.
Now $\dim V^{\prime}>v$ leads to a contradiction. Thus $V$ is a hyperplane.
This concludes the case $m>n$. For $m=n$ we know from 6.11 that $\mbox{${\rm
d}_{\rm rk}$}({\mathcal{C}})=a_{1}^{\rm c}({\mathcal{C}})=a_{1}^{\rm
r}({\mathcal{C}})$. Thus the result follows from the first part of this proof.
∎

## Further Questions

Our study gives rise to plenty of further question. We list a few of them.

  * (1)

In [14] we derive a cryptomorphic definition of $q$-PMs in terms of
independent spaces along with their rank values. It remains an open question
which other cryptomorphic definitions of $q$-matroids [7] can be extended to
$q$-PMs. For instance, is there a cryptomorphism for $q$-PMs based on flats?
Our examples show that the rank values of the flats need to be taken into
account. In this context one may also ask whether there is a meaningful notion
of cyclic flats.

  * (2)

For classical matroids the Tutte polynomial is a crucial invariant. It is
equivalent to the rank-generating function and, for a representable matroid,
carries a lot of information about linear block codes; see for instance [3]. A
rank-generating function for $q$-PMs has been introduced in [25], where also
its relation to rank-metric codes is discussed. Furthermore, a Tutte
polynomial for $q$-matroids has been introduced much earlier in [1], but it is
not yet fully understood which information about an
${\mathbb{F}}_{q^{m}}$-linear code ${\mathcal{C}}$ can be extracted from it.
As of now, it is therefore not clear what the most appropriate notion of a
$q$-Tutte polynomial is.

  * (3)

In 4.6 we introduced the $q$-analogue of a special case of paving matroid.
While we only made use of it in the context of representability, this
generalization gives rise to the question of a meaningful $q$-analogue of
paving matroids.

## Acknowledgement

We are very grateful to the reviewers for their close reading and many
constructive comments. They improved readability of the paper significantly.

## References

  * [1] G. Bollen, H. Crapo, and R. Jurrius.  The Tutte $q$-polynomial.  Preprint 2017. arXiv: 1707.03459.
  * [2] T. Britz.  Higher support matroids.  Discrete Math., 307:2300–2308, 2007.
  * [3] T. Britz.  Code enumerators and Tutte polynomials.  IEEE Trans. Inform. Theory, IT-56:4350–4358, 2010.
  * [4] T. Britz, A. Mammoliti, and K. Shiromoto.  Wei-type duality theorems for rank-metic codes.  Des. Codes Cryptogr., 88:1503–1519, 2020.
  * [5] E. Byrne, M. Ceria, S. Ionica, and R. Jurrius.  Weighted subspace design from $q$-polymatroids.  Preprint 2021. arXiv: 2104.12463.
  * [6] E. Byrne, M. Ceria, S. Ionica, R. Jurrius, and E. Saçikara.  Constructions of new matroids and designs over $\text{GF}(q)$.  Preprint 2020. arXiv: 2005.03369.
  * [7] E. Byrne, M. Ceria, and R. Jurrius.  Constructions of new $q$-cryptomorphisms.  J. Comb. Theory. Ser. B, 153:149–194, 2022.
  * [8] E. Byrne and A. Ravagnani.  Covering radius of matrix codes endowed with the rank metric.  SIAM J. Discrete Math., 31:927–944, 2017.
  * [9] M. Ceria and R. Jurrius.  The direct sum of $q$-matroids.  Preprint 2021. arXiv: 2109.13637.
  * [10] H. Crapo.  On the theory of combinatorial independence.  Ph.D. Thesis, MIT, 1964.
  * [11] P. Delsarte.  Bilinear forms over a finite field, with applications to coding theory.  J. Combin. Theory Ser. A, 25:226–241, 1978.
  * [12] E. M. Gabidulin.  Theory of codes with maximal rank distance.  Probl. Inf. Transm., 21:1–12, 1985.
  * [13] S. R. Ghorpade and T. Johnsen.  A polymatroid approach to generalized weights of rank metric codes.  Des. Codes Cryptogr., 88:2531–2546, 2020.
  * [14] H. Gluesing-Luerssen and B. Jany.  Independent spaces of $q$-polymatroids.  Preprint 2021. arXiv: 2105.01802, 2021.
  * [15] E. Gorla.  Rank-metric codes.  In W. C. Huffman, J.-L. Kim, and P. Solé, editors, A Concise Encyclopedia of Coding Theory, pages 227–250. CRC, 2021.  See also arXiv 1902.02650.
  * [16] E. Gorla, R. Jurrius, H. López, and A. Ravagnani.  Rank-metric codes and $q$-polymatroids.  J. Algebraic Combin., 52:1–19, 2020.
  * [17] R. Jurrius and R. Pellikaan.  Codes, arrangements and matroids.  In E. Martínez-Moro, editor, Algebraic Geometry Modeling in Information Theory (Series on Coding Theory and Cryptology, vol. 8), pages 219–325. World Scientific, 2013.
  * [18] R. Jurrius and R. Pellikaan.  On defining generalized rank weights.  Adv. Math. Commun., 11:225–235, 2017.
  * [19] R. Jurrius and R. Pellikaan.  Defining the $q$-analogue of a matroid.  Electron. J. Combin., 25:P3.2, 2018.
  * [20] R. Meshulam.  On the maximal rank in a subspace of matrices.  Quart. J. Math. Oxford, 36:225–229, 1985.
  * [21] J. Oxley.  Matroid Theory.  Oxford Graduate Text in Mathematics. Oxford University Press, 2nd edition, 2011.
  * [22] A. Ravagnani.  Generalized weights: An anticode approach.  J. Pure Appl. Algebra, 220:1946–1962, 2016.
  * [23] A. Ravagnani.  Rank-metric codes and their duality theory.  Des. Codes Cryptogr., 80:197–216, 2016.
  * [24] R. M. Roth.  Maximum-rank array codes and their application to crisscross error correction.  IEEE Trans. Inform. Theory, IT-37:328–336, 1991.
  * [25] K. Shiromoto.  Codes with the rank metric and matroids.  Des. Codes Cryptogr., 87:1765–1776, 2019.