Procedure from library dmodapp.lib (see dmodapp_lib).
Usage:
poly2list(f); f a poly
Return:
list of exponents and corresponding terms of f
Purpose:
converts a poly to a list of pairs consisting of intvecs (1st entry)
and polys (2nd entry), where the i-th pair contains the exponent of the
i-th term of f and the i-th term (with coefficient) itself.