Opened 12 months ago
Closed 10 months 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 12 months ago by Bruce
- Type changed from PLEASE CHANGE to defect
comment:2 Changed 12 months ago by Bruce
- Component changed from PLEASE CHANGE to combinatorics
comment:3 Changed 12 months ago by Bruce
- Branch set to u/Bruce/ticket/15958
- Created changed from 03/17/14 03:42:04 to 03/17/14 03:42:04
- Modified changed from 03/17/14 04:43:18 to 03/17/14 04:43:18
comment:4 Changed 12 months ago by git
- Commit set to 70747fb6fa10db18414a9e49e06f3769c7e17eb0
comment:5 Changed 12 months ago by Bruce
- Status changed from new to needs_review
comment:6 Changed 12 months ago by darij
- Branch changed from u/Bruce/ticket/15958 to public/ticket/15958
- Commit changed from 70747fb6fa10db18414a9e49e06f3769c7e17eb0 to 92d3350ed305fe53fcf4eda491138b32b2bd4278
comment:7 Changed 12 months ago by darij
- 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 11 months ago by Chwas
- Owner set to Chwas
comment:9 in reply to: ↑ description Changed 11 months ago by Chwas
I think you are right about the bug, and I will try to review it.
comment:10 Changed 10 months ago by darij
Any progress? Hello?
comment:11 Changed 10 months ago by Chwas
- Owner Chwas deleted
comment:12 Changed 10 months ago by Chwas
- Status changed from needs_review to positive_review
comment:13 Changed 10 months ago by tscrim
- Owner set to Bruce
- Reviewers set to Darij Grinberg,
Chwas, please add your real name to the reviewers.
comment:14 Changed 10 months ago by Chwas
- Reviewers changed from Darij Grinberg, to Darij Grinberg, Chwas
comment:15 Changed 10 months ago by Chwas
- Reviewers changed from Darij Grinberg, Chwas to Darij Grinberg, Chwas Ahmed
comment:16 Changed 10 months ago by vbraun
- 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: