# Zeta Functions for Tensor Codes

Giuseppe Cotardo G. C. was supported by the Irish Research Council, grant n.
GOIPG/2018/2534. Department of Mathematics, Virginia Tech, U.S.A

###### Abstract

In this work we introduce a new class of optimal tensor codes related to the
Ravagnani-type anticodes, namely the $j$-tensor maximum rank distance codes.
We show that it extends the family of $j$-maximum rank distance codes and
contains the $j$-tensor binomial moment determined codes (with respect to the
Ravagnani-type anticodes) as a proper subclass. We define and study the
generalized zeta function for tensor codes. We establish connections between
this object and the weight enumerator of a code with respect to the Ravagnani-
type anticodes. We introduce a new refinement of the invariants of tensor
codes exploiting the structure of product lattices of some classes of
anticodes and we derive the corresponding MacWilliams identities. In this
framework, we also define a multivariate version of the tensor weight
enumerator and we establish relations with the corresponding zeta function. As
an application we derive connections on the generalized tensor weights related
to the Delsarte and Ravagnani-type anticodes.

##  1 Introduction

Tensor codes are linear $\mathbb{F}_{q}$-linear subspaces of the tensor space
$\mathbb{F}_{q}^{n_{1}}\otimes\cdots\otimes\mathbb{F}_{q}^{n_{r}}$ endowed
with the tensor rank as a distance function. They were introduced by Roth [20,
21] for the case $n_{1}=\cdots=n_{r}$ as a natural generalization of matrix
rank-metric codes and used to show that the behaviour of matrix spaces is
quite unique compared to the more general case of space of higher order
tensors. The definition was then extended in [7] wherein four different types
of anticodes were classified and exploited to study invariants of tensor
codes, such as the tensor weight distribution, the tensor binomial moments and
the generalized tensor weights. Although the theory of matrix codes has been
the subject of intensive research over the last years, the study of tensor
codes is still rather unexplored. In [20], Roth provided a generalization of
the ‘usual’ Singleton bound which turned out to not be sharp for $r>2$. Even
though an improvement of this bound was derived for $3$-tensors, only
asymptotic bounds are known for higher order tensors. Moreover, few classes of
tensor codes are known (in fact only those proposed by Roth in [20, 21]).
Investigating invariants of these codes represents a crucial step for a better
understanding of structural properties and constructing new families of such
codes.

Recently, matrix rank-metric codes were investigated in the context of
$3$-tensors [3, 6, 9] and the tensor ranks of some classes were determined.
The tensor rank of a code is defined as the smallest dimension of a space
spanned by rank-$1$ tensors containing the code. Another object that captures
properties of a code is its zeta function. This object was introduced in [13,
14] for Hamming-metric codes and in [5, 8] for matrix rank-metric codes as the
generator function of the generalized normalized binomial moments. A central
role in this theory is played by codes that are extremal with respect to the
generalized Singleton-bounds, namely the $j$-maximum distance separable
($j$-MDS in short) codes for the Hamming metric case and the $j$-maximum rank
distance ($j$-MRD in short) codes for the rank-metric case (see [23] and [8]
respectively for further details). It is well-known that the set of the weight
enumerators of such extremal codes provides a $\mathbb{Q}$-basis for the space
of homogeneous polynomials in $\mathbb{Q}[X,Y]$ of fixed degree. This property
was used in the study of the zeta functions for codes wherein relations
between the weight enumerator of a code and the Singleton-optimal weight
enumerators were established. In [8] (for the Hamming and matrix rank-metric
case) and in [7] (for the tensor case), the family of $j$-binomial moment
determined ($j$-BMD in short) codes has been investigated. These extremal
codes have the property that all or some of their invariants are determined by
the code parameters. In particular, in [7] the authors showed that the class
of $1$-BMD matrix codes is partitioned by the well known families of MRD and
dually quasi-MRD codes (see [12] and [11] for further details).

In this paper, we set the theory of zeta functions in the most general context
of tensor codes with a perspective based on the families of anticodes
claasified in [7]. In the first part we introduce the notion of zeta function
of tensor codes. We then specialize it to the class of Ravagnani-type
anticodes and we establish connections between this object and the generalized
weight enumerators of tensor codes. As a consequence, we extend the theory
developed in [8] for codes of matrices in the rank metric. The second part
will be devoted to a refinement of the tensor zeta functions, binomial moments
and weight distributions for closure-type anticodes using the underlying
structure of their direct product lattice. We derive analogue relations on
these invariants as in the first part of the work.

Outline. The paper is organized as follows. In Section 2 we recall some
definitions and results. In Section 3 we classify and study a new class of
tensor codes that are extremal with respect to the Ravagnani-type anticodes,
namely the $j$-tensor maximum rank distance codes. We establish relations
between this family and that of $j$-tensor BMD codes. We prove that the latter
forms a proper subclass of the former. In Section 4 we introduce the tensor
zeta function for the different sets of anticodes classified in [7]. In
particular, we show that this object strictly depends on the underlying set of
anticodes. In Section 5, we restrict to invariants related to the Ravagnani-
type anticodes which allows us to generalize the theory developed in [8] for
matrix codes. In this setting, we relate the tensor zeta function to the
tensor weight enumerator and we compute the coefficients of the latter in
terms of the weight enumerators of $j$-tensor maximum rank distance codes. The
theory in this section can be seen as a generalization of the one in [8].
Section 6 will be devoted to the study of new refined invariants of tensor
codes using the fact that the set closure-type anticodes is indeed a direct
product lattice. More in detail, we define a multivariate version of the
tensor weight enumerator and zeta function, and we show connections between
these objects. As an application, in Section 7, we derive connections on the
tensor weights associated to the Delsarte and Ravagnani-type anticodes.

##  2 Preliminaries and Notation

We start recalling some basic definition on posets and lattices (a standard
reference is [22, Chapter 3]). For any positive integer $i$, we denote by
$[i]$ the set $\\{1,\ldots,i\\}$.

######  Definition 2.1.

A partially ordered set (poset for short) is a pair $(\mathscr{P},\leq)$ where
$\mathscr{P}$ is a non-empty set and $\leq$ is a binary operation satisfying
the axioms of reflexivity, antisymmetry and transitivity. We sometimes abuse
the notation and write $\mathscr{P}$ for $(\mathscr{P},\leq)$.

For $s,t\in\mathscr{P}$ we write $s<t$ for $s\leq t$ and $s\neq t$. Two posets
$\mathscr{P}$ and $\mathcal{Q}$ are isomorphic if there exists an order-
preserving map $\phi:\mathscr{P}\longrightarrow\mathcal{Q}$ whose inverse is
order preserving, that is $s\leq t\textup{ in
}\mathscr{P}\Longleftrightarrow\phi(s)\leq\phi(t)\textup{ in }\mathcal{Q}$.

######  Definition 2.2.

Let $\mathscr{P}_{1},\ldots,\mathscr{P}_{r}$ be posets. The direct product of
$\mathscr{P}_{1},\ldots,\mathscr{P}_{r}$ is the poset
$\mathscr{P}_{1}\times\ldots\times\mathscr{P}_{r}$ on the set
$\\{(s_{1},\ldots,s_{r}):s_{i}\in\mathscr{P}_{i}$ and $i\in[r]\\}$ such that
$(s_{1},\ldots,s_{r})\leq(t_{1},\ldots,t_{r})$ in
$\mathscr{P}_{1}\times\ldots\times\mathscr{P}_{r}$ if $s_{i}\leq t_{i}$ in
$\mathscr{P}_{i}$ for all $i\in[r]$.

######  Definition 2.3.

The join of $s,t\in\mathscr{P}$, should it exist, is the element
$u\in\mathscr{P}$ satisfying $s\leq u$, $t\leq u$ and $u\leq v$ for all
$v\in\mathscr{P}$ such that $s\leq v$ and $t\leq v$. The meet of
$s,t\in\mathscr{P}$, should it exist, is defined dually as the element
$u\in\mathscr{P}$ satisfying $u\leq s$, $u\leq t$ and $v\leq u$ for all
$v\in\mathscr{P}$ such that $v\leq s$ and $v\leq t$.

######  Notation 2.4.

It easy to check that the join (resp., the meet) of $s,t\in\mathscr{P}$,
should it exist, is unique and we denote it by $s\vee t$ (resp., $s\wedge t$).

######  Definition 2.5.

Let $\mathscr{P}$ be a poset and let $s,t\in\mathscr{P}$. The interval $[s,t]$
in $\mathscr{P}$ is the set $\\{u\in\mathscr{P}:s\leq u\leq t\\}$. The poset
$\mathscr{P}$ is locally finite if each of its intervals has only finitely
many elements.

######  Definition 2.6.

The Möbius function of a locally finite poset $\mathscr{P}$ is defined
recursively by $\mu_{\mathscr{P}}(s,t)=1$ if $s=t$,
$\mu_{\mathscr{P}}(s,t)=-\sum_{s\leq u<t}\mu_{\mathscr{P}}(s,u)$ if $s<t$ and
$\mu_{\mathscr{P}}(s,t)=0$ otherwise. We sometimes write $\mu(s,t)$ for
$\mu_{\mathscr{P}}(s,t)$ if the poset is clear from context.

######  Proposition 2.7 (Möbius Inversion Formula).

Let $\mathbb{K}$ be a field, $\mathscr{P}$ be a locally finite poset and let
$f:\mathscr{P}\longrightarrow\mathbb{K}$ be a function. Define
$g:\mathscr{P}\longrightarrow\mathbb{K}$ by $g(t)=\sum_{s\leq t}f(s)$ for all
$t\in\mathscr{P}$. Then

$f(t)=\sum_{s\leq t}\mu_{\mathscr{P}}(s,t)g(s)\quad\textup{for all
$t\in\mathscr{P}$}.$

######  Proposition 2.8 (The Product Theorem).

Let $\mathscr{P}_{1}\times\ldots\times\mathscr{P}_{r}$ be the direct product
of the locally finite posets $\mathscr{P}_{1},\ldots,\mathscr{P}_{r}$. If
$(s_{1},\ldots,s_{r})\leq(t_{1},\ldots,t_{r})$ in
$\mathscr{P}_{1}\times\ldots\times\mathscr{P}_{r}$ then

$\mu_{\mathscr{P}_{1}\times\ldots\times\mathscr{P}_{r}}((s_{1},\ldots,s_{r}),(t_{1},\ldots,t_{r}))=\prod_{i=1}^{r}\mu_{\mathscr{P}_{i}}(s_{i},t_{i}).$

######  Definition 2.9.

A lattice $(\mathscr{L},\leq)$ is a poset where every $s,t\in\mathscr{P}$ have
join and meet. In particular, the join (resp., the meet) of a non-empty subset
$S\subseteq\mathscr{L}$ is well-defined as the join (resp., the meet) of its
elements and denoted by $\bigvee S$ (resp., $\bigwedge S$). A subset
$\mathscr{M}$ of $\mathscr{L}$ is a sublattice of $\mathscr{L}$ if
$\mathscr{M}$ is closed under the operations of $\vee$ and $\wedge$ in
$\mathscr{L}$.

Throughout the paper we let $q$ be a power prime. We let $\mathbb{F}_{q}$ be
the field of cardinality $q$ and let $\mathbb{F}$ be the tensor product space
$\mathbb{F}_{q}^{n_{1}}\otimes\cdots\otimes\mathbb{F}_{q}^{n_{r}}$ for some
integers $r,n_{1},\ldots,n_{r}$ such that $r,n_{1}\geq 2$. We assume
$n_{1}=\min\\{n_{1},\ldots,n_{r}\\}$ and $n_{r}=\max\\{n_{1},\ldots,n_{r}\\}$
without loss of generality and we denote by $n$ the product $n_{1}\cdots
n_{r}$.

######  Definition 2.10.

An $r$-tensor $X\in\mathbb{F}$ is a rank-1 (or simple) tensor if $X$ can be
expressed as $x^{(1)}\otimes\cdots\otimes x^{(r)}$, for some
$x^{(i)}\in\mathbb{F}_{q}^{n_{i}}$, $i\in[r]$.

We say that $V\leq\mathbb{F}$ is perfect if $V$ has a basis of simple tensors
(c.f. [2]).

######  Definition 2.11.

The rank of $X\in\mathbb{F}$ is defined to be the least integer $R$ such that
$X$ can be expressed as sum of $R$ simple tensors, that is

$\textup{rk}(X):=\left\\{R\in\mathbb{Z}:X=\sum_{j=1}^{R}x_{j}^{(1)}\otimes\cdots\otimes
x_{j}^{(r)}\right\\}.$

The rank function induces a metric on $\mathbb{F}$. More in detail, the
function $\mathbb{F}\longrightarrow\mathbb{Z}:X\longmapsto\textup{rk}(X)$ is a
distance function (see [21]). A basis for $\mathbb{F}$ is given by

$\left\\{\bigotimes_{i=1}^{r}u_{j_{i}}^{(i)}:j_{i}\in[n_{i}]\textup{ and
}i\in[r]\right\\}$

provided that $\\{u_{1}^{(i)},\ldots,u_{n_{i}}^{(i)}\\}$ is a basis for
$\mathbb{F}_{q}^{n_{i}}$, for any $i\in[r]$, and therefore we have
$\dim_{\mathbb{F}_{q}}\left(\mathbb{F}\right)=\prod_{i=1}^{r}\dim_{\mathbb{F}_{q}}\left(\mathbb{F}_{q}^{n_{i}}\right)=n$.
We recall that an $r$-tensor $X\in\mathbb{F}$ can be represented as the map
$X:[n_{1}]\times\cdots\times[n_{r}]\longmapsto\mathbb{F}_{q}$ given by
$X=(X_{j_{1},\ldots,j_{r}}:j_{i}\in[n_{i}],i\in[r])$. Therefore, the map

$\mathbb{F}\longrightarrow\mathbb{F}_{q}^{n_{1}\times\cdots\times
n_{r}}:X=\sum_{s=1}^{\textup{rk}(X)}\bigotimes_{i=1}^{r}x_{s}^{(i)}\longmapsto\left(X_{j_{1},\ldots,j_{r}}=\sum_{s=1}^{\textup{rk}(X)}x_{j_{i},s}^{(i)}\right)_{j_{i}\in[n_{i}],\;i\in[r]}$

where, $x_{s}^{(i)}=(x_{j_{i},s}^{(i)}:j_{i}\in[n_{i}])$ for any $i\in[r]$, is
an $\mathbb{F}_{q}$-isomorphism. As a consequence, we can identify
$\mathbb{F}$ with $\mathbb{F}_{q}^{n_{1}\times\cdots\times n_{r}}$ and
represent an $r$-tensor as an $r$-dimensional array.

Tensor codes were introduced in [20, 21] for the case
$n_{1}=n_{2}=\cdots=n_{r}$ as a generalization of codes in the rank-metric. We
recall the more general definition given in [7].

######  Definition 2.12.

A tensor code is a $k$-dimensional subspace $\mathcal{C}$ of $\mathbb{F}$. The
maximum rank $\textup{maxrk}(\mathcal{C})$ of $\mathcal{C}$ is
$\textup{maxrk}(\mathcal{C}):=\max\\{\textup{rk}(C):C\in\mathcal{C}\\}$. The
tensor rank $\textup{trk}(\mathcal{C})$ of $\mathcal{C}$ is the minimum
dimension of a perfect space containing $\mathcal{C}$. The minimum (tensor
rank) distance of a non-zero code $\mathcal{C}$ is
$d(\mathcal{C}):=\min\\{\textup{rk}(C):C\in\mathcal{C},C\neq 0\\}$.

We refer to $n_{1}\times\cdots\times n_{r},k,d(\mathcal{C})$ as the code
parameters of $\mathcal{C}$ and we say that $\mathcal{C}$ is an
$\mathbb{F}_{q}$-$[n_{1}\times\cdots\times n_{r},k,d(\mathcal{C})]$ code.
Moreover, we simply write $\mathbb{F}_{q}$-$[n_{1}\times\cdots\times n_{r},k]$
if the minimum distance is not known. For any $i\in[r]$, we let $\cdot$ be the
dot product on $\mathbb{F}_{q}^{n_{i}}$, defined in the usual way as $x\cdot
y=\sum_{j=1}^{n_{i}}x_{j}y_{j}$ for $x,y\in\mathbb{F}_{q}^{n_{i}}$. We
furthermore denote by $*$ the non-degenerate bilinear form defined by

$X*Y=\sum_{j_{1}=1}^{n_{1}}\cdots\sum_{j_{r}=1}^{n_{r}}X_{j_{1},\cdots,j_{r}}Y_{j_{1},\cdots,j_{r}}.$

######  Remark 2.13.

One can check that if $X$ and $Y$ are have rank $1$, say $X=x^{(}1)\times
x^{(r)}$ and $Y=y^{(}1)\times y^{(r)}$ $*$ then we have

$X*Y=\prod_{i=1}^{r}\left(x^{(i)}\cdot y^{(i)}\right).$

######  Definition 2.14.

The dual of $\mathcal{C}$ is defined to be the $\mathbb{F}_{q}$-subspace of
$\mathbb{F}$ which is orthogonal to $\mathcal{C}$ with respect to $*$, that is
$\mathcal{C}^{\perp}:=\\{X\in\mathbb{F}:X*C=0\textup{ for all
}C\in\mathcal{C}\\}$.

We summarize some basic facts on the dual tensor code.

######  Lemma 2.15.

Let $\mathcal{C},\mathcal{D}\leq\mathbb{F}$ be codes. The following hold.

  1. (1)

$\left(\mathcal{C}^{\perp}\right)^{\perp}=\mathcal{C}$.

  2. (2)

$\dim_{\mathbb{F}_{q}}\left(\mathcal{C}^{\perp}\right)=n-\dim_{\mathbb{F}_{q}}\left(\mathcal{C}\right)$.

  3. (3)

$(\mathcal{C}\cap\mathcal{D})^{\perp}=\mathcal{C}^{\perp}+\mathcal{D}^{\perp}$.

######  Notation 2.16.

For ease of notation, in the examples throughout the paper we represent
$3$-tensors in
$\mathbb{F}_{q}^{n_{1}}\otimes\mathbb{F}_{q}^{n_{2}}\otimes\mathbb{F}_{q}^{n_{3}}$
as vectors in $\mathbb{F}_{q}^{n_{1}n_{2}n_{3}}$ according to the isomorphism

$\begin{array}[]{cccccc}&\mathbb{F}_{q}^{n_{1}}\otimes\mathbb{F}_{q}^{n_{2}}\otimes\mathbb{F}_{q}^{n_{3}}&\longrightarrow&\left(\mathbb{F}_{q}^{n_{1}\times
n_{2}}\right)^{n_{3}}&\longrightarrow&\mathbb{F}_{q}^{n_{1}n_{2}n_{3}}\\\\[5.0pt]
&X&\longmapsto&\left(X_{1}\mid\cdots\mid
X_{n_{3}}\right)&\longmapsto&\left(\overline{X_{1}}\mid\cdots\mid\overline{X_{n_{3}}}\right).\end{array}$

where, for a matrix $M\in\mathbb{F}_{q}^{n_{1}\times n_{2}}$, $\overline{M}$
is the vector of length $n_{1}n_{2}$ with entries in $\mathbb{F}_{q}$ obtained
by concatenating the rows of $M$. For example, the $3$-tensor

$(1,1)\otimes(1,0,0)\otimes(1,1,1,0)+(1,1)\otimes(0,0,1)\otimes(0,1,1,1)\in\mathbb{F}_{2}^{2}\otimes\mathbb{F}_{2}^{3}\otimes\mathbb{F}_{2}^{4}$

can be represented as the vector

$\left(\begin{array}[]{*{3}{*{3}c;{3pt/3pt}*{3}c|}*{3}c;{3pt/3pt}*{3}c}1&0&0&1&0&0&1&0&1&1&0&1&1&0&1&1&0&1&0&0&1&0&0&1\end{array}\right)\in\mathbb{F}_{2}^{24}.$

######  Definition 2.17.

For a code
$\mathcal{C}\in\mathbb{F}_{q}^{n_{1}}\otimes\mathbb{F}_{q}^{n_{2}}\otimes\mathbb{F}_{q}^{n_{3}}$
of dimension $k$, we say that $G\in\mathbb{F}_{q}^{k\times n_{1}n_{2}n_{3}}$
is a generator matrix (resp., a parity-check matrix) for $\mathcal{C}$ if the
rows of $G$ are the vector representation of a basis of $\mathcal{C}$ (resp.,
$\mathcal{C}^{\perp}$).

In the remainder of the paper, unless explicitly stated,
$\mathcal{C}\leq\mathbb{F}$ will denote a tensor code of dimension $k$ over
$\mathbb{F}_{q}$ and minimum distance $d$. In [7], the general theory of
anticodes for tensor codes was developed and invariants related to the latter
were studied. We now recall the main definitions and results.

######  Definition 2.18 ([7, Definition 4.1]).

We say that $A\leq\mathbb{F}$ is a (tensor) anticode if $A$ is perfect. If
$\mathcal{A}$ is a collection of anticodes of $\mathbb{F}$ we write
$\mathcal{A}_{a}$ to denote the set of all anticodes of $\mathcal{A}$ of
dimension $a$, where $a\in\\{0,\ldots,n\\}$. If
$\\{A^{\perp}:A\in\mathcal{A}\\}$ is a collection of anticodes, then we define
the collection of dual (tensor) anticodes of $\mathcal{A}$ to be
$\overline{\mathcal{A}}:=\\{A^{\perp}:A\in\mathcal{A}\\}$.

The following definition provide a characterization of the different families
of anticodes defined in [7]. In particular, it summarizes [7, Definition 4.2,
Propositions 4.7, Theorems 4.16 and 4.21].

######  Definition 2.19.

We define the following.

  1. (1)

The family of perfect spaces is
$\displaystyle\mathcal{A}^{\textup{ps}}:=\\{A\in\mathbb{F}:A\textup{ is
perfect}\\}$.

  2. (2)

The family of closure-type anticodes is
$\displaystyle\mathcal{A}^{\textup{cl}}:=\left\\{\bigotimes_{i=1}^{r}A^{(i)}:A^{(i)}\leq\mathbb{F}_{q}^{n_{i}}\textup{
for any }i\in[r]\right\\}$.

  3. (3)

The family of Delsarte-type anticodes is
$\displaystyle\mathcal{A}^{\textup{D}}=\bigcup_{p\in
P}\left\\{\left(\bigotimes_{j=1}^{i-1}\mathbb{F}_{q}^{n_{j}}\right)\otimes
A^{(i)}\otimes\left(\bigotimes_{j=i+1}^{r}\mathbb{F}_{q}^{n_{j}}\right):A^{(i)}\leq\mathbb{F}_{q}^{n_{i}},i\in[r]\setminus\\{p\\}\right\\}$
where $P:=\\{i\in[r]:n_{i}=n_{r}\\}$.

  4. (4)

The family of Ravagnani-type anticodes is
$\displaystyle\mathcal{A}^{\textup{R}}=\left\\{\left(\bigotimes_{j=1}^{i-1}\mathbb{F}_{q}^{n_{j}}\right)\otimes
A^{(i)}\otimes\left(\bigotimes_{j=i+1}^{r}\mathbb{F}_{q}^{n_{j}}\right):A^{(i)}\leq\mathbb{F}_{q}^{n_{i}},i\in
S\right\\}$
where $S:=\\{i\in[r]:n_{i}=n_{1}\\}$.

It was noted in [7] that for $r=2$ the families of Delsarte-type and
Ravagnani-type anticodes coincide and reduce to the class of optimal anticodes
defined in [19]. It was also observed in [7, Example 4.5] that the dual of a
perfect space is not perfect in general and therefore
$\overline{\mathcal{A}^{\textup{ps}}}\not\subseteq\mathcal{A}^{\textup{ps}}$.
The next result summarizes [7, Corollaries 4.13, 4.17, 4.22].

######  Proposition 2.20.

We have
$\overline{\mathcal{A}^{\textup{cl}}},\overline{\mathcal{A}^{\textup{D}}},\overline{\mathcal{A}^{\textup{R}}}\subseteq\mathcal{A}^{\textup{ps}}$.
In particular, $\overline{\mathcal{A}^{\textup{D}}}=\mathcal{A}^{\textup{D}}$,
$\overline{\mathcal{A}^{\textup{R}}}=\mathcal{A}^{\textup{R}}$ and

$\overline{\mathcal{A}^{\textup{cl}}}=\left\\{\sum_{i=1}^{r}\left(\bigotimes_{j=1}^{i-1}\mathbb{F}_{q}^{n_{j}}\right)\otimes
A^{(i)}\otimes\left(\bigotimes_{j=i+1}^{r}\mathbb{F}_{q}^{n_{j}}\right):A^{(i)}\leq\mathbb{F}_{q}^{n_{i}}\textup{
for all }i\in[r]\right\\}.$

######  Remark 2.21.

We recall that the families of anticodes
$\mathcal{A}^{\textup{ps}},\mathcal{A}^{\textup{cl}},\overline{\mathcal{A}^{\textup{cl}}},\mathcal{A}^{\textup{D}},\overline{\mathcal{A}^{\textup{D}}},\mathcal{A}^{R}$
and $\overline{\mathcal{A}^{\textup{R}}}$ are indeed lattices, as proved in
[7].

The following invariants were introduced in [7]. They extend the Delsarte
generalized weights [19] and the generalized tensor ranks [9] which can be
recovered for $r=2$, and $\mathcal{A}=\mathcal{A}^{D}$ and
$\mathcal{A}=\mathcal{A}^{\textup{ps}}$ respectively.

######  Definition 2.22 ([7, Definition 5.1]).

Let $\mathcal{A}$ be a collection of anticodes. For each $j\in[k]$, the $j$-th
tensor weight with respect to $\mathcal{A}$ is defined to be:

$t_{j}(\mathcal{C}):=\min\left\\{\dim_{\mathbb{F}_{q}}\left(A\right):A\in\mathcal{A}\textup{
and }\dim_{\mathbb{F}_{q}}\left(\mathcal{C}\cap A\right)\geq j\right\\}.$

Furthermore, if $\overline{\mathcal{A}}\subseteq\mathcal{A}^{\textup{ps}}$
then we define the $j$-th dual tensor weight to be

$s_{j}(\mathcal{C}):=\min\left\\{\dim_{\mathbb{F}_{q}}\left(A\right):A\in\overline{\mathcal{A}}\textup{
and }\dim_{\mathbb{F}_{q}}\left(\mathcal{C}\cap A\right)\geq j\right\\}.$

For the remainder, we let $j$ be a fixed integer in $[k]$ and we write
$t_{j}$, $s_{j}$, $t_{j}^{\perp}$ and $s_{j}^{\perp}$ instead of
$t_{j}(\mathcal{C})$, $s_{j}(\mathcal{C})$,
$t_{j}\left(\mathcal{C}^{\perp}\right)$ and
$s_{j}\left(\mathcal{C}^{\perp}\right)$ respectively.

######  Proposition 2.23 ([7, Proposition 5.2]).

The following hold.

  1. (1)

$t_{j}\leq t_{j+1}$ and, if
$\overline{\mathcal{A}}\subseteq\mathcal{A}^{\textup{ps}}$, $s_{j}\leq
s_{j+1}$ for any $j\in[k]$.

  2. (2)

$t_{j}^{\textup{ps}}\leq t_{j}^{\textup{cl}}\leq t_{j}^{\textup{D}}\leq
t_{j}^{\textup{R}}$ for any $j\in[k]$ .

  3. (3)

$t_{j}^{\textup{D}}=s_{j}^{\textup{D}}$ and
$t_{j}^{\textup{R}}=s_{j}^{\textup{R}}$ for any $j\in[k]$.

In [7, Section 6], new invariants related to the different collections of
anticodes were defined, namely the tensor binomial moments and weight
distributions and it was shown that they encode the same information. We
briefly recall their definitions and some main results. We use the convention
that $\sum_{x\in\emptyset}f(x)=0$ for any function
$f:\mathbb{Q}\longrightarrow\mathbb{Q}$.

######  Definition 2.24 ([7, Definition 6.1]).

For any $a\in\\{0,\ldots,n\\}$ the $(a,j)$-th tensor binomial moment of
$\mathcal{C}$ is defined to be

$B_{a}^{(j)}(\mathcal{C}):=\sum_{A\in\mathcal{A}_{a}}B_{A}^{(j)}(\mathcal{C}),\qquad\textup{
where }\qquad
B_{A}^{(j)}(\mathcal{C}):=\begin{bmatrix}{\dim_{\mathbb{F}_{q}}\left(\mathcal{C}\cap
A\right)}\\\ {j}\end{bmatrix}_{q}$

for any $A\in\mathcal{A}$. If moreover
$\overline{\mathcal{A}}\subseteq\mathcal{A}^{\textup{ps}}$ we define the
$(a,j)$-th dual tensor binomial moment of $\mathcal{C}$ to be

$\overline{B}_{a}^{(j)}(\mathcal{C}):=\sum_{A\in\overline{\mathcal{A}}_{a}}\overline{B}_{A}^{(j)}(\mathcal{C}),\qquad\textup{
where
}\qquad\overline{B}_{A}^{(j)}(\mathcal{C}):=\begin{bmatrix}{\dim_{\mathbb{F}_{q}}\left(\mathcal{C}\cap
A\right)}\\\ {j}\end{bmatrix}_{q}.$

######  Definition 2.25 ([7, Definition 6.2]).

The $j$-th weight distribution is defined to be the vector of length $n+1$
whose $(a+1)$-th component is given by

$W_{a}^{(j)}(\mathcal{C}):=\sum_{A\in\mathcal{A}_{a}}W_{A}^{(j)}(\mathcal{C}),$

where $W_{A}^{(j)}:=|\\{\mathcal{D}\leq(\mathcal{C}\cap
A):\dim_{\mathbb{F}_{q}}\left(\mathcal{D}\right)=j\textup{ and
}\mathcal{D}\leq B\leq A,B\in\mathcal{A}\Longrightarrow B=A\\}|$, for any
$A\in\mathcal{A}_{a}$. If
$\overline{\mathcal{A}}\subseteq\mathcal{A}^{\textup{ps}}$ we let the $j$-th
dual weight distribution to be the vector of length $n+1$ whose $(a+1)$-th
component is given by

$\overline{W}_{a}^{(j)}(\mathcal{C}):=\sum_{A\in\overline{\mathcal{A}}_{a}}\overline{W}_{A}^{(j)}(\mathcal{C}),$

where $\overline{W}_{A}^{(j)}:=|\\{\mathcal{D}\leq(\mathcal{C}\cap
A):\dim_{\mathbb{F}_{q}}\left(\mathcal{D}\right)=j\textup{ and
}\mathcal{D}\leq B\leq A,B\in\overline{\mathcal{A}}\Longrightarrow
B=A\\}\\}|$, for any $A\in\overline{\mathcal{A}}_{a}$.

######  Definition 2.26 ([7, Definition 6.3]).

Let $X$ and $Y$ be indeterminates. We define the $j$-th tensor weight
enumerator by

$\mathcal{W}_{\mathcal{C}}^{(j)}(X,Y):=\sum_{a\leq
n}W_{a}^{(j)}(\mathcal{C})X^{n-a}Y^{a}\in\mathbb{Q}[X,Y].$

If $\overline{\mathcal{A}}\subseteq\mathcal{A}^{\textup{ps}}$ we let the
$j$-th dual tensor weight enumerator be defined by

$\overline{\mathcal{W}}_{\mathcal{C}}^{(j)}(X,Y):=\sum_{a\leq
n}\overline{W}_{a}^{(j)}(\mathcal{C})X^{n-a}Y^{a}\in\mathbb{Q}[X,Y].$

######  Proposition 2.27 ([7, Theorem 6.4]).

Let $\mathcal{A}$ be a family of anticodes whose members form a lattice and
let $\mu$ be its Möbius function. The following hold for all
$a,b\in\\{0,\ldots,n\\}$.

  1. (1)

$\displaystyle
B_{a}^{(j)}(\mathcal{C})=\sum_{b=0}^{a}W_{b}^{(j)}(\mathcal{C})\;\left|\left\\{(A^{\prime},A)\in\mathcal{A}_{b}\times\mathcal{A}_{a}:A^{\prime}\leq
A\right\\}\right|$.

  2. (2)

$\displaystyle
W_{b}^{(j)}(\mathcal{C})=\sum_{a=0}^{b}\mu(a,b)B_{a}^{(j)}(\mathcal{C})\;\left|\left\\{(A^{\prime},A)\in\mathcal{A}_{b}\times\mathcal{A}_{a}:A\leq
A^{\prime}\right\\}\right|$.

######  Proposition 2.28 ([7, Theorem 6.6]).

Suppose that $\overline{\mathcal{A}}\subseteq\mathcal{A}^{\textup{ps}}$. For
any $a\in\\{0,\ldots,n\\}$, we have

$B_{a}^{(j)}(\mathcal{C})=\begin{cases}0&\textup{ if }a<t_{j},\\\\[4.30554pt]
\begin{bmatrix}{k+a-n}\\\
{j}\end{bmatrix}_{q}\left|\mathcal{A}_{a}\right|&\textup{ if
}a>n-s_{1}^{\perp}.\end{cases}$

A family of extremal codes with the property that the tensor binomial moments
and weight distribution are partially determined by their code parameters was
introduced in [8] and is defined as follows.

######  Definition 2.29 ([7, Definition 6.9]).

Suppose that $\overline{\mathcal{A}}\subseteq\mathcal{A}^{\textup{ps}}$. We
say that the code $\mathcal{C}$ is $j$-tensor binomial moment determined
($j$-TBMD in short) with respect to (the anticodes in) $\mathcal{A}$ if
$n-s_{1}^{\perp}-t_{j}<0$. Moreover, we say that $\mathcal{C}$ is minimally
$j$-TBMD if $j$ is the minimum of the set $\\{p\in[k]:\mathcal{C}\textup{ is
}p\textup{ -TBMD}\\}$.

Note that, this notion of extremality generalizes the one of being $j$-BMD
(see [8]), which can be recovered for $r=2$ and
$\mathcal{A}=\mathcal{A}^{\textup{D}}=\mathcal{A}^{\textup{R}}$. Finally, we
recall some well-known properties of $q$-binomial coefficients (the reader is
referred to [1] for more details).

######  Definition 2.30.

Let $a,b$ be integers. The $q$-binomial coefficient of $a$ and $b$ is defined
to be

$\begin{bmatrix}{a}\\\ {b}\end{bmatrix}_{q}:=\begin{cases}0&\textup{ if
}b<0\textup{ or }0\leq a\leq b,\\\\[4.30554pt] 1&\textup{ if
}b=0,\\\\[4.30554pt]
\displaystyle\prod_{i=0}^{b-1}\frac{q^{a-i}-1}{q^{i+1}-1}&\textup{ if
}b>0\textup{ and }a\geq b.\end{cases}$

######  Lemma 2.31.

Let $a,b,c$ be integers and $x,y$ be rational numbers. The following hold.

  1. (1)

$\displaystyle\begin{bmatrix}{a}\\\ {b}\end{bmatrix}_{q}\begin{bmatrix}{b}\\\
{c}\end{bmatrix}_{q}=\begin{bmatrix}{a}\\\
{c}\end{bmatrix}_{q}\begin{bmatrix}{a-c}\\\ {a-b}\end{bmatrix}_{q}$.

  2. (2)

$\displaystyle\begin{bmatrix}{a+b}\\\
{c}\end{bmatrix}_{q}=\sum_{j=0}^{c}q^{j(b-c+j)}\begin{bmatrix}{a}\\\
{j}\end{bmatrix}_{q}\begin{bmatrix}{b}\\\
{c-j}\end{bmatrix}_{q}=\sum_{j=0}^{c}q^{(c-j)(a-j)}\begin{bmatrix}{a}\\\
{j}\end{bmatrix}_{q}\begin{bmatrix}{b}\\\ {c-j}\end{bmatrix}_{q}$.

  3. (3)

$\displaystyle\sum_{j=0}^{c}\begin{bmatrix}{c}\\\
{j}\end{bmatrix}_{q}(-1)^{j}q^{\binom{j}{2}}x^{c-j}y^{j}=\begin{cases}0&\textup{
if }c=0,\\\ \displaystyle\prod_{j=0}^{c-1}(x-q^{j}y)&\textup{ if }c\geq
1.\end{cases}$

##  3 $j$-TMRD Codes for Ravagnani-type Anticodes

In this section, we introduce a new class of codes that show properties of
extremality with respect to the Ravagnani-type anticodes and we relate them to
the $j$-TBMD codes. We prove that the latter are a proper subclass of the
former and we show that they extend the class of $1$-MRD matrix rank-metric
codes. We recall some results proved in [7] on the generalized tensor weight
related to $\mathcal{A}^{\textup{R}}$.

######  Proposition 3.1 ([7, Proposition 5.10]).

The following hold.

  1. (1)

$t_{j}^{\textup{R}}+\frac{n}{n_{1}}\leq t_{j+\frac{n}{n_{1}}}^{\textup{R}}$.

  2. (2)

$t_{j}^{\textup{R}}\leq
n-\frac{n}{n_{1}}\left\lfloor\frac{n_{1}}{n}(k-j)\right\rfloor$.

  3. (3)

$t_{j}^{\textup{R}}\geq j$.

As observed in [7], the Wei-type duality described in [19, Section 6] can be
extended for the tensor weights associated to the Ravagnani-type anticodes.

######  Theorem 3.2 ([7, Theorem 5.12]).

Define the sets

$\displaystyle S_{p}(\mathcal{C}^{\perp})$
$\displaystyle:=\left\\{\frac{n_{1}}{n}\,t_{p+i\frac{n}{n_{1}}}^{\textup{R}}(\mathcal{C}^{\perp}):i\in\mathbb{Z}\textup{
and }1\leq p+i\frac{n}{n_{1}}\leq k\right\\},$
$\displaystyle\overline{S}_{p}(\mathcal{C})$
$\displaystyle:=\left\\{n_{1}+1-\frac{n_{1}}{n}\,t_{p+i\frac{n}{n_{1}}}^{\textup{R}}(\mathcal{C}):i\in\mathbb{Z}\textup{
and }1\leq p+i\frac{n}{n_{1}}\leq k\right\\}.$

We have
$S_{p}(\mathcal{C}^{\perp})=[n_{1}]\setminus\overline{S}_{p+k}(\mathcal{C})$
for any $1\leq p\leq\frac{n}{n_{1}}$. In particular, the tensor weights (of
the Ravagnani-type) of $\mathcal{C}$ fully determine those of
$\mathcal{C}^{\perp}$.

In the remainder, we set $t_{1}(\\{0\\}):=n+\frac{n}{n_{1}}$. This choice is
in line with [16, Definition 11.3.1] as we will observe after Lemma 3.10. We
introduce the main object of this section, that is a new class of codes
meeting the bound in Proposition 3.1((2)) with equality. This bound is a
possible generalization of the Singleton-type bound for matrix codes.

######  Definition 3.3.

The code $\mathcal{C}$ is $j$-tensor maximum rank distance ($j$-TMRD in short)
with respect (the anticodes in) $\mathcal{A}^{\textup{R}}$ if

$t_{j}^{\textup{R}}=n-\frac{n}{n_{1}}\left\lfloor\frac{n_{1}}{n}(k-j)\right\rfloor.$

######  Remark 3.4.

It is immediate to see that the property of being $j$-TMRD with respect to
$\mathcal{A}^{\textup{R}}$ extends the one of being $j$-MRD in the matrix case
(see [8, Definition 4.6]). In particular, a code
$\mathcal{C}\leq\mathbb{F}_{q}^{n_{1}}\otimes\mathbb{F}_{q}^{n_{2}}$ is
$j$-TMRD with respect to $\mathcal{A}^{\textup{R}}$ if and only if
$\mathcal{C}$ is $j$-MRD.

######  Remark 3.5.

A code $\mathcal{C}\leq\mathbb{F}_{q}^{n_{1}}\otimes\mathbb{F}_{q}^{n_{2}}$
that satisfies

$d=n_{1}-\left\lfloor\frac{k-1}{n_{2}}\right\rfloor$

is said to be $1$-MRD (see [8, Definition 4.6]). More in detail, it was
observed in [8, Remark 4.17] that $\mathcal{C}$ is MRD (maximum rank distance)
if $n_{2}\mid k$ and $\mathcal{C}$ is QMRD (quasi maximum rank distance) if
$n_{2}\nmid k$. These codes exist for any value of $n_{1},n_{2}$ and $k$ (see
[11, 12] for further details). Clearly, we have that if $r=2$ then
$\mathcal{C}$ is $1$-TMRD with respect $\mathcal{A}^{\textup{R}}$ if and only
if $\mathcal{C}$ is MRD or QMRD, since $t_{1}^{\textup{R}}=d\,n_{2}$ in this
case.

A code of matrices $\mathcal{C}$ is $j$-MRD then it is $(j+n_{2})$-MRD by [8,
Lemma 4.8]. We extend this result for $r>2$.

######  Lemma 3.6.

If $\mathcal{C}$ is $j$-TMRD with respect $\mathcal{A}^{\textup{R}}$ then
$\mathcal{C}$ is $(j+\frac{n}{n_{1}})$-TMRD with respect
$\mathcal{A}^{\textup{R}}$.

###### Proof.

Suppose that $\mathcal{C}$ is $1$-TMRD with respect
$\mathcal{A}^{\textup{R}}$. By Proposition 3.1, we have

$n-\frac{n}{n_{1}}\left\lfloor\frac{n_{1}}{n}(k-j)\right\rfloor+\frac{n}{n_{1}}=t_{j}^{\textup{R}}+\frac{n}{n_{1}}\leq
t_{j+\frac{n}{n_{1}}}^{\textup{R}}\leq
n-\frac{n}{n_{1}}\left\lfloor\frac{n_{1}}{n}\left(k-j-\frac{n}{n_{1}}\right)\right\rfloor.$

It is immediate to see that the first and the last terms are equal. The
statement follows. ∎

The next example shows that a $j$-TMRD code with respect to
$\mathcal{A}^{\textup{R}}$ is not necessarily $(j+1)$-TMRD with respect to
$\mathcal{A}^{\textup{R}}$.

######  Example 3.7.

Let
$\mathcal{C}\leq\mathbb{F}_{2}^{2}\otimes\mathbb{F}_{2}^{3}\otimes\mathbb{F}_{2}^{4}$
be the code of dimension $13$ whose generator matrix is

$\left(\begin{array}[]{*{3}{*{3}c;{3pt/3pt}*{3}c|}*{3}c;{3pt/3pt}*{3}c}1&0&0&0&0&0&0&0&0&0&0&0&0&0&1&1&0&0&1&0&0&0&1&0\\\
0&1&0&0&0&0&0&0&0&0&0&0&0&0&1&0&0&1&0&1&1&1&0&0\\\
0&0&1&0&0&0&0&0&0&1&0&0&0&0&0&1&0&0&0&1&1&1&1&1\\\
0&0&0&1&0&0&0&0&0&1&0&0&0&0&0&1&0&1&0&1&1&1&1&1\\\
0&0&0&0&1&0&0&0&0&1&0&0&0&0&1&1&0&1&1&0&1&1&0&1\\\
0&0&0&0&0&1&0&0&0&1&0&0&0&0&1&0&1&0&0&1&0&1&1&1\\\
0&0&0&0&0&0&1&0&0&0&0&0&0&0&0&0&0&1&1&1&1&0&0&1\\\
0&0&0&0&0&0&0&1&0&1&0&0&0&0&0&1&0&1&0&0&0&0&1&1\\\
0&0&0&0&0&0&0&0&1&0&0&0&0&0&1&0&0&0&1&1&1&1&0&0\\\
0&0&0&0&0&0&0&0&0&0&1&0&0&0&0&1&0&0&1&0&0&0&1&0\\\
0&0&0&0&0&0&0&0&0&0&0&1&0&0&1&0&1&0&0&0&1&0&1&0\\\
0&0&0&0&0&0&0&0&0&0&0&0&1&0&0&0&0&1&1&0&0&0&0&1\\\
0&0&0&0&0&0&0&0&0&0&0&0&0&1&1&0&0&0&1&1&1&1&1&1\end{array}\right)$

One can check the following.

  * •

$t_{1}^{\textup{R}}(\mathcal{C})=t_{2}^{\textup{R}}(\mathcal{C})=12$. This
value is attained, for example, for the Ravagnani-type anticode
$\left<(1,0)\right>_{\mathbb{F}_{2}}\otimes\mathbb{F}_{2}^{3}\otimes\mathbb{F}_{2}^{4}$
whose intersection with $\mathcal{C}$ is the row-space of

$\left(\begin{array}[]{*{3}{*{3}c;{3pt/3pt}*{3}c|}*{3}c;{3pt/3pt}*{3}c}0&1&1&0&0&0&0&1&0&0&0&0&0&0&1&0&0&0&0&0&0&0&0&0\\\
0&0&0&0&0&0&1&0&0&0&0&0&1&0&0&0&0&0&0&1&1&0&0&0\end{array}\right).$

  * •

$t_{3}^{\textup{R}}(\mathcal{C})=\cdots=t_{13}^{\textup{R}}(\mathcal{C})=24$
which means that the full-space
$\mathbb{F}_{2}^{2}\otimes\mathbb{F}_{2}^{3}\otimes\mathbb{F}_{2}^{4}$ is the
only Ravagnani-type anticode that intersect the code in a subspace of
dimension at least $3$.

We have

$t_{1}^{\textup{R}}(\mathcal{C})=12=24-12\left\lfloor\frac{13-1}{12}\right\rfloor\quad\textup{
and }\quad t_{2}^{\textup{R}}(\mathcal{C})=12\neq
24=24-12\left\lfloor\frac{13-2}{12}\right\rfloor$

which implies that $\mathcal{C}$ is $1$-TMRD with respect to
$\mathcal{A}^{\textup{R}}$ but not $2$-TMRD with respect to
$\mathcal{A}^{\textup{R}}$. Finally

$t_{13}^{\textup{R}}(\mathcal{C})=24=24-12\left\lfloor\frac{13-13}{12}\right\rfloor$

and $\mathcal{C}$ is also $13$-TBMD, in line with Lemma 3.6.

The following generalizes [8, Lemma 4.11]. The proof is similar but we include
it for completeness.

######  Proposition 3.8.

We have that $\mathcal{C}$ is $j$-TMRD with respect $\mathcal{A}^{\textup{R}}$
for all $j\in[k]$ if and only if $\mathcal{C}$ is $1$-TMRD with respect
$\mathcal{A}^{\textup{R}}$ and one of the following conditions are satisfied.

  1. (1)

$\frac{n}{n_{1}}\mid k$.

  2. (2)

$\frac{n}{n_{1}}\nmid k$ and $\mathcal{C}^{\perp}$ is $1$-TMRD with respect
$\mathcal{A}^{\textup{R}}$.

###### Proof.

Write $k=\alpha\frac{n}{n_{1}}+\rho$ for some $\alpha\in\mathbb{Z}_{\geq 0}$
and $0\leq\rho\leq\frac{n}{n_{1}}-1$. By Lemma 3.6, it is sufficient to prove
that if $\mathcal{C}$ is $1$-TMRD with respect $\mathcal{A}^{\textup{R}}$ than
$\mathcal{C}$ is $j$-TMRD with respect $\mathcal{A}^{\textup{R}}$ for all
$1\leq j\leq\frac{n}{n_{1}}$. Suppose $\mathcal{C}$ to be $1$-TMRD with
respect $\mathcal{A}^{\textup{R}}$ and let $1\leq j\leq\frac{n}{n_{1}}$. If
$\rho=0$, i.e. $\frac{n}{n_{1}}\mid k$, then we have

$n-\frac{n}{n_{1}}\alpha=t_{1}^{\textup{R}}\leq t_{j}^{\textup{R}}\leq
t_{1+\frac{n}{n_{1}}}^{\textup{R}}-\frac{n}{n_{1}}=n-\frac{n}{n_{1}}\alpha$

by Propositions 2.23 and 3.1. This proves the first part of the statement so
we assume $\frac{n}{n_{1}}\nmid k$ and $\mathcal{C}^{\perp}$ $1$-TMRD with
respect $\mathcal{A}^{\textup{R}}$ for the remainder of the proof. We
distinguish two cases according to the value of $\rho$.

  1. (1)

If $j\leq\rho\leq\frac{n}{n_{1}}-1$ then Propositions 2.23 and 3.1 imply

$n-\frac{n}{n_{1}}\alpha=t_{1}^{\textup{R}}\leq t_{j}^{\textup{R}}\leq
t_{\rho}^{\textup{R}}=n-\frac{n}{n_{1}}\alpha.$

  2. (2)

If $1\leq\rho<j\leq\frac{n}{n_{1}}$ then one can easily check that

$t_{1}^{\textup{R}}=n-\frac{n}{n_{1}}(\alpha+1)\qquad\textup{ and
}\qquad\left(t_{1}^{\textup{R}}\right)^{\perp}=\frac{n}{n_{1}}(\alpha+1).$

Observe that, by Propositions 3.1, we have

$\frac{n}{n_{1}}(\alpha+1)=\left(t_{1}^{\textup{R}}\right)^{\perp}<\left(t_{1+\frac{n}{n_{1}}}^{\textup{R}}\right)^{\perp}<\cdots<\left(t_{1+(n_{1}-\alpha-1)\frac{n}{n_{1}}}^{\textup{R}}\right)^{\perp}\leq
n$

which implies

$\left(t_{1+s\frac{n}{n_{1}}}^{\textup{R}}\right)^{\perp}=\frac{n}{n_{1}}(\alpha+1+s)$
(1)

for all $s\in\\{0,\ldots,n_{1}-\alpha-1\\}$. Define the sets

$\displaystyle S_{1}\left(\mathcal{C}^{\perp}\right)$
$\displaystyle:=\left\\{\frac{n_{1}}{n}\left(t_{1}^{\textup{R}}\right)^{\perp},\frac{n_{1}}{n}\left(t_{1+\frac{n}{n_{1}}}^{\textup{R}}\right)^{\perp},\cdots,\frac{n_{1}}{n}\left(t_{1+(n_{1}-\alpha-1)\frac{n}{n_{1}}}^{\textup{R}}\right)^{\perp}\right\\},$
$\displaystyle\overline{S}_{1+k}\left(\mathcal{C}\right)$
$\displaystyle:=\left\\{n_{1}+1-\frac{n_{1}}{n}t_{k+1-\frac{n}{n_{1}}}^{\textup{R}},n_{1}+1-\frac{n_{1}}{n}t_{k+1-2\frac{n}{n_{1}}}^{\textup{R}},\cdots,n_{1}+1-\frac{n_{1}}{n}t_{k+1-\alpha\frac{n}{n_{1}}}^{\textup{R}}\right\\},$

and recall that, by Theorem 3.2, we have
$S_{1}\left(\mathcal{C}^{\perp}\right)=[n_{1}]\setminus\overline{S}_{1+k}\left(\mathcal{C}\right)$.
As a consequence of [7, Proposition 5.10] and Equation (1) we have

$n_{1}+1-\frac{n_{1}}{n}t_{k+1-\frac{n}{n_{1}}}^{\textup{R}}<n_{1}+1-\frac{n_{1}}{n}t_{k+1-2\frac{n}{n_{1}}}^{\textup{R}}<\cdots<n_{1}+1-\frac{n_{1}}{n}t_{k+1-\alpha\frac{n}{n_{1}}}^{\textup{R}}=\alpha$

which implies

$t_{k+1-\alpha\frac{n}{n_{1}}}^{\textup{R}}=t_{\rho+1}^{\textup{R}}=n-\frac{n}{n_{1}}(\alpha+1).$

Finally, by [7, Proposition 5.10], we get

$n-\frac{n}{n_{1}}(\alpha+1)=t_{\rho+1}^{\textup{R}}\leq
t_{j}^{\textup{R}}\leq t_{\frac{n}{n_{1}}}^{\textup{R}}\leq
n-\frac{n}{n_{1}}(\alpha+1).$

This concludes the proof. ∎

######  Remark 3.9.

In Proposition 3.8, we introduced two classes of codes, namely

  1. (1)

$\left\\{\mathcal{C}\leq\mathbb{F}:\frac{n}{n_{1}}\mid k\textup{ and
}\mathcal{C}\textup{ is $1$-TMRD with respect to
}\mathcal{A}^{\textup{R}}\right\\}$,

  2. (2)

$\left\\{\mathcal{C}\leq\mathbb{F}:\frac{n}{n_{1}}\nmid k\textup{ and both
}\mathcal{C}\textup{ and }\mathcal{C}^{\perp}\textup{ are $1$-TMRD with
respect to }\mathcal{A}^{\textup{R}}\right\\}$.

The first set extends the family of MRD codes as observed in Remark 3.5. On
the other hand, (2) generalizes the class of dually QMRD codes introduced in
[11] wherein their existence was proved for any choice of $q,n,m$ and $k$.

It is well-known that the dual of an MRD code is MRD as well. The next result
shows that this property extends also to $1$-TMRD codes with respect to
$\mathcal{A}^{\textup{R}}$ whose dimensions are divisible by
$\frac{n}{n_{1}}$.

######  Lemma 3.10.

If $\mathcal{C}$ is $1$-TMRD and $\frac{n}{n_{1}}\mid k$ then
$\mathcal{C}^{\perp}$ is $1$-TMRD.

###### Proof.

Write $k=\alpha\frac{n}{n_{1}}$ and define the sets

$\displaystyle S_{1}\left(\mathcal{C}^{\perp}\right)$
$\displaystyle:=\left\\{\frac{n_{1}}{n}\left(t_{1}^{\textup{R}}\right)^{\perp},\frac{n_{1}}{n}\left(t_{1+\frac{n}{n_{1}}}^{\textup{R}}\right)^{\perp},\ldots,\frac{n_{1}}{n}\left(t_{1+(n_{1}-\alpha-1)\frac{n}{n_{1}}}^{\textup{R}}\right)^{\perp}\right\\}$
$\displaystyle\overline{S}_{1+k}\left(\mathcal{C}\right)$
$\displaystyle:=\left\\{n_{1}+1-\frac{n_{1}}{n}t_{k+1-\frac{n}{n_{1}}}^{\textup{R}},n_{1}+1-\frac{n_{1}}{n}t_{k+1-2\frac{n}{n_{1}}}^{\textup{R}},\ldots,n_{1}+1-\frac{n_{1}}{n}t_{k+1-\alpha\frac{n}{n_{1}}}^{\textup{R}}\right\\}.$

Proposition 3.8 implies

$n_{1}+1-\frac{n_{1}}{n}t_{k+1-s\frac{n}{n_{1}}}^{\textup{R}}=s$

for all $s\in[\alpha]$, and therefore
$\left(t_{1}^{\textup{R}}\right)^{\perp}=s+1$ by Proposition 3.1. Finally, one
can observe that

$\alpha+1=\left(t_{1}^{\textup{R}}\right)^{\perp}\leq
n-\frac{n}{n_{1}}\left\lfloor\frac{n_{1}}{n}(n-k-1)\right\rfloor=\frac{n}{n_{1}}\left\lceil\frac{n_{1}}{n}(k+1)\right\rceil=\alpha+1$

which implies the statement. ∎

######  Remark 3.11.

One can easily check that $t_{1}^{\textup{R}}(\mathbb{F})=\frac{n}{n_{1}}$
since $d(\mathbb{F})=1$ and the smallest Ravagnani-type anticode containing a
simple $r$-tensor must have dimension $\frac{n}{n_{1}}$. Moreover, the code
$\\{0\\}$ is the dual of $\mathbb{F}$ and, using this convention
$t_{1}^{\textup{R}}(\\{0\\})=n+\frac{n}{n_{1}}$, we have that they are both
$1$-TMRD in line with Lemma 3.10.

The next result generalizes [11, Corollary 18].

######  Proposition 3.12.

The following holds.

  1. (1)

If $\frac{n}{n_{1}}\mid k$ then either
$t_{1}^{\textup{R}}+\left(t_{1}^{\textup{R}}\right)^{\perp}\leq n$ or
$t_{1}^{\textup{R}}+\left(t_{1}^{\textup{R}}\right)^{\perp}=n+2\frac{n}{n_{1}}$
and $\mathcal{C}$ is $1$-TMRD with respect to $\mathcal{A}^{\textup{R}}$.

  2. (2)

If $\frac{n}{n_{1}}\nmid k$ then
$t_{1}^{\textup{R}}+\left(t_{1}^{\textup{R}}\right)^{\perp}\leq
n+\frac{n}{n_{1}}$ and the equality holds if and only if both $\mathcal{C}$
and $\mathcal{C}^{\perp}$ are $1$-TMRD with respect to
$\mathcal{A}^{\textup{R}}$.

###### Proof.

Write $k=\alpha\frac{n}{n_{1}}+\rho$ with
$\rho\in\left\\{0,\ldots,\frac{n}{n_{1}}-1\right\\}$. Proposition 3.1 implies

$t_{1}^{\textup{R}}\leq
n-\frac{n}{n_{1}}\left\lfloor\frac{n_{1}}{n}(k-1)\right\rfloor\quad\textup{
and }\quad\left(t_{1}^{\textup{R}}\right)^{\perp}\leq
n-\frac{n}{n_{1}}\left\lfloor\frac{n_{1}}{n}(k^{\perp}-1)\right\rfloor=\frac{n}{n_{1}}\left\lceil\frac{n_{1}}{n}(k+1)\right\rceil.$
(2)

By summing these expressions, we obtain

$t_{1}^{\textup{R}}+\left(t_{1}^{\textup{R}}\right)^{\perp}\leq
n-\frac{n}{n_{1}}\left\lfloor\frac{n_{1}}{n}(\rho-1)\right\rfloor+\frac{n}{n_{1}}\left\lceil\frac{n_{1}}{n}(\rho+1)\right\rceil.$

If $\rho\neq 0$, i.e. $\frac{n}{n_{1}}\nmid k$, we have
$0\leq\rho-1<\rho+1\leq\frac{n}{n_{1}}$ which implies
$t_{1}^{\textup{R}}+\left(t_{1}^{\textup{R}}\right)^{\perp}\leq
n+\frac{n}{n_{1}}$. In addition, the equality holds if and only if the
inequalities in (2) are equalities, that is if and only if $\mathcal{C}$ and
$\mathcal{C}^{\perp}$ are $1$-TMRD with respect to $\mathcal{A}^{\textup{R}}$.
We assume $\rho=0$, i.e. $\frac{n}{n_{1}}\mid k$, in the remainder of the
proof. We have $t_{1}^{\textup{R}}+\left(t_{1}^{\textup{R}}\right)^{\perp}\leq
n+2\frac{n}{n_{1}}$. Observe that the
$t_{1}^{\textup{R}}+\left(t_{1}^{\textup{R}}\right)^{\perp}=n+2\frac{n}{n_{1}}$
if and only if the inequality in (2) are equalities, that is if and only if
$\mathcal{C}$ is $1$-TBMD. Finally, suppose that the equality does not hold
for one of the expressions in (2) then, by Lemma 3.10, the inequality cannot
hold for the other one. Thus, if $\mathcal{C}$ is not $1$-TBMD then

$t_{1}^{\textup{R}}\leq
n-\frac{n}{n_{1}}\left\lfloor\frac{n_{1}}{n}(k-1)\right\rfloor-\frac{n}{n_{1}}\quad\textup{
and
}\quad\left(t_{1}^{\textup{R}}\right)^{\perp}\leq\frac{n}{n_{1}}\left\lceil\frac{n_{1}}{n}(k+1)\right\rceil-\frac{n}{n_{1}}$
(3)

since the dimension of a Ravagnani-type anticode is a multiple of
$\frac{n}{n_{1}}$. The statement now follows by summing the inequalities in
(3). ∎

######  Example 3.13.

Let $\mathcal{C}$ be the $\mathbb{F}_{2}$-$[3\times 3\times 4,12]$ code
generated by

$\left(\begin{array}[]{*{3}{*{3}c;{3pt/3pt}*{3}c;{3pt/3pt}*{3}c|}*{3}c;{3pt/3pt}*{3}c;{3pt/3pt}*{3}c}1&0&0&0&0&0&0&0&0&0&0&0&0&0&1&0&1&0&0&0&0&0&0&0&1&1&1&1&0&0&1&1&0&0&1&0\\\
0&1&0&0&0&0&0&0&0&0&0&0&0&1&1&1&1&1&1&1&0&0&1&0&0&0&1&0&0&0&0&0&1&1&1&1\\\
0&0&1&0&0&0&0&0&0&0&1&0&0&1&1&0&1&1&1&1&1&0&0&1&1&0&0&0&0&0&1&1&1&1&1&1\\\
0&0&0&1&0&0&0&0&0&0&0&0&0&0&1&0&0&1&0&0&1&1&1&0&0&1&1&0&1&1&0&0&0&1&1&1\\\
0&0&0&0&1&0&0&0&0&0&0&0&0&1&1&0&1&1&1&1&0&0&0&0&0&0&1&1&0&0&1&1&0&1&0&1\\\
0&0&0&0&0&1&0&0&0&0&1&0&0&0&0&0&0&0&1&1&0&1&1&1&1&1&1&1&0&1&0&1&0&1&0&1\\\
0&0&0&0&0&0&1&0&0&0&0&0&0&1&1&0&0&1&1&1&0&1&1&1&1&1&1&0&1&0&0&0&1&0&1&1\\\
0&0&0&0&0&0&0&1&0&0&1&0&0&1&1&1&0&1&0&1&1&0&0&0&1&0&1&0&1&0&1&0&0&1&1&1\\\
0&0&0&0&0&0&0&0&1&0&1&0&0&1&0&0&1&1&1&1&0&0&0&0&1&0&0&0&0&1&0&1&1&1&0&1\\\
0&0&0&0&0&0&0&0&0&1&0&0&0&1&1&0&0&1&0&1&1&1&0&0&0&0&1&1&1&0&1&0&0&1&1&0\\\
0&0&0&0&0&0&0&0&0&0&0&1&0&1&0&0&0&0&0&0&0&1&0&1&0&0&1&0&1&1&1&0&0&0&0&1\\\
0&0&0&0&0&0&0&0&0&0&0&0&1&1&0&0&0&0&0&1&1&0&0&0&0&1&1&0&1&0&0&0&0&1&0&1\end{array}\right)$

and one can check that, for all $j\in[12]$, we have
$t_{j}^{\textup{R}}(\mathcal{C})=36$ which means that the only Ravagnani-type
anticode that intersects $\mathcal{C}$ in a subspace of dimension at least $j$
is the full space
$\mathbb{F}_{2}^{3}\otimes\mathbb{F}_{2}^{3}\otimes\mathbb{F}_{2}^{4}$. In
particular, $\mathcal{C}$ is $j$-TMRD for all $j\in[12]$ and, by Lemma 3.10,
we have that also $\mathcal{C}^{\perp}$ is $1$-TMRD and
$t_{1}^{\textup{R}}(\mathcal{C})=24$. Finally, we have
$t_{1}^{\textup{R}}(\mathcal{C})+t_{1}^{\textup{R}}(\mathcal{C}^{\perp})=36+24$
in line with Proposition 3.12.

######  Example 3.14.

Let $\mathcal{C}$ be the code as in Example 3.7. We already noted that
$\mathcal{C}$ is not $j$-TMRD for all $j\in[13]$ in line with Proposition 3.8.
Indeed, one can check that $\mathcal{C}^{\perp}$ is the
$\mathbb{F}_{2}$-$[2\times 3\times 4,11]$ code whose generator matrix is

$\left(\begin{array}[]{*{3}{*{3}c;{3pt/3pt}*{3}c|}*{3}c;{3pt/3pt}*{3}c}1&0&0&0&0&0&0&0&0&0&1&1&1&0&0&0&0&0&0&1&0&1&1&1\\\
0&1&0&0&0&0&0&0&0&0&1&0&1&0&1&0&0&0&1&0&1&1&0&0\\\
0&0&1&0&0&0&0&0&0&0&1&1&1&0&1&1&1&1&1&1&0&1&1&1\\\
0&0&0&1&0&0&0&0&0&0&0&1&0&0&0&1&1&1&1&0&0&1&0&0\\\
0&0&0&0&1&0&0&0&0&0&0&0&0&0&0&0&1&0&0&1&1&0&0&0\\\
0&0&0&0&0&1&0&0&0&0&0&1&0&0&0&0&1&0&0&0&0&0&0&0\\\
0&0&0&0&0&0&1&0&0&0&0&0&0&0&0&0&1&0&0&0&1&1&0&0\\\
0&0&0&0&0&0&0&1&0&0&1&1&0&0&1&1&1&0&0&1&1&1&0&0\\\
0&0&0&0&0&0&0&0&1&0&0&1&0&0&0&1&0&0&1&1&1&0&0&1\\\
0&0&0&0&0&0&0&0&0&1&0&0&1&0&0&1&1&0&0&1&0&1&1&1\\\
0&0&0&0&0&0&0&0&0&0&0&0&0&1&0&1&0&0&0&1&1&0&1&0\end{array}\right)$

and $\mathcal{C}^{\perp}$ is not $1$-TMRD since

$t_{1}^{\textup{R}}(\mathcal{C}^{\perp})=12\neq
24=24-12\left\lfloor\frac{11-1}{12}\right\rfloor.$

Finally, we have
$t_{1}^{\textup{R}}(\mathcal{C})+t_{1}^{\textup{R}}(\mathcal{C}^{\perp})=12+12<24+12$
in line with Proposition 3.12.

The following results extend [8, Lemmas 4.12, 4.13, 4.14] respectively. We
omit the proofs of the first two results as they are similar to the ones of
[8, Lemmas 4.12 and 4.13].

######  Lemma 3.15.

Let $j\in\\{2,\ldots,k-1\\}$. Write $j=k+\rho-\alpha\frac{n}{n_{1}}$ for
$\rho\in\\{1,\ldots,\frac{n}{n_{1}}\\}$ and
$\alpha\in\left\\{1,\ldots,\left\lfloor\frac{n_{1}}{n}(k+\rho-1)\right\rfloor\right\\}$.
If the code $\mathcal{C}$ is $j$-TBMD with respect to
$\mathcal{A}^{\textup{R}}$ and $r\leq k^{\perp}$ then for all
$\gamma\in\\{1,\ldots,\alpha\\}$ we have
$t_{k+\rho-\gamma\frac{n}{n_{1}}}=n-\frac{n}{n_{1}}(\gamma-1)$.

######  Lemma 3.16.

Let $j\in\\{2,\ldots,k-1\\}$,
$\rho\in\left\\{2,\ldots,\frac{n}{n_{1}}\right\\}$ and
$k^{\perp}\in\\{1,\ldots,\rho\\}$. If $\mathcal{C}$ is $j$-TBMD then one of
the following holds.

  1. (1)

$j>k+1-\frac{n}{n_{1}}$ and
$t_{k+1-\gamma\frac{n}{n_{1}}}^{\textup{R}}=n-\frac{n}{n_{1}}\gamma$ for all
$\gamma\in\left\\{1,\ldots,\left\lfloor\frac{n_{1}}{n}k\right\rfloor\right\\}$.

  2. (2)

There exists an integer
$\alpha\in\left\\{1,\ldots,\left\lfloor\frac{n_{1}}{n}k\right\rfloor\right\\}$
such that $k+1-(\alpha+1)\frac{n}{n_{1}}<j\leq k+1-\alpha\frac{n}{n_{1}}$,
$\left(t_{1}^{\textup{R}}\right)^{\perp}=\frac{n}{n_{1}}(\alpha+1)$ and

$\begin{cases}\displaystyle
t_{k+1-\gamma\frac{n}{n_{1}}}^{\textup{R}}=n-\frac{n}{n_{1}}(\gamma-1)&\textup{
if }\gamma\in\\{1,\ldots,\alpha\\},\\\\[12.0pt] \displaystyle
t_{k+1-\gamma\frac{n}{n_{1}}}^{\textup{R}}=n-\frac{n}{n_{1}}\gamma&\textup{ if
}\gamma\in\left\\{\alpha+1,\ldots,\left\lfloor\frac{n_{1}}{n}k\right\rfloor\right\\}.\end{cases}$

######  Lemma 3.17.

If $\mathcal{C}$ is $k$-TBMD with respect to $\mathcal{A}^{\textup{R}}$ then
$t_{k}^{\textup{R}}=n$.

###### Proof.

Suppose toward a contradiction that there exists a code $\mathcal{C}$ such
that $\mathcal{C}$ is $k$-TBMD with respect to $\mathcal{A}^{\textup{R}}$ and
$t_{k}^{\textup{R}}=\delta<n$. Note that $\delta=\frac{n}{n_{1}}\gamma$ for
some $\gamma\in[n-1]$, by the definition of generalized tensor weights with
respect to $\mathcal{A}^{\textup{R}}$. We have

$\delta=\left\\{\dim_{\mathbb{F}_{q}}\left(A\right):A\in\mathcal{A}^{\textup{R}}\textup{
and }\dim_{\mathbb{F}_{q}}\left(\mathcal{C}\cap A\right)\geq
k\right\\}=\left\\{\dim_{\mathbb{F}_{q}}\left(A\right):A\in\mathcal{A}^{\textup{R}}\textup{
and }\mathcal{C}\leq A\right\\}.$

Therefore, there must exist a Ravagnani-type anticode $A$ containing
$\mathcal{C}$. If $\mathcal{C}\leq A$ then $A^{\perp}\leq\mathcal{C}^{\perp}$
and $A^{\perp}\in\mathcal{A}^{\textup{R}}$ since the set of Ravagnani-type
anticodes is closed under duality by Proposition 2.20. The code
$\mathcal{C}^{\perp}$ must contain a simple tensor of since $A^{\perp}$ is
perfect and so $\left(t_{1}^{\textup{R}}\right)^{\perp}=\frac{n}{n_{1}}$. This
implies $n-t_{k}^{\textup{R}}-\left(t_{1}^{\textup{R}}\right)^{\perp}\geq
n-\delta-1\geq 0$ and we get a contradiction. ∎

The next result generalizes [8, Theorem 4.15].

######  Theorem 3.18.

If $\mathcal{C}$ is $j$-TBMD with respect to $\mathcal{A}^{\textup{R}}$ then
$\mathcal{C}$ is $j$-TMRD with respect to $\mathcal{A}^{\textup{R}}$.

###### Proof.

We already observed that the trivial codes $\\{0\\}$ and $\mathbb{F}$ are both
$1$-TMRD with respect $\mathcal{A}^{\textup{R}}$. Note that

$n-t_{1}^{\textup{R}}(\\{0\\})-t_{1}^{\textup{R}}(\mathbb{F})=n-n-\frac{n}{n_{1}}-\frac{n}{n_{1}}=-2\frac{n}{n_{1}}<0$

which implies that $\\{0\\}$ and $\mathbb{F}$ are also $1$-TBMD with respect
$\mathcal{A}^{\textup{R}}$. Lemma 3.17 implies $t_{k}(\mathcal{C})=n$ if
$\mathcal{C}$ is $1$-TBMD with respect $\mathcal{A}^{\textup{R}}$. Hence, we
have $n=n-\frac{n}{n_{1}}\left\lfloor\frac{n_{1}}{n}(k-k)\right\rfloor$ and
$\mathcal{C}$ is $1$-TMRD with respect $\mathcal{A}^{\textup{R}}$. If
$\mathcal{C}$ is $1$-TBMD then
$n<t_{1}^{\textup{R}}+\left(t_{1}^{\textup{R}}\right)^{\perp}$ and, by [7,
Proposition 5.10] and Proposition 3.12, we get

$t_{1}^{\textup{R}}+\left(t_{1}^{\textup{R}}\right)^{\perp}=\begin{cases}n+\frac{n}{n_{1}}&\textup{
if }\frac{n}{n_{1}}\nmid k,\\\ n+2\frac{n}{n_{1}}&\textup{ if
}\frac{n}{n_{1}}\mid k.\end{cases}$

and $\mathcal{C}$ is $1$-TMRD with respect to $\mathcal{A}^{\textup{R}}$. The
remainder of the proof is similar to the proof of [8, Theorem 4.15] and
follows by Lemmas 3.15 and 3.16. ∎

The following generalizes [8, Theorem 4.19]. We omit the proof as it is
similar to the one of [8, Theorem 4.19].

######  Theorem 3.19.

Let $j\in\\{2,\ldots,k\\}$. If $\mathcal{C}$ is minimally $j$-TBMD with
respect to $\mathcal{A}^{\textup{R}}$ then $\mathcal{C}$ is not $(j-1)$-TMRD
with respect $\mathcal{A}^{\textup{R}}$.

The following example shows that the converse of Theorem 3.18 does not hold.

######  Example 3.20.

Let $\mathcal{C}$ be the code in Example 3.7 and we already observed that
$\mathcal{C}$ is $1$-TMRD but not $2$-TMRD with respect to
$\mathcal{A}^{\textup{R}}$. On the other hand, we have that $\mathcal{C}$ is
not $1$-TBMD with respect to $\mathcal{A}^{\textup{R}}$ since
$24-t_{1}^{\textup{R}}(\mathcal{C})-t_{1}^{\textup{R}}(\mathcal{C}^{\perp})=24-12-12=0\not<0$.
We can also notice that $\mathcal{C}$ is minimally $3$-TBMD with respect to
$\mathcal{A}^{\textup{R}}$ since

$24-t_{2}^{\textup{R}}(\mathcal{C})-t_{1}^{\textup{R}}(\mathcal{C}^{\perp})=24-12-12\not<0\quad\textup{
and }\quad
24-t_{3}^{\textup{R}}(\mathcal{C})-t_{1}^{\textup{R}}(\mathcal{C}^{\perp})=24-24-12<0.$

and $3$-TMRD with respect to $\mathcal{A}^{\textup{R}}$ since

$t_{3}^{\textup{R}}(\mathcal{C})=24=24-12\left\lfloor\frac{13-3}{12}\right\rfloor.$

Finally, in Example 3.7, we showed that $\mathcal{C}$ is not $2$-TMRD with
respect to $\mathcal{A}^{\textup{R}}$. This is in line with Theorem 3.18.

In [8], it was observed that the property of being minimally $j$-TBMD does not
obey to a duality statement in general. In the following example we show that
there exists codes with the same dimension whose duals are not $j$-TBMD with
respect to $\mathcal{A}^{\textup{R}}$ for the same $s\in[n-k]$.

######  Example 3.21.

Let $\mathcal{C}_{1},\mathcal{C}_{2}$ be the $\mathbb{F}_{2}$-$[3\times
3\times 4,11]$ codes generated by

$\left(\begin{array}[]{*{3}{*{3}c;{3pt/3pt}*{3}c;{3pt/3pt}*{3}c|}*{3}c;{3pt/3pt}*{3}c;{3pt/3pt}*{3}c}1&0&0&0&0&0&0&0&0&0&0&0&1&1&1&0&0&1&0&0&0&0&1&0&0&0&1&0&1&0&0&1&0&0&0&1\\\
0&1&0&0&0&0&0&0&0&0&0&1&1&1&1&0&1&0&0&0&1&1&1&0&1&0&0&1&0&1&0&1&1&1&0&0\\\
0&0&1&0&0&0&0&0&0&0&0&0&1&1&1&0&1&1&0&1&0&1&0&1&0&1&0&1&0&1&0&1&1&1&0&0\\\
0&0&0&1&0&0&0&0&0&0&0&0&0&0&1&0&1&0&0&1&1&0&0&1&1&0&1&1&1&1&1&1&1&1&1&1\\\
0&0&0&0&1&0&0&0&0&0&0&0&0&1&0&0&0&0&0&0&1&1&1&1&1&0&1&1&1&1&1&0&0&0&0&0\\\
0&0&0&0&0&1&0&0&0&0&0&1&1&1&0&1&0&1&0&1&0&1&0&1&1&0&0&0&0&0&1&1&1&0&0&0\\\
0&0&0&0&0&0&1&0&0&0&0&0&1&1&0&0&0&0&0&1&0&1&1&1&0&1&1&1&1&1&1&0&0&1&0&0\\\
0&0&0&0&0&0&0&1&0&0&0&0&1&0&0&1&0&1&1&1&0&1&0&1&1&1&0&1&0&1&1&0&0&0&0&1\\\
0&0&0&0&0&0&0&0&1&0&0&0&1&1&0&1&1&1&1&1&0&1&0&1&1&0&0&1&0&1&0&1&1&1&1&0\\\
0&0&0&0&0&0&0&0&0&1&0&0&1&1&0&0&0&0&1&0&0&0&0&0&0&1&0&0&0&0&0&1&0&0&0&0\\\
0&0&0&0&0&0&0&0&0&0&1&1&0&0&1&1&0&1&1&1&0&1&1&0&1&1&1&1&0&1&0&0&1&1&0&1\end{array}\right)$

and

$\left(\begin{array}[]{*{3}{*{3}c;{3pt/3pt}*{3}c;{3pt/3pt}*{3}c|}*{3}c;{3pt/3pt}*{3}c;{3pt/3pt}*{3}c}1&0&0&0&0&0&0&0&0&0&0&1&0&0&1&0&1&1&0&0&0&0&1&0&0&0&0&1&1&0&1&0&1&1&0&1\\\
0&1&0&0&0&0&0&0&0&0&0&0&0&1&0&0&1&1&1&0&0&0&0&0&0&1&0&0&1&0&1&0&1&0&1&1\\\
0&0&1&0&0&0&0&0&0&0&0&1&1&1&1&1&1&0&0&0&1&0&1&1&1&1&0&0&1&0&1&0&0&1&0&0\\\
0&0&0&1&0&0&0&0&0&0&0&1&0&1&1&0&0&0&1&0&0&1&1&0&1&1&1&1&1&0&0&0&1&1&0&1\\\
0&0&0&0&1&0&0&0&0&0&0&1&0&1&1&0&0&0&0&1&1&1&1&0&1&0&1&0&0&0&1&1&0&0&1&1\\\
0&0&0&0&0&1&0&0&0&0&0&1&1&1&0&0&1&0&0&0&1&0&1&1&0&0&1&1&0&1&0&1&0&1&0&0\\\
0&0&0&0&0&0&1&0&0&0&0&1&1&0&0&0&0&1&0&0&0&0&0&1&1&0&1&0&0&1&0&1&1&1&1&0\\\
0&0&0&0&0&0&0&1&0&0&0&1&0&0&1&0&0&1&1&0&0&1&1&0&1&1&0&0&0&1&0&0&0&1&1&0\\\
0&0&0&0&0&0&0&0&1&0&0&0&1&0&0&1&1&1&1&1&0&1&0&0&1&1&1&0&0&1&0&0&0&0&1&1\\\
0&0&0&0&0&0&0&0&0&1&0&0&0&1&0&1&1&0&1&0&0&1&1&0&1&0&0&0&0&0&1&1&0&0&1&0\\\
0&0&0&0&0&0&0&0&0&0&1&0&0&1&0&1&1&0&0&0&1&1&1&1&0&0&1&0&1&0&0&1&0&1&0&1\end{array}\right)$

respectively. One can check the following.

  * •

The generalized tensor weights of $\mathcal{C}_{1}$ with respect to
$\mathcal{A}^{\textup{R}}$ are

$t_{1}^{\textup{R}}(\mathcal{C}_{1})=12,\qquad
t_{2}^{\textup{R}}(\mathcal{C}_{1})=24,\qquad
t_{3}^{\textup{R}}(\mathcal{C}_{1})=\cdots=t_{11}^{\textup{R}}(\mathcal{C}_{1})=36.$

  * •

The generalized tensor weights of $\mathcal{C}_{2}$ with respect to
$\mathcal{A}^{\textup{R}}$ are

$t_{1}^{\textup{R}}(\mathcal{C}_{2})=t_{2}^{\textup{R}}(\mathcal{C}_{2})=24,\qquad
t_{3}^{\textup{R}}(\mathcal{C}_{2})=t_{11}^{\textup{R}}(\mathcal{C}_{2})=36.$

  * •

The generalized tensor weights of $\mathcal{C}_{1}^{\perp}$ with respect to
$\mathcal{A}^{\textup{R}}$ are

$\displaystyle
t_{1}^{\textup{R}}(\mathcal{C}_{1}^{\perp})=\cdots=t_{3}^{\textup{R}}(\mathcal{C}_{1}^{\perp})=12,\qquad
t_{4}^{\textup{R}}(\mathcal{C}_{1}^{\perp})=\cdots=t_{14}^{\textup{R}}(\mathcal{C}_{1}^{\perp})=24,\qquad$
$\displaystyle
t_{15}^{\textup{R}}(\mathcal{C}_{1}^{\perp})=\cdots=t_{25}^{\textup{R}}(\mathcal{C}_{1}^{\perp})=36$

  * •

The generalized tensor weights of $\mathcal{C}_{2}^{\perp}$ with respect to
$\mathcal{A}^{\textup{R}}$ are

$\displaystyle
t_{1}^{\textup{R}}(\mathcal{C}_{2}^{\perp})=\cdots=t_{3}^{\textup{R}}(\mathcal{C}_{2}^{\perp})=12,\qquad
t_{4}^{\textup{R}}(\mathcal{C}_{1}^{\perp})=\cdots=t_{13}^{\textup{R}}(\mathcal{C}_{1}^{\perp})=24,$
$\displaystyle
t_{14}^{\textup{R}}(\mathcal{C}_{1}^{\perp})=\cdots=t_{25}^{\textup{R}}(\mathcal{C}_{1}^{\perp})=36.$

Moreover, the following hold

  * •

$36-t_{2}^{\textup{R}}(\mathcal{C}_{1})-t_{1}(\mathcal{C}_{1}^{\perp})=36-t_{2}^{\textup{R}}(\mathcal{C}_{2})-t_{1}(\mathcal{C}_{2}^{\perp})=36-24-12=0\not<0$.

  * •

$36-t_{3}^{\textup{R}}(\mathcal{C}_{1})-t_{1}(\mathcal{C}_{1}^{\perp})=36-t_{3}^{\textup{R}}(\mathcal{C}_{2})-t_{1}(\mathcal{C}_{2}^{\perp})=36-36-12=-12<0$.

  * •

$36-t_{14}^{\textup{R}}(\mathcal{C}_{1}^{\perp})-t_{1}(\mathcal{C}_{1})=36-24-12=0\not<0$.

  * •

$36-t_{15}^{\textup{R}}(\mathcal{C}_{1}^{\perp})-t_{1}(\mathcal{C}_{1})=36-36-12=-12<0$.

  * •

$36-t_{3}^{\textup{R}}(\mathcal{C}_{2}^{\perp})-t_{1}(\mathcal{C}_{2})=36-12-24=0\not<0$.

  * •

$36-t_{15}^{\textup{R}}(\mathcal{C}_{1}^{\perp})-t_{1}(\mathcal{C}_{1})=36-24-24=-12<0$.

This implies that $\mathcal{C}_{1}$ and $\mathcal{C}_{2}$ are both minimally
$3$-TBMD, $\mathcal{C}_{1}^{\perp}$ is $15$-TBMD and $\mathcal{C}_{2}^{\perp}$
is $4$-TBMD.

##  4 The Tensor Zeta Function

Following the work in [5] and [8], in this section we introduce the zeta
function for generalized tensor weights related to the different collections
of anticodes classified in [7] and we then specialize the theory for the
Delsarte and Ravagnani-type anticodes. Throughout this and the next section,
we consider polynomials that are members of the polynomial rings
$\mathbb{Q}[T]$ and $\mathbb{Q}[X,Y,T]$. We introduce the following notation.

######  Notation 4.1.

We let $\delta_{i}:=\\{s\in[r]:n_{i}=n_{s}\\}$, for any $i\in[r]$, and

$\Delta:=\begin{cases}\\{n_{1},\ldots,n_{r}\\}&\textup{ if
}|\delta_{r}|>1,\\\\[3.0pt] \\{n_{1},\ldots,n_{r-1}\\}&\textup{ if
}|\delta_{r}|=1.\end{cases}$

Observe that $|\delta_{i}|\geq 1$ for all $i\in[r]$. We define the following.

######  Definition 4.2.

For any $a\in\mathbb{Z}$, the $(a,j)$-normalized tensor binomial moment of
$\mathcal{C}$ with respect to $\mathcal{A}$ is

$b_{a}^{(j)}(\mathcal{C}):=\begin{cases}0&\textup{ if }a<0,\\\\[3.0pt]
\displaystyle\frac{B_{a+t_{j}}^{(j)}(\mathcal{C})}{|\mathcal{A}_{a+t_{j}}|}&\textup{
if }0\leq a\leq n-t_{j}-s_{1}^{\perp},\\\\[12.0pt]
\begin{bmatrix}{k+a+t_{j}-n}\\\ {j}\end{bmatrix}_{q}&\textup{ if
}a>n-t_{j}-s_{1}^{\perp}\textup{ and }\mathcal{P}_{\mathcal{A}},\\\\[15.0pt]
0&\textup{ if }a>n-t_{j}-s_{1}^{\perp}\textup{ and
}\neg\mathcal{P}_{\mathcal{A}},\end{cases}$

where $\mathcal{P}_{\mathcal{A}}$ is the predicate defined as follows

$\mathcal{P}_{\mathcal{A}}:=\begin{cases}\top&\textup{ if
}\mathcal{A}=\mathcal{A}^{\textup{ps}},\\\\[2.0pt]
\mathcal{A}_{a}^{\textup{cl}}\neq\emptyset&\textup{ if
}\mathcal{A}=\mathcal{A}^{\textup{cl}}\textup{ and }a\in\\{0,\ldots
n\\},\\\\[2.0pt] a\in\\{a_{1}\cdots a_{r}:a_{i}\in\mathbb{Z}_{\geq
n_{i}}\textup{ for all }i\in[r]\\}&\textup{ if
}\mathcal{A}=\mathcal{A}^{\textup{cl}}\textup{ and }a>n,\\\\[2.0pt]
n\mid(a+t_{j}^{\textup{D}})m\textup{ for some }m\in\Delta&\textup{ if
}\mathcal{A}=\mathcal{A}^{\textup{D}},\\\\[2.0pt]
n\mid(a+t_{j}^{\textup{R}})n_{1}&\textup{ if
}\mathcal{A}=\mathcal{A}^{\textup{R}}.\end{cases}$

Observe that, for any $a\in\mathbb{Z}$, the condition
$n\mid(a+t_{j}^{\textup{R}})n_{1}$ is equivalent to $n\mid an_{1}$ since
$n\mid t_{j}^{\textup{R}}n_{1}$ by definition of Ravagnani-type anticodes. We
now explicitly determine the cardinality of the set
$\mathcal{A}_{a}^{\textup{D}}$ and $\mathcal{A}_{a}^{\textup{R}}$ for all
$a\in\\{0,\ldots n\\}$ using the fact that $\mathcal{A}^{\textup{D}}$ and
$\mathcal{A}^{\textup{R}}$ are product lattices.

######  Proposition 4.3.

For any $a\in\\{0,\ldots n\\}$ we have

$\left|\mathcal{A}_{a}^{\textup{D}}\right|=\begin{cases}0&\textup{ if }n\nmid
am\textup{ for all }m\in\Delta,\\\
\displaystyle\sum_{\begin{subarray}{c}m\in\Delta\\\ n\mid
am\end{subarray}}\begin{bmatrix}{m}\\\
{a\frac{m}{n}}\end{bmatrix}_{q}&\textup{ if }n\mid am\textup{ for some
}m\in\Delta\textup{ and }a\notin\\{0,n\\},\\\ 1&\textup{ if
}a\in\\{0,n\\}.\end{cases}$

Moreover, if $n\nmid am$ for all $m\in\Delta$ then
$B_{a}^{(\textup{D},j)}(\mathcal{C})=0$ and
$W_{a}^{(\textup{D},j)}(\mathcal{C})=0$.

###### Proof.

Clearly, $\mathcal{A}^{\textup{D}}_{0}=\\{\left<0\right>_{\mathbb{F}_{q}}\\}$
and $\mathcal{A}^{\textup{D}}_{n}=\\{\mathbb{F}\\}$, and we can assume
$a\in[n-1]$ in the remainder of the proof. By Definition 2.19, we have that
$A\in\mathcal{A}^{\textup{D}}$ if and only if

$A=\bigotimes_{s=1}^{i-1}\mathbb{F}_{q}^{n_{s}}\otimes
A^{(i)}\otimes\bigotimes_{s=i+1}^{r}\mathbb{F}_{q}^{n_{s}}$

for some $A^{(i)}\leq\mathbb{F}_{q}^{n_{i}}$ with $n_{i}\in\Delta$. It is not
hard to check that a Delsarte-type anticode of dimension $a$ exists if and
only if $n\mid am$ for some $m\in\Delta$. Therefore, if $n\nmid am$ for all
$m\in\Delta$ then $B_{a}^{(\textup{D},j)}(\mathcal{C})=0$ and
$W_{a}^{(\textup{D},j)}(\mathcal{C})=0$. It remains to prove the case $n\mid
am$ for some $m\in\Delta$. Define the set

$\mathcal{A}_{a,i}^{\textup{D}}:=\left\\{\bigotimes_{j=1}^{i-1}\mathbb{F}_{q}^{n_{j}}\otimes
A^{(i)}\otimes\bigotimes_{j=i+1}^{r}\mathbb{F}_{q}^{n_{j}}:A^{(i)}\leq\mathbb{F}_{q}^{n_{i}}\textup{
and }\dim_{\mathbb{F}_{q}}\left(A^{(i)}\right)=a\right\\}$

and observe that if $n_{i}=n_{s}$ then
$\left|\mathcal{A}_{a,i}^{\textup{D}}\right|=\left|\mathcal{A}_{a,s}^{\textup{D}}\right|$,
for all $i,s\in[r]$. Finally, if there exists an $m\in N$ such that $n\mid am$
then we have

$\displaystyle\left|\mathcal{A}_{a}^{\textup{D}}\right|=\left|\mathop{\vphantom{\bigcup}\mathchoice{\leavevmode\vtop{\halign{\hfil$\m@th\displaystyle#$\hfil\cr\bigcup\cr\cdot\crcr}}}{\leavevmode\vtop{\halign{\hfil$\m@th\textstyle#$\hfil\cr\bigcup\cr\cdot\crcr}}}{\leavevmode\vtop{\halign{\hfil$\m@th\scriptstyle#$\hfil\cr\bigcup\cr\cdot\crcr}}}{\leavevmode\vtop{\halign{\hfil$\m@th\scriptscriptstyle#$\hfil\cr\bigcup\cr\cdot\crcr}}}}\displaylimits_{i=1}^{r}\mathcal{A}_{a,i}^{\textup{D}}\right|=\sum_{i=1}^{r}\left|\mathcal{A}_{a,i}^{\textup{D}}\right|=\sum_{\begin{subarray}{c}i=1\\\
n\mid
ai\end{subarray}}^{r}\left|\mathcal{A}_{a,i}^{\textup{D}}\right|=\sum_{\begin{subarray}{c}m\in\Delta\\\
n\mid am\end{subarray}}\begin{bmatrix}{m}\\\ {a\frac{m}{n}}\end{bmatrix}_{q}$

which concludes the proof. ∎

A similar argument implies the following result. We include a proof for
completeness.

######  Proposition 4.4.

For any $a\in\\{0,\ldots n\\}$ we have

$\left|\mathcal{A}_{a}^{\textup{R}}\right|=\begin{cases}0&\textup{ if }n\nmid
an_{1},\\\ \displaystyle|\delta_{1}|\begin{bmatrix}{n_{1}}\\\
{a\frac{n_{1}}{n}}\end{bmatrix}_{q}&\textup{ if }n\mid an_{1}\textup{ and
}a\notin\\{0,n\\},\\\ 1&\textup{ if }a\in\\{0,n\\}.\end{cases}$

Moreover, if $n\nmid an_{1}$ then $B_{a}^{(\textup{R},j)}(\mathcal{C})=0$ and
$W_{a}^{(\textup{R},j)}(\mathcal{C})=0$.

###### Proof.

Clearly, $\mathcal{A}_{0}^{\textup{R}}=\\{\left<0\right>_{\mathbb{F}_{q}}\\}$
and $\mathcal{A}_{n}^{\textup{R}}=\\{\mathbb{F}\\}$, and we assume $a\in[n-1]$
in the remainder of the proof. By [7, Theorem 4.21], we have that
$A\in\mathcal{A}^{\textup{R}}$ if and only if

$A=\bigotimes_{j=1}^{i-1}\mathbb{F}_{q}^{n_{j}}\otimes
A^{(i)}\otimes\bigotimes_{j=i+1}^{r}\mathbb{F}_{q}^{n_{j}}$

for some $A^{(i)}\leq\mathbb{F}_{q}^{n_{i}}$ such that $n_{i}=n_{1}$.
Therefore, one can easily check that if $n\nmid an_{1}$ then it cannot exist
an $A\in\mathcal{A}^{\textup{R}}$ of dimension $a$ and therefore
$B_{a}^{(\textup{R},j)}(\mathcal{C})=0$ and
$W_{a}^{(\textup{R},j)}(\mathcal{C})=0$. Finally, if $n\mid an_{1}$ then we
have

$\displaystyle\left|\mathcal{A}_{a}^{\textup{R}}\right|$
$\displaystyle=\left|\mathop{\vphantom{\bigcup}\mathchoice{\leavevmode\vtop{\halign{\hfil$\m@th\displaystyle#$\hfil\cr\bigcup\cr\cdot\crcr}}}{\leavevmode\vtop{\halign{\hfil$\m@th\textstyle#$\hfil\cr\bigcup\cr\cdot\crcr}}}{\leavevmode\vtop{\halign{\hfil$\m<EMAIL_ADDRESS>n_{i}=n_{1}\end{subarray}}^{r}\left\\{\bigotimes_{s=1}^{i-1}\mathbb{F}_{q}^{n_{s}}\otimes
A^{(i)}\otimes\bigotimes_{s=i+1}^{r}\mathbb{F}_{q}^{n_{s}}:A^{(i)}\leq\mathbb{F}_{q}^{n_{i}}\textup{
and
}\dim_{\mathbb{F}_{q}}\left(A^{(i)}\right)=a\frac{n_{1}}{n}\right\\}\right|$
$\displaystyle=|\delta_{1}|\left|\left\\{A^{(1)}\otimes\bigotimes_{s=2}^{r}\mathbb{F}_{q}^{n_{s}}:A^{(1)}\leq\mathbb{F}_{q}^{n_{1}}\textup{
and
}\dim_{\mathbb{F}_{q}}\left(A^{(1)}\right)=a\frac{n_{1}}{n}\right\\}\right|$

which concludes the proof. ∎

######  Remark 4.5.

Observe that for $r=2$ and $\mathcal{A}=\mathcal{A}^{\textup{R}}$ we recover
the normalized generalized binomial moments given in [8, Definition 3.10].
More in detail, denote by $\hat{b}_{a}^{(j)}(\mathcal{C})$ the quantities
defined in [8, Definition 3.10] and we have
$b_{an_{2}}^{(\textup{D},j)}(\mathcal{C})=b_{an_{2}}^{(\textup{R},j)}(\mathcal{C})=\hat{b}_{a}^{(j)}(\mathcal{C})$
for all $a\in\mathbb{Z}$.

We conclude this section by introducing the generalized zeta function of a
tensor code as the generating function of the normalized generalized tensor
binomial moments.

######  Definition 4.6.

The $j$-th tensor zeta function of $\mathcal{C}$ is

$Z_{\mathcal{C}}^{(j)}(T):=\sum_{a\in\mathbb{Z}}b_{a}^{(j)}(\mathcal{C})T^{a}=\sum_{a\geq
0}b_{a}^{(j)}(\mathcal{C})T^{a}.$

It is interesting to observe that if a code is $j$-TBMD then its normalized
generalized tensor binomial moments and its generalized tensor zeta function
indexed by $j$ are determined by the code parameters. The following result is
immediate.

######  Proposition 4.7.

Let $\mathcal{C}$ be $j$-TBMD. The following hold for all
$s\in\\{j,\ldots,k\\}$.

  1. (1)

For any $a\in\mathbb{Z}_{\geq 0}$, we have
$b_{a}^{(s)}(\mathcal{C})=\begin{cases}\begin{bmatrix}{k+a-t_{s}-n}\\\
{s}\end{bmatrix}_{q}&\textup{ if }\mathcal{P}_{\mathcal{A}},\\\\[15.0pt]
0&\textup{ if }\neg\mathcal{P}_{\mathcal{A}},\end{cases}$

  2. (2)

$\displaystyle Z_{\mathcal{C}}^{(s)}(T)=\sum_{\begin{subarray}{c}a\geq
0\\\\[1.0pt]
\mathcal{P}_{\mathcal{A}}\end{subarray}}\begin{bmatrix}{k+a-t_{s}-n}\\\
{s}\end{bmatrix}_{q}T^{a}$.

##  5 The Tensor Zeta Function for Ravagnani-type Anticodes

Inspired by the theory developed in [8], in this section we extend the study
of the zeta function for tensor weights related to Ravagnani-type anticodes.
We now recall the definition of the $q$-Bernstein polynomial. The reader is
referred to [17] for further details.

######  Definition 5.1.

Let $a,b$ be nonnegative integers such that $a\leq b$. The $(b,a)$-th
$q$-Bernstein polynomial is

$\mathcal{B}_{b,a}(X,Y;q):=\begin{bmatrix}{b}\\\
{a}\end{bmatrix}_{q}Y^{a}\prod_{c=0}^{b-a-1}(X-q^{c}Y).$

We also recall that the sets $\\{X^{b-a}Y^{a}:a,b\in\mathbb{Z}_{\geq 0},a\leq
b\\}$ and $\\{\mathcal{B}_{b,a}(X,Y;q):a,b\in\mathbb{Z}_{\geq 0},a\leq b\\}$
are $\mathbb{Q}$-bases for the ring of homogeneous polynomials of degree $b$.
The inversion formula associated with these polynomials is

$X^{b-a}Y^{a}=\begin{bmatrix}{b}\\\
{a}\end{bmatrix}_{q}^{-1}\sum_{c=a}^{b}\begin{bmatrix}{c}\\\
{a}\end{bmatrix}_{q}\mathcal{B}_{b,c}(X,Y;q).$

A direct application of Proposition 4.4 to Proposition 2.27 gives the
following result.

######  Proposition 5.2.

The following hold for all $a,b\in\\{0,\ldots,n\\}$.

  1. (1)

$\displaystyle
B_{a}^{(\textup{R},j)}(\mathcal{C})=\sum_{b=0}^{a}W_{b}^{(\textup{R},j)}(\mathcal{C})|\delta_{1}|\begin{bmatrix}{n_{1}-a\frac{n_{1}}{n}}\\\
{(a-b)\frac{n_{1}}{n}}\end{bmatrix}_{q}$.

  2. (2)

$\displaystyle
W_{b}^{(\textup{R},j)}(\mathcal{C})=\sum_{a=0}^{b}B_{a}^{(\textup{R},j)}(\mathcal{C})|\delta_{1}|\begin{bmatrix}{n_{1}-b\frac{n_{1}}{n}}\\\
{(b-a)\frac{n_{1}}{n}}\end{bmatrix}_{q}(-1)^{(b-a)\frac{n_{1}}{n}}q^{\binom{(b-a)\frac{n_{1}}{n}}{2}}$.

###### Proof.

Note that by Proposition 4.4 we have

$\left|\left\\{(A^{\prime},A)\in\mathcal{A}_{b}\times\mathcal{A}_{a}:A^{\prime}\leq
A\right\\}\right|=\begin{cases}0&\textup{ if }\;n\nmid n_{1}b\;\textup{ or
}\;n\nmid n_{1}a,\\\\[8.61108pt]
\displaystyle|\delta_{1}|\begin{bmatrix}{n_{1}-b\frac{n_{1}}{n}}\\\
{(a-b)\frac{n_{1}}{n}}\end{bmatrix}_{q}&\textup{ if }\;n\mid n_{1}b\;\textup{
and }\;n\mid n_{1}a.\end{cases}$

Finally, one can check that the lattices

$\left\\{A^{(1)}\otimes\bigotimes_{s=2}^{r}\mathbb{F}_{q}^{n_{s}}:A^{(1)}\leq\mathbb{F}_{q}^{n_{1}}\right\\}\qquad\textup{
and }\qquad\left\\{A\leq\mathbb{F}_{q}^{n_{1}}\right\\}$

are isomorphic and so the statement follows by Proposition 2.27. ∎

In the next theorem, we compute the coefficients of
$\mathcal{W}_{\mathcal{C}}^{(\textup{R},j)}(X,Y)$ in terms of the basis given
by $q$-Bernstein polynomials. This result can be seen a generalization [8,
Theorem 3.11] for $r\geq 2$.

######  Theorem 5.3.

The following holds.

$\mathcal{W}_{\mathcal{C}}^{(\textup{R},j)}(X,Y)=\sum_{a=t_{j}^{\textup{R}}\frac{n_{1}}{n}}^{n_{1}}b_{a\frac{n}{n_{1}}-t_{j}^{\textup{R}}}^{(\textup{R},j)}(\mathcal{C})\mathcal{B}_{{n_{1}},a}\left(X^{\frac{n}{n_{1}}},Y^{\frac{n}{n_{1}}};q\right).$

###### Proof.

Proposition 4.4 and the inversion formula for $q$-Bernstein polynomial imply

$\displaystyle\mathcal{W}_{\mathcal{C}}^{(\textup{R},j)}(X,Y)$
$\displaystyle=\sum_{\tiny\begin{matrix}b\leq n\\\ n\mid
bn_{1}\end{matrix}}W_{b}^{(\textup{R},j)}(\mathcal{C})X^{n-b}Y^{b}$
$\displaystyle=\sum_{b=0}^{n_{1}}W_{b\frac{n}{n_{1}}}^{(\textup{R},j)}(\mathcal{C})\left(X^{\frac{n}{n_{1}}}\right)^{n_{1}-b}\left(Y^{\frac{n}{n_{1}}}\right)^{b}$
$\displaystyle=\sum_{b=t_{j}^{\textup{R}}\frac{n_{1}}{n}}^{n_{1}}W_{b\frac{n}{n_{1}}}^{(\textup{R},j)}(\mathcal{C})\begin{bmatrix}{n_{1}}\\\
{b}\end{bmatrix}_{q}^{-1}\sum_{a=b}^{n_{1}}\begin{bmatrix}{a}\\\
{b}\end{bmatrix}_{q}\mathcal{B}_{{n_{1}},a}\left(X^{\frac{n}{n_{1}}},Y^{\frac{n}{n_{1}}};q\right)$
$\displaystyle=\sum_{a=t_{j}^{\textup{R}}\frac{n_{1}}{n}}^{n_{1}}B_{n_{1},a}\left(X^{\frac{n}{n_{1}}},Y^{\frac{n}{n_{1}}};q\right)\begin{bmatrix}{n_{1}}\\\
{a}\end{bmatrix}_{q}^{-1}\sum_{b=t_{j}^{\textup{R}}\frac{n_{1}}{n}}^{a}\begin{bmatrix}{n_{1}-b}\\\
{a-b}\end{bmatrix}_{q}W_{b\frac{n}{n_{1}}}^{(\textup{R},j)}(\mathcal{C})$

where the last equality follows by Lemma 2.31. Finally, by Proposition 5.2 and
Definition 4.2, we have

$\displaystyle\mathcal{W}_{\mathcal{C}}^{(\textup{R},j)}(X,Y)$
$\displaystyle=\sum_{a=t_{j}^{\textup{R}}\frac{n_{1}}{n}}^{n_{1}}\mathcal{B}_{{n_{1}},a\frac{n_{1}}{n}}\left(X^{\frac{n}{n_{1}}},Y^{\frac{n}{n_{1}}};q\right)\begin{bmatrix}{n_{1}}\\\
{a}\end{bmatrix}_{q}^{-1}\sum_{b=t_{j}^{\textup{R}}\frac{n_{1}}{n}}^{a}\begin{bmatrix}{n_{1}-a}\\\
{a-b}\end{bmatrix}_{q}W_{b\frac{n}{n_{1}}}^{(\textup{R},j)}(\mathcal{C})$
$\displaystyle=\sum_{a=t_{j}^{\textup{R}}\frac{n_{1}}{n}}^{n_{1}}\mathcal{B}_{{n_{1}},a}\left(X^{\frac{n}{n_{1}}},Y^{\frac{n}{n_{1}}};q\right)\begin{bmatrix}{n_{1}}\\\
{a}\end{bmatrix}_{q}^{-1}|\delta_{1}|^{-1}B_{a\frac{n}{n_{1}}}^{(\textup{R},j)}(\mathcal{C})$
$\displaystyle=\sum_{a=t_{j}^{\textup{R}}\frac{n_{1}}{n}}^{n_{1}}b_{a\frac{n}{n_{1}}-t_{j}^{\textup{R}}}^{(\textup{R},j)}(\mathcal{C})\mathcal{B}_{{n_{1}},a}\left(X^{\frac{n}{n_{1}}},Y^{\frac{n}{n_{1}}};q\right)$

which concludes the proof. ∎

The following result provides a connection between the $q$-Bernstein
polynomials, the $j$-th generalized tensor zeta function and the $j$-th
generalized tensor weight enumerator.

######  Proposition 5.4.

Define the function

$\varphi_{a}(X,Y,T):=\sum_{b=0}^{a}B_{a,b}(X,Y;q)T^{a-b}.$

Then $\mathcal{W}_{\mathcal{C}}^{(\textup{R},j)}(X,Y)$ is the coefficient of
$T^{n-t_{j}^{\textup{R}}}$ in the expression
$Z_{\mathcal{C}}^{(\textup{R},j)}(T)\varphi_{n_{1}}\left(X^{\frac{n}{n_{1}}},Y^{\frac{n}{n_{1}}},T^{\frac{n}{n_{1}}}\right)$.

###### Proof.

We have

$\displaystyle Z_{\mathcal{C}}^{(\textup{R},j)}(T)\varphi_{n_{1}}$
$\displaystyle\left(X^{\frac{n}{n_{1}}},Y^{\frac{n}{n_{1}}},T^{\frac{n}{n_{1}}}\right)$
$\displaystyle=\left(\sum_{a\geq
0}b_{a\frac{n}{n_{1}}}(\mathcal{C})\left(T^{\frac{n}{n_{1}}}\right)^{a}\right)\left(\sum_{b=0}^{n_{1}}B_{n_{1},b}\left(X^{\frac{n}{n_{1}}},Y^{\frac{n}{n_{1}}};q\right)\left(T^{\frac{n}{n_{1}}}\right)^{n_{1}-b}\right)$
$\displaystyle=\sum_{a\geq
0}\sum_{b=0}^{n_{1}}b_{a\frac{n}{n_{1}}}(\mathcal{C})B_{n_{1},b}\left(X^{\frac{n}{n_{1}}},Y^{\frac{n}{n_{1}}};q\right)\left(T^{\frac{n}{n_{1}}}\right)^{n_{1}-b+a}$
$\displaystyle=\sum_{b=0}^{n_{1}}\left(T^{\frac{n}{n_{1}}}\right)^{b}\sum_{a=0}^{b}b_{a\frac{n}{n_{1}}}(\mathcal{C})B_{n_{1},n_{1}-b+a}\left(X^{\frac{n}{n_{1}}},Y^{\frac{n}{n_{1}}};q\right)\mod
T^{n+1}$
$\displaystyle=\sum_{b=0}^{n_{1}}\left(T^{\frac{n}{n_{1}}}\right)^{n_{1}-b}\sum_{a=0}^{n_{1}-b}b_{a\frac{n}{n_{1}}}B_{n_{1},b+a}\left(X^{\frac{n}{n_{1}}},Y^{\frac{n}{n_{1}}};q\right)\mod
T^{n+1}.$

Therefore, by Theorem 5.3, $\mathcal{W}_{\mathcal{C}}^{(\textup{R},j)}(X,Y)$
is the coefficient of
$T^{n-t_{j}^{\textup{R}}}=\left(T^{\frac{n}{n_{1}}}\right)^{n_{1}-\frac{n_{1}}{n}t_{j}^{\textup{R}}}$
in the expression
$Z_{\mathcal{C}}^{(\textup{R},j)}(T)\varphi_{n_{1}}\left(X^{\frac{n}{n_{1}}},Y^{\frac{n}{n_{1}}},T^{\frac{n}{n_{1}}}\right)$.
∎

######  Example 5.5.

Let $\mathcal{C}$ be the $\mathbb{F}_{2}$-$[2\times 3\times 4,13]$ code as in
Example 3.7 and recall that $t_{2}^{\textup{R}}(\mathcal{C})=12$. One can
check the following.

$\displaystyle\varphi_{2}(X^{12},Y^{12},T^{12})$
$\displaystyle=X^{24}T^{24}-3X^{12}Y^{12}T^{24}+3X^{12}Y^{12}T^{12}+2Y^{24}T^{24}-3Y^{24}T^{12}+Y^{24},$
$\displaystyle Z_{\mathcal{C}}^{(\textup{R},2)}(T)$
$\displaystyle=1+11180715\,T^{12}+187649967696555\,T^{24}+\cdots$
$\displaystyle\mathcal{W}_{\mathcal{C}}^{(\textup{R},2)}(X,Y)$
$\displaystyle=3X^{12}Y^{12}+11180712\,Y^{24}.$

Therefore, $\mathcal{W}_{\mathcal{C}}^{(\textup{R},2)}(X,Y)$ is the
coefficient of $T^{24-t_{2}^{\textup{R}}(\mathcal{C})}=T^{12}$ in the
expression

$\displaystyle
Z_{\mathcal{C}}^{(\textup{R},2)}(T)\varphi_{2}(X^{12},Y^{12},T^{12})=$
$\displaystyle Y^{24}+(3X^{12}Y^{12}+11180712\,Y^{24})T^{12}$
$\displaystyle+(X^{24}+33542142\,X^{12}Y^{12}-33542143\,Y^{24})+\cdots$

as predicted by Proposition 5.4.

######  Theorem 5.6.

There exists a unique polynomial
$P_{\mathcal{C}}^{(\textup{R},j)}(T)\in\mathbb{Q}[T]$ of degree at most
$n_{1}+j+1-\frac{n_{1}}{n}(t_{j}^{\textup{R}}+\left(t_{1}^{\textup{R}}\right)^{\perp})$
such that

$Z_{\mathcal{C}}^{(\textup{R},j)}(T)=\frac{P_{\mathcal{C}}^{(\textup{R},j)}\left(T^{\frac{n}{n_{1}}}\right)}{\displaystyle\prod_{s=0}^{j}\left(1-q^{\frac{n}{n_{1}}s}T^{\frac{n}{n_{1}}}\right)}.$

We have that the coefficient of degree $a$ of
$P_{\mathcal{C}}^{(\textup{R},j)}(T)$ is

$p_{a}^{(\textup{R},j)}(\mathcal{C})=\sum_{s=0}^{j+1}\begin{bmatrix}{j+1}\\\
{s}\end{bmatrix}_{q^{\frac{n}{n_{1}}}}(-1)^{s}q^{\frac{n}{n_{1}}\binom{s}{2}}b_{\frac{n}{n_{1}}(a-s)}^{(\textup{R},j)}(\mathcal{C}).$

###### Proof.

Applying Lemma 2.31 to the power series

$P_{\mathcal{C}}^{(\textup{R},j)}\left(T^{\frac{n_{1}}{n}}\right):=Z_{\mathcal{C}}^{(\textup{R},j)}(T)\prod_{s=0}^{j}\left(1-q^{\frac{n}{n_{1}}s}T^{\frac{n_{1}}{n}}\right)$

gives the coefficients $p_{a}^{(j)}(\mathcal{C})$ as in the statement.
Moreover, a standard computation using Lemma 2.31 shows that

$\sum_{s=0}^{j+1}\begin{bmatrix}{j+1}\\\
{s}\end{bmatrix}_{q^{\frac{n}{n_{1}}}}(-1)^{s}q^{\frac{n}{n_{1}}\binom{s}{2}}b_{\frac{n}{n_{1}}(a-s)}^{(j)}(\mathcal{C})=0$

for all $a\notin\\{0,\ldots,\lfloor
n_{1}+j+1-\frac{n_{1}}{n}(t_{j}^{\textup{R}}+\left(t_{1}^{\textup{R}}\right)^{\perp}\rfloor\\}$.
The statement follows by a change of variable. ∎

Note that this result extends [8, Theorem 5.2] for $r\geq 2$. In the sequel,
we refer to the polynomial $P_{\mathcal{C}}^{(\textup{R},j)}(T)$ as the $j$-th
tensor zeta polynomial related to $\mathcal{A}^{\textup{R}}$. As a consequence
of Theorem 3.18 we have the generalized tensor zeta functions and zeta
polynomials of a $j$-TBMD code with respect to $\mathcal{A}^{\textup{R}}$ are
partially determined by the code parameters. More in detail, we have the
following result which can be seen as a generalization of [8, Corollary 5.3].

######  Corollary 5.7.

Write $k=\alpha\frac{n}{n_{1}}+\rho$ with
$\rho\in\\{0,\ldots,\frac{n}{n_{1}}-1\\}$. If $\mathcal{C}$ is $j$-TBMD then
the following hold for any integer $s\in\\{j,\ldots,k\\}$.

  1. (1)

$b_{a}^{(\textup{R},s)}(\mathcal{C})=\begin{bmatrix}{\rho+a-\frac{n}{n_{1}}\left\lfloor\frac{n}{n_{1}}(\rho-s)\right\rfloor}\\\
{s}\end{bmatrix}_{q}$ for all $a\geq 0$.

  2. (2)

$\displaystyle Z_{\mathcal{C}}^{(\textup{R},s)}(T)=\sum_{a\geq
0}\begin{bmatrix}{\rho+\frac{n}{n_{1}}\left(a-\left\lfloor\frac{n}{n_{1}}(\rho-s)\right\rfloor\right)}\\\
{s}\end{bmatrix}_{q}\left(T^{\frac{n}{n_{1}}}\right)^{a}$.

  3. (3)

$\displaystyle
p_{a}^{(\textup{R},s)}(\mathcal{C})=\sum_{p=0}^{s+1}\begin{bmatrix}{s+1}\\\
{p}\end{bmatrix}_{q^{\frac{n}{n_{1}}}}(-1)^{p}q^{\frac{n}{n_{1}}\binom{p}{2}}\begin{bmatrix}{\rho+\frac{n}{n_{1}}\left(a-p-\left\lfloor\frac{n}{n_{1}}(\rho-s)\right\rfloor\right)}\\\
{s}\end{bmatrix}_{q}$ for all $a\geq 0$.

Let $\mathcal{C},\mathcal{D}\leq\mathbb{F}$ be $j$-TBMD with respect to
$\mathcal{A}^{\textup{R}}$ such that
$\dim_{\mathbb{F}_{q}}\left(\mathcal{C}\right)\equiv\dim_{\mathbb{F}_{q}}\left(\mathcal{D}\right)\equiv\rho\mod\frac{n}{n_{1}}$.
Observe that, for any $s\in\\{j,\ldots,k\\}$, we have
$b_{a}^{(\textup{R},s)}(\mathcal{C})=b_{a}^{(\textup{R},s)}(\mathcal{D})$, for
all $a\geq 0$, and, in particular, they share the same $s$-th generalized
tensor zeta function and zeta polynomial.

######  Notation 5.8.

In the sequel, for any $s,a\in\mathbb{Z}_{\geq 0}$ and
$\rho\in\\{0,\ldots,\frac{n}{n_{1}}-1\\}$ we let

  1. (1)

$b_{\rho,a}^{(\textup{R},s)}:=\begin{bmatrix}{\rho+a-\frac{n}{n_{1}}\left\lfloor\frac{n}{n_{1}}(\rho-s)\right\rfloor}\\\
{s}\end{bmatrix}_{q}$.

  2. (2)

$\displaystyle Z_{\rho}^{(\textup{R},s)}(T):=\sum_{a\geq
0}b_{\rho,a}^{(\textup{R},s)}\left(T^{\frac{n}{n_{1}}}\right)^{a}$.

  3. (3)

$\displaystyle
p_{\rho,a}^{(\textup{R},s)}:=\sum_{p=0}^{s+1}\begin{bmatrix}{j+1}\\\
{p}\end{bmatrix}_{q^{\frac{n}{n_{1}}}}(-1)^{p}q^{\frac{n}{n_{1}}\binom{p}{2}}\begin{bmatrix}{\rho+\frac{n}{n_{1}}\left(a-p-\left\lfloor\frac{n}{n_{1}}(\rho-s)\right\rfloor\right)}\\\
{s}\end{bmatrix}_{q}$.

  4. (4)

$\displaystyle P_{\rho}^{(\textup{R},s)}(T):=\sum_{a\geq
0}p_{\rho,a}^{(\textup{R},s)}T^{a}$.

  5. (5)

$\displaystyle\mathcal{W}_{\rho,\ell}^{(\textup{R},j)}(X,Y):=\sum_{a=0}^{n_{1}-\ell}b_{\rho,a}^{(\textup{R},s)}\mathcal{B}_{n_{1},a+\ell}\left(X^{\frac{n}{n_{1}}},Y^{\frac{n}{n_{1}}};q\right)$
for all $\ell\in[n_{1}]$.

By Corollary 5.7, the objects
$b_{\rho,a}^{(\textup{R},s)},Z_{\rho}^{(\textup{R},s)}(T),p_{\rho,a}^{(\textup{R},s)},P_{\rho}^{(\textup{R},s)}(T)$
and $\mathcal{W}_{\rho,\ell}^{(\textup{R},s)}(X,Y)$ defined above are those
related to a $j$-TBMD code with respect to $\mathcal{A}^{\textup{R}}$ of
dimension $k\equiv\rho\mod\frac{n}{n_{1}}$ and
$t_{s}^{\textup{R}}=\frac{n}{n_{1}}\ell$, provided that such a code exists.
Moreover, it is not difficult to check that, for a given
$\rho\in\\{0,\ldots,\frac{n}{n_{1}}-1\\}$, the set

$\mathcal{W}_{\rho}^{(\textup{R},j)}:=\left\\{\mathcal{W}_{\rho,\delta}^{(\textup{R},j)}(X,Y):\delta\in[n_{1}]\right\\}$

is a $\mathbb{Q}$-basis for the space that contains the $j$-th generalized
tensor weight enumerators related to $\mathcal{A}^{\textup{R}}$. We conclude
this section by giving a generalization of [8, Section 6], that is computing
the coefficients of $\mathcal{W}_{\mathcal{C}}^{(\textup{R},j)}$ with respect
to the basis $\mathcal{W}_{\rho}^{(\textup{R},j)}$. In particular, we give an
explicit expression for the rational numbers $\beta_{\rho,a}^{(\textup{R},j)}$
such that

$\mathcal{W}_{\mathcal{C}}^{(\textup{R},j)}(X,Y)=\sum_{a=0}^{n_{1}-\frac{n_{1}}{n}t_{j}^{\textup{R}}}\beta_{\rho,a}^{(\textup{R},j)}\mathcal{W}_{\rho,\frac{n_{1}}{n}t_{j}^{\textup{R}}+a}^{(\textup{R},j)}(X,Y).$

Our approach is similar to the one in [8] using ordinary111There are two forms
of Bell polynomials, namely the ordinary and the exponential form. homogeneous
Bell polynomials. These objects were introduced in [4] and encode the
different ways in which an integer can be partitioned. The reader is refereed
to [10] and [18] for further details. We briefly recall the main definitions
and results. Compare the following definition with the characterization of
homogeneous exponential partial Bell polynomials given in [10, Section 3.3,
Theorem A].

######  Definition 5.9.

Let $a,b\in\mathbb{Z}_{\geq 0}$. The $(a,b)$-th homogeneous ordinary partial
Bell polynomial is

$\displaystyle\mathcal{P}_{a,b}(x_{0},x_{1},\ldots,x_{a-b+1})$
$\displaystyle=\sum_{\begin{subarray}{c}c_{1}+c_{2}+\cdots+c_{a-b+1}=b\\\
c_{1}+2c_{2}+\cdots+(a-b+1)c_{a-b+1}=a\end{subarray}}\frac{a!}{c_{1}!c_{2}!\cdots
c_{a-b+1}!}x_{0}^{a-b}x_{1}^{c_{1}}x_{2}^{c_{2}}\cdots x_{a-b+1}^{a-b+1}.$

Moreover, we let $\mathcal{P}_{0,0}:=1$, $\mathcal{P}_{a,0}:=0$ and
$\mathcal{P}_{0,b}:=0$.

Observe that the polynomial $\mathcal{P}_{a,b}(x_{0},x_{1},\ldots,x_{a-b+1})$
describes the compositions of the integer $a$ into $b$ summands. We recall
that the compositions of an integer $a$ are simply ordered partitions, that is
the possible ways the integer $a$ can be partitioned where the order matters.

######  Definition 5.10.

Let $a\in\mathbb{Z}_{\geq 0}$. The The $a$-th (homogeneous ordinary) Bell
polynomial is the sum over $b\in\mathbb{Z}_{\geq 0}$ of the $(a,b)$-th
homogeneous ordinary partial Bell polynomials, that is

$\mathcal{P}_{a}(x_{0},x_{1},\ldots,x_{a})=\sum_{b=0}^{a}\mathcal{P}_{a,b}(x_{0},x_{1},\ldots,x_{a-b+1}).$

We recall an application of the Faà di Bruno formula [15]. For our purpose, we
are interested in a combinatorial formulation of such result involving Bell
polynomials.

######  Lemma 5.11.

If $(c_{a})_{a\in\mathbb{Z}_{\geq}0}$ is a sequence and $Q(T)$ is the formal
power series

$Q(T)=1-\sum_{a\geq 0}\frac{c_{a}}{c_{0}}T^{a}$

than its multiplicative inverse $R(T)=\frac{1}{Q(T)}$ can be written as

$R(T)=1+\sum_{a\geq 1}d_{a}T^{a}\qquad\textup{ where }\qquad
d_{a}=\left(\frac{1}{c_{0}}\right)^{a}\mathcal{P}_{a}(c_{0},c_{1},c_{2},\ldots,c_{a}).$

The next connection between generalized tensor zeta functions and zeta
polynomials generalizes [8, Lemma 5.8].

######  Lemma 5.12.

For all $\rho\in\left\\{0,\ldots,\frac{n}{n_{1}}-1\right\\}$ we have

$Z_{\mathcal{C}}^{(\textup{R},j)}(T)P_{\rho}^{(\textup{R},j)}\left(T^{\frac{n}{n_{1}}}\right)=Z_{\rho}^{(\textup{R},j)}(T)P_{\mathcal{C}}^{(\textup{R},j)}\left(T^{\frac{n}{n_{1}}}\right).$

###### Proof.

As a consequence of Theorem 5.6 we have

$Z_{\mathcal{C}}^{(j)}(T)P_{\rho}^{(j)}\left(T^{\frac{n}{n_{1}}}\right)=\frac{P_{\mathcal{C}}^{(\textup{R},j)}\left(T^{\frac{n}{n_{1}}}\right)P_{\rho}^{(j)}\left(T^{\frac{n}{n_{1}}}\right)}{\displaystyle\prod_{s=0}^{j}\left(1-q^{\frac{n}{n_{1}}s}T^{\frac{n}{n_{1}}}\right)}=Z_{\rho}^{(j)}(T)P_{\mathcal{C}}^{(j)}\left(T^{\frac{n}{n_{1}}}\right).$

This concludes the proof. ∎

The following results generalize [8, Theorem 6.5 and Corollaries 6.6, 6.7,
6.8]. The proofs are similar and hence we omit them.

######  Theorem 5.13.

For all $\rho\in\\{0,\ldots,\frac{n}{n_{1}}-1\\}$ we have

  1. (1)

$\displaystyle
Z_{\mathcal{C}}^{(\textup{R},j)}(T)=Z_{\rho}^{(\textup{R},j)}(T)\sum_{a\geq
0}\beta_{\rho,a}^{(\textup{R},j)}(\mathcal{C})\left(T^{\frac{n}{n_{1}}}\right)^{a}$,

  2. (2)

$\displaystyle
P_{\mathcal{C}}^{(\textup{R},j)}\left(T^{\frac{n}{n_{1}}}\right)=P_{\rho}^{(\textup{R},j)}\left(T^{\frac{n}{n_{1}}}\right)\sum_{a\geq
0}\beta_{\rho,a}^{(\textup{R},j)}(\mathcal{C})\left(T^{\frac{n}{n_{1}}}\right)^{a}$

where

$\beta_{\rho,a}^{(\textup{R},j)}(\mathcal{C})=\sum_{b=0}^{a}\frac{p_{b}^{(\textup{R},j)}(\mathcal{C})}{\left(p_{\rho,0}^{(\textup{R},j)}\right)^{a-b+1}}\mathcal{P}_{a-b}\left(p_{\rho,0}^{(\textup{R},j)},-p_{\rho,1}^{(\textup{R},j)},\ldots,-p_{\rho,a-b}^{(\textup{R},j)}\right).$

######  Corollary 5.14.

For all $a\in\mathbb{Z}_{\geq 0}$ and
$\rho\in\\{0,\ldots,\frac{n}{n_{1}}-1\\}$, we have

$\beta_{\rho,a}^{(\textup{R},j)}(\mathcal{C})=\sum_{b=0}^{a}\frac{b_{b}^{(\textup{R},j)}(\mathcal{C})}{\left(b_{\rho,0}^{(\textup{R},j)}\right)^{a-b+1}}\mathcal{P}_{a-b}\left(b_{\rho,0}^{(\textup{R},j)},-b_{\rho,1}^{(\textup{R},j)},\ldots,-b_{\rho,a-b}^{(\textup{R},j)}\right).$

######  Corollary 5.15.

For all $\rho\in\\{0,\ldots,\frac{n}{n_{1}}-1\\}$ we have

$\mathcal{W}_{\mathcal{C}}^{(\textup{R},j)}(X,Y)=\sum_{a=0}^{n_{1}-\frac{n_{1}}{n}t_{j}^{\textup{R}}}\beta_{\rho,a}^{(\textup{R},j)}\mathcal{W}_{\rho,\frac{n_{1}}{n}t_{j}^{\textup{R}}+a}^{(\textup{R},j)}(X,Y).$

###### Proof.

By Theorem 5.13 and Corollary 5.14 we have

$\displaystyle
Z_{\mathcal{C}}^{(\textup{R},j)}(T)\varphi_{n_{1}}\left(X^{\frac{n}{n_{1}}},Y^{\frac{n}{n_{1}}},T^{\frac{n}{n_{1}}}\right)$
$\displaystyle=Z_{\rho}^{(\textup{R},j)}(T)\varphi_{n_{1}}\left(X^{\frac{n}{n_{1}}},Y^{\frac{n}{n_{1}}},T^{\frac{n}{n_{1}}}\right)\sum_{b\geq
0}\beta_{\rho,b}^{(\textup{R},j)}(\mathcal{C})\left(T^{\frac{n}{n_{1}}}\right)^{b}$
$\displaystyle\equiv\sum_{a=0}^{n_{1}}\mathcal{W}_{\rho,a}^{(\textup{R},j)}(X,Y)T^{n-\frac{n}{n_{1}}a}\sum_{b\geq
0}\beta_{\rho,b}^{(\textup{R},j)}(\mathcal{C})T^{\frac{n}{n_{1}}b}\mod
T^{n+1}$
$\displaystyle\equiv\sum_{b=0}^{n_{1}}T^{\frac{n}{n_{1}}b}\sum_{a=0}^{b}\beta_{\rho,a}^{(\textup{R},j)}(\mathcal{C})\mathcal{W}_{\rho,n_{1}-b+a}^{(\textup{R},j)}(X,Y)\mod
T^{n+1}.$

In particular, the coefficient of $T^{n-t_{j}^{\textup{R}}}$ is

$\sum_{a=0}^{n_{1}-\frac{n_{1}}{n}t_{j}^{\textup{R}}}\beta_{\rho,a}^{(\textup{R},j)}\mathcal{W}_{\rho,\frac{n_{1}}{n}t_{j}^{\textup{R}}+a}^{(\textup{R},j)}(X,Y)$

and the statement follows by Proposition 5.4. ∎

##  6 Refined Invariants for Closure-type Anticodes

We devote this section to derive a refinement of the tensor binomial moments
and weight distribution related to the closure-type anticodes and we establish
relations similar to those of Section 5. The idea of this refinement is based
on the fact that a closure-type anticode is a tensor product of vector spaces.
We introduce the concept of dimension distribution of a closure-type anticode
$A\in\mathcal{A}^{\textup{cl}}$ which we define as the $r$-tuple whose $i$-th
component is the dimension of $A^{(i)}$ over $\mathbb{F}_{q}$. Let
$\boldsymbol{X},\boldsymbol{Y}$ and $\boldsymbol{T}$ denote the list of
indeterminates $(X_{1},\ldots,X_{r})$, $(Y_{1},\ldots,Y_{r})$ and
$(T_{1},\ldots,T_{r})$ respectively. Throughout this section we consider
polynomials that are members of the polynomial rings
$\mathbb{Q}[\boldsymbol{T}]$ and
$\mathbb{Q}[\boldsymbol{X},\boldsymbol{Y},\boldsymbol{T}]$. We first introduce
some notation.

######  Notation 6.1.

We define the following direct product lattices with respect to the product
order.

  1. (1)

$\mathfrak{Z}^{\textup{cl}}:=\mathbb{Z}\times\cdots\times\mathbb{Z}$.

  2. (2)

$\mathfrak{Z}_{i}^{\textup{D}}:=\begin{cases}\\{(n_{1},\ldots,n_{i-1},a_{i},n_{i+1},\ldots,n_{r}):a_{i}\in\mathbb{Z}\\}&\textup{
if }i\in[r-1],\\\\[5.0pt]
\\{(n_{1},\ldots,n_{r-1},a_{r}):a_{r}\in\mathbb{Z}\\}&\textup{ if }i=r\textup{
and }|\delta_{r}|\neq 1,\\\\[5.0pt] \emptyset&\textup{ if }i=r\textup{ and
}|\delta_{r}|=1.\end{cases}$

  3. (3)

$\mathfrak{Z}^{\textup{D}}:=\mathop{\vphantom{\bigcup}\mathchoice{\leavevmode\vtop{\halign{\hfil$\m@th\displaystyle#$\hfil\cr\bigcup\cr\cdot\crcr}}}{\leavevmode\vtop{\halign{\hfil$\m@th\textstyle#$\hfil\cr\bigcup\cr\cdot\crcr}}}{\leavevmode\vtop{\halign{\hfil$\m@th\scriptstyle#$\hfil\cr\bigcup\cr\cdot\crcr}}}{\leavevmode\vtop{\halign{\hfil$\m@th\scriptscriptstyle#$\hfil\cr\bigcup\cr\cdot\crcr}}}}\displaylimits_{i=1}^{r}\mathfrak{Z}_{i}^{\textup{D}}$.

  4. (4)

$\mathfrak{Z}_{i}^{\textup{R}}:=\begin{cases}\\{(n_{1},\ldots,n_{i-1},a_{i},n_{i+1},\ldots,n_{r}):a_{i}\in\mathbb{Z}\\}&\textup{
if }i\in\delta_{1},\\\\[5.0pt] \emptyset&\textup{ if
}i\notin\delta_{1}.\end{cases}$

  5. (5)

$\mathfrak{Z}^{\textup{R}}:=\mathop{\vphantom{\bigcup}\mathchoice{\leavevmode\vtop{\halign{\hfil$\m@th\displaystyle#$\hfil\cr\bigcup\cr\cdot\crcr}}}{\leavevmode\vtop{\halign{\hfil$\m@th\textstyle#$\hfil\cr\bigcup\cr\cdot\crcr}}}{\leavevmode\vtop{\halign{\hfil$\m@th\scriptstyle#$\hfil\cr\bigcup\cr\cdot\crcr}}}{\leavevmode\vtop{\halign{\hfil$\m@th\scriptscriptstyle#$\hfil\cr\bigcup\cr\cdot\crcr}}}}\displaylimits_{i=1}^{r}\mathfrak{Z}_{i}^{\textup{R}}$.

  6. (6)

$\mathfrak{N}^{\textup{cl}}:=[n_{1}]\times\cdots\times[n_{r}]$.

  7. (7)

$\mathfrak{N}_{i}^{\textup{D}}:=\mathfrak{Z}_{i}^{\textup{D}}\cap\mathfrak{N}^{\textup{cl}}$
and
$\mathfrak{N}^{\textup{D}}:=\mathfrak{Z}^{\textup{D}}\cap\mathfrak{N}^{\textup{cl}}$.

  8. (8)

$\mathfrak{N}_{i}^{\textup{R}}:=\mathfrak{Z}_{i}^{\textup{R}}\cap\mathfrak{N}^{\textup{cl}}$
and
$\mathfrak{N}^{\textup{R}}:=\mathfrak{Z}^{\textup{R}}\cap\mathfrak{N}^{\textup{cl}}$.

We denote by $\mathfrak{o}$ and $\mathfrak{n}$ the lattice elements
$(0,\ldots,0)$ and $(n_{1},\ldots,n_{r})$ respectively. For any
$\mathfrak{a},\mathfrak{b}\in\mathfrak{Z}$ we define
$(\mathfrak{a}\mod\mathfrak{b})$ to be the element of $\mathfrak{Z}$ whose
$i$-th component is $(\mathfrak{a}_{i}\mod\mathfrak{b}_{i})$, that is

$\mathfrak{a}\mod\mathfrak{b}=(\mathfrak{a}_{1}\mod\mathfrak{b}_{1},\;\ldots,\;\mathfrak{a}_{r}\mod\mathfrak{b}_{r}).$

One can easily check that $\mathfrak{N}^{\textup{cl}}\cup\\{\mathfrak{o}\\}$,
$\mathfrak{N}^{\textup{D}}\cup\\{\mathfrak{o}\\}$ and
$\mathfrak{N}^{\textup{R}}\cup\\{\mathfrak{o}\\}$ with the product order are
also lattices. Consider, for example
$\mathfrak{N}^{\textup{cl}}:=[2]\times[3]$. Figures (1) and (2) provide a
graph theoretical representation of the lattices $\mathfrak{N}^{\textup{cl}}$
and $\mathfrak{N}^{\textup{cl}}\,\cup\\{(0,0)\\}$ respectively.

(1,1)(1,2)(2,1)(1,3)(2,2)(2,3)

(1):  Lattice $\mathfrak{N}^{\textup{cl}}$.

(1,1)(1,2)(2,1)(1,3)(2,2)(2,3)(0,0)

(2):  Lattice $\mathfrak{N}^{\textup{cl}}\cup\\{(0,0)\\}$.

######  Definition 6.2.

Let $A\in\mathcal{A}^{\textup{cl}}$ be a non-zero closure-type anticode. We
define the dimension distribution $\textup{dd}(A)$ of $A$ to be

$\textup{dd}(A):=\left(\dim_{\mathbb{F}_{q}}\left(A^{(1)}\right),\cdots,\dim_{\mathbb{F}_{q}}\left(A^{(r)}\right)\right)\in\mathfrak{N}^{\textup{cl}}$

We set $\textup{dd}(\left<0\right>_{\mathbb{F}_{q}})=\mathfrak{o}$.

######  Remark 6.3.

We have the following.

  1. (1)

$A\in\mathcal{A}^{\textup{cl}}$ if and only if
$\textup{dd}(A)\in\mathfrak{N}^{\textup{cl}}\,\cup\\{\mathfrak{o}\\}$.

  2. (2)

$A\in\mathcal{A}^{\textup{D}}$ if and only if
$\textup{dd}(A)\in\mathfrak{N}^{\textup{D}}\,\cup\\{\mathfrak{o}\\}$.

  3. (3)

$A\in\mathcal{A}^{\textup{R}}$ if and only if
$\textup{dd}(A)\in\mathfrak{N}^{\textup{R}}\,\cup\\{\mathfrak{o}\\}$.

######  Notation 6.4.

For any $\mathfrak{a}\in\mathfrak{N}\cup\\{\mathfrak{o}\\}$, we let
$\mathcal{A}^{\textup{cl}}_{\mathfrak{a}}:=\left\\{A\in\mathcal{A}^{\textup{cl}}:\textup{dd}(A)=\mathfrak{a}\right\\}$
and $\llbracket\mathfrak{a}\rrbracket$ to be the product of the components of
$\mathfrak{a}$, that is
$\llbracket\mathfrak{a}\rrbracket:=\mathfrak{a}_{1}\cdots\mathfrak{a}_{r}$.

We now give a refined version of the invariants related to closure-type
anticodes based on the structure of the direct product lattice of this set of
anticodes.

######  Definition 6.5.

For any $\mathfrak{a}\in\mathfrak{N}^{\textup{cl}}\cup\\{\mathfrak{o}\\}$, the
$(\mathfrak{a},j)$-th refined tensor binomial moment related to
$\mathcal{A}_{\mathfrak{a}}^{\textup{cl}}$ of $\mathcal{C}$ is

$B_{\mathfrak{a}}^{(\textup{cl},j)}(\mathcal{C}):=\sum_{A\in\mathcal{A}_{\mathfrak{a}}^{\textup{cl}}}B_{A}^{(\textup{cl},j)}(\mathcal{C}),\qquad\textup{
where }\qquad
B_{A}^{(\textup{cl},j)}(\mathcal{C}):=\begin{bmatrix}{\dim_{\mathbb{F}_{q}}\left(\mathcal{C}\cap
A\right)}\\\ {j}\end{bmatrix}_{q}$

for any $A\in\mathcal{A}_{\mathfrak{a}}^{\textup{cl}}$.

######  Definition 6.6.

For any $\mathfrak{a}\in\mathfrak{N}^{\textup{cl}}\cup\\{\mathfrak{o}\\}$, we
define

$W_{\mathfrak{a}}^{(\textup{cl},j)}(\mathcal{C}):=\sum_{A\in\mathcal{A}_{\mathfrak{a}}^{\textup{cl}}}W_{A}^{(\textup{cl},j)}(\mathcal{C}),$

where $W_{A}^{(\textup{cl},j)}:=|\\{\mathcal{D}\leq(\mathcal{C}\cap
A):\dim_{\mathbb{F}_{q}}\left(\mathcal{D}\right)=j\textup{ and
}\mathcal{D}\leq B\leq A,B\in\mathcal{A}^{\textup{cl}}\Longrightarrow
B=A\\}|$, for any $A\in\mathcal{A}_{\mathfrak{a}}^{\textup{cl}}$. We refer to
the set
$\\{W_{\mathfrak{a}}^{(\textup{cl},j)}(\mathcal{C}):\mathfrak{a}\in\mathfrak{N}^{\textup{cl}}\cup\\{\mathfrak{o}\\}\\}$
as the $j$-th refined tensor weight distribution related to
$\mathcal{A}^{\textup{cl}}$ of $\mathcal{C}$.

Clearly, for all $a\in[n]$ we have

$B_{a}^{(\textup{cl},j)}(\mathcal{C})=\sum_{\begin{subarray}{c}\mathfrak{a}\in\mathfrak{N}^{\textup{cl}}\\\\[2.0pt]
\llbracket\mathfrak{a}\rrbracket=a\end{subarray}}B_{\mathfrak{a}}^{(\textup{cl},j)}(\mathcal{C})\qquad\textup{
and }\qquad
W_{a}^{(\textup{cl},j)}(\mathcal{C})=\sum_{\begin{subarray}{c}\mathfrak{a}\in\mathfrak{N}^{\textup{cl}}\\\\[2.0pt]
\llbracket\mathfrak{a}\rrbracket=a\end{subarray}}W_{\mathfrak{a}}^{(\textup{cl},j)}(\mathcal{C})$

The following extends Proposition 2.27.

######  Theorem 6.7.

The following hold for any
$\mathfrak{a},\mathfrak{b}\in\mathfrak{N}^{\textup{cl}}\cup\\{\mathfrak{o}\\}$
.

  1. (1)

$\displaystyle
B_{\mathfrak{a}}^{(\textup{cl},j)}(\mathcal{C})=\sum_{\begin{subarray}{c}\mathfrak{b}\in\mathfrak{N}^{\textup{cl}}\\\\[1.0pt]
\mathfrak{b}\leq\mathfrak{a}\end{subarray}}W_{\mathfrak{b}}^{(j)}(\mathcal{C})\prod_{i=1}^{r}\begin{bmatrix}{n_{i}-\mathfrak{b}_{i}}\\\
{\mathfrak{a}_{i}-\mathfrak{b}_{i}}\end{bmatrix}_{q}$.

  2. (2)

$\displaystyle
W_{\mathfrak{b}}^{(\textup{cl},j)}(\mathcal{C})=\sum_{\begin{subarray}{c}\mathfrak{a}\in\mathfrak{N}^{\textup{cl}}\\\\[1.0pt]
\mathfrak{a}\leq\mathfrak{b}\end{subarray}}B_{\mathfrak{a}}^{(\textup{cl},j)}(\mathcal{C})\prod_{i=1}^{r}(-1)^{\mathfrak{b}_{i}-\mathfrak{a}_{i}}q^{\binom{\mathfrak{b}_{i}-\mathfrak{a}_{i}}{2}}\begin{bmatrix}{n_{i}-\mathfrak{a}_{i}}\\\
{\mathfrak{b}_{i}-\mathfrak{a}_{i}}\end{bmatrix}_{q}$.

###### Proof.

For ease of notation, in the remainder of this proof we write
$B_{\mathfrak{a}}^{(j)}$ and $W_{\mathfrak{b}}^{(j)}$ instead of
$B_{\mathfrak{a}}^{(\textup{cl},j)}(\mathcal{C})$ and
$W_{\mathfrak{b}}^{(\textup{cl},j)}(\mathcal{C})$ respectively. Observe that
$B_{\mathfrak{o}}^{(j)}(\mathcal{C})=W_{\mathfrak{o}}^{(j)}(\mathcal{C})=0$ by
definition, since $j$ is at least $1$. Therefore, we can assume
$\mathfrak{a},\mathfrak{b}\in\mathfrak{N}$ for the remainder of the proof.
Observe that for any $A\in\mathcal{A}_{\mathfrak{a}}^{\textup{cl}}$ we have

$\sum_{\begin{subarray}{c}A^{\prime}\in\mathcal{A}_{\mathfrak{b}}^{\textup{cl}}\\\\[1.0pt]
A^{\prime}\leq
A\end{subarray}}W_{A^{\prime}}^{(j)}=|\\{\mathcal{D}\leq\mathcal{C}:\dim_{\mathbb{F}_{q}}\left(\mathcal{D}\right)=j\textup{
and }\mathcal{D}\leq A\\}|=B_{A}^{(j)},$ (4)

and by the Möbius inversion formula we obtain

$W_{A^{\prime}}^{(j)}=\sum_{\tiny\begin{matrix}A\in\mathcal{A}^{\textup{cl}}\\\
A\leq
A^{\prime}\end{matrix}}\prod_{i=1}^{r}(-1)^{\dim_{\mathbb{F}_{q}}\left(A^{\prime(i)}\right)-\dim_{\mathbb{F}_{q}}\left(A^{(i)}\right)}q^{\binom{\dim_{\mathbb{F}_{q}}\left(A^{\prime(i)}\right)-\dim_{\mathbb{F}_{q}}\left(A^{(i)}\right)}{2}}B_{A}^{(j)},$
(5)

since $\mathcal{A}_{\mathfrak{a}}^{\textup{cl}}$ is a product lattice.
Therefore, by Equation (4), we get

$\displaystyle B_{\mathfrak{a}}^{(j)}$
$\displaystyle=\sum_{A\in\mathcal{A}_{\mathfrak{a}}^{\textup{cl}}}B_{A}^{(j)}=\sum_{A\in\mathcal{A}_{\mathfrak{a}}^{\textup{cl}}}\left(\underbrace{W_{\left<0\right>_{\mathbb{F}_{q}}}^{(j)}}_{=\,0}+\sum_{\begin{subarray}{c}A^{\prime}\in\mathcal{A}^{\textup{cl}}\\\\[1.0pt]
A^{\prime}\leq A\end{subarray}}W_{A^{\prime}}^{(j)}\right)$
$\displaystyle=\sum_{\begin{subarray}{c}\mathfrak{b}\in\mathfrak{N}^{\textup{cl}}\\\\[1.0pt]
\mathfrak{b}\leq_{\mathfrak{N}}\mathfrak{a}\end{subarray}}\sum_{A^{\prime}\in\mathcal{A}_{\mathfrak{b}}^{\textup{cl}}}W_{A^{\prime}}^{(j)}|\\{A\in\mathcal{A}_{\mathfrak{a}}^{\textup{cl}}:A^{\prime}\leq
A\\}|$
$\displaystyle=\sum_{\begin{subarray}{c}\mathfrak{b}\in\mathfrak{N}^{\textup{cl}}\\\\[1.0pt]
\mathfrak{b}\leq_{\mathfrak{N}}\mathfrak{a}\end{subarray}}\prod_{i=1}^{r}\begin{bmatrix}{n_{i}-\mathfrak{b}_{i}}\\\
{\mathfrak{a}_{i}-\mathfrak{b}_{i}}\end{bmatrix}_{q}\sum_{A^{\prime}\in\mathcal{A}_{\mathfrak{b}}^{\textup{cl}}}W_{A^{\prime}}^{(j)}$
$\displaystyle=\sum_{\begin{subarray}{c}\mathfrak{b}\in\mathfrak{N}^{\textup{cl}}\\\\[1.0pt]
\mathfrak{b}\leq_{\mathfrak{N}}\mathfrak{a}\end{subarray}}\prod_{i=1}^{r}\begin{bmatrix}{n_{i}-\mathfrak{b}_{i}}\\\
{\mathfrak{a}_{i}-\mathfrak{b}_{i}}\end{bmatrix}_{q}W_{\mathfrak{b}}^{(j)},$

where the last equality follows by [7, Lemma 4.9]. In order to prove the
second part of statement, observe that by Equation (5) we have

$\displaystyle W_{\mathfrak{b}}^{(j)}$
$\displaystyle=\sum_{A^{\prime}\in\mathcal{A}_{\mathfrak{b}}^{\textup{cl}}}W_{A^{\prime}}^{(j)}$
$\displaystyle=\sum_{A^{\prime}\in\mathcal{A}_{\mathfrak{b}}^{\textup{cl}}}\left(\underbrace{B_{\left<0\right>_{\mathbb{F}_{q}}}^{(j)}\prod_{i=1}^{r}(-1)^{\mathfrak{b}_{i}}q^{\binom{\mathfrak{b}_{i}}{2}}}_{=\,0}+\sum_{\tiny\begin{matrix}A\in\mathcal{A}^{\textup{cl}}\\\
A\leq
A^{\prime}\end{matrix}}B_{A}^{(j)}\prod_{i=1}^{r}(-1)^{\mathfrak{b}_{i}-\dim_{\mathbb{F}_{q}}\left(A^{(i)}\right)}q^{\binom{\mathfrak{b}_{i}-\dim_{\mathbb{F}_{q}}\left(A^{(i)}\right)}{2}}\right)$
$\displaystyle=\sum_{\begin{subarray}{c}\mathfrak{a}\in\mathfrak{N}^{\textup{cl}}\\\\[1.0pt]
\mathfrak{a}\leq_{\mathfrak{N}}\mathfrak{b}\end{subarray}}\prod_{i=1}^{r}(-1)^{\mathfrak{b}_{i}-\mathfrak{a}_{i}}q^{\binom{\mathfrak{b}_{i}-\mathfrak{a}_{i}}{2}}\sum_{A\in\mathcal{A}_{\mathfrak{a}}^{\textup{cl}}}B_{\mathfrak{a}}^{(j)}\left|\left\\{A\in\mathcal{A}_{\mathfrak{b}},A\leq
A^{\prime}\right\\}\right|$
$\displaystyle=\sum_{\begin{subarray}{c}\mathfrak{a}\in\mathfrak{N}^{\textup{cl}}\\\\[1.0pt]
\mathfrak{a}\leq_{\mathfrak{N}}\mathfrak{b}\end{subarray}}B_{\mathfrak{a}}^{(j)}(\mathcal{C})\prod_{i=1}^{r}(-1)^{\mathfrak{b}_{i}-\mathfrak{a}_{i}}q^{\binom{\mathfrak{b}_{i}-\mathfrak{a}_{i}}{2}}\prod_{i=1}^{r}\begin{bmatrix}{n_{i}-\mathfrak{a}_{i}}\\\
{\mathfrak{b}_{i}-\mathfrak{a}_{i}}\end{bmatrix}_{q}$

where the last equality follows again by Lemma [7, Lemma 4.9]. ∎

Clearly, the results derived so far in this section apply also for the
invariants related to $\mathcal{A}^{\textup{D}}$ and
$\mathcal{A}^{\textup{R}}$ since the latter are proper subclasses of
$\mathcal{A}^{\textup{cl}}$ as observed in [7]. Observe that, for any
$\mathfrak{a}\in\mathfrak{N}^{\textup{cl}}\cup\\{\mathfrak{o}\\}$, we have
$B_{\mathfrak{a}}^{\textup{D}}(\mathcal{C})=W_{\mathfrak{a}}^{\textup{D}}(\mathcal{C})=0$
if $\mathfrak{a}\notin\mathfrak{N}^{\textup{D}}$ and
$B_{\mathfrak{a}}^{\textup{R}}(\mathcal{C})=W_{\mathfrak{a}}^{\textup{R}}(\mathcal{C})=0$
if $\mathfrak{a}\notin\mathfrak{N}^{\textup{R}}$.

######  Notation 6.8.

For the rest of this section, we let P denotes the type of the family of
anticodes considered, in particular,
$\textup{P}\in\\{\textup{cl},\textup{D},\textup{R}\\}$.

The following result is the analogue of Proposition 2.28.

######  Theorem 6.9.

The following holds for all
$\mathfrak{a}\in\mathfrak{N}^{\textup{P}}\cup\\{\mathfrak{o}\\}$.

$B_{\mathfrak{a}}^{(\textup{P},j)}(\mathcal{C})=\begin{cases}0&\displaystyle\textup{
if }\llbracket\mathfrak{a}\rrbracket<t_{j}^{\textup{P}},\\\\[8.61108pt]
\displaystyle\begin{bmatrix}{k+\llbracket\mathfrak{a}\rrbracket-n}\\\
{j}\end{bmatrix}_{q}\prod_{i=1}^{r}\begin{bmatrix}{n_{i}}\\\
{\mathfrak{a}_{i}}\end{bmatrix}_{q}&\textup{ if
}\displaystyle\llbracket\mathfrak{a}\rrbracket>n-(s_{1}^{\textup{P}})^{\perp}.\end{cases}$

###### Proof.

An argument similar to the one in the proof of [7, Theorem 6.6] shows that

$B_{\mathfrak{a}}^{(\textup{P},j)}(\mathcal{C})=\begin{cases}0&\displaystyle\textup{
if }\llbracket\mathfrak{a}\rrbracket<t_{j}^{\textup{P}},\\\\[8.61108pt]
\displaystyle\begin{bmatrix}{k+\llbracket\mathfrak{a}\rrbracket-n}\\\
{j}\end{bmatrix}_{q}\left|\mathcal{A}_{\mathfrak{a}}^{\textup{P}}\right|&\textup{
if
}\displaystyle\llbracket\mathfrak{a}\rrbracket>n-(s_{1}^{\textup{P}})^{\perp}.\end{cases}$

and the statement follows from the fact that
$\mathcal{A}_{\mathfrak{a}}^{\textup{P}}$ is a product lattice. ∎

In what follows, we introduce a refinement of the normalized binomial moments
and a multivariate version of the tensor weight enumerator and tensor zeta
function with respect to $\mathcal{A}^{\textup{P}}$. We stress the fact that
such definitions strongly depends on the family of anticodes considered.

######  Definition 6.10.

For any $\mathfrak{a}\in\mathfrak{Z}^{\textup{P}}$, the $(\mathfrak{a},j)$-th
refined normalized tensor binomial moment of $\mathcal{C}$ with respect to
$\mathcal{A}^{\textup{P}}$ is

$b_{\mathfrak{a}}^{(\textup{P},j)}:=\begin{cases}0&\displaystyle\textup{ if
}\llbracket\mathfrak{a}\rrbracket<t_{j}^{\textup{P}},\\\\[8.61108pt]
\displaystyle\frac{B_{\mathfrak{a}}^{(\textup{P},j)(\mathcal{C})}}{\displaystyle\prod_{i=1}^{r}\begin{bmatrix}{n_{i}}\\\
{\mathfrak{a}_{i}}\end{bmatrix}_{q}}&\textup{ if }\displaystyle
t_{j}^{\textup{P}}\leq\llbracket\mathfrak{a}\rrbracket\leq
n-(s_{1}^{\textup{P}})^{\perp}\textup{ and
}\mathcal{Q}_{\textup{P}},\\\\[34.44434pt]
\displaystyle\begin{bmatrix}{k+\llbracket\mathfrak{a}\rrbracket-n}\\\
{j}\end{bmatrix}_{q}&\textup{ if
}\displaystyle\llbracket\mathfrak{a}\rrbracket>n-(s_{1}^{\textup{P}})^{\perp}\textup{
and }\mathcal{Q}_{\textup{P}},\\\\[21.52771pt] 0&\textup{ if
}\displaystyle\llbracket\mathfrak{a}\rrbracket>n-(s_{1}^{\textup{P}})^{\perp}\textup{
and }\neg\mathcal{Q}_{\textup{P}},\end{cases}$

where $\mathcal{Q}_{\textup{P}}$ is the predicate defined as follows

$\mathcal{Q}_{\textup{P}}:=\begin{cases}\mathfrak{a}\in\mathfrak{N}^{\textup{cl}}&\textup{
if }\mathfrak{a}\leq\mathfrak{n}\textup{ and
}\textup{P}=\textup{cl},\\\\[2.0pt] \mathfrak{n}<\mathfrak{a}&\textup{ if
}\mathfrak{n}<\mathfrak{a}\textup{ and }\textup{P}=\textup{cl},\\\\[2.0pt]
n\mid\llbracket\mathfrak{a}\rrbracket\,m\textup{ for some }m\in\Delta&\textup{
if }\textup{P}=\textup{D},\\\\[2.0pt]
n\mid\llbracket\mathfrak{a}\rrbracket\,n_{1}&\textup{ if
}\textup{P}=\textup{R}.\end{cases}$

Note that that in this case we did not shift the indices as in Definition 4.2.
Moreover, if $t_{j}^{\textup{P}}\leq\llbracket\mathfrak{a}\rrbracket\leq
n-(s_{1}^{\textup{P}})^{\perp}$ and
$\mathfrak{a}\notin\mathfrak{N}^{\textup{P}}$ then
$b_{\mathfrak{a}}^{(\textup{P},j)}=0$.

######  Definition 6.11.

The $j$-th refined tensor weight enumerator related to
$\mathcal{A}^{\textup{P}}$ is

$\displaystyle\mathcal{W}_{\mathcal{C}}^{(\textup{P},j)}(\boldsymbol{X},\boldsymbol{Y}):=\sum_{\mathfrak{a}\in\mathfrak{N}^{\textup{P}}}W_{\mathfrak{a}}^{(\textup{P},j)}(\mathcal{C})\prod_{i=1}^{r}X_{i}^{n_{i}-\mathfrak{a}_{i}}Y_{i}^{\mathfrak{a}_{i}}=\sum_{\begin{subarray}{c}\mathfrak{a}\in\mathfrak{N}^{\textup{P}}\\\\[1.0pt]
\llbracket\mathfrak{a}\rrbracket\geq
t_{j}^{\textup{P}}\end{subarray}}W_{\mathfrak{a}}^{(\textup{P},j)}(\mathcal{C})\prod_{i=1}^{r}X_{i}^{n_{i}-\mathfrak{a}_{i}}Y_{i}^{\mathfrak{a}_{i}}.$

It is not hard to check that the set
$\left\\{\prod_{i=1}^{r}B_{n_{i},\mathfrak{a}_{i}}(X_{i},Y_{i};q):\mathfrak{a}\in\mathfrak{N}^{\textup{P}}\right\\}$
of products of $q$-Bernstein polynomials is a $\mathbb{Q}$-basis of the space
of the refined generalized tensor weight enumerators related to
$\mathcal{A}^{\textup{P}}$. The following result computes the coefficients of
the multivariate polynomial
$\mathcal{W}_{\mathcal{C}}^{(\textup{P},j)}(\boldsymbol{X},\boldsymbol{Y})$
with respect such a basis.

######  Proposition 6.12.

The following holds.

$\mathcal{W}_{\mathcal{C}}^{(\textup{P},j)}(\boldsymbol{X},\boldsymbol{Y}):=\sum_{\begin{subarray}{c}\mathfrak{a}\in\mathfrak{N}^{\textup{P}}\\\
\llbracket\mathfrak{a}\rrbracket\geq
t_{j}^{\textup{P}}\end{subarray}}b_{\mathfrak{a}}^{(\textup{P},j)}(\mathcal{C})\prod_{i=1}^{r}B_{n_{i},\mathfrak{a}_{i}}(X_{i},Y_{i};q).$

###### Proof.

Applying the inversion formula of the $q$-Bernstein polynomial to the
definition of the refined generalized tensor weight enumerator, we get

$\displaystyle\mathcal{W}_{\mathcal{C}}^{(\textup{P},j)}(\boldsymbol{X},\boldsymbol{Y})$
$\displaystyle=\sum_{\begin{subarray}{c}\mathfrak{b}\in\mathfrak{N}^{\textup{P}}\\\
\llbracket\mathfrak{b}\rrbracket\geq
t_{j}^{\textup{P}}\end{subarray}}W_{\mathfrak{b}}^{(\textup{P},j)}(\mathcal{C})\prod_{i=1}^{r}X_{i}^{n_{i}-\mathfrak{b}_{i}}Y_{i}^{\mathfrak{b}_{i}}$
$\displaystyle=\sum_{\begin{subarray}{c}\mathfrak{b}\in\mathfrak{N}^{\textup{P}}\\\
\llbracket\mathfrak{b}\rrbracket\geq
t_{j}^{\textup{P}}\end{subarray}}W_{\mathfrak{b}}^{(\textup{P},j)}(\mathcal{C})\prod_{i=1}^{r}\begin{bmatrix}{n_{i}}\\\
{\mathfrak{b}_{i}}\end{bmatrix}_{q}^{-1}\sum_{\mathfrak{a}_{i}=\mathfrak{b}_{i}}^{n_{i}}\begin{bmatrix}{\mathfrak{a}_{i}}\\\
{\mathfrak{b}_{i}}\end{bmatrix}_{q}B_{n_{i},\mathfrak{a}_{i}}(X_{i},Y_{i};q)$
$\displaystyle=\sum_{\begin{subarray}{c}\mathfrak{b}\in\mathfrak{N}^{\textup{P}}\\\
\llbracket\mathfrak{b}\rrbracket\geq
t_{j}^{\textup{P}}\end{subarray}}W_{\mathfrak{b}}^{(\textup{P},j)}(\mathcal{C})\left(\prod_{i=1}^{r}\begin{bmatrix}{n_{i}}\\\
{\mathfrak{b}_{i}}\end{bmatrix}_{q}^{-1}\right)\sum_{\begin{subarray}{c}\mathfrak{a}\in\mathfrak{N}^{\textup{P}}\\\
\mathfrak{b}\leq\mathfrak{a}\end{subarray}}\prod_{i=1}^{r}\begin{bmatrix}{\mathfrak{a}_{i}}\\\
{\mathfrak{b}_{i}}\end{bmatrix}_{q}B_{n_{i},\mathfrak{a}_{i}}(X_{i},Y_{i};q)$
$\displaystyle=\sum_{\begin{subarray}{c}\mathfrak{a}\in\mathfrak{N}^{\textup{P}}\\\
\llbracket\mathfrak{a}\rrbracket\geq
t_{j}^{\textup{P}}\end{subarray}}\left(\prod_{i=1}^{r}B_{n_{i},\mathfrak{a}_{i}}(X_{i},Y_{i};q)\right)\sum_{\begin{subarray}{c}\mathfrak{a}\in\mathfrak{N}^{\textup{P}}\\\
\mathfrak{b}\leq\mathfrak{a}\\\ \llbracket\mathfrak{b}\rrbracket\geq
t_{j}^{\textup{P}}\end{subarray}}W_{\mathfrak{b}}^{(\textup{P},j)}(\mathcal{C})\prod_{i=1}^{r}\begin{bmatrix}{n_{i}}\\\
{\mathfrak{b}_{i}}\end{bmatrix}_{q}^{-1}\begin{bmatrix}{\mathfrak{a}_{i}}\\\
{\mathfrak{b}_{i}}\end{bmatrix}_{q}$
$\displaystyle=\sum_{\begin{subarray}{c}\mathfrak{a}\in\mathfrak{N}^{\textup{P}}\\\
\llbracket\mathfrak{a}\rrbracket\geq
t_{j}^{\textup{P}}\end{subarray}}\left(\prod_{i=1}^{r}B_{n_{i},\mathfrak{a}_{i}}(X_{i},Y_{i};q)\begin{bmatrix}{n_{i}}\\\
{\mathfrak{a}_{i}}\end{bmatrix}_{q}^{-1}\right)\sum_{\begin{subarray}{c}\mathfrak{a}\in\mathfrak{N}^{\textup{P}}\\\
\mathfrak{b}\leq\mathfrak{a}\\\ \llbracket\mathfrak{b}\rrbracket\geq
t_{j}^{\textup{P}}\end{subarray}}W_{\mathfrak{b}}^{(\textup{cl},j)}(\mathcal{C})\prod_{i=1}^{r}\begin{bmatrix}{n_{i}-\mathfrak{b}_{i}}\\\
{\mathfrak{a}_{i}-\mathfrak{b}_{i}}\end{bmatrix}_{q}$
$\displaystyle=\sum_{\begin{subarray}{c}\mathfrak{a}\in\mathfrak{N}^{\textup{P}}\\\
\llbracket\mathfrak{a}\rrbracket\geq
t_{j}^{\textup{P}}\end{subarray}}b_{\mathfrak{a}}^{(\textup{cl},j)}(\mathcal{C})\prod_{i=1}^{r}B_{n_{i},\mathfrak{a}_{i}}(X_{i},Y_{i};q)$

∎

######  Definition 6.13.

The $j$-th refined tensor zeta function related to $\mathcal{A}^{\textup{P}}$
of $\mathcal{C}$ is

$Z_{\mathcal{C}}^{(\textup{P},j)}(\boldsymbol{T}):=\sum_{\begin{subarray}{c}\mathfrak{a}\in\mathfrak{Z}^{\textup{P}}\\\
\mathcal{Q}_{\textup{P}}\end{subarray}}b_{\mathfrak{a}}^{(\textup{P},j)}(\mathcal{C})\prod_{i=1}^{r}T_{i}^{\mathfrak{a}_{i}}=\sum_{\begin{subarray}{c}\mathfrak{a}\in\mathfrak{Z}^{\textup{P}}\\\
{\llbracket\mathfrak{a}\rrbracket}\geq t_{j}^{\textup{P}}\\\
\mathcal{Q}_{\textup{P}}\end{subarray}}b_{\mathfrak{a}}^{(\textup{P},j)}(\mathcal{C})\prod_{i=1}^{r}T_{i}^{\mathfrak{a}_{i}}.$

The following extends Proposition 5.4.

######  Proposition 6.14.

Define the function

$\varphi_{\mathfrak{a}}^{\textup{P}}(\boldsymbol{X},\boldsymbol{Y},\boldsymbol{T}):=\sum_{\begin{subarray}{c}\mathfrak{b}\in\mathfrak{N}^{\textup{P}}\\\
\mathfrak{b}\leq\mathfrak{a}\end{subarray}}\prod_{i=1}^{r}B_{a_{i},\mathfrak{b}_{i}}(X_{i},Y_{i};q)T_{i}^{a_{i}-\mathfrak{b}_{i}}.$

We have that
$\mathcal{W}_{\mathcal{C}}^{(\textup{P},j)}(\boldsymbol{X},\boldsymbol{Y})$ is
the coefficient of $\prod_{i=1}^{r}T_{i}^{n_{i}}$ in the expression
$Z_{\mathcal{C}}^{(\textup{P},j)}(\boldsymbol{T})\varphi_{\mathfrak{n}}^{\textup{P}}(\boldsymbol{X},\boldsymbol{Y},\boldsymbol{T})$.

###### Proof.

The following hold.

$\displaystyle
Z_{\mathcal{C}}^{(\textup{P},j)}(\boldsymbol{T})\varphi_{\mathfrak{n}}^{\textup{P}}(\boldsymbol{X},\boldsymbol{Y},\boldsymbol{T})$
$\displaystyle=\left(\sum_{\begin{subarray}{c}\mathfrak{a}\in\mathfrak{Z}^{\textup{P}}\\\
{\llbracket\mathfrak{a}\rrbracket}\geq t_{j}^{\textup{cl}}\\\
\mathcal{Q}_{\textup{P}}\end{subarray}}b_{\mathfrak{a}}^{(\textup{P},j)}(\mathcal{C})\prod_{i=1}^{r}T_{i}^{\mathfrak{a}_{i}}\right)\left(\sum_{\mathfrak{b}\in\mathfrak{N}^{\textup{P}}}\prod_{i=1}^{r}B_{n_{i},\mathfrak{b}_{i}}(X_{i},Y_{i};q)T_{i}^{n_{i}-\mathfrak{b}_{i}}\right)$
$\displaystyle=\sum_{\begin{subarray}{c}\mathfrak{a}\in\mathfrak{Z}^{\textup{P}}\\\
{\llbracket\mathfrak{a}\rrbracket}\geq t_{j}^{\textup{P}}\\\
\mathcal{Q}_{\textup{P}}\end{subarray}}\sum_{\mathfrak{b}\in\mathfrak{N}^{\textup{P}}}b_{\mathfrak{a}}^{(\textup{P},j)}(\mathcal{C})\prod_{i=1}^{r}B_{n_{i},\mathfrak{b}_{i}}(X_{i},Y_{i};q)\prod_{i=1}^{r}T_{i}^{n_{i}-\mathfrak{b}_{i}+\mathfrak{a}_{i}}$
$\displaystyle\equiv\sum_{\begin{subarray}{c}\mathfrak{b}\in\mathfrak{N}^{\textup{P}}\\\
{\llbracket\mathfrak{b}\rrbracket}\geq
t_{j}^{\textup{P}}\end{subarray}}\prod_{i=1}^{r}T_{i}^{\mathfrak{b}_{i}}\sum_{\begin{subarray}{c}\mathfrak{a}\in\mathfrak{N}^{\textup{P}}\\\
\mathfrak{a}\leq\mathfrak{b}\\\ \llbracket\mathfrak{a}\rrbracket\geq
t_{j}^{\textup{P}}\end{subarray}}b_{\mathfrak{a}}^{(\textup{cl},j)}\prod_{i=1}^{r}B_{n_{i},n_{i}-\mathfrak{b}_{i}+\mathfrak{a}_{i}}(X_{i},Y_{i};q)\mod\left<T_{1}^{n_{1}+1},\ldots,T_{r}^{n_{r}+1}\right>_{\mathbb{Q}}.$

The result follows by Proposition 6.12. ∎

######  Example 6.15.

Let $\mathcal{C}$ be the code in Example 3.7 and one can check that its
generalized tensor weights with respect to $\mathcal{A}^{\textup{cl}}$ are

$\begin{array}[]{lll}t_{1}^{\textup{cl}}(\mathcal{C})=4,&\qquad
t_{2}^{\textup{cl}}(\mathcal{C})=9,&\qquad
t_{3}^{\textup{cl}}(\mathcal{C})=12,\\\\[8.0pt]
t_{4}^{\textup{cl}}(\mathcal{C})=t_{5}^{\textup{cl}}(\mathcal{C})=16,&\qquad
t_{6}^{\textup{cl}}(\mathcal{C})=t_{7}^{\textup{cl}}(\mathcal{C})=18,&\qquad
t_{8}^{\textup{cl}}(\mathcal{C})=\cdots=t_{1}3^{\textup{cl}}(\mathcal{C})=24.\end{array}$

Moreover, the following hold.

$\displaystyle\varphi_{(2,3,4)}^{\textup{cl}}(\boldsymbol{X},\boldsymbol{Y},\boldsymbol{T})=$
$\displaystyle\,Y_{1}^{2}Y_{2}^{3}Y_{3}^{4}+(3X_{1}Y_{1}Y_{2}^{3}Y_{3}^{4}-3Y_{1}^{2}Y_{2}^{3}Y_{3}^{4})T_{1}$
$\displaystyle+(7X_{2}Y_{1}^{2}Y_{2}^{2}Y_{3}^{4}-7Y_{1}^{2}Y_{2}^{3}Y_{3}^{4})T_{2}+(15X_{3}Y_{1}^{2}Y_{2}^{3}Y_{3}^{3}-15Y_{1}^{2}Y_{2}^{3}Y_{3}^{4})T_{3}$
$\displaystyle+(21X_{1}X_{2}Y_{1}Y_{2}^{2}Y_{3}^{4}-21X_{1}Y_{1}Y_{2}^{3}Y_{3}^{4}-21X_{2}Y_{1}^{2}Y_{2}^{2}Y_{3}^{4}+21Y_{1}^{2}Y_{2}^{3}Y_{3}^{4})T_{1}T_{2}$
$\displaystyle+(7X_{2}^{2}Y_{1}^{2}Y_{2}Y_{3}^{4}-21X_{2}Y_{1}^{2}Y_{2}^{2}Y_{3}^{4}+14Y_{1}^{2}Y_{2}^{3}Y_{3}^{4})T_{2}^{2}+\cdots$
$\displaystyle Z_{\mathcal{C}}^{(\textup{cl},1)}(\boldsymbol{T})=$
$\displaystyle\,\frac{4}{735}T_{1}T_{2}^{2}T_{3}^{2}+\frac{4}{105}T_{1}T_{2}^{2}T_{3}^{3}+\frac{4}{21}T_{1}T_{2}^{2}T_{3}^{4}+\frac{4}{105}T_{1}T_{2}^{3}T_{3}^{2}+\frac{17}{45}T_{1}T_{2}^{3}T_{3}^{3}$
$\displaystyle+3T_{1}T_{2}^{3}T_{3}^{4}+\frac{1}{245}T_{1}^{2}T_{2}T_{3}^{2}+\frac{1}{35}T_{1}^{2}T_{2}T_{3}^{3}+\frac{1}{7}T_{1}^{2}T_{2}T_{3}^{4}+\cdots$
$\displaystyle\mathcal{W}_{\mathcal{C}}^{(\textup{cl},1)}(\boldsymbol{X},\boldsymbol{Y})=$
$\displaystyle\,6374\,Y_{1}^{2}Y_{2}^{3}Y_{3}^{4}+1556\,X_{3}Y_{1}^{2}Y_{2}^{3}Y_{3}^{3}+41\,X_{3}^{2}Y_{1}^{2}Y_{2}^{3}Y_{3}^{2}+62\,X_{2}Y_{1}^{2}Y_{2}^{2}Y_{3}^{4}$
$\displaystyle+121\,X_{2}X_{3}Y_{1}^{2}Y_{2}^{2}Y_{3}^{3}+26\,X_{2}X_{3}^{2}Y_{1}^{2}Y_{2}^{2}Y_{3}^{2}+X_{2}X_{3}^{3}Y_{1}^{2}Y_{2}^{2}Y_{3}$
$\displaystyle+X_{2}^{2}X_{3}^{2}Y_{1}^{2}Y_{2}Y_{3}^{2}+5X_{1}X_{3}Y_{1}Y_{2}^{3}Y_{3}^{3}+4X_{1}X_{2}X_{3}^{2}Y_{1}Y_{2}^{2}Y_{3}^{2}.$

Therefore,
$\mathcal{W}_{\mathcal{C}}^{(\textup{cl},1)}(\boldsymbol{X},\boldsymbol{Y})$
is the coefficient of $T_{1}^{2}T_{2}^{3}T_{3}^{4}$ in the expression
$Z_{\mathcal{C}}^{(\textup{cl},1)}(\boldsymbol{T})\varphi_{(2,3,4)}^{\textup{cl}}(\boldsymbol{X},\boldsymbol{Y},\boldsymbol{T})$
as predicted by Proposition 6.14.

We now establishing the MacWilliams-type identity for the refined binomial
moments related to $\mathcal{A}^{\textup{D}}$ and $\mathcal{A}^{\textup{R}}$.
We need the following preparatory lemma which can be seen as the analogue of
[7, Theorem 6.7]. We omit the proof as it is similar to the one of [7, Theorem
6.7].

######  Lemma 6.16.

The following hold for any
$\mathfrak{a}\in\mathfrak{N}^{\textup{P}}\cup\\{\mathfrak{o}\\}$.

$B_{\mathfrak{a}}^{(\textup{P},j)}(\mathcal{C})=\sum_{s=0}^{j}q^{s(k+\llbracket\mathfrak{a}\rrbracket-
n-j+s)}\begin{bmatrix}{k+\llbracket\mathfrak{a}\rrbracket-n}\\\
{j-s}\end{bmatrix}_{q}\sum_{A\in\mathcal{A}_{\mathfrak{a}}^{\textup{P}}}\begin{bmatrix}{\dim_{\mathbb{F}_{q}}\left(\mathcal{C}^{\perp}\cap
A^{\perp}\right)}\\\ {s}\end{bmatrix}_{q}.$

######  Theorem 6.17.

The following hold.

  1. (1)

$\displaystyle
B_{\mathfrak{a}}^{(\textup{D},j)}(\mathcal{C})=\sum_{s=0}^{j}q^{s(k+\llbracket\mathfrak{a}\rrbracket-
n-j+s)}\begin{bmatrix}{k+\llbracket\mathfrak{a}\rrbracket-n}\\\
{j-s}\end{bmatrix}_{q}B_{\overline{\mathfrak{a}}}^{(\textup{D},s)}(\mathcal{C}^{\perp})$
for all $\mathfrak{N}^{\textup{D}}\cup\\{\mathfrak{o}\\}$,

  2. (2)

$\displaystyle
B_{\mathfrak{a}}^{(\textup{R},j)}(\mathcal{C})=\sum_{s=0}^{j}q^{s(k+\llbracket\mathfrak{a}\rrbracket-
n-j+s)}\begin{bmatrix}{k+\llbracket\mathfrak{a}\rrbracket-n}\\\
{j-s}\end{bmatrix}_{q}B_{\overline{\mathfrak{a}}}^{(\textup{R},s)}(\mathcal{C}^{\perp})$
for all $\mathfrak{N}^{\textup{R}}\cup\\{\mathfrak{o}\\}$

where $\overline{\mathfrak{a}}=\mathfrak{o}$ if $\mathfrak{a}=\mathfrak{n}$
and $\overline{\mathfrak{a}}=\mathfrak{n}-(\mathfrak{a}\mod\mathfrak{n})$
otherwise.

###### Proof.

We only prove ((1)) as the proof of ((2)) is similar. By Lemma 6.16, we have

$B_{\mathfrak{a}}^{(D,j)}(\mathcal{C})=\sum_{s=0}^{j}q^{s(k+\llbracket\mathfrak{a}\rrbracket-
n-j+s)}\begin{bmatrix}{k+\llbracket\mathfrak{a}\rrbracket-n}\\\
{j-s}\end{bmatrix}_{q}\sum_{A\in\mathcal{A}_{\mathfrak{a}}}\begin{bmatrix}{\dim_{\mathbb{F}_{q}}\left(\mathcal{C}^{\perp}\cap
A^{\perp}\right)}\\\ {s}\end{bmatrix}_{q}$

for any $\mathfrak{a}\in\mathfrak{N}^{\textup{D}}\cup\\{\mathfrak{o}\\}$,
since $\mathcal{A}^{\textup{D}}\subseteq\mathcal{A}^{\textup{cl}}$ and
$\mathfrak{N}^{\textup{D}}\subseteq\mathfrak{N}^{\textup{cl}}$. Recall that
$\mathcal{A}^{\textup{D}}$ is closed under duality, by Proposition 2.20, and
it is not hard to see that for any
$A\in\mathcal{A}_{\mathfrak{a}}^{\textup{D}}$ we have
$\textup{dd}(A^{\perp})=\overline{\mathfrak{a}}$ where
$\overline{\mathfrak{a}}$ is defined as in the statement. Hence, the map
$:\mathcal{A}_{\mathfrak{a}}^{\textup{D}}\longrightarrow\mathcal{A}_{\overline{\mathfrak{a}}}^{\textup{D}}:A\longmapsto
A^{\perp}$ is an isomorphism. This implies

$\sum_{A\in\mathcal{A}_{\mathfrak{a}}}\begin{bmatrix}{\dim_{\mathbb{F}_{q}}\left(\mathcal{C}^{\perp}\cap
A^{\perp}\right)}\\\
{s}\end{bmatrix}_{q}=\sum_{A\in\mathcal{A}_{\overline{\mathfrak{a}}}}\begin{bmatrix}{\dim_{\mathbb{F}_{q}}\left(\mathcal{C}^{\perp}\cap
A\right)}\\\
{s}\end{bmatrix}_{q}=B_{\overline{\mathfrak{a}}}^{(\textup{D},s)}.$

for all $s\in[j]\cup\\{0\\}$. The statement follows. ∎

We conclude this section providing the analogue of Theorem 5.6 for the refined
zeta functions associated to Ravagnani-type anticodes.

######  Theorem 6.18.

For any $i\in\\{1,\ldots,|\delta_{1}|\\}$, there exist unique polynomial
$P_{\mathcal{C},i}^{(\textup{R},j)}$ such that
$Z_{\mathcal{C}}^{(\textup{R},j)}(\boldsymbol{T})$ is equal to

$\left(\prod_{\ell=1}^{|\delta_{1}|}\prod_{s=0}^{j}\left(1-q^{s\frac{n}{n_{1}}}T_{\ell}\right)\right)^{-1}\sum_{i=1}^{\delta_{1}}P_{\mathcal{C},i}^{(\textup{R},j)}\left(\prod_{\begin{subarray}{c}\ell=1\\\
\ell\neq
i\end{subarray}}^{|\delta_{1}|}\prod_{s=0}^{j}\left(1-q^{s\frac{n}{n_{1}}}T_{\ell}\right)\right)-(|\delta_{1}|-1)b_{\mathfrak{n}}^{(\textup{R},j)}(\mathcal{C})\prod_{\ell=1}^{r}T_{\ell}^{n_{\ell}}.$

In particular, we have

$P_{\mathcal{C},i}^{(\textup{R},j)}(\boldsymbol{T})=\left(\sum_{a=0}^{b}p_{\mathfrak{a}_{i}(a)}^{(\textup{R},j)}(\mathcal{C})T_{i}^{a}\right)\prod_{\begin{subarray}{c}\ell=1\\\
\ell\neq i\end{subarray}}^{r}T_{\ell}^{n_{\ell}}$

where $b:=n_{1}-\frac{n_{1}}{n}t_{j}^{\textup{R}}+j+1$, $\mathfrak{a}_{i}(a)$
is the element of $\mathfrak{Z}^{\textup{R}}$ with $a$ in position $i$ and

$p_{\mathfrak{a}_{i}(a)}^{(\textup{R},j)}(\mathcal{C})=\sum_{s=0}^{j+1}\begin{bmatrix}{j+1}\\\
{s}\end{bmatrix}_{q^{\frac{n}{n_{1}}}}(-1)^{s}q^{\frac{n}{n_{1}}\binom{s}{2}}b_{\mathfrak{a}_{i}(a-s)}^{(\textup{R},j)}(\mathcal{C}).$
(6)

###### Proof.

Define, for any $i\in\\{1,\ldots,|\delta_{1}|\\}$, the formal power series

$Z_{\mathcal{C},i}^{(\textup{R},j)}(\boldsymbol{T}):=\left(\sum_{a\geq
0}b_{\mathfrak{a}_{i}(a)}^{(\textup{R},j)}(\mathcal{C})T_{i}^{a}\right)\prod_{\begin{subarray}{c}\ell=1\\\
\ell\neq i\end{subarray}}^{r}T_{\ell}^{n_{\ell}}.$

One can check that by definition of Ravagnani-type anticodes and the
underlying lattice of dimension distribution we have

$Z_{\mathcal{C}}^{(\textup{R},j)}(\boldsymbol{T})=\sum_{i\in\\{1,\ldots,|\delta_{1}|\\}}Z_{\mathcal{C},i}^{(\textup{R},j)}(\boldsymbol{T})-(|\delta_{1}|-1)b_{\mathfrak{n}}^{(\textup{R},j)}(\mathcal{C})\prod_{\ell=1}^{r}T_{\ell}^{n_{\ell}}.$
(7)

The remainder of the proof is similar to the one of Theorem 5.6. In
particular, applying Lemma 2.31 to the power series

$P_{\mathcal{C},i}^{(\textup{R},j)}(\boldsymbol{T}):=Z_{\mathcal{C}}^{(\textup{R},j)}(\boldsymbol{T})\prod_{s=0}^{j}\left(1-q^{s\frac{n}{n_{1}}}T_{i}\right)$
(8)

gives the coefficients $p_{\mathfrak{a}_{i}(a)}^{(\textup{R},j)}(\mathcal{C})$
as in (6). Moreover, a standard computation using Lemma 2.31 shows that

$\sum_{s=0}^{j+1}\begin{bmatrix}{j+1}\\\
{s}\end{bmatrix}_{q^{\frac{n}{n_{1}}}}(-1)^{s}q^{\frac{n}{n_{1}}\binom{s}{2}}b_{\mathfrak{a}_{i}(a-s)}^{(\textup{R},j)}(\mathcal{C})=0$

for all $a\notin\\{0,\ldots,n_{1}-\frac{n_{1}}{n}t_{j}^{\textup{R}}+j+1\\}$.
The statement follows by combining (7) and (8). ∎

######  Example 6.19.

Let $\mathcal{C}$ be the code as in Example 3.13. We have

$\displaystyle Z_{\mathcal{C}}^{(\textup{R},1)}=$
$\displaystyle\,4095T_{1}^{3}T_{2}^{3}T_{3}^{4}+16777215(T_{1}^{4}T_{2}^{3}T_{3}^{4}+T_{1}^{3}T_{2}^{4}T_{3}^{4})$
$\displaystyle\,+68719476735(T_{1}^{5}T_{2}^{3}T_{3}^{4}+T_{1}^{3}T_{2}^{5}T_{3}^{4})+\cdots$
$\displaystyle Z_{\mathcal{C},1}^{(\textup{R},1)}=$
$\displaystyle\,4095T_{1}^{3}T_{2}^{3}T_{3}^{4}+16777215T_{1}^{4}T_{2}^{3}T_{3}^{4}+68719476735T_{1}^{5}T_{2}^{3}T_{3}^{4}+\cdots$
$\displaystyle Z_{\mathcal{C},2}^{(\textup{R},1)}=$
$\displaystyle\,4095T_{1}^{3}T_{2}^{3}T_{3}^{4}+16777215T_{1}^{3}T_{2}^{4}T_{3}^{4}+68719476735T_{1}^{3}T_{2}^{5}T_{3}^{4}+\cdots$

and therefore

$Z_{\mathcal{C}}^{(\textup{R},1)}=Z_{\mathcal{C}_{1}}^{(\textup{R},1)}+Z_{\mathcal{C}_{2}}^{(\textup{R},1)}-4095T_{1}^{3}T_{2}^{3}T_{3}^{4}.$

Moreover, define

$P_{\mathcal{C},1}^{(\textup{R},1)}:=4095T_{1}^{3}T_{2}^{3}T_{3}^{4}\qquad\textup{
and }\qquad
P_{\mathcal{C},2}^{(\textup{R},1)}:=4095T_{1}^{3}T_{2}^{3}T_{3}^{4},$

and one can check that

$Z_{\mathcal{C}}^{(\textup{R},1)}=\frac{P_{\mathcal{C},1}^{(\textup{R},1)}}{(1-T_{1})(1-q^{12}T_{1})}+\frac{P_{\mathcal{C},3}^{(\textup{R},1)}}{(1-T_{1})(1-q^{12}T_{1})}-4095T_{1}^{3}T_{2}^{3}T_{3}^{4}$

as predicted by Theorem 6.18.

##  7 Connections

In this section we show an application of theory developed in the previous
sections. We derive new connections between the tensor weights associated to
$\mathcal{A}^{\textup{D}}$ and $\mathcal{A}^{\textup{R}}$ which establish
relations between the latter and the refined tensor zeta functions. An
inequality involving the $j$-th tensor weight related to
$\mathcal{A}^{\textup{R}}$ is derived in the next result. As immediate
consequence of this result we have a generalization of [5, Theorem 4]. We
provide a more concise proof using the notion of normalized tensor binomial
moments related to $\mathcal{A}^{\textup{R}}$ (see Definition 4.2).

######  Theorem 7.1.

If $t_{j}^{\textup{R}}<n$ then

$t_{j}^{\textup{R}}\leq\frac{n}{n_{1}}\log_{q}\left(\frac{b_{\frac{n}{n_{1}}}^{(j)}}{b_{0}^{(j)}}(q-1)+1\right)-\frac{n}{n_{1}}.$

###### Proof.

For ease of notation, throughout this proof we write $W_{b}^{(j)}$ and
$B_{b}^{(j)}$ instead of $W_{b}^{(\textup{R},j)}(\mathcal{C})$ and
$B_{b}^{(\textup{R},j)}(\mathcal{C})$, for all $b\in[n]\cap\\{0\\}$, and
$b_{a}^{(j)}$ and $t_{j}$ instead of $b_{a}^{(\textup{R},j)}(\mathcal{C})$ and
$t_{j}^{\textup{R}}$, for all $a\in\mathbb{Z}$. Proposition 5.2 and the fact
that $B_{a}^{(j)}=0$, for all $a\in\\{0,\ldots,t_{j}^{\textup{R}}-1\\}$ and
$a\in\\{t_{j}^{\textup{R}},\ldots,n\\}$ such that $n\nmid an_{i}$, imply

$\displaystyle W_{t_{j}^{\textup{R}}+\frac{n}{n_{1}}}^{(j)}$
$\displaystyle=B_{t_{j}^{\textup{R}}+\frac{n}{n_{1}}}^{(j)}|\delta_{1}|-B_{t_{j}^{\textup{R}}}^{(j)}|\delta_{1}|\begin{bmatrix}{n_{1}-t_{j}\frac{n_{1}}{n}}\\\
{1}\end{bmatrix}_{q}$
$\displaystyle=b_{\frac{n}{n_{1}}}^{(j)}|\delta_{1}|^{2}\begin{bmatrix}{n_{1}}\\\
{t_{j}\frac{n_{1}}{n}+1}\end{bmatrix}_{q}-b_{0}^{(j)}|\delta_{1}|^{2}\begin{bmatrix}{n_{1}-t_{j}\frac{n_{1}}{n}}\\\
{1}\end{bmatrix}_{q}\begin{bmatrix}{n_{1}}\\\
{t_{j}\frac{n_{1}}{n}}\end{bmatrix}_{q}$

where the last equality follows from Definition 4.2. Observe that
$W_{t_{j}^{\textup{R}}+\frac{n}{n_{1}}}^{(j)}\geq 0$ and $|\delta_{1}|\geq 0$
and we have

$\displaystyle 0$ $\displaystyle\leq
b_{\frac{n}{n_{1}}}^{(j)}\begin{bmatrix}{n_{1}}\\\
{t_{j}\frac{n_{1}}{n}+1}\end{bmatrix}_{q}-b_{0}^{(j)}\begin{bmatrix}{n_{1}-t_{j}^{\textup{R}}\frac{n_{1}}{n}}\\\
{1}\end{bmatrix}_{q}\begin{bmatrix}{n_{1}}\\\
{t_{j}\frac{n_{1}}{n}}\end{bmatrix}_{q}$
$\displaystyle=b_{\frac{n}{n_{1}}}^{(j)}\frac{q^{n_{1}-t_{j}\frac{n_{1}}{n}}-1}{q^{t_{j}\frac{n_{1}}{n}+1}-1}\begin{bmatrix}{n_{1}}\\\
{t_{j}\frac{n_{1}}{n}}\end{bmatrix}_{q}-b_{0}^{(j)}\begin{bmatrix}{n_{1}-t_{j}\frac{n_{1}}{n}}\\\
{1}\end{bmatrix}_{q}\begin{bmatrix}{n_{1}}\\\
{t_{j}\frac{n_{1}}{n}}\end{bmatrix}_{q}.$

Therefore, since $\begin{bmatrix}{n_{1}}\\\
{t_{j}\frac{n_{1}}{n}}\end{bmatrix}_{q}>0$ and $b_{0}^{(j)}>0$, we get

$0\leq\frac{b_{\frac{n}{n_{1}}}^{(j)}}{b_{0}^{(j)}}\cdot\frac{q^{n_{1}-t_{j}\frac{n_{1}}{n}}-1}{q^{t_{j}^{\textup{R}}\frac{n_{1}}{n}+1}-1}-\begin{bmatrix}{n_{1}-t_{j}\frac{n_{1}}{n}}\\\
{1}\end{bmatrix}_{q}=\frac{b_{\frac{n}{n_{1}}}^{(j)}}{b_{0}^{(j)}}\cdot\frac{q^{n_{1}-t_{j}\frac{n_{1}}{n}}-1}{q^{t_{j}\frac{n_{1}}{n}+1}-1}-\frac{q^{n_{1}-t_{j}\frac{n_{1}}{n}}-1}{q-1}$
(9)

which implies

$q^{t_{j}\frac{n_{1}}{n}+1}\leq\frac{b_{\frac{n}{n_{1}}}^{(j)}}{b_{0}^{(j)}}(q-1)+1.$

The statement follows. ∎

The following is a generalization of [5, Theorem 4].

######  Corollary 7.2.

Let $\alpha$ be the negative of the sum of the reciprocal roots of the $j$-th
generalized tensor zeta polynomial $P_{\mathcal{C}}^{(j)}(T)$. If
$t_{j}^{\textup{R}}<n$ then

$t_{j}^{\textup{R}}\leq\frac{n}{n_{1}}\log_{q}\left(\left(\alpha+\begin{bmatrix}{j+1}\\\
{1}\end{bmatrix}_{q^{\frac{n}{n_{1}}}}\right)(q-1)+1\right)-\frac{n}{n_{1}}.$

###### Proof.

For ease of notation, throughout this proof we write $b_{a}^{(j)}$ and
$p_{a}^{(j)}$ instead of $b_{a}^{(\textup{R},j)}(\mathcal{C})$ and
$p_{a}^{(\textup{R},j)}(\mathcal{C})$. As a consequence of Theorem 5.6, we
have

$b_{0}^{(j)}=p_{0}^{(j)}\qquad\textup{ and }\qquad
b_{\frac{n}{n_{1}}}^{(j)}=p_{\frac{n}{n_{1}}}^{(j)}+\begin{bmatrix}{j+1}\\\
{1}\end{bmatrix}_{q^{\frac{n}{n_{1}}}}b_{0}^{(j)}=\alpha\,p_{0}^{(j)}+\begin{bmatrix}{j+1}\\\
{1}\end{bmatrix}_{q^{\frac{n}{n_{1}}}}p_{0}^{(j)}$

where the last equality follows from the fact that
$P_{\mathcal{C}}(T)^{(j)}=p_{0}^{(j)}(1+\alpha T+\cdots)$. In particular, we
have

$\frac{b_{\frac{n}{n_{1}}}^{(j)}}{b_{0}^{(j)}}=\frac{\alpha\,p_{0}^{(j)}+\begin{bmatrix}{j+1}\\\
{1}\end{bmatrix}_{q^{\frac{n}{n_{1}}}}p_{0}^{(j)}}{p_{0}^{(j)}}=\alpha+\begin{bmatrix}{j+1}\\\
{1}\end{bmatrix}_{q^{\frac{n}{n_{1}}}}.$ (10)

The statement follows by substituting (10) into the bound of Theorem 7.1. ∎

The following result extends Proposition 3.1.

######  Proposition 7.3.

The following hold.

  1. (1)

$t_{j}\geq j$.

  2. (2)

$t_{j}^{\textup{D}}\leq\min\left\\{n-\frac{n}{n_{i}}\left\lfloor\frac{n_{i}}{n}(k-j)\right\rfloor:i\in[r]\right\\}$.

###### Proof.

Clearly, if $A\in\mathcal{A}$ is such that
$\dim_{\mathbb{F}_{q}}\left(A\cap\mathcal{C}\right)\geq j$ then
$\dim_{\mathbb{F}_{q}}\left(A\right)\geq j$ which implies the first part of
the statement. It is not hard to check that an argument similar to the one in
the proof of Proposition 3.1((1)) implies

$\min\left\\{\llbracket\textup{dd}(A)\rrbracket:A\in\mathcal{A}^{\textup{D}}\mid\textup{dd}(A)\in\mathfrak{N}_{i}^{\textup{D}}\textup{
and }\textup{dd}(A\cap\mathcal{C})\geq j\right\\}\leq
n-\frac{n}{n_{i}}\left\lfloor\frac{n_{i}}{n}(k-j)\right\rfloor$

for all $i\in[r]$. Therefore, by Definition 2.22 we get

$\displaystyle t_{j}^{\textup{D}}=$
$\displaystyle\min\\{\llbracket\textup{dd}(A)\rrbracket:A\in\mathcal{A}^{\textup{D}}\mid\textup{dd}(A\cap\mathcal{C})\geq
j\\}$
$\displaystyle=\min\bigcup_{i=1}^{r}\left\\{\llbracket\textup{dd}(A)\rrbracket:A\in\mathcal{A}^{\textup{D}}\mid\textup{dd}(A)\in\mathfrak{N}_{i}^{\textup{D}}\textup{
and }\textup{dd}(A\cap\mathcal{C})\geq j\right\\}$
$\displaystyle\leq\min\left\\{n-\frac{n}{n_{i}}\left\lfloor\frac{n_{i}}{n}(k-j)\right\rfloor:i\in[r]\right\\}.$

This concludes the proof. ∎

We conclude this section by deriving bounds for the tensor weight related to
$\mathcal{A}^{\textup{D}}$ which is similar to the one in Theorem 7.1.

######  Theorem 7.4.

For all $i\in[r]$, we let $\mathfrak{e}^{(i)}$ be the element of
$\mathfrak{Z}^{\textup{cl}}$ with $1$ in position $i$ and zeros elsewhere and
$\mathfrak{c}^{(j,i)}$ to be the minimal element $\mathfrak{a}$ of
$\mathfrak{N}_{i}^{\textup{D}}$ such that
$\llbracket\mathfrak{a}\rrbracket\geq t_{j}^{\textup{D}}$, that is

$\mathfrak{c}^{(j,i)}:=\bigwedge\\{\mathfrak{a}\in\mathfrak{N}_{i}^{\textup{D}}:\llbracket\mathfrak{a}\rrbracket\geq
t_{j}^{\textup{D}}\\}.$

We have

$t_{j}^{\textup{D}}\leq\min\left\\{\frac{n}{n_{i}}\log_{q}\left(\frac{b_{\mathfrak{c}^{(j,i)}+\mathfrak{e}^{(i)}}}{b_{\mathfrak{c}^{(j,i)}}}(q-1)+1\right)-\frac{n}{n_{i}}:i\in[r]\mid\mathfrak{c}^{(j,i)}<\mathfrak{n}\right\\}.$

###### Proof.

For the ease of notation, throughout this proof we write
$W_{\mathfrak{b}}^{(j)}$ and $B_{\mathfrak{b}}^{(j)}$ instead of
$W_{\mathfrak{b}}^{(\textup{D},j)}$ and $B_{\mathfrak{b}}^{(\textup{D},j)}$
for all $\mathfrak{b}\in\mathfrak{N}^{\textup{D}}\cup\\{\mathfrak{o}\\}$, and
$b_{\mathfrak{a}}^{(j)}$ and $p_{\mathfrak{a}}^{(j)}$ instead of
$b_{\mathfrak{a}}^{(j)}(\mathcal{C})$ and
$p_{\mathfrak{a}}^{(j)}(\mathcal{C})$, for all
$\mathfrak{a}\in\mathfrak{Z}^{\textup{D}}$. It is sufficient to show that

$t_{j}^{\textup{D}}\leq\frac{n}{n_{i}}\log_{q}\left(\frac{b_{\mathfrak{c}^{(j,i)}+\mathfrak{e}^{(i)}}}{b_{\mathfrak{c}^{(j,i)}}}(q-1)+1\right)-\frac{n}{n_{i}}.$

for an $i\in[r]$ such that $n_{i}\in\Delta$ and
$\mathfrak{c}^{(j,i)}<\mathfrak{n}$, since
$\mathfrak{N}_{i}^{\textup{R}}\cap\mathfrak{N}_{s}^{\textup{R}}=\\{\mathfrak{n}\\}$
for all $i,s\in[r]$. Fix such $i\in[r]$ and observe that

$\left\\{\mathfrak{c}^{(j,i)}+\mathfrak{e}^{(i)}-s\cdot\mathfrak{e}^{(i)}\in\mathfrak{N}^{\textup{D}}:s\in[j]\cup\\{0\\}\right\\}=\left\\{\mathfrak{c}^{(j,i)},\mathfrak{c}^{(j,i)}+\mathfrak{e}^{(i)}\right\\}$

and that $B_{\mathfrak{a}}^{(j)}=0$ for all
$\mathfrak{a}\in\mathfrak{N}_{i}^{\textup{D}}$ such that
$\llbracket\mathfrak{a}\rrbracket<t_{j}^{\textup{D}}$. Therefore, we get

$\displaystyle W_{\mathfrak{c}^{(j,i)}+\mathfrak{e}^{(i)}}^{(j)}$
$\displaystyle=B_{\mathfrak{c}^{(j,i)}+\mathfrak{e}^{(i)}}^{(j)}-B_{\mathfrak{c}^{(j,i)}}^{(j)}\begin{bmatrix}{n_{i}-\mathfrak{c}^{(j,i)}_{i}}\\\
{1}\end{bmatrix}_{q}$
$\displaystyle=b_{\mathfrak{c}^{(j,i)}+\mathfrak{e}^{(i)}}^{(j)}\begin{bmatrix}{n_{i}}\\\
{\mathfrak{c}^{(j,i)}_{i}+1}\end{bmatrix}_{q}-b_{\mathfrak{c}^{(j,i)}}^{(j)}\begin{bmatrix}{n_{i}}\\\