# ReflexivePolytopesDB -- simple access to Kreuzer-Skarke database of reflexive polytopes of dimensions 3 and 4

## Description

In each given dimension $d$, it is known that the number of distinct (up to invertible integral change of basis) reflexive polytopes of dimension $d$ is finite in number. For example, in dimension 1 there is 1, in dimension 2, there are 16, in dimension 3, there are 4319 distinct reflexive polytopes.

In a major work, Max Kreuzer and Harold Skarke found algorithms for computing the set of such polytopes. They used these algorithms to show that there are 473,800,776 distinct 4-dimensional reflexive polytopes. The number is sufficiently large that they created a website http://hep.itp.tuwien.ac.at/~kreuzer/CY/ and an interface to access these examples. See their website for references to the algorithms used.

This package, ReflexivePolytopesDB, provides access to this database of reflexive polytopes of dimension 3 and dimension 4.

This package also contains a small part of this database for offline use, in case one cannot access the database.

Here we describe a simple use of the package. The actual investigation of the corresponding polytope or toric variety, or Calabi-Yau hypersurface, is done in Macaulay2 with the aid of other packages, such as Polyhedra and NormalToricVarieties.

Let's take one example polytope from the database, one whose corresponding Calabi-Yau 3-fold has Hodge numbers $h^{1,1}(X) = 9$ and $h^{1,2}(X) = 21$.

 i1 : topes = kreuzerSkarke(9, 21); using offline data file: ks9+21-n10.txt

This returns a list of single entries from the Kreuzer-Skarke database. Each one is essentially a string, containing a description line, together with the vertices of the corresponding polytope.

In Macaulay2, each entry is an object of class KSEntry (meaning: Kreuzer-Skarke database entry). Use matrix(KSEntry) to create the matrix whose columns are the vertices of the reflexive polytope. Use description(KSEntry) to see the associated description from the database (see Kreuzer-Skarke description headers for the description of the format of this description).

 i2 : topes_1 o2 = 4 7 M:26 7 N:12 6 H:9,21 [-24] id:1 1 1 0 0 -4 0 2 0 3 0 0 -6 3 6 0 0 1 1 -1 -2 -1 0 0 0 2 -2 -1 1 o2 : KSEntry i3 : A = matrix topes_1 o3 = | 1 1 0 0 -4 0 2 | | 0 3 0 0 -6 3 6 | | 0 0 1 1 -1 -2 -1 | | 0 0 0 2 -2 -1 1 | 4 7 o3 : Matrix ZZ <--- ZZ i4 : description topes_1 o4 = 4 7 M:26 7 N:12 6 H:9,21 [-24] id:1

The corresponding reflexive polytope has 7 vertices, the columns of this matrix.

 i5 : needsPackage "Polyhedra" o5 = Polyhedra o5 : Package i6 : P = convexHull A o6 = P o6 : Polyhedron i7 : assert isReflexive P i8 : P2 = polar P o8 = P2 o8 : Polyhedron i9 : (numColumns vertices P, numColumns vertices P2) o9 = (7, 6) o9 : Sequence i10 : (# latticePoints P, # latticePoints P2) o10 = (26, 12) o10 : Sequence

We can process many examples at one time, using the list facilities in Macaulay2. For instance, use List / Function to apply matrix to each element of the list, returning a list of the resulting matrices:

 i11 : L = topes/matrix; i12 : netList L +-----------------------------+ o12 = || 1 0 0 2 -4 | | || 0 1 1 5 -7 | | || 0 0 3 0 -3 | | || 0 0 0 6 -6 | | +-----------------------------+ || 1 1 0 0 -4 0 2 | | || 0 3 0 0 -6 3 6 | | || 0 0 1 1 -1 -2 -1 | | || 0 0 0 2 -2 -1 1 | | +-----------------------------+ || 1 0 0 -1 1 -1 | | || 0 1 1 2 0 -4 | | || 0 0 3 3 0 -6 | | || 0 0 0 0 3 -3 | | +-----------------------------+ || 1 0 0 0 -3 -3 3 | | || 0 1 1 0 2 0 -4 | | || 0 0 3 0 3 0 -6 | | || 0 0 0 1 -1 -2 2 | | +-----------------------------+ || 1 0 0 0 -2 -4 4 -4 | | || 0 1 0 0 -2 -2 2 -3 | | || 0 0 1 1 1 3 -5 2 | | || 0 0 0 2 2 4 -6 3 | | +-----------------------------+ || 1 0 0 1 -2 -1 1 -1 -1 3 || || 0 1 0 0 0 2 -2 0 0 -3 || || 0 0 1 0 0 -1 1 1 -1 1 || || 0 0 0 2 -1 -1 -1 -1 1 0 || +-----------------------------+ || 1 0 0 0 2 0 0 -1 -3 | | || 0 1 1 0 -1 -1 -1 -1 3 | | || 0 0 2 0 -1 -1 1 -2 0 | | || 0 0 0 1 -1 1 -1 1 1 | | +-----------------------------+ || 1 0 1 0 -2 -1 -1 1 -1 3 || || 0 1 0 0 1 2 0 -2 0 -3 || || 0 0 2 0 -2 -1 -1 -1 1 0 || || 0 0 0 1 0 -1 1 1 -1 1 || +-----------------------------+ || 1 0 0 -1 0 0 1 -4 3 -6 | | || 0 1 0 1 0 1 1 0 -1 -2 | | || 0 0 1 1 0 1 -2 4 -2 4 | | || 0 0 0 0 1 0 -1 1 -1 1 | | +-----------------------------+ || 1 0 0 1 1 0 -2 4 -2 0 || || 0 1 0 0 -1 0 3 -4 1 -2 || || 0 0 1 -1 0 0 1 -4 3 -2 || || 0 0 0 0 0 1 -1 1 -1 1 || +-----------------------------+

## Version

This documentation describes version 1.0 of ReflexivePolytopesDB.

## Source code

The source code from which this documentation is derived is in the file ReflexivePolytopesDB.m2. The auxiliary files accompanying it are in the directory ReflexivePolytopesDB/.

## Exports

• Types
• KSEntry -- an entry from the Kreuzer-Skarke database of dimension 3 and 4 reflexive polytopes
• Functions and commands
• availableOffline -- which Kreuzer-Skarke items are available offline
• description -- the description header
• generateOffline -- generate tables of reflexive 4d polytopes from the Kreuzer-Skarke list
• kreuzerSkarke -- access Kreuzer-Skarke dimension 4 reflexive polytopes database
• kreuzerSkarkeDim3 -- the list of 4319 dimension 3 reflexive polytopes in the Kreuzer-Skarke database
• matrixFromString -- convert a string to a matrix of integers
• onlineTests -- run a few tests which test access to the Kreuzer-Skarke database
• Methods
• "description(KSEntry)" -- see description -- the description header
• "generateOffline(ZZ)" -- see generateOffline -- generate tables of reflexive 4d polytopes from the Kreuzer-Skarke list
• "generateOffline(ZZ,ZZ)" -- see generateOffline -- generate tables of reflexive 4d polytopes from the Kreuzer-Skarke list
• "kreuzerSkarke(String)" -- see kreuzerSkarke -- access Kreuzer-Skarke dimension 4 reflexive polytopes database
• "kreuzerSkarke(ZZ)" -- see kreuzerSkarke -- access Kreuzer-Skarke dimension 4 reflexive polytopes database
• "kreuzerSkarke(ZZ,ZZ)" -- see kreuzerSkarke -- access Kreuzer-Skarke dimension 4 reflexive polytopes database
• matrix(KSEntry) -- convert a Kreuzer-Skarke entry to a matrix of integers
• "matrixFromString(String)" -- see matrixFromString -- convert a string to a matrix of integers
• toExternalString(KSEntry) -- a string suitable for input to Macaulay2
• toString(KSEntry) -- the underlying string of a KSEntry
• Symbols
• "Expected" -- see generateOffline -- generate tables of reflexive 4d polytopes from the Kreuzer-Skarke list
• "Access" -- see kreuzerSkarke -- access Kreuzer-Skarke dimension 4 reflexive polytopes database
• "DualLatticePoints" -- see kreuzerSkarke -- access Kreuzer-Skarke dimension 4 reflexive polytopes database
• "Facets" -- see kreuzerSkarke -- access Kreuzer-Skarke dimension 4 reflexive polytopes database
• "H12" -- see kreuzerSkarke -- access Kreuzer-Skarke dimension 4 reflexive polytopes database
• "LatticePoints" -- see kreuzerSkarke -- access Kreuzer-Skarke dimension 4 reflexive polytopes database
• "Vertices" -- see kreuzerSkarke -- access Kreuzer-Skarke dimension 4 reflexive polytopes database

## For the programmer

The object ReflexivePolytopesDB is .