File indexing completed on 2026-11-07 10:15:16
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012 #ifndef FMPZ_MPOLY_FACTOR_H
0013 #define FMPZ_MPOLY_FACTOR_H
0014
0015 #ifdef FMPZ_MPOLY_FACTOR_INLINES_C
0016 #define FMPZ_MPOLY_FACTOR_INLINE
0017 #else
0018 #define FMPZ_MPOLY_FACTOR_INLINE static inline
0019 #endif
0020
0021 #include "fmpz_poly_factor.h"
0022 #include "fmpz_mpoly.h"
0023
0024 #ifdef __cplusplus
0025 extern "C" {
0026 #endif
0027
0028
0029
0030 void tuple_print(fmpz * alpha, slong n);
0031
0032 void tuple_saturate(fmpz * alpha, slong n, slong m);
0033
0034 void tuple_next(fmpz * alpha, slong n);
0035
0036
0037
0038 FMPZ_MPOLY_FACTOR_INLINE
0039 void fmpz_mpoly_factor_init(fmpz_mpoly_factor_t f, const fmpz_mpoly_ctx_t FLINT_UNUSED(ctx))
0040 {
0041 *f->constant = 1;
0042 *f->constant_den = 1;
0043 f->poly = NULL;
0044 f->exp = NULL;
0045 f->num = 0;
0046 f->alloc = 0;
0047 }
0048
0049 void fmpz_mpoly_factor_init2(fmpz_mpoly_factor_t f,
0050 slong alloc, const fmpz_mpoly_ctx_t ctx);
0051
0052 void fmpz_mpoly_factor_realloc(fmpz_mpoly_factor_t f,
0053 slong alloc, const fmpz_mpoly_ctx_t ctx);
0054
0055 void fmpz_mpoly_factor_fit_length(fmpz_mpoly_factor_t f,
0056 slong len, const fmpz_mpoly_ctx_t ctx);
0057
0058 void fmpz_mpoly_factor_clear(fmpz_mpoly_factor_t f,
0059 const fmpz_mpoly_ctx_t ctx);
0060
0061 FMPZ_MPOLY_FACTOR_INLINE
0062 slong fmpz_mpoly_factor_length(const fmpz_mpoly_factor_t f,
0063 const fmpz_mpoly_ctx_t FLINT_UNUSED(ctx))
0064 {
0065 return f->num;
0066 }
0067
0068 void fmpz_mpoly_factor_get_constant_fmpz(fmpz_t c, const fmpz_mpoly_factor_t f, const fmpz_mpoly_ctx_t FLINT_UNUSED(ctx));
0069 void fmpz_mpoly_factor_get_constant_fmpq(fmpq_t c, const fmpz_mpoly_factor_t f, const fmpz_mpoly_ctx_t FLINT_UNUSED(ctx));
0070
0071 FMPZ_MPOLY_FACTOR_INLINE
0072 void fmpz_mpoly_factor_get_base(fmpz_mpoly_t p, const fmpz_mpoly_factor_t f,
0073 slong i, const fmpz_mpoly_ctx_t ctx)
0074 {
0075 FLINT_ASSERT(i < (ulong) f->num);
0076 fmpz_mpoly_set(p, f->poly + i, ctx);
0077 }
0078
0079 FMPZ_MPOLY_FACTOR_INLINE
0080 void fmpz_mpoly_factor_swap_base(fmpz_mpoly_t p, fmpz_mpoly_factor_t f,
0081 slong i, const fmpz_mpoly_ctx_t ctx)
0082 {
0083 FLINT_ASSERT(i < (ulong) f->num);
0084 fmpz_mpoly_swap(p, f->poly + i, ctx);
0085 }
0086
0087 slong fmpz_mpoly_factor_get_exp_si(fmpz_mpoly_factor_t f, slong i, const fmpz_mpoly_ctx_t FLINT_UNUSED(ctx));
0088
0089 void fmpz_mpoly_factor_set(fmpz_mpoly_factor_t f,
0090 const fmpz_mpoly_factor_t g, const fmpz_mpoly_ctx_t ctx);
0091
0092 int fmpz_mpoly_factor_cmp(const fmpz_mpoly_factor_t f,
0093 const fmpz_mpoly_factor_t g, const fmpz_mpoly_ctx_t ctx);
0094
0095 void fmpz_mpoly_factor_print_pretty(const fmpz_mpoly_factor_t f,
0096 const char ** vars, const fmpz_mpoly_ctx_t ctx);
0097
0098 int fmpz_mpoly_factor_content(fmpz_mpoly_factor_t f,
0099 const fmpz_mpoly_t A, const fmpz_mpoly_ctx_t ctx);
0100
0101 int fmpz_mpoly_factor_squarefree(fmpz_mpoly_factor_t f,
0102 const fmpz_mpoly_t A, const fmpz_mpoly_ctx_t ctx);
0103
0104 int fmpz_mpoly_factor(fmpz_mpoly_factor_t f,
0105 const fmpz_mpoly_t A, const fmpz_mpoly_ctx_t ctx);
0106
0107 FMPZ_MPOLY_FACTOR_INLINE
0108 void fmpz_mpoly_factor_swap(fmpz_mpoly_factor_t f, fmpz_mpoly_factor_t g,
0109 const fmpz_mpoly_ctx_t FLINT_UNUSED(ctx))
0110 {
0111 fmpz_mpoly_factor_struct t = *f;
0112 *f = *g;
0113 *g = t;
0114 }
0115
0116 void fmpz_mpoly_factor_set_fmpz(fmpz_mpoly_factor_t f, const fmpz_t a, const fmpz_mpoly_ctx_t FLINT_UNUSED(ctx));
0117 void fmpz_mpoly_factor_zero(fmpz_mpoly_factor_t f, const fmpz_mpoly_ctx_t FLINT_UNUSED(ctx));
0118 void fmpz_mpoly_factor_one(fmpz_mpoly_factor_t f, const fmpz_mpoly_ctx_t FLINT_UNUSED(ctx));
0119
0120 void fmpz_mpoly_factor_sort(fmpz_mpoly_factor_t f,
0121 const fmpz_mpoly_ctx_t ctx);
0122
0123 int fmpz_mpoly_factor_expand(fmpz_mpoly_t A,
0124 const fmpz_mpoly_factor_t f, const fmpz_mpoly_ctx_t ctx);
0125
0126 int fmpz_mpoly_factor_bound_si(fmpz_t B, const fmpz_t A,
0127 const slong * degs, slong nvars);
0128
0129 FMPZ_MPOLY_FACTOR_INLINE
0130 int fmpz_mpoly_factor_matches(const fmpz_mpoly_t A,
0131 const fmpz_mpoly_factor_t f, const fmpz_mpoly_ctx_t ctx)
0132 {
0133 int matches;
0134 fmpz_mpoly_t T;
0135 fmpz_mpoly_init(T, ctx);
0136 matches = fmpz_mpoly_factor_expand(T, f, ctx);
0137 matches = matches && fmpz_mpoly_equal(T, A, ctx);
0138 fmpz_mpoly_clear(T, ctx);
0139 return matches;
0140 }
0141
0142 void fmpz_mpoly_factor_append_fmpz_swap(fmpz_mpoly_factor_t f, fmpz_mpoly_t A, const fmpz_t e, const fmpz_mpoly_ctx_t ctx);
0143
0144 void fmpz_mpoly_factor_append_ui(fmpz_mpoly_factor_t f, const fmpz_mpoly_t A, ulong e, const fmpz_mpoly_ctx_t ctx);
0145
0146
0147
0148 void fmpz_mpoly_interp_lift_p(fmpz_mpoly_t A,
0149 const fmpz_mpoly_ctx_t ctx, nmod_mpoly_t Ap, const nmod_mpoly_ctx_t ctxp);
0150
0151 void fmpz_mpoly_interp_reduce_p(nmod_mpoly_t Ap,
0152 const nmod_mpoly_ctx_t ctxp, const fmpz_mpoly_t A,
0153 const fmpz_mpoly_ctx_t ctx);
0154
0155 int fmpz_mpoly_interp_mcrt_p(flint_bitcnt_t * coeffbits,
0156 fmpz_mpoly_t H, const fmpz_mpoly_ctx_t FLINT_UNUSED(ctx), const fmpz_t m,
0157 const nmod_mpoly_t A, const nmod_mpoly_ctx_t ctxp);
0158
0159 void fmpz_mpoly_interp_reduce_p_mpolyn(nmod_mpolyn_t E,
0160 const nmod_mpoly_ctx_t pctx, const fmpz_mpoly_t A,
0161 const fmpz_mpoly_ctx_t ctx);
0162
0163 void fmpz_mpoly_interp_lift_p_mpolyn(fmpz_mpoly_t A,
0164 const fmpz_mpoly_ctx_t ctx, const nmod_mpolyn_t B,
0165 const nmod_mpoly_ctx_t pctx);
0166
0167 int fmpz_mpoly_interp_crt_p_mpolyn(fmpz_mpoly_t F, fmpz_mpoly_t T,
0168 const fmpz_mpoly_ctx_t ctx, fmpz_t modulus, const nmod_mpolyn_t A,
0169 const nmod_mpoly_ctx_t pctx);
0170
0171
0172
0173 typedef struct
0174 {
0175 fmpz_mpoly_struct * coeffs;
0176 slong alloc;
0177 slong length;
0178 } fmpz_mpolyv_struct;
0179
0180 typedef fmpz_mpolyv_struct fmpz_mpolyv_t[1];
0181
0182 FMPZ_MPOLY_FACTOR_INLINE
0183 void fmpz_mpolyv_init(fmpz_mpolyv_t A, const fmpz_mpoly_ctx_t FLINT_UNUSED(ctx))
0184 {
0185 A->coeffs = NULL;
0186 A->alloc = 0;
0187 A->length = 0;
0188 }
0189
0190 FMPZ_MPOLY_FACTOR_INLINE
0191 void fmpz_mpolyv_swap(fmpz_mpolyv_t A, fmpz_mpolyv_t B,
0192 const fmpz_mpoly_ctx_t FLINT_UNUSED(ctx))
0193 {
0194 fmpz_mpolyv_struct t = *A;
0195 *A = *B;
0196 *B = t;
0197 }
0198
0199 void fmpz_mpolyv_clear(fmpz_mpolyv_t A, const fmpz_mpoly_ctx_t ctx);
0200
0201 void fmpz_mpolyv_print_pretty(const fmpz_mpolyv_t poly,
0202 const char ** x, const fmpz_mpoly_ctx_t ctx);
0203
0204 void fmpz_mpolyv_fit_length(fmpz_mpolyv_t A, slong length,
0205 const fmpz_mpoly_ctx_t ctx);
0206
0207 void fmpz_mpolyv_set_coeff(fmpz_mpolyv_t A, slong i,
0208 fmpz_mpoly_t c, const fmpz_mpoly_ctx_t ctx);
0209
0210 void fmpz_mpoly_to_mpolyv(fmpz_mpolyv_t A, const fmpz_mpoly_t B,
0211 const fmpz_mpoly_t xalpha, const fmpz_mpoly_ctx_t ctx);
0212
0213
0214 void fmpz_mpoly_from_mpolyv(fmpz_mpoly_t A, flint_bitcnt_t Abits,
0215 const fmpz_mpolyv_t B, const fmpz_mpoly_t xalpha,
0216 const fmpz_mpoly_ctx_t ctx);
0217
0218 int _fmpz_mpoly_vec_content_mpoly(fmpz_mpoly_t g,
0219 const fmpz_mpoly_struct * A, slong Alen, const fmpz_mpoly_ctx_t ctx);
0220
0221 void _fmpz_mpoly_vec_divexact_mpoly(fmpz_mpoly_struct * A,
0222 slong Alen, const fmpz_mpoly_t c, const fmpz_mpoly_ctx_t ctx);
0223
0224 void _fmpz_mpoly_vec_mul_mpoly(fmpz_mpoly_struct * A,
0225 slong Alen, const fmpz_mpoly_t c, const fmpz_mpoly_ctx_t ctx);
0226
0227
0228
0229 int _fmpz_mpoly_gcd_algo(fmpz_mpoly_t G, fmpz_mpoly_t Abar,
0230 fmpz_mpoly_t Bbar, const fmpz_mpoly_t A, const fmpz_mpoly_t B,
0231 const fmpz_mpoly_ctx_t ctx, unsigned int algo);
0232
0233 void fmpz_mpoly_to_mpolyl_perm_deflate(
0234 fmpz_mpoly_t A, const fmpz_mpoly_ctx_t lctx,
0235 const fmpz_mpoly_t B, const fmpz_mpoly_ctx_t ctx,
0236 const slong * perm, const ulong * shift, const ulong * stride);
0237
0238 void fmpz_mpoly_from_mpolyl_perm_inflate(fmpz_mpoly_t A,
0239 flint_bitcnt_t Abits, const fmpz_mpoly_ctx_t ctx,
0240 const fmpz_mpoly_t B, const fmpz_mpoly_ctx_t lctx,
0241 const slong * perm, const ulong * shift, const ulong * stride);
0242
0243 int fmpz_mpolyl_gcd_brown(fmpz_mpoly_t G,
0244 fmpz_mpoly_t Abar, fmpz_mpoly_t Bbar, fmpz_mpoly_t A, fmpz_mpoly_t B,
0245 const fmpz_mpoly_ctx_t ctx, const mpoly_gcd_info_t Iv);
0246
0247 int fmpz_mpolyl_gcd_brown_threaded_pool(fmpz_mpoly_t G,
0248 fmpz_mpoly_t Abar, fmpz_mpoly_t Bbar, fmpz_mpoly_t A, fmpz_mpoly_t B,
0249 const fmpz_mpoly_ctx_t ctx, const mpoly_gcd_info_t Iv,
0250 const thread_pool_handle * handles, slong num_handles);
0251
0252 int fmpz_mpolyl_gcd_zippel(fmpz_mpoly_t G, fmpz_mpoly_t Abar,
0253 fmpz_mpoly_t Bbar, const fmpz_mpoly_t A, const fmpz_mpoly_t B,
0254 const fmpz_mpoly_ctx_t ctx, flint_rand_t randstate);
0255
0256 int fmpz_mpolyl_gcd_zippel2(fmpz_mpoly_t G, fmpz_mpoly_t Abar,
0257 fmpz_mpoly_t Bbar, const fmpz_mpoly_t A, const fmpz_mpoly_t B,
0258 const fmpz_mpoly_t Gamma, const fmpz_mpoly_ctx_t ctx);
0259
0260 int fmpz_mpolyl_gcd_hensel(fmpz_mpoly_t G, slong Gdeg,
0261 fmpz_mpoly_t Abar, fmpz_mpoly_t Bbar, const fmpz_mpoly_t A,
0262 const fmpz_mpoly_t B, const fmpz_mpoly_ctx_t ctx);
0263
0264
0265
0266 typedef struct {
0267 slong r;
0268 flint_bitcnt_t * bits;
0269 fmpz_poly_t a;
0270 fmpz_poly_t newa;
0271 fmpz_poly_t t;
0272 fmpz_poly_struct * b, * bprod;
0273 fmpz_t old_pk;
0274 fmpz_t pk;
0275 fmpz_t p;
0276 fmpz * halfpks;
0277 fmpz_mod_ctx_t ctxp;
0278 fmpz_mod_ctx_struct * ctxs;
0279 fmpz_mod_poly_t T;
0280 fmpz_mod_poly_t R;
0281 fmpz_mod_poly_t Q;
0282 fmpz_mod_poly_struct * B, * invBprod, * inwBprod, * B_inv;
0283 } fmpz_poly_pfrac_struct;
0284
0285 typedef fmpz_poly_pfrac_struct fmpz_poly_pfrac_t[1];
0286
0287 void fmpz_poly_pfrac_init(fmpz_poly_pfrac_t Iv);
0288
0289 void fmpz_poly_pfrac_clear(fmpz_poly_pfrac_t Iv);
0290
0291 int fmpz_poly_pfrac_precompute(fmpz_poly_pfrac_t Iv,
0292 const fmpz_poly_struct * b, slong r);
0293
0294 int fmpz_poly_pfrac_precomp(fmpz_poly_struct * c,
0295 const fmpz_poly_t A, fmpz_poly_pfrac_t Iv);
0296
0297 typedef struct {
0298 flint_bitcnt_t bits;
0299 slong w;
0300 slong r;
0301 fmpz_mpoly_struct * prod_mbetas;
0302 fmpz_mpolyv_struct * prod_mbetas_coeffs;
0303 fmpz_mpoly_struct * mbetas;
0304 fmpz_mpoly_struct * deltas;
0305 fmpz_mpoly_struct * xalpha;
0306 fmpz_mpoly_struct * q;
0307 fmpz_mpoly_univar_struct * U;
0308 fmpz_mpoly_geobucket_struct * G;
0309 fmpz_mpoly_struct * qt;
0310 fmpz_mpoly_struct * newt;
0311 fmpz_mpolyv_struct * delta_coeffs;
0312 fmpz_poly_pfrac_t uni_pfrac;
0313 fmpz_poly_t uni_a;
0314 fmpz_poly_struct * uni_c;
0315 } fmpz_mpoly_pfrac_struct;
0316
0317 typedef fmpz_mpoly_pfrac_struct fmpz_mpoly_pfrac_t[1];
0318
0319 int fmpz_mpoly_pfrac_init(fmpz_mpoly_pfrac_t Iv, flint_bitcnt_t bits,
0320 slong r, slong w, const fmpz_mpoly_struct * betas,
0321 const fmpz * alpha, const fmpz_mpoly_ctx_t ctx);
0322
0323 void fmpz_mpoly_pfrac_clear(fmpz_mpoly_pfrac_t Iv,
0324 const fmpz_mpoly_ctx_t ctx);
0325
0326 int fmpz_mpoly_pfrac(slong l, fmpz_mpoly_t t, const slong * degs,
0327 fmpz_mpoly_pfrac_t Iv, const fmpz_mpoly_ctx_t ctx);
0328
0329 int fmpz_mpoly_hlift(slong m, fmpz_mpoly_struct * f, slong r,
0330 const fmpz * alpha, const fmpz_mpoly_t A, const slong * degs,
0331 const fmpz_mpoly_ctx_t ctx);
0332
0333 void _fmpz_mpoly_get_lead0(fmpz_mpoly_t c, const fmpz_mpoly_t A,
0334 const fmpz_mpoly_ctx_t ctx);
0335
0336 void _fmpz_mpoly_set_lead0(fmpz_mpoly_t A, const fmpz_mpoly_t B,
0337 const fmpz_mpoly_t c, const fmpz_mpoly_ctx_t ctx);
0338
0339
0340
0341 typedef struct
0342 {
0343 fmpz_poly_struct * coeffs;
0344 slong alloc;
0345 slong length;
0346 } fmpz_bpoly_struct;
0347
0348 typedef fmpz_bpoly_struct fmpz_bpoly_t[1];
0349
0350 FMPZ_MPOLY_FACTOR_INLINE
0351 void fmpz_bpoly_init(fmpz_bpoly_t A)
0352 {
0353 A->coeffs = NULL;
0354 A->alloc = 0;
0355 A->length = 0;
0356 }
0357
0358 FMPZ_MPOLY_FACTOR_INLINE
0359 void fmpz_bpoly_swap(fmpz_bpoly_t A, fmpz_bpoly_t B)
0360 {
0361 fmpz_bpoly_struct t = *A;
0362 *A = *B;
0363 *B = t;
0364 }
0365
0366 void fmpz_bpoly_clear(fmpz_bpoly_t A);
0367
0368 void fmpz_bpoly_realloc(fmpz_bpoly_t A, slong len);
0369
0370 FMPZ_MPOLY_FACTOR_INLINE
0371 void fmpz_bpoly_fit_length(fmpz_bpoly_t A, slong len)
0372 {
0373 if (A->alloc < len)
0374 fmpz_bpoly_realloc(A, len);
0375 }
0376
0377 void fmpz_bpoly_print_pretty(fmpz_bpoly_t A,
0378 const char * var0, const char * var1);
0379
0380 FMPZ_MPOLY_FACTOR_INLINE
0381 fmpz_poly_struct * fmpz_bpoly_lead(fmpz_bpoly_t A)
0382 {
0383 return A->coeffs + A->length - 1;
0384 }
0385
0386 FMPZ_MPOLY_FACTOR_INLINE
0387 void fmpz_bpoly_zero(fmpz_bpoly_t A)
0388 {
0389 A->length = 0;
0390 }
0391
0392 FMPZ_MPOLY_FACTOR_INLINE
0393 slong fmpz_bpoly_degree0(const fmpz_bpoly_t A)
0394 {
0395 return A->length - 1;
0396 }
0397
0398 slong fmpz_bpoly_degree1(const fmpz_bpoly_t A);
0399
0400 void fmpz_bpoly_set_coeff(fmpz_bpoly_t A, slong exp0, slong exp1,
0401 const fmpz_t c);
0402
0403 void fmpz_mpoly_set_fmpz_bpoly(
0404 fmpz_mpoly_t A,
0405 flint_bitcnt_t Abits,
0406 const fmpz_bpoly_t B,
0407 slong var0,
0408 slong var1,
0409 const fmpz_mpoly_ctx_t ctx);
0410
0411 void fmpz_mpoly_get_bpoly(
0412 fmpz_bpoly_t A,
0413 const fmpz_mpoly_t B,
0414 slong var0,
0415 slong var1,
0416 const fmpz_mpoly_ctx_t ctx);
0417
0418 typedef struct
0419 {
0420 fmpz_bpoly_struct * coeffs;
0421 slong alloc;
0422 slong length;
0423 } fmpz_tpoly_struct;
0424
0425 typedef fmpz_tpoly_struct fmpz_tpoly_t[1];
0426
0427 FMPZ_MPOLY_FACTOR_INLINE
0428 void fmpz_tpoly_init(fmpz_tpoly_t A)
0429 {
0430 A->coeffs = NULL;
0431 A->alloc = 0;
0432 A->length = 0;
0433 }
0434
0435 FMPZ_MPOLY_FACTOR_INLINE
0436 void fmpz_tpoly_swap(fmpz_tpoly_t A, fmpz_tpoly_t B)
0437 {
0438 fmpz_tpoly_struct t = *A;
0439 *A = *B;
0440 *B = t;
0441 }
0442
0443 void fmpz_tpoly_fit_length(fmpz_tpoly_t A, slong len);
0444
0445 void fmpz_tpoly_clear(fmpz_tpoly_t A);
0446
0447 void fmpz_bpoly_factor(fmpz_poly_t c, fmpz_tpoly_t F, fmpz_bpoly_t B);
0448
0449 int fmpz_bpoly_factor_ordered(
0450 fmpz_poly_t c,
0451 fmpz_tpoly_t F,
0452 fmpz_bpoly_t B,
0453 const fmpz_t alpha,
0454 const fmpz_poly_factor_t Bevalf);
0455
0456
0457
0458 void fmpz_mpoly_unit_normalize(fmpz_mpoly_t A, const fmpz_mpoly_ctx_t ctx);
0459
0460 int _fmpz_mpoly_factor_squarefree(fmpz_mpoly_factor_t f,
0461 fmpz_mpoly_t A, const fmpz_t e, const fmpz_mpoly_ctx_t ctx);
0462
0463
0464 int fmpz_mpoly_factor_lcc_wang(fmpz_mpoly_struct * lc_divs,
0465 const fmpz_mpoly_factor_t lcAfac, const fmpz_t Auc,
0466 const fmpz_poly_struct * Auf, slong r, const fmpz * alpha,
0467 const fmpz_mpoly_ctx_t ctx);
0468
0469 int fmpz_mpoly_factor_irred_zassenhaus(fmpz_mpolyv_t fac,
0470 const fmpz_mpoly_t A, const fmpz_mpoly_ctx_t ctx, zassenhaus_prune_t FLINT_UNUSED(Z));
0471
0472 int fmpz_mpoly_factor_irred_wang(fmpz_mpolyv_t fac,
0473 const fmpz_mpoly_t A, const fmpz_mpoly_factor_t lcAfac,
0474 int lcAfac_irred, const fmpz_mpoly_t lcA, const fmpz_mpoly_ctx_t ctx,
0475 flint_rand_t state, zassenhaus_prune_t Z, int allow_shift);
0476
0477 int fmpz_mpoly_factor_irred_zippel(fmpz_mpolyv_t fac,
0478 const fmpz_mpoly_t A, const fmpz_mpoly_factor_t lcAfac,
0479 int lcAfac_irred, const fmpz_mpoly_t lcA, const fmpz_mpoly_ctx_t ctx,
0480 flint_rand_t state, zassenhaus_prune_t Z);
0481
0482 int fmpz_mpoly_factor_irred(fmpz_mpoly_factor_t f,
0483 const fmpz_mpoly_ctx_t ctx, unsigned int algo);
0484
0485 int fmpz_mpoly_factor_zassenhaus(fmpz_mpoly_factor_t f,
0486 const fmpz_mpoly_t A, const fmpz_mpoly_ctx_t ctx);
0487
0488 int fmpz_mpoly_factor_wang(fmpz_mpoly_factor_t f,
0489 const fmpz_mpoly_t A, const fmpz_mpoly_ctx_t ctx);
0490
0491 int fmpz_mpoly_factor_zippel(fmpz_mpoly_factor_t f,
0492 const fmpz_mpoly_t A, const fmpz_mpoly_ctx_t ctx);
0493
0494 int _fmpz_mpoly_evaluate_rest_fmpz(fmpz * E,
0495 slong * starts, slong * ends, slong * stops, ulong * es,
0496 const fmpz * Acoeffs, const ulong * Aexps, slong Alen, slong var,
0497 const fmpz * alphas, const slong * offsets, const slong * shifts,
0498 slong N, ulong mask, slong nvars);
0499
0500 void _fmpz_mpoly_eval_rest_to_poly(fmpz_poly_t E,
0501 const fmpz_mpoly_t A, const fmpz * alphas, const fmpz_mpoly_ctx_t ctx);
0502
0503 int fmpz_mpoly_factor_lcc_kaltofen_step(
0504 fmpz_mpoly_struct * divs,
0505 slong r,
0506 fmpz_mpoly_factor_t Af,
0507 const fmpz_poly_struct * Au,
0508 slong v,
0509 const fmpz * alphas,
0510 const fmpz_mpoly_ctx_t ctx);
0511
0512 int fmpz_mpoly_factor_lcc_kaltofen(
0513 fmpz_mpoly_struct * divs,
0514 const fmpz_mpoly_factor_t lcAf_,
0515 const fmpz_mpoly_t A,
0516 slong r,
0517 const fmpz * alpha,
0518 slong * degs,
0519 const fmpz_poly_factor_t uf,
0520 const fmpz_mpoly_ctx_t ctx);
0521
0522 int fmpz_mpoly_evaluate_rest_except_one(
0523 fmpz_poly_t e,
0524 const fmpz_mpoly_t A,
0525 const fmpz * alphas,
0526 slong v,
0527 const fmpz_mpoly_ctx_t ctx);
0528
0529
0530
0531 void fmpz_mpoly_compression_do(fmpz_mpoly_t L,
0532 const fmpz_mpoly_ctx_t Lctx, fmpz * Acoeffs, slong Alen,
0533 mpoly_compression_t M);
0534
0535 void fmpz_mpoly_compression_undo(fmpz_mpoly_t A, flint_bitcnt_t Abits,
0536 const fmpz_mpoly_ctx_t Actx, fmpz_mpoly_t L, const fmpz_mpoly_ctx_t Lctx,
0537 mpoly_compression_t M);
0538
0539 #ifdef __cplusplus
0540 }
0541 #endif
0542
0543 #endif