Welcome to Cadabra Q&A, where you can ask questions and receive answers from other members of the community.
+1 vote

when I use

ex:=A A tr{u^{\mu} u^{\nu}} tr{u^{\nu} u^{\mu}}- B B tr{u^{\mu} u^{\nu}} tr{u^{\mu} u^{\nu}};

I get the following error

{\color{red}{\begin{verbatim}RuntimeError: Power with free indices not allowed.

At: (4): \end{verbatim}}}

How to solve it?

in General questions by (1.0k points)

1 Answer

+1 vote

Now fixed on github. The problem was that collect_factors would try to collect the trace expressions because it didn't correctly scan for free indices on those factors.

by (64.9k points)