=================================================================== RCS file: /home/cvs/OpenXM/src/asir-contrib/testing/noro/ndbf.rr,v retrieving revision 1.12 retrieving revision 1.18 diff -u -p -r1.12 -r1.18 --- OpenXM/src/asir-contrib/testing/noro/ndbf.rr 2010/06/16 08:32:10 1.12 +++ OpenXM/src/asir-contrib/testing/noro/ndbf.rr 2011/01/16 08:46:10 1.18 @@ -1,10 +1,11 @@ +/* $OpenXM: OpenXM/src/asir-contrib/testing/noro/ndbf.rr,v 1.17 2010/07/12 07:20:03 noro Exp $ */ /* requires 'primdec' */ #define TMP_H hhhhhhhh #define TMP_S ssssssss #define TMP_DS dssssssss -#define TMP_T t -#define TMP_DT dt +#define TMP_T tttttttt +#define TMP_DT dtttttttt #define TMP_Y1 yyyyyyyy1 #define TMP_DY1 dyyyyyyyy1 #define TMP_Y2 yyyyyyyy2 @@ -44,6 +45,8 @@ localf ideal_intersection$ def bfunction(F) { + if ( member(s,vars(F)) ) + error("ann : the variable 's' is reserved."); /* F -> F/Fcont */ F1 = ptozp(F); Fcont = sdiv(F,F1); F = F1; @@ -85,7 +88,7 @@ def bfunction(F) Cont = cont(CR); CR /= Cont; Cont *= dn(Fcont); Den *= nm(Fcont); Gcd = igcd(Den,Cont); - return [subst(B,s,-s-1),(Den/Gcd)*Ax,(Cont/Gcd)*CR]; + return [subst(B,s,-s-1),(Cont*CR)/(Den*Ax)]; } /* @@ -296,8 +299,13 @@ def ann(F) { if ( member(s,vars(F)) ) error("ann : the variable 's' is reserved."); + if ( type(Vord=getopt(vord)) == -1 ) Vord = 0; F = ptozp(F); V = vars(F); + if ( Vord ) { + Param = setminus(V,Vord); + V = Vord; + } N = length(V); D = newvect(N); if ( type(Wt=getopt(weight)) == -1 ) @@ -1260,6 +1268,9 @@ def replace_var(V,X,Y) def action_on_gfs(P,V,GFS) { + for ( T = V, DV = []; T != []; T = cdr(T) ) + DV = cons(strtov("d"+rtostr(car(T))),DV); + V = append(append(V,[s]),reverse(cons(ds,DV))); DP = dp_ptod(P,V); N = length(V)/2; for ( I = N-1, V0 = []; I >= 0; I-- ) @@ -1406,11 +1417,14 @@ def weyl_ideal_quotient(B,F,VDV) def bf_strat(F) { + if ( member(s,vars(F)) ) + error("ann : the variable 's' is reserved."); dp_ord(0); T0 = time(); if ( type(Heu=getopt(heuristic)) == -1 ) Heu = 0; if ( type(Vord=getopt(vord)) == -1 || type(Vord) != 4 ) Vord = 0; if ( type(Wt=getopt(weight)) == -1 ) Wt = 0; + if ( type(ElimIdeal=getopt(elimideal)) == -1 ) ElimIdeal = 0; L = in_ww(F|weight=Wt,heuristic=Heu,vord=Vord); T1 = time(); print(["in_ww",(T1[0]+T1[1])-(T0[0]+T0[1])]); @@ -1449,6 +1463,7 @@ def bf_strat(F) } L2 = bf_strat_stage2(L); + if ( ElimIdeal ) return L2; S = bf_strat_stage3(L2); R = []; for ( T = S; T != []; T = cdr(T) ) { @@ -1559,6 +1574,8 @@ def bf_strat_stage3(L) def bf_local(F,P) { + if ( member(s,vars(F)) ) + error("ann : the variable 's' is reserved."); /* F -> F/Fcont */ F1 = ptozp(F); Fcont = sdiv(F,F1); F = F1; if ( type(Heu=getopt(heuristic)) == -1 ) Heu = 0;