Closed mkoeppe closed 3 years ago
Changed dependencies from #31883, #31904, #31653, #31916 to #31883, #31904, #31653, #31916, #31959
Branch pushed to git repo; I updated commit sha1. Last 10 new commits:
6bef52b | ConvexSet_base._test_convex_set: Run the testsuite of relint |
6ab5677 | RelativeInterior.is_universe: New |
c085d30 | Polyhedron_base.interior: Handle the empty polyhedron correctly |
686d0af | Polyhedron_base.product: Add doctest for alias 'cartesian_product' |
2b1d108 | Merge #31919 |
7323b10 | ConvexSet_base._test_contains: Only test extension to AA for exact base rings |
e0d2eeb | Merge #31959 |
e6c3ed5 | RelativeInterior.__hash__: New |
4c7d57f | src/sage/geometry/relative_interior.py: Fix doctest output |
9ea0cea | ManifoldSubsetPullback: Do not trip over relative interiors of cones |
As revealed by the patchbot, there are some doctest failures, as well as some coverage and pyflakes issues.
Thanks for taking a look! Yes, I'll have to add more documentation and examples.
Branch pushed to git repo; I updated commit sha1. New commits:
87f3e30 | ManifoldSubsetPullback: Add documentation and tests |
Changed dependencies from #31883, #31904, #31653, #31916, #31959 to #31883, #31904, #31653, #31916, #31959, #31990
Branch pushed to git repo; I updated commit sha1. New commits:
7d3ae5c | Merge #31959 |
2b1040c | ConvexSet_base.{an_element,some_elements}, Polyhedron.some_elements, RelativeInterior.some_elements: New |
a884517 | PolyhedronFace.some_elements: New |
f6cc8f7 | Merge #31990 |
1a4805c | ManifoldSubsetPullback: For charts, use .point as the inverse |
754e002 | ManifoldSubsetPullback._an_element_, some_elements: Implement |
Branch pushed to git repo; I updated commit sha1. New commits:
a8e607c | ManifoldSubsetPullback._coord_def: Add documentation and examples |
Branch pushed to git repo; I updated commit sha1. New commits:
f0e7c58 | ambient_vector_space docstring: Fix bad blocks |
200d967 | ConvexSet_base.ambient doctest: Actually test the method |
1c2bef5 | Merge #31959 |
ed898e6 | ConvexSet_base.an_element, some_elements: Go through generator method `_some_elements_`, make some_elements return a list |
7ae21da | Merge #31990 |
Reviewer: Eric Gourgoulhon
Thanks for the last changes. Some comments regarding the documentation:
ManifoldSubsetPullback
in the reference manualcontinuous_map.py
and subsets/pullback.py
, each instance of :class:`ManifoldSubset`
should be replaced by :class:`~sage.manifolds.subset.ManifoldSubset`
ScalarField.pullback
should have an INPUT and OUTPUT sections similar to those of ContinuousMap.preimage
. By the way, to be consistent with ContinuousMap.preimage
, shouldn't ScalarField.pullback
be renamed to ScalarField.preimage
, with pullback
defined as an alias to preimage
?DiffMap.pullback
should be updated to take into account the new arguments.Changed dependencies from #31883, #31904, #31653, #31916, #31959, #31990 to #31883, #31904, #31653, #31916, #31644, #31959, #31990
Branch pushed to git repo; I updated commit sha1. Last 10 new commits:
8d3ad85 | Merge #31764 |
60505b0 | Merge #31798 |
b9909c0 | ManifoldSubsetClosure: Add examples, fix docstring markup |
16c6a72 | ManifoldSubsetClosure, ManifoldSubset.closure: Improve documentation |
2514586 | Merge #31644 |
3ca139a | src/doc/en/reference/manifolds: Add pullback |
1d430ee | src/sage/manifolds/continuous_map.py, src/sage/manifolds/subsets: Use qualified class name in docstrings |
1266de9 | src/sage/geometry/convex_set.py: Fix docstring markup |
df64125 | ScalarField.preimage: Make pullback an alias; expand documentation |
3877c5f | ManifoldSubsetPullback.is_closed: Remove unfinished NNC_Polyhedron example |
Branch pushed to git repo; I updated commit sha1. New commits:
0c549f0 | Chart.pullback, preimage: New |
7bb720e | ManifoldSubsetPullback.__contains__: Handle the case of charts, which return tuples of coordinates, not vectors |
60ea044 | ContinuousMap.preimage, ScalarField.preimage: Document that output can also be a manifold |
Changed dependencies from #31883, #31904, #31653, #31916, #31644, #31959, #31990 to #31883, #31904, #31653, #31916, #31644, #31959, #31990, #21243
Branch pushed to git repo; I updated commit sha1. New commits:
5b8ceca | InternalRealInterval, RealSet: Add `_latex_` methods |
69ca854 | RealSet._repr_: Use unicode cup sign instead of + |
dbdfc06 | InternalRealInterval, RealSet: Remove extra whitespace in latex, add documentation |
a0e3bf5 | Merge #31880 |
181b128 | RealSet.is_open, is_closed, closure, interior, boundary: New |
7f56338 | PiecewiseFunction: Adjust doctests for changed RealSet repr |
8cd74b5 | Merge #31880 |
8fdb104 | RealSet.boundary: Add another doctest |
9d41f0e | src/sage/sets/real_set.py: Remove unnecessary import |
c36e43b | Merge #21243 |
In the docstring of ManifoldSubsetPullback
:
in the INPUT section, there seems to be no entry for ConvexSet_base
in the documentation
in the following part of the EXAMPLES block:
sage: r_squared = M.scalar_field(x^2+y^2)
sage: r_squared.set_immutable()
sage: cl_I = RealSet((1, 4)); cl_I
(1, 4)
sage: cl_O = ManifoldSubsetPullback(r_squared, None, I); cl_O
I guess I
in the last line (which, at this stage, is the imaginary number i) should be replaced by cl_I
and the subsequent True
and False
should become False
and True
respectively. But then, cl_I
and cl_O
are identical to I
and O
in the example that follows...
Branch pushed to git repo; I updated commit sha1. New commits:
c540d35 | ManifoldSubsetPullback: Fix up some doctests with closed intervals |
Thanks for spotting this - I have fixed this and a similar example
Replying to @egourgoulhon:
In the docstring of
ManifoldSubsetPullback
:
- in the INPUT section, there seems to be no entry for
ConvexSet_base
in the documentation
You may need to run ./sage -docbuild reference/discrete_geometry html
Replying to @mkoeppe:
Replying to @egourgoulhon:
In the docstring of
ManifoldSubsetPullback
:
- in the INPUT section, there seems to be no entry for
ConvexSet_base
in the documentationYou may need to run
./sage -docbuild reference/discrete_geometry html
Yes indeed!
Replying to @mkoeppe:
Thanks for spotting this - I have fixed this and a similar example
Thanks.
At the moment, we have
sage: M = Manifold(2, 'M')
sage: X.<x,y> = M.chart()
sage: M.identity_map().preimage(M)
Subset Id_M_inv_M of the 2-dimensional differentiable manifold M
sage: M.identity_map().preimage(M) is M
False
sage: M.zero_scalar_field().preimage(RealSet.point(0))
Subset zero_inv_{0} of the 2-dimensional differentiable manifold M
sage: M.zero_scalar_field().preimage(RealSet.point(0)) is M
False
Do you think it would be easy to have both answers to be True
? If no, this should not hamper the current ticket, but be differed to another ticket.
Branch pushed to git repo; I updated commit sha1. New commits:
facad97 | ContinuousMap.preimage: Handle identity_map specially |
Sure, that's easy to do and certainly a good idea. Here it is for ContinuousMap.preimage
already, I'll look into the case of the scalar fields
Branch pushed to git repo; I updated commit sha1. New commits:
c2ecf3e | ScalarField.preimage: Handle the case of the zero scalar field |
More general things such as detecting that the preimage of [0,oo) under squaring is the full domain will have to wait until a follow-up ticket
Replying to @mkoeppe:
Sure, that's easy to do and certainly a good idea. Here it is for
ContinuousMap.preimage
already,
Thanks. Maybe one can add
if self._is_isomorphism and codomain_subset == self._codomain:
return self._domain
The patchbot reports a doctest error in src/sage/geometry/polyhedron/base.py
as well as pyflakes errors in src/sage/manifolds/subsets/pullback.py
.
Replying to @egourgoulhon:
Maybe one can add
if self._is_isomorphism and codomain_subset == self._codomain: return self._domain
I think I can do more generally
if self._codomain.is_subset(codomain_subset):
return self._domain
Replying to @egourgoulhon:
The patchbot reports a doctest error in
src/sage/geometry/polyhedron/base.py
I've seen this one before locally, I don't think it's coming from this ticket, but I have opened #32030 for it
Branch pushed to git repo; I updated commit sha1. New commits:
3b1c428 | ManifoldSubsetPullback: Make codomain_subset required 2nd init arg; fix pycodestyle/pyflakes warnings |
Replying to @mkoeppe:
Replying to @egourgoulhon:
Maybe one can add
if self._is_isomorphism and codomain_subset == self._codomain: return self._domain
I think I can do more generally
if self._codomain.is_subset(codomain_subset): return self._domain
Yes, indeed! Being an isomorphism is not necessary in that case.
Branch pushed to git repo; I updated commit sha1. New commits:
d321b93 | ContinuousMap: Return domain if the map's codomain is contained in the given subset |
Similar to #31653, given a continuous map
\Phi: N -> M
and a manifold subsetS
ofM
, we define the pullback (preimage) ofS
as the subset ofN
of pointsp
with\Phi(p)
inS
.Given a real scalar field
Phi: N -> R
and aRealSet
S
, we define the pullback in the same way.Also, we view a chart
C
as a continuous functionPhi: C.domain() -> R^n
and allow pulling back any subset ofR^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