+ M2 
Macaulay2, version 1.10
with packages: ConwayPolynomials, Elimination, IntegralClosure, InverseSystems, LLLBases,
               PrimaryDecomposition, ReesAlgebra, TangentCone
i1 : needsPackage("UnirationalHurwitzSchemes")  
o1 = UnirationalHurwitzSchemes
o1 : Package
i2 : --------------------------------------------------------------------------
     -- Theorem 3.2                                                          --
     -- We construct a curve C of genus 13 and degree 17 in P^6 by liaison   --
     -- in P^6 of type (2,2,2,2,2) with respect to a general curve of genus  --
     -- 10 and degree 13, which is constructed as described in the paper     --
     -- from a general curve of genus 10 together with 3 marked points. We   --
     -- verify step-by-step all the assertions of the paper. The Serre dual  --
     -- model of C turns out to be a general element of W^1_{13,7}.          --
     --------------------------------------------------------------------------
     p=32009; -- a prime number
i3 : Fp=ZZ/p; -- a prime field
i4 : -- We construct a random curve of genus 10 in P^1xP^2 together with 3
     -- marked points
     time L=randomGenus10CurveNMarkedPoints(p,3); -- about 14 seconds
     
i5 : ID'=L_0; threePoints=L_1;
o5 : Ideal of Fp[x , x , y , y , y ]
                  0   1   0   1   2
i7 : S=ring ID';
i8 : -- We compute the plane model of D' and the embedding D of D' in
     -- P^6 via the complete linear system K-P, where P is the divisor
     -- of the 3 points previously chosen. By construction, D is a
     -- general curve of genus 10 and degree 15 in P^6
     R=Fp[x_0..x_6];
i9 : P2=Fp[drop(flatten entries vars S,2)];
i10 : pi2=map(P2,S);
o10 : RingMap P2 <
i11 : IDPlane=sub(ID',P2);
o11 : Ideal of P2
i12 : RE=P2/IDPlane;
i13 : nodes=sub(saturate ideal jacobian ID',P2);
o13 : Ideal of P2
i14 : threePoints2=apply(threePoints,p-> trim pi2 p);
i15 : KminusD=gens truncate(6,intersect(threePoints2|{nodes}));
               1        7
o15 : Matrix P2  <
i16 : emb=map(RE,R,sub(KminusD,RE));
o16 : RingMap RE <
i17 : ID=kernel emb;
o17 : Ideal of R
i18 : -- D has genus 10, degree 15 and it is smooth
      degree ID, genus ID
o18 = (15, 10)
o18 : Sequence
i19 : jacobianD=jacobian ID;
              7       18
o19 : Matrix R  <
i20 : J=ID;
o20 : Ideal of R
i21 : subsetsSource=subsets(rank source jacobianD,5);
i22 : subsetsTarget=subsets(rank target jacobianD,5);
i23 : time while codim J < 7 do (
          Ls=first random subsetsSource;
          Lt=first random subsetsTarget;
          J=J+minors(5,(jacobianD)_Ls^Lt);
          ) -- about 23 seconds
     
i24 : codim J==7
o24 = true
i25 : -- We take a random complete intersection of type (2,2,2,2,2)
      -- containing the curve D and get C via liaison
      Y=ideal ((gens ID)*(random(source gens ID, R^{5:-2})));
o25 : Ideal of R
i26 : -- viewHelp
      IC=saturate(Y:ID,ideal basis(1,R));
o26 : Ideal of R
i27 : -- We verify that C is a smooth curve of genus 13 and degree 17
      degree IC, genus IC
o27 = (17, 13)
o27 : Sequence
i28 : jacobianC=jacobian IC;
              7       9
o28 : Matrix R  <
i29 : J=IC;
o29 : Ideal of R
i30 : subsetsSource=subsets(rank source jacobianC,5);
i31 : subsetsTarget=subsets(rank target jacobianC,5);
i32 : time while codim J < 7 do (
          Ls=first random subsetsSource;
          Lt=first random subsetsTarget;
          J=J+minors(5,(jacobianC)_Ls^Lt);
          ) -- about 8 seconds
     
i33 : codim J==7
o33 = true
i34 : -- We verify that C and D meet only in ordinary double points
      INodes=ideal mingens(IC+ID);
o34 : Ideal of R
i35 : jacobianNodes=jacobian INodes;
              7       11
o35 : Matrix R  <
i36 : J=INodes;
o36 : Ideal of R
i37 : subsetsSource=subsets(rank source jacobianNodes,6);
i38 : subsetsTarget=subsets(rank target jacobianNodes,6);
i39 : time while codim J < 7 do (
          Ls=first random subsetsSource;
          Lt=first random subsetsTarget;
          J=J+minors(6,(jacobianNodes)_Ls^Lt);
          ) -- about 8 seconds
     
i40 : codim J==7
o40 = true
i41 : -- We check that C is not contained in any hyperplane. It
      -- turns out that C together with its embedding is an
      -- element in W^6_{13,17}.
      betti IC 
             0 1
o41 = total: 1 9
          0: 1 .
          1: . 6
          2: . 3
o41 : BettiTally
i42 :