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

Set to match with a vector #84

Closed tueda closed 8 years ago

tueda commented 8 years ago

We have sets of symbol_ and index_. It would be nice to have vector_ as well, which can be used for pattern matchings to a vector (not a vector-like expression). Currently, for example, we need to define a set of all possible momenta, in order to match with -1 * p1?:

Set allpp,p0,...,p99,Q,P;
CF v;

id v(-p1?allpp) = v(p1);
vermaseren commented 8 years ago

Hi Takahiro,

Is this what you wanted? V p,p1,p2,p3,p4,p5,p6; CF f,g,h; L F = f(p1,-p1,p2,-p2); id,all,f(?a,-p?vector_,?b) = f(?a,p,?b)*g(p); Print +f +s; .end

F =

Jos

On 21 apr. 2016, at 20:47, Takahiro Ueda notifications@github.com wrote:

We have sets of symbol and index. It would be nice to have vector_ as well, which can be used for pattern matchings to a vector (not a vector-like expression). Currently, for example, we need to define a set of all possible momenta, in order to match with -1 * p1?:

Set allpp,p0,...,p99,Q,P; CF v;

id v(-p1?allpp) = v(p1); — You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub https://github.com/vermaseren/form/issues/84

tueda commented 8 years ago

Yes, that's right. Thanks.

tueda commented 8 years ago

Implemented in 78aa53b62a.