FCCommutator[x, y] = c defines the commutator between
the (non-commuting) objects x and y.
Overview, FCAntiCommutator, CommutatorExplicit, DeclareNonCommutative, DotSimplify.
DeclareNonCommutative[a, b, c, d]FCCommutator[a, b]
CommutatorExplicit[%][a,b]
a.b-b.a
DotSimplify[FCCommutator[a + b, c + d]]
UnDeclareNonCommutative[a, b, c, d]a.c-c.a+a.d-d.a+b.c-c.b+b.d-d.b
Verify the Jacobi identity.
\[Chi] = FCCommutator; 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]]
UnDeclareNonCommutative[x, y, z]