On Fri, Mar 04, 2011 at 02:44:06AM -0800, Volker Braun wrote: > One problem is that we don't have toric morphisms implemented yet (Though > the convex geometry FanMorphism is done). Partly because I have no idea > how the category framework should be used to implement them. So we can't > implement the summand_projection yet.
summand_projection can return a plain python function. Actually, this is what sage.sets.cartesian_product.CartesianProduct.summand_projection does (in that case, it just delegates the work to the summand_projection method of the elements). That being said, building a morphism from a python function is as easy as: sage: F = ZZ sage: G = QQ sage: f = sage.categories.morphism.SetMorphism(Hom(F, G, category=Semigroups()), lambda x: x/2) sage: f(3) 3/2 (Note: Simon King is currently working hard on morphisms and in particular their documentation, so the situation should improve!). > Is there anything wrong with just overriding cartesian_product to return > the Cartesian product without the extra structure for now, and then > implement the extra structure later? As long as it is documented as a missing feature (typically by showing the warning that TestSuite should issue), that sounds ok. Cheers, Nicolas -- 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-devel@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.