AntiCommutator[x, y] = c
defines the anti-commutator of
the non commuting objects x
and y
.
Overview, Commutator, CommutatorExplicit, DeclareNonCommutative, DotSimplify.
This declares a
and b
as noncommutative
variables.
[a, b]
DeclareNonCommutative
[a, b]
AntiCommutator
[%] CommutatorExplicit
\{a,\medspace b\}
a.b+b.a
[AntiCommutator[a + b, a - 2 b ]] CommutatorExplicit
(a-2 b).(a+b)+(a+b).(a-2 b)
[AntiCommutator[a + b, a - 2 b ]] DotSimplify
-a.b-b.a+2 a.a-4 b.b
[c, d, ct, dt] DeclareNonCommutative
Defining {c,d} = z
results in replacements of
c.d
by z-d.c.
[c, d] = z
AntiCommutator
[ d . c . d ] DotSimplify
z
d z-d.d.c
[dt, ct] = zt AntiCommutator
\text{zt}
[dt . ct . dt] DotSimplify
\text{dt} \;\text{zt}-\text{ct}.\text{dt}.\text{dt}
[a, b, c, d, ct, dt]
UnDeclareNonCommutative
[] UnDeclareAllAntiCommutators