Skip to content
This repository was archived by the owner on Jan 30, 2023. It is now read-only.

Commit c0b3284

Browse files
committed
Improve documentation of classes Chart and ContinuousMap
1 parent 30e812a commit c0b3284

File tree

3 files changed

+60
-31
lines changed

3 files changed

+60
-31
lines changed

src/sage/manifolds/chart.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,8 @@ class Chart(UniqueRepresentation, SageObject):
5050
an open subset `V` of `K^n`.
5151
5252
The components `(x^1,\ldots,x^n)` of `\varphi`, defined by
53-
`\varphi(p) = (x^1(p),\ldots,x^n(p))`, are called the *coordinates* of the
54-
chart `(U,\varphi)`.
53+
`\varphi(p) = (x^1(p),\ldots,x^n(p))\in K^n` for any point `p\in U`,
54+
are called the *coordinates* of the chart `(U,\varphi)`.
5555
5656
INPUT:
5757
@@ -1051,8 +1051,8 @@ class RealChart(Chart):
10511051
an open subset `V` of `\RR^n`.
10521052
10531053
The components `(x^1,\ldots,x^n)` of `\varphi`, defined by
1054-
`\varphi(p) = (x^1(p),\ldots,x^n(p))`, are called the *coordinates* of the
1055-
chart `(U,\varphi)`.
1054+
`\varphi(p) = (x^1(p),\ldots,x^n(p))\in \RR^n` for any point `p\in U`,
1055+
are called the *coordinates* of the chart `(U,\varphi)`.
10561056
10571057
INPUT:
10581058

src/sage/manifolds/continuous_map.py

+40-13
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,6 @@ class ContinuousMap(Morphism):
5050
where `M` and `N` are topological manifolds over the same topological
5151
field `K`, `U` is an open subset of `M` and `V` is an open subset of `N`.
5252
53-
In what follows, `M` is called the *start manifold* and
54-
`N` the *arrival manifold*.
55-
5653
Continuous maps are the *morphisms* of the *category* of
5754
topological manifolds. The set of all continuous maps from
5855
`U` to `V` is therefore the homset between `U` and `V` and is denoted
@@ -70,7 +67,7 @@ class is :class:`~sage.manifolds.manifold_homset.TopManifoldHomset`.
7067
coordinates of the image expressed in terms of the coordinates of
7168
the considered point) with the pairs of charts (chart1, chart2)
7269
as keys (chart1 being a chart on `U` and chart2 a chart on `V`).
73-
If the dimension of the arrival manifold is 1, a single coordinate
70+
If the dimension of the map's codomain is 1, a single coordinate
7471
expression can be passed instead of a tuple with a single element
7572
- ``name`` -- (default: ``None``) name given to the continuous map
7673
- ``latex_name`` -- (default: ``None``) LaTeX symbol to denote the
@@ -214,7 +211,7 @@ class is :class:`~sage.manifolds.manifold_homset.TopManifoldHomset`.
214211
on U: (x, y) |--> (xP, yP) = (x, y)
215212
on V: (u, v) |--> (xP, yP) = (u/(u^2 + v^2), v/(u^2 + v^2))
216213
217-
If the arrival manifold is 1-dimensional, a continuous map must be
214+
If its codomain is 1-dimensional, a continuous map must be
218215
defined by a single symbolic expression for each pair of charts, and not
219216
by a list/tuple with a single element::
220217
@@ -912,7 +909,7 @@ def display(self, chart1=None, chart2=None):
912909
INPUT:
913910
914911
- ``chart1`` -- (default: ``None``) chart on the map's domain; if ``None``,
915-
the display is performed on all the charts on the start manifold
912+
the display is performed on all the charts on the domain
916913
in which the map is known or computable via some change of
917914
coordinates
918915
- ``chart2`` -- (default: ``None``) chart on the map's codomain; if
@@ -953,7 +950,7 @@ def display(self, chart1=None, chart2=None):
953950
\begin{array}{llcl} \Phi:& S^2 & \longrightarrow & \RR^3 \\ \mbox{on}\ U : & \left(x, y\right) & \longmapsto & \left(X, Y, Z\right) = \left(\frac{2 \, x}{x^{2} + y^{2} + 1}, \frac{2 \, y}{x^{2} + y^{2} + 1}, \frac{x^{2} + y^{2} - 1}{x^{2} + y^{2} + 1}\right) \end{array}
954951
955952
If the argument ``chart2`` is not specified, the display is performed
956-
on all the charts on the arrival manifold in which the map is known
953+
on all the charts on the codomain in which the map is known
957954
or computable via some change of coordinates (here only one chart:
958955
c_cart)::
959956
@@ -962,7 +959,7 @@ def display(self, chart1=None, chart2=None):
962959
on U: (x, y) |--> (X, Y, Z) = (2*x/(x^2 + y^2 + 1), 2*y/(x^2 + y^2 + 1), (x^2 + y^2 - 1)/(x^2 + y^2 + 1))
963960
964961
Similarly, if the argument ``chart1`` is omitted, the display is
965-
performed on all the charts on the start manifold in which the
962+
performed on all the charts on the map's domain in which the
966963
map is known or computable via some change of coordinates::
967964
968965
sage: Phi.display(chart2=c_cart)
@@ -1191,8 +1188,8 @@ def coord_functions(self, chart1=None, chart2=None):
11911188
change_arrival.append(ochart2)
11921189
if chart2 == ochart2:
11931190
change_start.append(ochart1)
1194-
# 1/ Trying to make a change of chart only on the arrival domain:
1195-
# the arrival default chart is privileged:
1191+
# 1/ Trying to make a change of chart only on the codomain:
1192+
# the codomain's default chart is privileged:
11961193
sel_chart2 = None # selected chart2
11971194
if def_chart2 in change_arrival \
11981195
and (def_chart2, chart2) in dom2._coord_changes:
@@ -1210,7 +1207,7 @@ def coord_functions(self, chart1=None, chart2=None):
12101207
return self._coord_expression[(chart1, chart2)]
12111208

12121209
# 2/ Trying to make a change of chart only on the start domain:
1213-
# the start default chart is privileged:
1210+
# the domain's default chart is privileged:
12141211
sel_chart1 = None # selected chart1
12151212
if def_chart1 in change_start \
12161213
and (chart1, def_chart1) in dom1._coord_changes:
@@ -1358,7 +1355,7 @@ def set_expr(self, chart1, chart2, coord_functions):
13581355
- ``coord_functions`` -- the coordinate symbolic expression of the
13591356
map in the above charts: list (or tuple) of the coordinates of
13601357
the image expressed in terms of the coordinates of the considered
1361-
point; if the dimension of the arrival manifold is 1, a single
1358+
point; if the dimension of the codomain is 1, a single
13621359
expression is expected (not a list with a single element)
13631360
13641361
EXAMPLES:
@@ -1450,7 +1447,7 @@ def add_expr(self, chart1, chart2, coord_functions):
14501447
- ``coord_functions`` -- the coordinate symbolic expression of the
14511448
map in the above charts: list (or tuple) of the coordinates of
14521449
the image expressed in terms of the coordinates of the considered
1453-
point; if the dimension of the arrival manifold is 1, a single
1450+
point; if the dimension of the codomain is 1, a single
14541451
expression is expected (not a list with a single element)
14551452
14561453
.. WARNING::
@@ -1728,6 +1725,36 @@ def __invert__(self):
17281725
sage: ~rot is rot.inverse()
17291726
True
17301727
1728+
An example with multiple charts: the equatorial symmetry on the
1729+
2-sphere::
1730+
1731+
sage: M = TopManifold(2, 'M') # the 2-dimensional sphere S^2
1732+
sage: U = M.open_subset('U') # complement of the North pole
1733+
sage: c_xy.<x,y> = U.chart() # stereographic coordinates from the North pole
1734+
sage: V = M.open_subset('V') # complement of the South pole
1735+
sage: c_uv.<u,v> = V.chart() # stereographic coordinates from the South pole
1736+
sage: M.declare_union(U,V) # S^2 is the union of U and V
1737+
sage: xy_to_uv = c_xy.transition_map(c_uv, (x/(x^2+y^2), y/(x^2+y^2)), \
1738+
intersection_name='W', restrictions1= x^2+y^2!=0, \
1739+
restrictions2= u^2+v^2!=0)
1740+
sage: uv_to_xy = xy_to_uv.inverse()
1741+
sage: s = M.homeomorphism(M, {(c_xy, c_uv): [x, y], (c_uv, c_xy): [u, v]}, name='s')
1742+
sage: s.display()
1743+
s: M --> M
1744+
on U: (x, y) |--> (u, v) = (x, y)
1745+
on V: (u, v) |--> (x, y) = (u, v)
1746+
sage: si = s.inverse(); si
1747+
Homeomorphism s^(-1) of the 2-dimensional topological manifold M
1748+
sage: si.display()
1749+
s^(-1): M --> M
1750+
on U: (x, y) |--> (u, v) = (x, y)
1751+
on V: (u, v) |--> (x, y) = (u, v)
1752+
1753+
The equatorial symmetry is of course an involution::
1754+
1755+
sage: si == s
1756+
True
1757+
17311758
"""
17321759
from sage.symbolic.ring import SR
17331760
from sage.symbolic.relation import solve

src/sage/manifolds/manifold.py

+16-14
Original file line numberDiff line numberDiff line change
@@ -1231,25 +1231,26 @@ def open_subset(self, name, latex_name=None, coord_def={}):
12311231

12321232
def chart(self, coordinates='', names=None):
12331233
r"""
1234-
Define a chart the domain of which is the manifold.
1234+
Define a chart, the domain of which is the manifold.
12351235
12361236
A *chart* is a pair `(U,\varphi)`, where `U` is the current manifold
12371237
and `\varphi: U \rightarrow V \subset K^n`
12381238
is a homeomorphism from `U` to an open subset `V` of `K^n`, `K` being
1239-
the field on which the manifold containing the open set is defined.
1239+
the field on which the manifold is defined.
12401240
12411241
The components `(x^1,\ldots,x^n)` of `\varphi`, defined by
1242-
`\varphi(p) = (x^1(p),\ldots,x^n(p))`, are called the *coordinates*
1243-
of the chart `(U,\varphi)`.
1242+
`\varphi(p) = (x^1(p),\ldots,x^n(p))\in K^n` for any point `p\in U`,
1243+
are called the *coordinates* of the chart `(U,\varphi)`.
12441244
12451245
See :class:`~sage.manifolds.chart.Chart` for a complete
12461246
documentation.
12471247
12481248
INPUT:
12491249
1250-
- ``coordinates`` -- single string defining the coordinate symbols and
1251-
ranges: the coordinates are separated by ' ' (space) and each
1252-
coordinate has at most three fields, separated by ':':
1250+
- ``coordinates`` -- (default: '' (empty string)) single string
1251+
defining the coordinate symbols and ranges: the coordinates are
1252+
separated by ' ' (space) and each coordinate has at most three fields,
1253+
separated by ':':
12531254
12541255
1. The coordinate symbol (a letter or a few letters)
12551256
2. (optional, only for manifolds over `\RR`) The interval `I`
@@ -1261,8 +1262,8 @@ def chart(self, coordinates='', names=None):
12611262
(a,b] (or equivalently ]a,b]) are allowed.
12621263
Note that the interval declaration must not contain any space
12631264
character.
1264-
3. (optional) The LaTeX spelling of the coordinate; if not provided the
1265-
coordinate symbol given in the first field will be used.
1265+
3. (optional) The LaTeX spelling of the coordinate; if not provided
1266+
the coordinate symbol given in the first field will be used.
12661267
12671268
The order of the fields 2 and 3 does not matter and each of them can
12681269
be omitted.
@@ -1271,11 +1272,12 @@ def chart(self, coordinates='', names=None):
12711272
treatment of the backslash character (see examples below).
12721273
If no interval range and no LaTeX spelling is to be provided for any
12731274
coordinate, the argument ``coordinates`` can be omitted when the
1274-
shortcut operator <,> is used via Sage preparser (see examples below)
1275+
shortcut operator ``<,>`` is used via Sage preparser (see examples
1276+
below)
12751277
- ``names`` -- (default: ``None``) unused argument, except if
12761278
``coordinates`` is not provided; it must then be a tuple containing
1277-
the coordinate symbols (this is guaranted if the shortcut operator <,>
1278-
is used).
1279+
the coordinate symbols (this is guaranted if the shortcut operator
1280+
``<,>`` is used).
12791281
12801282
OUTPUT:
12811283
@@ -1383,8 +1385,8 @@ def scalar_field(self, coord_expression=None, chart=None, name=None,
13831385
r"""
13841386
Define a scalar field on the manifold.
13851387
1386-
See :class:`~sage.manifolds.scalarfield.ScalarField` for a
1387-
complete documentation.
1388+
See :class:`~sage.manifolds.scalarfield.ScalarField` for a complete
1389+
documentation.
13881390
13891391
INPUT:
13901392

0 commit comments

Comments
 (0)