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 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.

asked in General questions by (250 points)

1 Answer

+1 vote
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.

answered by (45.3k points)
selected by

Nice, thank you!