The Kaluza-Klein example from section 2.5 of hep-th/0701238
This example shows how to usesplit_index
in a somewhat more complicated setting.
We first declare the indices that we will use.{\mu,\nu,\rho,\sigma,\kappa,\lambda,\eta,\chi#}::Indices(full, position=independent);
{m,n,p,q,r,s,t,u,v,w,x,y,z,m#}::Indices(subspace, position=independent, parent=full);
Attached property Indices(position=independent) to [μ,ν,ρ,σ,κ,λ,η,χ#].
Attached property Indices(position=independent) to [m,n,p,q,r,s,t,u,v,w,x,y,z,m#].
Note the appearance of
parent=full
. This indicates that the indices in the second set
span a subspace of the indices in the first set. Also note that we have declared the indices
as position=independent
, to prevent Cadabra from automatically raising or lowering them
when canonicalising (as this does not really help us here).
The remaining declarations are standard,\partial{#}::PartialDerivative.
g_{\mu\nu}::Metric.
g^{\mu\nu}::InverseMetric.
g_{\mu? \nu?}::Symmetric.
g^{\mu? \nu?}::Symmetric.
h_{m n}::Metric.
h^{m n}::InverseMetric.
\delta^{\mu?}_{\nu?}::KroneckerDelta.
\delta_{\mu?}^{\nu?}::KroneckerDelta.
F_{m n}::AntiSymmetric.
We will want to expand the Riemann tensor in terms of the metric. The following two substitution
rules do the conversion from Riemann tensor to Christoffel symbol and from Christoffel symbol
to metric (a library with common substitution rules like these is in preparation).
RtoG:= R^{\lambda?}_{\mu?\nu?\kappa?} ->
- \partial_{\kappa?}{ \Gamma^{\lambda?}_{\mu?\nu?} }
+ \partial_{\nu?}{ \Gamma^{\lambda?}_{\mu?\kappa?} }
- \Gamma^{\eta}_{\mu?\nu?} \Gamma^{\lambda?}_{\kappa?\eta}
+ \Gamma^{\eta}_{\mu?\kappa?} \Gamma^{\lambda?}_{\nu?\eta};
Gtog:= \Gamma^{\lambda?}_{\mu?\nu?} ->
(1/2) * g^{\lambda?\kappa} (
\partial_{\nu?}{ g_{\kappa\mu?} } + \partial_{\mu?}{ g_{\kappa\nu?} } - \partial_{\kappa}{ g_{\mu?\nu?} } );
Rλ?μ?ν?κ?→−∂κ?Γλ?μ?ν?+∂ν?Γλ?μ?κ?−Γημ?ν?Γλ?κ?η+Γημ?κ?Γλ?ν?η
Γλ?μ?ν?→12gλ?κ(∂ν?gκμ?+∂μ?gκν?−∂κgμ?ν?)
In this example we want to compute the Kaluza-Klein reduction of the Rm4n4 component of the
Riemann tensor. So we enter this component and do the substitution that takes the Riemann tensor
to metrics. After each substitution, we distribute
products over sums. We also apply the product rule to distribute derivatives over factors in a
product.
todo:= g_{m1 m} R^{m1}_{4 n 4} + g_{4 m} R^{4}_{4 n 4};
gm1mRm14n4+g4mR44n4
substitute(_, RtoG)
substitute(_, Gtog)
distribute(_)
product_rule(_)
distribute(_)
sort_product(_);
−12∂ngκ4∂4gm1κgm1m−12∂4ngκ4gm1mgm1κ−12∂4gm1κ∂4gκngm1m−12∂44gκngm1mgm1κ+12∂κg4n∂4gm1κgm1m+12∂4κg4ngm1mgm1κ+∂ngm1κ∂4gκ4gm1m+∂n4gκ4gm1mgm1κ−12∂κg44∂ngm1κgm1m−12∂nκg44gm1mgm1κ−14∂ηgμ4∂ngκ4gm1mgηκgm1μ−14∂ngκ4∂4gμηgm1mgηκgm1μ+14∂μg4η∂ngκ4gm1mgηκgm1μ−14∂ηgμ4∂4gκngm1mgηκgm1μ−14∂4gμη∂4gκngm1mgηκgm1μ+14∂μg4η∂4gκngm1mgηκgm1μ+14∂ηgμ4∂κg4ngm1mgηκgm1μ+14∂κg4n∂4gμηgm1mgηκgm1μ−14∂μg4η∂κg4ngm1mgηκgm1μ+12∂ηgμn∂4gκ4gm1mgηκgm1μ+12∂ngμη∂4gκ4gm1mgηκgm1μ−12∂μgnη∂4gκ4gm1mgηκgm1μ−14∂ηgμn∂κg44gm1mgηκgm1μ−14∂κg44∂ngμηgm1mgηκgm1μ+14∂μgnη∂κg44gm1mgηκgm1μ−12∂ngκ4∂4g4κg4m−12∂4ngκ4g4mg4κ−12∂4g4κ∂4gκng4m−12∂44gκng4mg4κ+12∂κg4n∂4g4κg4m+12∂4κg4ng4mg4κ+∂ng4κ∂4gκ4g4m+∂n4gκ4g4mg4κ−12∂κg44∂ng4κg4m−12∂nκg44g4mg4κ−14∂ηgμ4∂ngκ4g4mgηκg4μ−14∂ngκ4∂4gμηg4mgηκg4μ+14∂μg4η∂ngκ4g4mgηκg4μ−14∂ηgμ4∂4gκng4mgηκg4μ−14∂4gμη∂4gκng4mgηκg4μ+14∂μg4η∂4gκng4mgηκg4μ+14∂ηgμ4∂κg4ng4mgηκg4μ+14∂κg4n∂4gμηg4mgηκg4μ−14∂μg4η∂κg4ng4mgηκg4μ+12∂ηgμn∂4gκ4g4mgηκg4μ+12∂ngμη∂4gκ4g4mgηκg4μ−12∂μgnη∂4gκ4g4mgηκg4μ−14∂ηgμn∂κg44g4mgηκg4μ−14∂κg44∂ngμηg4mgηκg4μ+14∂μgnη∂κg44g4mgηκg4μ
We then split the greek indices into roman indices and the 4-th direction. Notice the use
of
repeat=True
which will keep doing this substitution until all greek indices
have been split. After that we again have to set all derivatives in the 4-th direction to zero.split_index(_, $\mu, m1, 4$, repeat=True)
substitute(_, $\partial_{4}{A??} -> 0$, repeat=True)
substitute(_, $\partial_{4 m?}{A??} -> 0$, repeat=True)
substitute(_, $\partial_{m? 4}{A??} -> 0$, repeat=True)
canonicalise(_);
−12∂m1g44∂ngm1pgmp−12∂nm1g44gmpgm1p−14∂ng4m1∂pg4qgmrgm1pgqr−12∂m1g44∂ng4pgmqgm1pg4q−14∂m1g4p∂ng44gmqg4m1gpq−12∂ng44∂m1g44gmpg4m1g4p+14∂m1g4p∂ng4qgmrgm1rgpq+14∂m1g4p∂ng44gmqg4pgm1q+14∂m1g44∂ng4pgmqg4pgm1q+14∂ng44∂m1g44gmpg44gm1p+14∂m1g4p∂qgn4gmrgm1qgpr+14∂m1g44∂pgn4gmqgm1pg4q−14∂m1gn4∂pg4qgmrgm1qgpr−14∂m1g44∂pgn4gmqg4pgm1q−14∂m1gnp∂qg44gmrgm1qgpr−14∂m1gn4∂pg44gmqgm1pg4q−14∂m1g44∂ngpqgmrgm1pgqr−14∂m1g44∂ng4pgmqg4m1gpq+14∂m1gnp∂qg44gmrgm1rgpq+14∂m1gn4∂pg44gmqg4pgm1q−12∂pg44∂ng4pgm4−12∂npg44gm4g4p−14∂ng4p∂qg4rgm4gpqg4r−12∂pg44∂ng4qgm4gpqg44−14∂pg4q∂ng44gm4g4pg4q−12∂ng44∂pg44gm4g4pg44+14∂pg4q∂ng4rgm4gqrg4p+14∂pg4q∂ng44gm4g4qg4p+14∂ng44∂pg44gm4g44g4p+14∂pg4q∂rgn4gm4gprg4q+14∂pg44∂qgn4gm4gpqg44−14∂pgn4∂qg4rgm4gprg4q−14∂pg44∂qgn4gm4g4pg4q−14∂pgnq∂rg44gm4gprg4q−14∂pgn4∂qg44gm4gpqg44−14∂pg44∂ngqrgm4gpqg4r+14∂pgnq∂rg44gm4gqrg4p+14∂pgn4∂qg44gm4g4pg4q
Now comes the ansatz of the metric in terms of the Kaluza-Klein gauge field Aμ and the scalar ϕ.
We substitute this with the lines below. The output is not particularly enlightening...
substitute(_, $g_{4 4} -> \phi$ )
substitute(_, $g_{m 4} -> \phi A_{m}$ )
substitute(_, $g_{4 m} -> \phi A_{m}$ )
substitute(_, $g_{m n} -> \phi**{-1} h_{m n} + \phi A_{m} A_{n}$ )
substitute(_, $g^{4 4} -> \phi**{-1} + \phi A_{m} h^{m n} A_{n}$ )
substitute(_, $g^{m 4} -> - \phi h^{m n} A_{n}$ )
substitute(_, $g^{4 m} -> - \phi h^{m n} A_{n}$ )
substitute(_, $g^{m n} -> \phi h^{m n}$ );
−12∂m1ϕ∂n(ϕhm1p)(ϕ−1hmp+ϕAmAp)−12∂nm1ϕ(ϕ−1hmp+ϕAmAp)ϕhm1p−14∂n(ϕAm1)∂p(ϕAq)(ϕ−1hmr+ϕAmAr)ϕhm1pϕhqr+12∂m1ϕ∂n(ϕAp)(ϕ−1hmq+ϕAmAq)ϕhm1pϕhqrAr+14∂m1(ϕAp)∂nϕ(ϕ−1hmq+ϕAmAq)ϕhm1rArϕhpq−12∂nϕ∂m1ϕ(ϕ−1hmp+ϕAmAp)ϕhm1qAqϕhprAr+14∂m1(ϕAp)∂n(ϕAq)(ϕ−1hmr+ϕAmAr)ϕhm1rϕhpq−14∂m1(ϕAp)∂nϕ(ϕ−1hmq+ϕAmAq)ϕhprArϕhm1q−14∂m1ϕ∂n(ϕAp)(ϕ−1hmq+ϕAmAq)ϕhprArϕhm1q+14∂nϕ∂m1ϕ(ϕ−1hmp+ϕAmAp)(ϕ−1+ϕAqhqrAr)ϕhm1p+14∂m1(ϕAp)∂q(ϕAn)(ϕ−1hmr+ϕAmAr)ϕhm1qϕhpr−14∂m1ϕ∂p(ϕAn)(ϕ−1hmq+ϕAmAq)ϕhm1pϕhqrAr−14∂m1(ϕAn)∂p(ϕAq)(ϕ−1hmr+ϕAmAr)ϕhm1qϕhpr+14∂m1ϕ∂p(ϕAn)(ϕ−1hmq+ϕAmAq)ϕhprArϕhm1q−14∂m1(ϕ−1hnp+ϕAnAp)∂qϕ(ϕ−1hmr+ϕAmAr)ϕhm1qϕhpr+14∂m1(ϕAn)∂pϕ(ϕ−1hmq+ϕAmAq)ϕhm1pϕhqrAr−14∂m1ϕ∂n(ϕ−1hpq+ϕApAq)(ϕ−1hmr+ϕAmAr)ϕhm1pϕhqr+14∂m1ϕ∂n(ϕAp)(ϕ−1hmq+ϕAmAq)ϕhm1rArϕhpq+14∂m1(ϕ−1hnp+ϕAnAp)∂qϕ(ϕ−1hmr+ϕAmAr)ϕhm1rϕhpq−14∂m1(ϕAn)∂pϕ(ϕ−1hmq+ϕAmAq)ϕhprArϕhm1q+12∂pϕ∂n(ϕhpqAq)ϕAm+12∂npϕϕAmϕhpqAq+14∂n(ϕAp)∂q(ϕAr)ϕAmϕhpqϕhrsAs−12∂pϕ∂n(ϕAq)ϕAmϕhpq(ϕ−1+ϕArhrsAs)−14∂p(ϕAq)∂nϕϕAmϕhprArϕhqsAs+12∂nϕ∂pϕϕAmϕhpsAs(ϕ−1+ϕAqhqrAr)−14∂p(ϕAq)∂n(ϕAr)ϕAmϕhqrϕhpsAs+14∂p(ϕAq)∂nϕϕAmϕhqrArϕhpsAs−14∂nϕ∂pϕϕAm(ϕ−1+ϕAqhqrAr)ϕhpsAs−14∂p(ϕAq)∂r(ϕAn)ϕAmϕhprϕhqsAs+14∂pϕ∂q(ϕAn)ϕAmϕhpq(ϕ−1+ϕArhrsAs)+14∂p(ϕAn)∂q(ϕAr)ϕAmϕhprϕhqsAs−14∂pϕ∂q(ϕAn)ϕAmϕhprArϕhqsAs+14∂p(ϕ−1hnq+ϕAnAq)∂rϕϕAmϕhprϕhqsAs−14∂p(ϕAn)∂qϕϕAmϕhpq(ϕ−1+ϕArhrsAs)+14∂pϕ∂n(ϕ−1hqr+ϕAqAr)ϕAmϕhpqϕhrsAs−14∂p(ϕ−1hnq+ϕAnAq)∂rϕϕAmϕhqrϕhpsAs+14∂p(ϕAn)∂qϕϕAmϕhprArϕhqsAs
We now need to distribute derivatives over sums and use the product rule. This has to be done a few times,
so we wrap this in a
converge
block which applies the operations until the result no longer changes. The output
of those operations is quite large, so we suppress it (by not writing semi-colons after the
function calls or after the converge block).converge(todo):
distribute(_)
product_rule(_)
canonicalise(_)
We then convert derivatives of the inverse metric to derivatives of the metric, and cleanup contractions
which lead to Kronecker deltas.
substitute(_, $\partial_{p}{h^{n m}} h_{q m} -> - \partial_{p}{h_{q m}} h^{n m}$ )
collect_factors(_)
sort_product(_)
converge(todo):
substitute(_, $h_{m1 m2} h^{m3 m2} -> \delta_{m1}^{m3}$, repeat=True )
eliminate_kronecker(_)
canonicalise(_)
;
−14∂mϕ∂nϕϕ−1+14∂m1ϕ∂nhmphm1p−34AmAm1∂nϕ∂pϕϕhm1p−12AmAm1∂pϕ∂nhm1pϕ2−12∂mnϕ−12AmAm1∂npϕϕ2hm1p−14Am1∂pAm∂nϕϕ2hm1p−12Am∂nAm1∂pϕϕ2hm1p−14∂nAm1∂pAmϕ3hm1p−14AmAm1∂nAp∂qArϕ5hm1rhpq+34AmAm1∂nϕ∂qϕϕhm1q+12Am∂nAp∂qϕϕ2hpq+14Am1∂rAm∂nϕϕ2hm1r+14Am1Aq∂mϕ∂nϕϕhm1q+14Ap∂nAq∂mϕϕ2hpq+14Ap∂mAq∂nϕϕ2hpq+14∂mAm1∂nAqϕ3hm1q+14AmAm1∂nAp∂qArϕ5hm1qhpr−14Am1Ar∂mϕ∂nϕϕhm1r−14Ap∂mAr∂nϕϕ2hpr−14ApAr∂mϕ∂nϕϕhpr−14Ap∂nAr∂mϕϕ2hpr+14AqAr∂mϕ∂nϕϕhqr+14AmAn∂m1ϕ∂pϕϕhm1p+14∂m1Am∂pAnϕ3hm1p+14AmAm1∂pAn∂qArϕ5hm1rhpq−14AnAm1∂mϕ∂qϕϕhm1q−14An∂mAm1∂qϕϕ2hm1q−14Am1∂qAn∂mϕϕ2hm1q−14∂mAm1∂qAnϕ3hm1q−14AmAm1∂pAn∂qArϕ5hm1qhpr+14Ap∂rAn∂mϕϕ2hpr+14∂m1ϕ∂qϕϕ−1hmnhm1q−14∂m1ϕ∂qhmnhm1q+14AmAn∂pϕ∂qϕϕhpq−14AmAm1∂pϕ∂qhnrϕ2hm1rhpq−14AmAn∂m1ϕ∂qϕϕhm1q−14AmAm1∂pϕ∂nhqrϕ2hm1qhpr−14Am1∂nAm∂pϕϕ2hm1p+14Am1∂nAm∂rϕϕ2hm1r+14∂pϕ∂mhnqhpq−14AmAq∂nϕ∂rϕϕhqr+14AmAm1∂pϕ∂qhnrϕ2hm1qhpr+14AnAm1∂mϕ∂pϕϕhm1p+14Ap∂mAn∂qϕϕ2hpq+14An∂mAp∂qϕϕ2hpq−14Ap∂mAn∂rϕϕ2hpr+12AmAp∂qϕ∂nhpqϕ2+12AmAp∂nqϕϕ2hpq+14AmAp∂nAq∂rAsϕ5hpshqr+14AmAp∂nϕ∂sϕϕhps−14AmAp∂nAq∂rAsϕ5hprhqs−14AmAp∂qAn∂rAsϕ5hpshqr+14AmAp∂qAn∂rAsϕ5hprhqs−14AmAn∂qϕ∂rϕϕhqr+14AmAp∂qϕ∂rhnsϕ2hpshqr−14AmAp∂nϕ∂rϕϕhpr+14AmAp∂qϕ∂nhrsϕ2hprhqs+14AmAr∂nϕ∂sϕϕhrs−14AmAp∂qϕ∂rhnsϕ2hprhqs
This is almost the finaly result, but one would normally write it in terms of the field strength,
not the gauge potential. This can be done with one further substitution and some simplification, to
get the result
substitute(_, $\partial_{n}{A_{m}} -> 1/2*\partial_{n}{A_{m}} + 1/2*F_{n m} + 1/2*\partial_{m}{A_{n}}$ )
distribute(_)
sort_product(_)
canonicalise(_)
rename_dummies(_);
−14∂mϕ∂nϕϕ−1+14∂pϕ∂nhmqhpq−12∂mnϕ+14FmpFnqϕ3hpq+14∂pϕ∂qϕϕ−1hmnhpq−14∂pϕ∂qhmnhpq+14∂pϕ∂mhnqhpq