summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRelease Manager <release@sagemath.org>2016-05-28 00:50:14 +0200
committerVolker Braun <vbraun.name@gmail.com>2016-05-28 01:01:25 +0200
commitd77e2e9840d187f01a8e7f29abe06dd5561f6f74 (patch)
tree348abe8c2ac1a974c3957bf2658513eba932b031
parentTrac #20691: Posets have elements, not vertices (diff)
parentBasics of differentiable manifolds with changes in morphisms of topological m... (diff)
Trac #18783: Differentiable manifolds: basics
This is the first ticket about the implementation of differentiable manifolds resulting from the [http://sagemanifolds.obspm.fr/ SageManifolds project]. See the metaticket #18528 for an overview. The base field K of the differentiable manifold is generic (only assumed to be some non-discrete topological field), so that the user may specify e.g. K='''R''' (real manifolds) or K='''C''' (complex manifolds). This ticket implements the following Python classes, all of them being subclasses of classes introduced for topological manifolds (tickets #18529, #18640, #18725): - `DifferentiableManifold` (subclass of `TopologicalManifold`, cf. #18529): differentiable manifold over a topological field K (Parent class) - `DiffChart` (subclass of `Chart`, cf. #18529): chart of a K-differentiable atlas - `RealDiffChart` (subclass of `RealChart`, cf. #18529): chart of a K-differentiable atlas for K='''R''' - `DiffCoordChange` (subclass of `CoordChange`, cf. #18529): differentiable transition map - `DiffScalarFieldAlgebra` (subclass of `ScalarFieldAlgebra`, cf. #18640): set C^k^(M) of k-times continuously K-differentiable functions M --> K, where M is a differentiable manifold over K, C^k^(M) being a commutative algebra over K (Parent class) - `DiffScalarField` (subclass of `ScalarField`, cf. #18640): k-times continuously K-differentiable function M --> K (Element class) - `DiffManifoldHomset` (subclass of `TopManifoldHomset`, cf. #18725): set Hom(M,N) of differentiable maps between the differentiable manifolds M and N over the same topological field K (Parent class) - `DiffMap` (subclass of `ContinuousMap`, cf. #18725): differentiable map M --> N (Element class) The follow-up ticket is #18843. '''Documentation''': The reference manual is produced by `sage -docbuild reference/manifolds html` It can also be accessed online at http://sagemanifolds.obspm.fr/doc/18783/reference/manifolds/ More documentation (e.g. example worksheets) can be found [http://sagemanifolds.obspm.fr/documentation.html here]. URL: http://trac.sagemath.org/18783 Reported by: egourgoulhon Ticket author(s): Eric Gourgoulhon, Michal Bejger Reviewer(s): Volker Braun
-rw-r--r--src/doc/en/reference/manifolds/diff_manifold.rst13
-rw-r--r--src/doc/en/reference/manifolds/diff_map.rst9
-rw-r--r--src/doc/en/reference/manifolds/diff_scalarfield.rst9
-rw-r--r--src/doc/en/reference/manifolds/index.rst2
-rw-r--r--src/sage/manifolds/all.py2
-rw-r--r--src/sage/manifolds/differentiable/__init__.py1
-rw-r--r--src/sage/manifolds/differentiable/chart.py701
-rw-r--r--src/sage/manifolds/differentiable/diff_map.py484
-rw-r--r--src/sage/manifolds/differentiable/manifold.py953
-rw-r--r--src/sage/manifolds/differentiable/manifold_homset.py200
-rw-r--r--src/sage/manifolds/differentiable/scalarfield.py677
-rw-r--r--src/sage/manifolds/differentiable/scalarfield_algebra.py467
-rw-r--r--src/sage/manifolds/manifold.py124
-rw-r--r--src/sage/manifolds/structure.py57
14 files changed, 3674 insertions, 25 deletions
diff --git a/src/doc/en/reference/manifolds/diff_manifold.rst b/src/doc/en/reference/manifolds/diff_manifold.rst
new file mode 100644
index 00000000..0cfc2d8
--- /dev/null
+++ b/src/doc/en/reference/manifolds/diff_manifold.rst
@@ -0,0 +1,13 @@
+Differentiable Manifolds
+========================
+
+.. toctree::
+ :maxdepth: 2
+
+ sage/manifolds/differentiable/manifold
+
+ sage/manifolds/differentiable/chart
+
+ diff_scalarfield
+
+ diff_map
diff --git a/src/doc/en/reference/manifolds/diff_map.rst b/src/doc/en/reference/manifolds/diff_map.rst
new file mode 100644
index 00000000..ee43456
--- /dev/null
+++ b/src/doc/en/reference/manifolds/diff_map.rst
@@ -0,0 +1,9 @@
+Differentiable Maps
+===================
+
+.. toctree::
+ :maxdepth: 2
+
+ sage/manifolds/differentiable/manifold_homset
+
+ sage/manifolds/differentiable/diff_map
diff --git a/src/doc/en/reference/manifolds/diff_scalarfield.rst b/src/doc/en/reference/manifolds/diff_scalarfield.rst
new file mode 100644
index 00000000..9eb217c
--- /dev/null
+++ b/src/doc/en/reference/manifolds/diff_scalarfield.rst
@@ -0,0 +1,9 @@
+Scalar Fields
+=============
+
+.. toctree::
+ :maxdepth: 2
+
+ sage/manifolds/differentiable/scalarfield_algebra
+
+ sage/manifolds/differentiable/scalarfield
diff --git a/src/doc/en/reference/manifolds/index.rst b/src/doc/en/reference/manifolds/index.rst
index 13995d6..dd546af 100644
--- a/src/doc/en/reference/manifolds/index.rst
+++ b/src/doc/en/reference/manifolds/index.rst
@@ -15,6 +15,8 @@ More documentation (in particular example worksheets) can be found
manifold
+ diff_manifold
+
sage/manifolds/utilities
.. include:: ../footer.txt
diff --git a/src/sage/manifolds/all.py b/src/sage/manifolds/all.py
index 990657e..ae5fc2c 100644
--- a/src/sage/manifolds/all.py
+++ b/src/sage/manifolds/all.py
@@ -1,3 +1,3 @@
from sage.misc.lazy_import import lazy_import
lazy_import('sage.manifolds.manifold', 'Manifold')
-
+lazy_import('sage.manifolds.utilities', 'set_axes_labels')
diff --git a/src/sage/manifolds/differentiable/__init__.py b/src/sage/manifolds/differentiable/__init__.py
new file mode 100644
index 00000000..932b798
--- /dev/null
+++ b/src/sage/manifolds/differentiable/__init__.py
@@ -0,0 +1 @@
+# Empty file
diff --git a/src/sage/manifolds/differentiable/chart.py b/src/sage/manifolds/differentiable/chart.py
new file mode 100644
index 00000000..cdba762
--- /dev/null
+++ b/src/sage/manifolds/differentiable/chart.py
@@ -0,0 +1,701 @@
+r"""
+Coordinate Charts on Differentiable Manifolds
+
+The class :class:`DiffChart` implements coordinate charts on a differentiable
+manifold over a topological field `K` (in most applications, `K = \RR` or
+`K = \CC`).
+
+The subclass :class:`RealDiffChart` is devoted
+to the case `K=\RR`, for which the concept of coordinate range is meaningful.
+Moreover, :class:`RealDiffChart` is endowed with some plotting
+capabilities (cf. method :meth:`~sage.manifolds.chart.RealChart.plot`).
+
+Transition maps between charts are implemented via the class
+:class:`DiffCoordChange`.
+
+AUTHORS:
+
+- Eric Gourgoulhon, Michal Bejger (2013-2015) : initial version
+
+REFERENCES:
+
+- Chap. 1 of [Lee13]_ \J.M. Lee : *Introduction to Smooth Manifolds*,
+ 2nd ed., Springer (New York) (2013)
+
+"""
+
+#*****************************************************************************
+# Copyright (C) 2015 Eric Gourgoulhon <eric.gourgoulhon@obspm.fr>
+# Copyright (C) 2015 Michal Bejger <bejger@camk.edu.pl>
+#
+# Distributed under the terms of the GNU General Public License (GPL)
+# as published by the Free Software Foundation; either version 2 of
+# the License, or (at your option) any later version.
+# http://www.gnu.org/licenses/
+#*****************************************************************************
+
+from sage.manifolds.chart import Chart, RealChart, CoordChange
+
+class DiffChart(Chart):
+ r"""
+ Chart on a differentiable manifold.
+
+ Given a differentiable manifold `M` of dimension `n` over a topological
+ field `K`, a *chart* is a member `(U,\varphi)` of the manifold's
+ differentiable atlas; `U` is then an open subset of `M` and
+ `\varphi: U \rightarrow V \subset K^n` is a homeomorphism from
+ `U` to an open subset `V` of `K^n`.
+
+ The components `(x^1,\ldots,x^n)` of `\varphi`, defined by
+ `\varphi(p) = (x^1(p),\ldots,x^n(p))\in K^n` for any point `p\in U`, are
+ called the *coordinates* of the chart `(U,\varphi)`.
+
+ INPUT:
+
+ - ``domain`` -- open subset `U` on which the chart is defined
+ - ``coordinates`` -- (default: '' (empty string)) single string defining
+ the coordinate symbols, with ' ' (whitespace) as a separator; each item
+ has at most two fields, separated by ':':
+
+ 1. The coordinate symbol (a letter or a few letters)
+ 2. (optional) The LaTeX spelling of the coordinate; if not provided the
+ coordinate symbol given in the first field will be used.
+
+ If it contains any LaTeX expression, the string ``coordinates`` must be
+ declared with the prefix 'r' (for "raw") to allow for a proper treatment
+ of LaTeX's backslash character (see examples below).
+ If no LaTeX spelling is to be set for any coordinate, the argument
+ ``coordinates`` can be omitted when the shortcut operator ``<,>`` is
+ used via Sage preparser (see examples below)
+ - ``names`` -- (default: ``None``) unused argument, except if
+ ``coordinates`` is not provided; it must then be a tuple containing
+ the coordinate symbols (this is guaranteed if the shortcut operator
+ ``<,>`` is used).
+
+ EXAMPLES:
+
+ A chart on a complex 2-dimensional differentiable manifold::
+
+ sage: M = Manifold(2, 'M', field='complex')
+ sage: X = M.chart('x y'); X
+ Chart (M, (x, y))
+ sage: latex(X)
+ \left(M,(x, y)\right)
+ sage: type(X)
+ <class 'sage.manifolds.differentiable.chart.DiffChart'>
+
+ To manipulate the coordinates `(x,y)` as global variables, one has to set::
+
+ sage: x,y = X[:]
+
+ However, a shortcut is to use the declarator ``<x,y>`` in the left-hand
+ side of the chart declaration (there is then no need to pass the string
+ ``'x y'`` to ``chart()``)::
+
+ sage: M = Manifold(2, 'M', field='complex')
+ sage: X.<x,y> = M.chart(); X
+ Chart (M, (x, y))
+
+ The coordinates are then immediately accessible::
+
+ sage: y
+ y
+ sage: x is X[0] and y is X[1]
+ True
+
+ The trick is performed by Sage preparser::
+
+ sage: preparse("X.<x,y> = M.chart()")
+ "X = M.chart(names=('x', 'y',)); (x, y,) = X._first_ngens(2)"
+
+ Note that ``x`` and ``y`` declared in ``<x,y>`` are mere Python variable
+ names and do not have to coincide with the coordinate symbols;
+ for instance, one may write::
+
+ sage: M = Manifold(2, 'M', field='complex')
+ sage: X.<x1,y1> = M.chart('x y'); X
+ Chart (M, (x, y))
+
+ Then ``y`` is not known as a global Python variable and the
+ coordinate `y` is accessible only through the global variable ``y1``::
+
+ sage: y1
+ y
+ sage: latex(y1)
+ y
+ sage: y1 is X[1]
+ True
+
+ However, having the name of the Python variable coincide with the
+ coordinate symbol is quite convenient; so it is recommended to declare::
+
+ sage: M = Manifold(2, 'M', field='complex')
+ sage: X.<x,y> = M.chart()
+
+ In the above example, the chart X covers entirely the manifold M::
+
+ sage: X.domain()
+ 2-dimensional complex manifold M
+
+ Of course, one may declare a chart only on an open subset of M::
+
+ sage: U = M.open_subset('U')
+ sage: Y.<z1, z2> = U.chart(r'z1:\zeta_1 z2:\zeta_2'); Y
+ Chart (U, (z1, z2))
+ sage: Y.domain()
+ Open subset U of the 2-dimensional complex manifold M
+
+ In the above declaration, we have also specified some LaTeX writing
+ of the coordinates different from the text one::
+
+ sage: latex(z1)
+ {\zeta_1}
+
+ Note the prefix ``r`` in front of the string ``r'z1:\zeta_1 z2:\zeta_2'``;
+ it makes sure that the backslash character is treated as an ordinary
+ character, to be passed to the LaTeX interpreter.
+
+ Coordinates are Sage symbolic variables (see
+ :mod:`sage.symbolic.expression`)::
+
+ sage: type(z1)
+ <type 'sage.symbolic.expression.Expression'>
+
+ In addition to the Python variable name provided in the operator ``<.,.>``,
+ the coordinates are accessible by their indices::
+
+ sage: Y[0], Y[1]
+ (z1, z2)
+
+ The index range is that declared during the creation of the manifold. By
+ default, it starts at 0, but this can be changed via the parameter
+ ``start_index``::
+
+ sage: M1 = Manifold(2, 'M_1', field='complex', start_index=1)
+ sage: Z.<u,v> = M1.chart()
+ sage: Z[1], Z[2]
+ (u, v)
+
+ The full set of coordinates is obtained by means of the operator
+ ``[:]``::
+
+ sage: Y[:]
+ (z1, z2)
+
+ Each constructed chart is automatically added to the manifold's user
+ atlas::
+
+ sage: M.atlas()
+ [Chart (M, (x, y)), Chart (U, (z1, z2))]
+
+ and to the atlas of the chart's domain::
+
+ sage: U.atlas()
+ [Chart (U, (z1, z2))]
+
+ Manifold subsets have a *default chart*, which, unless changed via the
+ method
+ :meth:`~sage.manifolds.manifold.TopologicalManifold.set_default_chart`,
+ is the first defined chart on the subset (or on a open subset of it)::
+
+ sage: M.default_chart()
+ Chart (M, (x, y))
+ sage: U.default_chart()
+ Chart (U, (z1, z2))
+
+ The default charts are not privileged charts on the manifold, but rather
+ charts whose name can be skipped in the argument list of functions having
+ an optional ``chart=`` argument.
+
+ The action of the chart map `\varphi` on a point is obtained by means of
+ the call operator, i.e. the operator ``()``::
+
+ sage: p = M.point((1+i, 2), chart=X); p
+ Point on the 2-dimensional complex manifold M
+ sage: X(p)
+ (I + 1, 2)
+ sage: X(p) == p.coord(X)
+ True
+
+ .. SEEALSO::
+
+ :class:`~sage.manifolds.differentiable.chart.RealDiffChart` for charts
+ on differentiable manifolds over `\RR`.
+
+ """
+ def __init__(self, domain, coordinates='', names=None):
+ r"""
+ Construct a chart.
+
+ TESTS::
+
+ sage: M = Manifold(2, 'M', field='complex')
+ sage: X.<x,y> = M.chart()
+ sage: X
+ Chart (M, (x, y))
+ sage: type(X)
+ <class 'sage.manifolds.differentiable.chart.DiffChart'>
+ sage: assumptions() # no assumptions on x,y set by X._init_coordinates
+ []
+ sage: TestSuite(X).run()
+
+ """
+ Chart.__init__(self, domain, coordinates=coordinates, names=names)
+
+
+ def transition_map(self, other, transformations, intersection_name=None,
+