version 1.10, 2003/05/07 06:26:51 |
version 1.15, 2006/02/24 01:15:56 |
|
|
/* $OpenXM: OpenXM_contrib2/asir2000/lib/primdec_mod,v 1.9 2003/04/24 07:54:15 noro Exp $ */ |
/* $OpenXM: OpenXM_contrib2/asir2000/lib/primdec_mod,v 1.14 2004/07/30 02:24:11 noro Exp $ */ |
|
|
extern Hom,GBTime$ |
extern Hom,GBTime$ |
extern DIVLIST,INTIDEAL,ORIGINAL,ORIGINALDIMENSION,STOP,Trials,REM$ |
extern DIVLIST,INTIDEAL,ORIGINAL,ORIGINALDIMENSION,STOP,Trials,REM$ |
Line 6 extern T_GRF,T_INT,T_PD,T_MP$ |
|
Line 6 extern T_GRF,T_INT,T_PD,T_MP$ |
|
extern BuchbergerMinipoly,PartialDecompByLex,ParallelMinipoly$ |
extern BuchbergerMinipoly,PartialDecompByLex,ParallelMinipoly$ |
extern B_Win,D_Win$ |
extern B_Win,D_Win$ |
extern COMMONCHECK_SF,CID_SF$ |
extern COMMONCHECK_SF,CID_SF$ |
extern LIBRARY_GR_LOADED$ |
|
extern LIBRARY_FFF_LOADED$ |
|
|
|
if(!LIBRARY_FFF_LOADED) load("fff"); else ; LIBRARY_FFF_LOADED = 1$ |
if (!module_definedp("fff")) load("fff"); else $ |
if(!LIBRARY_GR_LOADED) load("gr"); else ; LIBRARY_GR_LOADED = 1$ |
if (!module_definedp("gr")) load("gr"); else $ |
|
module primdec_mod $ |
|
/* Empty for now. It will be used in a future. */ |
|
endmodule $ |
|
|
/*==============================================*/ |
/*==============================================*/ |
/* prime decomposition of ideals over */ |
/* prime decomposition of ideals over */ |
Line 1973 def contraction(P,V,W) |
|
Line 1974 def contraction(P,V,W) |
|
/* This procedure is called by zeroprimedecomposition. */ |
/* This procedure is called by zeroprimedecomposition. */ |
/* So, P is supposed to be a GB w.r.t. DRL. */ |
/* So, P is supposed to be a GB w.r.t. DRL. */ |
|
|
|
Ord0 = dp_ord(); |
Ord=0; |
Ord=0; |
YSet=setminus(W,V); |
YSet=setminus(W,V); |
|
|
Ord1 = [[Ord,length(V)],[0,length(YSet)]]; |
Ord1 = [[Ord,length(V)],[0,length(YSet)]]; |
GP1 = dp_gr_f_main(P,W,Hom,Ord1); |
W1 = append(V,YSet); |
|
GP1 = dp_gr_f_main(P,W1,Hom,Ord1); |
|
|
Factor = extcont_factor(GP1,V,Ord); |
Factor = extcont_factor(GP1,V,Ord); |
for ( F = 1, T = Factor; T != []; T = cdr(T) ) |
for ( F = 1, T = Factor; T != []; T = cdr(T) ) |
Line 1989 def contraction(P,V,W) |
|
Line 1992 def contraction(P,V,W) |
|
for ( T = G; T != []; T = cdr(T) ) |
for ( T = G; T != []; T = cdr(T) ) |
if ( !member(Vt,vars(car(T))) ) |
if ( !member(Vt,vars(car(T))) ) |
R = cons(car(T),R); |
R = cons(car(T),R); |
|
dp_ord(Ord0); |
return [R,F]; |
return [R,F]; |
} |
} |
|
|
Line 3158 def ideal_uniq(L) /* sub procedure of welldec and norm |
|
Line 3162 def ideal_uniq(L) /* sub procedure of welldec and norm |
|
R = append(R,[L[I]]); |
R = append(R,[L[I]]); |
else { |
else { |
for (J = 0; J < length(R); J++) |
for (J = 0; J < length(R); J++) |
if ( gb_comp(L[I],R[J]) ) |
if ( gb_comp_old(L[I],R[J]) ) |
break; |
break; |
if ( J == length(R) ) |
if ( J == length(R) ) |
R = append(R,[L[I]]); |
R = append(R,[L[I]]); |
Line 3174 def ideal_uniq_by_first(L) /* sub procedure of welldec |
|
Line 3178 def ideal_uniq_by_first(L) /* sub procedure of welldec |
|
R = append(R,[L[I]]); |
R = append(R,[L[I]]); |
else { |
else { |
for (J = 0; J < length(R); J++) |
for (J = 0; J < length(R); J++) |
if ( gb_comp(L[I][0],R[J][0]) ) |
if ( gb_comp_old(L[I][0],R[J][0]) ) |
break; |
break; |
if ( J == length(R) ) |
if ( J == length(R) ) |
R = append(R,[L[I]]); |
R = append(R,[L[I]]); |
Line 3235 def gr_fctr_sf(FL,VL,Ord) |
|
Line 3239 def gr_fctr_sf(FL,VL,Ord) |
|
for (TP = [],I = 0; I<length(FL); I++ ) { |
for (TP = [],I = 0; I<length(FL); I++ ) { |
F = FL[I]; |
F = FL[I]; |
SF = idealsqfr_sf(F); |
SF = idealsqfr_sf(F); |
if ( !gb_comp(F,SF) ) |
if ( !gb_comp_old(F,SF) ) |
F = dp_gr_f_main(SF,VL,0,Ord); |
F = dp_gr_f_main(SF,VL,0,Ord); |
CID_SF=[1]; |
CID_SF=[1]; |
SP = gr_fctr_sub_sf(F,VL,Ord); |
SP = gr_fctr_sub_sf(F,VL,Ord); |
Line 3259 def gr_fctr_sub_sf(G,VL,Ord) |
|
Line 3263 def gr_fctr_sub_sf(G,VL,Ord) |
|
W = cons(FL[J][0],G); |
W = cons(FL[J][0],G); |
NG = dp_gr_f_main(W,VL,0,Ord); |
NG = dp_gr_f_main(W,VL,0,Ord); |
TNG = idealsqfr_sf(NG); |
TNG = idealsqfr_sf(NG); |
if ( !gb_comp(NG,TNG) ) |
if ( !gb_comp_old(NG,TNG) ) |
NG = dp_gr_f_main(TNG,VL,0,Ord); |
NG = dp_gr_f_main(TNG,VL,0,Ord); |
if ( !inclusion_test(CID_SF,NG,VL,Ord) ) { |
if ( !inclusion_test(CID_SF,NG,VL,Ord) ) { |
DG = gr_fctr_sub_sf(NG,VL,Ord); |
DG = gr_fctr_sub_sf(NG,VL,Ord); |
Line 3277 def gr_fctr_sub_sf(G,VL,Ord) |
|
Line 3281 def gr_fctr_sub_sf(G,VL,Ord) |
|
if (I == length(G)) |
if (I == length(G)) |
RL = append([G],RL); |
RL = append([G],RL); |
return RL; |
return RL; |
|
} |
|
|
|
def gb_comp_old(A,B) |
|
{ |
|
LA = length(A); |
|
LB = length(B); |
|
if ( LA != LB ) |
|
return 0; |
|
A = newvect(LA,A); |
|
B = newvect(LB,B); |
|
A1 = qsort(A); |
|
B1 = qsort(B); |
|
for ( I = 0; I < LA; I++ ) |
|
if ( A1[I] != B1[I] && A1[I] != -B1[I] ) |
|
break; |
|
return I == LA ? 1 : 0; |
} |
} |
end$ |
end$ |