version 1.1, 2018/09/19 05:45:08 |
version 1.2, 2021/02/18 05:35:01 |
|
|
/* $OpenXM$ */ |
/* $OpenXM: OpenXM_contrib2/asir2018/lib/primdec_mod,v 1.1 2018/09/19 05:45:08 noro Exp $ */ |
|
|
|
extern First_Component,Minipoly_SBA,NDGR$ |
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$ |
Line 880 def testinclusion(Sample,Test) |
|
Line 881 def testinclusion(Sample,Test) |
|
|
|
def primedec_mod(P,VSet,Ord,Mod,Strategy) |
def primedec_mod(P,VSet,Ord,Mod,Strategy) |
{ |
{ |
|
First_Component = getopt(first); |
|
if ( type(First_Component) == -1 ) First_Component = 0; |
|
Minipoly_SBA = getopt(sba); |
|
if ( type(Minipoly_SBA) == -1 ) Minipoly_SBA = 0; |
|
NDGR = getopt(ndgr); |
|
if ( type(NDGR) == -1 ) NDGR = 0; |
for ( Q = Mod, E = 1; Q < 2^14; Q *= Mod, E++ ); |
for ( Q = Mod, E = 1; Q < 2^14; Q *= Mod, E++ ); |
Q /= Mod; |
Q /= Mod; |
E--; |
E--; |
Line 1158 def primedecomposition(P,VSet,Ord,COUNTER,Strategy) |
|
Line 1165 def primedecomposition(P,VSet,Ord,COUNTER,Strategy) |
|
if (CHECKADD == 0 ) |
if (CHECKADD == 0 ) |
{ |
{ |
DIVLIST=append(DIVLIST,[[Primedivisor,Dimension]]); |
DIVLIST=append(DIVLIST,[[Primedivisor,Dimension]]); |
|
if ( First_Component ) return 0; |
if (Strategy != 1 ) |
if (Strategy != 1 ) |
{ |
{ |
/* NO-OPERATION */ |
/* NO-OPERATION */ |
Line 1487 def zeroseparableprimedecomposition(P,TargetVSet,VSet) |
|
Line 1494 def zeroseparableprimedecomposition(P,TargetVSet,VSet) |
|
#if 0 |
#if 0 |
Q = dp_gr_f_main(cons(Factor,NewGP),ElimVSet,Hom,ElimOrd); |
Q = dp_gr_f_main(cons(Factor,NewGP),ElimVSet,Hom,ElimOrd); |
#else |
#else |
Q0 = dp_gr_f_main(cons(Factor,NewGP),ElimVSet,Hom,0); |
if ( NDGR ) { |
Q = dp_gr_f_main(Q0,ElimVSet,Hom,ElimOrd); |
Q0 = nd_gr(cons(Factor,NewGP),ElimVSet,-1,0); |
|
Q = nd_gr(Q0,ElimVSet,-1,ElimOrd); |
|
Q = nd_gr(Q,TargetVSet,-1,Ord); |
|
dp_ord(0); |
|
} else { |
|
Q0 = dp_gr_f_main(cons(Factor,NewGP),ElimVSet,Hom,0); |
|
Q = dp_gr_f_main(Q0,ElimVSet,Hom,ElimOrd); |
|
Q = dp_gr_f_main(Q,TargetVSet,Hom,Ord); |
|
} |
#endif |
#endif |
Q = dp_gr_f_main(Q,TargetVSet,Hom,Ord); |
|
ANS = cons(Q,ANS); |
ANS = cons(Q,ANS); |
} |
} |
#endif |
#endif |
Line 1587 def zerosepdec_main(P,W,V,Ord,Factors) |
|
Line 1601 def zerosepdec_main(P,W,V,Ord,Factors) |
|
ANS = []; |
ANS = []; |
for ( J = 0; J < NFactors; J++ ) { |
for ( J = 0; J < NFactors; J++ ) { |
Factor = dp_dtop(nf_sfrat(Ind,dp_ptod(Factors[J],W),1,PS)[0],W); |
Factor = dp_dtop(nf_sfrat(Ind,dp_ptod(Factors[J],W),1,PS)[0],W); |
Q = dp_gr_f_main(cons(Factor,P),ElimV,Hom,ElimOrd); |
if ( NDGR ) { |
Q = dp_gr_f_main(Q,W,Hom,Ord); |
Q = nd_gr(cons(Factor,P),ElimV,-1,ElimOrd); |
|
Q = nd_gr(Q,W,-1,Ord); |
|
dp_ord(0); |
|
} else { |
|
Q = dp_gr_f_main(cons(Factor,P),ElimV,Hom,ElimOrd); |
|
Q = dp_gr_f_main(Q,W,Hom,Ord); |
|
} |
ANS = cons(Q,ANS); |
ANS = cons(Q,ANS); |
|
if ( First_Component ) break; |
} |
} |
return ANS; |
return ANS; |
} |
} |
Line 2405 def minipoly_sf_0dim(G,V,O,F,V0,Server) |
|
Line 2426 def minipoly_sf_0dim(G,V,O,F,V0,Server) |
|
{ |
{ |
if ( Server ) |
if ( Server ) |
ox_sync(0); |
ox_sync(0); |
|
|
|
if ( Minipoly_SBA ) { |
|
G1 = cons(simp_ff(V0-F),G); |
|
V1 = append(V,[V0]); |
|
G2 = nd_sba(G1,V1,-1,[[0,length(V)],[0,1]]|sba_modord=[[],0]); |
|
dp_ord(0); |
|
for ( T = G2; T != []; T = cdr(T) ) |
|
if ( vars(car(T)) == [V0] ) break; |
|
if ( T == [] ) |
|
error("minipoly does not exit"); |
|
return car(T); |
|
} |
|
|
N = length(V); |
N = length(V); |
Len = length(G); |
Len = length(G); |
dp_ord(O); |
dp_ord(O); |