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++)
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)
253 if (n == 0 ||
exps <= 0 || F.
level() < n)
281 if (n == 0 ||
exps <= 0 || F.
level() < n)
304 if (
iter.getItem().factor().inCoeffDomain())
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())
437 if ((
vf =
f.mvar()) < (
vg =
g.mvar()))
469 while ((
dg <=
df) && (!
ff.isZero()))
500 if (
f.inCoeffDomain())
549 while (q <= ((n*
m)*(n*
m)/2))
560 if (
igcd (
k,
i.getItem()) == 1)
639 if (
f.inCoeffDomain())
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)
static CanonicalForm * retvalue
int status int void size_t count