Cadabra

Weight

Attach a labelled weight to an object
Attach a labelled weight to an object, which can subsequently be used in the algorithms keep_weight and drop_weight to select particular terms. See the documentation of those two algorithms for examples.