+ M2 --no-readline --print-width 98
Macaulay2, version 1.15
--loading configuration for package "FourTiTwo" from file /home/ubuntuasus/.Macaulay2/init-FourTiTwo.m2
--loading configuration for package "Topcom" from file /home/ubuntuasus/.Macaulay2/init-Topcom.m2
with packages: ConwayPolynomials, Elimination, IntegralClosure, InverseSystems, LLLBases,
               PrimaryDecomposition, ReesAlgebra, TangentCone, Truncations

i1 : 
     ------------------------------------------------------------------
     -- Theorem 3.5: Unirationality of M_{12,3} via a different method
     ------------------------------------------------------------------
     load "UnirationalPointedCurves.m2"

i2 : -- We start from a general canonical curve of genus 9.
     p=32009;

i3 : Fp=ZZ/p;

i4 : needsPackage("RandomCanonicalCurves");

i5 : S=Fp[y_0..y_8];

i6 : C=(random canonicalCurve)(9,S);

o6 : Ideal of S

i7 : (genus C==9,degree C==16, codim C==7)

o7 = (true, true, true)

o7 : Sequence

i8 : -- We pick 4 points on C, and compute the Serre dual model which embeds C in P^4.
     pts=intersect for i from 1 to 4 list randomKRationalPoint(C);

o8 : Ideal of S

i9 : R=Fp[t_0..t_4];

i10 : SC=S/C;

i11 : phi=map(SC,R,((gens pts)_{0..4}));

o11 : RingMap SC <--- R

i12 : C'=kernel phi;

o12 : Ideal of R

i13 : -- We check that C' is a smooth genus 9 degree 12 curve in P^4.
      (codim C'==3, degree C'==12, genus C'==9)

o13 = (true, true, true)

o13 : Sequence

i14 : isSmoothPn(C')

o14 = true

i15 : -- We perform our first liaison with respect to 3 cubic hypersurfaces.
      CI=cIntContaining({3,3,3},C');

o15 : Ideal of R

i16 : C=saturate(CI:C');

o16 : Ideal of R

i17 : -- We check that C is a smooth genus 15 degree 15 curve in P^4.
      (genus C==15,degree C==15 ,codim C==3)

o17 = (true, true, true)

o17 : Sequence

i18 : isSmoothPn(C)

o18 = true

i19 : -- We verify that C and C' intersect only in ordinary double points.
      isOrdDoublePointsPn(C,C')

o19 = true

i20 : -- We compute the Serre dual model of C.
      -- We first embed C canonically and we get the image of the 15 points in this embedding.
      H=ideal random (R^1,R^{1:-1});

o20 : Ideal of R

i21 : pts15=ideal mingens(H+C);

o21 : Ideal of R

i22 : degree pts15

o22 = 15

i23 : codim pts15

o23 = 4

i24 : S=Fp[y_0..y_14];

i25 : RS= R**S;

i26 : time omegaC:=presentation truncate(0,Ext^2(C,R^{ -5})); -- about 43 seconds
     -- used 42.4695 seconds

              15       46
o26 : Matrix R   <--- R

i27 : SH=R/(pts15);

i28 : omegaCH=presentation ((coker omegaC)**SH);

               15        46
o28 : Matrix SH   <--- SH

i29 : graph=substitute(vars S,RS)*substitute(omegaC,RS);

               1        46
o29 : Matrix RS  <--- RS

i30 : graphH=substitute(vars S,RS)*substitute(omegaCH,RS);

               1        46
o30 : Matrix RS  <--- RS

i31 : linForm=random(1,SH);

i32 : J=saturate(((ideal graph)),substitute(linForm,RS));

o32 : Ideal of RS

i33 : I=ideal mingens substitute(J,S);

o33 : Ideal of S

i34 : JH=saturate(((ideal graphH)),substitute(linForm,RS));

o34 : Ideal of RS

i35 : IH=ideal mingens substitute(JH,S);

o35 : Ideal of S

i36 : -- I is the canonical model of C, and contains the 15 points IH.
      (genus I==15,degree I==28, codim I==13)

o36 = (true, true, true)

o36 : Sequence

i37 : (degree IH==15, codim IH==14)

o37 = (true, true)

o37 : Sequence

i38 : -- There are 4 independent hyperplanes passing through IH.
      betti IH

             0  1
o38 = total: 1 55
          0: 1  4
          1: . 51

o38 : BettiTally

i39 : -- These hyperplanes define the Serre dual map and give an embedding
      -- of I in P^3 as a smooth curve of genus 15 and degree 13.
      H15=ideal((gens IH)*(random(source gens IH, (S)^{-1})));

o39 : Ideal of S

i40 : P3=Fp[r_0..r_3];

i41 : SI=S/I;

i42 : M=map(S/I,P3,flatten entries (mingens IH)_{0..3});--dual map

o42 : RingMap SI <--- P3

i43 : IP3=ker M;

o43 : Ideal of P3

i44 : (codim IP3==2,degree IP3==13,genus IP3==15)

o44 = (true, true, true)

o44 : Sequence

i45 : isSmoothPn(IP3)

o45 = true

i46 : -- IP3 is contained in at least 5 quintic hypersurfaces,
      -- hence we can impose the choice of up to three points.
      tally degrees IP3

o46 = Tally{{5} => 5}
            {6} => 4

o46 : Tally

i47 : NPoints=apply(3,i->ideal(random(1,P3),random(1,P3),random(1,P3)));

i48 : DandNPoints=intersect(NPoints|{IP3});

o48 : Ideal of P3

i49 : -- We take the two remaining hypersurfaces and perform another liaison.
      CI=cIntContaining({5,5},DandNPoints);

o49 : Ideal of P3

i50 : Cfin=saturate(CI:IP3);

o50 : Ideal of P3

i51 : -- Cfin is a smooth curve of genus 12 and degree 12 containing the points.
      (genus Cfin==12,degree Cfin==12,codim Cfin==2)

o51 = (true, true, true)

o51 : Sequence

i52 : isSmoothPn(Cfin)

o52 = true

i53 : isSubset(Cfin, intersect NPoints)

o53 = true

i54 : -- We verify that Cfin and IP3 intersect only in ordinary double points.
      isOrdDoublePointsPn(Cfin,IP3)

o54 = true

i55 : -- We check that the our genus 12 curve lies on the component
      -- of W^3_{12,12} dominating M_12, i.e., that the Petri map is injective.
      betti Ext^1(Cfin,(ring Cfin)^{-4})

             0 1
o55 = total: 3 7
         -1: 3 .
          0: . 7

o55 : BettiTally

i56 : -- No linear relation among the generators of Gamma_*(omega_Cfin).