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

Commit

Permalink
Docstring work
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthias Koeppe committed Apr 17, 2021
1 parent 3e273bb commit 9726d36
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 18 deletions.
6 changes: 3 additions & 3 deletions src/sage/manifolds/continuous_map.py
Original file line number Diff line number Diff line change
Expand Up @@ -827,9 +827,9 @@ def image(self, subset=None, inverse=None):
sage: CM.<x,y> = M.chart()
sage: CN.<u> = N.chart()
sage: CN.add_restrictions([u > -1, u < 1])
sage: phi = N.continuous_map(M, {(CN,CM): [u, u^2]}, name='phi')
sage: phi.image()
Image of the Continuous map phi
sage: Phi = N.continuous_map(M, {(CN,CM): [u, u^2]}, name='Phi')
sage: Phi.image()
Image of the Continuous map Phi
from the 1-dimensional topological submanifold N
immersed in the 2-dimensional topological manifold M
to the 2-dimensional topological manifold M
Expand Down
52 changes: 37 additions & 15 deletions src/sage/manifolds/continuous_map_image.py
Original file line number Diff line number Diff line change
@@ -1,20 +1,42 @@
r"""
Images of Continuous Maps as Manifold Subsets
:class:`ImageManifoldSubset` implements the image of a continuous map `\Phi`
from a manifold `M` to some manifold `N` as a subset `\Phi(M)` of `N`.
"""

# ****************************************************************************
# Copyright (C) 2021 Matthias Koeppe <mkoeppe@math.ucdavis.edu>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 2 of the License, or
# (at your option) any later version.
# https://www.gnu.org/licenses/
# ****************************************************************************

from sage.manifolds.subset import ManifoldSubset

class ImageManifoldSubset(ManifoldSubset):
r"""
Subset of a topological manifold that is the image of a continuous map.
INPUT:
- ``map`` -- continuous map `\Phi`
- ``inverse`` -- (default: ``None``) continuous map from
``map.codomain()`` to ``map.domain()``, which once restricted to the image
of `\Phi` is the inverse of `\Phi` onto its image if the latter
exists (NB: no check of this is performed)
"""

def __init__(self, map, inverse=None, name=None, latex_name=None):
"""
INPUT:
r"""
Construct a manifold subset that is the image of a continuous map.
- ``map`` -- continuous map `\phi`
- ``inverse`` -- (default: ``None``) continuous map from
``map.codomain()`` to ``map.domain()``, which once restricted to the image
of `\phi` is the inverse of `\phi` onto its image if the latter
exists (NB: no check of this is performed)
TESTS::
"""
self._map = map
Expand Down Expand Up @@ -51,9 +73,9 @@ def _an_element_(self):
sage: CM.<x,y> = M.chart()
sage: CN.<u> = N.chart()
sage: CN.add_restrictions([u > -1, u < 1])
sage: phi = N.continuous_map(M, {(CN,CM): [u, 1 + u^2]}, name='phi')
sage: phi_N = phi.image()
sage: p = phi_N.an_element(); p # indirect doctest
sage: Phi = N.continuous_map(M, {(CN,CM): [u, 1 + u^2]}, name='Phi')
sage: Phi_N = Phi.image()
sage: p = Phi_N.an_element(); p # indirect doctest
Point on the 2-dimensional topological manifold M
sage: p.coordinates()
(0, 1)
Expand All @@ -71,12 +93,12 @@ def __contains__(self, point):
sage: CM.<x,y> = M.chart()
sage: CN.<u> = N.chart()
sage: CN.add_restrictions([u > -1, u < 1])
sage: phi = N.continuous_map(M, {(CN,CM): [u, 1 + u^2]}, name='phi')
sage: phi_inv = M.continuous_map(N, {(CM, CN): [x]}, name='phi_inv')
sage: phi_N = phi.image(inverse=phi_inv)
sage: M((0, 0)) in phi_N
sage: Phi = N.continuous_map(M, {(CN,CM): [u, 1 + u^2]}, name='Phi')
sage: Phi_inv = M.continuous_map(N, {(CM, CN): [x]}, name='Phi_inv')
sage: Phi_N = Phi.image(inverse=Phi_inv)
sage: M((0, 0)) in Phi_N
False
sage: M((0, 1)) in phi_N
sage: M((0, 1)) in Phi_N
True
"""
Expand Down

0 comments on commit 9726d36

Please sign in to comment.