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

I am new to Cadabra and have a couple of beginner questions that I haven’t been able to resolve on my own. I would greatly appreciate any help or clarification you can offer. I have the following Cadabra Code:

{M,N,P,Q,R#}::Indices(full, position=fixed).
{a,b,c,d,e#}::Indices(space1, position=fixed).
{a,b,c,d,e}::Integer(1..2).
{m,n,p,q,r#}::Indices(space2, position=fixed).
\partial{#}::PartialDerivative.
g_{M N}::Metric.
g^{M N}::InverseMetric.
g_{M?N?}::Symmetric.
g^{M?N?}::Symmetric.
Gtog:=\Gamma^{P?}_{M? N?}->(1/2)*g^{P? Q}(\partial_{N?}{g_{Q M?}}
+\partial_{M?}{g_{Q N?}}-\partial_{Q}{g_{M? N?}});
ex:=\Gamma^{2}_{1 2};
substitute(_, Gtog);
split_index(_, $M, a, m$);
todo:=\Gamma^{R}_{q m}\Gamma^{p}_{n R};
substitute(_, Gtog);

Question1: I tried using split index to split an index in my expression, but it doesn’t seem to do anything -- it simply returns the answer without performing the split. What might be the issue?

Question2: For the expression \Gamma^{R}{q m}\Gamma^{p}{n R} I am getting the same index Q repeated four times in the output. How can I prevent this and get the correct index contractions without the same dummy index appearing too many times?

in General questions by (120 points)
edited by

Please log in or register to answer this question.

...