Scalar-Vector Lagrangian

Alejandro Guarnizo Trilleras

SetOptions[Interpolation, InterpolationOrder -> 1];
SetDirectory[NotebookDirectory[]]

<< init.m;


<<xAct`xCoba`
<<xAct`xTras`
(*<<xAct`xPand`*)
<<xAct`TexAct`

Defining Manifold, Metric, Indices, Vector field, tensor and scalar fields

Here we define the Manifold, the symbols for the covariant derivatives, and also defining the vector and the scalar field

DefManifold[M4,4,{a,b,c,d,e,f,g,h,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,α,β,γ,δ,μ,ν,ρ,σ,λ}]

DefBasis[cartesian,TangentM4,{0,1,2,3},BasisColor-> RGBColor[1,0,0]]

DefMetric[-1,gb[-a,-b],CD,SymbolOfCovD->{"D","▽"}]

Defining the Minkowski tensor.

valueEta={{-1,0,0,0},{0,1,0,0},{0,0,1,0},{0,0,0,1}};

AllComponentValues[gb[{a,cartesian},{b,cartesian}],valueEta];

Defining the vector field.

DefTensor[A[μ],M4]

DefTensor[F[μ,ν],M4]

F[μ_,ν_]=(▽^μ)({{A, ({{ν}, { }})}})-(▽^ν)({{A, ({{μ}, { }})}})

DefTensor[HDF[μ,ν],M4]

HDF[μ_,ν_]=epsilongb[μ,ν,α,β]F[-α,-β]/2//Simplification //PutScalar

DefTensor[ϕ[],M4]

Defining The Lagrangian

(* Bulding blocks for L *)

ContrL={(CD[-μ][A[-ν]]) (CD[-α][A[-β]]) (CD[-ρ][A[-σ]]),(CD[-μ][CD[-ν][ϕ[]]]) (CD[-α][CD[-β][ϕ[]]]) (CD[-ρ][CD[-σ][ϕ[]]]),
(CD[-μ][CD[-ν][ϕ[]]]) (CD[-α][CD[-β][ϕ[]]])  (CD[-ρ][A[-σ]]),
(CD[-μ][A[-ν]]) (CD[-α][A[-β]]) (CD[-ρ][CD[-σ][ϕ[]]])};

NumL=Length[ContrL];

Contr3gb=IndexConfigurations[gb[μ,ν]gb[α,β]gb[ρ,σ]];
Num3gb=Length[Contr3gb]



Contr1gb1e=IndexConfigurations[epsilongb[μ,ν,α,β]gb[ρ,σ]];
Num1e1gb=Length[Contr1gb1e]

(* Defining The list with the different contributions *)


ContrFL[{ik_,jk_}]:=Contr3gb[[ik]]ContrL[[jk]]// ContractMetric // PutScalar // Simplification // FullSimplify;
ContrFLe[{ik_,jk_}]:=Contr1gb1e[[ik]]ContrL[[jk]]// ContractMetric // PutScalar // Simplification // FullSimplify;


L={};
Do[AppendTo[L,{il,jl}],{il,Num3gb},{jl,NumL}];L;

Le={};
Do[AppendTo[Le,{il,jl}],{il,Num1e1gb},{jl,NumL}];Le;

TotL=Map[ContrFL,L]//SortCovDs;

TotLe=Map[ContrFLe,Le]//SortCovDs;

LenL=Length[TotL]
LenLe = Length[TotLe]

LisL=DeleteDuplicates[TotL]/.CD->PD//SortCovDs
LenLF=Length[LisL]



LisLe1=DeleteDuplicates[TotLe]/.CD->PD//SortCovDs;
LisLe=DeleteDuplicates[Simplify@LisLe1,FullSimplify[#==#2||-#==#2]&] (* Deleting here terms that are equeal except for a minus sign *)
LenLeF=Length[LisLe]

LisLe[[2]]

This term should be zero since, the partial derivatives of the scalar field conmute, and also by the properties of the Levi - Civita. I don’t know however how to implement that.