iterator.set(expandProductOfSums(current, indicator, transformations));
else if (current instanceof Power && current.get(0) instanceof Sum
&& TensorUtils.isNatural(current.get(1)) && indicator.is(current))
iterator.set(expandPower((Sum) current.get(0), ((Complex) current.get(1)).getReal().intValue(), transformations));
}
return iterator.result();
}
private static Tensor expandProductOfSums(Tensor current, Indicator<Tensor> indicator, Transformation[] transformations) {
// g_mn {_m->^a, _n->_b} => g^a_b <=> d^a_b | Tensors.isMetric(g_ab ) d_a^b