# This program is called NEWawk7point. # File1=testschemes is a list of test schemes Z # Change the line below to "verbose = 0" to # disable printing out all of the negative curves. # Each line of testschemes should be of the form: # 12 1 2 2 3 3 4 5 # The 12 represents which config out of the 29 possible # to use. The rest of the numbers are the 7 multiplicities. # Run this as: # awk -f NEWawk7point testschemes BEGIN {verbose = 1 # Make an array of all 8 point (-1)-classes E[1]="0 0 0 0 0 0 0 1" E[2]="0 0 0 0 0 0 1 0" E[3]="0 0 0 0 0 1 0 0" E[4]="0 0 0 0 1 0 0 0" E[5]="0 0 0 1 0 0 0 0" E[6]="0 0 1 0 0 0 0 0" E[7]="0 1 0 0 0 0 0 0" E[8]= "1 -1 -1 0 0 0 0 0" E[9]= "1 0 -1 -1 0 0 0 0" E[10]="1 0 0 -1 -1 0 0 0" E[11]="1 0 0 0 -1 -1 0 0" E[12]="1 0 0 0 0 -1 -1 0" E[13]="1 0 0 0 0 0 -1 -1" E[14]="1 -1 0 -1 0 0 0 0" E[15]="1 0 -1 0 -1 0 0 0" E[16]="1 0 0 -1 0 -1 0 0" E[17]="1 0 0 0 -1 0 -1 0" E[18]="1 0 0 0 0 -1 0 -1" E[19]="1 -1 0 0 -1 0 0 0" E[20]="1 0 -1 0 0 -1 0 0" E[21]="1 0 0 -1 0 0 -1 0" E[22]="1 0 0 0 -1 0 0 -1" E[23]="1 -1 0 0 0 -1 0 0" E[24]="1 0 -1 0 0 0 -1 0" E[25]="1 0 0 -1 0 0 0 -1" E[26]="1 -1 0 0 0 0 -1 0" E[27]="1 0 -1 0 0 0 0 -1" E[28]="1 -1 0 0 0 0 0 -1" E[29]="2 -1 -1 -1 -1 -1 0 0" E[30]="2 0 -1 -1 -1 -1 -1 0" E[31]="2 -1 0 -1 -1 -1 -1 0" E[32]="2 -1 -1 0 -1 -1 -1 0" E[33]="2 -1 -1 -1 0 -1 -1 0" E[34]="2 -1 -1 -1 -1 0 -1 0" E[35]="2 0 -1 -1 -1 -1 0 -1" E[36]="2 -1 0 -1 -1 -1 0 -1" E[37]="2 -1 -1 0 -1 -1 0 -1" E[38]="2 -1 -1 -1 0 -1 0 -1" E[39]="2 -1 -1 -1 -1 0 0 -1" E[40]="2 0 -1 -1 -1 0 -1 -1" E[41]="2 -1 0 -1 -1 0 -1 -1" E[42]="2 -1 -1 0 -1 0 -1 -1" E[43]="2 -1 -1 -1 0 0 -1 -1" E[44]="2 0 -1 -1 0 -1 -1 -1" E[45]="2 -1 0 -1 0 -1 -1 -1" E[46]="2 -1 -1 0 0 -1 -1 -1" E[47]="2 0 -1 0 -1 -1 -1 -1" E[48]="2 -1 0 0 -1 -1 -1 -1" E[49]="2 0 0 -1 -1 -1 -1 -1" E[50]="3 -2 -1 -1 -1 -1 -1 -1" E[51]="3 -1 -2 -1 -1 -1 -1 -1" E[52]="3 -1 -1 -2 -1 -1 -1 -1" E[53]="3 -1 -1 -1 -2 -1 -1 -1" E[54]="3 -1 -1 -1 -1 -2 -1 -1" E[55]="3 -1 -1 -1 -1 -1 -2 -1" E[56]="3 -1 -1 -1 -1 -1 -1 -2" En=56 Start[1]=1 C[1]="0 0 0 0 0 0 0 0" Finish[1]=1 Start[2]=2 C[2]="1 -1 -1 -1 -1 -1 -1 -1" Finish[2]=2 Start[3]=3 C[3]="1 -1 -1 -1 -1 -1 -1 0" Finish[3]=3 Start[4]=4 C[4]="1 -1 -1 -1 -1 -1 0 0" Finish[4]=4 Start[5]=5 C[5]="1 -1 -1 -1 -1 0 0 0" Finish[5]=5 Start[6]=6 C[6]="1 -1 -1 -1 0 0 0 0" Finish[6]=6 Start[7]=7 C[7]="1 -1 -1 -1 -1 -1 0 0" C[8]="1 -1 0 0 0 0 -1 -1" Finish[7]=8 Start[8]=9 C[9]="1 -1 -1 -1 -1 0 0 0" C[10]="1 0 0 0 0 -1 -1 -1" Finish[8]=10 Start[9]=11 C[11]="1 -1 -1 -1 -1 0 0 0" C[12]="1 0 0 0 -1 -1 -1 -1" Finish[9]=12 Start[10]=13 C[13]="1 -1 -1 -1 -1 0 0 0" C[14]="1 0 0 0 -1 -1 -1 0" Finish[10]=14 Start[11]=15 C[15]="1 -1 -1 -1 0 0 0 0" C[16]="1 0 0 0 -1 -1 -1 0" Finish[11]=16 Start[12]=17 C[17]="1 -1 -1 -1 0 0 0 0" C[18]="1 -1 0 0 -1 -1 0 0" Finish[12]=18 Start[13]=19 C[19]="1 -1 -1 -1 -1 0 0 0" C[20]="1 0 0 0 -1 -1 -1 0" C[21]="1 0 0 -1 0 -1 0 -1" Finish[13]=21 Start[14]=22 C[22]="1 -1 -1 -1 0 0 0 0" C[23]="1 0 0 0 -1 -1 -1 0" C[24]="1 -1 0 0 -1 0 0 -1" Finish[14]=24 Start[15]=25 C[25]="1 -1 -1 -1 0 0 0 0" C[26]="1 -1 0 0 -1 -1 0 0" C[27]="1 -1 0 0 0 0 -1 -1" Finish[15]=27 Start[16]=28 C[28]="1 -1 -1 -1 0 0 0 0" C[29]="1 -1 0 0 -1 0 -1 0" C[30]="1 0 0 -1 0 -1 -1 0" Finish[16]=30 Start[17]=31 C[31]="1 -1 -1 -1 -1 0 0 0" C[32]="1 0 0 0 -1 -1 -1 0" C[33]="1 0 0 -1 0 -1 0 -1" C[34]="1 0 -1 0 0 0 -1 -1" Finish[17]=34 Start[18]=35 C[35]="1 -1 -1 -1 0 0 0 0" C[36]="1 0 0 0 -1 -1 -1 0" C[37]="1 -1 0 0 -1 0 0 -1" C[38]="1 0 -1 0 0 -1 0 -1" Finish[18]=38 Start[19]=39 C[39]="1 -1 -1 -1 0 0 0 0" C[40]="1 -1 0 0 -1 0 -1 0" C[41]="1 0 0 -1 0 -1 -1 0" C[42]="1 -1 0 0 0 -1 0 -1" Finish[19]=42 Start[20]=43 C[43]="1 -1 -1 -1 0 0 0 0" C[44]="1 -1 0 0 -1 0 -1 0" C[45]="1 0 0 -1 0 -1 -1 0" C[46]="1 0 -1 0 -1 -1 0 0" Finish[20]=46 Start[21]=47 C[47]="1 -1 -1 -1 0 0 0 0" C[48]="1 0 0 0 -1 -1 -1 0" C[49]="1 -1 0 0 -1 0 0 -1" C[50]="1 0 -1 0 0 -1 0 -1" C[51]="1 0 0 -1 0 0 -1 -1" Finish[21]=51 Start[22]=52 C[52]="1 -1 -1 -1 0 0 0 0" C[53]="1 -1 0 0 -1 0 -1 0" C[54]="1 0 0 -1 0 -1 -1 0" C[55]="1 0 -1 0 -1 -1 0 0" C[56]="1 -1 0 0 0 -1 0 -1" Finish[22]=56 Start[23]=57 C[57]="1 -1 -1 -1 0 0 0 0" C[58]="1 -1 0 0 -1 0 -1 0" C[59]="1 0 0 -1 0 -1 -1 0" C[60]="1 0 -1 0 -1 -1 0 0" C[61]="1 -1 0 0 0 -1 0 -1" C[62]="1 0 0 -1 -1 0 0 -1" Finish[23]=62 Start[24]=63 C[63]="1 -1 -1 -1 0 0 0 0" C[64]="1 -1 0 0 -1 0 -1 0" C[65]="1 0 0 -1 0 -1 -1 0" C[66]="1 0 -1 0 -1 -1 0 0" C[67]="1 -1 0 0 0 -1 0 -1" C[68]="1 0 0 -1 -1 0 0 -1" C[69]="1 0 -1 0 0 0 -1 -1" Finish[24]=69 Start[25]=70 C[70]="2 -1 -1 -1 -1 -1 -1 -1" Finish[25]=70 Start[26]=71 C[71]="2 -1 -1 -1 -1 -1 -1 0" Finish[26]=71 Start[27]=72 C[72]="2 -1 -1 -1 -1 -1 -1 0" C[73]="1 -1 -1 0 0 0 0 -1" Finish[27]=73 Start[28]=74 C[74]="2 -1 -1 -1 -1 -1 -1 0" C[75]="1 -1 -1 0 0 0 0 -1" C[76]="1 0 0 -1 -1 0 0 -1" Finish[28]=76 Start[29]=77 C[77]="2 -1 -1 -1 -1 -1 -1 0" C[78]="1 -1 -1 0 0 0 0 -1" C[79]="1 0 0 -1 -1 0 0 -1" C[80]="1 0 0 0 0 -1 -1 -1" Finish[29]=80 } {config=$1 testscheme=$2" "$3" "$4" "$5" "$6" "$7" "$8 print ".........................................." print "Configuration: "config print ".........................................." print " " # Find the minus 1 curves k=0 for(i=1;i<=En;i++) { j=Start[config] test=0 while(test==0 && j<=Finish[config]) { if(dot(E[i],C[j]) < 0) test=1 j=j+1 } if(test==0) { k=k+1 M1[k]=i M1n=k } } if(verbose==1) { print "The exceptional curves are:" for(i=1;i<=M1n;i++) print " "E[M1[i]] print "The other negative curves are:" for(i=Start[config];i<=Finish[config];i++) print " "C[i] } print "Scheme: Z = "testscheme Ftmp=0" "testscheme flg=1 flag=0 while(flg==1) { flg=0 for(i=1;i<=M1n;i++) if(dot("1 0 0 0 0 0 0 0 0",E[M1[i]])==0 && dot(Ftmp,E[M1[i]]) > 0) { Ftmp=subtract(Ftmp,mult(E[M1[i]],-1)) flg=1 flag=1} for(i=Start[config];i<=Finish[config];i++) if(dot("1 0 0 0 0 0 0 0 0",C[i])==0 && dot(Ftmp,C[i]) > 0) { Ftmp=subtract(Ftmp,mult(C[i],-1)) flg=1 flag=1} } if(flag==1) { split(Ftmp, D, " ") testscheme=D[2]" "D[3]" "D[4]" "D[5]" "D[6]" "D[7]" "D[8]" "D[9] print "Your Z does not satisfy the proximity inequalities." print "Subtracting off components of blow ups to get a Z" print "which does, turns your Z into: Z = "testscheme } h0=0 deg=-1 fflag=1 while(h0==0) { deg=deg+1 testclass=deg" "mult(testscheme,-1) split(h0andh1(testclass), hh, " ") h0=hh[1] h1=hh[2] fflag=fixedflag(testclass)} alpha=deg print "alpha: "alpha while(fflag==1) { deg=deg+1 testclass=deg" "mult(testscheme,-1) fflag=fixedflag(testclass)} print "FCfree in degree: "deg delta=deg+1 h1=1 deg=alpha-2 while(h1>0) { deg=deg+1 testclass=deg" "mult(testscheme,-1) split(h0andh1(testclass), hh, " ") h0=hh[1] h1=hh[2]} tau=deg print "tau: "tau for(j=alpha;j<=delta+2;j++) { testclass=j" "mult(testscheme,-1) split(h0andh1(testclass), hh, " ") hilb[j-alpha+1]=hh[1] } for(j=alpha;j<=delta+1;j++) { testclass=j" "mult(testscheme,-1) myclass=subtract(getFreepart(testclass),"-1 0 0 0 0 0 0 0 0") split(h0andh1(myclass), hh, " ") hilbfree[j-alpha+2]=hh[1] # I've commentd out the old way of oding this, which was insecure # print "#\!/usr/bin/perl -w" > "test" # mystr="system(\"echo "myclass" 0 | ./numgens.cgi\")" # system("chmod 666 test") # print mystr >> "test" # close("test") # system("chmod 111 test") # "./test" | getline nmbr # close("./test") # system("chmod 444 test") # freecok[j-alpha+1]=nmbr # print mystr # print "..:: "nmbr # Here's the new way mystr="echo "myclass" | ./numgens.cgi > test" system(mystr) getline < "test" nmbr=$1 close("test") freecok[j-alpha+1]=nmbr myclass=subtract(getFreepart(testclass),"1 -1 0 0 0 0 0 0 0") split(h0andh1(myclass), hh, " ") tmpl=hh[1] myclass=subtract(getFreepart(testclass),"0 1 0 0 0 0 0 0 0") split(h0andh1(myclass), hh, " ") tmpq=hh[1] mydelta[j-alpha+1]=tmpl+tmpq myclass=subtract(getFreepart(testclass),"1 0 -1 0 0 0 0 0 0") split(h0andh1(myclass), hh, " ") tmpl=hh[1] myclass=subtract(getFreepart(testclass),"0 0 1 0 0 0 0 0 0") split(h0andh1(myclass), hh, " ") tmpq=hh[1] tmpdelta=tmpl+tmpq if(mydelta[j-alpha+1]> tmpdelta) mydelta[j-alpha+1]=tmpdelta myclass=subtract(getFreepart(testclass),"1 0 0 -1 0 0 0 0 0") split(h0andh1(myclass), hh, " ") tmpl=hh[1] myclass=subtract(getFreepart(testclass),"0 0 0 1 0 0 0 0 0") split(h0andh1(myclass), hh, " ") tmpq=hh[1] tmpdelta=tmpl+tmpq if(mydelta[j-alpha+1]> tmpdelta) mydelta[j-alpha+1]=tmpdelta myclass=subtract(getFreepart(testclass),"1 0 0 0 -1 0 0 0 0") split(h0andh1(myclass), hh, " ") tmpl=hh[1] myclass=subtract(getFreepart(testclass),"0 0 0 0 1 0 0 0 0") split(h0andh1(myclass), hh, " ") tmpq=hh[1] tmpdelta=tmpl+tmpq if(mydelta[j-alpha+1]> tmpdelta) mydelta[j-alpha+1]=tmpdelta myclass=subtract(getFreepart(testclass),"1 0 0 0 0 -1 0 0 0") split(h0andh1(myclass), hh, " ") tmpl=hh[1] myclass=subtract(getFreepart(testclass),"0 0 0 0 0 1 0 0 0") split(h0andh1(myclass), hh, " ") tmpq=hh[1] tmpdelta=tmpl+tmpq if(mydelta[j-alpha+1]> tmpdelta) mydelta[j-alpha+1]=tmpdelta myclass=subtract(getFreepart(testclass),"1 0 0 0 0 0 -1 0 0") split(h0andh1(myclass), hh, " ") tmpl=hh[1] myclass=subtract(getFreepart(testclass),"0 0 0 0 0 0 1 0 0") split(h0andh1(myclass), hh, " ") tmpq=hh[1] tmpdelta=tmpl+tmpq if(mydelta[j-alpha+1]> tmpdelta) mydelta[j-alpha+1]=tmpdelta myclass=subtract(getFreepart(testclass),"1 0 0 0 0 0 0 -1 0") split(h0andh1(myclass), hh, " ") tmpl=hh[1] myclass=subtract(getFreepart(testclass),"0 0 0 0 0 0 0 1 0") split(h0andh1(myclass), hh, " ") tmpq=hh[1] tmpdelta=tmpl+tmpq if(mydelta[j-alpha+1]> tmpdelta) mydelta[j-alpha+1]=tmpdelta myclass=subtract(getFreepart(testclass),"1 0 0 0 0 0 0 0 -1") split(h0andh1(myclass), hh, " ") tmpl=hh[1] myclass=subtract(getFreepart(testclass),"0 0 0 0 0 0 0 0 1") split(h0andh1(myclass), hh, " ") tmpq=hh[1] tmpdelta=tmpl+tmpq if(mydelta[j-alpha+1]> tmpdelta) mydelta[j-alpha+1]=tmpdelta } lbgens[1]=hilb[1] ubgens[1]=hilb[1] for(j=alpha+1;j<=delta+2;j++) { ubgens[j-alpha+1]=hilb[j-alpha+1]-3*hilb[j-alpha]+mydelta[j-alpha] lbgens[j-alpha+1]=hilb[j-alpha+1]-hilbfree[j-alpha+1]+freecok[j-alpha] # The following two lines were a former estimate used in place of freecok # if(hilbfree[j-alpha+1]>3*hilb[j-1-alpha+1]) # lbgens[j-alpha+1]= lbgens[j-alpha+1]+hilbfree[j-alpha+1]-3*hilb[j-1-alpha+1] } lbsyz[1]= lbgens[1]-hilb[1] lbsyz[2]= lbgens[2]-hilb[2]+3*hilb[1] lbsyz[3]= lbgens[3]-hilb[3]+3*hilb[2]-3*hilb[1] for(j=alpha+3;j<=delta+2;j++) { lbsyz[j-alpha+1]= lbgens[j-alpha+1]-hilb[j-alpha+1]+3*hilb[j-alpha]-3*hilb[j-alpha-1]+hilb[j-alpha-2] } print "deg hilb_I lbgens ubgens lbsyz ubsyz hilb_Z" for(j=alpha;j<=delta+2;j++) print j" "hilb[j-alpha+1]" "lbgens[j-alpha+1]" "ubgens[j-alpha+1]" "lbsyz[j-alpha+1]" "ubgens[j-alpha+1]-lbgens[j-alpha+1]+lbsyz[j-alpha+1]" "(j+1)*(j+2)/2-hilb[j-alpha+1] # end of testschemes loop print ".........................................." print " " } function fixedflag(F, flg,i) # return 1 if fixed part is nonempty, 0 otherwise {flg=0 for(i=1;i<=M1n;i++) if(dot(F,E[M1[i]]) < 0) { flg=1} for(i=Start[config];i<=Finish[config];i++) if(dot(F,C[i]) < 0) { flg=1} return flg } function getFreepart(F, Ftmp,n,D,flg,i) {Ftmp=F n=split(F, D, " ") flg=0 while(D[1]>=0 && flg==0) { flg=1 for(i=1;i<=M1n;i++) if(dot(Ftmp,E[M1[i]]) < 0) { Ftmp=subtract(Ftmp,E[M1[i]]) flg=0} for(i=Start[config];i<=Finish[config];i++) if(dot(Ftmp,C[i]) < 0) { Ftmp=subtract(Ftmp,C[i]) flg=0} split(Ftmp, D, " ") } return Ftmp } # F must be a class for at least 3 blow ups function h0andh1(F, n, D, Ftmp, i, vdim, dim, flg) {Ftmp=F n=split(F, D, " ") vdim=(D[1]+1)*(D[1]+2) for(i=2;i<=n;i++) vdim=vdim-(-D[i]+1)*(-D[i]) i=int(vdim/2)-1 while(i*2=0 && flg==0) { flg=1 for(i=1;i<=M1n;i++) if(dot(Ftmp,E[M1[i]]) < 0) { Ftmp=subtract(Ftmp,E[M1[i]]) flg=0} for(i=Start[config];i<=Finish[config];i++) if(dot(Ftmp,C[i]) < 0) { Ftmp=subtract(Ftmp,C[i]) flg=0} split(Ftmp, D, " ") } # The divisor has now been reduced if(D[1]<0) dim=0 else { dim=(D[1]+1)*(D[1]+2) for(i=2;i<=n;i++) { dim=dim-(-D[i]+1)*(-D[i])} i=int(dim/2)-1 while(i*2