Opened 9 years ago

Closed 5 years ago

#12871 closed defect (duplicate)

Conversion for RR[x][y] stricter than for QQ[x][y]

Reported by: vbraun Owned by: AlexGhitza
Priority: major Milestone: sage-duplicate/invalid/wontfix
Component: algebra Keywords:
Cc: Merged in:
Authors: Reviewers:
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Description

The following works:

sage: R.<x,y> = QQ[]
sage: U = R.univariate_ring(x)
sage: U([y])
y

but over RR it does not:

sage: R.<x,y> = RR[]
sage: U = R.univariate_ring(x)
sage: U([y])
---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)

/home/vbraun/<ipython console> in <module>()

/home/vbraun/opt/sage-5.0.beta13/local/lib/python2.7/site-packages/sage/structure/parent.so in sage.structure.parent.Parent.__call__ (sage/structure/parent.c:7940)()

/home/vbraun/opt/sage-5.0.beta13/local/lib/python2.7/site-packages/sage/structure/coerce_maps.so in sage.structure.coerce_maps.DefaultConvertMap_unique._call_ (sage/structure/coerce_maps.c:3344)()

/home/vbraun/opt/sage-5.0.beta13/local/lib/python2.7/site-packages/sage/structure/coerce_maps.so in sage.structure.coerce_maps.DefaultConvertMap_unique._call_ (sage/structure/coerce_maps.c:3247)()

/home/vbraun/opt/sage-5.0.beta13/local/lib/python2.7/site-packages/sage/rings/polynomial/polynomial_ring.pyc in _element_constructor_(self, x, check, is_gen, construct, **kwds)
    364         C = self._polynomial_class
    365         if isinstance(x, list):
--> 366             return C(self, x, check=check, is_gen=False,construct=construct)
    367         if isinstance(x, Element):
    368             P = x.parent()

/home/vbraun/opt/sage-5.0.beta13/local/lib/python2.7/site-packages/sage/rings/polynomial/polynomial_element.so in sage.rings.polynomial.polynomial_element.Polynomial_generic_dense.__init__ (sage/rings/polynomial/polynomial_element.c:38456)()

/home/vbraun/opt/sage-5.0.beta13/local/lib/python2.7/site-packages/sage/structure/parent.so in sage.structure.parent.Parent.__call__ (sage/structure/parent.c:7940)()

/home/vbraun/opt/sage-5.0.beta13/local/lib/python2.7/site-packages/sage/structure/coerce_maps.so in sage.structure.coerce_maps.NamedConvertMap._call_ (sage/structure/coerce_maps.c:4298)()

/home/vbraun/opt/sage-5.0.beta13/local/lib/python2.7/site-packages/sage/rings/polynomial/multi_polynomial.so in sage.rings.polynomial.multi_polynomial.MPolynomial._polynomial_ (sage/rings/polynomial/multi_polynomial.c:3371)()

/home/vbraun/opt/sage-5.0.beta13/local/lib/python2.7/site-packages/sage/rings/polynomial/multi_polynomial.so in sage.rings.polynomial.multi_polynomial.MPolynomial.polynomial (sage/rings/polynomial/multi_polynomial.c:5417)()

/home/vbraun/opt/sage-5.0.beta13/local/lib/python2.7/site-packages/sage/structure/parent.so in sage.structure.parent.Parent.__call__ (sage/structure/parent.c:7940)()

/home/vbraun/opt/sage-5.0.beta13/local/lib/python2.7/site-packages/sage/structure/coerce_maps.so in sage.structure.coerce_maps.DefaultConvertMap_unique._call_ (sage/structure/coerce_maps.c:3344)()

/home/vbraun/opt/sage-5.0.beta13/local/lib/python2.7/site-packages/sage/structure/coerce_maps.so in sage.structure.coerce_maps.DefaultConvertMap_unique._call_ (sage/structure/coerce_maps.c:3247)()

/home/vbraun/opt/sage-5.0.beta13/local/lib/python2.7/site-packages/sage/rings/polynomial/polynomial_ring.pyc in _element_constructor_(self, x, check, is_gen, construct, **kwds)
    416             if x.type() != 't_POL':
    417                 x = x.Polrev()
--> 418         return C(self, x, check, is_gen, construct=construct, **kwds)
    419 
    420     def is_integral_domain(self, proof = True):

/home/vbraun/opt/sage-5.0.beta13/local/lib/python2.7/site-packages/sage/rings/polynomial/polynomial_real_mpfr_dense.so in sage.rings.polynomial.polynomial_real_mpfr_dense.PolynomialRealDense.__init__ (sage/rings/polynomial/polynomial_real_mpfr_dense.c:3449)()

ValueError: max() arg is an empty sequence

This is the reason for the behavior observed in http://ask.sagemath.org/question/1359/strange-error-with-multivariate-polynomials

Change History (8)

comment:1 Changed 9 years ago by vbraun

  • Type changed from PLEASE CHANGE to defect

comment:2 Changed 7 years ago by jdemeyer

  • Milestone changed from sage-5.11 to sage-5.12

comment:3 Changed 7 years ago by vbraun_spam

  • Milestone changed from sage-6.1 to sage-6.2

comment:4 Changed 7 years ago by vbraun_spam

  • Milestone changed from sage-6.2 to sage-6.3

comment:5 Changed 6 years ago by vbraun_spam

  • Milestone changed from sage-6.3 to sage-6.4

comment:6 Changed 5 years ago by bruno

  • Status changed from new to needs_review

comment:7 Changed 5 years ago by bruno

  • Milestone changed from sage-6.4 to sage-duplicate/invalid/wontfix
  • Status changed from needs_review to positive_review

It was not noticed that #17190 is a duplicate of this ticket. I fixed the problem in #17190:

sage: R.<x,y> = RR[]
sage: U = R.univariate_ring(x)
sage: U([y])
y

comment:8 Changed 5 years ago by vbraun

  • Resolution set to duplicate
  • Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.