#14772: Remove CombinatorialClass from Permutations
------------------------------------+------------------------------------
       Reporter:  tscrim            |         Owner:  sage-combinat
           Type:  enhancement       |        Status:  needs_review
       Priority:  major             |     Milestone:  sage-5.11
      Component:  combinatorics     |    Resolution:
       Keywords:  days49            |     Merged in:
        Authors:  Travis Scrimshaw  |     Reviewers:
Report Upstream:  N/A               |   Work issues:
         Branch:                    |  Dependencies:  #8386 #14519 #14808
       Stopgaps:                    |
------------------------------------+------------------------------------

Comment (by darij):

 Great!

 I'll look into the multisets issue, but as for now here is a fix for
 another bug:
 {{{
 sage: Permutations(descents=[1,3,4])
 }}}
 gave an error. It turns out that, lacking an n-value in the input, the
 code would automatically set n to be the maximum entry of the list {{{[1,
 3, 4]}}} plus 1 (btw, that causes another bug when the list is empty;
 fixed as well), but whoever wrote that must have missed the fact that the
 positions start with 0 (so a presence of 3 in the list really means that
 the permutations will have a descent at 4, i. e., their value at 4 will be
 larger than their value at 5), so the "correct" n would be the maximum
 entry of the list {{{[1, 3, 4]}}} plus 2. I think this is a completely
 stupid convention to make, and the syntax (giving the set of descents as a
 list without the n, having Sage automatically choose the n) should not be
 supported (no doctests in permutation.py use this syntax). Note that it
 only allows constructing permutations where the penultimate position is a
 descent; all the others require the long syntax with the n given! Also, it
 is misleading, because {{{descents=[1,3,4]}}} sounds like it should give
 the permutations with descent composition {{{[1,3,4]}}}, but the role of
 {{{[1,3,4]}}} here is absolutely not that of a composition.

 Would you agree with axing the syntax?

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