39 for (i= Inputlist; i.
hasItem() ; i++)
57 for (i= Inputlist1; i.
hasItem(); i++)
59 for (i= Inputlist2; i.
hasItem() ; i++)
113 while (result.
level() > lev)
132 for (; i.
hasItem() && j.hasItem(); i++, j++, count++)
134 if (length - count == 2)
136 if (!isFunctionField)
170 if (!isFunctionField)
211 if (n == 0 || n > F.
level())
229 for (;j < termCount; j++, i++)
235 while ((exp >= p) && (exp != 0) && (exp % p == 0))
248 for (; i.hasTerms(); i++)
253 else if (tmp != -1 && pExp != -1)
254 pExp= (pExp < tmp) ? pExp : tmp;
266 int pToExp=
ipower (p, exp);
270 result +=
i.coeff()*
power (x,
i.exp()/pToExp);
276 if (n == 0 || exps <= 0 || F.
level() <
n)
294 int pToExp=
ipower (p, exp);
298 result +=
i.coeff()*
power (x,
i.exp()*pToExp);
304 if (n == 0 || exps <= 0 || F.
level() <
n)
421 ASSERT( x.
level() > 0,
"type error: polynomial variable expected" );
431 if (X.level() < x.
level())
438 int fDegree=
degree (F, X);
439 int gDegree=
degree (G, X);
440 if (fDegree < 0 || fDegree < gDegree)
448 multiplier=
power (LCG, fDegree - gDegree + 1);
449 divrem (multiplier*F, G, q, r);
464 if ((vf = f.
mvar()) < (vg = g.
mvar()))
496 while ((dg <= df) && (!ff.
isZero()))
498 test= gg*
LC (ff)*
power (v, df - dg);
515 q= (m*f - retvalue)/g;
537 r=
Sprem (ff, f, m, q);
570 int k= 1,
m= 1, length= degreelist.
length();
573 for (i= degreelist; i.
hasItem(); i++)
576 while (q <= ((n*
m)*(n*m)/2))
584 for (i= degreelist; i.
hasItem(); i++)
629 Hi=
power (
LC (pi1, x), delta);
635 while (
degree (pi1,x) > 0)
637 psqr (pi, pi1, q, pi2, m, x);
650 bi=
LC (pi, x)*
power (Hi, delta);
652 bi= -
LC (pi, x)*
power (Hi, delta);
669 int lastExp = i.
exp();
675 if ((lastExp - i_exp) == 1)
682 result *=
power (g, lastExp - i_exp);
683 result /=
power (h, lastExp - i_exp);
685 result += i.
coeff()*powH;
691 result *=
power (g, lastExp);
692 result /=
power (h, lastExp);
int status int void size_t count
CFFList append(const CFFList &Inputlist, const CFFactor &TheFactor)
CFArray copy(const CFList &list)
write elements of list into an array
CanonicalForm evaluate(const CanonicalForm &f, const CanonicalForm &g, const CanonicalForm &h, const CanonicalForm &powH)
Utility functions for factorization over algebraic function fields.
CFFList merge(const CFFList &Inputlist1, const CFFList &Inputlist2)
CanonicalForm generateMipo(int degOfExt)
factory's class for variables
const CanonicalForm CFMap CFMap int &both_non_zero int n
int getDegOfExt(IntList °reelist, int n)
CanonicalForm divide(const CanonicalForm &ff, const CanonicalForm &f, const CFList &as)
void psqr(const CanonicalForm &f, const CanonicalForm &g, CanonicalForm &q, CanonicalForm &r, CanonicalForm &multiplier, const Variable &x)
pseudo division of f and g wrt. x s.t. multiplier*f=q*g+r
CanonicalForm deflatePoly(const CanonicalForm &F, int exp)
CanonicalForm alg_lc(const CanonicalForm &f)
bool delta(X x, Y y, D d)
Varlist varsInAs(const Varlist &uord, const CFList &Astar)
CanonicalForm subst(const CanonicalForm &f, const CFList &a, const CFList &b, const CanonicalForm &Rstar, bool isFunctionField)
CF_NO_INLINE int hasTerms() const
check if iterator has reached < the end of CanonicalForm
This file provides utility functions to compute characteristic sets.
CF_NO_INLINE CanonicalForm coeff() const
get the current coefficient
void deflateDegree(const CanonicalForm &F, int &pExp, int n)
static const int SW_RATIONAL
set to 1 for computations over Q
bool isInseparable(const CFList &Astar)
Iterators for CanonicalForm's.
generate random elements in F_p
generate random integers, random elements of finite fields
declarations of higher level algorithms.
CanonicalForm bCommonDen(const CanonicalForm &f)
CanonicalForm bCommonDen ( const CanonicalForm & f )
class to iterate through CanonicalForm's
bool fdivides(const CanonicalForm &f, const CanonicalForm &g)
bool fdivides ( const CanonicalForm & f, const CanonicalForm & g )
const Variable & v
< [in] a sqrfree bivariate poly
generate random irreducible univariate polynomials
int ipower(int b, int m)
int ipower ( int b, int m )
CF_NO_INLINE int exp() const
get the current exponent
void multiplicity(CFFList &factors, const CanonicalForm &F, const CFList &as)
CanonicalForm Prem(const CanonicalForm &F, const CanonicalForm &G)
pseudo remainder of F by G with certain factors of LC (g) cancelled
CanonicalForm find_irreducible(int deg, CFRandom &gen, const Variable &x)
generate a random irreducible polynomial in x of degree deg
CanonicalForm inflatePoly(const CanonicalForm &F, int exp)
CanonicalForm randomIrredpoly(int i, const Variable &x)
computes a random monic irreducible univariate polynomial in x over Fp of degree i via NTL ...
CanonicalForm backSubst(const CanonicalForm &F, const CFList &a, const CFList &b)
#define ASSERT(expression, message)
int hasAlgVar(const CanonicalForm &f, const Variable &v)
int hasVar(const CanonicalForm &f, const Variable &v)
CanonicalForm QuasiInverse(const CanonicalForm &f, const CanonicalForm &g, const Variable &x)
CanonicalForm alg_LC(const CanonicalForm &f, int lev)
CanonicalForm Sprem(const CanonicalForm &f, const CanonicalForm &g, CanonicalForm &m, CanonicalForm &q)