Relative Interiors of Polyhedra and Cones

class sage.geometry.relative_interior.RelativeInterior(polyhedron)[source]

Bases: ConvexSet_relatively_open

The relative interior of a polyhedron or cone.

This class should not be used directly. Use methods relative_interior(), interior(), relative_interior(), interior() instead.

EXAMPLES:

sage: segment = Polyhedron([[1, 2], [3, 4]])
sage: segment.relative_interior()
Relative interior of
 a 1-dimensional polyhedron in ZZ^2 defined as the convex hull of 2 vertices
sage: octant = Cone([(1,0,0), (0,1,0), (0,0,1)])
sage: octant.relative_interior()
Relative interior of 3-d cone in 3-d lattice N
>>> from sage.all import *
>>> segment = Polyhedron([[Integer(1), Integer(2)], [Integer(3), Integer(4)]])
>>> segment.relative_interior()
Relative interior of
 a 1-dimensional polyhedron in ZZ^2 defined as the convex hull of 2 vertices
>>> octant = Cone([(Integer(1),Integer(0),Integer(0)), (Integer(0),Integer(1),Integer(0)), (Integer(0),Integer(0),Integer(1))])
>>> octant.relative_interior()
Relative interior of 3-d cone in 3-d lattice N
segment = Polyhedron([[1, 2], [3, 4]])
segment.relative_interior()
octant = Cone([(1,0,0), (0,1,0), (0,0,1)])
octant.relative_interior()
ambient()[source]

Return the ambient convex set or space.

EXAMPLES:

sage: segment = Polyhedron([[1, 2], [3, 4]])
sage: ri_segment = segment.relative_interior(); ri_segment
Relative interior of
 a 1-dimensional polyhedron in ZZ^2 defined as the convex hull of 2 vertices
sage: ri_segment.ambient()
Vector space of dimension 2 over Rational Field
>>> from sage.all import *
>>> segment = Polyhedron([[Integer(1), Integer(2)], [Integer(3), Integer(4)]])
>>> ri_segment = segment.relative_interior(); ri_segment
Relative interior of
 a 1-dimensional polyhedron in ZZ^2 defined as the convex hull of 2 vertices
>>> ri_segment.ambient()
Vector space of dimension 2 over Rational Field
segment = Polyhedron([[1, 2], [3, 4]])
ri_segment = segment.relative_interior(); ri_segment
ri_segment.ambient()
ambient_dim()[source]

Return the dimension of the ambient space.

EXAMPLES:

sage: segment = Polyhedron([[1, 2], [3, 4]])
sage: segment.ambient_dim()
2
sage: ri_segment = segment.relative_interior(); ri_segment
Relative interior of
 a 1-dimensional polyhedron in ZZ^2 defined as the convex hull of 2 vertices
sage: ri_segment.ambient_dim()
2
>>> from sage.all import *
>>> segment = Polyhedron([[Integer(1), Integer(2)], [Integer(3), Integer(4)]])
>>> segment.ambient_dim()
2
>>> ri_segment = segment.relative_interior(); ri_segment
Relative interior of
 a 1-dimensional polyhedron in ZZ^2 defined as the convex hull of 2 vertices
>>> ri_segment.ambient_dim()
2
segment = Polyhedron([[1, 2], [3, 4]])
segment.ambient_dim()
ri_segment = segment.relative_interior(); ri_segment
ri_segment.ambient_dim()
ambient_vector_space(base_field=None)[source]

Return the ambient vector space.

EXAMPLES:

sage: segment = Polyhedron([[1, 2], [3, 4]])
sage: ri_segment = segment.relative_interior(); ri_segment
Relative interior of
 a 1-dimensional polyhedron in ZZ^2 defined as the convex hull of 2 vertices
sage: ri_segment.ambient_vector_space()
Vector space of dimension 2 over Rational Field
>>> from sage.all import *
>>> segment = Polyhedron([[Integer(1), Integer(2)], [Integer(3), Integer(4)]])
>>> ri_segment = segment.relative_interior(); ri_segment
Relative interior of
 a 1-dimensional polyhedron in ZZ^2 defined as the convex hull of 2 vertices
>>> ri_segment.ambient_vector_space()
Vector space of dimension 2 over Rational Field
segment = Polyhedron([[1, 2], [3, 4]])
ri_segment = segment.relative_interior(); ri_segment
ri_segment.ambient_vector_space()
an_affine_basis()[source]

Return points that form an affine basis for the affine hull.

The points are guaranteed to lie in the topological closure of self.

EXAMPLES:

sage: segment = Polyhedron([[1, 0], [0, 1]])
sage: segment.relative_interior().an_affine_basis()
[A vertex at (1, 0), A vertex at (0, 1)]
>>> from sage.all import *
>>> segment = Polyhedron([[Integer(1), Integer(0)], [Integer(0), Integer(1)]])
>>> segment.relative_interior().an_affine_basis()
[A vertex at (1, 0), A vertex at (0, 1)]
segment = Polyhedron([[1, 0], [0, 1]])
segment.relative_interior().an_affine_basis()
closure()[source]

Return the topological closure of self.

EXAMPLES:

sage: segment = Polyhedron([[1, 2], [3, 4]])
sage: ri_segment = segment.relative_interior(); ri_segment
Relative interior of
 a 1-dimensional polyhedron in ZZ^2 defined as the convex hull of 2 vertices
sage: ri_segment.closure() is segment
True
>>> from sage.all import *
>>> segment = Polyhedron([[Integer(1), Integer(2)], [Integer(3), Integer(4)]])
>>> ri_segment = segment.relative_interior(); ri_segment
Relative interior of
 a 1-dimensional polyhedron in ZZ^2 defined as the convex hull of 2 vertices
>>> ri_segment.closure() is segment
True
segment = Polyhedron([[1, 2], [3, 4]])
ri_segment = segment.relative_interior(); ri_segment
ri_segment.closure() is segment
dilation(scalar)[source]

Return the dilated (uniformly stretched) set.

INPUT:

  • scalar – a scalar

EXAMPLES:

sage: segment = Polyhedron([[1, 2], [3, 4]])
sage: ri_segment = segment.relative_interior(); ri_segment
Relative interior of a
 1-dimensional polyhedron in ZZ^2 defined as the convex hull of 2 vertices
sage: A = ri_segment.dilation(2); A
Relative interior of a
 1-dimensional polyhedron in ZZ^2 defined as the convex hull of 2 vertices
sage: A.closure().vertices()
(A vertex at (2, 4), A vertex at (6, 8))
sage: B = ri_segment.dilation(-1/3); B
Relative interior of a
 1-dimensional polyhedron in QQ^2 defined as the convex hull of 2 vertices
sage: B.closure().vertices()
(A vertex at (-1, -4/3), A vertex at (-1/3, -2/3))
sage: C = ri_segment.dilation(0); C
A 0-dimensional polyhedron in ZZ^2 defined as the convex hull of 1 vertex
sage: C.vertices()
(A vertex at (0, 0),)
>>> from sage.all import *
>>> segment = Polyhedron([[Integer(1), Integer(2)], [Integer(3), Integer(4)]])
>>> ri_segment = segment.relative_interior(); ri_segment
Relative interior of a
 1-dimensional polyhedron in ZZ^2 defined as the convex hull of 2 vertices
>>> A = ri_segment.dilation(Integer(2)); A
Relative interior of a
 1-dimensional polyhedron in ZZ^2 defined as the convex hull of 2 vertices
>>> A.closure().vertices()
(A vertex at (2, 4), A vertex at (6, 8))
>>> B = ri_segment.dilation(-Integer(1)/Integer(3)); B
Relative interior of a
 1-dimensional polyhedron in QQ^2 defined as the convex hull of 2 vertices
>>> B.closure().vertices()
(A vertex at (-1, -4/3), A vertex at (-1/3, -2/3))
>>> C = ri_segment.dilation(Integer(0)); C
A 0-dimensional polyhedron in ZZ^2 defined as the convex hull of 1 vertex
>>> C.vertices()
(A vertex at (0, 0),)
segment = Polyhedron([[1, 2], [3, 4]])
ri_segment = segment.relative_interior(); ri_segment
A = ri_segment.dilation(2); A
A.closure().vertices()
B = ri_segment.dilation(-1/3); B
B.closure().vertices()
C = ri_segment.dilation(0); C
C.vertices()
dim()[source]

Return the dimension of self.

EXAMPLES:

sage: segment = Polyhedron([[1, 2], [3, 4]])
sage: segment.dim()
1
sage: ri_segment = segment.relative_interior(); ri_segment
Relative interior of
 a 1-dimensional polyhedron in ZZ^2 defined as the convex hull of 2 vertices
sage: ri_segment.dim()
1
>>> from sage.all import *
>>> segment = Polyhedron([[Integer(1), Integer(2)], [Integer(3), Integer(4)]])
>>> segment.dim()
1
>>> ri_segment = segment.relative_interior(); ri_segment
Relative interior of
 a 1-dimensional polyhedron in ZZ^2 defined as the convex hull of 2 vertices
>>> ri_segment.dim()
1
segment = Polyhedron([[1, 2], [3, 4]])
segment.dim()
ri_segment = segment.relative_interior(); ri_segment
ri_segment.dim()
interior()[source]

Return the interior of self.

EXAMPLES:

sage: segment = Polyhedron([[1, 2], [3, 4]])
sage: ri_segment = segment.relative_interior(); ri_segment
Relative interior of
 a 1-dimensional polyhedron in ZZ^2 defined as the convex hull of 2 vertices
sage: ri_segment.interior()
The empty polyhedron in ZZ^2

sage: octant = Cone([(1,0,0), (0,1,0), (0,0,1)])
sage: ri_octant = octant.relative_interior(); ri_octant
Relative interior of 3-d cone in 3-d lattice N
sage: ri_octant.interior() is ri_octant
True
>>> from sage.all import *
>>> segment = Polyhedron([[Integer(1), Integer(2)], [Integer(3), Integer(4)]])
>>> ri_segment = segment.relative_interior(); ri_segment
Relative interior of
 a 1-dimensional polyhedron in ZZ^2 defined as the convex hull of 2 vertices
>>> ri_segment.interior()
The empty polyhedron in ZZ^2

>>> octant = Cone([(Integer(1),Integer(0),Integer(0)), (Integer(0),Integer(1),Integer(0)), (Integer(0),Integer(0),Integer(1))])
>>> ri_octant = octant.relative_interior(); ri_octant
Relative interior of 3-d cone in 3-d lattice N
>>> ri_octant.interior() is ri_octant
True
segment = Polyhedron([[1, 2], [3, 4]])
ri_segment = segment.relative_interior(); ri_segment
ri_segment.interior()
octant = Cone([(1,0,0), (0,1,0), (0,0,1)])
ri_octant = octant.relative_interior(); ri_octant
ri_octant.interior() is ri_octant
is_closed()[source]

Return whether self is closed.

OUTPUT: boolean

EXAMPLES:

sage: segment = Polyhedron([[1, 2], [3, 4]])
sage: ri_segment = segment.relative_interior(); ri_segment
Relative interior of a 1-dimensional polyhedron in ZZ^2 defined as the convex hull of 2 vertices
sage: ri_segment.is_closed()
False
>>> from sage.all import *
>>> segment = Polyhedron([[Integer(1), Integer(2)], [Integer(3), Integer(4)]])
>>> ri_segment = segment.relative_interior(); ri_segment
Relative interior of a 1-dimensional polyhedron in ZZ^2 defined as the convex hull of 2 vertices
>>> ri_segment.is_closed()
False
segment = Polyhedron([[1, 2], [3, 4]])
ri_segment = segment.relative_interior(); ri_segment
ri_segment.is_closed()
is_universe()[source]

Return whether self is the whole ambient space.

OUTPUT: boolean

EXAMPLES:

sage: segment = Polyhedron([[1, 2], [3, 4]])
sage: ri_segment = segment.relative_interior(); ri_segment
Relative interior of
 a 1-dimensional polyhedron in ZZ^2 defined as the convex hull of 2 vertices
sage: ri_segment.is_universe()
False
>>> from sage.all import *
>>> segment = Polyhedron([[Integer(1), Integer(2)], [Integer(3), Integer(4)]])
>>> ri_segment = segment.relative_interior(); ri_segment
Relative interior of
 a 1-dimensional polyhedron in ZZ^2 defined as the convex hull of 2 vertices
>>> ri_segment.is_universe()
False
segment = Polyhedron([[1, 2], [3, 4]])
ri_segment = segment.relative_interior(); ri_segment
ri_segment.is_universe()
linear_transformation(linear_transf, **kwds)[source]

Return the linear transformation of self.

By [Roc1970], Theorem 6.6, the linear transformation of a relative interior is the relative interior of the linear transformation.

INPUT:

EXAMPLES:

sage: segment = Polyhedron([[1, 2], [3, 4]])
sage: ri_segment = segment.relative_interior(); ri_segment
Relative interior of a
 1-dimensional polyhedron in ZZ^2 defined as the convex hull of 2 vertices
sage: T = matrix([[1, 1]])
sage: A = ri_segment.linear_transformation(T); A
Relative interior of a
 1-dimensional polyhedron in ZZ^1 defined as the convex hull of 2 vertices
sage: A.closure().vertices()
(A vertex at (3), A vertex at (7))
>>> from sage.all import *
>>> segment = Polyhedron([[Integer(1), Integer(2)], [Integer(3), Integer(4)]])
>>> ri_segment = segment.relative_interior(); ri_segment
Relative interior of a
 1-dimensional polyhedron in ZZ^2 defined as the convex hull of 2 vertices
>>> T = matrix([[Integer(1), Integer(1)]])
>>> A = ri_segment.linear_transformation(T); A
Relative interior of a
 1-dimensional polyhedron in ZZ^1 defined as the convex hull of 2 vertices
>>> A.closure().vertices()
(A vertex at (3), A vertex at (7))
segment = Polyhedron([[1, 2], [3, 4]])
ri_segment = segment.relative_interior(); ri_segment
T = matrix([[1, 1]])
A = ri_segment.linear_transformation(T); A
A.closure().vertices()
relative_interior()[source]

Return the relative interior of self.

As self is already relatively open, this method just returns self.

EXAMPLES:

sage: segment = Polyhedron([[1, 2], [3, 4]])
sage: ri_segment = segment.relative_interior(); ri_segment
Relative interior of
 a 1-dimensional polyhedron in ZZ^2 defined as the convex hull of 2 vertices
sage: ri_segment.relative_interior() is ri_segment
True
>>> from sage.all import *
>>> segment = Polyhedron([[Integer(1), Integer(2)], [Integer(3), Integer(4)]])
>>> ri_segment = segment.relative_interior(); ri_segment
Relative interior of
 a 1-dimensional polyhedron in ZZ^2 defined as the convex hull of 2 vertices
>>> ri_segment.relative_interior() is ri_segment
True
segment = Polyhedron([[1, 2], [3, 4]])
ri_segment = segment.relative_interior(); ri_segment
ri_segment.relative_interior() is ri_segment
representative_point()[source]

Return a “generic” point of self.

OUTPUT:

A point in self (thus, in the relative interior of self) as a coordinate vector.

EXAMPLES:

sage: C = Cone([[1, 2, 0], [2, 1, 0]])
sage: C.relative_interior().representative_point()
(1, 1, 0)
>>> from sage.all import *
>>> C = Cone([[Integer(1), Integer(2), Integer(0)], [Integer(2), Integer(1), Integer(0)]])
>>> C.relative_interior().representative_point()
(1, 1, 0)
C = Cone([[1, 2, 0], [2, 1, 0]])
C.relative_interior().representative_point()
translation(displacement)[source]

Return the translation of self by a displacement vector.

INPUT:

  • displacement – a displacement vector or a list/tuple of coordinates that determines a displacement vector

EXAMPLES:

sage: segment = Polyhedron([[1, 2], [3, 4]])
sage: ri_segment = segment.relative_interior(); ri_segment
Relative interior of a
 1-dimensional polyhedron in ZZ^2 defined as the convex hull of 2 vertices
sage: t = vector([100, 100])
sage: ri_segment.translation(t)
Relative interior of a
 1-dimensional polyhedron in ZZ^2 defined as the convex hull of 2 vertices
sage: ri_segment.closure().vertices()
(A vertex at (1, 2), A vertex at (3, 4))
>>> from sage.all import *
>>> segment = Polyhedron([[Integer(1), Integer(2)], [Integer(3), Integer(4)]])
>>> ri_segment = segment.relative_interior(); ri_segment
Relative interior of a
 1-dimensional polyhedron in ZZ^2 defined as the convex hull of 2 vertices
>>> t = vector([Integer(100), Integer(100)])
>>> ri_segment.translation(t)
Relative interior of a
 1-dimensional polyhedron in ZZ^2 defined as the convex hull of 2 vertices
>>> ri_segment.closure().vertices()
(A vertex at (1, 2), A vertex at (3, 4))
segment = Polyhedron([[1, 2], [3, 4]])
ri_segment = segment.relative_interior(); ri_segment
t = vector([100, 100])
ri_segment.translation(t)
ri_segment.closure().vertices()