Mathematica Asked by Andrew Hyman on March 27, 2021
I am slowly learning how to use Feyncalc, and I have a quick question.
I have a third rank tensor B[mu,nu,tao] and I also have a four-vector FV[W,mu]. I would like to contract the first two indices of "B" to get a four-vector, and then contract the result with "W" to obtain a scalar result. So I wrote this:
res=Contract[B[mu,mu,tao]*FV[W,tao]]
But this does not seem to be working, I get error messages and/or results that don’t make sense. Is there a better way to write the formula for "res"? Thanks for any assistance.
If B
is a generic tensor, you have to explicitly wrap the indices
into LorentzIndex
DeclareFCTensor[B];
Contract[B[LorentzIndex[mu], LorentzIndex[mu], LorentzIndex[tao]]* FV[W, tao]]
Notice that DeclareFCTensor
is only needed if you also want to be able to
uncontract the indices as in
Uncontract[B[LorentzIndex[mu], LorentzIndex[mu], Momentum[W]], W,
Pair -> All]
Otherwise you could also omit DeclareFCTensor
.
Now, if B
is just a shortcut for a tensor made out of products of 4-vectors and metric
tensors, things become much simpler: you can define it as one would define
a generic function in Mathematica
B[mu_,nu_,tao_]:=MT[mu,nu]*FV[v,tao]
Contract[B[mu, mu, tao]*FV[W, tao]]
Notice that
Contract[B[LorentzIndex[mu], LorentzIndex[mu], LorentzIndex[tao]]*
FV[W, tao]]
also works, because LorentzIndex[LorentzIndex[mu]]
is evaluated to LorentzIndex[mu]
.
Extended FeynCalc-related questions are probably best asked in the new forum on GitHub (which is much easier to use than the old, now retired, mailing list)
Correct answer by vsht on March 27, 2021
Get help from others!
Recent Questions
Recent Answers
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP