Hi Bruno,
On 2015-02-19, Bruno Grenet <[email protected]> wrote:
> My impression is that Enrique is right: in the constructor
> PolynomialRing, for univariate polynomial rings the argument `order`
> seem indeed to be ignored:
Yes, see my previous post.
> A possibility could be to define a *multivariate* polynomial ring in
> just one variable (!) when an `order` is given. This is possible with
> the current implementation I think, though the results do not seem to be
> correct for the particular question of whether (1+t) is a unit:
>
> sage: from sage.rings.polynomial.multi_polynomial_ring import
> MPolynomialRing_polydict
PLEASE DON'T DO THIS, unless you know what you are doing! Reason: If you
use the various boilerplate polynomial ring constructors directly, you
might break the cache and create several distinct instances of "the
same" polynomial ring, which has a high probability of confusing the
coercion framework and thus compromising the Sage session.
> sage: R = MPolynomialRing_polydict(QQ, 1, ('t',), "neglex"); R
> Multivariate Polynomial Ring in t over Rational Field
> sage: R.inject_variables()
> Defining t
> sage: (1+t).is_unit()
> False
In addition to the above potential disaster, you are constructing here a
ring in the "polydict" implementation, which does not know anything
about localisation. You want a ring in "libsingular" implementation, and
it can be obtained by using the default polynomial ring constructor
(thus, no high danger of desaster) with additional indication of the
number of variables (which returns a multivariate ring):
sage: R.<t> = PolynomialRing(QQ, 1, order='neglex')
sage: R.term_order()
Negative lexicographic term order
sage: (1+t).is_unit()
True
Best regards,
Simon
--
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 [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.