[GAP Forum] does a multivariate polynomial know its ring (or at least variables)?
Max Horn
max at quendi.de
Thu Sep 21 12:41:09 BST 2017
Dear Dima,
> On 21 Sep 2017, at 11:51, dmitrii.pasechnik at cs.ox.ac.uk wrote:
>
> 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?
No, this is not possible, you haven't missed anything in the manual: All polynomials implicitly "live in" the polynomial ring with "all" (infinitely many) indeterminates.
Of course you can "cheat" and define the action on pairs
[indet, polys]
where the first entry is a list of indeterminates you want to act on. Or do you what you described in your mail (which just passes "indet" implicitly via a higher variable in the scope in which you action is defined).
Regards,
Max
More information about the Forum
mailing list