Has the Cartan moving frame formalism been implemented in Sage?

93 views
Skip to first unread message

Tevian Dray

unread,
Dec 5, 2018, 8:10:22 PM12/5/18
to sage-support
Such an implementation would have 2 parts:

1. Defining the objects:  The connection 1-forms, torsion 2-forms, and curvature 2-forms are all indexed sets of differential forms.  They are not tensorial, but the index labels behave in many ways like tensor components.  In particular, there are "up" and "down" index versions, with particular symmetries.  The case of an orthonormal basis is particularly nice, leading to "down" index antisymmetry, which it would be nice to have built in.

2. Computing the objects:  The components of the connection 1-forms are just the Christoffel symbols, but in an arbitrary frame.  So when working with explicit examples, it would be enough to be able to compute the Christoffel symbols, then use them to determine the connection forms.  But this requires the ability to compute the connection in non-coordinate frames.

I'll settle for an implementation of question 2.  However, so far as I can tell, sage.manifolds only calculates in a coordinate basis, and the VectorFrame class doesn't do tensor derivatives.  If I'm missing something here, or if there's some other known way to work in an arbitrary (especially orthonormal) basis, please let me know -- ideally with an example, such as polar coordinates in an orthonormal frame.

Thank you.

Eric Gourgoulhon

unread,
Dec 6, 2018, 4:22:36 AM12/6/18
to sage-support
The answer to your question is essentially "yes", since Sage can deal with any kind of vector frame, not necessarily coordinate frames, see
In particular, a connection can be defined by its coefficients with respect to a moving frame; see the documentation of the function "curvature_form" for an example of curvature 2-form expressed in a moving frame:
At the end of the S^2 example
you have the computation of the structure coefficients of an orthonormal frame.
You have also non-coordinate frames in the S^3 example:
An example of curvature 2-form expressed in an orthonormal frame is in cell [87] of this notebook:

Best wishes,

Eric.

Tevian Dray

unread,
Dec 6, 2018, 11:28:39 AM12/6/18
to sage-s...@googlegroups.com
>> The answer to your question is essentially "yes" ...

Thank you for your detailed response and links. I had in fact found
some of them when searching, but clearly hadn't read them carefully
enough. In particular, I had missed the use of vector_frame in the
documentation of Affine Connections, although I note that 2 of your
subsequent 3 examples appear to define frames without using this class.

I expect that these examples will indeed provide the guidance I need,
and will work through them more carefully.

Again, thank you.

Tevian

Eric Gourgoulhon

unread,
Dec 7, 2018, 4:13:09 AM12/7/18
to sage-support
You're welcome.
If you find some missing functionalities and you would like to implement them, please visit

Best wishes,

  Eric.

Tevian

Tevian Dray

unread,
Dec 10, 2018, 7:53:31 PM12/10/18
to sage-s...@googlegroups.com
Let me start by confirming that I have successfully used SageManifolds
to implement the several calculations I wanted to make using the Cartan
moving frames formalism. So first a big "thank you" for developing this
code!

> If you find some missing functionalities and you would like to
> implement them, please visit ...

Thanks for the invitation, but I'm a newbie at both Python and Sage...

I do however have some further questions, some of which likely reflect
my lack of comfort with (and ignorance of) object-oriented programming;
others may be in the category of feature requests for the future.

1. First and foremost, what is the proper way to manipulate the
components of both tensors and tensor-like objects such as the
connection, the connection 1-forms, and the curvature 2-forms?

A basic example would be how to set the mass to zero in the
Schwarzschild geometry *after* calculating the curvature. (I'm still
recovering from my shock at discovering that saying "m=0" is not
sufficient...) The best I've been able to come up with is to do
something like
object[1,2].expr().subs({m:0})
for each component of each affected object. Is there a better way?

A similar example would be how to apply simplifications to (all)
components of a given tensor or tensor-like object.

2. Is there a way to display (all) connection 1-forms or curvature
2-forms, ideally in a format analogous to that produced by
g.display_comp() or nab.display()?

(An answer involving a print loop is acceptable, although I can't get
the formatting right -- one entry per line, no extraneous symbols.)

3. Is there a way to specify the index labels on the connection 1-forms
and curvature 2-forms, analagous to index_labels on the connection?

(For that matter, is there a way to specify the labels on the metric?
I get an error when trying to set index_labels in that case.)

4. Can default (non-numerical) index labels be specified, rather than
repeating them in every display request?

Thank you,
Tevian
Reply all
Reply to author
Forward
0 new messages