#17053: Add function for direct sum of posets
-----------------------------+---------------------------------
   Reporter:  jmantysalo     |            Owner:
       Type:  enhancement    |           Status:  new
   Priority:  major          |        Milestone:  sage-wishlist
  Component:  combinatorics  |         Keywords:
  Merged in:                 |          Authors:
  Reviewers:                 |  Report Upstream:  N/A
Work issues:                 |           Branch:
     Commit:                 |     Dependencies:
   Stopgaps:                 |
-----------------------------+---------------------------------
 Sage has no function for direct sum of posets. What kind of function it
 should be?

 Let's say that poset `P` has elements `a` and `b`, `Q` has elements `c`
 and `d`. Then sum on P and Q could have elements

 1) a,b,c,d. Function would check that there are no common elements.
 2) (1,a),(1,b),(2,c),(2,c). Optional parameter would change first element
 of tuples.
 3) 0,1,2,3. Function would just make poset isomorphic to P+Q with integer
 elements.

 Now, it would be nice to have also sum of arbitrary number of posets. So
 function could be something like

 `P.direct_sum(Q)` (case 1 as default?)

 `P.direct_sum(Q, labeling='default')` (case 2 / default)

 `P.direct_sum(Q, labeling=lambda n: chr(ord('a')+n))` (case 2 / non-
 default)

 `P.direct_sum(Q, labeling='plain')` (case 3)

 and if possible, accept something like

 `P1.direct_sum(P2, P3, P4, labeling=...)`

 Does this sound reasonable?

--
Ticket URL: <http://trac.sagemath.org/ticket/17053>
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