[BACK]Return to pd.rr CVS log [TXT][DIR] Up to [local] / OpenXM / src / asir-contrib / testing / noro

Diff for /OpenXM/src/asir-contrib/testing/noro/Attic/pd.rr between version 1.5 and 1.6

version 1.5, 2010/05/21 00:29:46 version 1.6, 2010/05/21 06:45:06
Line 16  localf radical_membership, quick_radical_membership, m
Line 16  localf radical_membership, quick_radical_membership, m
 localf radical_membership_rep, ideal_product, saturation$  localf radical_membership_rep, ideal_product, saturation$
 localf sat, satind, sat_ind, colon$  localf sat, satind, sat_ind, colon$
 localf ideal_colon, ideal_sat, ideal_inclusion, qd_simp_comp, qd_remove_redundant_comp$  localf ideal_colon, ideal_sat, ideal_inclusion, qd_simp_comp, qd_remove_redundant_comp$
 localf remove_redundant_comp, remove_redundant_comp_first, ppart, sq$  localf pd_remove_redundant_comp, ppart, sq$
 localf lcfactor, compute_deg0, compute_deg, member$  localf lcfactor, compute_deg0, compute_deg, member$
 localf elimination, setintersection, setminus, sep_list$  localf elimination, setintersection, setminus, sep_list$
 localf first_element, comp_tdeg, tdeg, comp_by_ord, comp_by_second$  localf first_element, comp_tdeg, tdeg, comp_by_ord, comp_by_second$
 localf gbcheck,f4,sathomo$  localf gbcheck,f4,sathomo,qdcheck$
   
 SatHomo=0$  SatHomo=0$
 GBCheck=1$  GBCheck=1$
Line 69  def kill_procs()
Line 69  def kill_procs()
         }          }
 }  }
   
   def qd_check(B,V,QD)
   {
           G = nd_gr(B,V,0,0);
           Iso = ideal_list_intersection(map(first_element,QD[0]),V,0);
           Emb = ideal_list_intersection(map(first_element,QD[1]),V,0);
           GG = ideal_intersection(Iso,Emb,V,0);
           return gb_comp(G,GG);
   }
   
 /* SYC primary decomositions */  /* SYC primary decomositions */
   
 def syca_dec(B,V)  def syca_dec(B,V)
Line 357  def sy_dec(B,V)
Line 366  def sy_dec(B,V)
                 }                  }
                 Gt = fast_gb(append(Gt,St),V,0,Ord);                  Gt = fast_gb(append(Gt,St),V,0,Ord);
         }          }
         Q = remove_redundant_comp(G,Qi,Q,V,Ord);          Q = qd_remove_redundant_comp(G,Qi,Q,V,Ord);
         return append(Qi,Q);          return append(Qi,Q);
 }  }
   
Line 466  def prime_dec(B,V)
Line 475  def prime_dec(B,V)
         else          else
                 PD = [B];                  PD = [B];
         G = ideal_list_intersection(PD,V,0);          G = ideal_list_intersection(PD,V,0);
         PD = remove_redundant_comp(G,[],PD,V,0);          PD = pd_remove_redundant_comp(G,PD,V,0);
         R = [];          R = [];
         for ( T = PD; T != []; T = cdr(T) )          for ( T = PD; T != []; T = cdr(T) )
                 R = append(prime_dec_main(car(T),V|indep=Indep),R);                  R = append(prime_dec_main(car(T),V|indep=Indep),R);
         if ( Indep ) {          if ( Indep ) {
                 G = ideal_list_intersection(map(first_element,R),V,0);                  G = ideal_list_intersection(map(first_element,R),V,0);
                 if ( !NoLexDec ) R = remove_redundant_comp_first(G,R,V,0);                  if ( !NoLexDec ) R = pd_remove_redundant_comp(G,R,V,0|first=1);
         } else {          } else {
                 G = ideal_list_intersection(R,V,0);                  G = ideal_list_intersection(R,V,0);
                 if ( !NoLexDec ) R = remove_redundant_comp(G,[],R,V,0);                  if ( !NoLexDec ) R = pd_remove_redundant_comp(G,R,V,0);
         }          }
         return R;          return R;
 }  }
Line 1281  def qd_remove_redundant_comp(G,Iso,Emb,V,Ord)
Line 1290  def qd_remove_redundant_comp(G,Iso,Emb,V,Ord)
 {  {
         IsoInt = ideal_list_intersection(map(first_element,Iso),V,Ord);          IsoInt = ideal_list_intersection(map(first_element,Iso),V,Ord);
         Emb = qd_simp_comp(Emb,V);          Emb = qd_simp_comp(Emb,V);
         Emb = qsort(Emb);          Emb = reverse(qsort(Emb));
         A = ltov(Emb);          A = ltov(Emb); N = length(A);
         N = length(A);          Pre = IsoInt; Post = vector(N+1);
           for ( Post[N] = [1], I = N-1; I >= 1; I-- )
                   Post[I] = ideal_intersection(Post[I+1],A[I][0],V,Ord);
         for ( I = 0; I < N; I++ ) {          for ( I = 0; I < N; I++ ) {
                 if ( !A[I] ) continue;                  Int = ideal_intersection(Pre,Post[I+1],V,Ord);
                 for ( T = [], J = 0; J < N; J++ )  
                         if ( J != I && A[J] ) T = cons(A[J][0],T);  
                 Int = ideal_list_intersection(T,V,Ord);  
                 Int = ideal_intersection(IsoInt,Int,V,Ord);  
                 if ( gb_comp(Int,G) ) A[I] = 0;                  if ( gb_comp(Int,G) ) A[I] = 0;
                   else
                           Pre = ideal_intersection(Pre,A[I][0],V,Ord);
         }          }
         for ( T = [], I = 0; I < N; I++ )          for ( T = [], I = 0; I < N; I++ )
                 if ( A[I] ) T = cons(A[I],T);                  if ( A[I] ) T = cons(A[I],T);
         return reverse(T);          return reverse(T);
 }  }
   
 def remove_redundant_comp(G,Iso,Emb,V,Ord)  def pd_remove_redundant_comp(G,P,V,Ord)
 {  {
         IsoInt = ideal_list_intersection(Iso,V,Ord);          if ( type(First=getopt(first)) == -1 ) First = 0;
           A = ltov(P); N = length(A);
         A = ltov(Emb);  
         N = length(A);  
         for ( I = 0; I < N; I++ ) {          for ( I = 0; I < N; I++ ) {
                 if ( !A[I] ) continue;                  if ( !A[I] ) continue;
                 for ( J = I+1; J < N; J++ )                  for ( J = I+1; J < N; J++ )
                         if ( A[J] && gb_comp(A[I],A[J]) ) A[J] = 0;                          if ( A[J] &&
                                   gb_comp(First?A[I][0]:A[I],First?A[J][0]:A[J]) ) A[J] = 0;
         }          }
           for ( I = 0, T = []; I < N; I++ ) if ( A[I] ) T = cons(A[I],T);
           A = ltov(reverse(T)); N = length(A);
           Pre = [1]; Post = vector(N+1);
           for ( Post[N] = [1], I = N-1; I >= 1; I-- )
                   Post[I] = ideal_intersection(Post[I+1],First?A[I][0]:A[I],V,Ord);
         for ( I = 0; I < N; I++ ) {          for ( I = 0; I < N; I++ ) {
                 if ( !A[I] ) continue;                  Int = ideal_intersection(Pre,Post[I+1],V,Ord);
                 for ( T = [], J = 0; J < N; J++ )  
                         if ( J != I && A[J] ) T = cons(A[J],T);  
                 Int = ideal_list_intersection(cons(IsoInt,T),V,Ord);  
                 if ( gb_comp(Int,G) ) A[I] = 0;                  if ( gb_comp(Int,G) ) A[I] = 0;
                   else
                           Pre = ideal_intersection(Pre,First?A[I][0]:A[I],V,Ord);
         }          }
         for ( T = [], I = 0; I < N; I++ )          for ( T = [], I = 0; I < N; I++ ) if ( A[I] ) T = cons(A[I],T);
                 if ( A[I] ) T = cons(A[I],T);  
         return reverse(T);  
 }  
   
 def remove_redundant_comp_first(G,P,V,Ord)  
 {  
         A = ltov(P);  
         N = length(A);  
         for ( I = 0; I < N; I++ ) {  
                 if ( !A[I] ) continue;  
                 for ( J = I+1; J < N; J++ )  
                         if ( A[J] && gb_comp(A[I][0],A[J][0]) ) A[J] = 0;  
         }  
         for ( I = 0; I < N; I++ ) {  
                 if ( !A[I] ) continue;  
                 for ( T = [], J = 0; J < N; J++ )  
                         if ( J != I && A[J] ) T = cons(A[J][0],T);  
                 Int = ideal_list_intersection(T,V,Ord);  
                 if ( gb_comp(Int,G) ) A[I] = 0;  
         }  
         for ( T = [], I = 0; I < N; I++ )  
                 if ( A[I] ) T = cons(A[I],T);  
         return reverse(T);          return reverse(T);
 }  }
   

Legend:
Removed from v.1.5  
changed lines
  Added in v.1.6

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>