#8832: CombinatorialFreeModule doesn't properly coerce scalar during action
------------------------------+---------------------------------------------
   Reporter:  hivert          |       Owner:  AlexGhitza                        
       
       Type:  defect          |      Status:  new                               
       
   Priority:  major           |   Milestone:  sage-4.4.1                        
       
  Component:  algebra         |    Keywords:  CombinatorialFreeModule, action, 
coercion
     Author:  Florent Hivert  |    Upstream:  N/A                               
       
   Reviewer:                  |      Merged:                                    
       
Work_issues:                  |  
------------------------------+---------------------------------------------
 When a scalar has to be coerced to perform the action on a combinatorial
 free module element, Sage refuse to perform the multiplication. As a
 consequence, whereas the following is perfectly correct
 {{{
 sage: sage: P.<q> = QQ['q']
 sage: F = FractionField(P)
 sage: V = CombinatorialFreeModule(F, Words())
 sage: w = Words()('abc')
 sage: sage: ((1+q)/q)*V(w)
 ((q+1)/q)*B[word: abc]
 }}}
 this should also works
 {{{
 sage: (1+q)*V(w)
 ---------------------------------------------------------------------------
 TypeError                                 Traceback (most recent call
 last)
 ...
 TypeError: unsupported operand parent(s) for '*': 'Univariate Polynomial
 Ring in q over Rational Field' and 'Free module generated by Words over
 Fraction Field of Univariate Polynomial Ring in q over Rational Field'
 }}}
 The polynomial {{{1+q}}} should be coerced into its fraction field.

 After the patch
 {{{
 sage: (1+q)*V(w)
 (q+1)*B[word: abc]
 }}}

 Florent

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/8832>
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