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

The expression in the example should be zero, but how do you get automatically such result? I happen to have similar (but a bit more complex expressions) and I do not know what to do to get Cadabra simplify such sort of expressions automatically for me. T is a once contravariant twice covariant tensor (well, it is the torsion tensor)

{\alpha,\beta,\gamma,\eta,\tau,\nu}::Indices(vector, position=fixed);
{\alpha,\beta,\gamma,\eta,\tau,\nu}::Integer(0..3);
HeartOfTheProblem:=T^{\nu}_{\nu \alpha}*T^{\eta}_{\eta \tau} -T^{\nu}_{\nu\tau}*T^{\eta}_{\eta \alpha};
@collect_terms!(%);
@rename_dummies!(%);
@collect_terms!(%);`

Cadabra almost repeats the input, which although it is not wrong, is not the expected zero:

HeartOfTheProblem := {T}^{\beta}\,_{\beta \alpha} {T}^{\gamma}\,_{\gamma \tau} - {T}^{\beta}\,_{\beta \tau} {T}^{\gamma}\,_{\gamma \alpha};`
in General questions by
edited by

1 Answer

+2 votes

Use @canonicalise!(%) followed by @collect_terms!(%). In Cadabra v2.x, it is just a matter of canonicalise(_).

by (80.3k points)
...