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

I have a sort of specific example in mind, and I am wondering if you have any advice on implementing it. I am trying to do some calculations in superspace, and I want to automate spinor derivatives. Specifically, I have the $\theta$-expansion of some superfield, and I want to perform some spinor derivatives and restrict to $\theta = 0$.

I tried defining an abstract derivative $D^{\alpha}_{A}$, with $\alpha$ a spinor index and $A$ an R-symmetry index. Then, I was going to define some substitution rules for how $D$ acts on the $\theta$ variables, but I found that Cadabra would interpret any derivative with multiple indices as a product of derivatives. This appears to be intentional from the description of the product_rule algorithm. So, do you have any suggestions for doing something like this? Thanks.

edit: I found a way to almost do it by following your Poincare algebra example, i.e. defining $D$ as an object that doesn't commute with $\theta$ and defining some substitution rules for their commutator. However, this suggests the problem: I actually want an anti-commutator. More precisely, I want a $\mathbb{Z}_2$ graded commutator, and I want to be able to assign a degree to each of my objects. Is this possible?

in General questions by
edited

If you go that route (which is probably what I would do as well), what prevents you from using substitution rules for anti-commutators? Maybe you can show a bit of detail about where you get stuck?

It would be nice to be able to treat sets of indices as a 'composite' index, and admittedly there isn't anything very satisfactory at the moment in Cadabra. I have thought about how to do this in the past, but haven't collected a sufficiently large set of different 'sample use cases' to be convinced that I could build a useful general purpose functionality for this. It would certainly be possible, without a lot of effort, to build in some functionality for composite indices (indices with more than one label, for things like your superspace derivative, but also to e.g. use SU(2)xSU(2) spinor indices to write representations of the Poincare algebra). Am not entirely convince though that that would suffice. Any thoughts/comments/ideas welcome.

Thanks for the reply! Is there a built-in anti-commutator function? Even if so, I'm not sure it would solve my issue. I think I really need a graded commutator. For example, to produce things like $ [D, \theta_1 \theta_2]_- = [D, \theta_1]_+ \theta_2 - \theta_1 [D, \theta_2]_+ $, where all three objects are anti-commuting and the subscript $(+)-$ refers to an (anti-)commutator. Is there a way to have Cadabra do this?

1 Answer

+1 vote

There is \anticommutator which behaves similarly to \commutator. For the purpose of representing a graded algebra, I guess it would suffice to make product_rule produce commutators if both or one of the elements are commuting, and anti-commutators if they are both anti-commuting. Right now product_rule always generates commutators if you start from a commutator, and anti-commutators if you start from an anti-commutator.

Could possibly add that relatively easily as an option to product_rule if it helps you.

by (82.6k points)
...