version 1.5, 2020/01/27 02:16:02 |
version 1.7, 2020/02/09 09:13:38 |
Line 75 def module_syz(F,V,H,Ord) |
|
Line 75 def module_syz(F,V,H,Ord) |
|
} else { |
} else { |
if ( Weyl ) |
if ( Weyl ) |
G = nd_weyl_gr(B,V,0,[1,Ord]|dp=1,homo=H); |
G = nd_weyl_gr(B,V,0,[1,Ord]|dp=1,homo=H); |
else if ( F4 ) { |
else { |
Ind = 0; |
Ind = 0; |
while ( 1 ) { |
while ( 1 ) { |
G = nd_f4_trace(B,V,H,-lprime(Ind),[1,Ord]|dp=1); |
if ( F4 ) |
|
G = nd_f4_trace(B,V,H,-lprime(Ind),[1,Ord]|dp=1); |
|
else |
|
G = nd_gr_trace(B,V,H,-lprime(Ind),[1,Ord]|dp=1); |
if ( G ) break; |
if ( G ) break; |
else Ind++; |
else Ind++; |
} |
} |
} else |
} |
G = nd_gr(B,V,0,[1,Ord]|dp=1,homo=H); |
|
} |
} |
G0 = []; S0 = []; Gen0 = []; |
G0 = []; S0 = []; Gen0 = []; |
for ( T = G; T != []; T = cdr(T) ) { |
for ( T = G; T != []; T = cdr(T) ) { |
Line 222 def sres(F,V,H,Ord) |
|
Line 224 def sres(F,V,H,Ord) |
|
if ( I == K ) return [[],[],[]]; |
if ( I == K ) return [[],[],[]]; |
L = todpmlist(F,V); |
L = todpmlist(F,V); |
F = L[0]; N = L[1]; |
F = L[0]; N = L[1]; |
|
#if 0 |
G = nd_gr(F,V,H,[0,Ord]|dp=1); |
G = nd_gr(F,V,H,[0,Ord]|dp=1); |
|
#else |
|
G = nd_gr_trace(F,V,H,1,[0,Ord]|dp=1); |
|
#endif |
G = reverse(G); |
G = reverse(G); |
R = [G]; |
R = [G]; |
dp_ord([0,Ord]); |
dp_ord([0,Ord]); |
while ( 1 ) { |
while ( 1 ) { |
S = dpm_schreyer_base(R[0]); |
S = dpm_schreyer_base(R[0]); |
print(["length",length(S)]); |
if ( dp_gr_print() ) print(["length",length(S)]); |
if ( S == [] ) break; |
if ( S == [] ) break; |
else R = cons(S,R); |
else R = cons(S,R); |
} |
} |
Line 421 def lres_setup(F,V,H,Ord) |
|
Line 427 def lres_setup(F,V,H,Ord) |
|
} else { |
} else { |
error("lres_setup: arugument type is invalid."); |
error("lres_setup: arugument type is invalid."); |
} |
} |
|
dp_ord([0,Ord]); |
|
F = map(dpm_sort,F); |
|
#if 0 |
G = nd_gr(F,V,H,[0,Ord]|dp=1); |
G = nd_gr(F,V,H,[0,Ord]|dp=1); |
|
#else |
|
G = nd_gr_trace(F,V,H,1,[0,Ord]|dp=1); |
|
#endif |
G = reverse(G); |
G = reverse(G); |
dp_ord([0,Ord]); |
dp_ord([0,Ord]); |
One = dp_ptod(1,V); |
One = dp_ptod(1,V); |
Line 492 def lres(F,V,H,Ord) |
|
Line 504 def lres(F,V,H,Ord) |
|
} |
} |
T1 = time(); Ftime = T1[0]-T0[0]; |
T1 = time(); Ftime = T1[0]-T0[0]; |
R = ltov(R); Len = length(R); |
R = ltov(R); Len = length(R); |
print(["Len",Len]); |
if ( dp_gr_print() ) print(["Len",Len]); |
for ( I = 0, NF = 0; I < Len; I++ ) { |
for ( I = 0, NF = 0; I < Len; I++ ) { |
if ( !((I+1)%100) ) print(".",2); |
if ( dp_gr_print() ) { |
if ( !((I+1)%10000) ) print(I+1); |
if ( !((I+1)%100) ) print(".",2); |
|
if ( !((I+1)%10000) ) print(I+1); |
|
} |
if ( !R[I][3] ) continue; |
if ( !R[I][3] ) continue; |
NF++; |
NF++; |
reduce(R[I],B,Bpos,C,H,Z,K,Kind,G,One,Top); |
reduce(R[I],B,Bpos,C,H,Z,K,Kind,G,One,Top); |
} |
} |
print(""); |
if ( dp_gr_print() ) { |
print(["NF",NF]); |
print(""); |
|
print(["NF",NF]); |
|
} |
T0 = time(); |
T0 = time(); |
dpm_set_schreyer_level(0); |
dpm_set_schreyer_level(0); |
D[1] = map(dpm_sort,H[1]); |
D[1] = map(dpm_sort,H[1]); |
Line 515 def lres(F,V,H,Ord) |
|
Line 531 def lres(F,V,H,Ord) |
|
Tab = map(dpm_sort,Tab); |
Tab = map(dpm_sort,Tab); |
TailTop = dpm_dptodpm(One,TailTopPos); |
TailTop = dpm_dptodpm(One,TailTopPos); |
if ( !NoSimpK ) { |
if ( !NoSimpK ) { |
print("simplify_k "+rtostr(I)+"...",2); |
if ( dp_gr_print() ) print("simplify_k "+rtostr(I)+"...",2); |
simplify_k(Head,Tab,TailTop,One); |
simplify_k(Head,Tab,TailTop,One); |
print("done"); |
if ( dp_gr_print() ) print("done"); |
} |
} |
HI = map(remove_k,map(dpm_sort,H[I]),Kind[I-1]); |
HI = map(remove_k,map(dpm_sort,H[I]),Kind[I-1]); |
Len = length(HI); |
Len = length(HI); |
print("simplify_by_k "+rtostr(I)+"...",2); |
if ( dp_gr_print() ) print("simplify_by_k "+rtostr(I)+"...",2); |
D[I] = vector(Len); |
D[I] = vector(Len); |
for ( J = 0; J < Len; J++ ) { |
for ( J = 0; J < Len; J++ ) { |
D[I][J] = simplify_by_k(HI[J],Tab,TailTop,One); |
D[I][J] = simplify_by_k(HI[J],Tab,TailTop,One); |
if ( NoPreProj ) |
if ( NoPreProj ) |
D[I][J] = remove_k(D[I][J],Kind[I-1]); |
D[I][J] = remove_k(D[I][J],Kind[I-1]); |
} |
} |
print("done"); |
if ( dp_gr_print() ) print("done"); |
} |
} |
dp_ord([1,0]); |
dp_ord([1,0]); |
T1 = time(); |
T1 = time(); |
print(["Frame",Ftime,"Prep",Ptime,"Reduce",Rtime,"Search",Stime,"Minimalize",T1[0]-T0[0]]); |
if ( dp_gr_print() ) print(["Frame",Ftime,"Prep",Ptime,"Reduce",Rtime,"Search",Stime,"Minimalize",T1[0]-T0[0]]); |
// return [C,H,K,Kind,D]; |
// return [C,H,K,Kind,D]; |
D = compress_h(D); |
D = compress_h(D); |
if ( DP ) return D; |
if ( DP ) return D; |
|
|
R = 0; |
R = 0; |
for ( T = F; T; T = dpm_rest(T) ) { |
for ( T = F; T; T = dpm_rest(T) ) { |
Coef = dpm_hc(T); Pos = dpm_hp(T); |
Coef = dpm_hc(T); Pos = dpm_hp(T); |
R += Coef*C[Pos]; |
R += Coef*C[Pos-1]; |
} |
} |
return R; |
return R; |
} |
} |