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)
136 if (!isFunctionField)
160 result=
evaluate (result, tmp2, tmp, powj, tmp1.
mvar());
197 if (n == 0 || n > F.
level())
207 for (; i.hasTerms(); i++)
208 g=
igcd (g, i.exp());
212 while ((g >= p) && (g != 0) && (g % p == 0))
225 for (; i.hasTerms(); i++)
230 else if (tmp != -1 && pExp != -1)
231 pExp= (pExp < tmp) ? pExp : tmp;
243 int pToExp=
ipower (p, exp);
247 result +=
i.coeff()*
power (x,
i.exp()/pToExp);
253 if (n == 0 || exps <= 0 || F.
level() < n)
271 int pToExp=
ipower (p, exp);
275 result +=
i.coeff()*
power (x,
i.exp()*pToExp);
281 if (n == 0 || exps <= 0 || F.
level() < n)
398 ASSERT( x.
level() > 0,
"type error: polynomial variable expected" );
408 if (X.level() < x.
level())
415 int fDegree=
degree (F, X);
416 int gDegree=
degree (G, X);
417 if (fDegree < 0 || fDegree < gDegree)
425 multiplier=
power (LCG, fDegree - gDegree + 1);
426 divrem (multiplier*F, G, q, r);
441 if ((vf = f.
mvar()) < (vg = g.
mvar()))
473 while ((dg <= df) && (!ff.
isZero()))
475 test= gg*
LC (ff)*
power (v, df - dg);
492 q= (m*f - retvalue)/g;
514 r=
Sprem (ff, f, m, q);
547 int k= 1,
m= 1, length= degreelist.
length();
550 for (i= degreelist; i.
hasItem(); i++)
553 while (q <= ((n*
m)*(n*m)/2))
561 for (i= degreelist; i.
hasItem(); i++)
606 Hi=
power (
LC (pi1, x), delta);
612 while (
degree (pi1,x) > 0)
614 psqr (pi, pi1, q, pi2, m, x);
627 bi=
LC (pi, x)*
power (Hi, delta);
629 bi= -
LC (pi, x)*
power (Hi, delta);
646 int lastExp = i.
exp();
652 if ((lastExp - i_exp) == 1)
659 result *=
power (g, lastExp - i_exp);
660 result /=
power (h, lastExp - i_exp);
662 result += i.
coeff()*powH;
668 result *=
power (g, lastExp);
669 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
CF_NO_INLINE CanonicalForm coeff() const
get the current coefficient
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)
This file provides utility functions to compute characteristic sets.
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 hasTerms() const
check if iterator has reached < the end of CanonicalForm
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)
CF_NO_INLINE int exp() const
get the current exponent
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)