2

Firstly, I realize that this is somewhat easy to do with replacement rules as a one off. However, I see that in my work this is something that I may like to use occasionally without much effort. What I would like in math notation is to go from the form:

\begin{equation} \nabla_\alpha u_\nu = \partial_\alpha u_\nu - \Gamma^\mu_{\ \alpha \nu} u_\mu = \partial_\alpha u_\nu - \frac12 (g^\mu_{\ \ \alpha,\nu} + g^\mu_{\ \ \nu,\alpha} - g^{\ \ ,\mu}_{\nu\alpha}) u_\mu \end{equation} In mostly xAct notation with some pseudo code at the end I was hoping for something that would do the following:

DefManifold[M,4,{a,b,c,d,e,f,i,j,k}]
DefChart[coords,M,{0,1,2,3},{v[],\[Xi][],\[Theta][],\[Nu][]}]
DefMetric[-1,metricg[-a,-b], CD, PrintAs->"g", SymbolOfCovD->{";","D"}]
DefTensor[u[-a],M]

eqn = (u[-a] metricg[a,b]CD[-b][u[-c]])metricg[c,d](u[-e] metricg[e,f]*CD[-f][u[-d]])

CDtoMetric[eqn] (* Some result similar to what I have written above *)

I'm still searching the different manuals I have downloaded and if I find the answer I will reply with it at such a time.

akozi
  • 853
  • 3
  • 10
  • 1
    Have a look at the commands CovDToChristoffel and ChristoffelToGradMetric. – jose Jan 13 '23 at 18:59
  • Thank you @jose I always feel bad for these questions as I know you have features implemented I just don't have to use the package enough to know them all off hand.

    Kind of tangential but I seem to recall there being a nice mathematica/slideshow on your website at some point but I can't find it in my downloads or on your webpage anymore.

    – akozi Jan 13 '23 at 19:51
  • I'm not sure which one you are referring to. The main intro notebooks and videos are listed in the initial section of http://xact.es/documentation.html . Check them out to see if the one you are looking for is there. – jose Jan 14 '23 at 10:18

1 Answers1

2

As Jose explained in the description the correct solution added to my pseudo-code looks like:

DefManifold[M,4,{a,b,c,d,e,f,i,j,k}]
DefChart[coords,M,{0,1,2,3},{v[],\[Xi][],\[Theta][],\[Nu][]}]
DefMetric[-1,metricg[-a,-b], CD, PrintAs->"g", SymbolOfCovD->{";","D"}]
DefTensor[u[-a],M]

eqn = (u[-a] metricg[a,b]CD[-b][u[-c]])metricg[c,d](u[-e] metricg[e,f]*CD[-f][u[-d]])

ScreenDollarIndices[ ChristoffelToGradMetric[CovDToChristoffel[eqn]]]

Seems to give the correct result.

akozi
  • 853
  • 3
  • 10
  • 1
    I always recommend to use $PrePrint = ScreenDollarIndices once, instead of having to wrap results in ScreenDollarIndices repeatedly. – jose Jan 14 '23 at 10:17