-- calculate the prelog ring of VxV -- with V a degeneration of a cubic threefold into -- a very general union of a IP^3 and a 3-dimensional quadric restart -- calculate the numerical intersection rings -- as well as all pull backs and push forwards -- for the parts of the central fiber time load"prelogVxVparts.m2" -- used 22.5259 seconds -- the tiles Y_{1} = Y1 Y_{2} = Y2 Y_{3} = Y3 Y_{4} = Y4 indSimple = {{1},{2},{3},{4}} -- the double intersections Y_{1,2} = Y12 Y_{1,3} = Y13 Y_{2,3} = Y23 Y_{2,4} = Y24 Y_{3,4} = Y34 indDouble = {{1,2},{1,3},{2,3},{2,4},{3,4}} -- the triple intersections Y_{1,2,3} = Y123 Y_{2,3,4} = Y234 indTriple = {{1,2,3},{2,3,4}} makeZZbasisGb(RSxS) -- coordinates from an element -- with respect to the chosen ZZbasis ZZcoords = (zz) -> ( R := ring zz; d := sum degree zz; flatten entries sub(transpose (zz // R#("ZZbasis",d)),ZZ) ) -- TEST: one example assert ({0,1,0,0} == ZZcoords(sub(h,Y1))) -- TEST: does one get back the element from coordinates and basis? apply(flatten entries ZZbasis(Y2),i->( assert (0==matrix{{i}}-Y2#("ZZbasis",sum degree i)*transpose matrix{ZZcoords(i)})) ); apply(indSimple,i->rank source (Y_i)#("ZZbasis",3)) -- sum {11, 12, 12, 4} = 39 apply(indDouble,i->rank source (Y_i)#("ZZbasis",3)) -- sum {7, 7, 10, 4, 4} = 32 apply(indDouble,i->rank source (Y_i)#("ZZbasis",2)) -- sum {7, 7, 10, 4, 4} = 32 apply(indTriple,i-> rank source (Y_i)#("ZZbasis",2)) -- sum {6,6} = 12 -- ZZ^32 -> ZZ^39 -- ! ! -- ZZ^12 -> ZZ^32 ----------- -- delta -- ----------- delta = matrix flatten apply(indDouble, ij->apply(flatten entries (Y_ij)#("ZZbasis",2), z->flatten apply(indSimple, a->( if (a#0 == ij#0) then return ZZcoords push(z,iotaLow#(ij,a)); if (a#0 == ij#1) then return -ZZcoords push(z,iotaLow#(ij,a)); return flatten entries sub(0*(Y_a)#("ZZbasis",3),ZZ) ) ) ) ) --------- -- rho -- --------- rho = matrix flatten apply(indSimple, i->apply(flatten entries (Y_i)#("ZZbasis",3), z->flatten apply(indDouble, ab->( zeroImage = flatten entries sub(0*(Y_ab)#("ZZbasis",3),ZZ); if (i#0 == ab#0) then ( iotaUpz = sub(z,iotaUp#(ab,i)); if iotaUpz == 0 then return zeroImage else return ZZcoords iotaUpz; ); if (i#0 == ab#1) then ( iotaUpz = sub(z,iotaUp#(ab,i)); if iotaUpz == 0 then return zeroImage else return -ZZcoords iotaUpz; ); return zeroImage ) ) ) ) 11 == rank(delta*rho) ------------ -- rho' -- ------------ rho' = matrix flatten apply(indDouble, ij->apply(flatten entries (Y_ij)#("ZZbasis",2), z->flatten apply(indTriple, abc->( zeroImage = flatten entries sub(0*(Y_abc)#("ZZbasis",2),ZZ); if ij == abc_{0,1} then ( iotaUpz = sub(z,iotaUp#(abc,ij)); if iotaUpz == 0 then return zeroImage else return ZZcoords iotaUpz; ); if ij == abc_{0,2} then ( iotaUpz = sub(z,iotaUp#(abc,ij)); if iotaUpz == 0 then return zeroImage else return -ZZcoords iotaUpz; ); if ij == abc_{1,2} then ( iotaUpz = sub(z,iotaUp#(abc,ij)); if iotaUpz == 0 then return zeroImage else return ZZcoords iotaUpz; ); return zeroImage ) ) ) ) ------------ -- delta' -- ------------ delta' = matrix flatten apply(indTriple, ijk->apply(flatten entries (Y_ijk)#("ZZbasis",2), z->flatten apply(indDouble, ab->( if (ab == ijk_{0,1}) then return -ZZcoords push(z,iotaLow#(ijk,ab)); if (ab == ijk_{0,2}) then return ZZcoords push(z,iotaLow#(ijk,ab)); if (ab == ijk_{1,2}) then return -ZZcoords push(z,iotaLow#(ijk,ab)); return flatten entries sub(0*(Y_ab)#("ZZbasis",3),ZZ) ) ) ) ) -- TEST: is the friedmann condition ok? assert (rho'*delta' == delta*rho) ------------ -- prelog -- ------------ -- surjection onto coker delta (killing torsion) gamma = syz delta -- presentation of R sigma = transpose syz transpose rho -- surjection onto the prelog group (modulo torsion) prelog = sigma*gamma -- rank of prelog ring 6 == rank prelog -------------------------- -- find representatives -- -------------------------- coeffPrelog = L -> ( matrix{flatten apply(L,i->( if i==0 then flatten entries sub(0*(ring i)#("ZZbasis",3),ZZ) else ZZcoords i ))} ) -- make an element in the prelog ring -- from a vector of coefficients toPrelog = v -> ( d := apply({Y1,Y2,Y3,Y4},i->rank source i#("ZZbasis",3)); sumd := {0}|apply(4,i->sum d_{0..i}); apply(4,i->( ((Y_{i+1})#("ZZbasis",3) *transpose v_{sumd#i..sumd#(i+1)-1})_0_0 ) )) PxV = {sub(h^3,Y1),sub(h^3,Y2),0_Y3,0_Y4} VxP = {sub(H^3,Y1),0_Y2,sub(H^3,Y3),0_Y4} CxS = {sub(h^2-2*f,Y1)*sub(H,Y1),sub(h^2-2*f,Y2)*sub(S,Y2),0_Y3,0_Y4} SxC = {sub(h,Y1)*sub(H^2-2*F,Y1),0_Y2,sub(s,Y3)*sub(H^2-2*F,Y3),0_Y4} -- TEST: are toPrelog and coeffPrelog inverse? assert (PxV == toPrelog coeffPrelog PxV ) -- TEST: are these prelog? assert (0==(coeffPrelog PxV)*rho) assert (0==(coeffPrelog VxP)*rho) assert (0==(coeffPrelog CxS)*rho) assert (0==(coeffPrelog SxC)*rho) -- for the degree map, choose a point class -- on each tile use Y1;Y1.point = h^3*H^3 use Y2;Y2.point = h^3*S*L use Y3;Y3.point = s*l*H^3 use Y4;Y4.point = s*l*S*L intPrelog = (z1,z2) -> ( sum apply(4,i->sub(contract((ring z1#i).point,(z1#i)*(z2#i)),ZZ)) ) gensVxVpre = {PxV,VxP,CxS,SxC} matrix apply(gensVxVpre,i->apply(gensVxVpre,j->intPrelog(i,j))) -- | 0 1 0 0 | -- | 1 0 0 0 | -- | 0 0 0 1 | -- | 0 0 1 0 | ------------------- --- the diagonal -- ------------------- -- the diagonal in LC x LC use Y1;diagY1 = h^3 + h^2*H + h*H^2 + H^3 - D -- the diagonal in Q x Q use Y4;diagY4 = s*l+s*L+S*l+S*L -- the diagonal in S x S use RSxS;diagSxS = r1*r2+r1*R2+R1*r2+R1*R2 -- the strict transform of the diagonal in Y2 diagY2 = push(sub(diagSxS,RN),iotaLow#({2,3},{2})) -- the strict transform of the diagonal in Y2 diagY3 = push(sub(diagSxS,RN),iotaLow#({2,3},{3})) -- the diagonal in VxV diag = {diagY1,diagY2,diagY3,diagY4} -- TEST: is it prelog? assert (0==(coeffPrelog diag)*rho) gensVxVpre = {PxV,VxP,CxS,SxC,diag} intMat = matrix apply(gensVxVpre,i->apply(gensVxVpre,j->intPrelog(i,j))) -- | 0 1 0 0 1 | -- | 1 0 0 0 1 | -- | 0 0 0 1 1 | -- | 0 0 1 0 1 | -- | 1 1 1 1 -6 | 5 == rank intMat ------------ -- on CxC -- ------------ --{- D + f*E + e*F, 0, 0, 0} use Y1; efD = {- D + f*E + e*F, 0_Y2, 0_Y3, 0_Y4} -- TEST: is it prelog? assert (0==(coeffPrelog efD)*rho) -- the generators gensVxVpreD = {PxV,VxP,CxS,SxC,diag,efD} -- the intersection matrix intMatD = matrix apply(gensVxVpreD,i->apply(gensVxVpreD,j->intPrelog(i,j))) -- | 0 1 0 0 1 0 | -- | 1 0 0 0 1 0 | -- | 0 0 0 1 1 0 | -- | 0 0 1 0 1 0 | -- | 1 1 1 1 -6 -8 | -- | 0 0 0 0 -8 -8 | -- the rank of the intersection matrix 6 == rank intMatD -------------------------- -- Torsion & Saturation -- -------------------------- -- random Element of a set randomL = L -> L#(random(#L)) -- random subset randomSubset = (m,n) -> ( L := apply(m,i->i); apply(n,i->( j := random(#L); l := L#j; L = drop(L,{j,j}); l )) ) -- random maximal minor randomMaximalMinor = (MM) -> ( r := rank MM; MM_(randomSubset(rank source MM,r))^(randomSubset(rank target MM,r) )) -- rho -- TEST: rank of rho assert (22 == rank rho) -- TEST: rho not saturated? time gcd apply(10000,i->det randomMaximalMinor(rho)) -- used 10.9218 seconds -- TEST: rho drops rank over ZZ/2 assert (21 == rank sub(rho,ZZ/2)) assert (22 == rank sub(rho,ZZ/3)) -- delta -- TEST: rank of delta assert (22 == rank delta) --TEST: kernel not saturated? (cokernel has torsion) rank (LLLdelta = (LLL delta)_{17..38}) -- TEST: rho not saturated? time assert (2==gcd apply(1000,i->det randomMaximalMinor(LLLdelta))) -- TEST: indeed not full rank over ZZ/2 assert (21 == rank sub(delta,ZZ/2)) assert (22 == rank sub(delta,ZZ/3)) -- prelog -- prelog not saturated? assert (2 == gcd apply(1000,i->det randomMaximalMinor(prelog))) assert (5 == rank sub(prelog,ZZ/2)) -------------------------------------------- -- the above 6 generators form a ZZ-Basis -- -------------------------------------------- -- the images of the generators in ZZ^17 gammaGens = matrix apply(gensVxVpreD,i->flatten entries coeffPrelog i)*gamma -- TEST: do these generators span over QQ? assert (6 == rank gammaGens) -- produce a ZZ-matrix by magic magic = matrix apply(17,i->( s = transpose syz transpose (prelog^{i}||gammaGens); if s_{0}==1 then flatten entries(-s_{1..6}) else flatten entries s_{1..6} )) -- TEST: can all 17 lines of the 17x17 matrix -- be obtained by ZZ-linear combinations of -- the 6 generators? assert (prelog == magic*gammaGens) ------------------------- -- saturate Num_prelog -- ------------------------- -- TEST: the gcd of the minors is 2 2 == gcd apply(100,i->det randomMaximalMinor(gammaGens)) -- TEST: the rank over ZZ/2 is 5 assert (5==rank sub(gammaGens,ZZ/2)) -- TEST: the sum of the generators is nonzero mod 2 but -- in the kernel mod 2 assert ( transpose syz transpose sub(gammaGens,ZZ/2) == matrix{{1,1,1,1,1,1_(ZZ/2)}} ) -- are all coefficients indeed even? matrix{{1,1,1,1,1,1}}*gammaGens