First time here? Check out the FAQ!

Ask Your Question
1

Compute the inverse of a 2-form

asked 5 years ago

MLainz gravatar image

I have a nondegenerate (0,2)-tensor omega on a manifold which is not a metric and I would like to compute its 'inverse', which is a (2,0)-tensor.

I tried omega[:].inverse() but I get the following error 'ChartFunctionRing_with_category' object has no attribute 'fraction_field'. This worked for me in older versions of Sagemath (I think it was 7.4).

Preview: (hide)

1 Answer

Sort by » oldest newest most voted
1

answered 5 years ago

eric_g gravatar image

A workaround is the following, assuming that M is the manifold where omega is defined:

om = matrix([[omega[i, j].expr() for j in M.irange()] for i in M.irange()])
omega_inv = M.multivector_field(2, om.inverse())

Here is a full example:

sage: M = Manifold(2, 'M')
sage: X.<x,y> = M.chart()
sage: omega = M.diff_form(2)
sage: omega[0, 1] = 1 + x^2
sage: omega.display()
(x^2 + 1) dx/\dy
sage: om = matrix([[omega[i, j].expr() for j in M.irange()] for i in M.irange()])
sage: omega_inv = M.multivector_field(2, om.inverse())
sage: omega_inv.display()
-1/(x^2 + 1) d/dx/\d/dy
Preview: (hide)
link

Comments

omega is not a form, but a general 2-tensor. Apart from that, the idea works (at least when we only have one chart).

MLainz gravatar imageMLainz ( 5 years ago )

For the record, one would have to write omega_inv = M.tensor_field(2, 0, om.inverse())

MLainz gravatar imageMLainz ( 5 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

Stats

Asked: 5 years ago

Seen: 308 times

Last updated: Oct 23 '19