40 for (
j = 1;
j < r;
j++ )
47 for (
j = 1;
j <= r;
j++ )
55 for (
int i = 1;
i <= r;
i++ )
68 else if (
f.degree(
x ) < n )
80 for (
j =
i.exp();
j >
min;
j-- )
93 for (
i =
k-1;
i >= 2 && !
dW.isZero();
i-- )
95 if ( !
dW.isZero() ) {
97 for (
i = 2;
i <
k;
i++ )
98 for (
j = 2;
j <= e[
i];
j++ )
109 for (
int i =
k-1;
i > 1;
i-- )
131 for (
int i = 2;
i <
k;
i++ )
143 for (
int i = 2;
i <
k;
i++ )
151findCorrCoeffs (
const CFArray & P,
const CFArray &
Q,
const CFArray &
P0,
const CFArray &
Q0,
const CFArray & S,
const CFArray &
T,
const CanonicalForm & C,
const Evaluation &
I,
const modpk & pk,
int r,
int k,
int h,
int * n )
159 C0 = pk(
I( C, 2,
k-1 ),
true );
163 DEBOUTLN(
cerr,
"trying to find correction coefficients for " << C );
166 for (
i = 1;
i <= r;
i++ )
168 DEBOUTLN(
cerr,
"the first approximation of the correction coefficients is " <<
A );
172 DEBOUTLN(
cerr,
"there is an error detected, the correction coefficients do not" );
178 for (
m = 0;
m <=
h && (
m == 0 ||
Dm != 0 );
m++ )
188 for (
i = 1;
i <= r;
i++ )
199 if ( !
g.isZero() && ! (
g.mvar() >
Variable(1)) )
206 for (
i = 1;
i <= r;
i++ )
217 DEBOUTLN(
cerr,
"the correction coefficients at step " <<
m );
221 DEBOUTLN(
cerr,
"there is an error detected, the correction coefficients do not" );
237 CFArray K( 1, r ),
Q( 1, r ),
Q0( 1, r ),
P0( 1, r ), S( 1, r ),
T( 1, r ),
alpha( 1, r );
245 DEBOUTLN(
cerr,
"modulus p^k= " <<
b.getpk() <<
"=" <<
b.getp() <<
"^"<<
b.getk() );
247 for (
i = 1;
i <= r;
i++ )
252 P[
i] =
A( K[
i],
k, t );
260 for (
i = r;
i > 1;
i-- )
262 Q[
i-1] =
Q[
i] * P[
i];
263 P0[
i] =
A( P[
i], 2,
k-1 );
267 P0[1] =
A( P[1], 2,
k-1 );
268 Q0[1] =
A(
Q[1], 2,
k-1 );
272 for (
m = 1;
m <= n[
k]+1;
m++ )
280 DEBOUTLN(
cerr,
"something seems not to be ok with Rm which is " <<
Rm );
288 for (
i = 2;
i <=
m;
i++ )
D *=
i;
292 alpha =
findCorrCoeffs( P,
Q,
P0,
Q0, S,
T, C,
A,
b, r,
k,
h, n );
303 for (
i = 1;
i <= r;
i++ )
310 for (
i = 1;
i <= r;
i++ )
312 if (
prod( K ) -
Uk != 0 )
314 DEBOUTLN(
cerr,
"the liftstep produced the wrong result" );
315 DEBOUTLN(
cerr,
"the product of the factors calculated so far is " <<
prod(K) );
316 DEBOUTLN(
cerr,
"and the Uk that should have been reached is " <<
Uk );
329 int k,
i,
h, t =
A.max();
332 int * n =
new int[t+1];
335 for (
k = t-1;
k > 1;
k-- )
343 for (
i =
A.min();
i <=
k;
i++ )
static int Hensel(const CanonicalForm &UU, CFArray &G, const Evaluation &AA, const CFArray &LeadCoeffs)
void tau(int **points, int sizePoints, int k)
CanonicalForm extgcd(const CanonicalForm &f, const CanonicalForm &g, CanonicalForm &a, CanonicalForm &b)
CanonicalForm extgcd ( const CanonicalForm & f, const CanonicalForm & g, CanonicalForm & a,...
CanonicalForm binomialpower(const Variable &, const CanonicalForm &, int)
evaluate polynomials at points
Iterators for CanonicalForm's.
static CanonicalForm bound(const CFMatrix &M)
class to iterate through CanonicalForm's
class to evaluate a polynomial at points
bool iterations_left() const
factory's class for variables
class to do operations mod p^k for int's p and k
functions to print debug output
#define DEBINCLEVEL(stream, msg)
#define DEBOUTLN(stream, objects)
#define DEBDECLEVEL(stream, msg)
const CanonicalForm int s
const Variable & v
< [in] a sqrfree bivariate poly
CanonicalForm remainder(const CanonicalForm &f, const CanonicalForm &g, const modpk &pk)
CanonicalForm replaceLc(const CanonicalForm &f, const CanonicalForm &c)
operations mod p^k and some other useful functions for factorization
static int min(int a, int b)
#define TIMING_DEFINE_PRINT(t)