Loading...
Searching...
No Matches
syz.h File Reference
`#include "misc/mylimits.h"`
`#include "kernel/structs.h"`
`#include "polys/monomials/ring.h"`
`#include "kernel/ideals.h"`

Go to the source code of this file.

## Data Structures

struct | SObject
class | ssyStrategy

## Macros

#define | SYZ_SHIFT_MAX_NEW_COMP_ESTIMATE 8
#define | SYZ_SHIFT_BASE_LOG (BIT_SIZEOF_LONG - 1 - SYZ_SHIFT_MAX_NEW_COMP_ESTIMATE)
#define | SYZ_SHIFT_BASE (1L << SYZ_SHIFT_BASE_LOG)

## Typedefs

typedef SObject * | SSet
typedef SSet * | SRes
typedef ssyStrategy * | syStrategy

## Functions

void | sySchreyersSyzygiesM (polyset F, int Fmax, polyset *Shdl, int *Smax, BOOLEAN noSort)
void | sySchreyersSyzygiesB (polyset F, int Fmax, polyset *Shdl, int *Smax, BOOLEAN noSort)
resolvente | sySchreyerResolvente (ideal arg, int maxlength, int *length, BOOLEAN isMonomial=FALSE, BOOLEAN notReplace=FALSE)
syStrategy | sySchreyer (ideal arg, int maxlength)
resolvente | syResolvente (ideal arg, int maxlength, int *length, intvec ***weights, BOOLEAN minim)
syStrategy | syResolution (ideal arg, int maxlength, intvec *w, BOOLEAN minim)
void | syMinimizeResolvente (resolvente res, int length, int first)
intvec * | syBetti (resolvente res, int length, int *regularity, intvec *weights=NULL, BOOLEAN tomin=TRUE, int *row_shift=NULL)
ideal | syMinBase (ideal arg)
BOOLEAN | syTestOrder (ideal i)
void | syReOrderResolventFB (resolvente res, int length, int initial=1)
resolvente | syLaScala1 (ideal arg, int *length)
syStrategy | syLaScala3 (ideal arg, int *length)
syStrategy | syLaScala (ideal arg, int &maxlength, intvec *weights=NULL)
syStrategy | syHilb (ideal arg, int *length)
syStrategy | syKosz (ideal arg, int *length)
syStrategy | syFrank (const ideal arg, const int length, const char *method, const bool use_cache=true, const bool use_tensor_trick=false)
void | syKillComputation (syStrategy syzstr, ring r=currRing)
intvec * | syBettiOfComputation (syStrategy syzstr, BOOLEAN minim=TRUE, int *row_shift=NULL, intvec *weights=NULL)
int | sySize (syStrategy syzstr)
int | syDim (syStrategy syzstr)
syStrategy | syCopy (syStrategy syzstr)
void | syPrint (syStrategy syzstr, const char *currRingName)
syStrategy | syMinimize (syStrategy syzstr)
void | syKillEmptyEntres (resolvente res, int length)
void | syDeletePair (SObject *so)
void | syInitializePair (SObject *so)
void | syCopyPair (SObject *argso, SObject *imso)
void | syCompactifyPairSet (SSet sPairs, int sPlength, int first)
void | syCompactify1 (SSet sPairs, int *sPlength, int first)
SRes | syInitRes (ideal arg, int *length, intvec *Tl, intvec *cw=NULL)
void | syResetShiftedComponents (syStrategy syzstr, int index, int hilb=0)
void | syEnlargeFields (syStrategy syzstr, int index)
void | syEnterPair (syStrategy syzstr, SObject *so, int *sPlength, int index)
SSet | syChosePairs (syStrategy syzstr, int *index, int *howmuch, int *actdeg)
int | syInitSyzMod (syStrategy syzstr, int index, int init=17)
long | syReorderShiftedComponents (long *sc, int n)
void | syGaussForOne (ideal arg, int gen, int ModComp, int from=-1, int till=0)
void | syEnterPair (SSet sPairs, SObject *so, int *sPlength, int index)
resolvente | syReorder (resolvente res, int length, syStrategy syzstr, BOOLEAN toCopy=TRUE, resolvente totake=NULL)
syStrategy | syMres_with_map (ideal arg, int maxlength, intvec *w, ideal &trans)
void | syMinimize_with_map (syStrategy res, ideal &trans)
syStrategy | syMinimizeCopy (syStrategy org)
void | syFix (syStrategy r)

## Variables

EXTERN_VAR int * | currcomponents
EXTERN_VAR long * | currShiftedComponents

## Data Structure Documentation

## sSObject

struct sSObject

Definition at line 19 of file syz.h.

Data Fields
int | ind1 |
int | ind2 |
poly | isNotMinimal |
poly | lcm |
int | length |
int | order |
poly | p |
poly | p1 |
poly | p2 |
int | reference |
poly | syz |
int | syzind |

## ssyStrategy

class ssyStrategy

Definition at line 37 of file syz.h.

Data Fields
int ** | backcomponents |
intvec * | betti |
kBucket_pt | bucket |
intvec * | cw |
int ** | elemLength |
int ** | Firstelem |
resolvente | fullres |
intvec ** | hilb_coeffs |
int ** | Howmuch |
int | length |
short | list_length |
resolvente | minres |
resolvente | orderedRes |
short | references |
int | regularity |
resolvente | res |
intvec * | resolution |
SRes | resPairs |
unsigned long ** | sev |
long ** | ShiftedComponents |
ring | syRing |
kBucket_pt | syz_bucket |
intvec * | Tl |
int ** | truecomponents |
intvec ** | weights |

## Macro Definition Documentation

## SYZ_SHIFT_BASE

#define SYZ_SHIFT_BASE (1L << SYZ_SHIFT_BASE_LOG)

Definition at line 18 of file syz.h.

## SYZ_SHIFT_BASE_LOG

#define SYZ_SHIFT_BASE_LOG (BIT_SIZEOF_LONG - 1 - SYZ_SHIFT_MAX_NEW_COMP_ESTIMATE)

Definition at line 17 of file syz.h.

## SYZ_SHIFT_MAX_NEW_COMP_ESTIMATE

#define SYZ_SHIFT_MAX_NEW_COMP_ESTIMATE 8

Definition at line 15 of file syz.h.

## Typedef Documentation

## SRes

typedef SSet* SRes

Definition at line 33 of file syz.h.

## SSet

typedef SObject* SSet

Definition at line 32 of file syz.h.

## syStrategy

typedef ssyStrategy* syStrategy

Definition at line 36 of file syz.h.

## Function Documentation

## syBetti()

intvec * syBetti | ( | resolvente | res,
|  | int | length,
|  | int * | regularity,
|  | intvec * | weights = NULL,
|  | BOOLEAN | tomin = TRUE,
|  | int * | row_shift = NULL )

Definition at line 787 of file syz.cc.

{
//#define BETTI_WITH_ZEROS
//tomin = FALSE;
int i,j=0,k=0,l,rows,cols,mr;
int *temp1,*temp2,*temp3;/*used to compute degrees*/
int *tocancel; /*(BOOLEAN)tocancel[i]=element is superfluous*/
int r0_len;
/*------ compute size --------------*/
*regularity = -1;
cols = length;
while ((cols>0)
&& ((res[cols-1]==NULL)
|| (idIs0(res[cols-1]))))
{
cols--;
}
intvec * result;
if (idIs0(res[0]))
{
if (res[0]==NULL)
result = new intvec(1,1,1);
else
result = new intvec(1,1,res[0]->rank);
return result;
}
intvec *w=NULL;
if (weights!=NULL)
{
if (!idTestHomModule(res[0],currRing->qideal,weights))
{
WarnS("wrong weights given(3):");weights->show();PrintLn();
idHomModule(res[0],currRing->qideal,&w);
if (w!=NULL) { w->show();PrintLn();}
weights=NULL;
}
}
#if 0
if (idHomModule(res[0],currRing->qideal,&w)!=isHomog)
{
WarnS("betti-command: Input is not homogeneous!");
weights=NULL;
}
#endif
if (weights==NULL) weights=w;
else delete w;
r0_len=IDELEMS(res[0]);
while ((r0_len>0) && (res[0]->m[r0_len-1]==NULL)) r0_len--;
#ifdef SHOW_W
PrintS("weights:");if (weights!=NULL) weights->show(); else Print("NULL"); PrintLn();
#endif
int rkl=l = si_max(id_RankFreeModule(res[0],currRing),res[0]->rank);
i = 0;
while ((i<length) && (res[i]!=NULL))
{
if (IDELEMS(res[i])>l) l = IDELEMS(res[i]);
i++;
}
temp1 = (int*)omAlloc0((l+1)*sizeof(int));
temp2 = (int*)omAlloc((l+1)*sizeof(int));
rows = 1;
mr = 1;
cols++;
for (i=0;i<cols-1;i++)
{
if ((i==0) && (weights!=NULL)) p_SetModDeg(weights, currRing);
memset(temp2,0,(l+1)*sizeof(int));
for (j=0;j<IDELEMS(res[i]);j++)
{
if (res[i]->m[j]!=NULL)
{
if ((pGetComp(res[i]->m[j])>l)
// usual resolutions do not the following, but artifulal built may: (tr. #763)
//|| ((i>1) && (res[i-1]->m[pGetComp(res[i]->m[j])-1]==NULL))
)
{
WerrorS("input not a resolution");
omFreeSize((ADDRESS)temp1,(l+1)*sizeof(int));
omFreeSize((ADDRESS)temp2,(l+1)*sizeof(int));
return NULL;
}
temp2[j+1] = p_FDeg(res[i]->m[j],currRing)+temp1[pGetComp(res[i]->m[j])];
if (temp2[j+1]-i>rows) rows = temp2[j+1]-i;
if (temp2[j+1]-i<mr) mr = temp2[j+1]-i;
}
}
if ((i==0) && (weights!=NULL)) p_SetModDeg(NULL, currRing);
temp3 = temp1;
temp1 = temp2;
temp2 = temp3;
}
mr--;
if (weights!=NULL)
{
for(j=0;j<weights->length();j++)
{
if (rows <(*weights)[j]+1) rows=(-mr)+(*weights)[j]+1;
}
}
/*------ computation betti numbers --------------*/
rows -= mr;
result = new intvec(rows+1,cols,0);
if (weights!=NULL)
{
for(j=0;j<weights->length();j++)
{
IMATELEM((*result),(-mr)+(*weights)[j]+1,1) ++;
//Print("imat(%d,%d)++ -> %d\n",(-mr)+(*weights)[j]+1, 1, IMATELEM((*result),(-mr)+(*weights)[j]+1,1));
}
}
else
{
(*result)[(-mr)*cols] = /*idRankFreeModule(res[0])*/ rkl;
if ((!idIs0(res[0])) && ((*result)[(-mr)*cols]==0))
(*result)[(-mr)*cols] = 1;
}
tocancel = (int*)omAlloc0((rows+1)*sizeof(int));
memset(temp1,0,(l+1)*sizeof(int));
if (weights!=NULL)
{
memset(temp2,0,l*sizeof(int));
p_SetModDeg(weights, currRing);
}
else
memset(temp2,0,l*sizeof(int));
syDetect(res[0],0,TRUE,temp2,tocancel);
if (weights!=NULL) p_SetModDeg(NULL, currRing);
if (tomin)
{
//(*result)[(-mr)*cols] -= dummy;
for(j=0;j<=rows+mr;j++)
{
//Print("tocancel[%d]=%d imat(%d,%d)=%d\n",j,tocancel[j],(-mr)+j+1,1,IMATELEM((*result),(-mr)+j+1,1));
IMATELEM((*result),(-mr)+j+1,1) -= tocancel[j];
}
}
for (i=0;i<cols-1;i++)
{
if ((i==0) && (weights!=NULL)) p_SetModDeg(weights, currRing);
memset(temp2,0,l*sizeof(int));
for (j=0;j<IDELEMS(res[i]);j++)
{
if (res[i]->m[j]!=NULL)
{
temp2[j+1] = p_FDeg(res[i]->m[j],currRing)+temp1[pGetComp(res[i]->m[j])];
//(*result)[i+1+(temp2[j+1]-i-1)*cols]++;
//if (temp2[j+1]>i) IMATELEM((*result),temp2[j+1]-i-mr,i+2)++;
IMATELEM((*result),temp2[j+1]-i-mr,i+2)++;
}
else if (i==0)
{
if (j<r0_len) IMATELEM((*result),-mr,2)++;
}
}
/*------ computation betti numbers, if res not minimal --------------*/
if (tomin)
{
for (j=mr;j<rows+mr;j++)
{
//(*result)[i+1+j*cols] -= tocancel[j+1];
IMATELEM((*result),j+1-mr,i+2) -= tocancel[j+1];
}
if ((i<length-1) && (res[i+1]!=NULL))
{
memset(tocancel,0,(rows+1)*sizeof(int));
syDetect(res[i+1],i+1,TRUE,temp2,tocancel);
for (j=0;j<rows;j++)
{
//(*result)[i+1+j*cols] -= tocancel[j];
IMATELEM((*result),j+1,i+2) -= tocancel[j];
}
}
}
temp3 = temp1;
temp1 = temp2;
temp2 = temp3;
for (j=0;j<=rows;j++)
{
// if (((*result)[i+1+j*cols]!=0) && (j>*regularity)) *regularity = j;
if ((IMATELEM((*result),j+1,i+2)!=0) && (j>*regularity)) *regularity = j;
}
if ((i==0) && (weights!=NULL)) p_SetModDeg(NULL, currRing);
}
// Print("nach minim:\n"); result->show(); PrintLn();
/*------ clean up --------------*/
omFreeSize((ADDRESS)tocancel,(rows+1)*sizeof(int));
omFreeSize((ADDRESS)temp1,(l+1)*sizeof(int));
omFreeSize((ADDRESS)temp2,(l+1)*sizeof(int));
if ((tomin) && (mr<0)) // deletes the first (zero) line
{
for (j=1;j<=rows+mr+1;j++)
{
for (k=1;k<=cols;k++)
{
IMATELEM((*result),j,k) = IMATELEM((*result),j-mr,k);
}
}
for (j=rows+mr+1;j<=rows+1;j++)
{
for (k=1;k<=cols;k++)
{
IMATELEM((*result),j,k) = 0;
}
}
}
j = 0;
k = 0;
for (i=1;i<=result->rows();i++)
{
for(l=1;l<=result->cols();l++)
if (IMATELEM((*result),i,l) != 0)
{
j = si_max(j, i-1);
k = si_max(k, l-1);
}
}
intvec * exactresult=new intvec(j+1,k+1,0);
for (i=0;i<exactresult->rows();i++)
{
for (j=0;j<exactresult->cols();j++)
{
IMATELEM(*exactresult,i+1,j+1) = IMATELEM(*result,i+1,j+1);
}
}
if (row_shift!=NULL) *row_shift = mr;
delete result;
return exactresult;
}
si_max
static int si_max(const int a, const int b)
Definition auxiliary.h:125
TRUE
#define TRUE
Definition auxiliary.h:101
ADDRESS
void * ADDRESS
Definition auxiliary.h:120
l
int l
Definition cfEzgcd.cc:100
m
int m
Definition cfEzgcd.cc:128
i
int i
Definition cfEzgcd.cc:132
k
int k
Definition cfEzgcd.cc:99
intvec
Definition intvec.h:24
intvec::show
void show(int mat=0, int spaces=0) const
Definition intvec.cc:149
intvec::length
int length() const
Definition intvec.h:95
intvec::cols
int cols() const
Definition intvec.h:96
intvec::rows
int rows() const
Definition intvec.h:97
Print
#define Print
Definition emacs.cc:80
WarnS
#define WarnS
Definition emacs.cc:78
result
return result
Definition facAbsBiFact.cc:76
res
CanonicalForm res
Definition facAbsFact.cc:60
w
const CanonicalForm & w
Definition facAbsFact.cc:51
j
int j
Definition facHensel.cc:110
WerrorS
void WerrorS(const char *s)
Definition feFopen.cc:24
idTestHomModule
BOOLEAN idTestHomModule(ideal m, ideal Q, intvec *w)
Definition ideals.cc:2120
idIs0
BOOLEAN idIs0(ideal h)
returns true if h is the zero ideal
Definition simpleideals.cc:960
idHomModule
static BOOLEAN idHomModule(ideal m, ideal Q, intvec **w)
Definition ideals.h:96
length
static BOOLEAN length(leftv result, leftv arg)
Definition interval.cc:257
IMATELEM
#define IMATELEM(M, I, J)
Definition intvec.h:86
omFreeSize
#define omFreeSize(addr, size)
Definition omAllocDecl.h:260
omAlloc
#define omAlloc(size)
Definition omAllocDecl.h:210
omAlloc0
#define omAlloc0(size)
Definition omAllocDecl.h:211
NULL
#define NULL
Definition omList.c:12
p_SetModDeg
void p_SetModDeg(intvec *w, ring r)
Definition p_polys.cc:3798
p_FDeg
static long p_FDeg(const poly p, const ring r)
Definition p_polys.h:382
currRing
VAR ring currRing
Widely used global variable which specifies the current polynomial ring for Singular interpreter and ...
Definition polys.cc:13
pGetComp
#define pGetComp(p)
Component.
Definition polys.h:38
PrintS
void PrintS(const char *s)
Definition reporter.cc:288
PrintLn
void PrintLn()
Definition reporter.cc:314
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:992
IDELEMS
#define IDELEMS(i)
Definition simpleideals.h:23
isHomog
@ isHomog
Definition structs.h:33
syDetect
int syDetect(ideal id, int index, BOOLEAN homog, int *degrees, int *tocancel)
Definition syz.cc:718

## syBettiOfComputation()

intvec * syBettiOfComputation | ( | syStrategy | syzstr,
|  | BOOLEAN | minim = TRUE,
|  | int * | row_shift = NULL,
|  | intvec * | weights = NULL )

Don't change the syzstr???

Definition at line 1756 of file syz1.cc.

{
int dummy;
BOOLEAN std_weights=TRUE;
if ((weights!=NULL)
&& (syzstr->betti!=NULL)
&& (syzstr->weights!=NULL) && (syzstr->weights[0]!=NULL))
{
int i;
for(i=weights->length()-1; i>=0; i--)
{
//Print("test %d: %d - %d\n",i,(*weights)[i], (*(syzstr->weights[0]))[i]);
if ((*weights)[i]!=(*(syzstr->weights[0]))[i])
{
std_weights=FALSE;
break;
}
}
}
if ((syzstr->betti!=NULL)
&& (std_weights))
{
if (minim || (syzstr->resPairs!=NULL))
return ivCopy(syzstr->betti);
}
resolvente fullres = syzstr->fullres;
resolvente minres = syzstr->minres;
const int length = syzstr->length;
if ((fullres==NULL) && (minres==NULL))
{
if (syzstr->hilb_coeffs==NULL)
{ // LA SCALA
fullres = syReorder(syzstr->res, length, syzstr);
}
else
{ // HRES
minres = syReorder(syzstr->orderedRes, length, syzstr);
syKillEmptyEntres(minres, length);
}
}
intvec *result=NULL;
if (fullres!=NULL)
result = syBetti(fullres,length,&dummy,weights,minim,row_shift);
else
result = syBetti(minres,length,&dummy,weights,minim,row_shift);
return result; /// Don't change the syzstr???
// TODO: cleanup these!
if( fullres != NULL && syzstr->fullres == NULL )
syzstr->fullres = fullres;
if( minres != NULL && syzstr->minres == NULL )
syzstr->minres = minres;
if ((result!=NULL)
&& ((minim) || (syzstr->resPairs!=NULL))
&& std_weights
&& (syzstr->betti==NULL))
{
syzstr->betti = ivCopy(result); // cache the result...
}
return result;
}
BOOLEAN
int BOOLEAN
Definition auxiliary.h:88
FALSE
#define FALSE
Definition auxiliary.h:97
resolvente
ideal * resolvente
Definition ideals.h:18
ivCopy
intvec * ivCopy(const intvec *o)
Definition intvec.h:146
syReorder
resolvente syReorder(resolvente res, int length, syStrategy syzstr, BOOLEAN toCopy, resolvente totake)
Definition syz1.cc:1641
syKillEmptyEntres
void syKillEmptyEntres(resolvente res, int length)
Definition syz1.cc:2199
syBetti
intvec * syBetti(resolvente res, int length, int *regularity, intvec *weights, BOOLEAN tomin, int *row_shift)
Definition syz.cc:787
ssyStrategy::hilb_coeffs
intvec ** hilb_coeffs
Definition syz.h:46
ssyStrategy::minres
resolvente minres
Definition syz.h:58
ssyStrategy::betti
intvec * betti
Definition syz.h:53
ssyStrategy::res
resolvente res
Definition syz.h:47
ssyStrategy::fullres
resolvente fullres
Definition syz.h:57
ssyStrategy::weights
intvec ** weights
Definition syz.h:45
ssyStrategy::orderedRes
resolvente orderedRes
Definition syz.h:48
ssyStrategy::length
int length
Definition syz.h:60
ssyStrategy::resPairs
SRes resPairs
Definition syz.h:49

## syChosePairs()

SSet syChosePairs | ( | syStrategy | syzstr,
|  | int * | index,
|  | int * | howmuch,
|  | int * | actdeg )

Definition at line 1288 of file syz1.cc.

{
return syChosePairsPutIn(syzstr,index,howmuch,actdeg,0,syzstr->length);
}
index
static int index(p_Length length, p_Ord ord)
Definition p_Procs_Impl.h:592
syChosePairsPutIn
static SSet syChosePairsPutIn(syStrategy syzstr, int *index, int *howmuch, int *actdeg, int an, int en)
Definition syz1.cc:1181

## syCompactify1()

void syCompactify1 | ( | SSet | sPairs,
|  | int * | sPlength,
|  | int | first )

Definition at line 132 of file syz1.cc.

{
int k=first,kk=0;
while (k+kk<*sPlength)
{
if (sPairs[k+kk].lcm!=NULL)
{
if (kk>0) syCopyPair(&sPairs[k+kk],&sPairs[k]);
k++;
}
else
{
kk++;
}
}
while (k<*sPlength)
{
syInitializePair(&sPairs[k]);
k++;
}
*sPlength -= kk;
}
lcm
int lcm(unsigned long *l, unsigned long *a, unsigned long *b, unsigned long p, int dega, int degb)
Definition minpoly.cc:709
syCopyPair
void syCopyPair(SObject *argso, SObject *imso)
Definition syz1.cc:82
syInitializePair
void syInitializePair(SObject *so)
Definition syz1.cc:63

## syCompactifyPairSet()

void syCompactifyPairSet | ( | SSet | sPairs,
|  | int | sPlength,
|  | int | first )

Definition at line 104 of file syz1.cc.

{
int k=first,kk=0;
while (k+kk<sPlength)
{
if (sPairs[k+kk].lcm!=NULL)
{
if (kk>0) syCopyPair(&sPairs[k+kk],&sPairs[k]);
k++;
}
else
{
kk++;
}
}
while (k<sPlength)
{
syInitializePair(&sPairs[k]);
k++;
}
}

## syCopy()

syStrategy syCopy | ( | syStrategy | syzstr | ) |

Definition at line 1885 of file syz1.cc.

{
syStrategy result=syzstr;
(result->references)++;
return result;
}
syStrategy
ssyStrategy * syStrategy
Definition syz.h:36

## syCopyPair()

void syCopyPair | ( | SObject * | argso,
|  | SObject * | imso )

Definition at line 82 of file syz1.cc.

{
*imso=*argso;
(*argso).p = NULL;
(*argso).p1 = NULL;
(*argso).p2 = NULL;
(*argso).lcm = NULL;
(*argso).syz = NULL;
(*argso).ind1 = 0;
(*argso).ind2 = 0;
(*argso).syzind = -1;
(*argso).order = 0;
(*argso).isNotMinimal = NULL;
(*argso).length = -1;
(*argso).reference = -1;
}

## syDeletePair()

void syDeletePair | ( | SObject * | so | ) |

Definition at line 44 of file syz1.cc.

{
pDelete(&(*so).p);
pDelete(&(*so).lcm);
pDelete(&(*so).syz);
(*so).p1 = NULL;
(*so).p2 = NULL;
(*so).ind1 = 0;
(*so).ind2 = 0;
(*so).syzind = -1;
(*so).order = 0;
(*so).isNotMinimal = NULL;
(*so).length = -1;
(*so).reference = -1;
}
pDelete
#define pDelete(p_ptr)
Definition polys.h:187

## syDim()

int syDim | ( | syStrategy | syzstr | ) |

Definition at line 1850 of file syz1.cc.

{
int i,l;
if (syzstr->resPairs!=NULL)
{
SRes rP=syzstr->resPairs;
l = syzstr->length;
while ((l>0) && (rP[l-1]==NULL)) l--;
if (l==0) return -1;
l--;
while (l>=0)
{
i = 0;
while ((i<(*syzstr->Tl)[l]) &&
((rP[l][i].lcm!=NULL) || (rP[l][i].syz!=NULL)) &&
(rP[l][i].isNotMinimal!=NULL))
{
i++;
}
if ((i<(*syzstr->Tl)[l]) &&
((rP[l][i].lcm!=NULL) || (rP[l][i].syz!=NULL)) &&
(rP[l][i].isNotMinimal==NULL))
return l;
l--;
}
return l;
}
else
return sySize(syzstr);
}
sySize
int sySize(syStrategy syzstr)
Definition syz1.cc:1830
ssyStrategy::Tl
intvec * Tl
Definition syz.h:50
SRes
SSet * SRes
Definition syz.h:33

## syEnlargeFields()

void syEnlargeFields | ( | syStrategy | syzstr,
|  | int | index )

Definition at line 734 of file syz1.cc.

{
pEnlargeSet(&(syzstr->res[index]->m),IDELEMS(syzstr->res[index]),16);
syzstr->truecomponents[index]=(int*)omRealloc0Size((ADDRESS)syzstr->truecomponents[index],
(IDELEMS(syzstr->res[index])+1)*sizeof(int),
(IDELEMS(syzstr->res[index])+17)*sizeof(int));
syzstr->ShiftedComponents[index]
=(long*)omRealloc0Size((ADDRESS)syzstr->ShiftedComponents[index],
(IDELEMS(syzstr->res[index])+1)*sizeof(long),
(IDELEMS(syzstr->res[index])+17)*sizeof(long));
syzstr->backcomponents[index]=(int*)omRealloc0Size((ADDRESS)syzstr->backcomponents[index],
(IDELEMS(syzstr->res[index])+1)*sizeof(int),
(IDELEMS(syzstr->res[index])+17)*sizeof(int));
syzstr->Howmuch[index]=(int*)omRealloc0Size((ADDRESS)syzstr->Howmuch[index],
(IDELEMS(syzstr->res[index])+1)*sizeof(int),
(IDELEMS(syzstr->res[index])+17)*sizeof(int));
syzstr->Firstelem[index]=(int*)omRealloc0Size((ADDRESS)syzstr->Firstelem[index],
(IDELEMS(syzstr->res[index])+1)*sizeof(int),
(IDELEMS(syzstr->res[index])+17)*sizeof(int));
syzstr->elemLength[index]=(int*)omRealloc0Size((ADDRESS)syzstr->elemLength[index],
(IDELEMS(syzstr->res[index])+1)*sizeof(int),
(IDELEMS(syzstr->res[index])+17)*sizeof(int));
syzstr->sev[index]=(unsigned long*)omRealloc0Size((ADDRESS)syzstr->sev[index],
(IDELEMS(syzstr->res[index])+1)*sizeof(unsigned long),
(IDELEMS(syzstr->res[index])+17)*sizeof(unsigned long));
IDELEMS(syzstr->res[index]) += 16;
pEnlargeSet(&(syzstr->orderedRes[index]->m),IDELEMS(syzstr->orderedRes[index]),16);
IDELEMS(syzstr->orderedRes[index]) += 16;
}
omRealloc0Size
#define omRealloc0Size(addr, o_size, size)
Definition omAllocDecl.h:221
pEnlargeSet
void pEnlargeSet(poly **p, int l, int increment)
Definition p_polys.cc:3821
ssyStrategy::backcomponents
int ** backcomponents
Definition syz.h:41
ssyStrategy::truecomponents
int ** truecomponents
Definition syz.h:39
ssyStrategy::Firstelem
int ** Firstelem
Definition syz.h:43
ssyStrategy::elemLength
int ** elemLength
Definition syz.h:44
ssyStrategy::sev
unsigned long ** sev
Definition syz.h:59
ssyStrategy::ShiftedComponents
long ** ShiftedComponents
Definition syz.h:40
ssyStrategy::Howmuch
int ** Howmuch
Definition syz.h:42

## syEnterPair() [1/2]

void syEnterPair | ( | SSet | sPairs,
|  | SObject * | so,
|  | int * | sPlength,
|  | int | index )

Definition at line 985 of file syz1.cc.

{
int ll,k,no=(*so).order,sP=*sPlength,i;
if ((sP==0) || (sPairs[sP-1].order<=no))
ll = sP;
else if (sP==1)
ll = 0;
else
{
int an=0,en=sP-1;
loop
{
if (an>=en-1)
{
if ((sPairs[an].order<=no) && (sPairs[an+1].order>no))
{
ll = an+1;
break;
}
else if ((sPairs[en].order<=no) && (sPairs[en+1].order>no))
{
ll = en+1;
break;
}
else if (sPairs[an].order>no)
{
ll = an;
break;
}
else
{
PrintS("Hier ist was faul!\n");
break;
}
}
i=(an+en) / 2;
if (sPairs[i].order <= no)
an=i;
else
en=i;
}
}
for (k=(*sPlength);k>ll;k--)
{
syCopyPair(&sPairs[k-1],&sPairs[k]);
}
syCopyPair(so,&sPairs[ll]);
(*sPlength)++;
}
loop
#define loop
Definition structs.h:71

## syEnterPair() [2/2]

void syEnterPair | ( | syStrategy | syzstr,
|  | SObject * | so,
|  | int * | sPlength,
|  | int | index )

Definition at line 1035 of file syz1.cc.

{
int ll;
if (*sPlength>=(*syzstr->Tl)[index])
{
SSet temp = (SSet)omAlloc0(((*syzstr->Tl)[index]+16)*sizeof(SObject));
for (ll=0;ll<(*syzstr->Tl)[index];ll++)
{
temp[ll].p = (syzstr->resPairs[index])[ll].p;
temp[ll].p1 = (syzstr->resPairs[index])[ll].p1;
temp[ll].p2 = (syzstr->resPairs[index])[ll].p2;
temp[ll].syz = (syzstr->resPairs[index])[ll].syz;
temp[ll].lcm = (syzstr->resPairs[index])[ll].lcm;
temp[ll].ind1 = (syzstr->resPairs[index])[ll].ind1;
temp[ll].ind2 = (syzstr->resPairs[index])[ll].ind2;
temp[ll].syzind = (syzstr->resPairs[index])[ll].syzind;
temp[ll].order = (syzstr->resPairs[index])[ll].order;
temp[ll].isNotMinimal = (syzstr->resPairs[index])[ll].isNotMinimal;
temp[ll].length = (syzstr->resPairs[index])[ll].length;
temp[ll].reference = (syzstr->resPairs[index])[ll].reference;
}
if (syzstr->resPairs[index] != NULL) // OB: ?????
omFreeSize((ADDRESS)syzstr->resPairs[index],(*syzstr->Tl)[index]*sizeof(SObject));
(*syzstr->Tl)[index] += 16;
syzstr->resPairs[index] = temp;
}
syEnterPair(syzstr->resPairs[index],so,sPlength,index);
}
p
int p
Definition cfModGcd.cc:4086
syEnterPair
void syEnterPair(SSet sPairs, SObject *so, int *sPlength, int)
Definition syz1.cc:985
SSet
SObject * SSet
Definition syz.h:32

## syFix()

void syFix | ( | syStrategy | r | ) |

Definition at line 1230 of file syz.cc.

{
if (r->fullres==NULL)
{
if(r->minres==NULL)
{
return;
}
}
int found=-1;
for(int i=1;i<r->length;i++)
{
// search (0)
if((r->fullres!=NULL) && (r->fullres[i]!=NULL))
{
if (idIs0(r->fullres[i])) {found=i;break;}
}
if((r->fullres!=NULL) && (r->fullres[i]==NULL))
break;
if((r->minres!=NULL) && (r->minres[i]!=NULL))
{
if (idIs0(r->minres[i])) {found=i;break;}
}
if((r->minres!=NULL) && (r->minres[i]==NULL))
break;
}
if (found>0) // delete trailing stuff
{
for(int i=found+1;i<r->length;i++)
{
if ((r->fullres!=NULL) && (r->fullres[i]!=NULL))
id_Delete(&r->fullres[i],currRing);
if ((r->minres!=NULL) && (r->minres[i]!=NULL))
id_Delete(&r->minres[i],currRing);
}
r->list_length=found;
}
else
{
// append (0)
for(int i=1;i<r->length;i++)
{
if ((r->fullres!=NULL) && (r->fullres[i]==NULL))
{
r->fullres[i]=idInit(1,IDELEMS(r->fullres[i-1]));
if ((r->minres!=NULL) && (r->minres[i-1]==NULL))
{
r->minres[i]=idInit(1,IDELEMS(r->minres[i-1]));
}
break;
}
else
{
if ((r->minres!=NULL) && (r->minres[i]==NULL))
{
r->minres[i]=idInit(1,IDELEMS(r->minres[i-1]));
break;
}
}
}
}
}
found
bool found
Definition facFactorize.cc:55
idInit
ideal idInit(int idsize, int rank)
initialise an ideal / module
Definition simpleideals.cc:35
id_Delete
void id_Delete(ideal *h, ring r)
deletes an ideal/module/matrix
Definition simpleideals.cc:123
ssyStrategy::list_length
short list_length
Definition syz.h:62

## syFrank()

syStrategy syFrank | ( | const ideal | arg,
|  | const int | length,
|  | const char * | method,
|  | const bool | use_cache = true,
|  | const bool | use_tensor_trick = false )

Definition at line 792 of file syz4.cc.

{
syStrategy result = (syStrategy)omAlloc0(sizeof(ssyStrategy));
resolvente res = (resolvente)omAlloc0((length+1)*sizeof(ideal));
if (strcmp(method, "frame") != 0)
{
res[0] = id_Copy(arg, currRing);
}
else
{
res[0] = id_Head(arg, currRing);
}
syzHeadFunction *syzHead;
bool do_lifting;
bool single_module;
set_options(&syzHead, &do_lifting, &single_module, method);
int new_length = computeResolution(res, length-1, syzHead, do_lifting,
single_module, use_cache, use_tensor_trick);
if (new_length < length)
{
res = (resolvente)omReallocSize(res, (length+1)*sizeof(ideal),
(new_length+1)*sizeof(ideal));
}
if (strcmp(method, "frame") != 0)
{
insert_ext_induced_LTs(res, new_length, single_module);
}
result->fullres = res;
result->length = new_length;
result->list_length = new_length;
return result;
}
id_Copy
ideal id_Copy(ideal h1, const ring r)
copy an ideal
Definition simpleideals.cc:542
omReallocSize
#define omReallocSize(addr, o_size, size)
Definition omAllocDecl.h:220
id_Head
ideal id_Head(ideal h, const ring r)
returns the ideals of initial terms
Definition simpleideals.cc:1483
set_options
static void set_options(syzHeadFunction **syzHead_ptr, bool *do_lifting_ptr, bool *single_module_ptr, const char *method)
Definition syz4.cc:701
computeResolution
static int computeResolution(resolvente res, const int max_index, syzHeadFunction *syzHead, const bool do_lifting, const bool single_module, const bool use_cache, const bool use_tensor_trick)
Definition syz4.cc:670
insert_ext_induced_LTs
static void insert_ext_induced_LTs(const resolvente res, const int length, const bool single_module)
Definition syz4.cc:758
syzHeadFunction
poly syzHeadFunction(ideal, int, int)
Definition syz4.cc:321
ssyStrategy
Definition syz.h:37

## syGaussForOne()

void syGaussForOne | ( | ideal | arg,
|  | int | gen,
|  | int | ModComp,
|  | int | from = -1,
|  | int | till = 0 )

Definition at line 218 of file syz.cc.

{
int /*k,j,i,*/lu;
poly unit1,unit2;
poly actWith=syz->m[elnum];
syz->m[elnum] = NULL;
if (from<0) from = 0;
if ((till<=0) || (till>IDELEMS(syz))) till = IDELEMS(syz);
if (!rField_has_simple_inverse(currRing)) p_Cleardenom(actWith, currRing);
/*--makes Gauss alg. for the column ModComp--*/
pTakeOutComp(&(actWith), ModComp, &unit1, &lu);
if (lu==1) /*p_IsConstantComp(unit1,currRing)*/
{
number n_unit1=pGetCoeff(unit1);
while (from<till)
{
poly tmp=syz->m[from];
if (/*syz->m[from]*/ tmp!=NULL)
{
pTakeOutComp(&tmp, ModComp, &unit2, &lu);
tmp = p_Mult_nn(tmp,n_unit1,currRing);
syz->m[from] = pSub(tmp,
pMult(unit2,pCopy(actWith)));
}
from++;
}
}
else
{
while (from<till)
{
poly tmp=syz->m[from];
if (/*syz->m[from]*/ tmp!=NULL)
{
pTakeOutComp(&tmp, ModComp, &unit2, &lu);
tmp = pMult(pCopy(unit1),tmp);
syz->m[from] = pSub(tmp,
pMult(unit2,pCopy(actWith)));
}
from++;
}
}
pDelete(&actWith);
pDelete(&unit1);
}
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:44
p_Cleardenom
poly p_Cleardenom(poly p, const ring r)
Definition p_polys.cc:2893
p_Mult_nn
static poly p_Mult_nn(poly p, number n, const ring r)
Definition p_polys.h:960
pSub
#define pSub(a, b)
Definition polys.h:288
pMult
#define pMult(p, q)
Definition polys.h:208
pTakeOutComp
void pTakeOutComp(poly *p, long comp, poly *q, int *lq, const ring R=currRing)
Splits *p into two polys: *q which consists of all monoms with component == comp and *p of all other ...
Definition polys.h:339
pCopy
#define pCopy(p)
return a copy of the poly
Definition polys.h:186
rField_has_simple_inverse
static BOOLEAN rField_has_simple_inverse(const ring r)
Definition ring.h:554

## syHilb()

syStrategy syHilb | ( | ideal | arg,
|  | int * | length )

Definition at line 950 of file syz2.cc.

{
int i,j,actdeg=32000,index=0;
int howmuch,toSub=0;
int maxindex=0,maxdeg=0;
ideal temp=NULL;
SSet nextPairs;
ring origR = currRing;
syStrategy syzstr=(syStrategy)omAlloc0(sizeof(ssyStrategy));
if ((idIs0(arg)) || (id_RankFreeModule(arg,currRing)>0))
{
syzstr->minres = (resolvente)omAllocBin(sip_sideal_bin);
syzstr->length = 1;
syzstr->minres[0] = idInit(1,arg->rank);
return syzstr;
}
// Creare dp,S ring and change to it
syzstr->syRing = rAssure_dp_C(origR);
rChangeCurrRing(syzstr->syRing);
// set initial ShiftedComps
currcomponents = (int*)omAlloc0((arg->rank+1)*sizeof(int));
currShiftedComponents = (long*)omAlloc0((arg->rank+1)*sizeof(long));
/*--- initializes the data structures---------------*/
#ifdef SHOW_CRIT
crit = 0;
crit1 = 0;
spfl = 0;
cons_pairs = 0;
crit_fails = 0;
#endif
syzstr->length = *length = currRing->N+2;
syzstr->Tl = new intvec(*length+1);
temp = idInit(IDELEMS(arg),arg->rank);
for (i=0;i<IDELEMS(arg);i++)
{
if (origR != syzstr->syRing)
temp->m[i] = prCopyR( arg->m[i], origR, syzstr->syRing);
else
temp->m[i] = pCopy( arg->m[i]);
if (temp->m[i]!=NULL)
{
j = pTotaldegree(temp->m[i]);
if (j<actdeg) actdeg = j;
}
}
idTest(temp);
idSkipZeroes(temp);
syzstr->resPairs = syInitRes(temp,length,syzstr->Tl,syzstr->cw);
omFreeSize((ADDRESS)currcomponents,(arg->rank+1)*sizeof(int));
omFreeSize((ADDRESS)currShiftedComponents,(arg->rank+1)*sizeof(int));
syzstr->res = (resolvente)omAlloc0((*length+1)*sizeof(ideal));
syzstr->orderedRes = (resolvente)omAlloc0((*length+1)*sizeof(ideal));
syzstr->elemLength = (int**)omAlloc0((*length+1)*sizeof(int*));
syzstr->truecomponents = (int**)omAlloc0((*length+1)*sizeof(int*));
syzstr->backcomponents = (int**)omAlloc0((*length+1)*sizeof(int*));
syzstr->ShiftedComponents = (long**)omAlloc0((*length+1)*sizeof(long*));
syzstr->Howmuch = (int**)omAlloc0((*length+1)*sizeof(int*));
syzstr->Firstelem = (int**)omAlloc0((*length+1)*sizeof(int*));
syzstr->hilb_coeffs = (intvec**)omAlloc0((*length+1)*sizeof(intvec*));
syzstr->sev = (unsigned long **)omAlloc0((*length+1)*sizeof(unsigned long*));
syzstr->bucket = kBucketCreate(currRing);
syzstr->syz_bucket = kBucketCreate(currRing);
nextPairs = syChosePairs(syzstr,&index,&howmuch,&actdeg);
/*--- computes the resolution ----------------------*/
while (nextPairs!=NULL)
{
#ifdef SHOW_PROT
Print("compute %d Paare im Module %d im Grad %d \n",howmuch,index,actdeg+index);
#endif
if (TEST_OPT_PROT) Print("%d",actdeg);
if (TEST_OPT_PROT) Print("(m%d)",index);
if (index==0)
i = syInitSyzMod(syzstr,index,id_RankFreeModule(arg, origR)+1);
else
i = syInitSyzMod(syzstr,index);
j = syInitSyzMod(syzstr,index+1);
if (index>0)
{
syRedNextPairs_Hilb(nextPairs,syzstr,howmuch,index,actdeg,&toSub,&maxindex,&maxdeg);
syzstr->res[index+1]->rank=idElem(syzstr->res[index]);
sySetNewHilb(syzstr,toSub,index,actdeg);
toSub = 0;
syCompactifyPairSet(syzstr->resPairs[index],(*syzstr->Tl)[index],0);
}
else
syRedGenerOfCurrDeg_Hilb(syzstr,actdeg,&maxindex,&maxdeg);
/*--- creates new pairs -----------------------------*/
#ifdef SHOW_PROT
Print("Bilde neue Paare in Modul %d!\n",index);
#endif
syCreateNewPairs_Hilb(syzstr,index,actdeg);
if (index<(*length)-1)
{
#ifdef SHOW_PROT
Print("Bilde neue Paare in Modul %d!\n",index+1);
#endif
syCreateNewPairs_Hilb(syzstr,index+1,actdeg-1);
}
index++;
nextPairs = syChosePairs(syzstr,&index,&howmuch,&actdeg);
}
syReOrdResult_Hilb(syzstr,maxindex,maxdeg);
#ifdef SHOW_RESULT
PrintS("minimal resolution:\n");
for (int ti=1;ti<=*length;ti++)
{
if (!idIs0(syzstr->orderedRes[ti])) idPrint(syzstr->orderedRes[ti]);
}
PrintS("full resolution:\n");
for (int ti=1;ti<=*length;ti++)
{
if (!idIs0(syzstr->res[ti])) idPrint(syzstr->res[ti]);
}
#endif
#ifdef SHOW_CRIT
Print("Criterion %d times applied\n",crit);
Print("Criterion1 %d times applied\n",crit1);
Print("%d superfluous pairs\n",spfl);
Print("%d pairs considered\n",cons_pairs);
Print("Criterion fails %d times\n",crit_fails);
crit = 0;
crit1 = 0;
spfl = 0;
cons_pairs = 0;
crit_fails = 0;
#endif
if (temp!=NULL) idDelete(&temp);
kBucketDestroy(&(syzstr->bucket));
kBucketDestroy(&(syzstr->syz_bucket));
if (origR != syzstr->syRing)
rChangeCurrRing(origR);
else
currRing = origR;
if (TEST_OPT_PROT) PrintLn();
return syzstr;
}
idDelete
#define idDelete(H)
delete an ideal
Definition ideals.h:29
idPrint
#define idPrint(id)
Definition ideals.h:46
idTest
#define idTest(id)
Definition ideals.h:47
kBucketDestroy
void kBucketDestroy(kBucket_pt *bucket_pt)
Definition kbuckets.cc:216
kBucketCreate
kBucket_pt kBucketCreate(const ring bucket_ring)
Creation/Destruction of buckets.
Definition kbuckets.cc:209
omAllocBin
#define omAllocBin(bin)
Definition omAllocDecl.h:205
TEST_OPT_PROT
#define TEST_OPT_PROT
Definition options.h:105
rChangeCurrRing
void rChangeCurrRing(ring r)
Definition polys.cc:16
pTotaldegree
static long pTotaldegree(poly p)
Definition polys.h:283
prCopyR
poly prCopyR(poly p, ring src_r, ring dest_r)
Definition prCopy.cc:34
rAssure_dp_C
ring rAssure_dp_C(const ring r)
Definition ring.cc:5119
sip_sideal_bin
VAR omBin sip_sideal_bin
Definition simpleideals.cc:27
idSkipZeroes
void idSkipZeroes(ideal ide)
gives an ideal/module the minimal possible size
Definition simpleideals.cc:201
idElem
static int idElem(const ideal F)
number of non-zero polys in F
Definition simpleideals.h:69
syCreateNewPairs_Hilb
static void syCreateNewPairs_Hilb(syStrategy syzstr, int index, int actdeg)
Definition syz2.cc:65
syRedGenerOfCurrDeg_Hilb
static void syRedGenerOfCurrDeg_Hilb(syStrategy syzstr, int deg, int *maxindex, int *maxdeg)
Definition syz2.cc:841
sySetNewHilb
void sySetNewHilb(syStrategy syzstr, int toSub, int index, int actord)
Definition syz2.cc:781
syReOrdResult_Hilb
static void syReOrdResult_Hilb(syStrategy syzstr, int maxindex, int maxdeg)
Definition syz2.cc:902
syRedNextPairs_Hilb
static void syRedNextPairs_Hilb(SSet nextPairs, syStrategy syzstr, int howmuch, int index, int actord, int *toSub, int *maxindex, int *maxdeg)
Definition syz2.cc:491
ssyStrategy::syRing
ring syRing
Definition syz.h:56
syCompactifyPairSet
void syCompactifyPairSet(SSet sPairs, int sPlength, int first)
Definition syz1.cc:104
syInitRes
SRes syInitRes(ideal arg, int *length, intvec *Tl, intvec *cw=NULL)
Definition syz1.cc:293
currShiftedComponents
EXTERN_VAR long * currShiftedComponents
Definition syz.h:118
ssyStrategy::syz_bucket
kBucket_pt syz_bucket
Definition syz.h:55
currcomponents
EXTERN_VAR int * currcomponents
Definition syz.h:117
ssyStrategy::cw
intvec * cw
Definition syz.h:52
ssyStrategy::bucket
kBucket_pt bucket
Definition syz.h:54
syChosePairs
SSet syChosePairs(syStrategy syzstr, int *index, int *howmuch, int *actdeg)
Definition syz1.cc:1288
syInitSyzMod
int syInitSyzMod(syStrategy syzstr, int index, int init=17)
Definition syz1.cc:1459

## syInitializePair()

void syInitializePair | ( | SObject * | so | ) |

Definition at line 63 of file syz1.cc.

{
(*so).p = NULL;
(*so).lcm = NULL;
(*so).syz = NULL;
(*so).p1 = NULL;
(*so).p2 = NULL;
(*so).ind1 = 0;
(*so).ind2 = 0;
(*so).syzind = -1;
(*so).order = 0;
(*so).isNotMinimal = NULL;
(*so).length = -1;
(*so).reference = -1;
}

## syInitRes()

SRes syInitRes | ( | ideal | arg,
|  | int * | length,
|  | intvec * | Tl,
|  | intvec * | cw = NULL )

Definition at line 293 of file syz1.cc.

{
if (idIs0(arg)) return NULL;
SRes resPairs = (SRes)omAlloc0(*length*sizeof(SSet));
resPairs[0] = (SSet)omAlloc0(IDELEMS(arg)*sizeof(SObject));
intvec * iv=NULL;
int i,j;
if (id_RankFreeModule(arg,currRing)==0)
{
iv = idSort(arg);
for (i=0;i<IDELEMS(arg);i++)
{
(resPairs[0])[i].syz = /*pCopy*/(arg->m[(*iv)[i]-1]);
arg->m[(*iv)[i]-1] = NULL;
(resPairs[0])[i].order = pTotaldegree((resPairs[0])[i].syz);
}
}
else
{
iv = new intvec(IDELEMS(arg),1,-1);
for (i=0;i<IDELEMS(arg);i++)
{
(*iv)[i] = pTotaldegree(arg->m[i])+(*cw)[pGetComp(arg->m[i])-1];
}
for (i=0;i<IDELEMS(arg);i++)
{
j = syChMin(iv);
if (j<0) break;
(resPairs[0])[i].syz = arg->m[j];
arg->m[j] = NULL;
(resPairs[0])[i].order = (*iv)[j];
(*iv)[j] = -1;
}
}
if (iv!=NULL) delete iv;
(*Tl)[0] = IDELEMS(arg);
return resPairs;
}
idSort
static intvec * idSort(ideal id, BOOLEAN nolex=TRUE)
Definition ideals.h:188
syChMin
static int syChMin(intvec *iv)
Definition syz1.cc:270

## syInitSyzMod()

int syInitSyzMod | ( | syStrategy | syzstr,
|  | int | index,
|  | int | init = 17 )

Definition at line 1459 of file syz1.cc.

{
int result;
if (syzstr->res[index]==NULL)
{
syzstr->res[index] = idInit(init-1,1);
syzstr->truecomponents[index] = (int*)omAlloc0(init*sizeof(int));
syzstr->ShiftedComponents[index] = (long*)omAlloc0(init*sizeof(long));
if (index==0)
{
for (int i=0;i<init;i++)
{
syzstr->truecomponents[0][i] = i;
syzstr->ShiftedComponents[0][i] = (i)*SYZ_SHIFT_BASE;
}
}
syzstr->backcomponents[index] = (int*)omAlloc0(init*sizeof(int));
syzstr->Howmuch[index] = (int*)omAlloc0(init*sizeof(int));
syzstr->Firstelem[index] = (int*)omAlloc0(init*sizeof(int));
syzstr->elemLength[index] = (int*)omAlloc0(init*sizeof(int));
syzstr->orderedRes[index] = idInit(init-1,1);
syzstr->sev[index] = (unsigned long*) omAlloc0(init*sizeof(unsigned long));
result = 0;
}
else
{
result = IDELEMS(syzstr->res[index]);
while ((result>0) && (syzstr->res[index]->m[result-1]==NULL)) result--;
}
return result;
}
LinTree::init
void init()
Definition lintree.cc:864
SYZ_SHIFT_BASE
#define SYZ_SHIFT_BASE
Definition syz.h:18

## syKillComputation()

void syKillComputation | ( | syStrategy | syzstr,
|  | ring | r = currRing )

Definition at line 1495 of file syz1.cc.

{
if (syzstr->references>0)
{
(syzstr->references)--;
}
else
{
int i,j;
if (syzstr->minres!=NULL)
{
for (i=0;i<syzstr->length;i++)
{
if (syzstr->minres[i]!=NULL)
{
id_Delete(&(syzstr->minres[i]),r);
}
}
omFreeSize((ADDRESS)syzstr->minres,(syzstr->length+1)*sizeof(ideal));
}
if (syzstr->fullres!=NULL)
{
for (i=0;i<syzstr->length;i++)
{
if (syzstr->fullres[i]!=NULL)
{
id_Delete(&(syzstr->fullres[i]),r);
}
}
omFreeSize((ADDRESS)syzstr->fullres,(syzstr->length+1)*sizeof(ideal));
}
if (syzstr->weights!=NULL)
{
for (i=0;i<syzstr->length;i++)
{
if (syzstr->weights[i]!=NULL)
{
delete syzstr->weights[i];
}
}
omFreeSize((ADDRESS)syzstr->weights,syzstr->length*sizeof(intvec*));
}
ring sr=syzstr->syRing;
if (sr==NULL) sr=r;
if (syzstr->resPairs!=NULL)
{
for (i=0;i<syzstr->length;i++)
{
for (j=0;j<(*syzstr->Tl)[i];j++)
{
if ((syzstr->resPairs[i])[j].lcm!=NULL)
p_Delete(&((syzstr->resPairs[i])[j].lcm),sr);
if ((i>0) && ((syzstr->resPairs[i])[j].syz!=NULL))
p_Delete(&((syzstr->resPairs[i])[j].syz),sr);
}
if (syzstr->orderedRes[i]!=NULL)
{
for (j=0;j<IDELEMS(syzstr->orderedRes[i]);j++)
{
syzstr->orderedRes[i]->m[j] = NULL;
}
id_Delete(&(syzstr->orderedRes[i]),sr);
}
if (syzstr->truecomponents[i]!=NULL)
{
omFreeSize((ADDRESS)syzstr->truecomponents[i],(IDELEMS(syzstr->res[i])+1)*sizeof(int));
syzstr->truecomponents[i]=NULL;
omFreeSize((ADDRESS)syzstr->ShiftedComponents[i],(IDELEMS(syzstr->res[i])+1)*sizeof(long));
syzstr->ShiftedComponents[i]=NULL;
}
if (syzstr->backcomponents[i]!=NULL)
{
omFreeSize((ADDRESS)syzstr->backcomponents[i],(IDELEMS(syzstr->res[i])+1)*sizeof(int));
syzstr->backcomponents[i]=NULL;
}
if (syzstr->Howmuch[i]!=NULL)
{
omFreeSize((ADDRESS)syzstr->Howmuch[i],(IDELEMS(syzstr->res[i])+1)*sizeof(int));
syzstr->Howmuch[i]=NULL;
}
if (syzstr->Firstelem[i]!=NULL)
{
omFreeSize((ADDRESS)syzstr->Firstelem[i],(IDELEMS(syzstr->res[i])+1)*sizeof(int));
syzstr->Firstelem[i]=NULL;
}
if (syzstr->elemLength[i]!=NULL)
{
omFreeSize((ADDRESS)syzstr->elemLength[i],(IDELEMS(syzstr->res[i])+1)*sizeof(int));
syzstr->elemLength[i]=NULL;
}
if (syzstr->res[i]!=NULL)
{
for (j=0;j<IDELEMS(syzstr->res[i]);j++)
{
if (syzstr->res[i]->m[j]!=NULL)
p_Delete(&(syzstr->res[i]->m[j]),sr);
}
}
if ((syzstr->hilb_coeffs!=NULL)
&& (syzstr->hilb_coeffs[i]!=NULL))
delete syzstr->hilb_coeffs[i];
if (syzstr->sev[i] != NULL)
omFreeSize((ADDRESS)syzstr->sev[i], (IDELEMS(syzstr->res[i])+1)*sizeof(unsigned long));
id_Delete(&(syzstr->res[i]),sr);
if (syzstr->resPairs[i] != NULL) // OB: ????
omFreeSize((ADDRESS)syzstr->resPairs[i],(*syzstr->Tl)[i]*sizeof(SObject));
}
omFreeSize((ADDRESS)syzstr->resPairs,syzstr->length*sizeof(SObject*));
omFreeSize((ADDRESS)syzstr->res,(syzstr->length+1)*sizeof(ideal));
omFreeSize((ADDRESS)syzstr->orderedRes,(syzstr->length+1)*sizeof(ideal));
omFreeSize((ADDRESS)syzstr->elemLength,(syzstr->length+1)*sizeof(int*));
omFreeSize((ADDRESS)syzstr->truecomponents,(syzstr->length+1)*sizeof(int*));
omFreeSize((ADDRESS)syzstr->ShiftedComponents,(syzstr->length+1)*sizeof(long*));
if (syzstr->sev != NULL)
omFreeSize(((ADDRESS)syzstr->sev), (syzstr->length+1)*sizeof(unsigned long*));
omFreeSize((ADDRESS)syzstr->backcomponents,(syzstr->length+1)*sizeof(int*));
omFreeSize((ADDRESS)syzstr->Howmuch,(syzstr->length+1)*sizeof(int*));
omFreeSize((ADDRESS)syzstr->Firstelem,(syzstr->length+1)*sizeof(int*));
if (syzstr->hilb_coeffs!=NULL)
omFreeSize((ADDRESS)syzstr->hilb_coeffs,(syzstr->length+1)*sizeof(intvec*));
}
if (syzstr->cw!=NULL)
delete syzstr->cw;
if (syzstr->betti!=NULL)
delete syzstr->betti;
if (syzstr->resolution!=NULL)
delete syzstr->resolution;
if (syzstr->Tl!=NULL)
delete syzstr->Tl;
if ((syzstr->syRing != NULL) && (syzstr->syRing != r))
{
if(syzstr->syRing->typ[1].ord_typ == ro_syzcomp)
rChangeSComps(NULL, NULL, 0, syzstr->syRing);
rDelete(syzstr->syRing);
}
omFreeSize((ADDRESS)syzstr, sizeof(ssyStrategy));
}
}
p_Delete
static void p_Delete(poly *p, const ring r)
Definition p_polys.h:903
rChangeSComps
void rChangeSComps(int *currComponents, long *currShiftedComponents, int length, ring r)
Definition ring.cc:4497
rDelete
void rDelete(ring r)
unconditionally deletes fields in r
Definition ring.cc:454
ro_syzcomp
@ ro_syzcomp
Definition ring.h:60
ssyStrategy::references
short references
Definition syz.h:63
ssyStrategy::resolution
intvec * resolution
Definition syz.h:51

## syKillEmptyEntres()

void syKillEmptyEntres | ( | resolvente | res,
|  | int | length )

Definition at line 2199 of file syz1.cc.

{
int i,j,jj,k,rj;
intvec * changes;
poly p;
ideal ri;
for (i=0;i<length;i++)
{
ri = res[i];
if (ri!=NULL)
{
rj = IDELEMS(ri);
changes = new intvec(rj+1,1,-1);
while ((rj>0) && (ri->m[rj-1]==NULL)) rj--;
j = k = 0;
while (j+k<rj)
{
if (ri->m[j+k]!=NULL)
{
ri->m[j] = ri->m[j+k];
(*changes)[j+k+1] = j+1;
j++;
}
else
{
k++;
}
}
for (jj=j;jj<rj;jj++)
ri->m[jj] = NULL;
if (res[i+1]!=NULL)
{
ri = res[i+1];
for (j=IDELEMS(ri)-1;j>=0;j--)
{
p = ri->m[j];
while (p!=NULL)
{
pSetComp(p,(*changes)[pGetComp(p)]);
pSetm(p);
pIter(p);
}
}
}
delete changes;
}
}
}
pIter
#define pIter(p)
Definition monomials.h:37
pSetm
#define pSetm(p)
Definition polys.h:272
pSetComp
#define pSetComp(p, v)
Definition polys.h:39

## syKosz()

syStrategy syKosz | ( | ideal | arg,
|  | int * | length )

Definition at line 1766 of file syz3.cc.

{
int i,j,jj,k=0,index=0,rk_arg/*,next_syz=0*/;
int crit_comp,t_comp,next_deg,old_tl;
ideal temp=NULL,old_ideal,old_repr;
ring origR = currRing;
poly next_gen;
BOOLEAN isRegular;
discard_pairs = 0;
short_pairs = 0;
if (idIs0(arg)) return NULL;
rk_arg = id_RankFreeModule(arg,currRing);
syStrategy syzstr=(syStrategy)omAlloc0(sizeof(ssyStrategy));
/*--- changes to a Cdp-ring ----------------------------*/
syzstr->syRing = rAssure_C_dp(origR); rChangeCurrRing(syzstr->syRing);
/*--- initializes the data structures---------------*/
syzstr->length = *length = (syzstr->syRing->N)+2;
syzstr->regularity = -1;
if (origR!=syzstr->syRing)
temp = idrCopyR(arg, origR, syzstr->syRing);
else
temp = idCopy(arg);
if (rk_arg==0)
{
id_Shift(temp,1,currRing);
}
idSkipZeroes(temp);
#ifdef WITH_SORT
if (temp->m[0]!=NULL)
{
int md;
int maxdeg=p_FDeg(temp->m[IDELEMS(temp)-1],currRing);
ideal temp1=idInit(IDELEMS(temp),temp->rank);
for (j=IDELEMS(temp)-2;j>=0;j--)
{
jj = p_FDeg(temp->m[j],currRing);
if (jj>maxdeg) maxdeg = jj;
}
while (!idIs0(temp))
{
md = maxdeg;
for (j=IDELEMS(temp)-1;j>=0;j--)
{
if (temp->m[j]!=NULL)
{
jj = p_FDeg(temp->m[j],currRing);
if (jj<md) md = jj;
}
}
for (j=0;j<IDELEMS(temp);j++)
{
if ((temp->m[j]!=NULL) && (p_FDeg(temp->m[j],currRing)==md))
{
temp1->m[k] = temp->m[j];
temp->m[j] = NULL;
k++;
}
}
}
idDelete(&temp);
temp = temp1;
temp1 = NULL;
}
#endif
#ifdef USE_REGULARITY
int last_generator=IDELEMS(temp)-1;
while ((last_generator>=0) && (temp->m[last_generator]==NULL))
last_generator--;
#endif
syzstr->res = (resolvente)omAlloc0((*length+1)*sizeof(ideal));
syzstr->orderedRes = (resolvente)omAlloc0((*length+1)*sizeof(ideal));
resolvente totake=(resolvente)omAlloc0((*length+1)*sizeof(ideal));
syzstr->Tl = new intvec(*length+1);
syzstr->bucket = kBucketCreate(currRing);
syzstr->syz_bucket = kBucketCreate(currRing);
ideal new_generators=idInit(1,si_max(rk_arg,1));
ideal temp_gens,old_std;
syzstr->res[0] = idInit(1,1);
if (rk_arg>1) syzstr->res[0]->rank = rk_arg;
syzstr->orderedRes[0] = idInit(1,1);
/*--- computes the resolution ----------------------*/
i = 0;
while (i<IDELEMS(temp))
{
if (temp->m[i]!=NULL)
{
new_generators->m[0] = kNF(syzstr->res[0],currRing->qideal,temp->m[i]);
if (!nIsOne(pGetCoeff(new_generators->m[0])))
pNorm(new_generators->m[0]);
next_deg = p_FDeg(new_generators->m[0],currRing);
next_gen = pCopy(new_generators->m[0]);
}
if (!idIs0(new_generators))
{
index = 0;
while (index<=*length)
{
if (index==0)
{
old_ideal = idCopy(syzstr->res[0]);
old_repr = idCopy(syzstr->orderedRes[0]);
old_tl = (*syzstr->Tl)[0];
old_std = id_Head(syzstr->res[0],currRing);
}
t_comp = (*syzstr->Tl)[index];
if (index==0) crit_comp = t_comp;
temp_gens = syAppendSyz(new_generators,syzstr, index,crit_comp,totake);
crit_comp = t_comp;
if (index==0)
{
isRegular = syIsRegular(old_std,syzstr->res[0],next_deg);
#ifndef ONLY_STD
if (isRegular)
syCreateRegularExtension(syzstr,old_ideal,old_repr,old_tl,next_gen,
totake);
#ifdef USE_REGULARITY
if ((index==0) && (!isRegular) && (i==last_generator))
{
/*----------- we are computing the regularity -----------------------*/
ideal initial=id_Head(syzstr->res[0],currRing);
int len=0,reg=0;
intvec *w=NULL;
ring dp_C_ring = rAssure_dp_C(currRing); rChangeCurrRing(dp_C_ring);
initial = idrMoveR_NoSort(initial, syzstr->syRing, dp_C_ring);
resolvente res = sySchreyerResolvente(initial,-1,&len,TRUE, TRUE);
intvec * dummy = syBetti(res,len,&reg, w);
syzstr->regularity = reg+2;
delete dummy;
delete w;
for (j=0;j<len;j++)
{
if (res[j]!=NULL) idDelete(&(res[j]));
}
omFreeSize((ADDRESS)res,len*sizeof(ideal));
idDelete(&initial);
rChangeCurrRing(syzstr->syRing);
rDelete(dp_C_ring);
}
#endif
#endif
idDelete(&old_ideal);
idDelete(&old_repr);
idDelete(&old_std);
if (TEST_OPT_PROT)
{
if (isRegular)
PrintS("\n regular\n");
else
PrintS("\n not regular\n");
}
if (next_gen!=NULL)
pDelete(&next_gen);
if (isRegular)
{
idDelete(&temp_gens);
break;
}
}
idDelete(&new_generators);
new_generators = temp_gens;
#ifdef ONLY_STD
break;
#endif
if (idIs0(new_generators)) break;
index++;
}
if (!idIs0(new_generators))
{
for (j=0;j<IDELEMS(new_generators);j++)
{
if (new_generators->m[j]!=NULL)
{
pDelete(&new_generators->m[j]);
new_generators->m[j] = NULL;
}
}
}
}
i++;
}
if (idIs0(new_generators) && new_generators!=NULL) idDelete(&new_generators);
if (temp!=NULL) idDelete(&temp);
kBucketDestroy(&(syzstr->bucket));
kBucketDestroy(&(syzstr->syz_bucket));
index = 0;
syzstr->fullres = syzstr->res;
syzstr->res = NULL;
index = 0;
while ((index<=*length) && (syzstr->fullres[index]!=NULL))
{
#ifdef SHOW_RESULT
Print("The %d-th syzygy-module is now:\n",index);
ideal ttt=id_Head(syzstr->fullres[index],currRing);
idShow(ttt);
idDelete(&ttt);
//if (index>0)
//{
//Print("The related module is: \n");
//idPrint(totake[index-1]);
//}
//Print("The %d-th module of the minimal resolution is:\n",index);
if (!idIs0(totake[index]))
idShow(totake[index]);
//Print("with standard basis:\n");
//idPrint(syzstr->fullres[index]);
//if ((index<*length) && (totake[index+1]!=NULL))
//{
//Print("The %d-th syzygy-module is now:\n",index+1);
//idPrint(totake[index+1]);
//matrix m1=idModule2Matrix(totake[index]);
//matrix m2=idModule2Matrix(totake[index+1]);
//matrix m3=mpMult(m1,m2);
//idPrint((ideal)m3);
//}
#endif
if (!idIs0(totake[index]))
{
for(i=0;i<IDELEMS(totake[index]);i++)
{
if (totake[index]->m[i]!=NULL)
{
j=0;
while ((j<IDELEMS(syzstr->fullres[index])) &&
((syzstr->fullres[index]->m[j]==NULL) ||
(!pLmEqual(syzstr->fullres[index]->m[j],totake[index]->m[i])))) j++;
if (j<IDELEMS(syzstr->fullres[index]))
{
pDelete(&totake[index]->m[i]);
totake[index]->m[i] = syzstr->fullres[index]->m[j];
syzstr->fullres[index]->m[j] = NULL;
}
else
{
PrintS("Da ist was faul!!!\n");
Print("Aber: Regularitaet %d, Grad %ld\n",
syzstr->regularity,p_FDeg(totake[index]->m[i],currRing));
}
}
}
idDelete(&syzstr->fullres[index]);
syzstr->fullres[index] = totake[index];
}
#ifdef SHOW_RESULT
idShow(syzstr->fullres[index]);
#endif
index++;
}
syReorder_Kosz(syzstr);
index = 0;
while ((index<=*length) && (syzstr->orderedRes[index]!=NULL))
{
idDelete(&(syzstr->orderedRes[index]));
index++;
}
if (origR!=syzstr->syRing)
{
rChangeCurrRing(origR);
index = 0;
while ((index<=*length) && (syzstr->fullres[index]!=NULL))
{
syzstr->fullres[index] = idrMoveR(syzstr->fullres[index],syzstr->syRing, origR);
index++;
}
}
delete syzstr->Tl;
syzstr->Tl = NULL;
rDelete(syzstr->syRing);
syzstr->syRing = NULL;
omFreeSize((ADDRESS)totake,(*length+1)*sizeof(ideal));
omFreeSize((ADDRESS)syzstr->orderedRes,(*length+1)*sizeof(ideal));
//Print("Pairs to discard: %d\n",discard_pairs);
//Print("Pairs shorter reduced: %d\n",short_pairs);
//discard_pairs = 0;
//short_pairs = 0;
return syzstr;
}
idCopy
ideal idCopy(ideal A)
Definition ideals.h:60
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
kNF
poly kNF(ideal F, ideal Q, poly p, int syzComp, int lazyReduce)
Definition kstd1.cc:3229
nIsOne
#define nIsOne(n)
Definition numbers.h:25
pLmEqual
#define pLmEqual(p1, p2)
Definition polys.h:112
pNorm
void pNorm(poly p)
Definition polys.h:363
idrMoveR
ideal idrMoveR(ideal &id, ring src_r, ring dest_r)
Definition prCopy.cc:248
idrCopyR
ideal idrCopyR(ideal id, ring src_r, ring dest_r)
Definition prCopy.cc:192
idrMoveR_NoSort
ideal idrMoveR_NoSort(ideal &id, ring src_r, ring dest_r)
Definition prCopy.cc:261
rAssure_C_dp
ring rAssure_C_dp(const ring r)
Definition ring.cc:5129
idShow
void idShow(const ideal id, const ring lmRing, const ring tailRing, const int debugPrint)
Definition simpleideals.cc:57
id_Shift
void id_Shift(ideal M, int s, const ring r)
Definition simpleideals.cc:2196
syAppendSyz
static ideal syAppendSyz(ideal new_generators, syStrategy syzstr, int index, int crit_comp, resolvente totake)
Definition syz3.cc:1690
syCreateRegularExtension
static void syCreateRegularExtension(syStrategy syzstr, ideal old_ideal, ideal old_repr, int old_tl, poly next_generator, resolvente totake)
Definition syz3.cc:111
syReorder_Kosz
void syReorder_Kosz(syStrategy syzstr)
Definition syz3.cc:261
short_pairs
VAR int short_pairs
Definition syz3.cc:49
discard_pairs
VAR int discard_pairs
Definition syz3.cc:48
syIsRegular
static BOOLEAN syIsRegular(ideal old_ideal, ideal new_ideal, int deg)
Definition syz3.cc:55
sySchreyerResolvente
resolvente sySchreyerResolvente(ideal arg, int maxlength, int *length, BOOLEAN isMonomial=FALSE, BOOLEAN notReplace=FALSE)
Definition syz0.cc:855
ssyStrategy::regularity
int regularity
Definition syz.h:61

## syLaScala()

syStrategy syLaScala | ( | ideal | arg,
|  | int & | maxlength,
|  | intvec * | weights = NULL )

Definition at line 2558 of file syz1.cc.

{
int i,j,actdeg=32000,index=0;
int howmuch;
ideal temp;
SSet nextPairs;
syStrategy syzstr=(syStrategy)omAlloc0(sizeof(ssyStrategy));
ring origR = currRing;
if(weights!= NULL)
syzstr->cw = new intvec(weights);
else
syzstr->cw = NULL;
if ((idIs0(arg)) ||
((id_RankFreeModule(arg,currRing)>0) && (!idTestHomModule(arg, NULL, syzstr->cw))))
{
syzstr->minres = (resolvente)omAlloc0Bin(char_ptr_bin);
syzstr->length = 1;
syzstr->minres[0] = idInit(1,arg->rank);
return syzstr;
}
//crit = 0;
//euler = -1;
if( maxlength > 0 )
syzstr->length = maxlength; // = (currRing->N)+2;
else
syzstr->length = maxlength = (currRing->N)+2;
// Creare dp,S ring and change to it
syzstr->syRing = rAssure_dp_S(origR);
assume(syzstr->syRing != origR);
assume(syzstr->syRing->typ[1].ord_typ == ro_syzcomp);
rChangeCurrRing(syzstr->syRing);
// set initial ShiftedComps
currcomponents = (int*)omAlloc0((arg->rank+1)*sizeof(int));
currShiftedComponents = (long*)omAlloc0((arg->rank+1)*sizeof(long));
for (i=0;i<=arg->rank;i++)
{
currShiftedComponents[i] = (i)*SYZ_SHIFT_BASE;
currcomponents[i] = i;
}
rChangeSComps(currcomponents, currShiftedComponents, arg->rank, currRing);
/*--- initializes the data structures---------------*/
syzstr->Tl = new intvec(maxlength);
temp = idInit(IDELEMS(arg),arg->rank);
for (i=0;i<IDELEMS(arg);i++)
{
temp->m[i] = prCopyR( arg->m[i], origR, currRing);
if (temp->m[i]!=NULL)
{
j = pTotaldegree(temp->m[i]);
if (j<actdeg) actdeg = j;
}
}
idTest(temp);
idSkipZeroes(temp);
idTest(temp);
syzstr->resPairs = syInitRes(temp,&maxlength,syzstr->Tl,syzstr->cw);
omFreeSize((ADDRESS)currcomponents,(arg->rank+1)*sizeof(int));
omFreeSize((ADDRESS)currShiftedComponents,(arg->rank+1)*sizeof(long));
syzstr->res = (resolvente)omAlloc0((maxlength+1)*sizeof(ideal));
syzstr->orderedRes = (resolvente)omAlloc0((maxlength+1)*sizeof(ideal));
syzstr->elemLength = (int**)omAlloc0((maxlength+1)*sizeof(int*));
syzstr->truecomponents = (int**)omAlloc0((maxlength+1)*sizeof(int*));
syzstr->ShiftedComponents = (long**)omAlloc0((maxlength+1)*sizeof(long*));
syzstr->backcomponents = (int**)omAlloc0((maxlength+1)*sizeof(int*));
syzstr->Howmuch = (int**)omAlloc0((maxlength+1)*sizeof(int*));
syzstr->Firstelem = (int**)omAlloc0((maxlength+1)*sizeof(int*));
syzstr->sev = (unsigned long **) omAlloc0((maxlength+1)*sizeof(unsigned long *));
assume( syzstr->length == maxlength );
syzstr->bucket = kBucketCreate(currRing);
int len0=id_RankFreeModule(temp,currRing)+1;
nextPairs = syChosePairs(syzstr,&index,&howmuch,&actdeg);
//if (TEST_OPT_PROT) Print("(%d,%d)",howmuch,index);
/*--- computes the resolution ----------------------*/
while (nextPairs!=NULL)
{
if (TEST_OPT_PROT) Print("%d",actdeg);
if (TEST_OPT_PROT) Print("(m%d)",index);
if (index==0)
i = syInitSyzMod(syzstr,index,len0);
else
i = syInitSyzMod(syzstr,index);
currcomponents = syzstr->truecomponents[si_max(index-1,0)];
currShiftedComponents = syzstr->ShiftedComponents[si_max(index-1,0)];
rChangeSComps(currcomponents, currShiftedComponents,
IDELEMS(syzstr->res[si_max(index-1,0)]), currRing);
j = syInitSyzMod(syzstr,index+1);
if (index>0)
{
syRedNextPairs(nextPairs,syzstr,howmuch,index);
syCompactifyPairSet(syzstr->resPairs[index],(*syzstr->Tl)[index],0);
}
else
syRedGenerOfCurrDeg(syzstr,actdeg,index+1);
/*--- creates new pairs -----------------------------*/
syCreateNewPairs(syzstr,index,i);
if (index<(maxlength-1))
{
syCreateNewPairs(syzstr,index+1,j);
}
index++;
nextPairs = syChosePairs(syzstr,&index,&howmuch,&actdeg);
//if (TEST_OPT_PROT) Print("(%d,%d)",howmuch,index);
}
if (temp!=NULL) idDelete(&temp);
kBucketDestroy(&(syzstr->bucket));
if (origR != syzstr->syRing)
rChangeCurrRing(origR);
if (TEST_OPT_PROT) PrintLn();
return syzstr;
}
assume
#define assume(x)
Definition mod2.h:389
omAlloc0Bin
#define omAlloc0Bin(bin)
Definition omAllocDecl.h:206
rAssure_dp_S
ring rAssure_dp_S(const ring r)
Definition ring.cc:5114
char_ptr_bin
EXTERN_VAR omBin char_ptr_bin
Definition structs.h:73
syInitRes
SRes syInitRes(ideal arg, int *length, intvec *Tl, intvec *cw)
Definition syz1.cc:293
syCreateNewPairs
static void syCreateNewPairs(syStrategy syzstr, int index, int newEl)
Definition syz1.cc:1069
syCompactifyPairSet
void syCompactifyPairSet(SSet sPairs, int sPlength, int first)
Definition syz1.cc:104
syRedGenerOfCurrDeg
static void syRedGenerOfCurrDeg(syStrategy syzstr, int deg, int index)
Definition syz1.cc:915
syInitSyzMod
int syInitSyzMod(syStrategy syzstr, int index, int init)
Definition syz1.cc:1459
syRedNextPairs
static void syRedNextPairs(SSet nextPairs, syStrategy syzstr, int howmuch, int index)
Definition syz1.cc:768
syChosePairs
SSet syChosePairs(syStrategy syzstr, int *index, int *howmuch, int *actdeg)
Definition syz1.cc:1288

## syLaScala1()

resolvente syLaScala1 | ( | ideal | arg,
|  | int * | length )

## syLaScala3()

syStrategy syLaScala3 | ( | ideal | arg,
|  | int * | length )

Definition at line 2432 of file syz1.cc.

{
int i,j,actdeg=32000,index=0;
int howmuch;
ideal temp;
SSet nextPairs;
syStrategy syzstr=(syStrategy)omAlloc0(sizeof(ssyStrategy));
ring origR = currRing;
if ((idIs0(arg)) ||
((id_RankFreeModule(arg,currRing)>0) && (!idHomModule(arg,NULL,&(syzstr->cw)))))
{
syzstr->minres = (resolvente)omAlloc0Bin(char_ptr_bin);
syzstr->length = 1;
syzstr->minres[0] = idInit(1,arg->rank);
return syzstr;
}
//crit = 0;
//euler = -1;
syzstr->length = *length = (currRing->N)+2;
// Creare dp,S ring and change to it
syzstr->syRing = rAssure_dp_S(origR);
assume(syzstr->syRing != origR); // why?
rChangeCurrRing(syzstr->syRing);
// set initial ShiftedComps
currcomponents = (int*)omAlloc0((arg->rank+1)*sizeof(int));
currShiftedComponents = (long*)omAlloc0((arg->rank+1)*sizeof(long));
for (i=0;i<=arg->rank;i++)
{
currShiftedComponents[i] = (i)*SYZ_SHIFT_BASE;
currcomponents[i] = i;
}
rChangeSComps(currcomponents, currShiftedComponents, arg->rank, syzstr->syRing);
/*--- initializes the data structures---------------*/
syzstr->Tl = new intvec(*length);
temp = idInit(IDELEMS(arg),arg->rank);
for (i=0;i<IDELEMS(arg);i++)
{
temp->m[i] = prCopyR( arg->m[i], origR, syzstr->syRing);
if (temp->m[i]!=NULL)
{
j = pTotaldegree(temp->m[i]);
if (j<actdeg) actdeg = j;
}
}
idTest(temp);
idSkipZeroes(temp);
idTest(temp);
syzstr->resPairs = syInitRes(temp,length,syzstr->Tl,syzstr->cw);
omFreeSize((ADDRESS)currcomponents,(arg->rank+1)*sizeof(int));
omFreeSize((ADDRESS)currShiftedComponents,(arg->rank+1)*sizeof(long));
syzstr->res = (resolvente)omAlloc0((*length+1)*sizeof(ideal));
syzstr->orderedRes = (resolvente)omAlloc0((*length+1)*sizeof(ideal));
syzstr->elemLength = (int**)omAlloc0((*length+1)*sizeof(int*));
syzstr->truecomponents = (int**)omAlloc0((*length+1)*sizeof(int*));
syzstr->ShiftedComponents = (long**)omAlloc0((*length+1)*sizeof(long*));
syzstr->backcomponents = (int**)omAlloc0((*length+1)*sizeof(int*));
syzstr->Howmuch = (int**)omAlloc0((*length+1)*sizeof(int*));
syzstr->Firstelem = (int**)omAlloc0((*length+1)*sizeof(int*));
syzstr->sev = (unsigned long **) omAlloc0((*length+1)*sizeof(unsigned long *));
syzstr->bucket = kBucketCreate(currRing);
int len0=id_RankFreeModule(temp,currRing)+1;
nextPairs = syChosePairs(syzstr,&index,&howmuch,&actdeg);
//if (TEST_OPT_PROT) Print("(%d,%d)",howmuch,index);
/*--- computes the resolution ----------------------*/
while (nextPairs!=NULL)
{
if (TEST_OPT_PROT) Print("%d",actdeg);
if (TEST_OPT_PROT) Print("(m%d)",index);
if (index==0)
i = syInitSyzMod(syzstr,index,len0);
else
i = syInitSyzMod(syzstr,index);
currcomponents = syzstr->truecomponents[si_max(index-1,0)];
currShiftedComponents = syzstr->ShiftedComponents[si_max(index-1,0)];
rChangeSComps(currcomponents, currShiftedComponents,
IDELEMS(syzstr->res[si_max(index-1,0)]), currRing);
j = syInitSyzMod(syzstr,index+1);
if (index>0)
{
syRedNextPairs(nextPairs,syzstr,howmuch,index);
syCompactifyPairSet(syzstr->resPairs[index],(*syzstr->Tl)[index],0);
}
else
syRedGenerOfCurrDeg(syzstr,actdeg,index+1);
/*--- creates new pairs -----------------------------*/
syCreateNewPairs(syzstr,index,i);
if (index<(*length)-1)
{
syCreateNewPairs(syzstr,index+1,j);
}
index++;
nextPairs = syChosePairs(syzstr,&index,&howmuch,&actdeg);
//if (TEST_OPT_PROT) Print("(%d,%d)",howmuch,index);
}
if (temp!=NULL) idDelete(&temp);
kBucketDestroy(&(syzstr->bucket));
if (origR != syzstr->syRing)
rChangeCurrRing(origR);
if (TEST_OPT_PROT) PrintLn();
assume(syzstr->minres==NULL); assume(syzstr->fullres ==NULL);
assume(syzstr->resPairs!=NULL); assume(syzstr->hilb_coeffs==NULL);
assume(syzstr->res!=NULL);
if(! TEST_OPT_NO_SYZ_MINIM )
syzstr->minres = syReadOutMinimalRes(syzstr);
else
syzstr->fullres = syReorder(syzstr->res, syzstr->length, syzstr); // buggy? (betti...?)
return syzstr;
}
TEST_OPT_NO_SYZ_MINIM
#define TEST_OPT_NO_SYZ_MINIM
Definition options.h:126
syReadOutMinimalRes
static resolvente syReadOutMinimalRes(syStrategy syzstr, BOOLEAN computeStd=FALSE)
Definition syz1.cc:2312

## syMinBase()

ideal syMinBase | ( | ideal | arg | ) |

Definition at line 1021 of file syz.cc.

{
intvec ** weights=NULL;
int leng;
if (idIs0(arg)) return idInit(1,arg->rank);
resolvente res=syResolvente(arg,1,&leng,&weights,TRUE);
ideal result=res[0];
omFreeSize((ADDRESS)res,leng*sizeof(ideal));
if (weights!=NULL)
{
if (*weights!=NULL)
{
delete (*weights);
*weights=NULL;
}
if ((leng>=1) && (*(weights+1)!=NULL))
{
delete *(weights+1);
*(weights+1)=NULL;
}
}
idSkipZeroes(result);
return result;
}
syResolvente
resolvente syResolvente(ideal arg, int maxlength, int *length, intvec ***weights, BOOLEAN minim)
Definition syz.cc:403

## syMinimize()

syStrategy syMinimize | ( | syStrategy | syzstr | ) |

Definition at line 2393 of file syz1.cc.

{
if (syzstr->minres==NULL)
{
if (syzstr->resolution!=NULL)
{
// need to clear syzstr->resolution, as we are
// now displaying the minres instead of fullres
delete syzstr->resolution;
syzstr->resolution=NULL;
}
if (syzstr->resPairs!=NULL)
{
if (syzstr->hilb_coeffs==NULL)
{
// La Scala Resolution
syzstr->minres = syReadOutMinimalRes(syzstr);
}
else
{ // HRES
syzstr->minres = syReorder(syzstr->orderedRes,syzstr->length,syzstr);
}
}
else if (syzstr->fullres!=NULL)
{
syMinimizeResolvente(syzstr->fullres,syzstr->length,1);
syzstr->minres = syzstr->fullres;
syzstr->fullres = NULL;
}
}
(syzstr->references)++;
return syzstr;
}
syMinimizeResolvente
void syMinimizeResolvente(resolvente res, int length, int first)
Definition syz.cc:367

## syMinimize_with_map()

void syMinimize_with_map | ( | syStrategy | res,
|  | ideal & | trans )

Definition at line 1189 of file syz.cc.

{
ideal *r=res->minres;
if (r==NULL) r=res->fullres;
ideal org=idCopy(r[0]);
res=syMinimize(res);
r=res->minres;
if (r==NULL) r=res->fullres;
trans=idLift(org,r[0],NULL,TRUE,FALSE,FALSE,NULL);
}
idLift
ideal idLift(ideal mod, ideal submod, ideal *rest, BOOLEAN goodShape, BOOLEAN isSB, BOOLEAN divide, matrix *unit, GbVariant alg)
represents the generators of submod in terms of the generators of mod (Matrix(SM)*U-Matrix(rest)) = M...
Definition ideals.cc:1111
syMinimize
syStrategy syMinimize(syStrategy syzstr)
Definition syz1.cc:2393

## syMinimizeCopy()

syStrategy syMinimizeCopy | ( | syStrategy | org | ) |

Definition at line 1200 of file syz.cc.

{
syStrategy result=(syStrategy)omAlloc0(sizeof(ssyStrategy));
result->length=org->length;
if (org->weights!=NULL)
{
result->weights=(intvec**)omAlloc0(org->length*sizeof(intvec*));
for (int i=org->length-1;i>=0;i--)
{
if (org->weights[i]!=NULL)
{
result->weights[i]=ivCopy(org->weights[i]);
}
}
}
result->fullres = (resolvente)omAlloc0((result->length+1)*sizeof(ideal));
resolvente fr = org->minres;
if (fr==NULL) fr=org->fullres;
for (int i=result->length-1;i>=0;i--)
{
if (fr[i]!=NULL)
result->fullres[i] = idCopy(fr[i]);
}
result->list_length=result->length;
result=syMinimize(result);
return result;
}

## syMinimizeResolvente()

void syMinimizeResolvente | ( | resolvente | res,
|  | int | length,
|  | int | first )

Definition at line 367 of file syz.cc.

{
int syzIndex=first;
intvec *dummy;
if (syzIndex<1) syzIndex=1;
if ((syzIndex==1) && (!rIsPluralRing(currRing)) && (idHomModule(res[0],currRing->qideal,&dummy)))
{
syMinStep1(res,length);
delete dummy;
return;
}
while ((syzIndex<length-1) && (res[syzIndex]!=NULL) && (res[syzIndex+1]!=NULL))
{
syMinStep(res[syzIndex-1],res[syzIndex],FALSE,res[syzIndex+1]);
syzIndex++;
}
if (res[syzIndex]!=NULL)
syMinStep(res[syzIndex-1],res[syzIndex]);
if (!idIs0(res[0]))
idMinEmbedding(res[0],TRUE);
if((length>0) && (res[length]!=NULL) && idIs0(res[length]))
idDelete(&res[length]);
}
idMinEmbedding
ideal idMinEmbedding(ideal arg, BOOLEAN inPlace, intvec **w)
Definition ideals.cc:2853
rIsPluralRing
static BOOLEAN rIsPluralRing(const ring r)
we must always have this test!
Definition ring.h:406
syMinStep1
static void syMinStep1(resolvente res, int length)
Definition syz.cc:296
syMinStep
static void syMinStep(ideal mod, ideal &syz, BOOLEAN final=FALSE, ideal up=NULL, tHomog h=isNotHomog)
Definition syz.cc:82

## syMres_with_map()

syStrategy syMres_with_map | ( | ideal | arg,
|  | int | maxlength,
|  | intvec * | w,
|  | ideal & | trans )

Definition at line 1180 of file syz.cc.

{
syStrategy res=syResolution(arg,maxlength,w,1);
ideal *r=res->minres;
if (r==NULL) r=res->fullres;
trans=idLift(arg,r[0],NULL,TRUE,FALSE,FALSE,NULL);
return res;
}
syResolution
syStrategy syResolution(ideal arg, int maxlength, intvec *w, BOOLEAN minim)
Definition syz.cc:625

## syPrint()

void syPrint | ( | syStrategy | syzstr,
|  | const char * | currRingName )

Definition at line 1935 of file syz1.cc.

{
if ( (syzstr->resPairs==NULL) &&
(syzstr->fullres==NULL) &&
(syzstr->minres==NULL) &&
(syzstr->resolution == NULL) )
{
PrintS("No resolution defined\n");
return;
}
intvec* resolution = syzstr->resolution;
if (resolution==NULL)
{
if (syzstr->resPairs!=NULL)
{
resolution = new intvec(syzstr->length+1);
SRes rP = syzstr->resPairs;
// assume(idRankFreeModule(syzstr->res[1], (syzstr->syRing != NULL ? syzstr->syRing : currRing))==syzstr->res[1]->rank);
(*resolution)[0] = syzstr->res[1]->rank;
int k=0;
while ((k<syzstr->length) && (rP[k]!=NULL))
{
int j = 0;
while ((j<(*syzstr->Tl)[k]) &&
((rP[k][j].lcm!=NULL) || (rP[k][j].syz!=NULL)))
{
if (rP[k][j].isNotMinimal==NULL)
((*resolution)[k+1])++;
j++;
}
k++;
}
}
else
{
resolution = new intvec(syzstr->length+2);
resolvente rr;
if (syzstr->minres!=NULL)
rr = syzstr->minres;
else
rr = syzstr->fullres;
(*resolution)[0]
= si_max(1,(int)id_RankFreeModule(rr[0],
(syzstr->syRing != NULL ? syzstr->syRing : currRing)));
int k=0;
while ((k<syzstr->length) && (rr[k]!=NULL))
{
(*resolution)[k+1] = idElem(rr[k]);
k++;
}
}
}
int sl=strlen(sn);
syPrintEmptySpaces1(sl);
int k = 0;
loop
{
if ((k>=resolution->length()) || ((*resolution)[k]==0))
break;
Print("%d",(*resolution)[k]);
syPrintEmptySpaces1(sl+5);
k++;
}
PrintLn();
k = 0;
loop
{
if ((k>=resolution->length()) || ((*resolution)[k]==0))
break;
PrintS(sn);
if (((k+1)>=resolution->length()) || ((*resolution)[(k+1)]==0))
break;
PrintS(" <-- ");
syPrintEmptySpaces((*resolution)[k]);
k++;
}
PrintS("\n\n");
k = 0;
loop
{
if ((k>=resolution->length()) || ((*resolution)[k]==0))
break;
Print("%d",k);
syPrintEmptySpaces1(sl+5+syLengthInt((*resolution)[k])-
syLengthInt(k));
k++;
}
PrintLn();
if (syzstr->minres==NULL)
{
PrintS("resolution not minimized yet\n");
}
if (syzstr->resolution == NULL) syzstr->resolution = resolution;
}
syLengthInt
static int syLengthInt(int i)
Definition syz1.cc:1919
syPrintEmptySpaces1
static void syPrintEmptySpaces1(int i)
Definition syz1.cc:1907
syPrintEmptySpaces
static void syPrintEmptySpaces(int i)
Definition syz1.cc:1895

## syReorder()

resolvente syReorder | ( | resolvente | res,
|  | int | length,
|  | syStrategy | syzstr,
|  | BOOLEAN | toCopy = TRUE,
|  | resolvente | totake = NULL )

Definition at line 1641 of file syz1.cc.

{
int i,j,l;
polyset ri1;
resolvente fullres;
ring origR=syzstr->syRing;
fullres = (resolvente)omAlloc0((length+1)*sizeof(ideal));
if (totake==NULL)
totake = res;
for (i=length-1;i>0;i--)
{
if (res[i]!=NULL)
{
if (i>1)
{
j = IDELEMS(res[i-1]);
while ((j>0) && (res[i-1]->m[j-1]==NULL)) j--;
fullres[i-1] = idInit(IDELEMS(res[i]),j);
ri1 = totake[i-1]->m;
for (j=IDELEMS(res[i])-1;j>=0;j--)
{
sBucket_pt bucket = sBucketCreate(currRing);
poly p = res[i]->m[j];
while (p!=NULL)
{
poly tq;
if (toCopy)
{
if (origR!=NULL)
tq = prHeadR(p,origR, currRing);
else
tq = pHead(p);
pIter(p);
}
else
{
res[i]->m[j] = NULL;
if (origR!=NULL)
{
poly pp=p;
pIter(p);
pNext(pp)=NULL;
tq = prMoveR(pp, origR, currRing);
}
else
{
tq = p;
pIter(p);
pNext(tq) = NULL;
}
}
// pWrite(tq);
pTest(tq);
for (l=(currRing->N);l>0;l--)
{
if (origR!=NULL)
pSubExp(tq,l, p_GetExp(ri1[pGetComp(tq)-1],l,origR));
else
pSubExp(tq,l, pGetExp(ri1[pGetComp(tq)-1],l));
}
pSetm(tq);
pTest(tq);
sBucket_Add_m(bucket,tq);
}
int l_dummy;
sBucketClearMerge(bucket, &(fullres[i-1]->m[j]), &l_dummy);
sBucketDestroy(&bucket);
}
}
else
{
if (origR!=NULL)
{
fullres[i-1] = idInit(IDELEMS(res[i]),res[i]->rank);
for (j=IDELEMS(res[i])-1;j>=0;j--)
{
if (toCopy)
fullres[i-1]->m[j] = prCopyR(res[i]->m[j], origR, currRing);
else
{
fullres[i-1]->m[j] = prMoveR(res[i]->m[j], origR, currRing);
res[i]->m[j] = NULL;
}
}
}
else
{
if (toCopy)
fullres[i-1] = idCopy(res[i]);
else
{
fullres[i-1] = res[i];
res[i] = NULL;
}
}
for (j=IDELEMS(fullres[i-1])-1;j>=0;j--)
fullres[i-1]->m[j] = pSortCompCorrect(fullres[i-1]->m[j]);
}
if (!toCopy)
{
if (res[i]!=NULL) idDelete(&res[i]);
}
}
}
if (!toCopy)
omFreeSize((ADDRESS)res,(length+1)*sizeof(ideal));
//syzstr->length = length;
return fullres;
}
pp
CanonicalForm FACTORY_PUBLIC pp(const CanonicalForm &)
CanonicalForm pp ( const CanonicalForm & f ).
Definition cf_gcd.cc:676
pNext
#define pNext(p)
Definition monomials.h:36
p_GetExp
static long p_GetExp(const poly p, const unsigned long iBitmask, const int VarOffset)
get a single variable exponent @Note: the integer VarOffset encodes:
Definition p_polys.h:471
pTest
#define pTest(p)
Definition polys.h:415
pHead
#define pHead(p)
returns newly allocated copy of Lm(p), coef is copied, next=NULL, p might be NULL
Definition polys.h:68
pGetExp
#define pGetExp(p, i)
Exponent.
Definition polys.h:42
pSubExp
#define pSubExp(p, i, v)
Definition polys.h:47
polyset
poly * polyset
Definition polys.h:260
pSortCompCorrect
#define pSortCompCorrect(p)
Assume: If considered only as poly in any component of p (say, monomials of other components of p are...
Definition polys.h:228
prMoveR
poly prMoveR(poly &p, ring src_r, ring dest_r)
Definition prCopy.cc:90
prHeadR
poly prHeadR(poly p, ring src_r, ring dest_r, prCopyProc_t prproc)
Definition prCopy.cc:126
sBucketClearMerge
void sBucketClearMerge(sBucket_pt bucket, poly *p, int *length)
Definition sbuckets.cc:237
sBucketDestroy
void sBucketDestroy(sBucket_pt *bucket)
Definition sbuckets.cc:103
sBucket_Add_m
void sBucket_Add_m(sBucket_pt bucket, poly p)
Definition sbuckets.cc:173
sBucketCreate
sBucket_pt sBucketCreate(const ring r)
Definition sbuckets.cc:96
sBucket_pt
sBucket * sBucket_pt
Definition sbuckets.h:16

## syReOrderResolventFB()

void syReOrderResolventFB | ( | resolvente | res,
|  | int | length,
|  | int | initial = 1 )

Definition at line 740 of file syz0.cc.

{
int syzIndex=length-1,i,j;
poly p;
while ((syzIndex!=0) && (res[syzIndex]==NULL)) syzIndex--;
while (syzIndex>=initial)
{
for(i=0;i<IDELEMS(res[syzIndex]);i++)
{
p = res[syzIndex]->m[i];
while (p!=NULL)
{
if (res[syzIndex-1]->m[pGetComp(p)-1]!=NULL)
{
for(j=1;j<=(currRing->N);j++)
{
pSetExp(p,j,pGetExp(p,j)
-pGetExp(res[syzIndex-1]->m[pGetComp(p)-1],j));
}
}
else
PrintS("error in the resolvent\n");
pSetm(p);
pIter(p);
}
}
syzIndex--;
}
}
pSetExp
#define pSetExp(p, i, v)
Definition polys.h:43

## syReorderShiftedComponents()

long syReorderShiftedComponents | ( | long * | sc,
|  | int | n )

Definition at line 334 of file syz1.cc.

{
long holes = 0;
int i;
long new_comps = 0, new_space, max;
// count number of holes
for (i=1; i<n; i++)
{
if (sc[i-1] + 1 < sc[i]) holes++;
}
if (LONG_MAX - SYZ_SHIFT_BASE <= sc[n-1])
{
// need new components
new_comps = (((long) 1) << SYZ_SHIFT_MAX_NEW_COMP_ESTIMATE) - 1;
max = LONG_MAX;
}
else
{
max = sc[n-1] + SYZ_SHIFT_BASE;
}
// no we arrange things such that
// (n - holes) + holes*new_space + new_comps*SYZ_SHIFT_BASE= LONG_MAX
new_space = (max - n + holes - new_comps*SYZ_SHIFT_BASE) / holes;
assume(new_space < SYZ_SHIFT_BASE && new_space >= 4);
long* tc = ( long*) omAlloc(n*sizeof(long));
tc[0] = sc[0];
// rearrange things
for (i=1; i<n; i++)
{
if (sc[i-1] + 1 < sc[i])
{
tc[i] = tc[i-1] + new_space;
}
else
{
tc[i] = tc[i-1] + 1;
}
assume(tc[i] > tc[i-1]);
}
assume(LONG_MAX - SYZ_SHIFT_BASE > tc[n-1]);
#ifndef SING_NDEBUG
for (i=1; i<n; i++)
{
assume(tc[i] >= 0);
assume(tc[i-1] + 1 <= tc[i]);
}
#endif
memcpy(sc, tc, n*sizeof(long));
omFreeSize(tc, n*sizeof(long));
return new_space;
}
max
static int max(int a, int b)
Definition fast_mult.cc:264
SYZ_SHIFT_MAX_NEW_COMP_ESTIMATE
#define SYZ_SHIFT_MAX_NEW_COMP_ESTIMATE
Definition syz.h:15

## syResetShiftedComponents()

void syResetShiftedComponents | ( | syStrategy | syzstr,
|  | int | index,
|  | int | hilb = 0 )

Definition at line 409 of file syz1.cc.

{
assume(index > 0);
int i;
if (syzstr->res[index] != NULL)
{
long * prev_s;
int* prev_c;
int p_length;
rGetSComps(&prev_c, &prev_s, &p_length, currRing);
currcomponents = syzstr->truecomponents[index-1];
currShiftedComponents = syzstr->ShiftedComponents[index-1];
rChangeSComps(currcomponents,
currShiftedComponents,
IDELEMS(syzstr->res[index-1]), currRing);
if (hilb==0)
{
ideal id = syzstr->res[index];
for (i=0; i<IDELEMS(id); i++)
{
pResetSetm(id->m[i]);
}
}
else if (hilb==1)
{
assume (index>1);
assume (syzstr->resPairs[index-1]!=NULL);
SSet Pairs=syzstr->resPairs[index-1];
SSet Pairs1=syzstr->resPairs[index];
int till=(*syzstr->Tl)[index-1];
for (i=0;i<till;i++)
{
if (Pairs[i].syz!=NULL)
pResetSetm(Pairs[i].syz);
}
till=(*syzstr->Tl)[index];
for (i=0;i<till;i++)
{
if (Pairs1[i].p!=NULL)
pResetSetm(Pairs1[i].p);
}
}
currcomponents = prev_c;
currShiftedComponents = prev_s;
rChangeSComps(prev_c, prev_s, p_length, currRing);
}
}
rGetSComps
void rGetSComps(int **currComponents, long **currShiftedComponents, int *length, ring r)
Definition ring.cc:4506
pResetSetm
static void pResetSetm(poly p)
Definition syz1.cc:394

## syResolution()

syStrategy syResolution | ( | ideal | arg,
|  | int | maxlength,
|  | intvec * | w,
|  | BOOLEAN | minim )

Definition at line 625 of file syz.cc.

{
#ifdef HAVE_PLURAL
const ideal idSaveCurrRingQuotient = currRing->qideal;
if( rIsSCA(currRing) )
{
if( ncExtensions(TESTSYZSCAMASK) )
{
currRing->qideal = SCAQuotient(currRing);
}
const unsigned int m_iFirstAltVar = scaFirstAltVar(currRing);
const unsigned int m_iLastAltVar = scaLastAltVar(currRing);
arg = id_KillSquares(idCopy(arg), m_iFirstAltVar, m_iLastAltVar, currRing, false); // kill squares in input!
}
#endif
syStrategy result=(syStrategy)omAlloc0(sizeof(ssyStrategy));
if ((w!=NULL) && (!idTestHomModule(arg,currRing->qideal,w))) // is this right in SCA case???
{
WarnS("wrong weights given(2):");w->show();PrintLn();
idHomModule(arg,currRing->qideal,&w);
w->show();PrintLn();
w=NULL;
}
if (w!=NULL)
{
result->weights = (intvec**)omAlloc0Bin(char_ptr_bin);
(result->weights)[0] = ivCopy(w);
result->length = 1;
}
resolvente fr = syResolvente(arg,maxlength,&(result->length),&(result->weights),minim);
resolvente fr1;
if (minim)
{
result->minres = (resolvente)omAlloc0((result->length+1)*sizeof(ideal));
fr1 = result->minres;
}
else
{
result->fullres = (resolvente)omAlloc0((result->length+1)*sizeof(ideal));
fr1 = result->fullres;
}
for (int i=result->length-1;i>=0;i--)
{
if (fr[i]!=NULL)
fr1[i] = fr[i];
fr[i] = NULL;
}
for (int i=result->length-1;i>0;i--)
{
if (fr1[i]!=NULL)
fr1[i]->rank=IDELEMS(fr1[i-1]);
}
omFreeSize((ADDRESS)fr,(result->length)*sizeof(ideal));
#ifdef HAVE_PLURAL
if( rIsSCA(currRing) )
{
if( ncExtensions(TESTSYZSCAMASK) )
{
currRing->qideal = idSaveCurrRingQuotient;
}
id_Delete(&arg, currRing);
}
#endif
return result;
}
rIsSCA
static bool rIsSCA(const ring r)
Definition nc.h:190
ncExtensions
bool ncExtensions(int iMask)
Definition old.gring.cc:94
TESTSYZSCAMASK
const int TESTSYZSCAMASK
Definition nc.h:338
id_KillSquares
ideal id_KillSquares(const ideal id, const short iFirstAltVar, const short iLastAltVar, const ring r, const bool bSkipZeroes)
Definition sca.cc:1518
SCAQuotient
ideal SCAQuotient(const ring r)
Definition sca.h:10
scaLastAltVar
static short scaLastAltVar(ring r)
Definition sca.h:25
scaFirstAltVar
static short scaFirstAltVar(ring r)
Definition sca.h:18

## syResolvente()

resolvente syResolvente | ( | ideal | arg,
|  | int | maxlength,
|  | int * | length,
|  | intvec *** | weights,
|  | BOOLEAN | minim )

Definition at line 403 of file syz.cc.

{
BITSET save1;
SI_SAVE_OPT1(save1);
resolvente newres;
tHomog hom=isNotHomog;
intvec *w = NULL,**tempW;
int i,k,syzIndex = 0,j,rk_arg=si_max(1,(int)id_RankFreeModule(arg,currRing));
int Kstd1_OldDeg=Kstd1_deg;
BOOLEAN completeMinim;
BOOLEAN setRegularity=TRUE;
int wlength=*length;
if (maxlength!=-1) *length = maxlength+1;
else *length = 5;
if ((wlength!=0) && (*length!=wlength))
{
intvec **wtmp = (intvec**)omAlloc0((*length)*sizeof(intvec*));
wtmp[0]=(*weights)[0];
omFreeSize((ADDRESS)*weights,wlength*sizeof(intvec*));
*weights=wtmp;
}
resolvente res = (resolvente)omAlloc0((*length)*sizeof(ideal));
/*--- initialize the syzygy-ring -----------------------------*/
ring origR = currRing;
ring syz_ring = rAssure_SyzComp(origR, TRUE); // will do rChangeCurrRing if needed
rSetSyzComp(rk_arg, syz_ring);
if (syz_ring != origR)
{
rChangeCurrRing(syz_ring);
res[0] = idrCopyR_NoSort(arg, origR, syz_ring);
}
else
{
res[0] = idCopy(arg);
}
/*--- creating weights for the module components ---------------*/
if ((weights!=NULL) && (*weights!=NULL)&& ((*weights)[0]!=NULL))
{
if (!idTestHomModule(res[0],currRing->qideal,(*weights)[0]))
{
WarnS("wrong weights given(1):"); (*weights)[0]->show();PrintLn();
idHomModule(res[0],currRing->qideal,&w);
w->show();PrintLn();
*weights=NULL;
}
}
if ((weights==NULL) || (*weights==NULL) || ((*weights)[0]==NULL))
{
hom=(tHomog)idHomModule(res[0],currRing->qideal,&w);
if (hom==isHomog)
{
*weights = (intvec**)omAlloc0((*length)*sizeof(intvec*));
if (w!=NULL) (*weights)[0] = ivCopy(w);
}
}
else
{
if ((weights!=NULL) && (*weights!=NULL)&& ((*weights)[0]!=NULL))
{
w = ivCopy((*weights)[0]);
hom = isHomog;
}
}
#ifdef HAVE_PLURAL
if (rIsPluralRing(currRing) && !rIsSCA(currRing) )
{
// quick solution; need theory to apply homog GB stuff for G-Algebras
hom = isNotHomog;
}
#endif // HAVE_PLURAL
if (hom==isHomog)
{
intvec *w1 = syPrepareModComp(res[0],&w);
if (w!=NULL) { delete w;w=NULL; }
w = w1;
j = 0;
while ((j<IDELEMS(res[0])) && (res[0]->m[j]==NULL)) j++;
if (j<IDELEMS(res[0]))
{
if (p_FDeg(res[0]->m[j],currRing)!=pTotaldegree(res[0]->m[j]))
setRegularity = FALSE;
}
}
else
{
setRegularity = FALSE;
}
/*--- the main loop --------------------------------------*/
while ((res[syzIndex]!=NULL) && (!idIs0(res[syzIndex])) &&
((maxlength==-1) || (syzIndex<=maxlength)))
// (syzIndex<maxlength+(int)minim)))
/*--- compute one step more for minimizing-----------------*/
{
if (Kstd1_deg!=0) Kstd1_deg++;
if (syzIndex+1==*length)
{
newres = (resolvente)omAlloc0((*length+5)*sizeof(ideal));
tempW = (intvec**)omAlloc0((*length+5)*sizeof(intvec*));
for (j=0;j<*length;j++)
{
newres[j] = res[j];
if (*weights!=NULL) tempW[j] = (*weights)[j];
/*else tempW[j] = NULL;*/
}
omFreeSize((ADDRESS)res,*length*sizeof(ideal));
if (*weights != NULL) omFreeSize((ADDRESS)*weights,*length*sizeof(intvec*));
*length += 5;
res=newres;
*weights = tempW;
}
/*--- interreducing first -----------------------------------*/
if (syzIndex>0)
{
int rkI=id_RankFreeModule(res[syzIndex],currRing);
rSetSyzComp(rkI, currRing);
}
if(! TEST_OPT_NO_SYZ_MINIM )
if (minim || (syzIndex!=0))
{
ideal temp = kInterRedOld(res[syzIndex],currRing->qideal);
idDelete(&res[syzIndex]);
idSkipZeroes(temp);
res[syzIndex] = temp;
}
/*--- computing the syzygy modules --------------------------------*/
if ((currRing->qideal==NULL)&&(syzIndex==0)&& (!TEST_OPT_DEGBOUND))
{
res[/*syzIndex+*/1] = idSyzygies(res[0/*syzIndex*/],hom,&w,FALSE,setRegularity,&Kstd1_deg);
if ((!TEST_OPT_NOTREGULARITY) && (Kstd1_deg>0)
&& (!rField_is_Ring(currRing))
) si_opt_1 |= Sy_bit(OPT_DEGBOUND);
}
else
{
res[syzIndex+1] = idSyzygies(res[syzIndex],hom,&w,FALSE);
}
completeMinim=(syzIndex!=maxlength) || (maxlength ==-1) || (hom!=isHomog);
syzIndex++;
if (TEST_OPT_PROT) Print("[%d]\n",syzIndex);
if(! TEST_OPT_NO_SYZ_MINIM )
{
if ((minim)||(syzIndex>1))
syMinStep(res[syzIndex-1],res[syzIndex],!completeMinim,NULL,hom);
if (!completeMinim)
/*minim is TRUE, we are in the module: maxlength, maxlength <>0*/
{
idDelete(&res[syzIndex]);
}
}
/*---creating the iterated weights for module components ---------*/
if ((hom == isHomog) && (res[syzIndex]!=NULL) && (!idIs0(res[syzIndex])))
{
//Print("die %d Modulegewichte sind:\n",w1->length());
//w1->show();
//PrintLn();
int max_comp = id_RankFreeModule(res[syzIndex],currRing);
k = max_comp - rGetCurrSyzLimit(currRing);
assume(w != NULL);
if (w != NULL)
w->resize(max_comp+IDELEMS(res[syzIndex]));
else
w = new intvec(max_comp+IDELEMS(res[syzIndex]));
(*weights)[syzIndex] = new intvec(k);
for (i=0;i<k;i++)
{
if (res[syzIndex-1]->m[i]!=NULL) // hs
{
(*w)[i + rGetCurrSyzLimit(currRing)] = p_FDeg(res[syzIndex-1]->m[i],currRing);
if (pGetComp(res[syzIndex-1]->m[i])>0)
(*w)[i + rGetCurrSyzLimit(currRing)]
+= (*w)[pGetComp(res[syzIndex-1]->m[i])-1];
(*((*weights)[syzIndex]))[i] = (*w)[i+rGetCurrSyzLimit(currRing)];
}
}
for (i=k;i<k+IDELEMS(res[syzIndex]);i++)
{
if (res[syzIndex]->m[i-k]!=NULL)
(*w)[i+rGetCurrSyzLimit(currRing)] = p_FDeg(res[syzIndex]->m[i-k],currRing)
+(*w)[pGetComp(res[syzIndex]->m[i-k])-1];
}
}
}
/*--- end of the main loop --------------------------------------*/
/*--- deleting the temporare data structures --------------------*/
if ((syzIndex!=0) && (res[syzIndex]!=NULL) && (idIs0(res[syzIndex])))
idDelete(&res[syzIndex]);
if (w !=NULL) delete w;
Kstd1_deg=Kstd1_OldDeg;
for (i=1; i<=syzIndex; i++)
{
if ((res[i]!=NULL) && ! idIs0(res[i]))
{
id_Shift(res[i],-rGetMaxSyzComp(i, currRing),currRing);
res[i]->rank=idElem(res[i-1]);
}
}
/*--- going back to the original ring -------------------------*/
if (origR != syz_ring)
{
rChangeCurrRing(origR); // should not be needed now?
for (i=0; i<=syzIndex; i++)
{
res[i] = idrMoveR_NoSort(res[i], syz_ring, origR);
}
rDelete(syz_ring);
}
SI_RESTORE_OPT1(save1);
return res;
}
BITSET
#define BITSET
Definition auxiliary.h:85
idSyzygies
ideal idSyzygies(ideal h1, tHomog h, intvec **w, BOOLEAN setSyzComp, BOOLEAN setRegularity, int *deg, GbVariant alg)
Definition ideals.cc:836
kInterRedOld
ideal kInterRedOld(ideal F, const ideal Q)
Definition kstd1.cc:3456
Kstd1_deg
EXTERN_VAR int Kstd1_deg
Definition kstd1.h:70
si_opt_1
VAR unsigned si_opt_1
Definition options.c:5
SI_SAVE_OPT1
#define SI_SAVE_OPT1(A)
Definition options.h:21
SI_RESTORE_OPT1
#define SI_RESTORE_OPT1(A)
Definition options.h:24
Sy_bit
#define Sy_bit(x)
Definition options.h:31
TEST_OPT_DEGBOUND
#define TEST_OPT_DEGBOUND
Definition options.h:115
TEST_OPT_NOTREGULARITY
#define TEST_OPT_NOTREGULARITY
Definition options.h:122
OPT_DEGBOUND
#define OPT_DEGBOUND
Definition options.h:91
idrCopyR_NoSort
ideal idrCopyR_NoSort(ideal id, ring src_r, ring dest_r)
Definition prCopy.cc:205
rAssure_SyzComp
ring rAssure_SyzComp(const ring r, BOOLEAN complete)
Definition ring.cc:4527
rGetMaxSyzComp
int rGetMaxSyzComp(int i, const ring r)
return the max-comonent wchich has syzIndex i Assume: i<= syzIndex_limit
Definition ring.cc:5302
rSetSyzComp
void rSetSyzComp(int k, const ring r)
Definition ring.cc:5230
rGetCurrSyzLimit
static int rGetCurrSyzLimit(const ring r)
Definition ring.h:729
rField_is_Ring
#define rField_is_Ring(R)
Definition ring.h:491
tHomog
tHomog
Definition structs.h:31
isNotHomog
@ isNotHomog
Definition structs.h:32
syPrepareModComp
static intvec * syPrepareModComp(ideal arg, intvec **w)
Definition syz.cc:25

## sySchreyer()

syStrategy sySchreyer | ( | ideal | arg,
|  | int | maxlength )

Definition at line 1018 of file syz0.cc.

{
int rl;
BOOLEAN inf_length=(maxlength==0);
if (inf_length) maxlength=rVar(currRing)+2;
resolvente fr = sySchreyerResolvente(arg,maxlength,&(rl));
if (fr==NULL) return NULL;
// int typ0;
syStrategy result=(syStrategy)omAlloc0(sizeof(ssyStrategy));
result->length=rl;
result->fullres = (resolvente)omAlloc0((rl /*result->length*/+1)*sizeof(ideal));
for (int i=rl /*result->length*/-1;i>=0;i--)
{
if (fr[i]!=NULL)
{
idSkipZeroes(fr[i]);
result->fullres[i] = fr[i];
fr[i] = NULL;
}
}
if (currRing->qideal!=NULL)
{
for (int i=0; i<rl; i++)
{
if (result->fullres[i]!=NULL)
{
ideal t=kNF(currRing->qideal,NULL,result->fullres[i]);
idDelete(&result->fullres[i]);
result->fullres[i]=t;
if (i<rl-1)
{
for(int j=IDELEMS(t)-1;j>=0; j--)
{
if ((t->m[j]==NULL) && (result->fullres[i+1]!=NULL))
{
for(int k=IDELEMS(result->fullres[i+1])-1;k>=0; k--)
{
if (result->fullres[i+1]->m[k]!=NULL)
{
pDeleteComp(&(result->fullres[i+1]->m[k]),j+1);
}
}
}
}
}
idSkipZeroes(result->fullres[i]);
}
}
if ((rl>maxlength) && (result->fullres[rl-1]!=NULL))
{
idDelete(&result->fullres[rl-1]);
}
}
if (inf_length)
{
int i=0;
loop
{
if(result->fullres[i]!=NULL)
{
if(idIs0(result->fullres[i])) // delete everything after pos i
{
for(int j=i+1;j<=rl;j++)
{
if(result->fullres[j]!=NULL) idDelete(&result->fullres[j]);
}
rl=i;
break;
}
}
i++;
if (i>rl) break;
}
result->length=rl;
if (!idIs0(result->fullres[rl])) // add trailing 0-ideal
{
if(result->fullres[rl+1]==NULL)
{
result->fullres[rl+1]=idInit(1,1);
result->length=rl+1;
}
}
}
omFreeSize((ADDRESS)fr,(rl /*result->length*/)*sizeof(ideal));
return result;
}
pDeleteComp
#define pDeleteComp(p, k)
Definition polys.h:361
rVar
static short rVar(const ring r)
define rVar(r) (r->N)
Definition ring.h:598
sySchreyerResolvente
resolvente sySchreyerResolvente(ideal arg, int maxlength, int *length, BOOLEAN isMonomial, BOOLEAN)
Definition syz0.cc:855

## sySchreyerResolvente()

resolvente sySchreyerResolvente | ( | ideal | arg,
|  | int | maxlength,
|  | int * | length,
|  | BOOLEAN | isMonomial = FALSE,
|  | BOOLEAN | notReplace = FALSE )

Definition at line 855 of file syz0.cc.

{
ideal mW=NULL;
int i,syzIndex = 0,j=0;
intvec * modcomp=NULL,*w=NULL;
// int ** wv=NULL;
tHomog hom=(tHomog)idHomModule(arg,NULL,&w);
ring origR = currRing;
ring syRing = NULL;
if ((!isMonomial) && syTestOrder(arg))
{
WerrorS("sres only implemented for modules with ordering ..,c or ..,C");
return NULL;
}
*length = 4;
resolvente res = (resolvente)omAlloc0((*length)*sizeof(ideal)),newres;
res[0] = idCopy(arg);
while ((!idIs0(res[syzIndex])) && ((maxlength==-1) || (syzIndex<maxlength)))
{
i = IDELEMS(res[syzIndex]);
//while ((i!=0) && (!res[syzIndex]->m[i-1])) i--;
if (syzIndex+1==*length)
{
newres = (resolvente)omAlloc0((*length+4)*sizeof(ideal));
// for (j=0;j<*length+4;j++) newres[j] = NULL;
for (j=0;j<*length;j++) newres[j] = res[j];
omFreeSize((ADDRESS)res,*length*sizeof(ideal));
*length += 4;
res=newres;
}
if ((hom==isHomog)|| (rHasGlobalOrdering(origR)))
{
if (syzIndex==0) syInitSort(res[0],&modcomp);
if ((syzIndex==0) && !rRing_has_CompLastBlock(currRing))
res[syzIndex+1] = sySchreyersSyzygiesFB(res[syzIndex],&modcomp,mW,FALSE);
else
res[syzIndex+1] = sySchreyersSyzygiesFB(res[syzIndex],&modcomp,mW);
if (errorreported)
{
for (j=0;j<*length;j++) idDelete( &res[j] );
omFreeSize((ADDRESS)res,*length*sizeof(ideal));
return NULL;
}
mW = res[syzIndex];
}
//idPrint(res[syzIndex+1]);
if ( /*(*/ syzIndex==0 /*)*/ )
{
if ((hom==isHomog)|| (rHasGlobalOrdering(origR)))
{
syRing = rAssure_CompLastBlock(origR, TRUE);
if (syRing != origR)
{
rChangeCurrRing(syRing);
for (i=0; i<IDELEMS(res[1]); i++)
{
res[1]->m[i] = prMoveR( res[1]->m[i], origR, syRing);
}
}
idTest(res[1]);
}
else
{
syRing = rAssure_SyzComp_CompLastBlock(origR);
if (syRing != origR)
{
rChangeCurrRing(syRing);
for (i=0; i<IDELEMS(res[0]); i++)
{
res[0]->m[i] = prMoveR( res[0]->m[i], origR, syRing);
}
}
idTest(res[0]);
}
}
if ((hom!=isHomog) && (rHasLocalOrMixedOrdering(origR)))
{
if (syzIndex==0) syInitSort(res[0],&modcomp);
res[syzIndex+1] = sySchreyersSyzygiesFM(res[syzIndex],&modcomp);
if (errorreported)
{
for (j=0;j<*length;j++) idDelete( &res[j] );
omFreeSize((ADDRESS)res,*length*sizeof(ideal));
return NULL;
}
}
syzIndex++;
if (TEST_OPT_PROT) Print("[%d]\n",syzIndex);
}
//syPrintResolution(res,1,*length);
if ((hom!=isHomog) && (rHasLocalOrMixedOrdering(origR)))
{
syzIndex = 1;
while ((syzIndex < *length) && (!idIs0(res[syzIndex])))
{
id_Shift(res[syzIndex],-rGetMaxSyzComp(syzIndex, currRing),currRing);
syzIndex++;
}
}
if ((hom==isHomog) || (rHasGlobalOrdering(origR)))
syzIndex = 1;
else
syzIndex = 0;
syReOrderResolventFB(res,*length,syzIndex+1);
if (/*ringOrderChanged:*/ origR!=syRing && syRing != NULL)
{
rChangeCurrRing(origR);
// Thomas: Here I assume that all (!) polys of res live in tmpR
while ((syzIndex < *length) && (res[syzIndex]))
{
for (i=0;i<IDELEMS(res[syzIndex]);i++)
{
if (res[syzIndex]->m[i])
{
res[syzIndex]->m[i] = prMoveR( res[syzIndex]->m[i], syRing, origR);
}
}
syzIndex++;
}
// j = 0; while (currRing->order[j]!=0) j++; // What was this for???!
rDelete(syRing);
}
else
{
// Thomas -- are you sure that you have to "reorder" here?
while ((syzIndex < *length) && (res[syzIndex]))
{
for (i=0;i<IDELEMS(res[syzIndex]);i++)
{
if (res[syzIndex]->m[i])
res[syzIndex]->m[i] = pSortCompCorrect(res[syzIndex]->m[i]);
}
syzIndex++;
}
}
if ((hom==isHomog) || (rHasGlobalOrdering(origR)))
{
if (res[1]!=NULL)
{
syReOrderResolventFB(res,2,1);
for (i=0;i<IDELEMS(res[1]);i++)
{
if (res[1]->m[i])
res[1]->m[i] = pSort(res[1]->m[i]);
}
}
}
//syPrintResolution(res,0,*length);
//syMergeSortResolventFB(res,*length);
if (modcomp!=NULL) delete modcomp;
if (w!=NULL) delete w;
return res;
}
errorreported
VAR short errorreported
Definition feFopen.cc:23
pSort
#define pSort(p)
Definition polys.h:219
rRing_has_CompLastBlock
BOOLEAN rRing_has_CompLastBlock(const ring r)
Definition ring.cc:5329
rAssure_SyzComp_CompLastBlock
ring rAssure_SyzComp_CompLastBlock(const ring r)
makes sure that c/C ordering is last ordering and SyzIndex is first
Definition ring.cc:4841
rAssure_CompLastBlock
ring rAssure_CompLastBlock(ring r, BOOLEAN complete)
makes sure that c/C ordering is last ordering
Definition ring.cc:4786
rHasLocalOrMixedOrdering
static BOOLEAN rHasLocalOrMixedOrdering(const ring r)
Definition ring.h:769
rHasGlobalOrdering
static BOOLEAN rHasGlobalOrdering(const ring r)
Definition ring.h:768
sySchreyersSyzygiesFB
static ideal sySchreyersSyzygiesFB(ideal arg, intvec **modcomp, ideal mW, BOOLEAN redTail=TRUE)
Definition syz0.cc:499
syInitSort
static void syInitSort(ideal arg, intvec **modcomp)
Definition syz0.cc:23
sySchreyersSyzygiesFM
static ideal sySchreyersSyzygiesFM(ideal arg, intvec **modcomp)
Definition syz0.cc:162
syReOrderResolventFB
void syReOrderResolventFB(resolvente res, int length, int initial)
Definition syz0.cc:740
syTestOrder
BOOLEAN syTestOrder(ideal M)
Definition syz0.cc:829

## sySchreyersSyzygiesB()

void sySchreyersSyzygiesB | ( | polyset | F,
|  | int | Fmax,
|  | polyset * | Shdl,
|  | int * | Smax,
|  | BOOLEAN | noSort )

## sySchreyersSyzygiesM()

void sySchreyersSyzygiesM | ( | polyset | F,
|  | int | Fmax,
|  | polyset * | Shdl,
|  | int * | Smax,
|  | BOOLEAN | noSort )

## sySize()

int sySize | ( | syStrategy | syzstr | ) |

Definition at line 1830 of file syz1.cc.

{
resolvente r=syzstr->res;
if (r==NULL)
r = syzstr->fullres;
if (r==NULL)
r = syzstr->minres;
if (r==NULL)
{
WerrorS("No resolution found");
return 0;
}
int i=syzstr->length;
while ((i>0) && (r[i-1]==NULL)) i--;
return i;
}

## syTestOrder()

BOOLEAN syTestOrder | ( | ideal | i | ) |

Definition at line 829 of file syz0.cc.

{
int i=id_RankFreeModule(M,currRing);
if (i == 0) return FALSE;
int j=0;
while ((currRing->order[j]!=ringorder_c) && (currRing->order[j]!=ringorder_C))
j++;
if (currRing->order[j+1]!=0)
return TRUE;
return FALSE;
}
ringorder_C
@ ringorder_C
Definition ring.h:74
ringorder_c
@ ringorder_c
Definition ring.h:73
M
#define M
Definition sirandom.c:25

## Variable Documentation

## currcomponents

EXTERN_VAR int* currcomponents

Definition at line 117 of file syz.h.

## currShiftedComponents

EXTERN_VAR long* currShiftedComponents

Definition at line 118 of file syz.h.