Changeset 350269 in git


Ignore:
Timestamp:
Dec 12, 2014, 6:50:12 PM (9 years ago)
Author:
Oleksandr Motsak <motsak@…>
Branches:
(u'spielwiese', '8e0ad00ce244dfd0756200662572aef8402f13d5')
Children:
11d9d00209c06444540d1707f2976c99061746a96e7a34ced596a7ef94c83c0dc1f13330d700a46e
Parents:
b5640c55a48dd41370dad551f636b332efdb52f7
git-author:
Oleksandr Motsak <motsak@mathematik.uni-kl.de>2014-12-12 18:50:12+01:00
git-committer:
Oleksandr Motsak <motsak@mathematik.uni-kl.de>2014-12-12 18:53:27+01:00
Message:
Fix package/namespace/exportto problem in schreyer.lib (mod_init)

chg: cleanup for s_res_bm
File:
1 edited

Legend:

Unmodified
Added
Removed
  • Singular/LIB/schreyer.lib

    rb5640c r350269  
    4949";
    5050
    51 
    5251static proc prepareSyz( module I, list # )
    5352{
     
    7978  }
    8079
    81 //  DetailedPrint(I);
     80//   Syzextra::DetailedPrint(I);
    8281
    8382  return(I);
     
    9392  {
    9493    v = J[i];
    95     if( leadcomp(v) > c )
     94    if(   Syzextra::leadcomp(v) > c )
    9695    {
    9796      II[i] = v;
     
    118117    vv = 0;
    119118   
    120     while( leadcomp(v) <= c )
     119    while(   Syzextra::leadcomp(v) <= c )
    121120    {
    122121      vv = vv + lead(v);
     
    144143    "Sinit::Input";
    145144    type(M);
    146 //    DetailedPrint(M);
     145//      Syzextra::DetailedPrint(M);
    147146    attrib(M);
    148147  }
     
    157156  }
    158157
    159   def S = MakeInducedSchreyerOrdering(1); // 1 puts history terms to the back
     158  def S =   Syzextra::MakeInducedSchreyerOrdering(1); // 1 puts history terms to the back
    160159  // TODO: NOTE: +1 causes trouble to Singular interpreter!!!???
    161160  setring S; // a new ring with a Schreyer ordering
     
    165164    "Sinit::StartingISRing";
    166165    basering;
    167 //    DetailedPrint(basering);
     166//      Syzextra::DetailedPrint(basering);
    168167  }
    169168
     
    190189    attrib(M);
    191190    attrib(M, "isHomog");
    192 //    DetailedPrint(M);
     191//      Syzextra::DetailedPrint(M);
    193192  }
    194193
     
    200199      transpose( transpose(M) * transpose(MRES) );
    201200      "ERROR: transpose( transpose(M) * transpose(MRES) ) != 0!!!";
    202       m2_end(666);
     201        Syzextra::m2_end(666);
    203202    }
    204203  }
     
    215214  {
    216215    "Sinit::MRES";
    217     DetailedPrint(MRES);
     216      Syzextra::DetailedPrint(MRES);
    218217    attrib(MRES, "isHomog");
    219218    attrib(S);
     
    232231  {
    233232    "Sstep::NextInducedRing";
    234     DetailedPrint(basering);
     233      Syzextra::DetailedPrint(basering);
    235234
    236235    attrib(basering, "InducionLeads");
    237236    attrib(basering, "InducionStart");
    238237
    239     GetInducedData();
     238      Syzextra::GetInducedData();
    240239  }
    241240
     
    246245  def L =  lead(M);
    247246  intvec @V = deg(M[1..ncols(M)]);  @W;  @V;  @W = @V;  attrib(L, "isHomog", @W); 
    248   SetInducedReferrence(L, @RANK, 0);
     247    Syzextra::SetInducedReferrence(L, @RANK, 0);
    249248*/
    250249
     
    255254
    256255  // General setting:
    257 //  SetInducedReferrence(MRES, 0, 0); // limit: 0!
     256//    Syzextra::SetInducedReferrence(MRES, 0, 0); // limit: 0!
    258257  int @l = size(RES);
    259258
     
    287286    deg(M[1..ncols(M)]); // no use of @W :(?
    288287    @RANK;   
    289     DetailedPrint(MRES);
     288      Syzextra::DetailedPrint(MRES);
    290289    attrib(MRES, "isHomog"); @W;
    291290    deg(MRES[1..ncols(MRES)]);
     
    294293 
    295294     
    296   SetInducedReferrence(L, limit, 0);
     295    Syzextra::SetInducedReferrence(L, limit, 0);
    297296 
    298297  def K = prepareSyz(M, @RANK);
    299298//  K;
    300299 
    301 //   attrib(K, "isHomog", @V);   DetailedPrint(K, 1000);
     300//   attrib(K, "isHomog", @V);     Syzextra::DetailedPrint(K, 1000);
    302301
    303302//  pause();
    304303 
    305   K = idPrepare(K, @RANK); // std(K); // ?
     304  K =   Syzextra::idPrepare(K, @RANK); // std(K); // ?
    306305  K = simplify(K, 2);
    307306
     
    310309  module N = separateSyzGB(K, @RANK)[2]; // 1^st syz. module: vectors which start in lower part (comp >= @RANK)
    311310
    312 // "N_0: "; N; DetailedPrint(N, 10);
     311// "N_0: "; N;   Syzextra::DetailedPrint(N, 10);
    313312
    314313//  basering; print(@V); type(N);
     
    328327        MRES;
    329328
    330         "N: "; N; DetailedPrint(N, 10);
    331 
    332         "K:"; K; DetailedPrint(K, 10);
     329        "N: "; N;   Syzextra::DetailedPrint(N, 10);
     330
     331        "K:"; K;   Syzextra::DetailedPrint(K, 10);
    333332
    334333        "RANKS: ", @RANK;
     
    339338        "transpose(N) * transpose(MRES): ";
    340339        transpose(N) * transpose(MRES);
    341         DetailedPrint(module(_), 2);
    342         m2_end(666);
     340          Syzextra::DetailedPrint(module(_), 2);
     341          Syzextra::m2_end(666);
    343342      }
    344343    }
     
    357356  {
    358357    "Sstep::NextSyzOutput: ";
    359     DetailedPrint(N);
     358      Syzextra::DetailedPrint(N);
    360359    attrib(N, "isHomog");
    361360  }
     
    371370"
    372371{
    373   def data = GetInducedData();
     372  def data =   Syzextra::GetInducedData();
    374373           
    375374  if( (!defined(RES)) || (!defined(MRES)) || (typeof(data) != "list") || (size(data) != 2) )
     
    505504  if( size(M) > 0 )
    506505  {
    507     Sort_c_ds(@N);
     506    Syzextra::Sort_c_ds(@N);
    508507
    509508    if( @KERCHECK )
     
    527526
    528527          "ERROR: MySort: wrong sorting in 'MySort': @N != @M!!!";
    529           m2_end(666);
     528            Syzextra::m2_end(666);
    530529        }
    531530      }
     
    647646
    648647      "ERROR: wrong sorting (in SSnit): @N != M!!!";
    649       m2_end(666);
     648        Syzextra::m2_end(666);
    650649    }
    651650
     
    659658
    660659      "ERROR: wrong sorting (in SSnit): @LEAD != LEAD!!!";
    661       m2_end(666);
     660        Syzextra::m2_end(666);
    662661    }
    663662   
     
    666665  M = @N;
    667666 
    668   def TAIL = Tail(M);
     667  def TAIL =   Syzextra::Tail(M);
    669668
    670669  int @RANK = nrows(M); int @SIZE = ncols(M);
     
    681680    @l[3] = list(list("C", @z), list("lp", @wdeg));
    682681    kill @z, @m, @wdeg; // since these vars are ring independent!
    683     def S = ring(@l); // --MakeInducedSchreyerOrdering(1);
     682    def S = ring(@l); // --  Syzextra::MakeInducedSchreyerOrdering(1);
    684683    kill @l;
    685684    setring S; // ring with an easy divisibility test ("C, lex") // or not!???
     
    688687      "SSinit::NewRing(C,lex)?";
    689688      basering;
    690       DetailedPrint(basering);
     689        Syzextra::DetailedPrint(basering);
    691690    }
    692691  } else
     
    749748      transpose( transpose(M) * transpose(MRES) );
    750749      "ERROR: transpose( transpose(M) * transpose(MRES) ) != 0!!!";
    751       m2_end(666);
     750        Syzextra::m2_end(666);
    752751    }
    753752  }
     
    800799    "SSinit::MRES";
    801800    MRES;
    802 //    DetailedPrint(MRES);
     801//      Syzextra::DetailedPrint(MRES);
    803802    attrib(MRES, "isHomog");
    804803    attrib(S);
     
    875874  }
    876875
    877   module SS = ComputeLeadingSyzygyTerms(L);
     876  module SS =   Syzextra::ComputeLeadingSyzygyTerms(L);
    878877
    879878  if( @KERCHECK )
     
    893892    {
    894893      a = L[i];
    895       c = leadcomp(a);
     894      c =   Syzextra::leadcomp(a);
    896895      r = int(c);
    897896
    898       aa = leadmonomial(a);
     897      aa =   Syzextra::leadmonomial(a);
    899898
    900899      M = 0;
     
    904903        b = L[j];
    905904
    906         if( leadcomp(b) == c )
     905        if(   Syzextra::leadcomp(b) == c )
    907906        {
    908           bb = leadmonomial(b);
     907          bb =   Syzextra::leadmonomial(b);
    909908
    910909          M[j] = (lcm(aa, bb) / aa);
     
    930929
    931930        "basering: "; basering;
    932 //        DetailedPrint(basering);
     931//          Syzextra::DetailedPrint(basering);
    933932
    934933        "S: ";  S;
    935 //        DetailedPrint(_, 1);
     934//          Syzextra::DetailedPrint(_, 1);
    936935        "SS: "; SS;
    937 //        DetailedPrint(_, 1);
     936//          Syzextra::DetailedPrint(_, 1);
    938937
    939938        "DIFF: ";
    940939        module(matrix(S) - matrix(SS));
    941 //        DetailedPrint(_, 2);     
     940//          Syzextra::DetailedPrint(_, 2);     
    942941        print(matrix(S) - matrix(SS));
    943         m2_end(666);
     942          Syzextra::m2_end(666);
    944943      }
    945944    }
     
    994993  }
    995994
    996   module SS = Compute2LeadingSyzygyTerms(L);
     995  module SS =   Syzextra::Compute2LeadingSyzygyTerms(L);
    997996
    998997  if( @DEBUG )
     
    10091008        transpose( transpose(SS) * transpose(L) );
    10101009        "ERROR: transpose( transpose(SS) * transpose(L) ) != 0!!!";
    1011         m2_end(666);
     1010          Syzextra::m2_end(666);
    10121011      }
    10131012    }
     
    10381037      a = L[i];
    10391038  //    "a: ", a;
    1040       c = leadcomp(a);
     1039      c =   Syzextra::leadcomp(a);
    10411040      r = int(c);
    10421041
    1043       aa = leadmonomial(a);
     1042      aa =   Syzextra::leadmonomial(a);
    10441043
    10451044      M = 0;
     
    10501049  //      "b: ", b;
    10511050
    1052         if( leadcomp(b) == c )
     1051        if(   Syzextra::leadcomp(b) == c )
    10531052        {
    1054           bb = leadmonomial(b);
     1053          bb =   Syzextra::leadmonomial(b);
    10551054          @lcm = lcm(aa, bb);
    10561055
     
    10931092          transpose( transpose(S) * transpose(L) );
    10941093          "ERROR: transpose( transpose(S) * transpose(L) ) != 0!!!";
    1095           m2_end(666);
     1094            Syzextra::m2_end(666);
    10961095        }
    10971096      }
     
    11021101      "ERROR: SSCompute2LeadingSyzygyTerms: size(S) != size(SS)";
    11031102
    1104       "basering: "; basering; //      DetailedPrint(basering);
     1103      "basering: "; basering; //        Syzextra::DetailedPrint(basering);
    11051104
    11061105      "S: ";  S;
    1107 //      DetailedPrint(S, 2);
     1106//        Syzextra::DetailedPrint(S, 2);
    11081107      "SS: "; SS;
    1109 //      DetailedPrint(SS, 2);
    1110       m2_end(666);
     1108//        Syzextra::DetailedPrint(SS, 2);
     1109        Syzextra::m2_end(666);
    11111110    }   
    11121111
     
    11181117
    11191118        "basering: ";  basering;
    1120 //        DetailedPrint(basering);
     1119//          Syzextra::DetailedPrint(basering);
    11211120
    11221121        "lead(S ): "; lead(S );
    1123 //        DetailedPrint(_, 2);
     1122//          Syzextra::DetailedPrint(_, 2);
    11241123        "lead(SS): "; lead(SS);
    1125 //        DetailedPrint(_, 2);
     1124//          Syzextra::DetailedPrint(_, 2);
    11261125
    11271126        "DIFF: ";
    11281127        print( matrix(lead(S)) - matrix(lead(SS))  );
    11291128        module(matrix(lead(S)) - matrix(lead(SS)));
    1130 //        DetailedPrint(_ , 4);
    1131         m2_end(666);
     1129//          Syzextra::DetailedPrint(_ , 4);
     1130          Syzextra::m2_end(666);
    11321131      }
    11331132
     
    11351134      if( @TAILREDSYZ )
    11361135      {
    1137       if( size(module(matrix(Tail(S)) - matrix(Tail(SS)))) > 0 )
     1136      if( size(module(matrix(  Syzextra::Tail(S)) - matrix(  Syzextra::Tail(SS)))) > 0 )
    11381137      {
    11391138        "ERROR: SSCompute2LeadingSyzygyTerms: Tail(S) != Tail(SS) ";
    11401139
    11411140        "basering: ";  basering;
    1142 //        DetailedPrint(basering);
    1143 
    1144         "Tail(S ): "; Tail(S );
    1145 //        DetailedPrint(_, 2);
    1146         "Tail(SS): "; Tail(SS);
    1147 //        DetailedPrint(_, 2);
     1141//          Syzextra::DetailedPrint(basering);
     1142
     1143        "Tail(S ): ";   Syzextra::Tail(S );
     1144//          Syzextra::DetailedPrint(_, 2);
     1145        "Tail(SS): ";   Syzextra::Tail(SS);
     1146//          Syzextra::DetailedPrint(_, 2);
    11481147
    11491148        "DIFF: ";
    1150         module( matrix(Tail(S)) - matrix(Tail(SS)) );
    1151 //        DetailedPrint(_, 4);
    1152         print( matrix(Tail(S)) - matrix(Tail(SS)) );
    1153         m2_end(666);
     1149        module( matrix(  Syzextra::Tail(S)) - matrix(  Syzextra::Tail(SS)) );
     1150//          Syzextra::DetailedPrint(_, 4);
     1151        print( matrix(  Syzextra::Tail(S)) - matrix(  Syzextra::Tail(SS)) );
     1152          Syzextra::m2_end(666);
    11541153      }
    11551154      }
     
    11571156  }
    11581157 
    1159   module S2 = Tail(SS);
     1158  module S2 =   Syzextra::Tail(SS);
    11601159  SS = lead(SS); // (C,lp) on base ring!
    11611160
     
    11681167      type(S2);
    11691168      L;
    1170       m2_end(666);
     1169        Syzextra::m2_end(666);
    11711170    }
    11721171  } 
     
    12291228  if( @DEBUG && (syzterm != 0) )
    12301229  {
    1231     def @@c = leadcomp(syzterm); int @@r = int(@@c);
    1232     def @@product = leadmonomial(syzterm) * L[@@r];
     1230    def @@c =   Syzextra::leadcomp(syzterm); int @@r = int(@@c);
     1231    def @@product =   Syzextra::leadmonomial(syzterm) * L[@@r];
    12331232
    12341233    if( @@product != product)
     
    12361235      "product: ", product, ", @@product: ", @@product;
    12371236      "ERROR: 'syzterm' results in wrong product !!!???";
    1238       m2_end(666);
     1237        Syzextra::m2_end(666);
    12391238    }
    12401239  }
     
    12421241  if( typeof(#[1]) == "module" )
    12431242  {
    1244     vector my = FindReducer(product, syzterm, L/*, T*/, #[1]);
     1243    vector my =   Syzextra::FindReducer(product, syzterm, L/*, T*/, #[1]);
    12451244  } else
    12461245  {
    1247     vector my = FindReducer(product, syzterm, L/*, T*/);
     1246    vector my =   Syzextra::FindReducer(product, syzterm, L/*, T*/);
    12481247  }
    12491248 
     
    12511250  if( @KERCHECK )
    12521251  {
    1253     bigint c = leadcomp(product); int r = int(c);
     1252    bigint c =   Syzextra::leadcomp(product); int r = int(c);
    12541253
    12551254    def a, b, bb;
     
    12621261      a = L[k];
    12631262      // with the same mod. component
    1264       if( leadcomp(a) == c )
     1263      if(   Syzextra::leadcomp(a) == c )
    12651264      {
    1266         b = - (leadmonomial(product) / leadmonomial(L[k]));
     1265        b = - (  Syzextra::leadmonomial(product) /   Syzextra::leadmonomial(L[k]));
    12671266
    12681267        // which divides the product: looking for the 1st appropriate one!
     
    13021301    if( my != nf )
    13031302    {
    1304       "ERROR in FindReducer => ", my, " != nf: ", nf;
    1305       m2_end(666);
     1303      "ERROR in   Syzextra::FindReducer => ", my, " != nf: ", nf;
     1304        Syzextra::m2_end(666);
    13061305    }
    13071306  }
     
    13611360  if( @SYZCHECK && (syzterm != 0) )
    13621361  {
    1363     def @@c = leadcomp(syzterm); int @@r = int(@@c);
    1364     poly @@m = leadmonomial(syzterm); def @@t = L[@@r];
     1362    def @@c =   Syzextra::leadcomp(syzterm); int @@r = int(@@c);
     1363    poly @@m =   Syzextra::leadmonomial(syzterm); def @@t = L[@@r];
    13651364
    13661365    if( (@@m != m) || (@@t != t))
     
    13691368      "@@m: ", @@m, ", @@t: ", @@t;
    13701369      "ERROR: 'syzterm' results in wrong m * t !!!";
    1371       m2_end(666);
     1370        Syzextra::m2_end(666);
    13721371    }
    13731372  }
     
    13751374  if( typeof(#[1]) == "module" )
    13761375  {
    1377     vector ss = ReduceTerm(m, t, syzterm, L, T, #[1]);
     1376    vector ss =   Syzextra::ReduceTerm(m, t, syzterm, L, T, #[1]);
    13781377  } else
    13791378  {
    1380     vector ss = ReduceTerm(m, t, syzterm, L, T);
     1379    vector ss =   Syzextra::ReduceTerm(m, t, syzterm, L, T);
    13811380  }
    13821381
     
    13951394      if( size(s) != 0 )
    13961395      {
    1397         poly @b = leadmonomial(s);
    1398 
    1399         def @c = leadcomp(s); int k = int(@c);
     1396        poly @b =   Syzextra::leadmonomial(s);
     1397
     1398        def @c =   Syzextra::leadcomp(s); int k = int(@c);
    14001399
    14011400        if( @TREEOUTPUT ){ "\CHILD{", (s), "}{", ( @b*L[k]), "}"; }
     
    14071406    if( s != ss )
    14081407    {
    1409       "ERROR in ReduceTerm => old: ", s, " != ker: ", ss;
     1408      "ERROR in   Syzextra::ReduceTerm => old: ", s, " != ker: ", ss;
    14101409      "m: ", m;
    14111410      "t: ", t;
    14121411      "syzterm: ", syzterm;
    14131412       L; T; #;
    1414       m2_end(666);
     1413        Syzextra::m2_end(666);
    14151414    } 
    14161415  }
     
    14601459  if( typeof(#[1]) == "module" )
    14611460  {
    1462     vector ss = TraverseTail(m, @tail, L, T, #[1]);
     1461    vector ss =   Syzextra::TraverseTail(m, @tail, L, T, #[1]);
    14631462  } else
    14641463  {
    1465     vector ss = TraverseTail(m, @tail, L, T);
     1464    vector ss =   Syzextra::TraverseTail(m, @tail, L, T);
    14661465  }
    14671466
     
    14831482    if( s != ss )
    14841483    {
    1485       "ERROR in TraverseTail => old: ", s, " != ker: ", ss;
     1484      "ERROR in   Syzextra::TraverseTail => old: ", s, " != ker: ", ss;
    14861485      "m: ", m;
    14871486      "@tail: ", @tail;
    14881487      L; T; #;
    1489       m2_end(666);
     1488        Syzextra::m2_end(666);
    14901489    } 
    14911490  }
     
    15361535  if( typeof(#[1]) == "module" )
    15371536  {
    1538     def my = SchreyerSyzygyNF(syz_lead, syz_2, L, T, #[1]);
     1537    def my =   Syzextra::SchreyerSyzygyNF(syz_lead, syz_2, L, T, #[1]);
    15391538  } else
    15401539  {
    1541     def my = SchreyerSyzygyNF(syz_lead, syz_2, L, T);
     1540    def my =   Syzextra::SchreyerSyzygyNF(syz_lead, syz_2, L, T);
    15421541  }
    15431542
     
    15461545    int @TREEOUTPUT  = attrib(basering, "TREEOUTPUT");
    15471546   
    1548     def spoly = leadmonomial(syz_lead) * T[int(leadcomp(syz_lead))]
    1549               + leadmonomial(syz_2)    * T[int(leadcomp(syz_2))];
     1547    def spoly =   Syzextra::leadmonomial(syz_lead) * T[int(  Syzextra::leadcomp(syz_lead))]
     1548              +   Syzextra::leadmonomial(syz_2)    * T[int(  Syzextra::leadcomp(syz_2))];
    15501549
    15511550    vector @tail = syz_2;
     
    15551554    while (size(spoly) > 0)
    15561555    {
    1557       syz_2 = SSFindReducer(lead(spoly), 0, L, #); spoly = Tail(spoly);
     1556      syz_2 = SSFindReducer(lead(spoly), 0, L, #); spoly =   Syzextra::Tail(spoly);
    15581557
    15591558      if( size(syz_2) != 0)
    15601559      {         
    1561         @b = leadmonomial(syz_2);
    1562         k =  int(leadcomp(syz_2));
     1560        @b =   Syzextra::leadmonomial(syz_2);
     1561        k =  int(  Syzextra::leadcomp(syz_2));
    15631562       
    15641563        if( @TREEOUTPUT ){ "\CHILD{", (syz_2), "}{", ( lead(spoly)), "}"; }
     
    15721571    if( my != @tail )
    15731572    {
    1574       "ERROR in SchreyerSyzygyNF => old: ", @tail, " != ker: ", my;
     1573      "ERROR in   Syzextra::SchreyerSyzygyNF => old: ", @tail, " != ker: ", my;
    15751574     
    15761575      "syzygy_lead: ", syz_lead;
     
    15781577     
    15791578      L; T; #;
    1580       m2_end(666);
     1579        Syzextra::m2_end(666);
    15811580    }
    15821581  }
     
    15981597static proc SSComputeSyzygy(def L, def T)
    15991598{
    1600 //  rtimer, "***TIMESNAP0 for ComputeSyzygy(L,T): on level: [",attrib(basering,"SYZNUMBER"),"] :: t: ", timer, ", r: ", rtimer;
     1599//  rtimer, "***TIMESNAP0 for   Syzextra::ComputeSyzygy(L,T): on level: [",attrib(basering,"SYZNUMBER"),"] :: t: ", timer, ", r: ", rtimer;
    16011600  int @DEBUG    = attrib(basering, "DEBUG");
    16021601  int @KERCHECK = attrib(basering, "KERCHECK");
     
    16071606    "SSComputeSyzygy::Input";
    16081607    "basering: ", basering; attrib(basering);
    1609 //    DetailedPrint(basering);
     1608//      Syzextra::DetailedPrint(basering);
    16101609
    16111610//    "iCompShift: ", iCompShift;
     
    16161615
    16171616//  option(prot);
    1618 //  rtimer, "***TIME for ComputeSyzygy(L,T): on level: [",attrib(basering,"SYZNUMBER"),"] :: t: ", timer, ", r: ", rtimer;
    1619   list @res=ComputeSyzygy(L,T);
    1620 //  rtimer, "***TIME for ComputeSyzygy(L,T): on level: [",attrib(basering,"SYZNUMBER"),"] :: t: ", timer, ", r: ", rtimer;
     1617//  rtimer, "***TIME for   Syzextra::ComputeSyzygy(L,T): on level: [",attrib(basering,"SYZNUMBER"),"] :: t: ", timer, ", r: ", rtimer;
     1618  list @res=  Syzextra::ComputeSyzygy(L,T);
     1619//  rtimer, "***TIME for   Syzextra::ComputeSyzygy(L,T): on level: [",attrib(basering,"SYZNUMBER"),"] :: t: ", timer, ", r: ", rtimer;
    16211620//  option(noprot); // TODO: restore!
    16221621
     
    16601659      type(LL);
    16611660      type(@LL);
    1662       m2_end(666);
     1661        Syzextra::m2_end(666);
    16631662    }
    16641663
     
    16711670      type(LL);
    16721671      type(@LL);
    1673       m2_end(666);
     1672        Syzextra::m2_end(666);
    16741673    }
    16751674
     
    16971696        if( !@IGNORETAILS )
    16981697        {
    1699           c = leadcomp(a); r = int(c); aa = leadmonomial(a);
     1698          c =   Syzextra::leadcomp(a); r = int(c); aa =   Syzextra::leadmonomial(a);
    17001699         
    17011700          if( @TREEOUTPUT ){ "\ROOT{", (lead(a)), "}"; }
     
    17091708            if( @LEAD2SYZ ) // with the 2nd syz. term:
    17101709            {     
    1711               a2 = LL2[k]; c = leadcomp(a2); r = int(c); aa = leadmonomial(a2);
     1710              a2 = LL2[k]; c =   Syzextra::leadcomp(a2); r = int(c); aa =   Syzextra::leadmonomial(a2);
    17121711             
    17131712              if( @TREEOUTPUT ){ "\CHILD{", (lead(a2)), "}{", ( aa*L[r]), "}"; }
     
    17361735              {
    17371736                "ERROR in SSComputeSyzygy: could not find the 2nd syzygy term during the hybrid NF!!!";
    1738                 m2_end(666);
     1737                  Syzextra::m2_end(666);
    17391738              }
    17401739            }
     
    17681767//              transpose( transpose(N) * transpose(MRES) );             
    17691768         
    1770           m2_end(666);
     1769            Syzextra::m2_end(666);
    17711770        }
    17721771
     
    17851784      type(TT);
    17861785      type(@TT);
    1787       m2_end(666);
     1786        Syzextra::m2_end(666);
    17881787    }
    17891788
     
    17981797      type(LL);
    17991798      type(@LL);
    1800       m2_end(666);
     1799        Syzextra::m2_end(666);
    18011800    }   
    18021801   
     
    18191818  }
    18201819
    1821 //  rtimer, "***TIMESNAP1 for ComputeSyzygy(L,T): on level: [",attrib(basering,"SYZNUMBER"),"] :: t: ", timer, ", r: ", rtimer;
     1820//  rtimer, "***TIMESNAP1 for   Syzextra::ComputeSyzygy(L,T): on level: [",attrib(basering,"SYZNUMBER"),"] :: t: ", timer, ", r: ", rtimer;
    18221821  return (@SYZ, @LL, @TT);
    18231822}
     
    18411840  def L =  lead(M);
    18421841  intvec @V = deg(M[1..ncols(M)]);  @W;  @V;  @W = @V;  attrib(L, "isHomog", @W); 
    1843   SetInducedReferrence(L, @RANK, 0);
     1842    Syzextra::SetInducedReferrence(L, @RANK, 0);
    18441843*/
    18451844
     
    18501849
    18511850  // General setting:
    1852 //  SetInducedReferrence(MRES, 0, 0); // limit: 0!
     1851//    Syzextra::SetInducedReferrence(MRES, 0, 0); // limit: 0!
    18531852  int @l = size(RES);
    18541853
     
    18831882    @V;
    18841883    @RANK;
    1885 //    DetailedPrint(MRES);
     1884//      Syzextra::DetailedPrint(MRES);
    18861885    attrib(MRES, "isHomog");
    18871886  }
     
    19071906        "MRES", MRES;
    19081907
    1909         "N: "; N; // DetailedPrint(N, 2);
    1910 
    1911         "LL:"; LL; // DetailedPrint(LL, 1);
    1912         "TT:"; TT; // DetailedPrint(TT, 10);
     1908        "N: "; N; //   Syzextra::DetailedPrint(N, 2);
     1909
     1910        "LL:"; LL; //   Syzextra::DetailedPrint(LL, 1);
     1911        "TT:"; TT; //   Syzextra::DetailedPrint(TT, 10);
    19131912
    19141913        "RANKS: ", @RANK;
     
    19191918        "transpose(N) * transpose(MRES): ";
    19201919        transpose(N) * transpose(MRES);
    1921         // DetailedPrint(module(_), 2);
    1922         m2_end(666);
     1920        //   Syzextra::DetailedPrint(module(_), 2);
     1921          Syzextra::m2_end(666);
    19231922      }
    19241923    }
     
    19471946    "SSstep::NextSyzOutput: ";
    19481947    N;
    1949 //    DetailedPrint(N);
     1948//      Syzextra::DetailedPrint(N);
    19501949    attrib(N);
    19511950  }
     
    19691968
    19701969  /// TODO!
    1971 //  def data = GetInducedData();
     1970//  def data =   Syzextra::GetInducedData();
    19721971
    19731972  if( (!defined(RES)) || (!defined(MRES)) ) /* || (typeof(data) != "list") || (size(data) != 2) */
     
    21832182}
    21842183
    2185 static proc loadme()
     2184static proc mod_init()
    21862185{
    21872186  int @DEBUG = 0; // !system("with", "ndebug"); //    "om_ndebug?: ", system("with", "om_ndebug");
    21882187
    2189   if( @DEBUG )  {    listvar(Syzextra);    listvar(Schreyer);    listvar(Top);  }
    2190 
    2191   if( !defined(Schreyer::ComputeResolution) )
    2192   {
    2193     load("syzextra.so");
    2194      
     2188  if( @DEBUG )  {    listvar(Top);  }
     2189
     2190  if( !defined(SRES) )
     2191  {
     2192      load("syzextra.so");
     2193
    21952194      if( @DEBUG ){        listvar(Syzextra);      }
    21962195     
    2197 //      exportto(Top, Syzextra::ClearContent); //      exportto(Top, Syzextra::ClearDenominators);     exportto(Schreyer, Syzextra::noop);
    2198 //      exportto(Schreyer, Syzextra::leadrawexp); //      exportto(Schreyer, Syzextra::ISUpdateComponents);
    2199 //      exportto(Schreyer, Syzextra::GetAMData);//      exportto(Schreyer, Syzextra::SetSyzComp);
    2200 //      exportto(Schreyer, Syzextra::MakeSyzCompOrdering); //      exportto(Schreyer, Syzextra::reduce_syz);//      exportto(Schreyer, Syzextra::p_Content);
    2201     exportto(Schreyer, Syzextra::DetailedPrint);
    2202     exportto(Schreyer, Syzextra::m2_end);
    2203     exportto(Schreyer, Syzextra::leadmonomial);
    2204     exportto(Schreyer, Syzextra::leadcomp);
    2205     exportto(Schreyer, Syzextra::SetInducedReferrence);
    2206     exportto(Schreyer, Syzextra::GetInducedData);
    2207     exportto(Schreyer, Syzextra::MakeInducedSchreyerOrdering);
    2208     exportto(Schreyer, Syzextra::idPrepare);
    2209    
    2210     exportto(Schreyer, Syzextra::ProfilerStart);   exportto(Schreyer, Syzextra::ProfilerStop);
    2211     exportto(Schreyer, Syzextra::NumberStatsInit); exportto(Schreyer, Syzextra::NumberStatsPrint);
    2212    
    2213     exportto(Schreyer, Syzextra::Tail);
    2214     exportto(Schreyer, Syzextra::ComputeLeadingSyzygyTerms);
    2215     exportto(Schreyer, Syzextra::Compute2LeadingSyzygyTerms);
    2216     exportto(Schreyer, Syzextra::Sort_c_ds);
    2217    
    2218     exportto(Schreyer, Syzextra::FindReducer);
    2219 
    2220     exportto(Schreyer, Syzextra::ReduceTerm);
    2221     exportto(Schreyer, Syzextra::TraverseTail);
    2222    
    2223     exportto(Schreyer, Syzextra::SchreyerSyzygyNF);
    2224     exportto(Schreyer, Syzextra::ComputeSyzygy);
    2225     exportto(Schreyer, Syzextra::ComputeResolution);
     2196//      exportto(Top,   Syzextra::ClearContent); //      exportto(Top,   Syzextra::ClearDenominators);     exportto(Schreyer,   Syzextra::noop);
     2197//      exportto(Schreyer,   Syzextra::leadrawexp); //      exportto(Schreyer,   Syzextra::ISUpdateComponents);
     2198//      exportto(Schreyer,   Syzextra::GetAMData);//      exportto(Schreyer,   Syzextra::SetSyzComp);
     2199//      exportto(Schreyer,   Syzextra::MakeSyzCompOrdering); //      exportto(Schreyer,   Syzextra::reduce_syz);//      exportto(Schreyer,   Syzextra::p_Content);
     2200
     2201//    exportto(Schreyer,   Syzextra::DetailedPrint);
     2202//    exportto(Schreyer,   Syzextra::m2_end);
     2203//    exportto(Schreyer,   Syzextra::leadmonomial);
     2204//    exportto(Schreyer,   Syzextra::leadcomp);
     2205//    exportto(Schreyer,   Syzextra::SetInducedReferrence);
     2206//    exportto(Schreyer,   Syzextra::GetInducedData);
     2207//    exportto(Schreyer,   Syzextra::MakeInducedSchreyerOrdering);
     2208//    exportto(Schreyer,   Syzextra::idPrepare);   
     2209//    exportto(Schreyer,   Syzextra::ProfilerStart);   exportto(Schreyer,   Syzextra::ProfilerStop);
     2210//    exportto(Schreyer,   Syzextra::NumberStatsInit); exportto(Schreyer,   Syzextra::NumberStatsPrint);   
     2211//    exportto(Schreyer,   Syzextra::Tail);
     2212//    exportto(Schreyer,   Syzextra::ComputeLeadingSyzygyTerms);
     2213//    exportto(Schreyer,   Syzextra::Compute2LeadingSyzygyTerms);
     2214//    exportto(Schreyer,   Syzextra::Sort_c_ds);   
     2215//    exportto(Schreyer,   Syzextra::FindReducer);
     2216//    exportto(Schreyer,   Syzextra::ReduceTerm);
     2217//    exportto(Schreyer,   Syzextra::TraverseTail);   
     2218//    exportto(Schreyer,   Syzextra::SchreyerSyzygyNF);
     2219//    exportto(Schreyer,   Syzextra::ComputeSyzygy);
     2220//    exportto(Schreyer,   Syzextra::ComputeResolution);
    22262221   
    22272222    // TODO: SSres - return SRESOLUTION?
     
    22342229    system("install","SRES","list", SRES_list, 1); // will never work :(((
    22352230
    2236 //    exportto(Top, DetailedPrint);
    2237 //    exportto(Top, s_res); // GetInducedData);
     2231//    exportto(Top, s_res); //   Syzextra::GetInducedData);
    22382232
    22392233    if( @DEBUG )    {      listvar(Top);      listvar(Schreyer);    }
    22402234  }
    2241  
    2242   mod_assure_load();
    2243 }
    2244 
    2245 
    2246 
    2247 static proc mod_assure_load()
    2248 {
    2249   if( !defined(Schreyer::ComputeResolution) )
    2250   {
    2251     "ERROR: Sorry but you seems to be missing the necessary dynamic module (syzextra.so)!";
    2252 //    $
    2253     // m2_end(666); // :(
    2254   }
    2255 }
    2256 
    2257 static proc mod_init()
    2258 {
    2259   loadme();
    22602235}
    22612236
     
    23722347   
    23732348    "ERROR: There were some wrong betti numbers... ";
    2374 //    m2_end(666);   
     2349//      Syzextra::m2_end(666);   
    23752350  } else
    23762351  {
     
    24712446  {
    24722447    "ERROR: non-square M!!!";
    2473     m2_end(666);
     2448      Syzextra::m2_end(666);
    24742449  }
    24752450
     
    24812456    "MRES': "; M; print(M);
    24822457
    2483     m2_end(666);
     2458      Syzextra::m2_end(666);
    24842459  }
    24852460//  "MRES': "; M; print(M);
     
    24882463  {
    24892464    "ERROR: wrong starting zero module!!!";
    2490     m2_end(666);
     2465      Syzextra::m2_end(666);
    24912466  }
    24922467
     
    25212496 
    25222497  option(redSB); option(redTail);
    2523   if(@PROFILE){ProfilerStart(@prof);}
     2498  if(@PROFILE){  Syzextra::ProfilerStart(@prof);}
    25242499  timer=0;rtimer=0;def R=SSres(I,0);@m=rtimer;
    2525   if(@PROFILE){ProfilerStop();}
     2500  if(@PROFILE){  Syzextra::ProfilerStop();}
    25262501  setring R;module M;list @l=list();@l[size(RES)-1]=list();r=nrows(RES[1]);for(i=2;i<=size(RES);i++){M=RES[i];rr=nrows(M);if((r>0)&&(size(M)>0)&&(r<rr)){M=transpose(M);M=M[(r+1)..ncols(M)];M=transpose(M);RES[i]=M;};r=rr;@l[i-1] = M;};resolution RR=@l;RR=minres(RR);def S=betti(RR,1);@t=rtimer;
    2527 //  DetailedPrint(RR,0);
     2502//    Syzextra::DetailedPrint(RR,0);
    25282503  SCheck(R);
    25292504  StopAddResTest(RR, S, @t,@m);
     
    25452520"
    25462521{
    2547   int @prot = (find(option(),"prot") != 0) && (defined(NumberStatsInit)) && (defined(NumberStatsPrint));
     2522  int @prot = (find(option(),"prot") != 0) && (defined(  Syzextra::NumberStatsInit)) && (defined(  Syzextra::NumberStatsPrint));
    25482523  def @save = basering;
    25492524 
     
    25592534 
    25602535  int @l = size(RES);
    2561   if(@prot){ NumberStatsInit(); }
    2562   def rsltn = ComputeResolution(RES[@l], LRES[@l], TRES[@l], l);
    2563   if(@prot){ NumberStatsPrint("Number statistic for s_res with ComputeResolution"); }
     2536  if(@prot){   Syzextra::NumberStatsInit(); }
     2537  def rsltn =   Syzextra::ComputeResolution(RES[@l], LRES[@l], TRES[@l], l);
     2538  if(@prot){   Syzextra::NumberStatsPrint("Number statistic for s_res with   Syzextra::ComputeResolution"); }
    25642539 
    25652540  if( !@RINGCHANGE )
     
    25812556  print(betti(rs, 1)); //minimal betties
    25822557  print(minres(rs));
    2583   kill rs;
    2584  
    2585   def  rs = s_res_bm(M);
    2586   print(rs);
    2587   print(betti(rs, 0)); // non-minimal betties
    2588   print(SRES_list(rs));
    2589   print(betti(rs, 1)); //minimal betties
    2590   print(minres(rs));
    2591 
    2592 }
    2593 
    2594 proc s_res_bm(def I)
    2595 {
    2596   int @prot = (find(option(),"prot") != 0) && (defined(NumberStatsInit)) && (defined(NumberStatsPrint));
     2558}
     2559
     2560static proc s_res_bm(def I)
     2561{
     2562  int @prot = (find(option(),"prot") != 0) && (defined(  Syzextra::NumberStatsInit)) && (defined(  Syzextra::NumberStatsPrint));
    25972563  def @save = basering;
    25982564 
     
    26042570  }
    26052571  int t,tt,sum;
    2606   sum = 0;
    26072572 
    26082573t=rtimer;def R=SSinit(I);tt=rtimer;
    26092574
    2610   "%% Setup(SSinit) TIME:", tt - t;
    2611   sum = sum + (tt-t);
     2575  "%% Setup(SSinit) TIME:", tt - t; // if(@prot){ } ?
     2576  int sum = (tt-t);
    26122577
    26132578  if( @RINGCHANGE ){ setring R; }
     
    26232588  while ( 1 )
    26242589  {
    2625     if(@prot){ NumberStatsInit(); }
     2590    if(@prot){   Syzextra::NumberStatsInit(); }
    26262591
    26272592//  SSstep():
     
    26292594   
    26302595    @l = @l + 1;
    2631     if(@prot){ NumberStatsPrint("Number statistic for SSComputeSyzygy["+string(@l-2)+"]"); }
    2632     "%% SSstep[",@l-2, "] TIME:", tt - t;   
     2596    if(@prot){   Syzextra::NumberStatsPrint("Number statistic for SSComputeSyzygy["+string(@l-2)+"]"); }
     2597    "%% SSstep[",@l-2, "] TIME:", tt - t;  // if(@prot){ } ?
    26332598    sum = sum + (tt-t);
    26342599   
     
    26392604  }
    26402605 
    2641   "%% Whole Resolution (with "+string(@l)+"syzygies) TIME:", sum;
     2606  "%% Whole Resolution (with "+string(@l)+"syzygies) TIME:", sum;  // if(@prot){ } ?
    26422607  resolution rsltn = list(RES[2..size(RES)]);
    2643  
    2644   print(rsltn);
    2645   "Non-minimal betties: ";
    2646   print(betti(rsltn, 0), "betti");
    2647   "Minimal betties: ";
    2648   print(betti(rsltn, 1), "betti");
    26492608 
    26502609  if( !@RINGCHANGE )
     
    26632622  int @l = size(RES); //   def M =  RES[@l];
    26642623  module N, LL, TT; (N, LL, TT) = SSComputeSyzygy(LRES[@l], TRES[@l]);
    2665   SSYZ ret; ret.r = R; ret.szg = N; // Schreyer::ComputeResolution(RES[2], LRES[2], TRES[2], 0);
     2624  SSYZ ret; ret.r = R; ret.szg = N; // Schreyer::  Syzextra::ComputeResolution(RES[2], LRES[2], TRES[2], 0);
    26662625  return (ret);
    26672626}
     
    26852644 
    26862645  option(redSB); option(redTail);
    2687   if(@PROFILE){ProfilerStart(@prof);}
    2688   timer=0;rtimer=0;def R=SSinit(I);setring R;def RR=ComputeResolution(RES[2], LRES[2], TRES[2], 0);
     2646  if(@PROFILE){  Syzextra::ProfilerStart(@prof);}
     2647  timer=0;rtimer=0;def R=SSinit(I);setring R;def RR=  Syzextra::ComputeResolution(RES[2], LRES[2], TRES[2], 0);
    26892648@m=rtimer;
    2690   if(@PROFILE){ProfilerStop();}
     2649  if(@PROFILE){  Syzextra::ProfilerStop();}
    26912650RR=minres(RR); def S=betti(RR,1);@t=rtimer;
    2692 //  DetailedPrint(RR,0);  print(RR);  print(S, "betti");
     2651//    Syzextra::DetailedPrint(RR,0);  print(RR);  print(S, "betti");
    26932652  SCheck(R);
    26942653  StopAddResTest(RR, S, @t,@m);
     
    27862745static proc testSimple(list #)
    27872746{
    2788   mod_assure_load();
    2789 
    27902747  def DEBUG = 0;
    27912748  if(size(#) > 0) { DEBUG = #[1]; }
Note: See TracChangeset for help on using the changeset viewer.