newPackage( "GlicciPointsInP3", Version => "0.3", Date => "December 3, 2012", Authors => {{Name => "Frank-Olaf Schreyer", Email => "schreyer@math.uni-sb.de", HomePage => "http://www.math.uni-sb.de/ag/schreyer/"}, {Name => "David Eisenbud", Email => "de@msri.org", HomePage => "http://www.msri.org/~de/"} }, Headline => "Experiments establishing direct Gorenstein linkages for finite subsets of P^3", DebuggingMode => true ) export { "hasFactor", "pickGorensteinIdeal", "testSplitting", "findSplittingExample", -- "selectFactor", "tangentDimension", "listhVectors", "checkDimensionsHCG", "hVector", "BEdegrees", "dimFormula", "createCandidates", "checkCandidates", "getGraph", "graphvizFile", "isEven", "sizeConjClass", "probOfFactor", "primeDivisors", "numOfIrreducible", "numOfSquareFree", "polynomialsWithFactor", "verifyAllAssertionsOfThePaper", "verifyGraphInSmallCharacteristic" } ------------------------------------------------- -- splitting and factoring ------------------------------------------------- hasFactor=method(TypicalValue=>Boolean) hasFactor(RingElement,ZZ) := (f,n)-> ( hasFactor(ideal f,n) ) hasFactor(Ideal,ZZ) := (I,n)-> ( -- check whether a homogeneous principal ideal I in two variables over finite ground field FF -- is square-free and has a factor of degee n defined over FF. R:=ring I; if not class R === PolynomialRing and dim R !=2 then error "expected a polynomial in P^1"; cp:=decompose I; -- decompose I in its irreducible factors t:=tally apply(cp,c->degree c); -- frequency of degree c factors dc:=unique select(apply(cp,c->degree c),d->d<= n); --degrees of factors of degree at most n if sum apply(cp,c->degree c) =!= degree I then return false; -- check that f has no multiple factor L:={0};Ld:=0; --sum the degrees of subsets of factors of degree <=n recursively scan(dc,d->(Ld=apply(t_d+1,i->i*d);L=flatten apply(L,l->apply(Ld,k->l+k)))); member(n,L) ) pickGorensteinIdeal=method() pickGorensteinIdeal(Ring,List) := (S,hV)-> ( -- inputs: S, polynomial ring -- hV, h-vector of a codimension 3 Gorenstein ring -- outputs: J, a Gorenstein ideal with h-vector hV -- M, the skew-symmetric Buchsbaum-Eisenbud presentation matrix of J. (d1,d2) := BEdegrees hV; pickGorensteinIdeal(S,d1,d2) ) pickGorensteinIdeal(Ring,List,List) := (S,d1,d2) -> ( -- input: S a polynomial ring, -- d1,d2 lists of degrees of a Buchsbaum-Eisenbud matrix -- outputs: J, a Gorenstein ideal -- M, the skew-symmetric Buchsbaum-Eisenbud matrix M:=random(S^d1,S^d2); M=map(S^d1, S^d2,M-transpose M); -- generate a random skew-symmetric matrix J:=ideal syz M; (J,M)) findSplittingExample=method() findSplittingExample(Ring,List,ZZ):= (S,hV,n) ->( -- input: S a polynomial ring, coordinate ring of P^3 -- hV h-vector -- n degree of the desired factor -- output: the ideal J of a Gorenstein set of points with h-vector hV -- the ideal I of the subset of n points -- the skew-symmetric Buchsbaum-Eisenbud matrix of the example (could be dropped since we do not use it.) (d1,d2) := BEdegrees hV; findSplittingExample(S,d1,d2,n)) findSplittingExample(Ring,List,List,ZZ):= (S,d1,d2,n) ->( -- input: S a polynomial ring, coordinate ring of P^3 -- d1,d2 lists of degrees of an Buchsbaum-Eisenbud matrix -- n degree of the desired factor -- output: the ideal J of a Gorenstein set of points, -- the ideal I of the subset of n points -- the skew-symmetric Buchsbaum-Eisenbud matrix of the example (could be droped since we do not used it the moment) kk:=coefficientRing S; S1:=kk[gens S,MonomialOrder => Eliminate 2]; --prepare projection to P^1 S2:=kk[S_2,S_3]; M:=0;J:=0;J1:=0;f:=0; while ( while ( (J,M)=pickGorensteinIdeal(S,d1,d2); J1=sub(J,S1); f=sub(selectInSubring(1,gens gb J1),S2); -- project to P^1 not hasFactor(ideal f,n)) do (); I:=selectFactor(J,n); degree I =!= n ) do (); return (J,I,M) ) selectFactor=method() selectFactor(Ideal,ZZ) := (J,n) -> ( S:=ring J; kk:=coefficientRing S; --project to a line S1:=kk[gens S,MonomialOrder => Eliminate 2]; S2:=kk[S_2,S_3]; J1:=sub(J,S1); f:=sub(selectInSubring(1,gens gb J1),S2); cp:=decompose ideal f; t:=tally apply(cp,c->degree c); -- frequences in which a factor occurs dc:=unique select(apply(cp,c->degree c),d->d<= n); L:={{0,{{0,0}}}};Ld:=0; -- we build a list of factors consisting of tuples {m,L1}, of a possible degree m of a factor and a list L1 of tuples -- {d,i}, with d the degree of an irreducible factor and 0 <= i <= t_d the number of factors we take in this degree scan(dc,d->(Ld=apply(t_d+1,i->{i*d,{{d,i}}}); L=flatten apply(L,l->apply(Ld,k->{l_0+k_0,l_1|k_1}))) ); A:=(select(L,l->l_0==n))_0_1; -- select takes all possibilities to reach the desired degree n, --_0 takes the first possibility -- and _1 the list L1 of {d,i} of degrees d and number i of factors of degree d A1:=select(A,a->a_1>0);-- remove factors with i=0, i.e. those we did not use fs:=0; fn:=product(A1,a->(fs=select(cp,c->degree c == a_0); product(a_1,j->fs_j)) ); -- compute the corresponding product I1:=J:sub(fn,S); -- compute the residual scheme to the scheme defined by sub(fn,S), the lift of the factor back to P3. --note that we do not check that the lifted factor has the right cardinality. This must be checked by the calling routine. return J:I1 --return the ideal of the subscheme corresponding to the selected factor. ) testSplitting=method() testSplitting(Ring,List,ZZ):= (S,hV,n) -> ( -- input: S, polynomial ring, coordinate ring of P^3 -- hV, h-vector of a Gorenstein ideal -- n, an integer, the desired degree of a factor -- Chooses a random Gorenstein set of points with desired h-vector; checks for splitting; throws away the example and returns -- true or false. Illustrative computing. kk:=coefficientRing S; --prepare rings to make projection to a line S1:=kk[gens S,MonomialOrder => Eliminate 2]; S2:=kk[S_2,S_3]; (J,M):=pickGorensteinIdeal(S,hV); J1:=sub(J,S1); f:=sub(selectInSubring(1,gens gb J1),S2); hasFactor(ideal f,n) ) ---------------------------------- -- degrees and h-vectors ---------------------------------- hVector=method() hVector(ZZ):= d -> ( -- input: d a degree -- output: the h-vector of d general points in P^3 -- the h-vector has shape {1,3,...,binomial(s+1,2),epsilon}, -- i.e. the hilbert function grows like the polynomial ring until it becomes constant L:=apply(floor((d)^(1/3)+3),i->{i,binomial(i+3,3)}); b:=last select (L,b->b_1<=d); --b = the largest binomimal coefficient binomial(i+3,3) <= d h:=if d-b_1==0 then apply(b_0+1,i->binomial(i+2,2)) else apply(b_0+1,i->binomial(i+2,2))|{d-b_1}; h) -* hVector(Ideal):= I -> ( -- input: a putative ACM ideal -- output: its h-vector S:= ring I; c:=dim I; d:=degree I; I0:=I+ideal random(S^1,S^{c:-1}); if degree I0 =!= d then error "most likely not an ACM ideal"; h:=apply(d,i->hilbertFunction(i,I0)); delete(0,h)) *- hVector(Ideal):= I -> ( -- input: an ideal -- output: its h-vector S:= ring I; c := codim I; HS := toList hilbertSeries I; T := ring HS_0; num := HS_0//((1-T_0)^c); apply(1+(degree num)_0, d -> coefficient(T_0^d, num)) ) hVector(Module):= M -> ( -- input: an ideal -- output: list L, L_0=initial degree M, L_1 = h-vector M S:= ring M; c := codim M; mindeg := min ((degrees source gens M)_0); HS := toList hilbertSeries M; T := ring HS_0; num := T_0^(-mindeg)*(HS_0//((1-T_0)^c)); {mindeg,apply(1+(degree num)_0, d -> coefficient(T_0^d, num))} ) BEdegrees=method() BEdegrees(List) := hV -> ( --input: Gorenstein h-vector hV of codim 3 ideal --output: degrees d1 of source and d2 of target of presentation of a general --codim 3 Gorenstein ideal with the given h-vector. t := symbol t; T:=ZZ[t]; hS:=sum(#hV,i->hV_i*t^i); -- the Hilbert series hilbNum:=hS*(1-t)^3;-- the Hilbert numerator. Its terms correspond to the resolution. socleDeg:=#hV-1; middle:=hilbNum-(1-t^(socleDeg+3)); -- Get all but first, last term of hilbNum midTerms:=terms middle; d:=0;a:=0; negTerms:=select(midTerms, m->(d=(degree m)_0; coefficient(t^d,m)<0)); d1:=sort flatten apply(negTerms,m->(d=(degree m)_0; a=-coefficient(t^d,m);toList(a:-d))); -- Since the number of generators of a Gorenstein codim 3 ideal is odd: --if #d1, is even then we must add an extra degree --(which would have been cancelled in the Hilbert numerator) if #d1%2==0 then d1=sort (d1|{ -ceiling((socleDeg+3)/2)}); d2:=apply(d1,i->-socleDeg-3-i); (d1,d2)) ----------------------------------------- -- computation of tangent dimensions -- ----------------------------------------- tangentDimension=method() tangentDimension(Ideal,Ideal):=(I,J) -> ( --J\subset I are ideals; the script computes the dimension of the spaces --Hom(I,S^1/I)_0 , Hom(J,S^1/J)_0,Hom(J,I/J)_0 and --of first-order homogeneous deformations of I and J and --of the subspace of deformations of J that contain the given I. S:= ring I; Tfiber:=Hom(J,I/J); TGor:=Hom(J,S^1/J); -- in the application, J is a Gorenstein ideal. THilb:=Hom(I,S^1/I); -- THilb1:=Hom(J,S^1/I); tf:=hilbertFunction(0,Tfiber); tg:=hilbertFunction(0,TGor); th:=hilbertFunction(0,THilb); -- th1:=hilbertFunction(0,THilb1); -- if th != th1 then (<< "th = ", << th, << " =!= th1 = ", << th1 < ( --J \subset I\cap I' are ideals of points in P3. In the application J is Gorenstein, and I' is residual to I. --We compute the dimensions of the tangent spaces of the fibers to the map from the correspondence -- Hilb_I <--- Hilb_{J\subset I} = Hilb_{J\subset I'} --> Hilb_{I'} (where the = holds if I and I' are residual). -- we compute the dimensions of Hom(J,I/J)_0 and Hom(J,I'/J)_0 and use Hartshorne's formulas for -- the dimensions of Hom(J,S/J)_0, and dim Hom(I,S/I)_0 = 3*deg I, dim Hom(I',S/I')_0 = 3*deg I'. S:= ring I; Tfiber:=Hom(J,I/J); Tfiber':=Hom(J,I'/J); tg:=dimFormula hVector J; th:=3*degree I; th':=3*degree I'; tf:=hilbertFunction(0,Tfiber); tf':=hilbertFunction(0,Tfiber'); ((tf,tg,th),(tf',tg,th')) ) tangentDimension(Ideal):=(I) -> ( -- we compute the dimension of the space Hom(I,S^1/I)_0 of homogeneous first order deformations of I. S:= ring I; THilb:=Hom(I,S^1/I); th:=hilbertFunction(0,THilb); th ) dimFormula=method() dimFormula(List) := hV -> ( --input hV is the h-vector of a codim 3 Gorenstein ideal as in Prop 4.2 s:=0;c:=0; --initialize variables of the subroutine if #hV%2==1 then (s= lift((#hV-1)/2,ZZ); -- the odd case I) of Proposition 4.2 c= hV_s-hV_(s-1); 4*s*(s+1)+4*c-1) else ( -- the even case II) of Proposition 4.2 s= lift((#hV-2)/2,ZZ); c=if s>0 then hV_s-hV_(s-1) else hV_s; lift(9/2*s*(s+1)+1/2*c*(c+13)-c*s-1,ZZ)) ) checkDimensionsHCG=method() checkDimensionsHCG(List,Ring) := (L,S) -> ( -- inputs: L, a list of h-vectors of type I) or II), -- S, a ploynomial ring -- output: a tally of booleans -- check the dimension formula of Proposition 4.2 for Gorenstein sets of points for all h-vectors listed in L d1:=0;d2:=0;J:=0;M:=0; tally apply(L,hV-> ( (d1,d2)=BEdegrees hV; (J,M)=pickGorensteinIdeal(S,d1,d2); dimFormula hV == tangentDimension J) ) ) ----------------------------------------- -- Building the bi-dominance graph ----------------------------------------- listhVectors=method() listhVectors(ZZ) := s -> ( -- Lists L1 and L2 of all hvectors of Gorenstein ideals of points of type I and II -- as in Proposition 4.1 of the paper up to the value s L1:=0;a:=0;L2:=0; L1=flatten apply(toList(1..s),t->( L1=apply(t,j->binomial(j+2,2)); a=last L1; apply(t+2, c->L1|{a+c}|reverse L1) )); --the case hV={1,1} needed for the gorenstein link 1-1 is joined to the list L2, because it corresponds to the case s=0,c=1 L2={{1,1}}|flatten apply(toList(1..s),t->( L2=apply(t,j->binomial(j+2,2)); a=last L2; apply(t+2,c->L2|{a+c}|{a+c}|reverse L2) )); (L1,L2)); createCandidates=method() createCandidates(ZZ) := b -> ( -- input b an integer bound for the maximal s for h Vectors -- b=6 gets all d:=0;hV:=0;e:=0;gV:=0; -- we assume that the degree d >= e, and sum hV = d+e, so that the residual set has degree e. (L1,L2):=listhVectors b; --#L1,#L2 L := L1|L2; L=select(L,hV-> dimFormula hV>=3*ceiling(sum(hV)/2)); -- #L -- the dimension formula bounds the list of possible hVectors. -- L2=select(L2,hV-> dimFormula hV>=3*ceiling(sum(hV)/2)); --#L2 L=flatten apply(L,hV-> apply(toList(ceiling(sum(hV)/2)..floor(dimFormula hV/3)),d-> (d,hV))); --#L -- add possible degree d of a subscheme. d must be in the given bounds for a possible example to exist. L=select(L,dhV-> ((d,gV)=dhV; e=sum gV -d; e>0)); -- make sure that the residual number e is still > 0 (should be superfluous) L=select(L,dhV->( (d,gV)=dhV; e=sum gV -d; hV=hVector d; select(reverse(gV-(hV|apply(#gV-#hV,i->0))),i->i!=0)==hVector e)); --select those (d,gV) such that the hVector of d general points --and the reverse of the hVector of e = sum gV - d general points --sum to the given Gorenstein h-Vector gV. sort L ) checkCandidates=method() checkCandidates(List,Ring):= (L,S) -> ( (d,hV):=L_0;J:=0;g:=0;I:=0;M:=0;h:=0;h1:=0;I1:=0;J1:=0;d1:=0;d2:=0; tf:=0,tg:=0;th:=0;tf':=0;th':=0;I':=0;t:=0;t':=0; Lt := apply(L, dhV -> ( (d,hV)=dhV; g=sum hV; (d1,d2)=BEdegrees hV; while ( (J,I,M)=findSplittingExample(S,d1,d2,d); I'=J:I; not (degree J==g and hVector d == hVector I and hVector(g-d) == hVector I')) do (); time (t,t')=tangentDimension(I,I',J); tg=t_1,th=t_2,tf=t_0,tf'=t'_0,th'=t'_2; << ((d,hV,g-d), tg==tf+th and tg==tf'+th') <((tf,tg,th)=c_1;(tf',tg,th')=c_2; tg==tf+th and tg==tf'+th')); Lbad:=select(Lt,c->((tf,tg,th)=c_1;(tf',tg,th')=c_2;not(tg==tf+th and tg==tf'+th'))); (Lgood,Lbad)) getGraph=method() getGraph(Ring,ZZ) := (S,b) -> (d:=0;g:=0;hV:=0; L:=createCandidates b; (Lgood,Lbad):=checkCandidates(L,S); apply(Lgood,c->((d,hV)=c_0;g=sum hV;(d,g-d))) ) getGraph(List) := Lgood -> (d:=0;g:=0;hV:=0; apply(Lgood,c->((d,hV)=c_0;g=sum hV;(d,g-d))) ) graphvizFile=method(); graphvizFile(String,String,List) := (filename,graphname,G) ->( --this function accepts a list of lists or sequences --in the form produced by getGraph and outputs --a file suitable for input to graphviz, freely available from "http://www.graphviz.org/". --Execute (in a shell) --"dot -Tpdf graphname.dot -o graphname.pdf" --to produce the pdf file. openOut filename; filename << "Graph "< filename<( (sum(L,i->i+1))%2==0) isEven(Partition):= L -> isEven toList L isSquareFree(RingElement) := f -> ( dc:=decompose ideal f; sum(dc,c->degree c) == degree ideal f) sizeConjClass=method() sizeConjClass(Partition) := P -> ( L:= toList P; t:=tally L; n:=sum L; lift(n!/product(L)/product(values t, j->j!),ZZ) ) sizeConjClass(List) := P -> ( L:=P; t:=tally L; n:=sum L; lift(n!/product(L)/product(values t, j->j!),ZZ) ) probOfFactor=method() probOfFactor(ZZ,ZZ) := (n,d) -> ( --probability that a monic polynomial of degree n over --a field F of q elements --is square free AND has a factor of degree d over F for q -> infinity assert( n>=d); L1:=partitions d; L2:=partitions(n-d); goodPartitions:= unique flatten apply(L1, P-> apply(L2,Q-> reverse sort(toList P|toList Q))); sum(goodPartitions,P->sizeConjClass P)/n!+0.0) probOfFactor(ZZ,ZZ,ZZ) := (n,d,q) -> ( --probability that a monic polynomial of degree n over --a field F of q elements --is square free AND has a factor of degree d over F. assert( n>=d); assert( #toList factor q==1); L1:=partitions d; L2:=partitions(n-d); goodPartitions:= unique flatten apply(L1, P-> apply(L2,Q-> reverse sort(toList P|toList Q))); t:=0; A:=sum(goodPartitions,P->( t=tally P; product(keys t,e->product(t_e,i->(numOfIrreducible(e,q)-i))/(t_e)!) )); A/q^n+0.0) probOfFactor(ZZ,ZZ,PolynomialRing,ZZ) := (n,d,R,ord) -> ( --probability that a monic polynomial of degree n over --a field F of q elements --is square free AND has a factor of degree d over F. --computes answer to order ord in q^(-1), q := symbol q; Q' := QQ[q]; assert( n>=d); L1:=partitions d; L2:=partitions(n-d); goodPartitions:= unique flatten apply(L1, P-> apply(L2,Q-> reverse sort(toList P|toList Q))); t:=0; A':=sum(goodPartitions,P->( t=tally P; product(keys t,e-> product(t_e,i->(numOfIrreducible(e,Q')-i))/(t_e)!) )); A'' := A'-(A'%q^(n-ord)); A := (map(R,Q',{R_0}))A''; A*(R_0)^(-n) ) primeDivisors=method() primeDivisors(ZZ) := d -> ( apply(toList factor d,f->(toList f)_0) ) numOfIrreducible=method() numOfIrreducible(ZZ,ZZ) := (d,q) ->( L:=primeDivisors d; L1:=subsets set L; lift(1/d*sum(L1,s->(-1)^(#s)*q^(lift( d/product(toList s),ZZ))),ZZ) ) numOfIrreducible(ZZ,PolynomialRing) := (d,R) ->( q:=R_0; L:=primeDivisors d; L1:=subsets set L; 1/d*sum(L1,s->(-1)^(#s)*q^(lift( d/product(toList s),ZZ))) ) numOfSquareFree=method() numOfSquareFree(ZZ,PolynomialRing) := (d,Q) -> ( -- d=6 L:=apply(partitions d,P->toList P); t:=0; A:=sum(L,P->( -- P=L_3 t=tally P; product( keys t,e->product(t_e,i->numOfIrreducible(e,Q)-i)/((t_e)!)) )); A) polynomialsWithFactor = method() polynomialsWithFactor(ZZ,ZZ,PolynomialRing) := (n,d,R) -> ( --number of square-free monic polynomials of degree n over --a field F of q elements --that have a factor of degree d over F. q:=R_0; assert( n>=d); L1:=partitions d; L2:=partitions(n-d); goodPartitions:= unique flatten apply(L1, P-> apply(L2,Q-> reverse sort(toList P|toList Q))); t:=0; A:=sum(goodPartitions,P->( t=tally P; product(keys t,e->product(t_e,i->(numOfIrreducible(e,R)-i))/(t_e)!) )); A ) --------------- -- verify all -- --------------- verifyAllAssertionsOfThePaper=() ->( print " /// --run the following commands in Macaulay 2 setRandomSeed(\"verify all\") isPrime 10001, isPrime 10003, isPrime 10007 -- smallest prime >10^4 kk:=ZZ/10007 S:=kk[x_0..x_3] -- experiment on page 7 hV:=hVector 20|reverse hVector 10 time tally apply(10^4,c->testSplitting(S,hV,20)) -- used 431.164 seconds -- output --Tally{false => 6132} -- true => 3868 --------------------------------------------------- -- section 2 univariate polynomial statistic -- --------------------------------------------------- q:=symbol q Q:=QQ[q] numOfIrreducible(6,Q) numOfSquareFree(6,Q) polynomialsWithFactor(6,3,Q) q=symbol q Q=RR[q,MonomialOrder=>Lex,Inverses=>true]; probOfFactor(30,20,10007) probOfFactor(30,20,Q,1) probOfFactor(15,1,Q,1) probOfFactor(15,1) --------------------------------- -- section 4 main theorem -- --------------------------------- #createCandidates 100 == #createCandidates 5 -- corollar 4.3 L:=createCandidates 5 (Lgood,Lbad):=checkCandidates(L,S) (#Lgood,#Lbad)==(93,9) -- main theorem G=getGraph Lgood LgoodhVs=unique apply(Lgood,c->c_0_1) #LgoodhVs --graphvizFile(\"bidominanceGraph.dot\",\"H\",G,0) --in a shell, execute: dot -Tpdf bidominanceGraph.dot -o bidominanceGraph.pdf netList Lbad -- remark 4.6 finiteFibers=apply( select(Lgood,b->b_1_0==0) ,b->(b_0_0,b_0_1,b_3)) netList finiteFibers ---------------- -- section 1 -- ----------------- -- graphvizFile(\"bidominanceGraph.dot\",\"H\",G,0) -- in a shell, execute: dot -Tpdf bidominanceGraph.dot -o bidominanceGraph.pdf -- question: 34? hVector 34, hVector 21 hV55=hVector 35|reverse hVector 20 (dimFormula hV55,3*34)==(99,102) checkCandidates({(34,hV55)},S) hVector 36, hVector 34 hV70=hVector 35|reverse hVector 35 checkCandidates({(36,hV70)},S) hV68=hVector 34|reverse hVector 34 checkCandidates({(34,hV68)},S) /// " ) /// verifyAllAssertionsOfThePaper() /// verifyGraphInSmallCharacteristic=method() verifyGraphInSmallCharacteristic(ZZ,ZZ) := (q,b) -> ( if not isPrime q then error "q is not a prime number"; --if not #primeDivisors q ==1 then error "q is not a prime Power"; kk:=ZZ/q; --kk:=GF q; x:= symbol x; S:=kk[x_0..x_3]; L:=createCandidates(b); Lbad := {(7, {1, 3, 3, 3, 1}), (7, {1, 3, 3, 3, 3, 1}), (13, {1, 3, 6, 6, 6, 3, 1}), (14, {1, 3, 6, 6, 6, 3, 1}), (15, {1, 3, 6, 6, 6, 3, 1}), (16, {1, 3, 6, 6, 6, 6, 3, 1}), (17, {1, 3, 6, 7, 7, 6, 3, 1}), (25, {1, 3, 6, 10, 10, 10, 6, 3, 1}), (26, {1, 3, 6, 10, 10, 10, 6, 3, 1})}; L=select(L,c-> not member(c,Lbad)); cases:=#L;L1:={}; while ( (L1,L)=checkCandidates(L,S); not #L==0) do L=apply(L,c->c_0); #L==0) beginDocumentation() TEST /// setRandomSeed "hvector" hV1=hVector(19) hV=hV1|reverse hV1 (d1,d2)=BEdegrees hV S=ZZ/10009[x_0..x_2] (J,M)=pickGorensteinIdeal(S,d1,d2); assert(hVector J == hV) /// TEST /// S=ZZ/10009[x_0..x_3] (L1,L2)=listhVectors(2) #L1,#L2 time t1=checkDimensionsHCG(L1,S) assert(t1_true == #L1) time t2=checkDimensionsHCG(L2,S) assert(t2_true == #L2) /// TEST/// kk=ZZ/101 S = kk[x,y] I = ideal"x2,y2" M = S^{1}/I assert( (hVector I) === {1,2,1} ); assert( (hVector M) === {-1,{1,2,1}} ); assert( (hVector 21) === {1,3,6,10,1} ); /// TEST /// b=10 assert(#createCandidates 5 == #createCandidates 10) #createCandidates 5 /// TEST/// S=ZZ/10009[x_0..x_3] b=1 time G=getGraph(S,b) /// TEST/// n=6 assert(sum(partitions n,P->sizeConjClass P)==n!) /// TEST /// Q=QQ[q] assert(numOfSquareFree(6,Q)==q^6-q^5) assert(numOfIrreducible(6,Q)==1/6*(q^6-q^3-q^2+q)) /// TEST /// Q=QQ[q,MonomialOrder=>Lex,Inverses=>true] assert(probOfFactor(6,1,Q,1) == 91/144- 13/16*q^(-1) ) /// document { Key => GlicciPointsInP3, Headline => "Experiments establishing direct Gorenstein linkages for finite subsets of P^3", "We determine for which pairs of integers (d,e) there exist a direct Gorenstein link from the generic set of d points in P^3 to a generic set of e points in P^3. Our method of proving existence is computational: we choose examples of Gorenstein linkages using a probabilstic method, and show by a tangent space computation that the incidence correspondence are bidominant. Our paper ", HREF("http://arxiv.org/abs/1212.1841","Twenty Points in P^3") , " shows that no further bidominant correspondences can occur, and explains how the routines in this package establish the existence.", PARA{}, SUBSECTION "Splitting and Factoring", UL{ TO hasFactor, TO pickGorensteinIdeal, TO findSplittingExample, TO testSplitting }, SUBSECTION "Degrees and h-Vectors", UL{ TO hVector, TO BEdegrees }, SUBSECTION "Tangent Space Computations", UL{ TO tangentDimension, TO dimFormula, TO checkDimensionsHCG }, SUBSECTION "Building the Bidominance Graph", UL{ TO listhVectors, TO createCandidates, TO checkCandidates, TO getGraph, TO graphvizFile }, SUBSECTION "Univariate Polynomial Statistics", UL{ TO isEven, TO sizeConjClass, TO probOfFactor, TO primeDivisors, TO numOfIrreducible, TO numOfSquareFree, TO polynomialsWithFactor }, SUBSECTION "Verification", UL{ TO verifyAllAssertionsOfThePaper, TO verifyGraphInSmallCharacteristic } } doc /// Key hasFactor (hasFactor,RingElement,ZZ) (hasFactor,Ideal,ZZ) Headline check for a factor of desired degree Usage hasFactor(f,n) hasFactor(I,n) Inputs f: RingElement homogeneous Polynomial in two variables, or, I: Ideal defining a collection of points in P^1 n: ZZ the degree of the desired factor Outputs : Boolean Description Text The function checks whether the polynomial f has a factor of degree n defined over the field of definition. In case where the argument is an ideal I of points, we check for a subscheme of degree n. Example R=ZZ/10009[x,y] setRandomSeed("degree 3 factor"); f=random(8,R) apply(decompose ideal f,c->degree c) hasFactor(f,3) hasFactor(f,4) /// doc /// Key pickGorensteinIdeal (pickGorensteinIdeal,Ring,List) (pickGorensteinIdeal,Ring,List,List) Headline select a codimension 3 Gorenstein ideal Usage (J,M)=pickGorensteinIdeal(S,hV) (J,M)=pickGorensteinIdeal(S,d1,d2) Inputs S: Ring Polynomial ring in which the output ideal will be chosen hV: List an h-vector of a codimension 3 Gorenstein ideal, or d1: List d2: List the List of degrees of the target and source of the Buchsbaum-Eisenbud skew-symmetric matrix Outputs J: Ideal a Gorenstein ideal of codimension 3 with the given numerical invariant M: Matrix the Buchsbaum-Eisenbud skew symmetric presentation matrix of J Description Text In case the input is an h-vector the script calls BEdegrees to compute the degree pattern of the (unique) minimal size skew-symmetric matrix whose pfaffians define a Gorenstein ideal with that h-vector. We then choose a random skew-symmetric matrix of forms of the given BEdegrees. Example S=ZZ/10009[x_0..x_2] hV1=hVector 9; hV=hV1|reverse hV1 (J,M)=pickGorensteinIdeal(S,hV); betti res J hVector J /// doc /// Key findSplittingExample (findSplittingExample,Ring,List,ZZ) (findSplittingExample,Ring,List,List,ZZ) Headline find an example of a Gorenstein ideal of points with a subset of degree n Usage (J,I,M)=findSplittingExample(S,d1,d2,n); (J,I,M)=findSplittingExample(S,hV,n) Inputs S: Ring homogeneous coordinate ring of P^3 d1: List d2: List degrees of the target and source of the Buchsbaum-Eisenbud skew symmetric matrix,or hV: List h-vector of the desired Gorenstein ideal J n: ZZ the degree of the desired subset defined by I Outputs J: Ideal Gorenstein ideal of points I: Ideal of a degree n subscheme M: Matrix Buchsbaum-Eisenbud skew symmetric matrix Description Text We search for a pair (J,I) consisting of a reduced Gorenstein ideal J of points and an ideal I of a subset of degree n by choosing random Gorenstein ideals with an appropriate h-vector and checking to see whether they split in such a way that a subset of the components represents a scheme of degree n Example S=ZZ/10009[x_0..x_3] d1={7:0},d2={7:-1},n=10 time (J,I,M)=findSplittingExample(S,d1,d2,n); degree J, degree I betti res J betti res I betti res (J:I) Example S=ZZ/10009[x_0..x_3] n=7;hV={1,3,3,3,1} time (J,I,M)=findSplittingExample(S,hV,n); degree J, degree I betti res J betti res I /// doc /// Key testSplitting (testSplitting,Ring,List,ZZ) Headline test a random Gorenstein set of points in P^3 for a factor Usage testSplitting(S,hV,k) Inputs S: Ring homogeneous coordinate ring of P^3 over a finite field FF hV: List the h-vector of the Gorenstein set of point k: ZZ the degree of the desired subset defined over FF Outputs : Boolean true, if a (within the function) randomly choosen Gorenstein collection with h-vector hV in P^3 splits of a subset of desired degree k ? Description Text A random Gorenstein collection of points splits of subset of k points quite frequently. The only purpose of this function is to illustrate this fact. Example S=ZZ/10009[x_0..x_3] hV={1,3,6,10,6,3,1} time tally apply(10,i->testSplitting(S,hV,10)) /// ----------------------------------- -- Degrees and h-Vectors -- ----------------------------------- doc /// Key hVector (hVector,ZZ) (hVector,Ideal) (hVector,Module) Headline compute the h-vector Usage h=hVector d h=hVector I L = hVector M Inputs d: ZZ I: Ideal M: Module Outputs h: List the h-vector L: List L_0 = initial degree of M, L_1 = h-vector M Description Text In case of an integer input d, we compute the h-vector of a generic set of d points in P^3. In the case of an ideal input I, we compute the h-vector of (ring I)/I. In the case of a module M, we return the list L= {initial degree M, h-vector M}. Example S=ZZ/101[x_0..x_3] (J,M)=pickGorensteinIdeal(S,{1,3,6,6,3,1}); hVector J hVector (S^{2}/J) hVector 10 /// doc /// Key BEdegrees (BEdegrees,List) Headline compute the degrees of the Buchsbaum-Eisenbud skew matrix Usage (d1,d2) = BEdegree hV Inputs hV: List the h-vector of a codimension 3 Gorenstein ideal Outputs d1: List d2: List Description Text We compute the degrees of the target and source of the skew-symmetric presentation matrix of a generic codimension 3 Gorenstein ideals with h-vector hV. Example S=ZZ/10009[x_0..x_3] hV={1,3,6,6,3,1} BEdegrees hV (J,M)=pickGorensteinIdeal(S,hV); betti res J hVector J /// -------------------------------- -- tangent space computation -- -------------------------------- doc /// Key tangentDimension (tangentDimension,Ideal) (tangentDimension,Ideal,Ideal) (tangentDimension,Ideal,Ideal,Ideal) Headline compute the dimension of tangentspaces Usage (tf,tg,th)=tangentDimension(I,J) th=tangentDimension I tg=tangentDimension J (t,t')=tangentDimension(I,I',J) Inputs I: Ideal an ideal of points containing J: Ideal Gorenstein ideal of points Outputs tf: ZZ dimension of Hom(I/J,S^1/J)_0 tg: ZZ dimension of Hom(J,S^1/J)_0 th: ZZ dimension of Hom(I,S^1/I)_0 Description Text J $ \subset $ I is a Gorenstein ideal J of distinct points contained in the ideal I of a subset set. i.e. the situation of Gorenstein linkage. The degree of 0 pieces of the Hom spaces above have the following interpretation: Hom(J,S/J)_0 and Hom(I,S/I)_0 are the spaces of first order deformations with constant Hilbert function (not only constant Hilbert polynomial!) Hom(I/J,S/J)_0 $\subset$ Hom(J,S/J)_0 are those defomations of J, which do not move I, i.e the tangent space of the fiber from $HC_{XcG} -> HC_X$ at the point (J,I). Example: Example S=ZZ/10009[a..d];hV={1,3,3,1},n=3; time (J,I,M)=findSplittingExample(S,hV,n); hV = hVector degree J betti res J betti res I time (tf,tg,th)=tangentDimension(I,J) tf==tg-th I'=J:I; time tangentDimension(I,I',J) degree I, degree J, degree I' Text It follows that the map $HC_{XuY=G} -> Hilb_{3}xHilb_{5}$ is a bi-dominant correspondence. /// doc /// Key dimFormula (dimFormula,List) Headline return dimension of HC_hV Usage dimFormula hV Inputs hV: List h-vector of Gorenstein points Outputs : ZZ the dimension of $HC_{hV}$ according to the formula of Proposition 4.2 of @ HREF("http://arxiv.org/abs/1212.1841","Twenty Points in P^3") @ Description Text The h-vector of a Gorenstein set of points in a possibly bi-dominant corrspondence have according to Proposition 4.1 of @ HREF("http://arxiv.org/abs/1212.1841","Twenty Points in P^3") @ one of the following two types I) $\{1,3,\ldots,binomial(s+1,2),binomial(s+1,2)+c,binomial(s+1,2),\ldots,3,1\}$ II) $\{1,3,\ldots,binomial(s+1,2),binomial(s+1,2)+c,binomial(s+1,2)+c,binomial(s+1,2),\ldots,3,1\}$ with $0 \le c \le s+1$. The function returns the dimension of $HC_{hV}$ according to the formula of Proposition 4.2 of @ HREF("http://arxiv.org/abs/1212.1841","Twenty Points in P^3") @. Example (L1,L2)=listhVectors 2 apply(L1,hV-> dimFormula hV) apply(L2,hV->dimFormula hV) /// doc /// Key checkDimensionsHCG (checkDimensionsHCG,List,Ring) Headline check that the dimension formula gives the dimension of the tangentspace at HC_G for a random choice of G Usage checkDimensionHCG(L,S) Inputs L: List of h-vectors for Gorenstein points as in of Proposition 4.1 of @ HREF("http://arxiv.org/abs/1212.1841","Twenty Points in P^3") @ S: Ring homogeneous coordinate ring of P^3 Outputs : Tally of a list of Boolean Description Text For each h-vector hV in L for a Gorenstein collection as in of Proposition 4.1, we randomly choose a point J in HC_h and check whether this point has tangent dimension as predicted by the dimension formula of Proposition 4.2 of @ HREF("http://arxiv.org/abs/1212.1841","Twenty Points in P^3") @. Example S=ZZ/10009[x_0..x_3];(L1,L2)=listhVectors 1; time checkDimensionsHCG(L1|L2,S) /// ------------------------------------------- -- Building the bi-dominance graph -------------------------------------------- doc /// Key listhVectors (listhVectors,ZZ) Headline list all admissible h-vectors of Gorenstein points up to b Usage (L1,L2)=listhVectors b Inputs b: ZZ bound for s Outputs L1: List L2: List of h-vectors of type I and II Description Text The h-vector of a Gorenstein set of points in a possibly bi-dominant corrspondence have according to Proposition 4.1 of @ HREF("http://arxiv.org/abs/1212.1841","Twenty Points in P^3") @ one of the following two types I) $\{1,3,\ldots,binomial(s+1,2),binomial(s+1,2)+c,binomial(s+1,2),\ldots,3,1\}$ II) $\{1,3,\ldots,binomial(s+1,2),binomial(s+1,2)+c,binomial(s+1,2)+c,binomial(s+1,2),\ldots,3,1\}$ with $0 \le c \le s+1$. The function creates the two list consisting of all h-vectors as above with $s\le b$. Example (L1,L2)=listhVectors 2 /// doc /// Key createCandidates (createCandidates,ZZ) Headline create numerical candidates for bi-dominant Gorenstein linkage correspondences Usage L=createCandidates b Inputs b: ZZ a bound for the value s in the list for possible h-vectors of dominant Gorenstein linkage correspondences Outputs L: List of candidates (d,hV) for a bi-dominant Gorenstein linkage correspondence Description Text Since the dimension of HC_h growth quadratic in s, while the dimension of the Hilbert scheme of points growth cubic in s there are only finitely many candidates for pairs (d,hV) of degrees and h-vectors of bi-dominant correspondences. For more details, see @ HREF("http://arxiv.org/abs/1212.1841","Twenty Points in P^3") @ The function lists all candidates with s <= b. Example L=createCandidates 5;#L L=createCandidates 6;#L max apply(L,dhV->dhV_0) /// doc /// Key checkCandidates (checkCandidates,List,Ring) Headline check which numerical candidates lead to a bi-dominant Gorenstein linkage correspondence Usage (Lgood,Lbad)=checkCandidates(L,S) Inputs L: List of candidates (d,hV) for a bi-dominant Gorenstein linkage correspondence S: Ring homogeneous coordinate ring of P^3 Outputs Lgood: List of tuples in L that correspond to a bi-dominant Gorenstein linkage correspondences, enriched by some further data Lbad: List of tuples in L which failed the test. Description Text For each pair (d,hV) in L of a degree d and an possible h-vector hV for a Gorenstein collection of g points, we randomly choose a point (J,I) in the correspondence and check whether this point belongs to a correspondence which dominates both Hilb_d and Hilb_(g-d). The assertion that J consists of g distinct points is verified during the selection of J. We assert that both I and I'=J:I have generic h-vectors for their degree. We then use the function @ TO tangentDimension @ to compute the tangent dimension tf and tf' of the fibers of the projections HCG_hV to H=Hilb_d and H'=Hilb_(g-d). We then test the numerical equality of Corollary 3.3 of @ HREF("http://arxiv.org/abs/1212.1841","Twenty Points in P^3") @. Two lists of candidates are returned: those that passed the test and those that failed. The elements of the lists are tuples ((d,hV),(tf,tg,3d),(tf',tg,3(g-d)), betti M) where M is the skew symmetric BE-matrix. The function prints some timings and intermediate results to the screen. Example S=ZZ/10009[x_0..x_3];L=createCandidates 1; (Lgood,Lbad)=checkCandidates(L,S); #L,#Lgood,#Lbad Lgood_11 Text The failing candidates of the list of all candidates are Example LbadCandidates={(7, {1, 3, 3, 3, 1}), (7, {1, 3, 3, 3, 3, 1}), (13, {1, 3, 6, 6, 6, 3, 1}), (14, {1, 3, 6, 6, 6, 3, 1}), (15, {1, 3, 6, 6, 6, 3, 1}), (16, {1, 3, 6, 6, 6, 6, 3, 1}), (17, {1, 3, 6, 7, 7, 6, 3, 1}), (25, {1, 3, 6, 10, 10, 10, 6, 3, 1}), (26, {1, 3, 6, 10, 10, 10, 6, 3, 1})}; Text The cases in which the projection $HC_{X \subset G} \to HC_X$ is 1-1 are the following: Example LfiniteFiber={(7, {1, 3, 3, 1}), (17, {1, 3, 6, 7, 6, 3, 1}), (21, {1, 3, 6, 10, 6, 3, 1}), (25, {1, 3, 6, 10, 10, 6, 3, 1}), (29, {1, 3, 6, 10, 12, 10, 6, 3, 1}), (32, {1, 3, 6, 10, 12, 12, 10, 6, 3, 1}), (33, {1, 3, 6, 10, 15, 10, 6, 3, 1}), (38, {1, 3, 6, 10, 15, 15, 10, 6, 3, 1}), (45, {1, 3, 6, 10, 15, 19, 15, 10, 6, 3, 1})}; /// doc /// Key getGraph (getGraph,List) (getGraph,Ring,ZZ) Headline compute the graph of the bi-dominant Gorenstein linkage correspondences. Usage G=getGraph(Lgood) G=getGraph(S,10) Inputs Lgood: List cases, which passed the test S: Ring homogeneous coordinate ring of P^3 b: ZZ examines all relevant Gorenstein schemes with s <= b. See @ HREF("http://arxiv.org/abs/1212.1841","Twenty Points in P^3") @, Proposition 4.1, for the definition of s. Outputs G: List of pairs (d,e) of integers, defining edges of the graph. Description Text We say that two Hilbert schemes H_d and H_e of reduced points in P^3 have a dominant Gorenstein linkage correspondence if the etale cover HC_{G=XuY} of the Hilbert scheme HC_G of cones over arithmetically Gorenstein sets of d+e points dominates H_d and H_e. Let G be the graph whose vertices are natural numbers, and whose edges are dominant Gorenstein linkage correspondences. We compute the edges of G. For details, see @ HREF("http://arxiv.org/abs/1212.1841","Twenty Points in P^3") @. There are precisely 4 nontrivial connected components of G: {1,...,33,37,38}, {34,36}, {35} and {44,45,46,47}, with edges including loops as given below. In particular, we conclude that d general points of degree d with $1 \leq d \leq 33$, or with d = 37 or d = 38, are glicci. The following sequence records the graph that could be produced by running the programs in the this package, and places it into the file "bidominanceGraph.dot" Example G={(1, 1), (2, 1), (2, 2), (2, 2), (3, 1), (3, 3), (3, 2), (4, 1), (4, 4),(5, 3), (6, 2), (6, 5), (6, 6), (7, 1), (7, 5), (7, 6), (7, 7), (8, 4), (8, 8), (8, 5), (8, 6), (9, 4), (9, 9), (9, 5), (10, 4), (10, 10), (11, 3), (11, 9), (12, 8), (13, 7), (14, 6), (14, 13), (14, 14), (15, 12), (15, 13), (15, 14), (15, 15), (16, 11), (16, 12), (16, 13), (16, 14), (17, 10), (17, 11), (17, 12), (17, 13), (18, 10), (18, 18), (18, 11), (18, 12), (19, 10), (19, 19), (19, 11), (20, 10), (20, 20), (21, 9), (21, 19), (22, 18), (23, 17), (24, 16), (25, 15), (26, 25), (26, 26), (27, 24), (27, 25), (27, 26), (27, 27), (28, 24), (28, 25), (28, 26), (28, 27), (29, 23), (29, 24), (29, 25), (29, 26), (30, 23), (30, 24), (30, 25), (31, 23), (31, 24), (32, 32), (32, 23), (33, 33), (33, 22), (34, 34), (35, 35), (36, 34), (37, 33), (38, 32), (45, 44), (45, 45), (46, 44), (46, 45), (47, 44)}; Text We do not compute the table during the installation because this takes more than 48 minutes (on a certain MacBook pro). The function getGraph prints some timings and intermediate results. A lot of time is used for the last edge (47, 44), which used 28 minutes. The following h-vectors occur for bi-dominant correspondences: Example listOfhVectors={{1, 1}, {1, 1, 1}, {1, 1, 1, 1}, {1, 2, 1}, {1, 2, 2, 1}, {1, 3, 1}, {1, 3, 3, 1}, {1, 3, 3, 3, 1}, {1, 3, 4, 3, 1}, {1, 3, 5, 3, 1}, {1, 3, 6, 3, 1}, {1, 3, 4, 4, 3, 1}, {1, 3, 5, 5, 3, 1}, {1, 3, 6, 6, 3, 1}, {1, 3, 6, 7, 6, 3, 1}, {1, 3, 6, 8, 6, 3, 1}, {1, 3, 6, 9, 6, 3, 1}, {1, 3, 6, 10, 6, 3, 1}, {1, 3, 6, 8, 8, 6, 3, 1}, {1, 3, 6, 9, 9, 6, 3, 1}, {1, 3, 6, 10, 10, 6, 3, 1}, {1, 3, 6, 10, 11, 10, 6, 3, 1}, {1, 3, 6, 10, 12, 10, 6, 3, 1}, {1, 3, 6, 10, 13, 10, 6, 3, 1}, {1, 3, 6, 10, 14, 10, 6, 3, 1}, {1, 3, 6, 10, 15, 10, 6, 3, 1}, {1, 3, 6, 10, 12, 12, 10, 6, 3, 1}, {1, 3, 6, 10, 13, 13, 10, 6, 3, 1}, {1, 3, 6, 10, 14, 14, 10, 6, 3, 1}, {1, 3, 6, 10, 15, 15, 10, 6, 3, 1}, {1, 3, 6, 10, 15, 19, 15, 10, 6, 3, 1}, {1, 3, 6, 10, 15, 20, 15, 10, 6, 3, 1}, {1, 3, 6, 10, 15, 21, 15, 10, 6, 3, 1}}; #listOfhVectors apply(listOfhVectors,hV->sum hV) Text To illustrate, we run the program with b=1: Example S=ZZ/10009[x_0..x_3] G=getGraph(S,1) /// doc /// Key graphvizFile (graphvizFile, String, String, List) Headline builds an input file for graphviz Usage graphvizFile(filename, graphname,G) Inputs filename:String name of file to be written graphname:String name of pdf file that will be produced by "dot" Consequences Item Writes file called "filename.dot" into current directory Description Text This function accepts a list of lists or sequences in the form produced by getGraph and outputs a file suitable for input to graphviz, freely available from @ HREF ("http://www.graphviz.org/","graphviz.org") @. Execute (in a shell) "dot -Tpdf graphname.dot -o graphname.pdf" to produce the pdf file. /// ------------------------------------ --Univariate Polynomial Statistic -- ------------------------------------ doc /// Key isEven (isEven,List) (isEven,Partition) Headline Is L the class of an even permutation? Usage isEven L Inputs L: Partition or a List representing a partition Outputs : Boolean true if a permutation with cycle type L is even Description Text Example isEven({4,1,1}) isEven({3,3}) /// doc /// Key sizeConjClass (sizeConjClass,List) (sizeConjClass,Partition) Headline number of permutations with given cycle decomposition Usage sizeConjClass L Inputs L: Partition or a List representing a partition Outputs : ZZ size of the conjugacy class Description Text Example n=6 sum(partitions n,P->sizeConjClass P)==n! /// doc /// Key probOfFactor (probOfFactor,ZZ,ZZ) (probOfFactor,ZZ,ZZ,ZZ) (probOfFactor,ZZ,ZZ,PolynomialRing,ZZ) Headline probability that a polynomial of degree n is square free AND has a factor of degree k over the same finite ground field Usage probOfFactor(n,k) probOfFactor(n,k,q) probOfFactor(n,k,Q,ord) Inputs n: ZZ degree of the random polynomial k: ZZ degree of the desired factor q: ZZ number of elements of the finite field Q: PolynomialRing Q=QQ[q,MonomialOrder=>Lex, Inverses=>true] or Q=RR[q,MonomialOrder=>Lex, Inverses=>true] ord: ZZ order to which to return the answer Outputs : RR a probability in [0,1], or a polynomial in $q^{ -1}$, where q = Q_0 Description Text The probability that a monic polynomial of degree n over a finite field F of q elements is square free AND has a factor of degree d over F, can be computed via a over partitions. An approximation for q-> infinity is as the relative size of the conjugacy classes with a sub partitions of size k in the symmetric group $S_n$. The first version returns the approximation. The second version returns the precise value. The last version returns the probability as function of $q$ up to order $q^{ -ord}$. Example probOfFactor(30,10) probOfFactor(6,3) probOfFactor(6,3,101) q=symbol q; Q = RR[q, MonomialOrder => Lex, Inverses=>true] probOfFactor(6,3,Q,1) probOfFactor(12,1,Q,1) /// doc /// Key primeDivisors (primeDivisors,ZZ) Headline compute List of prime factors of an integer Usage L=primeDivisors(n) Inputs n: ZZ an integer Outputs L: List the List of prime factors Description Text Example primeDivisors 12 /// doc /// Key numOfIrreducible (numOfIrreducible, ZZ,ZZ) (numOfIrreducible, ZZ, PolynomialRing) Headline the number of irreducible polynomials Usage numOfIrreducible(n,q) Inputs n: ZZ the degree of the polynomial q: ZZ the number elements of the finite field, or Q: PolynomialRing the polynomial ring Q=QQ[q] Outputs : ZZ Description Text Example q=symbol q;Q=QQ[q] numOfIrreducible(6,Q) numOfIrreducible(2,2) /// doc /// Key numOfSquareFree (numOfSquareFree, ZZ, PolynomialRing) Headline the number of irreducible polynomials Usage numOfSquareFree(n,Q) Inputs n: ZZ the degree of the polynomial Q: PolynomialRing the polynomial ring Q=QQ[q] Outputs : RingElement a polynomial in Q Description Text Example q=symbol q Q=QQ[q] numOfSquareFree(6,Q) /// doc /// Key polynomialsWithFactor (polynomialsWithFactor,ZZ,ZZ,PolynomialRing) Headline number of monic square-free polynomials of degree n with factor of degree degree k over F_q Usage polynomialsWithFactor(n,k,Q) Inputs n: ZZ degree of the random polynomial k: ZZ degree of the factor Q: PolynomialRing Q=QQ[q] Outputs : RingElement number of monic square-free polynomials of degree n with factor of degree degree k over F_q as function of q Description Text We compute the number of monic square-free polynomials of degree n with factor of degree degree k over F_q as function of q. Example Q = QQ[q] polynomialsWithFactor(6,3,Q) /// doc /// Key verifyAllAssertionsOfThePaper Headline print commands to verfy the assertions of the paper Usage verifyAllAssertionsOfThePaper Description Text Prints the commands needed to verify the assertions made in our paper @ HREF("http://arxiv.org/abs/1212.1841","Twenty Points in P^3") @. Now (perhaps with copy and paste), you could run them. Example verifyAllAssertionsOfThePaper() /// doc /// Key verifyGraphInSmallCharacteristic (verifyGraphInSmallCharacteristic, ZZ,ZZ) Headline print commands to verfy the assertions of the paper Usage ans = verifyGraphInSmallCharacteristic(p,b) Inputs p:ZZ prime number, size of the field over which to work b:ZZ bound on s. b=5 covers the whole graph. Outputs ans:Boolean returns "true" if the graph in characteristic p agrees with that in characteristic 0 up to point p. Description Text Example verifyGraphInSmallCharacteristic(2,1) /// end restart uninstallPackage("GlicciPointsInP3") installPackage("GlicciPointsInP3") check("GlicciPointsInP3") loadPackage("GlicciPointsInP3") viewHelp GlicciPointsInP3 verifyAllAssertionsOfThePaper() setRandomSeed("verify all") setRandomSeed("verify all") isPrime 10001, isPrime 10003, isPrime 10007 -- smallest prime >10^4 kk:=ZZ/10007 S:=kk[x_0..x_3] -- experiment on page 7 hV:=hVector 20|reverse hVector 10 time tally apply(10^4,c->testSplitting(S,hV,20)) -- used 431.164 seconds -- output --Tally{false => 6132} -- true => 3868 --------------------------------------------------- -- section 2 univariate polynomial statistic -- --------------------------------------------------- q:=symbol q Q:=QQ[q] numOfIrreducible(6,Q) numOfSquareFree(6,Q) polynomialsWithFactor(6,3,Q) q=symbol q Q=RR[q,MonomialOrder=>Lex,Inverses=>true]; probOfFactor(30,20,10007) probOfFactor(30,20,Q,1) probOfFactor(15,1,Q,1) probOfFactor(15,1) --------------------------------- -- section 4 main theorem -- --------------------------------- #createCandidates 100 == #createCandidates 5 -- corollar 4.3 L:=createCandidates 5 (Lgood,Lbad):=checkCandidates(L,S) (#Lgood,#Lbad)==(93,9) -- main theorem G=getGraph Lgood LgoodhVs=unique apply(Lgood,c->c_0_1) #LgoodhVs --graphvizFile("bidominanceGraph.dot","H",G,0) --in a shell, execute: dot -Tpdf bidominanceGraph.dot -o bidominanceGraph.pdf netList Lbad -- remark 4.6 finiteFibers=apply( select(Lgood,b->b_1_0==0) ,b->(b_0_0,b_0_1,b_3)) netList finiteFibers ---------------- -- section 1 -- ----------------- -- graphvizFile("bidominanceGraph.dot","H",G,0) -- in a shell, execute: dot -Tpdf bidominanceGraph.dot -o bidominanceGraph.pdf -- question: 34? hVector 34, hVector 21 hV55=hVector 35|reverse hVector 20 (dimFormula hV55,3*34)==(99,102) checkCandidates({(34,hV55)},S) hVector 36, hVector 34 hV70=hVector 35|reverse hVector 35 checkCandidates({(36,hV70)},S) hV68=hVector 34|reverse hVector 34 checkCandidates({(34,hV68)},S)