kpeeters / cadabra2

A field-theory motivated approach to computer algebra.
https://cadabra.science/
GNU General Public License v3.0
230 stars 37 forks source link

Prevent dummy leak from powers #269

Closed kpeeters closed 1 year ago

kpeeters commented 1 year ago

Dummy indices could "leak" out of arguments of powers, so that e.g.

A^{n} / (A^{n} A^{n})

would lead to a triple index exception. This patch prevents dummy classification from leaking out of the \pow{...}{...} node, and also ensures that canonicalise will still look inside such expressions.

This solves the issue reported in https://cadabra.science/qa/2405/strange-triple-index-error.