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
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
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
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
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)]
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
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),)
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
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
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
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
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))
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
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)
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))