Loading [MathJax]/jax/output/HTML-CSS/jax.js
Ask Your Question
1

abstract index notation and differential geometry

asked 4 years ago

cduston gravatar image

I am wondering if there are ways to use abstract index notation in sage. For example, could I define the tensor:

Ccab=12gcd(~agbd+~bgad~dgab)

this particular object describes the difference between two connections, a and ˜b. Can we define objects like this an manipulate them in Sage? My confusion comes from the common definition of the connection, a la

nabla = g.connection()

Which is not directly a 1-tensor. Specifically, I would like to define a metric, gab, and a conformal transformation ~gab=Ω2gab, the corresponding connections, and determine the tensor Cabc for this particular case. (and of course, we know the answer because this the standard approach to conformal transformations in GR).

Preview: (hide)

1 Answer

Sort by » oldest newest most voted
2

answered 4 years ago

eric_g gravatar image

updated 4 years ago

Yes there is a partial support of index notation in Sage, see the section "Tensor calculus" of the tutorial. Here is a full example to compute the tensor field Cc  ab that you mention:

sage: M = Manifold(2, 'M')
sage: X.<u,v> = M.chart()
sage: g = M.metric('g')
sage: g[0,1] = -1/2
sage: g.display()
g = -1/2 du*dv - 1/2 dv*du
sage: Omega = M.scalar_field(2/(sqrt(1+u^2)*sqrt(1+v^2)))
sage: tg = M.metric('tg', latex_name=r'\tilde{g}')
sage: tg.set(Omega^2*g)
sage: tg.display()
tg = -2/((u^2 + 1)*v^2 + u^2 + 1) du*dv - 2/((u^2 + 1)*v^2 + u^2 + 1) dv*du
sage: tnabla = tg.connection()
sage: ig = g.inverse()
sage: tng = tnabla(g)
sage: C = 1/2*ig['^{cd}']*(tng['_{bda}'] + tng['_{adb}'] - tng['_{abd}']) 
sage: C
Tensor field of type (1,2) on the 2-dimensional differentiable manifold M
sage: C.display()
u/(u^2 + 1) d/du*du*du + v/(v^2 + 1) d/du*du*dv + u/(u^2 + 1) d/dv*dv*du + v/(v^2 + 1) d/dv*dv*dv
sage: C[:]
[[[u/(u^2 + 1), v/(v^2 + 1)], [0, 0]], [[0, 0], [u/(u^2 + 1), v/(v^2 + 1)]]]
sage: C[0,0,0]
u/(u^2 + 1)

EDIT (31 May 2020): the above code requires the latest version of SageMath, i.e. 9.1. Indeed, the syntax

C = 1/2*ig['^{cd}']*(tng['_{bda}'] + tng['_{adb}'] - tng['_{abd}'])

which involves a sum of tensors in index notation, is not understood in older versions of SageMath. See the 9.1 release notes.

Preview: (hide)
link

Comments

Hi Eric: Where can I download 9.1 for windows?. It does not seems to be in the mirrors!

Daniel Volinski

danielvolinski gravatar imagedanielvolinski ( 4 years ago )

Thanks: I will have to work out getting the latest version on my system before testing/marking correct, but it does seem that you've got a solution here.

cduston gravatar imagecduston ( 4 years ago )

Ok that does seem to be a partial solution, but it doesn't allow the metric to be represented with abstract indices. For example, the answer to this problem is generically Ccab=2δc(ab)lnΩgabgcddlnΩ.

cduston gravatar imagecduston ( 4 years ago )

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 4 years ago

Seen: 531 times

Last updated: May 31 '20