On Thu, Jun 26, 2008 at 9:44 AM, Joel B. Mohler <[EMAIL PROTECTED]> wrote:
>
> Hi,
>
> I cannot figure out how to force sage to construct a ring as a multivariate
> ring with only a single generator.  In the past, I used MPolynomialRing to
> force multi-variate implementation, but that is now deprecated.
>
> Specifically, the output below really bugs me.  I had code relying on features
> in the multi-variate implementation, but sage magically created a univariate
> ring when I just happened to have a single variable (and thus a single-ton
> list).
>
> # 3.0.3
> sage: PolynomialRing(QQ,names=['Y1'])
> Univariate Polynomial Ring in Y1 over Rational Field
> sage: PolynomialRing(QQ,names=['Y1','Y2'])
> Multivariate Polynomial Ring in Y1, Y2 over Rational Field
>
> Is this a bug or a feature?  Clearly, I think it's a bug :).

This is definitely a bug since the docs explicitly say:
"PolynomialRing(base_ring, name, sparse=False) returns a univariate
polynomial ring; all other input formats return a multivariate
polynomial ring." and name is by definition a string.

To get a multivariate polynomial ring in 1 variable give the
number of variables explicitly:

sage: PolynomialRing(QQ, 1, names=['Y1'])
Multivariate Polynomial Ring in Y1 over Rational Field

Please report this to trac (and fix it :-) ).

William

>
> Of course, I'd also be happy if the univariate and multivariate implementation
> were much more consistent.  It always seemed to me that these implementations
> got continually out-of-sync with each other as features got put into one
> implementation and didn't always get implemented in others.   This is
> something that the review process should find and point out.
>
> --
> Joel
>
> >
>



-- 
William Stein
Associate Professor of Mathematics
University of Washington
http://wstein.org

--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to