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


Is there a way to collect factors into powers for objects which have Symbol-type sub/superscripts?

Like for the example in the manual:

ex:= A^{\dagger} A^{\dagger};

The collect_factors(_) doesn't produce A^{\dagger}^2 as one would expect.

in General questions by (260 points)

1 Answer

+2 votes
Best answer

It should, it's a bug introduced with tidying up some pattern matching functions. I have just pushed a fix for this to github. Thanks for reporting.

by (73.1k points)
selected by

Nice, thank you!