isDirectSum
isDirectSum M
-- returns
true
if
M
was formed as a direct sum.
Works for modules, graded modules, etc. The components of the sum can be recovered with
components
.