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

# isComplete -- checks completeness of a Fan or PolyhedralComplex

- Usage:
    `b = isComplete X`
- Inputs:
  - X, an instance of the type Fan, or an instance of the type PolyhedralComplex
- Outputs:
  - b, a Boolean value, true if the Fan/PolyhedralComplex is complete, false otherwise

## Description

isComplete just calls an entry in the hash table of the Fan. The check for completeness is done while generating the fan. Whenever a full dimensional Cone is added (see fan or addCone) the set of faces of codimension 1 that appear only in one full dimensional Cone is updated. The Fan is then complete if and only if this set is empty and there is at least one full dimensional Cone.

For a PolyhedralComplex the function does the same. Just note, that a complete polyhedral complex must contain non-compact polyhedra.

    i1 : C1 = posHull matrix {{1,0},{0,1}};

    i2 : C2 = posHull matrix {{1,-1},{0,-2}};

    i3 : C3 = posHull matrix {{0,-2},{1,-1}};

    i4 : F = fan {C1,C2,C3}

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

    o4 : Fan

    i5 : isComplete F

    o5 = false

Hence the fan above is not complete, but we can add the missing cone:

    i6 : C4 = posHull matrix {{-1,-2},{-2,-1}};

    i7 : F = addCone(C4,F)

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

    o7 : Fan

    i8 : isComplete F

    o8 = true

## Ways to use isComplete:

- `isComplete(Fan)`
- `isComplete(PolyhedralComplex)`

## For the programmer

The object isComplete is a method function.

The source of this document is in /build/macaulay2-88fgJW/macaulay2-1.25.11+ds/M2/Macaulay2/packages/OldPolyhedra.m2:5600:0.