Description
This package accompanies our paper
Equations and syzygies of K3 carpets and union of scrolls for experimental exploration. There is a unique surjection from the ideal of a 2dimensional rational normal scroll (other than the cone over a rational normal curve) onto the canonical module of the scroll and the kernel of the this map is the ideal of a scheme that looks numerically like a K3 surface: a K3 carpet. (Theorem 1.3 of Degenerations of K3 surfaces in projective space, by Francisco Gallego and B.P. Purnaprajna, Trans. Amer. Math. Soc. 349 (1997), no. 6, 2477–2492.)
The carpet lies on the intersection of the cones over two rational normal curves Ca and Cb of degrees a>=b. We write the ideal of Ca as the minors of a 2xa matrix X with entries x_i, i= 0..a, and similarly for Cb, with a 2 x b matrix Y with entries y_j. We write Xi for the ith column of X, and similarly for Y. In the general case, where a,b are both >=2, the additional generators of the ideal of the Carpet are then given by the differences det(Xi,Yj)det(X(i+1),Y(j1)), or equivalently, by the minors of (Xi+Yj,X(i+1)+Y(j1), (In the case a=1=b the ideal is the square of the determinant of XY; if a>1, b=1 then for the mixed minors we replace the 1column matrix Y by a symmetric 2x2 matrix with entries y_0^2,y_0y_1,y_1^2 )
The hyperplane section of a K3 carpet is a canonical ribbon indexed by genus g=a+b+1 and clifford index b.
The K3 carpets generalize to a family of degenerate K3 surfaces which are unions of two scrolls, whose hyperplane sections are reducible canonical curves consisting of two rational normal curves of degree g1 intersecting in g+1 points. The functions in this package explore the syzygies of these surfaces for fields of arbitrary characteristic. In particular, the functions in the package allow for g <= 15 a computational proof of the following conjecture.
Conjecture 0.1 A general canonical curve of genus g over a field of characteristic p satisfies Green's conjecture, if p >= (g1)/2.
Constructions

carpet  Ideal of the unique Gorenstein double structure on a 2dimensional scroll

canonicalCarpet  Carpet of given genus and Clifford index

gorensteinDouble  attempts to produce a Gorenstein double structure J subset I
Analyzing

carpetBettiTables  compute the Betti tables of a carpet of given genus and Clifford index over all prime fields

carpetBettiTable  compute the Betti tables of a carpet of given genus and Clifford index over a prime field of characteristic p

analyzeStrand  analyze the (a+1)st constant strand of F over ZZ

degenerateK3BettiTables  compute the Betti tables of a degenerate K3 over all prime fields

schreyerName  get the names of generators in the (nonminimal) Schreyer resolution according to Schreyer's convention

allGradings  add Grading to a chainComplex

carpetDet  compute the determinant of the crucial constant strand of a carpet X(a,b)

resonanceDet  compute the resonance determinant of the crucial constant strand of a degenerate K3 X_e(a,a)
Correspondence Scrolls

correspondenceScroll  Union of planes joining points of rational normal curves according to a given correspondence

hankelMatrix  matrix with constant antidiagonal entries

productOfProjectiveSpaces  Constructs the multigraded ring of a product of copies of P^1 (pp is a synonym)

schemeInProduct  multigraded Ideal of the image of a map to a product of projective spaces

smallDiagonal  Ideal of the small diagonal in (P^1)^n

irrelevantIdeal  returns the irrelevant ideal of a multigraded ring

degenerateK3  Ideal of a degenerate K3 surface X_e(a,b)
Relative resolutions of X_e(a,b) in case of k resonance
Homotopies