Open in CoCalc

Sage Manifolds: Differential Geometry and Tensor Calculus with Sage

SageManifolds is a package under development for the modern computer algebra system Sage, implementing differential geometry and tensor calculus. SageManifolds deals with real differentiable manifolds of arbitrary dimension. The basic objects are tensor fields and not tensor components in a given vector frame or coordinate chart. In other words, various charts and frames can be introduced on the manifold and a given tensor field can have representations in each of them. For more details, see


M = Manifold(2, 'M')
U = M.open_subset('U') ; U
open subset 'U' of the 2-dimensional manifold 'M'
stereoN.<x,y> = U.chart() ; stereoN
chart (U, (x, y))
<type 'sage.symbolic.expression.Expression'>
S = U.point((0,0), name='S') ; S
point 'S' on 2-dimensional manifold 'M'
V = M.open_subset('V') ; V
open subset 'V' of the 2-dimensional manifold 'M'
stereoS.<u,v> = V.chart() ; stereoS
chart (V, (u, v))
N = V.point((0,0), name='N') ; N
point 'N' on 2-dimensional manifold 'M'
[chart (U, (x, y)), chart (V, (u, v))]
transf = stereoN.transition_map(stereoS, (x/(x^2+y^2), y/(x^2+y^2)), \ intersection_name='W', restrictions1= x^2+y^2!=0, restrictions2= u^2+v^2!=0) transf
coordinate change from chart (W, (x, y)) to chart (W, (u, v))
W = U.intersection(V) W.atlas()
[chart (W, (x, y)), chart (W, (u, v))]
stereoN_W = W.atlas()[0] stereoS_W = W.atlas()[1]
(u/(u^2 + v^2), v/(u^2 + v^2))
[2-dimensional manifold 'M', open subset 'U' of the 2-dimensional manifold 'M', open subset 'V' of the 2-dimensional manifold 'M', open subset 'W' of the 2-dimensional manifold 'M']
N in W
S in W
[chart (U, (x, y)), chart (V, (u, v)), chart (W, (x, y)), chart (W, (u, v))]
p = M.point((1,2), chart=stereoN, name='p') Tp = p.tangent_space(); Tp
tangent space at point 'p' on 2-dimensional manifold 'M'
f = M.scalar_field({stereoN: atan(x^2+y^2), stereoS: pi/2-atan(u^2+v^2)}, name='f') f
scalar field 'f' on the 2-dimensional manifold 'M'