version 1.10, 2010/06/19 08:32:37 |
version 1.12, 2014/09/05 11:55:19 |
|
|
/* $OpenXM$ */ |
/* $OpenXM: OpenXM/src/asir-contrib/testing/noro/pd.rr,v 1.11 2010/08/20 04:21:18 noro Exp $ */ |
import("gr")$ |
import("gr")$ |
module noro_pd$ |
module noro_pd$ |
static GBCheck,F4,Procs,SatHomo$ |
static GBCheck,F4,Procs,SatHomo$ |
Line 276 def find_separating_ideal1(C,G,Q,Rad,V,Ord) { |
|
Line 276 def find_separating_ideal1(C,G,Q,Rad,V,Ord) { |
|
/* check whether (Q cap (G+S)) = G */ |
/* check whether (Q cap (G+S)) = G */ |
if ( gen_gb_comp(Int,G,Mod) ) return reverse(S); |
if ( gen_gb_comp(Int,G,Mod) ) return reverse(S); |
|
|
/* or qsort(C,comp_tdeg) */ |
/* or qsort(C,noro_pd.comp_tdeg) */ |
C = qsort(S,comp_tdeg); |
C = qsort(S,noro_pd.comp_tdeg); |
|
|
Tmp = ttttt; TV = cons(Tmp,V); Ord1 = [[0,1],[Ord,length(V)]]; |
Tmp = ttttt; TV = cons(Tmp,V); Ord1 = [[0,1],[Ord,length(V)]]; |
Int0 = incremental_gb(append(vtol(ltov(G)*Tmp),vtol(ltov(Q)*(1-Tmp))), |
Int0 = incremental_gb(append(vtol(ltov(G)*Tmp),vtol(ltov(Q)*(1-Tmp))), |
Line 320 def find_separating_ideal2(C,G,Q,Rad,V,Ord) { |
|
Line 320 def find_separating_ideal2(C,G,Q,Rad,V,Ord) { |
|
/* check whether (Q cap (G+S)) = G */ |
/* check whether (Q cap (G+S)) = G */ |
if ( gen_gb_comp(Int,G,Mod) ) return reverse(S); |
if ( gen_gb_comp(Int,G,Mod) ) return reverse(S); |
|
|
/* or qsort(S,comp_tdeg) */ |
/* or qsort(S,noro_pd.comp_tdeg) */ |
C = qsort(C,comp_tdeg); |
C = qsort(C,noro_pd.comp_tdeg); |
Dp = dp_gr_print(); dp_gr_print(0); |
Dp = dp_gr_print(); dp_gr_print(0); |
for ( T = C, S = []; T != []; T = cdr(T) ) { |
for ( T = C, S = []; T != []; T = cdr(T) ) { |
if ( !gen_nf(car(T),Rad,V,Ord,Mod) ) continue; |
if ( !gen_nf(car(T),Rad,V,Ord,Mod) ) continue; |
Line 338 def find_separating_ideal2(C,G,Q,Rad,V,Ord) { |
|
Line 338 def find_separating_ideal2(C,G,Q,Rad,V,Ord) { |
|
S = cons(Ui,S); |
S = cons(Ui,S); |
} |
} |
print(""); |
print(""); |
S = qsort(S,comp_tdeg); |
S = qsort(S,noro_pd.comp_tdeg); |
End = Len = length(S); |
End = Len = length(S); |
|
|
Tmp = ttttt; TV = cons(Tmp,V); Ord1 = [[0,1],[Ord,length(V)]]; |
Tmp = ttttt; TV = cons(Tmp,V); Ord1 = [[0,1],[Ord,length(V)]]; |
Line 436 def pseudo_dec(G,L,V,Ord) |
|
Line 436 def pseudo_dec(G,L,V,Ord) |
|
for ( I = 0; I < N; I++ ) { |
for ( I = 0; I < N; I++ ) { |
LI = setminus(L0,[L0[I]]); |
LI = setminus(L0,[L0[I]]); |
PI = ideal_list_intersection(LI,V,Ord|mod=Mod); |
PI = ideal_list_intersection(LI,V,Ord|mod=Mod); |
PI = qsort(PI,comp_tdeg); |
PI = qsort(PI,noro_pd.comp_tdeg); |
for ( T = PI; T != []; T = cdr(T) ) |
for ( T = PI; T != []; T = cdr(T) ) |
if ( gen_nf(car(T),L0[I],V,Ord,Mod) ) break; |
if ( gen_nf(car(T),L0[I],V,Ord,Mod) ) break; |
if ( T == [] ) error("separator : cannot happen"); |
if ( T == [] ) error("separator : cannot happen"); |
SI = satind(G,car(T),V|mod=Mod); |
SI = sat_ind(G,car(T),V|mod=Mod); |
QI = SI[0]; |
QI = SI[0]; |
S[I] = car(T)^SI[1]; |
S[I] = car(T)^SI[1]; |
PV = L[I][1]; |
PV = L[I][1]; |
Line 454 def pseudo_dec(G,L,V,Ord) |
|
Line 454 def pseudo_dec(G,L,V,Ord) |
|
#endif |
#endif |
LCFI = lcfactor(GI,V0,Ord,Mod); |
LCFI = lcfactor(GI,V0,Ord,Mod); |
for ( F = 1, T = LCFI, Gt = QI; T != []; T = cdr(T) ) { |
for ( F = 1, T = LCFI, Gt = QI; T != []; T = cdr(T) ) { |
St = satind(Gt,T[0],V|mod=Mod); |
St = sat_ind(Gt,T[0],V|mod=Mod); |
Gt = St[0]; F *= T[0]^St[1]; |
Gt = St[0]; F *= T[0]^St[1]; |
} |
} |
Q[I] = [Gt,L0[I]]; |
Q[I] = [Gt,L0[I]]; |
Line 510 def prima_dec(B,V) |
|
Line 510 def prima_dec(B,V) |
|
L = zprimacomp(G,V0|mod=Mod); |
L = zprimacomp(G,V0|mod=Mod); |
F = 1; |
F = 1; |
for ( T = LCF, G2 = G; T != []; T = cdr(T) ) { |
for ( T = LCF, G2 = G; T != []; T = cdr(T) ) { |
S = satind(G2,T[0],V1|mod=Mod); |
S = sat_ind(G2,T[0],V1|mod=Mod); |
G2 = S[0]; F *= T[0]^S[1]; |
G2 = S[0]; F *= T[0]^S[1]; |
} |
} |
for ( T = L, QL = []; T != []; T = cdr(T) ) |
for ( T = L, QL = []; T != []; T = cdr(T) ) |
Line 1217 def ideal_product(A,B,V) |
|
Line 1217 def ideal_product(A,B,V) |
|
for ( T = PA; T != []; T = cdr(T) ) |
for ( T = PA; T != []; T = cdr(T) ) |
for ( S = PB; S != []; S = cdr(S) ) |
for ( S = PB; S != []; S = cdr(S) ) |
R = cons([car(T)[0]*car(S)[0],car(T)[1]+car(S)[1]],R); |
R = cons([car(T)[0]*car(S)[0],car(T)[1]+car(S)[1]],R); |
T = qsort(R,comp_by_second); |
T = qsort(R,noro_pd.comp_by_second); |
T = map(first_element,T); |
T = map(first_element,T); |
Len = length(A)>length(B)?length(A):length(B); |
Len = length(A)>length(B)?length(A):length(B); |
Len *= 2; |
Len *= 2; |