Opened 8 years ago

Last modified 5 years ago

#13749 new defect

IntegerListsLex has finite issues

Reported by: tscrim Owned by: sage-combinat
Priority: major Milestone: sage-6.4
Component: combinatorics Keywords: finite sets, integer lists
Cc: Merged in:
Authors: Reviewers:
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: #13605 Stopgaps:

Description (last modified by jakobkroeker)

IntegerListsLex has some issues with finiteness:

sage: L = IntegerListsLex(NonNegativeIntegers(), max_length=3, ceiling=lambda i: 3)
sage: L
Integer lists of sum in <class 'sage.sets.non_negative_integers.NonNegativeIntegers'> satisfying certain constraints
sage: for x in L:
....:
[]
[1]
[0, 1]
[0, 0, 1]
...
[3, 3, 2]
[3, 2, 3]
[2, 3, 3]
[3, 3, 3]
# Continues looping for forever (which I guess is okay)
sage: L.is_finite()
True
sage: L.category()
Category of finite enumerated sets

sage: L2 = IntegerListsLex(NonNegativeIntegers(), max_length=3)                   
sage: L2.is_finite()
True
sage: L2.category()
Category of finite enumerated sets

The last two are not correct, and this would likely need moderate checking of combinations of the input arguments.

Change History (9)

comment:1 Changed 8 years ago by tscrim

  • Description modified (diff)

comment:2 Changed 8 years ago by tscrim

  • Dependencies set to #13605
  • Description modified (diff)

Without #13605 applied, the is_finite() loops for forever and the category is just Category of sets.

Last edited 8 years ago by tscrim (previous) (diff)

comment:3 Changed 7 years ago by jdemeyer

  • Milestone changed from sage-5.11 to sage-5.12

comment:4 Changed 7 years ago by vbraun_spam

  • Milestone changed from sage-6.1 to sage-6.2

comment:5 Changed 7 years ago by vbraun_spam

  • Milestone changed from sage-6.2 to sage-6.3

comment:6 Changed 6 years ago by vbraun_spam

  • Milestone changed from sage-6.3 to sage-6.4

comment:7 Changed 5 years ago by jakobkroeker

  • Description modified (diff)

comment:8 Changed 5 years ago by jakobkroeker

is this issue fixed meanwhile?

L.is_finite()  # is false with recent sage
L2.is_finite() # is false with recent sage

comment:9 Changed 5 years ago by tscrim

Now the first answer is wrong.

Note: See TracTickets for help on using tickets.