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

Commit

Permalink
ManifoldSubsetPullback: WIP relatively open
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthias Koeppe committed Jul 12, 2021
1 parent e389f0a commit 0ddf3a8
Showing 1 changed file with 23 additions and 10 deletions.
33 changes: 23 additions & 10 deletions src/sage/manifolds/subsets/pullback.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
from sage.sets.real_set import RealSet
from sage.geometry.polyhedron.base import is_Polyhedron
from sage.geometry.relative_interior import RelativeInterior
from sage.geometry.convex_set import ConvexSet_base


class ManifoldSubsetPullback(ManifoldSubset):
Expand Down Expand Up @@ -204,6 +205,13 @@ def __classcall_private__(cls, map, codomain_subset, inverse=None,
return map.domain().open_subset(name=name, latex_name=latex_name,
coord_def=coord_def)

elif cls._is_relatively_open_convex(codomain_subset):

data = codomain_subset.affine_hull_projection(return_all_data=True)

# TODO: Use comm. diagram with map, Euclidean canonical chart, affine hull projection/section
# to define embedded submanifold, return image.

self = super().__classcall__(cls, map, codomain_subset, inverse, name, latex_name)

return self
Expand Down Expand Up @@ -279,18 +287,9 @@ def _is_open(codomain_subset):
"""

if isinstance(codomain_subset, ManifoldSubset):
return codomain_subset.is_open()

if isinstance(codomain_subset, RealSet):
if isinstance(codomain_subset, (ManifoldSubset, RealSet, ConvexSet_base)):
return codomain_subset.is_open()

if is_Polyhedron(codomain_subset):
return codomain_subset.is_empty() or codomain_subset.is_universe()

if isinstance(codomain_subset, RelativeInterior):
return codomain_subset.closure().is_full_dimensional()

if codomain_subset in Sets().Finite():
return codomain_subset.cardinality() == 0

Expand All @@ -311,6 +310,20 @@ def _is_open(codomain_subset):

return False

@staticmethod
def _is_relatively_open_convex(codomain_subset):
"""
Return whether ``codomain_subset`` is (known to be) a relatively open convex set.
EXAMPLES::
sage: from sage.manifolds.subsets.pullback import ManifoldSubsetPullback
"""
if isinstance(codomain_subset, ConvexSet_base):
return codomain_subset.is_relatively_open()
return False

@staticmethod
def _interval_restriction(expr, interval):
"""
Expand Down

0 comments on commit 0ddf3a8

Please sign in to comment.