#12871: Conversion for RR[x][y] stricter than for QQ[x][y]
-----------------------------+----------------------------------------------
   Reporter:  vbraun         |             Owner:  AlexGhitza
       Type:  PLEASE CHANGE  |            Status:  new       
   Priority:  major          |         Milestone:  sage-5.1  
  Component:  algebra        |          Keywords:            
Work issues:                 |   Report Upstream:  N/A       
  Reviewers:                 |           Authors:            
  Merged in:                 |      Dependencies:            
   Stopgaps:                 |  
-----------------------------+----------------------------------------------
 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

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/12871>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sage-trac?hl=en.

Reply via email to