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=Dx−iDy, and insert this into the expression above and get sage to simplify it. If I had Di∈C, then this could I understand be done with the substitute
command. However, the Di are such that D1D2≠D2D1.
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 η:R3↦C.
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.