<< HighEnergyPhysics`FeynCalc`

A[m_] = QuantumField[A, {m}]

t[m_, n_] = ExpandPartialD[A[n] . LeftPartialD[m]]

F[m_, n_] = 2*AntiSymmetrize[t[m, n], {m, n}]

L = 1/4*F[m, n]*F[m, n]

MetricTensor[l__] := 
      MetricTensor[Sequence @@ Sort[{l}]] /; Not[OrderedQ[{l}]]

(* ----------------------- Building Energy-Momentum Tensor ------------------------ *)

q[m_, n_] =  QuantumField[B, {m, n}]

t0001 = Expand[L] /. t[m_, n_] -> q[m, n];

t0002 = (-FunctionalD[t0001, q[k, l]] /. 
          q[k_, l_] -> t[k, l])

T[l_, r_] = t0002*t[r, k] - MetricTensor[l, r]*L;

(* *** Checking property of T ! *** *)
t01=ExpandPartialD[RightPartialD[l].T[l,r]] /.Dot->Times

(* ----------------- Calculate `equation of a motion' -------------------- *)

s02=QuantumField[Q___,PartialD[LorentzIndex[m_]],PartialD[LorentzIndex[m_]],A,{n_}]:>QuantumField[Q,PartialD[LorentzIndex[m]],PartialD[LorentzIndex[n]],A,{m}]

t001=Evaluate[t01/.s02]

<<"/mnt/win_e/My/progs/fc-m-2.m"

SortingPartials[Simplify001[t001,Contract]]

Search[t001,#==0&]

(* -------------------- Symmetrize T[l,r] ------------------------- *)

T1[l_,r_]=T[l,r] + ExpandPartialD[RightPartialD[k].(F[k,l].A[r])]/.Dot->Times

(* *** Checking property of T1 ! *** *)

t02=ExpandPartialD[RightPartialD[l].T1[l,r]] /.Dot->Times

t002=Evaluate[t02/.s02]

SortingPartials[Simplify001[t002,Contract]]

Search[t002,#==0&]