[GAP Forum] does a multivariate polynomial know its ring (or at least variables)?
dmitrii.pasechnik at cs.ox.ac.uk
dmitrii.pasechnik at cs.ox.ac.uk
Thu Sep 21 10:51:24 BST 2017
Dear all,
I'd like to write a function that takes a multivariate polynomial p
and produces another polynomial in the same polynomial ring R,
by doing a variable subsitution.
Is there a way to p about its ring,
or at least about the family of the indeterminants of the ring?
Namely, I'd like to call
Value( p, vars, vals ), something like
the following:
# compute the image of q under a linear transform g
n := Length(vars);
OnPoly:=function(q,g)
local i,j;
return Value(q, vars,
List([1..n],i->Sum([1..n], j->g[i][j]*vars[j])));
end;
but I would rather get vars from q.
Have I missed something in the docs?
Thanks,
Dima
More information about the Forum
mailing list