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

Hello!

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

Like for the example in the manual:

\dagger::Symbol; 
ex:= A^{\dagger} A^{\dagger};
collect_factors(_);

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 (83.1k points)
selected by

Nice, thank you!

...