maxima-bounces at math.utexas.edu wrote on 04/22/2011 12:16:01 PM:
> Sorry, this is a bug. I don't think I'll be able to look into a fix
> this weekend, though....
>
> (%i2) subst(lambda([x],x),f,f(x));
> (%o2) x
> (%i3) subst(lambda([x],x),f[1],f[1](x));
> (%o3) lambda([x],x)(x)
A workaround is (I think) to use ev(XXX, lambda); example
(%i17) subst(lambda([x],x),f[1],f[1](x));
(%o17) lambda([x],x)(x)
(%i18) ev(%,lambda);
(%o18) x
This is a workaround, not a suggestion that you should use (or need to
use) 'ev' for things
like this.
Also, I don't know why sublis_apply_lambda is a good thing
(%i35) sublis([f = lambda([x],x)],f(x)), sublis_apply_lambda : false;
(%o35) lambda([x],x)(x)
(%i36) sublis([f = lambda([x],x)],f(x)), sublis_apply_lambda : true;
(%o36) x
Since sublis doesn't support substitutions for nonatoms (so sublis([f[1] =
... ) doesn't work.
Correct me if I'm mistaken, but I think the bugs aren't related to the
pdiff package
or to pderivop.
--Barton (author of pdiff)