#13749: IntegerListsLex has finite issues
----------------------------------------------+-----------------------------
       Reporter:  tscrim                      |         Owner:  sage-combinat
           Type:  defect                      |        Status:  new          
       Priority:  major                       |     Milestone:  sage-5.6     
      Component:  combinatorics               |    Resolution:               
       Keywords:  finite sets, integer lists  |   Work issues:               
Report Upstream:  N/A                         |     Reviewers:               
        Authors:                              |     Merged in:               
   Dependencies:                              |      Stopgaps:               
----------------------------------------------+-----------------------------
Description changed by tscrim:

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=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()
 # Loops for forever
 sage: L.category()
 Category of sets

 sage: L2 = IntegerListsLex(NonNegativeIntegers(), max_length=3)
 sage: L2.is_finite()
 # Loops for forever
 sage: L2.category()
 Category of sets
 }}}
 The last two are not correct, and this would likely need moderate checking
 of combinations of the input arguments.

--

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/13749#comment:1>
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 post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sage-trac?hl=en.

Reply via email to