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

I am learning to use cadabra by finding out the Christoffel symbol after a conformal transformation to the metric. I have tried the following

   {\alpha,\beta,\gamma,\delta,\mu,\nu,\rho,\sigma,\kappa,\lambda,\chi,\xi#}::Indices(full, position=independent);
\nabla{#}::Derivative. 
g_{\mu\nu}::Metric. 
x::Coordinate.
g^{\mu\nu}::InverseMetric.
h_{m n}::Symmetric.
\phi(x)::Depends(x).
F::Depends(x).

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

substitute(_, $g_{\mu \nu} -> F^{-2} g_{\mu \nu} , g^{\mu\nu} -> F^2 g^{\mu\nu}$);

distribute(_)
product_rule(_)
distribute(_)
product_rule(_);

collect_factors(_);

factor_out(_, $g^{\mu? \nu?}$)
canonicalise(_);

Is the code correct? After the final `canonicalise(_);' the term $F^2F^{-2}$ still remains. Please help me to understand cadabra.

asked in General questions by (290 points)

1 Answer

+1 vote
 
Best answer

You need to write F-square as F**2 and the inverse of that as F**(-2). Caret and underscore symbols are for indices only.

answered by (41.6k points)
selected by

Thank you Kasper.

...