8static poly
p_SubstMon(poly
p,
int var, poly image,
const ring preimage_r,
const ring image_r,
const nMapFunc nMap,
matrix cache)
10 assume(!rIsNCRing(image_r));
11 poly q=
p_NSet(nMap(pGetCoeff(
p),preimage_r->cf,image_r->cf),image_r);
14 for(
i=1;
i<=preimage_r->N;
i++)
16 int pExp=p_GetExp(
p,
i,preimage_r);
19 p_SetExp(q,
i,pExp,image_r);
26 p_LmDelete(q,image_r);
36 h=p_Mult_mm(
h,q,image_r);
37 p_LmDelete(q,image_r);
50 if (rIsNCRing(image_r))
52 if((image_r!=preimage_r)
67 poly q=
p_SubstMon(
p,var,image,preimage_r,image_r,nMap,cache);
78ideal
id_SubstPoly (ideal
id,
int var, poly image,
const ring preimage_r,
const ring image_r,
const nMapFunc nMap)
number(*) nMapFunc(number a, const coeffs src, const coeffs dst)
maps "a", which lives in src, into dst
void WerrorS(const char *s)
ideal id_SubstPoly(ideal id, int var, poly image, const ring preimage_r, const ring image_r, const nMapFunc nMap)
poly p_SubstPoly(poly p, int var, poly image, const ring preimage_r, const ring image_r, const nMapFunc nMap, matrix cache=NULL)
int maMaxDeg_P(poly p, ring preimage_r)
poly maEvalVariable(poly p, int v, int pExp, ideal s, const ring dst_r)
int maMaxDeg_Ma(ideal a, ring preimage_r)
matrix mpNew(int r, int c)
create a r x c zero-matrix
poly p_NSet(number n, const ring r)
returns the poly representing the number n, destroys n
VAR ring currRing
Widely used global variable which specifies the current polynomial ring for Singular interpreter and ...
#define pCopy(p)
return a copy of the poly
void sBucket_Add_p(sBucket_pt bucket, poly p, int length)
adds poly p to bucket destroys p!
sBucket_pt sBucketCreate(const ring r)
void sBucketDestroyAdd(sBucket_pt bucket, poly *p, int *length)
void id_Delete(ideal *h, ring r)
deletes an ideal/module/matrix
static poly p_SubstMon(poly p, int var, poly image, const ring preimage_r, const ring image_r, const nMapFunc nMap, matrix cache)