restart; setRandomSeed"osculatingCone" load"constructionOfTheOsculatingCone.m2" -- ground field and canonical ring PP^7 kk = ZZ/10007; PP7 = kk[x_0..x_7]; -- coordinate ring of PP^2 PP2 = kk[y_0..y_2]; -- we choose randomly 13 kk-rational points in the plane thirteenPoints = intersect(apply(13, i -> ideal(random(1, PP2), random(1, PP2)))); degree thirteenPoints, dim thirteenPoints -- we construct the plane model C' C' = ideal(gens saturate(thirteenPoints^2) * random(source gens saturate(thirteenPoints^2), PP2^{1: -8})); singC'=saturate ideal mingens(ideal(jacobian C')+C'); degree C', genus C', degree singC', dim singC', singC'==thirteenPoints -- note that the canonical map is the blowup of PP^2 in thirteenPoints blowup = map(PP2, PP7, gens thirteenPoints*matrix basis(5, thirteenPoints)); -- canonical embedding of C' C = ideal mingens preimage_blowup(C'); M = matrix{{x_0,x_1,x_2},{x_3,x_4,x_5}}; X = minors(2,M); X + C == C sixPoints = C + ideal(random(kk)*M^{0}+random(kk)*M^{1}); degree sixPoints, dim sixPoints, betti gens sixPoints -- we construct generic cubics with the following properties -- (a) containing C -- (b) polars w.r.t. V(x_0..x_5) contain C -- (c) goes through V(x_l;l\in L) -- where L\in {{0,1,3,4},{0,2,3,5},{1,2,4,5}} -- using the function "genericCubic(C,L1,L2,a)" -- which computes a generic cubic in the ideal of C, -- whose polars w.r.t. V(x_l,l\in L1) contain C and -- goes through V(x_l;l\in L2). time (cubic0, coeffa) = genericCubic(C, {0,1,2,3,4,5}, {0,1,3,4}, a); time (cubic1, coeffb) = genericCubic(C, {0,1,2,3,4,5}, {0,2,3,5}, b); time (cubic2, coeffc) = genericCubic(C, {0,1,2,3,4,5}, {1,2,4,5}, c); -- (d) the generic cubics have to satisfy special linear relations: -- x_2*cubic0-x_1*cubic1+x_0*cubic2 \in scroll and -- x_5*cubic0-x_4*cubic1+x_3*cubic2 \in scroll -- we find all possible generic cubics satisfying the two linear relations -- initializing the ring R, where all computations take place s0 = rank source vars coeffa; s1 = rank source vars coeffb; s2 = rank source vars coeffc; q = rank source matrix basis(4,X); coeffd = kk[d_1..d_q]; coeff = coeffa ** coeffb ** coeffc ** coeffd; R = coeff[flatten entries vars PP7]; -- substituting the generic cubics into R cubic0=sub(cubic0,R); cubic1=sub(cubic1,R); cubic2=sub(cubic2,R); -- generic quartic in X quartics = gens X*matrix basis(4,X); quartic = (sub(quartics,R)* transpose sub((vars coeff)_{s0+s1+s2..s0+s1+s2+q-1},R))_(0,0); -- equations in the coefficients of -- cubic0, cubic1, cubic2 and quartic for condition (d): equa1 = sub( (coefficients(sub(x_2,R)*cubic0-sub(x_1,R)*cubic1+sub(x_0,R)*cubic2 -quartic))#1,coeff); equa2 = sub( (coefficients(sub(x_5,R)*cubic0-sub(x_4,R)*cubic1+sub(x_3,R)*cubic2 -quartic))#1,coeff); -- solutions: solution1 = sub(syz diff(vars coeff, equa1), kk); solution2 = sub(syz diff(vars coeff, equa2), kk); -- all common solutions: sols = intersectionSpace(solution1^{0..s0+s1+s2-1}, solution2^{0..s0+s1+s2-1}); solution = sols * random(source sols,kk^1); -- substituting the solution in the generic cubics helpCubic0 = apply(s0,i->(a_(i+1) => solution_(i,0))); helpCubic1 = apply(s1,i->(b_(i+1) => solution_(s0+i,0))); helpCubic2 =apply(s2,i->(c_(i+1) => solution_(s0+s1+i,0))); f1 = sub(sub(cubic0,helpCubic0),PP7); f2 = sub(sub(cubic1,helpCubic1),PP7); f3 = sub(sub(cubic2,helpCubic2),PP7); -- finally, the oculating cone OscCone = (ideal(f1,f2,f3) + X); use PP7; OscCone + C == C -- vertex of the tangent cone X V = ideal(x_0..x_5); -- points spanning the vertex gensPointsSpanVertex = pointsInHyperplane(V); -- coordinates of the spanning points coordPointsSpanVertex = apply(gensPointsSpanVertex,p->coordinatesOfPoint(p)); -- polars w.r.t to these points polars = apply(flatten entries gens OscCone, f->( ideal apply(coordPointsSpanVertex,p->( polarOfHypersurfaceAtPoint(f,p))))); -- the polar variety to the osculating cone w.r.t. the vertex V: polar = ideal polars + X; -- we intersect the polar variety with the osculating cone -- the intersection is the curve and the vertex V ideal mingens saturate(polar + OscCone,V) == C