Opened 4 years ago
Closed 4 years ago
#23891 closed defect (fixed)
Permutation.descents does not take an index_set argument
Reported by:  mantepse  Owned by:  

Priority:  major  Milestone:  sage8.2 
Component:  combinatorics  Keywords:  
Cc:  sagecombinat, darij  Merged in:  
Authors:  Travis Scrimshaw  Reviewers:  Darij Grinberg 
Report Upstream:  N/A  Work issues:  
Branch:  a7b05fe (Commits, GitHub, GitLab)  Commit:  a7b05fe11efad39ed7b62f84d9356ebd51c5a7f1 
Dependencies:  Stopgaps: 
Description (last modified by )
This is a requirement now that Permutations(n)
are in the category of Coxeter groups.
This was originally noticed by:
sage: Permutations(4)([1,4,3,2]).weak_covers()  TypeError Traceback (most recent call last) <ipythoninput613fd0d11884fd> in <module>() > 1 Permutations(Integer(4))([Integer(1),Integer(4),Integer(3),Integer(2)]).weak_covers() /home/martin/sagedevelop/local/lib/python2.7/sitepackages/sage/categories/coxeter_groups.pyc in weak_covers(self, side, index_set, positive) 1922 """ 1923 return [ self.apply_simple_reflection(i, side=side) > 1924 for i in self.descents(side=side, index_set = index_set, positive = positive) ] 1925 1926 def coxeter_sorting_word(self,c): TypeError: descents() got an unexpected keyword argument 'index_set'
Change History (8)
comment:1 Changed 4 years ago by
 Component changed from PLEASE CHANGE to combinatorics
 Description modified (diff)
 Summary changed from weak_covers is a method of Permutations(4), but does not work to weak_covers is a method of Permutations(n), but does not work
 Type changed from PLEASE CHANGE to defect
comment:2 Changed 4 years ago by
 Branch set to public/combinat/permutation_descents_index_set23891
 Cc sagecombinat darij added
 Commit set to 370ae9220bc843dc2c1d161ee94be5199ff5c6e2
 Description modified (diff)
 Milestone changed from sage8.1 to sage8.2
 Status changed from new to needs_review
 Summary changed from weak_covers is a method of Permutations(n), but does not work to Permutation.descents does not take an index_set argument
comment:3 Changed 4 years ago by
+ By default, the descents are returned as elements in the + index set, i.e., starting at `1`. If you want them to + start at `0`, set the keyword ``from_zero`` to ``False``.
That should be "... to True
".
(twice).
comment:4 Changed 4 years ago by
 Commit changed from 370ae9220bc843dc2c1d161ee94be5199ff5c6e2 to a7b05fe11efad39ed7b62f84d9356ebd51c5a7f1
Branch pushed to git repo; I updated commit sha1. New commits:
a7b05fe  Fixing True and False statements.

comment:5 Changed 4 years ago by
Yes, right. Fixed.
comment:6 Changed 4 years ago by
LGTM. If the tests pass, positive review.
comment:7 Changed 4 years ago by
 Reviewers set to Darij Grinberg
 Status changed from needs_review to positive_review
comment:8 Changed 4 years ago by
 Branch changed from public/combinat/permutation_descents_index_set23891 to a7b05fe11efad39ed7b62f84d9356ebd51c5a7f1
 Resolution set to fixed
 Status changed from positive_review to closed
Note: See
TracTickets for help on using
tickets.
I also took the opportunity to remove the deprecation of
from_zero=True
default from #20555.New commits:
Add index_set to descents and removed deprecated from_zero=True default.