# Trace of Gamma Matrices?

Is there any command/package for computing the traces of gamma matrices using Cadabra? Or if it can be calculated in a simple way with existing commands? If not, it would be a really great addition for doing computations. Thanks in advance for either of the cases.

+1 vote

{\mu,\nu,\rho,\sigma}::Indices(vector);
{\mu,\nu,\rho,\sigma}::Integer(0..3);
{a,b,c,d}::Indices(spinor);
Tr{#}::Trace(indices=spinor);
\delta_{\mu \nu}::KroneckerDelta;
\Gamma^{#}::GammaMatrix(metric=\delta);
\Gamma^{\mu}::ImplicitIndex(\Gamma^{\mu}_{a b});
\Gamma^{\mu \nu}::ImplicitIndex(\Gamma^{\mu \nu}_{a b});
\Gamma^{\mu \nu \rho \sigma}::ImplicitIndex(\Gamma^{\mu \nu \rho \sigma}_{a b});
ex:=Tr(\Gamma^{\mu} \Gamma^{\nu \rho} \Gamma^{\sigma});


Then call "join_gamma", "distribute", "untrace" until you only see traces of single gamma matrices. Finally "canonicalise" will kill all of them except Tr(1).

A small improvement in the code

{\mu,\nu,\rho,\sigma}::Indices(vector).
{\mu,\nu,\rho,\sigma}::Integer(0..3).
{a,b,c,d}::Indices(spinor).
Tr{#}::Trace(indices=spinor).
\delta{#}::KroneckerDelta.
\Gamma{#}::GammaMatrix(metric=\delta).
\Gamma{#}::ImplicitIndex(\Gamma{#}_{a b}).
ex:=Tr(\Gamma^{\mu} \Gamma^{\nu \rho} \Gamma^{\sigma}).


Then

converge(ex):
join_gamma(ex)
distribute(_)
untrace(_)
;


Finally

canonicalise(_);


This is in fact excellent! But needs some work in how to handle the unit from the Clifford algebra. It can't (to my knowledge) factor_out the trace.