Categories

I'm working on a field theory problem that the coupling constant has a tensorial nature. For this reason, I need a CAS that manipulate tensorial expressions. To calculate the correlation functions I am going to use the Wick theorem to write them as a sum of 2-point functions. For this reason, I need to implement a summation and a Levi-Civita tensor. But I have no idea how it can be done in Cadabra. Does anyone have any idea? I guess that it should be done using a bridge between Mathematica or Sympy and Cadabra. My preference is Mathematica but I don't know how to do it.

1 Answer

+1 vote

I am not sure exactly which summation problem you are trying to solve; maybe you can give a bit more detail?

For the Wick story, here's a bit of code I put together a while ago which may help you get things implemented. It basically gives you a contract function which takes a product of fields and replaces all pairs with propagators. You'll need to expand this of course to do real world problems but the gist of the solution is in here.

First, you need something that takes a list of numbers and returns all possible ways in
which you can pair numbers:

Thanks very much for your detailed answer. It is exactly what I was looking for.
By saying "summation", I meant to sum over permutations of different contractions of the fields. You implemented it by a loop using the FOR command and defining two new functions.
In fact, my problem is that I don't know how to use Python inside the Cadabra. I have to learn it better.
The interaction that I am studying have the following form:

\lambda_{a b c d} \bar\eta_a \bar\eta_b \eta_c \eta_d

where \eta and \bar\eta are 4-components spinors (not the Dirac ones). The \lambda represent a general form of a coupling constant and is antisymmetric in changing (a b) and also in (c d). I am trying to drive the Feynman diagrams with one and two loops of this interaction.