58 mipo=
mipo (x, alpha);
66 if (degg >= 8 || degmipo >= 8)
84 mipo=
mipo (x, alpha);
88 int degmipo=
degree (mipo);
92 if (degg >= 8 || degmipo >= 8)
111 g= F (y - i*alpha, y);
115 if (degg >= 8 || degmipo >= 8)
124 g= F (y + i*alpha, y);
128 if (degg >= 8 || degmipo >= 8)
157 int shift= 0, k= 0,
count= 0;
164 bool shiftBuf=
false;
170 for (iter= tmp; iter.
hasItem(); iter++)
177 f= oldF (y - shift*alpha, y);
181 norm= Norm (f, alpha);
183 ASSERT (
degree (norm, alpha) <= 0,
"wrong norm computed");
192 if (normFactors.
getFirst().factor().inCoeffDomain())
194 if (normFactors.
length() < 2 && normFactors.
getLast().exp() == 1)
202 if (!(normFactors.
length() == 2 &&
233 factor=
factor (y + shift*alpha, y);
247 if (normFactors.
getLast().exp() == 1)
248 factors.
append (buf (y + shift*alpha, y));
250 tmp2.
append (buf (y + shift*alpha, y));
254 if (normFactors.
getLast().exp() == 1)
391 if (i.getItem().factor().inCoeffDomain())
continue;
395 "time to factor sqrf factors in Q(a)[x]: ");
396 for (j= factorsSqrf; j.
hasItem(); j++)
TIMING_END_AND_PRINT(fac_alg_resultant, "time to compute resultant0: ")
int status int void size_t count
functions to print debug output
TIMING_START(fac_alg_resultant)
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
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 Norm(const CanonicalForm &F
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
static CFFList sqrfNorm(const CanonicalForm &f, const CanonicalForm &PPalpha, const Variable &Extension, CanonicalForm &s, CanonicalForm &g, CanonicalForm &R)
see norm, R is guaranteed to be squarefree Based on Trager's sqrf_norm algorithm. ...
CFFList AlgExtFactorize(const CanonicalForm &F, const Variable &alpha)
factorize a univariate polynomial over algebraic extension of Q
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.
#define ASSERT(expression, message)
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)