7#define TRANSEXT_PRIVATES
46 int *perm,
int *par_perm,
int P,
nMapFunc nMap)
52 && rIsPluralRing(preimage_r))
61 for(;
i<=preimage_r->N;
i++)
63 if (perm[prev_nonnull] > perm[
i])
67 Warn(
"imap not usable for permuting variables, use map (%s <-> %s)", preimage_r->names[prev_nonnull-1],preimage_r->names[
i-1]);
79 int N = preimage_r->N;
85 if (par_perm!=
NULL)
for(
i=0;
i<P;
i++)
Print(
"%d -> %d ",
i,par_perm[
i]);
106 number a = nMap((number)data, preimage_r->cf,
currRing->cf);
158 p_Test((poly)data,preimage_r);
171 int C=((
matrix)data)->cols();
179 tmpR=((
map)data)->preimage;
190 for (
i=
R*C-1;
i>=0;
i--)
199 nMap,par_perm,P,use_mult);
206 for (
i=
R*C-1;
i>=0;
i--)
215 ((
map)data)->preimage=tmpR;
232 for(
i=0;
i<=
l->nr;
i++)
238 preimage_r,perm,par_perm,P,nMap))
251 res->data=(
char *)ml;
277 theMapI->m[
i-1] = p_Copy(image,
currRing);
283 theMap->preimage=
NULL;
296 number d = n_GetDenom(pGetCoeff(
p),
currRing->cf);
303 else if (!p_IsConstant((poly)
NUM((fraction)d),
R))
305 WarnS(
"ignoring denominators of coefficients...");
309 number
num = n_GetNumerator(pGetCoeff(
p),
currRing->cf);
310 memset(&tmpW,0,
sizeof(
sleftv));
335 poly ppp =
pMult((poly)(
v->data),
pp);
347 number
num = n_GetNumerator(pGetCoeff(
p),
currRing->cf);
348 memset(&tmpW,0,
sizeof(
sleftv));
367 poly ppp =
pMult((poly)(
v->data),
pp);
375 WerrorS(
"cannot apply subst for these coefficients");
391 res->rank =
id->rank;
433 res->rank =
id->rank;
446 res->rank =
id->rank;
const CanonicalForm CFMap CFMap & N
CanonicalForm map(const CanonicalForm &primElem, const Variable &alpha, const CanonicalForm &F, const Variable &beta)
map from to such that is mapped onto
Class used for (list of) interpreter objects.
void Clean(ring r=currRing)
INLINE_THIS void Init(int l=0)
Coefficient rings, fields and other domains suitable for Singular polynomials.
static FORCE_INLINE BOOLEAN nCoeff_is_Extension(const coeffs r)
number ndCopyMap(number a, const coeffs src, const coeffs dst)
#define n_Test(a, r)
BOOLEAN n_Test(number a, const coeffs r).
static FORCE_INLINE BOOLEAN nCoeff_is_algExt(const coeffs r)
TRUE iff r represents an algebraic extension field.
@ n_rep_poly
(poly), see algext.h
@ n_rep_rat_fct
(fraction), see transext.h
number(*) nMapFunc(number a, const coeffs src, const coeffs dst)
maps "a", which lives in src, into dst
const CanonicalForm int s
const Variable & v
< [in] a sqrfree bivariate poly
void WerrorS(const char *s)
poly maMapPoly(const poly map_p, const ring map_r, const ideal image_id, const ring image_r, const nMapFunc nMap)
polynomial map for poly (vector) map_p: the poly (vector) to map map_r: the base ring for map_p image...
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)
const char * Tok2Cmdname(int tok)
#define idDelete(H)
delete an ideal
EXTERN_VAR omBin sleftv_bin
poly maEval(map theMap, poly p, ring preimage_r, nMapFunc nMap, ideal s, const ring dst_r)
int maMaxDeg_Ma(ideal a, ring preimage_r)
poly p_MinPolyNormalize(poly p, const ring r)
poly pSubstPoly(poly p, int var, poly image)
ideal idSubstPoly(ideal id, int n, poly e)
BOOLEAN maApplyFetch(int what, map theMap, leftv res, leftv w, ring preimage_r, int *perm, int *par_perm, int P, nMapFunc nMap)
ideal idSubstPar(ideal id, int n, poly e)
poly pSubstPar(poly p, int par, poly image)
matrix mpNew(int r, int c)
create a r x c zero-matrix
#define omFreeBin(addr, bin)
poly n_PermNumber(const number z, const int *par_perm, const int, const ring src, const ring dst)
poly p_PermPoly(poly p, const int *perm, const ring oldRing, const ring dst, nMapFunc nMap, const int *par_perm, int OldPar, BOOLEAN use_mult)
void p_Normalize(poly p, const ring r)
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 pHead(p)
returns newly allocated copy of Lm(p), coef is copied, next=NULL, p might be NULL
#define pSetCoeff(p, n)
deletes old coeff before setting the new one
#define pCopy(p)
return a copy of the poly
poly prCopyR(poly p, ring src_r, ring dest_r)
void PrintS(const char *s)
poly sBucketPeek(sBucket_pt b)
ideal idInit(int idsize, int rank)
initialise an ideal / module
ideal id_PermIdeal(ideal I, int R, int C, const int *perm, const ring src, const ring dst, nMapFunc nMap, const int *par_perm, int P, BOOLEAN use_mult)
mapping ideals/matrices to other rings