I don't see why that shouldn't work. There is a natural coercion from x in ZZ['x'] to x in QQ['x'], so they are treated as the same. (Also we are likely to get many complaints if this raised an error because it would be very surprising (and subtle) behavior.)
Best, Travis On Monday, September 28, 2015 at 1:31:24 AM UTC-5, Ralf Stephan wrote: > > Can someone please clarify: How is the following supposed to work? > > sage: Sx.<x> = ZZ[]; Sxy.<y> = Sx[]; Sxyz.<z> = Sxy[] > sage: p = 1 + x*y + x*z + y*z^2 > sage: P = p.integral(x) > sage: from sage.misc.derivative import multi_derivative > sage: multi_derivative(P,(x,)) > > In my understanding it cannot work because P has the innermost ring > over ZZ replaced with one over QQ, having a different generator. > Consequently, multi_derivative should complain because its argument > x is still the generator of Sx. > > I'm asking because there are doctests depending on the (perceived) > wrong behaviour (ie., that multi_derivative() does not complain) and which > trigger with some experimental code. > > -- You received this message because you are subscribed to the Google Groups "sage-devel" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+unsubscr...@googlegroups.com. To post to this group, send email to sage-devel@googlegroups.com. Visit this group at http://groups.google.com/group/sage-devel. For more options, visit https://groups.google.com/d/optout.