42 ASSERT (F.isUnivariate(),
"univariate input expected");
55 mipo= mipo (x, alpha);
59 int degmipo=
degree (mipo);
63 if (degg >= 8 || degmipo >= 8)
79 mipo= mipo (x, alpha);
83 int degmipo=
degree (mipo);
87 if (degg >= 8 || degmipo >= 8)
106 g= F (y - i*alpha, y);
110 if (degg >= 8 || degmipo >= 8)
119 g= F (y + i*alpha, y);
123 if (degg >= 8 || degmipo >= 8)
151 int shift= 0,
k= 0,
count= 0;
158 bool shiftBuf=
false;
164 for (iter= tmp; iter.
hasItem(); iter++)
171 f= oldF (y - shift*alpha, y);
175 norm=
Norm (f, alpha);
177 ASSERT (
degree (norm, alpha) <= 0,
"wrong norm computed");
186 if (normFactors.
getFirst().factor().inCoeffDomain())
188 if (normFactors.
length() < 2 && normFactors.
getLast().exp() == 1)
196 if (!(normFactors.
length() == 2 &&
227 factor=
factor (y + shift*alpha, y);
241 if (normFactors.
getLast().exp() == 1)
242 factors.
append (buf (y + shift*alpha, y));
244 tmp2.
append (buf (y + shift*alpha, y));
248 if (normFactors.
getLast().exp() == 1)
385 if (
i.getItem().factor().inCoeffDomain())
continue;
389 "time to factor sqrf factors in Q(a)[x]: ");
390 for (j= factorsSqrf; j.
hasItem(); j++)
int status int void size_t count
const CanonicalForm int const CFList const Variable & y
static CanonicalForm Norm(const CanonicalForm &F, const Variable &alpha)
functions to print debug output
#define TIMING_END_AND_PRINT(t, msg)
Univariate factorization over algebraic extension of Q using Trager's algorithm.
CFFList sqrFreeZ(const CanonicalForm &a)
factory's class for variables
static const int SW_USE_NTL_SORT
set to 1 to sort factors in a factorization
CFList AlgExtSqrfFactorize(const CanonicalForm &F, const Variable &alpha)
factorize a univariate squarefree polynomial over algebraic extension of Q
CanonicalForm getMipo(const Variable &alpha, const Variable &x)
CFFList factorize(const CanonicalForm &f, bool issqrfree=false)
factorization over or
CFFList AlgExtFactorize(const CanonicalForm &F, const Variable &alpha)
factorize a univariate polynomial over algebraic extension of Q
static CanonicalForm sqrfNorm(const CanonicalForm &F, const Variable &alpha, int &i)
int status int void * buf
static const int SW_RATIONAL
set to 1 for computations over Q
generate random integers, random elements of finite fields
declarations of higher level algorithms.
CanonicalForm bCommonDen(const CanonicalForm &f)
CanonicalForm bCommonDen ( const CanonicalForm & f )
CanonicalForm resultantZ(const CanonicalForm &A, const CanonicalForm &B, const Variable &x, bool prob)
modular resultant algorihtm over Z
This file provides utility functions for bivariate factorization.
modular resultant algorithm as described by G.
static CFFList norm(const CanonicalForm &f, const CanonicalForm &PPalpha, CFGenerator &myrandom, CanonicalForm &s, CanonicalForm &g, CanonicalForm &R, bool proof)
compute the norm R of f over PPalpha, g= f (x-s*alpha) if proof==true, R is squarefree and if in addi...
#define ASSERT(expression, message)
TIMING_DEFINE_PRINT(fac_alg_resultant) TIMING_DEFINE_PRINT(fac_alg_norm) TIMING_DEFINE_PRINT(fac_alg_factor_norm) TIMING_DEFINE_PRINT(fac_alg_gcd) TIMING_DEFINE_PRINT(fac_alg_sqrf) TIMING_DEFINE_PRINT(fac_alg_factor_sqrf) TIMING_DEFINE_PRINT(fac_alg_time_shift) static CanonicalForm uniSqrfPart(const CanonicalForm &F)
CanonicalForm resultant(const CanonicalForm &f, const CanonicalForm &g, const Variable &x)
CanonicalForm resultant ( const CanonicalForm & f, const CanonicalForm & g, const Variable & x ) ...
squarefree part and factorization over Q, Q(a)