version 1.4, 2010/05/12 07:55:44 |
version 1.5, 2010/05/21 00:29:46 |
Line 9 localf sy_dec, pseudo_dec, iso_comp, prima_dec$ |
|
Line 9 localf sy_dec, pseudo_dec, iso_comp, prima_dec$ |
|
localf prime_dec, prime_dec_main, lex_predec1, zprimedec, zprimadec$ |
localf prime_dec, prime_dec_main, lex_predec1, zprimedec, zprimadec$ |
localf complete_qdecomp, partial_qdecomp, partial_qdecomp0, complete_decomp$ |
localf complete_qdecomp, partial_qdecomp, partial_qdecomp0, complete_decomp$ |
localf partial_decomp, partial_decomp0, zprimacomp, zprimecomp$ |
localf partial_decomp, partial_decomp0, zprimacomp, zprimecomp$ |
localf fast_gb, elim_gb, ldim, make_mod_subst$ |
localf fast_gb, incremental_gb, elim_gb, ldim, make_mod_subst$ |
localf rsgn, find_npos, gen_minipoly, indepset$ |
localf rsgn, find_npos, gen_minipoly, indepset$ |
localf maxindep, contraction, ideal_list_intersection, ideal_intersection$ |
localf maxindep, contraction, ideal_list_intersection, ideal_intersection$ |
localf radical_membership, quick_radical_membership, modular_radical_membership$ |
localf radical_membership, quick_radical_membership, modular_radical_membership$ |
Line 233 def find_separating_ideal1(C,G,Q,Rad,V,Ord) { |
|
Line 233 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 ( gb_comp(Int,G) ) return reverse(S); |
if ( gb_comp(Int,G) ) return reverse(S); |
|
|
|
/* or qsort(C,comp_tdeg) */ |
C = qsort(S,comp_tdeg); |
C = qsort(S,comp_tdeg); |
|
|
|
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))), |
|
TV,Ord1|gbblock=[[0,length(G)]]); |
for ( T = C, S = []; T != []; T = cdr(T) ) { |
for ( T = C, S = []; T != []; T = cdr(T) ) { |
if ( !nd_nf(car(T),Rad,V,Ord,0) ) continue; |
if ( !nd_nf(car(T),Rad,V,Ord,0) ) continue; |
Ui = U = car(T); |
Ui = U = car(T); |
Line 244 def find_separating_ideal1(C,G,Q,Rad,V,Ord) { |
|
Line 249 def find_separating_ideal1(C,G,Q,Rad,V,Ord) { |
|
else |
else |
Ui = nd_nf(Ui*U,G,V,Ord,0); |
Ui = nd_nf(Ui*U,G,V,Ord,0); |
} |
} |
if ( length(S) ) { |
Int1 = incremental_gb(append(Int0,[Tmp*Ui]),TV,Ord1 |
G1 = append(cons(Ui,S),G); |
|gbblock=[[0,length(Int0)]]); |
Int = ideal_intersection(G1,Q,V,Ord); |
Int = elimination(Int1,V); |
if ( !gb_comp(Int,G) ) |
if ( !gb_comp(Int,G) ) |
break; |
break; |
|
else { |
|
Int0 = Int1; |
|
S = cons(Ui,S); |
} |
} |
S = cons(Ui,S); |
|
} |
} |
return reverse(S); |
return reverse(S); |
} |
} |
Line 265 def find_separating_ideal2(C,G,Q,Rad,V,Ord) { |
|
Line 272 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 ( gb_comp(Int,G) ) return reverse(S); |
if ( gb_comp(Int,G) ) return reverse(S); |
|
|
|
/* or qsort(S,comp_tdeg) */ |
C = qsort(C,comp_tdeg); |
C = qsort(C,comp_tdeg); |
|
Dp = dp_gr_print(); dp_gr_print(0); |
for ( T = C, S = []; T != []; T = cdr(T) ) { |
for ( T = C, S = []; T != []; T = cdr(T) ) { |
|
print(length(T)); |
if ( !nd_nf(car(T),Rad,V,Ord,0) ) continue; |
if ( !nd_nf(car(T),Rad,V,Ord,0) ) continue; |
Ui = U = car(T); |
Ui = U = car(T); |
for ( I = 1; ; I++ ) { |
for ( I = 1; ; I++ ) { |
Line 278 def find_separating_ideal2(C,G,Q,Rad,V,Ord) { |
|
Line 288 def find_separating_ideal2(C,G,Q,Rad,V,Ord) { |
|
} |
} |
S = cons(Ui,S); |
S = cons(Ui,S); |
} |
} |
S = reverse(S); |
S = qsort(S,comp_tdeg); |
|
/* S = reverse(S); */ |
Len = length(S); |
Len = length(S); |
Ok = [S[0]]; |
|
|
Tmp = ttttt; TV = cons(Tmp,V); Ord1 = [[0,1],[Ord,length(V)]]; |
if ( Len > 1 ) { |
if ( Len > 1 ) { |
K = 2; |
Prev = 1; |
while ( 1 ) { |
Cur = 2; |
for ( St = [], I = 0; I < K; I++ ) St = cons(S[I],St); |
G1 = append(G,[S[0]]); |
G1 = append(St,G); |
Int0 = incremental_gb(append(vtol(ltov(G1)*Tmp),vtol(ltov(Q)*(1-Tmp))), |
Int = ideal_intersection(G1,Q,V,Ord); |
TV,Ord1|gbblock=[[0,length(G)]]); |
if ( !gb_comp(Int,G) ) break; |
while ( Prev < Cur ) { |
Ok = St; |
for ( St = [], I = Prev; I < Cur; I++ ) St = cons(Tmp*S[I],St); |
if ( K == Len ) break; |
Int1 = incremental_gb(append(Int0,St),TV,Ord1 |
else { |
|gbblock=[[0,length(Int0)]]); |
K = 2*K; |
Int = elimination(Int1,V); |
if ( K > Len ) K = Len; |
if ( gb_comp(Int,G) ) { |
|
print(Cur); |
|
Prev = Cur; |
|
Cur = Cur+idiv(Len-Cur+1,2); |
|
Int0 = Int1; |
|
} else { |
|
Cur = Prev + idiv(Cur-Prev,2); |
} |
} |
} |
} |
} |
for ( St = [], I = 0; I < Prev; I++ ) St = cons(S[I],St); |
|
Ok = reverse(St); |
|
} else |
|
Ok = [S[0]]; |
|
print([length(S),length(Ok)]); |
|
dp_gr_print(Dp); |
return Ok; |
return Ok; |
} |
} |
|
|
Line 382 def iso_comp(G,L,V,Ord) |
|
Line 405 def iso_comp(G,L,V,Ord) |
|
Ind = vector(N); |
Ind = vector(N); |
Q = vector(N); |
Q = vector(N); |
L0 = map(first_element,L); |
L0 = map(first_element,L); |
|
G = nd_gr(G,V,0,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); |
PI = ideal_list_intersection(LI,V,Ord); |
Line 389 def iso_comp(G,L,V,Ord) |
|
Line 413 def iso_comp(G,L,V,Ord) |
|
if ( p_nf(car(T),L0[I],V,Ord) ) break; |
if ( p_nf(car(T),L0[I],V,Ord) ) break; |
if ( T == [] ) error("separator : cannot happen"); |
if ( T == [] ) error("separator : cannot happen"); |
S[I] = car(T); |
S[I] = car(T); |
QI = sat(G,S[I],V); |
QI = sat(G,S[I],V|isgb=1); |
PV = L[I][1]; |
PV = L[I][1]; |
V0 = setminus(V,PV); |
V0 = setminus(V,PV); |
GI = elim_gb(QI,V0,PV,0,[[0,length(V0)],[0,length(PV)]]); |
GI = elim_gb(QI,V0,PV,0,[[0,length(V0)],[0,length(PV)]]); |
Line 448 def prime_dec(B,V) |
|
Line 472 def prime_dec(B,V) |
|
R = append(prime_dec_main(car(T),V|indep=Indep),R); |
R = append(prime_dec_main(car(T),V|indep=Indep),R); |
if ( Indep ) { |
if ( Indep ) { |
G = ideal_list_intersection(map(first_element,R),V,0); |
G = ideal_list_intersection(map(first_element,R),V,0); |
R = remove_redundant_comp_first(G,R,V,0); |
if ( !NoLexDec ) R = remove_redundant_comp_first(G,R,V,0); |
} else { |
} else { |
G = ideal_list_intersection(R,V,0); |
G = ideal_list_intersection(R,V,0); |
R = remove_redundant_comp(G,[],R,V,0); |
if ( !NoLexDec ) R = remove_redundant_comp(G,[],R,V,0); |
} |
} |
return R; |
return R; |
} |
} |
Line 781 def fast_gb(B,V,Mod,Ord) |
|
Line 805 def fast_gb(B,V,Mod,Ord) |
|
return G; |
return G; |
} |
} |
|
|
|
def incremental_gb(A,V,Ord) |
|
{ |
|
if ( type(Mod=getopt(mod)) == -1 ) Mod = 0; |
|
if ( type(Block=getopt(gbblock)) == -1 ) Block = 0; |
|
if ( Mod ) |
|
G = nd_gr(A,V,Mod,Ord); |
|
else if ( Procs ) { |
|
Arg0 = ["nd_gr",A,V,0,Ord]; |
|
Arg1 = ["nd_gr_trace",A,V,1,GBCheck,Ord]; |
|
G = competitive_exec(Procs,Arg0,Arg1); |
|
} else if ( Block ) |
|
G = nd_gr(A,V,0,Ord|gbblock=Block); |
|
else |
|
G = nd_gr(A,V,0,Ord); |
|
return G; |
|
} |
|
|
def elim_gb(G,V,PV,Mod,Ord) |
def elim_gb(G,V,PV,Mod,Ord) |
{ |
{ |
Line 1116 def saturation(GNV,F,V) |
|
Line 1156 def saturation(GNV,F,V) |
|
|
|
def sat(G,F,V) |
def sat(G,F,V) |
{ |
{ |
|
if ( type(IsGB=getopt(isgb)) == -1 ) IsGB = 0; |
NV = ttttt; |
NV = ttttt; |
if ( Procs ) { |
if ( Procs ) { |
Arg0 = ["nd_gr_trace", |
Arg0 = ["nd_gr_trace", |
|
|
Arg1 = ["nd_gr_trace", |
Arg1 = ["nd_gr_trace", |
cons(NV*F-1,G),cons(NV,V),1,GBCheck,[[0,1],[0,length(V)]]]; |
cons(NV*F-1,G),cons(NV,V),1,GBCheck,[[0,1],[0,length(V)]]]; |
G1 = competitive_exec(Procs,Arg0,Arg1); |
G1 = competitive_exec(Procs,Arg0,Arg1); |
} else |
} else { |
G1 = nd_gr_trace(cons(NV*F-1,G),cons(NV,V),SatHomo,GBCheck,[[0,1],[0,length(V)]]); |
B1 = append(G,[NV*F-1]); |
|
V1 = cons(NV,V); |
|
Ord1 = [[0,1],[0,length(V)]]; |
|
if ( IsGB ) |
|
G1 = nd_gr_trace(B1,V1,SatHomo,GBCheck,Ord1| |
|
gbblock=[[0,length(G)]]); |
|
else |
|
G1 = nd_gr_trace(B1,V1,SatHomo,GBCheck,Ord1); |
|
} |
return elimination(G1,V); |
return elimination(G1,V); |
} |
} |
|
|
Line 1167 def sat_ind(G,F,V) |
|
Line 1216 def sat_ind(G,F,V) |
|
|
|
def colon(G,F,V) |
def colon(G,F,V) |
{ |
{ |
|
if ( type(IsGB=getopt(isgb)) == -1 ) IsGB = 0; |
F = p_nf(F,G,V,0); |
F = p_nf(F,G,V,0); |
if ( !F ) return [1]; |
if ( !F ) return [1]; |
T = ideal_intersection(G,[F],V,0); |
if ( IsGB ) |
|
T = ideal_intersection(G,[F],V,0|gbblock=[[0,length(G)]]); |
|
else |
|
T = ideal_intersection(G,[F],V,0); |
return map(ptozp,map(sdiv,T,F)); |
return map(ptozp,map(sdiv,T,F)); |
} |
} |
|
|
def ideal_colon(G,F,V) |
def ideal_colon(G,F,V) |
{ |
{ |
G = nd_gr(G,V,0,0); |
G = nd_gr(G,V,0,0); |
L = mapat(colon,1,G,F,V); |
for ( T = F, L = []; T != []; T = cdr(T) ) |
|
L = cons(colon(G,car(T),V|isgb=1),L); |
|
L = reverse(L); |
return ideal_list_intersection(L,V,0); |
return ideal_list_intersection(L,V,0); |
} |
} |
|
|