Canonicalization: continuation

Canonicalization of expressions with non-metric compatible covariant derivatives

We start a new xTensor session:

<<xAct`xTensor`

$DefInfoQ=False;

$PrePrint=ScreenDollarIndices;

Define manifold, metric & covariant derivatives:

DefConstantSymbol[dim,PrintAs->"d"]

DefManifold[M,dim,IndexRange[a,q]]

DefMetric[-1,metric[-a,-b],CD,PrintAs->"g"]

DefCovD[cd[-a],{"|","D"},Torsion->True]

Production of Christoffel tensors

Define a tensor:

DefTensor[X[a,-b],M]

Canonicalize an expression with a covariant derivative compatible with the metric:

X[b,-c]CD[-a][X[c,-d]]

ToCanonical[%]

Canonicalize the same expression with non-compatible covariant derivatives :

{X[b,-c]PD[-a][X[c,-d]],X[b,-c]cd[-a][X[c,-d]]}

expr1=ToCanonical[%]

This is equivalent to the following procedure:

{X[b,-c]PD[-a][X[c,-d]],X[b,-c]cd[-a][X[c,-d]]}

ChangeCovD[%,PD,CD]

ChangeCovD[%,cd,CD]

ToCanonical@%

MapAt[ChangeCovD[#,CD]&,%,{1}]

MapAt[ChangeCovD[#,CD,cd]&,%,{2}]

In this case the terms containing the covariant derivative PD or cd have already their indices in the canonical order and hence they require no further canonicalization. The other terms will be canonicalized but they do not contain covariant derivatives and therefore canonicalization proceeds in the standard fashion:

expr2=ToCanonical@%

expr1-expr2//ToCanonical

Canonicalization without introducing Christoffel tensors

In this procedure the canonicalization is carried in the same manner as if there was no metric. This means that dummy indices cannot be raised or lowered in the canonicalization process. To carry out this procedure we either change the default options of ToCanonical or use its option 
UseMetricOnVBundle->None.

Options[ToCanonical]

SetOptions[ToCanonical,UseMetricOnVBundle->None]

Now there is no change in the covariant derivative during the canonicalization process because dummy indices of the tensor inside the covariant derivative cannot be raised or lowered :

{X[b,-c]PD[-a][X[c,-d]],X[b,-c]cd[-a][X[c,-d]]}

ToCanonical[%]

The implosion mechanism

The implosion mechanism works by defining new tensors out of the covariant derivatives of the tensors that we have:

?Implode

?Explode

Again we assume that the metric exists:

SetOptions[ToCanonical,UseMetricOnVBundle->All]

{X[b,-c]PD[-a][X[c,-b]],X[b,-c]cd[-a][X[c,-b]]}

%//Implode

%//InputForm

Now, we do not need to worry about the presence of covariant derivatives in the canonicalization process:

%//ToCanonical

After the canonicalization, we recover back the covariant derivatives :

%//Explode

This can be done automatically using the corresponding option of ToCanonical:

{X[b,-c]PD[-a][X[c,-b]],X[b,-c]cd[-a][X[c,-b]]}

ToCanonical[%,Method->Implode]

Remember that the implosion mechanism defines additional tensors (the imploded tensors) :

$Tensors

Summary

Sometimes we work with covariant derivatives which are not compatible with the metric. We have three options:

Allow ToCanonical to produce Christoffel tensors by changing all the covariant derivatives to a covariant derivative compatible with a metric (the Christoffel tensors that appear are handled later). This is the default procedure when there is a metric defined in the session.

Do not introduce Christoffel symbols, and do not use ContractMetric. Use the option MetricOnVBundle->None of ToCanonical.

Use the implosion mechanism: The covariant derivatives of tensors are used to define new tensors using Implode which eliminates the covariant derivatives in an effective way. The covariant derivatives can be recovered back with Explode. Use the option Method->Implode of ToCanonical.

Exercises

Exercise 1

Canonicalize the following expression:

DefTensor[H[],M]

expr=PD[a][PD[-a][H[]]]-(metric[a,d]*metric[b,c]*PD[-b][H[]](PD[-a][metric[-d,-c]]-PD[-c][metric[-d,-a]]+PD[-d][metric[-a,-c]]))/2

Answer

We follow the three available possibilities and compare:

expr

ToCanonical@expr

Here we still need to use ToCanonical once more:

ToCanonical@%

ToCanonical[expr,Method->Implode]

“Explode” all the derivatives:

Explode@%

Finally canonicalize without assuming the presence of a metric:

ToCanonical[expr,UseMetricOnVBundle->None]

Recall that ToCanonical is not the same as getting the simplest expression:

ChangeCovD[expr,PD,CD]

ToCanonical@ContractMetric@%

Pattern Indices

We start a new xTensor session:

Exit

<<xAct`xTensor`

$DefInfoQ=False;

$PrePrint=ScreenDollarIndices;

Define manifold, metric & vector bundle:

DefConstantSymbol[dim,PrintAs->"d"]

DefConstantSymbol[NV,PrintAs->"N"]

DefManifold[M,dim,IndexRange[a,q]]

DefMetric[-1,metric[-a,-b],CD,PrintAs->"g"]

DefVBundle[IN,M,NV,Complement[IndexRange[A,Q],{C,D,K,E,I,M,F,N,O}]]

xTensor has a complete set of pattern indices which match different sorts of abstract and base indices. There are two main types: pattern indices matching abstract indices belonging to any vector bundle and pattern indices matching abstract indices belonging to particular vector bundles. Pattern indices are constructed with the aid of predicate functions. These are the predicate functions for indices belonging to any vector bundle:

?xAct`xTensor`*IndexQ

Predicate functions used to construct abstract pattern indices matching indices for any vector bundle (contravariant & covariant):

MatchQ[a,index_?AIndexQ]

MatchQ[-a,index_?AIndexQ]

MatchQ[-G,index_?AIndexQ]

MatchQ[-S,index_?AIndexQ]

Predicate functions used to construct abstract pattern indices matching indices for any vector bundle (contravariant):

MatchQ[a,index_?UpIndexQ]

MatchQ[-a,index_?UpIndexQ]

MatchQ[-G,index_?UpIndexQ]

MatchQ[-S,index_?UpIndexQ]

Predicate functions used to construct abstract pattern indices matching indices for any vector bundle (covariant):

MatchQ[a,index_?DownIndexQ]

MatchQ[-a,index_?DownIndexQ]

MatchQ[-G,index_?DownIndexQ]

MatchQ[-S,index_?DownIndexQ]

Predicate functions used to construct abstract pattern indices matching indices for a specific vector bundle (contravariant):

MatchQ[A,index_?IN`Q]

MatchQ[-A,index_?IN`Q]

MatchQ[f,index_?IN`Q]

Predicate functions used to construct abstract pattern indices matching indices for a specific vector bundle (contravariant & covariant):

MatchQ[A,index_?IN`pmQ]

MatchQ[-A,index_?IN`pmQ]

MatchQ[f,index_?IN`pmQ]

MatchQ[f,index_?TangentM`pmQ]

Predicate functions used to construct abstract pattern indices matching indices for a specific vector bundle (contravariant & covariant):

MatchQ[A,index_?(AIndexQ[#,IN]&)]

MatchQ[-A,index_?(AIndexQ[#,IN]&)]

MatchQ[f,index_?(AIndexQ[#,IN]&)]

Predicate functions used to construct abstract pattern indices matching indices for a specific vector bundle (covariant):

MatchQ[A,-index_?(AIndexQ[#,IN]&)]

MatchQ[-A,-index_?(AIndexQ[#,IN]&)]

MatchQ[f,-index_?(AIndexQ[#,IN]&)]

Use PatternIndex to construct automatically abstract pattern indices of different kinds:

?PatternIndex

PatternIndex[ab,AIndex,Up]

PatternIndex[ab,AIndex,Up,IN]

PatternIndex[ab,AIndex,Down,IN]

PatternIndex[ab,AIndex,Null,IN]

Recall the role of PatternTest in the general construction of WL patterns:

?PatternTest

PatternIndex[ab,AIndex,Up,IN]//FullForm

Summary

There are different pattern indices to match different types of abstract and base indices. We can classify them into two main groups:

Pattern indices matching indices belonging to any vector bundle.

Pattern indices matching indices belonging to specific vector bundle.

Within the above groups, pattern indices can match covariant indices, contravariant indices and both.

Exercises

Exercise 1

Define a pattern matching Gdelta with an arbitrary number of indices in:

i) an arbitrary vector bundle.
	ii) the tangent bundle.

Answer

i)

MatchQ[Gdelta[-G,-H,A,B],T_[inds1__?AIndexQ]]

MatchQ[Gdelta[-g,-a,-h,b,c,f],T_[inds1__?AIndexQ]]

ii)

MatchQ[Gdelta[-g,-a,b,c],T_[inds1__?(AIndexQ[#,TangentM]&)]]

MatchQ[Gdelta[-g,-a,-h,b,c,f],T_[inds1__?(AIndexQ[#,TangentM]&)]]

MatchQ[Gdelta[-G,-H,A,B],T_[inds1__?(AIndexQ[#,TangentM]&)]]

Exercise 2

Define a pattern matching a tensor with an arbitrary number of covariant indices in:

i) an arbitrary vector bundle.
	ii) the tangent bundle.

Answer

i)

MatchQ[T[-G,-H,-A,-B],HoldPattern[Ten_[inds__?DownIndexQ]]]

MatchQ[T[-G,-H,-A,-B,-J],HoldPattern[Ten_[inds__?DownIndexQ]]]

MatchQ[T[-G,H,-A,-B],HoldPattern[Ten_[inds__?DownIndexQ]]]

ii)

MatchQ[T[-g,-h,-a,-b],HoldPattern[Ten_[inds__Times?(AIndexQ[#,TangentM]&)]]]

MatchQ[T[-g,-h,-a,-b,-c],HoldPattern[Ten_[inds__Times?(AIndexQ[#,TangentM]&)]]]

MatchQ[T[-g,-h,-a,-B,-c],HoldPattern[Ten_[inds__Times?(AIndexQ[#,TangentM]&)]]]

MatchQ[T[-g,-h,-a,-b,c],HoldPattern[Ten_[inds__Times?(AIndexQ[#,TangentM]&)]]]