#8800: Doctest coverage of categories
--------------------------+-------------------------------------------------
   Reporter:  SimonKing   |       Owner:  Simon King         
       Type:  defect      |      Status:  new                
   Priority:  major       |   Milestone:  sage-4.4.2         
  Component:  categories  |    Keywords:  categories doctests
     Author:  Simon King  |    Upstream:  N/A                
   Reviewer:              |      Merged:                     
Work_issues:              |  
--------------------------+-------------------------------------------------

Comment(by SimonKing):

 I believe that free modules of the same rank but with different inner
 product matrix should not allow coercion. Hence, I think the following is
 a bug:
 {{{
 sage: P.<t> = ZZ[]
 sage: M1 = FreeModule(P,3)
 sage: M2 = QQ^3
 sage: M2([1,1/2,1/3]) + M1([t,t^2+t,3])     # This is ok
 (t + 1, t^2 + t + 1/2, 10/3)
 sage: M3 = FreeModule(P,3, inner_product_matrix = Matrix(3,3,range(9)))
 sage: M2([1,1/2,1/3]) + M3([t,t^2+t,3])     # This should result in an
 error
 (t + 1, t^2 + t + 1/2, 10/3)
 }}}

 This inappropriate coercion can be avoided by modifying the merge method
 of the construction functors, so that the inner product matrices are used
 for comparison as well.

 But I acknowledge that other people might think that a coercion should
 exist. Perhaps I shall ask on sage-algebra...

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