ASKSAGE: Sage Q&A Forum - Individual question feedhttp://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Thu, 04 Aug 2016 11:44:51 -0500- Using differential forms---within SageManifoldshttp://ask.sagemath.org/question/34321/using-differential-forms-within-sagemanifolds/ Hi all.
I'm aware of the implementation of `DifferentialForms` within `SageManifolds`, but I'd like to know how could I use this forms with ease.
In the **Sage Reference Manual_Manifolds**, there are examples of `AffineConnection` and the `connection_form`. However, it seems that the last (`connection_form`) does not allow to store the calculations, like for example:
nab = g.connection() ## This works for the usual connection
nab.display()
omega = nab.connection_form() ## DOES NOT work, one needs to specify components
I would like to calculate all the components of the connection form, to be able of compute *covariant exterior derivatives* of other objects.
How can the connection, curvature and torsion forms be stored (as differential forms)?
Thank you, and cheers.Wed, 03 Aug 2016 10:57:44 -0500http://ask.sagemath.org/question/34321/using-differential-forms-within-sagemanifolds/
- Answer by eric_g for <p>Hi all.</p>
<p>I'm aware of the implementation of <code>DifferentialForms</code> within <code>SageManifolds</code>, but I'd like to know how could I use this forms with ease.</p>
<p>In the <strong>Sage Reference Manual_Manifolds</strong>, there are examples of <code>AffineConnection</code> and the <code>connection_form</code>. However, it seems that the last (<code>connection_form</code>) does not allow to store the calculations, like for example:</p>
<pre><code>nab = g.connection() ## This works for the usual connection
nab.display()
omega = nab.connection_form() ## DOES NOT work, one needs to specify components
</code></pre>
<p>I would like to calculate all the components of the connection form, to be able of compute <em>covariant exterior derivatives</em> of other objects.</p>
<p>How can the connection, curvature and torsion forms be stored (as differential forms)?</p>
<p>Thank you, and cheers.</p>
http://ask.sagemath.org/question/34321/using-differential-forms-within-sagemanifolds/?answer=34331#post-id-34331Given an affine connection, there is not a unique connection form but a set of them specified by two indices and a vector frame. Hence the method `connection_form` requires the indices as argument and, as an option, the vector frame with respect to which the connection form is defined (by default, the manifold's default frame). Here is a full example, yielding to the connection 1-form Omega^0_1 with respect to the vector frame (d/dx, d/dy) in the hyperbolic plane (PoincarĂ© half-plane model):
sage: M = Manifold(2, 'M')
sage: X.<x,y> = M.chart('x y:(0,+oo)')
sage: g = M.metric('g')
sage: g[0,0], g[1,1] = 1/y, 1/y
sage: g.display()
g = 1/y dx*dx + 1/y dy*dy
sage: nab = g.connection()
sage: omega = nab.connection_form(0,1)
sage: omega.display()
nabla_g connection 1-form (0,1) = -1/2/y dx
As you can see from the display, the object returned by `nab.connection_form(0,1)` is not some component, but a genuine 1-form, which is colinear to dx. You can check this further:
sage: print(omega)
1-form nabla_g connection 1-form (0,1) on the 2-dimensional differentiable manifold M
sage: omega.category()
Category of elements of Free module /\^1(M) of 1-forms on the 2-dimensional differentiable manifold M
Note that the result is stored internally in some data attribute of the connection `nab`. So you can access it again by `nab.connection_form(0,1)` without triggering any new computation:
sage: nab.connection_form(0,1) is omega
True
Similar considerations hold for the torsion and curvature 2-forms.
Thu, 04 Aug 2016 11:44:51 -0500http://ask.sagemath.org/question/34321/using-differential-forms-within-sagemanifolds/?answer=34331#post-id-34331