Hi,

I wish to simplify some calculation that appear in quantum mechanics. To 
begin we use non-commutative variables as -

sage: R.<a,b> = FreeAlgebra(QQ, 2)
sage: (a+b)^3 + a*(a+b)
a^2 + a*b + a^3 + a^2*b + a*b*a + a*b^2 + b*a^2 + b*a*b + b^2*a + b^3

I want to impose the commutation relation [a,b]=1 and bring the expression 
to normal form (i.e. in all terms b appears before a, e.g. a*b gets replaced 
by b*a + 1). Is it possible to do this? If not then can I get the expression 
such that a*b^2 appears as a*b*b? If the later can be done then I can use 
some string manipulation hack and get my job done.

Thanks in advance.

Regards,
Rajeev

-- 
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org

Reply via email to