################################################################################## ################################################################################## ################The maple code of our algorithm with the examples################# ################################################################################## ################################################################################## with(Groebner): with(PolynomialIdeals): with(PolynomialTools): with(linalg): with(ArrayTools): ######################################### Computing leading term of a polynomial LT:=proc(f) global t: RETURN(LeadingTerm(f,t)[2]): end: ######################################## Removing an element from a list minuslists:=proc(H,L) local x,N,plc: N:=H: for x in L do if x in N then plc:='plc': member(x,N,'plc'); N:=subsop(plc=NULL,N): fi: od: RETURN(N): end: ######################################## Cheking the order of two signatures minsig:=proc(A,B) #option trace: global M,t: if degree(A[1]*M[A[2]][1])<>degree(B[1]*M[B[2]][1]) then RETURN(evalb(degree(A[1]*M[A[2]][1]) B[2] then RETURN(evalb(A[2]>B[2])): else RETURN(TestOrder(A[1],B[1],t)): fi; end: ####################################### Computing the signature of a pair sig:=proc(p) global M,t: local T,u1,u2,A,B: u1,u2:=p[3]/M[p[1]][2],p[3]/M[p[2]][2]: A:=[u1*M[p[1]][3],M[p[1]][4],p[1],p[2]]: B:=[u2*M[p[2]][3],M[p[2]][4],p[2],p[1]]: if minsig(A,B) then RETURN(B): else RETURN(A): fi; end: ################################# A function to sort the set of critical pairs f2:=proc(p,q) global t: local sp,sq: sp:=sig(p):sq:=sig(q): if sp<>sq then RETURN(minsig(sp,sq)); elif max(p[1],p[2])<> max(q[1],q[2]) then RETURN(evalb( max(p[1],p[2])< max(q[1],q[2]))); else RETURN(evalb( min(p[1],p[2])< min(q[1],q[2]))); fi: end: ########################################A function to reduce an element w.r.t. a list of polynomials reduc:=proc(f0,F0,s) global t,M,Rules: local r,SET,f,i,n,F,ss,N: F:=F0: f:=f0: n:=nops(F): r:=0: while f<>0 do m:=LT(f): c:=LeadingCoefficient(f,t): i:=1: flag:=false: while i<=n and not flag do if divide(m,M[F[i]][2],'q') and minsig([q*M[F[i]][3] , M[F[i]][4],M[F[i]][5] , M[F[i]][6]] , s) then flag:=true: f:=simplify(f-c*q*M[F[i]][1]/LeadingCoefficient(M[F[i]][1],t)): else i:=i+1: fi: od: if not flag then r:=simplify(r+c*m): f:=simplify(f-c*m): fi: od: if r=0 then RETURN(0,1): else RETURN(r,s); fi: end: ######################################## Update algorithm UPDATE:=proc(G0,B0,h) global M,t,nis,EC,Triple,Dangerset,nf,DP: local N,Lold,Lnew,L,sigh,u1,u2,v1,v2,Mp,Mq,inxp,inxq,NN,s,b1,r,b,b2,E,B1,G1,BB,g,F,p,L1,L2,L3,L4,i,flag,lth,j,E1,q,todo,sp,sq: lth:=M[h][2]: L:=G0: L1:=G0: L2:=[]: L3:=[]: flag:=true: for i in L1 do if gcd(lth,M[i][2])=1 then L2:=[op(L2),i]: L1:=minuslists(L1,[i]): fi: od: for i in L1 do L1:=minuslists(L1,[i]): for j in L1 while flag=true do if divide(lcm(lth,M[i][2]),M[j][2]) then flag:=false: elif divide(lcm(lth,M[i][2])/M[i][2]*M[i][3] , M[j][3]) and M[i][4]=M[j][4] and minsig(sig([h,j,lcm(M[j][2] , lth)]) , sig([h,i,lcm(M[i][2] , lth)])) then flag:=false: nis:=nis+1: fi: od: for j in L2 while flag=true do if divide(lcm(lth,M[i][2]),M[j][2]) then flag:=false: fi: od: if flag=true then L3:=[op(L3),i]: L2:=[op(L2),i]: fi: flag:=true: od: E:=[]: for i in L3 do if gcd(lth,M[i][2])<>1 then E:=[op(E),i]: fi: od: L4:=[]:BB:=B0: N:=NULL: for i from 1 to nops(BB) do flag:=false: if (divide(lcm(M[BB[i][1]][2],M[BB[i][2]][2]),lth)=false or lcm(M[BB[i][1]][2],lth)=lcm(M[BB[i][1]][2],M[BB[i][2]][2])or lcm(lth,M[BB[i][2]][2])= lcm(M[BB[i][1]][2],M[BB[i][2]][2])) then L4:=[op(L4),i]: flag:=true: fi: od: G1:=[]: for i in G0 do if divide(M[i][2],lth)=false then G1:=[op(G1),i]: fi: od: G1:=[op(G1),h]: E1:=[ seq(B0[i] , i in L4), seq([h,i,lcm(M[i][2],lth),sig([h,i,lcm(M[i][2],lth)])],i in E) ]: RETURN(G1,sort(E1,f2)): end: ################################Groebner algorithm GROBNER:=proc(FFF,tord) global DP,M,t,rds,Rules,nis,EC,masir,Triple,Dangerset,nf: local N,NN,G,B,f,h,F,p,m,n,i,w,r,H,D,S,s,FF: m:=kernelopts(bytesused,cputime): EC:=NULL: t:=tord: FF:=subs(0=NULL,InterReduce(FFF,tord)): nf:=nops(FF): N:=nf: M:=Array(1..nf): for i from 1 to nf do M[i]:=[FF[i],LT(FF[i]),1,i,i,i]: od: nis:=0:EC:=NULL:D:=NULL: NN:=NULL: F:=[seq(i,i=1..nf)]: G:=[]: B:=[]: for i in F do F:=[op({op(F)} minus {i})]: G,B:=UPDATE(G,B,i): od: rds:=0: while nops(B)<>0 do p:=B[1]: D:=D,degree(lcm(M[p[1]][2],M[p[2]][2])): B:=B[2..-1]: w:=SPolynomial(M[p[1]][1],M[p[2]][1],t): w,S:=reduc(w,G,sig(p)): if w=0 then rds:=rds+1: NN:=NN,p: else M(N+1):=[w,LT(w),op(S)]: N:=N+1: G,B:=UPDATE(G,B,N): fi: od: H:=[seq(M[G[i]][1],i=1..nops(G))]: n:=kernelopts(bytesused,cputime): #printf("%-1s %1s %1s %1s : %3a\n",The,Grobner,Basis,is,H): printf("%-1s %1s %1s%1s : %3a %3a\n",The, cpu, time, is,[n-m][2],(sec)): printf("%-1s %1s %1s : %5a %3a\n",The,used,memory,[n-m][1],(bytes)): printf("%-1s %1s %1s : %5g\n",Num,of,Rds,rds): printf("%-1s %1s %1s : %2a\n",Num,of,poly,nops(G)): printf("%-1s %1s %1s %1s : %3a\n",The, max, degree, is,max(D)): print(nis); RETURN(H): end: ############################# A function to test whether a set of polynomials is Groebner basis or not IsGrobner:=proc(A,H,T) local s,j,S,p,F,L,LL; F:=H; while member(0, F, 'p') do F:=subsop(p=NULL,F); unassign('p'); od; L:=LeadingMonomial(F, T): LL:=LeadingMonomial(Basis(A,T),T): if evalb(LeadingMonomial(, T)<>LeadingMonomial(, T)) then RETURN(false); fi: for s from 1 to nops(A) do if evalb(Reduce(A[s],F,T)<>0) then RETURN(false); fi; od; RETURN(true); end: #*************************EXAMPLES************************** print("********************Chemkin homogenized*********************"); F := [ z2+z3+z4+z5, 33461*c3-94642*h, c2+y2+y3+y4+y5, 9*c2-8*h, 36926*c1-208885*h, -3*c3*y2+3*x3*h+3*x4*h+8*h^2, -c1*y2+9*y2^2+z2*h, z5^2+y5^2-c2*h, 3*z4*z5+3*y4*y5+x4*h-h^2, z4^2+y4^2+x4^2-h^2, 3*z3*z4+3*y3*y4+3*x3*x4-h^2, z3^2+y3^2+x3^2-h^2, -3*c3*y2*x3+3*z2*z3*h+3*y2*y3*h+3*x3*h^2-h^3]: A:=GROBNER(F,tdeg(c1, c2, c3, z2, z3, z4, z5, y2, y3, y4, y5, x3, x4, h)): print(IsGrobner(F,A,tdeg(c1, c2, c3, z2, z3, z4, z5, y2, y3, y4, y5, x3, x4, h))); print("******************************************Cyclic 5**********************************************"); F:=InterReduce([a*b*c*d*e -1, a*b*c*d + a*b*c*e + a*b*d*e + a*c*d*e + b*c*d*e, a*b*c + a*b*e + a*d*e + b*c*d + c*d*e, a*b + a*e + b*c + c*d + d*e, a + b + c + d + e],tdeg(a,b,c,d,e)): A:=GROBNER(F,tdeg(a,b,c,d,e)): print(IsGrobner(F,A,tdeg(a,b,c,d,e))); print("******************************************eco 7**********************************************"); F:=[(x1 + x1*x2 + x2*x3 + x3*x4 + x4*x5 + x5*x6)*x7 - 1, (x2 + x1*x3 + x2*x4 + x3*x5 + x4*x6)*x7 - 2, (x3 + x1*x4 + x2*x5 + x3*x6)*x7 - 3, (x4 + x1*x5 + x2*x6)*x7 - 4, (x5 + x1*x6)*x7 - 5, x6*x7 - 6, x1 + x2 + x3 + x4 + x5 + x6 + 1]: A:=GROBNER(F,tdeg(x1,x2,x3,x4,x5,x6,x7)): print(IsGrobner(F,A,tdeg(x1,x2,x3,x4,x5,x6,x7))); print("******************************************eco 8**********************************************"); F:=[(x1 + x1*x2 + x2*x3 + x3*x4 + x4*x5 + x5*x6 + x6*x7)*x8 - 1, (x2 + x1*x3 + x2*x4 + x3*x5 + x4*x6 + x5*x7)*x8 - 2, (x3 + x1*x4 + x2*x5 + x3*x6 + x4*x7)*x8 - 3, (x4 + x1*x5 + x2*x6 + x3*x7)*x8 - 4, (x5 + x1*x6 + x2*x7)*x8 - 5, (x6 + x1*x7)*x8 - 6, x7*x8 - 7, x1 + x2 + x3 + x4 + x5 + x6 + x7 + 1]: A:=GROBNER(F,tdeg(x1,x2,x3,x4,x5,x6,x7,x8)): print(IsGrobner(F,A,tdeg(x1,x2,x3,x4,x5,x6,x7,x8))); print("*************************HAAS3*************************"); F := [x^6+a*y^3-y, y^6+b*x^3-x, 36*y^5*x^5-9*x^2*b*a*y^2+3*a*y^2+3*b*x^2-1]: A:=GROBNER(F,tdeg(x,y,a,b)): print(IsGrobner(F,A,tdeg(x,y,a,b))); print("******************************************Cyclic 6**********************************************"); F:=[a*b*c*d*e*f -1, a*b*c*d*e + a*b*c*d*f + a*b*c*e*f + a*b*d*e*f + a*c*d*e*f + b*c*d*e*f, a*b*c*d + a*b*c*f + a*b*e*f + a*d*e*f + b*c*d*e + c*d*e*f, a*b*c + a*b*f + a*e*f + b*c*d + c*d*e + d*e*f, a*b + a*f + b*c + c*d + d*e + e*f, a + b + c + d + e + f]: A:=GROBNER(F,tdeg(a,b,c,d,e,f)): IsGrobner(F,A,tdeg(a,b,c,d,e,f)); print("********************Schrans-Troost 1990*********************"); F:= [8*x1^2+8*x1*x2+8*x1*x3+2*x1*x4+2*x1*x5+2*x1*x6+2*x1*x7-8*x2*x3-2*x4*x7-2*x5*x6-x1, 8*x1*x2-8*x1*x3+8*x2^2+8*x2*x3+2*x2*x4+2*x2*x5+2*x2*x6+2*x2*x7-2*x4*x6-2*x5*x7-x2, -8*x1*x2+8*x1*x3+8*x2*x3+8*x3^2+2*x3*x4+2*x3*x5+2*x3*x6+2*x3*x7-2*x4*x5-2*x6*x7-x3, 2*x1*x4-2*x1*x7+2*x2*x4-2*x2*x6+2*x3*x4-2*x3*x5+8*x4^2+8*x4*x5+2*x4*x6+2*x4*x7+6*x4*x8-6*x5*x8-x4, 2*x1*x5-2*x1*x6+2*x2*x5-2*x2*x7-2*x3*x4+2*x3*x5+8*x4*x5-6*x4*x8+8*x5^2+2*x5*x6+2*x5*x7+6*x5*x8-x5, -2*x1*x5+2*x1*x6-2*x2*x4+2*x2*x6+2*x3*x6-2*x3*x7+2*x4*x6+2*x5*x6+8*x6^2+8*x6*x7+6*x6*x8-6*x7*x8-x6, -2*x1*x4+2*x1*x7-2*x2*x5+2*x2*x7-2*x3*x6+2*x3*x7+2*x4*x7+2*x5*x7+8*x6*x7-6*x6*x8+8*x7^2+6*x7*x8-x7, -6*x4*x5+6*x4*x8+6*x5*x8-6*x6*x7+6*x6*x8+6*x7*x8+8*x8^2-x8]: A:=GROBNER(F,tdeg(x1, x2, x3, x4, x5, x6, x7, x8)): print(IsGrobner(F,A,tdeg(x1, x2, x3, x4, x5, x6, x7, x8))); print("****************Noon4***************"); F := [ 10*x1^2*x4+10*x2^2*x4+10*x3^2*x4-11*x4*h^2+10*h^3, 10*x1^2*x3+10*x2^2*x3+10*x3*x4^2-11*x3*h^2+10*h^3, 10*x1*x2^2+10*x1*x3^2+10*x1*x4^2-11*x1*h^2+10*h^3, 10*x1^2*x2+10*x2*x3^2+10*x2*x4^2-11*x2*h^2+10*h^3 ]: A:=GROBNER(F,tdeg(x1, x2, x3, x4, h)): IsGrobner(F,A,tdeg(x1, x2, x3, x4, h)); print("****************Vermeer***************"); F:= [x^2-2*x*u+u^2+y^2-2*y*v+v^2-1, v^2-u^3, 2*v*x-2*v*u+3*u^2*y-3*u^2*v, 6*w^2*u^2*v-3*w*u^2-2*w*v+1]: A:=GROBNER(F,tdeg(w,v,u,y,x)): IsGrobner(F,A,tdeg(w,v,u,y,x)); print("******************************************Gerdt2**********************************************"); F := [35*y^4-30*x*y^2-210*y^2*z+3*x^2+30*x*z-105*z^2+140*y*w-21*u, 5*x*y^3-140*y^3*z-3*x^2*y+45*x*y*z-420*y*z^2+210*y^2*w-25*x*w+70*z*w+126*y*u]; F := Homogenize(F, h): A := GROBNER(F, tdeg(x, y, z, w, u, h)): IsGrobner(F, A, tdeg(x, y, z, w, u, h)); print("******************************************Liu**********************************************"); F := [y*z-y*t0-x*h+a*h, z*t0-z*x-y*h+a*h, t0*x-y*t0-z*h+a*h, x*y-z*x-t0*h+a*h]; A := GROBNER(F, tdeg(z, y, x, t0, a, h)): IsGrobner(F, A, tdeg(z, y, x, t0, a, h)); print("****************************************Huneke**********************************************"); F := [s^15, t0^15, u^15, u^5-s^3*t0*x+s^2*t0^2*x+s^2*t0^2*y-s*t0^3*y]: A := GROBNER(F, tdeg(x, y, s, t0, u, z)): print(IsGrobner(F, A, tdeg(x, y, s, t0, u, z))); ################################################################################## ################################################################################## ####The maple code of Buchberger algorithm using Gebauer-Moller algorithm ######## ################################################################################## ################################################################################## sig:=proc(p) #option trace; global M,t: local T,u1,u2,A,B: u1,u2:=p[3]/M[p[1]][2],p[3]/M[p[2]][2]: A:=degree(u1)+M[p[1]][3]: B:=degree(u2)+M[p[2]][3]: RETURN(max(A,B)); end: ################################# f2:=proc(i,j) global t,M: if i[4]<>j[4] then RETURN(evalb(i[4]0 do i:=1: flag:=false: while i<=n and not flag do if divide(LT(f),M[F[i]][2],'q') then flag:=true: f:=simplify(f-LeadingCoefficient(f,t)*q*M[F[i]][1]/LeadingCoefficient(M[F[i]][1],t)): else i:=i+1: fi: od: if not flag then r:=simplify(r+LeadingCoefficient(f,t)*LT(f)): f:=simplify(f-LeadingCoefficient(f,t)*LT(f)): fi: od: if r=0 then RETURN(0,1): else RETURN(r,s); fi: end: ######################################## UPDATE:=proc(G0,B0,h) #option trace: global M,t,nis,EC: local u1,u2,v1,v2,Mp,Mq,inxp,inxq,nf,NN,s,b1,r,b,b2,E,B1,G1,BB,g,F,p,L1,L2,L3,L4,i,flag,lth,j,E1,q,todo,sp,sq: lth:=M[h][2]: L1:=G0:L2:=[]:flag:=true: for i in L1 do if gcd(lth,M[i][2])=1 then L2:=[op(L2),i]: L1:=[op({op(L1)} minus {i})]: fi: od: for i in L1 do # L1:=[op({op(L1)} minus {i})]: L1:=minuslists(L1,[i]): for j in L1 while flag=true do if divide(lcm(lth,M[i][2]),lcm(lth,M[j][2])) then flag:=false: fi: od: for j in L2 while flag=true do if divide(lcm(lth,M[i][2]),lcm(lth,M[j][2])) then flag:=false: fi: od: if flag=true then L2:=[op(L2),i]: fi: flag:=true: od: E:=[]: for i in L2 do if gcd(lth,M[i][2])<>1 then E:=[op(E),i]: fi: od: L4:=[]:BB:=B0: for i from 1 to nops(BB) do if divide(lcm(M[BB[i][1]][2],M[BB[i][2]][2]),lth)=false or lcm(M[BB[i][1]][2],lth)=lcm(M[BB[i][1]][2],M[BB[i][2]][2])or lcm(lth,M[BB[i][2]][2])= lcm(M[BB[i][1]][2],M[BB[i][2]][2]) then L4:=[op(L4),i]: fi: od: G1:=[]: for i in G0 do if divide(M[i][2],lth)=false then G1:=[op(G1),i]: fi: od: G1:=[op(G1),h]: E:=[seq([h,i,lcm(M[i][2],lth),sig([h,i,lcm(M[i][2],lth)])],i in E),seq(B0[i],i in L4)]: RETURN(G1,E): end: #********************************************************************************** GROBNERNEW2:=proc(FFF,tord) #option trace: global M,t,rds,Rules,nis,EC,masir: local N,nf,NN,G,B,f,h,F,p,m,n,i,w,r,H,D,S,s,FF: m:=kernelopts(bytesused,cputime):t:=tord: FF:=subs(0=NULL,InterReduce(FFF,tord)): nf:=nops(FF): N:=nf: NN:=NULL: M:=Array(1..nf): for i from 1 to nf do M[i]:=[FF[i],LT(FF[i]),degree(FF[i])]: od: F:=[seq(i,i=1..nf)]:EC:=NULL: G:=[]:B:=[]:D:=NULL: for i in F do F:=[op({op(F)} minus {i})]: G,B:=UPDATE(G,B,i): B:=sort(B,f2): od: rds:=0: while nops(B)<>0 do p:=B[1]:D:=D,degree(lcm(M[p[1]][2],M[p[2]][2])): B:=B[2..-1]: w:=SPolynomial(M[p[1]][1],M[p[2]][1],t): S:=sig(p): M:=addarray(M,N,[w,LT(w),S]): w,S:=reduc(w,G,S): if w=0 then rds:=rds+1: M:=M[1..N]: NN:=NN,p: else M[N+1]:=[w,LT(w),S]: N:=N+1: G,B:=UPDATE(G,B,N): B:=sort(B,f2): fi: od: H:=[seq(M[G[i]][1],i=1..nops(G))]: n:=kernelopts(bytesused,cputime): #printf("%-1s %1s %1s %1s : %3a\n",The,Grobner,Basis,is,H): printf("%-1s %1s %1s%1s : %3a %3a\n",The, cpu, time, is,[n-m][2],(sec)): printf("%-1s %1s %1s : %5a %3a\n",The,used,memory,[n-m][1],(bytes)): printf("%-1s %1s %1s : %5g\n",Num,of,Rds,rds): printf("%-1s %1s %1s : %2a\n",Num,of,poly,nops(G)): printf("%-1s %1s %1s %1s : %3a\n",The, max, degree, is,max(D)): RETURN(H): end: #*************************EXAMPLES************************** print("********************Chemkin homogenized*********************"); F := [ z2+z3+z4+z5, 33461*c3-94642*h, c2+y2+y3+y4+y5, 9*c2-8*h, 36926*c1-208885*h, -3*c3*y2+3*x3*h+3*x4*h+8*h^2, -c1*y2+9*y2^2+z2*h, z5^2+y5^2-c2*h, 3*z4*z5+3*y4*y5+x4*h-h^2, z4^2+y4^2+x4^2-h^2, 3*z3*z4+3*y3*y4+3*x3*x4-h^2, z3^2+y3^2+x3^2-h^2, -3*c3*y2*x3+3*z2*z3*h+3*y2*y3*h+3*x3*h^2-h^3]: A:=GROBNERNEW2(F,tdeg(c1, c2, c3, z2, z3, z4, z5, y2, y3, y4, y5, x3, x4, h)): print(IsGrobner(F,A,tdeg(c1, c2, c3, z2, z3, z4, z5, y2, y3, y4, y5, x3, x4, h))); print("******************************************Cyclic 5**********************************************"); F:=InterReduce([a*b*c*d*e -1, a*b*c*d + a*b*c*e + a*b*d*e + a*c*d*e + b*c*d*e, a*b*c + a*b*e + a*d*e + b*c*d + c*d*e, a*b + a*e + b*c + c*d + d*e, a + b + c + d + e],tdeg(a,b,c,d,e)): A:=GROBNERNEW2(F,tdeg(a,b,c,d,e)): print(IsGrobner(F,A,tdeg(a,b,c,d,e))); print("******************************************eco 7**********************************************"); F:=[(x1 + x1*x2 + x2*x3 + x3*x4 + x4*x5 + x5*x6)*x7 - 1, (x2 + x1*x3 + x2*x4 + x3*x5 + x4*x6)*x7 - 2, (x3 + x1*x4 + x2*x5 + x3*x6)*x7 - 3, (x4 + x1*x5 + x2*x6)*x7 - 4, (x5 + x1*x6)*x7 - 5, x6*x7 - 6, x1 + x2 + x3 + x4 + x5 + x6 + 1]: A:=GROBNERNEW2(F,tdeg(x1,x2,x3,x4,x5,x6,x7)): print(IsGrobner(F,A,tdeg(x1,x2,x3,x4,x5,x6,x7))); print("******************************************eco 8**********************************************"); F:=[(x1 + x1*x2 + x2*x3 + x3*x4 + x4*x5 + x5*x6 + x6*x7)*x8 - 1, (x2 + x1*x3 + x2*x4 + x3*x5 + x4*x6 + x5*x7)*x8 - 2, (x3 + x1*x4 + x2*x5 + x3*x6 + x4*x7)*x8 - 3, (x4 + x1*x5 + x2*x6 + x3*x7)*x8 - 4, (x5 + x1*x6 + x2*x7)*x8 - 5, (x6 + x1*x7)*x8 - 6, x7*x8 - 7, x1 + x2 + x3 + x4 + x5 + x6 + x7 + 1]: A:=GROBNERNEW2(F,tdeg(x1,x2,x3,x4,x5,x6,x7,x8)): print(IsGrobner(F,A,tdeg(x1,x2,x3,x4,x5,x6,x7,x8))); print("*************************HAAS3*************************"); F := [x^6+a*y^3-y, y^6+b*x^3-x, 36*y^5*x^5-9*x^2*b*a*y^2+3*a*y^2+3*b*x^2-1]: A:=GROBNERNEW2(F,tdeg(x,y,a,b)): print(IsGrobner(F,A,tdeg(x,y,a,b))); print("******************************************Cyclic 6**********************************************"); F:=[a*b*c*d*e*f -1, a*b*c*d*e + a*b*c*d*f + a*b*c*e*f + a*b*d*e*f + a*c*d*e*f + b*c*d*e*f, a*b*c*d + a*b*c*f + a*b*e*f + a*d*e*f + b*c*d*e + c*d*e*f, a*b*c + a*b*f + a*e*f + b*c*d + c*d*e + d*e*f, a*b + a*f + b*c + c*d + d*e + e*f, a + b + c + d + e + f]: A:=GROBNERNEW2(F,tdeg(a,b,c,d,e,f)): IsGrobner(F,A,tdeg(a,b,c,d,e,f)); print("********************Schrans-Troost 1990*********************"); F:= [8*x1^2+8*x1*x2+8*x1*x3+2*x1*x4+2*x1*x5+2*x1*x6+2*x1*x7-8*x2*x3-2*x4*x7-2*x5*x6-x1, 8*x1*x2-8*x1*x3+8*x2^2+8*x2*x3+2*x2*x4+2*x2*x5+2*x2*x6+2*x2*x7-2*x4*x6-2*x5*x7-x2, -8*x1*x2+8*x1*x3+8*x2*x3+8*x3^2+2*x3*x4+2*x3*x5+2*x3*x6+2*x3*x7-2*x4*x5-2*x6*x7-x3, 2*x1*x4-2*x1*x7+2*x2*x4-2*x2*x6+2*x3*x4-2*x3*x5+8*x4^2+8*x4*x5+2*x4*x6+2*x4*x7+6*x4*x8-6*x5*x8-x4, 2*x1*x5-2*x1*x6+2*x2*x5-2*x2*x7-2*x3*x4+2*x3*x5+8*x4*x5-6*x4*x8+8*x5^2+2*x5*x6+2*x5*x7+6*x5*x8-x5, -2*x1*x5+2*x1*x6-2*x2*x4+2*x2*x6+2*x3*x6-2*x3*x7+2*x4*x6+2*x5*x6+8*x6^2+8*x6*x7+6*x6*x8-6*x7*x8-x6, -2*x1*x4+2*x1*x7-2*x2*x5+2*x2*x7-2*x3*x6+2*x3*x7+2*x4*x7+2*x5*x7+8*x6*x7-6*x6*x8+8*x7^2+6*x7*x8-x7, -6*x4*x5+6*x4*x8+6*x5*x8-6*x6*x7+6*x6*x8+6*x7*x8+8*x8^2-x8]: A:=GROBNERNEW2(F,tdeg(x1, x2, x3, x4, x5, x6, x7, x8)): print(IsGrobner(F,A,tdeg(x1, x2, x3, x4, x5, x6, x7, x8))); print("****************Noon4***************"); F := [ 10*x1^2*x4+10*x2^2*x4+10*x3^2*x4-11*x4*h^2+10*h^3, 10*x1^2*x3+10*x2^2*x3+10*x3*x4^2-11*x3*h^2+10*h^3, 10*x1*x2^2+10*x1*x3^2+10*x1*x4^2-11*x1*h^2+10*h^3, 10*x1^2*x2+10*x2*x3^2+10*x2*x4^2-11*x2*h^2+10*h^3 ]: A:=GROBNERNEW2(F,tdeg(x1, x2, x3, x4, h)): IsGrobner(F,A,tdeg(x1, x2, x3, x4, h)); print("****************Vermeer***************"); F:= [x^2-2*x*u+u^2+y^2-2*y*v+v^2-1, v^2-u^3, 2*v*x-2*v*u+3*u^2*y-3*u^2*v, 6*w^2*u^2*v-3*w*u^2-2*w*v+1]: A:=GROBNERNEW2(F,tdeg(w,v,u,y,x)): IsGrobner(F,A,tdeg(w,v,u,y,x)); print("******************************************Gerdt2**********************************************"); F := [35*y^4-30*x*y^2-210*y^2*z+3*x^2+30*x*z-105*z^2+140*y*w-21*u, 5*x*y^3-140*y^3*z-3*x^2*y+45*x*y*z-420*y*z^2+210*y^2*w-25*x*w+70*z*w+126*y*u]; F := Homogenize(F, h): A := GROBNERNEW2(F, tdeg(x, y, z, w, u, h)): IsGrobner(F, A, tdeg(x, y, z, w, u, h)); print("******************************************Liu**********************************************"); F := [y*z-y*t0-x*h+a*h, z*t0-z*x-y*h+a*h, t0*x-y*t0-z*h+a*h, x*y-z*x-t0*h+a*h]; A := GROBNERNEW2(F, tdeg(z, y, x, t0, a, h)): IsGrobner(F, A, tdeg(z, y, x, t0, a, h)); print("****************************************Huneke**********************************************"); F := [s^15, t0^15, u^15, u^5-s^3*t0*x+s^2*t0^2*x+s^2*t0^2*y-s*t0^3*y]: A := GROBNERNEW2(F, tdeg(x, y, s, t0, u, z)): print(IsGrobner(F, A, tdeg(x, y, s, t0, u, z)));