kpeeters / cadabra2

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

Changes to classes under AntiSymmetric #189

Closed cbehan closed 4 years ago

cbehan commented 4 years ago

This fixes a couple bugs in a way that lays useful groundwork. Specifically, storing the index_set_name for AntiSymmetric, and not just Traceless, gets us closer to the point where we can add a Transpose operator.

kpeeters commented 4 years ago

I have merged this. We should probably have some guidelines as to when caching of things is reasonable (in your case of caching the index set name on AntiSymmetric; that can in principle also be determined at algorithm run time by querying the indices then, but that would not be as efficient).

kpeeters commented 4 years ago

One thing, for instance, that fails now is

\epsilon{#}::EpsilonTensor;

That's a valid pattern, but you can only determine the name of the index set once this epsilon is encountered in an expression.