| version 1.1, 2003/04/20 02:42:08 |
version 1.7, 2003/04/21 02:00:13 |
|
|
| |
$OpenXM$ |
| |
|
| extern Hom,GBTime$ |
extern Hom,GBTime$ |
| extern DIVLIST,INTIDEAL,ORIGINAL,ORIGINALDIMENSION,STOP,Trials,REM$ |
extern DIVLIST,INTIDEAL,ORIGINAL,ORIGINALDIMENSION,STOP,Trials,REM$ |
| extern T_GRF,T_INT,T_PD,T_MP$ |
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(!LIBRARY_GR_LOADED) load("gr"); else ; LIBRARY_GR_LOADED = 1$ |
| |
|
| /*==============================================*/ |
/*==============================================*/ |
| /* prime decomposition of ideals over */ |
/* prime decomposition of ideals over */ |
| /* finite fields */ |
/* finite fields */ |
| Line 129 def frobeniuskernel_main(P,VSet,WSet) |
|
| Line 136 def frobeniuskernel_main(P,VSet,WSet) |
|
| XSet=append(VSet,WSet); |
XSet=append(VSet,WSet); |
| NewOrder=[[0,length(VSet)],[0,length(WSet)]]; |
NewOrder=[[0,length(VSet)],[0,length(WSet)]]; |
| |
|
| Char=setmod_ff()[0]; |
Char=characteristic_ff(); |
| |
|
| for (I=0;I<NV;I++) |
for (I=0;I<NV;I++) |
| { |
{ |
| Line 163 def frobeniuskernel_main2(P,VSet,WSet) |
|
| Line 170 def frobeniuskernel_main2(P,VSet,WSet) |
|
| XSet=append(VSet,WSet); |
XSet=append(VSet,WSet); |
| NewOrder=[[0,NV],[0,NV]]; |
NewOrder=[[0,NV],[0,NV]]; |
| |
|
| Char=setmod_ff()[0]; |
Char=characteristic_ff(); |
| |
|
| for (I=0;I<NV;I++) |
for (I=0;I<NV;I++) |
| { |
{ |
| Line 211 def frobeniuskernel_main4(P,VSet,WSet) |
|
| Line 218 def frobeniuskernel_main4(P,VSet,WSet) |
|
| XSet=append(VSet,WSet); |
XSet=append(VSet,WSet); |
| NewOrder=[[0,NV],[0,NV]]; |
NewOrder=[[0,NV],[0,NV]]; |
| |
|
| Char=setmod_ff()[0]; |
Char=characteristic_ff(); |
| |
|
| for (I=0;I<NV;I++) |
for (I=0;I<NV;I++) |
| { |
{ |
| Line 274 def frobeniuskernel_main3(P,VSet,WSet) |
|
| Line 281 def frobeniuskernel_main3(P,VSet,WSet) |
|
| |
|
| NewP=coefficientfrobeniuskernel(P); |
NewP=coefficientfrobeniuskernel(P); |
| |
|
| Char=setmod_ff()[0]; |
Char=characteristic_ff(); |
| |
|
| for (I=0;I<NV;I++) |
for (I=0;I<NV;I++) |
| { |
{ |
| Line 337 def coefficientfrobeniuskernel_main(Poly) |
|
| Line 344 def coefficientfrobeniuskernel_main(Poly) |
|
| Vars=vars(Poly); |
Vars=vars(Poly); |
| QP=dp_ptod(Poly,Vars); |
QP=dp_ptod(Poly,Vars); |
| ANS=0; |
ANS=0; |
| FOrd=deg(setmod_ff()[1],x); |
FOrd=extdeg_ff(); |
| Char=setmod_ff()[0]; |
Char=characteristic_ff(); |
| Pow=Char^(FOrd-1); |
Pow=Char^(FOrd-1); |
| |
|
| while(QP !=0 ) |
while(QP !=0 ) |
| Line 921 def primedec_sf(P,VSet,Ord,Strategy) |
|
| Line 928 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 941 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 968 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 982 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 1122 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 1136 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 1186 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 1220 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 1313 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 1337 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 1445 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 1628 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=characteristic_ff(); |
| |
|
| NewP=CP[0]; |
NewP=CP[0]; |
| EXPVECTOR=newvect(NVSet); |
EXPVECTOR=newvect(NVSet); |
| Line 1659 def convertdivisor(P,TargetVSet,VSet,ExVector) |
|
| Line 1694 def convertdivisor(P,TargetVSet,VSet,ExVector) |
|
| |
|
| NVSet=length(TargetVSet); |
NVSet=length(TargetVSet); |
| WSet=makecounterpart(TargetVSet); |
WSet=makecounterpart(TargetVSet); |
| Char=setmod_ff()[0]; |
Char=characteristic_ff(); |
| Ord=0; |
Ord=0; |
| |
|
| NewP=P; |
NewP=P; |
| Line 1762 def findgeneric(P,TargetVSet,VSet) |
|
| Line 1797 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(); |
| } |
} |
| |
|
| Line 1999 def checkseparablepoly(P,V) |
|
| Line 2036 def checkseparablepoly(P,V) |
|
| |
|
| def pdivide(F,V) |
def pdivide(F,V) |
| { |
{ |
| Char=setmod_ff()[0]; |
Char=characteristic_ff(); |
| TestP=P; |
TestP=P; |
| |
|
| Deg=ideg(TestP,V); |
Deg=ideg(TestP,V); |
| Line 2047 def convertsmallfield(PP,VSet,Ord) |
|
| Line 2084 def convertsmallfield(PP,VSet,Ord) |
|
| { |
{ |
| dp_ord(Ord); |
dp_ord(Ord); |
| NVSet=length(VSet); |
NVSet=length(VSet); |
| Char=setmod_ff()[0]; |
Char=characteristic_ff(); |
| ExtDeg=deg(setmod_ff()[1],x); |
ExtDeg=extdeg_ff(); |
| |
|
| NewV=pg; |
NewV=pgpgpgpgpgpgpg; |
| MPP=map(monic_hc,PP,VSet); |
MPP=map(monic_hc,PP,VSet); |
| MPP=map(sfptopsfp,MPP,NewV); |
MPP=map(sfptopsfp,MPP,NewV); |
| |
|
| MinPoly=subst(setmod_ff()[1],x,NewV); |
DefPoly=setmod_ff()[1]; |
| |
MinPoly=subst(DefPoly,var(DefPoly),NewV); |
| XSet=cons(NewV,VSet); |
XSet=cons(NewV,VSet); |
| |
|
| Ord1=[[0,1],[Ord,NVSet]]; |
Ord1=[[0,1],[Ord,NVSet]]; |
| Line 2074 def checkgaloisorbit(PP,VSet,Ord,Flag) |
|
| Line 2112 def checkgaloisorbit(PP,VSet,Ord,Flag) |
|
| { |
{ |
| NPP=length(PP); |
NPP=length(PP); |
| TmpPP=PP; |
TmpPP=PP; |
| ExtDeg=deg(setmod_ff()[1],x); |
ExtDeg=extdeg_ff(); |
| |
|
| ANS=[]; |
ANS=[]; |
| BNS=[]; |
BNS=[]; |