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

Is there a way to label an object in Cadabra?

Suppose I wanted to define some tensor $T^{a b c}_{e f}$, gives it some properties (e.g. make some indices antisymmetric or something, give it some rules...). Could I then use multiple copies, each having a different label?

Or in the very simple case, could I do something like define a momentum vector which has one vector index and one label, so I can have e.g. $p_1 \cdot p_2$ and similar?

Thanks!

asked in General questions by (180 points)
edited by

1 Answer

+1 vote
 
Best answer

From 2.3.6.5 (which I have just pushed to github) you can use the auto-declare syntax for this, using the # character after the name. So e.g.

T#^{a b c}_{e f}::TableauSymmetry(shape={1,1}, indices={3,4});
ex:=T1^{a b c}_{e f} T2^{e f g}_{h i} + T1^{a b c}_{e f} T2^{f e g}_{h i};
canonicalise(ex);

to produce zero.

answered by (59.6k points)
selected by
...