-- run M2 -- copy the code below -- -- If you have Macaulay2 in your PC, just: -- download the file "Implicitization.m2" from -- http://mate.dm.uba.ar/~nbotbol/Implicitization.m2 -- run M2 -- copy the code below -- Exercise code S = QQ[s,t]; f0 = 2+s^2*t^6 f1 = s*t^6+2 f2 = s*t^5-3*s*t^3 f3 = s*t^4+5*s^2*t^6 needsPackage "Polyhedra"; load "Implicitization.m2"; L={f0,f1,f2,f3}; ----- First: with the N(f) toric embedding latticePoints polynomialsToPolytope L tEmb=newToricEmbedding L A= teToricRing tEmb describe A g = teToricRationalMap L; rM=representationMatrix (teToricRationalMap L,2); R=QQ[s,t,X_0..X_3]; Eq=sub(sub(rM,R), {X_0=>(sub(f0,R)), X_1=>(sub(f1,R)), X_2=>(sub(f2,R)), X_3=>(sub(f3,R))}); rank rM rank Eq iEq = implicitEq (L,2) (factor iEq)#2#0 ----- Second: with the triangle that gives the P^2 compactification Q2=convexHull matrix{{0,0,1},{0,1,0}} gQ2 = teToricRationalMap (L,Q2) rMQ2=representationMatrix (gQ2,14); R=QQ[s,t,X_0..X_3]; EqQ2=sub(sub(rMQ2,R), {X_0=>(sub(f0,R)), X_1=>(sub(f1,R)), X_2=>(sub(f2,R)), X_3=>(sub(f3,R))}); rank rMQ2 rank EqQ2 -- Optional ----- Third: try with the 1 by 1 rectangle that gives a segre-veronese embedding of P^1xP^1 Q3=convexHull matrix{{0,0,1,1},{0,1,0,1}} gQ3 = teToricRationalMap (L,Q3) rMQ3=representationMatrix (gQ3,5); R=QQ[s,t,X_0..X_3]; EqQ3=sub(sub(rMQ3,R), {X_0=>(sub(f0,R)), X_1=>(sub(f1,R)), X_2=>(sub(f2,R)), X_3=>(sub(f3,R))}); rank rMQ3 rank EqQ3 iEq3 = implicitEq (L,2,Q3) -- Optional ----- Third: try with this other triangle. Works better? Q1=convexHull matrix{{0,0,1},{0,3,3}} gQ1 = teToricRationalMap (L,Q1) rMQ1=representationMatrix (gQ1,2); R=QQ[s,t,X_0..X_3]; EqQ1=sub(sub(rMQ1,R), {X_0=>(sub(f0,R)), X_1=>(sub(f1,R)), X_2=>(sub(f2,R)), X_3=>(sub(f3,R))}); rank rMQ1 rank EqQ1 iEq1 = implicitEq (L,2,Q1) (factor iEq1)#2#0