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

Hello,

I'm completely new to Cadabra and just installed this on my Mac OS laptop. As a first step in familiarising myself with the syntax, I tried to modify the first tutorial of varying the action for the Maxwell gauge field by that of the Rarita-Schwinger action for the gravitino. However, when I define the action, the output is zero, and I don't know what I did wrong. Here is my code:

#Rarita-Scwhinger Action
def post_process(ex):
     sort_product(ex)
     eliminate_kronecker(x)
     canoincalise(ex)
     collect_terms(ex)

{\mu,\nu,\rho}::Indices(position=free).
x::Coordinate.

\Gamma_{#}::GammaMatrix(metric=\eta);
\Gamma^{#}::GammaMatrix(metric=\eta);
\eta_{\mu\nu}::Metric;
\partial{#}::Derivative;

\psi_{\mu}::Spinor;
\bar\psi_{\mu}::DiracBar;
\psi_{\mu}::Depends(x).
\bar\psi_{\mu}::Depends(x).

S:=\int{\bar\psi_{\mu}\Gamma^{\mu\nu\rho}\partial_{\nu}\psi_{\rho}}{x};

At this stage I guess the output should just be the action itself since no manipulation has been performed. Yet the output is zero. Any help is appreciated. Thanks.

in General questions by

1 Answer

+1 vote
 
Best answer

It's mostly an issue with not putting brackets at the right places. While Cadabra uses TeX notation, you sometimes have to be a little more explicit than strictly necessary in TeX, in order to avoid ambiguity. So you have to write e.g.

\bar{\psi_{\mu}}

so that it is clear to Cadabra that the \psi_{\mu} is an 'argument' of \bar. Ditto for \partial, which you need to write as

\partial_{\nu}{ \psi_{\rho} }

so that the \psi_{\rho} explicitly becomes an 'argument' of \partial. In your example, the \partial_{\nu}\psi_{\rho} was interpreted as a derivative acting on nothing, multiplied with \psi_{\rho}, giving nothing.

Here's a tidied-up version which works:

#Rarita-Scwhinger Action
def post_process(ex):
     sort_product(ex)
     eliminate_kronecker(ex)
     canonicalise(ex)
     collect_terms(ex)

{\mu,\nu,\rho}::Indices(position=independent);
x::Coordinate;

\Gamma{#}::GammaMatrix(metric=\eta);
\eta_{\mu\nu}::Metric;
\partial{#}::Derivative;

\psi_{\mu}::Spinor;
\bar{#}::DiracBar;
\psi_{\mu}::Depends(x);

S:=\int{\bar{\psi_{\mu}} \Gamma^{\mu\nu\rho} \partial_{\nu}{\psi_{\rho}} }{x};

I have fixed a few typos and also changed the index type to 'independent' to prevent Cadabra from raising/lowering index pairs (usually better for susy computations, as you can then keep all indices on the Gamma's upstairs and more easily convert them using vielbeine).

by (82.6k points)

Thank you for taking the time to answer my question. I've used your fixed-up code to define the action, and it works fine.

However, I'm encountering a problem with the variation itself. Since \bar{#}::DiracBar is defined as such, when I try to vary $S$ with respect to

$\delta{\psi_{\mu}}$,

the bar is automatically over the whole of $\delta{\psi_{\mu}}$,

i.e. $\bar{\delta{\psi_{\mu}}}$

S:=\int{\bar{\psi{\mu}} \Gamma^{\mu\nu\rho} \partial{\nu}{\psi{\rho}} }{x}; vary(S, $\psi{\mu}-> \delta{\psi_{\mu}}$);

Is it possible to have 2 separate variations: one with respect to

$\bar{\psi_{\mu}}$,

and one with respect to $\psi_{\mu}$? Thank you !

If you want to do these variations separately, you need to use a different object for $\bar{\psi}_{\mu}$, and not declare \bar{#} as accent. So e.g.

\bpsi{#}::LaTeXForm("\bar{\psi}").
{\psi_{\mu}, \bpsi_{\mu} }::Spinor;

(the first line is to make the output look nice). You can then write a variation rule for \bpsi_{\mu} separately.

The alternative is to keep the story as you wrote originally, but expand the Dirac bar after you have done the variation. See the expand_diracbar algorithm for details https://cadabra.science/manual/expand_diracbar.html.

(I have removed the question in which you asked the above; please keep related things in one thread on the forum. I read everything, but sometimes do not immediately have time to respond).

...