Hi!
On Feb 10, 12:36 pm, "Nicolas M. Thiery" <[email protected]>
wrote:
> On Wed, Feb 10, 2010 at 11:06:50AM +0100, Nicolas M. Thiery wrote:
> > I finally started to review #7914. One thing that did slip through
> > my fingers. I just noticed that leading_term returns the term with
> > smallest support. I instead assumed it would return that with
> > largest support, as is the case for polynomials:
>
> > sage: p = 3*x^2+2*x+1
> > sage: p.leading_coefficient()
> > 3
>
> Florent is also +1 on this convention, and I just fixed the patch
> accordingly. But it is still time to rollback. Please vote!
What is x in the above expression? Is it var('x')?
Generally, since I work with Groebner basis, I am of course all for
keeping in mind that polynomial rings come with a monomial order, that
these orders may be different, that the leading monomial/term/
coefficient depends on this order, and that rings with the same base
ring and variable names are different if their monomial orders differ.
"Symbolic" polynomials, where x = var('x'), are lacking an inherent
monomial order. But I think a quite reasonable convention is that x^{n
+1} > x^n. The leading term for that convention is also the one that
is most important for polynomial division, etc.
So, I am +1 to have
sage: p = 3*x^2+2*x+1
sage: p.leading_coefficient()
3
by default.
Can there be a way to globally switch between the two conventions?
Cheers,
Simon
--
To post to this group, send an email to [email protected]
To unsubscribe from this group, send an email to
[email protected]
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org