11.1.3 Apply a function to the internal sparse format of a polynomial
The map command can apply
a function to the coefficients of a polynomial written in internal sparse format.
(See Section 6.3.28 for other uses of map.)
map takes two arguments:
P, a polynomial of k variables in internal sparse format.
f, a function of k+1 variables.
map(P,f) applies f to the coefficients of P;
namely, it returns a polynomial which replaces each term
%%%{a,[n1,…,nk]%%%} in P by
%%%{f(a,n1,…,nk),[n1,…,nk]%%%}.