#16979: integral of multivariate polynomial causes strange behaviors
-------------------------+-------------------------------------------------
   Reporter:             |            Owner:
  davidamadore           |           Status:  new
       Type:  defect     |        Milestone:  sage-6.4
   Priority:  major      |         Keywords:  polynomials integral symbolic
  Component:             |          Authors:
  commutative algebra    |  Report Upstream:  N/A
  Merged in:             |           Branch:
  Reviewers:             |     Dependencies:
Work issues:             |
     Commit:             |
   Stopgaps:             |
-------------------------+-------------------------------------------------
 Probably related to issue #14334, the integral of a multivariate
 polynomial in sage 6.2 appears to belong to the right parent ring but
 causes inexplicable errors when manipulated:

 {{{
 sage: R.<x,y> = QQ['x','y']
 sage: f = x.integral(x)
 sage: f
 1/2*x^2
 sage: parent(f)
 Multivariate Polynomial Ring in x, y over Rational Field
 sage: f + 0
 ---------------------------------------------------------------------------
 AttributeError                            Traceback (most recent call
 last)
 <ipython-input-5-90f0fdd2b139> in <module>()
 ----> 1 f + Integer(0)

 /large/data/work/sage-6.2/local/lib/python2.7/site-
 packages/sage/structure/element.so in
 sage.structure.element.RingElement.__add__
 (sage/structure/element.c:14696)()

 /large/data/work/sage-6.2/local/lib/python2.7/site-
 packages/sage/structure/coerce.so in
 sage.structure.coerce.CoercionModel_cache_maps.bin_op
 (sage/structure/coerce.c:7523)()

 /large/data/work/sage-6.2/local/lib/python2.7/site-
 packages/sage/structure/element.so in
 sage.structure.element.RingElement.__add__
 (sage/structure/element.c:14628)()

 /large/data/work/sage-6.2/local/lib/python2.7/site-
 packages/sage/structure/element.so in
 sage.structure.element.ModuleElement._add_
 (sage/structure/element.c:10615)()

 /large/data/work/sage-6.2/local/lib/python2.7/site-
 packages/sage/rings/polynomial/multi_polynomial_element.pyc in _add_(self,
 right)
     212     def _add_(self, right):
     213         #return self.parent()(self.__element + right.__element)
 --> 214         return self.__class__(self.parent(),self.__element +
 right.__element)
     215
     216     def _sub_(self, right):

 /large/data/work/sage-6.2/local/lib/python2.7/site-
 packages/sage/structure/element.so in
 sage.structure.element.Element.__getattr__
 (sage/structure/element.c:4022)()

 /large/data/work/sage-6.2/local/lib/python2.7/site-
 packages/sage/structure/misc.so in
 sage.structure.misc.getattr_from_other_class
 (sage/structure/misc.c:1775)()

 AttributeError:
 'sage.rings.polynomial.multi_polynomial_libsingular.MPolynomial_libsingular'
 object has no attribute '_MPolynomial_element__element'
 }}}

--
Ticket URL: <http://trac.sagemath.org/ticket/16979>
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 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-trac.
For more options, visit https://groups.google.com/d/optout.

Reply via email to