Quit[]

I used to run xPand instead of xTensor because 1) it includes xTensor 2) Scalar field and many other things are inbuilt defined in xPand (One could simply use xTensor as an alternative) and 3) I like xPand notations.

Setup xPand

<<xAct`xPand`

DefManifold[M,4,{α,β,γ,ι,λ,μ,ν,σ}]
DefMetric[-1,g[-μ,-ν],CD,{";","(OverBar[∇])"},PrintAs->"(OverBar[g])"]

SetSlicing[g,n,h,cd,{"|","(OverBar[D])"},"FLFlat"]

DefMetricFields[g,dg,h]
DefMatterFields[u,du,h]

MakeBoxes[ϵ,StandardForm]:=
StyleBox[ToString[$PerturbationParameter],FontColor->RGBColor[0.0, 0.0, 1]]

MyToxPand[expr_,gauge_,order_]:=ToxPand[expr,dg,u,du,h, gauge,order]

org[expr_]:=NoScalar@Collect[ContractMetric[expr],$PerturbationParameter,ToCanonical]

$ConformalTime=True

$Pre=ScreenDollarIndices

MetricCompute xCoba

Evaluated EOMs in xPand and xTensor:

DefConstantSymbol[f4, PrintAs ->"(Subscript[f, 4])"]

LHS1=2 ((Subscript[(OverBar[∇]), α])φ) ((Subscript[(OverBar[∇]), β])φ)-(Subscript[k, 2]) ({{(OverBar[g]), ({{ ,  }, {α, β}})}}) ((Subscript[(OverBar[∇]), γ])φ) (((OverBar[∇])^γ)φ)

LHS2=-2 (Subscript[f, 4]) ((Subscript[(OverBar[∇]), α])(Subscript[(OverBar[∇]), ι])((OverBar[∇])^ι)φ) ((Subscript[(OverBar[∇]), β])φ) ((Subscript[(OverBar[∇]), γ])φ) (((OverBar[∇])^γ)φ)-2 (Subscript[f, 4]) ((Subscript[(OverBar[∇]), α])φ) ((Subscript[(OverBar[∇]), β])(Subscript[(OverBar[∇]), ι])((OverBar[∇])^ι)φ) ((Subscript[(OverBar[∇]), γ])φ) (((OverBar[∇])^γ)φ)+2 (Subscript[f, 4]) ((Subscript[(OverBar[∇]), α])φ) ((Subscript[(OverBar[∇]), β])φ) ((Subscript[(OverBar[∇]), γ])((OverBar[∇])^γ)φ) ((Subscript[(OverBar[∇]), ι])((OverBar[∇])^ι)φ)-2 (Subscript[f, 4]) ((Subscript[(OverBar[∇]), β])(Subscript[(OverBar[∇]), α])φ) ((Subscript[(OverBar[∇]), γ])φ) (((OverBar[∇])^γ)φ) ((Subscript[(OverBar[∇]), ι])((OverBar[∇])^ι)φ)-4 (Subscript[f, 4]) ((Subscript[(OverBar[∇]), β])φ) ((Subscript[(OverBar[∇]), γ])(Subscript[(OverBar[∇]), α])φ) (((OverBar[∇])^γ)φ) ((Subscript[(OverBar[∇]), ι])((OverBar[∇])^ι)φ)-4 (Subscript[f, 4]) ((Subscript[(OverBar[∇]), α])φ) ((Subscript[(OverBar[∇]), γ])(Subscript[(OverBar[∇]), β])φ) (((OverBar[∇])^γ)φ) ((Subscript[(OverBar[∇]), ι])((OverBar[∇])^ι)φ)+2 (Subscript[f, 4]) ((Subscript[(OverBar[∇]), β])φ) ((Subscript[(OverBar[∇]), γ])φ) (((OverBar[∇])^γ)φ) ((Subscript[(OverBar[∇]), ι])((OverBar[∇])^ι)(Subscript[(OverBar[∇]), α])φ)+2 (Subscript[f, 4]) ((Subscript[(OverBar[∇]), α])φ) ((Subscript[(OverBar[∇]), γ])φ) (((OverBar[∇])^γ)φ) ((Subscript[(OverBar[∇]), ι])((OverBar[∇])^ι)(Subscript[(OverBar[∇]), β])φ)-2 (Subscript[f, 4]) ((Subscript[(OverBar[∇]), γ])φ) (((OverBar[∇])^γ)φ) ((Subscript[(OverBar[∇]), ι])(Subscript[(OverBar[∇]), β])(Subscript[(OverBar[∇]), α])φ) (((OverBar[∇])^ι)φ)-4 (Subscript[f, 4]) ((Subscript[(OverBar[∇]), β])(Subscript[(OverBar[∇]), α])φ) (((OverBar[∇])^γ)φ) ((Subscript[(OverBar[∇]), ι])(Subscript[(OverBar[∇]), γ])φ) (((OverBar[∇])^ι)φ)+2 (Subscript[f, 4]) ({{(OverBar[g]), ({{ ,  }, {α, β}})}}) ((Subscript[(OverBar[∇]), γ])φ) (((OverBar[∇])^γ)φ) ((Subscript[(OverBar[∇]), ι])(Subscript[(OverBar[∇]), λ])((OverBar[∇])^λ)φ) (((OverBar[∇])^ι)φ)+4 (Subscript[f, 4]) ((Subscript[(OverBar[∇]), β])φ) (((OverBar[∇])^γ)φ) ((Subscript[(OverBar[∇]), ι])(Subscript[(OverBar[∇]), γ])φ) (((OverBar[∇])^ι)(Subscript[(OverBar[∇]), α])φ)+4 (Subscript[f, 4]) ((Subscript[(OverBar[∇]), α])φ) (((OverBar[∇])^γ)φ) ((Subscript[(OverBar[∇]), ι])(Subscript[(OverBar[∇]), γ])φ) (((OverBar[∇])^ι)(Subscript[(OverBar[∇]), β])φ)-2 (Subscript[f, 4]) ((Subscript[(OverBar[∇]), α])φ) ((Subscript[(OverBar[∇]), β])φ) ((Subscript[(OverBar[∇]), ι])(Subscript[(OverBar[∇]), γ])φ) (((OverBar[∇])^ι)((OverBar[∇])^γ)φ)+(Subscript[f, 4]) ({{(OverBar[g]), ({{ ,  }, {α, β}})}}) ((Subscript[(OverBar[∇]), γ])φ) (((OverBar[∇])^γ)φ) ((Subscript[(OverBar[∇]), ι])((OverBar[∇])^ι)φ) ((Subscript[(OverBar[∇]), λ])((OverBar[∇])^λ)φ)+4 (Subscript[f, 4]) ({{(OverBar[g]), ({{ ,  }, {α, β}})}}) (((OverBar[∇])^γ)φ) ((Subscript[(OverBar[∇]), ι])(Subscript[(OverBar[∇]), γ])φ) (((OverBar[∇])^ι)φ) ((Subscript[(OverBar[∇]), λ])((OverBar[∇])^λ)φ)+(Subscript[f, 4]) ({{(OverBar[g]), ({{ ,  }, {α, β}})}}) ((Subscript[(OverBar[∇]), γ])φ) (((OverBar[∇])^γ)φ) ((Subscript[(OverBar[∇]), λ])(Subscript[(OverBar[∇]), ι])φ) (((OverBar[∇])^λ)((OverBar[∇])^ι)φ)

LHS3=2 (Subscript[f, 4]) ((Subscript[(OverBar[∇]), α])φ) ((Subscript[(OverBar[∇]), β])φ) ((Subscript[(OverBar[∇]), γ])(Subscript[(OverBar[∇]), ι])((OverBar[∇])^ι)φ) (((OverBar[∇])^γ)φ)+2 (Subscript[f, 4]) ((Subscript[(OverBar[∇]), α])φ) ((Subscript[(OverBar[∇]), β])φ) ((Subscript[(OverBar[∇]), γ])((OverBar[∇])^γ)φ) ((Subscript[(OverBar[∇]), ι])((OverBar[∇])^ι)φ)-2 (Subscript[f, 4]) ((Subscript[(OverBar[∇]), β])φ) ((Subscript[(OverBar[∇]), γ])(Subscript[(OverBar[∇]), α])φ) (((OverBar[∇])^γ)φ) ((Subscript[(OverBar[∇]), ι])((OverBar[∇])^ι)φ)-2 (Subscript[f, 4]) ((Subscript[(OverBar[∇]), α])φ) ((Subscript[(OverBar[∇]), γ])(Subscript[(OverBar[∇]), β])φ) (((OverBar[∇])^γ)φ) ((Subscript[(OverBar[∇]), ι])((OverBar[∇])^ι)φ)-4 (Subscript[f, 4]) ((Subscript[(OverBar[∇]), α])φ) ((Subscript[(OverBar[∇]), β])φ) (((OverBar[∇])^γ)φ) ((Subscript[(OverBar[∇]), ι])((OverBar[∇])^ι)(Subscript[(OverBar[∇]), γ])φ)+2 (Subscript[f, 4]) ((Subscript[(OverBar[∇]), α])(Subscript[(OverBar[∇]), ι])(Subscript[(OverBar[∇]), γ])φ) ((Subscript[(OverBar[∇]), β])φ) (((OverBar[∇])^γ)φ) (((OverBar[∇])^ι)φ)+2 (Subscript[f, 4]) ((Subscript[(OverBar[∇]), α])φ) ((Subscript[(OverBar[∇]), β])(Subscript[(OverBar[∇]), ι])(Subscript[(OverBar[∇]), γ])φ) (((OverBar[∇])^γ)φ) (((OverBar[∇])^ι)φ)+4 (Subscript[f, 4]) ((Subscript[(OverBar[∇]), γ])(Subscript[(OverBar[∇]), α])φ) (((OverBar[∇])^γ)φ) ((Subscript[(OverBar[∇]), ι])(Subscript[(OverBar[∇]), β])φ) (((OverBar[∇])^ι)φ)+4 (Subscript[f, 4]) ((Subscript[(OverBar[∇]), β])φ) (((OverBar[∇])^γ)φ) ((Subscript[(OverBar[∇]), ι])(Subscript[(OverBar[∇]), γ])φ) (((OverBar[∇])^ι)(Subscript[(OverBar[∇]), α])φ)+4 (Subscript[f, 4]) ((Subscript[(OverBar[∇]), α])φ) (((OverBar[∇])^γ)φ) ((Subscript[(OverBar[∇]), ι])(Subscript[(OverBar[∇]), γ])φ) (((OverBar[∇])^ι)(Subscript[(OverBar[∇]), β])φ)-4 (Subscript[f, 4]) ((Subscript[(OverBar[∇]), α])φ) ((Subscript[(OverBar[∇]), β])φ) ((Subscript[(OverBar[∇]), ι])(Subscript[(OverBar[∇]), γ])φ) (((OverBar[∇])^ι)((OverBar[∇])^γ)φ)-2 (Subscript[f, 4]) ({{(OverBar[g]), ({{ ,  }, {α, β}})}}) (((OverBar[∇])^γ)φ) (((OverBar[∇])^ι)φ) ((Subscript[(OverBar[∇]), λ])(Subscript[(OverBar[∇]), ι])(Subscript[(OverBar[∇]), γ])φ) (((OverBar[∇])^λ)φ)-6 (Subscript[f, 4]) ({{(OverBar[g]), ({{ ,  }, {α, β}})}}) (((OverBar[∇])^γ)φ) (((OverBar[∇])^ι)φ) ((Subscript[(OverBar[∇]), λ])(Subscript[(OverBar[∇]), ι])φ) (((OverBar[∇])^λ)(Subscript[(OverBar[∇]), γ])φ)

Load the system :

<<xAct`xCoba`

Setup. Deactivate info messages, both in xTensor and xCoba:

$Info=False;
$CVVerbose=False;

Hide away ugly dummies :

$PrePrint=ScreenDollarIndices;

The first step is to define a basis, which we will call “B”. It’s associated with the manifold M4, and has indices {0,1,2,3}, given by the appropriate coordinates.

dSitter Metric

DefConstantSymbol[H]

DefChart[BdS,M,{0,1,2,3},{t[],r[],θ[],ϕ[]}]
MatrixForm[deSitter={
{-1,0,0,0},
{0,(E^(2 H t[])),0,0},
{0,0,(E^(2 H t[])) r[]^2,0},
{0,0,0,(E^(2 H t[])) r[]^2 Sin[θ[]]^2}
}]
MetricInBasis[g,-BdS,deSitter]
MetricCompute[g,BdS,All,CVSimplify->Simplify]

Apply xCoba : Covariant EOM to dSitter background

DefScalarFunction[φ0]

ComponentValue[φ[LI[0],LI[0]],φ0[t[]]]

Compute the background EOM in the deSitter metric. Note: ComponentArray is needed for tensors (remove for scalar).

LHS1dS1=LHS1//ToBasis[BdS]//ToBasis[BdS]//TraceBasisDummy//ComponentArray//ToValues//ToValues

It works for simple expression

ChristoffelCDPDBdS[α,-μ,-ν]//ToBasis[BdS]//TraceBasisDummy//ComponentArray//ToValues//ToValues//ToValues

ChangeComponents[ChristoffelCDPDBdS[α,μ,-ν]//ToBasis[BdS],ChristoffelCDPDBdS[α,-μ,-ν]//ToBasis[BdS]];

LHS2sdS1=LHS2//ToBasis[BdS]//ToBasis[BdS]//TraceBasisDummy//ComponentArray//ToValues//ToValues

Q: ToBasis is converting all the quantities. Many Christoffel symbols are not converted to its values.  The result is the same after applying “ToValues” many times. It’s saturates.

LHS3sdS=LHS3//ToBasis[BdS]//ToBasis[BdS]//TraceBasisDummy//ComponentArray//ToValues//ToValues

Q: Same problem for LHS3s term. The result is the same after applying “ToValues” many times.

Q : What am I doing wrong?