17 static void find_subst_for_map(
const ring preimage_r,
const ring image_r,
const ideal image,
int &var,poly &
p)
24 if (image->m[i]!=
NULL)
32 || (
p_GetExp(image->m[i],v,image_r)!=1))
88 ideal
maMapIdeal(
const ideal map_id,
const ring preimage_r,
const ideal image_id,
const ring image_r,
const nMapFunc nMap)
108 return id_SubstPoly(map_id,var,p,preimage_r,image_r,nMap);
114 && (map_id->
nrows==1)
115 && (map_id->
rank==1))
125 for(i=
IDELEMS(image_id)-1;i>=0;i--)
128 if ((t==0) || (t>1)) sz_more++;
130 if (((sz_l > sz*2) && (sz_more != 1))||(sz<5))
140 int C=((
matrix)map_id)->cols();
141 int R=((
matrix)map_id)->rows();
143 int N = preimage_r->N;
146 for (i=R*C-1;i>=0;i--)
148 if (map_id->m[i]!=
NULL)
150 m->
m[
i]=
maEval((
map)image_id, map_id->m[i], preimage_r, nMap, (ideal)cache, image_r);
156 ii->
rank=((ideal)map_id)->rank;
CanonicalForm map(const CanonicalForm &primElem, const Variable &alpha, const CanonicalForm &F, const Variable &beta)
map from to such that is mapped onto
#define idDelete(H)
delete an ideal
static int si_min(const int a, const int b)
static FORCE_INLINE BOOLEAN n_IsOne(number n, const coeffs r)
TRUE iff 'n' represents the one element.
number ndCopyMap(number a, const coeffs aRing, const coeffs r)
int maMaxDeg_Ma(ideal a, ring preimage_r)
static number & pGetCoeff(poly p)
return an alias to the leading coefficient of p assumes that p != NULL NOTE: not copy ...
matrix ma_ApplyPermForMap(const matrix to_map, const ring preimage_r, const ideal image, const ring image_r, const nMapFunc nMap)
helper function for maMapIdeal mapping ideal/matrix/module for the case of a permutation: maps the id...
int p_IsUnivariate(poly p, const ring r)
return i, if poly depends only on var(i)
const CanonicalForm CFMap CFMap & N
ideal maMapIdeal(const ideal map_id, const ring preimage_r, const ideal image_id, const ring image_r, const nMapFunc nMap)
polynomial map for ideals/module/matrix map_id: the ideal to map map_r: the base ring for map_id imag...
static long p_GetExp(const poly p, const unsigned long iBitmask, const int VarOffset)
get a single variable exponent : the integer VarOffset encodes:
static BOOLEAN rIsPluralRing(const ring r)
we must always have this test!
number(* nMapFunc)(number a, const coeffs src, const coeffs dst)
maps "a", which lives in src, into dst
void PrintS(const char *s)
ideal fast_map_common_subexp(const ideal map_id, const ring map_r, const ideal image_id, const ring image_r)
static unsigned pLength(poly a)
matrix mpNew(int r, int c)
create a r x c zero-matrix
const Variable & v
< [in] a sqrfree bivariate poly
static void find_subst_for_map(const ring preimage_r, const ring image_r, const ideal image, int &var, poly &p)
ideal id_SubstPoly(ideal id, int var, poly image, const ring preimage_r, const ring image_r, const nMapFunc nMap)
poly maEval(map theMap, poly p, ring preimage_r, nMapFunc nMap, ideal s, const ring dst_r)