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

Commit

Permalink
ManifoldSubsetClosure: Add examples, fix docstring markup
Browse files Browse the repository at this point in the history
  • Loading branch information
mkoeppe committed Jun 2, 2021
1 parent 60505b0 commit b9909c0
Showing 1 changed file with 20 additions and 3 deletions.
23 changes: 20 additions & 3 deletions src/sage/manifolds/subsets/closure.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,17 +20,34 @@

class ManifoldSubsetClosure(ManifoldSubset):

"""
r"""
Topological closure of a manifold subset in the topology of the manifold.
INPUT:
- ``subset`` -- a :class:`ManifoldSubset`
- ``name`` -- (default: computed from the name of the subset)
string; name (symbol) given to the closure
string; name (symbol) given to the closure
- ``latex_name`` -- (default: ``None``) string; LaTeX symbol to
denote the subset; if none is provided, it is set to ``name``
EXAMPLES::
sage: from sage.manifolds.subsets.closure import ManifoldSubsetClosure
sage: M = Manifold(2, 'R^2', structure='topological')
sage: c_cart.<x,y> = M.chart() # Cartesian coordinates on R^2
sage: D = M.open_subset('D', coord_def={c_cart: x^2+y^2<1}); D
Open subset D of the 2-dimensional topological manifold R^2
sage: cl_D = ManifoldSubsetClosure(D)
The closure of the subset `D` is a subset of every closed superset
of `D`::
sage: S = D.superset('S')
sage: S.declare_closed()
sage: cl_D.is_subset(S)
True
"""

def __init__(self, subset, name=None, latex_name=None):
Expand Down Expand Up @@ -87,7 +104,7 @@ def _repr_(self):
return "Topological closure {} of the {}".format(self._name, self._subset)

def is_closed(self):
"""
r"""
Return if ``self`` is a closed set.
This implementation of the method always returns ``True``.
Expand Down

0 comments on commit b9909c0

Please sign in to comment.