Macaulay2 » Documentation
Packages » LatticePolytopes :: areIsomorphic
next | previous | forward | backward | up | index | toc

# areIsomorphic -- checks if two smooth polytopes are isomorphic

- Usage:
    `areIsomorphic(P,Q),`
    `areIsomorphic(M,N)`
- Inputs:
  - P, a convex polyhedron,
  - Q, a convex polyhedron,
  - M, a matrix,
  - N, a matrix,
- Optional inputs:
  - smoothTest (missing documentation) => ..., default value true,
- Outputs:
  - a Boolean value,

## Description

Checks if two smooth polytopes P and Q are isomorphic, i.e. checks if there exist a unitary matrix A with integer entries and a vector v such that Q=A*P+v. Currently the function only works on smooth polytopes.

    i1 : P=convexHull(matrix{{0,1}});

    i2 : Q=convexHull(matrix{{0,2}});

    i3 : areIsomorphic(P,Q)

    o3 = false

As a standard, areIsomorphic will check if the polytopes are smooth first. This takes some time, so if one is sure that they are smooth then it is possible to suppress this test.

    i4 : M = transpose matrix{{0,0,0},{1,0,0},{0,1,0},{0,0,1},{1,1,0},{1,0,1},{0,1,1},{1,1,1}}

    o4 = | 0 1 0 0 1 1 0 1 |
         | 0 0 1 0 1 0 1 1 |
         | 0 0 0 1 0 1 1 1 |

                  3       8
    o4 : Matrix ZZ  <-- ZZ

    i5 : P = convexHull(M);

    i6 : time areIsomorphic(P,P);
     -- used 0.527081s (cpu); 0.440452s (thread); 0s (gc)

    i7 : time areIsomorphic(P,P,smoothTest=>false);
     -- used 0.381602s (cpu); 0.292022s (thread); 0s (gc)

## Ways to use areIsomorphic:

- `areIsomorphic(Matrix,Matrix)`
- `areIsomorphic(Polyhedron,Polyhedron)`

## For the programmer

The object areIsomorphic is a method function with options.

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