On Mon, Feb 21, 2011 at 1:40 PM, Nils Bruin <nbr...@sfu.ca> wrote:
> On Feb 21, 10:31 am, Robert Bradshaw <rober...@math.washington.edu>
> wrote:
>> 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.
>
> The problem I see is that the variable names are not the only
> parameters involved in creating a new polynomial ring. How about term
> ordering, underlying implementation etc? At some point I bet there are
> going to be polynomial ring k[x,y,z] with custom term orderings.

Sage has had multivariate polynomial rings with a wide range of term
orderings since 2005.

>  If
> you compute a resultant of two elements there with respect to z, what
> kind of k[x,y] are you going to create to hold the answer?

The choice of term ordering on k[x,y,z] induces one on k[x,y], since
the set of monomials in k[x,y] is a subset of that in k[x,y,z].

If one types f.resultant(g,...) then this shouldn't work unless f and
g canonically coerce to a common parent (or perhaps, g gets coerced
into f.parent()).

> This problem does not arise in the univariate case, because the
> prospective parent of the resultant already exists (i.e., is the base
> ring).
>
> Therefore, I think the safer choice is to let resultants of
> multivariate polynomials end up in the same parent again. If people
> want it in another ring, they can create that before hand and coerce
> it in (apparently cheaply).

I'm not sure if letting the resulting be in the same parent is safe or
not.  However, two points in favor of the choice you suggest are:

(1) It is the current choice in Sage, and leaving it that way is very
good from the point of view of backward compatibility.    I like
maintaining backward compatibility.

(2) It is also the choice that is made in Magma, so leaving it as is
now is better for compatibility with Magma:

> R<x,y,z> := PolynomialRing(RationalField(),3);
> Parent(Resultant(x,y,2));
Polynomial ring of rank 3 over Rational Field
Order: Lexicographical
Variables: x, y, z


---
What we have now:
----------------------------------------------------------------------
| Sage Version 4.6.1, Release Date: 2011-01-11                       |
----------------------------------------------------------------------
sage: R.<x,y,z> = QQ[]
sage: parent(x.resultant(y,z))
Multivariate Polynomial Ring in x, y, z over Rational Field


-- 
William Stein
Professor of Mathematics
University of Washington
http://wstein.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

Reply via email to