Ticket #13203 (closed defect: fixed)
Promotion on Tableaux should force its argument to be an Integer.
| Reported by: | nthiery | Owned by: | sage-combinat |
|---|---|---|---|
| Priority: | major | Milestone: | sage-5.6 |
| Component: | combinatorics | Keywords: | tableaux, promotion |
| Cc: | sage-combinat, schilling | Work issues: | |
| Report Upstream: | N/A | Reviewers: | Nicolas M. Thiéry |
| Authors: | Frédéric Chapoton | Merged in: | sage-5.6.beta3 |
| Dependencies: | #13074 | Stopgaps: |
Description
The entries of a tableau are Integers::
sage: T = Tableau([[1]])
sage: type(T[0][0])
<type 'sage.rings.integer.Integer'>
This invariant should be preserved by inverse promotion::
sage: type(T.promotion_inverse(2)[0][0])
<type 'sage.rings.integer.Integer'>
But this is currently not if the input is a plain int::
sage: type(T.promotion_inverse(int(2))[0][0])
<type 'int'>
Attachments
Change History
comment:1 Changed 11 months ago by nthiery
- Cc schilling added
- Type changed from PLEASE CHANGE to defect
comment:2 Changed 10 months ago by chapoton
- Status changed from new to needs_review
- Authors changed from Anne Schilling to Frédéric Chapoton
comment:4 Changed 10 months ago by mhansen
Could you add
sage: type(T.promotion_inverse(int(2))[0][0])
<type 'sage.rings.integer.Integer'>
as a doctest?
comment:7 Changed 8 months ago by nthiery
I just had a look, and this sounds good. For consistency, can you put spaces on both sides of the = sign, and move this line just after the is_rectangular test (putting together all the argument checks/preprocessing).
Once done, you can set a positive review on my behalf (where is the patchbot?)
Ah: it depends syntactically on #13074. I just moved your patch right after it in the queue; please run the tests with them applied.
Thanks!
Cheers,
Nicolas
comment:8 Changed 8 months ago by chapoton
I have made the changes, and the tests pass. I do not understand whether I should add the dependency to #13074 or not.
comment:9 Changed 8 months ago by nthiery
- Status changed from needs_review to positive_review
Unless you commute this patch past #13074, yes it should be a dependency (done)
comment:13 Changed 4 months ago by jdemeyer
- Status changed from positive_review to closed
- Resolution set to fixed
- Merged in set to sage-5.6.beta3

