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

Hi everyone!

I don't understand why in the following code, the substitute command can't act on g^{\mu \nu} in the gamma expression defined in the code.

{\alpha, \beta, \rho, \mu, \nu, \sigma, \lambda, \theta}::Indices(position=fixed, vectors).
\eta_{\mu \nu}::Metric.
\eta^{\mu \nu}::InverseMetric.
h^{\mu \nu}::Symmetric.
g^{\mu \nu}::Symmetric.
{h^{\mu \nu}, h, g_{\mu \nu}, g^{\mu \nu}, \phi}::Depends(\partial).
\Gamma^{\alpha}_{\beta \rho}::Depends(\partial).
\Gamma^{\alpha}_{\beta \rho}::TableauSymmetry(shape={2}, indices={1,2}).
gamma:=\Gamma^{\alpha}_{\beta \rho} = \frac{1}{2} g^{\alpha \theta}[\partial_{\rho}{g_{\theta \beta}}
+\partial_{\beta}{g_{\theta \rho}}-\partial_{\theta}{g_{\beta \rho}}];
substitute(gamma, $g^{\mu \nu} -> \eta^{\mu \nu}-k h^{\mu \nu}$);
in General questions by (1.1k points)

1 Answer

0 votes
Best answer

Look carefully at how you wrote the gamma expression. You write

g^{\alpha\theta}[\partial_{\rho}{...} ... ]

There is no space between the g^{\alpha\beta} and the bracket [. The result is that the stuff inside [...] is interpreted as an argument to g^{\alpha\beta}, not as a factor multiplying this tensor.

Insert a space in front of the [ and all is fine.

by (80.4k points)
selected by

Wow! That was a very subtle point! I was struggling with it for hours. Thanks for your patience with my questions!