Bonjour Frédéric!

On Fri, Oct 22, 2010 at 10:12:57AM +0200, Frédéric Chapoton wrote:
> ... About posets in Sage ...
>
> j'ai vu que Christian Stump fait des choses sur les posets. Il me
> semble que Franco Saliola avait aussi fait des trucs. J'ai moi aussi
> fait un petit patch sur les posets, dont je me sers intensivement.
> En gros, il me semble voir des posets dans les patches suivants:
> 
> (A) trac_6641-poset_antichains_backtracker.patch
> (B) addon_poset_antichains_backtracker-cs.patch
> (C) trac_10065_smaller_poset_improvements-cs.patch
> (D) posets_Jposet_ARmatrix_fc.patch
> 
> et aussi marginalement dans
> 
> poset-from-tree-fc.patch
> parking_functions_posets-fh.patch
> 
> Est-ce que ce ne serait pas bien de creer un rubrique "poset" dans
> la liste des patches, ou de fusionner certain de ces patches (je
> pense a (A),(B),(D)), ou de creer un ou des tickets sur les posets
> en general ou les antichaines en particulier ?

At first sight, those patches are fairly straightforward (i.e.
raising no specific design issue) and basically done. So the best
would be to create tickets for those that don't have one assigned, and
aim at merging them into Sage sometime soon.

Would you volunteer to review a couple once they are finished?  Even a
prereview, with a pointer at what remains to be checked is very
useful.

> Par ailleurs, j'aimerais bien pouvoir utiliser librement le produit
> de posets. J'ai deja codé ca en quelques lignes pour mon usage
> perso, mais peut-etre que ca peut s'integrer dans la "categorie" des
> posets.

That definitely would fit naturally withing the category of
posets. However this category does not yet exists, even though many of
us already dreamed of it. Please create two tickets for:

 - creating the Posets category
 - implementing the cartesian product (in the posets code, or directly
   in the category depending on the timing).

Any volunteer to create that category?

                                Nicolas

Btw: here are a couple related experimental functions that I wrote
recently for an urgent need, and did not yet get the time to put into
a patch. Anyone, feel free to recycle!


def hasse_diagram_on_element(poset):
    G = poset.hasse_diagram()
    G.relabel(dict([x, x.element] for x in poset))
    return G

def poset_concatenation(P, Q):
    P = hasse_diagram_on_element(P)
    Q = hasse_diagram_on_element(Q)
    G = P.disjoint_union(Q)
    G.add_edges([p,q] for p in P.vertices() for q in Q.vertices())
    return Poset(G)

def lattice_join_irreducibles(self):
    return [x for x in self if len(self.lower_covers(x)) <= 1]

def lattice_join_irreducibles_poset(self):
    return self.subposet(self.join_irreducibles())

def poset_is_tree(self):
    return all(len(self.lower_covers(x)) <= 1 for x in self)

sage.combinat.posets.lattices.FiniteLatticePoset.join_irreducibles = 
lattice_join_irreducibles
sage.combinat.posets.lattices.FiniteLatticePoset.join_irreducibles_poset = 
lattice_join_irreducibles_poset
sage.combinat.posets.posets.FinitePoset.is_tree = poset_is_tree



--
Nicolas M. Thiéry "Isil" <nthi...@users.sf.net>
http://Nicolas.Thiery.name/

-- 
You received this message because you are subscribed to the Google Groups 
"sage-combinat-devel" group.
To post to this group, send email to sage-combinat-de...@googlegroups.com.
To unsubscribe from this group, send email to 
sage-combinat-devel+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sage-combinat-devel?hl=en.

Reply via email to