version 1.1, 2005/08/02 07:16:42 |
version 1.3, 2005/08/03 06:10:48 |
Line 4 localf split_lexgb; |
|
Line 4 localf split_lexgb; |
|
localf sort_lex_dec,sort_lex_inc; |
localf sort_lex_dec,sort_lex_inc; |
localf inverse_or_split, linear_dim; |
localf inverse_or_split, linear_dim; |
localf sp_sqrt,calcb,dp_monic_mod,monic_gb; |
localf sp_sqrt,calcb,dp_monic_mod,monic_gb; |
|
localf membership_test; |
localf dp_chrem,intdptoratdp,intdpltoratdpl; |
localf dp_chrem,intdptoratdp,intdpltoratdpl; |
localf comp_by_ht,dp_gr_mod,gr_chrem; |
localf comp_by_ht,dp_gr_mod,gr_chrem; |
|
|
Line 57 def inverse_or_split(V,Id,F) |
|
Line 58 def inverse_or_split(V,Id,F) |
|
/* Ret = GB(Id:F) */ |
/* Ret = GB(Id:F) */ |
/* compute GB(Id+<f>) */ |
/* compute GB(Id+<f>) */ |
Gquo = append(map(ptozp,map(dp_dtop,Ret,V)),Id); |
Gquo = append(map(ptozp,map(dp_dtop,Ret,V)),Id); |
Gquo = nd_gr(Gquo,V,0,2); |
/* inter-reduction */ |
|
Gquo = nd_gr_postproc(Gquo,V,0,2,0); |
DTotal = linear_dim(Id,V,2); |
DTotal = linear_dim(Id,V,2); |
Dquo = linear_dim(Gquo,V,2); |
Dquo = linear_dim(Gquo,V,2); |
Drem = DTotal-Dquo; |
Drem = DTotal-Dquo; |
Line 92 def linear_dim(G,V,Ord) |
|
Line 94 def linear_dim(G,V,Ord) |
|
return length(MB); |
return length(MB); |
} |
} |
|
|
|
def membership_test(B,G,V,O) |
|
{ |
|
B = map(ptozp,B); |
|
G = map(ptozp,G); |
|
for ( T = B; T != []; T = cdr(T) ) |
|
if ( nd_nf(car(T),G,V,O,0) ) return 0; |
|
return 1; |
|
} |
|
|
def gr_chrem(B,V,O,Dim) |
def gr_chrem(B,V,O,Dim) |
{ |
{ |
B = map(ptozp,B); |
B = map(ptozp,B); |
Line 107 def gr_chrem(B,V,O,Dim) |
|
Line 118 def gr_chrem(B,V,O,Dim) |
|
HS = HSM; |
HS = HSM; |
R1 = intdpltoratdpl(G,Mod); |
R1 = intdpltoratdpl(G,Mod); |
if ( R1 ) { |
if ( R1 ) { |
if ( Found && R == R1 ) |
if ( Found && R == R1 |
|
&& (GB=nd_gr_postproc(map(dp_dtop,R,V),V,0,O,1)) |
|
&& membership_test(B,GB,V,O) ) |
break; |
break; |
else { |
else { |
R = R1; Found = 1; |
R = R1; Found = 1; |
} |
} |
} |
} |
} |
} |
return map(dp_dtop,R,V); |
return GB; |
} |
} |
|
|
def comp_by_ht(A,B) |
def comp_by_ht(A,B) |