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

I'm trying to derive Maxwell equations in general curved space. I run into a very specific issue that's not related to this example but I couldn't find a simpler example to illustrate the issue. Here's my attempt:

{ \alpha, \beta, \mu, \nu, \lambda, \kappa, \rho, \sigma, \sigma# }::Indices(spacetime, position=independent).

{\nabla{#}, \delta{#}}::Derivative.

g_{ \mu \nu }::Metric.
g^{ \mu \nu }::InverseMetric.
g_{ \mu \nu }::Symmetric.
g^{ \mu \nu }::Symmetric.
g{#}::Depends(\nabla{#}, \partial{#}).

\Gamma^{\mu?}_{\nu? \rho?}::TableauSymmetry(shape={2}, indices={1,2}).

A{#}::Depends(\nabla{#}, \partial{#}).

ex:= L = - \sqrt{(- g)} (\frac{1}{4} g^{\mu \alpha} g^{\nu \beta} (\nabla_{\alpha}{A_{\beta}} - \nabla_{\beta}{A_{\alpha}})(\nabla_{\mu}{A_{\nu}} - \nabla_{\nu}{A_{\mu}}));
varyex:= \delta{L}.
substitute(varyex, ex);

distribute(varyex, repeat=True)
product_rule(varyex, repeat=True)
distribute(varyex, repeat=True)
substitute(varyex, $\delta{ \nabla_{\mu}{ A_{\nu} } } -> \nabla_{\mu}{ \delta{ A }_{\nu} } - \delta{\Gamma}^{\rho}_{\mu \nu} A_{\rho}$, repeat=True);

distribute(varyex, repeat=True)
canonicalise(varyex, repeat=True);

zoom(_, $Q?? \delta{\Gamma}^{\rho}_{\mu \nu}$);

You see at the end that there are four terms that should visibly cancel between each other. But I'm not sure what I should be doing to cancel them out. canonicalise doesn't seem to do the job. I tried using factor_out to pull out some pieces to see if the rest of it cancels. But nothing has worked yet.

Any suggestions?

in General questions by (740 points)

1 Answer

0 votes

Hi Jsem. Interesting problem to work on.

I tryied to obtain the expected result... but I started to go down the rabbit hole! However, I have a couple of suggestions:

  • The distribute before the substitution of $\delta \nabla A$ is unnecessary.
  • Instead of canonicalise the algorithm meld manages more efficiently the symmetries of the geometrical objects.
  • Use the sort_product and rename_dummies algorithms.

Updated version

I was writing the above solution, and then it occurs to me that the problem came through the terms $\delta\Gamma$.

So, after declaring the symmetry for those terms,

\delta{\Gamma}^{\mu?}_{\nu? \rho?}::TableauSymmetry(shape={2}, indices={1,2}).

the meld algorithm works as expected!!!

Hope it would be useful.

by (10.9k points)