Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Alternating symbols with SageManifolds

I would like to utilize the alternating symbol $\epsilon_{abcd}$ in SageManifolds. I've worked out that you can define the volume form like

epsilon = g.volume_form()
print(epsilon) ; epsilon.display()

4-form eps_g on the 4-dimensional differentiable manifold M
eps_g = r^2*sqrt(-f(t))*abs(a(t))^3*sin(th) dt/\dr/\dth/\dph

And I can turn this into "the alternating 1-form" by dividing by the determinant of the metric. However, if I try to find the totally upper symbol $\epsilon^{abcd}$, which should just have components +1 and -1, I get


Tensor field of type (4,0) on the 4-dimensional differentiable manifold
abs(a(t))^6/a(t)^6 d/dt*d/dr*d/dth*d/dph - abs(a(t))^6/a(t)^6
d/dt*d/dr*d/dph*d/dth - abs(a(t))^6/a(t)^6 d/dt*d/dth*d/dr*d/dph +
abs(a(t))^6/a(t)^6 d/dt*d/dth*d/dph*d/dr + abs(a(t))^6/a(t)^6
d/dt*d/dph*d/dr*d/dth - abs(a(t))^6/a(t)^6 d/dt*d/dph*d/dth*d/dr -
abs(a(t))^6/a(t)^6 d/dr*d/dt*d/dth*d/dph + abs(a(t))^6/a(t)^6
d/dr*d/dt*d/dph*d/dth + abs(a(t))^6/a(t)^6 d/dr*d/dth*d/dt*d/dph -
abs(a(t))^6/a(t)^6 d/dr*d/dth*d/dph*d/dt - abs(a(t))^6/a(t)^6
d/dr*d/dph*d/dt*d/dth + abs(a(t))^6/a(t)^6 d/dr*d/dph*d/dth*d/dt +
abs(a(t))^6/a(t)^6 d/dth*d/dt*d/dr*d/dph - abs(a(t))^6/a(t)^6
d/dth*d/dt*d/dph*d/dr - abs(a(t))^6/a(t)^6 d/dth*d/dr*d/dt*d/dph +
abs(a(t))^6/a(t)^6 d/dth*d/dr*d/dph*d/dt + abs(a(t))^6/a(t)^6
d/dth*d/dph*d/dt*d/dr - abs(a(t))^6/a(t)^6 d/dth*d/dph*d/dr*d/dt -
abs(a(t))^6/a(t)^6 d/dph*d/dt*d/dr*d/dth + abs(a(t))^6/a(t)^6
d/dph*d/dt*d/dth*d/dr + abs(a(t))^6/a(t)^6 d/dph*d/dr*d/dt*d/dth -
abs(a(t))^6/a(t)^6 d/dph*d/dr*d/dth*d/dt - abs(a(t))^6/a(t)^6
d/dph*d/dth*d/dt*d/dr + abs(a(t))^6/a(t)^6 d/dph*d/dth*d/dr*d/dt

Which is just happening because at some point Sage has figured it out needs to keep track of the sign of a. Is there a direct way to define $\epsilon_{abcd}$ without accessing to the volume form at all? Essentially, I want to directly calculate things like the Euler Characteristic (and signature), which look like