1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
#![allow(non_snake_case)]
#![allow(non_camel_case_types)]
#![allow(non_upper_case_globals)]
use crate::deps::*;
use crate::flint::*;
use crate::fmpz::fmpz;
use crate::mpoly::*;
use crate::n_poly::*;
use crate::nmod_mpoly::*;
use crate::nmod_vec::nmod_t;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct nmod_mpoly_factor_struct {
pub constant: mp_limb_t,
pub poly: *mut nmod_mpoly_struct,
pub exp: *mut fmpz,
pub num: mp_limb_signed_t,
pub alloc: mp_limb_signed_t,
}
pub type nmod_mpoly_factor_t = [nmod_mpoly_factor_struct; 1usize];
extern "C" {
pub fn nmod_mpoly_factor_init(
f: *mut nmod_mpoly_factor_struct,
ctx: *mut nmod_mpoly_ctx_struct,
);
}
extern "C" {
pub fn nmod_mpoly_factor_init2(
f: *mut nmod_mpoly_factor_struct,
alloc: mp_limb_signed_t,
ctx: *mut nmod_mpoly_ctx_struct,
);
}
extern "C" {
pub fn nmod_mpoly_factor_realloc(
f: *mut nmod_mpoly_factor_struct,
alloc: mp_limb_signed_t,
ctx: *mut nmod_mpoly_ctx_struct,
);
}
extern "C" {
pub fn nmod_mpoly_factor_fit_length(
f: *mut nmod_mpoly_factor_struct,
len: mp_limb_signed_t,
ctx: *mut nmod_mpoly_ctx_struct,
);
}
extern "C" {
pub fn nmod_mpoly_factor_clear(
f: *mut nmod_mpoly_factor_struct,
ctx: *mut nmod_mpoly_ctx_struct,
);
}
extern "C" {
pub fn nmod_mpoly_factor_length(
f: *mut nmod_mpoly_factor_struct,
ctx: *mut nmod_mpoly_ctx_struct,
) -> mp_limb_signed_t;
}
extern "C" {
pub fn nmod_mpoly_factor_get_constant_ui(
f: *mut nmod_mpoly_factor_struct,
ctx: *mut nmod_mpoly_ctx_struct,
) -> mp_limb_t;
}
extern "C" {
pub fn nmod_mpoly_factor_get_base(
p: *mut nmod_mpoly_struct,
f: *mut nmod_mpoly_factor_struct,
i: mp_limb_signed_t,
ctx: *mut nmod_mpoly_ctx_struct,
);
}
extern "C" {
pub fn nmod_mpoly_factor_swap_base(
p: *mut nmod_mpoly_struct,
f: *mut nmod_mpoly_factor_struct,
i: mp_limb_signed_t,
ctx: *mut nmod_mpoly_ctx_struct,
);
}
extern "C" {
pub fn nmod_mpoly_factor_get_exp_si(
f: *mut nmod_mpoly_factor_struct,
i: mp_limb_signed_t,
ctx: *mut nmod_mpoly_ctx_struct,
) -> mp_limb_signed_t;
}
extern "C" {
pub fn nmod_mpoly_factor_append_ui(
f: *mut nmod_mpoly_factor_struct,
A: *mut nmod_mpoly_struct,
e: mp_limb_t,
ctx: *mut nmod_mpoly_ctx_struct,
);
}
extern "C" {
pub fn nmod_mpoly_factor_append_fmpz(
f: *mut nmod_mpoly_factor_struct,
A: *mut nmod_mpoly_struct,
e: *mut fmpz,
ctx: *mut nmod_mpoly_ctx_struct,
);
}
extern "C" {
pub fn nmod_mpoly_factor_set(
f: *mut nmod_mpoly_factor_struct,
g: *mut nmod_mpoly_factor_struct,
ctx: *mut nmod_mpoly_ctx_struct,
);
}
extern "C" {
pub fn nmod_mpoly_factor_print_pretty(
f: *mut nmod_mpoly_factor_struct,
vars: *mut *const ::std::os::raw::c_char,
ctx: *mut nmod_mpoly_ctx_struct,
);
}
extern "C" {
pub fn nmod_mpoly_factor_content(
f: *mut nmod_mpoly_factor_struct,
A: *mut nmod_mpoly_struct,
ctx: *mut nmod_mpoly_ctx_struct,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn nmod_mpoly_factor_squarefree(
f: *mut nmod_mpoly_factor_struct,
A: *mut nmod_mpoly_struct,
ctx: *mut nmod_mpoly_ctx_struct,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn nmod_mpoly_factor_separable(
f: *mut nmod_mpoly_factor_struct,
A: *mut nmod_mpoly_struct,
ctx: *mut nmod_mpoly_ctx_struct,
sep: ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn nmod_mpoly_factor(
f: *mut nmod_mpoly_factor_struct,
A: *mut nmod_mpoly_struct,
ctx: *mut nmod_mpoly_ctx_struct,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn nmod_mpoly_factor_sort(
f: *mut nmod_mpoly_factor_struct,
ctx: *mut nmod_mpoly_ctx_struct,
);
}
extern "C" {
pub fn nmod_mpoly_factor_cmp(
A: *mut nmod_mpoly_factor_struct,
B: *mut nmod_mpoly_factor_struct,
ctx: *mut nmod_mpoly_ctx_struct,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn nmod_mpoly_factor_expand(
A: *mut nmod_mpoly_struct,
f: *mut nmod_mpoly_factor_struct,
ctx: *mut nmod_mpoly_ctx_struct,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn nmod_mpoly_factor_matches(
a: *mut nmod_mpoly_struct,
f: *mut nmod_mpoly_factor_struct,
ctx: *mut nmod_mpoly_ctx_struct,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn nmod_mpoly_factor_fix_units(
f: *mut nmod_mpoly_factor_struct,
ctx: *mut nmod_mpoly_ctx_struct,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn nmod_mpoly_factor_swap(
f: *mut nmod_mpoly_factor_struct,
g: *mut nmod_mpoly_factor_struct,
ctx: *mut nmod_mpoly_ctx_struct,
);
}
extern "C" {
pub fn nmod_mpoly_factor_one(f: *mut nmod_mpoly_factor_struct, ctx: *mut nmod_mpoly_ctx_struct);
}
extern "C" {
pub fn _nmod_mpoly_get_lead0(
c: *mut nmod_mpoly_struct,
A: *mut nmod_mpoly_struct,
ctx: *mut nmod_mpoly_ctx_struct,
);
}
extern "C" {
pub fn _nmod_mpoly_set_lead0(
A: *mut nmod_mpoly_struct,
B: *mut nmod_mpoly_struct,
c: *mut nmod_mpoly_struct,
ctx: *mut nmod_mpoly_ctx_struct,
);
}
extern "C" {
pub fn _n_poly_vec_max_degree(
A: *const n_poly_struct,
Alen: mp_limb_signed_t,
) -> mp_limb_signed_t;
}
extern "C" {
pub fn _n_poly_vec_mul_nmod_intertible(
A: *mut n_poly_struct,
Alen: mp_limb_signed_t,
c: mp_limb_t,
ctx: nmod_t,
);
}
extern "C" {
pub fn _n_poly_vec_mod_mul_poly(
A: *mut n_poly_struct,
Alen: mp_limb_signed_t,
g: *mut n_poly_struct,
ctx: nmod_t,
);
}
extern "C" {
pub fn _n_poly_vec_mod_divexact_poly(
A: *mut n_poly_struct,
Alen: mp_limb_signed_t,
g: *mut n_poly_struct,
ctx: nmod_t,
);
}
extern "C" {
pub fn _n_poly_vec_mod_content(
g: *mut n_poly_struct,
A: *const n_poly_struct,
Alen: mp_limb_signed_t,
ctx: nmod_t,
);
}
extern "C" {
pub fn _n_poly_vec_mod_remove_content(
g: *mut n_poly_struct,
A: *mut n_poly_struct,
Alen: mp_limb_signed_t,
ctx: nmod_t,
);
}
extern "C" {
pub fn nmod_mpoly_get_polyu1n(
A: *mut n_polyun_struct,
B: *mut nmod_mpoly_struct,
varx: mp_limb_signed_t,
vary: mp_limb_signed_t,
ctx: *mut nmod_mpoly_ctx_struct,
);
}
extern "C" {
pub fn nmod_mpoly_set_polyu1n(
B: *mut nmod_mpoly_struct,
A: *mut n_polyun_struct,
varx: mp_limb_signed_t,
vary: mp_limb_signed_t,
ctx: *mut nmod_mpoly_ctx_struct,
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct nmod_mpolyv_struct {
pub coeffs: *mut nmod_mpoly_struct,
pub alloc: mp_limb_signed_t,
pub length: mp_limb_signed_t,
}
pub type nmod_mpolyv_t = [nmod_mpolyv_struct; 1usize];
extern "C" {
pub fn nmod_mpolyv_init(A: *mut nmod_mpolyv_struct, ctx: *mut nmod_mpoly_ctx_struct);
}
extern "C" {
pub fn nmod_mpolyv_swap(
A: *mut nmod_mpolyv_struct,
B: *mut nmod_mpolyv_struct,
ctx: *mut nmod_mpoly_ctx_struct,
);
}
extern "C" {
pub fn nmod_mpolyv_clear(A: *mut nmod_mpolyv_struct, ctx: *mut nmod_mpoly_ctx_struct);
}
extern "C" {
pub fn nmod_mpolyv_print_pretty(
poly: *mut nmod_mpolyv_struct,
x: *mut *const ::std::os::raw::c_char,
ctx: *mut nmod_mpoly_ctx_struct,
);
}
extern "C" {
pub fn nmod_mpolyv_fit_length(
A: *mut nmod_mpolyv_struct,
length: mp_limb_signed_t,
ctx: *mut nmod_mpoly_ctx_struct,
);
}
extern "C" {
pub fn nmod_mpolyv_set_coeff(
A: *mut nmod_mpolyv_struct,
i: mp_limb_signed_t,
c: *mut nmod_mpoly_struct,
ctx: *mut nmod_mpoly_ctx_struct,
);
}
extern "C" {
pub fn nmod_mpoly_to_mpolyv(
A: *mut nmod_mpolyv_struct,
B: *mut nmod_mpoly_struct,
xalpha: *mut nmod_mpoly_struct,
ctx: *mut nmod_mpoly_ctx_struct,
);
}
extern "C" {
pub fn nmod_mpoly_from_mpolyv(
A: *mut nmod_mpoly_struct,
Abits: mp_limb_t,
B: *mut nmod_mpolyv_struct,
xalpha: *mut nmod_mpoly_struct,
ctx: *mut nmod_mpoly_ctx_struct,
);
}
extern "C" {
pub fn _nmod_mpoly_vec_content_mpoly(
g: *mut nmod_mpoly_struct,
A: *const nmod_mpoly_struct,
Alen: mp_limb_signed_t,
ctx: *mut nmod_mpoly_ctx_struct,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn _nmod_mpoly_vec_divexact_mpoly(
A: *mut nmod_mpoly_struct,
Alen: mp_limb_signed_t,
c: *mut nmod_mpoly_struct,
ctx: *mut nmod_mpoly_ctx_struct,
);
}
extern "C" {
pub fn _nmod_mpoly_vec_mul_mpoly(
A: *mut nmod_mpoly_struct,
Alen: mp_limb_signed_t,
c: *mut nmod_mpoly_struct,
ctx: *mut nmod_mpoly_ctx_struct,
);
}
extern "C" {
pub fn _nmod_mpoly_factor_separable(
f: *mut nmod_mpoly_factor_struct,
A: *mut nmod_mpoly_struct,
ctx: *mut nmod_mpoly_ctx_struct,
sep: ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn nmod_mpoly_factor_lcc_wang(
lc_divs: *mut nmod_mpoly_struct,
lcAfac: *mut nmod_mpoly_factor_struct,
Auc: *mut n_poly_struct,
Auf: *const n_bpoly_struct,
r: mp_limb_signed_t,
alpha: *const n_poly_struct,
ctx: *mut nmod_mpoly_ctx_struct,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn nmod_mpoly_factor_irred_smprime_zassenhaus(
fac: *mut nmod_mpolyv_struct,
A: *mut nmod_mpoly_struct,
ctx: *mut nmod_mpoly_ctx_struct,
state: *mut flint_rand_s,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn nmod_mpoly_factor_irred_medprime_zassenhaus(
fac: *mut nmod_mpolyv_struct,
A: *mut nmod_mpoly_struct,
ctx: *mut nmod_mpoly_ctx_struct,
state: *mut flint_rand_s,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn nmod_mpoly_factor_irred_lgprime_zassenhaus(
fac: *mut nmod_mpolyv_struct,
A: *mut nmod_mpoly_struct,
ctx: *mut nmod_mpoly_ctx_struct,
state: *mut flint_rand_s,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn nmod_mpoly_factor_irred_smprime_wang(
fac: *mut nmod_mpolyv_struct,
A: *mut nmod_mpoly_struct,
lcAfac: *mut nmod_mpoly_factor_struct,
lcA: *mut nmod_mpoly_struct,
ctx: *mut nmod_mpoly_ctx_struct,
state: *mut flint_rand_s,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn nmod_mpoly_factor_irred_medprime_wang(
Af: *mut nmod_mpolyv_struct,
A: *mut nmod_mpoly_struct,
lcAfac: *mut nmod_mpoly_factor_struct,
lcA: *mut nmod_mpoly_struct,
ctx: *mut nmod_mpoly_ctx_struct,
state: *mut flint_rand_s,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn nmod_mpoly_factor_irred_lgprime_wang(
Af: *mut nmod_mpolyv_struct,
A: *mut nmod_mpoly_struct,
lcAfac: *mut nmod_mpoly_factor_struct,
lcA: *mut nmod_mpoly_struct,
ctx: *mut nmod_mpoly_ctx_struct,
state: *mut flint_rand_s,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn nmod_mpoly_factor_irred_smprime_zippel(
fac: *mut nmod_mpolyv_struct,
A: *mut nmod_mpoly_struct,
lcAfac: *mut nmod_mpoly_factor_struct,
lcA: *mut nmod_mpoly_struct,
ctx: *mut nmod_mpoly_ctx_struct,
state: *mut flint_rand_s,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn nmod_mpoly_factor_irred_medprime_zippel(
Af: *mut nmod_mpolyv_struct,
A: *mut nmod_mpoly_struct,
lcAfac: *mut nmod_mpoly_factor_struct,
lcA: *mut nmod_mpoly_struct,
ctx: *mut nmod_mpoly_ctx_struct,
state: *mut flint_rand_s,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn nmod_mpoly_factor_irred_lgprime_zippel(
Af: *mut nmod_mpolyv_struct,
A: *mut nmod_mpoly_struct,
lcAfac: *mut nmod_mpoly_factor_struct,
lcA: *mut nmod_mpoly_struct,
ctx: *mut nmod_mpoly_ctx_struct,
state: *mut flint_rand_s,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn nmod_mpoly_compression_do(
L: *mut nmod_mpoly_struct,
Lctx: *mut nmod_mpoly_ctx_struct,
Acoeffs: *mut mp_limb_t,
Alen: mp_limb_signed_t,
M: *mut mpoly_compression_struct,
);
}
extern "C" {
pub fn nmod_mpoly_compression_undo(
A: *mut nmod_mpoly_struct,
Abits: mp_limb_t,
Actx: *mut nmod_mpoly_ctx_struct,
L: *mut nmod_mpoly_struct,
Lctx: *mut nmod_mpoly_ctx_struct,
M: *mut mpoly_compression_struct,
);
}
extern "C" {
pub fn nmod_mpolyu_is_canonical(
A: *mut nmod_mpolyu_struct,
ctx: *mut nmod_mpoly_ctx_struct,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn nmod_mpolyu3_print_pretty(
A: *mut nmod_mpolyu_struct,
var0: *const ::std::os::raw::c_char,
var1: *const ::std::os::raw::c_char,
var2: *const ::std::os::raw::c_char,
vars: *mut *const ::std::os::raw::c_char,
ctx: *mut nmod_mpoly_ctx_struct,
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct nmod_mpoly_pfrac_struct {
pub bits: mp_limb_t,
pub w: mp_limb_signed_t,
pub r: mp_limb_signed_t,
pub inv_prod_dbetas: *mut n_poly_struct,
pub inv_prod_dbetas_mvar: *mut nmod_mpoly_struct,
pub dbetas: *mut n_poly_struct,
pub dbetas_mvar: *mut nmod_mpoly_struct,
pub prod_mbetas: *mut nmod_mpoly_struct,
pub prod_mbetas_coeffs: *mut nmod_mpolyv_struct,
pub mbetas: *mut nmod_mpoly_struct,
pub deltas: *mut nmod_mpoly_struct,
pub xalpha: *mut nmod_mpoly_struct,
pub q: *mut nmod_mpoly_struct,
pub G: *mut nmod_mpoly_geobucket_struct,
pub qt: *mut nmod_mpoly_struct,
pub newt: *mut nmod_mpoly_struct,
pub delta_coeffs: *mut nmod_mpolyv_struct,
pub T: nmod_mpoly_t,
pub Q: nmod_mpoly_t,
pub R: nmod_mpoly_t,
}
pub type nmod_mpoly_pfrac_t = [nmod_mpoly_pfrac_struct; 1usize];
extern "C" {
pub fn nmod_mpoly_pfrac_init(
I: *mut nmod_mpoly_pfrac_struct,
bits: mp_limb_t,
l: mp_limb_signed_t,
r: mp_limb_signed_t,
betas: *const nmod_mpoly_struct,
alpha: *const mp_limb_t,
ctx: *mut nmod_mpoly_ctx_struct,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn nmod_mpoly_pfrac_clear(I: *mut nmod_mpoly_pfrac_struct, ctx: *mut nmod_mpoly_ctx_struct);
}
extern "C" {
pub fn nmod_mpoly_pfrac(
r: mp_limb_signed_t,
t: *mut nmod_mpoly_struct,
deg: *const mp_limb_signed_t,
I: *mut nmod_mpoly_pfrac_struct,
ctx: *mut nmod_mpoly_ctx_struct,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn nmod_mpoly_hlift(
m: mp_limb_signed_t,
f: *mut nmod_mpoly_struct,
r: mp_limb_signed_t,
alpha: *const mp_limb_t,
A: *mut nmod_mpoly_struct,
degs: *const mp_limb_signed_t,
ctx: *mut nmod_mpoly_ctx_struct,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn n_bpoly_mod_pfrac(
r: mp_limb_signed_t,
C: *mut n_bpoly_struct,
C_deg1_bound: *mut mp_limb_signed_t,
A: *mut n_bpoly_struct,
B: *mut n_bpoly_struct,
mod_: nmod_t,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn n_bpoly_mod_hlift2(
A: *mut n_bpoly_struct,
B0: *mut n_bpoly_struct,
B1: *mut n_bpoly_struct,
alpha: mp_limb_t,
degree_inner: mp_limb_signed_t,
mod_: nmod_t,
St: *mut n_poly_bpoly_stack_struct,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn n_bpoly_mod_hlift2_cubic(
A: *mut n_bpoly_struct,
B0: *mut n_bpoly_struct,
B1: *mut n_bpoly_struct,
alpha: mp_limb_t,
degree_inner: mp_limb_signed_t,
ctx: nmod_t,
E: *mut nmod_eval_interp_struct,
St: *mut n_poly_bpoly_stack_struct,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn n_bpoly_mod_hlift(
r: mp_limb_signed_t,
A: *mut n_bpoly_struct,
B: *mut n_bpoly_struct,
alpha: mp_limb_t,
degree_inner: mp_limb_signed_t,
mod_: nmod_t,
St: *mut n_poly_bpoly_stack_struct,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn n_bpoly_mod_hlift_cubic(
r: mp_limb_signed_t,
A: *mut n_bpoly_struct,
B: *mut n_bpoly_struct,
alpha: mp_limb_t,
degree_inner: mp_limb_signed_t,
mod_: nmod_t,
E: *mut nmod_eval_interp_struct,
St: *mut n_poly_bpoly_stack_struct,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn n_polyu3_mod_hlift(
r: mp_limb_signed_t,
BB: *mut n_polyun_struct,
A: *mut n_polyu_struct,
B: *mut n_polyu_struct,
beta: mp_limb_t,
degree_inner: mp_limb_signed_t,
ctx: nmod_t,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn nmod_mpoly_hlift_zippel(
m: mp_limb_signed_t,
B: *mut nmod_mpoly_struct,
r: mp_limb_signed_t,
alpha: *const mp_limb_t,
A: *mut nmod_mpoly_struct,
degs: *const mp_limb_signed_t,
ctx: *mut nmod_mpoly_ctx_struct,
state: *mut flint_rand_s,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn nmod_mpoly_factor_algo(
f: *mut nmod_mpoly_factor_struct,
A: *mut nmod_mpoly_struct,
ctx: *mut nmod_mpoly_ctx_struct,
algo: ::std::os::raw::c_uint,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn nmod_mpoly_factor_zassenhaus(
f: *mut nmod_mpoly_factor_struct,
A: *mut nmod_mpoly_struct,
ctx: *mut nmod_mpoly_ctx_struct,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn nmod_mpoly_factor_wang(
f: *mut nmod_mpoly_factor_struct,
A: *mut nmod_mpoly_struct,
ctx: *mut nmod_mpoly_ctx_struct,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn nmod_mpoly_factor_zippel(
f: *mut nmod_mpoly_factor_struct,
A: *mut nmod_mpoly_struct,
ctx: *mut nmod_mpoly_ctx_struct,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn _nmod_mpoly_evaluate_rest_n_poly(
E: *mut n_poly_struct,
starts: *mut mp_limb_signed_t,
ends: *mut mp_limb_signed_t,
stops: *mut mp_limb_signed_t,
es: *mut mp_limb_t,
Acoeffs: *const mp_limb_t,
Aexps: *const mp_limb_t,
Alen: mp_limb_signed_t,
var: mp_limb_signed_t,
alphas: *const n_poly_struct,
offsets: *const mp_limb_signed_t,
shifts: *const mp_limb_signed_t,
N: mp_limb_signed_t,
mask: mp_limb_t,
nvars: mp_limb_signed_t,
ctx: nmod_t,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn _nmod_mpoly_eval_rest_to_n_bpoly(
E: *mut n_bpoly_struct,
A: *mut nmod_mpoly_struct,
alphabetas: *const n_poly_struct,
ctx: *mut nmod_mpoly_ctx_struct,
);
}
extern "C" {
pub fn _nmod_mpoly_set_n_bpoly_var1_zero(
A: *mut nmod_mpoly_struct,
Abits: mp_limb_t,
B: *mut n_bpoly_struct,
var: mp_limb_signed_t,
ctx: *mut nmod_mpoly_ctx_struct,
);
}
extern "C" {
pub fn nmod_mpolyl_gcdp_zippel_smprime(
G: *mut nmod_mpoly_struct,
Abar: *mut nmod_mpoly_struct,
Bbar: *mut nmod_mpoly_struct,
A: *mut nmod_mpoly_struct,
B: *mut nmod_mpoly_struct,
var: mp_limb_signed_t,
ctx: *mut nmod_mpoly_ctx_struct,
state: *mut flint_rand_s,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn nmod_mpolyl_gcds_zippel(
G: *mut nmod_mpoly_struct,
Gmarks: *const mp_limb_t,
Gmarkslen: mp_limb_signed_t,
A: *mut nmod_mpoly_struct,
B: *mut nmod_mpoly_struct,
perm: *mut mp_limb_signed_t,
l: mp_limb_signed_t,
var: mp_limb_signed_t,
ctx: *mut nmod_mpoly_ctx_struct,
state: *mut flint_rand_s,
Gdegbound: *mut mp_limb_signed_t,
Amarks: *mut n_poly_struct,
Bmarks: *mut n_poly_struct,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn mpoly_monomial_evals_nmod(
EH: *mut n_poly_struct,
Aexps: *const mp_limb_t,
Alen: mp_limb_signed_t,
Abits: mp_limb_t,
alpha_caches: *mut n_poly_struct,
start: mp_limb_signed_t,
stop: mp_limb_signed_t,
mctx: *mut mpoly_ctx_struct,
fpctx: nmod_t,
);
}
extern "C" {
pub fn mpoly1_monomial_evals_nmod(
EH: *mut n_polyun_struct,
Aexps: *const mp_limb_t,
Abits: mp_limb_t,
Amarks: *const mp_limb_t,
Amarkslen: mp_limb_signed_t,
alpha_caches: *mut n_poly_struct,
m: mp_limb_signed_t,
mctx: *mut mpoly_ctx_struct,
fpctx: nmod_t,
);
}
extern "C" {
pub fn mpoly2_monomial_evals_nmod(
EH: *mut n_polyun_struct,
Aexps: *const mp_limb_t,
Abits: mp_limb_t,
Amarks: *mut mp_limb_t,
Amarkslen: mp_limb_signed_t,
alpha_caches: *mut n_poly_struct,
m: mp_limb_signed_t,
mctx: *mut mpoly_ctx_struct,
fpctx: nmod_t,
);
}
extern "C" {
pub fn n_polyun_zip_start(
Z: *mut n_polyun_struct,
H: *mut n_polyun_struct,
req_images: mp_limb_signed_t,
);
}
extern "C" {
pub fn n_polyu2n_add_zip_must_match(
Z: *mut n_polyun_struct,
A: *mut n_bpoly_struct,
cur_length: mp_limb_signed_t,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn n_polyun_zip_solve(
A: *mut nmod_mpoly_struct,
Z: *mut n_polyun_struct,
H: *mut n_polyun_struct,
M: *mut n_polyun_struct,
ctx: *mut nmod_mpoly_ctx_struct,
) -> ::std::os::raw::c_int;
}