Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am using the Package RGTC to do some calculations in Supergravity. It allows to define differential forms after specifying a co-frame. I am working in with the 10d coordinates $\{t,x,y,z,r,\phi_1,\ldots,\phi_5\}$ and the coframe $\{dt,dx,dy,dz,d\phi_1,\ldots,d\phi_5\}$ and have the 5-form $F_5=-\frac{4L^2}{(1+\frac{L^4}{r^4})^2 r^5}\sqrt{R^4+r_0^4}(1+\star)dt\wedge dx\wedge dy\wedge dz\wedge dr$
where $R$ and $r_0$ are constants. Computing the Hodge dual in the expression is not a problem, since there is a function Hstar[_] in the package that does the job. What I need to compute is $F_{MPQRS}F_N{}^{PQRS}$, i.e. I need to extract the components from the differential form in order to perform the contractions.

The actual code is a bit cryptic, because the space-time I am considering is a bit complicated, but I will include it anyways:

J is the Jacobian for changing from Cartesian to spherical coordinates, xSugra my set of coordinates and g3branes the metric tensor

<< EDCRGTCcode.m
J = D[{Cos[ϕ1], Sin[ϕ1] Cos[ϕ2], 
Sin[ϕ1] Sin[ϕ2] Cos[ϕ3], 
Sin[ϕ1] Sin[ϕ2] Sin[ϕ3] Cos[ϕ4], 
Sin[ϕ1] Sin[ϕ2] Sin[ϕ3] Sin[ϕ4] Cos[ϕ5], 
Sin[ϕ1] Sin[ϕ2] Sin[ϕ3] Sin[ϕ4]\
Sin[ϕ5]}, {{ϕ1, ϕ2, ϕ3, ϕ4, ϕ5}}];
H[r_] := 1 + L^4/r^4;
f[r_] := 1 - r0^4/r^4;
xSugra = {t, x, y, z, r, ϕ1, ϕ2, ϕ3, ϕ4, ϕ5};
coFrame = {d[t], d[x], d[y], d[z], d[r], d[ϕ1], d[ϕ2], d[ϕ3],
d[ϕ4], d[ϕ5]};
d[L] = 0; d[r0] = 0;
g3branes = 
ArrayFlatten[{{H[r]^(-(1/2)) DiagonalMatrix[{-f[r], 1, 1, 1}], 0, 
 0}, {0, H[r]^(1/2)/f[r], 0}, {0, 0, 
 FullSimplify[H[r]^(1/2) r^2 Transpose[J].J]}}];
simpRules = TrigRules;
RGtensors[g3branes, xSugra, coFrame]
F5 = Simplify[-((4 L^2)/(H[r]^2 r^5)) Sqrt[
L^4 + r0^4] (d[t]⋀d[x]⋀d[y]⋀d[z]⋀d[r] +

where I have not included output.

Maybe I am lucky and there is someone who has worked with this package or a similar one before.

Cheers, physicus

share|improve this question

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.