vermaseren / form

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

Negative vector wildcard does not match for sum of vectors #386

Open benruijl opened 3 years ago

benruijl commented 3 years ago

The pattern f1(p1?)*f1(-p1?) does not match when p1 is a sum of vectors:

V p1,p2;
CF f1;

L F = f1(p1+p2)*f1(-p1-p2) + f1(p2)*f1(-p2);

id f1(p1?)*f1(-p1?) = 1;

Print +s;
.end

yields

   F =
       + 1
       + f1( - p1 - p2)*f1(p1 + p2)
      ;

Note that the pattern f1(p1?)*f1(p1?) does match on sums of vectors.