<<

arXiv:0903.2087v2 [gr-qc] 18 Dec 2019 iesfo h rti ubro motn as is,tediscu the vers First, intro second ways. syntax 2016) This revised in important the updated of for 2009. (itself number account Cadabra in to a written rewritten in completely was first been paper the this from of differs version first The Journal: arXiv:0903.2087 Preprint: napeiu ae [ paper previous a In Introduction 1 encretdadtoogl rs-hce.Anme fmino of number T c A generalised equations). corrected. g cross-checked. the arc-length been the thoroughly also upon the in and and built terms corrected problem computations order value been higher to boundary and line, and quartic the initial the t down Tho in (by then, first Cadabra corrected. and errors in been implementation to has their lead paper) correct This this were (of version version first the first the in error osgoerclojcsi oeso h uvtr n t deriva its and curvature ser the a of to powers leads in that geod objects geometry as geometrical differential Ca known ious in (also how co coordinates showing computation the normal by standard metric, Riemann point a the of that as terms address ch in such more to length, objects, on is geometrical perform paper various might this express Cadabra of well funct how basic purpose the of The appreciate question to the reader wer open the examples left allow The to as Relativity. simple General sufficiently in encountered often tations ([ Cadabra program algebra imn omlCodnt xasosuigCadabra using expansions Coordinate Normal Riemann 1 h aar eut nti ae r ae nCdba227(ul 22 (build 2.2.7 Cadabra on based are paper this in results Cadabra The re ntecraueadwr banduigtecmue a computer the using obtained o were All and curvature presented. othe the be and in will metric order arc-length, the of the expansions including coordinate normal Riemann Class.Quantum.Grav. 1 eiso ipeeape eeue odmntaehwtecomp the how demonstrate to used were examples simple of series a ] 2 ,[ ], colo ahmtclSciences Mathematical of School 3 26 ,[ ], 1 eod n oeipraty infiatcomputational significant a importantly, more and Second, . oahUiest,3800 University, Monash 707(2009) 175017 4 ,[ ], 2Ag20 (v1) 12-Aug-2009 0Dc21 (v2) 10-Dec-2019 5 )cudb mlydt oteknso esrcompu- tensor of kinds the do to employed be could ]) eso 2 Version e Brewin Leo Abstract Australia 1 h eut r ie ofifth- to given are results the f ncinadtegoei arc- geodesic the and nnection gbapcaeCadabra. package lgebra 8b7704 ae 2019-12-01) dated 68.ba747e0b49 ue ntelts eso of version latest the in duced emtia quantities, geometrical r g h loihsgvnin given algorithms the ugh yorpia roshave errors typographical r eieaeycoe obe to chosen deliberately e ie.Tefis e terms few first The tives. e xaso o h var- the for expansion ies i uhr a incorrect. was author) his oaiyo aar.This Cadabra. of ionality sccodnts.Ti is This coordinates). esic legn computations. allenging eCdbacdshave codes Cadabra he nrlsdconnections eneralised so nCdbahas Cadabra on ssion o witni 2019) in (written ion ar a eue to used be can dabra netos(.. the (e.g., onnections uter are rather easy to compute by hand but further progress, to higher order terms, quickly be- comes prohibitively difficult. Thus some computer tool, in this case Cadabra, is essential when computing these higher order terms. The first part of this paper will be concerned with purely mathematical and algorithmic issues including a definition of Riemann normal coordinates, how they can be constructed (from generic coordinates) and what properties they confer upon geometrical objects (such as the metric, the connection etc.). In the second part the attention will shift to issues specific to Cadabra. This will be followed by full details of the 5th-order expansion of the metric and other objects. It should be emphasised that the primary objective of this paper is to demonstrate that Cadabra is a mature program that can easily handle an otherwise prohibitive computation. Some of the Cadabra results for the metric do replicate results by other authors (e.g., equation (11.1) is consistent with that given in [6], [7], [8], and [9] while some results are original (in particular, the solution for the two-point boundary value problem, (11.20)). Before turning the discussion to the definition and construction of Riemann normal coordinates, a simple coordinate transformation will be introduced. This will help in making clear what is meant by the statement that an expression is an expansion to a given order.

2 Conformal coordinates

Each algorithm given later in this paper yields polynomial approximations to particular ge- ometric quantities (e.g., the metric). Higher order approximations are obtained by recursive application of the algorithms. The primary goal of this section is to provide meaning to the statement that the polynomial n Sǫ is an expansion of S up to and including terms of order O (ǫ ). The key to this definition is the use of a conformal transformation of the original metric. Consider some neighbourhood of O and let ǫ be a typical length scale for O (for example, ǫ might be the length of the longest geodesic that passes through O and confined by the neighbourhood). Construct any regular set of coordinates xa (i.e., such that the metric components are non- a singular) in the neighbourhood of O and let the coordinates of O be x⋆. The word patch will be used to denote the neighbourhood of O in which these coordinates are defined. Now define a new set of coordinates ya by a a a x = x⋆ + ǫy and thus 2 a b 2 a b ds = gab(x)dx dx = ǫ gab(x⋆ + ǫy)dy dy The conformal metric ds˜ can now be defined by ds˜ = ds/ǫ2. This leads to

2 a b a b ds˜ = gab(x⋆ + ǫy)dy dy =g ˜ab(y, ǫ)dy dy and 2 g˜ab = gab , g˜ab,c = ǫgab,c , g˜ab,cd = ǫ gab,cd at O where the partial derivatives on the left are with respect to y and those on the right are with respect to x. Since gab(x⋆) does not depend on ǫ it is easy to see that

n g˜ab,i1i2i3···in = O (ǫ ) at O

2 From this it follows, by simple inspection of the standard equations, that

˜a n+1 Γ bc,i1i2i3···in = O ǫ at O ˜a n+2 R bcd,i1i2i3···in = O ǫ  at O  There are now two ways to look at the patch. It can be viewed as a patch of length scale ǫ with a curvature independent of ǫ. Or it can be viewed as a patch of fixed size but with a curvature that depends on ǫ (and where the limit ǫ → 0 corresponds to flat space). This later view is useful since it ensures that the series expansions around flat space can be made convergent (by choosing a sufficiently small ǫ). These conformal coordinates will be used for the remainder of this paper. As there is no longer any reason to distinguish between xa and ya, the ya will be replaced with xa. The xa will now be treated as generic coordinates (but keep in mind that there is an underlying conformal transformation built into these coordinates).

n Finally, the statement that Sǫ is an order O (ǫ ) expansion of S will be taken to mean that n is the smallest positive integer for which |S − S | 0 < lim ǫ < M ǫ→0 ǫn+1 for some finite positive M i.e., if S were expanded as a Taylor series in ǫ around ǫ = 0 then S n+1 and Sǫ would differ by terms proportional to ǫ .

3 Riemann Normal Coordinates

The basic idea behind Riemann normal coordinates is to use the through a given point to define the coordinates for nearby points. Let the given point be O (this will be the origin of the Riemann normal frame) and consider some nearby point P . If P is sufficiently close to O then there exists a unique geodesic joining O to P . Let va be the components of the unit tangent vector to this geodesic at O and let s be the geodesic arc length measured from O to P . Then the Riemann normal coordinates xa of P relative to O are defined to be xa = sva. These coordinates are well defined provided the geodesics do not cross (which can always be ensured by choosing the neighbourhood of O to be sufficiently small). For more mathematical details see ([10], [11], [12]) and in particular the elegant exposition by Gray ([13], [14]). One trivial consequence of this definition is that all geodesics through O are of the form xa(s)= sva and that the va are constant along each geodesic. This implies, by direct substitution into c the geodesic equation, that Γ ab =0 at O which in turn implies that gab,c = 0 at O. Suppose now that the metric can be written as a Taylor series in xa about O. In that series only the zero, second and higher derivatives of the gab would appear. Thus the leading terms of the metric can be expressed as a sum of a constant part (the leading term) plus a curvature part (from the second and higher derivative terms). Similar expansions arise for other geometrical quantities (e.g., geodesics, arc length) in terms of a flat space part plus a curvature contribution. Suppose, as is almost always the case, that the coordinates xa are not in Riemann normal form. How might they be transformed to a local set of Riemann normal coordinates? A first attempt might be to make direct appeal to the basic definition, namely, ya = sva. Unfortunately this does raise an immediate problem. The quantities va are rarely known explicitly but must instead be computed by solving a two-point boundary value problem. This is non-trivial but it

3 can be dealt with in a number of ways. The approach adopted here is to iterate over a sequence of initial value problems to provide a sequence of approximations to the solution of the original boundary value problem. Here is a brief outline of the process – this serves as an introduction to the next two sections where the full details will be given. First, consider any method for computing the coordinates xa(s) of a typical geodesic that orig- inates from O. This solution of the typical initial value problem will depend on two integration constants, xa andx ˙ a, being the respective values of xa(s) and dxa/ds at s = 0. Next, embed this first step in an iterative scheme (e.g., a fixed-point scheme) to produce successive approx- imations tox ˙ a so that the geodesic passes through not only O but also P . The final step, assuming the sequence converges, is to set va to bex ˙ a and finally ya = sva. The next two sub-sections provide further details on how the initial and boundary value prob- lems were solved.

3.1 The initial value problem

The aim here is to obtain a Taylor series, about the point O, for the solution of the geodesic equation d2xa dxb dxc 0= +Γa (x) ds2 bc ds ds subject to the initial conditions xa(s)= xa and dxa/ds =x ˙ a at s = 0. First choose s =0 at O and then write the Taylor series for xa(s) as

∞ dxa sn dnxa xa(s)= xa| + s + s=0 ds n! dsn s=0 n=2 s=0 X

The second and higher derivatives can be obtained by successive diff erentiation of the geodesic equation leading to

∞ n a a a s a i1 i2 i3 in x (s)= x + sx˙ − Γ ··· n x˙ x˙ x˙ ··· x˙ (3.1) n! i1i2i3 i n=2 X a where the Γ i1i2i3···in , known as generalised connections, are defined recursively by

a a a p Γ i1i2i3···in =Γ (i1i2i3···in−1,in) − nΓ p(i2i3···in−1 Γ i1in) (3.2)

Note that the use of round brackets (...) denotes total symmetrisation over the included indices (see Appendix A for more details). A convenient shorthand for equation (3.2) in terms of covariant derivatives can be obtained by ignoring (in this context alone) the single upper index. This leads to the compact notation

a a Γ i1i2i3···in =Γ (i1i2;i3i4i5···in) (3.3)

3.2 The boundary value problem

The question here is: How canx ˙ a be chosen so that the geodesic passes through not only O but also P ? The geodesic, by construction, already passes through O so that leaves P as the

4 main focus of attention. Suppose that the coordinates of P are xa + ∆xa where xa are the coordinates of O. Let sP be the geodesic distance from O to P . The challenge now is to solve

∞ n a a sP a i1 i2 i3 in ∆x = s x˙ − Γ ··· n x˙ x˙ x˙ ··· x˙ P n! i1i2i3 i n=2 X forx ˙ a in terms of ∆xa and the generalised connections.

a a Put y = sP x˙ (this introduces the Riemann normal coordinates) and re-arrange the equation into the form ∞ a a 1 a i1 i2 i3 in y = ∆x + Γ ··· n y y y ··· y (3.4) n! i1i2i3 i n=2 X In a small variation to the plan given above, the plan will be modified slightly to solve this a a a a a equation for y (rather thanx ˙ ) by constructing a sequence of approximations ym to y . The y will, through the generalised connections, depend on the Riemann curvature and its derivatives (at O). So in principle the ya could be expanded as power series in ǫ (i.e., as a power series in a a m the curvatures). The ym will be chosen to be the Taylor polynomial of y to order ǫ . That is, a ym is a polynomial in the curvatures (and its derivatives) up to and including terms of order m a m O (ǫ ). The ym can computed by truncating both sides of (3.4) to terms no higher than O (ǫ ). a n−1 But note that the Γ i1i2i3···in are of order O (ǫ ). The upshot is that the infinite series may be truncated at n = m while still retaining all terms up to and including ǫm. This leads to

n=m a a m 1 a i1 i2 i3 in y = ∆x + T Γ ··· n y y y ··· y m ǫ n! i1i2i3 i m m m m n=2 ! X m m+1 where Tǫ is a simple truncation operator (it deletes all terms of order O (ǫ ) or higher). This is a marginal improvement on (3.4) (at least it is a finite series) but it is still a non-linear a equation for ym. But fortunately improvements are readily made. Notice, once again, that a n−1 a Γ i1i2i3···in = O (ǫ ) and this allows the use of lower order estimates for y in the product terms on the right hand side. This leads to

n=m a a m 1 a i1 i2 i3 in y = ∆x + T Γ 1 2 3··· n y − y − y − ··· y − (3.5) m ǫ n! i i i i m n+1 m n+1 m n+1 m n+1 n=2 ! X a This shows that ym appears only on the left hand side and thus this equation can be used to a a recursively compute yp for p = 2, 3, 4, ···. Here are the first few ym. Starting with the lowest order approximation, a a y0 = ∆x and as there are no ǫ1 terms in (3.4) this can also be written as

a a a y1 = y0 = ∆x

Now set m = 2 in equation (3.5) to obtain

1 ya = ∆xa + T 2 Γa yi1 yi2 2 ǫ 2! i1i2 1 1   1 = ∆xa + Γa ∆xi1 ∆xi2 2 i1i2 1 1

5 and once more, with m = 3, with the result 1 1 ya = ∆xa + T 3 Γa yi1 yi2 + Γa yi1 yi2 yi3 3 ǫ 2! i1i2 2 2 3! i1i2i3 1 1 1   1 1 = ∆xa + Γa ∆xi1 ∆xi2 + Γa Γb +Γa ∆xi1 ∆xi2 ∆xi3 2 i1i2 6 bi1 i2i3 i1i2,i3  a This process may seem simple but looks can be deceiving – the higher order ym contain a profusion of terms that, when computed by hand, are largely unmanageable beyond m ≈ 7. At this point there is little option but, if higher order terms are needed, to defer the computations to a suitable computer algebra package. This point will be discussed in more detail in section (10). This completes the first objective – to find a way to transform from any non-singular set of coordinates to a local set of Riemann normal coordinates. The question to ask now is – What form does the metric (and other objects) take in these coordinates? This is the subject of the second next section. But before doing so, here is a short digression to introduce some new notation.

4 Notation

It has already been noted that the recursive nature of equations like (3.2) imposes a significant computational cost with each iteration. A less obvious side effect is that number of tensor indices on each term will also increase with each iteration. The equation for the generalised connections, (3.2), is a case in point. This contains an index list of the form i1i2i3 ··· in. Lists such as these are tedious to write and are prone to transcription error (when in the hands of humans). It thus makes sense to use a notation that is easy to read and write while also not detracting from the meaning in the expression. The proposal is that a sequence of indices such as i1i2i3 ··· in be replaced with a single index of the form i. In this notation the equation for the generalised connections (3.2) would be written as

a a a p Γ bcd =Γ (bc,d) − (n + 1)Γ p(cΓ bd) where c contains n> 0 indices. There will be cases where the number of hidden indices needs to be made clear. In such cases one of two options can be taken – either state explicitly the number of hidden indices in words (as in the above example) or by including the number as a subscript as in this example

a a a p Γ bcnd =Γ (bcn,d) − (n + 1)Γ p(cn Γ bd) This notation can be extended to handle expressions such as

a i1 i2 i3 in Γ bc,i1i2i3···in A A A ··· A which would be written in condensed form as

a .d Γ bc,dA

Note carefully the dot to the left of the d superscript. Its purpose is to avoid an ambiguity that would arise in using the condensed notation for an expression such as

a i1i2i3···in Γ bc,i1i2i3···in A

6 which, following the earlier discussion, would be written as

a d Γ bc,dA

These simple changes bring some degree of normalcy to the printed form but those gains rapidly pale into insignificance when displaying the fifth order expansions generated by Cadabra (in section (11)). Cadabra’s output does not employ the familiar use of brackets to denote symmetrisation over an index list. Instead, it uses the fully expanded form which, on paper, can lead to dramatic explosion in otherwise similar looking terms. There seems little point in printing terms that differ only by swapping pairs of indices. Thus the convention used here will be that symmetrisation over an index list on the right hand side of an equation will be inferred from any explicit use of brackets for symmetrisation written on the left hand side. Thus an equation like A(ab) = BaCb will be taken to mean 1 A = (B C + B C ) (ab) 2! a b b a This convention will only be applied to results generated by Cadabra. The left hand side will only contain a single term with just one pair of brackets. The final notational device concerns cases where an index needs to be excluded from symmetri- sation. The normal practise is to enclose the index in a pair of vertical lines. This involves two characters whereas a single dot over the chosen index can serve the same purpose. Thus (abcd˙ efg˙ ) will denote symmetrisation over only a, b, d, f and g. In the standard notation this would have been written as (ab|c|d|e|fg).

5 The metric in Riemann normal form

In the preceding section the generic and Riemann normal coordinates distinguished by using the symbols xa and ya respectively. Now, for notational convenience and to accord with convention, the Riemann normal coordinates will be denoted xa while ya will be stripped of any special meaning. The aim of this section is to express the metric in Riemann normal form. This will take the form of an infinite series in powers of the curvature and its derivatives. Start by writing out the Taylor series for the metric around xa =0

∞ 1 g (x)= g + g x.c ab ab n! ab,c n=1 X where c contains n indices and gab are constants (e.g. gab = diag(1, 1, 1, ···)). The present task is to express the partial derivatives of the metric in terms of the Riemann tensor. From the standard definition of a metric compatible connection, a series of partial derivatives leads to e e gab,cd =(gaeΓ bc + gebΓ ac),d and since gab,cd is totally symmetric in cd it is easy to see that

e e gab,cd = gaeΓ b(c ,d) + gebΓ a(c ,d)   7 a Two points should be noted, first, the connection appears only in the form Γ b(c,d), second, the left hand side contains derivatives one order higher than in the corresponding terms on the right hand side. The upshot is that this equation can be used to recursively compute all a of the metric derivatives solely in terms of the Γ b(c,d) and the constants gab. In this way the above Taylor series for the metric can be expressed solely in terms of the connection and its derivatives. But more can be done – the derivatives of the connection must surely tie in with the curvatures. Thus attention turns to the standard definition for the curvature, which after a series of derivatives, can be written in the form

a a a a i a i R (bcd,e˙ ) =Γ d(bc,e) − Γ (bc,e)d + Γ i(cΓ bd˙ ,e) − Γ idΓ (bc ,e) (5.1)

a a   (Note that the Γ dbc in Γ d(bc,e) is the first of the generalised connections discussed earlier in section (3.1)). Can this result be used to eliminate the connection and its derivatives from the metric? Yes, but only after specialising to the Riemann normal coordinates. Recall that, in Riemann normal coordinates, all geodesics through O are of the form

xa(s)= sva which upon substitution into the geodesic equations leads to

a 0=Γ (bc) at O

It follows, by recursion on equation (3.3), that

a 0=Γ (bc,d) at O (5.2)

a Recall that Γ bc,ed is separately symmetric in its first pair of indices and in the remaining (n+1) lower indices (assuming e contains n indices). Thus using equation (A.1) it follows that

a a a 0=(n + 3)Γ (bc,ed) = 2Γ d(b,ce) +(n + 1)Γ (bc,e)d

a This result can be used to eliminate the Γ (bc,e)d term in equation (5.1) for the derivatives of the curvature. The result, after a minor shuffling of terms is

a a a i a i (n + 3)Γ d(b,ce) =(n + 1) R (bcd,e˙ ) − Γ i(cΓ bd˙ ,e) + Γ idΓ (bc ,e)     (the reason for rearranging the terms will become clear in a moment). Note also that the last term in the previous equation can be eliminated by equation (5.2) and the product rule. In summary, the equations of interest are

∞ 1 g (x)= g + g x.c (5.3) ab ab n! ab,c n=1 X e e gab,cd = gaeΓ b(c ,d) + gebΓ a(c ,d) (5.4)

a  a a i (n + 3)Γ d(b,ce) =(n + 1) R (bcd,e˙ ) − Γ i(cΓ bd˙ ,e) (5.5)    These equations could be used as follows. First, equation (5.5) is used to recursively compute a the Γ b(c,ed) in terms of the Riemann tensor and its partial derivatives (this was the reason behind the shuffling of terms noted above). Note that e in equation (5.5) contains n hidden a indices. The Γ b(c,d) are then substituted into (5.4) which in turn is used to recursively express all of the gab,c in terms of the Riemann tensor and its partial derivatives. When the dust settles

8 the result is a finite series expansion for the metric in terms of the Riemann tensor and its partial derivatives. The result, to 3rd-order in the curvature, is

1 1 g (x)= g − xcxdR − xcxdxe∂ R + O ǫ4 ab ab 3 acbd 6 c adbe  Though this result meets the stated aim – to express the metric in terms of the curvatures and its derivatives – there is a small problem. The partial derivatives make subsequent raising and lowering of indices very tedious. A far better result would be one that employs covariant derivatives. Fortunately the work required to achieve that is not too onerous. The details are described in the remainder of this section. It is not hard to see that a series of covariant derivatives of the Riemann tensor, would lead to an equation of the form, in any coordinate frame,

a a a R (bcd˙;e) = R (bcd,e˙ ) + Q (bcde˙ ) a a a where Q (bcde˙ ) is a function of the Γ bc, the R bcd and their partial derivatives. If this is going to sit nicely with the algorithm given above then it will be necessary to show, in the Riemann p normal frame, that this equation only contains connection terms ofthe form Γ q(r,s). Fortunately this is rather easy to do.

p Each term of the form Γ qr,s in Q arose during one round of covariant differentiation. Thus at least one of the indices q,r and all of the indices in s must be drawn from the index list e. If p both q and r are contained in e then the term is of the form Γ (qr,s) and thus will vanish when specialised to the Riemann normal frame. This completes the proof. By re-arranging the above equation into the following form

a a a R (bcd,e˙ ) = R (bcd˙;e) − Q (bcde˙ ) (5.6) it can be used to recursively compute all of the partial derivatives of the curvatures in terms of a their covariant derivatives. The Q (bcde˙ ) will contain lower order derivatives of the curvatures and partial derivatives of the connection all of which can be eliminated (in favour of covariant derivatives) using previously computed results. For the first two derivatives it turns out that the partial and covariant derivatives are equal (as expected) but differences do appear in higher order derivatives. These differences will be apparent when the fifth order results are given later in section (11).

6 The inverse metric in Riemann normal form

Most of the hard work is done and it is now time to develop algorithms for Riemann normal expansions for other interesting quantities, in this instance the inverse metric gab(x). The pre- vious section used 0 = gab;c as a starting point to express the metric in terms of the curvatures. ab On this occasion, for the inverse metric, the starting point will be 0 = g ;c. Then, following a path similar to that used in the previous section, leads to the following equations ∞ 1 gab(x)= gab + gab x.c (6.1) n! ,c n=1 X ab ae b eb a g ,cd = − g Γ e(c ,d) − g Γ e(c ,d) (6.2)

a  a a i (n + 3)Γ d(b,ce) =(n + 1) R (bcd,e˙ ) − Γ i(cΓ bd˙ ,e) (5.5)    9 These equations can be used to construct the series expansion for gab(x), which to 3rd-order is

1 1 gab(x)= gab − xcxdRa b − xcxdxe∂ Ra b + O ǫ4 3 cd 6 c de  7 Generalised connections

a In section (3.1) the generalised connections Γ bcd were shown to arise from successive differen- tiation of the geodesic equation and that they can be computed recursively using

a a a p Γ bcd =Γ (bc,d) − (n + 1)Γ p(cΓ bd) (3.2) where the index list c contains n> 0 indices. Here are the first three generalised connections

2 1 Γa (x)= xdgaeR + xdxe 2gaf ∇ R +4gaf ∇ R + gaf ∇ R + O ǫ4 (bc) 3 bdce 12 b cdef d becf f bdce 1   Γa (x)= xegaf ∇ R + O ǫ4 (bcd) 2 b cedf a 4  Γ(bcde)(x)= O ǫ  8 Geodesics

The discussion so far has been framed mostly around the set of geodesics that pass though the point O. There are of course many geodesics within the patch of O that do not pass through O. The challenge now is to construct any geodesic within the patch of O. The approach followed here will be similar to that taken previously in which solutions of the geodesic initial value problem are used to solve the geodesic boundary value problem.

8.1 Geodesic initial value problem

Consider a point P distinct from O. At P it is reasonable to assume that the generalised connections do not vanish (which is generally true, the exception being flat space). Thus the coordinates xa in the neighbourhood of P do not constitute a Riemann normal frame relative at P . But as P lies in the patch for O it follows (by definition of the patch) that the metric is non-singular at P and thus a new set of Riemann normal coordinates, ya, with P as the origin, can always be constructed. This problem has been discussed once before, in section (3.2). Using equation (3.1) and the generalised connections from section (7) leads to

1 xa(s)= xa + sx˙ a + s2x˙ bx˙ c 8xdgaeR + xdxe 2gaf ∇ R +4gaf ∇ R + gaf ∇ R 24 bdce b cdef d becf f bdce 1   + s3x˙ bx˙ cx˙ dxegaf ∇ R + O s4, ǫ4  12 b cedf  10 8.2 Geodesic boundary value problem

Consider now the case of three distinct points O, P and Q. The goal in this section is to compute the geodesic that passes through P and Q. Start by using equation (3.5) for the generalised connections from section (7) to obtain xa(λ)= xa + λDxa 1 − λ − λ2 DxbDxc 8xdgaeR + xdxe 2gaf ∇ R +4gaf ∇ R − gaf ∇ R 24 dbce b dcef d ebcf f dbec 1   − λ − λ3 xbDxcDxdDxegaf ∇ R + O ǫ4 12 c bdef   where λ = s/LPQ is the scaled geodesic distance from P (λ = 0) to Q(λ = 1).

9 Geodesic arc-length

Given the explicit expressions for the metric and the geodesic that joins the points P and Q, the length of that geodesic can be computed by way of the integral

Q dxa dxb 1/2 L = g (x) ds PQ ab ds ds ZP   Up to this point the parameter s has been taken to be the proper distance along the geodesic. However, after careful inspection of the geodesic path (3.1) it is clear that any uniform scaling of s is allowed. Thus it is possible to re-scale s so that s =0at P and s =1at Q (of course, the parameter s no longer measures proper distance so it may be better to use a different symbol, say λ). Furthermore, a standard result states that the integrand is constant along the geodesic and can thus be evaluated at any point such as P . The integral is now trivial to evaluate with the result dxa dxb L2 = g (x) PQ ab ds ds P which, using previous results, leads to

1 1 L2 = g DxaDxb − xaxbDxcDxdR − xaxbDxcDxdDxe∇ R PQ ab 3 acbd 12 c adbe 1 − xaxbxcDxdDxe∇ R + O ǫ4 6 a bdce  A simple calculation shows that this result can also be written in the slightly more suggestive form 2 a b 4 LPQ = gab(¯x)Dx Dx + O ǫ a a a wherex ¯ =(xP +xQ)/2 is the coordinate mid-point of the geodesic.  This does raise the question – Can higher order estimates for L2 (see equation 11.21) be obtained by sampling the metric at suitablly chosen points on (or near) the geodesic? That question will be left for another occassion.

11 10 Cadabra

Though the above equations seem simple they do impose a significant computational cost – their recursive structure quickly leads to expressions that are too hard to manage (for humans) beyond the first few iterations. The computations are best left to computer programs specif- ically designed for tenor computations. One such program is Cadabra–a C++ program that reads plain text files to perform the various tensor computations. It was initially designed for computations in high energy physics but it also very well suited to tensor computations in general. Cadabra’s syntax is a hybrid of LaTeX to express tensor expressions, Python to coordinate the computations and some unique Cadabra syntax to describe properties of various objects (e.g., index sets, symmetries, commutation rules etc.). A number of simple examples, including a detailed discussion of Cadabra’s syntax with particular emphasis for use in , can be found on the GitHub repository [15]. This includes full Cadabra sources for all the examples and exercises (with solutions) covering elementary topics (e.g., verifying ∇g = 0 for a metric connection) through to more advanced topics (e.g., deriving the BSSN equations from the ADM equations). This material was based on an earlier paper [1] (written for an ealier version of Cadabra). For those readers seeking a flavour of what Cadabra code looks like (before rushing off to learn Cadabra in detail) here are two short examples. The first shows how Cadabra can be used to verify that ∇g = 0 when ∇ is the metric compatible covariant derivative. The second m example shows how the truncation operator Tǫ introduced in section (3.2) can be implemented in Cadabra.

10.1 The metric connection

This simple example (adapted from the earlier paper [1]) verifies that ∇g = 0 when ∇ is the metric compatible covariant derivative.

1 # Define some properties 2 3 {a,b,c,d,e,f,h,i,j,k,l,m,n,o,p,q,r,s,t,u#}::Indices. 4 5 g_{a b}::Metric. 6 g_{a}^{b}::KroneckerDelta. 7 8 \partial_{#}::PartialDerivative. 9 10 # Define a rule for the Christoffel symbol 11 12 Gamma := \Gamma^{a}_{b c} -> (1/2) g^{a d} ( \partial_{b}{g_{d c}} 13 + \partial_{c}{g_{b d}} 14 - \partial_{d}{g_{b c}} ); 15 16 # Define the covariant derivative of the metric 17 18 cderiv := \partial_{c}{g_{a b}} - g_{a d}\Gamma^{d}_{b c} 19 - g_{d b}\Gamma^{d}_{a c}; 20

12 21 # Do the computations 22 23 substitute (cderiv, Gamma); 24 distribute (cderiv); 25 eliminate_metric (cderiv); 26 eliminate_kronecker (cderiv); 27 canonicalise (cderiv);

The code is rather easy to follow. The first few lines defines a set of indices (line 3) and some objects with particular properties (lines 5 to 8). This is followed by two rules for constructing a connection (line 12) and the covariant derivative of gab (line 18). The body of the calculations can be seen in the last few lines (23 to 27) where various operations (known as algorithms in Cadabra’s lexicon) are applied. As expected, the above code returns a value of zero for the object cderiv. A few points are worth noting. Cadabra uses a hybrid syntax of Python and LaTeX. Tensor equations are defined and results are returned using a subset of LaTeX while computations (such as substitutions, simplifications etc.) are expressed using a Python syntax. This use of Python and LaTeX makes for an easy entry into Cadabra programming as most users would already have familiarity with Python and LaTeX. Using LaTeX to define and record tensors means that it is very easy to carry results from one Cadabra notebook to another or even to other LaTeX documents – all of the Cadabra output shown in this paper were imported without change from the Cadabra output generated by other documents.

10.2 Truncation of polynomials

m In section (3.2) a truncation operator Tǫ was introduced. The question here is – How might that operator be implemented in Cadabra? Suppose you are asked to extract the leading terms from an expression such as

a a a b a b c a b c d a b c d e P (x)= c + cb x + cbcx x + cbcdx x x + cbcdex x x x One approach (there are others, e.g., emulating a truncated Taylor series) is to use Cadabra’s ::Weight property and the keep_weight algorithm. The idea is to assign weights to nominated objects (through the ::Weight property) and then extract terms matching a chosen weight (using the keep_weight algorithm). Here is a small piece of Cadabra code that does the job.

1 def truncate (obj,n): 2 3 # define the weight and give it a label 4 x^{a}::Weight(label=\epsilon). 5 6 # start with an empty espression 7 ans = Ex(0) 8 9 # loop over selected terms in the source 10 for i in range (0,n+1): 11 12 foo := @(obj). 13 bah = Ex("\epsilon = " + str(i))

13 14 15 # extract a single term 16 keep_weight (foo, bah) 17 18 # update the running sum 19 ans = ans + foo 20 21 # all done, return final answer 22 return ans 23 24 # the quartic polynomial 25 quarticPoly := c^{a} 26 + c^{a}_{b} x^{b} 27 + c^{a}_{b c} x^{b} x^{c} 28 + c^{a}_{b c d} x^{b} x^{c} x^{d} 29 + c^{a}_{b c d e} x^{b} x^{c} x^{d} x^{e}. 30 31 # truncate to cubic terms 32 cubicPoly = truncate (quarticPoly,3)

The first thing to note is the Python function truncate. This simply does as its name suggests – it truncates an object to a certain order. How does it do the job? The first line to note is line 4. This identifies xa as the target to carry the weights (and is given the label \epsilon to distinguish it from other targets declared by other instances of ::Weight). Cadabra now sees the polynomial P a(x) as if it had been written as

a a a b a b c 2 a b c d 3 a b c d e 4 P (x)= c + cb x ǫ + cbcx x ǫ + cbcdx x x ǫ + cbcdex x x x ǫ

The Python for loop then extracts the requested terms from the source returning the final truncated answer in ans. The final result is exactly as expected – the leading cubic part of the original quartic polynomial. This function and variations on it (e.g., extracting a single term) are used extensively in all of the Cadabra codes used in this paper.

11 Expansions to fifth order

All of the O (ǫ6) Cadabra programs were not overly demanding on computational resources, taking between 0.5 second and 12 minutes to run and requiring between 40 and 360 Mbyte of memory (on a Mac Pro (2013) running macOS 10.14.4). The Cadabra codes and several support scripts are available from the author’s GitHub site https://github.com/leo-brewin/riemann-normal-coords. Some of the following expansions can be compared directly with results obtained by traditional methods. In particular the expansions for the metric and its inverse, equations (11.1) and (11.2) agree exactly with those given in equations (17) and (18) respectively of [6]. Also, equation (11.4) agrees with that given in equation (A12) of [16] (though showing that they are equivalent does require some work using the first and second Bianchi identities). Note that in the following output any symmetrisation of indices on the right hand side should be inferred from the explicit symmetrisation (the round brackets) on the left hand side (as per the discussion in section 4).

14 The metric

1 1 1 g (x)= g − xcxdR − xcxdxe∇ R + xcxdxexf 8gghR R − 9∇ R (ab) ab 3 acbd 6 c adbe 180 acdg befh cd aebf 1  + xcxdxexf xg 2ghiR ∇ R +2ghiR ∇ R −∇ R + O ǫ6 (11.1) 90 acdh e bfgi bcdh e afgi cde afbg   The inverse metric

1 1 g(ab)(x)= gab + xcxdgaegbf R + xcxdxegaf gbg∇ R 3 cedf 6 c dfeg 1 + xcxdxexf 4gaggbhgijR R +3gaggbh∇ R 60 cgdi ehfj cd egfh 1  + xcxdxexf xg 3gahgbigjkR ∇ R +3gahgbigjkR ∇ R + gahgbi∇ R 90 chdj e figk cidj e fhgk cde fhgi + O ǫ6 (11.2)  The metric determinant

1 1 −g(x)=1 − xaxbR − xaxbxc∇ R 3 ab 6 a bc 1 + xaxbxcxd −9∇ R + 10R R − 2gef gghR R 180 ab cd ab cd aebg cfdh 1  + xaxbxcxdxe −∇ R +5R ∇ R − gfgghiR ∇ R 90 abc de ab c de afbh c dgei + O ǫ6  (11.3a) 1  1 −g(x)=1 − xaxbR − xaxbxc∇ R 6 ab 12 a bc p 1 + xaxbxcxd −9∇ R +5R R − 2gef gghR R 360 ab cd ab cd aebg cfdh 1  + xaxbxcxdxe −2∇ R +5R ∇ R − 2gfgghiR ∇ R 360 abc de ab c de afbh c dgei + O ǫ6  (11.3b) 1  1 1 log (−g(x)) = − xaxbR − xaxbxc∇ R + xaxbxcxd −9∇ R − 2gef gghR R 3 ab 6 a bc 180 ab cd aebg cfdh 1  + xaxbxcxdxe −∇ R − gfgghiR ∇ R + O ǫ6 (11.3c) 90 abc de afbh c dgei  

15 Generalised connections The following results were obtained by recursive application of equation (3.2).

2 1 Γa (x)= xdgaeR + xdxe 2gaf ∇ R +4gaf ∇ R + gaf ∇ R (bc) 3 bdce 12 b cdef d becf f bdce 1  + xdxexf 64gagghiR R − 32gagghiR R − 16gagghiR R 360 bdch egfi bdeh cgfi bdeh cifg ag ag ag ag hi + 18 g ∇bdRcefg + 18g ∇dbRcefg + 36g ∇deRbfcg − 16g g RbdehRcfgi 1 +9gag∇ R +9gag∇ R + xdxexf xg 16gahgijR ∇ R gd becf dg becf 180 bdci e fhgj ah ij ah ij ah ij +6g g Rdhei∇bRcfgj + 16g g Rdhei∇f Rbgcj +5 g g Rdhei∇jRbfcg ah ij ah ij ah ij − 8g g Rbhdi∇eRcfgj − 4g g Rbidh∇eRcfgj − 4g g Rbdei∇cRfhgj ah ij ah ij ah ah − 8g g Rbdei∇f Rchgj − 4g g Rbdei∇f Rcjgh +2g ∇bdeRcfgh +2g ∇dbeRcfgh ah ah ah ij ah ij +2g ∇debRcfgh +4g ∇def Rbgch − 4g g Rbdhi∇eRcfgj − 4g g Rbdei∇hRcfgj ah ij ah ah ah − 4g g Rbdei∇f Rcghj + g ∇hdeRbfcg + g ∇dheRbfcg + g ∇dehRbfcg 6 + O ǫ (11.4) 1  1 Γa (x)= xegaf ∇ R + xexf 64gagghiR R + 16gagghiR R (bcd) 2 b cedf 120 bech dgfi bech difg ag hi ag ag ag − 16g g RbefhR cgdi + 12g ∇bcRdefg + 18g ∇beRcfdg + 18g ∇ebRcfdg ag hi ag ag + 48g g RbechRdfgi +3g ∇gbRcedf +3g ∇bgRcedf 1 + xexf xg 32gahgijR ∇ R +48gahgijR ∇ R +12gahgijR ∇ R  180 beci d fhgj beci f dhgj beci f djgh ah ij ah ij ah ij + 18g g Rbhei∇cRdfgj +2g g Rbieh∇cRdfgj + 22g g Rehfi∇bRcgdj ah ij ah ij ah ij + 48g g Rbhei∇f Rcgdj + 12g g Rbieh∇f Rcgdj + 15g g Rbhei∇jRcfdg ah ij ah ij ah ij +5g g Rbieh∇jRcfdg − 12g g Rbhci∇eRdfgj − 12g g Rbefi∇cRdhgj ah ij ah ij ah ah − 8g g Rbefi∇cRdjgh − 12g g Rbefi∇gRchdj +4g ∇bceRdfgh +4g ∇becRdfgh ah ah ah ah +6g ∇bef Rcgdh +4g ∇ebcRdfgh +6g ∇ebf Rcgdh +6g ∇efbRcgdh ah ij ah ij ah ij + 16g g Rbehi∇cRdfgj + 36g g Rbehi∇f Rcgdj + 16g g Rbeci∇hRdfgj ah ij ah ij ah ij − 4g g Rbefi∇hRcgdj + 36g g Rbeci∇f Rdghj − 4g g Rbefi∇cRdghj ah ah ah ah ah + g ∇hbeRcfdg + g ∇hebRcfdg + g ∇bheRcfdg + g ∇ehbRcfdg + g ∇behRcfdg ah ah ij ah ij 6 + g ∇ebhRcfdg − 20g g Rbeci∇jRdfgh + 10g g Rbehi∇jRcfdg + O ǫ (11.5)  

16 1 Γa (x)= xf 8gagghiR R +6gag∇ R (bcde) 15 bfch dgei bc dfeg 1  + xf xg 64gahgijR ∇ R + 18gahgijR ∇ R + 24gahgijR ∇ R 90 bfci d ehgj bfci d ejgh bfci g dhej ah ij ah ij ah ij +4g g Rbhci∇dRefgj + 44g g Rbhfi∇cRdgej + 18g g Rbifh∇cRdgej ah ij ah ij ah ij + 24g g Rbhci∇f Rdgej + 10g g Rbhci∇jRdfeg − 16g g Rbfgi∇cRdhej ah ah ah ah +6g ∇bcdRefgh +8g ∇bcf Rdgeh +8g ∇bfcRdgeh +8g ∇fbcRdgeh ah ij ah ij ah ij + 26g g Rbfhi∇cRdgej +6g g Rbfci∇hRdgej + 46g g Rbfci∇dReghj ah ah ah ah ij + g ∇hbcRdfeg + g ∇bhcRdfeg + g ∇bchRdfeg − 40g g Rbfci∇jRdgeh 6 + O ǫ (11.6) 1  Γa (x)= xg 3gahgijR ∇ R +3gahgijR ∇ R + gah∇ R + O ǫ6 (11.7) (bcdef) 3 bgci d ehfj bhci d egfj bcd egfh   Symmetrised partial derivatives of the connection. The following results were obtained from equation (5.5)

a a 3Γ d(b,c) = R bcd (11.8)

a a 6Γ d(b,ce) =3∂eR bcd (11.9)

a a a g a g 15Γ d(b,cef) =9∂feR bcd − R cegR bfd − R cfgR bed (11.10)

a a h a h a a h h a 9Γ d(b,cefg) =6∂gfeR bcd − R bgd∂eR cfh − R bfd∂eR cgh − R ceh∂f R bgd − R bed∂f R cgh a h a h − R cfh∂eR bgd − R cgh∂eR bfd (11.11)

a a i a a i j a i j 252Γ d(b,cefgh) = 180∂hgfeR bcd − 36R bgd∂heR cfi +4R feiR chjR bgd +4R fhiR cejR bgd i a a i j a i j a i − 72R bfd∂heR cgi +8R geiR chjR bfd +8R ghiR cejR bfd − 45∂eR cfi∂gR bhd a i a i a i a i j − 45∂eR cgi∂f R bhd − 45∂eR chi∂f R bgd − 36R cei∂hf R bgd +4R ceiR gfjR bhd a i j i a a i j a i j +4R ceiR ghjR bfd − 36R bed∂hf R cgi +4R gfiR chjR bed +4R ghiR cfjR bed a i a i a i a i j − 45∂f R cgi∂eR bhd − 45∂f R chi∂eR bgd − 72R cfi∂heR bgd +8R cfiR gejR bhd a i j a i a i a i j +8R cfiR ghjR bed − 45∂gR chi∂eR bfd − 36R cgi∂heR bfd +4R cgiR fejR bhd a i j +4R cgiR fhjR bed (11.12)

Symmetrised partial derivatives of theRiemann curvature tensor.

The following results were obtained from equation (5.6). Note that by inspection of these results and those above it is easy to verify the claim made in section (5) that the connection

17 a p terms that arise in R (bcd˙;e) are always of the form Γ q(r,s).

a af R (cdb,e˙ ) = g ∇cRbdef (11.13)

a ag R (cdb,ef˙ ) = g ∇cdRbefg (11.14)

a ah ij ah ij ah −2R (cdb,efg˙ ) = g g Rbcdi∇eRfhgj − g g Rchdi∇eRbfgj − 2g ∇cdeRbfgh (11.15)

a ai jk ai jk ai −5R (cdb,efgh˙ ) =7g g Rbcdj∇ef Rgihk − 7g g Rcidj∇ef Rbghk − 5g ∇cdef Rbghi (11.16)

a aj kl aj kl aj kl −3R (cdb,efghi˙ ) =6g g ∇cRbdek∇fgRhjil − 6g g ∇cRdjek∇fgRbhil +8g g Rbcdk∇efgRhjil aj kl aj kl mn − 8g g Rcjdk∇efgRbhil − g g g RbcdkRelfm∇gRhjin aj kl mn aj kl mn − 3g g g RcjdkRelfm∇gRbhin +4g g g RbcdkRejfm∇gRhlin aj − 3g ∇cdefgRbhij (11.17)

Riemann normal coordinates

0 1 2 3 4 ya = ya + ya + ya + ya + ya (11.18)

0 ya = xa (11.18a)

1 a b c a 2y = x x Γ bc (11.18b)

2 a b c d a e a 6y = x x x (Γ beΓ cd + ∂bΓ cd) (11.18c)

3 a b c d e a f a f g f a a 24y = x x x x 2Γ bf ∂cΓ de +Γ fgΓ bcΓ de +Γ bc∂f Γ de + ∂bcΓ de (11.18d)

4 a b c d e f a g h i a g h a g h i 360y = x x x x x −4Γ bgΓ chΓ diΓ ef + 2Γ bgΓ ch∂dΓ ef + 3Γ bgΓ hiΓ cdΓ ef a h g a h g a g a g h i − 6Γ bgΓ cd∂eΓ fh + 6Γ bgΓ cd∂hΓ ef + 9Γ bg∂cdΓ ef + 4Γ ghΓ bcΓ diΓ ef a g h g h a g h a a g + 13Γ ghΓ bc∂dΓ ef − 4Γ bcΓ dg∂eΓ fh +Γ bcΓ dg∂hΓ ef +2∂bΓ cg∂dΓ ef a g g h a g h a g a g a +7∂gΓ bc∂dΓ ef + 3Γ bcΓ de∂f Γ gh + 3Γ bcΓ de∂gΓ fh − 3Γ bc∂deΓ fg + 6Γ bc∂dgΓ ef a +3∂bcdΓ ef (11.18e)  Geodesic IVP

s2 s3 s4 xd(s)= xd + sx˙ d + x˙ ax˙ bAd + x˙ ax˙ bx˙ cAd + x˙ ax˙ bx˙ cx˙ dAd 2! ab 3! abc 4! abce s5 + x˙ ax˙ bx˙ cx˙ dx˙ eAd + O s6, ǫ6 (11.19) 5! abcef 

18 d d ae d e af af af 360Aab = 240x g Rbdce + 30x x 2g ∇bRcdef +4g ∇dRbecf + g ∇f Rbdce d e f ag hi ag hi ag hi + x x x 64g g RbdchRegfi − 32g g RbdehRcgfi − 16g g RbdehRcifg ag ag ag ag hi + 18g ∇bdRcefg + 18g ∇dbRcefg + 36g ∇deRbfcg − 16g g RbdehRcfgi ag ag d e f g ah ij +9g ∇gdRbecf +9g ∇dgRbecf +2x x x x 16g g Rbdci∇eRfhgj ah ij ah ij ah ij +6g g Rdhei∇bRcfgj + 16g g Rdhei∇f Rbgcj +5 g g Rdhei∇jRbfcg ah ij ah ij ah ij − 8g g Rbhdi∇eRcfgj − 4g g Rbidh∇eRcfgj − 4g g Rbdei∇cRfhgj ah ij ah ij ah ah − 8g g Rbdei∇f Rchgj − 4g g Rbdei∇f Rcjgh +2g ∇bdeRcfgh +2g ∇dbeRcfgh ah ah ah ij ah ij +2g ∇debRcfgh +4g ∇def Rbgch − 4g g Rbdhi∇eRcfgj − 4g g Rbdei∇hRcfgj ah ij ah ah ah − 4g g Rbdei∇f Rcghj + g ∇hdeRbfcg + g ∇dheRbfcg + g ∇dehRbfcg (11.19a) d e af e f ag hi ag hi ag hi 360Aabc =180x g ∇bRcedf +3x x 64g g RbechRdgfi +16g g RbechRdifg −16g g RbefhRcgdi ag ag ag ag hi ag +12g ∇bcRdefg +18g ∇ beRcfdg +18g ∇ebRcfdg +48g g RbechRdfgi +3g ∇gbRcedf ag e f g ah ij ah ij +3g ∇bgRcedf +2x x x 32g g Rbeci∇dRfhgj + 48g g Rbeci∇f Rdhgj ah ij ah ij ah ij + 12g g Rbeci∇f Rdjgh+ 18g g Rbhei∇cRdfgj +2g g Rbieh∇cRdfgj ah ij ah ij ah ij + 22g g Rehfi∇bRcgdj + 48g g Rbhei∇f Rcgdj + 12g g Rbieh∇f Rcgdj ah ij ah ij ah ij + 15g g Rbhei∇jRcfdg +5g g Rbieh∇jRcfdg − 12g g Rbhci∇eRdfgj ah ij ah ij ah ij ah −12g g Rbefi∇cRdhgj −8g g Rbefi∇cRdjgh −12g g Rbefi∇gRchdj +4g ∇bceRdfgh ah ah ah ah ah +4g ∇becRdfgh +6g ∇bef Rcgdh +4g ∇ebcRdfgh +6g ∇ebf Rcgdh +6g ∇efbRcgdh ah ij ah ij ah ij + 16g g Rbehi∇cRdfgj + 36g g Rbehi∇f Rcgdj + 16g g Rbeci∇hRdfgj ah ij ah ij ah ij ah − 4g g Rbefi∇hRcgdj +36g g Rbeci∇f Rdghj − 4g g Rbefi∇cRdghj + g ∇hbeRcfdg ah ah ah ah ah + g ∇hebRcfdg + g ∇bheRcfdg + g ∇ehbRcfdg + g ∇behRcfdg + g ∇ebhRcfdg ah ij ah ij − 20g g Rbeci∇jRdfgh + 10g g Rbehi∇jRcfdg (11.19b) d f ag hi ag  90Aabce =6x 8g g RbfchRdgei +6g ∇bcRdfeg f g ah ij ah ij ah ij + xx 64g g Rbfci∇dRehgj + 18g g Rbfci∇dRejgh + 24g g Rbfci∇gRdhej ah ij ah ij ah ij +4g g Rbhci∇dRefgj + 44g g Rbhfi∇cRdgej + 18g g Rbifh∇cRdgej ah ij ah ij ah ij + 24g g Rbhci∇f Rdgej + 10g g Rbhci∇jRdfeg − 16g g Rbfgi∇cRdhej ah ah ah ah +6g ∇bcdRefgh +8g ∇bcf Rdgeh +8g ∇bfcRdgeh +8g ∇fbcRdgeh ah ij ah ij ah ij + 26g g Rbfhi∇cRdgej +6g g Rbfci∇hRdgej + 46g g Rbfci∇dReghj ah ah ah ah ij + g ∇hbcRdfeg + g ∇bhcRdfeg + g ∇bchRdfeg − 40g g Rbfci∇jRdgeh (11.19c) d g ah ij ah ij ah  3Aabcef = x 3g g Rbgci∇dRehfj +3g g Rbhci∇dRegfj + g ∇bcdRegfh (11.19d)  Geodesic BVP

a a a 2 a 3 a 4 a 5 a 6 6 x (s)= x + sDx +(s − s )x2 +(s − s )x3 +(s − s )x4 +(s − s )x5 + O s , ǫ (11.20) a 2 a 3 a 4 a 5 a 6 x2 = x2 + x2 + x2 + x2 + O ǫ  (11.20a) a 3 a 4 a 5 a 6 x3 = x3 + x3 + x3 + O ǫ  (11.20b) a 4 a 5 a 6 x4 = x4 + x4 + O ǫ  (11.20c) a 5 a 6 x5 = x5 + O ǫ  (11.20d) 

19 2 a b c d ae −3x2 = x Dx Dx g Rbcde (11.20a.1)

3 a b c d e af af af −24x2 = x x Dx Dx 2g ∇dRbecf +4g ∇bRcdef − g ∇f Rbdce (11.20a.2)

4 a b c d e f ag hi ag hi  −720x2 = x x Dx Dx Dx 80g g RbdehRcfgi − 80g g RbdehRcifg b c d e f ag hi ag hi ag hi + x x x Dx Dx 64g g RbefhRcgdi − 32g g RbechRdifg− 16g g RbechRdgfi ag ag ag ag hi + 18g ∇ebRcfdg + 18g ∇beRcfdg + 36g ∇bcRdefg + 16g g RbechRdfgi ag ag − 9g ∇gbRcedf − 9g ∇bgRcedf (11.20a.3)

5 a b c d e f g ah ij ah ij  −360x2 = x x x Dx Dx Dx 10g g Rbehi∇f Rcgdj + 20g g Rbehi∇cRdfgj ah ij ah ij ah ij − 5g g Rbehi∇jRcfdg − 10g g Rbieh∇f Rcgdj − 20g g Rbieh∇cRdfgj ah ij ah ij ah ij +5g g Rbieh∇jRcfdg − 10g g Rbefi∇gRchdj − 10g g Rbefi∇jRcgdh ah ij ah ij ah ij + 20g g Rbefi∇cRdghj − 20g g Rbefi∇cRdjgh + 10g g Rbefi∇hRcgdj

b c d e f g ah ij ah ij + x x Dx Dx Dx Dx 10g g Rbdhi∇eRcfgj − 10g g Rbidh∇eRcfgj  b c d e f g ah ij ah ij + x x x x Dx Dx 16g g Rbfgi∇cRdhej +6g g Rbhci∇f Rdgej 

ah ij ah ij ah ij + 16g g Rbhci∇dRefgj − 5g g Rbhci∇jRdfeg − 8g g Rbifh∇cRdgej ah ij ah ij ah ij − 4g g Rbhfi∇cRdgej − 4g g Rbfci∇gRdhej − 8g g Rbfci∇dRejgh ah ij ah ah ah − 4g g Rbfci∇dRehgj +2g ∇fbcRdgeh +2g ∇bfcRdgeh +2g ∇bcf Rdgeh ah ah ij ah ij +4g ∇bcdRefgh +4g g Rbfhi∇cRdgej +4g g Rbfci∇hRdgej ah ij ah ah ah +4g g Rbfci∇dReghj − g ∇hbcRdfeg − g ∇bhcRdfeg − g ∇bchRdfeg (11.20a.4)

3 a b c d e af  −12x3 = x Dx Dx Dx g ∇cRbdef (11.20b.1)

4 a b c d e f ag hi ag hi ag hi −720x3 = x x Dx Dx Dx 64g g RbdehRcifg + 16g g RbdehRcgfi − 16g g RbdchRegfi ag ag ag ag hi + 12g ∇deRbfcg + 18g ∇dbRcefg + 18g ∇bdRcefg − 48g g RbdehRcfgi ag ag − 3g ∇gdRbecf − 3g ∇dgRbecf (11.20b.2) 

20 5 a b c d e f g ah ij ah ij −1080x3 = x x Dx Dx Dx Dx 30g g Rbdei∇f Rcghj − 30g g Rbdei∇f Rcjgh ah ij b c d e f g ah ij − 30g g Rbdei∇jRcfgh + x x x Dx Dx Dx 32g g Rbefi∇gRchdj ah ij ah ij ah ij + 48g g Rbefi∇cRdjgh + 12g g Rbefi∇cRdhgj + 18g g Rbieh∇f Rcgdj ah ij ah ij ah ij +2g g Rbhei∇f Rcgdj + 22g g Rbhci∇eRdfgj + 48g g Rbieh∇cRdfgj ah ij ah ij ah ij + 12g g Rbhei∇cRdfgj − 15g g Rbieh∇jRcfdg − 5g g Rbhei∇jRcfdg ah ij ah ij ah ij − 12g g Rehfi∇bRcgdj − 12g g Rbeci∇f Rdjgh − 8g g Rbeci∇f Rdhgj ah ij ah ah ah − 12g g Rbeci∇dRfhgj +4g ∇efbRcgdh +4g ∇ebf Rcgdh +6g ∇ebcRdfgh ah ah ah ah ij +4g ∇bef Rcgdh +6g ∇becRdfgh +6g ∇bceRdfgh − 16g g Rbehi∇f Rcgdj ah ij ah ij ah ij − 36g g Rbehi∇cRdfgj − 16g g Rbefi∇hRcgdj +4g g Rbeci∇hRdfgj ah ij ah ij ah ah − 36g g Rbefi∇cRdghj +4g g Rbeci∇f Rdghj − g ∇hebRcfdg − g ∇hbeRcfdg ah ah ah ah − g ∇ehbRcfdg − g ∇bheRcfdg − g ∇ebhRcfdg − g ∇behRcfdg ah ij ah ij + 20g g Rbefi∇jRcgdh + 10g g Rbehi∇jRcfdg (11.20b.3)

4 a b c d e f ag hi ag  −180x4 = x Dx Dx Dx Dx 4g g RbcdhRegfi +3g ∇cdRbefg (11.20c.1)

5 a b c d e f g ah ij ah ij −2160x4 = x x Dx Dx Dx Dx 64g g Rbdei∇f Rcjgh + 18g g Rbdei∇f Rchgj ah ij ah ij ah ij + 24g g Rbdei∇cRfhgj +4g g Rdhei∇f Rbgcj + 44g g Rbidh∇eRcfgj ah ij ah ij ah ij + 18g g Rbhdi∇eRcfgj + 24g g Rdhei∇bRcfgj − 10g g Rdhei∇jRbfcg ah ij ah ah ah − 16g g Rbdci∇eRfhgj +6g ∇def Rbgch +8g ∇debRcfgh +8g ∇dbeRcfgh ah ah ij ah ij +8g ∇bdeRcfgh − 26g g Rbdhi∇eRcfgj − 6g g Rbdei∇hRcfgj ah ij ah ah ah − 46g g Rbdei∇f Rcghj − g ∇hdeRbfcg − g ∇dheRbfcg − g ∇dehRbfcg ah ij + 40g g Rbdei∇jRcfgh (11.20c.2)

5 a b c d e f g ah ij ah ij  −360x5 = x Dx Dx Dx Dx Dx 3g g Rbcdi∇eRfhgj +3g g Rchdi∇eRbfgj ah + g ∇cdeRbfgh (11.20d.1)  Geodesic arc-length

0 2 3 4 5 (∆s)2 = ∆+ ∆+ ∆+ ∆+ ∆+ O ǫ6 (11.21)  0 a b ∆= gabDx Dx (11.21a)

2 a b c d 3∆= −x x Dx Dx Racbd (11.21b)

3 a b c d e a b c d e 12∆= −x x Dx Dx Dx ∇cRadbe − 2x x x Dx Dx ∇aRbdce (11.21c)

4 a b c d e f gh 360∆= x x Dx Dx Dx Dx −8g RacdgRbefh − 6∇cdRaebf

a b c d e f gh + x x x Dx Dx Dx 16g RadbgRcefh − 9∇daRbecf − 9∇adRbecf a b c d e f gh + x x x x Dx Dx 16 g RaebgRcfdh − 18∇abRcedf  (11.21d)  21 5 a b c d e f g hi hi hi 1080∆= x x x Dx Dx Dx Dx −4g Radeh∇f Rbgci − 24g Radeh∇bRcfgi +10g Radeh∇iRbfcg hi + 16g Radbh∇eRcfgi − 4∇deaRbfcg − 4∇daeRbfcg − 4∇adeRbfcg a b c d e f g hi + x x Dx Dx Dx Dx Dx −18g Racdh∇eRbfgi − 3∇cdeRafbg  a b c d e f g hi hi hi + x x x x Dx Dx Dx 24g Raefh∇bRcgdi +24g Raebh∇f Rcgdi +24g Raebh∇cRdfgi

− 6∇eabRcfdg − 6∇aebRcfdg − 6∇abeRcfdg

a b c d e f g hi + x x x x x Dx Dx 48g Rafbh∇cRdgei − 12∇abcRdfeg (11.21e)  12 Source

All of the Cadabra files used in preparing this paper are available at the GitHub repository https://github.com/leo-brewin/riemann-normal-coords

13 Acknowledgements

I am very grateful to Kasper Peeters for his many helpful suggestions. Any errors, omissions or inaccuracies in regard to Cadabra are entirely my fault.

Appendix A. Symmetrisation of tensors

The totally symmetric part of a tensor Ai1i2i3···in is commonly defined by 1 A ··· n = (A ··· n + A ··· n + A ··· n + ···) (i1i2i3 i ) n! i1i2i3 i i1i2i3 i i1i2i3 i where the sum on the right hand side includes every permutation of the indices of i1i2i3 ··· in.

If the tensor Ai1i2i3···in happens to be symmetric in every pair of indices then

A(i1i2i3···in) = Ai1i2i3···in From the above definition it is very easy to establish the following theorems

A(i1i2i3···(j1j2j3···jm)···in) = A(i1i2i3···j1j2j3···jm···in)

A(i1i2i3···in Bj1j2j3···jm) = A((i1i2i3···in)B(j1j2j3···jm))

nA(i1i2i3i4···in) = Ai1(i2i3i4···in) + Ai2(i1i3i4···in) + Ai3(i1i2i4···in) + ···

+ Ain(i1i2i3···in−1)

nA(i1i2i3i4···in) = A(i2i3i4···in)i1 + A(i1i3i4···in)i2 + A(i1i2i4···in)i3 + ···

+ A(i1i2i3···in−1)in

Suppose now that Ai1i2i3···in = A(i1i2i3···in), that is, Ai1i2i3···in is totally symmetric. Then for any Bj

(n + 1)A(i1i2i3···in Bj) = Aji2i3···in Bi1 + Ai1ji3···in Bi2 + Ai1i2j···in Bi3

+ ··· + Ai1i2i3···in−1jBin

22 and

(n + 1)A(i1i2i3···in,j) = Aji2i3···in,i1 + Ai1ji3···in,i2 + Ai1i2j···in,i3

+ ··· + Ai1i2i3···in−1j,in + Ai1i2i3···in,j

All of the above are very easy to prove but one result which requires just a little more thought is the following.

Suppose Ai1i2j3j4j5···jn is symmetric in the pair i1i2 and symmetric in all the indices j3j4j5 ··· jn. That is, it is symmetric under the interchange of any pair of i’s and any pair of j’s but it is not necessarily symmetric when any i is swapped with any j. What can be said about

A(i1i2j3j4j5···jn)? Here is the result

nA(i1i2i3···in) =2Ain(i1i2i3···in−1) +(n − 2)A(i1i2i3···in−1)in (A.1)

The proof is very easy. Begin by writing out n! A(i1i2i3···in) in full. Then partition the terms into two disjoint sets, one set in which in appears in one of the first two index slots, the other set in which in appears in any of the remaining n − 2 slots. The terms in the first set are exactly those that define Ain(i1i2i3···in−1) while those in the second set define A(i1i2i3···in−1)in . The above equation follows by simply counting the number of terms in each set (2(n − 1)! and

(n − 2)(n − 1)! respectively) and the simple observation that n! A(i1i2i3···in) equals the sum of the terms from both sets.

i1 i2 i3 in Finally note that if Q = Ai1i2i3···in x x x ··· x then

Q,i1i2i3···in = n! A(i1i2i3···in)

i1 i2 i3 in Q = A(i1i2i3···in)x x x ··· x

References

[1] L. Brewin, A brief introduction to Cadabra: a tool for tensor computations in General Relativity, Computer Physics Communications 181 (2010) 489–498, arXiv:0903.2085. http://users.monash.edu.au/~leo/research/papers/files/lcb09-02.html. [2] K. Peeters, Introducing Cadabra: a symbolic computer algebra system for field theory problems, arXiv:hep-th/0701238.

[3] K. Peeters, Cadabra2: computer algebra for field theory revisited., Journal of Open Source Software. 3 (2018) no. 32, 1118.

[4] K. Peeters. The Cadabra v2.x home page. https://cadabra.science/index.html.

[5] K. Peeters. The Cadabra2 GitHub reporistory. https://github.com/kpeeters/cadabra2.

[6] A. Hatzinikitas, A note on Riemann normal coordinates, arXiv:hep-th/0001078v1.

[7] K. Higashijima, E. Itou, and M. Nitta, Normal Coordinates in Kahler Manifolds and the Background Field Method, Prog.Theor.Phys. 108 (2002) 185–202, arXiv:hep-th/0203081v3.

23 [8] Y. Yamashita, Computer calculation of tensors in riemann normal coordinates, General Relativity and Gravitation 16 (1984) no. 2, 99–110.

[9] U. M¨uller, C. Schubert, and A. E. van de Ven, A Closed Formula for the Riemann Normal Coordinate Expansion, Gen.Rel.Grav 31 (1999) 1759–1768, arXiv:gr-qc/9712092v2.

[10] S. Chern, W. Chen, and K. Lam, Lectures on Differential Geometry. World Scientific, Singapore, 2000.

[11] I. Chavel, . A modern introduction, 2nd ed. Cambridge University Press, Cambridge., 2006.

[12] L. P. Eisenhart, Riemannian Geometry. Princeton University Press, Princeton, 1926.

[13] A. Gray, The volume of a small geodesic ball of a , Michigan.Math.J. 20 (1973) 329–344.

[14] T. Willmore, Riemannian Geometry. Oxford University Press, Oxford, 1996.

[15] L. Brewin. A tutorial on Cadabra. https://github.com/leo-brewin/cadabra-tutorial.

[16] E. Calzetta, S. Habib, and B. Hu, Quantum kinetic field theory in curved spacetime: Covariant Wigner function and Liouville-Vlasov equations, Phys. Rev. D 37 (1988) no. 10, 2901–2919.

24