Sage Manifolds

Last updated

SageManifolds (following styling of SageMath) is an extension fully integrated into SageMath, to be used as a package for differential geometry and tensor calculus. The official page for the project is sagemanifolds.obspm.fr. It can be used on CoCalc.

Contents

SageManifolds deals with 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.

An important class of treated manifolds is that of pseudo-Riemannian manifolds , among which Riemannian manifolds and Lorentzian manifolds , with applications to General Relativity. In particular, SageManifolds implements the computation of the Riemann curvature tensor and associated objects (Ricci tensor, Weyl tensor). SageManifolds can also deal with generic affine connections , not necessarily Levi-Civita ones.

Functionalities

VersionDateDescription (From Changelog)
0.17 July 2013First released
0.212 September 2013Defined six classes, and "many doctests changed to comply with Sage 5.11. New methods in each class.
0.324 November 2013Development repository moved from svn to git. New example worksheets. More classes and methods (some inherited from Sage).
0.410 February 2014New classes, members, and methods.
0.512 July 2014This is a major release, involving the introduction of algebraic structures to describe tensor fields, namely modules over the algebra of scalar fields, among which free modules of finite rank. This is achieved via Sage Parent/Element scheme and coercion model.
0.628 September 2014
  • Graphical output for charts (method Chart.plot()) and points (method Point.plot()); here are some examples.
  • Introduction of index notation to denote tensor contractions and tensor symmetrizations (new class TensorWithIndices); see these links: 1, 2.
  • The argument of methods symmetrize() and antisymmetrize() in tensor classes is now directly a sequence of index positions (and no longer a single list/tuple encapsulating such a sequence).
  • Method self_contract() of tensor classes renamed trace().
  • The code for tensor contractions has been optimized; moreover multiple tensor contractions are now allowed.
  • The documentation (reference manuals 4 and 5) has been improved.
0.712 March 2015For the end user, new features are
  • the introduction of curves in manifolds (with some plotting capabilities)
  • improvements in differential mappings between manifolds, including mapping composition and mapping differential
  • the introduction of homomorphisms between free modules
0.816 May 2015Changes for the end user:
  • Plot of vector fields: new method VectorField.plot()
  • Possibility of parallelizing heavy computations: parallelization is implemented for basic tensor calculus (arithmetics, contractions) and for calculus regarding affine connections (connection coefficients, action on a tensor field, Riemann curvature tensor)
  • Nice display of partial derivatives
  • Standard math functions exp, cos, sin, etc. on scalar fields
  • Display of tensor components as a list, one per line: new methods TensorField.display_comp() and FreeModuleTensor.display_comp()
  • Nice display of connection coefficients: new method AffConnection.display()
  • Nice display of Christoffel symbols: new method Metric.christoffel_symbols_display()
  • Nice display of chart transition maps: new method CoordChange.display()
0.910 December 2015This is a major release, resulting from an important refactoring of the code, in view of a full integration of SageManifolds into SageMath (cf. the metaticket #18528 on the SageMath developer trac). The major changes are
  • Topological properties have been separated from differential ones, by implementing topological manifolds (new classTopologicalManifold) and making the class for differentiable manifolds (DifferentiableManifold) inherit from TopologicalManifold.
  • The base field over which manifolds are defined is no longer assumed to be the real field: it can be any topological field (non-discrete to define differentiability for diff. manifolds). This allows to define easily complex manifolds, by setting the field to C.
  • The class ManifoldOpenSubset has been suppressed: open subsets of manifolds are now instances of TopologicalManifold or DifferentiableManifold (since an open subset of a top/diff manifold is a top/diff manifold by itself)
  • Functions defined on a coordinate patch are no longer necessarily symbolic functions of the coordinates: they now pertain to the generic class CoordFunction, symbolic functions being described by a subclass of it (CoordFunctionSymb). This opens the way for "numerical" manifolds, like spacetimes generated by numerical relativity codes.
  • Better parallelization, governed by the new singleton class Parallelism and the global function use_multiproc.
0.9.119 September 2016*The full change is now listed for the Wikipedia (this) page*

This release propagates further code changes related to the integration of SageManifolds into SageMath (cf. the metaticket#18528); it also adds a few new functionalities.

New functionalities:

  • Computation of the Schouten tensor, the Cotton conformal tensor and the Cotton-York conformal tensor associated to a given pseudo-Riemannian metric
  • Add structure of Lie algebroid to modules of vector fields (classes VectorFieldModule and VectorFieldFreeModule): new method VectorField.bracket
  • Parallelization of vector field plots
  • Parallelization of arithmetics of fully antisymmetric tensor components
  • Improved rendering of variables in partial derivatives, using LaTeX display of symbols (class ExpressionNice)
  • Add comparison operator for transition maps (class CoordChange)
  • Add list functionalities for bases (methods __len__ and __iter__ in classes FreeModuleBasis and FreeModuleCoBasis)

Syntactic changes:

  • Method CoordChange.set_inverse: replace the keyword check by verbose, the default being now verbose=False
  • Introduction of Manifold.options to control the display of mathematical expressions instead of the global functions nice_derivatives and omit_function_args, which have been suppressed
  • Function set_axes_labels (to set labels on 3D plots) no longer imported at the startup time; if required, one has to type from sage.manifolds.utilities import set_axes_labels
  • Function xder (exterior derivative) no longer imported at the startup time; if required, one has to type from sage.manifolds.utilities import xder
  • Class DiffForm: method exterior_der renamed exterior_derivative
  • Classes DiffScalarField, TensorField and TensorFieldParal: method lie_der renamed lie_derivative, with lie_der kept as an alias of the latter

More internal changes:

  • Manifold structure now described via specific singleton classes: TopologicalStructure, RealTopologicalStructure, DifferentialStructure and RealDifferentialStructure
  • Class TopologicalManifoldSubset renamed ManifoldSubset
  • Class TopologicalManifoldPoint renamed ManifoldPoint
  • Manifold subsets are no longer facade parents
  • Class ManifoldSubset: new methods lift and retract
  • Introduction of the commutative algebra of all symbolic coordinate functions on a given chart: new class CoordFunctionSymbRing and class CoordFunction now inheritates from AlgebraElement
  • Class FiniteRankFreeModule: category changed from Modules(ring) to Modules(ring).FiniteDimensional()
  • Some changes to prepare the migration to Python 3 (e.g. print replaced by print())
1.011 January 2017Besides the full integration in SageMath 7.5, there are only minor changes with respect to v0.9.1:

Syntactic changes:

  • Method plot of classes RealChart and VectorField: keyword argument nb_values renamed number_values
  • Method structure_coef of class VectorFrame renamed structure_coeff
  • Class OpenInterval: argument subinterval_of renamed ambient in the constructor
  • Class RealLine: LateX name changed from \RR to \Bold{R}

Internal changes:

  • Systematic use of Python3-compatible syntax (to prepare the migration of SageMath to Python3); in particular:
    • All occurrences of iteritems() changed to items()
    • All occurrences of itervalues() changed to values()
    • Classes ScalarField and TensorField: method __nonzero__ renamed __bool__
    • Class TensorField: method __div__ renamed __truediv__
  • Classes TensorFieldModule, VectorFieldModule and DiffFormModule: add cached method zero
  • Classes DiffForm and DiffFormParal: method exterior_derivative is cached (via the decorator @cached_method)
  • Class VectorFrame: method structure_coeff is cached (via the decorator @cached_method)

Other changes:

  • Improvements in the documentation; in particular 3D graphics have been added to the reference manual for illustrating the use of some plot methods
  • Values set by the user to some keyword arguments of plot methods become the new default values until further explicit change (this behavior is provided by the decorator @options):
    • TangentVector.plot: argument scale
    • VectorField.plot: arguments max_range, scale and color
    • DifferentiableCurve.plot: arguments thickness, plot_points, max_range and aspect_ratio
1.0.125 March 2017
1.0.221 July 2017
1.17 December 2017

More documentation is on doc.sagemath.org/html/en/reference/manifolds/.

Free & Open Software

As SageMath is, SageManifolds is a free and open source software based on the Python programming language. It is released under the GNU General Public License. To download and install SageManifolds, see here. It is more specifically GPL v2+ (meaning that a user may elect to use a licence higher than GPL version 2.)

Development

Much of the source is on tickets at trac.sagemath.org.

There are GitHub repositories at github.com/sagemanifolds/SageManifolds.

Other links are provided at sagemanifolds.obspm.fr/contact.html.

Related Research Articles

<span class="mw-page-title-main">Differential geometry</span> Branch of mathematics dealing with functions and geometric structures on differentiable manifolds

Differential geometry is a mathematical discipline that studies the geometry of smooth shapes and smooth spaces, otherwise known as smooth manifolds. It uses the techniques of differential calculus, integral calculus, linear algebra and multilinear algebra. The field has its origins in the study of spherical geometry as far back as antiquity. It also relates to astronomy, the geodesy of the Earth, and later the study of hyperbolic geometry by Lobachevsky. The simplest examples of smooth spaces are the plane and space curves and surfaces in the three-dimensional Euclidean space, and the study of these shapes formed the basis for development of modern differential geometry during the 18th and 19th centuries.

In differential geometry, a Riemannian manifold or Riemannian space(M, g), so called after the German mathematician Bernhard Riemann, is a real, smooth manifold M equipped with a positive-definite inner product gp on the tangent space TpM at each point p.

Riemannian geometry is the branch of differential geometry that studies Riemannian manifolds, defined as smooth manifolds with a Riemannian metric. This gives, in particular, local notions of angle, length of curves, surface area and volume. From those, some other global quantities can be derived by integrating local contributions.

In mathematics and physics, a tensor field assigns a tensor to each point of a mathematical space. Tensor fields are used in differential geometry, algebraic geometry, general relativity, in the analysis of stress and strain in materials, and in numerous applications in the physical sciences. As a tensor is a generalization of a scalar and a vector, a tensor field is a generalization of a scalar field or vector field that assigns, respectively, a scalar or vector to each point of space. If a tensor A is defined on a vector fields set X(M) over a module M, we call A a tensor field on M.

In differential geometry, the Ricci curvature tensor, named after Gregorio Ricci-Curbastro, is a geometric object which is determined by a choice of Riemannian or pseudo-Riemannian metric on a manifold. It can be considered, broadly, as a measure of the degree to which the geometry of a given metric tensor differs locally from that of ordinary Euclidean space or pseudo-Euclidean space.

In the mathematical field of Riemannian geometry, the scalar curvature is a measure of the curvature of a Riemannian manifold. To each point on a Riemannian manifold, it assigns a single real number determined by the geometry of the metric near that point. It is defined by a complicated explicit formula in terms of partial derivatives of the metric components, although it is also characterized by the volume of infinitesimally small geodesic balls. In the context of the differential geometry of surfaces, the scalar curvature is twice the Gaussian curvature, and completely characterizes the curvature of a surface. In higher dimensions, however, the scalar curvature only represents one particular part of the Riemann curvature tensor.

In differential geometry, a pseudo-Riemannian manifold, also called a semi-Riemannian manifold, is a differentiable manifold with a metric tensor that is everywhere nondegenerate. This is a generalization of a Riemannian manifold in which the requirement of positive-definiteness is relaxed.

<span class="mw-page-title-main">Ricci flow</span> Partial differential equation

In the mathematical fields of differential geometry and geometric analysis, the Ricci flow, sometimes also referred to as Hamilton's Ricci flow, is a certain partial differential equation for a Riemannian metric. It is often said to be analogous to the diffusion of heat and the heat equation, due to formal similarities in the mathematical structure of the equation. However, it is nonlinear and exhibits many phenomena not present in the study of the heat equation.

<span class="mw-page-title-main">Richard S. Hamilton</span> American mathematician (born 1943)

Richard Streit Hamilton is an American mathematician who serves as the Davies Professor of Mathematics at Columbia University. He is known for contributions to geometric analysis and partial differential equations. Hamilton is best known for foundational contributions to the theory of the Ricci flow and the development of a corresponding program of techniques and ideas for resolving the Poincaré conjecture and geometrization conjecture in the field of geometric topology. Grigori Perelman built upon Hamilton's results to prove the conjectures, and was awarded a Millennium Prize for his work. However, Perelman declined the award, regarding Hamilton's contribution as being equal to his own.

<span class="mw-page-title-main">Manifold</span> Topological space that locally resembles Euclidean space

In mathematics, a manifold is a topological space that locally resembles Euclidean space near each point. More precisely, an -dimensional manifold, or -manifold for short, is a topological space with the property that each point has a neighborhood that is homeomorphic to an open subset of -dimensional Euclidean space.

<span class="mw-page-title-main">Differentiable manifold</span> Manifold upon which it is possible to perform calculus

In mathematics, a differentiable manifold is a type of manifold that is locally similar enough to a vector space to allow one to apply calculus. Any manifold can be described by a collection of charts (atlas). One may then apply ideas from calculus while working within the individual charts, since each chart lies within a vector space to which the usual rules of calculus apply. If the charts are suitably compatible, then computations done in one chart are valid in any other differentiable chart.

A frame field in general relativity is a set of four pointwise-orthonormal vector fields, one timelike and three spacelike, defined on a Lorentzian manifold that is physically interpreted as a model of spacetime. The timelike unit vector field is often denoted by and the three spacelike unit vector fields by . All tensorial quantities defined on the manifold can be expressed using the frame field and its dual coframe field.

The Cartan–Karlhede algorithm is a procedure for completely classifying and comparing Riemannian manifolds. Given two Riemannian manifolds of the same dimension, it is not always obvious whether they are locally isometric. Élie Cartan, using his exterior calculus with his method of moving frames, showed that it is always possible to compare the manifolds. Carl Brans developed the method further, and the first practical implementation was presented by Anders Karlhede in 1980.

<span class="mw-page-title-main">SageMath</span> Computer algebra system

SageMath is a computer algebra system (CAS) with features covering many aspects of mathematics, including algebra, combinatorics, graph theory, group theory, differentiable manifolds, numerical analysis, number theory, calculus and statistics.

The mathematics of general relativity is complicated. In Newton's theories of motion, an object's length and the rate at which time passes remain constant while the object accelerates, meaning that many problems in Newtonian mechanics may be solved by algebra alone. In relativity, however, an object's length and the rate at which time passes both change appreciably as the object's speed approaches the speed of light, meaning that more variables and more complicated mathematics are required to calculate the object's motion. As a result, relativity requires the use of concepts such as vectors, tensors, pseudotensors and curvilinear coordinates.

The tetrad formalism is an approach to general relativity that generalizes the choice of basis for the tangent bundle from a coordinate basis to the less restrictive choice of a local basis, i.e. a locally defined set of four linearly independent vector fields called a tetrad or vierbein. It is a special case of the more general idea of a vielbein formalism, which is set in (pseudo-)Riemannian geometry. This article as currently written makes frequent mention of general relativity; however, almost everything it says is equally applicable to (pseudo-)Riemannian manifolds in general, and even to spin manifolds. Most statements hold simply by substituting arbitrary for . In German, "vier" translates to "four", and "viel" to "many".

In the mathematical field of differential geometry, any (pseudo-)Riemannian metric determines a certain class of paths known as geodesics. Beltrami's theorem, named for Italian mathematician Eugenio Beltrami, is a result on the inverse problem of determining a (pseudo-)Riemannian metric from its geodesics.

Spectral geometry is a field in mathematics which concerns relationships between geometric structures of manifolds and spectra of canonically defined differential operators. The case of the Laplace–Beltrami operator on a closed Riemannian manifold has been most intensively studied, although other Laplace operators in differential geometry have also been examined. The field concerns itself with two kinds of questions: direct problems and inverse problems.

Tensor software is a class of mathematical software designed for manipulation and calculation with tensors.