realizationMatroids.lib
RealizationMatroids.lib is a Singular library by Anna Lena Winstel for relative realizability questions in tropical geometry.
It considers two-dimensional matroid fans $ {\rm trop}(Y) $ obtained by tropicalizing a projective plane $Y$ over an algebraically closed field $K$ (of any characteristic). Given a one-dimensional balanced polyhedral fan $C$ in $ {\rm trop}(Y) $, it determines whether $C$ is the tropicalization of an (irreducible) algebraic curve of degree $ \deg(C) $ over $K$ in $Y$. Moreover, if this is the case, it computes the dimension of the space of all such curves (which is always an open subset of a linear space), and in the case of characteristic 0 gives a specific example of such a curve.
All computations are performed in homogeneous coordinates, i.e. the plane $Y$ is given by homogeneous linear equations, and the rays (with their multiplicities) of $C$ are given as integer vectors modulo $(1,...,1)$.
Examples
The library provides three functions: realizationDim, irrRealizationDim, and realizationDimPoly. The following examples should be general enough to see how these functions can be used. In all of them let $Y$ be the plane in projective 3-space given by the ideal $ I=(x_1+x_2+x_3+x_4) $. To define this in characteristic 0, we type in Singular:
> LIB "realizationMatroids.lib"; > ring R = 0,(x1,x2,x3,x4),dp; > ideal I = x1+x2+x3+x4;
Let $C$ be one of the three classical lines contained in the matroid fan $ {\rm trop}(Y) $, e.g. the line with the two rays $ (1,1,0,0) $ and $ (0,0,1,1) $ in homogeneous coordinates. Then there is a unique line in $Y$ tropicalizing to $C$, i.e. the realization space is 0-dimensional. The following functions compute this dimension, resp. the dimension together with a (linear) polynomial cutting out this line in $Y$.
> list C = list(intvec(1,1,0,0),intvec(0,0,1,1)); > realizationDim(I,C); 0 > realizationDimPoly(I,C); 0 x1+x2
The same line, but with rays of multiplicity 2, is still realizable by a unique curve of degree 2 (namely a double line), but it is thus not realizable by an irreducible curve. Note that realizationDim and irrRealizationDim return -1 if the curve is not realizable in $Y$ (resp. not realizable by an irreducible curve). Again, realizationDimPoly returns a (now quadratic and reducible) polynomial defining the double line tropicalizing to $C$.
> list C = list(intvec(2,2,0,0),intvec(0,0,2,2)); > realizationDim(I,C); 0 > irrRealizationDim(I,C); -1 > realizationDimPoly(I,C); 0 x1^2+2*x1*x2+x2^2
A general conic in $Y$ tropicalizes to the one-dimensional fan $C$ that consists of the four unit vectors, each with multiplicity 2. The space of such conics is 5-dimensional, and almost all of them are irreducible. RealizationDimPoly returns a simple example of a polynomial cutting out a curve in $Y$ that tropicalizes to $C$.
> list C = list(intvec(2,0,0,0),intvec(0,2,0,0),intvec(0,0,2,0),intvec(0,0,0,2)); > realizationDim(I,C); 5 > irrRealizationDim(I,C); 5 > realizationDimPoly(I,C); 5 x1^2+x2^2+x3^2
The following one-dimensional fan $C$ of degree 4 has tropical intersection number -1 with the classical line in $Y$ as above, thus by Brugallé-Shaw it is not realizable (by an irreducible curve) in $Y$. In this case, realizationDimPoly returns the same result -1 as realizationDim.
> list C = list(intvec(3,2,0,0),intvec(0,1,0,1),intvec(0,0,2,1),intvec(0,0,1,1)); > realizationDim(I,C); -1 > realizationDimPoly(I,C); -1
In general, the results will depend on the chosen characteristic.
> list C = list(intvec(3,2,0,0),intvec(0,1,0,2),intvec(0,0,3,1)); > realizationDim(I,C); -1 > ring R = 2,(x1,x2,x3,x4),dp; > ideal I = x1+x2+x3+x4; > realizationDim(I,C); 0
Remarks
The theoretical background of the algorithm is explained in the paper The realizability of curves in a tropical plane by Kirsten Schmitz, Anna Lena Winstel, and myself, E-print arXiv:1307.5686 pdf