vermaseren / form

The FORM project for symbolic manipulation of very big expressions
GNU General Public License v3.0
1.14k stars 136 forks source link

$args not expanded for distrib_ #186

Closed tueda closed 7 years ago

tueda commented 7 years ago

Argument fields seem not to be expanded when distrib_ functions are evaluated:

S x1,...,x4;
CF f;
L F = f(x1,...,x4);
id f(?a$a) = 1;
multiply distrib_(1,1,f,dummy_,$a);
P;
.end

gives

   F =
      f(x1,x2,x3,x4);

Workaround:

S x1,...,x4;
CF f;
CF distrib;
L F = f(x1,...,x4);
id f(?a$a) = 1;
multiply distrib(1,1,f,dummy_,$a) * replace_(distrib,distrib_);
P;
.end
   F =
      f(x1) + f(x2) + f(x3) + f(x4);
vermaseren commented 7 years ago

Probably, in TestSub, the distrib_ function gets intercepted while there are still dollars in the arguments. That should be vetoed. After that things should(!) be fine.

Jos

On 19 mei 2017, at 11:39, Takahiro Ueda notifications@github.com wrote:

Argument fields seem not to be expanded when distrib_ functions are evaluated:

S x1,...,x4; CF f; L F = f(x1,...,x4); id f(?a$a) = 1; multiply distrib(1,1,f,dummy,$a); P; .end gives

F = f(x1,x2,x3,x4); Workaround:

S x1,...,x4; CF f; CF distrib; L F = f(x1,...,x4); id f(?a$a) = 1; multiply distrib(1,1,f,dummy,$a) * replace(distrib,distrib_); P; .end F = f(x1) + f(x2) + f(x3) + f(x4); — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/vermaseren/form/issues/186, or mute the thread https://github.com/notifications/unsubscribe-auth/AFLxEr9RXVzteFcqvyqQnvNN1Z_iQe0Iks5r7WM-gaJpZM4NgTKq.