restart loadPackage "EliminationMatrices" --help detComplex R=QQ[a,b,c,d,e,f,x,y] f1 = a*x^2+b*x*y+c*y^2 f2 = 2*a*x+b*y --f2 = d*x^2+e*x*y+f*y^2 M = matrix{{f1,f2}} l = {x,y} K=koszul M -- the Koszul complex K.dd nu=5 -- graded component mapsComplex(nu,l,koszul M) -- maps of the complex in degree nu minorsComplex(nu,l,koszul M) -- maps of the complex in degree nu L=listDetComplex(nu,l,koszul M) -- decomposition in minors detComplex (nu,l,koszul M) -- graded component of degree 2 (A,B)=macaulayFormula(l,M) det A / det B ---------------- R=QQ[a,b,c,d,e,f,g,h,i,x,y,z] f1 = a*x+b*y+c*z f2 = d*x+e*y+f*z --f3 = g*x+h*y+i*z f3 = g*x^2+h*y^2+i*z^2 M = matrix{{f1,f2,f3}} l = {x,y,z} K=koszul M -- the Koszul complex K.dd nu=5 -- graded component mapsComplex(nu,l,koszul M) -- maps of the complex in degree nu minorsComplex(nu,l,koszul M) -- maps of the complex in degree nu L=listDetComplex(nu,l,koszul M) -- decomposition in minors detComplex (nu,l,koszul M) -- graded component of degree 2 (A,B)=macaulayFormula(l,M) det A / det B ---------------- restart loadPackage "EliminationMatrices" R=QQ[z,x0,x1,x2,T0,T1,T2,T3,MonomialOrder=>Lex] -- Sphere parameterization f0=x0^2+x1^2+x2^2 f1=x0^2-x1^2-x2^2 f2=2*x0*x1 f3=2*x0*x2 f1^2+f2^2+f3^2-f0^2 -- expected equation: T1^2+T2^2+T3^2-T0^1 F=matrix{{f0,f1,f2,f3}} I=ideal F primaryDecomposition saturate(I,ideal(x0,x1,x2)) - 2 base points -- Resultant l={x0,x1,x2} eqF=matrix{{T0*f1-T1*f0,T0*f2-T2*f0,T0*f3-T3*f0}} (A,B)=macaulayFormula({x0,x1,x2},eqF) B det B det A g0=f0 g1=f1+3*x0*x1 g2=f2 + 5*x1*x2 g3=f3 eqF=matrix{{T0*g1-T1*g0,T0*g2-T2*g0,T0*g3-T3*g0}} (A,B)=macaulayFormula({x0,x1,x2},eqF) B det B det A Eq1=det A / det B factor Eq1 Eq2=detComplex (4,l,koszul eqF) -- graded component of degree 2 Eq1+Eq2 listM=minorsComplex (6,l,koszul eqF) listM_2 -- Come back to the sphere example -- Equations of Rees algebra J=ideal (T0-f0*z,T1-f1*z,T2-f2*z,T3-f3*z) transpose gens gb J -- Now, syzygies! SM=syz F F F*SM I= ideal F saturate(I,ideal(x0,x1,x2)) (res I).dd--be carefull with reordering ML=matrix{{T0,T1,T2,T3}}*SM -- generators of Symmetric algebra IM=ML//matrix{{x0,x1,x2}} factor det IM_{0,1,2} factor det IM_{1,2,3}