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

It seems that if I have a sum like eg

ex:= A_{m} B_{m} + A_{m} C_{m};

"einsteinify" returns exactly the same thing. However if I only have the first term it returns the desired form A^{m} B_{m} as in the manual.

in General questions by (320 points)

1 Answer

0 votes

einsteinify by default (incorrectly) does not go down the expression tree, so it only sees the sum, not the terms making up the sum. Try

einsteinify(ex, deep=True);

to force it to go lower and see the individual terms.

by (83.1k points)

Thanks, that works.

...