#18757: Poset catalog: Element type of BooleanLattice, IntegerCompositions and
IntegerPartitions
---------------------------------+-----------------------------
       Reporter:  jmantysalo     |        Owner:
           Type:  defect         |       Status:  new
       Priority:  minor          |    Milestone:  sage-wishlist
      Component:  combinatorics  |   Resolution:
       Keywords:  posets         |    Merged in:
        Authors:                 |    Reviewers:
Report Upstream:  N/A            |  Work issues:
         Branch:                 |       Commit:
   Dependencies:                 |     Stopgaps:
---------------------------------+-----------------------------
Description changed by jmantysalo:

Old description:

> {{{
> print type(Posets.IntegerPartitions(3)[1])
> print type(Posets.IntegerCompositions(3)[1])
> print type(Posets.BooleanLattice(3)[1])
> }}}
>
> says
>
> {{{
> <type 'tuple'>
> <class
> 'sage.combinat.composition.Compositions_n_with_category.element_class'>
> <type 'sage.rings.integer.Integer'>
> }}}
>
> This seems unlogical. There is a class for integer partitions just like
> integer compositions. Also why don't `BooleanLattice(n)` return poset
> with (sub)sets as an elements? Of course there could be parameter like
> `elements='integers'` in all three.

New description:

 {{{
 print type(Posets.IntegerPartitions(3)[1])
 print type(Posets.IntegerCompositions(3)[1])
 print type(Posets.BooleanLattice(3)[1])
 }}}

 says

 {{{
 <type 'tuple'>
 <class
 'sage.combinat.composition.Compositions_n_with_category.element_class'>
 <type 'sage.rings.integer.Integer'>
 }}}

 This seems unlogical. There is a class for integer partitions just like
 integer compositions. Also why don't `BooleanLattice(n)` return poset with
 (sub)sets as an elements? Of course there could be parameter like
 `elements='integers'` in all three.

 And more, why don't `IntegerCompositions()` return a lattice instead of
 poset? Or should all functions have an argument for this, i.e. like
 `PentagonPoset(type='poset')`?

--

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