  Wei's celebrated Duality Theorem is generalized in several ways, expressed as
duality theorems for linear codes over division rings and, more generally,
duality theorems for matroids. These results are further generalized, resulting
in two Wei-type duality theorems for new combinatorial structures that are
introduced and named {\em demi-matroids}. These generalize matroids and are the
appropriate combinatorial objects for describing the duality in Wei's Duality
Theorem. A new proof of the Duality Theorem is thereby given that explains the
theorem in combinatorial terms. Special cases of the general duality theorems
are also given, including duality theorems for cycles and bonds in graphs and
for transversals.
