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

Commit

Permalink
src/sage/manifolds/continuous_map_image.py: Add tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthias Koeppe committed Apr 18, 2021
1 parent 964f9f7 commit e711215
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions src/sage/manifolds/continuous_map_image.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,15 @@ def __init__(self, map, inverse=None, name=None, latex_name=None, domain_subset=
TESTS::
sage: M = Manifold(2, 'M', structure="topological")
sage: N = Manifold(1, 'N', ambient=M, structure="topological")
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: TestSuite(Phi_N).run()
"""
self._map = map
self._inverse = inverse
Expand All @@ -69,6 +78,27 @@ def _repr_(self):
TESTS::
sage: M = Manifold(2, 'M', structure="topological")
sage: N = Manifold(1, 'N', ambient=M, structure="topological")
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.image() # indirect doctest
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
sage: S = N.subset('S')
sage: Phi.image(S) # indirect doctest
Image of the
Subset S of the
1-dimensional topological submanifold N immersed in the
2-dimensional topological manifold M
under 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
"""
if self._domain_subset is self._map.domain():
return f"Image of the {self._map}"
Expand Down

0 comments on commit e711215

Please sign in to comment.