=================================================================== RCS file: /home/cvs/OpenXM/src/asir-contrib/testing/noro/module_syz.rr,v retrieving revision 1.4 retrieving revision 1.6 diff -u -p -r1.4 -r1.6 --- OpenXM/src/asir-contrib/testing/noro/module_syz.rr 2020/01/22 22:44:21 1.4 +++ OpenXM/src/asir-contrib/testing/noro/module_syz.rr 2020/02/05 04:56:10 1.6 @@ -83,7 +83,7 @@ def module_syz(F,V,H,Ord) else Ind++; } } else - G = nd_gr(B,V,0,[1,Ord]|dp=1,homo=H); + G = nd_gr_trace(B,V,H,1,[1,Ord]|dp=1); } G0 = []; S0 = []; Gen0 = []; for ( T = G; T != []; T = cdr(T) ) { @@ -169,6 +169,7 @@ def fres(F,V,H,O) L = L[0]; L = ordcheck(L,V); if ( L == [] ) { + R = reverse(R); if ( DP ) return R; else return map(dpmlisttollist,R,V); } @@ -200,6 +201,7 @@ def minres(F,V,H,O) R = cdr(R); break; } } + R = reverse(R); if ( DP ) return R; else return map(dpmlisttollist,R,V); } @@ -220,7 +222,11 @@ def sres(F,V,H,Ord) if ( I == K ) return [[],[],[]]; L = todpmlist(F,V); F = L[0]; N = L[1]; +#if 0 G = nd_gr(F,V,H,[0,Ord]|dp=1); +#else + G = nd_gr_trace(F,V,H,1,[0,Ord]|dp=1); +#endif G = reverse(G); R = [G]; dp_ord([0,Ord]); @@ -231,6 +237,7 @@ def sres(F,V,H,Ord) else R = cons(S,R); } dp_ord([0,0]); + R = reverse(R); if ( DP ) return R; else return map(dpmlisttollist,R,V); } @@ -239,7 +246,7 @@ def minsres(F,V,H,Ord) { if ( type(DP=getopt(dp)) == -1 ) DP = 0; R = sres(F,V,H,Ord|dp=1); - R = ltov(R); + R = ltov(reverse(R)); M = length(R); for ( I = 0; I < M; I++ ) R[I] = map(dpm_sort,R[I]); R = vtol(R); @@ -418,7 +425,13 @@ def lres_setup(F,V,H,Ord) } else { error("lres_setup: arugument type is invalid."); } + dp_ord([0,Ord]); + F = map(dpm_sort,F); +#if 0 G = nd_gr(F,V,H,[0,Ord]|dp=1); +#else + G = nd_gr_trace(F,V,H,1,[0,Ord]|dp=1); +#endif G = reverse(G); dp_ord([0,Ord]); One = dp_ptod(1,V); @@ -442,6 +455,7 @@ def lres(F,V,H,Ord) { T0 = time(); if ( type(Top=getopt(top)) == -1 ) Top = 0; + if ( type(DP=getopt(dp)) == -1 ) DP = 0; if ( type(NoSimpK=getopt(nosimpk)) == -1 ) NoSimpK = 0; if ( type(NoPreProj=getopt(nopreproj)) == -1 ) NoPreProj = 0; Rtime = Stime = Ptime = 0; @@ -531,7 +545,8 @@ def lres(F,V,H,Ord) print(["Frame",Ftime,"Prep",Ptime,"Reduce",Rtime,"Search",Stime,"Minimalize",T1[0]-T0[0]]); // return [C,H,K,Kind,D]; D = compress_h(D); - return D; + if ( DP ) return D; + else return vtol(map(dpmlisttollist,D,V)); } def create_base_ord(K,N) @@ -623,7 +638,7 @@ def phi(C,F) R = 0; for ( T = F; T; T = dpm_rest(T) ) { Coef = dpm_hc(T); Pos = dpm_hp(T); - R += Coef*C[Pos]; + R += Coef*C[Pos-1]; } return R; }