LIB "elim.lib"; LIB "poly.lib"; LIB "general.lib"; LIB "algebra.lib"; LIB "ring.lib"; LIB "presolve.lib"; //////////////////////////////////////////////////////////////////////////////////// proc ABP_test (ideal i) " USAGE: Almost Borel Position test, i a homogeneous ideal, RETURN: 1 if the ideal is in Almost Borel Position, 0 ifnot. THEORY: An ideal is in Almost Borel Position if the quotient of any section of the ideal with respect to the maximal ideal is equal to the quotient of the ideal with respect to the last variable. See the paper of author: Computation of Castelnuvo-Mumford Regularity and Satiety, submitted to ISSAC 2007 " { //--------------------------- initialisation --------------------------------- int e,ii,jj,d; def r0 = basering; int n = nvars(r0)-1; string s = "ring r1 = ",charstr(r0),",x(0..n),dp;"; execute(s); ideal i,sbi,I,K,chcoord,m,L; i = fetch(r0,i); sbi=std(i); //----- Check ideal homogeneous if ( homog(sbi) == 0 ) { dbprint(2,"Your ideal is not homogeneous."); return (); } I=simplify(lead(sbi),1); attrib(I,"isSB",1); L=quotient(select(I,n+1),x(n)); L=L*maxideal(1); if (size(reduce(L,I)) <> 0) { return(0); } d=dim(I); for ( ii = n; ii>=n-d+1; ii-- ) { I=subst(I,x(ii),0); s = "ring mr = ",charstr(r0),",x(0..ii-1),dp;"; execute(s); ideal I,L; I=imap(r1,I); attrib(I,"isSB",1); L=quotient(select(I,ii),x(ii-1)); L=L*maxideal(1); if (size(reduce(L,I)) <> 0) { return(0); } setring r1; I=imap(mr,I); kill mr; } return(1); } /////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////// proc Stable_test (ideal i) " USAGE: Stable Position test, i a homogeneous ideal, RETURN: 1 if the ideal is in Stable Position, 0 ifnot. THEORY: An ideal is in Stable Position if the quotient of any section of the ideal with respect to the maximal ideal is equal to the quotient of the ideal with respect to the last variable. See the following paper: Eliahou, M. Kervaire, Minimal resolutions of some monomial ideals. J. Algebra 129 (1990) 1-25 " { //--------------------------- initialisation --------------------------------- int e,ii,jj,d; def r0 = basering; int n = nvars(r0)-1; string s = "ring r1 = ",charstr(r0),",x(0..n),dp;"; execute(s); ideal i,sbi,I,K,chcoord,m,L; i = fetch(r0,i); sbi=std(i); //----- Check ideal homogeneous if ( homog(sbi) == 0 ) { dbprint(2,"Your ideal is not homogeneous."); return (); } I=simplify(lead(sbi),1); attrib(I,"isSB",1); L=quotient(select(I,n+1),x(n)); L=L*maxideal(1); if (size(reduce(L,I)) <> 0) { return(0); } d=dim(I); for ( ii = n; ii>=2; ii-- ) { I=subst(I,x(ii),0); s = "ring mr = ",charstr(r0),",x(0..ii-1),dp;"; execute(s); ideal I,L; I=imap(r1,I); attrib(I,"isSB",1); L=quotient(select(I,ii),x(ii-1)); L=L*maxideal(1); if (size(reduce(L,I)) <> 0) { return(0); } setring r1; I=imap(mr,I); kill mr; } return(1); } //////////////////////////////////////////////////////////////////////////////////// proc Borel_test (ideal i) " USAGE: Borel test, i a homogeneous ideal, RETURN: 1 if the initial of i is Borel fixed, 0 ifnot. ASSUME: i is a homogeneous ideal of the basering. THEORY: a monomial ideal J is Borel if x_jm\in J implies that x_im\in J for all i 0) { return(0); } for ( ii = n; ii>=1; ii-- ) { I=subst(I,x(ii),0); s = "ring mr = ",charstr(r0),",x(0..ii-1),dp;"; execute(s); ideal I,L; I=imap(r1,I); attrib(I,"isSB",1); L=quotient(select(I,ii),x(ii-1)); L=L*maxideal(1); if (size(reduce(L,I)) <> 0) { return(0); } setring r1; I=imap(mr,I); kill mr; } return(1); } /////////////////////////////////////////////////////////////////////////////// proc NP_test (ideal i) " USAGE: NP-test (I); I monomial ideal RETURN: 1 if K[x(n-d+1),...,x(n)] is a Noether normalization of S/i where S=K[x(0),...x(n)] is the basering, and d=dim(S/i), 0 otherwise. ASSUME: i is a nonzero proper homogeneous ideal. NOTE: If i is not homogeneous and NP-test(i)=1 then K[x(n-d+1),...,x(n)] is a Noether normalization of S/i. The converse may be wrong if the ideal is not homogeneous. " { //--------------------------- initialisation --------------------------------- int n,ii,j,k,l,d,t; intvec v; def r0 = basering; n = nvars(r0)-1; string s = "ring r1 = ",charstr(r0),",x(0..n),dp;"; execute(s); ideal i,sbi,I,K; i = fetch(r0,i); sbi=std(i); I=simplify(lead(sbi),1); attrib(I,"isSB",1); list L,Y; if (I[1]==1) { print("The ideal is 1");return(1); } for ( ii = 1; ii <= n+1; ii++ ) { L[ii]=0; } for ( ii = 1; ii <= size(I); ii++ ) { Y=findvars(I[ii],1)[1]; l=rvar(Y[1][1]); if (size(Y[1])==1) { L[l]=1; } if (L[l]==0) { L[l]=-1; } } if (L[n+1]==-1) { return(0); } for ( ii = 1; ii <= n; ii++ ) { if (L[ii]==-1) { return(0); } if (L[ii]==0 and L[ii+1]==1) { return(0); } } d=n+1-sum(L); return(1); } //////////////////////////////////////////////////////////////////////////// proc SNP_test (ideal i) " USAGE: SNP_test (i); i monomial ideal RETURN: 1 if i is in Strong Noethet Position (SNP), 0 otherwise. ASSUME: i is a nonzero proper monomial ideal. NOTES: The ideal must be monomial, otherwise the result has no meaning (so check this before using this procedure). THEORY: A monomial ideal is in SNP if the saturation of any section of the ideal is equal to the saturation of the ideal with respect to the last variable. See the paper of author: Strong Noether Position and stabilized regularities, submitted to AAECC. " { //--------------------------- initialisation --------------------------------- int ii,h,d,n; def r0 = basering; n = nvars(r0)-1; string s = "ring r1 = ",charstr(r0),",x(0..n),dp;"; execute(s); ideal i,sbi,I,K,chcoord,m,L; i = fetch(r0,i); sbi=std(i); //----- Check ideal homogeneous if ( homog(sbi) == 0 ) { dbprint(2,"Your ideal is not homogeneous."); return (); } I=simplify(lead(sbi),1); attrib(I,"isSB",1); //----- When the ideal i is 0-dimensional: if ( d == 0 ) { return (1); } //----- Check Noether position h=NP_test(I); if ( h == 0 ) { return (0); } d=dim(I); //----- When ideal is 1-dim. + var. in Noether position -> Nested Type if ( d == 1 ) { return (1); } K=subst(select(I,n+1),x(n),1); h=maxdeg1(I)-mindeg1(K); K=K*maxideal(h); if (size(reduce(K,I)) <> 0) { return(0); } for ( ii = n; ii>=n-d+1; ii-- ) { I=subst(I,x(ii),1); s = "ring mr = ",charstr(r0),",x(0..ii-1),dp;"; execute(s); ideal I,L,K; I=imap(r1,I); attrib(I,"isSB",1); K=subst(select(I,ii),x(ii-1),1); h=maxdeg1(I)-mindeg1(K); K=K*maxideal(h); if (size(reduce(K,I)) <> 0) { return(0); } setring r1; I=imap(mr,I); kill mr; } return(1); } // A monomial ideal which is Borel fixed. ring r=0, x(0..2), dp; ideal i=x(0)^2,x(0)*x(1),x(1)^3,x(0)*x(2)^3; // An ideal of dimension 1 over 3 variables. ring r=0,(x,y,z),lp; poly s1 = 8x2y2 + 5xy3 + 3x3z + x2yz; poly s2 = x5 + 2y3z2 + 13y2z3 + 5yz4; poly s3 = 8x3 + 12y3 + xz2; poly s4 = 7x2y4 + 18xy3z2 + y3z3; ideal i = s1, s2, s3, s4; // Katsura4 an ideal of dimension 1 over 6 variables. ring r=0,(x,y,z,t,u,hh),dp; ideal i=2t2+u2+2x2+2y2+2z2-u,2tu+xy+2tz+2yz-t, t2+2ty+2uz+2xz-z, 2tx+2uy+2tz-y, 2t+u+2x+2y+2z-1; i=homog(i,hh); // Katsura5 an ideal of dimension 1 over 7 variables. ring r=0,(x,y,z,t,u,v,hh),dp; ideal i=2x2+2y2+2z2+2t2+2u2+v2-v, xy+yz+2zt+2tu+2uv-u, 2xz+2yt+2zu+u2+2tv-t, 2xt+2yu+2tu+2zv-z, t2+2xv+2yv+2zv-y, 2x+2y+2z+2t+2u+v-1; i=homog(i,hh); // Amrhein2 an ideal of dimension 1 over 8 variables. ring r=0,(a,b,c,d,e,f,g,h),dp; ideal i=a2+2de+2cf+2bg+ah,2ab+e2+2df+2cg+bh,b2+2ac+2ef+2dg+ch,2bc+2ad+f2+2eg+dh, c2+2bd+2ae+2fg+eh, 2cd+2be+2af+g2+fh, d2+2ce+2bf+2ag+gh; print("Kastura6"); ring r=0, x(0..7), dp; ideal i=katsura(6); print("Kastura7"); ring r=0, x(0..8), dp; ideal i=katsura(7); print("Kastura8"); ring r=0, x(0..9), dp; ideal i=katsura(8); print("Kastura9"); ring r=0, x(0..10), dp; ideal i=katsura(9); print("Kastura10"); ring r=0, x(0..11), dp; ideal i=katsura(10); i=homog(i,x(11)); simplify(lead(std(i)),1); Borel_test(i); Stable_test(i); ABP_test(i); SNP_test(i); NP_test(i);