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 Feb 20, 2022
1 parent d03c7d5 commit 1f4bd68
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 @@ -30,6 +30,7 @@
from sage.sets.real_set import RealSet
import sage.geometry.abc
from sage.geometry.relative_interior import RelativeInterior
from sage.geometry.convex_set import ConvexSet_base


class ManifoldSubsetPullback(ManifoldSubset):
Expand Down Expand Up @@ -207,6 +208,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 @@ -282,18 +290,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 isinstance(codomain_subset, sage.geometry.abc.Polyhedron):
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 @@ -314,6 +313,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 1f4bd68

Please sign in to comment.