kpeeters / cadabra2

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

Tweak the cyclic ordering #187

Closed cbehan closed 4 years ago

cbehan commented 4 years ago

When deciding how to cycle a trace, we compare candidates to eachother one factor at a time. The old method checks for the name of the factor and breaks ties with the names of its indices. The fact that some of these indices can be dummies with arbitrary names has led to unexpected results for some traces. Therefore a better solution is the following. First compare names and break ties using the number of free indices. If there is still a tie, break it with the names of the free indices.

kpeeters commented 4 years ago

Thanks again, now merged.