My Project  UNKNOWN_GIT_VERSION
Macros | Functions | Variables
syz3.cc File Reference
#include "kernel/mod2.h"
#include "omalloc/omalloc.h"
#include "misc/mylimits.h"
#include "misc/options.h"
#include "misc/intvec.h"
#include "coeffs/numbers.h"
#include "polys/monomials/ring.h"
#include "polys/kbuckets.h"
#include "polys/prCopy.h"
#include "polys/matpol.h"
#include "kernel/combinatorics/stairc.h"
#include "kernel/combinatorics/hilb.h"
#include "kernel/GBEngine/kstd1.h"
#include "kernel/GBEngine/kutil.h"
#include "kernel/GBEngine/syz.h"
#include "kernel/ideals.h"
#include "kernel/polys.h"

Go to the source code of this file.

Macros

#define EXPERIMENT2
 
#define EXPERIMENT3
 
#define WITH_BUCKET
 
#define WITH_SCHREYER_ORD
 
#define USE_CHAINCRIT
 
#define USE_CHAINCRIT0
 
#define USE_PROD_CRIT
 
#define USE_REGULARITY
 
#define WITH_SORT
 

Functions

static BOOLEAN syIsRegular (ideal old_ideal, ideal new_ideal, int deg)
 
static void syCreateRegularExtension (syStrategy syzstr, ideal old_ideal, ideal old_repr, int old_tl, poly next_generator, resolvente totake)
 
static void syTestPairs (SSet resPairs, int length, ideal old_generators)
 
void syReorder_Kosz (syStrategy syzstr)
 
static void updatePairs (SSet *resPairs, int *l_pairs, syStrategy syzstr, int index, ideal new_generators, ideal new_repr, int crit_comp)
 
void sySPRedSyz_Kosz (syStrategy syzstr, poly redWith, poly syz, poly q=NULL, int l_syz=-1)
 
static BOOLEAN syRedSyz (kBucket_pt bucket, ideal red, int crit_comp, int *g_l)
 
static poly syRedTailSyz (poly tored, ideal red, ideal sec_red, int crit_comp, syStrategy syzstr, int *gen_length, int *secgen_length, int *tored_length)
 
static void redOnePair (SSet resPairs, int itso, int l, ideal syzygies, int crit_comp, syStrategy syzstr, int index, ideal new_generators, ideal new_repr, int *ogm_l, int *orp_l)
 
static BOOLEAN redPairs (SSet resPairs, int l_pairs, ideal syzygies, ideal new_generators, ideal new_repr, int crit_comp, syStrategy syzstr, int index)
 
static ideal kosz_std (ideal new_generators, ideal new_repr, syStrategy syzstr, int index, int next_comp)
 
static poly normalize (poly next_p, ideal add_generators, syStrategy syzstr, int *g_l, int *p_l, int crit_comp)
 
static void updatePairsHIndex (SSet *resPairs, int *l_pairs, syStrategy, int index, ideal add_generators, ideal, ideal, ideal, int, int *first_new)
 
static void redOnePairHIndex (SSet resPairs, int itso, int crit_comp, syStrategy syzstr, int, ideal add_generators, ideal add_repr, ideal new_generators, ideal new_repr, int *next_place_add, int **g_l, poly deg_soc)
 
static BOOLEAN reducePairsHIndex (SSet resPairs, int l_pairs, syStrategy syzstr, int index, ideal add_generators, ideal add_repr, ideal new_generators, ideal new_repr, int crit_comp, int *red_deg, int *next_place_add, int **g_l, resolvente totake)
 
static void procedeNextGenerators (ideal temp_generators, ideal, ideal new_generators, ideal new_repr, ideal add_generators, ideal add_repr, syStrategy syzstr, int index, int crit_comp, resolvente totake)
 
static ideal normalizeOldPart (ideal new_generators, ideal new_repr, syStrategy syzstr, int index, int)
 
static ideal kosz_ext (ideal new_generators, ideal new_repr, syStrategy syzstr, int index, int next_comp, resolvente totake)
 
static ideal syAppendSyz (ideal new_generators, syStrategy syzstr, int index, int crit_comp, resolvente totake)
 
syStrategy syKosz (ideal arg, int *length)
 

Variables

int discard_pairs
 
int short_pairs
 

Macro Definition Documentation

◆ EXPERIMENT2

#define EXPERIMENT2

Definition at line 39 of file syz3.cc.

◆ EXPERIMENT3

#define EXPERIMENT3

Definition at line 40 of file syz3.cc.

◆ USE_CHAINCRIT

#define USE_CHAINCRIT

Definition at line 43 of file syz3.cc.

◆ USE_CHAINCRIT0

#define USE_CHAINCRIT0

Definition at line 44 of file syz3.cc.

◆ USE_PROD_CRIT

#define USE_PROD_CRIT

Definition at line 45 of file syz3.cc.

◆ USE_REGULARITY

#define USE_REGULARITY

Definition at line 46 of file syz3.cc.

◆ WITH_BUCKET

#define WITH_BUCKET

Definition at line 41 of file syz3.cc.

◆ WITH_SCHREYER_ORD

#define WITH_SCHREYER_ORD

Definition at line 42 of file syz3.cc.

◆ WITH_SORT

#define WITH_SORT

Definition at line 47 of file syz3.cc.

Function Documentation

◆ kosz_ext()

static ideal kosz_ext ( ideal  new_generators,
ideal  new_repr,
syStrategy  syzstr,
int  index,
int  next_comp,
resolvente  totake 
)
static

Definition at line 1606 of file syz3.cc.

1608 {
1609  ideal temp_generators =idInit(IDELEMS(new_generators),new_generators->rank);
1610  ideal temp_repr=idInit(IDELEMS(new_repr),new_repr->rank);
1611  ideal add_generators =idInit(IDELEMS(new_generators),new_generators->rank);
1612  ideal add_repr=idInit(IDELEMS(new_repr),new_repr->rank);
1613  int min_deg=-1;
1614  int j,jj,k,deg_p,idel_temp=IDELEMS(temp_generators);
1615  poly p;
1616 /*--reorder w.r.t. the degree----------------------------------------*/
1617  for (j=IDELEMS(new_generators)-1;j>=0;j--)
1618  {
1619  if (new_generators->m[j]!=NULL)
1620  {
1621  p = new_generators->m[j];
1622  new_generators->m[j] = NULL;
1623  deg_p = p_FDeg(p,currRing);
1624  if (min_deg<0)
1625  {
1626  min_deg = deg_p;
1627  }
1628  else
1629  {
1630  if (deg_p<min_deg) min_deg = deg_p;
1631  }
1632  k = 0;
1633  while ((k<idel_temp) && (temp_generators->m[k]!=NULL) &&
1634  (p_FDeg(temp_generators->m[k],currRing)<=deg_p)) k++;
1635  for (jj=idel_temp-1;jj>k;jj--)
1636  {
1637  temp_generators->m[jj] = temp_generators->m[jj-1];
1638  }
1639  temp_generators->m[k] = p;
1640  }
1641  }
1642 /*--- computing the standard basis in the resolution of the extension -*/
1643  procedeNextGenerators(temp_generators,temp_repr,new_generators,new_repr,
1644  add_generators,add_repr,syzstr,index,next_comp,totake);
1645  j = IDELEMS(syzstr->res[index]);
1646  while ((j>0) && (syzstr->res[index]->m[j-1]==NULL)) j--;
1647  jj = IDELEMS(add_generators);
1648  while ((jj>0) && (add_generators->m[jj-1]==NULL)) jj--;
1649  if (j+jj>=IDELEMS(syzstr->res[index]))
1650  {
1651  pEnlargeSet(&syzstr->res[index]->m,IDELEMS(syzstr->res[index]),
1652  j+jj+1-IDELEMS(syzstr->res[index]));
1653  IDELEMS(syzstr->res[index]) = j+jj+1;
1654  pEnlargeSet(&syzstr->orderedRes[index]->m,IDELEMS(syzstr->orderedRes[index]),
1655  j+jj+1-IDELEMS(syzstr->orderedRes[index]));
1656  IDELEMS(syzstr->orderedRes[index]) = j+jj+1;
1657  }
1658  for (k=0;k<jj;k++)
1659  {
1660  syzstr->res[index]->m[j+k] = add_generators->m[k];
1661  syzstr->orderedRes[index]->m[j+k] = add_repr->m[k];
1662  add_generators->m[k] = NULL;
1663  add_repr->m[k] = NULL;
1664  }
1665  assume(idIs0(add_generators));
1666  assume(idIs0(add_repr));
1667  idDelete(&add_generators);
1668  idDelete(&add_repr);
1669  idDelete(&temp_generators);
1670  idDelete(&temp_repr);
1671 /*--- normalizing the rest to get the syzygies ------------------------*/
1672  return normalizeOldPart(new_generators,new_repr,syzstr,index,next_comp);
1673 }

◆ kosz_std()

static ideal kosz_std ( ideal  new_generators,
ideal  new_repr,
syStrategy  syzstr,
int  index,
int  next_comp 
)
static

Definition at line 1001 of file syz3.cc.

1003 {
1004  int og_idel=IDELEMS(syzstr->res[index]);
1005  int l_pairs=2*og_idel;
1006  ideal syzygies=idInit(16,syzstr->res[index]->rank+1);
1007  if ((idIs0(new_generators)) || (new_generators->m[0]==NULL))
1008  {
1009  WerrorS("Hier ist was faul!\n");
1010  return NULL;
1011  }
1012  SSet resPairs=(SSet)omAlloc0(l_pairs*sizeof(SObject));
1013  loop
1014  {
1015  updatePairs(&resPairs,&l_pairs,syzstr,index,
1016  new_generators,new_repr,next_comp);
1017  if (redPairs(resPairs,l_pairs,syzygies, new_generators,new_repr,
1018  next_comp,syzstr,index)) break;
1019  }
1020  omFreeSize((SSet)resPairs,l_pairs*sizeof(SObject));
1021  return syzygies;
1022 }

◆ normalize()

static poly normalize ( poly  next_p,
ideal  add_generators,
syStrategy  syzstr,
int *  g_l,
int *  p_l,
int  crit_comp 
)
static

Definition at line 1027 of file syz3.cc.

1029 {
1030  int j=0,i=IDELEMS(add_generators);
1031  kBucketInit(syzstr->bucket,next_p,pLength(next_p));
1032  poly p = kBucketGetLm(syzstr->bucket),result;
1033  number n;
1034 
1035  loop
1036  {
1037  if ((j>=i) || (p==NULL) || (pGetComp(p)<=crit_comp)) break;
1038  if ((add_generators->m[j]!=NULL) && (pDivisibleBy(add_generators->m[j],p)))
1039  {
1040  n = kBucketPolyRed(syzstr->bucket,add_generators->m[j], g_l[j], NULL);
1041  nDelete(&n);
1042  p = kBucketGetLm(syzstr->bucket);
1043  j = 0;
1044  }
1045  else
1046  j++;
1047  }
1048  kBucketClear(syzstr->bucket,&result,p_l);
1049  return result;
1050 }

◆ normalizeOldPart()

static ideal normalizeOldPart ( ideal  new_generators,
ideal  new_repr,
syStrategy  syzstr,
int  index,
int   
)
static

Definition at line 1545 of file syz3.cc.

1547 {
1548  ideal old_generators= syzstr->res[index];
1549  ideal old_repr= syzstr->orderedRes[index];
1550  int i,j=0,ii=IDELEMS(old_generators)-1,dummy;
1551  poly p;
1552  number n;
1553  int * g_l=(int*)omAlloc0(IDELEMS(old_generators)*sizeof(int));
1554 
1555  for (i=0;i<IDELEMS(old_generators);i++)
1556  {
1557  if (old_generators->m[i]!=NULL)
1558  {
1559  g_l[i] = pLength(old_generators->m[i]);
1560  }
1561  }
1562  for (i=IDELEMS(new_generators)-1;i>=0;i--)
1563  {
1564  if (new_generators->m[i]!=NULL)
1565  {
1566  kBucketInit(syzstr->bucket,new_generators->m[i],
1567  pLength(new_generators->m[i]));
1568  kBucketInit(syzstr->syz_bucket,new_repr->m[i],
1569  pLength(new_repr->m[i]));
1570  p = kBucketGetLm(syzstr->bucket);
1571  loop
1572  {
1573  if ((j>=ii) || (p==NULL)) break;
1574  if ((old_generators->m[j]!=NULL) &&
1575  (pDivisibleBy(old_generators->m[j],p)))
1576  {
1577  sySPRedSyz_Kosz(syzstr,old_generators->m[j],old_repr->m[j],p);
1578  n = kBucketPolyRed(syzstr->bucket,old_generators->m[j], g_l[j], NULL);
1579  nDelete(&n);
1580  p = kBucketGetLm(syzstr->bucket);
1581  j = 0;
1582  }
1583  else
1584  j++;
1585  }
1586  assume (p==NULL);
1587  kBucketClear(syzstr->bucket,&new_generators->m[i],&dummy);
1588  kBucketClear(syzstr->syz_bucket,&new_repr->m[i],&dummy);
1589  }
1590  }
1591  ideal result=idInit(IDELEMS(new_repr),new_repr->rank);
1592  for (j=IDELEMS(new_repr)-1;j>=0;j--)
1593  {
1594  result->m[j] = new_repr->m[j];
1595  if ((result->m[j]!=NULL) && (!nIsOne(pGetCoeff(result->m[j]))))
1596  pNorm(result->m[j]);
1597  new_repr->m[j] = NULL;
1598  }
1599  omFreeSize((ADDRESS)g_l,IDELEMS(old_generators)*sizeof(int));
1600  return result;
1601 }

◆ procedeNextGenerators()

static void procedeNextGenerators ( ideal  temp_generators,
ideal  ,
ideal  new_generators,
ideal  new_repr,
ideal  add_generators,
ideal  add_repr,
syStrategy  syzstr,
int  index,
int  crit_comp,
resolvente  totake 
)
static

Definition at line 1414 of file syz3.cc.

1418 {
1419  int i=0,j,next_new_el;
1420  int idel_temp=IDELEMS(temp_generators);
1421  int next_place_add;
1422  int p_length,red_deg,l_pairs=IDELEMS(add_generators);
1423  poly next_p;
1424  int * gen_length=(int*)omAlloc0(IDELEMS(add_generators)*sizeof(int));
1425  int * secgen_length=(int*)omAlloc0(IDELEMS(syzstr->res[index])*sizeof(int));
1426  BOOLEAN pairs_left;
1427  SSet resPairs=(SSet)omAlloc0(l_pairs*sizeof(SObject));
1428 
1429  for (j=IDELEMS(syzstr->res[index])-1;j>=0;j--)
1430  {
1431  if (syzstr->res[index]->m[j]!=NULL)
1432  secgen_length[j] = pLength(syzstr->res[index]->m[j]);
1433  }
1434  assume(idIs0(new_generators));
1435  next_place_add = IDELEMS(add_generators);
1436  while ((next_place_add>0) && (add_generators->m[next_place_add-1]==NULL))
1437  next_place_add--;
1438  int next_deg = p_FDeg(temp_generators->m[i],currRing);
1439  next_new_el = next_place_add;
1440 /*--- loop about all all elements-----------------------------------*/
1441  while ((i<idel_temp) && (temp_generators->m[i]!=NULL))
1442  {
1443 /*--- separates elements of equal degree----------------------------*/
1444 #ifdef USE_REGULARITY
1445  if (syzstr->regularity>0)
1446  {
1447  if (next_deg >= syzstr->regularity+index)
1448  {
1449  while ((i<idel_temp) && (temp_generators->m[i]!=NULL))
1450  {
1451  pDelete(&temp_generators->m[i]);
1452  i++;
1453  }
1454  break;
1455  }
1456  }
1457 #endif
1458  while ((i<idel_temp) && (p_FDeg(temp_generators->m[i],currRing)==next_deg))
1459  {
1460  next_p = temp_generators->m[i];
1461  temp_generators->m[i] = NULL;
1462  next_p = normalize(next_p,add_generators,syzstr,gen_length,&p_length,
1463  crit_comp);
1464  if (next_p!=NULL)
1465  {
1466  if (pGetComp(next_p)<=crit_comp)
1467  {
1468  pDelete(&next_p);
1469  //if (TEST_OPT_PROT) Print("u(%d)",index);
1470  }
1471  else
1472  {
1473  next_p = syRedTailSyz(next_p,add_generators,syzstr->res[index],crit_comp,syzstr,
1474  gen_length,secgen_length,&p_length);
1475  if (!nIsOne(pGetCoeff(next_p)))
1476  pNorm(next_p);
1477  if (next_place_add>=IDELEMS(add_generators))
1478  {
1479  pEnlargeSet(&add_generators->m,IDELEMS(add_generators),16);
1480  pEnlargeSet(&add_repr->m,IDELEMS(add_repr),16);
1481  gen_length = (int*)omRealloc0Size((ADDRESS)gen_length, IDELEMS(add_generators)*sizeof(int),
1482  (IDELEMS(add_generators)+16)*sizeof(int));
1483  IDELEMS(add_generators) += 16;
1484  IDELEMS(add_repr) += 16;
1485  }
1486  add_generators->m[next_place_add] = next_p;
1487  if (totake[index]==NULL)
1488  totake[index] = idInit(16,new_generators->rank);
1489  if ((*syzstr->Tl)[index]==IDELEMS(totake[index]))
1490  {
1491  pEnlargeSet(&totake[index]->m,IDELEMS(totake[index]),
1492  (*syzstr->Tl)[index]+16-IDELEMS(totake[index]));
1493  for (j=IDELEMS(totake[index]);j<(*syzstr->Tl)[index]+16;j++)
1494  totake[index]->m[j] = NULL;
1495  IDELEMS(totake[index]) = (*syzstr->Tl)[index]+16;
1496  }
1497 #ifdef FULL_TOTAKE
1498  totake[index]->m[(*syzstr->Tl)[index]] = pCopy(next_p);
1499 #else
1500  totake[index]->m[(*syzstr->Tl)[index]] = pHead(next_p);
1501 #endif
1502  assume(add_repr->m[next_place_add]==NULL);
1503 #ifdef WITH_SCHREYER_ORD
1504  add_repr->m[next_place_add] = pHead(add_generators->m[next_place_add]);
1505 #else
1506  add_repr->m[next_place_add] = pOne();
1507 #endif
1508  ((*syzstr->Tl)[index])++;
1509  pSetComp(add_repr->m[next_place_add],(*syzstr->Tl)[index]);
1510  pSetmComp(add_repr->m[next_place_add]);
1511  gen_length[next_place_add] = p_length;
1512  next_place_add++;
1513  }
1514  }
1515  i++;
1516  } //end inner loop
1517  red_deg = next_deg;
1518  if (i<idel_temp)
1519  next_deg = p_FDeg(temp_generators->m[i],currRing);
1520  else
1521  next_deg = -1;
1522  if ((next_place_add>next_new_el) || (next_deg<0)) //there are new generators or pairs
1523  {
1524 /*-reducing and generating pairs untill the degree of the next generators-*/
1525  pairs_left = TRUE;
1526  while (pairs_left && ((next_deg<0) || (red_deg<= next_deg)))
1527  {
1528  updatePairsHIndex(&resPairs,&l_pairs,syzstr,index,add_generators,
1529  add_repr,new_generators,new_repr,crit_comp,&next_new_el);
1530  pairs_left = reducePairsHIndex(resPairs,l_pairs,syzstr,index,add_generators,
1531  add_repr,new_generators,new_repr,crit_comp,&red_deg,&next_place_add,&gen_length,
1532  totake);
1533  }
1534  }
1535  }
1536  omFreeSize((SSet)resPairs,l_pairs*sizeof(SObject));
1537  omFreeSize((ADDRESS)gen_length,IDELEMS(add_generators)*sizeof(int));
1538  omFreeSize((ADDRESS)secgen_length,IDELEMS(syzstr->res[index])*sizeof(int));
1539 }

◆ redOnePair()

static void redOnePair ( SSet  resPairs,
int  itso,
int  l,
ideal  syzygies,
int  crit_comp,
syStrategy  syzstr,
int  index,
ideal  new_generators,
ideal  new_repr,
int *  ogm_l,
int *  orp_l 
)
static

Definition at line 651 of file syz3.cc.

654 {
655  SObject tso = resPairs[itso];
656  assume (tso.lcm!=NULL);
657  ideal old_generators=syzstr->res[index];
658  ideal old_repr=syzstr->orderedRes[index];
659  int og_idel=IDELEMS(old_generators),ng_place=IDELEMS(new_generators);
660  int toReplace=0;
661  int i,j,syz_l;
662  number /*coefgcd,*/n;
663  polyset ogm=old_generators->m;
664  poly p;
665  BOOLEAN deleteP=FALSE;
666 #ifdef EXPERIMENT1
667  poly syzp;
668 #endif
669  int syz_place=IDELEMS(syzygies);
670 
671  while ((syz_place>0) && (syzygies->m[syz_place-1]==NULL)) syz_place--;
672  while ((ng_place>0) && (new_generators->m[ng_place-1]==NULL)) ng_place--;
673  while ((og_idel>0) && (old_generators->m[og_idel-1]==NULL)) og_idel--;
674  assume (tso.ind1<og_idel);
675  assume (tso.ind2<og_idel);
676  assume (tso.ind1!=tso.ind2);
677  assume (tso.p1 == old_generators->m[tso.ind1]);
678  assume (tso.p2 == old_generators->m[tso.ind2]);
679  tso.p1 = old_generators->m[tso.ind1];
680  tso.p2 = old_generators->m[tso.ind2];
681  if ((tso.p1!=NULL) && (tso.p2!=NULL))
682  {
683  if (TEST_OPT_PROT)
684  PrintS(".");
685  if (index==0)
686  {
687 /*--- tests wether a generator must be replaced (lt(f1)|lt(f2)!)--*/
688  if (p_FDeg(tso.p1,currRing)==p_FDeg(tso.lcm,currRing))
689  toReplace = tso.ind1+1;
690  else if (p_FDeg(tso.p2,currRing)==p_FDeg(tso.lcm,currRing))
691  toReplace = tso.ind2+1;
692  }
693 #ifdef EXPERIMENT3
694 /*--- tests wether the product criterion applies --------------*/
695  if ((index==0) && (old_generators->rank==1) &&
696  (p_FDeg(tso.p1,currRing)+p_FDeg(tso.p2,currRing)==tso.order))
697  {
698  tso.p = NULL;
699  p = pCopy(tso.p1);
700  p_Shift(&p,-1,currRing);
701 #ifdef WITH_BUCKET
702  poly pp;
703  pp = pMult_mm(pCopy(old_repr->m[tso.ind2]),p);
704  kBucketInit(syzstr->syz_bucket,pp,-1);
705  pLmDelete(&p);
706  p = pNeg(p);
707  pp = pCopy(old_repr->m[tso.ind2]);
708  int il=-1;
709  while (p!=NULL)
710  {
712  pLmDelete(&p);
713  }
714  pDelete(&pp);
715  p = pCopy(tso.p2);
716  p_Shift(&p,-1,currRing);
717  pp = pCopy(old_repr->m[tso.ind1]);
718  il=-1;
719  while (p!=NULL)
720  {
722  pLmDelete(&p);
723  }
724  pDelete(&pp);
725  kBucketClear(syzstr->syz_bucket,&tso.syz,&j);
726 #else
727  tso.syz = pMult(p,pCopy(old_repr->m[tso.ind2]));
728  p = pCopy(tso.p2);
729  p_Shift(&p,-1,currRing);
730  tso.syz = pSub(tso.syz,pMult(p,pCopy(old_repr->m[tso.ind1])));
731 #endif
732  }
733  else
734 #endif
735 /*--- the product criterion does not apply --------------------*/
736  {
737  tso.p = ksOldCreateSpoly(tso.p2,tso.p1);
738  number coefgcd = n_Gcd(pGetCoeff(tso.p1),pGetCoeff(tso.p2),currRing->cf);
739  assume (old_repr->m[tso.ind1]!=NULL);
740  tso.syz = pCopy(old_repr->m[tso.ind1]);
741  poly tt = pMDivide(tso.lcm,tso.p1);
742  pSetComp(tt,0);
743  pSetmComp(tt);
744  pSetCoeff(tt,nDiv(pGetCoeff(tso.p1),coefgcd));
745  tso.syz = pMult_mm(tso.syz,tt);
746  pDelete(&tt);
747  coefgcd = nInpNeg(coefgcd);
748  assume (old_repr->m[tso.ind2]!=NULL);
749  p = pCopy(old_repr->m[tso.ind2]);
750  tt = pMDivide(tso.lcm,tso.p2);
751  pSetComp(tt,0);
752  pSetmComp(tt);
753  pSetCoeff(tt,nDiv(pGetCoeff(tso.p2),coefgcd));
754  p = pMult_mm(p,tt);
755  pDelete(&tt);
756  tso.syz = pAdd(p,tso.syz);
757 #ifdef EXPERIMENT2
758  if ((tso.syz!=NULL) && (pGetComp(tso.syz)<=crit_comp))
759  {
760 /*--- breaks when the leading component is less than crit_comp ------*/
761  deleteP = TRUE;
762  discard_pairs++;
763  }
764 #endif
765  nDelete(&coefgcd);
766  } //End of the else-part of EXPERIMENT3
767 #ifdef SHOW_PROT
768 Print("reduziere Paar im Module %d mit: \n",index);
769 PrintS("poly1: ");pWrite(tso.p1);
770 PrintS("poly2: ");pWrite(tso.p2);
771 PrintS("syz: ");pWrite(tso.syz);
772 PrintS("sPoly: ");pWrite(tso.p);
773 #endif
774  assume(tso.syz!=NULL);
775  kBucketInit(syzstr->syz_bucket,tso.syz,-1);
776  if ((tso.p!=NULL) && (!deleteP))
777  {
778  kBucketInit(syzstr->bucket,tso.p,-1);
779  p = kBucketGetLm(syzstr->bucket);
780  j = 0;
781  loop
782  {
783  if (j>=og_idel)
784  {
785 /*--- reduction with generators computed in this procedure ---*/
786  j = 0;
787  while ((j<ng_place) && (!pDivisibleBy(new_generators->m[j],p))) j++;
788  if (j>=ng_place) break;
789  assume (new_repr->m[j]!=NULL);
790  sySPRedSyz_Kosz(syzstr,new_generators->m[j],new_repr->m[j],p);
791  n = kBucketPolyRed(syzstr->bucket,new_generators->m[j],pLength(new_generators->m[j]), NULL);
792  p = kBucketGetLm(syzstr->bucket);
793 #ifdef EXPERIMENT1
794  syzp = kBucketGetLm(syzstr->syz_bucket);
795  if ((syzp!=NULL) && (pGetComp(syzp)<=crit_comp))
796  {
797  deleteP =TRUE;
798  break;
799  }
800  //if (syzp==NULL)
801  //assume(p==NULL);
802  //else
803  //if (pGetComp(syzp)<=crit_comp) short_pairs++;
804 #endif
805  if (p==NULL) break;
806  j = 0;
807  }
808  if (pDivisibleBy(ogm[j],p))
809  {
810 /*--- reduction with general old generators ---------------------*/
811  assume (old_repr->m[j]!=NULL);
812  sySPRedSyz_Kosz(syzstr,ogm[j],old_repr->m[j],p,orp_l[j]);
813  n = kBucketPolyRed(syzstr->bucket,ogm[j],ogm_l[j], NULL);
814  p = kBucketGetLm(syzstr->bucket);
815 #ifdef EXPERIMENT1
816  syzp = kBucketGetLm(syzstr->syz_bucket);
817  if ((syzp!=NULL) && (pGetComp(syzp)<=crit_comp))
818  {
819  break;
820  deleteP =TRUE;
821  }
822  //if (syzp==NULL)
823  //assume(p==NULL);
824  //else
825  //if ((pGetComp(syzp)<=crit_comp) && (p!=NULL)) short_pairs++;
826 #endif
827  if (p==NULL) break;
828  j = 0;
829  }
830  else
831  j++;
832  }
833  kBucketClear(syzstr->bucket,&tso.p,&tso.length);
834  }
835  kBucketClear(syzstr->syz_bucket,&tso.syz,&syz_l);
836  if (deleteP)
837  {
838  pDelete(&tso.p);
839  pDelete(&tso.syz);
840  }
841  }
842  else
843  {
844  PrintS("Shit happens!\n");
845  }
846 #ifdef SHOW_PROT
847 Print("erhalte Paar im Module %d mit: \n",index);
848 PrintS("syz: ");pWrite(tso.syz);
849 PrintS("sPoly: ");pWrite(tso.p);
850 PrintLn();
851 #endif
852  if (toReplace)
853  {
854 /*-- replaces the generator if neccesary ------------------*/
855  pDelete(&old_generators->m[toReplace-1]);
856  pDelete(&old_repr->m[toReplace-1]);
857  for (i=toReplace-1;i<og_idel-1;i++)
858  {
859  old_generators->m[i] = old_generators->m[i+1];
860  old_repr->m[i] = old_repr->m[i+1];
861  }
862  old_generators->m[og_idel-1] = NULL;
863  old_repr->m[og_idel-1] = NULL;
864  for (i=itso+1;i<l;i++)
865  {
866  if (resPairs[i].lcm!=NULL)
867  {
868  if ((resPairs[i].ind1==toReplace-1)||(resPairs[i].ind2==toReplace-1))
869  syDeletePair(&resPairs[i]);
870  else
871  {
872  if (resPairs[i].ind1>=toReplace)
873  (resPairs[i].ind1)--;
874  if (resPairs[i].ind2>=toReplace)
875  (resPairs[i].ind2)--;
876  }
877  }
878  }
879  syCompactifyPairSet(resPairs,l,itso+1);
880  }
881  if (tso.p!=NULL)
882  {
883 /*-- stores the new generator ---------------------------------*/
884  //syRedTailSyzPair(tso,syzstr,index,ogm_l,orp_l,&tso.length,&syz_l);
885  if (ng_place>=IDELEMS(new_generators))
886  {
887  pEnlargeSet(&new_generators->m,IDELEMS(new_generators),16);
888  IDELEMS(new_generators) += 16;
889  pEnlargeSet(&new_repr->m,IDELEMS(new_repr),16);
890  IDELEMS(new_repr) += 16;
891  }
892  if (!nIsOne(pGetCoeff(tso.p)))
893  {
894  n=nInvers(pGetCoeff(tso.p));
895  pNorm(tso.p);
896  tso.syz=__p_Mult_nn(tso.syz,n,currRing);
897  nDelete(&n);
898  }
899  new_generators->m[ng_place] = tso.p;
900  tso.p = NULL;
901  new_repr->m[ng_place] = tso.syz;
902  tso.syz = NULL;
903  }
904  else
905  {
906 /*--- takes the syzygy as new generator of the next module ---*/
907  if (tso.syz==NULL)
908  {
909 #ifndef EXPERIMENT2
910 #ifdef EXPERIMENT3
911  short_pairs++;
912 #endif
913 #endif
914  }
915  else if (pGetComp(tso.syz)<=crit_comp)
916  {
917  pDelete(&tso.syz);
918  }
919  else
920  {
921  if (syz_place>=IDELEMS(syzygies))
922  {
923  pEnlargeSet(&syzygies->m,IDELEMS(syzygies),16);
924  IDELEMS(syzygies) += 16;
925  }
926  syzygies->m[syz_place] = tso.syz;
927  tso.syz = NULL;
928  pNorm(syzygies->m[syz_place]);
929  }
930  }
931  resPairs[itso] = tso;
932  syDeletePair(&resPairs[itso]);
933  syTestPairs(resPairs,l,old_generators);
934 }

◆ redOnePairHIndex()

static void redOnePairHIndex ( SSet  resPairs,
int  itso,
int  crit_comp,
syStrategy  syzstr,
int  ,
ideal  add_generators,
ideal  add_repr,
ideal  new_generators,
ideal  new_repr,
int *  next_place_add,
int **  g_l,
poly  deg_soc 
)
static

Definition at line 1185 of file syz3.cc.

1190 {
1191  SObject tso = resPairs[itso];
1192  assume (tso.lcm!=NULL);
1193  int ng_place=IDELEMS(new_generators);
1194  int i,j;
1195  number n;
1196  poly p;
1197 #ifdef EXPERIMENT1
1198  poly syzp;
1199 #endif
1200 
1201  assume (tso.ind1<*next_place_add);
1202  assume (tso.ind2<*next_place_add);
1203  assume (tso.ind1!=tso.ind2);
1204  assume (tso.p1 == add_generators->m[tso.ind1]);
1205  assume (tso.p2 == add_generators->m[tso.ind2]);
1206  tso.p1 = add_generators->m[tso.ind1];
1207  tso.p2 = add_generators->m[tso.ind2];
1208  if ((tso.p1!=NULL) && (tso.p2!=NULL))
1209  {
1210  if (TEST_OPT_PROT)
1211  PrintS(".");
1212 #ifdef USE_PROD_CRIT
1213  if (p_FDeg(tso.p1,currRing)+p_FDeg(tso.p2,currRing)==tso.order+p_FDeg(deg_soc,currRing))
1214  {
1215  if (TEST_OPT_PROT) PrintS("pc");
1216  int ac=pGetComp(tso.p1);
1217  assume(ac=pGetComp(tso.p2));
1218  poly p1=pCopy(tso.p1);
1219  poly p2=pCopy(tso.p2);
1220  poly pp1,pp2,tp1,tp2;
1221  poly sp1=pCopy(add_repr->m[tso.ind1]),sp2=pCopy(add_repr->m[tso.ind2]);
1222  pp1 = p1;
1223  pp2 = p2;
1224  loop
1225  {
1226  assume(pp1!=NULL);
1227  for(i=(int)(currRing->N); i; i--)
1228  pSetExp(pp1,i, pGetExp(pp1,i)- pGetExp(deg_soc,i));
1229  pSetComp(pp1, 0);
1230  pSetm(pp1);
1231  if ((pNext(pp1)!=NULL) && (pGetComp(pNext(pp1))!=ac)) break;
1232  pIter(pp1);
1233  }
1234  loop
1235  {
1236  assume(pp2!=NULL);
1237  for(i=(int)(currRing->N); i; i--)
1238  pSetExp(pp2,i, pGetExp(pp2,i)- pGetExp(deg_soc,i));
1239  pSetComp(pp2, 0);
1240  pSetm(pp2);
1241  if ((pNext(pp2)!=NULL) && (pGetComp(pNext(pp2))!=ac)) break;
1242  pIter(pp2);
1243  }
1244  tp1 = pNext(pp1);
1245  tp2 = pNext(pp2);
1246  pNext(pp1) = NULL;
1247  pNext(pp2) = NULL;
1248  //p_Shift(&p1,-ac,currRing);
1249  //p_Shift(&p2,-ac,currRing);
1250  tp1 = pMult(tp1,pCopy(p2));
1251  tp2 = pMult(tp2,pCopy(p1));
1252  sp1 = pMult(p2,sp1);
1253  sp2 = pMult(p1,sp2);
1254  tso.p = pSub(tp1,tp2);
1255  tso.syz = pSub(sp1,sp2);
1256  }
1257  else
1258 #endif
1259  {
1260  tso.p = ksOldCreateSpoly(tso.p2,tso.p1);
1261  number coefgcd = n_Gcd(pGetCoeff(tso.p1),pGetCoeff(tso.p2),currRing->cf);
1262  assume (add_repr->m[tso.ind1]!=NULL);
1263  tso.syz = pCopy(add_repr->m[tso.ind1]);
1264  poly tt = pMDivide(tso.lcm,tso.p1);
1265  pSetComp(tt,0);
1266  pSetmComp(tt);
1267  pSetCoeff(tt,nDiv(pGetCoeff(tso.p1),coefgcd));
1268  tso.syz = pMult_mm(tso.syz,tt);
1269  pDelete(&tt);
1270  coefgcd = nInpNeg(coefgcd);
1271  assume (add_repr->m[tso.ind2]!=NULL);
1272  p = pCopy(add_repr->m[tso.ind2]);
1273  tt = pMDivide(tso.lcm,tso.p2);
1274  pSetComp(tt,0);
1275  pSetmComp(tt);
1276  pSetCoeff(tt,nDiv(pGetCoeff(tso.p2),coefgcd));
1277  p = pMult_mm(p,tt);
1278  pDelete(&tt);
1279  tso.syz = pAdd(p,tso.syz);
1280  nDelete(&coefgcd);
1281  }
1282 #ifdef SHOW_PROT
1283 Print("reduziere Paar im Module %d mit: \n",index);
1284 PrintS("poly1: ");pWrite(tso.p1);
1285 PrintS("poly2: ");pWrite(tso.p2);
1286 PrintS("syz: ");pWrite(tso.syz);
1287 PrintS("sPoly: ");pWrite(tso.p);
1288 #endif
1289  assume(tso.syz!=NULL);
1290  kBucketInit(syzstr->syz_bucket,tso.syz,-1);
1291  if (tso.p!=NULL)
1292  {
1293  kBucketInit(syzstr->bucket,tso.p,-1);
1294  p = kBucketGetLm(syzstr->bucket);
1295  j = 0;
1296  loop
1297  {
1298  if (j>=*next_place_add) break;
1299  if (pDivisibleBy(add_generators->m[j],p))
1300  {
1301  assume (add_repr->m[j]!=NULL);
1302  sySPRedSyz_Kosz(syzstr,add_generators->m[j],add_repr->m[j],p);
1303  n = kBucketPolyRed(syzstr->bucket,add_generators->m[j],
1304  pLength(add_generators->m[j]), NULL);
1305  p = kBucketGetLm(syzstr->bucket);
1306  if ((p==NULL) || (pGetComp(p)<=crit_comp)) break;
1307  j = 0;
1308  }
1309  else
1310  j++;
1311  }
1312  kBucketClear(syzstr->bucket,&tso.p,&tso.length);
1313  }
1314  kBucketClear(syzstr->syz_bucket,&tso.syz,&j);
1315  }
1316  else
1317  {
1318  PrintS("Shit happens!\n");
1319  }
1320 #ifdef SHOW_PROT
1321 Print("erhalte Paar im Module %d mit: \n",index);
1322 PrintS("syz: ");pWrite(tso.syz);
1323 PrintS("sPoly: ");pWrite(tso.p);
1324 PrintLn();
1325 #endif
1326  if (tso.p!=NULL)
1327  {
1328  if (!nIsOne(pGetCoeff(tso.p)))
1329  {
1330  n=nInvers(pGetCoeff(tso.p));
1331  pNorm(tso.p);
1332  tso.syz=__p_Mult_nn(tso.syz,n,currRing);
1333  nDelete(&n);
1334  }
1335  }
1336  if ((TEST_OPT_PROT) && (tso.syz==NULL)) PrintS("null");
1337  if ((tso.p!=NULL) && (pGetComp(tso.p)>crit_comp))
1338  {
1339  if (*next_place_add>=IDELEMS(add_generators))
1340  {
1341  pEnlargeSet(&add_generators->m,IDELEMS(add_generators),16);
1342  pEnlargeSet(&add_repr->m,IDELEMS(add_repr),16);
1343  *g_l = (int*)omRealloc0Size((ADDRESS)*g_l, IDELEMS(add_generators)*sizeof(int),
1344  (IDELEMS(add_generators)+16)*sizeof(int));
1345  IDELEMS(add_generators) += 16;
1346  IDELEMS(add_repr) += 16;
1347  }
1348  assume(add_repr->m[*next_place_add]==NULL);
1349  add_generators->m[*next_place_add] = tso.p;
1350  add_repr->m[*next_place_add] = tso.syz;
1351  (*g_l)[*next_place_add] = tso.length;
1352  (*next_place_add)++;
1353  }
1354  else
1355  {
1356  while ((ng_place>0) && (new_generators->m[ng_place-1]==NULL) &&
1357  (new_repr->m[ng_place-1]==NULL)) ng_place--;
1358  if (ng_place>=IDELEMS(new_generators))
1359  {
1360  pEnlargeSet(&new_generators->m,IDELEMS(new_generators),16);
1361  IDELEMS(new_generators) += 16;
1362  pEnlargeSet(&new_repr->m,IDELEMS(new_repr),16);
1363  IDELEMS(new_repr) += 16;
1364  }
1365  new_generators->m[ng_place] = tso.p;
1366  new_repr->m[ng_place] = tso.syz;
1367  }
1368  tso.p = NULL;
1369  tso.syz = NULL;
1370  resPairs[itso] = tso;
1371  syDeletePair(&resPairs[itso]);
1372 }

◆ redPairs()

static BOOLEAN redPairs ( SSet  resPairs,
int  l_pairs,
ideal  syzygies,
ideal  new_generators,
ideal  new_repr,
int  crit_comp,
syStrategy  syzstr,
int  index 
)
static

Definition at line 939 of file syz3.cc.

942 {
943  if (resPairs[0].lcm==NULL) return TRUE;
944  int i,j,actdeg=resPairs[0].order;
945  int * ogm_l=(int*)omAlloc0(IDELEMS(syzstr->res[index])*sizeof(int));
946  int * orp_l=(int*)omAlloc0(IDELEMS(syzstr->orderedRes[index])*sizeof(int));
947  // int t1=IDELEMS(syzstr->res[index]),t2=IDELEMS(syzstr->orderedRes[index]);
948 
949  for (j=IDELEMS(syzstr->res[index])-1;j>=0;j--)
950  {
951  if (syzstr->res[index]->m[j]!=NULL)
952  ogm_l[j] = pLength(syzstr->res[index]->m[j]);
953  }
954  for (j=IDELEMS(syzstr->orderedRes[index])-1;j>=0;j--)
955  {
956  if (syzstr->orderedRes[index]->m[j]!=NULL)
957  orp_l[j] = pLength(syzstr->orderedRes[index]->m[j]);
958  }
959  loop
960  {
961  i = 0;
962  if (TEST_OPT_PROT)
963  Print("(%d,%d)",index,resPairs[0].order);
964  while (resPairs[i].order==actdeg)
965  {
966  syTestPairs(resPairs,l_pairs,syzstr->res[index]);
967  redOnePair(resPairs,i,l_pairs,syzygies,crit_comp,syzstr,index,
968  new_generators, new_repr,ogm_l,orp_l);
969  i++;
970  syTestPairs(resPairs,l_pairs,syzstr->res[index]);
971  }
972  syTestPairs(resPairs,l_pairs,syzstr->res[index]);
973  syCompactifyPairSet(resPairs,l_pairs,0);
974  syTestPairs(resPairs,l_pairs,syzstr->res[index]);
975  if (!idIs0(new_generators))
976  break;
977  else if (resPairs[0].lcm==NULL) //there are no pairs left and no new_gens
978  {
979  omFreeSize((ADDRESS)ogm_l,IDELEMS(syzstr->res[index])*sizeof(int));
980  omFreeSize((ADDRESS)orp_l,IDELEMS(syzstr->orderedRes[index])*sizeof(int));
981  return TRUE;
982  }
983  else
984  actdeg = resPairs[0].order;
985  }
986  syTestPairs(resPairs,l_pairs,syzstr->res[index]);
987  omFreeSize((ADDRESS)ogm_l,IDELEMS(syzstr->res[index])*sizeof(int));
988  omFreeSize((ADDRESS)orp_l,IDELEMS(syzstr->orderedRes[index])*sizeof(int));
989  return FALSE;
990 }

◆ reducePairsHIndex()

static BOOLEAN reducePairsHIndex ( SSet  resPairs,
int  l_pairs,
syStrategy  syzstr,
int  index,
ideal  add_generators,
ideal  add_repr,
ideal  new_generators,
ideal  new_repr,
int  crit_comp,
int *  red_deg,
int *  next_place_add,
int **  g_l,
resolvente  totake 
)
static

Definition at line 1377 of file syz3.cc.

1381 {
1382  if (resPairs[0].lcm==NULL) return FALSE;
1383  int i=0;
1384  poly deg_soc;
1385 
1386  if (TEST_OPT_PROT)
1387  Print("(%d,%d)",index,resPairs[0].order);
1388  while ((i<l_pairs) && (resPairs[i].order==*red_deg))
1389  {
1390  assume(totake[index-1]!=NULL);
1391  assume(pGetComp(resPairs[i].p1)<=IDELEMS(totake[index-1]));
1392  assume(totake[index-1]->m[pGetComp(resPairs[i].p1)-1]!=NULL);
1393  deg_soc = totake[index-1]->m[pGetComp(resPairs[i].p1)-1];
1394  redOnePairHIndex(resPairs,i,crit_comp,syzstr,index, add_generators,add_repr,
1395  new_generators, new_repr,next_place_add,g_l,deg_soc);
1396  i++;
1397  }
1398  syCompactifyPairSet(resPairs,l_pairs,0);
1399  if (resPairs[0].lcm==NULL) //there are no pairs left and no new_gens
1400  return FALSE;
1401  else
1402  *red_deg = resPairs[0].order;
1403  return TRUE;
1404 }

◆ syAppendSyz()

static ideal syAppendSyz ( ideal  new_generators,
syStrategy  syzstr,
int  index,
int  crit_comp,
resolvente  totake 
)
static

Definition at line 1688 of file syz3.cc.

1690 {
1691  int i,j;
1692  ideal result;
1693  int rk_new_gens = id_RankFreeModule(new_generators,currRing);
1694  if (syzstr->res[index]==NULL)
1695  {
1696  syzstr->res[index] = idInit(1,si_max(rk_new_gens,1));
1697  syzstr->orderedRes[index] = idInit(1,si_max(rk_new_gens,1));
1698  }
1699  int ng_idel=IDELEMS(new_generators);
1700  ideal new_repr =idInit(ng_idel, crit_comp+ng_idel);
1701 
1702  if (index==0)
1703  {
1704  //int * og_l=(int*)omAlloc0(IDELEMS(syzstr->res[0])*sizeof(int));
1705  //for (i=IDELEMS(syzstr->res[0])-1;i>=0;i--)
1706  //{
1707  //if (syzstr->res[0]->m[i]!=NULL)
1708  //og_l[i] = pLength(syzstr->res[0]->m[i]);
1709  //}
1710  for (i=0;i<ng_idel;i++)
1711  {
1712  if (new_generators->m[i]!=NULL)
1713  {
1714  //int ng_l=pLength(new_generators->m[i]);
1715  //new_generators->m[i] = syRedTailSyz(new_generators->m[i],syzstr->res[0],NULL,0,syzstr,
1716  //og_l,NULL,&ng_l);
1717  if (totake[index]==NULL)
1718  totake[index] = idInit(16,new_generators->rank);
1719  if ((*syzstr->Tl)[index]>=IDELEMS(totake[index]))
1720  {
1721  pEnlargeSet(&totake[index]->m,IDELEMS(totake[index]),
1722  (*syzstr->Tl)[index]+16-IDELEMS(totake[index]));
1723  for (j=IDELEMS(totake[index]);j<(*syzstr->Tl)[index]+16;j++)
1724  totake[index]->m[j] = NULL;
1725  IDELEMS(totake[index]) = (*syzstr->Tl)[index]+16;
1726  }
1727 #ifdef FULL_TOTAKE
1728  totake[index]->m[(*syzstr->Tl)[index]] = pCopy(new_generators->m[i]);
1729 #else
1730  totake[index]->m[(*syzstr->Tl)[index]] = pHead(new_generators->m[i]);
1731 #endif
1732 #ifdef WITH_SCHREYER_ORD
1733  new_repr->m[i] = pHead(new_generators->m[i]);
1734 #else
1735  new_repr->m[i] = pOne();
1736 #endif
1737  ((*syzstr->Tl)[index])++;
1738  pSetComp(new_repr->m[i],(*syzstr->Tl)[index]);
1739  pSetmComp(new_repr->m[i]);
1740  }
1741  }
1742  //omFreeSize((ADDRESS)og_l,IDELEMS(syzstr->res[0])*sizeof(int));
1743 #ifdef SHOW_PROT
1744 PrintS("Add new generators:\n");
1745 idPrint(new_generators);
1746 PrintS("with representaions:\n");
1747 idPrint(new_repr);
1748 #endif
1749  result = kosz_std(new_generators,new_repr,syzstr,index,crit_comp);
1750  }
1751  else
1752  {
1753  result = kosz_ext(new_generators,new_repr,syzstr,index,crit_comp,totake);
1754  }
1756  assume(idIs0(new_repr));
1757  idDelete(&new_repr);
1758  return result;
1759 }

◆ syCreateRegularExtension()

static void syCreateRegularExtension ( syStrategy  syzstr,
ideal  old_ideal,
ideal  old_repr,
int  old_tl,
poly  next_generator,
resolvente  totake 
)
static

Definition at line 112 of file syz3.cc.

114 {
115  int index=syzstr->length-1,i,j,start,start_ttk/*,new_tl*/;
116  poly gen=pCopy(next_generator),p;
117  poly neg_gen=pCopy(next_generator);
118  ideal current_ideal,current_repr;
119  int current_tl;
120  poly w_gen=pHead(next_generator);
121  pSetComp(w_gen,0);
122  pSetmComp(w_gen);
123 
124  //syShowRes(syzstr);
125  neg_gen = pNeg(neg_gen);
126  if (pGetComp(gen)>0)
127  {
128  p_Shift(&gen,-1,currRing);
129  p_Shift(&neg_gen,-1,currRing);
130  }
131  while (index>0)
132  {
133  if (index%2==0)
134  p = gen;
135  else
136  p = neg_gen;
137  if (index>1)
138  {
139  current_ideal = syzstr->res[index-1];
140  current_repr = syzstr->orderedRes[index-1];
141  current_tl = (*syzstr->Tl)[index-1];
142  }
143  else
144  {
145  current_ideal = old_ideal;
146  current_repr = old_repr;
147  current_tl = old_tl;
148  }
149  if (!idIs0(current_ideal))
150  {
151  if (idIs0(syzstr->res[index]))
152  {
153  syzstr->res[index] = idInit(IDELEMS(current_ideal),
154  current_ideal->rank+current_tl);
155  syzstr->orderedRes[index] = idInit(IDELEMS(current_ideal),
156  current_ideal->rank);
157  start = 0;
158  }
159  else
160  {
161  start = IDELEMS(syzstr->res[index]);
162  while ((start>0) && (syzstr->res[index]->m[start-1]==NULL)) start--;
163  if (IDELEMS(syzstr->res[index])<start+IDELEMS(current_ideal))
164  {
165  pEnlargeSet(&syzstr->res[index]->m,IDELEMS(syzstr->res[index]),
166  IDELEMS(current_ideal));
167  IDELEMS(syzstr->res[index]) += IDELEMS(current_ideal);
168  pEnlargeSet(&syzstr->orderedRes[index]->m,IDELEMS(syzstr->orderedRes[index]),
169  IDELEMS(current_ideal));
170  IDELEMS(syzstr->orderedRes[index]) += IDELEMS(current_ideal);
171  }
172  }
173  if (idIs0(totake[index]))
174  {
175  totake[index] = idInit(IDELEMS(current_ideal),
176  current_ideal->rank+current_tl);
177  start_ttk = 0;
178  }
179  else
180  {
181  start_ttk = IDELEMS(totake[index]);
182  while ((start_ttk>0) && (totake[index]->m[start_ttk-1]==NULL)) start_ttk--;
183  if (IDELEMS(totake[index])<start_ttk+IDELEMS(current_ideal))
184  {
185  pEnlargeSet(&totake[index]->m,IDELEMS(totake[index]),
186  IDELEMS(current_ideal));
187  for (j=IDELEMS(totake[index]);j<IDELEMS(totake[index])+
188  IDELEMS(current_ideal);j++)
189  totake[index]->m[j] = NULL;
190  IDELEMS(totake[index]) += IDELEMS(current_ideal);
191  }
192  }
193  for (i=0;i<IDELEMS(current_ideal);i++)
194  {
195  if (current_ideal->m[i]!=NULL)
196  {
197  syzstr->res[index]->m[i+start] = pCopy(current_ideal->m[i]);
198  syzstr->res[index]->m[i+start] = pMult_mm(syzstr->res[index]->m[i+start],w_gen);
199  p_Shift(&syzstr->res[index]->m[i+start],current_tl,currRing);
200  syzstr->res[index]->m[i+start] = pAdd(syzstr->res[index]->m[i+start],
201  ppMult_qq(current_repr->m[i],p));
202  syzstr->orderedRes[index]->m[i+start] = pCopy(current_repr->m[i]);
203  syzstr->orderedRes[index]->m[i+start] =
204  pMult_mm(syzstr->orderedRes[index]->m[i+start],w_gen);
205  if ((*syzstr->Tl)[index]!=0)
206  p_Shift(&syzstr->orderedRes[index]->m[i+start],(*syzstr->Tl)[index],currRing);
207  }
208  }
209  for (i=0;i<IDELEMS(totake[index-1]);i++)
210  {
211  if (totake[index-1]->m[i]!=NULL)
212  {
213  if ((index==1) && ((i==IDELEMS(current_ideal) ||
214  (totake[index-1]->m[i+1]==NULL)))) break;
215  totake[index]->m[i+start_ttk] =
216  pMult_mm(pCopy(totake[index-1]->m[i]),w_gen);
217  p_Shift(&totake[index]->m[i+start_ttk],current_tl,currRing);
218 #ifdef FULL_TOTAKE
219  poly pp=pCopy(p);
220  p_Shift(&pp,i+1,currRing);
221  totake[index]->m[i+start_ttk] = pAdd(totake[index]->m[i+start_ttk],pp);
222 #endif
223  }
224  }
225  (*syzstr->Tl)[index] += current_tl;
226  }
227  index--;
228  }
229  pDelete(&gen);
230  pDelete(&neg_gen);
231  pDelete(&w_gen);
232  //syShowRes(syzstr);
233 }

◆ syIsRegular()

static BOOLEAN syIsRegular ( ideal  old_ideal,
ideal  new_ideal,
int  deg 
)
static

Definition at line 56 of file syz3.cc.

57 {
58  intvec * old_hilbs=hHstdSeries(old_ideal,NULL,NULL,NULL);
59  intvec * new_hilbs=hHstdSeries(new_ideal,NULL,NULL,NULL);
60  int biggest_length=si_max(old_hilbs->length()+deg,new_hilbs->length());
61  intvec * shifted_old_hilbs=new intvec(biggest_length);
62  intvec * old_hilb1=new intvec(biggest_length);
63  intvec * new_hilb1=new intvec(biggest_length);
64  int i;
65  BOOLEAN isRegular=TRUE;
66 
67  for (i=old_hilbs->length()+deg-1;i>=deg;i--)
68  (*shifted_old_hilbs)[i] = (*old_hilbs)[i-deg];
69  for (i=old_hilbs->length()-1;i>=0;i--)
70  (*old_hilb1)[i] = (*old_hilbs)[i]-(*shifted_old_hilbs)[i];
71  for (i=old_hilbs->length()+deg-1;i>=old_hilbs->length();i--)
72  (*old_hilb1)[i] = -(*shifted_old_hilbs)[i];
73  for (i=new_hilbs->length()-1;i>=0;i--)
74  (*new_hilb1)[i] = (*new_hilbs)[i];
75  i = 0;
76  while ((i<biggest_length) && isRegular)
77  {
78  isRegular = isRegular && ((*old_hilb1)[i] == (*new_hilb1)[i]);
79  i++;
80  }
81  delete old_hilbs;
82  delete new_hilbs;
83  delete old_hilb1;
84  delete new_hilb1;
85  delete shifted_old_hilbs;
86  return isRegular;
87 }

◆ syKosz()

syStrategy syKosz ( ideal  arg,
int *  length 
)

Definition at line 1764 of file syz3.cc.

1765 {
1766  int i,j,jj,k=0,index=0,rk_arg/*,next_syz=0*/;
1767  int crit_comp,t_comp,next_deg,old_tl;
1768  ideal temp=NULL,old_ideal,old_repr;
1769  ring origR = currRing;
1770  poly next_gen;
1771  BOOLEAN isRegular;
1772 
1773  discard_pairs = 0;
1774  short_pairs = 0;
1775  if (idIs0(arg)) return NULL;
1776  rk_arg = id_RankFreeModule(arg,currRing);
1777  syStrategy syzstr=(syStrategy)omAlloc0(sizeof(ssyStrategy));
1778 /*--- changes to a Cdp-ring ----------------------------*/
1779  syzstr->syRing = rAssure_C_dp(origR); rChangeCurrRing(syzstr->syRing);
1780 /*--- initializes the data structures---------------*/
1781  syzstr->length = *length = (syzstr->syRing->N)+2;
1782  syzstr->regularity = -1;
1783  if (origR!=syzstr->syRing)
1784  temp = idrCopyR(arg, origR, syzstr->syRing);
1785  else
1786  temp = idCopy(arg);
1787  if (rk_arg==0)
1788  {
1789  id_Shift(temp,1,currRing);
1790  }
1791  idSkipZeroes(temp);
1792 #ifdef WITH_SORT
1793  if (temp->m[0]!=NULL)
1794  {
1795  int md;
1796  int maxdeg=p_FDeg(temp->m[IDELEMS(temp)-1],currRing);
1797  ideal temp1=idInit(IDELEMS(temp),temp->rank);
1798  for (j=IDELEMS(temp)-2;j>=0;j--)
1799  {
1800  jj = p_FDeg(temp->m[j],currRing);
1801  if (jj>maxdeg) maxdeg = jj;
1802  }
1803  while (!idIs0(temp))
1804  {
1805  md = maxdeg;
1806  for (j=IDELEMS(temp)-1;j>=0;j--)
1807  {
1808  if (temp->m[j]!=NULL)
1809  {
1810  jj = p_FDeg(temp->m[j],currRing);
1811  if (jj<md) md = jj;
1812  }
1813  }
1814  for (j=0;j<IDELEMS(temp);j++)
1815  {
1816  if ((temp->m[j]!=NULL) && (p_FDeg(temp->m[j],currRing)==md))
1817  {
1818  temp1->m[k] = temp->m[j];
1819  temp->m[j] = NULL;
1820  k++;
1821  }
1822  }
1823  }
1824  idDelete(&temp);
1825  temp = temp1;
1826  temp1 = NULL;
1827  }
1828 #endif
1829 #ifdef USE_REGULARITY
1830  int last_generator=IDELEMS(temp)-1;
1831  while ((last_generator>=0) && (temp->m[last_generator]==NULL))
1832  last_generator--;
1833 #endif
1834  syzstr->res = (resolvente)omAlloc0((*length+1)*sizeof(ideal));
1835  syzstr->orderedRes = (resolvente)omAlloc0((*length+1)*sizeof(ideal));
1836  resolvente totake=(resolvente)omAlloc0((*length+1)*sizeof(ideal));
1837  syzstr->Tl = new intvec(*length+1);
1838  syzstr->bucket = kBucketCreate(currRing);
1839  syzstr->syz_bucket = kBucketCreate(currRing);
1840  ideal new_generators=idInit(1,si_max(rk_arg,1));
1841  ideal temp_gens,old_std;
1842  syzstr->res[0] = idInit(1,1);
1843  if (rk_arg>1) syzstr->res[0]->rank = rk_arg;
1844  syzstr->orderedRes[0] = idInit(1,1);
1845 /*--- computes the resolution ----------------------*/
1846  i = 0;
1847  while (i<IDELEMS(temp))
1848  {
1849  if (temp->m[i]!=NULL)
1850  {
1851  new_generators->m[0] = kNF(syzstr->res[0],currRing->qideal,temp->m[i]);
1852  if (!nIsOne(pGetCoeff(new_generators->m[0])))
1853  pNorm(new_generators->m[0]);
1854  next_deg = p_FDeg(new_generators->m[0],currRing);
1855  next_gen = pCopy(new_generators->m[0]);
1856  }
1857  if (!idIs0(new_generators))
1858  {
1859  index = 0;
1860  while (index<=*length)
1861  {
1862  if (index==0)
1863  {
1864  old_ideal = idCopy(syzstr->res[0]);
1865  old_repr = idCopy(syzstr->orderedRes[0]);
1866  old_tl = (*syzstr->Tl)[0];
1867  old_std = id_Head(syzstr->res[0],currRing);
1868  }
1869  t_comp = (*syzstr->Tl)[index];
1870  if (index==0) crit_comp = t_comp;
1871  temp_gens = syAppendSyz(new_generators,syzstr, index,crit_comp,totake);
1872  crit_comp = t_comp;
1873  if (index==0)
1874  {
1875  isRegular = syIsRegular(old_std,syzstr->res[0],next_deg);
1876 #ifndef ONLY_STD
1877  if (isRegular)
1878  syCreateRegularExtension(syzstr,old_ideal,old_repr,old_tl,next_gen,
1879  totake);
1880 #ifdef USE_REGULARITY
1881  if ((index==0) && (!isRegular) && (i==last_generator))
1882  {
1883 /*----------- we are computing the regularity -----------------------*/
1884  ideal initial=id_Head(syzstr->res[0],currRing);
1885  int len=0,reg=0;
1886  intvec *w=NULL;
1887  ring dp_C_ring = rAssure_dp_C(currRing); rChangeCurrRing(dp_C_ring);
1888  initial = idrMoveR_NoSort(initial, syzstr->syRing, dp_C_ring);
1890  intvec * dummy = syBetti(res,len,&reg, w);
1891  syzstr->regularity = reg+2;
1892  delete dummy;
1893  delete w;
1894  for (j=0;j<len;j++)
1895  {
1896  if (res[j]!=NULL) idDelete(&(res[j]));
1897  }
1898  omFreeSize((ADDRESS)res,len*sizeof(ideal));
1899  idDelete(&initial);
1900  rChangeCurrRing(syzstr->syRing);
1901  rDelete(dp_C_ring);
1902  }
1903 #endif
1904 #endif
1905  idDelete(&old_ideal);
1906  idDelete(&old_repr);
1907  idDelete(&old_std);
1908  if (TEST_OPT_PROT)
1909  {
1910  if (isRegular)
1911  PrintS("\n regular\n");
1912  else
1913  PrintS("\n not regular\n");
1914  }
1915  if (next_gen!=NULL)
1916  pDelete(&next_gen);
1917  if (isRegular)
1918  {
1919  idDelete(&temp_gens);
1920  break;
1921  }
1922  }
1923  idDelete(&new_generators);
1924  new_generators = temp_gens;
1925 #ifdef ONLY_STD
1926  break;
1927 #endif
1928  if (idIs0(new_generators)) break;
1929  index++;
1930  }
1931  if (!idIs0(new_generators))
1932  {
1933  for (j=0;j<IDELEMS(new_generators);j++)
1934  {
1935  if (new_generators->m[j]!=NULL)
1936  {
1937  pDelete(&new_generators->m[j]);
1938  new_generators->m[j] = NULL;
1939  }
1940  }
1941  }
1942  }
1943  i++;
1944  }
1945  if (idIs0(new_generators) && new_generators!=NULL) idDelete(&new_generators);
1946  if (temp!=NULL) idDelete(&temp);
1947  kBucketDestroy(&(syzstr->bucket));
1948  kBucketDestroy(&(syzstr->syz_bucket));
1949  index = 0;
1950  syzstr->fullres = syzstr->res;
1951  syzstr->res = NULL;
1952  index = 0;
1953  while ((index<=*length) && (syzstr->fullres[index]!=NULL))
1954  {
1955 #ifdef SHOW_RESULT
1956  Print("The %d-th syzygy-module is now:\n",index);
1957  ideal ttt=id_Head(syzstr->fullres[index],currRing);
1958  idShow(ttt);
1959  idDelete(&ttt);
1960  //if (index>0)
1961  //{
1962  //Print("The related module is: \n");
1963  //idPrint(totake[index-1]);
1964  //}
1965  //Print("The %d-th module of the minimal resolution is:\n",index);
1966  if (!idIs0(totake[index]))
1967  idShow(totake[index]);
1968  //Print("with standard basis:\n");
1969  //idPrint(syzstr->fullres[index]);
1970  //if ((index<*length) && (totake[index+1]!=NULL))
1971  //{
1972  //Print("The %d-th syzygy-module is now:\n",index+1);
1973  //idPrint(totake[index+1]);
1974  //matrix m1=idModule2Matrix(totake[index]);
1975  //matrix m2=idModule2Matrix(totake[index+1]);
1976  //matrix m3=mpMult(m1,m2);
1977  //idPrint((ideal)m3);
1978  //}
1979 #endif
1980  if (!idIs0(totake[index]))
1981  {
1982  for(i=0;i<IDELEMS(totake[index]);i++)
1983  {
1984  if (totake[index]->m[i]!=NULL)
1985  {
1986  j=0;
1987  while ((j<IDELEMS(syzstr->fullres[index])) &&
1988  ((syzstr->fullres[index]->m[j]==NULL) ||
1989  (!pLmEqual(syzstr->fullres[index]->m[j],totake[index]->m[i])))) j++;
1990  if (j<IDELEMS(syzstr->fullres[index]))
1991  {
1992  pDelete(&totake[index]->m[i]);
1993  totake[index]->m[i] = syzstr->fullres[index]->m[j];
1994  syzstr->fullres[index]->m[j] = NULL;
1995  }
1996  else
1997  {
1998  PrintS("Da ist was faul!!!\n");
1999  Print("Aber: Regularitaet %d, Grad %ld\n",
2000  syzstr->regularity,p_FDeg(totake[index]->m[i],currRing));
2001  }
2002  }
2003  }
2004  idDelete(&syzstr->fullres[index]);
2005  syzstr->fullres[index] = totake[index];
2006  }
2007 #ifdef SHOW_RESULT
2008  idShow(syzstr->fullres[index]);
2009 #endif
2010  index++;
2011  }
2012  syReorder_Kosz(syzstr);
2013  index = 0;
2014  while ((index<=*length) && (syzstr->orderedRes[index]!=NULL))
2015  {
2016  idDelete(&(syzstr->orderedRes[index]));
2017  index++;
2018  }
2019  if (origR!=syzstr->syRing)
2020  {
2021  rChangeCurrRing(origR);
2022  index = 0;
2023  while ((index<=*length) && (syzstr->fullres[index]!=NULL))
2024  {
2025  syzstr->fullres[index] = idrMoveR(syzstr->fullres[index],syzstr->syRing, origR);
2026  index++;
2027  }
2028  }
2029  delete syzstr->Tl;
2030  syzstr->Tl = NULL;
2031  rDelete(syzstr->syRing);
2032  syzstr->syRing = NULL;
2033  omFreeSize((ADDRESS)totake,(*length+1)*sizeof(ideal));
2034  omFreeSize((ADDRESS)syzstr->orderedRes,(*length+1)*sizeof(ideal));
2035 //Print("Pairs to discard: %d\n",discard_pairs);
2036 //Print("Pairs shorter reduced: %d\n",short_pairs);
2037 //discard_pairs = 0;
2038 //short_pairs = 0;
2039  return syzstr;
2040 }

◆ syRedSyz()

static BOOLEAN syRedSyz ( kBucket_pt  bucket,
ideal  red,
int  crit_comp,
int *  g_l 
)
static

Definition at line 488 of file syz3.cc.

489 {
490  poly p = kBucketGetLm(bucket);
491  int j = 0,i=IDELEMS(red)-1;
492  number n;
493  BOOLEAN isChanged=FALSE;
494 
495  loop
496  {
497  if ((j>=i) || (p==NULL) || (pGetComp(p)<=crit_comp)) break;
498  if ((red->m[j]!=NULL) && (pDivisibleBy(red->m[j],p)))
499  {
500  n = kBucketPolyRed(bucket,red->m[j], g_l[j], NULL);
501  nDelete(&n);
502  p = kBucketGetLm(bucket);
503  isChanged = TRUE;
504  j = 0;
505  }
506  else
507  j++;
508  }
509  return isChanged;
510 }

◆ syRedTailSyz()

static poly syRedTailSyz ( poly  tored,
ideal  red,
ideal  sec_red,
int  crit_comp,
syStrategy  syzstr,
int *  gen_length,
int *  secgen_length,
int *  tored_length 
)
static

Definition at line 515 of file syz3.cc.

517 {
518  int i=IDELEMS(red)-1,num_mon,num_tail;
519  poly h,hn;
520  // BOOLEAN dummy;
521 
522  while ((i>0) && (red->m[i-1]==NULL)) i--;
523  i--;
524  h = tored;
525  if ((h!=NULL) && (pGetComp(h)>crit_comp))
526  {
527  num_mon = 1;
528  hn = pNext(h);
529  num_tail = *tored_length-1;
530  while (hn!=NULL)
531  {
532  kBucketInit(syzstr->syz_bucket,hn,num_tail);
533  /*dummy =*/ (void) syRedSyz(syzstr->syz_bucket,red,crit_comp,gen_length);
534  kBucketClear(syzstr->syz_bucket,&hn,&num_tail);
535  pNext(h) = hn;
536  if ((hn==NULL) || (pGetComp(hn)<=crit_comp))
537  break;
538  else
539  {
540  pIter(h);
541  pIter(hn);
542  num_mon++;
543  num_tail--;
544  }
545  }
546  if (sec_red!=NULL)
547  {
548  while (hn!=NULL)
549  {
550  kBucketInit(syzstr->syz_bucket,hn,num_tail);
551  /*dummy =*/ (void) syRedSyz(syzstr->syz_bucket,sec_red,crit_comp,secgen_length);
552  kBucketClear(syzstr->syz_bucket,&hn,&num_tail);
553  pNext(h) = hn;
554  if (hn==NULL)
555  break;
556  else
557  {
558  pIter(h);
559  pIter(hn);
560  num_mon++;
561  num_tail--;
562  }
563  }
564  }
565  *tored_length = num_mon+num_tail;
566  }
567  assume(pLength(tored)==*tored_length);
568  return tored;
569 }

◆ syReorder_Kosz()

void syReorder_Kosz ( syStrategy  syzstr)

Definition at line 262 of file syz3.cc.

263 {
264  int length=syzstr->length;
265  int syzIndex=length-1,i,j;
266  resolvente res=syzstr->fullres;
267  poly p;
268 
269  while ((syzIndex!=0) && (res[syzIndex]==NULL)) syzIndex--;
270  while (syzIndex>0)
271  {
272  for(i=0;i<IDELEMS(res[syzIndex]);i++)
273  {
274 #ifdef USE_REGULARITY
275  if ((syzstr->regularity>0) && (res[syzIndex]->m[i]!=NULL))
276  {
277  if (p_FDeg(res[syzIndex]->m[i],currRing)>=syzstr->regularity+syzIndex)
278  pDelete(&res[syzIndex]->m[i]);
279  }
280 #endif
281  p = res[syzIndex]->m[i];
282  while (p!=NULL)
283  {
284  if (res[syzIndex-1]->m[pGetComp(p)-1]!=NULL)
285  {
286  for(j=1;j<=(currRing->N);j++)
287  {
288  pSetExp(p,j,pGetExp(p,j)
289  -pGetExp(res[syzIndex-1]->m[pGetComp(p)-1],j));
290  }
291  }
292  else
293  PrintS("error in the resolvent\n");
294  pSetm(p);
295  pIter(p);
296  }
297  }
298  syzIndex--;
299  }
300 }

◆ sySPRedSyz_Kosz()

void sySPRedSyz_Kosz ( syStrategy  syzstr,
poly  redWith,
poly  syz,
poly  q = NULL,
int  l_syz = -1 
)
inline

Definition at line 474 of file syz3.cc.

475 {
476  poly p=pMDivide(q,redWith);
477  pSetCoeff(p,nDiv(pGetCoeff(q),pGetCoeff(redWith)));
478  kBucket_Minus_m_Mult_p(syzstr->syz_bucket,p,syz,&l_syz,NULL);
479  pDelete(&p);
480 }

◆ syTestPairs()

static void syTestPairs ( SSet  resPairs,
int  length,
ideal  old_generators 
)
static

Definition at line 240 of file syz3.cc.

241 {
242  int i=0;
243 
244  while (i<length)
245  {
246  if (resPairs[i].lcm!=NULL)
247  {
248  if (resPairs[i].p1!=NULL)
249  assume(resPairs[i].p1==old_generators->m[resPairs[i].ind1]);
250  if (resPairs[i].p2!=NULL)
251  assume(resPairs[i].p2==old_generators->m[resPairs[i].ind2]);
252  }
253  i++;
254  }
255 }

◆ updatePairs()

static void updatePairs ( SSet resPairs,
int *  l_pairs,
syStrategy  syzstr,
int  index,
ideal  new_generators,
ideal  new_repr,
int  crit_comp 
)
static

Definition at line 308 of file syz3.cc.

310 {
311  if (idIs0(new_generators)) return;
312  ideal old_generators=syzstr->res[index];
313  ideal old_repr=syzstr->orderedRes[index];
314  int i=0,j,k,kk,og_elem=0,og_idel=IDELEMS(old_generators),l=*l_pairs,jj,ll,j1;
315  int og_ini=0;
316  ideal pairs=idInit(og_idel+IDELEMS(new_generators),old_generators->rank);
317  polyset prs=pairs->m;
318  poly p=NULL;
319  SObject tso;
320 
321  syInitializePair(&tso);
322  while ((og_elem<og_idel) && (old_generators->m[og_elem]!=NULL))
323  {
324  if ((index>0) && (pGetComp(old_generators->m[og_elem])<=crit_comp))
325  og_ini = og_elem;
326  og_elem++;
327  }
328  while ((l>0) && ((*resPairs)[l-1].lcm==NULL)) l--;
329  while ((i<IDELEMS(new_generators)) && (new_generators->m[i]!=NULL))
330  {
331  syTestPairs(*resPairs,*l_pairs,old_generators);
332  if (IDELEMS(old_generators)==og_elem)
333  {
334  pEnlargeSet(&old_generators->m,IDELEMS(old_generators),16);
335  IDELEMS(old_generators) += 16;
336  pEnlargeSet(&old_repr->m,IDELEMS(old_repr),16);
337  IDELEMS(old_repr) += 16;
338  }
339  k = p_FDeg(new_generators->m[i],currRing);
340  kk = pGetComp(new_generators->m[i]);
341  j = og_ini;
342  while ((j<og_elem) && (old_generators->m[j]!=NULL) &&
343  (pGetComp(old_generators->m[j])<kk)) j++;
344  while ((j<og_elem) && (old_generators->m[j]!=NULL) &&
345  (p_FDeg(old_generators->m[j],currRing)<=k)) j++;
346  for (jj=og_elem;jj>j;jj--)
347  {
348  old_generators->m[jj] = old_generators->m[jj-1];
349  old_repr->m[jj] = old_repr->m[jj-1];
350  }
351  old_generators->m[j] = new_generators->m[i];
352  new_generators->m[i] = NULL;
353  old_repr->m[j] = new_repr->m[i];
354  new_repr->m[i] = NULL;
355  og_elem++;
356  for (jj=0;jj<*l_pairs;jj++)
357  {
358  if ((*resPairs)[jj].lcm!=NULL)
359  {
360  if ((*resPairs)[jj].ind1>=j) (*resPairs)[jj].ind1++;
361  if ((*resPairs)[jj].ind2>=j) (*resPairs)[jj].ind2++;
362  }
363  }
364  syTestPairs(*resPairs,*l_pairs,old_generators);
365  for (jj=og_ini;jj<og_elem;jj++)
366  {
367  if ((j!=jj) && (pGetComp(old_generators->m[jj])==pGetComp(old_generators->m[j])))
368  {
369  p = pOne();
370  pLcm(old_generators->m[jj],old_generators->m[j],p);
371  pSetComp(p,j+1);
372  pSetm(p);
373  j1 = 0;
374  while (j1<jj)
375  {
376  if (prs[j1]!=NULL)
377  {
378  if (pLmDivisibleByNoComp(prs[j1],p))
379  {
380  pDelete(&p);
381  break;
382  }
383  else if (pLmDivisibleByNoComp(p,prs[j1]))
384  {
385  pDelete(&(prs[j1]));
386  }
387 #ifdef USE_CHAINCRIT0
388  else
389  {
390  poly p1,p2;
391  int ip=(currRing->N);
392  p1 = pMDivide(p,old_generators->m[jj]);
393  p2 = pMDivide(prs[j1],old_generators->m[j1]);
394  while ((ip>0) && (pGetExp(p1,ip)*pGetExp(p2,ip)==0)) ip--;
395  if (ip==0)
396  {
397  int ti=0;
398  while ((ti<l) && (((*resPairs)[ti].ind1!=j1)|| ((*resPairs)[ti].ind2!=jj))) ti++;
399  if (ti<l)
400  {
401  if (TEST_OPT_PROT) PrintS("cc");
402  syDeletePair(&(*resPairs)[ti]);
403  syCompactifyPairSet(*resPairs,*l_pairs,ti);
404  l--;
405  }
406  }
407  pDelete(&p1);
408  pDelete(&p2);
409  }
410 #endif
411  }
412  j1++;
413  }
414  if (p!=NULL)
415  prs[jj] = p;
416  }
417  }
418  for (jj=og_ini;jj<og_elem;jj++)
419  {
420  if (prs[jj] !=NULL)
421  {
422  if (l>=*l_pairs)
423  {
424  SSet temp = (SSet)omAlloc0((*l_pairs+16)*sizeof(SObject));
425  for (ll=0;ll<*l_pairs;ll++)
426  {
427  temp[ll].p = (*resPairs)[ll].p;
428  temp[ll].p1 = (*resPairs)[ll].p1;
429  temp[ll].p2 = (*resPairs)[ll].p2;
430  temp[ll].syz = (*resPairs)[ll].syz;
431  temp[ll].lcm = (*resPairs)[ll].lcm;
432  temp[ll].ind1 = (*resPairs)[ll].ind1;
433  temp[ll].ind2 = (*resPairs)[ll].ind2;
434  temp[ll].syzind = (*resPairs)[ll].syzind;
435  temp[ll].order = (*resPairs)[ll].order;
436  temp[ll].isNotMinimal = (*resPairs)[ll].isNotMinimal;
437  }
438  omFreeSize((ADDRESS)(*resPairs),*l_pairs*sizeof(SObject));
439  *l_pairs += 16;
440  (*resPairs) = temp;
441  }
442  tso.lcm = prs[jj];
443  prs[jj] = NULL;
444  tso.order = p_FDeg(tso.lcm,currRing);
445  tso.p1 = old_generators->m[jj];
446  tso.p2 = old_generators->m[j];
447  tso.ind1 = jj;
448  tso.ind2 = j;
449  tso.syzind = -1;
450  tso.isNotMinimal = NULL;
451  tso.p = NULL;
452  tso.syz = NULL;
453  SSet rP=*resPairs;
454 #ifdef SHOW_PROT
455 Print("erzeuge Paar im Modul %d,%d mit: \n",index,tso.order);
456 PrintS("poly1: ");pWrite(tso.p1);
457 PrintS("poly2: ");pWrite(tso.p2);
458 PrintS("syz: ");pWrite(tso.syz);
459 PrintS("sPoly: ");pWrite(tso.p);
460 PrintLn();
461 #endif
462  syEnterPair(rP,&tso,&l,index);
463  syInitializePair(&tso);
464  }
465  }
466  i++;
467  }
468  idDelete(&pairs);
469 }

◆ updatePairsHIndex()

static void updatePairsHIndex ( SSet resPairs,
int *  l_pairs,
syStrategy  ,
int  index,
ideal  add_generators,
ideal  ,
ideal  ,
ideal  ,
int  ,
int *  first_new 
)
static

Definition at line 1055 of file syz3.cc.

1058 {
1059  int i=*first_new,l=*l_pairs,j,ll,j1,add_idel=IDELEMS(add_generators);
1060  ideal pairs=idInit(add_idel,add_generators->rank);
1061  polyset prs=pairs->m;
1062  poly p=NULL;
1063  SObject tso;
1064 
1065  syInitializePair(&tso);
1066  while ((l>0) && ((*resPairs)[l-1].lcm==NULL)) l--;
1067  while ((i<add_idel) && (add_generators->m[i]!=NULL))
1068  {
1069  for (j=0;j<i;j++)
1070  {
1071  if (pGetComp(add_generators->m[j]) == pGetComp(add_generators->m[i]))
1072  {
1073  p = pOne();
1074  pLcm(add_generators->m[j],add_generators->m[i],p);
1075  pSetComp(p,i+1);
1076  pSetm(p);
1077  j1 = 0;
1078  while (j1<j)
1079  {
1080  if (prs[j1]!=NULL)
1081  {
1082  if (pLmDivisibleByNoComp(prs[j1],p))
1083  {
1084  pDelete(&p);
1085  break;
1086  }
1087  else if (pLmDivisibleByNoComp(p,prs[j1]))
1088  {
1089  pDelete(&(prs[j1]));
1090  }
1091 #ifdef USE_CHAINCRIT
1092  else
1093  {
1094  poly p1,p2;
1095  int ip=(currRing->N);
1096  p1 = pMDivide(p,add_generators->m[j]);
1097  p2 = pMDivide(prs[j1],add_generators->m[j1]);
1098  while ((ip>0) && (pGetExp(p1,ip)*pGetExp(p2,ip)==0)) ip--;
1099  if (ip==0)
1100  {
1101  int ti=0;
1102  while ((ti<l) && (((*resPairs)[ti].ind1!=j1)|| ((*resPairs)[ti].ind2!=j))) ti++;
1103  if (ti<l)
1104  {
1105  if (TEST_OPT_PROT) PrintS("cc");
1106  syDeletePair(&(*resPairs)[ti]);
1107  syCompactifyPairSet(*resPairs,*l_pairs,ti);
1108  l--;
1109  }
1110  }
1111  pDelete(&p1);
1112  pDelete(&p2);
1113  }
1114 #endif
1115  }
1116  j1++;
1117  }
1118  if (p!=NULL)
1119  prs[j] = p;
1120  }
1121  }
1122  for (j=0;j<i;j++)
1123  {
1124  if (prs[j] !=NULL)
1125  {
1126  if (l>=*l_pairs)
1127  {
1128  SSet temp = (SSet)omAlloc0((*l_pairs+16)*sizeof(SObject));
1129  for (ll=0;ll<*l_pairs;ll++)
1130  {
1131  temp[ll].p = (*resPairs)[ll].p;
1132  temp[ll].p1 = (*resPairs)[ll].p1;
1133  temp[ll].p2 = (*resPairs)[ll].p2;
1134  temp[ll].syz = (*resPairs)[ll].syz;
1135  temp[ll].lcm = (*resPairs)[ll].lcm;
1136  temp[ll].ind1 = (*resPairs)[ll].ind1;
1137  temp[ll].ind2 = (*resPairs)[ll].ind2;
1138  temp[ll].syzind = (*resPairs)[ll].syzind;
1139  temp[ll].order = (*resPairs)[ll].order;
1140  temp[ll].isNotMinimal = (*resPairs)[ll].isNotMinimal;
1141  }
1142  omFreeSize((ADDRESS)(*resPairs),*l_pairs*sizeof(SObject));
1143  *l_pairs += 16;
1144  (*resPairs) = temp;
1145  }
1146  tso.lcm = prs[j];
1147  prs[j] = NULL;
1148  tso.order = p_FDeg(tso.lcm,currRing);
1149  tso.p1 = add_generators->m[j];
1150  tso.p2 = add_generators->m[i];
1151  tso.ind1 = j;
1152  tso.ind2 = i;
1153  tso.syzind = -1;
1154  tso.isNotMinimal = NULL;
1155  tso.p = NULL;
1156  tso.syz = NULL;
1157  SSet rP=*resPairs;
1158 #ifdef SHOW_PROT
1159 Print("erzeuge Paar im Modul %d,%d mit: \n",index,tso.order);
1160 PrintS("poly1: ");pWrite(tso.p1);
1161 PrintS("poly2: ");pWrite(tso.p2);
1162 PrintS("syz: ");pWrite(tso.syz);
1163 PrintS("sPoly: ");pWrite(tso.p);
1164 PrintLn();
1165 #endif
1166  syEnterPair(rP,&tso,&l,index);
1167  syInitializePair(&tso);
1168  }
1169  }
1170  i++;
1171  }
1172  *first_new = i;
1173  idDelete(&pairs);
1174 }

Variable Documentation

◆ discard_pairs

int discard_pairs

Definition at line 49 of file syz3.cc.

◆ short_pairs

int short_pairs

Definition at line 50 of file syz3.cc.

pDivisibleBy
#define pDivisibleBy(a, b)
returns TRUE, if leading monom of a divides leading monom of b i.e., if there exists a expvector c > ...
Definition: polys.h:138
FALSE
#define FALSE
Definition: auxiliary.h:94
idCopy
ideal idCopy(ideal A)
Definition: ideals.h:60
ssyStrategy::Tl
intvec * Tl
Definition: syz.h:50
redOnePairHIndex
static void redOnePairHIndex(SSet resPairs, int itso, int crit_comp, syStrategy syzstr, int, ideal add_generators, ideal add_repr, ideal new_generators, ideal new_repr, int *next_place_add, int **g_l, poly deg_soc)
Definition: syz3.cc:1185
pMult_mm
#define pMult_mm(p, m)
Definition: polys.h:197
pLmEqual
#define pLmEqual(p1, p2)
Definition: polys.h:111
pGetComp
#define pGetComp(p)
Component.
Definition: polys.h:37
j
int j
Definition: facHensel.cc:105
pNorm
void pNorm(poly p, const ring R=currRing)
Definition: polys.h:357
TEST_OPT_PROT
#define TEST_OPT_PROT
Definition: options.h:102
k
int k
Definition: cfEzgcd.cc:92
idDelete
#define idDelete(H)
delete an ideal
Definition: ideals.h:29
syRedSyz
static BOOLEAN syRedSyz(kBucket_pt bucket, ideal red, int crit_comp, int *g_l)
Definition: syz3.cc:488
rChangeCurrRing
void rChangeCurrRing(ring r)
Definition: polys.cc:15
result
return result
Definition: facAbsBiFact.cc:76
polyset
poly * polyset
Definition: polys.h:254
syStrategy
ssyStrategy * syStrategy
Definition: syz.h:35
pGetExp
#define pGetExp(p, i)
Exponent.
Definition: polys.h:41
idrMoveR_NoSort
ideal idrMoveR_NoSort(ideal &id, ring src_r, ring dest_r)
Definition: prCopy.cc:261
pEnlargeSet
void pEnlargeSet(poly **p, int l, int increment)
Definition: p_polys.cc:3647
ADDRESS
void * ADDRESS
Definition: auxiliary.h:133
pairs
void pairs()
syTestPairs
static void syTestPairs(SSet resPairs, int length, ideal old_generators)
Definition: syz3.cc:240
ssyStrategy::fullres
resolvente fullres
Definition: syz.h:57
kBucketPolyRed
number kBucketPolyRed(kBucket_pt bucket, poly p1, int l1, poly spNoether)
Definition: kbuckets.cc:1076
syBetti
intvec * syBetti(resolvente res, int length, int *regularity, intvec *weights, BOOLEAN tomin, int *row_shift)
Definition: syz.cc:771
procedeNextGenerators
static void procedeNextGenerators(ideal temp_generators, ideal, ideal new_generators, ideal new_repr, ideal add_generators, ideal add_repr, syStrategy syzstr, int index, int crit_comp, resolvente totake)
Definition: syz3.cc:1414
syRedTailSyz
static poly syRedTailSyz(poly tored, ideal red, ideal sec_red, int crit_comp, syStrategy syzstr, int *gen_length, int *secgen_length, int *tored_length)
Definition: syz3.cc:515
reducePairsHIndex
static BOOLEAN reducePairsHIndex(SSet resPairs, int l_pairs, syStrategy syzstr, int index, ideal add_generators, ideal add_repr, ideal new_generators, ideal new_repr, int crit_comp, int *red_deg, int *next_place_add, int **g_l, resolvente totake)
Definition: syz3.cc:1377
length
static BOOLEAN length(leftv result, leftv arg)
Definition: interval.cc:263
pNeg
#define pNeg(p)
Definition: polys.h:193
kBucketGetLm
const poly kBucketGetLm(kBucket_pt bucket)
Definition: kbuckets.cc:503
pDelete
#define pDelete(p_ptr)
Definition: polys.h:181
id_Shift
void id_Shift(ideal M, int s, const ring r)
Definition: simpleideals.cc:1846
initial
poly initial(const poly p, const ring r, const gfan::ZVector &w)
Returns the initial form of p with respect to w.
Definition: initial.cc:30
idIs0
BOOLEAN idIs0(ideal h)
returns true if h is the zero ideal
Definition: simpleideals.cc:768
loop
#define loop
Definition: structs.h:78
syDeletePair
void syDeletePair(SObject *so)
Definition: syz1.cc:45
pMult
#define pMult(p, q)
Definition: polys.h:202
pSetComp
#define pSetComp(p, v)
Definition: polys.h:38
redOnePair
static void redOnePair(SSet resPairs, int itso, int l, ideal syzygies, int crit_comp, syStrategy syzstr, int index, ideal new_generators, ideal new_repr, int *ogm_l, int *orp_l)
Definition: syz3.cc:651
w
const CanonicalForm & w
Definition: facAbsFact.cc:55
__p_Mult_nn
#define __p_Mult_nn(p, n, r)
Definition: p_polys.h:928
ppMult_qq
#define ppMult_qq(p, q)
Definition: polys.h:203
ind2
long ind2(long arg)
Definition: kutil.cc:4060
pLength
static unsigned pLength(poly a)
Definition: p_polys.h:193
nInpNeg
#define nInpNeg(n)
Definition: numbers.h:22
currRing
ring currRing
Widely used global variable which specifies the current polynomial ring for Singular interpreter and ...
Definition: polys.cc:13
ssyStrategy::regularity
int regularity
Definition: syz.h:61
ssyStrategy::bucket
kBucket_pt bucket
Definition: syz.h:54
TRUE
#define TRUE
Definition: auxiliary.h:98
i
int i
Definition: cfEzgcd.cc:125
res
CanonicalForm res
Definition: facAbsFact.cc:64
nIsOne
#define nIsOne(n)
Definition: numbers.h:26
redPairs
static BOOLEAN redPairs(SSet resPairs, int l_pairs, ideal syzygies, ideal new_generators, ideal new_repr, int crit_comp, syStrategy syzstr, int index)
Definition: syz3.cc:939
idrMoveR
ideal idrMoveR(ideal &id, ring src_r, ring dest_r)
Definition: prCopy.cc:248
kBucketDestroy
void kBucketDestroy(kBucket_pt *bucket_pt)
Definition: kbuckets.cc:213
ssyStrategy::orderedRes
resolvente orderedRes
Definition: syz.h:48
id_RankFreeModule
long id_RankFreeModule(ideal s, ring lmRing, ring tailRing)
return the maximal component number found in any polynomial in s
Definition: simpleideals.cc:782
idShow
void idShow(const ideal id, const ring lmRing, const ring tailRing, const int debugPrint)
Definition: simpleideals.cc:59
discard_pairs
int discard_pairs
Definition: syz3.cc:49
PrintS
void PrintS(const char *s)
Definition: reporter.cc:284
omFreeSize
#define omFreeSize(addr, size)
Definition: omAllocDecl.h:260
BOOLEAN
int BOOLEAN
Definition: auxiliary.h:85
rAssure_dp_C
ring rAssure_dp_C(const ring r)
Definition: ring.cc:4885
syCompactifyPairSet
void syCompactifyPairSet(SSet sPairs, int sPlength, int first)
Definition: syz1.cc:105
kosz_ext
static ideal kosz_ext(ideal new_generators, ideal new_repr, syStrategy syzstr, int index, int next_comp, resolvente totake)
Definition: syz3.cc:1606
kBucketInit
void kBucketInit(kBucket_pt bucket, poly lm, int length)
Definition: kbuckets.cc:490
pLcm
#define pLcm(a, b, m)
Definition: polys.h:289
kBucket_Minus_m_Mult_p
void kBucket_Minus_m_Mult_p(kBucket_pt bucket, poly m, poly p, int *l, poly spNoether)
Bpoly == Bpoly - m*p; where m is a monom Does not destroy p and m assume (*l <= 0 || pLength(p) == *l...
Definition: kbuckets.cc:713
syReorder_Kosz
void syReorder_Kosz(syStrategy syzstr)
Definition: syz3.cc:262
normalizeOldPart
static ideal normalizeOldPart(ideal new_generators, ideal new_repr, syStrategy syzstr, int index, int)
Definition: syz3.cc:1545
updatePairsHIndex
static void updatePairsHIndex(SSet *resPairs, int *l_pairs, syStrategy, int index, ideal add_generators, ideal, ideal, ideal, int, int *first_new)
Definition: syz3.cc:1055
idSkipZeroes
void idSkipZeroes(ideal ide)
gives an ideal/module the minimal possible size
Definition: simpleideals.cc:172
short_pairs
int short_pairs
Definition: syz3.cc:50
ssyStrategy::syRing
ring syRing
Definition: syz.h:56
rAssure_C_dp
ring rAssure_C_dp(const ring r)
Definition: ring.cc:4890
syIsRegular
static BOOLEAN syIsRegular(ideal old_ideal, ideal new_ideal, int deg)
Definition: syz3.cc:56
resolvente
ideal * resolvente
Definition: ideals.h:18
h
static Poly * h
Definition: janet.cc:972
pOne
#define pOne()
Definition: polys.h:309
intvec
Definition: intvec.h:21
pIter
#define pIter(p)
Definition: monomials.h:38
ssyStrategy::length
int length
Definition: syz.h:60
nDiv
#define nDiv(a, b)
Definition: numbers.h:33
hHstdSeries
intvec * hHstdSeries(ideal S, intvec *modulweight, intvec *wdegree, ideal Q, ring tailRing)
Definition: hilb.cc:1329
pp
CanonicalForm pp(const CanonicalForm &)
CanonicalForm pp ( const CanonicalForm & f )
Definition: cf_gcd.cc:248
kBucketClear
void kBucketClear(kBucket_pt bucket, poly *p, int *length)
Definition: kbuckets.cc:518
pMDivide
#define pMDivide(a, b)
Definition: polys.h:287
pLmDivisibleByNoComp
#define pLmDivisibleByNoComp(a, b)
like pLmDivisibleBy, does not check components
Definition: polys.h:142
kNF
poly kNF(ideal F, ideal Q, poly p, int syzComp, int lazyReduce)
Definition: kstd1.cc:2822
pAdd
#define pAdd(p, q)
Definition: polys.h:198
p_Shift
void p_Shift(poly *p, int i, const ring r)
shifts components of the vector p by i
Definition: p_polys.cc:4604
sySPRedSyz_Kosz
void sySPRedSyz_Kosz(syStrategy syzstr, poly redWith, poly syz, poly q=NULL, int l_syz=-1)
Definition: syz3.cc:474
pSetCoeff
#define pSetCoeff(p, n)
deletes old coeff before setting the new one
Definition: polys.h:31
rDelete
void rDelete(ring r)
unconditionally deletes fields in r
Definition: ring.cc:437
ssyStrategy::syz_bucket
kBucket_pt syz_bucket
Definition: syz.h:55
syInitializePair
void syInitializePair(SObject *so)
Definition: syz1.cc:64
idPrint
#define idPrint(id)
Definition: ideals.h:46
normalize
static poly normalize(poly next_p, ideal add_generators, syStrategy syzstr, int *g_l, int *p_l, int crit_comp)
Definition: syz3.cc:1027
si_max
static int si_max(const int a, const int b)
Definition: auxiliary.h:138
pSetmComp
#define pSetmComp(p)
TODO:
Definition: polys.h:267
kBucket::p
poly p
Definition: kbuckets.h:182
syAppendSyz
static ideal syAppendSyz(ideal new_generators, syStrategy syzstr, int index, int crit_comp, resolvente totake)
Definition: syz3.cc:1688
Print
#define Print
Definition: emacs.cc:80
nInvers
#define nInvers(a)
Definition: numbers.h:34
idInit
ideal idInit(int idsize, int rank)
initialise an ideal / module
Definition: simpleideals.cc:37
n_Gcd
static FORCE_INLINE number n_Gcd(number a, number b, const coeffs r)
in Z: return the gcd of 'a' and 'b' in Z/nZ, Z/2^kZ: computed as in the case Z in Z/pZ,...
Definition: coeffs.h:686
WerrorS
void WerrorS(const char *s)
Definition: feFopen.cc:24
SSet
SObject * SSet
Definition: syz.h:32
m
int m
Definition: cfEzgcd.cc:121
assume
#define assume(x)
Definition: mod2.h:390
NULL
#define NULL
Definition: omList.c:10
pLmDelete
#define pLmDelete(p)
assume p != NULL, deletes Lm(p)->coef and Lm(p)
Definition: polys.h:76
pSetm
#define pSetm(p)
Definition: polys.h:265
l
int l
Definition: cfEzgcd.cc:93
lcm
int lcm(unsigned long *l, unsigned long *a, unsigned long *b, unsigned long p, int dega, int degb)
Definition: minpoly.cc:709
nDelete
#define nDelete(n)
Definition: numbers.h:17
omRealloc0Size
#define omRealloc0Size(addr, o_size, size)
Definition: omAllocDecl.h:221
pSetExp
#define pSetExp(p, i, v)
Definition: polys.h:42
updatePairs
static void updatePairs(SSet *resPairs, int *l_pairs, syStrategy syzstr, int index, ideal new_generators, ideal new_repr, int crit_comp)
Definition: syz3.cc:308
p
int p
Definition: cfModGcd.cc:4019
kBucketCreate
kBucket_pt kBucketCreate(const ring bucket_ring)
Creation/Destruction of buckets.
Definition: kbuckets.cc:206
syEnterPair
void syEnterPair(syStrategy syzstr, SObject *so, int *sPlength, int index)
Definition: syz1.cc:1036
pCopy
#define pCopy(p)
return a copy of the poly
Definition: polys.h:180
IDELEMS
#define IDELEMS(i)
Definition: simpleideals.h:24
sySchreyerResolvente
resolvente sySchreyerResolvente(ideal arg, int maxlength, int *length, BOOLEAN isMonomial=FALSE, BOOLEAN notReplace=FALSE)
Definition: syz0.cc:856
syCreateRegularExtension
static void syCreateRegularExtension(syStrategy syzstr, ideal old_ideal, ideal old_repr, int old_tl, poly next_generator, resolvente totake)
Definition: syz3.cc:112
pHead
#define pHead(p)
returns newly allocated copy of Lm(p), coef is copied, next=NULL, p might be NULL
Definition: polys.h:67
pGetCoeff
static number & pGetCoeff(poly p)
return an alias to the leading coefficient of p assumes that p != NULL NOTE: not copy
Definition: monomials.h:45
PrintLn
void PrintLn()
Definition: reporter.cc:310
ssyStrategy::res
resolvente res
Definition: syz.h:47
intvec::length
int length() const
Definition: intvec.h:92
p_FDeg
static long p_FDeg(const poly p, const ring r)
Definition: p_polys.h:381
id_Head
ideal id_Head(ideal h, const ring r)
returns the ideals of initial terms
Definition: simpleideals.cc:1111
index
static int index(p_Length length, p_Ord ord)
Definition: p_Procs_Impl.h:592
pSub
#define pSub(a, b)
Definition: polys.h:281
pNext
#define pNext(p)
Definition: monomials.h:37
omAlloc0
#define omAlloc0(size)
Definition: omAllocDecl.h:211
idrCopyR
ideal idrCopyR(ideal id, ring src_r, ring dest_r)
Definition: prCopy.cc:192
ssyStrategy
Definition: syz.h:37
ksOldCreateSpoly
KINLINE poly ksOldCreateSpoly(poly p1, poly p2, poly spNoether, ring r)
Definition: kInline.h:1069
pWrite
void pWrite(poly p)
Definition: polys.h:302
kosz_std
static ideal kosz_std(ideal new_generators, ideal new_repr, syStrategy syzstr, int index, int next_comp)
Definition: syz3.cc:1001