int[] allIndices = addAll(allFreeVarIndices, allFreeArgIndices);
SimpleIndices dIndices = IndicesFactory.createSimple(null, allIndices);
SimpleTensor symmetric = simpleTensor("@!@#@##_AS@23@@#", dIndices);
SimpleIndices allFreeVarIndicesI = IndicesFactory.createSimple(varIndices.getSymmetries(), allFreeVarIndices);
Tensor derivative =
new SymmetrizeTransformation(allFreeVarIndicesI, true).transform(symmetric);
derivative = applyIndexMapping(
derivative,
new Mapping(allIndices,
addAll(varIndices.getInverted().getAllIndices().copy(), allFreeArgIndices)),