

GROWI - A computer program for the calculation of Gromov-Witten invariants
--------------------------------------------------------------------------



Author: Andreas Gathmann <gathmann@mathematik.uni-kl.de>
Home page: http://www.mathematik.uni-kl.de/~gathmann/
           http://www.mathematik.uni-kl.de/~gathmann/en/growi/



GROWI is a C++ program for the computation of Gromov-Witten invariants.
The current version 1.0 can compute:
 - (Absolute) Gromov-Witten invariants of projective spaces in any genus,
 - (Absolute) Gromov-Witten invariants of any hypersurface in a projective
   space in genus 0,
 - Relative Gromov-Witten invariants of projective spaces relative any
   hypersurface in genus 0.
"Descendants" can be used in all these invariants.



EXAMPLES:

Computation of a single Gromov-Witten invariant:

  $ growi lines in cubic surface
  27
  $ growi elliptic cubics in P^2 thru H^2:9
  1
  $ growi G=2,D=5 in P^4 thru H^3*psi^22
  -41369/110075314176

Writing a C++ program that uses the GROWI functions: with the following
file test.cm

  // Elliptic space curves of degree d through 2d points

  int main (int argc, char *argv[])
  {
      rational n0,n1;

      for (int d=1; d<=8; d++) {
          n0 = GW (rational D=d in P^3 thru H^3:2*d);
          n1 = GW (elliptic D=d in P^3 thru H^3:2*d);
          cout << d << : << n1+(2*d-1)/12*n0 << endl;
      }
  }

one gets

  $ growi test.cm
  1: 0
  2: 0
  3: 0
  4: 1
  5: 42
  6: 2860
  7: 225734
  8: 23276160



SYSTEM REQUIREMENTS:

GROWI was developed on a Linux system running Debian stable 3.0 (woody) with
the GNU C++ compiler version 2.95.4. It should run on any UNIX system with C++
compiler, GNU MP library (version 4.x.x) and GNU DBM library.



REMARKS:

GROWI is free software distributed under the GPL (GNU General Public License).

The calculation of invariants in high degree and/or genus might need VERY
large amounts of memory and/or computation time.

For the computations GROWI uses the methods of
  - A. Gathmann, Absolute and relative Gromov-Witten invariants of very
    ample hypersurfaces, Duke Mathematical Journal 115 (2002) no. 2, 171-203,
    e-print math.AG/9908054
  - A. Gathmann, Topological recursion relations and Gromov-Witten
    invariants in higher genus, e-print math.AG/0305361

If you find a bug / don't believe a number that GROWI computes / have any
questions, comments or suggestions, please let me
(<gathmann@mathematik.uni-kl.de>) know!



INSTALLATION INSTRUCTIONS:

1. Before you start you have to decide where to store the program and the data
   it generates. You need two directories (they can be identical):
   a) the directory to store the program files. We will call this PROGDIR in
      the following instructions. The default is /usr/local, which works only
      if you have root privileges. As a normal user, /your/home/directory/growi
      might be a good choice.
   b) the directory to store the data files generated by the program. We will
      call this DATADIR in the following instructions. To speed up
      calculations, GROWI will store any invariant it computes in a database
      that is kept as a file in this directory. Depending on the complexity of
      the computations this file can get VERY big, so choose a directory in
      which you have write access and a lot of free space. The default is
      ~/growi.

2. Make sure you have a working C++ compiler, the GNU MP library version 4.x.x,
   and the GNU DBM library.
   a) If you don't have (the required version of) the GNU MP library, get it
      from http://www.swox.com/gmp/ and install it into your PROGDIR. For
      example, assuming that you have the wget program installed you could say
        wget ftp://ftp.gnu.org/gnu/gmp/gmp-4.1.2.tar.gz
        gunzip gmp-4.1.2.tar.gz
        tar xvf gmp-4.1.2.tar
        cd gmp-4.1.2
        ./configure --prefix=PROGDIR
        make
        make install
   b) If you don't have the GNU DBM library, get it from
      http://www.gnu.org/software/gdbm/ and install it into your PROGDIR. For
      example, assuming that you have the wget program installed you could say
        wget ftp://ftp.gnu.org/gnu/gdbm/gdbm-1.8.3.tar.gz
        gunzip gdbm-1.8.3.tar.gz
        tar xvf gdbm-1.8.3.tar
        cd gdbm-1.8.3
        ./configure --prefix=PROGDIR
        make
        make install

3. Compile and install the GROWI program: from within the directory in which
   you unpacked the source, do:
     ./configure --prefix=PROGDIR --with-dbdir=DATADIR
     make
     make install

4. To check if everything worked OK:
     PROGDIR/bin/growi lines in quintic threefold
   should print the result 2875. If you put PROGDIR/bin into your $PATH
   variable, you can also call it as
     growi lines in quintic threefold

5. To make some more thorough (and more memory/time consuming) checks, you can
   run
     growi gwcheck.cm
   on the gwcheck.cm file included in the distribution. On my system (AMD XP
   1800+ with 512MB of RAM) it takes about 3 minutes to run and creates
   database files of about 15MB in size, so be patient...



USAGE INSTRUCTIONS:

Normally, GROWI is used by writing a program in (slightly modified) C++. For
example, creating a file named test.cm that contains the following lines

  int main (int argc, char *argv[])
  {
      cout << "Hello world!" << endl;
  }

does the expected thing when called as
  growi test.cm
Actually, growi is just a script that converts the test.cm file into a true
test.cc C++ file, compiles and links it against the GROWI library, and executes
it.

The main additional data type available in GROWI is the type of rational
number. It is implemented in the expected way. For example, the program

  int main (int argc, char *argv[])
  {
      rational x=3/2;
      cout << x+1/3 << endl;
  }

prints 11/6. There is a special "rational number" called UNDEFINED which is
returned as the value of an undefined or unknown Gromov-Witten invariant.

To compute a Gromov-Witten invariant, use the GW function. It has the general
form
  GW (N=<dimension>,G=<genus>,D=<degree of curve>,
        E=<degree of hypersurface>,<list of classes>)
and returns a rational number. The order of the arguments is arbitrary. The
values for N,G,D,E mean:
  - N = dimension of the variety (projective space or hypersurface in
        projective space)
  - G = genus of the curves
  - D = degree of the curves
  - E = degree of the hypersurface (so E=1 for projective spaces)
Any of these values can be left out, in which case the last used value is
taken. The initial default values are N=0,G=0,D=0,E=1.

The list of classes is a comma-separated list of items of the form
  class:number
or
  [class,multiplicity]:number
Classes are polynomials in the reserved variables H and psi, which H denotes
the class of a hyperplane and psi is the cotangent line class. The notation
class:n can be used as an abbreviation of class,class,...,class (repeated n
times). If a multiplicity is included, a relative invariant is computed (curves
with the given multiplicity to the hyperplane at this point). For polynomials,
the "power" operation ^ works as expected (and not in the standard C++ way). So
the class of a codimension-r linear subspace can be written as H^r.

The following example illustrates this:

  int main (int argc, char *argv[])
  {
      cout << GW(N=2,D=1,H^2:2) << endl; // lines in P^2 through two points
      cout << GW(N=4,D=1,H*5*H*(5*H+psi)*(5*H+2*psi)*(5*H+3*psi)*(5*H+4*psi)
                 *(5*H+5*psi)) << endl; // lines in the quintic threefold
      cout << GW(N=3,D=1,E=5) << endl; // the same
      cout << GW(N=2,D=4,E=1,G=1,H^2:12) << endl; // elliptic plane quartics
                 // through 12 points
      cout << GW(N=1,E=1,D=2,G=0,H^2:4,[1,2]) << endl; // plane conics through
                 // 4 points and tangent to a given line
  }

Computation of Gromov-Witten invariants will produce database files GW.dbm and
symfunc.dbm in the DATADIR chosen above. They contain all invariants that have
been computed so far. The files can safely be deleted at any time (when GROWI
is not running); they are recreated in the next GROWI run. This can be useful
if the database files have become very large and you want to start a new set
of computations (for which the old values in the database are probably not
helpful).

If only a single invariant is to be computed, the syntax
  growi <some expression>
can be used. This is equivalent to writing a file
  int main (int argc, char *argv[])
  {
      cout << GW(<some expression>) << endl;
  }
and executing it with growi. For example, the command
  growi N=2,D=1,H^2:2
prints 1 (the number of lines in P^2 through 2 points).

To make the input of the GW function (or the expression given to the growi
command) more readable you can use the following predefined names:
 - 'rational' is equivalent to G=0
 - 'elliptic' is equivalent to G=1
 - 'lines' is equivalent to D=1
 - 'conics' is equivalent to D=2
 - 'cubics' is equivalent to D=3, and so on
 - 'P^n' (for some n) is equivalent to N=n,E=1
 - 'quadric' is equivalent to E=2
 - 'cubic' is equivalent to E=3
 - 'quartic' is equivalent to E=4, and so on
 - 'curve' is equivalent to N=1
 - 'surface' is equivalent to N=2
 - 'threefold' or '3fold' is equivalent to N=3, and so on
 - 'in', 'to', 'on', 'thru' are meaningless stopwords that are equivalent to a
   comma.
So for example, the input
  growi D=1,N=2,H^2:2
is equivalent to
  growi lines in P^2 thru H^2:2

Advanced features (not documented right now, go and have a look at the source
code...):

- There is also a C++ class 'poly' that can store polynomials. H and psi are
  predefined variables. Example:
    poly p,q;

    p = H^2;
    q = p*psi;
    cout << GW (lines in P^2 thru q) << endl;
- Some debugging output, as well as information on how the invariants are
  computed can be enabled by setting some options in the various config.h
  files. Most of the documentation for this is found in the *.h and *.cc files.
- For details on the operations supported for rational numbers / variables /
  polynomials, have a look at the (well-documented) *.h files in the math
  subdirectory.

