1#ifndef GFANLIB_TROPICALSTRATEGY_H
2#define GFANLIB_TROPICALSTRATEGY_H
4#include "gfanlib/gfanlib_vector.h"
5#include "gfanlib/gfanlib_zcone.h"
32typedef gfan::ZVector (*
wAdjAlg1)(gfan::ZVector);
33typedef gfan::ZVector (*
wAdjAlg2)(gfan::ZVector,gfan::ZVector);
34typedef bool (*
redAlg)(ideal,ring,number);
123 tropicalStrategy(
const ideal I,
const ring r,
const bool completelyHomogeneous=
true,
const bool completeSpace=
true);
265 gfan::ZVector wNeg(
w.size());
270 for (
unsigned i=1;
i<
w.size();
i++)
290 bool reduce(ideal I,
const ring r)
const;
292 void pReduce(ideal I,
const ring r)
const;
318 ideal
computeWitness(
const ideal inJ,
const ideal inI,
const ideal I,
const ring r)
const;
320 ideal
computeLift(
const ideal inJs,
const ring
s,
const ideal inIr,
const ideal Ir,
const ring r)
const;
326 std::pair<ideal,ring>
computeFlip(
const ideal Ir,
const ring r,
const gfan::ZVector &interiorPoint,
const gfan::ZVector &facetNormal)
const;
int expectedDimension
the expected Dimension of the polyhedral output, i.e.
bool homogeneitySpaceContains(const gfan::ZVector &v) const
returns true, if v is contained in the homogeneity space; false otherwise
bool isValuationTrivial() const
ideal getOriginalIdeal() const
returns the input ideal over the field with valuation
bool isValuationNonTrivial() const
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
tropicalStrategy & operator=(const tropicalStrategy ¤tStrategy)
assignment operator
ring copyAndChangeOrderingLS(const ring r, const gfan::ZVector &w, const gfan::ZVector &v) const
void putUniformizingBinomialInFront(ideal I, const ring r, const number q) const
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...
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 ...
gfan::ZCone getHomogeneitySpace() const
returns the homogeneity space of the preimage ideal
bool onlyLowerHalfSpace
true if valuation non-trivial, false otherwise
gfan::ZCone linealitySpace
the homogeneity space of the Grobner fan
int getExpectedDimension() const
returns the expected Dimension of the polyhedral output
ring startingRing
polynomial ring over the valuation ring extended by one extra variable t
ideal originalIdeal
input ideal, assumed to be a homogeneous prime ideal
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...
void pReduce(ideal I, const ring r) const
~tropicalStrategy()
destructor
int findPositionOfUniformizingBinomial(const ideal I, const ring r) 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....
ring shortcutRing
polynomial ring over the residue field
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...
ring getStartingRing() const
returns the polynomial ring over the valuation ring
gfan::ZVector adjustWeightForHomogeneity(gfan::ZVector w) const
Given weight w, returns a strictly positive weight u such that an ideal satisfying the valuation-sepc...
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...
gfan::ZVector negateWeight(const gfan::ZVector &w) const
number uniformizingParameter
uniformizing parameter in the valuation ring
ring copyAndChangeCoefficientRing(const ring r) const
ring copyAndChangeOrderingWP(const ring r, const gfan::ZVector &w, const gfan::ZVector &v) const
ideal computeLift(const ideal inJs, const ring s, const ideal inIr, const ideal Ir, const ring r) const
ideal startingIdeal
preimage of the input ideal under the map that sends t to the uniformizing parameter
bool checkForUniformizingParameter(const ideal inI, const ring r) const
if valuation non-trivial, checks whether the genearting system contains p otherwise returns true
ideal getStartingIdeal() const
returns the input ideal
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 computeStdOfInitialIdeal(const ideal inI, const ring r) const
given generators of the initial ideal, computes its standard basis
ring getOriginalRing() const
returns the polynomial ring over the field with valuation
number getUniformizingParameter() const
returns the uniformizing parameter in the valuation ring
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...
bool checkForUniformizingBinomial(const ideal I, const ring r) const
if valuation non-trivial, checks whether the generating system contains p-t otherwise returns true
ring getShortcutRing() const
int getExpectedAmbientDimension() const
ring originalRing
polynomial ring over a field with valuation
#define n_Test(a, r)
BOOLEAN n_Test(number a, const coeffs r)
const CanonicalForm int s
const Variable & v
< [in] a sqrfree bivariate poly
static short rVar(const ring r)
#define rVar(r) (r->N)
gfan::ZVector(* wAdjAlg2)(gfan::ZVector, gfan::ZVector)
gfan::ZVector(* wAdjAlg1)(gfan::ZVector)
bool(* redAlg)(ideal, ring, number)