Skip to content

polytope.integral_points inconsistent in returning hashable vectors #35321

Open
@nbruin

Description

@nbruin

Is there an existing issue for this?

  • I have searched the existing issues for a bug report that matches the one I want to file, without success.

Did you read the documentation and troubleshoot guide?

  • I have read the documentation and troubleshoot guide

Environment

- **Sage Version**: 9.8

Steps To Reproduce

P=Polyhedron([(1,0,0),(0,0,0),(0,1,0),(0,0,1)])
set((P).integral_points()) # works fine
set((10*P).integral_points()) # works fine
set((50*P).integral_points()) # unhashable vector error

Expected Behavior

One would expect both commands to succeed or fail in the same way. The problem comes from the threshold: for small polyhedra, the system uses naive integer vector enumeration to find the ones that fit in the box. The vectors returned by that routine are immutable. Above the threshold, other enumeration techniques are used, many (all?) of which do not return mutable vectors. It would be preferable if the system were consistent, because a threshold-related error may easily be missed in (small) test cases.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions