Available versions of this document: latest release, release 4.4, release 4.3, release 4.2, release 4.1, release 4.0, release 3.6, release 3.5, nightly master
Reference documentation for older polymake versions: release 3.4, release 3.3, release 3.2
BigObject PolyhedralFan<Scalar>
from application fan
A polyhedral fan. The current restriction is that each cone in the fan has to be pointed. This will be relaxed later. If a fan is specified via INPUT_RAYS
and INPUT_CONES
each input cone must list all the input rays incident. Once nontrivial linealities are allowed the following will apply: The RAYS
always lie in a linear subspace which is complementary to the LINEALITY_SPACE
.
 Type Parameters:
Scalar
: numeric data type used for the coordinates, must be an ordered field. Default isRational
. Specializations:
PolyhedralFan<Rational>
: Unnamed full specialization of PolyhedralFan Example:
A typical example is the normal fan of a convex polytope.
> $f=normal_fan(polytope::cube(3)); > print $f>F_VECTOR; 6 12 8
 Permutations:
 ConesPerm:
permuting the
MAXIMAL_CONES
 RaysPerm:
permuting the
RAYS
Properties
Input property
These properties are for input only. They allow redundant information.

INPUT_CONES
Maybe redundant list of not necessarily maximal cones. Indices refer to
INPUT_RAYS
. Each cone must list all rays ofINPUT_RAYS
it contains. Any incident cones will automatically be added. The cones are allowed to contain lineality. Cones which do not have any rays correspond to the trivial cone (contains only the origin). An empty fan does not have any cones. Input section only. Ask forMAXIMAL_CONES
if you want to know the maximal cones (indexed byRAYS
). Type:
 Example:
In 3space, we construct the fan containing the closure of the allpositive octant and the (x⇐0, y>=0, z=0) quadrant with the following input (note that we do not have to state the combinatorics for cones contained in a given cone of higher dimension, e.g. the the (x>=0, z>=0) quadrant in the y=0 plane):
> $f = new PolyhedralFan(INPUT_RAYS=>[[1,0,0],[0,1,0],[0,0,1],[1,0,0]],INPUT_CONES=>[[0,1,2],[1,3]]); > print rows_labeled($f>RAYS); 0:1 0 0 1:0 1 0 2:0 0 1 3:1 0 0
> print $f>CONES; <{1} {3} {2} {0} > <{1 3} {1 2} {0 2} {0 1} > <{0 1 2} >

INPUT_LINEALITY
Vectors whose linear span defines a subset of the lineality space of the fan; redundancies are allowed. Input section only. Ask for
LINEALITY_SPACE
if you want to know the lineality space. Type:
Matrix<Scalar,NonSymmetric>
 Example:
In 3space, we can “stretch” the (x>=0, y>=0) quadrant in the z=0 hyperplane to obtain the joint of the two octants where x and y are nonnegative by adding linearity in zdirection:
> $f = new PolyhedralFan(INPUT_RAYS=>[[1,0,0],[0,1,0]],INPUT_CONES=>[[0,1]],INPUT_LINEALITY=>[[0,0,1]]);

INPUT_RAYS
Rays from which the cones are formed. May be redundant. All vectors in the input must be nonzero. You also need to provide
INPUT_CONES
to define a fan completely. Input section only. Ask forRAYS
if you want a list of nonredundant rays. Type:
Matrix<Scalar,NonSymmetric>
 Example:
When constructing the fan which displays the division of the plane into quadrants, we can use redundant rays such that the indices given in
INPUT_CONES
suggest that two rays form the border of our fan, but due to our choice inINPUT_RAYS
, they actually are the same ray adjacent to two distinct 2dimensional cones:> $f = new PolyhedralFan(INPUT_RAYS=>[[1,0],[0,1],[1,0],[0,1],[2,0]],INPUT_CONES=>[[0,1],[1,2],[2,3],[3,4]]); > print rows_labeled($f>RAYS); 0:1 0 1:0 1 2:1 0 3:0 1
> print $f>CONES; <{0} {1} {2} {3} > <{0 1} {1 2} {2 3} {0 3} >
Combinatorics
These properties capture combinatorial information of the object. Combinatorial properties only depend on combinatorial data of the object like, e.g., the face lattice.

COMBINATORIAL_DIM
Combinatorial dimension of the fan.
 Type:
 Example:
The normal fan of the 6cube has combinatorial dimension 5:
> print normal_fan(cube(6))>COMBINATORIAL_DIM; 5

COMPLETE
The polyhedral fan is complete if its suport is the whole space. Due to undecidability issues this is checked heuristically only. See the remarks on SPHERE for details. Note that in the case of a polyhedral complex, this refers to the underlying fan, so should always be false.
 Type:
 Example:
The normal fan of a polytope always is complete; here we see this for the 8cube:
> print normal_fan(cube(8))>COMPLETE; true

CONES
List of all cones of the fan of each dimension. Indices refer to
RAYS
. Type:
 Example:
A fan constructed with a 2dimensional cone in
INPUT_CONES
also contains the incident 1dimensional cones.> $f = new PolyhedralFan(INPUT_RAYS=>[[1,0],[0,1]],INPUT_CONES=>[[0,1]]); > print $f>CONES; <{0} {1} > <{0 1} >

CONES_COMBINATORIAL_DIMS
The combinatorial dimensions of the cones.
 Type:

DUAL_GRAPH
The graph whose nodes are the maximal cones which are connected if they share a common facet. Only defined if
PURE
.

F2_VECTOR
f_{ik} is the number of incident pairs of idimensional cones and kdimensional cones; the main diagonal contains the
F_VECTOR
. Type:

F_VECTOR
f_{k} is the number of kdimensional cones starting from dimension k=1. The fvector of a polytope and the fvector of any of its face fans coincide; for the 3cube: > print face_fan(cube(3))→F_VECTOR;  8 12 6
 Type:

GRAPH
The graph of the fan intersected with a sphere, that is, the vertices are the rays which are connected if they are contained in a common twodimensional cone.

HASSE_DIAGRAM
 Type:
 Example:
To compute the Hasse diagram of the normal fan of the 2cube and display its decoration, we can do the following. Note the artificial node on top and the empty node at the bottom. The latter represents the trivial cone consisting only of the origin.
> $h = normal_fan(cube(2))>HASSE_DIAGRAM;
print $h→DECORATION;
 Methods of HASSE_DIAGRAM:

MAXIMAL_CONES
Non redundant list of maximal cones. Indices refer to
RAYS
. Cones which do not have any rays correspond to the trivial cone (contains only the origin). An empty fan does not have any cones. Type:
 Example:
The maximal cones of the normal fan of the 3cube describe which faces share a common vertex:
> print normal_fan(cube(3))>MAXIMAL_CONES; {0 2 4} {1 2 4} {0 3 4} {1 3 4} {0 2 5} {1 2 5} {0 3 5} {1 3 5}

MAXIMAL_CONES_COMBINATORIAL_DIMS
The combinatorial dimensions of the maximal cones.
 Type:
 Example:
Here we construct a fan with a 3dimensional and a 2dimensional maximal cone, of which the latter contains lineality, and then display the corresponding combinatorial dimensions:
> $f = new PolyhedralFan(INPUT_RAYS=>[[1,0,0],[0,1,0],[0,0,1],[1,0,0],[0,1,0]],INPUT_CONES=>[[0,1,2],[1,3,4]]); > print $f>MAXIMAL_CONES; {0 1 2} {3}
> print $f>MAXIMAL_CONES_COMBINATORIAL_DIMS; 2 0

MAXIMAL_CONES_INCIDENCES
Array of incidence matrices of all maximal cones. Indices refer to
RAYS
. Type:
 Example:
Here we construct a fan with a 3dimensional and a 2dimensional maximal cone and then display the incident cones:
> $f = new PolyhedralFan(INPUT_RAYS=>[[1,0,0],[0,1,0],[0,0,1],[1,0,0]],INPUT_CONES=>[[0,1,2],[1,3]]); > print $f>MAXIMAL_CONES; {0 1 2} {1 3}
> print $f>MAXIMAL_CONES_INCIDENCES; <{1 2} {0 2} {0 1} > <{1} {3} >

MAXIMAL_CONES_THRU_RAYS
Transposed to
MAXIMAL_CONES
. Notice that this is a temporary property; it will not be stored in any file. Type:

N_CONES
Number of
CONES
. Type:

N_MAXIMAL_CONES
Number of
MAXIMAL_CONES
. Type:
 Example:
The number of facets of a polytope is the same as the number of maximal cones of its face fan; here we can see this for the 3cube:
> print face_fan(cube(3))>N_MAXIMAL_CONES; 6

PURE
The polyhedral fan is pure if all maximal cones are of the same dimension.
 Type:
 Example:
Generating a fan from two distinct 2dimensional cones gives a pure fan:
> $f = new PolyhedralFan(INPUT_RAYS=>[[1,0],[0,1],[1,0],[0,1]],INPUT_CONES=>[[0,1],[2,3]]); > print $f>PURE; true
 Example:
Gnerating a fan from a 2dimensional and a 1dimensional cone results in the fan not being pure if the latter is a ray not contained in the former:
> $f = new PolyhedralFan(INPUT_RAYS=>[[1,1],[1,1],[0,1]],INPUT_CONES=>[[0,1],[2]]); > print $f>PURE; false

SIMPLICIAL
The polyhedral fan is simplicial if all maximal cones are simplicial.
 Type:
 Example:
The normal fan of a dcube is simplicial; here we see this for the 3cube:
> print normal_fan(cube(3))>SIMPLICIAL; true
Geometry
These properties capture geometric information of the object. Geometric properties depend on geometric information of the object, like, e.g., vertices or facets.

FACET_NORMALS
The possible facet normals of all maximal cones.
 Type:
Matrix<Scalar,NonSymmetric>
 Example:
The two facet normals of the complete fan dividing the plane into the four quadrants (which can be obtained by computing the normal fan of the 2cube) point in x and in ydirection, respectively:
> print normal_fan(cube(2))>FACET_NORMALS; 1 0 0 1

FAN_AMBIENT_DIM
Dimension of the space which contains the polyhedral fan. Note: To avoid confusion in context of (in)homogenuous coordinates it is generally advised to use the method
AMBIENT_DIM
. Type:
 Example:
The fan living in the plane containing only the cone which consists of the ray pointing in positive xdirection is by definition embedded in the plane:
> $f = new PolyhedralFan(INPUT_RAYS=>[[1,0]],INPUT_CONES=>[[0]]); > print $f>FAN_AMBIENT_DIM; 2

FAN_DIM
Dimension of the polyhedral fan. # Note: To avoid confusion in context of (in)homogenuous coordinates it is generally advised to use the method
DIM
. Type:
 Example:
The fan living in the plane containing only the cone which consists of the ray pointing in positive xdirection is 1dimensional:
> $f = new PolyhedralFan(INPUT_RAYS=>[[1,0]],INPUT_CONES=>[[0]]); > print $f>FAN_DIM; 1

FULL_DIM
A fan is fulldimensional if its dimension and ambient dimension coincide.
 Type:
 Example:
The normal fan of a polytope is always fulldimensional, which we see here for the 5dimensional cross polytope:
> $nf = normal_fan(cross(5)); > print $nf>FULL_DIM; true

LINEALITY_DIM
Dimension of the lineality space.

LINEALITY_SPACE
Since we do not require our cones to be pointed: a basis of the lineality space of the fan. Coexists with
RAYS
. Type:
Matrix<Scalar,NonSymmetric>
 Example:
We can create a fan in 3space from the two 2dimensional cones which are the (x,y) and (x,z)halfspaces where y and z are nonnegative, respectively. Both cones and thus the fan contain lineality in xdirection:
> $f = new PolyhedralFan(INPUT_RAYS=>[[1,0,0],[0,1,0],[0,0,1],[1,0,0]],INPUT_CONES=>[[0,1,3],[0,2,3]]); > print $f>LINEALITY_SPACE; 1 0 0

LINEAR_SPAN_NORMALS
The possible linear span normals of all maximal cones. Empty if
PURE
andFULL_DIM
, i.e. each maximal cone has the same dimension as the ambient space. Type:
Matrix<Scalar,NonSymmetric>
 Example:
We construct a fan in 3space with two 2dimensional maximal cones and a 1dimensional maximal cone. Note that there are two possible normals for the latter, but one of these also is a normal for one of the 2dimensional cones; thus we receive three normals:
> $f = new PolyhedralFan(INPUT_RAYS=>[[1,0,0],[0,1,0],[1,0,1],[1,1,0]],INPUT_CONES=>[[0,1],[1,2],[3]]); > print $f>LINEAR_SPAN_NORMALS; 0 0 1 1 0 1 1 1 0

MAXIMAL_CONES_FACETS
Tells for each maximal cone what are its facet normals, thus implying the facets. Each row corresponds to a maximal cone and each column to the row with the same index of
FACET_NORMALS
. A negative number means that the corresponding row ofFACET_NORMALS
has to be negated. Type:
 Example:
The two facet normals of the complete fan dividing the plane into the four quadrants (which can be obtained by computing the normal fan of the 2cube) point in x and in ydirection, respectively. Each quadrant has both of these as normals only differing by the combination of how they point in or outside:
> $f = normal_fan(cube(2)); > print $f>MAXIMAL_CONES; {0 2} {1 2} {0 3} {1 3}
> print rows_numbered($f>FACET_NORMALS); 0:1 0 1:0 1
> print $f>MAXIMAL_CONES_FACETS; 1 1 1 1 1 1 1 1

MAXIMAL_CONES_LINEAR_SPAN_NORMALS
Tells for each maximal cone what is its linear span by naming its normals. Indices refer to
LINEAR_SPAN_NORMALS
. Rows correspond toMAXIMAL_CONES
. An empty row corresponds to a fulldimensional cone. Type:
 Example:
We construct a fan in 3space with two 2dimensional maximal cones and a 1dimensional maximal cone. This way we receive two cones with one normal and one cone with two normals:
> $f = new PolyhedralFan(INPUT_RAYS=>[[1,0,0],[0,1,0],[1,0,1],[1,1,0]],INPUT_CONES=>[[0,1],[1,2],[3]]); > print $f>MAXIMAL_CONES; {0 1} {1 2} {3}
> print rows_numbered($f>LINEAR_SPAN_NORMALS); 0:0 0 1 1:1 0 1 2:1 1 0
> print $f>MAXIMAL_CONES_LINEAR_SPAN_NORMALS; {0} {1} {0 2}

N_FACET_NORMALS
The number of possible facet normals of all maximal cones.
 Type:
 Example:
The facets of the normal fan of the 3cube are each spanned by a ray pointing in positive or negative direction of one axis and another ray pointing in positive or negative direction of another axis; thus, the third axis is normal to this facet. This leaves us with three possible facet normals:
> print normal_fan(cube(3))>N_FACET_NORMALS; 3

N_INPUT_RAYS
Number of
INPUT_RAYS
. Type:
 Example:
To determine the combined amount of redundant and unused rays given by
INPUT_RAYS
, we compare this number toN_RAYS
:> $f = new PolyhedralFan(INPUT_RAYS=>[[1,0],[0,1],[1,0],[0,1],[2,0],[1,1]],INPUT_CONES=>[[0,1],[1,2],[2,3],[3,4]]); > print ($f>N_INPUT_RAYS$f>N_RAYS); 2

N_RAYS
Number of
RAYS
. Type:
 Example:
The number of facets of a polytope is the number of rays of the corresponding normal fan. Here we see this for the 3cube:
> print normal_fan(cube(3))>N_RAYS; 6

ORTH_LINEALITY_SPACE
A basis of the orthogonal complement to
LINEALITY_SPACE
. Type:
Matrix<Scalar,NonSymmetric>
 Example:
In 3space, we build a fan containing only the ray pointing in positive xdirection, together with lineality in ydirection. The definition of the cones yields no additional lineality, thus the orthogonal complement to the lineality space is spanned by (1,0,0) and (0,0,1):
> $f = new PolyhedralFan(INPUT_RAYS=>[[1,0,0]],INPUT_CONES=>[[0]],INPUT_LINEALITY=>[[0,1,0]]); > print $f>ORTH_LINEALITY_SPACE; 1 0 0 0 0 1

POINTED
A fan is pointed if the lineality space is trivial.
 Type:
 Example:
The normal fan of a polytope is pointed if and only if the polytope is fulldimensional. Here we confirm this for the normal fans of the 2cube living in 2 and in 3space, respectively:
> $nf_full = normal_fan(cube(2)); > print $nf_full>POINTED; true
> $nf_not_full = normal_fan(product(cube(2),new Polytope(POINTS=>[[1,0]]))); > print $nf_not_full>POINTED; false

PSEUDO_REGULAR
True if the fan is a subfan of a
REGULAR
fan Type:
 Example:
Here we build a fan in the plane with the nonnegative quadrant and the ray pointing in negative ydirection as its maximal cones. This is a subfan of the fan with all four quadrants as its maximal cones which is the normal fan of the 2cube; thus, our fan is pseudo regular:
> $f = new PolyhedralFan(INPUT_RAYS=>[[1,0],[0,1],[1,0]],INPUT_CONES=>[[0,1],[2]]); > print $f>PSEUDO_REGULAR; true

RAYS
Rays of the
PolyhedralFan
. Nonredundant. Coexists withLINEALITY_SPACE
. Type:
Matrix<Scalar,NonSymmetric>
 Example:
The rays of the face fan of a 3dimensioanl cube. This fan has one ray in the direcction of each vertex of the cube.
> print face_fan(cube(3))>RAYS; 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1

REGULAR
True if the fan is the normal fan of a bounded polytope.
 Type:
 Example:
The face fan of the centered ddimensional cross polytope w.r.t. the origin is the normal fan of the dcube; here we confirm the regularity of the face fan for d=7:
> print face_fan(cross(7))>REGULAR; true
 Example:
A normal fan always is complete; thus a fan which is not complete can not be regular:
> $f = new PolyhedralFan(INPUT_RAYS=>[[1,0],[0,1]],INPUT_CONES=>[[0,1]]); > print $f>REGULAR; false
Symmetry
These properties capture information of the object that is concerned with the action of permutation groups.

GROUP
 Type:
 Methods of GROUP:

REPRESENTATIVE_INPUT_CONES
explicit representatives of equivalence classes of
INPUT_CONES
under a group action
REPRESENTATIVE_INPUT_RAYS
explicit representatives of equivalence classes of
INPUT_RAYS
under a group action

 Properties of GROUP:

CONES_ORBIT_SIZES
Number of
CONES
in each orbit represented by the elements ofREPRESENTATIVE_CONES
. Type:

MATRIX_ACTION
 Type:
MatrixActionOnVectors<Scalar>

MAXIMAL_CONES_ACTION
 derived from:
 Type:
 Properties of MAXIMAL_CONES_ACTION:

REPRESENTATIVE_COMBINATORIAL_DIMS
dimensions of representatives of maximal cones
 Type:

REPRESENTATIVE_F_VECTOR
counts how many representatives of maximal cones there are in each dimension
 Type:


ORBITS_F_VECTOR
f_{k} is the number of kdimensional cones up to symmetry.
 Type:

REPRESENTATIVE_CONES
List of all cones of all dimensions of the fan, one from each orbit, sorted by dimension. Indices in the IncidenceMatrix's refer to
RAYS
. Type:

REPRESENTATIVE_MAXIMAL_CONES
One representative from every orbit of the
MAXIMAL_CONES
under the group action. Type:

REPRESENTATIVE_RAYS
One representative from every orbit of the
RAYS
under the group action. Type:
Matrix<Scalar,NonSymmetric>

Topology
The following properties are topological invariants.

HOMOLOGY
The homology of the intersection of the fan with the unit sphere. # @example When intersecting, the normal fan of the 3cube gives us a simplicial complex which is a topological 2sphere: > print normal_fan(cube(3))→HOMOLOGY;  ({} 0)  ({} 0)  ({} 1)
 Type:

INTERSECTION_COMPLEX
If the fan is
SIMPLICIAL
the simplicial complex obtained by intersecting the fan with the unit sphere. If the fan is notSIMPLICIAL
the crosscut complex of the intersection. Type:
 Example:
When intersecting, the normal fan of the 3cube gives us a simplicial complex which is a topological 2sphere:
> $ic = normal_fan(cube(3))>INTERSECTION_COMPLEX;
print $ic→SPHERE;
Toric Varieties
Properties coming from associated toric varieties

GORENSTEIN
A fan is Gorenstein if it is
Q_GORENSTEIN
withQ_GORENSTEIN_INDEX
equal to one. Type:

Q_GORENSTEIN
A fan is QGORENSTEIN if each maximal cone is Q_Gorenstein.
 Type:

Q_GORENSTEIN_INDEX
If a fan is
Q_GORENSTEIN
, then its QGorenstein index is the least common multiple of the QGorenstein indices of its maximal cones. Otherwise Q_GORENSTEIN_INDEX is undefined. Type:

SMOOTH_FAN
A fan is smooth if all cones of the fan are smooth.
 Type:
Visualization
These properties are for visualization.

INPUT_RAY_LABELS
Unique names assigned to the
INPUT_RAYS
. Similar toRAY_LABELS
forRAYS
. Type:

MAXIMAL_CONE_LABELS
Unique names assigned to the
MAXIMAL_CONES
. Similar toRAY_LABELS
forRAYS
. Type:

RAY_LABELS
Unique names assigned to the
RAYS
. If specified, they are shown by visualization tools instead of vertex indices. For a polyhedral fan built from scratch, you should create this property by yourself, either manually in a text editor, or with a client program. Type:
 Example:
The normal fan of the 2cube has 4 rays; to assign the labels 'a', 'b' and 'any label' to the first three entries of
RAYS
, do this (note that the unspecified label of the last ray is blank when visualizing, and that, depending on your visualization settings, not the whole string of the third label might be displayed):> $f = normal_fan(cube(2)); > $f>RAY_LABELS=['a','b','any label'];
Methods
Combinatorics
These methods capture combinatorial information of the object. Combinatorial properties only depend on combinatorial data of the object like, e.g., the face lattice.

CONES_DIMS()
The dimensions of the cones.
 Returns:

cone(Int i)
Returns the ith maximal cone.
 Parameters:
Int
i
 Returns:
 Example:
To obtain the cone generated by the x, y and zaxis, we can take the first cone of the normal fan of the 3cube:
> $c = normal_fan(cube(3))>cone(0); > print $c>RAYS; 1 0 0 0 1 0 0 0 1

cones_of_dim(Int k)
Returns an incidence matrix containing the cones of dimension k
Geometry
These methods capture geometric information of the object. Geometric properties depend on geometric information of the object, like, e.g., vertices or facets.

AMBIENT_DIM()
Returns the dimension of the ambient space.
 Returns:
 Example:
The fan living in the plane containing only the cone which consists of the ray pointing in positive xdirection is by definition embedded in the plane:
> $f = new PolyhedralFan(INPUT_RAYS=>[[1,0]],INPUT_CONES=>[[0]]); > print $f>AMBIENT_DIM; 2

DIM()
Returns the dimension of the linear space spanned by the fan.
 Returns:
 Example:
The fan living in the plane containing only the cone which consists of the ray pointing in positive xdirection is 1dimensional:
> $f = new PolyhedralFan(INPUT_RAYS=>[[1,0]],INPUT_CONES=>[[0]]); > print $f>DIM; 1
Visualization
These methods are for visualization.

VISUAL()
Visualizes the fan, intersected with the unit ball.
 Options:
 option list
geometric_options_linear
 Returns: