Commutator[x, y] = c
defines the commutator between the (non-commuting) objects x
and y
.
Overview, AntiCommutator, CommutatorExplicit, DeclareNonCommutative, DotSimplify.
[a, b, c, d] DeclareNonCommutative
[a, b]
Commutator
[%] CommutatorExplicit
[a,b]
a.b-b.a
[Commutator[a + b, c + d]]
DotSimplify
[a, b, c, d] UnDeclareNonCommutative
a.c-c.a+a.d-d.a+b.c-c.b+b.d-d.b
Verify the Jacobi identity.
\[Chi] = Commutator; DeclareNonCommutative[x, y, z];
\[Chi][x, \[Chi][y, z]] + \[Chi][y, \[Chi][z, x]] + \[Chi][z, \[Chi][x, y]]
[%] DotSimplify
[x,[y,z]]+[y,[z,x]]+[z,[x,y]]
0
Clear[\[Chi]]
[x, y, z] UnDeclareNonCommutative