| version 1.1, 2003/04/20 02:42:08 |
version 1.3, 2003/04/20 07:50:45 |
| Line 4 extern T_GRF,T_INT,T_PD,T_MP$ |
|
| Line 4 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 FFF_LOADED_BY_PRIMDEC_MOD$ |
| |
extern GR_LOADED_BY_PRIMDEC_MOD$ |
| |
|
| |
if(!FFF_LOADED_BY_PRIMDEC_MOD) load("fff"); else ; FFF_LOADED_BY_PRIMDEC_MOD = 1$ |
| |
if(!GR_LOADED_BY_PRIMDEC_MOD) load("gr"); else ; GR_LOADED_BY_PRIMDEC_MOD = 1$ |
| |
|
| /*==============================================*/ |
/*==============================================*/ |
| /* prime decomposition of ideals over */ |
/* prime decomposition of ideals over */ |
| /* finite fields */ |
/* finite fields */ |
| Line 921 def primedec_sf(P,VSet,Ord,Strategy) |
|
| Line 926 def primedec_sf(P,VSet,Ord,Strategy) |
|
| REM[I]=[]; |
REM[I]=[]; |
| } |
} |
| |
|
| print("The dimension of the ideal is ",2);print(ORIGINALDIMENSION,2); |
if ( dp_gr_print() ) { |
| print(". "); |
print("The dimension of the ideal is ",2);print(ORIGINALDIMENSION,2); |
| |
print(". "); |
| |
} |
| |
|
| if ( ORIGINALDIMENSION == 0 ) |
if ( ORIGINALDIMENSION == 0 ) |
| { |
{ |
| Line 932 def primedec_sf(P,VSet,Ord,Strategy) |
|
| Line 939 def primedec_sf(P,VSet,Ord,Strategy) |
|
| |
|
| ANS=gr_fctr_sf([ORIGINAL],VSet,Ord); |
ANS=gr_fctr_sf([ORIGINAL],VSet,Ord); |
| NANS=length(ANS); |
NANS=length(ANS); |
| print("There are ",2);print(NANS,2);print(" partial components. "); |
if ( dp_gr_print() ) { |
| |
print("There are ",2);print(NANS,2);print(" partial components. "); |
| |
} |
| for (I=0;I<NANS;I++) |
for (I=0;I<NANS;I++) |
| { |
{ |
| TempI=ANS[I]; |
TempI=ANS[I]; |
| Line 958 def primedec_sf(P,VSet,Ord,Strategy) |
|
| Line 966 def primedec_sf(P,VSet,Ord,Strategy) |
|
| { |
{ |
| DIVLIST = prime_irred_sf_by_first(DIVLIST,VSet,0); |
DIVLIST = prime_irred_sf_by_first(DIVLIST,VSet,0); |
| DIVLIST = monic_sf_first(DIVLIST,VSet); |
DIVLIST = monic_sf_first(DIVLIST,VSet); |
| print("We finish the computation. "); |
if ( dp_gr_print() ) { |
| T_TOTAL = time()[3]-T0[3]; |
print("We finish the computation. "); |
| print(["T_TOTAL",T_TOTAL,"T_GRF",T_GRF,"T_PD",T_PD,"T_MP",T_MP,"T_INT",T_INT,"B_Win",B_Win,"D_Win",D_Win]); |
T_TOTAL = time()[3]-T0[3]; |
| |
print(["T_TOTAL",T_TOTAL,"T_GRF",T_GRF,"T_PD",T_PD,"T_MP",T_MP,"T_INT",T_INT,"B_Win",B_Win,"D_Win",D_Win]); |
| |
} |
| return 0; |
return 0; |
| } |
} |
| |
|
| Line 970 def primedec_sf(P,VSet,Ord,Strategy) |
|
| Line 980 def primedec_sf(P,VSet,Ord,Strategy) |
|
| DIVLIST = prime_irred_sf_by_first(DIVLIST,VSet,0); |
DIVLIST = prime_irred_sf_by_first(DIVLIST,VSet,0); |
| DIVLIST = monic_sf_first(DIVLIST,VSet); |
DIVLIST = monic_sf_first(DIVLIST,VSet); |
| T_TOTAL = time()[3]-T0[3]; |
T_TOTAL = time()[3]-T0[3]; |
| print(["T_TOTAL",T_TOTAL,"T_GRF",T_GRF,"T_PD",T_PD,"T_MP",T_MP,"T_INT",T_INT,"B_Win",B_Win,"D_Win",D_Win]); |
if ( dp_gr_print() ) { |
| |
print(["T_TOTAL",T_TOTAL,"T_GRF",T_GRF,"T_PD",T_PD,"T_MP",T_MP,"T_INT",T_INT,"B_Win",B_Win,"D_Win",D_Win]); |
| |
} |
| return 0; |
return 0; |
| } |
} |
| |
|
| Line 1108 def primedecomposition(P,VSet,Ord,COUNTER,Strategy) |
|
| Line 1120 def primedecomposition(P,VSet,Ord,COUNTER,Strategy) |
|
| Dimension=Dimeset[0]; |
Dimension=Dimeset[0]; |
| MSI=Dimeset[1]; |
MSI=Dimeset[1]; |
| |
|
| print("The dimension of the ideal is ",2); print(Dimension,2); |
if ( dp_gr_print() ) { |
| print("."); |
print("The dimension of the ideal is ",2); print(Dimension,2); |
| |
print("."); |
| |
} |
| TargetVSet=setminus(VSet,MSI); |
TargetVSet=setminus(VSet,MSI); |
| NewGP=dp_gr_f_main(GP,TargetVSet,Hom,Ord); |
NewGP=dp_gr_f_main(GP,TargetVSet,Hom,Ord); |
| |
|
| Line 1121 def primedecomposition(P,VSet,Ord,COUNTER,Strategy) |
|
| Line 1134 def primedecomposition(P,VSet,Ord,COUNTER,Strategy) |
|
| |
|
| /* Then the ideal is 0-dimension in K[TargetVSet]. */ |
/* Then the ideal is 0-dimension in K[TargetVSet]. */ |
| |
|
| print("We enter Zero-dimension Prime Decomposition. ",2); |
if ( dp_gr_print() ) { |
| |
print("We enter Zero-dimension Prime Decomposition. ",2); |
| |
} |
| |
|
| QP=zeroprimedecomposition(NewGP,TargetVSet,VSet); |
QP=zeroprimedecomposition(NewGP,TargetVSet,VSet); |
| |
|
| ANS=[]; |
ANS=[]; |
| NQP=length(QP); |
NQP=length(QP); |
| |
|
| print("The number of the newly found component is ",2); |
if ( dp_gr_print() ) { |
| print(NQP,2);print(". ",2); |
print("The number of the newly found component is ",2); |
| |
print(NQP,2);print(". ",2); |
| |
} |
| for (I=0;I<NQP;I++) |
for (I=0;I<NQP;I++) |
| { |
{ |
| ZPrimeideal=QP[I]; |
ZPrimeideal=QP[I]; |
| Line 1168 def primedecomposition(P,VSet,Ord,COUNTER,Strategy) |
|
| Line 1184 def primedecomposition(P,VSet,Ord,COUNTER,Strategy) |
|
| |
|
| if (CHECK==1) |
if (CHECK==1) |
| { |
{ |
| print("We already obtain all divisor. "); |
if ( dp_gr_print() ) { |
| |
print("We already obtain all divisor. "); |
| |
} |
| STOP = 1; |
STOP = 1; |
| return 0; |
return 0; |
| } |
} |
| Line 1200 def primedecomposition(P,VSet,Ord,COUNTER,Strategy) |
|
| Line 1218 def primedecomposition(P,VSet,Ord,COUNTER,Strategy) |
|
| |
|
| if ( CHECKADD != 0 ) |
if ( CHECKADD != 0 ) |
| { |
{ |
| print("Avoid unnecessary computation. ",2); |
if ( dp_gr_print() ) { |
| |
print("Avoid unnecessary computation. ",2); |
| |
} |
| continue; |
continue; |
| } |
} |
| } |
} |
| Line 1291 def zeroprimedecomposition(P,TargetVSet,VSet) |
|
| Line 1311 def zeroprimedecomposition(P,TargetVSet,VSet) |
|
| |
|
| ZDecomp=[PDiv]; |
ZDecomp=[PDiv]; |
| |
|
| print("An intermediate ideal is of generic type. "); |
if ( dp_gr_print() ) { |
| |
print("An intermediate ideal is of generic type. "); |
| } |
} |
| |
} |
| else |
else |
| { |
{ |
| print("An intermediate ideal is not of generic type. ",2); |
if ( dp_gr_print() ) { |
| |
print("An intermediate ideal is not of generic type. ",2); |
| |
} |
| |
|
| /* We compute the separable closure of <P> by using minimal polynomails.*/ |
/* We compute the separable closure of <P> by using minimal polynomails.*/ |
| /* separableclosure outputs */ |
/* separableclosure outputs */ |
| Line 1311 def zeroprimedecomposition(P,TargetVSet,VSet) |
|
| Line 1335 def zeroprimedecomposition(P,TargetVSet,VSet) |
|
| |
|
| if ( Sep[1] != 0 ) |
if ( Sep[1] != 0 ) |
| { |
{ |
| print("The ideal is inseparable. ",2); |
if ( dp_gr_print() ) { |
| |
print("The ideal is inseparable. ",2); |
| |
} |
| CHECK2=checkgeneric2(Sep[2]); |
CHECK2=checkgeneric2(Sep[2]); |
| } |
} |
| else |
else |
| { |
{ |
| print("The ideal is already separable. ",2); |
if ( dp_gr_print() ) { |
| |
print("The ideal is already separable. ",2); |
| |
} |
| } |
} |
| |
|
| if ( Sep[1] !=0 && CHECK2 == 1 ) |
if ( Sep[1] !=0 && CHECK2 == 1 ) |
| { |
{ |
| print("The separable closure is of generic type. ",2); |
if ( dp_gr_print() ) { |
| print("So, the intermediate ideal is prime or primary. ",2); |
print("The separable closure is of generic type. ",2); |
| |
print("So, the intermediate ideal is prime or primary. ",2); |
| |
} |
| PDiv=convertdivisor(Sep[0],TargetVSet,VSet,Sep[1]); |
PDiv=convertdivisor(Sep[0],TargetVSet,VSet,Sep[1]); |
| if ( TargetVSet != VSet ) |
if ( TargetVSet != VSet ) |
| { |
{ |
| Line 1414 def zeroseparableprimedecomposition(P,TargetVSet,VSet) |
|
| Line 1443 def zeroseparableprimedecomposition(P,TargetVSet,VSet) |
|
| /* Generic=[f, minimal polynomial of f in newt, newt], */ |
/* Generic=[f, minimal polynomial of f in newt, newt], */ |
| /* where newt (X) is a newly introduced variable. */ |
/* where newt (X) is a newly introduced variable. */ |
| |
|
| print("We search for a linear sum of variables in generic position. ",2); |
if ( dp_gr_print() ) { |
| |
print("We search for a linear sum of variables in generic position. ",2); |
| |
} |
| Generic=findgeneric(NewGP,TargetVSet,VSet); |
Generic=findgeneric(NewGP,TargetVSet,VSet); |
| |
|
| X=Generic[2]; /* newly introduced variable */ |
X=Generic[2]; /* newly introduced variable */ |
| Line 1596 def separableclosure(CP,TargetVSet,VSet) |
|
| Line 1626 def separableclosure(CP,TargetVSet,VSet) |
|
| |
|
| if ( CHECK == 1 ) |
if ( CHECK == 1 ) |
| { |
{ |
| print("This is already a separable ideal.", 2); |
if ( dp_gr_print() ) { |
| |
print("This is already a separable ideal.", 2); |
| |
} |
| return [CP[0],0]; |
return [CP[0],0]; |
| } |
} |
| |
|
| print("This is not a separable ideal, so we make its separable closure.", 2); |
if ( dp_gr_print() ) { |
| |
print("This is not a separable ideal, so we make its separable closure.", 2); |
| |
} |
| WSet=makecounterpart(TargetVSet); |
WSet=makecounterpart(TargetVSet); |
| Char=setmod_ff()[0]; |
Char=setmod_ff()[0]; |
| |
|
| Line 1762 def findgeneric(P,TargetVSet,VSet) |
|
| Line 1795 def findgeneric(P,TargetVSet,VSet) |
|
| } |
} |
| } |
} |
| #endif |
#endif |
| print("Extend the ground field. ",2); |
if ( dp_gr_print() ) { |
| |
print("Extend the ground field. ",2); |
| |
} |
| error(); |
error(); |
| } |
} |
| |
|