I don't think there is an easy way to have itensor stop redefining sdiff.
Here is an example why:
(%i1) diff(x([],[i]),x([],[j]));
(%o1) 0
(%i2) load(itensor)$
(%i3) diff(x([],[i]),x([],[j]));
(%o3) kdelta([j], [i])
If we keep itensor in share, as opposed to incorporating it into the main
source code, this redefinition is unfortunately necessary. However, it means
that changes to sdiff are not automatically reflected in itensor.
One possible way out would be to have sdiff call a hook at the right place,
allowing itensor to redefine that hook only. If I remember correctly, the
only change to sdiff in the redefined version is the inclusion of the line,
((rpobj e) (diffrpobj e x))
which calls the itensor function that performs the differentiation of
tensor-like indexed objects.
In the meantime, I'll check to see if I can bring the itensor version of
sdiff up-to-date.
Viktor
-----Original Message-----
From: maxima-bounces at math.utexas.edu [mailto:maxima-bounces at math.utexas.edu]
On Behalf Of Barton Willis
Sent: Friday, July 15, 2011 11:51 AM
To: Maxima Mailing List
Subject: itensor redefines sdiff
I appended rtest_bernstein (new) to the share_testsuite...Oops,
I got errors with derivatives of binomial. And so it goes with
share/contrib.
The bug is due to the fact that itensor redefines sdiff in a way
that makes derivatives of binomial(xxx,yyy) return nounforms.
I did file a bug report--until itensor no longer redefines sdiff,
rtest_bernstein will reside before the tensor code. And I will
append a note in share_testsuite.mac about itensor & sdiff.
OK:
(%i1) diff(binomial(k,n),k);
(%o1) -binomial(k,n)*(psi[0](-n+k+1)-psi[0](k+1))
(%i2) load(itensor)$
(%i3) diff(binomial(k,n),k);
(%o3) 'diff(binomial(k,n),k,1)
--Barton
_______________________________________________
Maxima mailing list
Maxima at math.utexas.edu
http://www.math.utexas.edu/mailman/listinfo/maxima