itensor problem



Hi all. I need to differentiate a contraction of tensors in a way such 
that expressions like

diff(contract(l([a,b])^2),l([i,j]));

are to be simplified as

2*kdelta([i,j],[])

and not as

2*kdelta([a],[i])*l([a,b],[])*kdelta([b],[j])

I know that the things I've written aren't correct tensorial expressions 
(there are no repeated indices...) but I need them to be in this form. I 
already know that the things I've writtend correspond to a metric tensor 
equal to unity (no difference between upper and lower indices), but I 
cannot implement it in Maxima.

Can anyone help me?

-- 
Gianluca Malato