vermaseren / form

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

Beginner Q: is it possible to have 2 sets of indices with 2 different ranges? #256

Closed fetchinson closed 6 years ago

fetchinson commented 6 years ago

I'd like to use FORM for summing over and manipulating spacetime indices as well as summing over and manipulating color indices (more generally going from 1 to N). Is it possible? For instance if I have a propagator like $G(\mu,\nu,a,b) = \delta{\mu\nu} / k^2 \delta{a, b}$ then I'd like to be able to do the double trace $G(\mu,\nu,a,b) G(\mu,\nu,a,b) = DN/k^4$ (obviously in actual examples the expressions would be more complicated). How do I specify that one type of index has range 0...(D-1) and the other 1...N? (The latter can also be 0...(N-1) of course, that's no problem.)

vermaseren commented 6 years ago

You can handle this in the declaration of the indices. In your case Symbol D,N; Index mu=D,nu=D,a=N,b=N; should do the trick. It causes d(mu,mu) to be replaced by D and d(a,a) by N. Hence your d(mu,nu)*d(mu,nu) will become D as well. Etc.

I hope this is what you are after.

Jos

On 2 Jan 2018, at 22:31, Daniel Fetchinson notifications@github.com wrote:

I'd like to use FORM for summing over and manipulating spacetime indices as well as summing over and manipulating color indices (more generally going from 1 to N). Is it possible? For instance if I have a propagator like $G(\mu,\nu,a,b) = \delta{\mu\nu} / k^2 \delta{a, b}$ then I'd like to be able to do the double trace $G(\mu,\nu,a,b) G(\mu,\nu,a,b) = DN/k^4$ (obviously in actual examples the expressions would be more complicated). How do I specify that one type of index has range 0...(D-1) and the other 1...N? (The latter can also be 0...(N-1) of course, that's no problem.)

— 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/256, or mute the thread https://github.com/notifications/unsubscribe-auth/AFLxEhb2jVsLzjHW90GK1jnBFE1ccLjiks5tGqBAgaJpZM4RRGbc.

fetchinson commented 6 years ago

Yes, thank you very much, exactly what I needed.