324 views

Skip to first unread message

Aug 8, 2010, 11:28:14 AM8/8/10

to xAct Tensor Computer Algebra

Dear all,

I have 3 questions and I will be very thankful if you can help me.

I have 3 questions and I will be very thankful if you can help me.

1) Is it possible to tell Xact to commute ParamD and the covariant derivative?

2)How can I implement an automatic rule of the form (cd is the covariant derivative):

MakeRule[{ cd[a] [ ParamD[μ][α[]]], n[a] ParamD[μ,μ][α[ ] ] ] } MetricOn -> All,

ContractMetrics -> True]]?

The following command does not seem to work

AutomaticRules[α, MakeRule[{cd[a][ParamD[μ][α[]]], n[a] ParamD[μ, μ][α[]]}, MetricOn -> All,

ContractMetrics -> True]].

3) I need to declare two tensors as non commuting operators (say two generators of a Lie algebra M[a,b] and M[c,d]). Is this possible?

Thank you for your time,

Best

Ahmed YOUSSEF

Aug 13, 2010, 9:30:48 AM8/13/10

to xAct Tensor Computer Algebra

Hi,

> 1) Is it possible to tell Xact to commute ParamD and the covariant derivative?

Yes. When you have two types of derivatives you need to sort them into

some preferred order. For example you might want to have all ParamD

derivatives outside the covariant derivatives (this is wrong of course

if the Christoffel of covd depends on any of the parameters ps):

ParamD /: covd_?CovDQ[i_][ ParamD[ps__][expr_] ] := ParamD[ps]

[ covd[i][expr] ]

or you might want the opposite:

ParamD[ps__][ covd_?CovDQ[i_][ expr_ ] ] := covdQ[i][ ParamD[ps]

[ expr ] ]

If you think you will use a different convention in different places

then define delayed rules and use them as desired. The fact that there

are two possibilities is what makes this not being automatic in

xTensor.

> 2)How can I implement an automatic rule of the form (cd is the covariant derivative):

>

> MakeRule[{ cd[a] [ ParamD[μ][α[]]], n[a] ParamD[μ,μ][α[ ] ] ] } MetricOn -> All,

> ContractMetrics -> True]]?

>

> The following command does not seem to work

>

> AutomaticRules[α, MakeRule[{cd[a][ParamD[μ][α[]]], n[a] ParamD[μ, μ][α[]]}, MetricOn -> All,

> ContractMetrics -> True]].

Well, it does work, but perhaps not as you expect. There are two

commands in that construction. First you have MakeRule, which

constructs the rule you want. But then you try to associate it to the

symbol α, and that symbol is too deep (this is the famous level-1

restriction of upvalues in Mathematica). Hence AutomaticRules puts the

rule into a global variable of xTensor, called $Rules, which you must

use by hand whenever you need this rule. Instead, what you can do is

associating your rule to cd, which is not that deep. You can also

declare the rule by hand:

cd[a_][ ParamD[μ][α[]] ] := n[a] ParamD[μ, μ][α[]]

which will associate it to cd as well. Remember that MakeRule is just

a convenience function to help in constructing simple cases. With

Mathematica's language you can construct any rule, far beyond

MakeRule's capabilities.

> 3) I need to declare two tensors as non commuting operators (say two generators of a Lie algebra M[a,b] and M[c,d]). Is this possible?

This is a very general question. In xAct there is no predefined

concept of operator action. And tensor products are handled via

abstract indices and the Times product. Hence the only type of

operator action is stringing the operators through index contractions

in a formal inner space (say with indices A,B,...). Think of the

elements of the Lie algebra as represented with matrices whose indices

are A,B,... etc. You would work with objects having both indices

a,b,... and A,B,...

Cheers,

Jose.

> 1) Is it possible to tell Xact to commute ParamD and the covariant derivative?

some preferred order. For example you might want to have all ParamD

derivatives outside the covariant derivatives (this is wrong of course

if the Christoffel of covd depends on any of the parameters ps):

ParamD /: covd_?CovDQ[i_][ ParamD[ps__][expr_] ] := ParamD[ps]

[ covd[i][expr] ]

or you might want the opposite:

ParamD[ps__][ covd_?CovDQ[i_][ expr_ ] ] := covdQ[i][ ParamD[ps]

[ expr ] ]

If you think you will use a different convention in different places

then define delayed rules and use them as desired. The fact that there

are two possibilities is what makes this not being automatic in

xTensor.

> 2)How can I implement an automatic rule of the form (cd is the covariant derivative):

>

> MakeRule[{ cd[a] [ ParamD[μ][α[]]], n[a] ParamD[μ,μ][α[ ] ] ] } MetricOn -> All,

> ContractMetrics -> True]]?

>

> The following command does not seem to work

>

> AutomaticRules[α, MakeRule[{cd[a][ParamD[μ][α[]]], n[a] ParamD[μ, μ][α[]]}, MetricOn -> All,

> ContractMetrics -> True]].

commands in that construction. First you have MakeRule, which

constructs the rule you want. But then you try to associate it to the

symbol α, and that symbol is too deep (this is the famous level-1

restriction of upvalues in Mathematica). Hence AutomaticRules puts the

rule into a global variable of xTensor, called $Rules, which you must

use by hand whenever you need this rule. Instead, what you can do is

associating your rule to cd, which is not that deep. You can also

declare the rule by hand:

cd[a_][ ParamD[μ][α[]] ] := n[a] ParamD[μ, μ][α[]]

which will associate it to cd as well. Remember that MakeRule is just

a convenience function to help in constructing simple cases. With

Mathematica's language you can construct any rule, far beyond

MakeRule's capabilities.

> 3) I need to declare two tensors as non commuting operators (say two generators of a Lie algebra M[a,b] and M[c,d]). Is this possible?

concept of operator action. And tensor products are handled via

abstract indices and the Times product. Hence the only type of

operator action is stringing the operators through index contractions

in a formal inner space (say with indices A,B,...). Think of the

elements of the Lie algebra as represented with matrices whose indices

are A,B,... etc. You would work with objects having both indices

a,b,... and A,B,...

Cheers,

Jose.

Reply all

Reply to author

Forward

0 new messages

Search

Clear search

Close search

Google apps

Main menu