Documentation for poly.x-2.0

From Palp
Revision as of 17:18, 9 September 2011 by Skarke (Talk | contribs)

Jump to: navigation, search

poly.x is the application that makes PALP's core routines for analyzing polytopes available to users. 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 line 2191 of 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, -C1, -C2

???

-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

-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

-L

-U, -C1, -C2

???

-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.

Personal tools
Namespaces

Variants
Actions
Navigation
Tools