I have a triple index error because Cadabra replaces an index with another already used. Is this an error in my source or, if not, how to bypass this malfunction?
Here is an example notebook:
{i,j,k,l,n#}::Indices.
{i,j,k,l,n#}::Integer(1..3).
\delta{#}::KroneckerDelta.
\epsilon^{i j k}::EpsilonTensor(delta=\delta);
{ A^{i}, B^{i}, C^{i} }::Depends(\commutator{#});
{ A^{i}, B^{i}, C^{i} }::Commuting;
def post_process(ex):
unwrap(ex)
eliminate_kronecker(ex)
canonicalise(ex)
rename_dummies(ex)
collect_terms(ex)
commut_rules:={ \commutator{A^{i}}{A^{j}} -> \epsilon^{i j k} A^{k},
\commutator{A^{i}}{B^{j}} -> \epsilon^{i j k} B^{k},
\commutator{B^{i}}{B^{j}} -> -\epsilon^{i j k} A^{k},
B^{i}F^{i} -> 0 };
defC:={ C^{i}->\epsilon^{ i j k} A^j B^{k}/(A^nA^n) };
commAC:=\commutator{A^{i}}{C^{j};
substitute(_,defC);
And I get a Triple index error.
I am using Version 2.4.0 on Ubuntu
Thank you!
Jorge