Processing math: 100%

First time here? Check out the FAQ!

Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

asked 3 years ago

9cco gravatar image

How to manipulate equations with non-commuting symbols

Hi, I'm very new to sage so I'm not really sure if this is possible to do. For simplicity let's say I want to define an equation D1D2η=κη,κC. Then for the symbols Di all I want to do is define new symbols like D1=Dx+iDy and D2=DxiDy, and insert this into the expression above and get sage to simplify it. If I had DiC, then this could I understand be done with the substitute command. However, the Di are such that D1D2D2D1.

Can I define D1 = var('D1', latex_name=r'D_1') in such a way that it will not commute when put into an expression for example by writing eq1 = D1*D2*eta == k*eta ?


Additional background

More specifically, Di are linear operators that act on functions η:R3C.

I understand FreeAlgebra somehow lets you define expressions based on non-commutative symbols, however I'm not very fluent in rings and abstract algebra so the language is a bit foreign to me. I tried to define

F.<eta,D1,D2> = FreeAlgebra(SR,3)
k = var('k', latex_name=r'\kappa')
eq1 = D1*D2*eta == I*eta*k

However, this just results in False. Not really what I wanted.