︠02a483d8-6826-4885-b756-090d62efe044is︠ %md # 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 http://sagemanifolds.obspm.fr/. ## Documentation: - [Differentiable manifolds and tensor fields](http://sagemanifolds.obspm.fr/doc/reference/manifolds/sage/geometry/manifolds/manifold.html) - [Tensors on free modules of finite rank](http://sagemanifolds.obspm.fr/doc/reference/tensor_free_modules/index.html) ︡6df6f856-c35e-46c1-a23e-46f5f66dd50b︡{"md":"\n# Sage Manifolds: Differential Geometry and Tensor Calculus with Sage\n\n> 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 http://sagemanifolds.obspm.fr/.\n\n## Documentation:\n\n - [Differentiable manifolds and tensor fields](http://sagemanifolds.obspm.fr/doc/reference/manifolds/sage/geometry/manifolds/manifold.html)\n - [Tensors on free modules of finite rank](http://sagemanifolds.obspm.fr/doc/reference/tensor_free_modules/index.html)\n\n"}︡ ︠51e62141-add6-4ec3-a158-3ac54a4f7756︠ M = Manifold(2, 'M') ︡5c67c446-5de3-46eb-ba41-b749ee713f62︡ ︠2a4fb79c-e869-40fe-b057-0ca6d190e1f9︠ U = M.open_subset('U') ; U ︡07b8831f-c4d2-4ea2-8421-e7b3fe32a2ec︡{"stdout":"open subset 'U' of the 2-dimensional manifold 'M'\n"}︡ ︠aec872c7-2e31-4e69-b5e3-b865f5ad1c6c︠ stereoN. = U.chart() ; stereoN ︡8779e0aa-151c-401b-b973-8fce8ace2441︡{"stdout":"chart (U, (x, y))"}︡{"stdout":"\n"}︡ ︠42c20681-14fe-4af3-9fc4-b1f2eb6f5724︠ y ︡e0d1e569-f094-44f5-b019-5a0cf62bfbd6︡{"stdout":"y\n"}︡ ︠14d6808b-0f76-4699-b5f5-1140f88f48f2︠ type(y) ︡691fd170-73f6-416c-96cd-ead945db9504︡{"stdout":"\n"}︡ ︠b916170f-7f21-4dc3-9483-385a24bc3942︠ S = U.point((0,0), name='S') ; S ︡3aa0d3da-33c5-4ce1-b8bc-700f371b944f︡{"stdout":"point 'S' on 2-dimensional manifold 'M'\n"}︡ ︠1bf5d7a3-475c-4b48-b23f-ddd6b194df5d︠ V = M.open_subset('V') ; V ︡9f817bd8-cb71-4a4b-8423-5a969b4f6a85︡{"stdout":"open subset 'V' of the 2-dimensional manifold 'M'\n"}︡ ︠1e26b254-3752-47a5-acbf-5927a669e636︠ stereoS. = V.chart() ; stereoS ︡df71c2db-034d-43e9-92e7-510b95f35502︡{"stdout":"chart (V, (u, v))"}︡{"stdout":"\n"}︡ ︠24cb915d-fade-4ab4-94f7-d310d8ac0385︠ N = V.point((0,0), name='N') ; N ︡8f4ed7c4-ec79-497f-b781-60b928b9ea6b︡{"stdout":"point 'N' on 2-dimensional manifold 'M'\n"}︡ ︠6d3f8fb0-1488-4da3-b75a-c71558e3be04︠ M.declare_union(U,V) ︡515d2718-9d69-49f7-9efe-1433406ae4ac︡ ︠e2c4053e-6cb0-443b-8a1d-7fe57705f31e︠ M.atlas() ︡2eb1deb4-a83d-4efc-a582-5d9abbc68e08︡{"stdout":"[chart (U, (x, y)), chart (V, (u, v))]\n"}︡ ︠a405e2f7-b78e-47a6-b33d-80c8854750e8︠ 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 ︡1d3c2c8e-c0b3-4966-a4a0-0d24545e8ba7︡{"stdout":"coordinate change from chart (W, (x, y)) to chart (W, (u, v))\n"}︡ ︠b1cae0e2-f029-4c3c-ade1-869b85f94301︠ W = U.intersection(V) W.atlas() ︡6f8e2759-4977-4f1a-baf4-6c0a694cf54d︡{"stdout":"[chart (W, (x, y)), chart (W, (u, v))]\n"}︡ ︠6d9b9b92-42eb-42ff-8e93-351ce159754b︠ stereoN_W = W.atlas()[0] stereoS_W = W.atlas()[1] ︡30b81b15-7104-45c6-ad06-95b1fd1a0c4c︡ ︠f8174ad9-09c2-4076-935d-aa4c4f202809︠ transf.inverse()(u,v) ︡9ff26492-88bd-414a-a327-79e30ee62cb6︡{"stdout":"(u/(u^2 + v^2), v/(u^2 + v^2))"}︡{"stdout":"\n"}︡ ︠fb05ceec-b04e-450b-909f-aa1ffe2c81f4︠ M.list_of_subsets() ︡9a985d7d-bc76-4e0d-b8cd-ebda0d0b4199︡{"stdout":"[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"}︡ ︠673dc489-7bb4-4e5e-9b18-c0c46c98b04d︠ N in W ︡4d3e1c7b-c305-4dab-b590-bcea9a557e3b︡{"stdout":"False\n"}︡ ︠4db16ddd-1b0b-482b-b24c-c514a8819791︠ S in W ︡a96cc7a2-f543-43ac-b5ac-5933f70d8a6c︡{"stdout":"False\n"}︡ ︠50e0be0a-fb98-4dca-aa7c-babeff9999bd︠ M.atlas() ︡dfd549dc-13a5-4dd2-9bb5-dc9f40cb17c5︡{"stdout":"[chart (U, (x, y)), chart (V, (u, v)), chart (W, (x, y)), chart (W, (u, v))]\n"}︡ ︠e4881286-0724-424b-9e09-cf8f4e805a0d︠ p = M.point((1,2), chart=stereoN, name='p') Tp = p.tangent_space(); Tp ︡fd781f87-9782-4c3d-84b9-12f68691c604︡{"stdout":"tangent space at point 'p' on 2-dimensional manifold 'M'"}︡{"stdout":"\n"}︡ ︠caf5c7d1-b959-4bf4-a0a2-2deb92d11933︠ f = M.scalar_field({stereoN: atan(x^2+y^2), stereoS: pi/2-atan(u^2+v^2)}, name='f') f ︡fd2eb906-7699-4983-888a-0cc95a77ad45︡{"stdout":"scalar field 'f' on the 2-dimensional manifold 'M'\n"}︡ ︠15681d36-9122-43d8-a0c8-88a5c8c1a274︠