Computing a two tensor using the index notation

60 views
Skip to first unread message

Shrey Aryan

unread,
Feb 24, 2022, 9:17:29 AM2/24/22
to xAct Tensor Computer Algebra
Hello,

I am working with the de Sitter metric which takes the form
$$g=\tau^{-2}\left(-\left(\Lambda / 3-\tau^{2}\right)^{-1} d \tau^{2}+\left(\Lambda / 3-\tau^{2}\right) d t^{2}+g_{\mathbb{S}^{2}}\right)$$
in the co-ordinates $\{\tau, t, \theta, \phi\}.$

Define $F=-Q d\tau \wedge dt.$ Then I want to define the following function which takes a two tensor (metric) and returns a two tensor as well.

$$L(\dot{g})_{\mu\kappa} = \dot{g}^{\nu \lambda}\left(F_{\mu \nu} F_{\kappa \lambda}-\frac{1}{2} g_{\mu \kappa} F_{\rho v} F^{\rho}{ }_{\lambda}\right)+\frac{1}{2} \dot{g}_{\mu \kappa}|F|_{g}^{2}
\\
= \dot{g}^{\nu \lambda}\left(F_{\mu \nu} F_{\kappa \lambda}-\frac{1}{2} g_{\mu \kappa} F_{\rho v} F^{\rho}{ }_{\lambda}\right)-\frac{Q^2\tau^4}{2} \dot{g}_{\mu \kappa}.$$

Here we identify two forms with a two tensor in the following sense that $F=-Qd\tau\otimes dt+Qdt \otimes d\tau.$

My goal is to compute $L$ for $d\tau^2/\tau^2$ and some other two tensors. I wrote the following code:

Mathematica Code:

    DefManifold[M, 4, IndexRange[a, z]]

    DefChart[ch, M, {0, 1, 2, 3}, {\[Tau][], ti[], \[Theta][], \[Phi][]}, ChartColor -> Blue]

    g = CTensor[DiagonalMatrix[{-1/( \[Tau]^2*(\[Lambda]/3- \[Tau]^2)),(\[Lambda]/3- \[Tau]^2)/ \[Tau]^2 , 1/ \[Tau]^2, sin^2(\[Theta])/\[Tau]^2}], {-ch, -ch}]

    F = CTensor[MatrixForm[{{0,-Q, 0, 0},{Q, 0, 0, 0}, {0, 0, 0, 0}, {0,0, 0, 0}}], {-ch, -ch}]

    gDot = CTensor[MatrixForm[{{1/\[Tau]^2, 0, 0, 0},{0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}}], {-ch, -ch}]

    SetCMetric[g, ch, SignatureOfMetric -> {3, 1, 0}]

    expr = gDot[v, l]*(F[-m, -v]*F[-k, -l] - (1/2)*g[-m, -k]*F[-r,-v]*F[r,-v])-(Q^2*\[Tau]^4/2)*gDot[-m,-k]

I am not sure how to proceed further. I would like to simplify the above expression by summing over the repeated indices. But I keep getting the error: 

CTensor::nobd: Incompatible number of bases 4 and array depth 2.

Could anyone explain what this error message means and how I could go about fixing my code? 

Thank you for your time! 


Jose

unread,
Feb 24, 2022, 10:26:07 AM2/24/22
to xAct Tensor Computer Algebra
Hi,

There were a few problems with that input, which I think I've fixed. Analyze this new version and ask again if there is something unclear:

DefManifold[M, 4, IndexRange[a, z]]

DefChart[ch, M, {0, 1, 2, 3}, {\[Tau][], ti[], \[Theta][], \[Phi][]},ChartColor -> Blue]

DefConstantSymbol[\[Lambda]]

DefTensor[Q[], M]

g = CTensor[DiagonalMatrix[1/\[Tau][]^2 {-1/(\[Lambda]/3 - \[Tau][]^2), (\[Lambda]/3 - \[Tau][]^2), 1, Sin[\[Theta][]]^2}], {-ch, -ch}];

gDot = CTensor[DiagonalMatrix[1/\[Tau][]^2 {1, 0, 0, 0}], {-ch, -ch}];

F = CTensor[{{0, -Q[], 0, 0}, {Q[], 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}}, {-ch, -ch}];


SetCMetric[g, ch, SignatureOfMetric -> {3, 1, 0}]

gDot[v, l]*(F[-m, -v]*F[-k, -l] - (1/2)*g[-m, -k]*F[-r, -v]*F[r, -l]) - (Q[]^2*\[Tau][]^4/2)*gDot[-m, -k] // Simplify

Cheers,
Jose.
Reply all
Reply to author
Forward
0 new messages