--Selects 12 random points in the plane and computes the space of polynomials of degree leq (7,4) with double zeros at these points, then sets x=0 to get a four-dimensional subspace of a 5-dim'l vector space. restart kk = ZZ/32003 R=kk[x,y] P = random(R^2,R^12) for i from 1 to 12 do A_i = (ideal(x - P_(0,i-1), y - P_(1,i-1)))^2 B = intersect(A_1,A_2,A_3,A_4,A_5,A_6,A_7,A_8,A_9,A_10,A_11,A_12) C = res(ideal(mingens(B))) M = matrix({flatten(entries(matrix{{1},{y},{y^2},{y^3},{y^4}}*matrix{{1,x,x^2,x^3,x^4,x^5,x^6,x^7}}))}) S = R^1/module(B) T = R^40 F = map(S, T, M) K = kernel(F) mingens(K) V = entries(transpose(mingens(K))) W = apply(toList(0..3), i->apply(toList(0..4), j-> ((V#i)#(8*j)))) --Does the same as the above program, but varies the x parameter in each P_i and calculates the resulting tangent vector to G(4,5), then checks that these tangent vectors span the tangent space. restart kk = ZZ/32003 R=kk[u,x,y,z] --x,y,z are homogeneous variables of P^2, u is a parameter that represents varying one coordinate P = random(R^2,R^12) --choose 12 random points in A^2 M = matrix({flatten(entries(matrix(apply(5, j->{y^j*z^(4-j)}))*matrix({apply(8, j-> x^j*z^(7-j))})))}) for i from 0 to 11 do A_i = (ideal(x - z*P_(0,i), y - z*P_(1,i)))^2 --form the ideal of all polynomials vanishing twice at each point for i from 0 to 11 do ( D = intersect(if i==0 then ideal(1_R) else intersect(apply(i, j-> A_j)), if i==11 then ideal(1_R) else intersect(apply(11-i, j->A_(i+j+1))), (ideal(x-z*u - z*P_(0,i),y-z*P_(1,i)))^2); --For each i, D is the ideal representing polynomials vanishing twice at each P_j, but we vary the x-coordinate of P_i and watch how these polynomials vary S = R^1/module(D); T = R^40; F = map(S, T, M); K = mingens(kernel(F)); --Find relations among monomials of degree leq (7,4) in D_1 V_i = apply(5, j->apply(4, k->(K)_(8*j, 95-k))) --take the relations involving only u, set x=0 ) Y = apply(12, i-> flatten(entries(exteriorPower(4,matrix(V_i))))) --the ith entry of the resulting list is the element of Gr(4,5), plus "how this element changes with u" 5 == rank(sub(diff(u, matrix(Y)), u=>0)) --Differentiate with respect to u to get elt of tangent space (in P(Wedge^4(<1,...,y^4>))) 1 == rank(sub(matrix(Y), u=>0)) --A verification step, shows that all of these matrices represent elements of the tangent space to the same point! --Same as the above program, but for bidegree lew (5,4) and 9 random double zeroes; yields points in G(3,5) restart kk = ZZ/32003 R=kk[u,x,y,z] --x,y,z are homogeneous variables of P^2, u is a parameter that represents varying one coordinate P = random(R^2,R^9) --choose 12 random points in A^2 M = matrix({flatten(entries(matrix(apply(5, j->{y^j*z^(4-j)}))*matrix({apply(6, j-> x^j*z^(5-j))})))}) for i from 0 to 8 do A_i = (ideal(x - z*P_(0,i), y - z*P_(1,i)))^2 --form the ideal of all polynomials vanishing twice at each point for i from 0 to 8 do ( D = intersect(if i==0 then ideal(1_R) else intersect(apply(i, j-> A_j)), if i==8 then ideal(1_R) else intersect(apply(8-i, j->A_(i+j+1))), (ideal(x-z*u - z*P_(0,i),y-z*P_(1,i)))^2); --For each i, D is the ideal representing polynomials vanishing twice at each P_j, but we vary the x-coordinate of P_i and watch how these polynomials vary S = R^1/module(D); T = R^30; F = map(S, T, M); K = mingens(kernel(F)); --Find relations among monomials of degree leq (5,4) in D_1 V_i = apply(5, j->apply(3, k->(K)_(6*j, 69-k))) --take the relations involving only u, set x=0 ) Y = apply(9, i-> flatten(entries(exteriorPower(3,matrix(V_i))))) --the ith entry of the resulting list is the element of Gr(3,5), plus "how this element changes with u" 7 == rank(sub(diff(u, matrix(Y)), u=>0)) --Differentiate with respect to u to get elt of tangent space (in P(Wedge^3(<1,...,y^4>))) 1 == rank(sub(matrix(Y), u=>0)) --A verification step, shows that all of these matrices represent elements of the tangent space to the same point! --A general version of the above programs. Run using moving(a,b,c) where a and b are integers and c is a list of pairs of integers: {(r_1,s_1),...,(r_k,s_k)}. --The program checks: --1) Whether the conditions of having r_i general points of multiplicity s_i for each i from 1 to 5 impose the expected number of conditions on polynomials of bidegree (a,b) in (x,y) --2) Whether moving these points moves the resulting family of curves sufficiently. restart moving = (a,b,c) -> (kk = ZZ/32003; R = kk[u,x,y,z]; --x,y,z are homogeneous variables of P^2, u is a parameter that represents varying one coordinate expdim := (a+1)*(b+1) - sum(c, i->(i_0)*binomial((i_1)+1,2)); --This is the expected dimension of the space of polynomials of bidegree leq (a,b) in (x,y) with the prescribed zeros for i from 0 to #c-1 do P_i = random(R^2, R^((c_i)_0)); --choose the right number of random points in A^2 for i from 0 to #c-1 do for j from 0 to ((c_i)_0)-1 do A_(i,j) = (ideal(x - z*((P_i)_(0,j)), y - z*((P_i)_(1,j))))^((c_i)_1); --A_(i,j) is the ideal of functions vanishing (c_i)_1 times at the point (x,y) = ((P_i)_(0,j), (P_i)_(1,j)) for i from 0 to #c-1 do D_i = intersect(apply((c_i)_0, j-> A_(i,j))); --D_i is the ideal of functions vanishing the right number of times at each (P_i)_j (i fixed, j varying) for i from 0 to #c-1 do E_i = intersect(if i==0 then ideal(1_R) else intersect(apply(i, k-> D_k)), if i==(#c-1) then ideal(1_R) else intersect(apply(#c-i-1, k->D_(i+k+1)))); --E_i is the the intersection of the D_j for j != i M = matrix({flatten(apply(b+1, k->(apply(a+1, l-> x^(l)*y^(k)*z^(a+b-k-l)))))}); --matrix of polynomials of the desired bidegrees T = R^((a+1)*(b+1)); for i from 0 to #c-1 do for j from 0 to ((c_i)_0)-1 do (H = intersect(E_i,intersect(if j==0 then ideal(1_R) else intersect(apply(j, k-> A_(i,k))), if j==((c_i)_0 - 1) then ideal(1_R) else intersect(apply((c_i)_0 -j -1, k->A_(i,j+k+1))), (ideal(x-z*u - z*(P_i)_(0,j),y-z*(P_i)_(1,j)))^((c_i)_1))); I = intersect(E_i,intersect(if j==0 then ideal(1_R) else intersect(apply(j, k-> A_(i,k))), if j==((c_i)_0 - 1) then ideal(1_R) else intersect(apply((c_i)_0 -j -1, k->A_(i,j+k+1))), (ideal(x-z*(P_i)_(0,j),y-z*u-z*(P_i)_(1,j)))^((c_i)_1))); --I_(i,j) is the ideal of functions having the right vanishing conditions at every point, with a parameter varying the y-coordinate of (P_i)_j S = R^1/module(H); U = map(S, T, M); K = mingens(kernel(U)); --Finds relations between polynomials of the desired bidegrees in R/H. L = mingens(image(sub(K,{x=>0, y=>0, z=>0}))); --Removes all generators of the kernel which are not degree-0 in (x,y,z). n = numgens(source(L)); V_(i,j) = matrix(apply(b+1,l->(apply(expdim, k->(L)_((a+1)*l, n-k-1))))); --Take the relations involving only u, and extract those rows corresponding to powers of y (i.e. set x=0). S = R^1/module(I); --Repeat the same process moving y instead of x U = map(S, T, M); K = mingens(kernel(U)); L = mingens(image(sub(K,{x=>0, y=>0, z=>0}))); n = numgens(source(L)); W_(i,j) = matrix(apply(b+1,l->(apply(expdim, k->(L)_((a+1)*l, n-k-1))))) --NOTE: this step assumes there are the expected number of relations in which only u appears. The next line checks that this is indeed the case. ); if n == expdim then << "The conditions imposed by the points are independent." <(apply((c_i)_0, j-> flatten(entries(exteriorPower(expdim,matrix(V_(i,j))))))))), flatten(apply(#c, i->(apply((c_i)_0, j-> flatten(entries(exteriorPower(expdim,matrix(W_(i,j)))))))))}); --(1+(b+1-expdim)*(expdim) == rank(sub(diff(u, matrix(Y)), u=>0)), 1 == rank(sub(matrix(Y), u=>0)),sub(diff(u,matrix(Y)), u=>0)) --check that we span the tangent space of the target << "The dimension of the space spanned is " << rank(sub(diff(u,matrix(Y)), u=>0)) <0)), 1 == rank(sub(matrix(Y), u=>0))) --check that we span the tangent space of the target ) --With this format, the first program is now: moving(7, 4, {(12,2)}) --And the second is: moving(5, 4, {(9,2)}) --Testing whether we can find a family this way of degree 5 rational curves in P^2 which avoid the boundary divisor Delta_{1,4}. Returns true. moving(5, 5, {(11,2)}) --Now looking for a family of degree 6 rational curves in P^2 which avoid both Delta_{1,5} and Delta_{3,3}. Returns true. moving(8,6,{(20,2)}) --This is another family that should do the same thing, but the above program returns false. The program below returns true, though! moving(5,6,{(13,2)}) --Similarly, looking for family of degree 6 rational curves in P^2 which avoid Delta_{1,5} and Delta_{2,4}. Runs out of memory! moving(14,6,{(17,3)}) --Here's another such family, but we can only hope for this to work with the program below. moving(8,6,{(10,3)}) --Looking for moving curve meeting TN and Delta_{1,4} but not Delta_{2,3} in M(P^2, 5). Returns true! moving(3,5,{(5,2),(1,3)}) --Looking for moving curve meeting TR and Delta_{2,3} but not Delta_{1,4} in M(P^2, 5). Returns false (i.e. curve does not move sufficiently). moving(3,5,{(11,1),(1,4)}) --The next three larger examples that might satisfy our criteria. Again, these curves are not moving (or at least we can't move them sufficiently by moving the randomly chosen points). moving(6,5,{(9,1),(3,4)}) moving(9,5,{(7,1),(5,4)}) moving(12,5,{(5,1),(7,4)}) --Next project: attempt to find moving curves by using points that do not impose the expected number of conditions. --First target with these methods: Find a moving curve in M(P^3, 5) having 0 intersection with Delta_1 and NI --Such a curve would allow us to completely determine the effective cone --Such curves are necessary if we want to find the boundaries of these cones, even in cases where the arithmetic is nice. --The following should be (currently untested) a version which allows this. restart moving = (a,b,c) -> (kk = ZZ/32003; R = kk[u,x,y,z]; --x,y,z are homogeneous variables of P^2, u is a parameter that represents varying one coordinate expdim := (a+1)*(b+1) - sum(c, i->(i_0)*binomial((i_1)+1,2)); --This is the expected dimension of the space of polynomials of bidegree leq (a,b) in (x,y) with the prescribed zeros for i from 0 to #c-1 do P_i = random(R^2, R^((c_i)_0)); --choose the right number of random points in A^2 for i from 0 to #c-1 do for j from 0 to ((c_i)_0)-1 do A_(i,j) = (ideal(x - z*((P_i)_(0,j)), y - z*((P_i)_(1,j))))^((c_i)_1); --A_(i,j) is the ideal of functions vanishing (c_i)_1 times at the point (x,y) = ((P_i)_(0,j), (P_i)_(1,j)) for i from 0 to #c-1 do D_i = intersect(apply((c_i)_0, j-> A_(i,j))); --D_i is the ideal of functions vanishing the right number of times at each (P_i)_j (i fixed, j varying) for i from 0 to #c-1 do E_i = intersect(if i==0 then ideal(1_R) else intersect(apply(i, k-> D_k)), if i==(#c-1) then ideal(1_R) else intersect(apply(#c-i-1, k->D_(i+k+1)))); --E_i is the the intersection of the D_j for j != i M = matrix({flatten(apply(b+1, k->(apply(a+1, l-> x^(l)*y^(k)*z^(a+b-k-l)))))}); --matrix of polynomials of the desired bidegrees T = R^((a+1)*(b+1)); for i from 0 to #c-1 do for j from 0 to ((c_i)_0)-1 do (H = intersect(E_i,intersect(if j==0 then ideal(1_R) else intersect(apply(j, k-> A_(i,k))), if j==((c_i)_0 - 1) then ideal(1_R) else intersect(apply((c_i)_0 -j -1, k->A_(i,j+k+1))), (ideal(x-z*u - z*(P_i)_(0,j),y-z*(P_i)_(1,j)))^((c_i)_1))); I = intersect(E_i,intersect(if j==0 then ideal(1_R) else intersect(apply(j, k-> A_(i,k))), if j==((c_i)_0 - 1) then ideal(1_R) else intersect(apply((c_i)_0 -j -1, k->A_(i,j+k+1))), (ideal(x-z*(P_i)_(0,j),y-z*u-z*(P_i)_(1,j)))^((c_i)_1))); --I_(i,j) is the ideal of functions having the right vanishing conditions at every point, with a parameter varying the y-coordinate of (P_i)_j S = R^1/module(H); U = map(S, T, M); K = mingens(kernel(U)); --Finds relations between polynomials of the desired bidegrees in R/H. L = mingens(image(sub(K,{x=>0, y=>0, z=>0}))); --Removes all generators of the kernel which are not degree-0 in (x,y,z). n = numgens(source(L)); V_(i,j) = matrix(apply(b+1,l->(apply(n, k->(L)_((a+1)*l, k))))); --Take the relations involving only u, and extract those rows corresponding to powers of y (i.e. set x=0). S = R^1/module(I); --Repeat the same process moving y instead of x U = map(S, T, M); K = mingens(kernel(U)); L = mingens(image(sub(K,{x=>0, y=>0, z=>0}))); n = numgens(source(L)); W_(i,j) = matrix(apply(b+1,l->(apply(n, k->(L)_((a+1)*l, n))))) --NOTE: this step assumes there are the expected number of relations in which only u appears. The next line checks that this is indeed the case. ); if n == expdim then << "The conditions imposed by the points are independent." <(apply((c_i)_0, j-> flatten(entries(exteriorPower(n,matrix(V_(i,j))))))))), flatten(apply(#c, i->(apply((c_i)_0, j-> flatten(entries(exteriorPower(n,matrix(W_(i,j)))))))))}); --(1+(b+1-expdim)*(expdim) == rank(sub(diff(u, matrix(Y)), u=>0)), 1 == rank(sub(matrix(Y), u=>0)),sub(diff(u,matrix(Y)), u=>0)) --check that we span the tangent space of the target << "The dimension of the space spanned is " << rank(sub(diff(u,matrix(Y)), u=>0)) <0)), 1 == rank(sub(matrix(Y), u=>0))) --check that we span the tangent space of the target ) --Our first task is to find candidates which we can plug into this program. The following checks whether polys in bideg (m,5) with k double points, l triple points have the expected dimension --For all cases tested, the answer is yes. restart conditionsGeneral = (m,k,l) -> ( kk = ZZ/32003; R=kk[x,y,z]; P = random(R^2,R^(k+l)); for i from 0 to k-1 do A_i = (ideal(x - z*P_(0,i), y - z*P_(1,i)))^2; for j from k to k+l-1 do A_j = (ideal(x - z*P_(0,j), y - z*P_(1,j)))^3; B = intersect(apply(k+l, i-> A_i)); M = matrix({flatten(apply(6, k->(apply(m+1, l-> x^(l)*y^(k)*z^(m+5-k-l)))))}); --matrix of polynomials of the desired bidegrees S = R^1/B; T = R^(6*(m+1)); F = map(S, T, M); K = kernel(F); V = mingens(image(sub(mingens(K), {x=>0, y=>0, z=>0}))); n := numgens(source(V)); expdim := 6*(m+1) - 3*k - 6*l; if n == expdim then << "The space of polynomials of bidegree leq " << (m,5) << " with " << k << " double zeros and " << l << " triple zeros has the expected dimension, " << expdim <