+1 to returning elements of the basering in the univariate case. If anything, the multivariate case should be changed.
On Sun, Feb 20, 2011 at 9:56 AM, John Cremona <john.crem...@gmail.com> wrote: > One difference is that in the multivariable case, having the return > value in the ring with fewer variables would require that ring to be > created. I don't know how much of an over head that would be. Also, > whether Sage would automatically be ably work with the three subrings > (say) k[x,y], k[x,z], k[y,z] of k[x,y,z] in a way which was > mathematically correct and transparent, and also efficient. k[x,y], k[x,z], k[y,z] all coerce to k[x,y,z], but there some overhead due to the extra object creation (assuming one needed to coerce back into the larger ring). This, and creation of the new ring, is probably still pretty cheap. Some timings: sage: R.<x,y,z> = QQ[] sage: f = R.random_element(20) sage: timeit("f.resultant(x)") 625 loops, best of 3: 43.9 µs per loop sage: f = S.random_element(20) sage: timeit("R.coerce(f)") 625 loops, best of 3: 286 µs per loop > On Sun, Feb 20, 2011 at 6:09 AM, mmarco <mma...@unizar.es> wrote: >> I have recently opened track ticket 10799 solving some problems with >> coumputing resultants in univariate polynomial rings. Now i plan to >> implement the .discriminant() method for polynomials in multivariable >> rings. But i have a doubt now. The method .resultant() returns a >> polynomial in the same ring in the case of multivariable polynomials. >> But the same method returns an object in the base ring for the case of >> univariate polynomials (and also does de .discriminant() ) >> >> I think that a unified criterion would be desirable. And i would >> prefear the one that now exists for univariate polynomials. >> >> So, my question is: do you think that if f and g are polynomials in >> K[x,y,z], f.resultant(g,y) should live in K[x,y,z] or in K[x,z]? And >> the same question for f.discriminant() >> >> -- >> To post to this group, send an email to sage-devel@googlegroups.com >> To unsubscribe from this group, send an email to >> sage-devel+unsubscr...@googlegroups.com >> For more options, visit this group at >> http://groups.google.com/group/sage-devel >> URL: http://www.sagemath.org >> > > -- > To post to this group, send an email to sage-devel@googlegroups.com > To unsubscribe from this group, send an email to > sage-devel+unsubscr...@googlegroups.com > For more options, visit this group at > http://groups.google.com/group/sage-devel > URL: http://www.sagemath.org > -- To post to this group, send an email to sage-devel@googlegroups.com To unsubscribe from this group, send an email to sage-devel+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-devel URL: http://www.sagemath.org