Conformal factor

In this notebook, we compute how the Ricci scalar transforms under a conformal transformation of the metric.

Preamble

We only need a minimal amount of ingredients:

Block[{Print},
<<xAct`xTras`;
];

Note that now, we use a Euclidean metric, so the first argument in DefMetric is 1 instead of -1.

Block[{Print},
DefManifold[spacetime,4,{μ,ν,ρ,σ,α,β,γ,δ,κ,λ,τ,ω}];
DefMetric[1,metric[-μ,-ν],CD,{";","𝒟"}];
DefTensor[Omega[],spacetime,PrintAs->"Ω"];
];

Computation

The first step is to express the Ricci scalar in terms of (derivatives of) the metric. There are commands for that (of course):

Rtodg=RicciScalarCD[]//RiemannToChristoffel//ChristoffelToGradMetric

The red bracket is a so-called “head” with the name Scalar. It simply indicates that the enclosed expression doesn’t have any free indices, and this can be useful in some cases. For us it is not relevant.
We now have to think about the conformal transformation. Note how the metric and its inverse transform differently, and we have to be careful about this. We can implement it by putting a condition on the pattern:

{metric[μ,ν],metric[-μ,-ν]}/.{metric[μ_?UpIndexQ,ν_?UpIndexQ]:>((Omega[])^2)metric[μ,ν],metric[-μ_,-ν_]:>((Omega[])^(-2))metric[-μ,-ν]}

The condition ?UpIndexQ ensures that the specific rule is only applied if the respective index is an upper index. Why do we not need the same for the lower indices? This is some Mathematica black magic: because we have explicit minus signs for the lower index rule, it automatically only applies to lower indices. Let us use this on the above expression:

Rtodgtransformed=Rtodg/.{metric[μ_?UpIndexQ,ν_?UpIndexQ]:>((Omega[])^2)metric[μ,ν],metric[-μ_,-ν_]:>((Omega[])^(-2))metric[-μ,-ν]}

This expression is of course a complete mess. We have to get it back into a covariant form. For this, we have several tools: on the one hand, we have GradMetricToChristoffel, which replaces all partial derivatives acting on the metric by Christoffel symbols. We also have ChangeCovD, which changes one type of derivatives into another by adding/subtracting the corresponding Christoffel symbols. We want to change partial to covariant derivatives and collect tensors:

Rtodgtransformed//GradMetricToChristoffel
Rtodgtransformedalmostcovariant=ChangeCovD[%,PD,CD]//CollectTensors

Not perfect - we now have covariant derivatives acting on Christoffel symbols. Let us change these back to partial derivatives by applying ChangeCovD only on such expressions:

Rtodgtransformedalmostcovariant2=Rtodgtransformedalmostcovariant/.CD[μ_]@ChristoffelCD[X__]:>ChangeCovD[CD[μ]@ChristoffelCD[X],CD,PD]//CollectTensors

Still not great, because we have Christoffel symbols that are not in their defining index structure. We can enforce this by separating metric factors. We then do another transformation of derivatives acting on the metric to Christoffels, and finally use GradChristoffelToRiemann:

Rtodgtransformedalmostcovariant2//SeparateMetric[metric]//GradMetricToChristoffel//CollectTensors
Rtransformed=%//GradChristoffelToRiemann//CollectTensors