Ticket #11165 (closed enhancement: fixed)
core and quotient of partitions should be partitions
| Reported by: | hivert | Owned by: | sage-combinat |
|---|---|---|---|
| Priority: | major | Milestone: | sage-4.7.1 |
| Component: | combinatorics | Keywords: | partitions core quotient |
| Cc: | sage-combinat | Work issues: | |
| Report Upstream: | N/A | Reviewers: | Mike Hansen |
| Authors: | Florent Hivert | Merged in: | sage-4.7.1.alpha3 |
| Dependencies: | Stopgaps: |
Description
Currently the methods core and quotient returns respectively a list and a list of list:
sage: Partition([7,7,5,3,3,3,1]).core(3) [1, 1] sage: type(Partition([7,7,5,3,3,3,1]).core(3)) <type 'list'> sage: sage: Partition([7,7,5,3,3,3,1]).quotient(3) [[2], [1], [2, 2, 2]] sage: type(Partition([7,7,5,3,3,3,1]).quotient(3)[0]) <type 'list'>
Mathematically, those lists are partitions and moreover list are not hashable. As a consequence, in most use we have no choice but to change them to partitions. So after the patch, core should returns a partition and quotient a tuple of partitions.
Attachments
Change History
comment:1 Changed 2 years ago by hivert
- Status changed from new to needs_review
Patch ready for review
comment:2 Changed 2 years ago by mhansen
- Status changed from needs_review to positive_review
- Reviewers set to Mike Hansen
Looks good to me.
Note: See
TracTickets for help on using
tickets.

