#5639: minpoly of symbolic matrices is broken
------------------------+---------------------------------------------------
   Reporter:  was       |       Owner:  mhansen    
       Type:  defect    |      Status:  needs_work 
   Priority:  major     |   Milestone:  sage-4.1.3 
  Component:  calculus  |    Keywords:             
Work_issues:            |      Author:  Mike Hansen
   Reviewer:            |      Merged:             
------------------------+---------------------------------------------------
Changes (by jason):

  * status:  needs_review => needs_work


Comment:

 I think this patch broke charpoly.  See the doctest around line 280 of
 matrix_symbolic_dense.pyx:

 {{{
 sage: M = matrix(SR, 2, 2, var('a,b,c,d'))
 sage: M.charpoly('t')
 ERROR: An unexpected error occurred while tokenizing input
 The following traceback may be corrupted or invalid
 The error message is: ('EOF in multi-line statement', (288, 0))

 ---------------------------------------------------------------------------
 TypeError                                 Traceback (most recent call
 last)

 
/home/jason/.sage/temp/sage.math.washington.edu/17572/_home_jason__sage_init_sage_0.py
 in <module>()

 
/home/jason/sage-4.1.2.rc0-sage.math.washington.edu-x86_64-Linux/local/lib/python2.6
 /site-packages/sage/matrix/matrix_symbolic_dense.so in
 sage.matrix.matrix_symbolic_dense.Matrix_symbolic_dense.charpoly
 (sage/matrix/matrix_symbolic_dense.c:2620)()
     289         # correct for the discrepancy.
     290         cp = self._maxima_(maxima).charpoly(var)._sage_()
 --> 291         cp = cp.expand().polynomial(None, ring=SR[var])
     292         if self.nrows() % 2 == 1:
     293             cp = -cp

 
/home/jason/sage-4.1.2.rc0-sage.math.washington.edu-x86_64-Linux/local/lib/python2.6
 /site-packages/sage/symbolic/expression.so in
 sage.symbolic.expression.Expression.polynomial
 (sage/symbolic/expression.cpp:17292)()

 
/home/jason/sage-4.1.2.rc0-sage.math.washington.edu-x86_64-Linux/local/lib/python2.6
 /site-packages/sage/symbolic/expression_conversions.pyc in polynomial(ex,
 base_ring, ring)
     985          1.87813065119873*x^2 + 20.0855369231877
     986     """
 --> 987     converter = PolynomialConverter(ex, base_ring=base_ring,
 ring=ring)
     988     res = converter()
     989     return converter.ring(res)

 
/home/jason/sage-4.1.2.rc0-sage.math.washington.edu-x86_64-Linux/local/lib/python2.6
 /site-packages/sage/symbolic/expression_conversions.pyc in __init__(self,
 ex, base_ring, ring)
     843             G = ring.variable_names_recursive()
     844             if any([repr(v) not in G for v in ex.variables()]):
 --> 845                 raise TypeError, "%s is not a variable of %s" %(v,
 ring)
     846             self.ring = ring
     847             self.base_ring = ring.base_ring()

 TypeError: t is not a variable of Univariate Polynomial Ring in t over
 Symbolic Ring
 }}}

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/5639#comment:9>
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