Manifold Subsets Defined as Pullbacks of Subsets under Continuous Maps¶
- class sage.manifolds.subsets.pullback.ManifoldSubsetPullback(map, codomain_subset, inverse, name, latex_name)[source]¶
Bases:
ManifoldSubset
Manifold subset defined as a pullback of a subset under a continuous map.
INPUT:
map
– an instance ofContinuousMap
,ScalarField
, orChart
codomain_subset
– an instance ofManifoldSubset
,RealSet
, orConvexSet_base
EXAMPLES:
sage: from sage.manifolds.subsets.pullback import ManifoldSubsetPullback sage: M = Manifold(2, 'R^2', structure='topological') sage: c_cart.<x,y> = M.chart() # Cartesian coordinates on R^2
>>> from sage.all import * >>> from sage.manifolds.subsets.pullback import ManifoldSubsetPullback >>> M = Manifold(Integer(2), 'R^2', structure='topological') >>> c_cart = M.chart(names=('x', 'y',)); (x, y,) = c_cart._first_ngens(2)# Cartesian coordinates on R^2
Pulling back a real interval under a scalar field:
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, cl_I); cl_O Subset f_inv_[1, 4] of the 2-dimensional topological manifold R^2 sage: M.point((0, 0)) in cl_O False sage: M.point((0, 1)) in cl_O True
>>> from sage.all import * >>> r_squared = M.scalar_field(x**Integer(2)+y**Integer(2)) >>> r_squared.set_immutable() >>> cl_I = RealSet([Integer(1), Integer(4)]); cl_I [1, 4] >>> cl_O = ManifoldSubsetPullback(r_squared, cl_I); cl_O Subset f_inv_[1, 4] of the 2-dimensional topological manifold R^2 >>> M.point((Integer(0), Integer(0))) in cl_O False >>> M.point((Integer(0), Integer(1))) in cl_O True
Pulling back an open real interval gives an open subset:
sage: I = RealSet((1, 4)); I (1, 4) sage: O = ManifoldSubsetPullback(r_squared, I); O Open subset f_inv_(1, 4) of the 2-dimensional topological manifold R^2 sage: M.point((1, 0)) in O False sage: M.point((1, 1)) in O True
>>> from sage.all import * >>> I = RealSet((Integer(1), Integer(4))); I (1, 4) >>> O = ManifoldSubsetPullback(r_squared, I); O Open subset f_inv_(1, 4) of the 2-dimensional topological manifold R^2 >>> M.point((Integer(1), Integer(0))) in O False >>> M.point((Integer(1), Integer(1))) in O True
Pulling back a polytope under a chart:
sage: # needs sage.geometry.polyhedron sage: P = Polyhedron(vertices=[[0, 0], [1, 2], [2, 1]]); P A 2-dimensional polyhedron in ZZ^2 defined as the convex hull of 3 vertices sage: S = ManifoldSubsetPullback(c_cart, P); S Subset x_y_inv_P of the 2-dimensional topological manifold R^2 sage: M((1, 2)) in S True sage: M((2, 0)) in S False
>>> from sage.all import * >>> # needs sage.geometry.polyhedron >>> P = Polyhedron(vertices=[[Integer(0), Integer(0)], [Integer(1), Integer(2)], [Integer(2), Integer(1)]]); P A 2-dimensional polyhedron in ZZ^2 defined as the convex hull of 3 vertices >>> S = ManifoldSubsetPullback(c_cart, P); S Subset x_y_inv_P of the 2-dimensional topological manifold R^2 >>> M((Integer(1), Integer(2))) in S True >>> M((Integer(2), Integer(0))) in S False
Pulling back the interior of a polytope under a chart:
sage: # needs sage.geometry.polyhedron sage: int_P = P.interior(); int_P Relative interior of a 2-dimensional polyhedron in ZZ^2 defined as the convex hull of 3 vertices sage: int_S = ManifoldSubsetPullback(c_cart, int_P, name='int_S'); int_S Open subset int_S of the 2-dimensional topological manifold R^2 sage: M((0, 0)) in int_S False sage: M((1, 1)) in int_S True
>>> from sage.all import * >>> # needs sage.geometry.polyhedron >>> int_P = P.interior(); int_P Relative interior of a 2-dimensional polyhedron in ZZ^2 defined as the convex hull of 3 vertices >>> int_S = ManifoldSubsetPullback(c_cart, int_P, name='int_S'); int_S Open subset int_S of the 2-dimensional topological manifold R^2 >>> M((Integer(0), Integer(0))) in int_S False >>> M((Integer(1), Integer(1))) in int_S True
Using the embedding map of a submanifold:
sage: M = Manifold(3, 'M', structure='topological') sage: N = Manifold(2, 'N', ambient=M, structure='topological'); N 2-dimensional topological submanifold N immersed in the 3-dimensional topological manifold M sage: CM.<x,y,z> = M.chart() sage: CN.<u,v> = N.chart() sage: t = var('t') sage: phi = N.continuous_map(M, {(CN,CM): [u,v,t+u^2+v^2]}) sage: phi_inv = M.continuous_map(N, {(CM,CN): [x,y]}) sage: phi_inv_t = M.scalar_field({CM: z-x^2-y^2}) sage: N.set_immersion(phi, inverse=phi_inv, var=t, ....: t_inverse={t: phi_inv_t}) sage: N.declare_embedding() sage: from sage.manifolds.subsets.pullback import ManifoldSubsetPullback sage: S = M.open_subset('S', coord_def={CM: z<1}) sage: phi_without_t = N.continuous_map(M, {(CN, CM): [expr.subs(t=0) ....: for expr in phi.expr()]}) sage: phi_without_t Continuous map from the 2-dimensional topological submanifold N embedded in the 3-dimensional topological manifold M to the 3-dimensional topological manifold M sage: phi_without_t.expr() (u, v, u^2 + v^2) sage: D = ManifoldSubsetPullback(phi_without_t, S); D Subset f_inv_S of the 2-dimensional topological submanifold N embedded in the 3-dimensional topological manifold M sage: N.point((2,0)) in D False
>>> from sage.all import * >>> M = Manifold(Integer(3), 'M', structure='topological') >>> N = Manifold(Integer(2), 'N', ambient=M, structure='topological'); N 2-dimensional topological submanifold N immersed in the 3-dimensional topological manifold M >>> CM = M.chart(names=('x', 'y', 'z',)); (x, y, z,) = CM._first_ngens(3) >>> CN = N.chart(names=('u', 'v',)); (u, v,) = CN._first_ngens(2) >>> t = var('t') >>> phi = N.continuous_map(M, {(CN,CM): [u,v,t+u**Integer(2)+v**Integer(2)]}) >>> phi_inv = M.continuous_map(N, {(CM,CN): [x,y]}) >>> phi_inv_t = M.scalar_field({CM: z-x**Integer(2)-y**Integer(2)}) >>> N.set_immersion(phi, inverse=phi_inv, var=t, ... t_inverse={t: phi_inv_t}) >>> N.declare_embedding() >>> from sage.manifolds.subsets.pullback import ManifoldSubsetPullback >>> S = M.open_subset('S', coord_def={CM: z<Integer(1)}) >>> phi_without_t = N.continuous_map(M, {(CN, CM): [expr.subs(t=Integer(0)) ... for expr in phi.expr()]}) >>> phi_without_t Continuous map from the 2-dimensional topological submanifold N embedded in the 3-dimensional topological manifold M to the 3-dimensional topological manifold M >>> phi_without_t.expr() (u, v, u^2 + v^2) >>> D = ManifoldSubsetPullback(phi_without_t, S); D Subset f_inv_S of the 2-dimensional topological submanifold N embedded in the 3-dimensional topological manifold M >>> N.point((Integer(2),Integer(0))) in D False
- closure(name=None, latex_name=None)[source]¶
Return the topological closure of
self
in the manifold.Because
self
is a pullback of some subset under a continuous map, the closure ofself
is the pullback of the closure.EXAMPLES:
sage: from sage.manifolds.subsets.pullback import ManifoldSubsetPullback sage: M = Manifold(2, 'R^2', structure='topological') sage: c_cart.<x,y> = M.chart() # Cartesian coordinates on R^2 sage: r_squared = M.scalar_field(x^2+y^2) sage: r_squared.set_immutable() sage: I = RealSet.open_closed(1, 2); I (1, 2] sage: O = ManifoldSubsetPullback(r_squared, I); O Subset f_inv_(1, 2] of the 2-dimensional topological manifold R^2 sage: latex(O) f^{-1}((1, 2]) sage: cl_O = O.closure(); cl_O Subset f_inv_[1, 2] of the 2-dimensional topological manifold R^2 sage: cl_O.is_closed() True
>>> from sage.all import * >>> from sage.manifolds.subsets.pullback import ManifoldSubsetPullback >>> M = Manifold(Integer(2), 'R^2', structure='topological') >>> c_cart = M.chart(names=('x', 'y',)); (x, y,) = c_cart._first_ngens(2)# Cartesian coordinates on R^2 >>> r_squared = M.scalar_field(x**Integer(2)+y**Integer(2)) >>> r_squared.set_immutable() >>> I = RealSet.open_closed(Integer(1), Integer(2)); I (1, 2] >>> O = ManifoldSubsetPullback(r_squared, I); O Subset f_inv_(1, 2] of the 2-dimensional topological manifold R^2 >>> latex(O) f^{-1}((1, 2]) >>> cl_O = O.closure(); cl_O Subset f_inv_[1, 2] of the 2-dimensional topological manifold R^2 >>> cl_O.is_closed() True
- is_closed()[source]¶
Return if
self
is (known to be) a closed subset of the manifold.EXAMPLES:
sage: from sage.manifolds.subsets.pullback import ManifoldSubsetPullback sage: M = Manifold(2, 'R^2', structure='topological') sage: c_cart.<x,y> = M.chart() # Cartesian coordinates on R^2
>>> from sage.all import * >>> from sage.manifolds.subsets.pullback import ManifoldSubsetPullback >>> M = Manifold(Integer(2), 'R^2', structure='topological') >>> c_cart = M.chart(names=('x', 'y',)); (x, y,) = c_cart._first_ngens(2)# Cartesian coordinates on R^2
The pullback of a closed real interval under a scalar field is closed:
sage: r_squared = M.scalar_field(x^2+y^2) sage: r_squared.set_immutable() sage: cl_I = RealSet([1, 2]); cl_I [1, 2] sage: cl_O = ManifoldSubsetPullback(r_squared, cl_I); cl_O Subset f_inv_[1, 2] of the 2-dimensional topological manifold R^2 sage: cl_O.is_closed() True
>>> from sage.all import * >>> r_squared = M.scalar_field(x**Integer(2)+y**Integer(2)) >>> r_squared.set_immutable() >>> cl_I = RealSet([Integer(1), Integer(2)]); cl_I [1, 2] >>> cl_O = ManifoldSubsetPullback(r_squared, cl_I); cl_O Subset f_inv_[1, 2] of the 2-dimensional topological manifold R^2 >>> cl_O.is_closed() True
The pullback of a (closed convex) polyhedron under a chart is closed:
sage: # needs sage.geometry.polyhedron sage: P = Polyhedron(vertices=[[0, 0], [1, 2], [3, 4]]); P A 2-dimensional polyhedron in ZZ^2 defined as the convex hull of 3 vertices sage: McP = ManifoldSubsetPullback(c_cart, P, name='McP'); McP Subset McP of the 2-dimensional topological manifold R^2 sage: McP.is_closed() True
>>> from sage.all import * >>> # needs sage.geometry.polyhedron >>> P = Polyhedron(vertices=[[Integer(0), Integer(0)], [Integer(1), Integer(2)], [Integer(3), Integer(4)]]); P A 2-dimensional polyhedron in ZZ^2 defined as the convex hull of 3 vertices >>> McP = ManifoldSubsetPullback(c_cart, P, name='McP'); McP Subset McP of the 2-dimensional topological manifold R^2 >>> McP.is_closed() True
The pullback of real vector subspaces under a chart is closed:
sage: V = span([[1, 2]], RR); V Vector space of degree 2 and dimension 1 over Real Field with 53 bits of precision Basis matrix: [1.00000000000000 2.00000000000000] sage: McV = ManifoldSubsetPullback(c_cart, V, name='McV'); McV Subset McV of the 2-dimensional topological manifold R^2 sage: McV.is_closed() True
>>> from sage.all import * >>> V = span([[Integer(1), Integer(2)]], RR); V Vector space of degree 2 and dimension 1 over Real Field with 53 bits of precision Basis matrix: [1.00000000000000 2.00000000000000] >>> McV = ManifoldSubsetPullback(c_cart, V, name='McV'); McV Subset McV of the 2-dimensional topological manifold R^2 >>> McV.is_closed() True
The pullback of point lattices under a chart is closed:
sage: W = span([[1, 0], [3, 5]], ZZ); W Free module of degree 2 and rank 2 over Integer Ring Echelon basis matrix: [1 0] [0 5] sage: McW = ManifoldSubsetPullback(c_cart, W, name='McW'); McW Subset McW of the 2-dimensional topological manifold R^2 sage: McW.is_closed() True
>>> from sage.all import * >>> W = span([[Integer(1), Integer(0)], [Integer(3), Integer(5)]], ZZ); W Free module of degree 2 and rank 2 over Integer Ring Echelon basis matrix: [1 0] [0 5] >>> McW = ManifoldSubsetPullback(c_cart, W, name='McW'); McW Subset McW of the 2-dimensional topological manifold R^2 >>> McW.is_closed() True
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() True
>>> from sage.all import * >>> F = Family([vector(QQ, [Integer(1), Integer(2)], immutable=True), vector(QQ, [Integer(2), Integer(3)], immutable=True)]) >>> McF = ManifoldSubsetPullback(c_cart, F, name='McF'); McF Subset McF of the 2-dimensional topological manifold R^2 >>> McF.is_closed() True
- is_open()[source]¶
Return if
self
is (known to be) an open set.This version of the method always returns
False
.Because the map is continuous, the pullback is open if the
codomain_subset
is open.However, the design of
ManifoldSubset
requires that open subsets are instances of the subclasssage.manifolds.manifold.TopologicalManifold
. The constructor ofManifoldSubsetPullback
delegates to a subclass ofsage.manifolds.manifold.TopologicalManifold
for some open subsets.EXAMPLES:
sage: from sage.manifolds.subsets.pullback import ManifoldSubsetPullback sage: M = Manifold(2, 'R^2', structure='topological') sage: c_cart.<x,y> = M.chart() # Cartesian coordinates on R^2 sage: # needs sage.geometry.polyhedron sage: P = Polyhedron(vertices=[[0, 0], [1, 2], [3, 4]]); P A 2-dimensional polyhedron in ZZ^2 defined as the convex hull of 3 vertices sage: P.is_open() False sage: McP = ManifoldSubsetPullback(c_cart, P, name='McP'); McP Subset McP of the 2-dimensional topological manifold R^2 sage: McP.is_open() False
>>> from sage.all import * >>> from sage.manifolds.subsets.pullback import ManifoldSubsetPullback >>> M = Manifold(Integer(2), 'R^2', structure='topological') >>> c_cart = M.chart(names=('x', 'y',)); (x, y,) = c_cart._first_ngens(2)# Cartesian coordinates on R^2 >>> # needs sage.geometry.polyhedron >>> P = Polyhedron(vertices=[[Integer(0), Integer(0)], [Integer(1), Integer(2)], [Integer(3), Integer(4)]]); P A 2-dimensional polyhedron in ZZ^2 defined as the convex hull of 3 vertices >>> P.is_open() False >>> McP = ManifoldSubsetPullback(c_cart, P, name='McP'); McP Subset McP of the 2-dimensional topological manifold R^2 >>> McP.is_open() False
- some_elements()[source]¶
Generate some elements of
self
.EXAMPLES:
sage: # needs sage.geometry.polyhedron sage: from sage.manifolds.subsets.pullback import ManifoldSubsetPullback sage: M = Manifold(3, 'R^3', structure='topological') sage: c_cart.<x,y,z> = M.chart() # Cartesian coordinates on R^3 sage: Cube = polytopes.cube(); Cube A 3-dimensional polyhedron in ZZ^3 defined as the convex hull of 8 vertices sage: McCube = ManifoldSubsetPullback(c_cart, Cube, name='McCube'); McCube Subset McCube of the 3-dimensional topological manifold R^3 sage: L = list(McCube.some_elements()); L [Point on the 3-dimensional topological manifold R^3, Point on the 3-dimensional topological manifold R^3, Point on the 3-dimensional topological manifold R^3, Point on the 3-dimensional topological manifold R^3, Point on the 3-dimensional topological manifold R^3, Point on the 3-dimensional topological manifold R^3] sage: list(p.coordinates(c_cart) for p in L) [(0, 0, 0), (1, -1, -1), (1, 0, -1), (1, 1/2, 0), (1, -1/4, 1/2), (0, -5/8, 3/4)] sage: # needs sage.geometry.polyhedron sage: Empty = Polyhedron(ambient_dim=3) sage: McEmpty = ManifoldSubsetPullback(c_cart, Empty, name='McEmpty') sage: McEmpty Subset McEmpty of the 3-dimensional topological manifold R^3 sage: list(McEmpty.some_elements()) []
>>> from sage.all import * >>> # needs sage.geometry.polyhedron >>> from sage.manifolds.subsets.pullback import ManifoldSubsetPullback >>> M = Manifold(Integer(3), 'R^3', structure='topological') >>> c_cart = M.chart(names=('x', 'y', 'z',)); (x, y, z,) = c_cart._first_ngens(3)# Cartesian coordinates on R^3 >>> Cube = polytopes.cube(); Cube A 3-dimensional polyhedron in ZZ^3 defined as the convex hull of 8 vertices >>> McCube = ManifoldSubsetPullback(c_cart, Cube, name='McCube'); McCube Subset McCube of the 3-dimensional topological manifold R^3 >>> L = list(McCube.some_elements()); L [Point on the 3-dimensional topological manifold R^3, Point on the 3-dimensional topological manifold R^3, Point on the 3-dimensional topological manifold R^3, Point on the 3-dimensional topological manifold R^3, Point on the 3-dimensional topological manifold R^3, Point on the 3-dimensional topological manifold R^3] >>> list(p.coordinates(c_cart) for p in L) [(0, 0, 0), (1, -1, -1), (1, 0, -1), (1, 1/2, 0), (1, -1/4, 1/2), (0, -5/8, 3/4)] >>> # needs sage.geometry.polyhedron >>> Empty = Polyhedron(ambient_dim=Integer(3)) >>> McEmpty = ManifoldSubsetPullback(c_cart, Empty, name='McEmpty') >>> McEmpty Subset McEmpty of the 3-dimensional topological manifold R^3 >>> list(McEmpty.some_elements()) []