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

Hi,

I am manipulating expressions which contain terms with products of several Riemann tensors. If I work with free indices (which seems more convenient in my case) young_project_tensor gives me the error

ConsistencyException: Free indices in different terms in a sum do not match.

young_project_product works, but gives me a lot more terms than the original expression. Is it possible to young_project only one single Riemann tensor in a product so that I can keep the expression reasonably short? Here is one particular term which I would like to expand

ex1 := D^{k} R^{l m n p} R_{l}^{q}_{n}^{r} R_{m r}^{s t} \Gamma_{x k p q s t};

D is a derivative (not important though) and \Gamma is obviously a Gamma matrix.

Thanks for any ideas.

in General questions by (320 points)

1 Answer

0 votes

There is something not quite right in the way young_project_tensor puts the indices in their position (you can do display(ex1) to see this). I would suggest that you write all tensors with either all lower or all upper indices. That will avoid this particular problem until it is fixed.

by (82.5k points)

Dear Kasper,

Thanks for the quick answer. Unfortunately, the expression I wrote is not an input, but it comes out after several steps. I tried with indices defined as "fixed" or even "independent" but it is a lot more difficult to apply varius rules which I need to impose during this calculation. It seems that with free indices the expressions are put in the simplest form. If I type the expression with indices either up or down, it seems young_project_tensor works fine, but still returnes more terms than I really need. I am not sure if I can tell young_project to expand only one single Riemann tensor rather than all of them or if it is possible to expand using one single symmetry rather than the whole young tableau (for example, in the expression I wrote above it may be as simple as rewriting R^{l m n p} as R^{n p l m}).

Thanks, Andrei

If you have position=free indices, you are effectively saying that there is no difference between upper and lower indices, and they can be moved arbitrarily. In that case, you can simply do lower_free_indices(_) before you apply young_project_product; the former will move all position=free indices to be subscripts.

Thanks, I will try that. For some reason I didn't notice the lower command in the manual. I was looking for something like this, but I somehow missed it.

By the way, the einsteinify command from cadabra 1 does it have a correspondent in cadabra 2? Thanks.

einsteinify was actually in already, but slightly broken. I have fixed that now, added a manual page, and pushed to github. Thanks for reminding me.

...