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

Is there a way to simplify expressions like

$$\frac{1}{2}\partial^{b c}{h_{b c}}+\frac{1}{2}\partial^{b}{}_{c}{h{b}{}^{c}}+\frac{1}{2}\partial_{b}{h} \partial^{c}{h_{c}{}^{b}}+\frac{1}{4}\partial_{b}{h} \partial\{c}{h^{c b}}$$

Ideally I wouldn't have to create a substitute command for each type of pattern, since the expression has many other forms like these where one just wants to raise an index on a tensor and lower the same index on another tensor.

in General questions by (520 points)

1 Answer

+1 vote

I assume that indices are raised/lowered with the flat metric at this stage? If that's correct, by far the easiest way is to re-declare your indices as 'type=free', e.g.

{b,c,d,e}::Indices(position=free);

(use the same set as the original one of course). Then canonicalise will do the job of collecting terms like you wrote here.

by (66.3k points)
...