Problem with definition of the generalized delta

+1 vote

EDIT: ealier I gave bad example, so let me again write post with proper ones.

I find quite problematic using generalized delta. For example:

{a,b,c,d,m,n,s}::Indices.
{a,b,c,d,m,n,s}::Integer(1..4).
\delta{#}::KroneckerDelta.

\epsilon_{a b c d}::EpsilonTensor(delta=\delta).

delta1:=\delta_{a b c d};
expand_delta(_);

delta2:=\delta_{a c b d};
expand_delta(_);

delta3:=\delta^{a b}_{c d};
expand_delta(_);


gives

I would expect that \delta_{abcd} would give me middle outcome. What I'm missing?

edited

The help for KroneckerDelta states that indices are 'paired' in the way it comes out here. It is perhaps more transparent if you write upper and lower indices, so
$$2 \delta_{a}{}^{b}{}_{c}{}^{d} = \delta_{a}{}^{b} \delta_{c}{}^{d} - \delta_{c}{}^{b} \delta_{a}{}^{d}.$$