Cadabra
a field theory motivated approach to computer algebra

split_index

Split the range of an index into two subsets
Replace a sum by a sum-of-sums, abstractly. Concretely, replaces all index contractions of a given type by a sum of two terms, each with indices of a different type. Useful for Kaluza-Klein reductions and the like. An example makes this more clear:
{M,N,P,Q,R}::Indices(full). {m,n,p,q,r}::Indices(space1). {a,b,c,d,e}::Indices(space2).
ex:=A_{M p} B_{M p}; split_index(_, $M,m,a$);
\(\displaystyle{}A_{M p} B_{M p}\)
\(\displaystyle{}A_{m p} B_{m p}+A_{a p} B_{a p}\)
ex:=A_{M p} B_{M p}; split_index(_, $M,m,4$);
\(\displaystyle{}A_{M p} B_{M p}\)
\(\displaystyle{}A_{m p} B_{m p}+A_{4 p} B_{4 p}\)
Note that the two index types into which the original indices should be split can be either symbolic (as in the first case above) or numeric (as in the second case).
Copyright © 2001-2017 Kasper Peeters
Questions? info@cadabra.science