#13776: fix Element Constructor in CombinatorialFreeModule
------------------------------+---------------------------------------------
   Reporter:  chrisjamesberg  |             Owner:  chrisjamesberg         
       Type:  defect          |            Status:  new                    
   Priority:  major           |         Milestone:  sage-5.6               
  Component:  combinatorics   |          Keywords:  CombinatorialFreeModule
Work issues:                  |   Report Upstream:  N/A                    
  Reviewers:                  |           Authors:  Chris Berg             
  Merged in:                  |      Dependencies:                         
   Stopgaps:                  |  
------------------------------+---------------------------------------------
 The method "_element_constructor_" within the class
 "CombinatorialFreeModule" has a bug. The following code:

 {{{
 elif ((hasattr(self._basis_keys, 'element_class') and
     isinstance(self._basis_keys.element_class, type) and isinstance(x,
 self._basis_keys.element_class))
   or (sage.structure.element.parent(x) == self._basis_keys)):

     return self.monomial(x)

 elif x in self._basis_keys:
     return self.monomial(self._basis_keys(x))
 }}}

 will return a monomial indexed by that object before checking that x is an
 element of the basis. For instance, in the current implementation of
 kSchur functions, one can try:

 {{{
 sage: ks = SymmetricFunctions(QQ).kBoundedSubspace(3,1).kschur()
 sage: ks(DyckWord([1,0,1,0]))
 ks3()()
 }}}

 This should clearly be returning an error. For k-Schur functions, I have
 fixed this in Track #13762, but was afraid to fix in general because I
 didn't want to mess up functionality for others.

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