39 for (
i= Inputlist;
i.hasItem() ;
i++)
57 for (
i= Inputlist1;
i.hasItem();
i++)
58 Outputlist=
append (Outputlist,
i.getItem());
59 for (
i= Inputlist2;
i.hasItem() ;
i++)
60 Outputlist=
append (Outputlist,
i.getItem());
92#if defined(HAVE_NTL) || defined(HAVE_FLINT)
113 while (
result.level() > lev)
124 ASSERT ((a.
length() - 1)*4 ==
b.length() || (a.
length() == 1 &&
b.length() == 2),
"wrong length of lists");
126 ASSERT ((a.
length() - 1)*2 ==
b.length() || (a.
length() == 1 &&
b.length() == 1),
"lists of equal length expected");
134 for (;
i.hasItem() &&
j.hasItem();
i++,
j++)
136 if (!isFunctionField)
180 ASSERT (a.
length() ==
b.length() - 1,
"wrong length of lists in backSubst");
197 if (n == 0 || n > F.
level())
207 for (;
i.hasTerms();
i++)
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;
253 if (n == 0 || exps <= 0 || F.
level() < n)
281 if (n == 0 || exps <= 0 || F.
level() < n)
324 if (
f.inBaseDomain())
326 if (
f.inCoeffDomain())
332 if (
f.inPolyDomain())
347 if (
f.inBaseDomain())
349 if (
f.inCoeffDomain())
355 if (
f.inPolyDomain())
372 if (
f.inBaseDomain())
378 if (
f.inPolyDomain())
394 ASSERT(
x.
level() > 0,
"type error: polynomial variable expected" );
395 ASSERT( !
g.isZero(),
"math error: division by zero" );
400 if (
f.level() >
g.level())
411 int fDegree=
degree (F, X);
413 if (fDegree < 0 || fDegree < gDegree)
421 multiplier=
power (LCG, fDegree - gDegree + 1);
422 divrem (multiplier*F,
G, q, r);
437 if ((vf =
f.mvar()) < (vg =
g.mvar()))
469 while ((dg <= df) && (!ff.
isZero()))
488 q= (
m*
f - retvalue)/
g;
500 if (
f.inCoeffDomain())
546 for (
i= degreelist;
i.hasItem();
i++)
549 while (q <= ((n*
m)*(n*
m)/2))
557 for (
i= degreelist;
i.hasItem();
i++)
560 if (
igcd (
k,
i.getItem()) == 1)
639 if (
f.inCoeffDomain())
642 int lastExp =
i.exp();
648 if ((lastExp - i_exp) == 1)
677 if (
f.inCoeffDomain())
CanonicalForm Prem(const CanonicalForm &F, const CanonicalForm &G)
pseudo remainder of F by G with certain factors of LC (g) cancelled
This file provides utility functions to compute characteristic sets.
CanonicalForm bCommonDen(const CanonicalForm &f)
CanonicalForm bCommonDen ( const CanonicalForm & f )
bool fdivides(const CanonicalForm &f, const CanonicalForm &g)
bool fdivides ( const CanonicalForm & f, const CanonicalForm & g )
declarations of higher level algorithms.
#define ASSERT(expression, message)
static const int SW_RATIONAL
set to 1 for computations over Q
CanonicalForm randomIrredpoly(int i, const Variable &x)
computes a random monic irreducible univariate polynomial in x over Fp of degree i via NTL/FLINT
generate random irreducible univariate polynomials
CanonicalForm find_irreducible(int deg, CFRandom &gen, const Variable &x)
generate a random irreducible polynomial in x of degree deg
Iterators for CanonicalForm's.
generate random integers, random elements of finite fields
int ipower(int b, int m)
int ipower ( int b, int m )
class to iterate through CanonicalForm's
generate random elements in F_p
factory's class for variables
Varlist varsInAs(const Varlist &uord, const CFList &Astar)
CFFList merge(const CFFList &Inputlist1, const CFFList &Inputlist2)
void deflateDegree(const CanonicalForm &F, int &pExp, int n)
CanonicalForm alg_lc(const CanonicalForm &f)
CanonicalForm alg_LC(const CanonicalForm &f, int lev)
CanonicalForm divide(const CanonicalForm &ff, const CanonicalForm &f, const CFList &as)
int hasVar(const CanonicalForm &f, const Variable &v)
CanonicalForm Sprem(const CanonicalForm &f, const CanonicalForm &g, CanonicalForm &m, CanonicalForm &q)
CanonicalForm inflatePoly(const CanonicalForm &F, int exp)
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
int hasAlgVar(const CanonicalForm &f, const Variable &v)
int getDegOfExt(IntList °reelist, int n)
bool isInseparable(const CFList &Astar)
CFFList append(const CFFList &Inputlist, const CFFactor &TheFactor)
CanonicalForm backSubst(const CanonicalForm &F, const CFList &a, const CFList &b)
CanonicalForm QuasiInverse(const CanonicalForm &f, const CanonicalForm &g, const Variable &x)
CanonicalForm subst(const CanonicalForm &f, const CFList &a, const CFList &b, const CanonicalForm &Rstar, bool isFunctionField)
CanonicalForm generateMipo(int degOfExt)
CanonicalForm deflatePoly(const CanonicalForm &F, int exp)
CanonicalForm evaluate(const CanonicalForm &f, const CanonicalForm &g, const CanonicalForm &h, const CanonicalForm &powH)
Utility functions for factorization over algebraic function fields.
const Variable & v
< [in] a sqrfree bivariate poly
CFArray copy(const CFList &list)
write elements of list into an array
STATIC_VAR int * multiplicity
static BOOLEAN length(leftv result, leftv arg)
gmp_float exp(const gmp_float &a)
int status int void size_t count