Connection Forms not Anti-Symmetric

167 views
Skip to first unread message

Dominic Steinitz

unread,
Dec 31, 2023, 11:43:16 AM12/31/23
to sage-support
I am calculating the connection forms for the case of a Poincaré Disk but the diagonal elements appear to be non-zero

`M = Manifold(2, 'M', r'\mathcal{M}')`

`c_xy.<x,y> = M.chart('x:(-1,1) y:(-1,1)', coord_restrictions=lambda x,y: x^2+y^2<1)`

`g = M.riemannian_metric('g')`

`g[0,0], g[1,1] = 4/(1 - x^2 - y^2)^2, 4/(1 - x^2 - y^2)^2`

`e1 = M.vector_field((1 - x^2 - y^2) / 2, 0)`

`e2 = M.vector_field(0, (1 - x^2 - y^2) / 2)`

`e = M.vector_frame('e', (e1, e2), non_coordinate_basis=True)`

`nabla = g.connection()`

`omega = nabla.connection_form`

`omega(0,0).display(e), omega(0,1).display(e)`

> (nabla_g connection 1-form (0,0) = x e^0 + y e^1,
>  nabla_g connection 1-form (0,1) = y e^0 - x e^1)

`omega(1,0).display(e), omega(0,1).display(e)`

> (nabla_g connection 1-form (1,0) = -y e^0 + x e^1,
>  nabla_g connection 1-form (0,1) = y e^0 - x e^1)

Dominic Steinitz

unread,
Jan 1, 2024, 12:43:12 PMJan 1
to sage-support
That should be

`omega(1,1).display(e)`

nabla_g connection 1-form (1,1) = x e^0 + y e^1)

Dominic Steinitz

unread,
Jan 2, 2024, 12:28:43 PMJan 2
to sage-support
Well apparently I should *not* be using `connection_form` but instead 

`gam_e = nabla.coef(e)`
`gam_e[:]`

[[[0, 0], [y, -x]], [[-y, x], [0, 0]]]

Which is what I would have expected. I'm still confused by what `connection_form` does if it doesn't calculate the connection forms.

Dominic Steinitz

unread,
Jan 3, 2024, 4:37:11 AMJan 3
to sage-support
It seems I should have specified the frame in the connection form as well as in the display (object? - I have no idea about OOP having been a functional programmer for the last 30 years).

In [13]:
omega(0,0,e).display(e), omega(0,1,e).display(e)
Out [13]:
(nabla_g connection 1-form (0,0) = 0,

 nabla_g connection 1-form (0,1) = y e^0 - x e^1)

In [14]:
omega(1,0,e).display(e), omega(1,1,e).display(e)
Out [14]:

(nabla_g connection 1-form (1,0) = -y e^0 + x e^1,
 nabla_g connection 1-form (1,1) = 0)

Dominic Steinitz

unread,
Feb 7, 2024, 9:46:05 AMFeb 7
to sage-s...@googlegroups.com


Fails with the error in the title and in more detail below. I created a MWE. I presume this worked at some point but how do I get the exterior derivative of a 1-form in the latest release of sage manifolds?


M = Manifold(4, 'M', latex_name=r'\mathcal{M}', structure='Lorentzian')
BL.<t,x,y,z> = M.chart(r"t x y z") 
var('E_x E_y E_z')
dt, dx, dy, dz = BL.coframe()[:]
E = E_x * dx + E_y * dy + E_z * dz
E.set_name('E')
(E.wedge(BL.coframe()[0])).exterior_der()

fails with

---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
Cell In [66], line 1
----> 1 (E.wedge(BL.coframe()[Integer(0)])).exterior_der()

File /private/var/tmp/sage-10.1-current/local/var/lib/sage/venv-python3.11.1/lib/python3.11/site-packages/sage/structure/element.pyx:488, in sage.structure.element.Element.__getattr__ (build/cythonized/sage/structure/element.c:4846)()
    486         AttributeError: 'LeftZeroSemigroup_with_category.element_class' object has no attribute 'blah_blah'
    487     """
--> 488     return self.getattr_from_category(name)
    489 
    490 cdef getattr_from_category(self, name):

File /private/var/tmp/sage-10.1-current/local/var/lib/sage/venv-python3.11.1/lib/python3.11/site-packages/sage/structure/element.pyx:501, in sage.structure.element.Element.getattr_from_category (build/cythonized/sage/structure/element.c:4958)()
    499     else:
    500         cls = P._abstract_element_class
--> 501     return getattr_from_other_class(self, cls, name)
    502 
    503 def __dir__(self):

File /private/var/tmp/sage-10.1-current/local/var/lib/sage/venv-python3.11.1/lib/python3.11/site-packages/sage/cpython/getattr.pyx:357, in sage.cpython.getattr.getattr_from_other_class (build/cythonized/sage/cpython/getattr.c:2706)()
    355     dummy_error_message.cls = type(self)
    356     dummy_error_message.name = name
--> 357     raise AttributeError(dummy_error_message)
    358 cdef PyObject* attr = instance_getattr(cls, name)
    359 if attr is NULL:

AttributeError: 'DiffFormFreeModule_with_category.element_class' object has no attribute 'exterior_der'


Eric Gourgoulhon

unread,
Feb 7, 2024, 1:35:17 PMFeb 7
to sage-support
Le mercredi 7 février 2024 à 15:46:05 UTC+1, Dominic Steinitz a écrit :


Fails with the error in the title and in more detail below. 

For reference: this is discussed in the new thread https://groups.google.com/g/sage-support/c/yD6k655EWOA/m/3AMzKdpaAQAJ

Besides, the question about the connection forms has been answered on   https://ask.sagemath.org/

Eric.

G. M.-S.

unread,
Feb 7, 2024, 2:26:32 PMFeb 7
to sage-s...@googlegroups.com

Just to say that
gives me
502 Bad Gateway

Guillermo

Dominic Steinitz

unread,
Feb 8, 2024, 7:45:18 AMFeb 8
to sage-support
Sorry about posting the same thing twice.

Eric Gourgoulhon

unread,
Feb 8, 2024, 1:31:09 PMFeb 8
to sage-support
Le jeudi 8 février 2024 à 13:45:18 UTC+1, Dominic Steinitz a écrit :
Sorry about posting the same thing twice.

No problem.
Just for reference, in case someone reads this thread: the answer about the connection forms is here:

Reply all
Reply to author
Forward
0 new messages