#13749: IntegerListsLex has finite issues
----------------------------------------------+----------------------------
Reporter: tscrim | Owner: sage-
| combinat
Type: defect | Status: new
Priority: major | Milestone: sage-6.4
Component: combinatorics | Resolution:
Keywords: finite sets, integer lists | Merged in:
Authors: | Reviewers:
Report Upstream: N/A | Work issues:
Branch: | Commit:
Dependencies: #13605 | Stopgaps:
----------------------------------------------+----------------------------
Description changed by jakobkroeker:
Old description:
> `IntegerListsLex` has some issues with finiteness:
> {{{
> sage: L = IntegerListsLex(NonNegativeIntegers(), max_length=3,
> ceiling=lamabda 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.
New description:
`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.
--
--
Ticket URL: <https://trac.sagemath.org/ticket/13749#comment:7>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.