Macaulay2 » Documentation
Packages » OldPolyhedra :: isPure
next | previous | forward | backward | up | index | toc

isPure -- checks if a Fan or PolyhedralComplex is of pure dimension

Synopsis

Description

isPure tests if the Fan/PolyhedralComplex is pure by checking if the first and the last entry in the list of generating Cones/Polyhedra are of the same dimension.

Let us construct a fan consisting of the positive orthant and the ray v that is the negative sum of the canonical basis, which is obviously not pure:
i1 : C = posHull matrix {{1,0,0},{0,1,0},{0,0,1}}

o1 = {ambient dimension => 3           }
      dimension of lineality space => 0
      dimension of the cone => 3
      number of facets => 3
      number of rays => 3

o1 : Cone
i2 : v = posHull matrix {{-1},{-1},{-1}}

o2 = {ambient dimension => 3           }
      dimension of lineality space => 0
      dimension of the cone => 1
      number of facets => 1
      number of rays => 1

o2 : Cone
i3 : F = fan {C,v}

o3 = {ambient dimension => 3         }
      number of generating cones => 2
      number of rays => 4
      top dimension of the cones => 3

o3 : Fan
i4 : isPure F

o4 = false

But we can make a pure fan if we choose any two dimensional face of the positive orthant and take the cone generated by this face and v and add it to the cone:
i5 : C1 = posHull{(faces(1,C))#0,v}

o5 = {ambient dimension => 3           }
      dimension of lineality space => 0
      dimension of the cone => 3
      number of facets => 3
      number of rays => 3

o5 : Cone
i6 : F = addCone(C1,F)

o6 = {ambient dimension => 3         }
      number of generating cones => 2
      number of rays => 4
      top dimension of the cones => 3

o6 : Fan
i7 : isPure F

o7 = true

Ways to use isPure :

For the programmer

The object isPure is a method function.