7 | 7 | 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. |