0

我希望 Mathematica 根据某些约束简化表达式。例如:

M = p.k p.k

给定约束:

p(mu) * p(nu) = \delta(mu,nu)

应该给

M = k^2

但我不知道如何指定虚拟索引,我也不太确定应该将约束本身放在哪里。在简化?

4

1 回答 1

2
In[1]:= FilePrint["dummyindices.m"]
<<HighEnergyPhysics`FeynCalc`
Print[" "];
{$AL[1], $AL[2]} = {mu, nu};  (* $AL are predefined dummy indices *)
M = SP[p,k] * SP[p,k];        (* this defines p.k * p.k *)
SP[k, k] = k2;                (* abbreviate the scalar product k^2 by k2 *)
constraint = FeynCalcInternal[ 
               FourVector[p,mu] FourVector[p,nu] -> MetricTensor[mu, nu] 
];       (* this is one way of specifying the constraint *)
(* use the Uncontract function http://www.feyncalc.org/FeynCalcBook/Uncontract/*)
Print["uncontracting : ", FCF[ tmp = Uncontract[M, k, Pair->All, Unique->False]]];
Print["contract and using the constraint : ",
       FeynCalcExternal @ Contract[tmp /. constraint]
]

In[2]:= <<dummyindices.m
Loading FeynCalc from /home/rolfm/HighEnergyPhysics
FeynCalc 8.1.0 Type ?FeynCalc for help or visit http://www.feyncalc.org/
$PrePrint is set to FeynCalcForm. Use FI and FC to change the display format.
Loading FeynArts, see www.feynarts.de for documentation
FeynArts 3.4 patched for use with FeynCalc

uncontracting :  k[mu] k[nu] p[mu] p[nu]
contract and using the constraint : k2
于 2012-02-17T20:37:54.063 回答