[GAP Forum] does a multivariate polynomial know its ring (or at least variables)?

Hulpke,Alexander Alexander.Hulpke at colostate.edu
Thu Sep 21 13:56:07 BST 2017


Dear Dima Pasechnik, Dear Forum,


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?

The family of indeterminate only depends on the coefficients family, but there is OccuringVariableIndices which takes a (multivariate) polynomial and returns the index numbers of the variables that is uses.

You could use

 base:=Field(ZeroCoefficientRatFun(pol)); # some field in the same characteristic as coefficients
 List(OccuringVariableIndices(pol),x->X(base,x));

to get the actual variables that occur in the polynomial.Note that a constant polynomial will result in an empty list.

Hope this helps,

   Alexander Hulpke

-- Colorado State University, Department of Mathematics,
Weber Building, 1874 Campus Delivery, Fort Collins, CO 80523-1874, USA
email: hulpke at colostate.edu<mailto:hulpke at colostate.edu>, Phone: ++1-970-4914288
http://www.math.colostate.edu/~hulpke




More information about the Forum mailing list