Quit[]

Load the package and setup

<<xAct`xTensor`

$PrePrint=ScreenDollarIndices;

Define an δ-dimensional manifold

DefConstantSymbol[δ]

DefManifold[M,δ,{a,b,c,d,e,f,h,i,j,k,l,m,p,q,r}]

Define a Lorenzian metric

DefMetric[-1,g[-a,-b],CD,{";","∇"}]

Conformal transformations

DefTensor[Ω[],M]

DefMetric[-1,gt[-a,-b],cd,{",","(OverTilde[∇])"},ConformalTo->{g[-a,-b],(Ω[])^2},PrintAs->"(OverTilde[g])"]

ConformalRules[g,gt]

DefConstantSymbol[s]

DefTensor[ϕ[],M]

DefTensor[ϕt[],M,PrintAs->"(OverTilde[ϕ])"]

DefConstantSymbol[Δ]

ConformalRules[ϕt,ϕ]^={ϕt[]->ϕ[](Ω[])^(-Δ)}

SetOptions[ContractMetric,AllowUpperDerivatives->True]

RicciScalarCD[]

RicciScalarcd[]

%==NoScalar[ChangeCurvature[%,cd,CD]/.ConformalRules[gt,g]]

Expand@ChristoffelToGradConformal[%, gt, g]

ScreenDollarIndices@ToCanonical@ContractMetric@%

Collect[%,{CD[-a][CD[a][Ω[]]],CD[-a][Ω[]] CD[a][Ω[]]}]

Map[FullSimplify,%,{3}]

IndexRuleDelayed@@%

ConformalRules[RicciScalarcd,RicciScalarCD]^=%

Invgt[a,b]cd[-a]@cd[-b]@ϕt[]

%==(ChangeCovD[%,cd,CD]/.ConformalRules[gt,g]/.ConformalRules[ϕt,ϕ])

ChristoffelToGradConformal[%, gt, g]

ScreenDollarIndices@ToCanonical@ContractMetric@%

Collect[%,{CD[-a][ϕ[]] CD[a][ϕ[]],CD[-a][Ω[]] CD[a][ϕ[]],CD[-a][Ω[]] CD[a][Ω[]]}]

ConformalLaplace=Map[Simplify,%,{3}]

ConformalLaplaceRule=MakeRule[Evaluate[List@@ConformalLaplace]]

Invgt[a,b]cd[-a]@cd[-b]@ϕt[]-(δ-2)/4/(δ-1)*RicciScalarcd[]*ϕt[]

%==(%/.ConformalLaplaceRule/.ConformalRules[RicciScalarcd,RicciScalarCD]/.ConformalRules[ϕt,ϕ])

ScreenDollarIndices@%

Collect[%,{CD[-a][CD[a][Ω[]]],CD[-a][ϕ[]] CD[a][ϕ[]],CD[-a][Ω[]] CD[a][ϕ[]],CD[-a][Ω[]] CD[a][Ω[]]}]

Map[FullSimplify,%,{3}]

%/.Δ->((δ-2)/2)

Map[FullSimplify,%,{3}]

DefConstantSymbol[ξ]

Action1=(1/2)(Invgt[a,b])cd[-a]@ϕt[]cd[-b]@ϕt[]+(1/2)ξ ((ϕt[])^2)RicciScalarcd[]

%==(ChangeCovD[%,cd,CD]/.ConformalRules[gt,g]/.ConformalRules[ϕt,ϕ])

ChristoffelToGradConformal[%, gt, g]

ScreenDollarIndices@ToCanonical@ContractMetric@%

Collect[%,{CD[-a][ϕ[]] CD[a][ϕ[]],CD[-a][Ω[]] CD[a][ϕ[]],CD[-a][Ω[]] CD[a][Ω[]]}]

ConformalLaplace=Map[Simplify,%,{3}]

(1/2)Sqrt[Detgt[]]Invgt[a,b]cd[-a]@ϕt[]cd[-b]@ϕt[]

(ChangeCovD[%,cd,CD]/.ConformalRules[gt,g]/.ConformalRules[ϕt,ϕ])//PowerExpand

ChristoffelToGradConformal[%, gt, g]

T1=ScreenDollarIndices@ToCanonical@ContractMetric@%

ChangeCurvature[(1/2)Sqrt[Detgt[]]ξ ((ϕt[])^2)RicciScalarcd[],cd,CD]/.ConformalRules[gt,g]

ChristoffelToGradConformal[%, gt, g]

(ChangeCovD[%,cd,CD]/.ConformalRules[gt,g]/.ConformalRules[ϕt,ϕ])

T2=ScreenDollarIndices@ToCanonical@ContractMetric@(%//PowerExpand)

T2//Simplification//Expand//NoScalar//ContractMetric//PutScalar

T1//Simplification//Expand//NoScalar//ContractMetric//PutScalar

(VarD[Ω[],CD][T1+T2]//Simplification//Expand//NoScalar//ContractMetric//PutScalar//Simplification)/.Δ-> ((δ-2)/2)/.ξ->(δ-2)/4/(δ-1)//Simplification

(VarD[Ω[],CD][T1+T2]//Simplification//Expand//NoScalar//ContractMetric//PutScalar//Simplification)/.Δ-> ((δ-2)/2)//Simplify

T1+T2/.Δ-> ((δ-2)/2)//NoScalar//Expand

(((Sqrt[(Overscript[g, (OverTilde[~])])]) ϕ (Subscript[∇, a])Ω (∇^a)ϕ)/Ω)-((δ (Sqrt[(Overscript[g, (OverTilde[~])])]) ϕ (Subscript[∇, a])Ω (∇^a)ϕ)/(2 Ω))+(((Sqrt[(Overscript[g, (OverTilde[~])])]) (ϕ^2) (Subscript[∇, a])Ω (∇^a)Ω)/(2 (Ω^2)))-((δ (Sqrt[(Overscript[g, (OverTilde[~])])]) (ϕ^2) (Subscript[∇, a])Ω (∇^a)Ω)/(2 (Ω^2)))+(((δ^2) (Sqrt[(Overscript[g, (OverTilde[~])])]) (ϕ^2) (Subscript[∇, a])Ω (∇^a)Ω)/(8 (Ω^2)))+((ξ (Sqrt[(Overscript[g, (OverTilde[~])])]) ({{g, ({{a, b}, { ,  }})}}) (ϕ^2) (Subscript[∇, b])(Subscript[∇, a])Ω)/Ω)-((δ ξ (Sqrt[(Overscript[g, (OverTilde[~])])]) ({{g, ({{a, b}, { ,  }})}}) (ϕ^2) (Subscript[∇, b])(Subscript[∇, a])Ω)/Ω)-((2 ξ (Sqrt[(Overscript[g, (OverTilde[~])])]) ({{g, ({{ ,  }, {a, b}})}}) (ϕ^2) (∇^a)Ω (∇^b)Ω)/(Ω^2))+((5 δ ξ (Sqrt[(Overscript[g, (OverTilde[~])])]) ({{g, ({{ ,  }, {a, b}})}}) (ϕ^2) (∇^a)Ω (∇^b)Ω)/(2 (Ω^2)))-(((δ^2) ξ (Sqrt[(Overscript[g, (OverTilde[~])])]) ({{g, ({{ ,  }, {a, b}})}}) (ϕ^2) (∇^a)Ω (∇^b)Ω)/(2 (Ω^2)))/.ξ->(δ-2)/4/(δ-1) //Simplification

T1 +T2/.Δ-> ((δ-2)/2)/.ξ->(δ-2)/4/(δ-1) //ToCanonical//ContractMetric

%//Simplification

%/.Δ-> ((δ-2)/2)//Simplification