That would be nice to fix. Btw, there is also the same issue with formal integration - like in the example below:
K.<u> = PolynomialRing(QQ) R.<x> = InfinitePolynomialRing(K) f = x[0] + x[1] integrate(f,x[2]) which fails while integrate(f,x[1]) works fine. Regards, Max On Thursday, September 9, 2021 at 2:15:48 AM UTC-4 Simon King wrote: > Hi Nils, > > can you open a ticket for it? > > Best regards, > Simon > > On 2021-09-08, Nils Bruin <nbr...@sfu.ca> wrote: > > On Wednesday, 8 September 2021 at 09:24:15 UTC-7 max...@gmail.com 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 sage-support+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/sage-support/76251036-9144-4c1a-bba8-8150451eb493n%40googlegroups.com.