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

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.

asked in General questions by (240 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 (37.9k points)
selected by

Nice, thank you!

...