-- degenerate a cubic surface to 3 planes restart K = ZZ R = K[H_1,E_1..E_3,E_4..E_6,H_2,E_7..E_9,H_3] -- 1st IP^2: H_1, E_1..E_3, E_4..E_6 -- 2nd IP^2: H_2, E_7..E_9 -- 3rd IP^2: H_3 varsR_1 = (gens R)_{0..6} varsR_2 = (gens R)_{7..10} varsR_3 = (gens R)_{11} dualSoccle = sum apply(3,i->H_(i+1)^2)-sum apply(9,i->E_(i+1)^2) -- embeddings X_{1,2,1} = (H_1-E_1-E_2-E_3) X_{1,2,2} = (H_2) X_{1,2,3} = 0 X_{1,3,1} = (H_1-E_4-E_5-E_6) X_{1,3,3} = (H_3) X_{1,3,2} = 0 X_{2,3,2} = (H_2-E_7-E_8-E_9) X_{2,3,3} = (H_3) X_{2,3,1} = 0 -- intersection int = (a,b) -> sub(contract(dualSoccle,a*b),ZZ) -- Fulton -- \sum X_ij -> \sum X_i delta = matrix apply(subsets({1,2,3},2),i->apply(gens R,z-> coefficient(z,(X_(i|{i#0})-X_(i|{i#1}))))) -- Prelog -- \sum X_i -> \sum X_ij rho = transpose matrix apply(subsets({1,2,3},2),i->( flatten apply({1,2,3},j->( apply(varsR_j,z->( vz := 0; if j==i#0 then vz=1; if j==i#1 then vz=-1; vz*(int(X_(i|{j}),z)) )) )) )) -- rho' -- \sum X_ij -> sum X_ijk rho' = matrix apply(subsets({1,2,3},2),i->( ijk = {1,2,3}; if ijk_{0,1} == i then vz = 1; if ijk_{0,2} == i then vz = -1; if ijk_{1,2} == i then vz = 1; {vz} )) -- delta' -- \sum X_ijk -> sum X_ijk delta' = matrix {apply(subsets({1,2,3},2),i->( ijk = {1,2,3}; if ijk_{0,1} == i then vz = -1; if ijk_{0,2} == i then vz = 1; if ijk_{1,2} == i then vz = -1; vz ))} -- TEST: is the square commutative? 0 == delta*rho-rho'*delta' -- kernel saturated? (cokernel has no torsion) ideal 1 == minors(2,delta) -- image of rho saturated of rank 3? ideal 1 == minors(3,rho) -- presentation of Q (killing torsion) Q = syz delta -- presentation of R preR = transpose syz transpose rho -- presentation of prelog prelog = preR*Q -- rank of prelog ring 7 == rank prelog -- prelog saturated? ideal 1 == minors(7,prelog) -- the 27 lines N = sub(contract(transpose vars R,matrix {flatten apply({1,2,3},i->apply({4,5,6},j->H_1-E_i-E_j))}),ZZ)| sub(contract(transpose vars R,matrix {flatten apply({1,2,3},i->apply({7,8,9},j->H_2+E_i-E_j))}),ZZ)| sub(contract(transpose vars R,matrix {flatten apply({7,8,9},i->apply({4,5,6},j->H_3+E_i+E_j))}),ZZ) -- TEST: are these prelog? assert (0==(transpose N)*rho) -- do these span the prelog ring? 7 == rank ((transpose N)*Q) -- select 7 lines gensPrelog = transpose N_{0,1,2,3,6,9,10} -- do these span a 7 dimensional lattice in the prelog ring 7==rank (gensPrelog*Q) -- is the lattice saturated, i.e. do the lines span the -- whole prelog ring? ideal(1) == minors(7,gensPrelog*Q)