Question: frontend/curry + subs problem

Hi everyone!

Based on a recent post ( www.mapleprimes.com/forum/partialsubstitutionfrontendfreeze ) I have the following piece from a Maple worksheet, which I do not understand. First, I define A and B, where A is supposed to be substituted into B. If I have a "p" in A, then I get a "subs" as variable in B after frontend/curry with subs:

> restart;
> A := q[1] = q[0]+a*p[0]+(D(f))(q[0])+(D(f))(q[1]);

               q[1] = q[0] + a p[0] + D(f)(q[0]) + D(f)(q[1])
> B := q[0]+c*q[1]+(D(f))(q[2]);

                         q[0] + c q[1] + D(f)(q[2])
> frontend(curry(subs, A), [B]);

     q[0] + c (q[0] + a subs[0] + D(f)(q[0]) + D(f)(q[1])) + D(f)(q[2])

 

If, however, I write something else, say X, instead of p, I get what I want:

> C := subs(p = X, A);

               q[1] = q[0] + a X[0] + D(f)(q[0]) + D(f)(q[1])
> frontend(curry(subs, C), [B]);

       q[0] + c (q[0] + a X[0] + D(f)(q[0]) + D(f)(q[1])) + D(f)(q[2])

Why does Maple do this? Is "p" reserved for something that I'm not aware of here?!

I'm using Maple 11, by the way.

Thanks,

Fred.

Please Wait...