Tensors.addSymmetry("R_lm", IndexType.LatinLower, false, new int[]{1, 0});
Tensors.addSymmetry("R_lmab", IndexType.LatinLower, true, new int[]{0, 1, 3, 2});
Tensors.addSymmetry("R_lmab", IndexType.LatinLower, false, new int[]{2, 3, 0, 1});
Expression iK = Tensors.parseExpression("iK_ab^cd = "
+ "(d_a^c*d_b^d+d_b^c*d_a^d)/2-"
+ "la/2*("
+ "d_a^c*n_b*n^d"
+ "+d_a^d*n_b*n^c"
+ "+d_b^c*n_a*n^d"
+ "+d_b^d*n_a*n^c)"
+ "-ga*(g_ab*n^c*n^d+g^cd*n_a*n_b)"
+ "-1/2*g_ab*g^cd"
+ "+2*ga*(ga*la-2*ga+2*la)*n_a*n_b*n^c*n^d");
Expression K = Tensors.parseExpression("K^lm_ab^cd = "
+ "g^lm*(d_a^c*d_b^d+d_b^c*d_a^d)/2"
+ "-la/(4*(1+la))*("
+ "d_a^c*d_b^l*g^dm"
+ "+d_a^c*d_b^m*g^dl"
+ "+d_a^d*d_b^l*g^cm"
+ "+d_a^d*d_b^m*g^cl"
+ "+d_b^c*d_a^l*g^dm"
+ "+d_b^c*d_a^m*g^dl"
+ "+d_b^d*d_a^l*g^cm"
+ "+d_b^d*d_a^m*g^cl)"
+ "+(la-be)/(2*(1+la))*(g^cd*(d_a^l*d_b^m+d_a^m*d_b^l)+g_ab*(g^cl*g^dm+g^cm*g^dl))"
+ "+g^lm*g_ab*g^cd*(-1+(1+be)**2/(2*(1+la)))");
K = (Expression) Tensors.parseExpression("be = ga/(1+ga)").transform(K);
Expression S = Tensors.parseExpression("S^p_{ab}^{cd}=0");
Expression W = Tensors.parseExpression("W_{ab}^{cd}=P_ab^cd"
+ "-la/(2*(1+la))*(R_a^c_b^d+R_a^d_b^c)"
+ "+la/(4*(1+la))*("
+ "d_a^c*R_b^d"
+ "+d_a^d*R_b^c"
+ "+d_b^c*R_a^d"
+ "+d_b^d*R_a^c)");
Expression P = Tensors.parseExpression("P_ab^lm ="
+ "1/4*(d_a^c*d_b^d+d_a^d*d_b^c-g_ab*g^cd)"
+ "*(R_c^l_d^m+R_c^m_d^l-g^lm*R_cd-g_cd*R^lm"
+ "+1/2*(d^l_c*R^m_d+d^m_c*R_d^l+d^l_d*R^m_c+d^m_d*R^l_c)"
+ "-1/2*(d^l_c*d^m_d+d^m_c*d^l_d)*(R-2*LA)+1/2*g_cd*g^lm*R)");
P = (Expression) ExpandTransformation.expand(P,
EliminateMetricsTransformation.ELIMINATE_METRICS,
Tensors.parseExpression("R_{l m}^{l}_{a} = R_{ma}"),
Tensors.parseExpression("R_{lm}^{a}_{a}=0"),
Tensors.parseExpression("R_{l}^{l}= R"));
W = (Expression) P.transform(W);
Expression F = Tensors.parseExpression("F_lm^kd_pr = "
+ "R^k_plm*d^d_r+R^d_rlm*d^k_p");
OneLoopInput input = new OneLoopInput(2, iK, K, S, W, null, null, F);
OneLoopCounterterms action = OneLoopCounterterms.calculateOneLoopCounterterms(input);