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


I want to use dotted and undotted indices in order to get as close as possible to superspace notations, but I have problems with the dotted ones. For example

{\dot{\alpha}, \dot{\beta}, \dot{\gamma}, \dot{\delta}}::Indices(spinor, position=fixed);{\dot{\alpha}, \dot{\beta}, \dot{\gamma}, \dot{\delta}}::Integer(1..2);
ex:=\nabla^{\dot{\gamma}}(\theta^{\dot{\alpha}}) \theta_{\dot{\alpha}};
substitute(_, $\nabla^{\dot{\alpha}}(\theta^{\dot{\beta}}) -> epsilon^{\dot{beta} \dot{\alpha}}$);

does nothing, while, if I remove all dots everything works fine. Moreover, if I give a name to my substitution like

dt:=\nabla_{\dot{\alpha}}(\theta^{\dot{\beta}}) -> \delta_{\dot{\alpha}}^{\dot{\beta}}

and I call again the substitution command

substitute(_, dt);

messes up indices completly. Again, if I use the same code with undotted indices, it works just fine.

I am not sure this is a bug or I do not do things in the right way. I also had problems with \bar (wanted to use \bar{\theta}) and Cadabra was setting this to 0 after certain commands. I will get back to that if it is not related to the dotted promble above.

Thanks, Andrei

in Bug reports by (310 points)

You most certainly need to change the first line to \dot{#}::Accent. That, however, does not take care of all the issues. Let me see what goes wrong, this functionality has not been battle-tested for quite some time now.

You can work around it by using


and then writing \dalpha in your expressions and property declarations, instead of \dot{\alpha} (ditto for the other indices). That will most certainly work, though it is not as elegant.

I tried with "Accent" as well and it still does not work correctly. I used "Symbol" because I use explicitely also undotted indices which I defined in a different cathegory of indices and I am not sure whether accented indices are considered different from the unaccented ones.

I will try the work around \dalpha etc and also see if this solves the \bar problem as well.


I have tracked this down and opened an issue for it at https://github.com/kpeeters/cadabra2/issues/166 . Will take me a little bit of time to fix this properly; hopefully the workaround gets you going in the meantime.

1 Answer

+1 vote

A fix for this bug is now on the master branch on github. If you encounter related bugs with 'accented' indices (as you hinted at near the end of your post), please post more details.

by (66.3k points)


I reinstalled Cadabra, but now the previous notebooks no longer work. It looks like something breaks at the "Depends" property. I use "Depends" on indices like

{\dot{#}, \bar{#}}::Symbol;
{\alpha, \beta, \gamma, \delta}::Indices(chiral, position=fixed);
{\dalpha, \dbeta, \dgamma, \ddelta}::Indices(antichiral, position=fixed);

followed by

\theta{#}::Depends{\alpha, \beta, \gamma, \delta, \dalpha, \dbeta, \dgamma, \ddelta};

which gives me an error like

RuntimeError: Depends: \prod lacks property Coordinate, Derivative, Accent or Indices. In 2.x, make sure to write dependence on a derivative as A::Depends(\partial{#}), note the '{#}'.

I didn't get to the place where I had the problem with the other "accented" symbols, but I will try to see if now it works or not.

Please send me a complete but minimal notebook (or paste the cells here) that reproduces the problem. It looks like you missed a comma somewhere in the list of symbols on which you want to make \theta{#} depend.

I think I found the problem. {} do not work any longer in Depends? I used () instead and it works. I was confused because a notebook which worked fine on Friday, no longer worked today with the new installation. The cells I pasted are directly from the notebook. I can send the whole notebook if you want. Should I e-mail it?

Meanwhile I tested the problem I had before with the \bar, and seems to still be there. I have the following definitions:

{\dot{#}, \bar{#}}::Symbol;
{\alpha, \beta, \gamma, \delta}::Indices(chiral, position=fixed);
{\dot{\alpha}, \dot{\beta}, \dot{\gamma}, \dot{\delta}}::Indices(antichiral, position=fixed);

and derivatives

\theta{#}::Depends(\alpha, \beta, \gamma, \delta);

Then I take something like

ex:=\nabla^{\gamma}(\theta^{\alpha}) (\bar{\lambda}_{\gamma}^{\dot{\gamma}} + \lambda_{\gamma}^{\dot{\gamma}});



only the second term is returned while the first one is set to zero. Since everything is the same, except the \bar, I thought there is a problem with the way this accent behaves.

Your pasted input cells are cut-off, please either email a notebook or wrap them by hand before submitting a post.

What you describe here seems to be a different problem (you did not mention unwrap before).

Ok, sorry. I thought you will be able to see the full content of the cells. Let me try again:

{\dot{#}, \bar{#}}::Symbol;
{\alpha, \beta, \gamma, \delta}::Indices(chiral, position=fixed);
{\dot{\alpha}, \dot{\beta}, \dot{\gamma}}::Indices(antichiral, 

\theta{#}::Depends(\alpha, \beta, \gamma, \delta);

(\bar{\lambda}_{\gamma}^{\dot{\gamma}} + 


That does exactly as requested: it takes things out of derivatives and accents (and differential forms, since yesterday). If you only wanted to get rid of the derivative acting on things which do not depend on it, do unwrap(_, $\nabla{#}$);

Ok, sorry for the silly question. I was not aware of that behavior, though it is explicitely written in the manual.

Thanks for the support.