Hi, On Wed, Jan 09, 2013 at 06:08:13AM -0800, Jean-Baptiste Priez wrote: > I propose a patch > (trac_13935_coercion_of_coproduct_of_Hopf_algebra-EliX-jbp.patch) to > coerce elements like: > > Let F[2,1,3] be an element of the fundamental basis of > the FreeQuasiSymmetric functions Hopf algebra (FQSym) and G an other > basis. > > sage: G(F[2,1,3].coproduct()) > > G[] # G[2, 1, 3] + G[1] # G[1, 2] + G[2, 1] # G[1] + G[2, 1, 3] # G[] > > Some one may be must move my code (in Categories i think or anywhere)...
I just discussed with Jean-Baptiste. I see the merit of this short and reasonably meaningful syntax. But on the other hand it deviates from the standard semantic of P(x) which is to convert/coerce x to an element of P. I would recommend instead to use something like: sage: GG = G.tensor_square() sage: GG(F[2,1,3].coproduct()) Then what remains to implement is: - tensor products of module morphisms - an appropriate P._coerce_map_from(P1) in CombinatorialFreeModule_Tensor which, if - P is the tensor product of A,B, ... - P1 is the tensor product of A1,B1, ... - there are morphisms A1->A, B1->B, ... returns the induced morphism P1->P I remember discussing this already. With whom? Do we have a ticket? 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.