  In $1991$, Wei proved a duality theorem that established an interesting
connection between the generalized Hamming weights of a linear code and those
of its dual code. Wei's duality theorem has since been extensively studied from
different perspectives and extended to other settings. In this paper, we
re-examine Wei's duality theorem and its various extensions, henceforth
referred to as Wei-type duality theorems, from a new Galois connection
perspective. Our approach is based on the observation that the generalized
Hamming weights and the dimension/length profiles of a linear code form a
Galois connection. The central result in this paper is a general Wei-type
duality theorem for two Galois connections between finite subsets of
$\mathbb{Z}$, from which all the known Wei-type duality theorems can be
recovered. As corollaries of our central result, we prove new Wei-type duality
theorems for $w$-demimatroids defined over finite sets and
$w$-demi-polymatroids defined over modules with a composition series, which
further allows us to unify and generalize all the known Wei-type duality
theorems established for codes endowed with various metrics.
