Documentation for poly.x-2.0

From Palp
Jump to: navigation, search

poly.x is the application that makes PALP's core routines for analyzing polytopes available to users. Many of these routines are listed and documented in the header file Global.h.

Contents

Help screens

The standard help screen for poly.x is

poly.x -h
This is ``poly.x'':  computing data of a polytope P
Usage:   poly.x [-<Option-string>] [in-file [out-file]]
Options (concatenate any number of them into <Option-string>):
  h  print this information            | n  do not complete polytope or      
  f  use as filter                     |      calculate Hodge numbers        
  g  general output:                   | i  incidence information            
     P reflexive: numbers of (dual)    | s  check for span property          
       points/vertices, Hodge numbers  |      (only if P from CWS)           
     P not reflexive: numbers of       | I  check for IP property            
       points, vertices, equations     | S  number of symmetries             
  p  points of P                       | T  upper triangular form	       
  v  vertices of P                     | N  normal form                      
  e  equations of P/vertices of P-dual | t  traced normal form computation   
  m  pairing matrix between vertices   | V  IP simplices among vertices of P*
       and equations                   | P  IP simplices among points of P*  
  d  points of P-dual                  |      (with 1<=codim<=# when # is set)
       (only if P reflexive)           | Z  lattice quotients for IP simplices
  a  all of the above except h,f       | #  #=1,2,3  fibers spanned by IP    
  l  LG-`Hodge numbers' from single    |      simplices with codim<=#        
       weight input                    | ## ##=11,22,33,(12,23): all (fibered)
  r  ignore non-reflexive input        |      fibers with specified codim(s) 
  D  dual polytope as input (ref only) |    when combined: ### = (##)#       
Input:    degrees and weights `d1 w11 w12 ... d2 w21 w22 ...'
          or `d np' or `np d' (d=Dimension, np=#[points]) and
              (after newline) np*d coordinates
Output:   as specified by options

Each of the options listed in this screen is described in more detail in the original PALP paper on pages 5 to 7.

The other help screen is

poly.x -x
Test/new options:   A  affine normal form
                    B  Barycenter and lattice volume [# ... points at deg #]
                    F  print all facets
                    G  Gorenstein: divisible by I>1
                    L  like 'l' with Hodge data for twisted sectors
                    U  fano only: unimodular (&simplicial) facets
                    C1 conifold CY (unimod with square codim 2 faces
                    C2 conifold FANO (divisible by 2 & basic 2 faces
		    z  fatness (4d)

Some options in detail

In the following we concentrate on the options listed via 'poly.x -x' because the others are described in the paper.

-A

Apparently this option does for polytopes that need not have the IP property what the option '-N' does for IP polytopes: given an arbitrary lattice polytope, its 'affine normal form' (a polytope in {\mathbb Z}^n isomorphic to the original polytope, such that the normal forms of any two isomorphic polytopes coincide) is computed.

-B

For a given polytope its volume (normalized such that the standard simplex has volume 1) and the coordinates of its barycentre are displayed. It seems that there is something wrong with the normalization of the result, which can be remedied by replacing

printf(")/%ld\n",vol);

at the end of the third line of the routine 'LatVol_IPs_degD' in Polynf.c by

printf(")/%ld\n",Z);

Apparently if an integer n is specified after the '-B', the polytope is interpreted as the origin and the first level of a Gorenstein cone. The points of the cone up to level n are computed and displayed together with information on the type of face of the cone they represent (w.r.t. codimension, i.e. the origin has maximal codimension and points interior to the cone have cd=0).

Example:

palp$ poly.x -B2
Degrees and weights  `d1 w11 w12 ... d2 w21 w22 ...'
  or `#lines #columns' (= `PolyDim #Points' or `#Points PolyDim'):
3 2
Type the 6 coordinates as #pts=3 lines with dim=2 columns:
0 0
0 1
1 0
vol=1, baricent=(1,1)/1
IPs:
 0 0  cd=2
 0 1  cd=1
 0 2  cd=1
 1 0  cd=1
 1 1  cd=0
 2 0  cd=1

-F

Each facet of a polytope is displayed by listing its vertices in some basis for the sublattice carrying the facet. The result is not the affine normal form of the facet, however.

-G

If the input polytope P is a non-trivial multiple P=gQ of another polytope Q, the maximal proportionality factor g and P are displayed.

-L

This option results in the same calculations as the '-l' option from the 'poly.x -h' screen (see the paper for a description), but gives a more detailed output.

-U

If '-U' is specified without a number following (otherwise see below), it is computed whether the N lattice polytope has only simplicial facets; if this is not the case no further computations are performed on the polytope and no output results from it.

-U1

Like '-U' without number, but the facets now have to be unimodular (i.e. of volume 1). This corresponds to the case of Fano varieties.

-U5

This option is related to the classification of Fano polytopes (unimodular and simplicial reflexive polytopes) up to dimension five (see "http://arxiv.org/abs/math/0702890" by Batyrev, Kreuzer, Nill). The corresponding data supplement, which contains examples of the usage of '-U5', can be found here.

-C1

This option was implemented for a search of Calabi-Yau threefolds which are related to previously known ones via conifold transitions. This is discussed in arXiv:0802.3376. The use of PALP to produce the results of the paper is described here. The input is a 4-dimensional reflexive polytope P (in the M-lattice) such that P^* (in the N-lattice) has only basic triangles or squares as two-dimensional faces. In this case, the associated generic CY-hypersurface has isolated conifold singularities. The option -C1 checks whether this 3-dimensional CY is smoothable.

-C2

The option -C2 was used to generate three-dimensional Fano hypersurfaces with conifold singularities for the (unpublished) paper "Fano Hypersurfaces with Conifold Singularities" by Batyrev, Kreuzer and Nill, as described here. Apparently the input must be a reflexive 4-polytope that is divisible by 2, in which case the generic hypersurface associated to P/2 is a three-dimensional Fano variety. A list of (hopefully all) such polytopes is Reflexive2x.4d.gz. It is not clear how Max obtained this list. Possibly he piped an extraction of the complete database of reflexive 4-polytopes through 'poly.x -G' and then used some script to eliminate polytopes that are odd multiples of other polytopes. It also seems that the program requires the input to be in matrix (rather than weight) format.

Example: 'poly.x -C2' with input '8 1 1 1 1 4' crashes, but with the corresponding matrix input one gets

poly.x -C2
Degrees and weights  `d1 w11 w12 ... d2 w21 w22 ...'
  or `#lines #columns' (= `PolyDim #Points' or `#Points PolyDim'):
4 5
Type the 20 coordinates as dim=4 lines with #pts=5 columns:
   -1    7   -1   -1   -1
   -1   -1    7   -1   -1
   -1   -1   -1    7   -1
   -1   -1   -1   -1    1
pic=1  deg=64  h12= 0  rk=0 #sq=0 #dp=0 py=1  F=5 10 10 5 #Fano=1
4 5  Vertices of P* (N-lattice)    M:201 5 N:7 5
 1  0  0  0 -1
 0  0  1  0 -1
 0  1  0  0 -1
 0  0  0  1 -4
P/2: 36 points (5 vertices) of P'=P/2 (M-lattice):
P/2:  0  4  0  0  0   0  0  0  0  0  0  0  0  0  0  0  0  1  1  1  1  1  1  1  1  1  1  2  2  2  2  2  2  3  3  3
P/2:  0  0  4  0  0   1  2  3  0  1  2  3  0  1  2  0  1  0  1  2  3  0  1  2  0  1  0  0  1  2  0  1  0  0  1  0
P/2:  0  0  0  4  0   0  0  0  1  1  1  1  2  2  2  3  3  0  0  0  0  1  1  1  2  2  3  0  0  0  1  1  2  0  0  1
P/2:  0  0  0  0  1   0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0

-z

This application requires four dimensional polytopes as input and computes the numbers of faces of various dimensions as well as the quotient (f1+f2)/(f0+f3) (with f0 for vertices, f1 for edges, etc.).

Strategy for future versions

The following lines of code in poly.c correspond to the new ('-x') options.

int  SimpUnimod(PolyPointList *P,VertexNumList *V,EqList *E);
int  ConifoldSing(PolyPointList *P,VertexNumList *V,EqList *E,
        PolyPointList *dP,EqList *dE,int CYorFANO);
void Print_if_Divisible(PolyPointList *P,VertexNumList *V);

#define MaxFatPoly_2_stderr     (1)
void EPrint_VL(PolyPointList *_P, VertexNumList *V,double f);
...
      if(c=='L') lg=2;
      if(c=='U') U=1;
      if(c=='C') U=2;
... 
    if (U) {if (U==1) {if(!SimpUnimod(_P,&V,E))continue;} else {
        VNL_to_DEL(_P,&V,DE); if(!ConifoldSing(_P,&V,E,_DP,DE,dd))continue;}}
...
    if(G) Print_if_Divisible(_P,&V);
    if(B){void LatVol_IPs_degD(PolyPointList *,VertexNumList *,EqList *,int);
        LatVol_IPs_degD(_P,&V,E,CD);}/* Volume, if(CD>0){(I)PS at CD*Poly} */
    if(F) {void Print_Facets(PolyPointList *,VertexNumList *,EqList *);
        Print_Facets(_P,&V,E);} 
    if(A) {void Make_ANF(PolyPointList *,VertexNumList *,EqList*,
        Long ANF[][VERT_Nmax]);
        Long ANF[POLY_Dmax][VERT_Nmax];
        Make_ANF(_P,&V,E,ANF); Print_Matrix(ANF, _P->n, V.nv,"");}
    if(z){
          int CodimTwoFaceNum(PolyPointList *,VertexNumList *,EqList*);
          int f3=E->ne,f2=CodimTwoFaceNum(_P,&V,E),f1=f2-f3+V.nv,f0=V.nv;
          static double fmax; double f=f1+f2; f/=f0+f3; assert(_P->n==4);
          if(fmax<=f) {fmax=f;if(MaxFatPoly_2_stderr)EPrint_VL(_P,&V,f);}
          printf("Flag=(%d,%d,%d,%d), Phi=%g<=%g\n",f0,f1,f2,f3,f,fmax);}]

Quite a number of functions ('SimpUnimod', 'ConifoldSing', 'Print_if_Divisible', 'EPrint_VL', 'LatVol_IPs_degD', 'Print_Facets', 'Make_ANF', 'CodimTwoFaceNum') that are not listed in header files are introduced here. All of them come from Polynf.c. Let us discuss them together with the applications they define.

-A

This option is realized by the routine 'Make_ANF' which seems to work well, so I suggest to include it in Global.h.

-B

This option calls the function 'LatVol_IPs_degD' which starts as

void LatVol_IPs_degD(PolyPointList *P,VertexNumList *V,EqList *E,int g)
{    Long vB[POLY_Dmax],vol,Z; int e,j;
     vol=LatVol_Barycent(P,V,vB,&Z); printf("vol=%ld, baricent=(",vol); 
     for(j=0;j<P->n;j++)printf("%s%ld",j?",":"",vB[j]); printf(")/%ld\n",vol);
     if(g)
     {  PolyPointList *gP = (PolyPointList *) malloc(sizeof(PolyPointList));
...
}

In order to separate computation from output one could include the function 'LatVol_Barycent' in Global.h, as well as a function that implements the contents of the block after 'if(g)' ('g' denotes the number that can be specified after '-B').

-F

This option is realized by the function 'Print_Facets' which represents every facet as a polytope of one dimension less and then prints it. It would be preferable to separate computation and output, so I suggest to replace this by a function 'Make_Facet' (to be listed in Global.h).

-G

The routine 'Print_if_Divisible' which currently realizes this option is given by

void Print_if_Divisible(PolyPointList *P,VertexNumList *V)
{    char divi[99]; Long g=Divisibility_Index(P,V); if(g<2) return; 
     sprintf(divi,"divisible by factor=%ld",g); Print_VL(P,V,divi);
}

I suggest to list the underlying function 'Divisibility_Index' in Global.h and to place the contents of 'Print_if_Divisible' directly into poly.c.

-L

Can be turned into a standard option without modification of any header file.

-U

Apparently the function 'SimpUnimod' that is called if '-U' is specified computes whether all facets of the N lattice polytope are simplicial or even unimodular. Unfortunately the number of parameters of the function seems to differ between 'Polynf.c' and 'poly.c'!

Deactived option -U5: This may be one explanation why where are different parameters?! In the paper "http://arxiv.org/abs/math/0702890" an algorithm is described how to classify Fano polytopes (unimodular and simplicial reflexive polytopes) up to dimension five. This algorithm was implemented in PALP. The data supplement can be found in "http://hep.itp.tuwien.ac.at/~kreuzer/CY/math/0702890/"; in particular, there are examples of the usage of -U5. The corresponding procedures were written by Max and Benjamin Nill and can be found at the end of Polynf.c starting from line 2386 (#define TESTfano 0).

-C1, -C2

The routine 'ConifoldSing' which implements these options should be listed in Global.h.

-z

This option seems to be very specialized. As it could easily be reproduced, there is probably no harm in eliminating it from poly.x.

Bugs/Problems

One of the core routines in Polynf.c is 'Aux_Make_Poly_NF', which (apparently) converts a matrix into upper triangular form; 'Aux_Make_Poly_NF' is the routine called by 'Make_Poly_UTriang' which is listed in Global.h. It seems that Max wrote two distinct routines

int  GLZ_Make_Trian_NF(Long X[][VERT_Nmax], int *n, int *nv,
		       GL_Long G[POLY_Dmax][POLY_Dmax]);    /* current=best */

int  SL2Z_Make_Poly_NF(Long X[][VERT_Nmax], int *n, int *nv,
		       SL_Long S[POLY_Dmax][POLY_Dmax]);    /* previous=bad */

with that functionality; 'Aux_Make_Poly_NF' in the present version just calls 'GLZ_Make_Trian_NF' and compares it to the older 'SL2Z_Make_Poly_NF' if a corresponding precompiler option 'TEST_GLZ_VS_SL' is set (which it is not, by default). While trying to separate computation and output for the '-T' option of poly.x, I (HS) encountered serious problems that I could eventually trace to 'Aux_Make_Poly_NF' by turning on the comparison. In this case it appears that the older 'SL2Z_Make_Poly_NF' gives the correct result and the newer 'GLZ_Make_Trian_NF' is wrong. The problems occurred for cases where the matrix was square rather than rectangular with more columns than lines; it is to be hoped that otherwise computations are correct. In the present case I solved the problem by introducing a function 'SL2Z_Aux_Make_Poly_NF' (which, of course, calls 'SL2Z_Make_Poly_NF') and using it in the place of 'Aux_Make_Poly_NF'. If similar troubles occur again, a good strategy would be to first turn on 'TEST_GLZ_VS_SL'. If this shows that indeed the problem comes from 'Aux_Make_Poly_NF' one could try to solve it by substituting occurrences of 'Aux_Make_Poly_NF' by 'SL2Z_Aux_Make_Poly_NF' again.

Personal tools
Namespaces

Variants
Actions
Navigation
Tools