Ask Your Question
2

Computing Riemann connection fails in Maxima

asked 2017-04-21 01:58:07 +0100

Richard_L gravatar image

updated 2023-01-09 23:59:42 +0100

tmonteil gravatar image

Set up manifold with Riemann metric:

'SageMath version 7.6, Release Date: 2017-03-25'
sage: M = Manifold(2,'R^2',field='real',start_index=1)
sage: c_Cart.<x1,x2> = M.chart();
sage: g = M.riemannian_metric('g');
sage: g[1,1],g[2,2] = 1,1;
sage: g.display()
g = dx1dx1 + dx2dx2

And a change of coordinates:

sage: c_CM.<x,x> = M.chart();
sage: m1, m2 = var('m1 m2', domain='positive');
sage: m_CM = m1+m2; mu1 = m1/m_CM; mu2 = m2/m_CM; mu = m1m2/m_CM
sage: # Restrictions in following line seem to make no difference ...
sage: ch_Cart_CM = c_Cart.transition_map(c_CM, [mu1
x1+mu2*x2, x1-x2], restrictions1 = x1!=x2, restrictions2 = x!=0)
sage: ch_Cart_CM;
Change of coordinates from Chart (R^2, (x1, x2)) to Chart (R^2, (X, x))

Now define a connection on g:

sage: g.comp(c_CM.frame())[:]
[ 2 -(m1 - m2)/(m1 + m2)]
[ -(m1 - m2)/(m1 + m2) (m1^2 + m2^2)/(m1^2 + 2m1m2 + m2^2)]

And a connection on G:

sage: G = M.riemannian_metric('G');
sage: G[:]= g.comp(c_CM.frame())[:]
sage: G.display()
G = 2 dx1dx1 - (m1 - m2)/(m1 + m2) dx1dx2 - (m1 - m2)/(m1 + m2) dx2dx1 + (m1^2 + m2^2)/(m1^2 + 2m1m2 + m2^2) dx2dx2

Everything appears to be fine. Let's try the Riemann connection:

sage: g.connection()
Levi-Civita connection nabla_g associated with the Riemannian metric g on the 2-dimensional differentiable manifold R^2

Good. BUT

sage: #G.connection() # blows up (in Maxima?) w/ "Detected access to protected memory ..."

Is there something wrong in the way G was defined, or are we limited by Maxima (whose ECL routines contain the message)?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
2

answered 2017-04-21 17:51:52 +0100

eric_g gravatar image

This is indeed a bug in Maxima (nothing to do with the Riemannian connections per se). One can trace it back to

sage: m1, m2 = var('m1 m2', domain='positive')
sage: a = (m2-m1)*m2/(m1+m2)^2
sage: bool(a == 0) # crashes the Sage session !!!

A workaround is to declare the variables m1 and m2 in the domain 'real' instead of 'positive':

sage: m1, m2 = var('m1 m2', domain='real')
edit flag offensive delete link more

Comments

Merci! I have added tag accordingly.

Richard_L gravatar imageRichard_L ( 2017-04-21 20:08:43 +0100 )edit

The bug is now reported as ticket #22857.

eric_g gravatar imageeric_g ( 2017-04-22 16:12:03 +0100 )edit

Thanks to both for reporting and opening a ticket ! confirmed_bug tag added.

tmonteil gravatar imagetmonteil ( 2017-04-22 22:59:28 +0100 )edit

The bug is fixed in Sage 9.2.beta10.

eric_g gravatar imageeric_g ( 2020-08-30 00:16:45 +0100 )edit

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: 2017-04-21 01:58:07 +0100

Seen: 398 times

Last updated: Apr 22 '17