sagemath / sage

Main repository of SageMath
https://www.sagemath.org
Other
1.47k stars 487 forks source link

Pullbacks (preimages) of manifold subsets under continuous maps #31688

Closed mkoeppe closed 3 years ago

mkoeppe commented 3 years ago

Similar to #31653, given a continuous map \Phi: N -> M and a manifold subset S of M, we define the pullback (preimage) of S as the subset of N of points p with \Phi(p) in S.

Given a real scalar field Phi: N -> R and a RealSet S, we define the pullback in the same way.

Also, we view a chart C as a continuous function Phi: C.domain() -> R^n and allow pulling back any subset of R^n (an object with a __contains__ method; for example polyhedra, lattices, linear subspaces, tensor modules) by it as well.

In all cases, because Phi is continuous, topological closures/interiors pull back.

An application is in #31981.

Depends on #31883 Depends on #31904 Depends on #31653 Depends on #31916 Depends on #31644 Depends on #31959 Depends on #31990 Depends on #21243

CC: @egourgoulhon @tscrim @mjungmath

Component: manifolds

Author: Matthias Koeppe

Branch/Commit: 4558e26

Reviewer: Eric Gourgoulhon

Issue created by migration from https://trac.sagemath.org/ticket/31688

egourgoulhon commented 3 years ago
comment:67

A minor point: to generate correctly the documentation, the following change shall be made in the docstring of ManifoldSubsetPullback:

-    - ``map`` - an instance of :class:`ContinuousMap`,
+    - ``map`` - an instance of :class:`~sage.manifolds.continuous_map.ContinuousMap`,
       :class:`ScalarField`, or :class:`Chart`

For :class:`ScalarField` and :class:`Chart`, this is not necessary because these classes are imported in pullback.py.

egourgoulhon commented 3 years ago
comment:68

This example in the doctstring of ManifoldSubsetPullback.is_closed is dubious:


        The pullback of finite sets is closed::

            sage: F = Family([vector(QQ, [1, 2], immutable=True), vector(QQ, [2, 3], immutable=True)])
            sage: McF = ManifoldSubsetPullback(c_cart, F, name='McF'); McF
            Subset McF of the 2-dimensional topological manifold R^2
            sage: McF.is_closed()
            False
7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 3 years ago

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

07aba9eManifoldSubsetPullback.is_closed: Preimage of finite sets is closed
653c651src/sage/manifolds/subsets/pullback.py: Fix docstring markup
7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 3 years ago

Changed commit from d321b93 to 653c651

mkoeppe commented 3 years ago
comment:70

Replying to @egourgoulhon:

This example in the doctstring of ManifoldSubsetPullback.is_closed is dubious:

Indeed. Looks like I had forgotten to actually implement this case. Done now

egourgoulhon commented 3 years ago
comment:71

Thanks for the update. As soon as the patchbot visits the ticket and is green, the ticket can be set to positive review.

egourgoulhon commented 3 years ago
comment:72

OK, since the changes since the last time the patchbot visited the ticket are quite minor, let us move on without waiting for another visit.

Thank you for the new features introduced here!

mkoeppe commented 3 years ago
comment:73

Thanks for the review!

egourgoulhon commented 3 years ago
comment:74

Replying to @egourgoulhon:

OK, since the changes since the last time the patchbot visited the ticket are quite minor, let us move on without waiting for another visit.

It seems that we don't have any patchbot at the moment: https://patchbot.sagemath.org/ticket/0/

7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 3 years ago

Branch pushed to git repo; I updated commit sha1 and set ticket back to needs_review. New commits:

4b930ffMerge tag '9.4.beta4' into t/31688/pullbacks_of_manifold_subsets_under_continuous_maps
7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 3 years ago

Changed commit from 653c651 to 4b930ff

vbraun commented 3 years ago
comment:77
sage -t --long --warn-long 41.5 --random-seed=0 src/sage/geometry/polyhedron/base.py
**********************************************************************
File "src/sage/geometry/polyhedron/base.py", line 2975, in sage.geometry.polyhedron.base.Polyhedron_base.incidence_matrix
Failed example:
    M == P.incidence_matrix()
Expected:
    False
Got:
    True
**********************************************************************
1 item had failures:
   1 of  31 in sage.geometry.polyhedron.base.Polyhedron_base.incidence_matrix
    [1737 tests, 1 failure, 35.30 s]
----------------------------------------------------------------------
sage -t --long --warn-long 41.5 --random-seed=0 src/sage/geometry/polyhedron/base.py  # 1 doctest failed
----------------------------------------------------------------------
7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 3 years ago

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

4558e26Polyhedron_base.incidence_matrix: Remove accidental change to doctest
7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 3 years ago

Changed commit from 4b930ff to 4558e26

vbraun commented 3 years ago

Changed branch from u/mkoeppe/pullbacks_of_manifold_subsets_under_continuous_maps to 4558e26