#15150: Implement NCSym
------------------------------------+-----------------------------
       Reporter:  tscrim            |        Owner:  sage-combinat
           Type:  enhancement       |       Status:  needs_review
       Priority:  major             |    Milestone:  sage-5.12
      Component:  combinatorics     |   Resolution:
       Keywords:                    |    Merged in:
        Authors:  Travis Scrimshaw  |    Reviewers:
Report Upstream:  N/A               |  Work issues:
         Branch:                    |       Commit:
   Dependencies:  #15143            |     Stopgaps:
------------------------------------+-----------------------------

Comment (by tscrim):

 I would have thought that the total ordering on set partitions in #15143
 would have `CombinatorialFreeModule` give a unique sorting on the
 elements:
 {{{
 sage: SetPartition([[1,3],[2]]) < SetPartition([[1],[2],[3]])
 False
 sage: SetPartition([[1,3],[2]]) > SetPartition([[1],[2],[3]])
 True
 sage: SetPartition([[1],[2],[3]]) < SetPartition([[1,3],[2]])
 True
 sage: SetPartition([[1],[2],[3]]) > SetPartition([[1,3],[2]])
 False
 }}}

 My guess as to why we're getting different output is a failure in the
 comparisons (I didn't see any tickets that seemed like would change the
 output of `linear_comb()`). Try running:
 {{{
 sage: e = SymmetricFunctionsNonCommutingVariables(QQ).e()
 sage: e.print_options()
 {'bracket': False,
  'latex_bracket': False,
  'latex_prefix': None,
  'latex_scalar_mult': None,
  'monomial_cmp': <function cmp>,
  'prefix': 'e',
  'scalar_mult': '*',
  'tensor_symbol': None}
 sage: cmp(SetPartition([[1],[2],[3]]), SetPartition([[1,3],[2]]))
 -1
 sage: elt = 2*e[[1],[2],[3]] - e[[1,3],[2]]
 sage: L = elt._monomial_coefficients.items()
 sage: L.sort(cmp=cmp, key=lambda (x,y): x)
 sage: L
 [({{1, 3}, {2}}, -1), ({{1}, {2}, {3}}, 2)]
 }}}
 Do you get anything different, in particular the last one?

--
Ticket URL: <http://trac.sagemath.org/ticket/15150#comment:13>
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/groups/opt_out.

Reply via email to