#19555: Implement a containment for cartesian_product
-------------------------------------+-------------------------------------
       Reporter:  tscrim             |        Owner:  sage-combinat
           Type:  enhancement        |       Status:  needs_review
       Priority:  major              |    Milestone:  sage-6.10
      Component:  combinatorics      |   Resolution:
       Keywords:                     |    Merged in:
        Authors:  Travis Scrimshaw   |    Reviewers:
Report Upstream:  N/A                |  Work issues:
         Branch:                     |       Commit:
  public/sets/contains_cartesian_product-19555|  
7466511b9ba67f2d6b8985fa0f4c641fb9e58978
   Dependencies:                     |     Stopgaps:
-------------------------------------+-------------------------------------
Changes (by tscrim):

 * status:  needs_info => needs_review


Comment:

 Replying to [comment:6 vdelecroix]:
 > 1. What is the rationale for having tuple being considered as elements
 of the cartesian product?

 They are just wrappers around tuples, and at times, it is beneficial to
 not wrap/unwrap such objects, such as if the Cartesian product is the set
 of keys of a dict/Family.

 > 2. With this version `__contains__` and `Element.__eq__` are not
 compatible
 > {{{
 > sage: (1,1) in C
 > True
 > sage: any(x == (1,1) for x in C)
 > False
 > }}}

 Good point. I added equality of tuples.

--
Ticket URL: <http://trac.sagemath.org/ticket/19555#comment:8>
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.
For more options, visit https://groups.google.com/d/optout.

Reply via email to