Wrote compress

This function collects like terms from a multi-vector.