Hi Florent,

I think the polynomial ring model should translate well
to the non-commutative free algebras.  In addition to
access, specifying a (non-commutative) monomial
ordering would be desirable.  Generalizing these
orderings is the only challenge in the generalization
from free commutative algebras.

For performance, one might want to use the same idea
of a dictionary directly and have both free mononoids
and free algebras use this.  I think I strongly tied these
two classes together, but this could be weakened while
preserving the sharing of code.

On the subject of orders, Sage, like Magma, allow one
to specify the monomial ordering, but use the reverse
ordering for printing:

magma: P<x,y> := PolynomialRing(QQ,2);
magma: B := [ 1, x, x^2, y, x*y ];
magma: Sort(B);
[
    1,
    y,
    x,
    x*y,
    x^2
]
magma: &+B;
x^2 + x*y + x + y + 1

sage: P.<x,y> = PolynomialRing(QQ,2)
sage: B = [ 1, x, x^2, y, x*y ]
sage: B.sort()
sage: B
[1, y, x, x*y, x^2]
sage: sum(B)
x^2 + x*y + x + y + 1

It would be desirable to be able to specify the printing
order (whether 'reverse' or not).   In the context of
completions, a left-to-right printing is preferable:

sage: P.<x> = PolynomialRing(QQ)
sage: S.<t> = PowerSeriesRing(QQ)
sage: f = x^7 + x + 1
sage: f
x^7 + x + 1
sage: S(f)
1 + t + t^7

This could be controlled by a simple flag.

Cheers,

David

--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to 
sage-devel-unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to