version 1.5, 2011/06/03 04:51:15 |
version 1.6, 2011/07/05 07:46:09 |
|
|
/* $OpenXM: OpenXM/src/asir-contrib/testing/noro/new_pd.rr,v 1.4 2011/02/18 02:59:04 noro Exp $ */ |
/* $OpenXM: OpenXM/src/asir-contrib/testing/noro/new_pd.rr,v 1.5 2011/06/03 04:51:15 noro Exp $ */ |
import("gr")$ |
import("gr")$ |
module noro_pd$ |
module noro_pd$ |
static GBCheck,F4,EProcs,Procs,SatHomo,GBRat$ |
static GBCheck,F4,EProcs,Procs,SatHomo,GBRat$ |
Line 1228 def complete_qdecomp(GD,V,Mod) |
|
Line 1228 def complete_qdecomp(GD,V,Mod) |
|
NV = ttttt; |
NV = ttttt; |
M = gen_minipoly(cons(NV-U,GQ),cons(NV,V),PV,0,NV,Mod); |
M = gen_minipoly(cons(NV-U,GQ),cons(NV,V),PV,0,NV,Mod); |
M = ppart(M,NV,Mod); |
M = ppart(M,NV,Mod); |
MF = Mod ? modfctr(M) : fctr(M); |
MF = Mod ? modfctr(M,Mod) : fctr(M); |
R = []; |
R = []; |
for ( T = cdr(MF); T != []; T = cdr(T) ) { |
for ( T = cdr(MF); T != []; T = cdr(T) ) { |
S = car(T); |
S = car(T); |
Line 1325 def complete_decomp(GD,V,Mod) |
|
Line 1325 def complete_decomp(GD,V,Mod) |
|
NV = ttttt; |
NV = ttttt; |
M = gen_minipoly(cons(NV-U,G),cons(NV,V),PV,0,NV,Mod); |
M = gen_minipoly(cons(NV-U,G),cons(NV,V),PV,0,NV,Mod); |
M = ppart(M,NV,Mod); |
M = ppart(M,NV,Mod); |
MF = Mod ? modfctr(M) : fctr(M); |
MF = Mod ? modfctr(M,Mod) : fctr(M); |
if ( length(MF) == 2 ) return [G]; |
if ( length(MF) == 2 ) return [G]; |
R = []; |
R = []; |
for ( T = cdr(MF); T != []; T = cdr(T) ) { |
for ( T = cdr(MF); T != []; T = cdr(T) ) { |
Line 1587 def find_npos(GD,V,PV,Mod) |
|
Line 1587 def find_npos(GD,V,PV,Mod) |
|
if ( DH[K] == V[K] ) continue; |
if ( DH[K] == V[K] ) continue; |
U += rsgn()*((random()%B+1))*V[K]; |
U += rsgn()*((random()%B+1))*V[K]; |
} |
} |
|
#if 0 |
M = minipolym(G,V,0,U,NV,Mod); |
M = minipolym(G,V,0,U,NV,Mod); |
|
#else |
|
M = gen_minipoly(cons(NV-U,G),cons(NV,V),PV,0,NV,Mod); |
|
#endif |
if ( deg(M,NV) == LD ) return U; |
if ( deg(M,NV) == LD ) return U; |
} |
} |
} |
} |
Line 1595 def find_npos(GD,V,PV,Mod) |
|
Line 1599 def find_npos(GD,V,PV,Mod) |
|
|
|
def gen_minipoly(G,V,PV,Ord,VI,Mod) |
def gen_minipoly(G,V,PV,Ord,VI,Mod) |
{ |
{ |
|
O0 = dp_ord(); |
if ( PV == [] ) { |
if ( PV == [] ) { |
NV = sssss; |
NV = sssss; |
if ( Mod ) |
if ( Mod ) |
M = minipolym(G,V,Ord,VI,NV,Mod); |
M = minipolym(G,V,Ord,VI,NV,Mod); |
else |
else |
M = minipoly(G,V,Ord,VI,NV); |
M = minipoly(G,V,Ord,VI,NV); |
|
dp_ord(O0); |
return subst(M,NV,VI); |
return subst(M,NV,VI); |
} |
} |
W = setminus(V,[VI]); |
W = setminus(V,[VI]); |
Line 1643 def gen_minipoly(G,V,PV,Ord,VI,Mod) |
|
Line 1649 def gen_minipoly(G,V,PV,Ord,VI,Mod) |
|
G = nd_gr_trace(G,PV1,1,GBCheck,[[0,1],[0,length(PV)]]|nora=1); |
G = nd_gr_trace(G,PV1,1,GBCheck,[[0,1],[0,length(PV)]]|nora=1); |
for ( M = car(G), T = cdr(G); T != []; T = cdr(T) ) |
for ( M = car(G), T = cdr(G); T != []; T = cdr(T) ) |
if ( deg(car(T),VI) < deg(M,VI) ) M = car(T); |
if ( deg(car(T),VI) < deg(M,VI) ) M = car(T); |
|
dp_ord(O0); |
return M; |
return M; |
} |
} |
|
|