On Wednesday, 8 September 2021 at 09:24:15 UTC-7 [email protected] wrote:
> Hi Simon,
>
> Thank you for your insight, and let me state that I
> find InfinitePolynomialRing useful in combinatorics to deal with
> (truncated) multivariate generating functions with apriori unknown number
> of variables, and so basic operations (such as differentiation) on
> polynomials would be very welcome here. Btw, is there
> InfinitePowerSeriesRing or alike available by any chance?
>
> From what you said, I think it should be easy to fix (making it work) at
> least ISSUE#2 -- one just needs to extend the underlying finite
> PolynomialRing with the differentiating variable(s) before delegating the
> actual differentiation to it.
>
I don't think any extending is required: if the differentiation variables
do no lie in the parent of the representing finite polynomial ring for the
actual element then the answer is 0.
def derivative(self, *args):
R=self._p.parent()
try:
L=[R(c) for c in args]
except TypeError: #perhaps test a little more here
return
self.parent().zero()
return R(self._p.derivative(*L))
--
You received this message because you are subscribed to the Google Groups
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/sage-support/20121a4b-5851-44f0-827c-a61ccb8b7771n%40googlegroups.com.