\mathbb{F}_{q^m} $-linear code $ C \subseteq \mathbb{F}_{q^m}^n $ of dimension $ k $, we define its $ r $-th generalized rank weight (GRW), for $ 1 \leq r \leq k $, as $$\begin{split}
d_{R,r}(C) = \min \{ & \dim (V) \mid V \subseteq \mathbb{F}_{q^m}^n, \mathbb{F}_{q^m} \textrm{-linear and} \\
 & V=V^*, \dim(C \cap V) \geq r \}.
\end{split}$$ We also define $ d_{R,0}(C) = 0 $ for convenience.

Hence $ d_{R,r}(C) $ is the minimum number of links that a wire-tapper needs to listen to in order to obtain at least the amount of information contained in $ r $ packets. In other words, $ r-1 $ packets is the *worst-case information leakage* when at most $ d_{R,r}(C)-1 $ links are wire-tapped.

The next lemma corresponds to [@slides Th. 16, Cor. 17]:

\[equivalent definition slides\] Given an $ \mathbb{F}_{q^m} $-linear code $ C \subseteq \mathbb{F}_{q^m}^n $ of dimension $ k $ and $ 1 \leq r \leq k $, it holds that $$\begin{split}
d_{R,r}(C) = \min \{ & {\rm wt_R}(D) \mid D \subseteq C, \mathbb{F}_{q^m} \textrm{-linear and} \\
 & \dim(D) = r \},
\end{split}$$ where $ {\rm wt_R}(D) = \dim(D^*) $ for an $ \mathbb{F}_{q^m} $-linear $ D \subseteq \mathbb{F}_{q^m}^n $.

