Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stopgap for IntegerListsLex #17637

Closed
nathanncohen mannequin opened this issue Jan 15, 2015 · 13 comments
Closed

Stopgap for IntegerListsLex #17637

nathanncohen mannequin opened this issue Jan 15, 2015 · 13 comments

Comments

@nathanncohen
Copy link
Mannequin

nathanncohen mannequin commented Jan 15, 2015

As reported on #17548, the class IntegerListsLex returns wrong result. Until this is fixed, we need a stopgap to warn users.

Component: combinatorics

Author: Nathann Cohen

Branch: 5f00624

Reviewer: Jeroen Demeyer

Issue created by migration from https://trac.sagemath.org/ticket/17637

@nathanncohen nathanncohen mannequin added this to the sage-6.5 milestone Jan 15, 2015
@nathanncohen
Copy link
Mannequin Author

nathanncohen mannequin commented Jan 15, 2015

Branch: public/17637

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Jan 15, 2015

Branch pushed to git repo; I updated commit sha1. New commits:

5f00624trac #17637: Stopgap for IntegerListsLex

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Jan 15, 2015

Commit: 5f00624

@jdemeyer
Copy link

jdemeyer commented Feb 7, 2015

comment:3

Since #17548 is about min_slope, shouldn't the warning be only if the min_slope argument was given?

@nathanncohen
Copy link
Mannequin Author

nathanncohen mannequin commented Feb 7, 2015

comment:4

Since #17548 is about min_slope, shouldn't the warning be only if the min_slope argument was given?

In the code, it is said that the constraints are "assumed to be correct". I have no idea what happens if min_slope is not defined by max_slope is, or max_part or anything. If you believe that there is a situation in which the code will never return anything wrong you can adapt the error message.

Nathann

@nathanncohen
Copy link
Mannequin Author

nathanncohen mannequin commented Feb 7, 2015

comment:6

Thanks

Nathann

@vbraun
Copy link
Member

vbraun commented Feb 8, 2015

comment:7

Reviewer name missing

@jdemeyer
Copy link

jdemeyer commented Feb 8, 2015

Reviewer: Jeroen Demeyer

@vbraun
Copy link
Member

vbraun commented Feb 8, 2015

Changed branch from public/17637 to 5f00624

@anneschilling
Copy link

comment:10

As far as I can see from #17548 there are actually no known bugs with regards to IntegerListsLex. So I find it a total overreaction to put a stopgap as the limitations of IntegerListsLex are correctly documented. Now warnings appear in many parts of the code which are completely unrelated to this issue (and as I said, there does not appear to be a bug). For example

sage: K = crystals.KirillovReshetikhin(['D',4,1],1,1)
/Applications/sage/local/lib/python2.7/site-packages/sage/combinat/partition.py:4827:
********************************************************************************
This code contains bugs and may be mathematically unreliable.
This issue is being tracked at https://github.com/sagemath/sage-prod/issues/17548.
********************************************************************************

or

sage: Partitions(3,max_part=2)
/Applications/sage/local/lib/python2.7/site-packages/sage/combinat/partition.py:6622:
********************************************************************************
This code contains bugs and may be mathematically unreliable.
This issue is being tracked at https://github.com/sagemath/sage-prod/issues/17548.
********************************************************************************
Partitions of 3 having parts less than or equal to 2

both of which are totally fine!

Best,

Anne

@anneschilling
Copy link

Changed commit from 5f00624 to none

@nathanncohen
Copy link
Mannequin Author

nathanncohen mannequin commented Mar 5, 2015

comment:11

Dear Anne,

As far as I can see from #17548 there are actually no known bugs with regards to IntegerListsLex.

What about those examples from #17548 ?

sage: Partitions(5, min_slope=1).list()
ValueError: [2, 4] is not a valid partition
sage: IntegerListsLex(5, length=3, max_slope=0).list()   # 0 is allowed in the partition
[[5, 0, 0], [4, 1, 0], [3, 2, 0], [3, 1, 1], [2, 2, 1]]
sage: IntegerListsLex(5, max_slope=0).list()             # now its not
[[5], [4, 1], [3, 2], [3, 1, 1], [2, 2, 1], [2, 1, 1, 1], [1, 1, 1, 1, 1]]

I will answer other points on #17898.

Nathann

@anneschilling
Copy link

comment:12

Replying to @nathanncohen:

Dear Anne,

As far as I can see from #17548 there are actually no known bugs with regards to IntegerListsLex.

What about those examples from #17548 ?

sage: Partitions(5, min_slope=1).list()
ValueError: [2, 4] is not a valid partition
sage: IntegerListsLex(5, length=3, max_slope=0).list()   # 0 is allowed in the partition
[[5, 0, 0], [4, 1, 0], [3, 2, 0], [3, 1, 1], [2, 2, 1]]
sage: IntegerListsLex(5, max_slope=0).list()             # now its not
[[5], [4, 1], [3, 2], [3, 1, 1], [2, 2, 1], [2, 1, 1, 1], [1, 1, 1, 1, 1]]

I will answer other points on #17898.

Nathann

Read the answers that Travis gave on that ticket. They are consistent with the specifications or bad user input.

Anne

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants