Hi Simon,

Le 19/02/2015 20:44, Simon King a écrit :
Hi Bruno,

On 2015-02-19, Bruno Grenet <[email protected]> wrote:
It would definitely make sense to me to have a simpler way to obtain the
same result as above, for instance with the simpler invocation:

sage: R.<t> = PolynomialRing(QQ, order='neglex')

To me it would make sense to return a libsingular multivariate
polynomial ring whenever an ordering is prescribed or an implementation
is explicitly chosen. But I think I've seen quite often people writing

sage: R.<t> = PolynomialRing(QQ, 1)

and I do not think they wanted to get a Multivariate 1-variable
Polynomial Ring. While whenever a user writes "order=..." or
"implementation=singluar", it seems quite clear that s/he knows what
s/he wants!
While I totally agree that using arguments "order=..." or
"implementation=libsingular" should in future be sufficient to create a
(multivariate and potentially localised) libsingular polynomial ring, I
am not so sure about changing the meaning of "PolynomialRing(QQ,1)". It
would be a backward incompatible change, and some people out in the wild
use it. So, to the very least we'd need a deprecation period.

I was so sure that the current behavior is

sage: R.<t> = PolynomialRing(QQ, 1); R
Univariate Polynomial Ring in t over Rational Field

that I didn't check, so I thought you propose to change the behavior... and was reluctant for the exact same reason as you are now: backward incompatibility. So I agree with you.

Still, I find the following behavior (this time I tested!) a bit a shame:

sage: R.<t> = PolynomialRing(ZZ, 1, implementation="NTL")
Traceback (most recent call first):
...
ValueError: The NTL implementation is not known for multivariate polynomial rings

And actually, as well as I find the above behavior not the best, I would also be in favor of raising an error for instance for

sage: R.<t> = PolynomialRing(QQ, implementation="whatever")

At the very least, there is an inconsistency here that should be corrected to my mind.

Cheers,
Bruno

P.S.: I find the PolynomialRing constructor a bit a mess, maybe we could give it a refresh, and at the same time make things as consistent as possible between the different use of it.

--
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.

Reply via email to