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.
DeclareNonCommutative[a, b]
AntiCommutator[a, b]
CommutatorExplicit[%]\{a,\medspace b\}
a.b+b.a
CommutatorExplicit[AntiCommutator[a + b, a - 2 b ]](a-2 b).(a+b)+(a+b).(a-2 b)
DotSimplify[AntiCommutator[a + b, a - 2 b ]]-a.b-b.a+2 a.a-4 b.b
DeclareNonCommutative[c, d, ct, dt]Defining {c,d} = z results in replacements of
c.d by z-d.c.
AntiCommutator[c, d] = z
DotSimplify[ d . c . d ]z
d z-d.d.c
AntiCommutator[dt, ct] = zt\text{zt}
DotSimplify[dt . ct . dt]\text{dt} \;\text{zt}-\text{ct}.\text{dt}.\text{dt}
UnDeclareNonCommutative[a, b, c, d, ct, dt]
UnDeclareAllAntiCommutators[]