19 ideal J =
id_Copy(I,r);
bool b;
int k = 0;
25 ideal JquotM =
idQuot(Jstd,M,
true,
true);
26 ideal JquotMredJ =
kNF(Jstd,
currRing->qideal,JquotM);
27 b =
idIs0(JquotMredJ);
61 I = (ideal) u->
CopyD();
67 I = (ideal) u->
Data();
93 static inline int* createPermutationVectorForSaturation(
const ring &
r,
const int i)
99 for (; j<=
rVar(
r); j++)
111 static void changePermutationVectorForSaturation(
int* sigma,
const ring &
r,
const int i)
124 static ring permuteWeighstOfRingVariables(
const ring &
r,
const int*
const sigma)
129 s->wvhdl[0][
j] =
r->wvhdl[0][sigma[
j+1]];
130 s->wvhdl[1][
j] =
r->wvhdl[1][sigma[
j+1]];
141 static inline ring createInitialRingForSaturation(
const ring &
r,
const gfan::ZVector &
w,
bool &ok)
146 for (i=0; s->order[
i]; i++)
150 s->order = (
int*)
omAlloc0(3*
sizeof(
int));
152 s->block0 = (
int*)
omAlloc0(3*
sizeof(
int));
154 s->block1 = (
int*)
omAlloc0(3*
sizeof(
int));
156 s->wvhdl = (
int**)
omAlloc0(3*
sizeof(
int*));
160 s->block1[0] =
rVar(
r);
176 static long deriveStandardBasisOfSaturation(ideal &I, ring &
r)
178 long k=0,
l;
poly current;
200 poly checkForMonomialsViaStepwiseSaturation(
const ideal &I,
const gfan::ZVector &
w)
225 ring
s = createInitialRingForSaturation(
currRing, w, b);
228 WerrorS(
"containsMonomial: overflow in weight vector");
const CanonicalForm int s
BOOLEAN checkForMonomial(leftv res, leftv args)
Class used for (list of) interpreter objects.
poly kNF(ideal F, ideal Q, poly p, int syzComp, int lazyReduce)
Compatiblity layer for legacy polynomial operations (over currRing)
ideal id_Copy(ideal h1, const ring r)
copy an ideal
static FORCE_INLINE number n_Init(long i, const coeffs r)
a number representing i in the given coeff field/ring r
#define omFreeSize(addr, size)
static short rVar(const ring r)
#define rVar(r) (r->N)
void id_Delete(ideal *h, ring r)
deletes an ideal/module/matrix
BOOLEAN id_IsConstant(ideal id, const ring r)
test if the ideal has only constant polynomials NOTE: zero ideal/module is also constant ...
ideal kStd(ideal F, ideal Q, tHomog h, intvec **w, intvec *hilb, int syzComp, int newIdeal, intvec *vw, s_poly_proc_t sp)
int * ZVectorToIntStar(const gfan::ZVector &v, bool &overflow)
void WerrorS(const char *s)
ideal idQuot(ideal h1, ideal h2, BOOLEAN h1IsStb, BOOLEAN resultIsIdeal)
static number p_SetCoeff(poly p, number n, ring r)
static long p_SubExp(poly p, int v, long ee, ring r)
ring currRing
Widely used global variable which specifies the current polynomial ring for Singular interpreter and ...
static FORCE_INLINE long n_Int(number &n, const coeffs r)
conversion of n to an int; 0 if not possible in Z/pZ: the representing int lying in (-p/2 ...
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...
static long p_GetExp(const poly p, const unsigned long iBitmask, const int VarOffset)
get a single variable exponent : the integer VarOffset encodes:
ring rCopy0(const ring r, BOOLEAN copy_qideal, BOOLEAN copy_ordering)
poly checkForMonomialViaSuddenSaturation(const ideal I, const ring r)
void rChangeCurrRing(ring r)
static void p_Delete(poly *p, const ring r)
ideal idInit(int idsize, int rank)
initialise an ideal / module
static unsigned long p_SetExp(poly p, const unsigned long e, const unsigned long iBitmask, const int VarOffset)
set a single variable exponent : VarOffset encodes the position in p->exp
static void p_Setm(poly p, const ring r)
BOOLEAN idIs0(ideal h)
returns true if h is the zero ideal
static poly p_Init(const ring r, omBin bin)
void nKillChar(coeffs r)
undo all initialisations
coeffs nInitChar(n_coeffType t, void *parameter)
one-time initialisations for new coeffs in case of an error return NULL