multpoly.spad line 776 [edit on github]
This package contains a function which speeds up coercion in an important special case.
remap_variables(p, lv1, lv2) replaces corresponding variables from l1 by variables from lv2. Assumes that lv1 and lv2 have the same length and that p has variables in lv1.