#13979: Make CartesianProduct_iter a proper Parent
------------------------------------+---------------------------------------
       Reporter:  cnassau           |         Owner:  sage-combinat
           Type:  defect            |        Status:  needs_review 
       Priority:  major             |     Milestone:  sage-5.7     
      Component:  combinatorics     |    Resolution:               
       Keywords:                    |   Work issues:               
Report Upstream:  N/A               |     Reviewers:               
        Authors:  Christian Nassau  |     Merged in:               
   Dependencies:                    |      Stopgaps:               
------------------------------------+---------------------------------------
Description changed by cnassau:

Old description:

> The following is currently broken:
>
> {{{#!python
> sage: M=CombinatorialFreeModule(GF(3),Integers())
> sage: N=tensor((M,))
> sage: cartesian_product((N,N))
> Traceback (most recent call last):
> ...
> TypeError: len() of unsized object
> }}}
>
> The attached patch fixes this.

New description:

 In Sage 5.7.beta4 the class `CartesianProduct_iter` is still a
 `CombinatorialClass`. Furthermore, the cartesian product can't handle
 infinite sets as factors. As a consequence the following is currently
 broken:

 {{{#!python
 sage: M=CombinatorialFreeModule(GF(3),Integers())
 sage: N=tensor((M,))
 sage: cartesian_product((N,N))
 Traceback (most recent call last):
 ...
 TypeError: len() of unsized object
 }}}

 The attached patch
    * derives `CartesianProduct_iter` from `EnumeratedSetFromIterator`
 instead
    * adds doctests to verify that the TestSuites work
    * makes sure that infinite factors are properly handled

--

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/13979#comment:4>
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 http://groups.google.com/group/sage-trac?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to