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);
147 bool b = (uniformizingParameter==
NULL);
152 bool b = (uniformizingParameter!=
NULL);
170 if (originalIdeal)
id_Test(originalIdeal,originalRing);
179 if (startingRing)
rTest(startingRing);
188 if (startingIdeal)
id_Test(startingIdeal,startingRing);
194 return rVar(startingRing);
210 if (uniformizingParameter)
n_Test(uniformizingParameter,startingRing->cf);
216 if (shortcutRing)
rTest(shortcutRing);
233 return linealitySpace.contains(v);
266 gfan::ZVector wNeg(w.size());
271 for (
unsigned i=1;
i<w.size();
i++)
291 bool reduce(ideal I,
const ring r)
const;
293 void pReduce(ideal I,
const ring r)
const;
319 ideal
computeWitness(
const ideal inJ,
const ideal inI,
const ideal I,
const ring r)
const;
321 ideal
computeLift(
const ideal inJs,
const ring
s,
const ideal inIr,
const ideal Ir,
const ring r)
const;
327 std::pair<ideal,ring>
computeFlip(
const ideal Ir,
const ring r,
const gfan::ZVector &interiorPoint,
const gfan::ZVector &facetNormal)
const;
void putUniformizingBinomialInFront(ideal I, const ring r, const number q) const
ring getShortcutRing() const
const CanonicalForm int s
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...
int findPositionOfUniformizingBinomial(const ideal I, const ring r) const
ring copyAndChangeCoefficientRing(const ring r) const
bool(* redAlg)(ideal, ring, number)
ring getOriginalRing() const
returns the polynomial ring over the field with valuation
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...
gfan::ZVector(* wAdjAlg1)(gfan::ZVector)
static short rVar(const ring r)
#define rVar(r) (r->N)
ring getStartingRing() const
returns the polynomial ring over the valuation ring
int getExpectedAmbientDimension() const
bool onlyLowerHalfSpace
true if valuation non-trivial, false otherwise
number getUniformizingParameter() const
returns the uniformizing parameter in the valuation ring
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 ...
ideal startingIdeal
preimage of the input ideal under the map that sends t to the uniformizing parameter ...
~tropicalStrategy()
destructor
ideal originalIdeal
input ideal, assumed to be a homogeneous prime ideal
bool isValuationTrivial() const
ring shortcutRing
polynomial ring over the residue field
gfan::ZCone getHomogeneitySpace() const
returns the homogeneity space of the preimage ideal
ideal getStartingIdeal() const
returns the input ideal
ring copyAndChangeOrderingLS(const ring r, const gfan::ZVector &w, const gfan::ZVector &v) const
#define n_Test(a, r)
BOOLEAN n_Test(number a, const coeffs r)
void pReduce(ideal I, const ring r) const
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 adjustWeightForHomogeneity(gfan::ZVector w) const
Given weight w, returns a strictly positive weight u such that an ideal satisfying the valuation-sepc...
bool restrictToLowerHalfSpace() const
returns true, if valuation non-trivial, false otherwise
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...
ideal computeLift(const ideal inJs, const ring s, const ideal inIr, const ideal Ir, const ring r) const
ring copyAndChangeOrderingWP(const ring r, const gfan::ZVector &w, const gfan::ZVector &v) const
bool checkForUniformizingBinomial(const ideal I, const ring r) const
if valuation non-trivial, checks whether the generating system contains p-t otherwise returns true ...
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
gfan::ZVector negateWeight(const gfan::ZVector &w) const
bool isValuationNonTrivial() 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(* 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...
ideal getOriginalIdeal() const
returns the input ideal over the field with valuation
int getExpectedDimension() const
returns the expected Dimension of the polyhedral output
bool homogeneitySpaceContains(const gfan::ZVector &v) const
returns true, if v is contained in the homogeneity space; false otherwise
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...
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...
tropicalStrategy(const ideal I, const ring r, const bool completelyHomogeneous=true, const bool completeSpace=true)
Constructor for the trivial valuation case.
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.
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...
ideal computeStdOfInitialIdeal(const ideal inI, const ring r) const
given generators of the initial ideal, computes its standard basis