Welcome to Cadabra Q&A, where you can ask questions and receive answers from other members of the community.
+1 vote

I have a metric of the form, g_{\mu \nu} =

0 0 1
0 b_{ij} u
1 u^T f

where $u$ and $b_{i j }$ do not depend on the first coordinate $s$. The inverse metric is g^{\mu \nu} =

b^{i j} u_i u_j - f - u_i b^{i j} 1
-b^{i j}u_j b^{i j} 0
1 0 0

I would like to compute the Christoffel symbols I first try to followed section 2.5 in the paper, https://arxiv.org/pdf/hep-th/0701238

After the comments I have updated my code, here is the edited code and an explanation.

I wanted to split the Greek indices (${ \mu, \nu ...}$) into three parts: first: a capital Latin index that runs from 2 to $d$, second: small latin letters that run from 2 to $d-1$ and the last index $s1, s2,s3$ to the last coordinate $d$. To simplify the problem I tried first $d=4$ so for example, $\mu=1,2,3,4$, $A=2,3,4$, $i,j = 2, 3$ and $s1=4$. To do this splitting I used,

{\mu,\nu,\rho,\sigma,\kappa,\lambda,\eta,\chi#}::Indices(full, position=fixed, values={1,2,3,4}).
{A,B,C,D}::Indices(subspace, position=fixed, parent=full, values={2,3,4}).
{i,j, m,n,p,q,r,v#}::Indices(subspace2, position=fixed, parent=subspace, values={2,3}).
{s1,s2,s3}::Indices(subspace1, position=fixed, parent=subspace, values={4}).

the updated code following the sugestions in the comments is,

\partial{#}::PartialDerivative.
g_{\mu\nu}::Metric.
g^{\mu\nu}::InverseMetric.
g_{\mu? \nu?}::Symmetric.
g^{\mu? \nu?}::Symmetric.

b_{i j}::Metric.
b^{i j}::InverseMetric.
\delta^{\mu?}_{\nu?}::KroneckerDelta.
\delta_{\mu?}^{\nu?}::KroneckerDelta.

Gtog:= \Gamma^{\lambda}_{\mu \nu} -> (1/2) * g^{\lambda \kappa} (\partial_{\nu}{ g_{\kappa\mu}} + \partial_{\mu}{g_{\kappa \nu}} + \partial_{\kappa}{g_{\mu\nu} } );

Gamma4ij := \Gamma^{4}_{i j};

substitute(Gamma4ij, Gtog);

split_index(Gamma4ij, $\mu, 1, A$, repeat=True);

split_index(Gamma4ij, $A, i, 4$, repeat=True);
substitute(_, $g_{1 m} -> 0$ )
substitute(_, $g_{1 4} -> 1$ )
substitute(_, $g_{m 1} -> 0$ )
substitute(_, $g_{m n} -> b_{m n}$ )
substitute(_, $g_{m 4} -> U_{m}$ )
substitute(_, $g^{4 1} -> 1$ )
substitute(_, $g_{4 m} -> U_{m}$ )
substitute(_, $g_{4 4} -> f$ )
substitute(_, $g^{1 1} -> U_{m} b^{m n} U_{n} - f$ )
substitute(_, $g^{1 m} -> - U_{n} b^{n m}$ )
substitute(_, $g^{1 4} -> 1$ )
substitute(_, $g^{m 1} -> - U_{n} b^{n m}$ )
substitute(_, $g^{m n} -> b^{n m}$ )
substitute(_, $g^{m 4} -> 0$ )
substitute(_, $g^{4 1} -> 1$ )
substitute(_, $g^{4 m} -> 0$ )
substitute(_, $g^{4 4} -> 0$ )
substitute(_, $\partial_{1}{U??} -> 0$, repeat=True)
substitute(_, $\partial_{1 \mu?}{U??} -> 0$, repeat=True)
substitute(_, $\partial_{\mu? 1}{U??} -> 0$, repeat=True)
substitute(_, $\partial_{\mu? 1}{b???} -> 0$, repeat=True)

canonicalise(_);

I obtained the output $\Gamma^{4}_{i j} $, while if I change the definition of the Christoffel symbols and include ?,

Gtog:= \Gamma^{\lambda?}_{\mu?\nu?} ->
 (1/2) * g^{\lambda?\kappa} (
 \partial_{\nu?}{ g_{\kappa\mu?} } + \partial_{\mu?}{g_{\kappa\nu?} }
- \partial_{\kappa}{ g_{\mu?\nu?} } ); 

I obtain 0, but I know $\Gamma^{4}$ is not 0 so I don't know where my code is wrong. I would like to ask, how can I improve it and how can I generalise it to $d$ dimensions.

in General questions by (180 points)
edited by

Hi raulastur. Your code, as written in the question, has many errors. For example, there are a lot of underscores (_) before and after substitution commands.

I suggest that you firsly clean a bit the code, before we try to go through it.

Then, we'll gladly try to help you (most of us are not "expert").

Cheers.

thank you, must have been a mistake in copying and pasting from different cells. I have now edited and hopefully is fine

2 Answers

+1 vote
 
Best answer

Hi again raulastur.

Perhaps this would be repetitive, since Arina already post an answer to your question... but Ok, we learn by asymptotic approximation!

Modifications to your work

As usual, you have to declare the objects and properties

{\mu,\nu,\rho,\sigma,\kappa,\lambda,\eta,\chi#}::Indices(full, position=fixed, values={1,2,3,4}).
{A,B,C,D}::Indices(subspace, position=fixed, parent=full, values={2,3,4}).
{i,j, m,n,p,q,r,v#}::Indices(subspace2, position=fixed, parent=subspace, values={2,3}).
{s1,s2,s3}::Indices(subspace1, position=fixed, parent=subspace, values={4}).

\partial{#}::PartialDerivative.
g_{\mu\nu}::Metric.
g^{\mu\nu}::InverseMetric.
g_{\mu? \nu?}::Symmetric.
g^{\mu? \nu?}::Symmetric.

b_{i j}::Metric.
b^{i j}::InverseMetric.
{\delta^{\mu?}_{\nu?},\delta_{\mu?}^{\nu?}}::KroneckerDelta.

{b_{i j},b^{i j}}::Depends(\partial{#}).

I wanted to keep your definitions almost untouched.

I've added the dependence of the $b$ field on the partial derivative (although it is not important in the following code.

Then, I assume that the long sequence of substitutions would be applied to other expressions as well, so instead of your approach, I prefer to define a set of substitution rules

rl := { g_{1 m} -> 0, g_{1 4} -> 1, g_{m 1} -> 0, g_{m n} -> b_{m n}, g_{m 4} -> U_{m}, g^{4 1} -> 1,
    g_{4 m} -> U_{m}, g_{4 4} -> f, g^{1 1} -> U_{m} b^{m n} U_{n} - f, g^{1 m} -> - U_{n} b^{n m}, g^{1 4} -> 1,
    g^{m 1} -> - U_{n} b^{n m}, g^{m n} -> b^{n m}, g^{m 4} -> 0, g^{4 1} -> 1, g^{4 m} -> 0, g^{4 4} -> 0,
    \partial_{1}{U_{m}} -> 0, \partial_{1 \mu?}{U_{m}} -> 0, 
    \partial_{\mu? 1}{U_{m}} -> 0, \partial_{\mu? 1}{b_{i j}} -> 0};

Above, I changed the substitutions that used double question marks, U?? or other.

Also include the Christoffel definition

Gtog:= \Gamma^{\lambda?}_{\mu? \nu?} = (1/2) * g^{\lambda? \kappa} (\partial_{\nu?}{ g_{\kappa \mu?}} 
    + \partial_{\mu?}{g_{\kappa \nu?}} + \partial_{\kappa}{g_{\mu? \nu?} } );

Note that the summed index has to run over the full space, while the other indices have the question mark (?) to ensure that the rule could be applied to whatever type of index (like 4).

Now, I define the expression to be manipulated,

Gamma4ij := \Gamma^{4}_{i j};

and expand the indices

substitute(Gamma4ij, Gtog)
split_index(Gamma4ij, $\mu, 1, A$, repeat=True)
split_index(Gamma4ij, $A, i, 4$, repeat=True);

Finally, I use the substitution rule rl to obtain the result:

substitute(Gamma4ij, rl, repeat=True);

The result I obtain is $\partial1 b{i j}$.

Why?

When you used the double question mark notation, U??, in the substitution rule, it would substitute not just the variable called U, but any variable. Look at this example:

ex:=A_{m n} + B_{m n};
substitute(_, $A? + B? -> 0$ );
substitute(_, $M?? + N?? -> 0$ );

Hope this would help you.

Dox

by (14.3k points)
selected by

thanks a lot! I didn't know the correct effect of the double question mark and hence my code was wrong.

+1 vote

Hi! First, you should specify the values that your indexes run through, e.g.

{\mu,\nu,\rho,\sigma,\kappa,\lambda,\eta,\chi#}::Indices(full, position=fixed, values={1,2,3,4})

Second, you should not use "?" in your gamma definition, because ? means an arbitrary index, and the split_index function doesn't work with it.

I did a similar calculation, and I had to count separately the components of Christoffel symbols that do not fall under arbitrary indices, i.e., you have to distinguish $\Gamma^{4}_{m n}$ and calculate it separately.

I suggest you try it like this

{\mu,\nu,\rho,\sigma,\kappa,\lambda,\eta,\chi#}::Indices(full, position=fixed, values={1,2,3,4}).
{A,B,C,D}::Indices(subspace, position=fixed, parent=full, values={2,3,4}).
{I, J, M, N, P,Q,R,V#}::Indices(subspace2, position=fixed, parent=subspace, values={2,3}).
{i,j, m,n,p,q,r,v#}::Indices(subspace1, position=fixed, parent=subspace, values={4}).

\partial{#}::PartialDerivative.
g_{\mu\nu}::Metric.
g^{\mu\nu}::InverseMetric.
g_{\mu? \nu?}::Symmetric.
g^{\mu? \nu?}::Symmetric.

b_{I J}::Metric.
b^{I J}::InverseMetric.
\delta^{\mu?}_{\nu?}::KroneckerDelta.
\delta_{\mu?}^{\nu?}::KroneckerDelta.

Gtog:= \Gamma^{\lambda?}_{\mu?\nu?} -> (1/2) * g^{\lambda? \kappa} (\partial_{\nu?}{ g_{\kappa\mu?}} + \partial_{\mu?}{g_{\kappa \nu?}} + \partial_{\kappa}{g_{\mu?\nu?} } );

Gamma4IJ := \Gamma^{4}_{I J};

substitute(Gamma4IJ, Gtog);

split_index(Gamma4IJ, $\mu, A, 1$, repeat=True);

split_index(Gamma4IJ, $A, I, 4$, repeat=True);

And I noticed that you are mixing up index groups in your code, this can cause an issue too

by (1.7k points)

Thanks for your answer, I have redone the indexing (a bit different to your splitting but following the same idea). Unfortunately, I still don't get the desired result (with or without the ? in the definition of Gtog)

...