for (i = 0; i < matrixIndicesCount / 2; ++i) {
upper[i] = IndicesUtils.createIndex(130 + i, IndexType.LatinLower, true);//30
lower[i] = IndicesUtils.createIndex(130 + i + matrixIndicesCount / 2, IndexType.LatinLower, false);
}
Expression Flat, WR, SR, SSR, FF, FR, RR, DELTA_1, DELTA_2, DELTA_3, DELTA_4, ACTION;
//preprocessor for Flat, WR, SR, SSR, FF, FR, RR, counterterms
IndicesInsertion termIndicesInsertion = new IndicesInsertion(
IndicesFactory.createSimple(null, upper),
IndicesFactory.createSimple(null, IndicesUtils.getIndicesNames(upper)),
matricesIndicator);
Flat = (Expression) Tensors.parse(Flat_, termIndicesInsertion);
WR = (Expression) Tensors.parse(WR_, termIndicesInsertion);
SR = (Expression) Tensors.parse(SR_, termIndicesInsertion);
SSR = (Expression) Tensors.parse(SSR_, termIndicesInsertion);
FF = (Expression) Tensors.parse(FF_, termIndicesInsertion);
FR = (Expression) Tensors.parse(FR_, termIndicesInsertion);
RR = (Expression) Tensors.parse(RR_, termIndicesInsertion);
ACTION = (Expression) Tensors.parse(ACTION_, termIndicesInsertion);
Expression[] terms = new Expression[]{Flat, WR, SR, SSR, FF, FR, RR};
//preprocessor for DELTA_1,2,3,4
IndicesInsertion deltaIndicesInsertion = new IndicesInsertion(
IndicesFactory.createSimple(null, upper),
IndicesFactory.createSimple(null, lower),
matricesIndicator);
DELTA_1 = (Expression) Tensors.parse(DELTA_1_, deltaIndicesInsertion);
DELTA_2 = (Expression) Tensors.parse(DELTA_2_, deltaIndicesInsertion);
DELTA_3 = (Expression) Tensors.parse(DELTA_3_, deltaIndicesInsertion);
DELTA_4 = (Expression) Tensors.parse(DELTA_4_, deltaIndicesInsertion);
Expression[] deltaExpressions = new Expression[]{DELTA_1, DELTA_2, DELTA_3, DELTA_4};
Expression FSubstitution = input.getF();
for (Transformation background : input.getRiemannBackground())
FSubstitution = (Expression) background.transform(FSubstitution);
//Calculations
Expression[] riemansSubstitutions = new Expression[]{
FSubstitution,
Tensors.parseExpression("R_{l m}^{l}_{a} = R_{ma}"),
Tensors.parseExpression("R_{lm}^{a}_{a}=0"),
Tensors.parseExpression("F_{l}^{l}^{a}_{b}=0"),
Tensors.parseExpression("R_{lmab}*R^{lamb}=(1/2)*R_{lmab}*R^{lmab}"),
Tensors.parseExpression("R_{lmab}*R^{lmab}=4*R_{lm}*R^{lm}-R*R"),
Tensors.parseExpression("R_{l}^{l}= R")
};
Expression kronecker = (Expression) Tensors.parse("d_{l}^{l}=4");
Transformation n2 = new SqrSubs(Tensors.parseSimple("n_l")), n2Transformer = new Transformer(TraverseState.Leaving, new Transformation[]{n2});
Transformation[] common = new Transformation[]{EliminateMetricsTransformation.ELIMINATE_METRICS, n2Transformer, kronecker};
Transformation[] all = ArraysUtils.addAll(common, riemansSubstitutions);
Tensor temp;