startingCone.cc
Go to the documentation of this file.
2 #include <containsMonomial.h>
3 #include <tropical.h>
4 #include <initial.h>
5 #include <lift.h>
6 #include <groebnerCone.h>
7 #include <tropicalStrategy.h>
8 #include <tropicalCurves.h>
9 #include <bbcone.h>
11 #include <tropicalVariety.h>
12 #include <tropicalStrategy.h>
13 
14 
16 {
17  groebnerCone sigma(currentStrategy.getStartingIdeal(), currentStrategy.getStartingRing(), currentStrategy);
18  return sigma;
19 }
20 
21 
22 /**
23  * Computes a starting point outside the lineatliy space by traversing the Groebner fan,
24  * checking each cone whether it contains a ray in the tropical variety.
25  * Returns a point in the tropical variety and a maximal Groebner cone containing the point.
26  **/
27 std::pair<gfan::ZVector,groebnerCone> tropicalStartingPoint(const ideal I, const ring r, const tropicalStrategy& currentStrategy)
28 {
29  // start by computing a maximal Groebner cone and
30  // check whether one of its rays lies in the tropical variety
31  const groebnerCone sigma(I,r,currentStrategy);
32  gfan::ZVector startingPoint = sigma.tropicalPoint();
33  if (startingPoint.size() > 0)
34  return std::make_pair(startingPoint,sigma);
35 
36  // if not, traverse the groebnerFan and until such a cone is found
37  // and return the maximal cone together with a point in its ray
39  groebnerCones workingList;
40  workingList.insert(sigma);
41  while (!workingList.empty())
42  {
43  const groebnerCone sigma = *(workingList.begin());
44  groebnerCones neighbours = sigma.groebnerNeighbours();
45  for (groebnerCones::iterator tau = neighbours.begin(); tau!=neighbours.end(); tau++)
46  {
47  if (groebnerFan.count(*tau) == 0)
48  {
49  if (workingList.count(*tau) == 0)
50  {
51  startingPoint = tau->tropicalPoint();
52  if (startingPoint.size() > 0)
53  return std::make_pair(startingPoint,*tau);
54  }
55  workingList.insert(*tau);
56  }
57  }
58  groebnerFan.insert(sigma);
59  workingList.erase(sigma);
60  }
61 
62  // return some trivial output, if such a cone cannot be found
63  gfan::ZVector emptyVector = gfan::ZVector(0);
64  groebnerCone emptyCone = groebnerCone();
65  return std::pair<gfan::ZVector,groebnerCone>(emptyVector,emptyCone);
66 }
67 
68 
69 /**
70  * Computes a starting point outside the lineatliy space by traversing the Groebner fan,
71  * checking each cone whether it contains a ray in the tropical variety.
72  * Returns a point in the tropical variety and a maximal Groebner cone containing the point.
73  **/
74 std::pair<gfan::ZVector,groebnerCone> tropicalStartingDataViaGroebnerFan(const ideal I, const ring r, const tropicalStrategy& currentStrategy)
75 {
76  // start by computing a maximal Groebner cone and
77  // check whether one of its rays lies in the tropical variety
78  const groebnerCone sigma(I,r,currentStrategy);
79  gfan::ZVector startingPoint = sigma.tropicalPoint();
80  if (startingPoint.size() > 0)
81  return std::make_pair(startingPoint,sigma);
82 
83  // if not, traverse the groebnerFan and until such a cone is found
84  // and return the maximal cone together with a point in its ray
86  groebnerCones workingList;
87  workingList.insert(sigma);
88  while (!workingList.empty())
89  {
90  const groebnerCone sigma = *(workingList.begin());
91  groebnerCones neighbours = sigma.groebnerNeighbours();
92  for (groebnerCones::iterator tau = neighbours.begin(); tau!=neighbours.end(); tau++)
93  {
94  if (groebnerFan.count(*tau) == 0)
95  {
96  if (workingList.count(*tau) == 0)
97  {
98  startingPoint = tau->tropicalPoint();
99  if (startingPoint.size() > 0)
100  return std::make_pair(startingPoint,*tau);
101  }
102  workingList.insert(*tau);
103  }
104  }
105  groebnerFan.insert(sigma);
106  workingList.erase(sigma);
107  }
108 
109  // return some trivial output, if such a cone cannot be found
110  gfan::ZVector emptyVector = gfan::ZVector(0);
111  groebnerCone emptyCone = groebnerCone();
112  return std::pair<gfan::ZVector,groebnerCone>(emptyVector,emptyCone);
113 }
114 
116 {
117  leftv u = args;
118  if ((u!=NULL) && (u->Typ()==IDEAL_CMD))
119  {
120  ideal I = (ideal) u->Data();
121  if ((I->m[0]!=NULL) && (idElem(I)==1))
122  {
123  tropicalStrategy currentStrategy(I,currRing);
124  poly g = I->m[0];
125  std::set<gfan::ZCone> Tg = tropicalVariety(g,currRing,&currentStrategy);
126  for (std::set<gfan::ZCone>::iterator zc=Tg.begin(); zc!=Tg.end(); zc++)
127  {
128  gfan::ZMatrix ray = zc->extremeRays();
129  for (int i=0; i<ray.getHeight(); i++)
130  {
131  if (ray[i].toVector().isPositive())
132  {
133  res->rtyp = BIGINTMAT_CMD;
134  res->data = (void*) zVectorToBigintmat(ray[i].toVector());
135  return FALSE;
136  }
137  }
138  }
139  res->rtyp = BIGINTMAT_CMD;
140  res->data = (void*) zVectorToBigintmat(gfan::ZVector(0));
141  return FALSE;
142  }
143  WerrorS("positiveTropicalStartingPoint: ideal not principal");
144  return TRUE;
145  }
146  WerrorS("positiveTropicalStartingPoint: unexpected parameters");
147  return TRUE;
148 }
149 
151 {
152  leftv u = args;
153  if ((u!=NULL) && (u->Typ()==IDEAL_CMD))
154  {
155  ideal I = (ideal) u->Data();
156  if ((I->m[0]!=NULL) && (idElem(I)==1))
157  {
158  tropicalStrategy currentStrategy(I,currRing);
159  poly g = I->m[0];
160  std::set<gfan::ZCone> Tg = tropicalVariety(g,currRing,&currentStrategy);
161  for (std::set<gfan::ZCone>::iterator zc=Tg.begin(); zc!=Tg.end(); zc++)
162  {
163  gfan::ZMatrix ray = zc->extremeRays();
164  for (int i=0; i<ray.getHeight(); i++)
165  {
166  if (ray[i].toVector().isNonNegative())
167  {
168  res->rtyp = BIGINTMAT_CMD;
169  res->data = (void*) zVectorToBigintmat(ray[i].toVector());
170  return FALSE;
171  }
172  }
173  }
174  res->rtyp = BIGINTMAT_CMD;
175  res->data = (void*) zVectorToBigintmat(gfan::ZVector(0));
176  return FALSE;
177  }
178  WerrorS("nonNegativeTropicalStartingPoint: ideal not principal");
179  return TRUE;
180  }
181  WerrorS("nonNegativeTropicalStartingPoint: unexpected parameters");
182  return TRUE;
183 }
184 
186 {
187  leftv u = args;
188  if ((u!=NULL) && (u->Typ()==IDEAL_CMD))
189  {
190  ideal I = (ideal) u->Data();
191  if ((I->m[0]!=NULL) && (idElem(I)==1))
192  {
193  tropicalStrategy currentStrategy(I,currRing);
194  poly g = I->m[0];
195  std::set<gfan::ZCone> Tg = tropicalVariety(g,currRing,&currentStrategy);
196  for (std::set<gfan::ZCone>::iterator zc=Tg.begin(); zc!=Tg.end(); zc++)
197  {
198  gfan::ZMatrix ray = zc->extremeRays();
199  for (int i=0; i<ray.getHeight(); i++)
200  {
201  gfan::ZVector negatedRay = gfan::Integer(-1)*ray[i].toVector();
202  if (negatedRay.isPositive())
203  {
204  res->rtyp = BIGINTMAT_CMD;
205  res->data = (void*) zVectorToBigintmat(ray[i].toVector());
206  return FALSE;
207  }
208  }
209  }
210  res->rtyp = BIGINTMAT_CMD;
211  res->data = (void*) zVectorToBigintmat(gfan::ZVector(0));
212  return FALSE;
213  }
214  WerrorS("negativeTropicalStartingPoint: ideal not principal");
215  return TRUE;
216  }
217  WerrorS("negativeTropicalStartingPoint: unexpected parameters");
218  return TRUE;
219 }
220 
222 {
223  leftv u = args;
224  if ((u!=NULL) && (u->Typ()==IDEAL_CMD))
225  {
226  ideal I = (ideal) u->Data();
227  if ((I->m[0]!=NULL) && (idElem(I)==1))
228  {
229  tropicalStrategy currentStrategy(I,currRing);
230  poly g = I->m[0];
231  std::set<gfan::ZCone> Tg = tropicalVariety(g,currRing,&currentStrategy);
232  for (std::set<gfan::ZCone>::iterator zc=Tg.begin(); zc!=Tg.end(); zc++)
233  {
234  gfan::ZMatrix ray = zc->extremeRays();
235  for (int i=0; i<ray.getHeight(); i++)
236  {
237  gfan::ZVector negatedRay = gfan::Integer(-1)*ray[i].toVector();
238  if (negatedRay.isNonNegative())
239  {
240  res->rtyp = BIGINTMAT_CMD;
241  res->data = (void*) zVectorToBigintmat(ray[i]);
242  return FALSE;
243  }
244  }
245  }
246  res->rtyp = BIGINTMAT_CMD;
247  res->data = (void*) zVectorToBigintmat(gfan::ZVector(0));
248  return FALSE;
249  }
250  WerrorS("nonPositiveTropicalStartingPoint: ideal not principal");
251  return TRUE;
252  }
253  WerrorS("nonPositiveTropicalStartingPoint: unexpected parameters");
254  return TRUE;
255 }
256 
258 {
259  leftv u = args;
260  if ((u!=NULL) && (u->Typ()==IDEAL_CMD))
261  {
262  ideal I = (ideal) u->Data();
263  tropicalStrategy currentStrategy(I,currRing);
264  if ((I->m[0]!=NULL) && (idElem(I)==1))
265  {
266  poly g = I->m[0];
267  std::set<gfan::ZCone> Tg = tropicalVariety(g,currRing,&currentStrategy);
268  if (Tg.empty())
269  {
270  res->rtyp = BIGINTMAT_CMD;
271  res->data = (void*) zVectorToBigintmat(gfan::ZVector(0));
272  return FALSE;
273  }
274  gfan::ZCone C = *(Tg.begin());
275  gfan::ZMatrix rays = C.extremeRays();
276  if (rays.getHeight()==0)
277  {
278  gfan::ZMatrix lin = C.generatorsOfLinealitySpace();
279  res->rtyp = BIGINTMAT_CMD;
280  res->data = (void*) zVectorToBigintmat(lin[0]);
281  return FALSE;
282  }
283  res->rtyp = BIGINTMAT_CMD;
284  res->data = (void*) zVectorToBigintmat(rays[0]);
285  return FALSE;
286  }
287  gfan::ZCone C0 = currentStrategy.getHomogeneitySpace();
288  if (C0.dimension()==currentStrategy.getExpectedDimension())
289  {
290  gfan::ZMatrix lin = C0.generatorsOfLinealitySpace();
291  res->rtyp = BIGINTMAT_CMD;
292  res->data = (void*) zVectorToBigintmat(lin[0]);
293  return FALSE;
294  }
295  std::pair<gfan::ZVector,groebnerCone> startingData = tropicalStartingDataViaGroebnerFan(I,currRing,currentStrategy);
296  gfan::ZVector startingPoint = startingData.first;
297  res->rtyp = BIGINTMAT_CMD;
298  res->data = (void*) zVectorToBigintmat(startingPoint);
299  return FALSE;
300  }
301  WerrorS("tropicalStartingPoint: unexpected parameters");
302  return TRUE;
303 }
304 
305 /***
306  * returs the lineality space of the Groebner fan
307  **/
308 static gfan::ZCone linealitySpaceOfGroebnerFan(const ideal I, const ring r)
309 {
310  int n = rVar(r);
311  gfan::ZMatrix equations = gfan::ZMatrix(0,n);
312  int* expv = (int*) omAlloc((n+1)*sizeof(int));
313  int k = IDELEMS(I);
314  for (int i=0; i<k; i++)
315  {
316  poly g = I->m[i];
317  if (g)
318  {
319  p_GetExpV(g,expv,r);
320  gfan::ZVector leadexp = intStar2ZVector(n,expv);
321  for (pIter(g); g; pIter(g))
322  {
323  p_GetExpV(g,expv,r);
324  equations.appendRow(leadexp-intStar2ZVector(n,expv));
325  }
326  }
327  }
328  omFreeSize(expv,(n+1)*sizeof(int));
329  return gfan::ZCone(gfan::ZMatrix(0,n),equations);
330 }
331 
332 /***
333  * Computes a starting cone in the tropical variety.
334  **/
336 {
337  ring r = currentStrategy.getStartingRing();
338  ideal I = currentStrategy.getStartingIdeal();
339  currentStrategy.reduce(I,r);
340  if (currentStrategy.isValuationTrivial())
341  {
342  // copy the data, so that it be deleted when passed to the loop
343  // s <- r
344  // inI <- I
345  ring s = rCopy(r);
346  int k = IDELEMS(I); ideal inI = idInit(k);
347  nMapFunc identityMap = n_SetMap(r->cf,s->cf);
348  for (int i=0; i<k; i++)
349  {
350  if(I->m[i]!=NULL)
351  {
352  inI->m[i] = p_PermPoly(I->m[i],NULL,r,s,identityMap,NULL,0);
353  }
354  }
355 
356  // repeatedly computes a point in the tropical variety outside the lineality space,
357  // take the initial ideal with respect to it
358  // and check whether the dimension of its homogeneity space
359  // equals the dimension of the tropical variety
360  gfan::ZCone zc = linealitySpaceOfGroebnerFan(inI,s);
361  gfan::ZVector startingPoint; groebnerCone ambientMaximalCone;
362  if (zc.dimension()>=currentStrategy.getExpectedDimension())
363  {
364  // check whether the lineality space is contained in the tropical variety
365  // i.e. whether the ideal does not contain a monomial
367  if (mon)
368  {
369  groebnerCone emptyCone = groebnerCone();
370  p_Delete(&mon,r);
371  id_Delete(&inI,s);
372  return emptyCone;
373  }
374  groebnerCone startingCone(inI,inI,s,currentStrategy);
375  id_Delete(&inI,s);
376  return startingCone;
377  }
378  while (zc.dimension()<currentStrategy.getExpectedDimension())
379  {
380  // compute a point in the tropical variety outside the lineality space
381  std::pair<gfan::ZVector,groebnerCone> startingData = tropicalStartingDataViaGroebnerFan(inI,s,currentStrategy);
382  startingPoint = startingData.first;
383  ambientMaximalCone = groebnerCone(startingData.second);
384 
385  id_Delete(&inI,s); rDelete(s);
386  inI = ambientMaximalCone.getPolynomialIdeal();
387  s = ambientMaximalCone.getPolynomialRing();
388 
389  // compute the initial ideal with respect to the weight
390  inI = initial(inI,s,startingPoint);
391  zc = linealitySpaceOfGroebnerFan(inI,s);
392  }
393 
394  // once the dimension of the homogeneity space equals that of the tropical variety
395  // we know that we have an initial ideal with respect to a weight
396  // in the relative interior of a maximal cone in the tropical variety
397  // from this we can read of the inequalities and equations
398 
399  // but before doing so, we must lift the generating set of inI
400  // to a generating set of I
401  ideal J = lift(I,r,inI,s); // todo: use computeLift from tropicalStrategy
402  groebnerCone startingCone(J,inI,s,currentStrategy);
403  id_Delete(&inI,s);
404  id_Delete(&J,s);
405 
406  // assume(checkContainmentInTropicalVariety(startingCone));
407  return startingCone;
408  }
409  else
410  {
411  // copy the data, so that it be deleted when passed to the loop
412  // s <- r
413  // inJ <- I
414  ring s = rCopy(r);
415  int k = IDELEMS(I); ideal inJ = idInit(k);
416  nMapFunc identityMap = n_SetMap(r->cf,s->cf);
417  for (int i=0; i<k; i++)
418  {
419  if(I->m[i]!=NULL)
420  {
421  inJ->m[i] = p_PermPoly(I->m[i],NULL,r,s,identityMap,NULL,0);
422  }
423  }
424 
425  // and check whether the dimension of its homogeneity space
426  // equals the dimension of the tropical variety
427  gfan::ZCone zc = linealitySpaceOfGroebnerFan(inJ,s);
428  if (zc.dimension()>=currentStrategy.getExpectedDimension())
429  { // this shouldn't happen as trivial cases should be caught beforehand
430  // this is the case that the tropical variety consists soely out of the lineality space
432  if (mon)
433  {
434  groebnerCone emptyCone = groebnerCone();
435  p_Delete(&mon,r);
436  return emptyCone;
437  }
438  groebnerCone startingCone(I,inJ,s,currentStrategy);
439  id_Delete(&inJ,s);
440  rDelete(s);
441  return startingCone;
442  }
443 
444  // compute a point in the tropical variety outside the lineality space
445  // compute the initial ideal with respect to the weight
446  std::pair<gfan::ZVector,groebnerCone> startingData = tropicalStartingDataViaGroebnerFan(inJ,s,currentStrategy);
447  gfan::ZVector startingPoint = startingData.first;
448  groebnerCone ambientMaximalCone = groebnerCone(startingData.second);
449  id_Delete(&inJ,s); rDelete(s);
450  inJ = ambientMaximalCone.getPolynomialIdeal();
451  s = ambientMaximalCone.getPolynomialRing();
452  inJ = initial(inJ,s,startingPoint);
453  ideal inI = initial(I,r,startingPoint);
454  zc = linealitySpaceOfGroebnerFan(inJ,s);
455 
456  // and check whether the dimension of its homogeneity space
457  // equals the dimension of the tropical variety
458  if (zc.dimension()==currentStrategy.getExpectedDimension())
459  { // this case shouldn't happen as trivial cases should be caught beforehand
460  // this is the case that the tropical variety has a one-codimensional lineality space
461  ideal J = lift(I,r,inJ,s); // todo: use computeLift from tropicalStrategy
462  groebnerCone startingCone(J,inJ,s,currentStrategy);
463  id_Delete(&inJ,s);
464  id_Delete(&J,s);
465  return startingCone;
466  }
467 
468  // from this point on, inJ contains the uniformizing parameter,
469  // hence it contains a monomial if and only if its residue over the residue field does.
470  // so we will switch to the residue field
471  ring rShortcut = rCopy0(r);
472  nKillChar(rShortcut->cf);
473  rShortcut->cf = nCopyCoeff((currentStrategy.getShortcutRing())->cf);
474  rComplete(rShortcut);
475  rTest(rShortcut);
476  k = IDELEMS(inJ);
477  ideal inJShortcut = idInit(k);
478  nMapFunc takingResidues = n_SetMap(s->cf,rShortcut->cf);
479  for (int i=0; i<k; i++)
480  {
481  if(inJ->m[i]!=NULL)
482  {
483  inJShortcut->m[i] = p_PermPoly(inJ->m[i],NULL,s,rShortcut,takingResidues,NULL,0);
484  }
485  }
486  idSkipZeroes(inJShortcut);
487  id_Delete(&inJ,s);
488 
489  // we are interested in a maximal cone of the tropical variety of inJShortcut
490  // this basically equivalent to the case without valuation (or constant coefficient case)
491  // except that our ideal is still only homogeneous in the later variables,
492  // hence we set the optional parameter completelyHomogeneous as 'false'
493  tropicalStrategy shortcutStrategy(inJShortcut,rShortcut,false);
494  groebnerCone startingConeShortcut = tropicalStartingCone(shortcutStrategy);
495  id_Delete(&inJShortcut,rShortcut); rDelete(rShortcut);
496 
497  // now we need to obtain the initial of the residue of inJ
498  // with respect to a weight in the tropical cone,
499  // and obtain the initial of inJ with respect to the same weight
500  ring sShortcut = startingConeShortcut.getPolynomialRing();
501  inJShortcut = startingConeShortcut.getPolynomialIdeal();
502  gfan::ZCone zd = startingConeShortcut.getPolyhedralCone();
503  gfan::ZVector interiorPoint = startingConeShortcut.getInteriorPoint();
504  inJShortcut = initial(inJShortcut,sShortcut,interiorPoint);
505  inI = initial(inI,r,interiorPoint);
506 
507  s = rCopy0(sShortcut); // s will be a ring over the valuation ring
508  nKillChar(s->cf); // with the same ordering as sShortcut
509  s->cf = nCopyCoeff(r->cf);
510  rComplete(s);
511  rTest(s);
512 
513  k = IDELEMS(inJShortcut); // inJ will be overwritten with initial of inJ
514  inJ = idInit(k+1);
515  inJ->m[0] = p_One(s); // with respect to that weight
516  identityMap = n_SetMap(r->cf,s->cf); // first element will obviously be p
517  p_SetCoeff(inJ->m[0],identityMap(currentStrategy.getUniformizingParameter(),r->cf,s->cf),s);
518  nMapFunc findingRepresentatives = n_SetMap(sShortcut->cf,s->cf);
519  for (int i=0; i<k; i++) // and then come the rest
520  {
521  if(inJShortcut->m[i]!=NULL)
522  {
523  inJ->m[i+1] = p_PermPoly(inJShortcut->m[i],NULL,sShortcut,s,findingRepresentatives,NULL,0);
524  }
525  }
526 
527  ideal J = currentStrategy.computeLift(inJ,s,inI,I,r);
528  // currentStrategy.reduce(J,s);
529  groebnerCone startingCone(J,inJ,s,currentStrategy);
530  id_Delete(&inJ,s);
531  id_Delete(&J,s);
532  rDelete(s);
533  id_Delete(&inI,r);
534 
535  // assume(checkContainmentInTropicalVariety(startingCone));
536  return startingCone;
537  }
538 }
539 
541 {
542  leftv u = args;
543  if ((u != NULL) && (u->Typ() == IDEAL_CMD))
544  {
545  ideal I = (ideal) u->CopyD();
546  leftv v = u->next;
547  if ((v != NULL) && (v->Typ() == NUMBER_CMD))
548  {
549  number p = (number) v->Data();
550  leftv w = v->next;
551  if (w==NULL)
552  {
553  tropicalStrategy currentStrategy(I,p,currRing);
554  groebnerCone sigma = tropicalStartingCone(currentStrategy);
555  gfan::ZCone* startingCone = new gfan::ZCone(sigma.getPolyhedralCone());
556  res->rtyp = coneID;
557  res->data = (char*) startingCone;
558  return FALSE;
559  }
560  }
561  else
562  {
563  if (v==NULL)
564  {
565  tropicalStrategy currentStrategy(I,currRing);
566  groebnerCone sigma = tropicalStartingCone(currentStrategy);
567  res->rtyp = coneID;
568  res->data = (char*) new gfan::ZCone(sigma.getPolyhedralCone());
569  return FALSE;
570  }
571  }
572  }
573  WerrorS("tropicalStartingCone: unexpected parameters");
574  return TRUE;
575 }
BOOLEAN negativeTropicalStartingPoint(leftv res, leftv args)
implementation of the class tropicalStrategy
ring getShortcutRing() const
const CanonicalForm int s
Definition: facAbsFact.cc:55
gfan::ZCone getPolyhedralCone() const
Definition: groebnerCone.h:65
Class used for (list of) interpreter objects.
Definition: subexpr.h:84
gfan::ZCone groebnerCone(const ideal I, const ring r, const gfan::ZVector &w)
Definition: tropical.cc:156
ring getPolynomialRing() const
Definition: groebnerCone.h:64
gfan::ZFan * groebnerFan(const tropicalStrategy currentStrategy)
Definition: groebnerFan.cc:28
BOOLEAN positiveTropicalStartingPoint(leftv res, leftv args)
BOOLEAN nonPositiveTropicalStartingPoint(leftv res, leftv args)
#define FALSE
Definition: auxiliary.h:97
return P p
Definition: myNF.cc:203
static void p_GetExpV(poly p, int *ev, const ring r)
Definition: p_polys.h:1443
#define omFreeSize(addr, size)
Definition: omAllocDecl.h:260
static short rVar(const ring r)
#define rVar(r) (r->N)
Definition: ring.h:580
void id_Delete(ideal *h, ring r)
deletes an ideal/module/matrix
ring getStartingRing() const
returns the polynomial ring over the valuation ring
#define TRUE
Definition: auxiliary.h:101
groebnerCone tropicalStartingCone(const tropicalStrategy &currentStrategy)
g
Definition: cfModGcd.cc:4031
void WerrorS(const char *s)
Definition: feFopen.cc:24
int k
Definition: cfEzgcd.cc:93
static gfan::ZCone linealitySpaceOfGroebnerFan(const ideal I, const ring r)
number getUniformizingParameter() const
returns the uniformizing parameter in the valuation ring
bigintmat * zVectorToBigintmat(const gfan::ZVector &zv)
int Typ()
Definition: subexpr.cc:979
#define omAlloc(size)
Definition: omAllocDecl.h:210
static number p_SetCoeff(poly p, number n, ring r)
Definition: p_polys.h:407
gfan::ZVector tropicalPoint() const
Returns a point in the tropical variety, if the groebnerCone contains one.
std::set< groebnerCone, groebnerCone_compare > groebnerCones
Definition: groebnerCone.h:24
void * data
Definition: subexpr.h:90
#define pIter(p)
Definition: monomials.h:44
ideal lift(const ideal J, const ring r, const ideal inI, const ring s)
Definition: lift.cc:24
poly res
Definition: myNF.cc:322
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:32
ring currRing
Widely used global variable which specifies the current polynomial ring for Singular interpreter and ...
Definition: polys.cc:10
groebnerCones groebnerNeighbours() const
Returns a complete list of neighboring Groebner cones.
const ring r
Definition: syzextra.cc:208
poly p_PermPoly(poly p, const int *perm, const ring oldRing, const ring dst, nMapFunc nMap, const int *par_perm, int OldPar, BOOLEAN use_mult)
Definition: p_polys.cc:3939
poly p_One(const ring r)
Definition: p_polys.cc:1313
bool isValuationTrivial() const
BOOLEAN rComplete(ring r, int force)
this needs to be called whenever a new ring is created: new fields in ring are created (like VarOffse...
Definition: ring.cc:3435
gfan::ZVector intStar2ZVector(const int d, const int *i)
gfan::ZCone getHomogeneitySpace() const
returns the homogeneity space of the preimage ideal
ring rCopy0(const ring r, BOOLEAN copy_qideal, BOOLEAN copy_ordering)
Definition: ring.cc:1321
ideal getStartingIdeal() const
returns the input ideal
number(* nMapFunc)(number a, const coeffs src, const coeffs dst)
maps "a", which lives in src, into dst
Definition: coeffs.h:73
BOOLEAN tropicalVariety(leftv res, leftv args)
#define rTest(r)
Definition: ring.h:775
std::pair< gfan::ZVector, groebnerCone > tropicalStartingPoint(const ideal I, const ring r, const tropicalStrategy &currentStrategy)
Computes a starting point outside the lineatliy space by traversing the Groebner fan, checking each cone whether it contains a ray in the tropical variety.
Definition: startingCone.cc:27
poly checkForMonomialViaSuddenSaturation(const ideal I, const ring r)
int coneID
Definition: bbcone.cc:26
void tau(int **points, int sizePoints, int k)
int i
Definition: cfEzgcd.cc:123
#define IDELEMS(i)
Definition: simpleideals.h:24
static FORCE_INLINE nMapFunc n_SetMap(const coeffs src, const coeffs dst)
set the mapping function pointers for translating numbers from src to dst
Definition: coeffs.h:725
void idSkipZeroes(ideal ide)
gives an ideal/module the minimal possible size
ideal computeLift(const ideal inJs, const ring s, const ideal inIr, const ideal Ir, const ring r) const
leftv next
Definition: subexpr.h:88
static FORCE_INLINE coeffs nCopyCoeff(const coeffs r)
"copy" coeffs, i.e. increment ref
Definition: coeffs.h:433
static void p_Delete(poly *p, const ring r)
Definition: p_polys.h:843
ideal idInit(int idsize, int rank)
initialise an ideal / module
Definition: simpleideals.cc:38
const Variable & v
< [in] a sqrfree bivariate poly
Definition: facBivar.h:37
ring rCopy(ring r)
Definition: ring.cc:1619
BOOLEAN rays(leftv res, leftv args)
Definition: bbcone.cc:628
CanonicalForm cf
Definition: cfModGcd.cc:4024
bool reduce(ideal I, const ring r) const
reduces the generators of an ideal I so that the inequalities and equations of the Groebner cone can ...
#define NULL
Definition: omList.c:10
implementation of the class groebnerCone
void rDelete(ring r)
unconditionally deletes fields in r
Definition: ring.cc:448
gfan::ZVector getInteriorPoint() const
Definition: groebnerCone.h:66
BOOLEAN equations(leftv res, leftv args)
Definition: bbcone.cc:548
int getExpectedDimension() const
returns the expected Dimension of the polyhedral output
const CanonicalForm & w
Definition: facAbsFact.cc:55
int rtyp
Definition: subexpr.h:93
std::pair< gfan::ZVector, groebnerCone > tropicalStartingDataViaGroebnerFan(const ideal I, const ring r, const tropicalStrategy &currentStrategy)
Computes a starting point outside the lineatliy space by traversing the Groebner fan, checking each cone whether it contains a ray in the tropical variety.
Definition: startingCone.cc:74
void * Data()
Definition: subexpr.cc:1121
int idElem(const ideal F)
count non-zero elements
polyrec * poly
Definition: hilb.h:10
groebnerCone groebnerStartingCone(const tropicalStrategy &currentStrategy)
Definition: startingCone.cc:15
BOOLEAN nonNegativeTropicalStartingPoint(leftv res, leftv args)
int BOOLEAN
Definition: auxiliary.h:88
void nKillChar(coeffs r)
undo all initialisations
Definition: numbers.cc:490
void * CopyD(int t)
Definition: subexpr.cc:679
ideal getPolynomialIdeal() const
Definition: groebnerCone.h:63