Opened 20 months ago
Closed 18 months ago
#31653 closed enhancement (fixed)
Images of continuous maps and embedded submanifolds as manifold subsets
Reported by:  Matthias Köppe  Owned by:  

Priority:  major  Milestone:  sage9.4 
Component:  manifolds  Keywords:  
Cc:  Eric Gourgoulhon, Travis Scrimshaw, Yuan Zhou, Michael Jung, Markus Wageringel, David Roe  Merged in:  
Authors:  Matthias Koeppe  Reviewers:  Eric Gourgoulhon, Michael Jung 
Report Upstream:  N/A  Work issues:  
Branch:  0f3e36d (Commits, GitHub, GitLab)  Commit:  0f3e36d35b688a92028d09fd9edef3cf5ddae590 
Dependencies:  Stopgaps: 
Description
We define a subclass of ManifoldSubset
, instances of which represent the image of a continuous map.
In particular, this will allow an embedded submanifold to be considered as a subset of the ambient manifold.
Change History (33)
comment:2 Changed 20 months ago by
Also there are various image
methods of various morphism classes, not all with the same signature:
 without extra argument: category
FiniteDimensionalModulesWithBasis
parent method,CrystalMorphismByGenerators
,SimplicialComplexMorphism
,Matrix
,MatrixMorphism_...
,SchemeMorphism_...
 with an extra argument (substructure to compute the image of):
AbelianGroupMorphism
,PermutationGroupMorphism
,SimplicialSetMorphism
,  incompatible:
WordMorphism.image
comment:3 Changed 20 months ago by
Thanks for opening this ticket; I've added it to the metaticket #30525.
comment:4 Changed 20 months ago by
Cc:  Markus Wageringel David Roe added 

Likewise, there is some diversity regarding inverse_image
and preimage
methods.
comment:5 Changed 20 months ago by
Branch:  → u/mkoeppe/images_of_continuous_maps_and_embedded_submanifolds_as_manifold_subsets 

comment:6 Changed 20 months ago by
Commit:  → d757adb0db47f9b9a39c3da5e1ab68d6dbe68606 

Branch pushed to git repo; I updated commit sha1. New commits:
d757adb  ImageManifoldSubset.__contains__: New

comment:7 Changed 20 months ago by
Commit:  d757adb0db47f9b9a39c3da5e1ab68d6dbe68606 → 4b59194b4af33de5566a14cf5d6c57b6c418a1ee 

Branch pushed to git repo; I updated commit sha1. New commits:
4b59194  ImageManifoldSubset._an_element_: New

comment:8 Changed 20 months ago by
Authors:  → Matthias Koeppe, ... 

comment:9 Changed 20 months ago by
Commit:  4b59194b4af33de5566a14cf5d6c57b6c418a1ee → 18c1bd97aee0bd5b690f8452551ef583bcfc3dc3 

Branch pushed to git repo; I updated commit sha1. New commits:
18c1bd9  ImageManifoldSubset, ContinuousMap.image: Add optional 'inverse' argument, use it in __contains__

comment:10 Changed 20 months ago by
Commit:  18c1bd97aee0bd5b690f8452551ef583bcfc3dc3 → 645aa2fd83b31b4bb8a32f05030b3f06db4a4c24 

Branch pushed to git repo; I updated commit sha1. New commits:
645aa2f  src/sage/manifolds/continuous_map_image.py: Update doctests

comment:11 Changed 20 months ago by
Commit:  645aa2fd83b31b4bb8a32f05030b3f06db4a4c24 → 5170c15dae7e82877a5fcecf4516f5df2192a96a 

Branch pushed to git repo; I updated commit sha1. New commits:
5170c15  TopologicalSubmanifold.as_subset: New

comment:12 followup: 18 Changed 20 months ago by
Early stage. Comments on this design are very welcome
comment:13 followup: 15 Changed 20 months ago by
Yes, I have two comments:
 I advocate fstrings:
 return "Image of the {}".format(self._map) + return f"Image of the {self._map}"
More readable and even (slightly) faster.
 I don't quite get the purpose of
return self._map(preimage) == point
Isn't that always true if
preimage in self._map.domain()
is already met (and the inverse is correctly defined)?
comment:14 followup: 16 Changed 20 months ago by
This notion of inverse is taken from TopologicalSubmanifold
. This inverse maps the whole ambient space to the domain of the map  so one needs to check
comment:15 Changed 20 months ago by
Replying to ghmjungmath:
 I advocate fstrings:
Yes, I like them too. Unfortunate clash of these braces with LaTeX notation though
comment:16 followup: 17 Changed 20 months ago by
Replying to mkoeppe:
This notion of inverse is taken from
TopologicalSubmanifold
. This inverse maps the whole ambient space to the domain of the map  so one needs to check
Alright, I see it now. It's just a very unusual definition of inverse...
The rest looks pretty nice already. :)
comment:17 Changed 20 months ago by
comment:18 Changed 20 months ago by
comment:19 Changed 20 months ago by
Commit:  5170c15dae7e82877a5fcecf4516f5df2192a96a → 9726d367d46d3abb54955db47e5f82993d12efa6 

Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:
cd8d6af  sage.manifolds.continuous_map_image, ContinuousMap.image: New

ae0b7f9  ImageManifoldSubset.__contains__: New

0135892  ImageManifoldSubset._an_element_: New

459758e  ImageManifoldSubset, ContinuousMap.image: Add optional 'inverse' argument, use it in __contains__

26c7e56  src/sage/manifolds/continuous_map_image.py: Update doctests

3e273bb  TopologicalSubmanifold.as_subset: New

9726d36  Docstring work

comment:20 followup: 25 Changed 20 months ago by
I am considering possible extensions of the current code:
 handle a domain
subset
directly inImageManifoldSubset
 which would allow us to extendContinuousMap.image
to take asubset
that is not open  if the map is an isomorphism (and the domain
subset
open), we could create a submanifold  but should this use extra classesImageTopologicalManifold
,ImageDifferentiableManifold
, which remember the map, or just compute the result? (in either case  followup ticket)
comment:21 Changed 20 months ago by
Commit:  9726d367d46d3abb54955db47e5f82993d12efa6 → 19762ae034f7b740f2aa31c2fc79685095a39cec 

Branch pushed to git repo; I updated commit sha1. New commits:
19762ae  ImageManifoldSubset: New parameter domain_subset, use it in ContinuousMap.image

comment:22 Changed 20 months ago by
Authors:  Matthias Koeppe, ... → Matthias Koeppe 

Status:  new → needs_review 
comment:23 Changed 20 months ago by
Commit:  19762ae034f7b740f2aa31c2fc79685095a39cec → 964f9f7d18b2a7e052ad3e537557b861fbcb3106 

Branch pushed to git repo; I updated commit sha1. New commits:
964f9f7  src/sage/manifolds/continuous_map.py: Update copyright

comment:25 followup: 26 Changed 20 months ago by
Replying to mkoeppe:
I am considering possible extensions of the current code:
 handle a domain
subset
directly inImageManifoldSubset
 which would allow us to extendContinuousMap.image
to take asubset
that is not open
Sounds legitimate.
 if the map is an isomorphism (and the domain
subset
open), we could create a submanifold  but should this use extra classesImageTopologicalManifold
,ImageDifferentiableManifold
, which remember the map, or just compute the result? (in either case  followup ticket)
Maybe just compute the result?
comment:26 Changed 20 months ago by
Replying to egourgoulhon:
Replying to mkoeppe:
 if the map is an isomorphism (and the domain
subset
open), we could create a submanifold  but should this use extra classesImageTopologicalManifold
,ImageDifferentiableManifold
, which remember the map, or just compute the result? (in either case  followup ticket)Maybe just compute the result?
OK, I have opened #31685 for this.
comment:27 Changed 20 months ago by
Commit:  964f9f7d18b2a7e052ad3e537557b861fbcb3106 → e711215d154223b34f17f758b94407545843fe55 

Branch pushed to git repo; I updated commit sha1. New commits:
e711215  src/sage/manifolds/continuous_map_image.py: Add tests

comment:29 Changed 20 months ago by
To generate the documentation regarding the new class ImageManifoldSubset
, the following line
sage/manifolds/continuous_map_image
should added at the end of src/doc/en/reference/manifolds/continous_map.rst
. Also, it would be nice to modify the head of src/sage/manifolds/subsets.py
so that it refers to it, e.g. something like:
The class :class:`ManifoldSubset` implements generic subsets of a topological manifold. Open subsets are implemented by the class :class:`~sage.manifolds.manifold.TopologicalManifold` (since an open subset of a manifold is a manifold by itself), which inherits  from :class:`ManifoldSubset`. + from :class:`ManifoldSubset`. Besides, subsets that are images of + a manifold subset under a continuous map are implemented by the + subclass :class:`~sage.manifolds.continuous_map_image.ImageManifoldSubset`.
comment:30 Changed 20 months ago by
Commit:  e711215d154223b34f17f758b94407545843fe55 → 0f3e36d35b688a92028d09fd9edef3cf5ddae590 

Branch pushed to git repo; I updated commit sha1. New commits:
0f3e36d  Link in documentation of sage.manifolds.continuous_map_image

comment:31 Changed 20 months ago by
Reviewers:  → Eric Gourgoulhon, Michael Jung 

Status:  needs_review → positive_review 
Thanks!
comment:33 Changed 18 months ago by
Branch:  u/mkoeppe/images_of_continuous_maps_and_embedded_submanifolds_as_manifold_subsets → 0f3e36d35b688a92028d09fd9edef3cf5ddae590 

Resolution:  → fixed 
Status:  positive_review → closed 
There are a number of related existing methods in various components of Sage.
FreeModuleMorphism.pushforward
can compute the image of a submodule, andRingHomomorphism.pushforward
can compute the image of an ideal.