# Issues with exponentiation

+1 vote

The expression

foo:= 2**3


yields 1. Also,

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


cannot be simplified:

canonicalise(_);


and

factor_in(_);


both give the input back.

asked

## 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;
collect_factors(_);


gives A**5.

answered by (54.8k 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;
simplify(_);


also gives what you wanted.

answered by (54.8k points)

Thank you very much!