Opened 6 months ago

Closed 5 months ago

#31653 closed enhancement (fixed)

Images of continuous maps and embedded submanifolds as manifold subsets

Reported by: mkoeppe Owned by:
Priority: major Milestone: sage-9.4
Component: manifolds Keywords:
Cc: egourgoulhon, tscrim, yzh, gh-mjungmath, gh-mwageringel, roed 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:

Status badges

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:1 Changed 6 months ago by mkoeppe

There are a number of related existing methods in various components of Sage. FreeModuleMorphism.pushforward can compute the image of a submodule, and RingHomomorphism.pushforward can compute the image of an ideal.

Last edited 6 months ago by mkoeppe (previous) (diff)

comment:2 Changed 6 months ago by mkoeppe

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 6 months ago by egourgoulhon

Thanks for opening this ticket; I've added it to the metaticket #30525.

comment:4 Changed 6 months ago by mkoeppe

  • Cc gh-mwageringel roed added

Likewise, there is some diversity regarding inverse_image and preimage methods.

comment:5 Changed 6 months ago by mkoeppe

  • Branch set to u/mkoeppe/images_of_continuous_maps_and_embedded_submanifolds_as_manifold_subsets

comment:6 Changed 6 months ago by git

  • Commit set to d757adb0db47f9b9a39c3da5e1ab68d6dbe68606

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

d757adbImageManifoldSubset.__contains__: New

comment:7 Changed 6 months ago by git

  • Commit changed from d757adb0db47f9b9a39c3da5e1ab68d6dbe68606 to 4b59194b4af33de5566a14cf5d6c57b6c418a1ee

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

4b59194ImageManifoldSubset._an_element_: New

comment:8 Changed 6 months ago by mkoeppe

  • Authors set to Matthias Koeppe, ...

comment:9 Changed 6 months ago by git

  • Commit changed from 4b59194b4af33de5566a14cf5d6c57b6c418a1ee to 18c1bd97aee0bd5b690f8452551ef583bcfc3dc3

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

18c1bd9ImageManifoldSubset, ContinuousMap.image: Add optional 'inverse' argument, use it in __contains__

comment:10 Changed 6 months ago by git

  • Commit changed from 18c1bd97aee0bd5b690f8452551ef583bcfc3dc3 to 645aa2fd83b31b4bb8a32f05030b3f06db4a4c24

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

645aa2fsrc/sage/manifolds/continuous_map_image.py: Update doctests

comment:11 Changed 6 months ago by git

  • Commit changed from 645aa2fd83b31b4bb8a32f05030b3f06db4a4c24 to 5170c15dae7e82877a5fcecf4516f5df2192a96a

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

5170c15TopologicalSubmanifold.as_subset: New

comment:12 follow-up: Changed 6 months ago by mkoeppe

Early stage. Comments on this design are very welcome

comment:13 follow-up: Changed 6 months ago by gh-mjungmath

Yes, I have two comments:

  • I advocate f-strings:
-        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 follow-up: Changed 6 months ago by 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

comment:15 in reply to: ↑ 13 Changed 6 months ago by mkoeppe

Replying to gh-mjungmath:

  • I advocate f-strings:

Yes, I like them too. Unfortunate clash of these braces with LaTeX notation though

comment:16 in reply to: ↑ 14 ; follow-up: Changed 6 months ago by gh-mjungmath

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 in reply to: ↑ 16 Changed 6 months ago by egourgoulhon

Replying to gh-mjungmath:

The rest looks pretty nice already. :)

Yes, it looks nice!

comment:18 in reply to: ↑ 12 Changed 6 months ago by egourgoulhon

Replying to mkoeppe:

Early stage. Comments on this design are very welcome

I like it.

comment:19 Changed 6 months ago by git

  • Commit changed from 5170c15dae7e82877a5fcecf4516f5df2192a96a to 9726d367d46d3abb54955db47e5f82993d12efa6

Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:

cd8d6afsage.manifolds.continuous_map_image, ContinuousMap.image: New
ae0b7f9ImageManifoldSubset.__contains__: New
0135892ImageManifoldSubset._an_element_: New
459758eImageManifoldSubset, ContinuousMap.image: Add optional 'inverse' argument, use it in __contains__
26c7e56src/sage/manifolds/continuous_map_image.py: Update doctests
3e273bbTopologicalSubmanifold.as_subset: New
9726d36Docstring work

comment:20 follow-up: Changed 6 months ago by mkoeppe

I am considering possible extensions of the current code:

  • handle a domain subset directly in ImageManifoldSubset - which would allow us to extend ContinuousMap.image to take a subset 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 classes ImageTopologicalManifold, ImageDifferentiableManifold, which remember the map, or just compute the result? (in either case - follow-up ticket)
Last edited 6 months ago by mkoeppe (previous) (diff)

comment:21 Changed 6 months ago by git

  • Commit changed from 9726d367d46d3abb54955db47e5f82993d12efa6 to 19762ae034f7b740f2aa31c2fc79685095a39cec

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

19762aeImageManifoldSubset: New parameter domain_subset, use it in ContinuousMap.image

comment:22 Changed 6 months ago by mkoeppe

  • Authors changed from Matthias Koeppe, ... to Matthias Koeppe
  • Status changed from new to needs_review

comment:23 Changed 6 months ago by git

  • Commit changed from 19762ae034f7b740f2aa31c2fc79685095a39cec to 964f9f7d18b2a7e052ad3e537557b861fbcb3106

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

964f9f7src/sage/manifolds/continuous_map.py: Update copyright

comment:24 Changed 6 months ago by egourgoulhon

Some TESTS:: fields are actually empty.

comment:25 in reply to: ↑ 20 ; follow-up: Changed 6 months ago by egourgoulhon

Replying to mkoeppe:

I am considering possible extensions of the current code:

  • handle a domain subset directly in ImageManifoldSubset - which would allow us to extend ContinuousMap.image to take a subset 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 classes ImageTopologicalManifold, ImageDifferentiableManifold, which remember the map, or just compute the result? (in either case - follow-up ticket)

Maybe just compute the result?

comment:26 in reply to: ↑ 25 Changed 6 months ago by mkoeppe

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 classes ImageTopologicalManifold, ImageDifferentiableManifold, which remember the map, or just compute the result? (in either case - follow-up ticket)

Maybe just compute the result?

OK, I have opened #31685 for this.

comment:27 Changed 6 months ago by git

  • Commit changed from 964f9f7d18b2a7e052ad3e537557b861fbcb3106 to e711215d154223b34f17f758b94407545843fe55

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

e711215src/sage/manifolds/continuous_map_image.py: Add tests

comment:28 Changed 6 months ago by mkoeppe

Ready for review

comment:29 Changed 6 months ago by egourgoulhon

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 6 months ago by git

  • Commit changed from e711215d154223b34f17f758b94407545843fe55 to 0f3e36d35b688a92028d09fd9edef3cf5ddae590

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

0f3e36dLink in documentation of sage.manifolds.continuous_map_image

comment:31 Changed 6 months ago by egourgoulhon

  • Reviewers set to Eric Gourgoulhon, Michael Jung
  • Status changed from needs_review to positive_review

Thanks!

comment:32 Changed 6 months ago by mkoeppe

Thanks for reviewing!

comment:33 Changed 5 months ago by vbraun

  • Branch changed from u/mkoeppe/images_of_continuous_maps_and_embedded_submanifolds_as_manifold_subsets to 0f3e36d35b688a92028d09fd9edef3cf5ddae590
  • Resolution set to fixed
  • Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.