1 #ifndef GFANLIB_TROPICALSTRATEGY_H
2 #define GFANLIB_TROPICALSTRATEGY_H
4 #include <gfanlib/gfanlib_vector.h>
5 #include <gfanlib/gfanlib_zcone.h>
33 typedef gfan::ZVector (*
wAdjAlg1)(gfan::ZVector);
34 typedef gfan::ZVector (*
wAdjAlg2)(gfan::ZVector,gfan::ZVector);
35 typedef bool (*
redAlg)(ideal,ring,number);
124 tropicalStrategy(
const ideal I,
const ring r,
const bool completelyHomogeneous=
true,
const bool completeSpace=
true);
152 bool b = (uniformizingParameter==
NULL);
157 bool b = (uniformizingParameter!=
NULL);
175 if (originalIdeal)
id_Test(originalIdeal,originalRing);
184 if (startingRing)
rTest(startingRing);
193 if (startingIdeal)
id_Test(startingIdeal,startingRing);
199 return rVar(startingRing);
215 if (uniformizingParameter)
n_Test(uniformizingParameter,startingRing->cf);
221 if (shortcutRing)
rTest(shortcutRing);
238 return linealitySpace.contains(v);
271 gfan::ZVector wNeg(w.size());
276 for (
unsigned i=1;
i<w.size();
i++)
296 bool reduce(ideal I,
const ring r)
const;
298 void pReduce(ideal I,
const ring r)
const;
324 ideal
computeWitness(
const ideal inJ,
const ideal inI,
const ideal I,
const ring r)
const;
326 ideal
computeLift(
const ideal inJs,
const ring
s,
const ideal inIr,
const ideal Ir,
const ring r)
const;
332 std::pair<ideal,ring>
computeFlip(
const ideal Ir,
const ring r,
const gfan::ZVector &interiorPoint,
const gfan::ZVector &facetNormal)
const;
ring getOriginalRing() const
returns the polynomial ring over the field with valuation
const CanonicalForm int s
int findPositionOfUniformizingBinomial(const ideal I, const ring r) const
ideal getOriginalIdeal() const
returns the input ideal over the field with valuation
Class used for (list of) interpreter objects.
bool isValuationNonTrivial() const
ideal computeWitness(const ideal inJ, const ideal inI, const ideal I, const ring r) const
suppose w a weight in maximal groebner cone of > suppose I (initially) reduced standard basis w...
bool(* redAlg)(ideal, ring, number)
gfan::ZVector(* wAdjAlg1)(gfan::ZVector)
static short rVar(const ring r)
#define rVar(r) (r->N)
void pReduce(ideal I, const ring r) const
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 ...
bool onlyLowerHalfSpace
true if valuation non-trivial, false otherwise
gfan::ZVector negateWeight(const gfan::ZVector &w) const
static tropicalStrategy debugStrategy(const ideal startIdeal, number unifParameter, ring startRing)
ring getStartingRing() const
returns the polynomial ring over the valuation ring
int getExpectedDimension() const
returns the expected Dimension of the polyhedral output
ideal startingIdeal
preimage of the input ideal under the map that sends t to the uniformizing parameter ...
~tropicalStrategy()
destructor
ring copyAndChangeCoefficientRing(const ring r) const
number getUniformizingParameter() const
returns the uniformizing parameter in the valuation ring
ideal originalIdeal
input ideal, assumed to be a homogeneous prime ideal
ring getShortcutRing() const
ideal computeStdOfInitialIdeal(const ideal inI, const ring r) const
given generators of the initial ideal, computes its standard basis
ring shortcutRing
polynomial ring over the residue field
ideal getStartingIdeal() const
returns the input ideal
std::pair< ideal, ring > computeFlip(const ideal Ir, const ring r, const gfan::ZVector &interiorPoint, const gfan::ZVector &facetNormal) const
given an interior point of a groebner cone computes the groebner cone adjacent to it ...
ring getShortcutRingPrependingWeight(const ring r, const gfan::ZVector &w) const
If valuation trivial, returns a copy of r with a positive weight prepended, such that any ideal homog...
#define n_Test(a, r)
BOOLEAN n_Test(number a, const coeffs r)
bool homogeneitySpaceContains(const gfan::ZVector &v) const
returns true, if v is contained in the homogeneity space; false otherwise
int getExpectedAmbientDimension() const
void putUniformizingBinomialInFront(ideal I, const ring r, const number q) const
ring copyAndChangeOrderingWP(const ring r, const gfan::ZVector &w, const gfan::ZVector &v) const
gfan::ZVector(* weightAdjustingAlgorithm2)(const gfan::ZVector &v, const gfan::ZVector &w)
A function such that: Given strictly positive weight w and weight v, returns a strictly positive weig...
gfan::ZVector adjustWeightUnderHomogeneity(gfan::ZVector v, gfan::ZVector w) const
Given strictly positive weight w and weight v, returns a strictly positive weight u such that on an i...
gfan::ZCone getHomogeneitySpace() const
returns the homogeneity space of the preimage ideal
bool restrictToLowerHalfSpace() const
returns true, if valuation non-trivial, false otherwise
gfan::ZVector adjustWeightForHomogeneity(gfan::ZVector w) const
Given weight w, returns a strictly positive weight u such that an ideal satisfying the valuation-sepc...
const Variable & v
< [in] a sqrfree bivariate poly
number uniformizingParameter
uniformizing parameter in the valuation ring
ring startingRing
polynomial ring over the valuation ring extended by one extra variable t
ring copyAndChangeOrderingLS(const ring r, const gfan::ZVector &w, const gfan::ZVector &v) const
bool(* extraReductionAlgorithm)(ideal I, ring r, number p)
A function that reduces the generators of an ideal I so that the inequalities and equations of the Gr...
bool checkForUniformizingBinomial(const ideal I, const ring r) const
if valuation non-trivial, checks whether the generating system contains p-t otherwise returns true ...
std::pair< poly, int > checkInitialIdealForMonomial(const ideal I, const ring r, const gfan::ZVector &w=0) const
If given w, assuming w is in the Groebner cone of the ordering on r and I is a standard basis with re...
ideal computeLift(const ideal inJs, const ring s, const ideal inIr, const ideal Ir, const ring r) const
BOOLEAN computeFlipDebug(leftv res, leftv args)
ring originalRing
polynomial ring over a field with valuation
gfan::ZVector(* wAdjAlg2)(gfan::ZVector, gfan::ZVector)
tropicalStrategy & operator=(const tropicalStrategy ¤tStrategy)
assignment operator
gfan::ZCone linealitySpace
the homogeneity space of the Grobner fan
int expectedDimension
the expected Dimension of the polyhedral output, i.e.
bool checkForUniformizingParameter(const ideal inI, const ring r) const
if valuation non-trivial, checks whether the genearting system contains p otherwise returns true ...
gfan::ZVector(* weightAdjustingAlgorithm1)(const gfan::ZVector &w)
A function such that: Given weight w, returns a strictly positive weight u such that an ideal satisfy...
BOOLEAN computeWitnessDebug(leftv res, leftv args)
bool isValuationTrivial() const