Opened 4 years ago
Closed 3 years ago
#15958 closed defect (fixed)
Bug in Partition Algebras
Reported by: | Bruce | Owned by: | Bruce |
---|---|---|---|
Priority: | minor | Milestone: | sage-6.2 |
Component: | combinatorics | Keywords: | |
Cc: | tscrim, sage-combinat | Merged in: | |
Authors: | Bruce Westbury | Reviewers: | Darij Grinberg, Chwas Ahmed |
Report Upstream: | N/A | Work issues: | |
Branch: | 92d3350 (Commits) | Commit: | 92d3350ed305fe53fcf4eda491138b32b2bd4278 |
Dependencies: | Stopgaps: |
Description
There is a bug in the implementation of the product in partition algebras.
sage: A = PartitionAlgebra(1,17) sage: g = SetPartitionsAk(1).list() sage: a = A[g[1]] sage: a P[{{-1}, {1}}] sage: a*a P[{{-1}, {1}}]
This should return
17*P[{{-1}, {1}}]
Change History (16)
comment:1 Changed 4 years ago by
- Type changed from PLEASE CHANGE to defect
comment:2 Changed 4 years ago by
- Component changed from PLEASE CHANGE to combinatorics
comment:3 Changed 4 years ago by
- Branch set to u/Bruce/ticket/15958
- Created changed from 03/17/14 10:42:04 to 03/17/14 10:42:04
- Modified changed from 03/17/14 11:43:18 to 03/17/14 11:43:18
comment:4 Changed 4 years ago by
- Commit set to 70747fb6fa10db18414a9e49e06f3769c7e17eb0
comment:5 Changed 4 years ago by
- Status changed from new to needs_review
comment:6 Changed 4 years ago by
- Branch changed from u/Bruce/ticket/15958 to public/ticket/15958
- Commit changed from 70747fb6fa10db18414a9e49e06f3769c7e17eb0 to 92d3350ed305fe53fcf4eda491138b32b2bd4278
comment:7 Changed 4 years ago by
- Cc tscrim sage-combinat added
Good catch! I've improved it a bit. First of all, bugs fixed should be doctested to ensure that they don't reappear when someone later copies bad code (or for other reasons). Second, there is no good reason to check for len(part_list) > 0
after a call to part_list[0]
; that test should have been removed rather than corrected. (By the way, this was already inside an if len(part_list) > 0
clause...) Finally, the code is (for some reason) duplicated in partition_algebra.py
; I don't have the time to track down the reasons of this duplication, but I've fixed the bug over there as well.
Bad news is that someone else will have to review this ticket now. :)
comment:8 Changed 4 years ago by
- Owner changed from (none) to Chwas
comment:9 in reply to: ↑ description Changed 4 years ago by
I think you are right about the bug, and I will try to review it.
comment:10 Changed 3 years ago by
Any progress? Hello?
comment:11 Changed 3 years ago by
- Owner changed from Chwas to (none)
comment:12 Changed 3 years ago by
- Status changed from needs_review to positive_review
comment:13 Changed 3 years ago by
- Owner changed from (none) to Bruce
- Reviewers set to Darij Grinberg,
Chwas, please add your real name to the reviewers.
comment:14 Changed 3 years ago by
- Reviewers changed from Darij Grinberg, to Darij Grinberg, Chwas
comment:15 Changed 3 years ago by
- Reviewers changed from Darij Grinberg, Chwas to Darij Grinberg, Chwas Ahmed
comment:16 Changed 3 years ago by
- Branch changed from public/ticket/15958 to 92d3350ed305fe53fcf4eda491138b32b2bd4278
- Resolution set to fixed
- Status changed from positive_review to closed
Branch pushed to git repo; I updated commit sha1. New commits:
Fixed an error