Macaulay2 » Documentation
Packages » Polyhedra :: 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 = coneFromVData matrix {{1,0,0},{0,1,0},{0,0,1}}

o1 = C

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

o2 = v

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

o3 = F

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 = coneFromVData (rays C)_((faces(1,C))#0)

o5 = C1

o5 : Cone
i6 : C1 = coneFromVData(C1, v)

o6 = C1

o6 : Cone
i7 : F = addCone(C1,F)

o7 = F

o7 : Fan
i8 : isPure F

o8 = true

Ways to use isPure:

For the programmer

The object isPure is a method function.