Disformal transformations

Brief usage example of the xAct and xTensor packages

In this tutorial, we expand upon our previous example of conformal transformations using xTensor by considering the more complex generalization of disformal transformations. The results are compared to arXiv:2010.00956v3

Load xAct

As before, we start by loading the necessary xAct packages

<<xAct`xTensor`;
<<xAct`TexAct`;

Define objects

As usual, we declare a 4D manifold together with a Lorentz metric and its covariant derivative

DefManifold[M4, 4, {a, b, c, d, e, f, μ, ν, α, β}];
DefMetric[-1, g[-a, -b], CD];

Define new metric

The family of metrics we are interested in are of the form . Hence, we declare a tensor field ϕ and scalar functions A and B before introducing the new metric h

DefTensor[ϕ[], M4];
DefScalarFunction[A];
DefScalarFunction[B];
DefTensor[h[-a,-b], M4, Symmetric[{-a, -b}]];
DefCovD[hCD[-a], SymbolOfCovD->{"|", "D"}];

Next, we provide the definition of h

h[a_?DownIndexQ, b_?DownIndexQ]:=A[ϕ[]] g[a, b] + B[ϕ[]]CD[a][ϕ[]]CD[b][ϕ[]]

Unfortunately, xTensor does not seem to provide a method to calculate the inverse of a general metric. In this particular case, we can use the Sherman-Morrison formula.

ShermanMorrisonRule=
A_ M_[x_,y_]+B_(u:CD[x_][f_])(v:CD[y_][f_])->
M[-x, -y]/A - M[μ, -x]M[ν,-y]  A^-2 B CD[-μ][f] CD[-ν][f] / (1 + B / A M[α,β]CD[-α][f] CD[-β][f]);

Because we only need to invert a single matrix, it is not really necessary to define a special rule for this. However, this shows a further limitation of xTensor. If we recall the previous tutorial, one notices the lack of the MakeRule function to avoid issues with indices. MakeRule only supports expressions with a single term in the LHS. Nonetheless, here is the inverse of the metric.

h[a_?UpIndexQ, b_?UpIndexQ]:=h[-a,-b]/.ShermanMorrisonRule//Simplification

h[a, b]

We also introduce the simplification  and define rules for replacing different ways to write X

DefTensor[X[], M4];
XRule = MakeRule[{(g[a,b](CD[-a][f_[]])(CD[-b][f_[]])),-2X[]}];
X2Rule = MakeRule[{(g[-a,-b](CD[a][ϕ[]])(CD[b][ϕ[]])),-2X[]}];
X3Rule = MakeRule[{CD[a][ϕ[]]CD[-a][ϕ[]],-2X[]}];
X4Rule = MakeRule[{CD[-a][ϕ[]]CD[a][ϕ[]], -2X[]}];

In principle it should be possible to use a single rule. However, this does not seem to work.

(*
XRule = MakeRule[{
(g[a,b](CD[-a][f_[]])(CD[-b][f_[]])) 
|(g[-a,-b](CD[a][ϕ[]])(CD[b][ϕ[]]))
|CD[d][ϕ[]]CD[-d][ϕ[]]
|CD[-d][ϕ[]]CD[d][ϕ[]],
-2X[]}, ContractMetrics->True]
*)

Christoffel symbols

For xTensor to use the explicit formula of the Christoffel symbols we introduce their definition as a rule

ChristoffelRule=MakeRule[{
ChristoffelhCD[c,-a,-b],
h[c,d](PD[-a][h[-b,-d]]+PD[-b][h[-a,-d]]-PD[-d][h[-a,-b]])/2}];

Next, our goal is to expand the definition of the Christoffel symbols and express it in terms of the Christoffel symbols of the original metric

christoffel=ChristoffelhCD[c,-a,-b]/.ChristoffelRule//GradMetricToChristoffel//ScreenDollarIndices;
ChristoffelhCD[c,-a,-b] == christoffel

In order to be able to use Simplification function of the xTensor package we need to remove all references to partial derivatives by rewriting them in terms of the covariant derivative and Christoffel symbols

christoffel = ChangeCovD[christoffel,PD, CD]//ContractMetric//Simplification//ToCanonical//ScreenDollarIndices;
ChristoffelhCD[c,-a,-b] == christoffel

This still generates a long statement that we need to further simplify. Note the terms containing the Christoffel symbols of the original metric can be grouped together. Same with the Kronecker deltas. However, Mathematica does not seem able to recognize this and requires some manual assistance. 

We define a function that takes an expression and a pattern. It extracts the terms matching the pattern, simplifies them separated from the main expression and finally concatenates back the result to the rest of the expression.

FactorOutTerm[expr_, pattern_] := Module[
{positions, head , tail },
positions=Position[expr, pattern];
head =Simplification[expr[[Map[x|->First[x], positions]]]];
tail = Delete[expr, Map[x|->{First[x]}, positions]];
 Plus[head, tail]];

A similar function works on all terms that match every patterns in a list

FactorOutTerms[expr_, patterns_?ListQ] := Module[
{positions, head , tail },
positions=Intersection@@Map[pat|->Map[First, Position[expr, pat]],patterns ];
head =Simplification[expr[[positions]]];
tail = Delete[expr, Map[List, positions]];
 Plus[head, tail]];

If you plan to use this function for your own work, please note that it only works for sums and is really only designed to work for a specific set of problems.

Now equipped with the appropriate tools, we continue with our original task

ChristoffelhCD[c,-a,-b]==christoffel/.XRule/.X2Rule/.X3Rule/.X4Rule//ToCanonical
ChristoffelhCD[c,-a,-b]==FactorOutTerm[%[[2]], ChristoffelCD[c, -a, -b]]
ChristoffelhCD[c,-a,-b]==FactorOutTerm[%[[2]], delta[-a_, b_]]
christoffel = FactorOutTerms[%[[2]], {CD[-a][ϕ[]],CD[-b][ϕ[]], CD[c][ϕ[]]}];
ChristoffelhCD[c,-a,-b] == christoffel

Note we did not use any _ in the last pattern, as this would match all terms containing a derivative.

We now have obtained the result we expected

Riemann curvature tensor

Finally, we consider the Riemann curvature tensor. Here, we express the Christoffel symbols of h as the original Christoffel symbols plus a second symbol CC

DefTensor[CC[α, -μ, -ν], M4];
CCRule=MakeRule[{
ChristoffelhCD[α, -μ, -ν], 
ChristoffelCD[α, -μ, -ν]+CC[α, -μ, -ν]}];
ChristoffelhCD[c, -a, -b] == ChristoffelCD[c, -a, -b]+CC[c, -a, -b]
CC[c, -a, -b] == christoffel-ChristoffelCD[c, -a, -b]

We express the Riemann curvature tensor using Christoffel symbols and substitute with the sum

RiemannhCD[-μ,-β, -ν, α]//RiemannToChristoffel//ScreenDollarIndices;
riemann = %/.CCRule//Expand;
RiemannhCD[-μ,-β, -ν, α]==riemann

We introduce the Riemann curvature tensor of the original metric by subtracting and adding the difference back

rest=riemann-(RiemannCD[-μ,-β, -ν, α]//RiemannToChristoffel)//Simplification;
RiemannhCD[-μ,-β, -ν, α] ==RiemannCD[-μ,-β, -ν, α] + rest;
ChangeCovD[%, PD, CD]//Simplification