On Sun, Jun 30, 2013 at 04:52:18PM -0700, Matthieu Deneufchâtel wrote:
>    I try to implement the Poincare-Birkhoff-Witt basis of the free algebra. 
>    I defined the elements of this basis and a function which gives the
>    expansion of an element of the free algebra on this basis; actually, it
>    returns a dictionary whose keys are monomials and whose values are the
>    corresponding coefficients.
>    I would like to define a new basis of the free algebra, but I don't know
>    which structure I should use. Is there a "canonical way"? Should I use a
>    CombinatorialFreeModule?
>    There might be some documentation I should have read before asking any
>    question. Please tell me where I should have a look.

Sounds like a good candidate for having a:

        class PoincareBirkhoffWittBasisOfFreeAlgebra(CombinatorialFreeModule):
            ...

and making your change of basis function into a morphism. And possibly
a shortcut:

        sage: F = FreeAlgebra(...)
        sage: PBW = F.poincare_birkhof_witt_basis()

In the long run, if more bases come in, you might consider having a
"FreeAlgebraWithRealizations" similar to Sym with its several bases.

A natural starting point in the documentation is:

        
http://combinat.sagemath.org/doc/thematic_tutorials/tutorial-implementing-algebraic-structures.html

with its prerequisite:

        
http://combinat.sagemath.org/doc/reference/modules/sage/modules/tutorial_free_modules.html

Good luck!
                                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-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to