# Simplification of expression under symmetry conditions

How to simplify the following expression:

f[i1**k1]f[i2**j2]f[j1**k1p]-f[i1**j2]f[i2**k1]f[j1**k1p]
-f[i1**k1]f[i2**j1]f[j2**k1p]+f[i1**j1]f[i2**k1]f[j2**k1p]
-f[i2**j2]f[k1**i1]f[k1p**j1]+f[i1**j2]f[k1**i2]f[k1p**j1]
+f[i2**j1]f[k1**i1]f[k1p**j2]-f[i1**j1]f[k1**i2]f[k1p**j2]
+f[j2**k1p]f[k1**i1**i2**j1]+f[k1p**j2]f[k1**i1**i2**j1]
-f[j1**k1p]f[k1**i1**i2**j2]-f[k1p**j1]f[k1**i1**i2**j2]
+f[i2**k1]f[k1p**i1**j2**j1]+f[k1**i2]f[k1p**i1**j2**j1]
-f[i1**k1]f[k1p**i2**j2**j1]-f[k1**i1]f[k1p**i2**j2**j1]


if replacements of i1 with i2 or j1 with j2 change sign of the term, for number of terms in product(...** k1 ** k2 **...) more than 2 we have:

f[...**k1**k2**..]==(-1)f[...**k2**k1**...]


However:

f[k1**k2]==KroneckerDelta[k1,k2]-f[k2**k1]


Output has to be:

4*f[i2**j2](f[j1**k1p]f[i1**k1]-f[k1**i1]f[k1p**j1])
-2*f[j1**j2**i2**k1p]*KroneckerDelta[i1**k1]
+2*f[k1**i1**i2**j2]*KroneckerDelta[j1**k1p]