Question: Abstract (linear operators and) Lie algebras

Hello!

I want to use abstract linear operators between Lie algebras. I have the problem shown in the following short code:

with(LinearAlgebra): with(DifferentialGeometry): with(LieAlgebras):
LAr:=LieAlgebraData([ [e1,e2]=e3],[e1,e2,e3],LA);
DGsetup(LAr);
define(lin,linear);
lin(-e3);
lin(-LieBracket(e1,e2));
lin(LieBracket(e2,e1));

As you see, the minus "-" does not come out of the argument of lin() in the last line. What is going wrong?

Thanks!

-------------------------------------

Later on, I realized that the linear operator has nothing to do with the issue. The problem lies in the fact that the output of "LieBracket(e2,e1)" is "_DG([["vector", LA, []], [[[3], -1]]])" , where the latter "-1" refers to the coeffiecient. For some reason, this coefficient is not handled in the way I would expect. For example, the following two lines:

LieBracket(e2,e1)+LieBracket(e1,e2);
_DG([["vector", LA, []], [[[3], 1]]])+_DG([["vector", LA, []], [[[3], -1]]]);

give both as an output "e3+-e3" instead of "0", while both the lines

LieBracket(e2,e1) + LieBracket(e2,e1);
_DG([["vector", LA, []], [[[3], -1]]])+_DG([["vector", LA, []], [[[3], -1]]]);

give the output "2-e3" (which I interpret as "2(-e3)" ).

I don't understand what I am doing wrong.

Please Wait...