On Wed, May 19, 2010 at 02:25:22PM -0700, John Palmieri wrote: > Suppose I want to define a new algebra in Sage. What should I do? > > - I have followed the nice coercion docs in the reference manual, and > in particular, I've set up _add_, _mul_, etc.; and also > _coerce_map_from_ and _element_constructor_. > > - Should I do anything with the new categories framework? I've > defined a "category" method for the algebra, but should I do anything > else? > > - I'm working on a differential graded algebra, in fact. It is a > "graded algebra with basis" (and it's actually Z x Z graded, so a > "bigraded algebra with basis"); do I need to do anything special about > this? I've defined a "basis" method already which returns the basis > in each bidegree as a Python list. > > - I suppose we should have a general class of differential graded > algebras, but I don't have the time to work on it right now... > > If anyone wants to take a look: > > <http://sage.math.washington.edu/home/palmieri/misc/lambda_algebra.patch>
As a short first answer, please try: sage: A = AlgebrasWithBasis(QQ).example() sage: A An example of an algebra with basis: the free algebra on the generators ('a', 'b', 'c') over Rational Field sage: A?? And then get back to us with more questions! Cheers, Nicolas -- Nicolas M. ThiƩry "Isil" <nthi...@users.sf.net> http://Nicolas.Thiery.name/ -- To post to this group, send an email to sage-devel@googlegroups.com To unsubscribe from this group, send an email to sage-devel+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-devel URL: http://www.sagemath.org