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

Hellow everyone, I am computing the Christoffel symbol for a specific Metric. At the end, I get the correct answer, but if you see below, the first two terms are the same but with opposite sign. I don't know why Cadabra does not allow to simplify the result.

{\alpha,\beta,\gamma,\delta,\mu,\nu,\rho,\sigma,\kappa,\lambda,\chi,\xi#}::Indices(full, position=fixed);
\nabla{#}::Derivative;
\partial{#}::PartialDerivative;
g_{\mu\nu}::Metric. 

Christoffel:=g^{\lambda\kappa} ( \partial_{\nu}{ g_{\kappa\mu} } 
                    + \partial_{\mu}{ g_{\kappa\nu} } - \partial_{\kappa}{ g_{\mu\nu} } );

#Metric
substitute(_,  $g_{\mu \nu} -> \partial_{\mu}{\gamma}\partial_{\nu}{\gamma}\exp^{(-\gamma)} $);

#Rule derivative of exponential function

product_rule(_);
substitute(_, $\partial_{\mu?}{\exp(-\gamma)} -> -\exp(-\gamma)\partial_{\mu?}{\gamma}$)
canonicalise(_);
simplify(_);

#Answer:

$g^{\lambda\kappa} ( \partial_{\nu\mu} \gamma \partial_{\kappa}\gamma \exp^{(-\gamma)} - \partial_{\kappa}\gamma \partial_{\nu\mu} \gamma \exp^{(-\gamma)} -2\partial_{\kappa}\gamma \partial_{\nu} \gamma \partial_{\mu} \gamma \exp^{(-\gamma)}+ \partial_{\kappa\nu} \gamma \partial_{\mu} \gamma \exp^{(-\gamma)})$

I would appreciate any help. Xavier

in General questions by

1 Answer

+1 vote

Use sort_product to put all factors in all products in the same order, before you canonicalise. The latter only changes index labels, not factor positions.

by (82.6k points)
...