correction to kdelta



Some time ago I reported the bug  I found in the generalised Kronecker delta 
function. It gives a wrong answer if the upper indices  are numbers.
Here is the piece of the corresponded code from itensor.lisp with some   
comments at right

(DEFUN DELTA (LOWER UPPER) 
     (COND ((NULL LOWER) $DIM) ;if the length of list is zero return $DIM
	     ((NULL (CDR LOWER))  ;if the length of list is one do ..
	      (COND ((EQUAL (CAR UPPER) (CAR LOWER))
		     (COND ((NUMBERP (CAR UPPER)) 1.) (T $DIM)))
		    ((NUMBERP (CAR UPPER)) 0.)
		    (T (LIST '(%KDELTA)
			     (CONS SMLIST LOWER)
			     (CONS SMLIST UPPER)))))

The problem comes from the string ((NUMBERP (CAR UPPER)) 0.). 
I propose to replace it with 
((unless (eq (car UPPER) (car LOWER))
		 (when (and (numberp (car LOWER)) (numberp (car UPPER))) 0)))

This works fine for me. I'm not an expert in lisp please correct if you see a 
side effect.

rgds,
v