Changeset 0f987ab in git


Ignore:
Timestamp:
May 8, 2018, 3:03:58 PM (6 years ago)
Author:
Karim Abou Zeid <karim23697@…>
Branches:
(u'spielwiese', 'ec94ef7a30b928574c0c3daf41f6804dff5f6b69')
Children:
0dc748aa220932595ba06044cb85807f30b3c2fe
Parents:
458174a01ed388fe1f5bcb6624bc7f13f0223860e734084ec7bec9299f110c52697b1fd638b90bec
Message:
Merge branch 'spielwiese' into stable
Files:
32 edited

Legend:

Unmodified
Added
Removed
  • Singular/LIB/fpaprops.lib

    re734084 r0f987ab  
    1818
    1919PROCEDURES:
    20   lpNoetherian(<GB>);     check whether A/<GB> is (left/right) noetherian
     20  lpNoetherian(<GB>);     check whether A/<LM(GB)> is (left/right) Noetherian
    2121  lpIsSemiPrime(<GB>);    check whether A/<LM(GB)> is semi prime
    2222  lpIsPrime(<GB>);        check whether A/<LM(GB)> is prime
     
    3333"USAGE: lpNoetherian(G); G an ideal in a Letterplace ring
    3434RETURN: int
    35 @*      0 not noetherian
    36 @*      1 left noetherian
    37 @*      2 right noetherian
    38 @*      3 noetherian
    39 PURPOSE: Check whether A/<G> is (left/right) noetherian
     35@*      0 not Noetherian
     36@*      1 left Noetherian
     37@*      2 right Noetherian
     38@*      3 Noetherian
     39@*      4 weak Noetherian
     40PURPOSE: Check whether the monomial algebra A/<LM(G)> is (left/right) noetherian
    4041ASSUME: - basering is a Letterplace ring
    4142@*      - G is a Groebner basis
     43THEORY: lpNoetherian works with the monomial algebra A/<LM(G)>.
     44If it gives an affirmative answer for one of the properties, then it
     45holds for both A/<LM(G)> and A/<G>. However, a negative answer applies
     46only to A/<LM(G)> and not necessarily to A/<G>.
     47NOTE: Weak Noetherian means that two-sided ideals in A/<LM(G)> satisfy
     48the acc (ascending chain condition).
    4249"
    4350{
     
    9198  intvec visited;
    9299  visited[ncols(UG)] = 0;
    93   int inFlag, outFlag;
     100  int inFlag, outFlag, inOutFlag;
    94101  for (int v = 1; v <= ncols(UG) && (inFlag + outFlag) != 3; v++) {
    95     int inOutFlags = inOrOutCommingEdgeInCycle(UG, v, visited, 0);
     102    int inOutFlags = inOutCommingEdgesInCycles(UG, v, visited, 0);
    96103    if (inOutFlags == 1) {
    97104      inFlag = 1;
    98105    }
    99106    if (inOutFlags == 2) {
    100       outFlag = 2;
     107      outFlag = 1;
    101108    }
    102109    if (inOutFlags == 3) {
    103110      inFlag = 1;
    104       outFlag = 2;
     111      outFlag = 1;
     112    }
     113    if (inOutFlags == 4) {
     114      inOutFlag = 1;
     115    }
     116    if (inOutFlags == 5) {
     117      inFlag = 1;
     118      inOutFlag = 1;
     119    }
     120    if (inOutFlags == 6) {
     121      outFlag = 1;
     122      inOutFlag = 1;
     123    }
     124    if (inOutFlags == 7) {
     125      inFlag = 1;
     126      outFlag = 1;
     127      inOutFlag = 1;
    105128    }
    106129    kill inOutFlags;
    107130  } kill v;
    108   return (3 - inFlag - outFlag);
     131  int noetherian = 3 - 1*inFlag - 2*outFlag;
     132  if (noetherian == 0) {
     133    return (4 - 4*inOutFlag); // weak noetherian
     134  }
     135  return (noetherian);
    109136}
    110137example
     
    118145}
    119146
    120 static proc inOrOutCommingEdgeInCycle(intmat G, int v, intvec visited, intvec path) {
     147static proc inOutCommingEdgesInCycles(intmat G, int v, intvec visited, intvec path) {
    121148  // Mark the current vertex as visited
    122149  visited[v] = 1;
     
    129156  }
    130157
    131   int inFlag, outFlag;
     158  int inFlag, outFlag, inOutFlag;
    132159
    133160  for (int w = 1; w <= ncols(G) && (inFlag + outFlag) != 3; w++) {
    134161    if (G[v,w] == 1) {
    135       if (visited[w] == 1) {
    136         // new cycle
    137         if (v == w) {
     162      if (visited[w] == 1) { // new cycle
     163        int tmpInFlag;
     164        int tmpOutFlag;
     165        if (v == w) { // cycle is a loop
    138166          for (int u = 1; u <= ncols(G); u++) {
    139167            if (G[v,u] && u != v) {
    140               outFlag = 2;
     168              outFlag = 1;
     169              tmpOutFlag = 1;
    141170            }
    142171            if (G[u,v] && u != v) {
    143172              inFlag = 1;
     173              tmpInFlag = 1;
    144174            }
    145175          } kill u;
     
    151181                if (path[i] != v) {
    152182                  if (u != path[i+1]) { // and u is not the next element in the cycle
    153                     outFlag = 2;
     183                    outFlag = 1;
     184                    tmpOutFlag = 1;
    154185                  }
    155186                } else {
    156187                  if (u != w) {
    157                     outFlag = 2;
     188                    outFlag = 1;
     189                    tmpOutFlag = 1;
    158190                  }
    159191                }
     
    163195                  if (u != path[i-1]) { // and u is not the previous element in the cylce
    164196                    inFlag = 1;
     197                    tmpInFlag = 1;
    165198                  }
    166199                } else {
    167200                  if (u != v) {
    168201                    inFlag = 1;
     202                    tmpInFlag = 1;
    169203                  }
    170204                }
     
    176210          } kill i;
    177211        }
     212        if (tmpInFlag > 0 && tmpOutFlag > 0) {
     213          // there are both in and outcomming edges in this cycle
     214          inOutFlag = 1;
     215        }
     216        kill tmpInFlag;
     217        kill tmpOutFlag;
    178218      } else {
    179         int inOutFlags = inOrOutCommingEdgeInCycle(G, w, visited, path);
     219        int inOutFlags = inOutCommingEdgesInCycles(G, w, visited, path);
    180220        if (inOutFlags == 1) {
    181221          inFlag = 1;
    182222        }
    183223        if (inOutFlags == 2) {
    184           outFlag = 2;
     224          outFlag = 1;
    185225        }
    186226        if (inOutFlags == 3) {
    187227          inFlag = 1;
    188           outFlag = 2;
     228          outFlag = 1;
     229        }
     230        if (inOutFlags == 4) {
     231          inOutFlag = 1;
     232        }
     233        if (inOutFlags == 5) {
     234          inFlag = 1;
     235          inOutFlag = 1;
     236        }
     237        if (inOutFlags == 6) {
     238          outFlag = 1;
     239          inOutFlag = 1;
     240        }
     241        if (inOutFlags == 7) {
     242          inFlag = 1;
     243          outFlag = 1;
     244          inOutFlag = 1;
    189245        }
    190246        kill inOutFlags;
     
    193249  } kill w;
    194250
    195   return (inFlag + outFlag);
     251  return (1*inFlag + 2*outFlag + 4*inOutFlag);
    196252}
    197253
     
    202258ASSUME: - basering is a Letterplace ring
    203259      - G is a Groebner basis
     260THEORY: lpIsSemiPrime works with the monomial algebra A/<LM(G)>.
     261A positive answer holds for both A/<LM(G)> and A/<G>, while
     262a negative answer applies only to A/<LM(G)> and not necessarily to
     263A/<G>.
    204264"
    205265{
     
    303363ASSUME: - basering is a Letterplace ring
    304364      - G is a Groebner basis
     365THEORY: lpIsPrime works with the monomial algebra A/<LM(G)>.
     366A positive answer holds for both A/<LM(G)> and A/<G>, while
     367a negative answer applies only to A/<LM(G)> and not necessarily to A/<G>.
    305368"
    306369{
  • Singular/LIB/freegb.lib

    r458174a r0f987ab  
    24782478  if (N >1)
    24792479  {
    2480     for(i=1; i<=N; i++)
     2480    for(i=1; i<=N-1; i++)
    24812481    {
    24822482      q = lieBracket(a,q);
     
    28302830  setring RS; fsRel;
    28312831}
     2832
     2833/* intmat A[2][2] =
     2834    2, -1,
     2835    -3, 2; // G_2 Cartan matrix
     2836*/
     2837
    28322838
    28332839static proc varIdeal2intvec(ideal I)
  • Singular/dyn_modules/cohomo/cohomo.cc

    r458174a r0f987ab  
    31363136
    31373137
    3138 extern "C" int SI_MOD_INIT(stanleyreisnerlib)(SModulFunctions* p)
     3138extern "C" int SI_MOD_INIT(cohomo)(SModulFunctions* p)
    31393139{
    31403140  firstorderdef_setup(p);
  • Singular/dyn_modules/syzextra/mod_main.cc

    r458174a r0f987ab  
    3636
    3737#include "Singular/mod_lib.h"
    38 
    39 
    40 #if GOOGLE_PROFILE_ENABLED
    41 #include <google/profiler.h>
    42 #endif // #if GOOGLE_PROFILE_ENABLED
    4338
    4439
     
    258253}
    259254
    260 // proc SchreyerSyzygyNF(vector syz_lead, vector syz_2, def L, def T, list #)
    261 static BOOLEAN _SchreyerSyzygyNF(leftv res, leftv h)
    262 {
    263   const SchreyerSyzygyComputationFlags attributes(currRingHdl);
    264 
    265 //   const BOOLEAN OPT__SYZCHECK   = attributes.OPT__SYZCHECK;
    266 //   const BOOLEAN OPT__LEAD2SYZ   = attributes.OPT__LEAD2SYZ;
    267   const BOOLEAN OPT__HYBRIDNF   = attributes.OPT__HYBRIDNF;
    268   const BOOLEAN OPT__TAILREDSYZ = attributes.OPT__TAILREDSYZ;
    269 
    270   const char* usage = "`SchreyerSyzygyNF(<vector>, <vector>, <ideal/module>, <ideal/module>[,<module>])` expected";
    271   const ring r = attributes.m_rBaseRing;
    272 
    273   NoReturn(res);
    274 
    275   assume( OPT__HYBRIDNF ); // ???
    276 
    277   if ((h==NULL) || (h->Typ() != VECTOR_CMD) || (h->Data() == NULL))
    278   {
    279     WerrorS(usage);
    280     return TRUE;
    281   }
    282 
    283   const poly syz_lead = (poly) h->Data(); assume (syz_lead != NULL);
    284 
    285 
    286   h = h->Next();
    287   if ((h==NULL) || (h->Typ() != VECTOR_CMD) || (h->Data() == NULL))
    288   {
    289     WerrorS(usage);
    290     return TRUE;
    291   }
    292 
    293   const poly syz_2 = (poly) h->Data(); assume (syz_2 != NULL);
    294 
    295   h = h->Next();
    296   if ((h==NULL) || (h->Typ()!=IDEAL_CMD && h->Typ() !=MODUL_CMD) || (h->Data() == NULL))
    297   {
    298     WerrorS(usage);
    299     return TRUE;
    300   }
    301 
    302   const ideal L = (ideal) h->Data(); assume( IDELEMS(L) > 0 );
    303 
    304 
    305   h = h->Next();
    306   if ((h==NULL) || (h->Typ()!=IDEAL_CMD && h->Typ() !=MODUL_CMD) || (h->Data() == NULL))
    307   {
    308     WerrorS(usage);
    309     return TRUE;
    310   }
    311 
    312   const ideal T = (ideal) h->Data();
    313 
    314   assume( IDELEMS(L) == IDELEMS(T) );
    315 
    316   ideal LS = NULL;
    317 
    318   h = h->Next();
    319   if ((h != NULL) && (h->Typ() ==MODUL_CMD) && (h->Data() != NULL))
    320   {
    321     LS = (ideal)h->Data();
    322     h = h->Next();
    323   }
    324 
    325 #ifndef SING_NDEBUG
    326   if( LIKELY( OPT__TAILREDSYZ) )
    327     assume (LS != NULL);
    328 #endif
    329 
    330   assume( h == NULL );
    331 
    332   res->rtyp = VECTOR_CMD;
    333   res->data = SchreyerSyzygyNF(syz_lead,
    334                                (syz_2!=NULL)? p_Copy(syz_2, r): syz_2, L, T, LS, attributes);
    335 
    336   return FALSE;
    337 }
    338 
    339 
    340 
    341 /// proc SSReduceTerm(poly m, def t, def syzterm, def L, def T, list #)
    342 static BOOLEAN _ReduceTerm(leftv res, leftv h)
    343 {
    344   const SchreyerSyzygyComputationFlags attributes(currRingHdl);
    345 
    346 //  const BOOLEAN OPT__SYZCHECK   = attributes.OPT__SYZCHECK;
    347 //   const BOOLEAN OPT__LEAD2SYZ   = attributes.OPT__LEAD2SYZ;
    348 //   const BOOLEAN OPT__HYBRIDNF   = attributes.OPT__HYBRIDNF;
    349   const BOOLEAN OPT__TAILREDSYZ = attributes.OPT__TAILREDSYZ;
    350 
    351   const char* usage = "`ReduceTerm(<poly>, <poly/vector>, <vector/0>, <ideal/module>, <ideal/module>[,<module>])` expected";
    352   const ring r = attributes.m_rBaseRing;
    353 
    354   NoReturn(res);
    355 
    356   if ((h==NULL) || (h->Typ() !=POLY_CMD) || (h->Data() == NULL))
    357   {
    358     WerrorS(usage);
    359     return TRUE;
    360   }
    361 
    362   const poly multiplier = (poly) h->Data(); assume (multiplier != NULL);
    363 
    364 
    365   h = h->Next();
    366   if ((h==NULL) || (h->Typ()!=VECTOR_CMD && h->Typ() !=POLY_CMD) || (h->Data() == NULL))
    367   {
    368     WerrorS(usage);
    369     return TRUE;
    370   }
    371 
    372   const poly term4reduction = (poly) h->Data(); assume( term4reduction != NULL );
    373 
    374 
    375   poly syztermCheck = NULL;
    376 
    377   h = h->Next();
    378   if ((h==NULL) || !((h->Typ()==VECTOR_CMD) || (h->Data() == NULL)) )
    379   {
    380     WerrorS(usage);
    381     return TRUE;
    382   }
    383 
    384   if(h->Typ()==VECTOR_CMD)
    385     syztermCheck = (poly) h->Data();
    386 
    387 
    388   h = h->Next();
    389   if ((h==NULL) || (h->Typ()!=IDEAL_CMD && h->Typ() !=MODUL_CMD) || (h->Data() == NULL))
    390   {
    391     WerrorS(usage);
    392     return TRUE;
    393   }
    394 
    395   const ideal L = (ideal) h->Data(); assume( IDELEMS(L) > 0 );
    396 
    397 
    398   h = h->Next();
    399   if ((h==NULL) || (h->Typ()!=IDEAL_CMD && h->Typ() !=MODUL_CMD) || (h->Data() == NULL))
    400   {
    401     WerrorS(usage);
    402     return TRUE;
    403   }
    404 
    405   const ideal T = (ideal) h->Data();
    406 
    407   assume( IDELEMS(L) == IDELEMS(T) );
    408 
    409   ideal LS = NULL;
    410 
    411   h = h->Next();
    412   if ((h != NULL) && (h->Typ() ==MODUL_CMD) && (h->Data() != NULL))
    413   {
    414     LS = (ideal)h->Data();
    415     h = h->Next();
    416   }
    417 
    418 #ifndef SING_NDEBUG
    419   if( LIKELY( OPT__TAILREDSYZ) )
    420     assume (LS != NULL);
    421 #endif
    422 
    423   assume( h == NULL );
    424 
    425   res->rtyp = VECTOR_CMD;
    426   res->data = ReduceTerm(multiplier, term4reduction, syztermCheck, L, T, LS, attributes);
    427 
    428   return FALSE;
    429 }
    430 
    431 
    432 
    433 
    434 // proc SSTraverseTail(poly m, def @tail, def L, def T, list #)
    435 static BOOLEAN _TraverseTail(leftv res, leftv h)
    436 {
    437   const SchreyerSyzygyComputationFlags attributes(currRingHdl);
    438 
    439 //   const BOOLEAN OPT__SYZCHECK   = attributes.OPT__SYZCHECK;
    440 //   const BOOLEAN OPT__LEAD2SYZ   = attributes.OPT__LEAD2SYZ;
    441 //   const BOOLEAN OPT__HYBRIDNF   = attributes.OPT__HYBRIDNF;
    442   const BOOLEAN OPT__TAILREDSYZ = attributes.OPT__TAILREDSYZ;
    443 
    444   const char* usage = "`TraverseTail(<poly>, <poly/vector>, <ideal/module>, <ideal/module>[,<module>])` expected";
    445   const ring r = attributes.m_rBaseRing;
    446 
    447   NoReturn(res);
    448 
    449   if ((h==NULL) || (h->Typ() !=POLY_CMD) || (h->Data() == NULL))
    450   {
    451     WerrorS(usage);
    452     return TRUE;
    453   }
    454 
    455   const poly multiplier = (poly) h->Data(); assume (multiplier != NULL);
    456 
    457   h = h->Next();
    458   if ((h==NULL) || (h->Typ()!=VECTOR_CMD && h->Typ() !=POLY_CMD))
    459   {
    460     WerrorS(usage);
    461     return TRUE;
    462   }
    463 
    464   const poly tail = (poly) h->Data();
    465 
    466   h = h->Next();
    467 
    468   if ((h==NULL) || (h->Typ()!=IDEAL_CMD && h->Typ() !=MODUL_CMD) || (h->Data() == NULL))
    469   {
    470     WerrorS(usage);
    471     return TRUE;
    472   }
    473 
    474   const ideal L = (ideal) h->Data();
    475 
    476   assume( IDELEMS(L) > 0 );
    477 
    478   h = h->Next();
    479   if ((h==NULL) || (h->Typ()!=IDEAL_CMD && h->Typ() !=MODUL_CMD) || (h->Data() == NULL))
    480   {
    481     WerrorS(usage);
    482     return TRUE;
    483   }
    484 
    485   const ideal T = (ideal) h->Data();
    486 
    487   assume( IDELEMS(L) == IDELEMS(T) );
    488 
    489   h = h->Next();
    490 
    491   ideal LS = NULL;
    492 
    493   if ((h != NULL) && (h->Typ() ==MODUL_CMD) && (h->Data() != NULL))
    494   {
    495     LS = (ideal)h->Data();
    496     h = h->Next();
    497   }
    498 
    499 #ifndef SING_NDEBUG
    500   if( LIKELY( OPT__TAILREDSYZ) )
    501     assume (LS != NULL);
    502 #endif
    503 
    504   assume( h == NULL );
    505 
    506   res->rtyp = VECTOR_CMD;
    507   res->data = TraverseTail(multiplier, tail, L, T, LS, attributes);
    508 
    509   return FALSE;
    510 }
    511 
    512 
    513 static BOOLEAN _ComputeResolution(leftv res, leftv h)
    514 {
    515   const SchreyerSyzygyComputationFlags attributes(currRingHdl);
    516 
    517   const char* usage = "`ComputeResolution(<ideal/module>, <same as before>, <same as before>[,int])` expected";
    518   const ring r = attributes.m_rBaseRing;
    519 
    520   NoReturn(res);
    521 
    522   // input
    523   if ((h==NULL) || (h->Typ()!=IDEAL_CMD && h->Typ() !=MODUL_CMD) || (h->Data() == NULL))
    524   {
    525     WerrorS(usage);
    526     return TRUE;
    527   }
    528 
    529   const int type = h->Typ();
    530   ideal M = (ideal)(h->CopyD()); // copy for resolution...!???
    531   int size = IDELEMS(M);
    532 
    533   assume( size >= 0 );
    534 
    535   h = h->Next();
    536 
    537   // lead
    538   if ((h==NULL) || (h->Typ()!=type) || (h->Data() == NULL))
    539   {
    540     WerrorS(usage);
    541     return TRUE;
    542   }
    543 
    544   ideal L = (ideal)(h->CopyD()); // no copy!
    545   assume( IDELEMS(L) == size );
    546 
    547   h = h->Next();
    548   if ((h==NULL) || (h->Typ()!=type) || (h->Data() == NULL))
    549   {
    550     WerrorS(usage);
    551     return TRUE;
    552   }
    553 
    554   ideal T = (ideal)(h->CopyD()); // no copy!
    555   assume( IDELEMS(T) == size );
    556 
    557   h = h->Next();
    558 
    559   // length..?
    560   long length = 0;
    561 
    562   if ((h!=NULL) && (h->Typ()==INT_CMD))
    563   {
    564     length = (long)(h->Data());
    565     h = h->Next();
    566   }
    567 
    568   assume( h == NULL );
    569 
    570   if( length <= 0 )
    571     length = 1 + rVar(r);
    572 
    573   syStrategy _res=(syStrategy)omAlloc0(sizeof(ssyStrategy));
    574 
    575 //  class ssyStrategy; typedef ssyStrategy * syStrategy;
    576 //  typedef ideal *            resolvente;
    577 
    578   _res->length = length + 1; // index + 1;
    579   _res->fullres = (resolvente)omAlloc0((_res->length+1)*sizeof(ideal));
    580   int index = 0;
    581   _res->fullres[index++] = M;
    582 
    583 //  if (UNLIKELY(attributes.OPT__TREEOUTPUT))
    584 //    Print("{ \"RESOLUTION: HYBRIDNF:%d, TAILREDSYZ: %d, LEAD2SYZ: %d, IGNORETAILS: %d\": [\n", attributes.OPT__HYBRIDNF, attributes.OPT__TAILREDSYZ, attributes.OPT__LEAD2SYZ, attributes.OPT__IGNORETAILS);
    585 
    586   while( (!idIs0(L)) && (index < length))
    587   {
    588     attributes.nextSyzygyLayer();
    589     ideal LL, TT;
    590 
    591     ComputeSyzygy(L, T, LL, TT, attributes);
    592 
    593     size = IDELEMS(LL);
    594 
    595     assume( size == IDELEMS(TT) );
    596 
    597     id_Delete(&L, r); id_Delete(&T, r);
    598 
    599     L = LL; T = TT;
    600 
    601     // id_Add(T, L, r);
    602     M = idInit(size, 0);
    603     for( int i = size-1; i >= 0; i-- )
    604     {
    605       M->m[i] = p_Add_q(p_Copy(T->m[i], r), p_Copy(L->m[i], r), r); // TODO: :(((
    606     }
    607     M->rank = id_RankFreeModule(M, r);
    608 
    609     _res->fullres[index++] = M; // ???
    610   }
    611 //  if ( UNLIKELY(attributes.OPT__TREEOUTPUT) )
    612 //    PrintS("] }\n");
    613 
    614   id_Delete(&L, r); id_Delete(&T, r);
    615 
    616   res->data = _res;
    617   res->rtyp = RESOLUTION_CMD;
    618 
    619 //  omFreeSize(_res, sizeof(ssyStrategy));
    620 
    621   return FALSE;
    622 
    623 }
    624 
    625 
    626 /// module (LL, TT) = SSComputeSyzygy(L, T);
    627 /// Compute Syz(L ++ T) = N = LL ++ TT
    628 // proc SSComputeSyzygy(def L, def T)
    629 static BOOLEAN _ComputeSyzygy(leftv res, leftv h)
    630 {
    631   const SchreyerSyzygyComputationFlags attributes(currRingHdl);
    632 
    633 //   const BOOLEAN OPT__SYZCHECK   = attributes.OPT__SYZCHECK;
    634 //   const BOOLEAN OPT__LEAD2SYZ   = attributes.OPT__LEAD2SYZ;
    635 //   const BOOLEAN OPT__HYBRIDNF   = attributes.OPT__HYBRIDNF;
    636 //   const BOOLEAN OPT__TAILREDSYZ = attributes.OPT__TAILREDSYZ;
    637 
    638   const char* usage = "`ComputeSyzygy(<ideal/module>, <ideal/module>)` expected";
    639   const ring r = attributes.m_rBaseRing;
    640 
    641   NoReturn(res);
    642 
    643   if ((h==NULL) || (h->Typ()!=IDEAL_CMD && h->Typ() !=MODUL_CMD) || (h->Data() == NULL))
    644   {
    645     WerrorS(usage);
    646     return TRUE;
    647   }
    648 
    649   const ideal L = (ideal) h->Data();
    650 
    651   assume( IDELEMS(L) > 0 );
    652 
    653   h = h->Next();
    654   if ((h==NULL) || (h->Typ()!=IDEAL_CMD && h->Typ() !=MODUL_CMD) || (h->Data() == NULL))
    655   {
    656     WerrorS(usage);
    657     return TRUE;
    658   }
    659 
    660   const ideal T = (ideal) h->Data();
    661   assume( IDELEMS(L) == IDELEMS(T) );
    662 
    663 
    664   h = h->Next(); assume( h == NULL );
    665 
    666   ideal LL, TT;
    667 
    668   ComputeSyzygy(L, T, LL, TT, attributes);
    669 
    670   lists l = (lists)omAllocBin(slists_bin); l->Init(2);
    671 
    672   l->m[0].rtyp = MODUL_CMD; l->m[0].data = reinterpret_cast<void *>(LL);
    673 
    674   l->m[1].rtyp = MODUL_CMD; l->m[1].data = reinterpret_cast<void *>(TT);
    675 
    676   res->data = l; res->rtyp = LIST_CMD;
    677 
    678   return FALSE;
    679 
    680 }
    681 
    682255/// Get leading component
    683256static BOOLEAN leadcomp(leftv res, leftv h)
    684257{
    685   NoReturn(res);
    686 
    687258  if ((h!=NULL) && (h->Typ()==VECTOR_CMD || h->Typ()==POLY_CMD))
    688259  {
     
    701272
    702273      res->data = reinterpret_cast<void *>(jjLONG2N(iComp));
    703     } else
     274    }
     275    else
    704276      res->data = reinterpret_cast<void *>(jjLONG2N(0));
    705277
     
    716288static BOOLEAN MakeInducedSchreyerOrdering(leftv res, leftv h)
    717289{
    718 
    719   NoReturn(res);
    720 
    721290  int sign = 1;
    722291  if ((h!=NULL) && (h->Typ()==INT_CMD))
     
    744313static BOOLEAN GetInducedData(leftv res, leftv h)
    745314{
    746   NoReturn(res);
    747 
    748315  const ring r = currRing;
    749316
     
    802369static BOOLEAN SetInducedReferrence(leftv res, leftv h)
    803370{
     371  res->Init();
    804372  NoReturn(res);
    805373
     
    839407    return TRUE;
    840408  }
    841 
    842 
    843409
    844410  // F & componentWeights belong to that ordering block of currRing now:
     
    947513
    948514
    949 // #define ADD(A,B,C,D,E) ADD0(iiAddCproc, "", C, D, E)
    950 
    951 //#define ADD0(A,B,C,D,E) A(B, (char*)C, D, E)
    952 // #define ADD(A,B,C,D,E) ADD0(A->iiAddCproc, B, C, D, E)
    953515  ADD("ClearContent", FALSE, _ClearContent);
    954516  ADD("ClearDenominators", FALSE, _ClearDenominators);
     
    964526  ADD("Tail", FALSE, Tail);
    965527
    966   ADD("ReduceTerm", FALSE, _ReduceTerm);
    967   ADD("TraverseTail", FALSE, _TraverseTail);
    968 
    969 
    970   ADD("SchreyerSyzygyNF", FALSE, _SchreyerSyzygyNF);
    971   ADD("ComputeSyzygy", FALSE, _ComputeSyzygy);
    972 
    973   ADD("ComputeResolution", FALSE, _ComputeResolution);
    974 
    975   //  ADD("", FALSE, );
    976 
    977528#undef ADD
    978529  return MAX_TOK;
  • Singular/dyn_modules/syzextra/singularxx_defs.h

    r458174a r0f987ab  
    2424
    2525
    26 //#ifdef HAVE_NAMESPACES
    27 //
    28 //#define BEGIN_NAMESPACE(a) namespace a {
    29 //#define END_NAMESPACE }
    30 //
    31 //#define USING_NAMESPACE(a) using namespace a;
    32 //#define FROM_NAMESPACE(a, s) a :: s
    33 //
    34 //#else
    35 //
    36 //#define BEGIN_NAMESPACE(a)
    37 //#define END_NAMESPACE
    38 //
    39 //#define USING_NAMESPACE(a)
    4026#define FROM_NAMESPACE(a, s) s
    41 
    42 //#endif
    43 
    44 
    45 //#define SINGULARXXNAME Singular
    46 //
    47 //#define BEGIN_NAMESPACE_SINGULARXX BEGIN_NAMESPACE(SINGULARXXNAME)
    48 //#define END_NAMESPACE_SINGULARXX END_NAMESPACE
    49 //
    50 //#define USING_NAMESPACE_SINGULARXX USING_NAMESPACE(SINGULARXXNAME)
    51 //#define FROM_NAMESPACE_SINGULARXXNAME(s) FROM_NAMESPACE(SINGULARXXNAME, s)
    52 //
    53 //#define BEGIN_NAMESPACE_NONAME BEGIN_NAMESPACE()
    54 //
    55 
    5627
    5728#ifndef HAVE_THROW
     
    6132#endif
    6233
    63 // #include "CSingularTypes.h"
    64 
    6534#endif /* SINGULAR_singular_defs_h_ */
  • Singular/dyn_modules/syzextra/syzextra.cc

    r458174a r0f987ab  
    2727
    2828#include "misc/intvec.h"
    29 #include "misc/options.h"
    3029
    3130#include "coeffs/coeffs.h"
     
    3534#include "polys/simpleideals.h"
    3635
    37 #include "polys/kbuckets.h" // for kBucket*
    38 #include "polys/sbuckets.h" // for sBucket*
    39 //#include "polys/nc/summator.h" // for CPolynomialSummator
    40 #include "polys/operations/p_Mult_q.h" // for MIN_LENGTH_BUCKET
    41 
    42 #include "kernel/GBEngine/kstd1.h"
    4336#include "kernel/polys.h"
    44 #include "kernel/GBEngine/syz.h"
    4537#include "kernel/ideals.h"
    46 
    47 #include "kernel/oswrapper/timer.h"
    48 
    49 #include "Singular/tok.h"
    50 #include "Singular/ipid.h"
    51 #include "Singular/lists.h"
    52 #include "Singular/attrib.h"
    53 
    54 #include "Singular/ipid.h"
    55 #include "Singular/ipshell.h" // For iiAddCproc
    5638
    5739#include <stdio.h>
    5840#include <stdlib.h>
    59 
    60 #ifndef RTIMER_BENCHMARKING
    61 # define RTIMER_BENCHMARKING 0
    62 #endif
    63 
    64 SBucketFactory::Bucket SBucketFactory::_CreateBucket(const ring r)
    65 {
    66   const Bucket bt = sBucketCreate(r);
    67 
    68   assume( bt != NULL );
    69   return bt;
    70 }
    71 
    72 void SBucketFactory::_DestroyBucket(SBucketFactory::Bucket & bt)
    73 {
    74   if( bt != NULL )
    75   {
    76     sBucketDestroy( &bt );
    77     bt = NULL;
    78   }
    79 }
    80 
    81 class SBucketWrapper
    82 {
    83   typedef SBucketFactory::Bucket Bucket;
    84 
    85   private:
    86     Bucket m_bucket;
    87 
    88     SBucketFactory& m_factory;
    89   public:
    90     SBucketWrapper(const ring r, SBucketFactory& factory):
    91         m_bucket( factory.getBucket(r) ),
    92         m_factory( factory )
    93     {}
    94 
    95     ~SBucketWrapper()
    96     {
    97       m_factory.putBucket( m_bucket );
    98     }
    99 
    100   public:
    101 
    102     /// adds p to the internal bucket
    103     /// destroys p, l == length(p)
    104     inline void Add( poly p, const int l )
    105     {
    106       assume( pLength(p) == l );
    107       sBucket_Add_p( m_bucket, p, l );
    108     }
    109 
    110     /// adds p to the internal bucket
    111     /// destroys p
    112     inline void Add( poly p ){ Add(p, pLength(p)); }
    113 
    114     poly ClearAdd()
    115     {
    116       poly p; int l;
    117       sBucketClearAdd(m_bucket, &p, &l);
    118       assume( pLength(p) == l );
    119       return p;
    120     }
    121 };
    122 
    123 static FORCE_INLINE poly pp_Add_qq( const poly a, const poly b, const ring R)
    124 {
    125   return p_Add_q( p_Copy(a, R), p_Copy(b, R), R );
    126 }
    127 
    128 static FORCE_INLINE poly p_VectorProductLT( poly s,  const ideal& L, const ideal& T, const ring& R)
    129 {
    130   assume( IDELEMS(L) == IDELEMS(T) );
    131   poly vp = NULL; // resulting vector product
    132 
    133   while( s != NULL )
    134   {
    135     const poly nxt = pNext(s);
    136     pNext(s) = NULL;
    137 
    138     if( !n_IsZero( pGetCoeff(s), R->cf) )
    139     {
    140       const int i = p_GetComp(s, R) - 1;
    141       assume( i >= 0 ); assume( i < IDELEMS(L) );
    142       p_SetComp(s, 0, R); p_SetmComp(s, R);
    143 
    144       vp = p_Add_q( vp, pp_Mult_qq( s, L->m[i], R ), R);
    145       vp = p_Add_q( vp, pp_Mult_qq( s, T->m[i], R ), R);
    146     }
    147 
    148     p_Delete(&s, R);
    149 
    150     s = nxt;
    151   };
    152 
    153   assume( s == NULL );
    154 
    155   return vp;
    156 }
    157 
    158 static FORCE_INLINE int atGetInt(idhdl rootRingHdl, const char* attribute, long def)
    159 {
    160   return ((int)(long)(atGet(rootRingHdl, attribute, INT_CMD, (void*)def)));
    161 }
    162 
    163 #if (defined(HAVE_QSORT_R) && (defined __APPLE__ || defined __MACH__ || defined __DARWIN__ || defined __FreeBSD__ || defined __BSD__ || defined OpenBSD3_1 || defined OpenBSD3_9))
    164 static int cmp_c_ds(void *R, const void *p1, const void *p2){
    165 #elif (defined(HAVE_QSORT_R) && (defined _GNU_SOURCE || defined __GNU__ || defined __linux__))
    166 static int cmp_c_ds(const void *p1, const void *p2, void *R){
    167 #else
    168 static int cmp_c_ds(const void *p1, const void *p2){ void *R = currRing;
    169 #endif
    170   assume(R != NULL);
    171   const int YES = 1;
    172   const int NO = -1;
    173 
    174   const ring r =  (const ring) R; // TODO/NOTE: the structure is known: C, lp!!!
    175 
    176   assume( r == currRing ); // for now...
    177 
    178   const poly a = *(const poly*)p1;
    179   const poly b = *(const poly*)p2;
    180 
    181   assume( a != NULL );
    182   assume( b != NULL );
    183 
    184   p_LmTest(a, r);
    185   p_LmTest(b, r);
    186 
    187 
    188   const signed long iCompDiff = p_GetComp(a, r) - p_GetComp(b, r);
    189 
    190   // TODO: test this!!!!!!!!!!!!!!!!
    191 
    192   //return -( compare (c, qsorts) )
    193 
    194   if( iCompDiff > 0 )
    195     return YES;
    196 
    197   if( iCompDiff < 0 )
    198     return  NO;
    199 
    200   assume( iCompDiff == 0 );
    201 
    202   const signed long iDegDiff = p_Totaldegree(a, r) - p_Totaldegree(b, r);
    203 
    204   if( iDegDiff > 0 )
    205     return YES;
    206 
    207   if( iDegDiff < 0 )
    208     return  NO;
    209 
    210   assume( iDegDiff == 0 );
    211 
    212   for (int v = rVar(r); v > 0; v--)
    213   {
    214     assume( v > 0 );
    215     assume( v <= rVar(r) );
    216 
    217     const signed int d = p_GetExp(a, v, r) - p_GetExp(b, v, r);
    218 
    219     if( d > 0 )
    220       return YES;
    221 
    222     if( d < 0 )
    223       return NO;
    224 
    225     assume( d == 0 );
    226   }
    227 
    228   return 0;
    229 }
    230 
    231 /*
    232 static int cmp_poly(const poly &a, const poly &b)
    233 {
    234   const int YES = 1;
    235   const int NO = -1;
    236 
    237   const ring r =  (const ring) currRing; // TODO/NOTE: the structure is known: C, lp!!!
    238 
    239   assume( r == currRing );
    240 
    241   assume( a != NULL );
    242   assume( b != NULL );
    243 
    244   p_LmTest(a, r);
    245   p_LmTest(b, r);
    246   assume( p_GetComp(a, r) == 0 );
    247   assume( p_GetComp(b, r) == 0 );
    248 
    249   for (int v = rVar(r); v > 0; v--)
    250   {
    251     assume( v > 0 );
    252     assume( v <= rVar(r) );
    253 
    254     const signed int d = p_GetExp(a, v, r) - p_GetExp(b, v, r);
    255 
    256     if( d > 0 )
    257       return YES;
    258 
    259     if( d < 0 )
    260       return NO;
    261 
    262     assume( d == 0 );
    263   }
    264 
    265   return 0;
    266 }
    267 */
    268 
    269 /* namespace SORT_c_ds */
    270 
    271 static FORCE_INLINE poly myp_Head(const poly p, const bool bIgnoreCoeff, const ring r)
    272 {
    273   assume( p != NULL ); p_LmCheckPolyRing1(p, r);
    274 
    275   poly np; omTypeAllocBin(poly, np, r->PolyBin);
    276   p_SetRingOfLm(np, r);
    277   memcpy(np->exp, p->exp, r->ExpL_Size*sizeof(long));
    278   pNext(np) = NULL;
    279   pSetCoeff0(np, (bIgnoreCoeff)? NULL : n_Copy(pGetCoeff(p), r->cf));
    280 
    281   p_LmCheckPolyRing1(np, r);
    282   return np;
    283 }
    284 
    285 
    286 /// return a new term: leading coeff * leading monomial of p
    287 /// with 0 leading component!
    288 poly leadmonom(const poly p, const ring r, const bool bSetZeroComp)
    289 {
    290   if( UNLIKELY(p == NULL ) )
    291      return NULL;
    292 
    293     assume( p != NULL );
    294     p_LmTest(p, r);
    295 
    296     poly m = p_LmInit(p, r);
    297     p_SetCoeff0(m, n_Copy(pGetCoeff(p), r->cf), r);
    298 
    299     if( bSetZeroComp )
    300       p_SetComp(m, 0, r);
    301 
    302     p_Setm(m, r);
    303 
    304     assume( m != NULL );
    305     assume( pNext(m) == NULL );
    306     p_LmTest(m, r);
    307 
    308     if( bSetZeroComp )
    309       assume( p_GetComp(m, r) == 0 );
    310 
    311   return m;
    312 }
    313 
    314 
    31541
    31642poly p_Tail(const poly p, const ring r)
     
    32147    return p_Copy( pNext(p), r );
    32248}
    323 
    32449
    32550ideal id_Tail(const ideal id, const ring r)
     
    33863}
    33964
    340 
    341 
    342 void Sort_c_ds(const ideal id, const ring r)
    343 {
    344   const int sizeNew = IDELEMS(id);
    345 
    346 #if ( (defined(HAVE_QSORT_R)) && (defined __APPLE__ || defined __MACH__ || defined __DARWIN__ || defined __FreeBSD__ || defined __BSD__ || defined OpenBSD3_1 || defined OpenBSD3_9) )
    347 #define qsort_my(m, s, ss, r, cmp) qsort_r(m, s, ss, r, cmp)
    348 #elif ( (defined(HAVE_QSORT_R)) && (defined _GNU_SOURCE || defined __GNU__ || defined __linux__))
    349 #define qsort_my(m, s, ss, r, cmp) qsort_r(m, s, ss, cmp, r)
    350 #else
    351 #define qsort_my(m, s, ss, r, cmp) qsort(m, s, ss, cmp)
    352 #endif
    353 
    354   if( sizeNew >= 2 )
    355     qsort_my(id->m, sizeNew, sizeof(poly), r, FROM_NAMESPACE(SORT_c_ds, cmp_c_ds));
    356 
    357 #undef qsort_my
    358 
    359   id->rank = id_RankFreeModule(id, r);
    360 }
    361 
    362 /// Clean up all the accumulated data
    363 void SchreyerSyzygyComputation::CleanUp()
    364 {
    365   id_Delete(const_cast<ideal*>(&m_idTails), m_rBaseRing); // TODO!!!
    366 
    367 /*if( m_sum_bucket != NULL )
    368   {
    369     assume ( sIsEmpty(m_sum_bucket) );
    370     sBucketDestroy(&m_sum_bucket);
    371     m_sum_bucket = NULL;
    372   }*/
    373 
    374   if( m_spoly_bucket != NULL )
    375   {
    376     kBucketDestroy(&m_spoly_bucket);
    377     m_spoly_bucket = NULL;
    378   }
    379 
    380   for( TCache::iterator it = m_cache.begin(); it != m_cache.end(); it++ )
    381   {
    382     TP2PCache& T = it->second;
    383 
    384     for(TP2PCache::iterator vit = T.begin(); vit != T.end(); vit++ )
    385     {
    386       p_Delete( (&(vit->second)), m_rBaseRing);
    387       p_Delete( const_cast<poly*>(&(vit->first)), m_rBaseRing);
    388     }
    389   }
    390 }
    391   /*
    392   for( TTailTerms::const_iterator it = m_idTailTerms.begin(); it != m_idTailTerms.end(); it++ )
    393   {
    394     const TTail& v = *it;
    395     for(TTail::const_iterator vit = v.begin(); vit != v.end(); vit++ )
    396       delete const_cast<CTailTerm*>(*vit);
    397   }
    398   */
    399 
    400 
    401 
    402 int CReducerFinder::PreProcessTerm(const poly t, CReducerFinder& syzChecker) const
    403 {
    404   assume( t != NULL );
    405 
    406   const ring r = m_rBaseRing;
    407 
    408 
    409   if( LIKELY(OPT__TAILREDSYZ) )
    410     if( p_LmIsConstant(t, r) ) // most basic case of baing coprime with L, whatever that is...
    411       return 1; // TODO: prove this...?
    412 
    413   //   return false; // appears to be fine
    414 
    415   const long comp = p_GetComp(t, r);
    416 
    417   CReducersHash::const_iterator itr = m_hash.find(comp);
    418 
    419   if ( itr == m_hash.end() )
    420     return 2; // no such leading component!!!
    421 
    422   assume( itr->first == comp );
    423 
    424   const bool bIdealCase = (comp == 0);
    425   const bool bSyzCheck = syzChecker.IsNonempty(); // need to check even in ideal case????? proof?  "&& !bIdealCase"
    426 
    427   if( LIKELY(OPT__TAILREDSYZ && (bIdealCase || bSyzCheck)) )
    428   {
    429     const TReducers& v = itr->second;
    430     const int N = rVar(r);
    431     // TODO: extract exps of t beforehand?!
    432     bool coprime = true;
    433     for(TReducers::const_iterator vit = v.begin(); (vit != v.end()) && coprime; ++vit )
    434     {
    435       assume( (*vit)->CheckLT( m_L ) );
    436 
    437       const poly p = (*vit)->lt();
    438 
    439       assume( p_GetComp(p, r) == comp );
    440 
    441       // TODO: check if coprime with Leads... if OPT__TAILREDSYZ !
    442       for( int var = N; var > 0; --var )
    443         if( (p_GetExp(p, var, r) != 0) && (p_GetExp(t, var, r) != 0) )
    444         {
    445           coprime = false; // t not coprime with p!
    446           break;
    447         }
    448 
    449       if( bSyzCheck && coprime )
    450       {
    451         poly ss = p_LmInit(t, r);
    452         p_SetCoeff0(ss, n_Init(1, r->cf), r); // for delete & printout only!...
    453         p_SetComp(ss, (*vit)->label() + 1, r); // coeff?
    454         p_Setm(ss, r);
    455 
    456         coprime = ( syzChecker.IsDivisible(ss) );
    457 
    458         p_LmDelete(&ss, r); // deletes coeff as well???
    459       }
    460 
    461       assume( p == (*vit)->lt() );
    462       assume( (*vit)->CheckLT( m_L ) );
    463     }
    464 
    465     return coprime? 3: 0; // t was coprime with all of leading terms!!!
    466 
    467   }
    468   //   return true; // delete the term
    469 
    470   return 0;
    471 }
    472 
    473 
    474 void SchreyerSyzygyComputation::SetUpTailTerms()
    475 {
    476   const ideal idTails = m_idTails;
    477   assume( idTails != NULL );
    478   assume( idTails->m != NULL );
    479   const ring r = m_rBaseRing;
    480 
    481   unsigned long pp[4] = {0,0,0,0}; // count preprocessed terms...
    482 
    483   for( int p = IDELEMS(idTails) - 1; p >= 0; --p )
    484     for( poly* tt = &(idTails->m[p]); (*tt) != NULL;  )
    485     {
    486       const poly t = *tt;
    487       const int k = m_div.PreProcessTerm(t, m_checker); // 0..3
    488       assume( 0 <= k && k <= 3 );
    489 
    490       pp[k]++; // collect stats
    491 
    492       if( k )
    493       {
    494         (*tt) = p_LmDeleteAndNext(t, r); // delete the lead and next...
    495       }
    496       else
    497         tt = &pNext(t); // go next?
    498 
    499     }
    500 
    501   if( UNLIKELY(OPT__PROT) )
    502   {
    503     Print("(PP/ST: {c: %lu, C: %lu, P: %lu} + %lu)", pp[1], pp[2], pp[3], pp[0]);
    504     m_stat[0] += pp [0]; m_stat[1] += pp [1]; m_stat[2] += pp [2]; m_stat[3] += pp [3];
    505   }
    506 }
    507 
    508 /*
    509   m_idTailTerms.resize( IDELEMS(idTails) );
    510 
    511   for( unsigned int p = IDELEMS(idTails) - 1; p >= 0; p -- )
    512   {
    513     TTail& v = m_idTailTerms[p];
    514     poly t = idTails->m[p];
    515     v.resize( pLength(t) );
    516 
    517     unsigned int pp = 0;
    518 
    519     while( t != NULL )
    520     {
    521       assume( t != NULL );
    522       // TODO: compute L:t!
    523 //      ideal reducers;
    524 //      CReducerFinder m_reducers
    525 
    526       CTailTerm* d = v[pp] = new CTailTerm();
    527 
    528       ++pp; pIter(t);
    529     }
    530   }
    531 */
    532 
    533 void SchreyerSyzygyComputation::PrintStats() const
    534 {
    535   Print("SchreyerSyzygyComputation Stats: (PP/ST: {c: %lu, C: %lu, P: %lu} + %lu, LOT: %lu, LCM: %lu, ST:%lu, LK: %lu {*: %lu})\n",
    536         m_stat[1], m_stat[2], m_stat[3], m_stat[0],
    537         m_stat[4], m_stat[5],
    538         m_stat[8],
    539         m_stat[6] + m_stat[7], m_stat[7]
    540        );
    541 }
    542 
    543 
    544 ideal SchreyerSyzygyComputation::Compute1LeadingSyzygyTerms()
    545 {
    546   const ideal& id = m_idLeads;
    547   const ring& r = m_rBaseRing;
    548 //  const SchreyerSyzygyComputationFlags& attributes = m_atttributes;
    549 
    550   assume(!OPT__LEAD2SYZ);
    551 
    552   // 1. set of components S?
    553   // 2. for each component c from S: set of indices of leading terms
    554   // with this component?
    555   // 3. short exp. vectors for each leading term?
    556 
    557   const int size = IDELEMS(id);
    558 
    559   if( size < 2 )
    560   {
    561     const ideal newid = idInit(1, 0); newid->m[0] = NULL; // zero ideal...
    562     return newid;
    563   }
    564 
    565   // TODO/NOTE: input is supposed to be (reverse-) sorted wrt "(c,ds)"!??
    566 
    567   // components should come in groups: count elements in each group
    568   // && estimate the real size!!!
    569 
    570 
    571   // use just a vector instead???
    572   const ideal newid = idInit( (size * (size-1))/2, size); // maximal size: ideal case!
    573 
    574   int k = 0;
    575 
    576   for (int j = 0; j < size; j++)
    577   {
    578     const poly p = id->m[j];
    579     assume( p != NULL );
    580     const int  c = p_GetComp(p, r);
    581 
    582     for (int i = j - 1; i >= 0; i--)
    583     {
    584       const poly pp = id->m[i];
    585       assume( pp != NULL );
    586       const int  cc = p_GetComp(pp, r);
    587 
    588       if( c != cc )
    589         continue;
    590 
    591       const poly m = p_Init(r); // p_New???
    592 
    593       // m = LCM(p, pp) / p! // TODO: optimize: knowing the ring structure: (C/lp)!
    594       for (int v = rVar(r); v > 0; v--)
    595       {
    596         assume( v > 0 );
    597         assume( v <= rVar(r) );
    598 
    599         const short e1 = p_GetExp(p , v, r);
    600         const short e2 = p_GetExp(pp, v, r);
    601 
    602         if( e1 >= e2 )
    603           p_SetExp(m, v, 0, r);
    604         else
    605           p_SetExp(m, v, e2 - e1, r);
    606 
    607       }
    608 
    609       assume( (j > i) && (i >= 0) );
    610 
    611       p_SetComp(m, j + 1, r);
    612       pNext(m) = NULL;
    613       p_SetCoeff0(m, n_Init(1, r->cf), r); // for later...
    614 
    615       p_Setm(m, r); // should not do anything!!!
    616 
    617       newid->m[k++] = m;
    618     }
    619   }
    620 
    621   // the rest of newid is assumed to be zeroes...
    622 
    623   // simplify(newid, 2 + 32)??
    624   // sort(newid, "C,ds")[1]???
    625   id_DelDiv(newid, r); // #define SIMPL_LMDIV 32
    626 
    627   idSkipZeroes(newid); // #define SIMPL_NULL 2
    628 
    629   Sort_c_ds(newid, r);
    630 
    631   return newid;
    632 }
    633 
    634 ideal SchreyerSyzygyComputation::Compute2LeadingSyzygyTerms()
    635 {
    636   const ideal& id = m_idLeads;
    637   const ring& r = m_rBaseRing;
    638 //  const SchreyerSyzygyComputationFlags& attributes = m_atttributes;
    639 
    640   // 1. set of components S?
    641   // 2. for each component c from S: set of indices of leading terms
    642   // with this component?
    643   // 3. short exp. vectors for each leading term?
    644 
    645   const int size = IDELEMS(id);
    646 
    647   if( size < 2 )
    648   {
    649     const ideal newid = idInit(1, 1); newid->m[0] = NULL; // zero module...
    650     return newid;
    651   }
    652 
    653 
    654   // TODO/NOTE: input is supposed to be sorted wrt "C,ds"!??
    655 
    656   // components should come in groups: count elements in each group
    657   // && estimate the real size!!!
    658 
    659 
    660   // use just a vector instead???
    661   ideal newid = idInit( (size * (size-1))/2, size); // maximal size: ideal case!
    662 
    663   int k = 0;
    664 
    665   for (int j = 0; j < size; j++)
    666   {
    667     const poly p = id->m[j];
    668     assume( p != NULL );
    669     const int  c = p_GetComp(p, r);
    670 
    671     for (int i = j - 1; i >= 0; i--)
    672     {
    673       const poly pp = id->m[i];
    674       assume( pp != NULL );
    675       const int  cc = p_GetComp(pp, r);
    676 
    677       if( c != cc )
    678         continue;
    679 
    680         // allocate memory & zero it out!
    681       const poly m = p_Init(r); const poly mm = p_Init(r);
    682 
    683 
    684         // m = LCM(p, pp) / p! mm = LCM(p, pp) / pp!
    685         // TODO: optimize: knowing the ring structure: (C/lp)!
    686 
    687       for (int v = rVar(r); v > 0; v--)
    688       {
    689         assume( v > 0 );
    690         assume( v <= rVar(r) );
    691 
    692         const short e1 = p_GetExp(p , v, r);
    693         const short e2 = p_GetExp(pp, v, r);
    694 
    695         if( e1 >= e2 )
    696           p_SetExp(mm, v, e1 - e2, r); //            p_SetExp(m, v, 0, r);
    697         else
    698           p_SetExp(m, v, e2 - e1, r); //            p_SetExp(mm, v, 0, r);
    699 
    700       }
    701 
    702       assume( (j > i) && (i >= 0) );
    703 
    704       p_SetComp(m, j + 1, r);
    705       p_SetComp(mm, i + 1, r);
    706 
    707       const number& lc1 = p_GetCoeff(p , r);
    708       const number& lc2 = p_GetCoeff(pp, r);
    709 
    710 #if NODIVISION
    711       assume( n_IsOne(lc1, r->cf) );
    712       assume( n_IsOne(lc2, r->cf) );
    713 
    714       p_SetCoeff0( m, n_Init( 1, r->cf), r );
    715       p_SetCoeff0(mm, n_Init(-1, r->cf), r );
    716 #else
    717       number g = n_Lcm( lc1, lc2, r->cf );
    718       p_SetCoeff0(m ,       n_Div(g, lc1, r), r);
    719       p_SetCoeff0(mm, n_InpNeg(n_Div(g, lc2, r), r), r);
    720       n_Delete(&g, r);
    721 #endif
    722 
    723       p_Setm(m, r); // should not do anything!!!
    724       p_Setm(mm, r); // should not do anything!!!
    725 
    726       pNext(m) = mm; //        pNext(mm) = NULL;
    727 
    728       newid->m[k++] = m;
    729     }
    730   }
    731 
    732   if( UNLIKELY(!OPT__TAILREDSYZ) )
    733   {
    734       // simplify(newid, 2 + 32)??
    735       // sort(newid, "C,ds")[1]???
    736     id_DelDiv(newid, r); // #define SIMPL_LMDIV 32
    737   }
    738   else
    739   {
    740       //      option(redSB); option(redTail);
    741       //      TEST_OPT_REDSB
    742       //      TEST_OPT_REDTAIL
    743     assume( r == currRing );
    744 
    745     BITSET _save_test; SI_SAVE_OPT1(_save_test);
    746     SI_RESTORE_OPT1(Sy_bit(OPT_REDTAIL) | Sy_bit(OPT_REDSB) | _save_test);
    747 
    748     intvec* w=new intvec(IDELEMS(newid));
    749     ideal tmp = kStd(newid, currRing->qideal, isHomog, &w);
    750     delete w;
    751 
    752     SI_RESTORE_OPT1(_save_test)
    753 
    754     id_Delete(&newid, r);
    755     newid = tmp;
    756   }
    757 
    758   idSkipZeroes(newid);
    759 
    760   Sort_c_ds(newid, r);
    761 
    762   return newid;
    763 }
    764 
    765 poly SchreyerSyzygyComputation::TraverseNF(const poly a, const poly a2) const
    766 {
    767   const ideal& L = m_idLeads;
    768   const ideal& T = m_idTails;
    769 
    770   const ring& R = m_rBaseRing;
    771 
    772   const int r = p_GetComp(a, R) - 1;
    773 
    774   assume( r >= 0 && r < IDELEMS(T) );
    775   assume( r >= 0 && r < IDELEMS(L) );
    776 
    777   assume( a != NULL );
    778 
    779   poly aa = leadmonom(a, R); assume( aa != NULL); // :(
    780 
    781   poly t = TraverseTail(aa, r);
    782 
    783   if( a2 != NULL )
    784   {
    785     assume( OPT__LEAD2SYZ );
    786 
    787     // replace the following... ?
    788     const int r2 = p_GetComp(a2, R) - 1; poly aa2 = leadmonom(a2, R); // :(
    789 
    790     assume( r2 >= 0 && r2 < IDELEMS(T) );
    791 
    792     poly s =  TraverseTail(aa2, r2);
    793 
    794     p_Delete(&aa2, R);
    795 
    796     t = p_Add_q(a2, p_Add_q(t, s, R), R);
    797 
    798   } else
    799     t = p_Add_q(t, ReduceTerm(aa, L->m[r], a), R); // should be identical to bove with a2
    800 
    801   p_Delete(&aa, R);
    802 
    803   return t;
    804 }
    805 
    806 void SchreyerSyzygyComputation::ComputeSyzygy()
    807 {
    808   assume( m_idLeads != NULL );
    809   assume( m_idTails != NULL );
    810 
    811   const ideal& L = m_idLeads;
    812   const ideal& T = m_idTails;
    813 
    814   ideal& TT = m_syzTails;
    815   const ring& R = m_rBaseRing;
    816 
    817 //  if( m_sum_bucket == NULL )
    818 //    m_sum_bucket = sBucketCreate(R);
    819 //  assume ( sIsEmpty(m_sum_bucket) );
    820 
    821   if( m_spoly_bucket == NULL )
    822     m_spoly_bucket = kBucketCreate(R);
    823 
    824 
    825   assume( IDELEMS(L) == IDELEMS(T) );
    826 
    827 #ifdef SING_NDEBUG
    828   int t, r; // for rtimer benchmarking in prot realease mode
    829 #endif
    830 
    831   if( UNLIKELY(OPT__TREEOUTPUT) )
    832     Print("\n{ \"syzygylayer\": \"%d\", \"hybridnf\": \"%d\", \"diagrams\": \n[", OPT__SYZNUMBER, OPT__HYBRIDNF );
    833 
    834   if( UNLIKELY(OPT__PROT) ) Print("\n[%d]", OPT__SYZNUMBER );
    835 
    836   if( m_syzLeads == NULL )
    837   {
    838 #ifdef SING_NDEBUG
    839     if( UNLIKELY(OPT__PROT & RTIMER_BENCHMARKING) )
    840     {
    841       t = getTimer(); r = getRTimer();
    842       Print("\n%% %5d **!TIME4!** SchreyerSyzygyComputation::ComputeSyzygy::ComputeLeadingSyzygyTerms: t: %d, r: %d\n", r, t, r);
    843     }
    844 #endif
    845 
    846     ComputeLeadingSyzygyTerms( OPT__LEAD2SYZ && !OPT__IGNORETAILS ); // 2 terms OR 1 term!
    847 
    848 #ifdef SING_NDEBUG
    849     if( UNLIKELY(OPT__PROT & RTIMER_BENCHMARKING) )
    850     {
    851       t = getTimer() - t; r = getRTimer() - r;
    852       Print("\n%% %5d **!TIME4!** SchreyerSyzygyComputation::ComputeSyzygy::ComputeLeadingSyzygyTerms: dt: %d, dr: %d\n", getRTimer(), t, r);
    853     }
    854 #endif
    855 
    856   }
    857 
    858   assume( m_syzLeads != NULL );
    859   ideal& LL = m_syzLeads;
    860   const int size = IDELEMS(LL);
    861 
    862   TT = idInit(size, 0);
    863 
    864   if( size == 1 && LL->m[0] == NULL )
    865   {
    866      if( UNLIKELY(OPT__TREEOUTPUT) )
    867        PrintS("]},");
    868      return;
    869   }
    870 
    871 
    872   // use hybrid (Schreyer NF) method?
    873   const bool method = (OPT__HYBRIDNF  == 1); //  || (OPT__HYBRIDNF == 2 && OPT__SYZNUMBER < 3);
    874 
    875   if( UNLIKELY(OPT__PROT) ) Print("[%s NF|%s]",(method) ? "PR" : "TT", (NOPRODUCT == 1)? "_,_": "^*^" );
    876 
    877 
    878   if(  LIKELY(!OPT__IGNORETAILS) )
    879   {
    880     if( T != NULL )
    881     {
    882 #ifdef SING_NDEBUG
    883       if( UNLIKELY(OPT__PROT & RTIMER_BENCHMARKING) )
    884       {
    885         t = getTimer(); r = getRTimer();
    886         Print("\n%% %5d **!TIME4!** SchreyerSyzygyComputation::ComputeSyzygy::SetUpTailTerms(): t: %d, r: %d\n", r, t, r);
    887       }
    888 #endif
    889 
    890       SetUpTailTerms();
    891 
    892 #ifdef SING_NDEBUG
    893       if( UNLIKELY(OPT__PROT & RTIMER_BENCHMARKING) )
    894       {
    895         t = getTimer() - t; r = getRTimer() - r;
    896         Print("\n%% %5d **!TIME4!** SchreyerSyzygyComputation::ComputeSyzygy::SetUpTailTerms(): dt: %d, dr: %d\n", getRTimer(), t, r);
    897       }
    898 #endif
    899     }
    900   }
    901 
    902 #ifdef SING_NDEBUG
    903   if( UNLIKELY(OPT__PROT & RTIMER_BENCHMARKING) )
    904   {
    905     t = getTimer(); r = getRTimer();
    906     Print("\n%% %5d **!TIME4!** SchreyerSyzygyComputation::ComputeSyzygy::SyzygyLift: t: %d, r: %d\n", r, t, r);
    907   }
    908 #endif
    909 
    910 //  for( int k = 0; k < size; ++k ) // TODO: should be fine now!
    911   for( int k = size - 1; k >= 0; --k )
    912   {
    913     const poly a = LL->m[k]; assume( a != NULL );
    914 
    915     poly a2 = pNext(a);
    916 
    917     // Splitting 2-terms Leading syzygy module
    918     if( a2 != NULL )
    919       pNext(a) = NULL;
    920 
    921     if( UNLIKELY(OPT__IGNORETAILS) )
    922     {
    923       TT->m[k] = NULL;
    924 
    925       assume( a2 != NULL );
    926 
    927       if( a2 != NULL )
    928         p_Delete(&a2, R);
    929 
    930       continue;
    931     }
    932 
    933     //    TT->m[k] = a2;
    934 
    935     poly nf;
    936 
    937     if( method )
    938       nf = SchreyerSyzygyNF(a, a2);
    939     else
    940       nf = TraverseNF(a, a2);
    941 
    942     TT->m[k] = nf;
    943 
    944     if( UNLIKELY(OPT__SYZCHECK) )
    945     {
    946       // TODO: check the correctness (syzygy property): a + TT->m[k] should be a syzygy!!!
    947 
    948       poly s = pp_Add_qq( a, TT->m[k], R); // current syzygy
    949 
    950       poly vp = p_VectorProductLT(s, L, T, R);
    951 
    952       assume( vp == NULL );
    953 
    954       if( UNLIKELY( OPT__PROT && (vp != NULL) ) ) Warn("ERROR: SyzCheck failed, wrong tail: [%d]\n\n", k); // check k'th syzygy failed
    955 
    956       p_Delete(&vp, R);
    957     }
    958   }
    959 
    960 #ifdef SING_NDEBUG
    961   if( UNLIKELY( OPT__PROT & RTIMER_BENCHMARKING ) )
    962   {
    963     t = getTimer() - t; r = getRTimer() - r;
    964     Print("\n%% %5d **!TIME4!** SchreyerSyzygyComputation::ComputeSyzygy::SyzygyLift: dt: %d, dr: %d\n", getRTimer(), t, r);
    965   }
    966 #endif
    967 
    968   TT->rank = id_RankFreeModule(TT, R);
    969 
    970   if( UNLIKELY(OPT__TREEOUTPUT) )
    971     PrintS("\n]},");
    972 
    973   if( UNLIKELY(OPT__PROT) ) PrintLn();
    974 }
    975 
    976 void SchreyerSyzygyComputation::ComputeLeadingSyzygyTerms(bool bComputeSecondTerms)
    977 {
    978 //  const SchreyerSyzygyComputationFlags& attributes = m_atttributes;
    979 
    980 //  const BOOLEAN OPT__LEAD2SYZ   = attributes.OPT__LEAD2SYZ;
    981 //  const BOOLEAN OPT__TAILREDSYZ = attributes.OPT__TAILREDSYZ;
    982 
    983   assume( m_syzLeads == NULL );
    984 
    985   if( UNLIKELY(bComputeSecondTerms) )
    986   {
    987     assume( OPT__LEAD2SYZ );
    988 //    m_syzLeads = FROM_NAMESPACE(INTERNAL, _Compute2LeadingSyzygyTerms(m_idLeads, m_rBaseRing, m_atttributes));
    989     m_syzLeads = Compute2LeadingSyzygyTerms();
    990   }
    991   else
    992   {
    993     assume( !OPT__LEAD2SYZ );
    994 
    995     m_syzLeads = Compute1LeadingSyzygyTerms();
    996   }
    997 //    m_syzLeads = FROM_NAMESPACE(INTERNAL, _ComputeLeadingSyzygyTerms(m_idLeads, m_rBaseRing, m_atttributes));
    998 
    999   // NOTE: set m_LS if tails are to be reduced!
    1000   assume( m_syzLeads!= NULL );
    1001 
    1002   if ( LIKELY( OPT__TAILREDSYZ && !OPT__IGNORETAILS && (IDELEMS(m_syzLeads) > 0) && !((IDELEMS(m_syzLeads) == 1) && (m_syzLeads->m[0] == NULL)) ) )
    1003   {
    1004     m_LS = m_syzLeads;
    1005     m_checker.Initialize(m_syzLeads);
    1006     assume( m_checker.IsNonempty() ); // TODO: this always fails... BUG????
    1007   }
    1008 
    1009   if( UNLIKELY( OPT__PROT ) ) Print("(L%dS:%d)", bComputeSecondTerms ? 2 : 1, IDELEMS(m_syzLeads));
    1010 
    1011 }
    1012 
    1013 poly SchreyerSyzygyComputation::SchreyerSyzygyNF(const poly syz_lead, poly syz_2) const
    1014 {
    1015   assume( !OPT__IGNORETAILS );
    1016 
    1017   const ideal& L = m_idLeads;
    1018   const ideal& T = m_idTails;
    1019   const ring& r = m_rBaseRing;
    1020 
    1021   assume( syz_lead != NULL );
    1022 
    1023   if( syz_2 == NULL )
    1024   {
    1025     const int rr = p_GetComp(syz_lead, r) - 1;
    1026 
    1027     assume( rr >= 0 && rr < IDELEMS(T) );
    1028     assume( rr >= 0 && rr < IDELEMS(L) );
    1029 
    1030 #if NOPRODUCT
    1031     syz_2 = m_div.FindReducer(syz_lead, L->m[rr], syz_lead, m_checker);
    1032     p_Test(syz_2, r);
    1033 
    1034 #else
    1035     poly aa = leadmonom(syz_lead, r); assume( aa != NULL); // :(
    1036     aa = p_Mult_mm(aa, L->m[rr], r);
    1037 
    1038     syz_2 = m_div.FindReducer(aa, syz_lead, m_checker);
    1039     p_Test(syz_2, r);
    1040 
    1041     p_Delete(&aa, r);
    1042 #endif
    1043 
    1044   }
    1045 
    1046   assume( syz_2 != NULL ); // by construction of S-Polynomial
    1047 
    1048   assume( L != NULL );
    1049   assume( T != NULL );
    1050 
    1051   assume( IDELEMS(L) == IDELEMS(T) );
    1052 
    1053   int  c = p_GetComp(syz_lead, r) - 1;
    1054 
    1055   assume( c >= 0 && c < IDELEMS(T) );
    1056 
    1057   if( m_spoly_bucket == NULL )
    1058     m_spoly_bucket = kBucketCreate(r);
    1059 
    1060   SBucketWrapper tail(r, m_sum_bucket_factory);
    1061 
    1062 
    1063   kBucket_pt bucket = m_spoly_bucket; assume( bucket != NULL ); kbTest(bucket); m_spoly_bucket = NULL;
    1064 
    1065 //  kBucketInit(bucket, NULL, 0); // not needed!?
    1066 
    1067   poly p = leadmonom(syz_lead, r); // :(
    1068 //  poly spoly = pp_Mult_qq(p, T->m[c], r);
    1069   kBucket_Plus_mm_Mult_pp(bucket, p, T->m[c], 0); // TODO: store pLength(T->m[c]) separately!?
    1070   p_Delete(&p, r);
    1071 
    1072   kbTest(bucket);
    1073 
    1074   c = p_GetComp(syz_2, r) - 1;
    1075   assume( c >= 0 && c < IDELEMS(T) );
    1076 
    1077   p = leadmonom(syz_2, r); // :(
    1078 //  spoly = p_Add_q(spoly, pp_Mult_qq(p, T->m[c], r), r);
    1079   kBucket_Plus_mm_Mult_pp(bucket, p, T->m[c], 0); // pLength(T->m[c])?!
    1080   kbTest(bucket);
    1081   p_Delete(&p, r);
    1082 
    1083 //  const bool bUsePolynomial = TEST_OPT_NOT_BUCKETS; //  || (pLength(spoly) < MIN_LENGTH_BUCKET);
    1084 //  CPolynomialSummator tail(r, bUsePolynomial);
    1085   tail.Add(syz_2, 1);
    1086 
    1087   kbTest(bucket);
    1088   for( poly spoly = kBucketExtractLm(bucket); spoly != NULL; p_LmDelete(&spoly, r), spoly = kBucketExtractLm(bucket))
    1089   {
    1090     kbTest(bucket);
    1091     poly t = m_div.FindReducer(spoly, NULL, m_checker);
    1092     p_Test(t, r);
    1093 
    1094     if( t != NULL )
    1095     {
    1096       p = leadmonom(t, r); // :(
    1097       c = p_GetComp(t, r) - 1;
    1098 
    1099       assume( c >= 0 && c < IDELEMS(T) );
    1100 
    1101       kBucket_Plus_mm_Mult_pp(bucket, p, T->m[c], 0); // pLength(T->m[c])?
    1102 //      spoly = p_Add_q(spoly, pp_Mult_qq(p, T->m[c], r), r);
    1103 
    1104       p_Delete(&p, r);
    1105 
    1106       tail.Add(t, 1);
    1107     } // otherwise discard that leading term altogether!
    1108     else
    1109       if( UNLIKELY(OPT__PROT) ) ++ m_stat[4]; // PrintS("$"); // LOT
    1110 
    1111     kbTest(bucket);
    1112   }
    1113 
    1114   kbTest(bucket);
    1115 
    1116   // now bucket must be empty!
    1117   assume( kBucketClear(bucket) == NULL );
    1118 
    1119   const poly result = tail.ClearAdd(); // TODO: use Merge with sBucket???
    1120 
    1121 
    1122   if( m_spoly_bucket == NULL )
    1123     m_spoly_bucket = bucket;
    1124   else
    1125     kBucketDestroy(&bucket);
    1126 
    1127 
    1128   if( UNLIKELY(OPT__TREEOUTPUT) )
    1129   {
    1130     PrintS("]},");
    1131   }
    1132   return result;
    1133 }
    1134 
    1135 // namespace     {
    1136 
    1137 // };
    1138 
    1139 
    1140 bool my_p_LmCmp (poly a, poly b, const ring r) { return p_LmCmp(a, b, r) == -1; } // TODO: change to simple lex. memory compare!
    1141 
    1142 // NOTE: need p_Copy?????? for image + multiplier!!???
    1143 // NOTE: better store complete syz. terms!!?
    1144 poly SchreyerSyzygyComputation::TraverseTail(poly multiplier, const int tail) const
    1145 {
    1146   const ring& r = m_rBaseRing;
    1147 
    1148   assume(m_idTails !=  NULL && m_idTails->m != NULL);
    1149   assume( tail >= 0 && tail < IDELEMS(m_idTails) );
    1150 
    1151   p_Test(multiplier, r);
    1152 
    1153   if( UNLIKELY(OPT__NOCACHING) )
    1154     return ComputeImage(multiplier, tail);
    1155 
    1156   // TODO: store (multiplier, tail) -.-^-.-^-.--> !
    1157   TCache::iterator top_itr = m_cache.find(tail);
    1158 
    1159   if ( top_itr != m_cache.end() )
    1160   {
    1161      assume( top_itr->first == tail );
    1162 
    1163      TP2PCache& T = top_itr->second;
    1164 
    1165      TP2PCache::iterator itr = T.find(multiplier);
    1166 
    1167      if( itr != T.end() ) // Yey - Reuse!!!
    1168      {
    1169        assume( p_LmEqual(itr->first, multiplier, r) );
    1170 
    1171        if( itr->second == NULL ) // leadcoeff plays no role if value is NULL!
    1172          return (NULL);
    1173 
    1174        poly p = p_Copy(itr->second, r); // COPY!!!
    1175 
    1176        p_Test(multiplier, r);
    1177 
    1178        if( !n_Equal( pGetCoeff(multiplier), pGetCoeff(itr->first), r->cf) ) // normalize coeffs!?
    1179        {
    1180          number n = n_Div( pGetCoeff(multiplier), pGetCoeff(itr->first), r->cf); // new number
    1181 
    1182          if( UNLIKELY( OPT__TREEOUTPUT ) )
    1183          {
    1184            StringSetS("");
    1185            n_Write(n, r->cf);
    1186            char* s = StringEndS();
    1187            Print("\"recale\": \"%s\", ", s);
    1188            omFree(s);
    1189          }
    1190 
    1191          if( UNLIKELY( OPT__PROT ) ) ++ m_stat[7]; // PrintS("l*"); // lookup & rescale
    1192 
    1193          p = p_Mult_nn(p, n, r); // !
    1194          n_Delete(&n, r->cf);
    1195        } else
    1196          if( UNLIKELY( OPT__PROT ) ) ++ m_stat[6]; // PrintS("l"); // lookup no rescale
    1197 
    1198        p_Test(multiplier, r);
    1199 
    1200        return p;
    1201      }
    1202 
    1203 
    1204      p_Test(multiplier, r);
    1205 
    1206      const poly p = ComputeImage(multiplier, tail);
    1207 
    1208      if( UNLIKELY(OPT__PROT) ) ++ m_stat[8]; // PrintS("S"); // store
    1209 
    1210      p_Test(multiplier, r);
    1211 
    1212      T.insert( TP2PCache::value_type(myp_Head(multiplier, (p==NULL), r), p) ); //     T[ multiplier ] = p;
    1213 
    1214      p_Test(multiplier, r);
    1215 
    1216 //     if( p == NULL )
    1217 //        return (NULL);
    1218 
    1219      return p_Copy(p, r);
    1220   }
    1221 
    1222   CCacheCompare o(r); TP2PCache T(o);
    1223 
    1224   const poly p = ComputeImage(multiplier, tail);
    1225 
    1226   if( UNLIKELY( OPT__PROT ) ) ++ m_stat[8]; // PrintS("S"); // store // %d", tail + 1);
    1227 
    1228   T.insert( TP2PCache::value_type(myp_Head(multiplier, (p==NULL), r), p) );
    1229 
    1230   m_cache.insert( TCache::value_type(tail, T) );
    1231 
    1232 //  if( p == NULL )
    1233 //    return (NULL);
    1234 
    1235   return p_Copy(p, r);
    1236 }
    1237 
    1238 poly SchreyerSyzygyComputation::ComputeImage(poly multiplier, const int tail) const
    1239 {
    1240   const ring& r = m_rBaseRing;
    1241 
    1242   assume(m_idTails !=  NULL && m_idTails->m != NULL);
    1243   assume( tail >= 0 && tail < IDELEMS(m_idTails) );
    1244 
    1245   p_Test(multiplier, r);
    1246 
    1247   const poly t = m_idTails->m[tail]; // !!!
    1248 
    1249   if(t != NULL)
    1250   {
    1251     const poly p = TraverseTail(multiplier, t);
    1252 
    1253     p_Test(multiplier, r);
    1254     return p;
    1255   }
    1256 
    1257   return NULL;
    1258 }
    1259 
    1260 
    1261 poly SchreyerSyzygyComputation::TraverseTail(poly multiplier, poly tail) const
    1262 {
    1263   assume( !OPT__IGNORETAILS );
    1264 
    1265   const ideal& L = m_idLeads;
    1266   const ideal& T = m_idTails;
    1267   const ring& r = m_rBaseRing;
    1268 
    1269   assume( multiplier != NULL );
    1270 
    1271   assume( L != NULL );
    1272   assume( T != NULL );
    1273 
    1274   p_Test(multiplier, r);
    1275 
    1276   if( UNLIKELY( !(  (!OPT__TAILREDSYZ)   ||   m_lcm.Check(multiplier)     )) )
    1277   {
    1278     if( UNLIKELY(OPT__TAILREDSYZ && OPT__PROT) )
    1279     {
    1280       ++ m_stat[5]; // PrintS("%"); // check LCM !
    1281     }
    1282     return NULL;
    1283   }
    1284 
    1285   //    const bool bUsePolynomial = TEST_OPT_NOT_BUCKETS; //  || (pLength(tail) < MIN_LENGTH_BUCKET);
    1286 
    1287   SBucketWrapper sum(r, m_sum_bucket_factory);
    1288 /*
    1289   sBucket_pt sum;
    1290 
    1291   if( m_sum_bucket == NULL )
    1292     sum = sBucketCreate(r);
    1293   else
    1294   {
    1295     if( !sIsEmpty(m_sum_bucket) )
    1296       sum = sBucketCreate(r);
    1297     else
    1298     {
    1299       sum = m_sum_bucket;
    1300       m_sum_bucket = NULL;
    1301     }
    1302   }
    1303 
    1304 
    1305   assume( sum != NULL ); assume ( sIsEmpty(sum) );
    1306   assume( r == sBucketGetRing(sum) );
    1307 */
    1308 
    1309 //  poly s; int len;
    1310 
    1311   //    CPolynomialSummator sum(r, bUsePolynomial);
    1312   //    poly s = NULL;
    1313 
    1314   // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    1315   // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    1316   for(poly p = tail; p != NULL; p = pNext(p))   // iterate over the tail
    1317   {
    1318     // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    1319     const poly rt = ReduceTerm(multiplier, p, NULL); // TODO: also return/store length?
    1320     sum.Add(rt);
    1321     // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    1322     // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    1323     // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    1324 
    1325 //    const int lp = pLength(rt);
    1326 //    if( rt != NULL && lp != 0 )
    1327 //      sBucket_Add_p(sum, rt, lp);
    1328   }
    1329   // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    1330   // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    1331 
    1332 //  sBucketClearAdd(sum, &s, &len); // Will Not Clear?!?
    1333   const poly s = sum.ClearAdd();
    1334 
    1335 //  assume( sum != NULL ); assume ( sIsEmpty(sum) );
    1336 /*
    1337   if( m_sum_bucket == NULL )
    1338     m_sum_bucket = sum;
    1339   else
    1340     sBucketDestroy(&sum);
    1341 
    1342   assume( pLength(s) == len );
    1343 */
    1344 
    1345   p_Test(multiplier, r);
    1346 
    1347   return s;
    1348 }
    1349 
    1350 
    1351 
    1352 
    1353 poly SchreyerSyzygyComputation::ReduceTerm(poly multiplier, poly term4reduction, poly syztermCheck) const
    1354 {
    1355   assume( !OPT__IGNORETAILS );
    1356 
    1357   const ideal& L = m_idLeads;
    1358   const ideal& T = m_idTails;
    1359   const ring& r = m_rBaseRing;
    1360 
    1361   assume( multiplier != NULL );
    1362   assume( term4reduction != NULL );
    1363 
    1364 
    1365   assume( L != NULL );
    1366   assume( T != NULL );
    1367 
    1368   p_Test(multiplier, r);
    1369 
    1370   // simple implementation with FindReducer:
    1371   poly s = NULL;
    1372 
    1373   if( (!OPT__TAILREDSYZ) || m_lcm.Check(multiplier) ) // TODO: UNLIKELY / LIKELY ????
    1374   {
    1375 #if NOPRODUCT
    1376     s = m_div.FindReducer(multiplier, term4reduction, syztermCheck, m_checker); // s ????
    1377     p_Test(s, r);
    1378 
    1379     p_Test(multiplier, r);
    1380 
    1381     if( s == NULL ) // No Reducer?
    1382     {
    1383       if( UNLIKELY(OPT__PROT) ) ++ m_stat[4]; // PrintS("$"); // LOT
    1384       return NULL;
    1385     }
    1386 
    1387 #else
    1388     // NOTE: only LT(term4reduction) should be used in the following:
    1389     poly product = pp_Mult_mm(multiplier, term4reduction, r);
    1390     p_Test(product, r);
    1391 
    1392     s = m_div.FindReducer(product, syztermCheck, m_checker); // ??
    1393     p_Test(s, r);
    1394 
    1395     p_Test(multiplier, r);
    1396 
    1397     if( s == NULL ) // No Reducer?
    1398     {
    1399       if( UNLIKELY(OPT__PROT) ) ++ m_stat[4]; // PrintS("$"); // LOT
    1400       return NULL;
    1401     }
    1402 
    1403     p_Delete(&product, r);
    1404 #endif
    1405   }
    1406 
    1407   if( s == NULL ) // No Reducer?
    1408   {
    1409     if( UNLIKELY( OPT__TAILREDSYZ && OPT__PROT) )
    1410     {
    1411       ++ m_stat[5]; // PrintS("%"); // check LCM !
    1412     }
    1413     return NULL;
    1414   }
    1415 
    1416   p_Test(multiplier, r);
    1417   p_Test(s, r);
    1418 
    1419   poly b = leadmonom(s, r);
    1420 
    1421   p_Test(b, r);
    1422 
    1423   const int c = p_GetComp(s, r) - 1;
    1424   assume( c >= 0 && c < IDELEMS(T) );
    1425 
    1426 
    1427   if( UNLIKELY( OPT__TREEOUTPUT ) )
    1428      PrintS("\", \"children\": [");
    1429 
    1430   const poly t = TraverseTail(b, c); // T->m[c];
    1431 
    1432   p_Test(multiplier, r);
    1433 
    1434   if( t != NULL )
    1435     s = p_Add_q(s, t, r);
    1436 
    1437   p_Test(multiplier, r);
    1438 
    1439   return s;
    1440 }
    1441 
    1442 SchreyerSyzygyComputationFlags::SchreyerSyzygyComputationFlags(idhdl rootRingHdl):
    1443     OPT__DEBUG( atGetInt(rootRingHdl,"DEBUG", 0) ),
    1444     OPT__LEAD2SYZ( atGetInt(rootRingHdl, "LEAD2SYZ", 0) ),
    1445     OPT__TAILREDSYZ( atGetInt(rootRingHdl, "TAILREDSYZ", 1) ),
    1446     OPT__HYBRIDNF( atGetInt(rootRingHdl, "HYBRIDNF", 0) ),
    1447     OPT__IGNORETAILS( atGetInt(rootRingHdl, "IGNORETAILS", 0) ),
    1448     OPT__SYZNUMBER( atGetInt(rootRingHdl, "SYZNUMBER", 0) ),
    1449     OPT__TREEOUTPUT( atGetInt(rootRingHdl, "TREEOUTPUT", 0) ),
    1450     OPT__SYZCHECK( atGetInt(rootRingHdl, "SYZCHECK", 0) ),
    1451     OPT__PROT(TEST_OPT_PROT),
    1452     OPT__NOCACHING( atGetInt(rootRingHdl, "NOCACHING", 0) ),
    1453     m_rBaseRing( rootRingHdl->data.uring )
    1454 {
    1455   // TODO: just current setting!
    1456   assume( rootRingHdl == currRingHdl );
    1457   assume( rootRingHdl->typ == RING_CMD );
    1458   assume( m_rBaseRing == currRing );
    1459   // move the global ring here inside???
    1460 }
    1461 
    1462 
    1463 
    1464 CLeadingTerm::CLeadingTerm(unsigned int _label,  const poly _lt, const ring R):
    1465     m_sev( p_GetShortExpVector(_lt, R) ),  m_label( _label ),  m_lt( _lt )
    1466 {
    1467   assume( sev() == p_GetShortExpVector(lt(), R) );
    1468 }
    1469 
    1470 CReducerFinder::~CReducerFinder()
    1471 {
    1472   for( CReducersHash::const_iterator it = m_hash.begin(); it != m_hash.end(); it++ )
    1473   {
    1474     const TReducers& v = it->second;
    1475     for(TReducers::const_iterator vit = v.begin(); vit != v.end(); vit++ )
    1476       delete const_cast<CLeadingTerm*>(*vit);
    1477   }
    1478 }
    1479 
    1480 
    1481 void CReducerFinder::Initialize(const ideal L)
    1482 {
    1483   assume( m_L == NULL || m_L == L );
    1484   if( m_L == NULL )
    1485     m_L = L;
    1486 
    1487   assume( m_L == L );
    1488 
    1489   if( L != NULL )
    1490   {
    1491     const ring& R = m_rBaseRing;
    1492     assume( R != NULL );
    1493 
    1494     for( int k = IDELEMS(L) - 1; k >= 0; k-- )
    1495     {
    1496       const poly a = L->m[k]; // assume( a != NULL );
    1497 
    1498       // NOTE: label is k \in 0 ... |L|-1!!!
    1499       if( a != NULL )
    1500         m_hash[p_GetComp(a, R)].push_back( new CLeadingTerm(k, a, R) );
    1501     }
    1502   }
    1503 }
    1504 
    1505 CReducerFinder::CReducerFinder(const ideal L, const SchreyerSyzygyComputationFlags& flags):
    1506     SchreyerSyzygyComputationFlags(flags),
    1507     m_L(const_cast<ideal>(L)), // for debug anyway
    1508     m_hash()
    1509 {
    1510   assume( flags.m_rBaseRing == m_rBaseRing );
    1511   if( L != NULL )
    1512     Initialize(L);
    1513 }
    1514 
    1515 /// _p_LmDivisibleByNoComp for a | b*c
    1516 static inline BOOLEAN _p_LmDivisibleByNoComp(const poly a, const poly b, const poly c, const ring r)
    1517 {
    1518   int i=r->VarL_Size - 1;
    1519   unsigned long divmask = r->divmask;
    1520   unsigned long la, lb;
    1521 
    1522   if (r->VarL_LowIndex >= 0)
    1523   {
    1524     i += r->VarL_LowIndex;
    1525     do
    1526     {
    1527       la = a->exp[i];
    1528       lb = b->exp[i] + c->exp[i];
    1529       if ((la > lb) ||
    1530           (((la & divmask) ^ (lb & divmask)) != ((lb - la) & divmask)))
    1531       {
    1532         pDivAssume(p_DebugLmDivisibleByNoComp(a, b, r) == FALSE);
    1533         return FALSE;
    1534       }
    1535       i--;
    1536     }
    1537     while (i>=r->VarL_LowIndex);
    1538   }
    1539   else
    1540   {
    1541     do
    1542     {
    1543       la = a->exp[r->VarL_Offset[i]];
    1544       lb = b->exp[r->VarL_Offset[i]] + c->exp[r->VarL_Offset[i]];
    1545       if ((la > lb) ||
    1546           (((la & divmask) ^ (lb & divmask)) != ((lb - la) & divmask)))
    1547       {
    1548         pDivAssume(p_DebugLmDivisibleByNoComp(a, b, r) == FALSE);
    1549         return FALSE;
    1550       }
    1551       i--;
    1552     }
    1553     while (i>=0);
    1554   }
    1555 #ifdef HAVE_RINGS
    1556   assume( !rField_is_Ring(r) ); // not implemented for rings...!
    1557 #endif
    1558   return TRUE;
    1559 }
    1560 
    1561 
    1562 bool CLeadingTerm::CheckLT( const ideal & L ) const
    1563 {
    1564 //  for( int i = IDELEMS(L); i >= 0; --i) assume( pNext(L->m[i]) == NULL ); // ???
    1565   return ( L->m[label()] == lt() );
    1566 }
    1567 
    1568 bool CLeadingTerm::DivisibilityCheck(const poly product, const unsigned long not_sev, const ring r) const
    1569 {
    1570   // may have no coeff yet
    1571 //  assume ( !n_IsZero( p_GetCoeff(product, r), r ) );
    1572 
    1573   assume ( !n_IsZero( pGetCoeff(lt()), r->cf ) );
    1574   assume( sev() == p_GetShortExpVector(lt(), r) );
    1575 
    1576   assume( product != NULL );
    1577   assume( (p_GetComp(lt(), r) == p_GetComp(product, r)) || (p_GetComp(lt(), r) == 0) );
    1578 
    1579 //  const int k = label();
    1580 //  assume( m_L->m[k] == p );
    1581 
    1582   return p_LmShortDivisibleByNoComp(lt(), sev(), product, not_sev, r);
    1583 
    1584 }
    1585 
    1586 #if NOPRODUCT
    1587 /// as DivisibilityCheck(multiplier * t, ...) for monomial 'm'
    1588 /// and a module term 't'
    1589 bool CLeadingTerm::DivisibilityCheck(const poly m, const poly t, const unsigned long not_sev, const ring r) const
    1590 {
    1591   assume ( !n_IsZero( pGetCoeff(lt()), r->cf ) );
    1592   assume( sev() == p_GetShortExpVector(lt(), r) );
    1593 
    1594   assume( m != NULL );
    1595   assume( t != NULL );
    1596   assume ( !n_IsZero( pGetCoeff(m), r->cf ) );
    1597   assume ( !n_IsZero( pGetCoeff(t), r->cf ) );
    1598 
    1599 // assume( p_GetComp(m, r) == 0 );
    1600   assume( (p_GetComp(lt(), r) == p_GetComp(t, r))  || (p_GetComp(lt(), r) == 0)  );
    1601 
    1602   p_Test(m, r);
    1603   p_Test(t, r);
    1604 //  const int k = label();
    1605 //  assume( m_L->m[k] == p );
    1606 
    1607   if (sev() & not_sev)
    1608     return false;
    1609 
    1610   return _p_LmDivisibleByNoComp(lt(), m, t, r);
    1611 //  return p_LmShortDivisibleByNoComp(p, p_sev, product, not_sev, r);
    1612 }
    1613 #endif
    1614 
    1615 
    1616 /// TODO:
    1617 class CDivisorEnumerator: public SchreyerSyzygyComputationFlags
    1618 {
    1619   private:
    1620     const CReducerFinder& m_reds;
    1621     const poly m_product;
    1622     const unsigned long m_not_sev;
    1623     const long m_comp;
    1624 
    1625     CReducerFinder::CReducersHash::const_iterator m_itr;
    1626     CReducerFinder::TReducers::const_iterator m_current, m_finish;
    1627 
    1628     bool m_active;
    1629 
    1630   public:
    1631     CDivisorEnumerator(const CReducerFinder& self, const poly product):
    1632         SchreyerSyzygyComputationFlags(self),
    1633         m_reds(self),
    1634         m_product(product),
    1635         m_not_sev(~p_GetShortExpVector(product, m_rBaseRing)),
    1636         m_comp(p_GetComp(product, m_rBaseRing)),
    1637         m_itr(), m_current(), m_finish(),
    1638         m_active(false)
    1639     {
    1640       assume( m_comp >= 0 );
    1641       assume( m_reds.m_L != NULL ); /// TODO: m_L should stay the same!!!
    1642 
    1643       assume( product != NULL ); // may have no coeff yet :(
    1644 //      assume ( !n_IsZero( p_GetCoeff(product, m_rBaseRing), m_rBaseRing ) );
    1645     }
    1646 
    1647     inline bool Reset()
    1648     {
    1649       m_active = false;
    1650 
    1651       m_itr = m_reds.m_hash.find(m_comp);
    1652 
    1653       if( m_itr == m_reds.m_hash.end() )
    1654         return false;
    1655 
    1656       assume( m_itr->first == m_comp );
    1657 
    1658       m_current = (m_itr->second).begin();
    1659       m_finish = (m_itr->second).end();
    1660 
    1661       if (m_current == m_finish)
    1662         return false;
    1663 
    1664 //      m_active = true;
    1665       return true;
    1666     }
    1667 
    1668     const CLeadingTerm& Current() const
    1669     {
    1670       assume( m_active );
    1671       assume( m_current != m_finish );
    1672 
    1673       return *(*m_current);
    1674     }
    1675 
    1676     inline bool MoveNext()
    1677     {
    1678       assume( m_current != m_finish );
    1679 
    1680       if( m_active )
    1681         ++m_current;
    1682       else
    1683         m_active = true; // for Current()
    1684 
    1685       // looking for the next good entry
    1686       for( ; m_current != m_finish; ++m_current )
    1687       {
    1688         assume( Current().CheckLT( m_reds.m_L ) );
    1689 
    1690         if( Current().DivisibilityCheck(m_product, m_not_sev, m_rBaseRing) )
    1691         {
    1692 //          m_active = true;
    1693           assume( Current().CheckLT( m_reds.m_L ) );
    1694           return true;
    1695         }
    1696         assume( Current().CheckLT( m_reds.m_L ) );
    1697       }
    1698 
    1699       // the end... :(
    1700       assume( m_current == m_finish );
    1701 
    1702       m_active = false;
    1703       return false;
    1704     }
    1705 };
    1706 
    1707 
    1708 bool CReducerFinder::IsDivisible(const poly product) const
    1709 {
    1710   assume( product != NULL );
    1711 
    1712   // NOTE: q may have no coeff!!!
    1713 
    1714   CDivisorEnumerator itr(*this, product);
    1715   if( !itr.Reset() )
    1716     return false;
    1717 
    1718   return itr.MoveNext();
    1719 
    1720 }
    1721 
    1722 #if NOPRODUCT
    1723 
    1724 /// TODO:
    1725 class CDivisorEnumerator2: public SchreyerSyzygyComputationFlags
    1726 {
    1727   private:
    1728     const CReducerFinder& m_reds;
    1729     const poly m_multiplier, m_term;
    1730     const unsigned long m_not_sev;
    1731     const long m_comp;
    1732 
    1733     CReducerFinder::CReducersHash::const_iterator m_itr;
    1734     CReducerFinder::TReducers::const_iterator m_current, m_finish;
    1735 
    1736     bool m_active;
    1737 
    1738   public:
    1739     CDivisorEnumerator2(const CReducerFinder& self, const poly m, const poly t):
    1740         SchreyerSyzygyComputationFlags(self),
    1741         m_reds(self),
    1742         m_multiplier(m), m_term(t),
    1743         m_not_sev(~p_GetShortExpVector(m, t, m_rBaseRing)),
    1744         m_comp(p_GetComp(t, m_rBaseRing)),
    1745         m_itr(), m_current(), m_finish(),
    1746         m_active(false)
    1747     {
    1748       assume( m_comp >= 0 );
    1749       assume( m_reds.m_L != NULL );
    1750       assume( m_multiplier != NULL );
    1751       assume( m_term != NULL );
    1752 
    1753       assume( m != NULL );
    1754       assume( t != NULL );
    1755       assume ( !n_IsZero( pGetCoeff(m), m_rBaseRing->cf ) );
    1756       assume ( !n_IsZero( pGetCoeff(t), m_rBaseRing->cf ) );
    1757 
    1758       p_Test(m, m_rBaseRing);
    1759 
    1760     }
    1761 
    1762     inline bool Reset()
    1763     {
    1764       m_active = false;
    1765 
    1766       m_itr = m_reds.m_hash.find(m_comp);
    1767 
    1768       if( m_itr == m_reds.m_hash.end() )
    1769         return false;
    1770 
    1771       assume( m_itr->first == m_comp );
    1772 
    1773       m_current = (m_itr->second).begin();
    1774       m_finish = (m_itr->second).end();
    1775 
    1776       if (m_current == m_finish)
    1777         return false;
    1778 
    1779       return true;
    1780     }
    1781 
    1782     const CLeadingTerm& Current() const
    1783     {
    1784       assume( m_active );
    1785       assume( m_current != m_finish );
    1786 
    1787       return *(*m_current);
    1788     }
    1789 
    1790     inline bool MoveNext()
    1791     {
    1792       assume( m_current != m_finish );
    1793 
    1794       if( m_active )
    1795         ++m_current;
    1796       else
    1797         m_active = true;
    1798 
    1799 
    1800       // looking for the next good entry
    1801       for( ; m_current != m_finish; ++m_current )
    1802       {
    1803         assume( Current().CheckLT( m_reds.m_L ) );
    1804 
    1805         if( Current().DivisibilityCheck(m_multiplier, m_term, m_not_sev, m_rBaseRing) )
    1806         {
    1807 //          m_active = true;
    1808           assume( Current().CheckLT( m_reds.m_L ) );
    1809           return true;
    1810 
    1811         }
    1812         assume( Current().CheckLT( m_reds.m_L ) );
    1813       }
    1814 
    1815       // the end... :(
    1816       assume( m_current == m_finish );
    1817 
    1818       m_active = false;
    1819       return false;
    1820     }
    1821 };
    1822 
    1823 poly CReducerFinder::FindReducer(const poly multiplier, const poly t,
    1824                                  const poly syzterm,
    1825                                  const CReducerFinder& syz_checker) const
    1826 {
    1827   const ring& r = m_rBaseRing;
    1828 
    1829   p_Test(multiplier, r);
    1830 
    1831   CDivisorEnumerator2 itr(*this, multiplier, t);
    1832   if( !itr.Reset() )
    1833     return NULL;
    1834 
    1835   // don't care about the module component of multiplier (as it may be the syzygy term)
    1836   // product = multiplier * t?
    1837 
    1838   assume( multiplier != NULL ); assume( t != NULL );
    1839 
    1840   const ideal& L = m_L; assume( L != NULL ); // for debug/testing only!
    1841 
    1842   long c = 0;
    1843 
    1844   if (syzterm != NULL)
    1845     c = p_GetComp(syzterm, r) - 1;
    1846 
    1847   assume( c >= 0 && c < IDELEMS(L) );
    1848 
    1849   p_Test(multiplier, r);
    1850 
    1851   const BOOLEAN to_check = (syz_checker.IsNonempty()); // OPT__TAILREDSYZ &&
    1852 
    1853 //  const poly q = p_One(r);
    1854   const poly q = p_New(r); pNext(q) = NULL;
    1855 
    1856   assume( pNext(q) == NULL );
    1857 
    1858   p_Test(multiplier, r);
    1859   while( itr.MoveNext() )
    1860   {
    1861     assume( itr.Current().CheckLT( L ) ); // ???
    1862 
    1863     const poly p = itr.Current().lt(); // ???
    1864     const int k  = itr.Current().label();
    1865 
    1866     p_ExpVectorSum(q, multiplier, t, r); // q == product == multiplier * t // TODO: do it once?
    1867     p_ExpVectorDiff(q, q, p, r); // (LM(product) / LM(L[k]))
    1868 
    1869     p_SetComp(q, k + 1, r);
    1870     p_Setm(q, r);
    1871 
    1872     p_Test(multiplier, r);
    1873 
    1874     // cannot allow something like: a*gen(i) - a*gen(i)
    1875     if (syzterm != NULL && (k == c))
    1876       if (p_ExpVectorEqual(syzterm, q, r))
    1877       {
    1878         assume( itr.Current().CheckLT( L ) ); // ???
    1879         continue;
    1880       }
    1881 
    1882     // while the complement (the fraction) is not reducible by leading syzygies
    1883     if( to_check && syz_checker.IsDivisible(q) )
    1884     {
    1885       assume( itr.Current().CheckLT( L ) ); // ???
    1886       continue;
    1887     }
    1888 
    1889     number n = n_Mult( pGetCoeff(multiplier), pGetCoeff(t), r->cf);
    1890 
    1891 #if NODIVISION
    1892     // we assume all leading coeffs to be 1!
    1893     assume( n_IsOne(pGetCoeff(p), r->cf) );
    1894 #else
    1895     if( !n_IsOne( pGetCoeff(p), r ) )
    1896       n = n_Div(n, pGetCoeff(p), r->cf);
    1897 #endif
    1898 
    1899     p_SetCoeff0(q, n_InpNeg(n, r->cf), r);
    1900 //    n_Delete(&n, r);
    1901 
    1902     p_Test(multiplier, r);
    1903     p_Test(q, r);
    1904 
    1905     assume( itr.Current().CheckLT( L ) ); // ???
    1906     return q;
    1907   }
    1908 
    1909   p_LmFree(q, r);
    1910 
    1911   p_Test(multiplier, r);
    1912 
    1913   return NULL;
    1914 
    1915 }
    1916 #endif
    1917 
    1918 
    1919 poly CReducerFinder::FindReducer(const poly product, const poly syzterm, const CReducerFinder& syz_checker) const
    1920 {
    1921   CDivisorEnumerator itr(*this, product);
    1922   if( !itr.Reset() )
    1923     return NULL;
    1924 
    1925 
    1926 
    1927   const ring& r = m_rBaseRing;
    1928 
    1929   assume( product != NULL );
    1930 
    1931   const ideal& L = m_L; assume( L != NULL ); // for debug/testing only!
    1932 
    1933   long c = 0;
    1934 
    1935   if (syzterm != NULL)
    1936     c = p_GetComp(syzterm, r) - 1;
    1937 
    1938   assume( c >= 0 && c < IDELEMS(L) );
    1939 
    1940   const BOOLEAN to_check = (syz_checker.IsNonempty()); // OPT__TAILREDSYZ &&
    1941 
    1942   const poly q = p_New(r); pNext(q) = NULL;
    1943 
    1944   while( itr.MoveNext() )
    1945   {
    1946     assume( itr.Current().CheckLT( L ) ); // ???
    1947 
    1948     const poly p = itr.Current().lt(); // ??
    1949     const int k  = itr.Current().label();
    1950 
    1951     p_ExpVectorDiff(q, product, p, r); // (LM(product) / LM(L[k]))
    1952     p_SetComp(q, k + 1, r);
    1953     p_Setm(q, r);
    1954 
    1955     // cannot allow something like: a*gen(i) - a*gen(i)
    1956     if (syzterm != NULL && (k == c))
    1957       if (p_ExpVectorEqual(syzterm, q, r))
    1958       {
    1959         assume( itr.Current().CheckLT( L ) ); // ???
    1960         continue;
    1961       }
    1962 
    1963     // while the complement (the fraction) is not reducible by leading syzygies
    1964     if( to_check && syz_checker.IsDivisible(q) ) // ?????
    1965     {
    1966       assume( itr.Current().CheckLT( L ) ); // ???
    1967       continue;
    1968     }
    1969 
    1970 
    1971 #if NODIVISION
    1972     assume( n_IsOne(p_GetCoeff(p, r), r->cf) );
    1973     p_SetCoeff0(q, n_InpNeg( n_Copy(pGetCoeff(product), r->cf), r->cf), r);
    1974 #else
    1975     p_SetCoeff0(q, n_InpNeg( n_Div( pGetCoeff(product), p_GetCoeff(p), r->cf), r->cf), r);
    1976 #endif
    1977 
    1978     assume( itr.Current().CheckLT( L ) ); // ???
    1979     return q;
    1980   }
    1981 
    1982 
    1983 
    1984 /*
    1985   const long comp = p_GetComp(product, r);
    1986   const unsigned long not_sev = ~p_GetShortExpVector(product, r);
    1987 
    1988   assume( comp >= 0 );
    1989 
    1990 //   for( int k = IDELEMS(L)-1; k>= 0; k-- )
    1991 //   {
    1992 //     const poly p = L->m[k];
    1993 //
    1994 //     if ( p_GetComp(p, r) != comp )
    1995 //       continue;
    1996 //
    1997 //     const unsigned long p_sev = p_GetShortExpVector(p, r); // to be stored in m_hash!!!
    1998 
    1999    // looking for an appropriate diviser p = L[k]...
    2000   CReducersHash::const_iterator it = m_hash.find(comp); // same module component
    2001 
    2002   if( it == m_hash.end() )
    2003     return NULL;
    2004 
    2005   assume( m_L != NULL );
    2006 
    2007   const TReducers& reducers = it->second;
    2008 
    2009   const BOOLEAN to_check = (syz_checker.IsNonempty()); // OPT__TAILREDSYZ &&
    2010 
    2011   const poly q = p_New(r); pNext(q) = NULL;
    2012 
    2013   for(TReducers::const_iterator vit = reducers.begin(); vit != reducers.end(); vit++ )
    2014   {
    2015     const poly p = (*vit)->lt(); // ???
    2016 
    2017     assume( p_GetComp(p, r) == comp );
    2018 
    2019     const int k = (*vit)->label();
    2020 
    2021     assume( L->m[k] == p ); // CheckLT
    2022 
    2023     const unsigned long p_sev = (*vit)->sev();
    2024 
    2025     assume( p_sev == p_GetShortExpVector(p, r) );
    2026 
    2027     if( !p_LmShortDivisibleByNoComp(p, p_sev, product, not_sev, r) )
    2028       continue;
    2029 
    2030 //     // ... which divides the product, looking for the _1st_ appropriate one!
    2031 //     if( !p_LmDivisibleByNoComp(p, product, r) ) // included inside  p_LmShortDivisibleBy!
    2032 //       continue;
    2033 
    2034     p_ExpVectorDiff(q, product, p, r); // (LM(product) / LM(L[k]))
    2035     p_SetComp(q, k + 1, r);
    2036     p_Setm(q, r);
    2037 
    2038     // cannot allow something like: a*gen(i) - a*gen(i)
    2039     if (syzterm != NULL && (k == c))
    2040       if (p_ExpVectorEqual(syzterm, q, r))
    2041       {
    2042         continue;
    2043       }
    2044 
    2045     // while the complement (the fraction) is not reducible by leading syzygies
    2046     if( to_check && syz_checker.IsDivisible(q) )
    2047     {
    2048       continue;
    2049     }
    2050 
    2051     p_SetCoeff0(q, n_InpNeg( n_Div( p_GetCoeff(product, r), p_GetCoeff(p, r), r), r), r);
    2052     return q;
    2053   }
    2054 */
    2055 
    2056   p_LmFree(q, r);
    2057   return NULL;
    2058 }
    2059 
    2060 
    2061 CLCM::CLCM(const ideal& L, const SchreyerSyzygyComputationFlags& flags):
    2062     SchreyerSyzygyComputationFlags(flags), std::vector<bool>(),
    2063     m_compute(false), m_N(rVar(flags.m_rBaseRing))
    2064 {
    2065   const ring& R = m_rBaseRing;
    2066   assume( flags.m_rBaseRing == R );
    2067   assume( R != NULL );
    2068 
    2069   assume( L != NULL );
    2070 
    2071   if( LIKELY( OPT__TAILREDSYZ && !OPT__HYBRIDNF && (L != NULL) )) // TODO: not hybrid!?
    2072   {
    2073     const int l = IDELEMS(L);
    2074 
    2075     assume( l > 0 );
    2076 
    2077     resize(l, false);
    2078 
    2079     for( int k = l - 1; k >= 0; k-- )
    2080     {
    2081       const poly a = L->m[k]; assume( a != NULL );
    2082 
    2083       for (unsigned int j = m_N; j > 0; j--)
    2084         if ( !(*this)[j] )
    2085           (*this)[j] = (p_GetExp(a, j, R) > 0);
    2086     }
    2087 
    2088     m_compute = true;
    2089   }
    2090 }
    2091 
    2092 
    2093 bool CLCM::Check(const poly m) const
    2094 {
    2095   assume( m != NULL );
    2096   if( m_compute && (m != NULL))
    2097   {
    2098     const ring& R = m_rBaseRing;
    2099 
    2100     assume( OPT__TAILREDSYZ && !OPT__HYBRIDNF );
    2101 
    2102     for (unsigned int j = m_N; j > 0; j--)
    2103       if ( (*this)[j] )
    2104         if(p_GetExp(m, j, R) > 0)
    2105           return true;
    2106 
    2107     return false;
    2108 
    2109   } else return true;
    2110 }
    2111 
    2112 
    2113 
    2114 
    2115 
    2116 // Vi-modeline: vim: filetype=c:syntax:shiftwidth=2:tabstop=8:textwidth=0:expandtab
  • Singular/dyn_modules/syzextra/syzextra.h

    r458174a r0f987ab  
    153153};
    154154
    155 
    156 
    157 
    158 
    159 
    160 
    161155/// Computation attribute storage
    162156struct SchreyerSyzygyComputationFlags
     
    437431    poly ComputeImage(poly multiplier, const int tail) const;
    438432
    439 
    440 
    441433  public:
    442434    /// just for testing via the wrapper below
  • Singular/gentable.cc

    r458174a r0f987ab  
    1616#include "kernel/mod2.h"
    1717// need to include all tokens: *_CMD:
    18 #include "grammar.h"
    19 #include "tok.h"
     18#include "Singular/tok.h"
    2019
    2120#ifdef HAVE_RINGS
  • Singular/grammar.cc

    r458174a r0f987ab  
    281281     RING_CMD = 272,
    282282     BEGIN_RING = 273,
    283      IDEAL_CMD = 274,
    284      MAP_CMD = 275,
    285      MATRIX_CMD = 276,
    286      MODUL_CMD = 277,
    287      NUMBER_CMD = 278,
    288      POLY_CMD = 279,
    289      RESOLUTION_CMD = 280,
    290      VECTOR_CMD = 281,
    291      BETTI_CMD = 282,
    292      E_CMD = 283,
    293      FETCH_CMD = 284,
    294      FREEMODULE_CMD = 285,
    295      KEEPRING_CMD = 286,
    296      IMAP_CMD = 287,
    297      KOSZUL_CMD = 288,
    298      MAXID_CMD = 289,
    299      MONOM_CMD = 290,
    300      PAR_CMD = 291,
    301      PREIMAGE_CMD = 292,
    302      VAR_CMD = 293,
    303      VALTVARS = 294,
    304      VMAXDEG = 295,
    305      VMAXMULT = 296,
    306      VNOETHER = 297,
    307      VMINPOLY = 298,
    308      END_RING = 299,
    309      CMD_1 = 300,
    310      CMD_2 = 301,
    311      CMD_3 = 302,
    312      CMD_12 = 303,
    313      CMD_13 = 304,
    314      CMD_23 = 305,
    315      CMD_123 = 306,
    316      CMD_M = 307,
    317      ROOT_DECL = 308,
    318      ROOT_DECL_LIST = 309,
    319      RING_DECL = 310,
    320      RING_DECL_LIST = 311,
    321      EXAMPLE_CMD = 312,
    322      EXPORT_CMD = 313,
    323      HELP_CMD = 314,
    324      KILL_CMD = 315,
    325      LIB_CMD = 316,
    326      LISTVAR_CMD = 317,
    327      SETRING_CMD = 318,
    328      TYPE_CMD = 319,
    329      STRINGTOK = 320,
    330      BLOCKTOK = 321,
    331      INT_CONST = 322,
    332      UNKNOWN_IDENT = 323,
    333      RINGVAR = 324,
    334      PROC_DEF = 325,
    335      APPLY = 326,
    336      ASSUME_CMD = 327,
    337      BREAK_CMD = 328,
    338      CONTINUE_CMD = 329,
    339      ELSE_CMD = 330,
    340      EVAL = 331,
    341      QUOTE = 332,
    342      FOR_CMD = 333,
    343      IF_CMD = 334,
    344      SYS_BREAK = 335,
    345      WHILE_CMD = 336,
    346      RETURN = 337,
    347      PARAMETER = 338,
    348      SYSVAR = 339,
    349      UMINUS = 340
     283     BUCKET_CMD = 274,
     284     IDEAL_CMD = 275,
     285     MAP_CMD = 276,
     286     MATRIX_CMD = 277,
     287     MODUL_CMD = 278,
     288     NUMBER_CMD = 279,
     289     POLY_CMD = 280,
     290     RESOLUTION_CMD = 281,
     291     VECTOR_CMD = 282,
     292     BETTI_CMD = 283,
     293     E_CMD = 284,
     294     FETCH_CMD = 285,
     295     FREEMODULE_CMD = 286,
     296     KEEPRING_CMD = 287,
     297     IMAP_CMD = 288,
     298     KOSZUL_CMD = 289,
     299     MAXID_CMD = 290,
     300     MONOM_CMD = 291,
     301     PAR_CMD = 292,
     302     PREIMAGE_CMD = 293,
     303     VAR_CMD = 294,
     304     VALTVARS = 295,
     305     VMAXDEG = 296,
     306     VMAXMULT = 297,
     307     VNOETHER = 298,
     308     VMINPOLY = 299,
     309     END_RING = 300,
     310     CMD_1 = 301,
     311     CMD_2 = 302,
     312     CMD_3 = 303,
     313     CMD_12 = 304,
     314     CMD_13 = 305,
     315     CMD_23 = 306,
     316     CMD_123 = 307,
     317     CMD_M = 308,
     318     ROOT_DECL = 309,
     319     ROOT_DECL_LIST = 310,
     320     RING_DECL = 311,
     321     RING_DECL_LIST = 312,
     322     EXAMPLE_CMD = 313,
     323     EXPORT_CMD = 314,
     324     HELP_CMD = 315,
     325     KILL_CMD = 316,
     326     LIB_CMD = 317,
     327     LISTVAR_CMD = 318,
     328     SETRING_CMD = 319,
     329     TYPE_CMD = 320,
     330     STRINGTOK = 321,
     331     BLOCKTOK = 322,
     332     INT_CONST = 323,
     333     UNKNOWN_IDENT = 324,
     334     RINGVAR = 325,
     335     PROC_DEF = 326,
     336     APPLY = 327,
     337     ASSUME_CMD = 328,
     338     BREAK_CMD = 329,
     339     CONTINUE_CMD = 330,
     340     ELSE_CMD = 331,
     341     EVAL = 332,
     342     QUOTE = 333,
     343     FOR_CMD = 334,
     344     IF_CMD = 335,
     345     SYS_BREAK = 336,
     346     WHILE_CMD = 337,
     347     RETURN = 338,
     348     PARAMETER = 339,
     349     SYSVAR = 340,
     350     UMINUS = 341
    350351   };
    351352#endif
     
    364365
    365366/* Line 264 of yacc.c  */
    366 #line 367 "grammar.cc"
     367#line 368 "grammar.cc"
    367368
    368369#ifdef short
     
    579580#define YYFINAL  2
    580581/* YYLAST -- Last index in YYTABLE.  */
    581 #define YYLAST   2560
     582#define YYLAST   2583
    582583
    583584/* YYNTOKENS -- Number of terminals.  */
    584 #define YYNTOKENS  102
     585#define YYNTOKENS  103
    585586/* YYNNTS -- Number of nonterminals.  */
    586587#define YYNNTS  44
     
    592593/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX.  */
    593594#define YYUNDEFTOK  2
    594 #define YYMAXUTOK   340
     595#define YYMAXUTOK   341
    595596
    596597#define YYTRANSLATE(YYX)                                                \
     
    603604       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
    604605       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
    605        2,     2,     2,     2,     2,     2,     2,     2,    95,     2,
    606       98,    99,     2,    87,    93,    88,   100,    89,     2,     2,
    607        2,     2,     2,     2,     2,     2,     2,     2,    96,    94,
    608       86,    85,     2,     2,     2,     2,     2,     2,     2,     2,
     606       2,     2,     2,     2,     2,     2,     2,     2,    96,     2,
     607      99,   100,     2,    88,    94,    89,   101,    90,     2,     2,
     608       2,     2,     2,     2,     2,     2,     2,     2,    97,    95,
     609      87,    86,     2,     2,     2,     2,     2,     2,     2,     2,
    609610       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
    610611       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
    611        2,    90,     2,    91,    92,     2,   101,     2,     2,     2,
     612       2,    91,     2,    92,    93,     2,   102,     2,     2,     2,
    612613       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
    613614       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     
    634635      65,    66,    67,    68,    69,    70,    71,    72,    73,    74,
    635636      75,    76,    77,    78,    79,    80,    81,    82,    83,    84,
    636       97
     637      85,    98
    637638};
    638639
     
    665666static const yytype_int16 yyrhs[] =
    666667{
    667      103,     0,    -1,    -1,   103,   104,    -1,   105,    -1,   107,
    668       94,    -1,   119,    94,    -1,   145,    -1,    80,    -1,    94,
    669       -1,     1,    94,    -1,   140,    -1,   141,    -1,   106,    -1,
    670      142,    -1,   143,    -1,   128,    -1,   129,    -1,   130,    -1,
    671       57,    66,    -1,   108,    -1,   131,    -1,   132,    -1,   133,
    672       -1,   144,    -1,   135,    -1,   136,    -1,   138,    -1,   139,
    673       -1,   117,   110,    -1,    69,    -1,   118,    -1,   109,    11,
    674      109,    -1,   111,   100,   109,    -1,   109,    98,    99,    -1,
    675      109,    98,   110,    99,    -1,    90,   110,    91,    -1,    67,
    676       -1,    84,    -1,   120,    -1,    16,    98,   111,    99,    -1,
    677       53,    98,   111,    99,    -1,    54,    98,   110,    99,    -1,
    678       54,    98,    99,    -1,    55,    98,   111,    99,    -1,    56,
    679       98,   110,    99,    -1,    56,    98,    99,    -1,    45,    98,
    680      111,    99,    -1,    48,    98,   111,    99,    -1,    49,    98,
    681      111,    99,    -1,    51,    98,   111,    99,    -1,    46,    98,
    682      111,    93,   111,    99,    -1,    48,    98,   111,    93,   111,
    683       99,    -1,    50,    98,   111,    93,   111,    99,    -1,    51,
    684       98,   111,    93,   111,    99,    -1,    47,    98,   111,    93,
    685      111,    93,   111,    99,    -1,    49,    98,   111,    93,   111,
    686       93,   111,    99,    -1,    50,    98,   111,    93,   111,    93,
    687      111,    99,    -1,    51,    98,   111,    93,   111,    93,   111,
    688       99,    -1,    52,    98,    99,    -1,    52,    98,   110,    99,
    689       -1,   127,    98,   111,    93,   111,    93,   111,    99,    -1,
    690      127,    98,   111,    99,    -1,    17,    98,   121,    93,   121,
    691       93,   125,    99,    -1,    17,    98,   111,    99,    -1,   118,
    692       12,    66,    -1,    98,   110,    99,    -1,   110,    93,   111,
    693       -1,   111,    -1,   116,    -1,   109,    -1,   111,    90,   111,
    694       93,   111,    91,    -1,   111,    90,   111,    91,    -1,    71,
    695       98,   111,    93,    45,    99,    -1,    71,    98,   111,    93,
    696       48,    99,    -1,    71,    98,   111,    93,    49,    99,    -1,
    697       71,    98,   111,    93,    51,    99,    -1,    71,    98,   111,
    698       93,    52,    99,    -1,    71,    98,   111,    93,   111,    99,
    699       -1,   113,   111,   115,    -1,   113,   111,    85,   111,   115,
    700       -1,   114,   111,    93,   111,   115,    -1,    -1,    76,    98,
    701      112,   111,    99,    -1,    77,    98,    -1,    72,    98,    -1,
    702       99,    -1,   111,    10,    -1,   111,     7,    -1,   111,    87,
    703      111,    -1,   111,    88,   111,    -1,   111,    89,   111,    -1,
    704      111,    92,   111,    -1,   111,    86,   111,    -1,   111,    95,
    705      111,    -1,   111,     9,   111,    -1,   111,     4,   111,    -1,
    706      111,     3,   111,    -1,   111,    96,   111,    -1,     8,   111,
    707       -1,    88,   111,    -1,   119,   126,    -1,   110,    85,    -1,
    708       68,    -1,   101,   111,   101,    -1,    53,   109,    -1,    54,
    709      109,    -1,    55,   109,    -1,    56,   109,    -1,   127,   109,
    710       90,   111,    91,    90,   111,    91,    -1,   127,   109,    -1,
    711      119,    93,   109,    -1,    16,   109,    -1,    65,    -1,   111,
    712       -1,    98,   111,    93,   110,    99,    -1,    68,    -1,   122,
    713       -1,   122,    98,   110,    99,    -1,   123,    -1,   123,    93,
    714      124,    -1,   123,    -1,    98,   124,    99,    -1,    85,    -1,
    715       21,    -1,    15,    -1,    14,    -1,    86,   120,    -1,    59,
    716       65,    94,    -1,    59,    94,    -1,    57,    65,    94,    -1,
    717       58,   110,    -1,    60,   109,    -1,   132,    93,   109,    -1,
    718       62,    98,    53,    99,    -1,    62,    98,    54,    99,    -1,
    719       62,    98,    55,    99,    -1,    62,    98,    56,    99,    -1,
    720       62,    98,    17,    99,    -1,    62,    98,   127,    99,    -1,
    721       62,    98,    16,    99,    -1,    62,    98,   109,    99,    -1,
    722       62,    98,   109,    93,    53,    99,    -1,    62,    98,   109,
    723       93,    54,    99,    -1,    62,    98,   109,    93,    55,    99,
    724       -1,    62,    98,   109,    93,    56,    99,    -1,    62,    98,
    725      109,    93,    17,    99,    -1,    62,    98,   109,    93,   127,
    726       99,    -1,    62,    98,   109,    93,    16,    99,    -1,    62,
    727       98,    99,    -1,    17,    -1,   134,   109,   126,   121,    93,
    728      121,    93,   125,    -1,   134,   109,    -1,   134,   109,   126,
    729      109,    -1,   134,   109,   126,   109,    90,   110,    91,    -1,
    730       84,   120,    -1,    63,    -1,    31,    -1,   137,   111,    -1,
    731       64,   111,    -1,   110,    -1,    79,    98,   111,    99,    66,
    732       -1,    75,    66,    -1,    79,    98,   111,    99,    73,    -1,
    733       73,    -1,    74,    -1,    81,    65,    66,    -1,    78,    65,
    734       65,    65,    66,    -1,    16,   118,    66,    -1,    70,    65,
    735       66,    -1,    70,    65,    65,    66,    -1,    83,   119,    -1,
    736       83,   111,    -1,    82,    98,   110,    99,    -1,    82,    98,
    737       99,    -1
     668     104,     0,    -1,    -1,   104,   105,    -1,   106,    -1,   108,
     669      95,    -1,   120,    95,    -1,   146,    -1,    81,    -1,    95,
     670      -1,     1,    95,    -1,   141,    -1,   142,    -1,   107,    -1,
     671     143,    -1,   144,    -1,   129,    -1,   130,    -1,   131,    -1,
     672      58,    67,    -1,   109,    -1,   132,    -1,   133,    -1,   134,
     673      -1,   145,    -1,   136,    -1,   137,    -1,   139,    -1,   140,
     674      -1,   118,   111,    -1,    70,    -1,   119,    -1,   110,    11,
     675     110,    -1,   112,   101,   110,    -1,   110,    99,   100,    -1,
     676     110,    99,   111,   100,    -1,    91,   111,    92,    -1,    68,
     677      -1,    85,    -1,   121,    -1,    16,    99,   112,   100,    -1,
     678      54,    99,   112,   100,    -1,    55,    99,   111,   100,    -1,
     679      55,    99,   100,    -1,    56,    99,   112,   100,    -1,    57,
     680      99,   111,   100,    -1,    57,    99,   100,    -1,    46,    99,
     681     112,   100,    -1,    49,    99,   112,   100,    -1,    50,    99,
     682     112,   100,    -1,    52,    99,   112,   100,    -1,    47,    99,
     683     112,    94,   112,   100,    -1,    49,    99,   112,    94,   112,
     684     100,    -1,    51,    99,   112,    94,   112,   100,    -1,    52,
     685      99,   112,    94,   112,   100,    -1,    48,    99,   112,    94,
     686     112,    94,   112,   100,    -1,    50,    99,   112,    94,   112,
     687      94,   112,   100,    -1,    51,    99,   112,    94,   112,    94,
     688     112,   100,    -1,    52,    99,   112,    94,   112,    94,   112,
     689     100,    -1,    53,    99,   100,    -1,    53,    99,   111,   100,
     690      -1,   128,    99,   112,    94,   112,    94,   112,   100,    -1,
     691     128,    99,   112,   100,    -1,    17,    99,   122,    94,   122,
     692      94,   126,   100,    -1,    17,    99,   112,   100,    -1,   119,
     693      12,    67,    -1,    99,   111,   100,    -1,   111,    94,   112,
     694      -1,   112,    -1,   117,    -1,   110,    -1,   112,    91,   112,
     695      94,   112,    92,    -1,   112,    91,   112,    92,    -1,    72,
     696      99,   112,    94,    46,   100,    -1,    72,    99,   112,    94,
     697      49,   100,    -1,    72,    99,   112,    94,    50,   100,    -1,
     698      72,    99,   112,    94,    52,   100,    -1,    72,    99,   112,
     699      94,    53,   100,    -1,    72,    99,   112,    94,   112,   100,
     700      -1,   114,   112,   116,    -1,   114,   112,    86,   112,   116,
     701      -1,   115,   112,    94,   112,   116,    -1,    -1,    77,    99,
     702     113,   112,   100,    -1,    78,    99,    -1,    73,    99,    -1,
     703     100,    -1,   112,    10,    -1,   112,     7,    -1,   112,    88,
     704     112,    -1,   112,    89,   112,    -1,   112,    90,   112,    -1,
     705     112,    93,   112,    -1,   112,    87,   112,    -1,   112,    96,
     706     112,    -1,   112,     9,   112,    -1,   112,     4,   112,    -1,
     707     112,     3,   112,    -1,   112,    97,   112,    -1,     8,   112,
     708      -1,    89,   112,    -1,   120,   127,    -1,   111,    86,    -1,
     709      69,    -1,   102,   112,   102,    -1,    54,   110,    -1,    55,
     710     110,    -1,    56,   110,    -1,    57,   110,    -1,   128,   110,
     711      91,   112,    92,    91,   112,    92,    -1,   128,   110,    -1,
     712     120,    94,   110,    -1,    16,   110,    -1,    66,    -1,   112,
     713      -1,    99,   112,    94,   111,   100,    -1,    69,    -1,   123,
     714      -1,   123,    99,   111,   100,    -1,   124,    -1,   124,    94,
     715     125,    -1,   124,    -1,    99,   125,   100,    -1,    86,    -1,
     716      22,    -1,    15,    -1,    14,    -1,    87,   121,    -1,    60,
     717      66,    95,    -1,    60,    95,    -1,    58,    66,    95,    -1,
     718      59,   111,    -1,    61,   110,    -1,   133,    94,   110,    -1,
     719      63,    99,    54,   100,    -1,    63,    99,    55,   100,    -1,
     720      63,    99,    56,   100,    -1,    63,    99,    57,   100,    -1,
     721      63,    99,    17,   100,    -1,    63,    99,   128,   100,    -1,
     722      63,    99,    16,   100,    -1,    63,    99,   110,   100,    -1,
     723      63,    99,   110,    94,    54,   100,    -1,    63,    99,   110,
     724      94,    55,   100,    -1,    63,    99,   110,    94,    56,   100,
     725      -1,    63,    99,   110,    94,    57,   100,    -1,    63,    99,
     726     110,    94,    17,   100,    -1,    63,    99,   110,    94,   128,
     727     100,    -1,    63,    99,   110,    94,    16,   100,    -1,    63,
     728      99,   100,    -1,    17,    -1,   135,   110,   127,   122,    94,
     729     122,    94,   126,    -1,   135,   110,    -1,   135,   110,   127,
     730     110,    -1,   135,   110,   127,   110,    91,   111,    92,    -1,
     731      85,   121,    -1,    64,    -1,    32,    -1,   138,   112,    -1,
     732      65,   112,    -1,   111,    -1,    80,    99,   112,   100,    67,
     733      -1,    76,    67,    -1,    80,    99,   112,   100,    74,    -1,
     734      74,    -1,    75,    -1,    82,    66,    67,    -1,    79,    66,
     735      66,    66,    67,    -1,    16,   119,    67,    -1,    71,    66,
     736      67,    -1,    71,    66,    66,    67,    -1,    84,   120,    -1,
     737      84,   112,    -1,    83,    99,   111,   100,    -1,    83,    99,
     738     100,    -1
    738739};
    739740
     
    741742static const yytype_uint16 yyrline[] =
    742743{
    743        0,   316,   316,   318,   352,   353,   355,   357,   361,   366,
    744      368,   419,   420,   421,   422,   423,   424,   425,   426,   430,
    745      433,   434,   435,   436,   437,   438,   439,   440,   441,   444,
    746      451,   456,   460,   464,   468,   472,   486,   514,   538,   544,
    747      550,   554,   558,   562,   566,   570,   574,   578,   582,   586,
    748      590,   594,   598,   602,   606,   610,   614,   618,   622,   626,
    749      630,   636,   640,   644,   648,   652,   657,   661,   672,   678,
    750      683,   684,   688,   692,   696,   700,   704,   708,   712,   716,
    751      720,   737,   744,   743,   761,   769,   777,   786,   790,   794,
    752      798,   802,   806,   810,   814,   818,   822,   826,   830,   834,
    753      846,   853,   854,   873,   874,   886,   891,   896,   900,   904,
    754      940,   966,   987,   995,   999,  1000,  1014,  1022,  1031,  1076,
    755     1077,  1086,  1087,  1093,  1100,  1102,  1104,  1113,  1118,  1123,
    756     1130,  1138,  1150,  1167,  1187,  1191,  1195,  1200,  1204,  1208,
    757     1212,  1216,  1221,  1227,  1233,  1239,  1245,  1251,  1257,  1269,
    758     1276,  1280,  1317,  1324,  1329,  1342,  1349,  1349,  1352,  1420,
    759     1424,  1453,  1466,  1483,  1492,  1497,  1505,  1517,  1536,  1546,
    760     1565,  1588,  1594,  1606,  1612
     744       0,   317,   317,   319,   353,   354,   356,   358,   362,   367,
     745     369,   420,   421,   422,   423,   424,   425,   426,   427,   431,
     746     434,   435,   436,   437,   438,   439,   440,   441,   442,   445,
     747     452,   457,   461,   465,   469,   473,   487,   515,   539,   545,
     748     551,   555,   559,   563,   567,   571,   575,   579,   583,   587,
     749     591,   595,   599,   603,   607,   611,   615,   619,   623,   627,
     750     631,   637,   641,   645,   649,   653,   658,   662,   673,   679,
     751     684,   685,   689,   693,   697,   701,   705,   709,   713,   717,
     752     721,   738,   745,   744,   762,   770,   778,   787,   791,   795,
     753     799,   803,   807,   811,   815,   819,   823,   827,   831,   835,
     754     847,   854,   855,   874,   875,   887,   892,   897,   901,   905,
     755     941,   967,   988,   996,  1000,  1001,  1015,  1023,  1032,  1077,
     756    1078,  1087,  1088,  1094,  1101,  1103,  1105,  1114,  1119,  1124,
     757    1131,  1139,  1151,  1168,  1188,  1192,  1196,  1201,  1205,  1209,
     758    1213,  1217,  1222,  1228,  1234,  1240,  1246,  1252,  1258,  1270,
     759    1277,  1281,  1318,  1325,  1330,  1343,  1350,  1350,  1353,  1421,
     760    1425,  1454,  1467,  1484,  1493,  1498,  1506,  1518,  1537,  1547,
     761    1566,  1589,  1595,  1607,  1613
    761762};
    762763#endif
     
    770771  "MINUSMINUS", "NOT", "NOTEQUAL", "PLUSPLUS", "COLONCOLON", "ARROW",
    771772  "GRING_CMD", "BIGINTMAT_CMD", "INTMAT_CMD", "PROC_CMD", "RING_CMD",
    772   "BEGIN_RING", "IDEAL_CMD", "MAP_CMD", "MATRIX_CMD", "MODUL_CMD",
    773   "NUMBER_CMD", "POLY_CMD", "RESOLUTION_CMD", "VECTOR_CMD", "BETTI_CMD",
    774   "E_CMD", "FETCH_CMD", "FREEMODULE_CMD", "KEEPRING_CMD", "IMAP_CMD",
    775   "KOSZUL_CMD", "MAXID_CMD", "MONOM_CMD", "PAR_CMD", "PREIMAGE_CMD",
    776   "VAR_CMD", "VALTVARS", "VMAXDEG", "VMAXMULT", "VNOETHER", "VMINPOLY",
    777   "END_RING", "CMD_1", "CMD_2", "CMD_3", "CMD_12", "CMD_13", "CMD_23",
    778   "CMD_123", "CMD_M", "ROOT_DECL", "ROOT_DECL_LIST", "RING_DECL",
     773  "BEGIN_RING", "BUCKET_CMD", "IDEAL_CMD", "MAP_CMD", "MATRIX_CMD",
     774  "MODUL_CMD", "NUMBER_CMD", "POLY_CMD", "RESOLUTION_CMD", "VECTOR_CMD",
     775  "BETTI_CMD", "E_CMD", "FETCH_CMD", "FREEMODULE_CMD", "KEEPRING_CMD",
     776  "IMAP_CMD", "KOSZUL_CMD", "MAXID_CMD", "MONOM_CMD", "PAR_CMD",
     777  "PREIMAGE_CMD", "VAR_CMD", "VALTVARS", "VMAXDEG", "VMAXMULT", "VNOETHER",
     778  "VMINPOLY", "END_RING", "CMD_1", "CMD_2", "CMD_3", "CMD_12", "CMD_13",
     779  "CMD_23", "CMD_123", "CMD_M", "ROOT_DECL", "ROOT_DECL_LIST", "RING_DECL",
    779780  "RING_DECL_LIST", "EXAMPLE_CMD", "EXPORT_CMD", "HELP_CMD", "KILL_CMD",
    780781  "LIB_CMD", "LISTVAR_CMD", "SETRING_CMD", "TYPE_CMD", "STRINGTOK",
     
    808809     315,   316,   317,   318,   319,   320,   321,   322,   323,   324,
    809810     325,   326,   327,   328,   329,   330,   331,   332,   333,   334,
    810      335,   336,   337,   338,   339,    61,    60,    43,    45,    47,
    811       91,    93,    94,    44,    59,    38,    58,   340,    40,    41,
    812       46,    96
     811     335,   336,   337,   338,   339,   340,    61,    60,    43,    45,
     812      47,    91,    93,    94,    44,    59,    38,    58,   341,    40,
     813      41,    46,    96
    813814};
    814815# endif
     
    817818static const yytype_uint8 yyr1[] =
    818819{
    819        0,   102,   103,   103,   104,   104,   104,   104,   104,   104,
    820      104,   105,   105,   105,   105,   105,   105,   105,   105,   106,
    821      107,   107,   107,   107,   107,   107,   107,   107,   107,   108,
    822      109,   109,   109,   109,   109,   109,   109,   109,   109,   109,
    823      109,   109,   109,   109,   109,   109,   109,   109,   109,   109,
    824      109,   109,   109,   109,   109,   109,   109,   109,   109,   109,
    825      109,   109,   109,   109,   109,   109,   109,   110,   110,   111,
    826      111,   111,   111,   111,   111,   111,   111,   111,   111,   111,
    827      111,   111,   112,   111,   113,   114,   115,   116,   116,   116,
    828      116,   116,   116,   116,   116,   116,   116,   116,   116,   116,
    829      116,   117,   117,   118,   118,   119,   119,   119,   119,   119,
    830      119,   119,   119,   120,   121,   121,   122,   123,   123,   124,
    831      124,   125,   125,   126,   127,   127,   127,   128,   129,   129,
    832      130,   131,   132,   132,   133,   133,   133,   133,   133,   133,
    833      133,   133,   133,   133,   133,   133,   133,   133,   133,   133,
    834      134,   135,   135,   135,   135,   136,   137,   137,   138,   139,
    835      139,   140,   140,   140,   140,   140,   141,   142,   143,   143,
    836      143,   144,   144,   145,   145
     820       0,   103,   104,   104,   105,   105,   105,   105,   105,   105,
     821     105,   106,   106,   106,   106,   106,   106,   106,   106,   107,
     822     108,   108,   108,   108,   108,   108,   108,   108,   108,   109,
     823     110,   110,   110,   110,   110,   110,   110,   110,   110,   110,
     824     110,   110,   110,   110,   110,   110,   110,   110,   110,   110,
     825     110,   110,   110,   110,   110,   110,   110,   110,   110,   110,
     826     110,   110,   110,   110,   110,   110,   110,   111,   111,   112,
     827     112,   112,   112,   112,   112,   112,   112,   112,   112,   112,
     828     112,   112,   113,   112,   114,   115,   116,   117,   117,   117,
     829     117,   117,   117,   117,   117,   117,   117,   117,   117,   117,
     830     117,   118,   118,   119,   119,   120,   120,   120,   120,   120,
     831     120,   120,   120,   121,   122,   122,   123,   124,   124,   125,
     832     125,   126,   126,   127,   128,   128,   128,   129,   130,   130,
     833     131,   132,   133,   133,   134,   134,   134,   134,   134,   134,
     834     134,   134,   134,   134,   134,   134,   134,   134,   134,   134,
     835     135,   136,   136,   136,   136,   137,   138,   138,   139,   140,
     836     140,   141,   141,   141,   141,   141,   142,   143,   144,   144,
     837     144,   145,   145,   146,   146
    837838};
    838839
     
    919920/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
    920921   STATE-NUM.  */
    921 #define YYPACT_NINF -361
     922#define YYPACT_NINF -362
    922923static const yytype_int16 yypact[] =
    923924{
    924     -361,   383,  -361,   -84,  1874,  -361,  -361,  1939,   -47,  -361,
    925     -361,   -34,   -27,   -23,   -19,   -15,     5,    32,    37,  2004,
    926     2069,  2134,  2199,   -26,  1874,   -61,  1874,    45,  -361,  1874,
    927     -361,  -361,  -361,  -361,    22,    51,    65,  -361,  -361,   100,
    928       73,    92,   130,    94,  -361,   139,   118,  2264,   153,   153,
    929     1874,  1874,  -361,  1874,  1874,  -361,  -361,  -361,     3,  -361,
    930       10,   -73,  1368,  1874,  1874,  -361,  1874,   211,   -48,  -361,
    931     2329,  -361,  -361,  -361,  -361,   128,  -361,  1874,  -361,  -361,
    932     1874,  -361,  -361,  -361,  -361,  -361,  -361,  -361,  -361,  -361,
    933      131,   -47,   133,   145,   150,   152,  -361,    24,   159,  1874,
    934      104,  1368,    -7,  2394,  1874,  1874,  1874,  1874,  1874,  1874,
    935     1874,  1484,  1874,   209,  1549,   248,  1874,   258,  1614,   264,
    936      187,  -361,   167,   196,  -361,   170,  1679,  1368,   113,  1874,
    937     -361,  -361,  -361,  -361,   213,  1874,   227,  1744,  1939,  1368,
    938      204,  -361,  -361,    24,   -66,   -69,     4,  -361,  1874,  1809,
    939     -361,  1874,  1874,  1874,  -361,  1874,  -361,  1874,  1874,  1874,
    940     1874,  1874,  1874,  1874,  1874,  1874,   166,   553,   167,   239,
    941     -361,  1874,  -361,  -361,  1874,    -9,  1874,    47,  1368,  1874,
    942     1874,  1549,  1874,  1614,  1874,   568,  -361,  1874,   583,   217,
    943      677,   692,   707,   184,   235,   722,   399,  -361,   -51,   737,
    944     -361,   -50,   752,  -361,   -37,  -361,  -361,    86,   116,   127,
    945      135,   138,   142,  -361,     8,   148,   246,  -361,   846,  1874,
    946      251,   861,  -361,  -361,   -21,  -361,  -361,  -361,  -361,  -361,
    947      -13,  1368,    50,   279,   279,  1397,    31,    31,    24,   414,
    948       19,  1383,    31,  -361,  1874,  -361,  -361,  1874,  -361,   287,
    949      508,  1874,   280,  2394,   568,   737,   -11,   752,    34,   508,
    950     -361,   876,  -361,  2394,  -361,  1874,  1874,  1874,  -361,  1874,
    951     -361,  1874,  1874,  -361,  -361,  -361,  -361,  -361,  -361,  -361,
    952     -361,  -361,  -361,  -361,  -361,  1367,  -361,  -361,  -361,  2459,
    953      891,   252,   -38,  -361,  -361,  -361,  1874,   906,   906,  1874,
    954     -361,   921,   206,  1368,   233,  -361,  -361,  1874,   236,  1015,
    955     1030,  1045,  1060,   523,   538,   241,   249,   256,   262,   271,
    956      288,   289,   189,   210,   240,   255,   261,  1075,  -361,  -361,
    957     -361,  -361,  1090,  -361,  -361,  1184,   242,  1874,  2394,    66,
    958      -62,  -361,  1874,  -361,  1874,  1874,  -361,  1874,  -361,  -361,
    959     -361,  -361,  -361,  -361,  -361,  -361,  -361,  -361,  -361,  -361,
    960     -361,  -361,  -361,  1874,  1874,   -30,   257,  -361,  -361,   277,
    961      291,  -361,   295,  1199,  1214,  1229,  1244,  1259,  1353,  -361,
    962      -62,   303,   302,  1874,  -361,  -361,  -361,  -361,  -361,  -361,
    963     -361,  -361,   277,  -361,    69,  -361,  -361
     925    -362,   383,  -362,   -84,  1887,  -362,  -362,  1953,   -75,  -362,
     926    -362,   -72,   -58,   -53,   -50,   -43,   -28,   -11,     2,  2019,
     927    2085,  2151,  2217,    17,  1887,   -47,  1887,     4,  -362,  1887,
     928    -362,  -362,  -362,  -362,    42,    16,    36,  -362,  -362,    92,
     929      44,    64,    99,    77,  -362,   115,    88,  2283,   123,   123,
     930    1887,  1887,  -362,  1887,  1887,  -362,  -362,  -362,   107,  -362,
     931      -2,   -65,  1374,  1887,  1887,  -362,  1887,   192,   -52,  -362,
     932    2349,  -362,  -362,  -362,  -362,   129,  -362,  1887,  -362,  -362,
     933    1887,  -362,  -362,  -362,  -362,  -362,  -362,  -362,  -362,  -362,
     934     121,   -75,   132,   135,   137,   141,  -362,    23,   147,  1887,
     935     210,  1374,   -10,  2415,  1887,  1887,  1887,  1887,  1887,  1887,
     936    1887,  1491,  1887,   262,  1557,   265,  1887,   385,  1623,  1317,
     937     166,  -362,   169,   170,  -362,   203,  1689,  1374,    40,  1887,
     938    -362,  -362,  -362,  -362,   200,  1887,   212,  1755,  1953,  1374,
     939     186,  -362,  -362,    23,   -56,   -74,     3,  -362,  1887,  1821,
     940    -362,  1887,  1887,  1887,  -362,  1887,  -362,  1887,  1887,  1887,
     941    1887,  1887,  1887,  1887,  1887,  1887,   238,   554,   169,   219,
     942    -362,  1887,  -362,  -362,  1887,    51,  1887,    76,  1374,  1887,
     943    1887,  1557,  1887,  1623,  1887,   569,  -362,  1887,   584,   194,
     944     679,   694,   709,   181,   280,   724,   399,  -362,   -49,   739,
     945    -362,   -41,   754,  -362,   -40,  -362,  -362,    39,    41,    69,
     946      79,    93,    95,  -362,    33,    98,   224,  -362,   849,  1887,
     947     227,   864,  -362,  -362,   -36,  -362,  -362,  -362,  -362,  -362,
     948     -22,  1374,   252,   163,   163,  1403,    30,    30,    23,   414,
     949      18,  1389,    30,  -362,  1887,  -362,  -362,  1887,  -362,  1332,
     950     509,  1887,   472,  2415,   569,   739,   -19,   754,   -18,   509,
     951    -362,   879,  -362,  2415,  -362,  1887,  1887,  1887,  -362,  1887,
     952    -362,  1887,  1887,  -362,  -362,  -362,  -362,  -362,  -362,  -362,
     953    -362,  -362,  -362,  -362,  -362,  1495,  -362,  -362,  -362,  2481,
     954     894,   233,   -35,  -362,  -362,  -362,  1887,   909,   909,  1887,
     955    -362,   924,   138,  1374,   213,  -362,  -362,  1887,   214,  1019,
     956    1034,  1049,  1064,   524,   539,   216,   218,   221,   222,   223,
     957     230,   232,   116,   118,   126,   139,   144,  1079,  -362,  -362,
     958    -362,  -362,  1094,  -362,  -362,  1189,   242,  1887,  2415,   -15,
     959     -64,  -362,  1887,  -362,  1887,  1887,  -362,  1887,  -362,  -362,
     960    -362,  -362,  -362,  -362,  -362,  -362,  -362,  -362,  -362,  -362,
     961    -362,  -362,  -362,  1887,  1887,   -31,   256,  -362,  -362,   225,
     962     204,  -362,   246,  1204,  1219,  1234,  1249,  1264,  1359,  -362,
     963     -64,   258,   254,  1887,  -362,  -362,  -362,  -362,  -362,  -362,
     964    -362,  -362,   225,  -362,   -14,  -362,  -362
    964965};
    965966
     
    967968static const yytype_int16 yypgoto[] =
    968969{
    969     -361,  -361,  -361,  -361,  -361,  -361,  -361,    -4,    -1,    48,
    970     -361,  -361,  -361,    79,  -361,  -361,   398,   360,   315,  -209,
    971     -361,  -360,    18,    33,   238,     0,  -361,  -361,  -361,  -361,
    972     -361,  -361,  -361,  -361,  -361,  -361,  -361,  -361,  -361,  -361,
    973     -361,  -361,  -361,  -361
     970    -362,  -362,  -362,  -362,  -362,  -362,  -362,    -4,    -1,    48,
     971    -362,  -362,  -362,  -168,  -362,  -362,   303,   308,   209,  -249,
     972    -362,  -361,   -80,   -17,   185,     0,  -362,  -362,  -362,  -362,
     973    -362,  -362,  -362,  -362,  -362,  -362,  -362,  -362,  -362,  -362,
     974    -362,  -362,  -362,  -362
    974975};
    975976
     
    981982static const yytype_int16 yytable[] =
    982983{
    983       61,    70,   148,   100,   123,   169,   368,   152,   153,   381,
    984       89,   154,   150,   155,   156,   113,   115,   117,   119,   148,
    985      151,   148,   125,   122,   151,   225,   154,   151,   330,   156,
    986      226,   154,   381,   124,   156,   331,   369,   170,   154,   120,
    987      121,   156,   151,   151,   304,   171,   172,    70,   274,   276,
    988      144,   103,    97,  -154,   308,   101,   151,   154,   148,   186,
    989      156,   379,   278,   151,   104,   168,   175,   101,   101,   101,
    990      101,   105,   151,   177,   101,   106,  -110,   127,   293,   107,
    991      151,   251,   151,   108,  -110,  -110,   294,   128,   305,   149,
    992      157,   158,   159,   160,   161,   139,   162,   147,   143,   163,
    993      164,   285,   146,   109,   165,   227,   149,   286,   149,   161,
    994      198,   166,   167,   201,   161,   148,   162,   204,   101,   165,
    995      160,   161,   214,   162,   165,   101,   215,   151,   178,   366,
    996      110,   165,   170,   306,   100,   111,   224,   158,   159,   160,
    997      161,  -152,   162,   126,   228,   149,   164,   185,   230,   129,
    998      165,   188,   190,   191,   192,   193,   194,   195,   196,   151,
    999      199,   243,   151,   130,   202,   367,   131,   249,   396,   152,
    1000      153,   132,   252,   154,   101,   155,   156,   218,   216,   217,
    1001      256,   148,   258,   221,   179,   279,   101,   152,   153,  -112,
    1002      133,   154,   135,   155,   156,   134,   101,  -112,  -112,   231,
    1003      232,   233,   149,   234,   136,   235,   236,   237,   238,   239,
    1004      240,   241,   242,   101,   103,   280,   137,   148,    30,   101,
    1005      148,   176,   250,   169,   101,   180,   281,   254,   255,   179,
    1006      257,   180,   259,   181,   282,   261,   182,   283,   152,   153,
    1007      183,   284,   154,   181,   155,   156,   184,   287,   182,   302,
    1008      183,   244,   157,   158,   159,   160,   161,   184,   162,   148,
    1009      151,   163,   164,  -132,  -132,   245,   165,   290,   149,   148,
    1010      157,   158,   159,   160,   161,   148,   162,   267,   220,   163,
    1011      164,   205,   152,   268,   165,   321,   154,   104,   356,   156,
    1012      206,   148,   297,   222,  -105,   298,   337,   171,   148,   301,
    1013     -153,   303,  -105,  -105,   149,   248,   339,   149,   107,   357,
    1014      263,   303,   288,   309,   310,   311,   291,   312,   329,   313,
    1015      314,   157,   158,   159,   160,   161,   338,   162,   269,   340,
    1016      163,   164,   364,  -106,   270,   165,   365,   327,   108,   358,
    1017      349,  -106,  -106,  -107,   332,   368,   149,   335,   350,  -108,
    1018      380,  -107,  -107,   110,   359,   351,   149,  -108,  -108,   111,
    1019      360,   352,   149,   141,   142,   157,   158,   159,   160,   161,
    1020      353,   162,  -111,  -133,  -133,   164,   333,   334,   149,   165,
    1021     -111,  -111,   394,     2,     3,   149,   303,   354,   355,   383,
    1022      373,     4,   374,   375,   384,   376,   392,     5,     6,     7,
    1023        8,   393,   152,   153,     9,   102,   154,   140,   155,   156,
    1024      395,   377,   378,   391,    10,   253,     0,   152,   153,     0,
    1025        0,   154,     0,   155,   156,     0,     0,     0,    11,    12,
    1026       13,    14,    15,    16,    17,    18,    19,    20,    21,    22,
    1027       23,    24,    25,    26,     0,    27,    28,    29,    30,     0,
    1028       31,    32,    33,    34,    35,    36,    37,    38,    39,    40,
    1029       41,    42,    43,    44,    45,    46,    47,    48,     0,    49,
    1030        0,    50,     0,    51,     0,     0,     0,    52,     0,     0,
    1031        0,    53,     0,     0,    54,   157,   158,   159,   160,   161,
    1032        0,   162,   272,     0,   163,   164,     0,     0,   273,   165,
    1033      157,   158,   159,   160,   161,   295,   162,   296,     0,   163,
    1034      164,   152,   153,     0,   165,   154,     0,   155,   156,     0,
    1035        0,     0,     0,     0,     0,     0,   152,   153,     0,     0,
    1036      154,     0,   155,   156,     0,     0,     0,     0,     0,     0,
    1037        0,   152,   153,     0,     0,   154,     0,   155,   156,     0,
    1038        0,     0,     0,     0,     0,     0,   152,   153,     0,     0,
    1039      154,     0,   155,   156,     0,     0,     0,     0,     0,     0,
    1040        0,   152,   153,     0,     0,   154,     0,   155,   156,     0,
    1041        0,     0,     0,     0,     0,     0,   152,   153,     0,     0,
    1042      154,     0,   155,   156,   157,   158,   159,   160,   161,     0,
    1043      162,   299,     0,   163,   164,     0,     0,   300,   165,   157,
    1044      158,   159,   160,   161,     0,   162,   345,     0,   163,   164,
    1045        0,     0,   346,   165,   157,   158,   159,   160,   161,     0,
    1046      162,   347,     0,   163,   164,     0,     0,   348,   165,   157,
    1047      158,   159,   160,   161,     0,   162,   247,     0,   163,   164,
    1048        0,     0,     0,   165,   157,   158,   159,   160,   161,     0,
    1049      162,     0,     0,   163,   164,     0,     0,   260,   165,   157,
    1050      158,   159,   160,   161,     0,   162,     0,     0,   163,   164,
    1051      152,   153,   262,   165,   154,     0,   155,   156,     0,     0,
    1052        0,     0,     0,     0,     0,   152,   153,     0,     0,   154,
    1053        0,   155,   156,     0,     0,     0,     0,     0,     0,     0,
    1054      152,   153,     0,     0,   154,     0,   155,   156,     0,     0,
    1055        0,     0,     0,     0,     0,   152,   153,     0,     0,   154,
    1056        0,   155,   156,     0,     0,     0,     0,     0,     0,     0,
    1057      152,   153,     0,     0,   154,     0,   155,   156,     0,     0,
    1058        0,     0,     0,     0,     0,   152,   153,     0,     0,   154,
    1059        0,   155,   156,   157,   158,   159,   160,   161,     0,   162,
    1060        0,     0,   163,   164,     0,     0,   264,   165,   157,   158,
    1061      159,   160,   161,     0,   162,   265,     0,   163,   164,     0,
    1062        0,     0,   165,   157,   158,   159,   160,   161,     0,   162,
    1063      266,     0,   163,   164,     0,     0,     0,   165,   157,   158,
    1064      159,   160,   161,     0,   162,   271,     0,   163,   164,     0,
    1065        0,     0,   165,   157,   158,   159,   160,   161,     0,   162,
    1066        0,     0,   163,   164,     0,     0,   275,   165,   157,   158,
    1067      159,   160,   161,     0,   162,     0,     0,   163,   164,   152,
    1068      153,   277,   165,   154,     0,   155,   156,     0,     0,     0,
    1069        0,     0,     0,     0,   152,   153,     0,     0,   154,     0,
    1070      155,   156,     0,     0,     0,     0,     0,     0,     0,   152,
    1071      153,     0,     0,   154,     0,   155,   156,     0,     0,     0,
    1072        0,     0,     0,     0,   152,   153,     0,     0,   154,     0,
    1073      155,   156,     0,     0,     0,     0,     0,     0,     0,   152,
    1074      153,     0,     0,   154,     0,   155,   156,     0,     0,     0,
    1075        0,     0,     0,     0,   152,   153,     0,     0,   154,     0,
    1076      155,   156,   157,   158,   159,   160,   161,     0,   162,   289,
    1077        0,   163,   164,     0,     0,     0,   165,   157,   158,   159,
    1078      160,   161,     0,   162,     0,     0,   163,   164,     0,     0,
    1079      292,   165,   157,   158,   159,   160,   161,     0,   162,   307,
    1080        0,   163,   164,     0,     0,     0,   165,   157,   158,   159,
    1081      160,   161,     0,   162,     0,     0,   163,   164,     0,     0,
    1082      328,   165,   157,   158,   159,   160,   161,     0,   162,     0,
    1083        0,   163,   164,     0,     0,   245,   165,   157,   158,   159,
    1084      160,   161,   336,   162,     0,     0,   163,   164,   152,   153,
    1085        0,   165,   154,     0,   155,   156,     0,     0,     0,     0,
    1086        0,     0,     0,   152,   153,     0,     0,   154,     0,   155,
    1087      156,     0,     0,     0,     0,     0,     0,     0,   152,   153,
    1088        0,     0,   154,     0,   155,   156,     0,     0,     0,     0,
    1089        0,     0,     0,   152,   153,     0,     0,   154,     0,   155,
    1090      156,     0,     0,     0,     0,     0,     0,     0,   152,   153,
    1091        0,     0,   154,     0,   155,   156,     0,     0,     0,     0,
    1092        0,     0,     0,   152,   153,     0,     0,   154,     0,   155,
    1093      156,   157,   158,   159,   160,   161,     0,   162,     0,     0,
    1094      163,   164,     0,     0,   341,   165,   157,   158,   159,   160,
    1095      161,     0,   162,   342,     0,   163,   164,     0,     0,     0,
     984      61,    70,   169,   100,   304,   368,   152,   153,   381,   148,
     985     154,    89,   155,   156,   308,   113,   115,   117,   119,   123,
     986     151,   150,   125,   122,   103,   154,   226,   104,   156,   151,
     987     154,   381,   330,   156,   170,   369,   225,   154,   151,   331,
     988     156,   105,   171,   172,   148,   151,   106,    70,   124,   107,
     989     144,   274,    97,   151,   151,   101,   108,   186,   151,   276,
     990     278,   379,   148,   151,   293,   168,   175,   101,   101,   101,
     991     101,   109,   151,   177,   101,   151,   151,   127,   294,   151,
     992     151,   305,   306,   120,   121,   367,   396,   148,   110,   366,
     993     157,   158,   159,   160,   161,   139,   162,   149,   143,   163,
     994     164,   111,   146,   126,   165,   227,   216,   217,   128,   161,
     995     198,   166,   167,   201,   161,   129,   162,   204,   101,   165,
     996     160,   161,   214,   162,   165,   101,   215,   285,   178,   333,
     997     334,   165,   149,   286,   100,   130,   224,  -110,   179,   279,
     998     103,   280,   251,   132,   228,  -110,  -110,   185,   230,   148,
     999     149,   188,   190,   191,   192,   193,   194,   195,   196,   131,
     1000     199,   243,   170,   133,   202,   134,   152,   249,   180,   281,
     1001     154,  -152,   252,   156,   101,   149,   135,   218,   181,   282,
     1002     256,   136,   258,   221,   152,   153,   101,   137,   154,    30,
     1003     155,   156,   182,   283,   183,   284,   101,   184,   287,   231,
     1004     232,   233,   147,   234,   169,   235,   236,   237,   238,   239,
     1005     240,   241,   242,   101,   148,   104,   356,   107,   357,   101,
     1006     179,   148,   250,   176,   101,   108,   358,   254,   255,   337,
     1007     257,   180,   259,  -153,   181,   261,   182,   149,   110,   359,
     1008     183,   152,   153,   111,   360,   154,   184,   155,   156,   302,
     1009     157,   158,   159,   160,   161,  -154,   162,   141,   142,   154,
     1010     164,   205,   156,   151,   165,   206,   220,   290,   157,   158,
     1011     159,   160,   161,   148,   162,   267,   148,   163,   164,   222,
     1012     171,   268,   165,   152,   153,   321,   248,   154,   263,   155,
     1013     156,   288,   297,   291,   368,   298,  -112,  -132,  -132,   301,
     1014     329,   303,   149,   383,  -112,  -112,   339,   338,   340,   149,
     1015     102,   303,   395,   309,   310,   311,   349,   312,   350,   313,
     1016     314,   351,   352,   353,   244,   157,   158,   159,   160,   161,
     1017     354,   162,   355,   364,   163,   164,   365,   327,   245,   165,
     1018     158,   159,   160,   161,   332,   162,   384,   335,  -105,   164,
     1019     380,  -106,   392,   165,   393,   140,  -105,  -105,     0,  -106,
     1020    -106,   149,   253,   391,   149,     0,     0,   157,   158,   159,
     1021     160,   161,     0,   162,   269,     0,   163,   164,     0,     0,
     1022     270,   165,   394,     2,     3,     0,   303,     0,     0,     0,
     1023     373,     4,   374,   375,     0,   376,   148,     5,     6,     7,
     1024       8,     0,   152,   153,     0,     9,   154,     0,   155,   156,
     1025       0,   377,   378,     0,     0,    10,     0,   152,   153,     0,
     1026       0,   154,     0,   155,   156,     0,     0,     0,     0,    11,
     1027      12,    13,    14,    15,    16,    17,    18,    19,    20,    21,
     1028      22,    23,    24,    25,    26,     0,    27,    28,    29,    30,
     1029       0,    31,    32,    33,    34,    35,    36,    37,    38,    39,
     1030      40,    41,    42,    43,    44,    45,    46,    47,    48,     0,
     1031      49,  -107,    50,     0,    51,     0,     0,     0,    52,  -107,
     1032    -107,     0,    53,   148,   149,    54,   157,   158,   159,   160,
     1033     161,     0,   162,   272,     0,   163,   164,     0,     0,   273,
     1034     165,   157,   158,   159,   160,   161,   295,   162,   296,     0,
     1035     163,   164,   152,   153,     0,   165,   154,     0,   155,   156,
     1036       0,     0,     0,     0,     0,     0,     0,   152,   153,     0,
     1037       0,   154,     0,   155,   156,     0,     0,     0,     0,     0,
     1038       0,     0,   152,   153,     0,     0,   154,     0,   155,   156,
     1039       0,     0,     0,     0,     0,     0,     0,   152,   153,     0,
     1040       0,   154,     0,   155,   156,     0,  -133,  -133,     0,     0,
     1041       0,   149,   152,   153,     0,     0,   154,     0,   155,   156,
     1042       0,     0,     0,     0,     0,     0,     0,   152,   153,     0,
     1043       0,   154,     0,   155,   156,     0,   157,   158,   159,   160,
     1044     161,     0,   162,   299,     0,   163,   164,     0,     0,   300,
     1045     165,   157,   158,   159,   160,   161,     0,   162,   345,     0,
     1046     163,   164,     0,     0,   346,   165,   157,   158,   159,   160,
     1047     161,     0,   162,   347,     0,   163,   164,     0,     0,   348,
     1048     165,   157,   158,   159,   160,   161,     0,   162,   247,     0,
     1049     163,   164,     0,     0,     0,   165,   157,   158,   159,   160,
     1050     161,     0,   162,     0,     0,   163,   164,     0,     0,   260,
    10961051     165,   157,   158,   159,   160,   161,     0,   162,     0,     0,
    1097      163,   164,     0,     0,   343,   165,   157,   158,   159,   160,
    1098      161,     0,   162,   344,     0,   163,   164,     0,     0,     0,
    1099      165,   157,   158,   159,   160,   161,     0,   162,     0,     0,
    1100      163,   164,     0,     0,   361,   165,   157,   158,   159,   160,
    1101      161,   362,   162,     0,     0,   163,   164,   152,   153,     0,
    1102      165,   154,     0,   155,   156,     0,     0,     0,     0,     0,
    1103        0,     0,   152,   153,     0,     0,   154,     0,   155,   156,
     1052     163,   164,   152,   153,   262,   165,   154,     0,   155,   156,
    11041053       0,     0,     0,     0,     0,     0,     0,   152,   153,     0,
    11051054       0,   154,     0,   155,   156,     0,     0,     0,     0,     0,
     
    11081057       0,   154,     0,   155,   156,     0,     0,     0,     0,     0,
    11091058       0,     0,   152,   153,     0,     0,   154,     0,   155,   156,
    1110      157,   158,   159,   160,   161,     0,   162,   363,     0,   163,
    1111      164,     0,     0,     0,   165,   157,   158,   159,   160,   161,
    1112        0,   162,     0,     0,   163,   164,     0,     0,   385,   165,
    1113      157,   158,   159,   160,   161,     0,   162,     0,     0,   163,
    1114      164,     0,     0,   386,   165,   157,   158,   159,   160,   161,
    1115        0,   162,     0,     0,   163,   164,     0,     0,   387,   165,
    1116      157,   158,   159,   160,   161,     0,   162,     0,     0,   163,
    1117      164,     0,     0,   388,   165,   157,   158,   159,   160,   161,
    1118        0,   162,     0,     0,   163,   164,   152,   153,   389,   165,
    1119      154,     0,   155,   156,     0,     0,     0,     0,     0,     0,
    1120        0,   152,   153,     0,     0,   154,     0,   155,   156,     0,
    1121        0,     5,     6,   315,   316,     0,   152,   153,     9,     0,
    1122      154,     0,   155,   156,     0,     0,     0,     0,     0,     0,
    1123      152,     0,     0,     0,   154,     0,     0,   156,     0,     0,
     1059       0,     0,     0,     0,     0,     0,     0,   152,   153,     0,
     1060       0,   154,     0,   155,   156,     0,   157,   158,   159,   160,
     1061     161,     0,   162,     0,     0,   163,   164,     0,     0,   264,
     1062     165,   157,   158,   159,   160,   161,     0,   162,   265,     0,
     1063     163,   164,     0,     0,     0,   165,   157,   158,   159,   160,
     1064     161,     0,   162,   266,     0,   163,   164,     0,     0,     0,
     1065     165,   157,   158,   159,   160,   161,     0,   162,   271,     0,
     1066     163,   164,     0,     0,     0,   165,   157,   158,   159,   160,
     1067     161,     0,   162,     0,     0,   163,   164,     0,     0,   275,
     1068     165,   157,   158,   159,   160,   161,     0,   162,     0,     0,
     1069     163,   164,   152,   153,   277,   165,   154,     0,   155,   156,
     1070       0,     0,     0,     0,     0,     0,     0,   152,   153,     0,
     1071       0,   154,     0,   155,   156,     0,     0,     0,     0,     0,
     1072       0,     0,   152,   153,     0,     0,   154,     0,   155,   156,
     1073       0,     0,     0,     0,     0,     0,     0,   152,   153,     0,
     1074       0,   154,     0,   155,   156,     0,     0,     0,     0,     0,
     1075       0,     0,   152,   153,     0,     0,   154,     0,   155,   156,
     1076       0,     0,     0,     0,     0,     0,     0,   152,   153,     0,
     1077       0,   154,     0,   155,   156,     0,   157,   158,   159,   160,
     1078     161,     0,   162,   289,     0,   163,   164,     0,     0,     0,
     1079     165,   157,   158,   159,   160,   161,     0,   162,     0,     0,
     1080     163,   164,     0,     0,   292,   165,   157,   158,   159,   160,
     1081     161,     0,   162,   307,     0,   163,   164,     0,     0,     0,
     1082     165,   157,   158,   159,   160,   161,     0,   162,     0,     0,
     1083     163,   164,     0,     0,   328,   165,   157,   158,   159,   160,
     1084     161,     0,   162,     0,     0,   163,   164,     0,     0,   245,
     1085     165,   157,   158,   159,   160,   161,   336,   162,     0,     0,
     1086     163,   164,   152,   153,     0,   165,   154,     0,   155,   156,
     1087       0,     0,     0,     0,     0,     0,     0,   152,   153,     0,
     1088       0,   154,     0,   155,   156,     0,     0,     0,     0,     0,
     1089       0,     0,   152,   153,     0,     0,   154,     0,   155,   156,
     1090       0,     0,     0,     0,     0,     0,     0,   152,   153,     0,
     1091       0,   154,     0,   155,   156,     0,     0,     0,     0,     0,
     1092       0,     0,   152,   153,     0,     0,   154,     0,   155,   156,
     1093       0,     0,     0,     0,     0,     0,     0,   152,   153,     0,
     1094       0,   154,     0,   155,   156,     0,   157,   158,   159,   160,
     1095     161,     0,   162,     0,     0,   163,   164,     0,     0,   341,
     1096     165,   157,   158,   159,   160,   161,     0,   162,   342,     0,
     1097     163,   164,     0,     0,     0,   165,   157,   158,   159,   160,
     1098     161,     0,   162,     0,     0,   163,   164,     0,     0,   343,
     1099     165,   157,   158,   159,   160,   161,     0,   162,   344,     0,
     1100     163,   164,     0,     0,     0,   165,   157,   158,   159,   160,
     1101     161,     0,   162,     0,     0,   163,   164,     0,     0,   361,
     1102     165,   157,   158,   159,   160,   161,   362,   162,     0,     0,
     1103     163,   164,   152,   153,     0,   165,   154,     0,   155,   156,
     1104       0,     0,     0,     0,     0,     0,     0,   152,   153,     0,
     1105       0,   154,     0,   155,   156,     0,     0,     0,     0,     0,
     1106       0,     0,   152,   153,     0,     0,   154,     0,   155,   156,
     1107       0,     0,     0,     0,     0,     0,     0,   152,   153,     0,
     1108       0,   154,     0,   155,   156,     0,     0,     0,     0,     0,
     1109       0,     0,   152,   153,     0,     0,   154,     0,   155,   156,
     1110       0,     0,     0,     0,     0,     0,     0,   152,   153,     0,
     1111       0,   154,     0,   155,   156,     0,   157,   158,   159,   160,
     1112     161,     0,   162,   363,     0,   163,   164,     0,     0,     0,
     1113     165,   157,   158,   159,   160,   161,     0,   162,     0,     0,
     1114     163,   164,     0,     0,   385,   165,   157,   158,   159,   160,
     1115     161,     0,   162,     0,     0,   163,   164,     0,     0,   386,
     1116     165,   157,   158,   159,   160,   161,     0,   162,   148,     0,
     1117     163,   164,     0,     0,   387,   165,   157,   158,   159,   160,
     1118     161,     0,   162,   148,     0,   163,   164,     0,     0,   388,
     1119     165,   157,   158,   159,   160,   161,     0,   162,     0,     0,
     1120     163,   164,   152,   153,   389,   165,   154,     0,   155,   156,
     1121       0,     0,     0,     0,     0,     0,     0,   152,   153,     0,
     1122       0,   154,     0,   155,   156,     0,     0,     0,     0,     0,
     1123       0,     0,   152,   153,     0,     0,   154,     0,   155,   156,
     1124       0,     0,     0,  -108,     0,     0,   152,     0,     0,     0,
     1125     154,  -108,  -108,   156,     0,     0,   149,     0,  -111,     0,
     1126       0,     0,     0,     0,     0,     0,  -111,  -111,     0,     0,
     1127       0,   149,     0,     0,     0,     0,     0,     0,     0,     0,
     1128       0,     0,     0,     0,     0,     0,   157,   158,   159,   160,
     1129     161,   390,   162,     0,     0,   163,   164,     0,     0,     0,
     1130     165,   157,   158,   159,   160,   161,     0,   162,     0,     0,
     1131     163,   164,     0,     0,     0,   165,   157,   158,   159,   160,
     1132     161,     0,   162,     0,     0,     0,   164,     0,     0,     0,
     1133     165,   158,   159,   160,   161,     0,   162,     0,     0,     4,
     1134     164,     0,     0,     0,   165,     5,     6,    90,    91,     5,
     1135       6,   315,   316,     9,     0,     0,     0,     9,     0,     0,
    11241136       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
    1125      317,   318,   319,   320,     0,     0,     0,     0,     0,     0,
    1126        0,     0,     0,     0,     0,     0,     0,     0,     0,   157,
    1127      158,   159,   160,   161,   390,   162,     0,     0,   163,   164,
    1128        0,     0,     0,   165,   157,   158,   159,   160,   161,     0,
    1129      162,     0,     0,   163,   164,     0,     0,     0,   165,   157,
    1130      158,   159,   160,   161,     0,   162,     0,     0,     0,   164,
    1131        0,     0,     0,   165,   158,   159,   160,   161,     0,   162,
    1132        0,     0,     4,   164,     0,     0,     0,   165,     5,     6,
    1133       90,    91,     0,     0,     0,     9,     0,     0,     0,     0,
    1134        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
     1137       0,     0,     0,     0,     0,     0,     0,    11,    12,    13,
     1138      14,    15,    16,    17,    18,    92,    93,    94,    95,   317,
     1139     318,   319,   320,     0,     0,     0,     0,    30,     0,    31,
     1140      32,    33,     0,    35,    36,     4,     0,     0,    40,    41,
     1141       0,     5,     6,    90,    91,     0,    96,     0,     0,     9,
     1142      50,     0,    51,     0,     0,     0,     0,     0,     0,     0,
     1143      53,   197,     0,    54,     0,     0,     0,     0,     0,     0,
     1144       0,     0,     0,    11,    12,    13,    14,    15,    16,    17,
     1145      18,    92,    93,    94,    95,     0,     0,     0,     0,     0,
     1146       0,     0,     0,    30,     0,    31,    32,    33,     0,    35,
     1147      36,     4,     0,     0,    40,    41,     0,     5,     6,    90,
     1148      91,     0,    96,     0,     0,     9,    50,     0,    51,     0,
     1149       0,     0,     0,     0,     0,     0,    53,   200,     0,    54,
     1150       0,     0,     0,     0,     0,     0,     0,     0,     0,    11,
     1151      12,    13,    14,    15,    16,    17,    18,    92,    93,    94,
     1152      95,     0,     0,     0,     0,     0,     0,     0,     0,    30,
     1153       0,    31,    32,    33,     0,    35,    36,     4,     0,     0,
     1154      40,    41,     0,     5,     6,   207,   208,     0,    96,     0,
     1155       0,     9,    50,     0,    51,     0,     0,     0,     0,     0,
     1156       0,     0,    53,   203,     0,    54,     0,     0,     0,     0,
     1157       0,     0,     0,     0,     0,    11,    12,    13,    14,    15,
     1158      16,    17,    18,   209,   210,   211,   212,     0,     0,     0,
     1159       0,     0,     0,     0,     0,    30,     0,    31,    32,    33,
     1160       0,    35,    36,     4,     0,     0,    40,    41,     0,     5,
     1161       6,    90,    91,     0,    96,     0,     0,     9,    50,     0,
     1162      51,     0,     0,     0,     0,     0,     0,     0,    53,   213,
     1163       0,    54,     0,     0,     0,     0,     0,     0,     0,     0,
     1164       0,    11,    12,    13,    14,    15,    16,    17,    18,    92,
     1165      93,    94,    95,     0,     0,     0,     0,     0,     0,     0,
     1166       0,    30,     0,    31,    32,    33,     0,    35,    36,     4,
     1167       0,     0,    40,    41,     0,     5,     6,    90,    91,     0,
     1168      96,     0,     0,     9,    50,     0,    51,     0,     0,     0,
     1169       0,     0,     0,     0,    53,   223,     0,    54,     0,     0,
     1170       0,     0,     0,     0,     0,     0,     0,    11,    12,    13,
     1171      14,    15,    16,    17,    18,    92,    93,    94,    95,     0,
     1172       0,     0,     0,     0,     0,     0,     0,    30,     0,    31,
     1173      32,    33,     0,    35,    36,     4,     0,     0,    40,    41,
     1174       0,     5,     6,    90,    91,     0,    96,     0,     0,     9,
     1175      50,     0,    51,     0,     0,     0,     0,     0,     0,     0,
     1176      53,   229,     0,    54,     0,     0,     0,     0,     0,     0,
     1177       0,     0,     0,    11,    12,    13,    14,    15,    16,    17,
     1178      18,    92,    93,    94,    95,     0,     0,     0,     0,     0,
     1179       0,     0,     0,    30,     0,    31,    32,    33,     0,    35,
     1180      36,     4,     0,     0,    40,    41,     0,     5,     6,    90,
     1181      91,     0,    96,     0,     0,     9,    50,     0,    51,     0,
     1182       0,     0,     0,     0,     0,     0,    53,     0,     0,    54,
    11351183       0,     0,     0,     0,     0,     0,     0,     0,     0,    11,
    11361184      12,    13,    14,    15,    16,    17,    18,    92,    93,    94,
     
    11381186       0,    31,    32,    33,     0,    35,    36,     4,     0,     0,
    11391187      40,    41,     0,     5,     6,    90,    91,     0,    96,     0,
    1140        9,     0,    50,     0,    51,     0,     0,     0,     0,     0,
    1141        0,     0,    53,   197,     0,    54,     0,     0,     0,     0,
    1142        0,     0,     0,     0,    11,    12,    13,    14,    15,    16,
    1143       17,    18,    92,    93,    94,    95,     0,     0,     0,     0,
    1144        0,     0,     0,     0,    30,     0,    31,    32,    33,     0,
    1145       35,    36,     4,     0,     0,    40,    41,     0,     5,     6,
    1146       90,    91,     0,    96,     0,     9,     0,    50,     0,    51,
    1147        0,     0,     0,     0,     0,     0,     0,    53,   200,     0,
    1148       54,     0,     0,     0,     0,     0,     0,     0,     0,    11,
    1149       12,    13,    14,    15,    16,    17,    18,    92,    93,    94,
    1150       95,     0,     0,     0,     0,     0,     0,     0,     0,    30,
    1151        0,    31,    32,    33,     0,    35,    36,     4,     0,     0,
    1152       40,    41,     0,     5,     6,   207,   208,     0,    96,     0,
    1153        9,     0,    50,     0,    51,     0,     0,     0,     0,     0,
    1154        0,     0,    53,   203,     0,    54,     0,     0,     0,     0,
    1155        0,     0,     0,     0,    11,    12,    13,    14,    15,    16,
    1156       17,    18,   209,   210,   211,   212,     0,     0,     0,     0,
    1157        0,     0,     0,     0,    30,     0,    31,    32,    33,     0,
    1158       35,    36,     4,     0,     0,    40,    41,     0,     5,     6,
    1159       90,    91,     0,    96,     0,     9,     0,    50,     0,    51,
    1160        0,     0,     0,     0,     0,     0,     0,    53,   213,     0,
    1161       54,     0,     0,     0,     0,     0,     0,     0,     0,    11,
    1162       12,    13,    14,    15,    16,    17,    18,    92,    93,    94,
    1163       95,     0,     0,     0,     0,     0,     0,     0,     0,    30,
    1164        0,    31,    32,    33,     0,    35,    36,     4,     0,     0,
    1165       40,    41,     0,     5,     6,    90,    91,     0,    96,     0,
    1166        9,     0,    50,     0,    51,     0,     0,     0,     0,     0,
    1167        0,     0,    53,   223,     0,    54,     0,     0,     0,     0,
    1168        0,     0,     0,     0,    11,    12,    13,    14,    15,    16,
    1169       17,    18,    92,    93,    94,    95,     0,     0,     0,     0,
    1170        0,     0,     0,     0,    30,     0,    31,    32,    33,     0,
    1171       35,    36,     4,     0,     0,    40,    41,     0,     5,     6,
    1172       90,    91,     0,    96,     0,     9,     0,    50,     0,    51,
    1173        0,     0,     0,     0,     0,     0,     0,    53,   229,     0,
    1174       54,     0,     0,     0,     0,     0,     0,     0,     0,    11,
    1175       12,    13,    14,    15,    16,    17,    18,    92,    93,    94,
    1176       95,     0,     0,     0,     0,     0,     0,     0,     0,    30,
    1177        0,    31,    32,    33,     0,    35,    36,     4,     0,     0,
    1178       40,    41,     0,     5,     6,    90,    91,     0,    96,     0,
    1179        9,     0,    50,     0,    51,     0,     0,     0,     0,     0,
    1180        0,     0,    53,     0,     0,    54,     0,     0,     0,     0,
    1181        0,     0,     0,     0,    11,    12,    13,    14,    15,    16,
    1182       17,    18,    92,    93,    94,    95,     0,     0,     0,     0,
    1183        0,     0,     0,     0,    30,     0,    31,    32,    33,     0,
    1184       35,    36,     4,     0,     0,    40,    41,     0,     5,     6,
    1185       90,    91,     0,    96,     0,     9,     0,    50,     0,    51,
    1186        0,     0,     0,     0,     0,     0,     0,    99,     0,     0,
    1187       54,     0,     0,     0,     0,     0,     0,     0,     0,    11,
    1188       12,    13,    14,    15,    16,    17,    18,    92,    93,    94,
    1189       95,     0,     0,     0,     0,     0,     0,     0,     0,    30,
    1190        0,    31,    32,    33,     0,    35,    36,     4,     0,     0,
    1191       40,    41,     0,     5,     6,    90,    91,     0,    96,     0,
    1192        9,     0,    50,     0,    51,     0,     0,     0,     0,     0,
    1193        0,     0,   112,     0,     0,    54,     0,     0,     0,     0,
    1194        0,     0,     0,     0,    11,    12,    13,    14,    15,    16,
    1195       17,    18,    92,    93,    94,    95,     0,     0,     0,     0,
    1196        0,     0,     0,     0,    30,     0,    31,    32,    33,     0,
    1197       35,    36,     4,     0,     0,    40,    41,     0,     5,     6,
    1198       90,    91,     0,    96,     0,     9,     0,    50,     0,    51,
    1199        0,     0,     0,     0,     0,     0,     0,   114,     0,     0,
    1200       54,     0,     0,     0,     0,     0,     0,     0,     0,    11,
    1201       12,    13,    14,    15,    16,    17,    18,    92,    93,    94,
    1202       95,     0,     0,     0,     0,     0,     0,     0,     0,    30,
    1203        0,    31,    32,    33,     0,    35,    36,     4,     0,     0,
    1204       40,    41,     0,     5,     6,    90,    91,     0,    96,     0,
    1205        9,     0,    50,     0,    51,     0,     0,     0,     0,     0,
    1206        0,     0,   116,     0,     0,    54,     0,     0,     0,     0,
    1207        0,     0,     0,     0,    11,    12,    13,    14,    15,    16,
    1208       17,    18,    92,    93,    94,    95,     0,     0,     0,     0,
    1209        0,     0,     0,     0,    30,     0,    31,    32,    33,     0,
    1210       35,    36,     4,     0,     0,    40,    41,     0,     5,     6,
    1211      138,    91,     0,    96,     0,     9,     0,    50,     0,    51,
    1212        0,     0,     0,     0,     0,     0,     0,   118,     0,     0,
    1213       54,     0,     0,     0,     0,     0,     0,     0,     0,    11,
     1188       0,     9,    50,     0,    51,     0,     0,     0,     0,     0,
     1189       0,     0,    99,     0,     0,    54,     0,     0,     0,     0,
     1190       0,     0,     0,     0,     0,    11,    12,    13,    14,    15,
     1191      16,    17,    18,    92,    93,    94,    95,     0,     0,     0,
     1192       0,     0,     0,     0,     0,    30,     0,    31,    32,    33,
     1193       0,    35,    36,     4,     0,     0,    40,    41,     0,     5,
     1194       6,    90,    91,     0,    96,     0,     0,     9,    50,     0,
     1195      51,     0,     0,     0,     0,     0,     0,     0,   112,     0,
     1196       0,    54,     0,     0,     0,     0,     0,     0,     0,     0,
     1197       0,    11,    12,    13,    14,    15,    16,    17,    18,    92,
     1198      93,    94,    95,     0,     0,     0,     0,     0,     0,     0,
     1199       0,    30,     0,    31,    32,    33,     0,    35,    36,     4,
     1200       0,     0,    40,    41,     0,     5,     6,    90,    91,     0,
     1201      96,     0,     0,     9,    50,     0,    51,     0,     0,     0,
     1202       0,     0,     0,     0,   114,     0,     0,    54,     0,     0,
     1203       0,     0,     0,     0,     0,     0,     0,    11,    12,    13,
     1204      14,    15,    16,    17,    18,    92,    93,    94,    95,     0,
     1205       0,     0,     0,     0,     0,     0,     0,    30,     0,    31,
     1206      32,    33,     0,    35,    36,     4,     0,     0,    40,    41,
     1207       0,     5,     6,    90,    91,     0,    96,     0,     0,     9,
     1208      50,     0,    51,     0,     0,     0,     0,     0,     0,     0,
     1209     116,     0,     0,    54,     0,     0,     0,     0,     0,     0,
     1210       0,     0,     0,    11,    12,    13,    14,    15,    16,    17,
     1211      18,    92,    93,    94,    95,     0,     0,     0,     0,     0,
     1212       0,     0,     0,    30,     0,    31,    32,    33,     0,    35,
     1213      36,     4,     0,     0,    40,    41,     0,     5,     6,   138,
     1214      91,     0,    96,     0,     0,     9,    50,     0,    51,     0,
     1215       0,     0,     0,     0,     0,     0,   118,     0,     0,    54,
     1216       0,     0,     0,     0,     0,     0,     0,     0,     0,    11,
    12141217      12,    13,    14,    15,    16,    17,    18,    19,    20,    21,
    12151218      22,     0,     0,     0,     0,     0,     0,     0,     0,    30,
    12161219       0,    31,    32,    33,     0,    35,    36,     4,     0,     0,
    12171220      40,    41,     0,     5,     6,    90,    91,     0,    96,     0,
    1218        9,     0,    50,     0,    51,     0,     0,     0,     0,     0,
     1221       0,     9,    50,     0,    51,     0,     0,     0,     0,     0,
    12191222       0,     0,    53,     0,     0,    54,     0,     0,     0,     0,
    1220        0,     0,     0,     0,    11,    12,    13,    14,    15,    16,
    1221       17,    18,    92,    93,    94,    95,     0,     0,     0,     0,
    1222        0,     0,     0,     0,    30,     0,    31,    32,    33,     0,
    1223       35,    36,     4,     0,     0,    40,    41,     0,     5,     6,
    1224       90,    91,     0,    96,     0,     9,     0,    50,     0,    51,
    1225        0,     0,     0,     0,     0,     0,     0,   174,     0,     0,
    1226       54,     0,     0,     0,     0,     0,     0,     0,     0,    11,
    1227       12,    13,    14,    15,    16,    17,    18,    92,    93,    94,
    1228       95,     0,     0,     0,     0,     0,     0,     0,     0,    30,
    1229        0,    31,    32,    33,     0,    35,    36,     4,     0,     0,
    1230       40,    41,     0,     5,     6,    90,    91,     0,    96,     0,
    1231        9,     0,    50,     0,    51,     0,     0,     0,     0,     0,
    1232        0,     0,   187,     0,     0,    54,     0,     0,     0,     0,
    1233        0,     0,     0,     0,   322,    12,    13,   323,   324,    16,
    1234      325,   326,    92,    93,    94,    95,     0,     0,     0,     0,
    1235        0,     0,     0,     0,    30,     0,    31,    32,    33,     0,
    1236       35,    36,     0,     0,     0,    40,    41,     0,     0,     0,
    1237        0,     0,     0,    96,     0,     0,     0,    50,     0,    51,
    1238        0,     0,     0,     0,     0,     0,     0,    53,     0,     0,
    1239       54
     1223       0,     0,     0,     0,     0,    11,    12,    13,    14,    15,
     1224      16,    17,    18,    92,    93,    94,    95,     0,     0,     0,
     1225       0,     0,     0,     0,     0,    30,     0,    31,    32,    33,
     1226       0,    35,    36,     4,     0,     0,    40,    41,     0,     5,
     1227       6,    90,    91,     0,    96,     0,     0,     9,    50,     0,
     1228      51,     0,     0,     0,     0,     0,     0,     0,   174,     0,
     1229       0,    54,     0,     0,     0,     0,     0,     0,     0,     0,
     1230       0,    11,    12,    13,    14,    15,    16,    17,    18,    92,
     1231      93,    94,    95,     0,     0,     0,     0,     0,     0,     0,
     1232       0,    30,     0,    31,    32,    33,     0,    35,    36,     4,
     1233       0,     0,    40,    41,     0,     5,     6,    90,    91,     0,
     1234      96,     0,     0,     9,    50,     0,    51,     0,     0,     0,
     1235       0,     0,     0,     0,   187,     0,     0,    54,     0,     0,
     1236       0,     0,     0,     0,     0,     0,     0,   322,    12,    13,
     1237     323,   324,    16,   325,   326,    92,    93,    94,    95,     0,
     1238       0,     0,     0,     0,     0,     0,     0,    30,     0,    31,
     1239      32,    33,     0,    35,    36,     0,     0,     0,    40,    41,
     1240       0,     0,     0,     0,     0,     0,    96,     0,     0,     0,
     1241      50,     0,    51,     0,     0,     0,     0,     0,     0,     0,
     1242      53,     0,     0,    54
    12401243};
    12411244
    12421245static const yytype_int16 yycheck[] =
    12431246{
    1244        1,     1,    11,     7,    65,    12,    68,     3,     4,   369,
    1245       94,     7,    85,     9,    10,    19,    20,    21,    22,    11,
    1246       93,    11,    26,    24,    93,    91,     7,    93,    66,    10,
    1247       99,     7,   392,    94,    10,    73,    98,    85,     7,    65,
    1248       66,    10,    93,    93,   253,    93,    94,    47,    99,    99,
    1249       51,    98,     4,     3,   263,     7,    93,     7,    11,    66,
    1250       10,    91,    99,    93,    98,    66,    70,    19,    20,    21,
    1251       22,    98,    93,    77,    26,    98,    85,    29,    99,    98,
    1252       93,    90,    93,    98,    93,    94,    99,    65,    99,    98,
    1253       86,    87,    88,    89,    90,    47,    92,    94,    50,    95,
    1254       96,    93,    54,    98,   100,   101,    98,    99,    98,    90,
    1255      111,    63,    64,   114,    90,    11,    92,   118,    70,   100,
    1256       89,    90,   126,    92,   100,    77,   126,    93,    80,   338,
    1257       98,   100,    85,    99,   138,    98,   137,    87,    88,    89,
    1258       90,    94,    92,    98,   148,    98,    96,    99,   149,    98,
    1259      100,   103,   104,   105,   106,   107,   108,   109,   110,    93,
    1260      112,   165,    93,    98,   116,    99,    66,   171,    99,     3,
    1261        4,    98,   176,     7,   126,     9,    10,   129,    65,    66,
    1262      181,    11,   183,   135,    98,    99,   138,     3,     4,    85,
    1263       98,     7,    98,     9,    10,    65,   148,    93,    94,   151,
    1264      152,   153,    98,   155,    65,   157,   158,   159,   160,   161,
    1265      162,   163,   164,   165,    98,    99,    98,    11,    65,   171,
    1266       11,    93,   174,    12,   176,    98,    99,   179,   180,    98,
    1267      182,    98,   184,    98,    99,   187,    98,    99,     3,     4,
    1268       98,    99,     7,    98,     9,    10,    98,    99,    98,   253,
    1269       98,    85,    86,    87,    88,    89,    90,    98,    92,    11,
    1270       93,    95,    96,    93,    94,    99,   100,   219,    98,    11,
    1271       86,    87,    88,    89,    90,    11,    92,    93,    65,    95,
    1272       96,    94,     3,    99,   100,   285,     7,    98,    99,    10,
    1273       94,    11,   244,    66,    85,   247,    90,    93,    11,   251,
    1274       94,   253,    93,    94,    98,    66,   307,    98,    98,    99,
    1275       93,   263,    66,   265,   266,   267,    65,   269,    66,   271,
    1276      272,    86,    87,    88,    89,    90,    93,    92,    93,    93,
    1277       95,    96,    90,    85,    99,   100,   337,   289,    98,    99,
    1278       99,    93,    94,    85,   296,    68,    98,   299,    99,    85,
    1279       93,    93,    94,    98,    99,    99,    98,    93,    94,    98,
    1280       99,    99,    98,    48,    49,    86,    87,    88,    89,    90,
    1281       99,    92,    85,    93,    94,    96,   297,   298,    98,   100,
    1282       93,    94,   383,     0,     1,    98,   338,    99,    99,    98,
    1283      342,     8,   344,   345,    99,   347,    93,    14,    15,    16,
    1284       17,    99,     3,     4,    21,     7,     7,    47,     9,    10,
    1285      392,   363,   364,   380,    31,   177,    -1,     3,     4,    -1,
    1286       -1,     7,    -1,     9,    10,    -1,    -1,    -1,    45,    46,
     1247       1,     1,    12,     7,   253,    69,     3,     4,   369,    11,
     1248       7,    95,     9,    10,   263,    19,    20,    21,    22,    66,
     1249      94,    86,    26,    24,    99,     7,   100,    99,    10,    94,
     1250       7,   392,    67,    10,    86,    99,    92,     7,    94,    74,
     1251      10,    99,    94,    95,    11,    94,    99,    47,    95,    99,
     1252      51,   100,     4,    94,    94,     7,    99,    67,    94,   100,
     1253     100,    92,    11,    94,   100,    66,    70,    19,    20,    21,
     1254      22,    99,    94,    77,    26,    94,    94,    29,   100,    94,
     1255      94,   100,   100,    66,    67,   100,   100,    11,    99,   338,
     1256      87,    88,    89,    90,    91,    47,    93,    99,    50,    96,
     1257      97,    99,    54,    99,   101,   102,    66,    67,    66,    91,
     1258     111,    63,    64,   114,    91,    99,    93,   118,    70,   101,
     1259      90,    91,   126,    93,   101,    77,   126,    94,    80,   297,
     1260     298,   101,    99,   100,   138,    99,   137,    86,    99,   100,
     1261      99,   100,    91,    99,   148,    94,    95,    99,   149,    11,
     1262      99,   103,   104,   105,   106,   107,   108,   109,   110,    67,
     1263     112,   165,    86,    99,   116,    66,     3,   171,    99,   100,
     1264       7,    95,   176,    10,   126,    99,    99,   129,    99,   100,
     1265     181,    66,   183,   135,     3,     4,   138,    99,     7,    66,
     1266       9,    10,    99,   100,    99,   100,   148,    99,   100,   151,
     1267     152,   153,    95,   155,    12,   157,   158,   159,   160,   161,
     1268     162,   163,   164,   165,    11,    99,   100,    99,   100,   171,
     1269      99,    11,   174,    94,   176,    99,   100,   179,   180,    91,
     1270     182,    99,   184,    95,    99,   187,    99,    99,    99,   100,
     1271      99,     3,     4,    99,   100,     7,    99,     9,    10,   253,
     1272      87,    88,    89,    90,    91,     3,    93,    48,    49,     7,
     1273      97,    95,    10,    94,   101,    95,    66,   219,    87,    88,
     1274      89,    90,    91,    11,    93,    94,    11,    96,    97,    67,
     1275      94,   100,   101,     3,     4,   285,    67,     7,    94,     9,
     1276      10,    67,   244,    66,    69,   247,    86,    94,    95,   251,
     1277      67,   253,    99,    99,    94,    95,   307,    94,    94,    99,
     1278       7,   263,   392,   265,   266,   267,   100,   269,   100,   271,
     1279     272,   100,   100,   100,    86,    87,    88,    89,    90,    91,
     1280     100,    93,   100,    91,    96,    97,   337,   289,   100,   101,
     1281      88,    89,    90,    91,   296,    93,   100,   299,    86,    97,
     1282      94,    86,    94,   101,   100,    47,    94,    95,    -1,    94,
     1283      95,    99,   177,   380,    99,    -1,    -1,    87,    88,    89,
     1284      90,    91,    -1,    93,    94,    -1,    96,    97,    -1,    -1,
     1285     100,   101,   383,     0,     1,    -1,   338,    -1,    -1,    -1,
     1286     342,     8,   344,   345,    -1,   347,    11,    14,    15,    16,
     1287      17,    -1,     3,     4,    -1,    22,     7,    -1,     9,    10,
     1288      -1,   363,   364,    -1,    -1,    32,    -1,     3,     4,    -1,
     1289      -1,     7,    -1,     9,    10,    -1,    -1,    -1,    -1,    46,
    12871290      47,    48,    49,    50,    51,    52,    53,    54,    55,    56,
    1288       57,    58,    59,    60,    -1,    62,    63,    64,    65,    -1,
    1289       67,    68,    69,    70,    71,    72,    73,    74,    75,    76,
    1290       77,    78,    79,    80,    81,    82,    83,    84,    -1,    86,
    1291       -1,    88,    -1,    90,    -1,    -1,    -1,    94,    -1,    -1,
    1292       -1,    98,    -1,    -1,   101,    86,    87,    88,    89,    90,
    1293       -1,    92,    93,    -1,    95,    96,    -1,    -1,    99,   100,
    1294       86,    87,    88,    89,    90,    91,    92,    93,    -1,    95,
    1295       96,     3,     4,    -1,   100,     7,    -1,     9,    10,    -1,
    1296       -1,    -1,    -1,    -1,    -1,    -1,     3,     4,    -1,    -1,
    1297        7,    -1,     9,    10,    -1,    -1,    -1,    -1,    -1,    -1,
    1298       -1,     3,     4,    -1,    -1,     7,    -1,     9,    10,    -1,
    1299       -1,    -1,    -1,    -1,    -1,    -1,     3,     4,    -1,    -1,
    1300        7,    -1,     9,    10,    -1,    -1,    -1,    -1,    -1,    -1,
    1301       -1,     3,     4,    -1,    -1,     7,    -1,     9,    10,    -1,
    1302       -1,    -1,    -1,    -1,    -1,    -1,     3,     4,    -1,    -1,
    1303        7,    -1,     9,    10,    86,    87,    88,    89,    90,    -1,
    1304       92,    93,    -1,    95,    96,    -1,    -1,    99,   100,    86,
    1305       87,    88,    89,    90,    -1,    92,    93,    -1,    95,    96,
    1306       -1,    -1,    99,   100,    86,    87,    88,    89,    90,    -1,
    1307       92,    93,    -1,    95,    96,    -1,    -1,    99,   100,    86,
    1308       87,    88,    89,    90,    -1,    92,    93,    -1,    95,    96,
    1309       -1,    -1,    -1,   100,    86,    87,    88,    89,    90,    -1,
    1310       92,    -1,    -1,    95,    96,    -1,    -1,    99,   100,    86,
    1311       87,    88,    89,    90,    -1,    92,    -1,    -1,    95,    96,
    1312        3,     4,    99,   100,     7,    -1,     9,    10,    -1,    -1,
    1313       -1,    -1,    -1,    -1,    -1,     3,     4,    -1,    -1,     7,
    1314       -1,     9,    10,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
    1315        3,     4,    -1,    -1,     7,    -1,     9,    10,    -1,    -1,
    1316       -1,    -1,    -1,    -1,    -1,     3,     4,    -1,    -1,     7,
    1317       -1,     9,    10,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
    1318        3,     4,    -1,    -1,     7,    -1,     9,    10,    -1,    -1,
    1319       -1,    -1,    -1,    -1,    -1,     3,     4,    -1,    -1,     7,
    1320       -1,     9,    10,    86,    87,    88,    89,    90,    -1,    92,
    1321       -1,    -1,    95,    96,    -1,    -1,    99,   100,    86,    87,
    1322       88,    89,    90,    -1,    92,    93,    -1,    95,    96,    -1,
    1323       -1,    -1,   100,    86,    87,    88,    89,    90,    -1,    92,
    1324       93,    -1,    95,    96,    -1,    -1,    -1,   100,    86,    87,
    1325       88,    89,    90,    -1,    92,    93,    -1,    95,    96,    -1,
    1326       -1,    -1,   100,    86,    87,    88,    89,    90,    -1,    92,
    1327       -1,    -1,    95,    96,    -1,    -1,    99,   100,    86,    87,
    1328       88,    89,    90,    -1,    92,    -1,    -1,    95,    96,     3,
    1329        4,    99,   100,     7,    -1,     9,    10,    -1,    -1,    -1,
    1330       -1,    -1,    -1,    -1,     3,     4,    -1,    -1,     7,    -1,
    1331        9,    10,    -1,    -1,    -1,    -1,    -1,    -1,    -1,     3,
    1332        4,    -1,    -1,     7,    -1,     9,    10,    -1,    -1,    -1,
    1333       -1,    -1,    -1,    -1,     3,     4,    -1,    -1,     7,    -1,
    1334        9,    10,    -1,    -1,    -1,    -1,    -1,    -1,    -1,     3,
    1335        4,    -1,    -1,     7,    -1,     9,    10,    -1,    -1,    -1,
    1336       -1,    -1,    -1,    -1,     3,     4,    -1,    -1,     7,    -1,
    1337        9,    10,    86,    87,    88,    89,    90,    -1,    92,    93,
    1338       -1,    95,    96,    -1,    -1,    -1,   100,    86,    87,    88,
    1339       89,    90,    -1,    92,    -1,    -1,    95,    96,    -1,    -1,
    1340       99,   100,    86,    87,    88,    89,    90,    -1,    92,    93,
    1341       -1,    95,    96,    -1,    -1,    -1,   100,    86,    87,    88,
    1342       89,    90,    -1,    92,    -1,    -1,    95,    96,    -1,    -1,
    1343       99,   100,    86,    87,    88,    89,    90,    -1,    92,    -1,
    1344       -1,    95,    96,    -1,    -1,    99,   100,    86,    87,    88,
    1345       89,    90,    91,    92,    -1,    -1,    95,    96,     3,     4,
    1346       -1,   100,     7,    -1,     9,    10,    -1,    -1,    -1,    -1,
    1347       -1,    -1,    -1,     3,     4,    -1,    -1,     7,    -1,     9,
    1348       10,    -1,    -1,    -1,    -1,    -1,    -1,    -1,     3,     4,
    1349       -1,    -1,     7,    -1,     9,    10,    -1,    -1,    -1,    -1,
    1350       -1,    -1,    -1,     3,     4,    -1,    -1,     7,    -1,     9,
    1351       10,    -1,    -1,    -1,    -1,    -1,    -1,    -1,     3,     4,
    1352       -1,    -1,     7,    -1,     9,    10,    -1,    -1,    -1,    -1,
    1353       -1,    -1,    -1,     3,     4,    -1,    -1,     7,    -1,     9,
    1354       10,    86,    87,    88,    89,    90,    -1,    92,    -1,    -1,
    1355       95,    96,    -1,    -1,    99,   100,    86,    87,    88,    89,
    1356       90,    -1,    92,    93,    -1,    95,    96,    -1,    -1,    -1,
    1357      100,    86,    87,    88,    89,    90,    -1,    92,    -1,    -1,
    1358       95,    96,    -1,    -1,    99,   100,    86,    87,    88,    89,
    1359       90,    -1,    92,    93,    -1,    95,    96,    -1,    -1,    -1,
    1360      100,    86,    87,    88,    89,    90,    -1,    92,    -1,    -1,
    1361       95,    96,    -1,    -1,    99,   100,    86,    87,    88,    89,
    1362       90,    91,    92,    -1,    -1,    95,    96,     3,     4,    -1,
    1363      100,     7,    -1,     9,    10,    -1,    -1,    -1,    -1,    -1,
     1291      57,    58,    59,    60,    61,    -1,    63,    64,    65,    66,
     1292      -1,    68,    69,    70,    71,    72,    73,    74,    75,    76,
     1293      77,    78,    79,    80,    81,    82,    83,    84,    85,    -1,
     1294      87,    86,    89,    -1,    91,    -1,    -1,    -1,    95,    94,
     1295      95,    -1,    99,    11,    99,   102,    87,    88,    89,    90,
     1296      91,    -1,    93,    94,    -1,    96,    97,    -1,    -1,   100,
     1297     101,    87,    88,    89,    90,    91,    92,    93,    94,    -1,
     1298      96,    97,     3,     4,    -1,   101,     7,    -1,     9,    10,
     1299      -1,    -1,    -1,    -1,    -1,    -1,    -1,     3,     4,    -1,
     1300      -1,     7,    -1,     9,    10,    -1,    -1,    -1,    -1,    -1,
    13641301      -1,    -1,     3,     4,    -1,    -1,     7,    -1,     9,    10,
     1302      -1,    -1,    -1,    -1,    -1,    -1,    -1,     3,     4,    -1,
     1303      -1,     7,    -1,     9,    10,    -1,    94,    95,    -1,    -1,
     1304      -1,    99,     3,     4,    -1,    -1,     7,    -1,     9,    10,
     1305      -1,    -1,    -1,    -1,    -1,    -1,    -1,     3,     4,    -1,
     1306      -1,     7,    -1,     9,    10,    -1,    87,    88,    89,    90,
     1307      91,    -1,    93,    94,    -1,    96,    97,    -1,    -1,   100,
     1308     101,    87,    88,    89,    90,    91,    -1,    93,    94,    -1,
     1309      96,    97,    -1,    -1,   100,   101,    87,    88,    89,    90,
     1310      91,    -1,    93,    94,    -1,    96,    97,    -1,    -1,   100,
     1311     101,    87,    88,    89,    90,    91,    -1,    93,    94,    -1,
     1312      96,    97,    -1,    -1,    -1,   101,    87,    88,    89,    90,
     1313      91,    -1,    93,    -1,    -1,    96,    97,    -1,    -1,   100,
     1314     101,    87,    88,    89,    90,    91,    -1,    93,    -1,    -1,
     1315      96,    97,     3,     4,   100,   101,     7,    -1,     9,    10,
    13651316      -1,    -1,    -1,    -1,    -1,    -1,    -1,     3,     4,    -1,
    13661317      -1,     7,    -1,     9,    10,    -1,    -1,    -1,    -1,    -1,
     
    13691320      -1,     7,    -1,     9,    10,    -1,    -1,    -1,    -1,    -1,
    13701321      -1,    -1,     3,     4,    -1,    -1,     7,    -1,     9,    10,
    1371       86,    87,    88,    89,    90,    -1,    92,    93,    -1,    95,
    1372       96,    -1,    -1,    -1,   100,    86,    87,    88,    89,    90,
    1373       -1,    92,    -1,    -1,    95,    96,    -1,    -1,    99,   100,
    1374       86,    87,    88,    89,    90,    -1,    92,    -1,    -1,    95,
    1375       96,    -1,    -1,    99,   100,    86,    87,    88,    89,    90,
    1376       -1,    92,    -1,    -1,    95,    96,    -1,    -1,    99,   100,
    1377       86,    87,    88,    89,    90,    -1,    92,    -1,    -1,    95,
    1378       96,    -1,    -1,    99,   100,    86,    87,    88,    89,    90,
    1379       -1,    92,    -1,    -1,    95,    96,     3,     4,    99,   100,
    1380        7,    -1,     9,    10,    -1,    -1,    -1,    -1,    -1,    -1,
    1381       -1,     3,     4,    -1,    -1,     7,    -1,     9,    10,    -1,
    1382       -1,    14,    15,    16,    17,    -1,     3,     4,    21,    -1,
    1383        7,    -1,     9,    10,    -1,    -1,    -1,    -1,    -1,    -1,
    1384        3,    -1,    -1,    -1,     7,    -1,    -1,    10,    -1,    -1,
     1322      -1,    -1,    -1,    -1,    -1,    -1,    -1,     3,     4,    -1,
     1323      -1,     7,    -1,     9,    10,    -1,    87,    88,    89,    90,
     1324      91,    -1,    93,    -1,    -1,    96,    97,    -1,    -1,   100,
     1325     101,    87,    88,    89,    90,    91,    -1,    93,    94,    -1,
     1326      96,    97,    -1,    -1,    -1,   101,    87,    88,    89,    90,
     1327      91,    -1,    93,    94,    -1,    96,    97,    -1,    -1,    -1,
     1328     101,    87,    88,    89,    90,    91,    -1,    93,    94,    -1,
     1329      96,    97,    -1,    -1,    -1,   101,    87,    88,    89,    90,
     1330      91,    -1,    93,    -1,    -1,    96,    97,    -1,    -1,   100,
     1331     101,    87,    88,    89,    90,    91,    -1,    93,    -1,    -1,
     1332      96,    97,     3,     4,   100,   101,     7,    -1,     9,    10,
     1333      -1,    -1,    -1,    -1,    -1,    -1,    -1,     3,     4,    -1,
     1334      -1,     7,    -1,     9,    10,    -1,    -1,    -1,    -1,    -1,
     1335      -1,    -1,     3,     4,    -1,    -1,     7,    -1,     9,    10,
     1336      -1,    -1,    -1,    -1,    -1,    -1,    -1,     3,     4,    -1,
     1337      -1,     7,    -1,     9,    10,    -1,    -1,    -1,    -1,    -1,
     1338      -1,    -1,     3,     4,    -1,    -1,     7,    -1,     9,    10,
     1339      -1,    -1,    -1,    -1,    -1,    -1,    -1,     3,     4,    -1,
     1340      -1,     7,    -1,     9,    10,    -1,    87,    88,    89,    90,
     1341      91,    -1,    93,    94,    -1,    96,    97,    -1,    -1,    -1,
     1342     101,    87,    88,    89,    90,    91,    -1,    93,    -1,    -1,
     1343      96,    97,    -1,    -1,   100,   101,    87,    88,    89,    90,
     1344      91,    -1,    93,    94,    -1,    96,    97,    -1,    -1,    -1,
     1345     101,    87,    88,    89,    90,    91,    -1,    93,    -1,    -1,
     1346      96,    97,    -1,    -1,   100,   101,    87,    88,    89,    90,
     1347      91,    -1,    93,    -1,    -1,    96,    97,    -1,    -1,   100,
     1348     101,    87,    88,    89,    90,    91,    92,    93,    -1,    -1,
     1349      96,    97,     3,     4,    -1,   101,     7,    -1,     9,    10,
     1350      -1,    -1,    -1,    -1,    -1,    -1,    -1,     3,     4,    -1,
     1351      -1,     7,    -1,     9,    10,    -1,    -1,    -1,    -1,    -1,
     1352      -1,    -1,     3,     4,    -1,    -1,     7,    -1,     9,    10,
     1353      -1,    -1,    -1,    -1,    -1,    -1,    -1,     3,     4,    -1,
     1354      -1,     7,    -1,     9,    10,    -1,    -1,    -1,    -1,    -1,
     1355      -1,    -1,     3,     4,    -1,    -1,     7,    -1,     9,    10,
     1356      -1,    -1,    -1,    -1,    -1,    -1,    -1,     3,     4,    -1,
     1357      -1,     7,    -1,     9,    10,    -1,    87,    88,    89,    90,
     1358      91,    -1,    93,    -1,    -1,    96,    97,    -1,    -1,   100,
     1359     101,    87,    88,    89,    90,    91,    -1,    93,    94,    -1,
     1360      96,    97,    -1,    -1,    -1,   101,    87,    88,    89,    90,
     1361      91,    -1,    93,    -1,    -1,    96,    97,    -1,    -1,   100,
     1362     101,    87,    88,    89,    90,    91,    -1,    93,    94,    -1,
     1363      96,    97,    -1,    -1,    -1,   101,    87,    88,    89,    90,
     1364      91,    -1,    93,    -1,    -1,    96,    97,    -1,    -1,   100,
     1365     101,    87,    88,    89,    90,    91,    92,    93,    -1,    -1,
     1366      96,    97,     3,     4,    -1,   101,     7,    -1,     9,    10,
     1367      -1,    -1,    -1,    -1,    -1,    -1,    -1,     3,     4,    -1,
     1368      -1,     7,    -1,     9,    10,    -1,    -1,    -1,    -1,    -1,
     1369      -1,    -1,     3,     4,    -1,    -1,     7,    -1,     9,    10,
     1370      -1,    -1,    -1,    -1,    -1,    -1,    -1,     3,     4,    -1,
     1371      -1,     7,    -1,     9,    10,    -1,    -1,    -1,    -1,    -1,
     1372      -1,    -1,     3,     4,    -1,    -1,     7,    -1,     9,    10,
     1373      -1,    -1,    -1,    -1,    -1,    -1,    -1,     3,     4,    -1,
     1374      -1,     7,    -1,     9,    10,    -1,    87,    88,    89,    90,
     1375      91,    -1,    93,    94,    -1,    96,    97,    -1,    -1,    -1,
     1376     101,    87,    88,    89,    90,    91,    -1,    93,    -1,    -1,
     1377      96,    97,    -1,    -1,   100,   101,    87,    88,    89,    90,
     1378      91,    -1,    93,    -1,    -1,    96,    97,    -1,    -1,   100,
     1379     101,    87,    88,    89,    90,    91,    -1,    93,    11,    -1,
     1380      96,    97,    -1,    -1,   100,   101,    87,    88,    89,    90,
     1381      91,    -1,    93,    11,    -1,    96,    97,    -1,    -1,   100,
     1382     101,    87,    88,    89,    90,    91,    -1,    93,    -1,    -1,
     1383      96,    97,     3,     4,   100,   101,     7,    -1,     9,    10,
     1384      -1,    -1,    -1,    -1,    -1,    -1,    -1,     3,     4,    -1,
     1385      -1,     7,    -1,     9,    10,    -1,    -1,    -1,    -1,    -1,
     1386      -1,    -1,     3,     4,    -1,    -1,     7,    -1,     9,    10,
     1387      -1,    -1,    -1,    86,    -1,    -1,     3,    -1,    -1,    -1,
     1388       7,    94,    95,    10,    -1,    -1,    99,    -1,    86,    -1,
     1389      -1,    -1,    -1,    -1,    -1,    -1,    94,    95,    -1,    -1,
     1390      -1,    99,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
     1391      -1,    -1,    -1,    -1,    -1,    -1,    87,    88,    89,    90,
     1392      91,    92,    93,    -1,    -1,    96,    97,    -1,    -1,    -1,
     1393     101,    87,    88,    89,    90,    91,    -1,    93,    -1,    -1,
     1394      96,    97,    -1,    -1,    -1,   101,    87,    88,    89,    90,
     1395      91,    -1,    93,    -1,    -1,    -1,    97,    -1,    -1,    -1,
     1396     101,    88,    89,    90,    91,    -1,    93,    -1,    -1,     8,
     1397      97,    -1,    -1,    -1,   101,    14,    15,    16,    17,    14,
     1398      15,    16,    17,    22,    -1,    -1,    -1,    22,    -1,    -1,
    13851399      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
    1386       53,    54,    55,    56,    -1,    -1,    -1,    -1,    -1,    -1,
    1387       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    86,
    1388       87,    88,    89,    90,    91,    92,    -1,    -1,    95,    96,
    1389       -1,    -1,    -1,   100,    86,    87,    88,    89,    90,    -1,
    1390       92,    -1,    -1,    95,    96,    -1,    -1,    -1,   100,    86,
    1391       87,    88,    89,    90,    -1,    92,    -1,    -1,    -1,    96,
    1392       -1,    -1,    -1,   100,    87,    88,    89,    90,    -1,    92,
    1393       -1,    -1,     8,    96,    -1,    -1,    -1,   100,    14,    15,
    1394       16,    17,    -1,    -1,    -1,    21,    -1,    -1,    -1,    -1,
    1395       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
    1396       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    45,
    1397       46,    47,    48,    49,    50,    51,    52,    53,    54,    55,
    1398       56,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    65,
    1399       -1,    67,    68,    69,    -1,    71,    72,     8,    -1,    -1,
    1400       76,    77,    -1,    14,    15,    16,    17,    -1,    84,    -1,
    1401       21,    -1,    88,    -1,    90,    -1,    -1,    -1,    -1,    -1,
    1402       -1,    -1,    98,    99,    -1,   101,    -1,    -1,    -1,    -1,
    1403       -1,    -1,    -1,    -1,    45,    46,    47,    48,    49,    50,
    1404       51,    52,    53,    54,    55,    56,    -1,    -1,    -1,    -1,
    1405       -1,    -1,    -1,    -1,    65,    -1,    67,    68,    69,    -1,
    1406       71,    72,     8,    -1,    -1,    76,    77,    -1,    14,    15,
    1407       16,    17,    -1,    84,    -1,    21,    -1,    88,    -1,    90,
    1408       -1,    -1,    -1,    -1,    -1,    -1,    -1,    98,    99,    -1,
    1409      101,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    45,
    1410       46,    47,    48,    49,    50,    51,    52,    53,    54,    55,
    1411       56,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    65,
    1412       -1,    67,    68,    69,    -1,    71,    72,     8,    -1,    -1,
    1413       76,    77,    -1,    14,    15,    16,    17,    -1,    84,    -1,
    1414       21,    -1,    88,    -1,    90,    -1,    -1,    -1,    -1,    -1,
    1415       -1,    -1,    98,    99,    -1,   101,    -1,    -1,    -1,    -1,
    1416       -1,    -1,    -1,    -1,    45,    46,    47,    48,    49,    50,
    1417       51,    52,    53,    54,    55,    56,    -1,    -1,    -1,    -1,
    1418       -1,    -1,    -1,    -1,    65,    -1,    67,    68,    69,    -1,
    1419       71,    72,     8,    -1,    -1,    76,    77,    -1,    14,    15,
    1420       16,    17,    -1,    84,    -1,    21,    -1,    88,    -1,    90,
    1421       -1,    -1,    -1,    -1,    -1,    -1,    -1,    98,    99,    -1,
    1422      101,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    45,
    1423       46,    47,    48,    49,    50,    51,    52,    53,    54,    55,
    1424       56,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    65,
    1425       -1,    67,    68,    69,    -1,    71,    72,     8,    -1,    -1,
    1426       76,    77,    -1,    14,    15,    16,    17,    -1,    84,    -1,
    1427       21,    -1,    88,    -1,    90,    -1,    -1,    -1,    -1,    -1,
    1428       -1,    -1,    98,    99,    -1,   101,    -1,    -1,    -1,    -1,
    1429       -1,    -1,    -1,    -1,    45,    46,    47,    48,    49,    50,
    1430       51,    52,    53,    54,    55,    56,    -1,    -1,    -1,    -1,
    1431       -1,    -1,    -1,    -1,    65,    -1,    67,    68,    69,    -1,
    1432       71,    72,     8,    -1,    -1,    76,    77,    -1,    14,    15,
    1433       16,    17,    -1,    84,    -1,    21,    -1,    88,    -1,    90,
    1434       -1,    -1,    -1,    -1,    -1,    -1,    -1,    98,    99,    -1,
    1435      101,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    45,
    1436       46,    47,    48,    49,    50,    51,    52,    53,    54,    55,
    1437       56,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    65,
    1438       -1,    67,    68,    69,    -1,    71,    72,     8,    -1,    -1,
    1439       76,    77,    -1,    14,    15,    16,    17,    -1,    84,    -1,
    1440       21,    -1,    88,    -1,    90,    -1,    -1,    -1,    -1,    -1,
    1441       -1,    -1,    98,    -1,    -1,   101,    -1,    -1,    -1,    -1,
    1442       -1,    -1,    -1,    -1,    45,    46,    47,    48,    49,    50,
    1443       51,    52,    53,    54,    55,    56,    -1,    -1,    -1,    -1,
    1444       -1,    -1,    -1,    -1,    65,    -1,    67,    68,    69,    -1,
    1445       71,    72,     8,    -1,    -1,    76,    77,    -1,    14,    15,
    1446       16,    17,    -1,    84,    -1,    21,    -1,    88,    -1,    90,
    1447       -1,    -1,    -1,    -1,    -1,    -1,    -1,    98,    -1,    -1,
    1448      101,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    45,
    1449       46,    47,    48,    49,    50,    51,    52,    53,    54,    55,
    1450       56,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    65,
    1451       -1,    67,    68,    69,    -1,    71,    72,     8,    -1,    -1,
    1452       76,    77,    -1,    14,    15,    16,    17,    -1,    84,    -1,
    1453       21,    -1,    88,    -1,    90,    -1,    -1,    -1,    -1,    -1,
    1454       -1,    -1,    98,    -1,    -1,   101,    -1,    -1,    -1,    -1,
    1455       -1,    -1,    -1,    -1,    45,    46,    47,    48,    49,    50,
    1456       51,    52,    53,    54,    55,    56,    -1,    -1,    -1,    -1,
    1457       -1,    -1,    -1,    -1,    65,    -1,    67,    68,    69,    -1,
    1458       71,    72,     8,    -1,    -1,    76,    77,    -1,    14,    15,
    1459       16,    17,    -1,    84,    -1,    21,    -1,    88,    -1,    90,
    1460       -1,    -1,    -1,    -1,    -1,    -1,    -1,    98,    -1,    -1,
    1461      101,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    45,
    1462       46,    47,    48,    49,    50,    51,    52,    53,    54,    55,
    1463       56,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    65,
    1464       -1,    67,    68,    69,    -1,    71,    72,     8,    -1,    -1,
    1465       76,    77,    -1,    14,    15,    16,    17,    -1,    84,    -1,
    1466       21,    -1,    88,    -1,    90,    -1,    -1,    -1,    -1,    -1,
    1467       -1,    -1,    98,    -1,    -1,   101,    -1,    -1,    -1,    -1,
    1468       -1,    -1,    -1,    -1,    45,    46,    47,    48,    49,    50,
    1469       51,    52,    53,    54,    55,    56,    -1,    -1,    -1,    -1,
    1470       -1,    -1,    -1,    -1,    65,    -1,    67,    68,    69,    -1,
    1471       71,    72,     8,    -1,    -1,    76,    77,    -1,    14,    15,
    1472       16,    17,    -1,    84,    -1,    21,    -1,    88,    -1,    90,
    1473       -1,    -1,    -1,    -1,    -1,    -1,    -1,    98,    -1,    -1,
    1474      101,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    45,
    1475       46,    47,    48,    49,    50,    51,    52,    53,    54,    55,
    1476       56,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    65,
    1477       -1,    67,    68,    69,    -1,    71,    72,     8,    -1,    -1,
    1478       76,    77,    -1,    14,    15,    16,    17,    -1,    84,    -1,
    1479       21,    -1,    88,    -1,    90,    -1,    -1,    -1,    -1,    -1,
    1480       -1,    -1,    98,    -1,    -1,   101,    -1,    -1,    -1,    -1,
    1481       -1,    -1,    -1,    -1,    45,    46,    47,    48,    49,    50,
    1482       51,    52,    53,    54,    55,    56,    -1,    -1,    -1,    -1,
    1483       -1,    -1,    -1,    -1,    65,    -1,    67,    68,    69,    -1,
    1484       71,    72,     8,    -1,    -1,    76,    77,    -1,    14,    15,
    1485       16,    17,    -1,    84,    -1,    21,    -1,    88,    -1,    90,
    1486       -1,    -1,    -1,    -1,    -1,    -1,    -1,    98,    -1,    -1,
    1487      101,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    45,
    1488       46,    47,    48,    49,    50,    51,    52,    53,    54,    55,
    1489       56,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    65,
    1490       -1,    67,    68,    69,    -1,    71,    72,     8,    -1,    -1,
    1491       76,    77,    -1,    14,    15,    16,    17,    -1,    84,    -1,
    1492       21,    -1,    88,    -1,    90,    -1,    -1,    -1,    -1,    -1,
    1493       -1,    -1,    98,    -1,    -1,   101,    -1,    -1,    -1,    -1,
    1494       -1,    -1,    -1,    -1,    45,    46,    47,    48,    49,    50,
    1495       51,    52,    53,    54,    55,    56,    -1,    -1,    -1,    -1,
    1496       -1,    -1,    -1,    -1,    65,    -1,    67,    68,    69,    -1,
    1497       71,    72,    -1,    -1,    -1,    76,    77,    -1,    -1,    -1,
    1498       -1,    -1,    -1,    84,    -1,    -1,    -1,    88,    -1,    90,
    1499       -1,    -1,    -1,    -1,    -1,    -1,    -1,    98,    -1,    -1,
    1500      101
     1400      -1,    -1,    -1,    -1,    -1,    -1,    -1,    46,    47,    48,
     1401      49,    50,    51,    52,    53,    54,    55,    56,    57,    54,
     1402      55,    56,    57,    -1,    -1,    -1,    -1,    66,    -1,    68,
     1403      69,    70,    -1,    72,    73,     8,    -1,    -1,    77,    78,
     1404      -1,    14,    15,    16,    17,    -1,    85,    -1,    -1,    22,
     1405      89,    -1,    91,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
     1406      99,   100,    -1,   102,    -1,    -1,    -1,    -1,    -1,    -1,
     1407      -1,    -1,    -1,    46,    47,    48,    49,    50,    51,    52,
     1408      53,    54,    55,    56,    57,    -1,    -1,    -1,    -1,    -1,
     1409      -1,    -1,    -1,    66,    -1,    68,    69,    70,    -1,    72,
     1410      73,     8,    -1,    -1,    77,    78,    -1,    14,    15,    16,
     1411      17,    -1,    85,    -1,    -1,    22,    89,    -1,    91,    -1,
     1412      -1,    -1,    -1,    -1,    -1,    -1,    99,   100,    -1,   102,
     1413      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    46,
     1414      47,    48,    49,    50,    51,    52,    53,    54,    55,    56,
     1415      57,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    66,
     1416      -1,    68,    69,    70,    -1,    72,    73,     8,    -1,    -1,
     1417      77,    78,    -1,    14,    15,    16,    17,    -1,    85,    -1,
     1418      -1,    22,    89,    -1,    91,    -1,    -1,    -1,    -1,    -1,
     1419      -1,    -1,    99,   100,    -1,   102,    -1,    -1,    -1,    -1,
     1420      -1,    -1,    -1,    -1,    -1,    46,    47,    48,    49,    50,
     1421      51,    52,    53,    54,    55,    56,    57,    -1,    -1,    -1,
     1422      -1,    -1,    -1,    -1,    -1,    66,    -1,    68,    69,    70,
     1423      -1,    72,    73,     8,    -1,    -1,    77,    78,    -1,    14,
     1424      15,    16,    17,    -1,    85,    -1,    -1,    22,    89,    -1,
     1425      91,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    99,   100,
     1426      -1,   102,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
     1427      -1,    46,    47,    48,    49,    50,    51,    52,    53,    54,
     1428      55,    56,    57,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
     1429      -1,    66,    -1,    68,    69,    70,    -1,    72,    73,     8,
     1430      -1,    -1,    77,    78,    -1,    14,    15,    16,    17,    -1,
     1431      85,    -1,    -1,    22,    89,    -1,    91,    -1,    -1,    -1,
     1432      -1,    -1,    -1,    -1,    99,   100,    -1,   102,    -1,    -1,
     1433      -1,    -1,    -1,    -1,    -1,    -1,    -1,    46,    47,    48,
     1434      49,    50,    51,    52,    53,    54,    55,    56,    57,    -1,
     1435      -1,    -1,    -1,    -1,    -1,    -1,    -1,    66,    -1,    68,
     1436      69,    70,    -1,    72,    73,     8,    -1,    -1,    77,    78,
     1437      -1,    14,    15,    16,    17,    -1,    85,    -1,    -1,    22,
     1438      89,    -1,    91,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
     1439      99,   100,    -1,   102,    -1,    -1,    -1,    -1,    -1,    -1,
     1440      -1,    -1,    -1,    46,    47,    48,    49,    50,    51,    52,
     1441      53,    54,    55,    56,    57,    -1,    -1,    -1,    -1,    -1,
     1442      -1,    -1,    -1,    66,    -1,    68,    69,    70,    -1,    72,
     1443      73,     8,    -1,    -1,    77,    78,    -1,    14,    15,    16,
     1444      17,    -1,    85,    -1,    -1,    22,    89,    -1,    91,    -1,
     1445      -1,    -1,    -1,    -1,    -1,    -1,    99,    -1,    -1,   102,
     1446      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    46,
     1447      47,    48,    49,    50,    51,    52,    53,    54,    55,    56,
     1448      57,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    66,
     1449      -1,    68,    69,    70,    -1,    72,    73,     8,    -1,    -1,
     1450      77,    78,    -1,    14,    15,    16,    17,    -1,    85,    -1,
     1451      -1,    22,    89,    -1,    91,    -1,    -1,    -1,    -1,    -1,
     1452      -1,    -1,    99,    -1,    -1,   102,    -1,    -1,    -1,    -1,
     1453      -1,    -1,    -1,    -1,    -1,    46,    47,    48,    49,    50,
     1454      51,    52,    53,    54,    55,    56,    57,    -1,    -1,    -1,
     1455      -1,    -1,    -1,    -1,    -1,    66,    -1,    68,    69,    70,
     1456      -1,    72,    73,     8,    -1,    -1,    77,    78,    -1,    14,
     1457      15,    16,    17,    -1,    85,    -1,    -1,    22,    89,    -1,
     1458      91,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    99,    -1,
     1459      -1,   102,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
     1460      -1,    46,    47,    48,    49,    50,    51,    52,    53,    54,
     1461      55,    56,    57,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
     1462      -1,    66,    -1,    68,    69,    70,    -1,    72,    73,     8,
     1463      -1,    -1,    77,    78,    -1,    14,    15,    16,    17,    -1,
     1464      85,    -1,    -1,    22,    89,    -1,    91,    -1,    -1,    -1,
     1465      -1,    -1,    -1,    -1,    99,    -1,    -1,   102,    -1,    -1,
     1466      -1,    -1,    -1,    -1,    -1,    -1,    -1,    46,    47,    48,
     1467      49,    50,    51,    52,    53,    54,    55,    56,    57,    -1,
     1468      -1,    -1,    -1,    -1,    -1,    -1,    -1,    66,    -1,    68,
     1469      69,    70,    -1,    72,    73,     8,    -1,    -1,    77,    78,
     1470      -1,    14,    15,    16,    17,    -1,    85,    -1,    -1,    22,
     1471      89,    -1,    91,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
     1472      99,    -1,    -1,   102,    -1,    -1,    -1,    -1,    -1,    -1,
     1473      -1,    -1,    -1,    46,    47,    48,    49,    50,    51,    52,
     1474      53,    54,    55,    56,    57,    -1,    -1,    -1,    -1,    -1,
     1475      -1,    -1,    -1,    66,    -1,    68,    69,    70,    -1,    72,
     1476      73,     8,    -1,    -1,    77,    78,    -1,    14,    15,    16,
     1477      17,    -1,    85,    -1,    -1,    22,    89,    -1,    91,    -1,
     1478      -1,    -1,    -1,    -1,    -1,    -1,    99,    -1,    -1,   102,
     1479      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    46,
     1480      47,    48,    49,    50,    51,    52,    53,    54,    55,    56,
     1481      57,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    66,
     1482      -1,    68,    69,    70,    -1,    72,    73,     8,    -1,    -1,
     1483      77,    78,    -1,    14,    15,    16,    17,    -1,    85,    -1,
     1484      -1,    22,    89,    -1,    91,    -1,    -1,    -1,    -1,    -1,
     1485      -1,    -1,    99,    -1,    -1,   102,    -1,    -1,    -1,    -1,
     1486      -1,    -1,    -1,    -1,    -1,    46,    47,    48,    49,    50,
     1487      51,    52,    53,    54,    55,    56,    57,    -1,    -1,    -1,
     1488      -1,    -1,    -1,    -1,    -1,    66,    -1,    68,    69,    70,
     1489      -1,    72,    73,     8,    -1,    -1,    77,    78,    -1,    14,
     1490      15,    16,    17,    -1,    85,    -1,    -1,    22,    89,    -1,
     1491      91,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    99,    -1,
     1492      -1,   102,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
     1493      -1,    46,    47,    48,    49,    50,    51,    52,    53,    54,
     1494      55,    56,    57,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
     1495      -1,    66,    -1,    68,    69,    70,    -1,    72,    73,     8,
     1496      -1,    -1,    77,    78,    -1,    14,    15,    16,    17,    -1,
     1497      85,    -1,    -1,    22,    89,    -1,    91,    -1,    -1,    -1,
     1498      -1,    -1,    -1,    -1,    99,    -1,    -1,   102,    -1,    -1,
     1499      -1,    -1,    -1,    -1,    -1,    -1,    -1,    46,    47,    48,
     1500      49,    50,    51,    52,    53,    54,    55,    56,    57,    -1,
     1501      -1,    -1,    -1,    -1,    -1,    -1,    -1,    66,    -1,    68,
     1502      69,    70,    -1,    72,    73,    -1,    -1,    -1,    77,    78,
     1503      -1,    -1,    -1,    -1,    -1,    -1,    85,    -1,    -1,    -1,
     1504      89,    -1,    91,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
     1505      99,    -1,    -1,   102
    15011506};
    15021507
     
    15051510static const yytype_uint8 yystos[] =
    15061511{
    1507        0,   103,     0,     1,     8,    14,    15,    16,    17,    21,
    1508       31,    45,    46,    47,    48,    49,    50,    51,    52,    53,
    1509       54,    55,    56,    57,    58,    59,    60,    62,    63,    64,
    1510       65,    67,    68,    69,    70,    71,    72,    73,    74,    75,
    1511       76,    77,    78,    79,    80,    81,    82,    83,    84,    86,
    1512       88,    90,    94,    98,   101,   104,   105,   106,   107,   108,
    1513      109,   110,   111,   113,   114,   116,   117,   118,   119,   120,
    1514      127,   128,   129,   130,   131,   132,   133,   134,   135,   136,
    1515      137,   138,   139,   140,   141,   142,   143,   144,   145,    94,
    1516       16,    17,    53,    54,    55,    56,    84,   111,   127,    98,
    1517      109,   111,   118,    98,    98,    98,    98,    98,    98,    98,
    1518       98,    98,    98,   109,    98,   109,    98,   109,    98,   109,
    1519       65,    66,   110,    65,    94,   109,    98,   111,    65,    98,
    1520       98,    66,    98,    98,    65,    98,    65,    98,    16,   111,
    1521      119,   120,   120,   111,   110,   110,   111,    94,    11,    98,
    1522       85,    93,     3,     4,     7,     9,    10,    86,    87,    88,
    1523       89,    90,    92,    95,    96,   100,   111,   111,   110,    12,
    1524       85,    93,    94,   126,    98,   109,    93,   109,   111,    98,
    1525       98,    98,    98,    98,    98,   111,    66,    98,   111,   121,
    1526      111,   111,   111,   111,   111,   111,   111,    99,   110,   111,
    1527       99,   110,   111,    99,   110,    94,    94,    16,    17,    53,
    1528       54,    55,    56,    99,   109,   127,    65,    66,   111,   112,
    1529       65,   111,    66,    99,   110,    91,    99,   101,   109,    99,
    1530      110,   111,   111,   111,   111,   111,   111,   111,   111,   111,
    1531      111,   111,   111,   109,    85,    99,   115,    93,    66,   109,
    1532      111,    90,   109,   126,   111,   111,   110,   111,   110,   111,
    1533       99,   111,    99,    93,    99,    93,    93,    93,    99,    93,
    1534       99,    93,    93,    99,    99,    99,    99,    99,    99,    99,
    1535       99,    99,    99,    99,    99,    93,    99,    99,    66,    93,
    1536      111,    65,    99,    99,    99,    91,    93,   111,   111,    93,
    1537       99,   111,   109,   111,   121,    99,    99,    93,   121,   111,
    1538      111,   111,   111,   111,   111,    16,    17,    53,    54,    55,
    1539       56,   127,    45,    48,    49,    51,    52,   111,    99,    66,
    1540       66,    73,   111,   115,   115,   111,    91,    90,    93,   110,
    1541       93,    99,    93,    99,    93,    93,    99,    93,    99,    99,
    1542       99,    99,    99,    99,    99,    99,    99,    99,    99,    99,
    1543       99,    99,    91,    93,    90,   110,   121,    99,    68,    98,
    1544      122,   123,   125,   111,   111,   111,   111,   111,   111,    91,
    1545       93,   123,   124,    98,    99,    99,    99,    99,    99,    99,
    1546       91,   125,    93,    99,   110,   124,    99
     1512       0,   104,     0,     1,     8,    14,    15,    16,    17,    22,
     1513      32,    46,    47,    48,    49,    50,    51,    52,    53,    54,
     1514      55,    56,    57,    58,    59,    60,    61,    63,    64,    65,
     1515      66,    68,    69,    70,    71,    72,    73,    74,    75,    76,
     1516      77,    78,    79,    80,    81,    82,    83,    84,    85,    87,
     1517      89,    91,    95,    99,   102,   105,   106,   107,   108,   109,
     1518     110,   111,   112,   114,   115,   117,   118,   119,   120,   121,
     1519     128,   129,   130,   131,   132,   133,   134,   135,   136,   137,
     1520     138,   139,   140,   141,   142,   143,   144,   145,   146,    95,
     1521      16,    17,    54,    55,    56,    57,    85,   112,   128,    99,
     1522     110,   112,   119,    99,    99,    99,    99,    99,    99,    99,
     1523      99,    99,    99,   110,    99,   110,    99,   110,    99,   110,
     1524      66,    67,   111,    66,    95,   110,    99,   112,    66,    99,
     1525      99,    67,    99,    99,    66,    99,    66,    99,    16,   112,
     1526     120,   121,   121,   112,   111,   111,   112,    95,    11,    99,
     1527      86,    94,     3,     4,     7,     9,    10,    87,    88,    89,
     1528      90,    91,    93,    96,    97,   101,   112,   112,   111,    12,
     1529      86,    94,    95,   127,    99,   110,    94,   110,   112,    99,
     1530      99,    99,    99,    99,    99,   112,    67,    99,   112,   122,
     1531     112,   112,   112,   112,   112,   112,   112,   100,   111,   112,
     1532     100,   111,   112,   100,   111,    95,    95,    16,    17,    54,
     1533      55,    56,    57,   100,   110,   128,    66,    67,   112,   113,
     1534      66,   112,    67,   100,   111,    92,   100,   102,   110,   100,
     1535     111,   112,   112,   112,   112,   112,   112,   112,   112,   112,
     1536     112,   112,   112,   110,    86,   100,   116,    94,    67,   110,
     1537     112,    91,   110,   127,   112,   112,   111,   112,   111,   112,
     1538     100,   112,   100,    94,   100,    94,    94,    94,   100,    94,
     1539     100,    94,    94,   100,   100,   100,   100,   100,   100,   100,
     1540     100,   100,   100,   100,   100,    94,   100,   100,    67,    94,
     1541     112,    66,   100,   100,   100,    92,    94,   112,   112,    94,
     1542     100,   112,   110,   112,   122,   100,   100,    94,   122,   112,
     1543     112,   112,   112,   112,   112,    16,    17,    54,    55,    56,
     1544      57,   128,    46,    49,    50,    52,    53,   112,   100,    67,
     1545      67,    74,   112,   116,   116,   112,    92,    91,    94,   111,
     1546      94,   100,    94,   100,    94,    94,   100,    94,   100,   100,
     1547     100,   100,   100,   100,   100,   100,   100,   100,   100,   100,
     1548     100,   100,    92,    94,    91,   111,   122,   100,    69,    99,
     1549     123,   124,   126,   112,   112,   112,   112,   112,   112,    92,
     1550      94,   124,   125,    99,   100,   100,   100,   100,   100,   100,
     1551      92,   126,    94,   100,   111,   125,   100
    15471552};
    15481553
     
    23682373
    23692374/* Line 1464 of yacc.c  */
    2370 #line 319 "grammar.y"
     2375#line 320 "grammar.y"
    23712376    {
    23722377            if (timerv)
     
    24042409
    24052410/* Line 1464 of yacc.c  */
    2406 #line 354 "grammar.y"
     2411#line 355 "grammar.y"
    24072412    {currentVoice->ifsw=0;;}
    24082413    break;
     
    24112416
    24122417/* Line 1464 of yacc.c  */
    2413 #line 356 "grammar.y"
     2418#line 357 "grammar.y"
    24142419    { (yyvsp[(1) - (2)].lv).CleanUp(); currentVoice->ifsw=0;;}
    24152420    break;
     
    24182423
    24192424/* Line 1464 of yacc.c  */
    2420 #line 358 "grammar.y"
     2425#line 359 "grammar.y"
    24212426    {
    24222427            YYACCEPT;
     
    24272432
    24282433/* Line 1464 of yacc.c  */
    2429 #line 362 "grammar.y"
     2434#line 363 "grammar.y"
    24302435    {
    24312436            currentVoice->ifsw=0;
     
    24372442
    24382443/* Line 1464 of yacc.c  */
    2439 #line 367 "grammar.y"
     2444#line 368 "grammar.y"
    24402445    {currentVoice->ifsw=0;;}
    24412446    break;
     
    24442449
    24452450/* Line 1464 of yacc.c  */
    2446 #line 369 "grammar.y"
     2451#line 370 "grammar.y"
    24472452    {
    24482453            #ifdef SIQ
     
    24982503
    24992504/* Line 1464 of yacc.c  */
    2500 #line 427 "grammar.y"
     2505#line 428 "grammar.y"
    25012506    {if (currentVoice!=NULL) currentVoice->ifsw=0;;}
    25022507    break;
     
    25052510
    25062511/* Line 1464 of yacc.c  */
    2507 #line 430 "grammar.y"
     2512#line 431 "grammar.y"
    25082513    { omFree((ADDRESS)(yyvsp[(2) - (2)].name)); ;}
    25092514    break;
     
    25122517
    25132518/* Line 1464 of yacc.c  */
    2514 #line 445 "grammar.y"
     2519#line 446 "grammar.y"
    25152520    {
    25162521            if(iiAssign(&(yyvsp[(1) - (2)].lv),&(yyvsp[(2) - (2)].lv))) YYERROR;
     
    25212526
    25222527/* Line 1464 of yacc.c  */
    2523 #line 452 "grammar.y"
     2528#line 453 "grammar.y"
    25242529    {
    25252530            if (currRing==NULL) MYYERROR("no ring active");
     
    25312536
    25322537/* Line 1464 of yacc.c  */
    2533 #line 457 "grammar.y"
     2538#line 458 "grammar.y"
    25342539    {
    25352540            syMake(&(yyval.lv),(yyvsp[(1) - (1)].name));
     
    25402545
    25412546/* Line 1464 of yacc.c  */
    2542 #line 461 "grammar.y"
     2547#line 462 "grammar.y"
    25432548    {
    25442549            if(iiExprArith2(&(yyval.lv), &(yyvsp[(1) - (3)].lv), COLONCOLON, &(yyvsp[(3) - (3)].lv))) YYERROR;
     
    25492554
    25502555/* Line 1464 of yacc.c  */
    2551 #line 465 "grammar.y"
     2556#line 466 "grammar.y"
    25522557    {
    25532558            if(iiExprArith2(&(yyval.lv), &(yyvsp[(1) - (3)].lv), '.', &(yyvsp[(3) - (3)].lv))) YYERROR;
     
    25582563
    25592564/* Line 1464 of yacc.c  */
    2560 #line 469 "grammar.y"
     2565#line 470 "grammar.y"
    25612566    {
    25622567            if(iiExprArith1(&(yyval.lv),&(yyvsp[(1) - (3)].lv),'(')) YYERROR;
     
    25672572
    25682573/* Line 1464 of yacc.c  */
    2569 #line 473 "grammar.y"
     2574#line 474 "grammar.y"
    25702575    {
    25712576            if ((yyvsp[(1) - (4)].lv).next==NULL)
     
    25862591
    25872592/* Line 1464 of yacc.c  */
    2588 #line 487 "grammar.y"
     2593#line 488 "grammar.y"
    25892594    {
    25902595            if (currRingHdl==NULL) MYYERROR("no ring active");
     
    26192624
    26202625/* Line 1464 of yacc.c  */
    2621 #line 515 "grammar.y"
     2626#line 516 "grammar.y"
    26222627    {
    26232628            memset(&(yyval.lv),0,sizeof((yyval.lv)));
     
    26482653
    26492654/* Line 1464 of yacc.c  */
    2650 #line 539 "grammar.y"
     2655#line 540 "grammar.y"
    26512656    {
    26522657            memset(&(yyval.lv),0,sizeof((yyval.lv)));
     
    26592664
    26602665/* Line 1464 of yacc.c  */
    2661 #line 545 "grammar.y"
     2666#line 546 "grammar.y"
    26622667    {
    26632668            memset(&(yyval.lv),0,sizeof((yyval.lv)));
     
    26702675
    26712676/* Line 1464 of yacc.c  */
    2672 #line 551 "grammar.y"
     2677#line 552 "grammar.y"
    26732678    {
    26742679            if(iiExprArith1(&(yyval.lv),&(yyvsp[(3) - (4)].lv),(yyvsp[(1) - (4)].i))) YYERROR;
     
    26792684
    26802685/* Line 1464 of yacc.c  */
    2681 #line 555 "grammar.y"
     2686#line 556 "grammar.y"
    26822687    {
    26832688            if(iiExprArith1(&(yyval.lv),&(yyvsp[(3) - (4)].lv),(yyvsp[(1) - (4)].i))) YYERROR;
     
    26882693
    26892694/* Line 1464 of yacc.c  */
    2690 #line 559 "grammar.y"
     2695#line 560 "grammar.y"
    26912696    {
    26922697            if(iiExprArithM(&(yyval.lv),&(yyvsp[(3) - (4)].lv),(yyvsp[(1) - (4)].i))) YYERROR;
     
    26972702
    26982703/* Line 1464 of yacc.c  */
    2699 #line 563 "grammar.y"
     2704#line 564 "grammar.y"
    27002705    {
    27012706            if(iiExprArithM(&(yyval.lv),NULL,(yyvsp[(1) - (3)].i))) YYERROR;
     
    27062711
    27072712/* Line 1464 of yacc.c  */
    2708 #line 567 "grammar.y"
     2713#line 568 "grammar.y"
    27092714    {
    27102715            if(iiExprArith1(&(yyval.lv),&(yyvsp[(3) - (4)].lv),(yyvsp[(1) - (4)].i))) YYERROR;
     
    27152720
    27162721/* Line 1464 of yacc.c  */
    2717 #line 571 "grammar.y"
     2722#line 572 "grammar.y"
    27182723    {
    27192724            if(iiExprArithM(&(yyval.lv),&(yyvsp[(3) - (4)].lv),(yyvsp[(1) - (4)].i))) YYERROR;
     
    27242729
    27252730/* Line 1464 of yacc.c  */
    2726 #line 575 "grammar.y"
     2731#line 576 "grammar.y"
    27272732    {
    27282733            if(iiExprArithM(&(yyval.lv),NULL,(yyvsp[(1) - (3)].i))) YYERROR;
     
    27332738
    27342739/* Line 1464 of yacc.c  */
    2735 #line 579 "grammar.y"
     2740#line 580 "grammar.y"
    27362741    {
    27372742            if(iiExprArith1(&(yyval.lv),&(yyvsp[(3) - (4)].lv),(yyvsp[(1) - (4)].i))) YYERROR;
     
    27422747
    27432748/* Line 1464 of yacc.c  */
    2744 #line 583 "grammar.y"
     2749#line 584 "grammar.y"
    27452750    {
    27462751            if(iiExprArith1(&(yyval.lv),&(yyvsp[(3) - (4)].lv),(yyvsp[(1) - (4)].i))) YYERROR;
     
    27512756
    27522757/* Line 1464 of yacc.c  */
    2753 #line 587 "grammar.y"
     2758#line 588 "grammar.y"
    27542759    {
    27552760            if(iiExprArith1(&(yyval.lv),&(yyvsp[(3) - (4)].lv),(yyvsp[(1) - (4)].i))) YYERROR;
     
    27602765
    27612766/* Line 1464 of yacc.c  */
    2762 #line 591 "grammar.y"
     2767#line 592 "grammar.y"
    27632768    {
    27642769            if(iiExprArith1(&(yyval.lv),&(yyvsp[(3) - (4)].lv),(yyvsp[(1) - (4)].i))) YYERROR;
     
    27692774
    27702775/* Line 1464 of yacc.c  */
    2771 #line 595 "grammar.y"
     2776#line 596 "grammar.y"
    27722777    {
    27732778            if(iiExprArith2(&(yyval.lv),&(yyvsp[(3) - (6)].lv),(yyvsp[(1) - (6)].i),&(yyvsp[(5) - (6)].lv),TRUE)) YYERROR;
     
    27782783
    27792784/* Line 1464 of yacc.c  */
    2780 #line 599 "grammar.y"
     2785#line 600 "grammar.y"
    27812786    {
    27822787            if(iiExprArith2(&(yyval.lv),&(yyvsp[(3) - (6)].lv),(yyvsp[(1) - (6)].i),&(yyvsp[(5) - (6)].lv),TRUE)) YYERROR;
     
    27872792
    27882793/* Line 1464 of yacc.c  */
    2789 #line 603 "grammar.y"
     2794#line 604 "grammar.y"
    27902795    {
    27912796            if(iiExprArith2(&(yyval.lv),&(yyvsp[(3) - (6)].lv),(yyvsp[(1) - (6)].i),&(yyvsp[(5) - (6)].lv),TRUE)) YYERROR;
     
    27962801
    27972802/* Line 1464 of yacc.c  */
    2798 #line 607 "grammar.y"
     2803#line 608 "grammar.y"
    27992804    {
    28002805            if(iiExprArith2(&(yyval.lv),&(yyvsp[(3) - (6)].lv),(yyvsp[(1) - (6)].i),&(yyvsp[(5) - (6)].lv),TRUE)) YYERROR;
     
    28052810
    28062811/* Line 1464 of yacc.c  */
    2807 #line 611 "grammar.y"
     2812#line 612 "grammar.y"
    28082813    {
    28092814            if(iiExprArith3(&(yyval.lv),(yyvsp[(1) - (8)].i),&(yyvsp[(3) - (8)].lv),&(yyvsp[(5) - (8)].lv),&(yyvsp[(7) - (8)].lv))) YYERROR;
     
    28142819
    28152820/* Line 1464 of yacc.c  */
    2816 #line 615 "grammar.y"
     2821#line 616 "grammar.y"
    28172822    {
    28182823            if(iiExprArith3(&(yyval.lv),(yyvsp[(1) - (8)].i),&(yyvsp[(3) - (8)].lv),&(yyvsp[(5) - (8)].lv),&(yyvsp[(7) - (8)].lv))) YYERROR;
     
    28232828
    28242829/* Line 1464 of yacc.c  */
    2825 #line 619 "grammar.y"
     2830#line 620 "grammar.y"
    28262831    {
    28272832            if(iiExprArith3(&(yyval.lv),(yyvsp[(1) - (8)].i),&(yyvsp[(3) - (8)].lv),&(yyvsp[(5) - (8)].lv),&(yyvsp[(7) - (8)].lv))) YYERROR;
     
    28322837
    28332838/* Line 1464 of yacc.c  */
    2834 #line 623 "grammar.y"
     2839#line 624 "grammar.y"
    28352840    {
    28362841            if(iiExprArith3(&(yyval.lv),(yyvsp[(1) - (8)].i),&(yyvsp[(3) - (8)].lv),&(yyvsp[(5) - (8)].lv),&(yyvsp[(7) - (8)].lv))) YYERROR;
     
    28412846
    28422847/* Line 1464 of yacc.c  */
    2843 #line 627 "grammar.y"
     2848#line 628 "grammar.y"
    28442849    {
    28452850            if(iiExprArithM(&(yyval.lv),NULL,(yyvsp[(1) - (3)].i))) YYERROR;
     
    28502855
    28512856/* Line 1464 of yacc.c  */
    2852 #line 631 "grammar.y"
     2857#line 632 "grammar.y"
    28532858    {
    28542859            int b=iiExprArithM(&(yyval.lv),&(yyvsp[(3) - (4)].lv),(yyvsp[(1) - (4)].i)); // handle branchTo
     
    28612866
    28622867/* Line 1464 of yacc.c  */
    2863 #line 637 "grammar.y"
     2868#line 638 "grammar.y"
    28642869    {
    28652870            if(iiExprArith3(&(yyval.lv),(yyvsp[(1) - (8)].i),&(yyvsp[(3) - (8)].lv),&(yyvsp[(5) - (8)].lv),&(yyvsp[(7) - (8)].lv))) YYERROR;
     
    28702875
    28712876/* Line 1464 of yacc.c  */
    2872 #line 641 "grammar.y"
     2877#line 642 "grammar.y"
    28732878    {
    28742879            if(iiExprArith1(&(yyval.lv),&(yyvsp[(3) - (4)].lv),(yyvsp[(1) - (4)].i))) YYERROR;
     
    28792884
    28802885/* Line 1464 of yacc.c  */
    2881 #line 645 "grammar.y"
     2886#line 646 "grammar.y"
    28822887    {
    28832888            if(iiExprArith3(&(yyval.lv),RING_CMD,&(yyvsp[(3) - (8)].lv),&(yyvsp[(5) - (8)].lv),&(yyvsp[(7) - (8)].lv))) YYERROR;
     
    28882893
    28892894/* Line 1464 of yacc.c  */
    2890 #line 649 "grammar.y"
     2895#line 650 "grammar.y"
    28912896    {
    28922897            if(iiExprArith1(&(yyval.lv),&(yyvsp[(3) - (4)].lv),RING_CMD)) YYERROR;
     
    28972902
    28982903/* Line 1464 of yacc.c  */
    2899 #line 653 "grammar.y"
     2904#line 654 "grammar.y"
    29002905    {
    29012906            if (iiARROW(&(yyval.lv),(yyvsp[(1) - (3)].name),(yyvsp[(3) - (3)].name))) YYERROR;
     
    29072912
    29082913/* Line 1464 of yacc.c  */
    2909 #line 657 "grammar.y"
     2914#line 658 "grammar.y"
    29102915    { (yyval.lv) = (yyvsp[(2) - (3)].lv); ;}
    29112916    break;
     
    29142919
    29152920/* Line 1464 of yacc.c  */
    2916 #line 662 "grammar.y"
     2921#line 663 "grammar.y"
    29172922    {
    29182923            leftv v = &(yyvsp[(1) - (3)].lv);
     
    29302935
    29312936/* Line 1464 of yacc.c  */
    2932 #line 673 "grammar.y"
     2937#line 674 "grammar.y"
    29332938    {
    29342939            (yyval.lv) = (yyvsp[(1) - (1)].lv);
     
    29392944
    29402945/* Line 1464 of yacc.c  */
    2941 #line 679 "grammar.y"
     2946#line 680 "grammar.y"
    29422947    {
    29432948            /*if ($1.typ == eunknown) YYERROR;*/
     
    29492954
    29502955/* Line 1464 of yacc.c  */
    2951 #line 683 "grammar.y"
     2956#line 684 "grammar.y"
    29522957    { (yyval.lv) = (yyvsp[(1) - (1)].lv); ;}
    29532958    break;
     
    29562961
    29572962/* Line 1464 of yacc.c  */
    2958 #line 685 "grammar.y"
     2963#line 686 "grammar.y"
    29592964    {
    29602965            if(iiExprArith3(&(yyval.lv),'[',&(yyvsp[(1) - (6)].lv),&(yyvsp[(3) - (6)].lv),&(yyvsp[(5) - (6)].lv))) YYERROR;
     
    29652970
    29662971/* Line 1464 of yacc.c  */
    2967 #line 689 "grammar.y"
     2972#line 690 "grammar.y"
    29682973    {
    29692974            if(iiExprArith2(&(yyval.lv),&(yyvsp[(1) - (4)].lv),'[',&(yyvsp[(3) - (4)].lv))) YYERROR;
     
    29742979
    29752980/* Line 1464 of yacc.c  */
    2976 #line 693 "grammar.y"
     2981#line 694 "grammar.y"
    29772982    {
    29782983            if (iiApply(&(yyval.lv), &(yyvsp[(3) - (6)].lv), (yyvsp[(5) - (6)].i), NULL)) YYERROR;
     
    29832988
    29842989/* Line 1464 of yacc.c  */
    2985 #line 697 "grammar.y"
     2990#line 698 "grammar.y"
    29862991    {
    29872992            if (iiApply(&(yyval.lv), &(yyvsp[(3) - (6)].lv), (yyvsp[(5) - (6)].i), NULL)) YYERROR;
     
    29922997
    29932998/* Line 1464 of yacc.c  */
    2994 #line 701 "grammar.y"
     2999#line 702 "grammar.y"
    29953000    {
    29963001            if (iiApply(&(yyval.lv), &(yyvsp[(3) - (6)].lv), (yyvsp[(5) - (6)].i), NULL)) YYERROR;
     
    30013006
    30023007/* Line 1464 of yacc.c  */
    3003 #line 705 "grammar.y"
     3008#line 706 "grammar.y"
    30043009    {
    30053010            if (iiApply(&(yyval.lv), &(yyvsp[(3) - (6)].lv), (yyvsp[(5) - (6)].i), NULL)) YYERROR;
     
    30103015
    30113016/* Line 1464 of yacc.c  */
    3012 #line 709 "grammar.y"
     3017#line 710 "grammar.y"
    30133018    {
    30143019            if (iiApply(&(yyval.lv), &(yyvsp[(3) - (6)].lv), (yyvsp[(5) - (6)].i), NULL)) YYERROR;
     
    30193024
    30203025/* Line 1464 of yacc.c  */
    3021 #line 713 "grammar.y"
     3026#line 714 "grammar.y"
    30223027    {
    30233028            if (iiApply(&(yyval.lv), &(yyvsp[(3) - (6)].lv), 0, &(yyvsp[(5) - (6)].lv))) YYERROR;
     
    30283033
    30293034/* Line 1464 of yacc.c  */
    3030 #line 717 "grammar.y"
     3035#line 718 "grammar.y"
    30313036    {
    30323037            (yyval.lv)=(yyvsp[(2) - (3)].lv);
     
    30373042
    30383043/* Line 1464 of yacc.c  */
    3039 #line 721 "grammar.y"
     3044#line 722 "grammar.y"
    30403045    {
    30413046            #ifdef SIQ
     
    30593064
    30603065/* Line 1464 of yacc.c  */
    3061 #line 738 "grammar.y"
     3066#line 739 "grammar.y"
    30623067    {
    30633068            iiTestAssume(&(yyvsp[(2) - (5)].lv),&(yyvsp[(4) - (5)].lv));
     
    30703075
    30713076/* Line 1464 of yacc.c  */
    3072 #line 744 "grammar.y"
     3077#line 745 "grammar.y"
    30733078    {
    30743079            #ifdef SIQ
     
    30813086
    30823087/* Line 1464 of yacc.c  */
    3083 #line 750 "grammar.y"
     3088#line 751 "grammar.y"
    30843089    {
    30853090            #ifdef SIQ
     
    30963101
    30973102/* Line 1464 of yacc.c  */
    3098 #line 762 "grammar.y"
     3103#line 763 "grammar.y"
    30993104    {
    31003105            #ifdef SIQ
     
    31073112
    31083113/* Line 1464 of yacc.c  */
    3109 #line 770 "grammar.y"
     3114#line 771 "grammar.y"
    31103115    {
    31113116            #ifdef SIQ
     
    31183123
    31193124/* Line 1464 of yacc.c  */
    3120 #line 778 "grammar.y"
     3125#line 779 "grammar.y"
    31213126    {
    31223127            #ifdef SIQ
     
    31293134
    31303135/* Line 1464 of yacc.c  */
    3131 #line 787 "grammar.y"
     3136#line 788 "grammar.y"
    31323137    {
    31333138            if(iiExprArith1(&(yyval.lv),&(yyvsp[(1) - (2)].lv),PLUSPLUS)) YYERROR;
     
    31383143
    31393144/* Line 1464 of yacc.c  */
    3140 #line 791 "grammar.y"
     3145#line 792 "grammar.y"
    31413146    {
    31423147            if(iiExprArith1(&(yyval.lv),&(yyvsp[(1) - (2)].lv),MINUSMINUS)) YYERROR;
     
    31473152
    31483153/* Line 1464 of yacc.c  */
    3149 #line 795 "grammar.y"
     3154#line 796 "grammar.y"
    31503155    {
    31513156            if(iiExprArith2(&(yyval.lv),&(yyvsp[(1) - (3)].lv),'+',&(yyvsp[(3) - (3)].lv))) YYERROR;
     
    31563161
    31573162/* Line 1464 of yacc.c  */
    3158 #line 799 "grammar.y"
     3163#line 800 "grammar.y"
    31593164    {
    31603165            if(iiExprArith2(&(yyval.lv),&(yyvsp[(1) - (3)].lv),'-',&(yyvsp[(3) - (3)].lv))) YYERROR;
     
    31653170
    31663171/* Line 1464 of yacc.c  */
    3167 #line 803 "grammar.y"
     3172#line 804 "grammar.y"
    31683173    { /* also for *,% */
    31693174            if(iiExprArith2(&(yyval.lv),&(yyvsp[(1) - (3)].lv),(yyvsp[(2) - (3)].i),&(yyvsp[(3) - (3)].lv))) YYERROR;
     
    31743179
    31753180/* Line 1464 of yacc.c  */
    3176 #line 807 "grammar.y"
     3181#line 808 "grammar.y"
    31773182    {
    31783183            if(iiExprArith2(&(yyval.lv),&(yyvsp[(1) - (3)].lv),'^',&(yyvsp[(3) - (3)].lv))) YYERROR;
     
    31833188
    31843189/* Line 1464 of yacc.c  */
    3185 #line 811 "grammar.y"
     3190#line 812 "grammar.y"
    31863191    { /* also for > */
    31873192            if(iiExprArith2(&(yyval.lv),&(yyvsp[(1) - (3)].lv),(yyvsp[(2) - (3)].i),&(yyvsp[(3) - (3)].lv))) YYERROR;
     
    31923197
    31933198/* Line 1464 of yacc.c  */
    3194 #line 815 "grammar.y"
     3199#line 816 "grammar.y"
    31953200    { /* also for |*/
    31963201            if(iiExprArith2(&(yyval.lv),&(yyvsp[(1) - (3)].lv),(yyvsp[(2) - (3)].i),&(yyvsp[(3) - (3)].lv))) YYERROR;
     
    32013206
    32023207/* Line 1464 of yacc.c  */
    3203 #line 819 "grammar.y"
     3208#line 820 "grammar.y"
    32043209    {
    32053210            if(iiExprArith2(&(yyval.lv),&(yyvsp[(1) - (3)].lv),NOTEQUAL,&(yyvsp[(3) - (3)].lv))) YYERROR;
     
    32103215
    32113216/* Line 1464 of yacc.c  */
    3212 #line 823 "grammar.y"
     3217#line 824 "grammar.y"
    32133218    {
    32143219            if(iiExprArith2(&(yyval.lv),&(yyvsp[(1) - (3)].lv),EQUAL_EQUAL,&(yyvsp[(3) - (3)].lv))) YYERROR;
     
    32193224
    32203225/* Line 1464 of yacc.c  */
    3221 #line 827 "grammar.y"
     3226#line 828 "grammar.y"
    32223227    {
    32233228            if(iiExprArith2(&(yyval.lv),&(yyvsp[(1) - (3)].lv),DOTDOT,&(yyvsp[(3) - (3)].lv))) YYERROR;
     
    32283233
    32293234/* Line 1464 of yacc.c  */
    3230 #line 831 "grammar.y"
     3235#line 832 "grammar.y"
    32313236    {
    32323237            if(iiExprArith2(&(yyval.lv),&(yyvsp[(1) - (3)].lv),':',&(yyvsp[(3) - (3)].lv))) YYERROR;
     
    32373242
    32383243/* Line 1464 of yacc.c  */
    3239 #line 835 "grammar.y"
     3244#line 836 "grammar.y"
    32403245    {
    32413246            if (siq>0)
     
    32543259
    32553260/* Line 1464 of yacc.c  */
    3256 #line 847 "grammar.y"
     3261#line 848 "grammar.y"
    32573262    {
    32583263            if(iiExprArith1(&(yyval.lv),&(yyvsp[(2) - (2)].lv),'-')) YYERROR;
     
    32633268
    32643269/* Line 1464 of yacc.c  */
    3265 #line 853 "grammar.y"
     3270#line 854 "grammar.y"
    32663271    { (yyval.lv) = (yyvsp[(1) - (2)].lv); ;}
    32673272    break;
     
    32703275
    32713276/* Line 1464 of yacc.c  */
    3272 #line 855 "grammar.y"
     3277#line 856 "grammar.y"
    32733278    {
    32743279            if ((yyvsp[(1) - (2)].lv).rtyp==0)
     
    32903295
    32913296/* Line 1464 of yacc.c  */
    3292 #line 875 "grammar.y"
     3297#line 876 "grammar.y"
    32933298    {
    32943299            if ((yyvsp[(2) - (3)].lv).Typ()!=STRING_CMD)
     
    33043309
    33053310/* Line 1464 of yacc.c  */
    3306 #line 887 "grammar.y"
     3311#line 888 "grammar.y"
    33073312    {
    33083313            if (iiDeclCommand(&(yyval.lv),&(yyvsp[(2) - (2)].lv),myynest,(yyvsp[(1) - (2)].i),&((yyvsp[(2) - (2)].lv).req_packhdl->idroot)))
     
    33143319
    33153320/