Unimodular basis test for an integer direct summand (source code)

= Unimodular basis test for an integer direct summand
{title2=$\det U=\pm1$}

Integer row vectors forming a square <unimodular matrix> are a basis of the corresponding <free abelian group>: the adjugate formula makes the inverse integral. The subgroup spanned by any subset of that basis is therefore a <direct summand>, complemented by the remaining basis vectors. In contrast, a proper finite-index subgroup of a free abelian group cannot be a direct summand: its nonzero finite quotient would have to embed as a subgroup of a torsion-free group.