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

The expression

foo:= 2**3

yields 1. Also,

foo:= A**3 * A**2;

cannot be simplified:




both give the input back.

asked in General questions by (180 points)

2 Answers

+1 vote

(I have edited your question to avoid the screen dumps; please try to use text, it makes for a much better experience).

The first one is a true brown paper bag issue. No idea how that slipped past the zillions of tests. Now fixed in github master. Thanks for reporting this.

To collect factors, as in your second problem, use collect_factors:

ex:= A**3 A**2;

gives A**5.

answered by (58k points)
+1 vote

In addition, please note that a lot of the 'standard' simplification stuff in computer algebra (so the things that have nothing to do with tensor algebra) are off-loaded to sympy; you can run its simplifier by simply using simplify:

ex:= A**3 A**2;

also gives what you wanted.

answered by (58k points)

Thank you very much!