ASKSAGE: Sage Q&A Forum - Latest question feedhttp://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Thu, 20 Apr 2017 18:58:07 -0500Computing Riemann connection fails in Maximahttp://ask.sagemath.org/question/37355/computing-riemann-connection-fails-in-maxima/ 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 = dx1*dx1 + dx2*dx2
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 = m1*m2/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 + 2*m1*m2 + 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 dx1*dx1 - (m1 - m2)/(m1 + m2) dx1*dx2 - (m1 - m2)/(m1 + m2) dx2*dx1 + (m1^2 + m2^2)/(m1^2 + 2*m1*m2 + m2^2) dx2*dx2
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)?
Richard_LThu, 20 Apr 2017 18:58:07 -0500http://ask.sagemath.org/question/37355/