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

I wonder where I could find the complete description of Cadabra's data structure, this and this are a little simple, I need more details. More examples about how to program in Cadabra is also OK.

in General questions by (1.5k points)
edited by

The latest fix by @cbehan is now in github master.

Ok, It works fine. Thanks.

Hi@cbehan@kasper, following code is still invalid

ex:=tr{u^{\mu} u^{\mu} u^{\nu} u^{\nu}}-tr{u^{\mu} u^{\nu} u^{\nu} u^{\mu}};

Version 2.2.9 (build 2310.4b47f18980 dated 2019-12-28), Linux

Ok. In this case, the letters are the same and the free indices are the same which means that a single sort order has not been determined yet. We will need to detect that this has happened and then put an ordering on the set of dummy index topologies.

In the above example, this means deciding whether we prefer {{1,2}, {3,4}} or {{1,4}, {2,3}}. More generally, we should expect to see all possible ways of breaking up {1, ..., 2n} into unordered pairs.

I knew this was coming... By far the easiest way to solve this is to piggyback on work Dom has been doing to make multi-term symmetries more manageable. @cbehan, I'll email you privately with details.

1 Answer

+1 vote

This is now handled cleanly by Dom's new meld algorithm, which is now on github. Instead of sort_product, just use meld(_). Documentation on this will be in a forthcoming paper.

by (76.6k points)

Thanks. I have used this new algorithm for a while, but there are still some bugs in 'meld' algorithm, for example


the result is zero, it's wrong.