vermaseren / form

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

e_ in bracket contents, lost sign #305

Open jodavies opened 5 years ago

jodavies commented 5 years ago

In the following code, test2 should be a rather than -a. The sign in normalizing in the [] appears to be lost.

#-
Off Statistics;

Symbol a;
Vector p;
Index mu,nu,rh;

Local test = e_(mu,nu,rh,p) * a;

Bracket e_;
.sort

Local test2 = test[e_(mu,nu,rh,p)];

Print +s;
.end
test =
    - e_(p,mu,nu,rh)*a
   ;

test2 =
    - a
   ;

Thanks, Josh.

tueda commented 5 years ago

Indeed, coefficients in [] seem to be always ignored:

S x;
L F = -3*x;
B x;
.sort
L G = F[-2*x];
P;
.end
   F =
       - 3*x;

   G =
       - 3;

Then the question is whether this is a bug or a specification...?