=================================================================== RCS file: /home/cvs/OpenXM_contrib2/asir2000/lib/primdec_mod,v retrieving revision 1.2 retrieving revision 1.5 diff -u -p -r1.2 -r1.5 --- OpenXM_contrib2/asir2000/lib/primdec_mod 2003/04/20 07:33:29 1.2 +++ OpenXM_contrib2/asir2000/lib/primdec_mod 2003/04/21 01:44:31 1.5 @@ -4,10 +4,11 @@ extern T_GRF,T_INT,T_PD,T_MP$ extern BuchbergerMinipoly,PartialDecompByLex,ParallelMinipoly$ extern B_Win,D_Win$ extern COMMONCHECK_SF,CID_SF$ -extern FFF_LOADED_BY_PRIMDEC_MOD$ +extern LIBRARY_GR_LOADED$ +extern LIBRARY_FFF_LOADED$ -if(FFF_LOADED_BY_PRIMDEC_MOD) load("fff"); else ; -FFF_LOADED_BY_PRIMDEC_MOD = 1$ +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 */ @@ -341,7 +342,7 @@ def coefficientfrobeniuskernel_main(Poly) Vars=vars(Poly); QP=dp_ptod(Poly,Vars); ANS=0; - FOrd=deg(setmod_ff()[1],x); + FOrd=deg(setmod_ff()[1],var(setmod_ff()[1])); Char=setmod_ff()[0]; Pow=Char^(FOrd-1); @@ -925,8 +926,10 @@ def primedec_sf(P,VSet,Ord,Strategy) REM[I]=[]; } - print("The dimension of the ideal is ",2);print(ORIGINALDIMENSION,2); - print(". "); + if ( dp_gr_print() ) { + print("The dimension of the ideal is ",2);print(ORIGINALDIMENSION,2); + print(". "); + } if ( ORIGINALDIMENSION == 0 ) { @@ -936,8 +939,9 @@ def primedec_sf(P,VSet,Ord,Strategy) ANS=gr_fctr_sf([ORIGINAL],VSet,Ord); 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 by using minimal polynomails.*/ /* separableclosure outputs */ @@ -1315,19 +1335,24 @@ def zeroprimedecomposition(P,TargetVSet,VSet) if ( Sep[1] != 0 ) { - print("The ideal is inseparable. ",2); + if ( dp_gr_print() ) { + print("The ideal is inseparable. ",2); + } CHECK2=checkgeneric2(Sep[2]); } 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 ) { - print("The separable closure is of generic type. ",2); - print("So, the intermediate ideal is prime or primary. ",2); - + if ( dp_gr_print() ) { + 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]); if ( TargetVSet != VSet ) { @@ -1418,8 +1443,9 @@ def zeroseparableprimedecomposition(P,TargetVSet,VSet) /* Generic=[f, minimal polynomial of f in newt, newt], */ /* 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); X=Generic[2]; /* newly introduced variable */ @@ -1600,12 +1626,15 @@ def separableclosure(CP,TargetVSet,VSet) 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]; } - 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); Char=setmod_ff()[0]; @@ -1766,7 +1795,9 @@ def findgeneric(P,TargetVSet,VSet) } } #endif - print("Extend the ground field. ",2); + if ( dp_gr_print() ) { + print("Extend the ground field. ",2); + } error(); } @@ -2052,13 +2083,13 @@ def convertsmallfield(PP,VSet,Ord) dp_ord(Ord); NVSet=length(VSet); Char=setmod_ff()[0]; - ExtDeg=deg(setmod_ff()[1],x); + ExtDeg=deg(setmod_ff()[1],var(setmod_ff()[1])); - NewV=pg; + NewV=pgpgpgpgpgpgpg; MPP=map(monic_hc,PP,VSet); MPP=map(sfptopsfp,MPP,NewV); - MinPoly=subst(setmod_ff()[1],x,NewV); + MinPoly=subst(setmod_ff()[1],var(setmod_ff()[1]),NewV); XSet=cons(NewV,VSet); Ord1=[[0,1],[Ord,NVSet]]; @@ -2078,7 +2109,7 @@ def checkgaloisorbit(PP,VSet,Ord,Flag) { NPP=length(PP); TmpPP=PP; - ExtDeg=deg(setmod_ff()[1],x); + ExtDeg=deg(setmod_ff()[1],var(setmod_ff()[1])); ANS=[]; BNS=[];