summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric Gourgoulhon <eric.gourgoulhon@obspm.fr>2015-12-18 13:50:41 +0100
committerEric Gourgoulhon <eric.gourgoulhon@obspm.fr>2015-12-18 13:50:41 +0100
commitc38ae80cbd8032cf7041259284b6f646265d1e42 (patch)
treef0662643448b90bf5675ef5e703e9170a3241215
parentAdd argument full_name to AbstractNamedObject; remove _repr_() from all paren... (diff)
Suppress the (unused) argument category in OpenTopologicalSubmanifold; minor doc improvements
-rw-r--r--src/sage/manifolds/abstract.py2
-rw-r--r--src/sage/manifolds/manifold.py15
-rw-r--r--src/sage/manifolds/point.py3
-rw-r--r--src/sage/manifolds/structure.py2
-rw-r--r--src/sage/manifolds/subset.py12
5 files changed, 21 insertions, 13 deletions
diff --git a/src/sage/manifolds/abstract.py b/src/sage/manifolds/abstract.py
index d7d6c0c..7bab86e 100644
--- a/src/sage/manifolds/abstract.py
+++ b/src/sage/manifolds/abstract.py
@@ -29,7 +29,7 @@ from sage.rings.integer import Integer
from sage.manifolds.point import ManifoldPoint
class AbstractNamedObject(object):
- """
+ r"""
An abstract named object.
This abstract class handles the outputs (text and LaTeX) of named objects
diff --git a/src/sage/manifolds/manifold.py b/src/sage/manifolds/manifold.py
index ea5a699..3c377c5 100644
--- a/src/sage/manifolds/manifold.py
+++ b/src/sage/manifolds/manifold.py
@@ -20,7 +20,8 @@ means of charts (see :class:`~sage.manifolds.chart.Chart`).
:class:`TopologicalManifold` serves as a base class for more specific
manifold classes.
-The user interface is provided by the generic function :func:`Manifold`,
+The user interface is provided by the generic function
+:func:`~sage.manifolds.manifold.Manifold`, with
with the argument ``structure`` set to ``'topological'``.
.. RUBRIC:: Example 1: the 2-sphere as a topological manifold of dimension
@@ -330,7 +331,9 @@ class TopologicalManifold(AbstractSet):
:class:`~sage.categories.topological_spaces.TopologicalSpaces`)
for other types of manifolds
- - ``structure`` -- manifold structure
+ - ``structure`` -- manifold structure (see
+ :class:`~sage.manifolds.structure.TopologicalStructure` or
+ :class:`~sage.manifolds.structure.RealTopologicalStructure`)
- ``latex_name`` -- (default: ``None``) string; LaTeX symbol to
denote the manifold; if none is provided, it is set to ``name``
- ``full_name`` -- (default: ``None``) string; short description of the
@@ -768,10 +771,8 @@ class TopologicalManifold(AbstractSet):
"""
from sage.manifolds.subset import OpenTopologicalSubmanifold
- resu = OpenTopologicalSubmanifold(ambient=self.manifold(),
- name=name, latex_name=latex_name,
- category=self.category())
-
+ resu = OpenTopologicalSubmanifold(self.manifold(), name,
+ latex_name=latex_name)
resu._supersets.update(self._supersets)
for sd in self._supersets:
sd._subsets.add(resu)
@@ -1685,7 +1686,7 @@ def Manifold(dim, name, latex_name=None, field='real', structure='smooth',
raise ValueError("the manifold dimension must be strictly positive")
if structure in ['topological', 'top']:
- if field == 'real':
+ if field == 'real' or isinstance(field, RealField_class):
structure = RealTopologicalStructure()
else:
structure = TopologicalStructure()
diff --git a/src/sage/manifolds/point.py b/src/sage/manifolds/point.py
index fac91f1..2f35145 100644
--- a/src/sage/manifolds/point.py
+++ b/src/sage/manifolds/point.py
@@ -159,6 +159,7 @@ class ManifoldPoint(Element):
"""
Element.__init__(self, parent)
+ self._manifold = parent.manifold() # a useful shortcut
self._coordinates = {} # dictionary of the point coordinates in various
# charts, with the charts as keys
if coords is not None:
@@ -209,7 +210,7 @@ class ManifoldPoint(Element):
description = "Point"
if self._name is not None:
description += " " + self._name
- description += " on the {}".format(self.parent().manifold())
+ description += " on the {}".format(self._manifold)
return description
def _latex_(self):
diff --git a/src/sage/manifolds/structure.py b/src/sage/manifolds/structure.py
index 89120b4..67f0814 100644
--- a/src/sage/manifolds/structure.py
+++ b/src/sage/manifolds/structure.py
@@ -26,7 +26,7 @@ from sage.manifolds.chart import Chart, RealChart
# need to have different copies of this object.
class TopologicalStructure(Singleton):
"""
- The structure of a topological manifold over a general field.
+ The structure of a topological manifold over a general topological field.
"""
chart = Chart
name = "topological"
diff --git a/src/sage/manifolds/subset.py b/src/sage/manifolds/subset.py
index a165425..e3e72a4 100644
--- a/src/sage/manifolds/subset.py
+++ b/src/sage/manifolds/subset.py
@@ -483,6 +483,13 @@ class OpenTopologicalSubmanifold(ManifoldSubset, TopologicalManifold):
An open submanifold of a topological manifold, which is any open subset
of the manifold.
+ INPUT:
+
+ - ``ambient`` -- topological manifold on which the subset is defined
+ - ``name`` -- string; name (symbol) given to the subset
+ - ``latex_name`` -- (default: ``None``) string; LaTeX symbol to denote the
+ subset; if none is provided, it is set to ``name``
+
EXAMPLE:
The unit ball of the Euclidean 2-plane::
@@ -541,7 +548,7 @@ class OpenTopologicalSubmanifold(ManifoldSubset, TopologicalManifold):
True
"""
- def __init__(self, ambient, name, latex_name=None, category=None):
+ def __init__(self, ambient, name, latex_name=None):
"""
Initialize ``self``.
@@ -585,8 +592,7 @@ class OpenTopologicalSubmanifold(ManifoldSubset, TopologicalManifold):
ambient._structure, latex_name=latex_name,
full_name=full_name,
start_index=ambient._sindex,
- category=category,
- unique_tag=ambient)
+ category=category)
def superset(self, name, latex_name=None, is_open=False):
r"""