We construct two sets of g points in PP^1, represented by two 2xg matrices P, and Q in such a way that the curve constructed by gluing this points to nodes as implemented in the the Macaulay2 package NodalCurves gives a nodal curve that carries a g^1_k.## Construction of rational d-gonal g-nodal canonical curves

## Computation of the critical Betti number

The variety swept out by a g^1_k on a canonical curve is a (k-1) dimensional rational normal scroll X We want to check whether the Betti numbers `beta_{m+c,m+c+1}(C)`coincide with those of the scroll for c>=0 and m=ceiling((g-1)/2). This package also provides several functions which can be handy for the computation of the critical Betti number `beta_{m,m+1}(C)`using Koszul cohomolgy.See Koszul Cohomology and the Geometry of Projective Varieties for a good survey on the topic.

- getFieldAndRing -- computes a prime number p>=n, the field kk=ZZ/p and the coordinate Ring S of PP^1(kk)
- getFactors -- computes linear and quadratic factors of a polynomial
- getCoordinates -- computes vanishing loci of a linear polynomial in two variables
- pickGoodPoints -- computes g pairs of points and gluing data between them
- listOfFactors -- finds a map f: S^2(-k)->S such that det(f|pt) factors factors for sufficiently many points pt in PP^1
- linFactorsToQuadric -- computes quadrics needed to construct the matrix defining the canonical embedding
- getSections -- computes a matrix defining the canonical embedding
- sectionsFromPoints -- computes matrix defining the canonical embedding from the 2g points
- canonicalMultipliers -- compute the canonical multipliers of a rational curves with nodes
- lineBundleFromPointsAndMultipliers -- computes basis of a line bundle from the 2g points P_i, Q_i and the multipliers
- idealOfNodalCurve -- computes the ideal I of a k-gonal g-nodal canonical curve.
- idealOfNodalCurveByPoints -- computes ideal of a canonical nodal curve constructed from 2g points
- scrollType -- determines the type of the scroll

- criticalKoszulMap -- computes the critical Koszul map
- criticalBettiNumber -- computes the critical Betti number
- criticalBettiNumberWithoutArtinanReduction -- computes the critical Betti number
- sparseKoszulMatrix -- computes list specifying the size of the critical Koszul map, the nonzero entries and the position of those
- getBackMatrix -- reconstructs a matrix from a list of entries and the position of those

This package requires Macaulay2 Version 1.9 or newer

- Functions and commands
`artinianReduction`(missing documentation)- Functions and commands
- canonicalMultipliers -- compute the canonical multipliers of a rational curves with nodes
- criticalBettiNumber -- computes the critical Betti number
- criticalBettiNumberWithoutArtinanReduction -- computes the critical Betti number
- criticalKoszulMap -- computes the critical Koszul map
- getBackMatrix -- reconstructs a matrix from a list of entries and the position of those
- getCoordinates -- computes vanishing loci of a linear polynomial in two variables
- getFactors -- computes linear and quadratic factors of a polynomial
- getFieldAndRing -- computes a prime number p>=n, the field kk=ZZ/p and the coordinate Ring S of PP^1(kk)
- getSections -- computes a matrix defining the canonical embedding
- idealOfNodalCurve -- computes the ideal I of a k-gonal g-nodal canonical curve.
- idealOfNodalCurveByPoints -- computes ideal of a canonical nodal curve constructed from 2g points
- lineBundleFromPointsAndMultipliers -- computes basis of a line bundle from the 2g points P_i, Q_i and the multipliers
- linFactorsToQuadric -- computes quadrics needed to construct the matrix defining the canonical embedding
- listOfFactors -- finds a map f: S^2(-k)->S such that det(f|pt) factors factors for sufficiently many points pt in PP^1
- pickGoodPoints -- computes g pairs of points and gluing data between them
- scrollType -- determines the type of the scroll
- sectionsFromPoints -- computes matrix defining the canonical embedding from the 2g points
- sparseKoszulMatrix -- computes list specifying the size of the critical Koszul map, the nonzero entries and the position of those