flint-sys 0.9.0

Bindings to the FLINT C library
Documentation
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
/* automatically generated by rust-bindgen 0.70.1 */

use crate::deps::*;
use crate::flint::*;
use crate::gr_types::*;


#[repr(C)]
pub struct __BindgenUnionField<T>(::std::marker::PhantomData<T>);
impl<T> __BindgenUnionField<T> {
    #[inline]
    pub const fn new() -> Self {
        __BindgenUnionField(::std::marker::PhantomData)
    }
    #[inline]
    pub unsafe fn as_ref(&self) -> &T {
        ::std::mem::transmute(self)
    }
    #[inline]
    pub unsafe fn as_mut(&mut self) -> &mut T {
        ::std::mem::transmute(self)
    }
}
impl<T> ::std::default::Default for __BindgenUnionField<T> {
    #[inline]
    fn default() -> Self {
        Self::new()
    }
}
impl<T> ::std::clone::Clone for __BindgenUnionField<T> {
    #[inline]
    fn clone(&self) -> Self {
        *self
    }
}
impl<T> ::std::marker::Copy for __BindgenUnionField<T> {}
impl<T> ::std::fmt::Debug for __BindgenUnionField<T> {
    fn fmt(&self, fmt: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        fmt.write_str("__BindgenUnionField")
    }
}
impl<T> ::std::hash::Hash for __BindgenUnionField<T> {
    fn hash<H: ::std::hash::Hasher>(&self, _state: &mut H) {}
}
impl<T> ::std::cmp::PartialEq for __BindgenUnionField<T> {
    fn eq(&self, _other: &__BindgenUnionField<T>) -> bool {
        true
    }
}
impl<T> ::std::cmp::Eq for __BindgenUnionField<T> {}
pub const ore_algebra_t_ORE_ALGEBRA_CUSTOM: ore_algebra_t = 0;
pub const ore_algebra_t_ORE_ALGEBRA_COMMUTATIVE: ore_algebra_t = 1;
pub const ore_algebra_t_ORE_ALGEBRA_DERIVATIVE: ore_algebra_t = 2;
pub const ore_algebra_t_ORE_ALGEBRA_EULER_DERIVATIVE: ore_algebra_t = 3;
pub const ore_algebra_t_ORE_ALGEBRA_FORWARD_SHIFT: ore_algebra_t = 4;
pub const ore_algebra_t_ORE_ALGEBRA_FORWARD_DIFFERENCE: ore_algebra_t = 5;
pub const ore_algebra_t_ORE_ALGEBRA_BACKWARD_SHIFT: ore_algebra_t = 6;
pub const ore_algebra_t_ORE_ALGEBRA_BACKWARD_DIFFERENCE: ore_algebra_t = 7;
pub const ore_algebra_t_ORE_ALGEBRA_Q_SHIFT: ore_algebra_t = 8;
pub const ore_algebra_t_ORE_ALGEBRA_MAHLER: ore_algebra_t = 9;
pub const ore_algebra_t_ORE_ALGEBRA_FROBENIUS: ore_algebra_t = 10;
pub const ore_algebra_t_ORE_POLY_NUM_ALGEBRAS: ore_algebra_t = 11;
pub type ore_algebra_t = libc::c_uint;
#[repr(C)]
pub struct gr_ore_poly_struct {
    pub coeffs: gr_ptr,
    pub alloc: slong,
    pub length: slong,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of gr_ore_poly_struct"][::std::mem::size_of::<gr_ore_poly_struct>() - 24usize];
    ["Alignment of gr_ore_poly_struct"][::std::mem::align_of::<gr_ore_poly_struct>() - 8usize];
    ["Offset of field: gr_ore_poly_struct::coeffs"]
        [::std::mem::offset_of!(gr_ore_poly_struct, coeffs) - 0usize];
    ["Offset of field: gr_ore_poly_struct::alloc"]
        [::std::mem::offset_of!(gr_ore_poly_struct, alloc) - 8usize];
    ["Offset of field: gr_ore_poly_struct::length"]
        [::std::mem::offset_of!(gr_ore_poly_struct, length) - 16usize];
};
impl Default for gr_ore_poly_struct {
    fn default() -> Self {
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
pub type gr_ore_poly_t = [gr_ore_poly_struct; 1usize];
pub type gr_ore_poly_ctx_struct = gr_ctx_struct;
pub type gr_ore_poly_ctx_t = [gr_ore_poly_ctx_struct; 1usize];
pub type gr_ore_poly_sigma_delta_t = ::std::option::Option<
    unsafe extern "C" fn(
        arg1: gr_ptr,
        arg2: gr_ptr,
        arg3: gr_srcptr,
        arg4: *mut gr_ore_poly_ctx_struct,
    ) -> libc::c_int,
>;
#[repr(C)]
pub struct gr_ore_poly_ore_data_t {
    pub base_var: slong,
    pub sigma_x: gr_ptr,
    pub __bindgen_anon_1: gr_ore_poly_ore_data_t__bindgen_ty_1,
}
#[repr(C)]
pub struct gr_ore_poly_ore_data_t__bindgen_ty_1 {
    pub q: __BindgenUnionField<gr_ptr>,
    pub mahler_base: __BindgenUnionField<slong>,
    pub bindgen_union_field: u64,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of gr_ore_poly_ore_data_t__bindgen_ty_1"]
        [::std::mem::size_of::<gr_ore_poly_ore_data_t__bindgen_ty_1>() - 8usize];
    ["Alignment of gr_ore_poly_ore_data_t__bindgen_ty_1"]
        [::std::mem::align_of::<gr_ore_poly_ore_data_t__bindgen_ty_1>() - 8usize];
    ["Offset of field: gr_ore_poly_ore_data_t__bindgen_ty_1::q"]
        [::std::mem::offset_of!(gr_ore_poly_ore_data_t__bindgen_ty_1, q) - 0usize];
    ["Offset of field: gr_ore_poly_ore_data_t__bindgen_ty_1::mahler_base"]
        [::std::mem::offset_of!(gr_ore_poly_ore_data_t__bindgen_ty_1, mahler_base) - 0usize];
};
impl Default for gr_ore_poly_ore_data_t__bindgen_ty_1 {
    fn default() -> Self {
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of gr_ore_poly_ore_data_t"][::std::mem::size_of::<gr_ore_poly_ore_data_t>() - 24usize];
    ["Alignment of gr_ore_poly_ore_data_t"]
        [::std::mem::align_of::<gr_ore_poly_ore_data_t>() - 8usize];
    ["Offset of field: gr_ore_poly_ore_data_t::base_var"]
        [::std::mem::offset_of!(gr_ore_poly_ore_data_t, base_var) - 0usize];
    ["Offset of field: gr_ore_poly_ore_data_t::sigma_x"]
        [::std::mem::offset_of!(gr_ore_poly_ore_data_t, sigma_x) - 8usize];
};
impl Default for gr_ore_poly_ore_data_t {
    fn default() -> Self {
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
#[repr(C)]
pub struct _gr_ore_poly_ctx_struct {
    pub base_ring: *mut gr_ctx_struct,
    pub degree_limit: slong,
    pub var: *mut libc::c_char,
    pub which_algebra: ore_algebra_t,
    pub sigma_delta: gr_ore_poly_sigma_delta_t,
    pub ore_data: *mut libc::c_void,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of _gr_ore_poly_ctx_struct"][::std::mem::size_of::<_gr_ore_poly_ctx_struct>() - 48usize];
    ["Alignment of _gr_ore_poly_ctx_struct"]
        [::std::mem::align_of::<_gr_ore_poly_ctx_struct>() - 8usize];
    ["Offset of field: _gr_ore_poly_ctx_struct::base_ring"]
        [::std::mem::offset_of!(_gr_ore_poly_ctx_struct, base_ring) - 0usize];
    ["Offset of field: _gr_ore_poly_ctx_struct::degree_limit"]
        [::std::mem::offset_of!(_gr_ore_poly_ctx_struct, degree_limit) - 8usize];
    ["Offset of field: _gr_ore_poly_ctx_struct::var"]
        [::std::mem::offset_of!(_gr_ore_poly_ctx_struct, var) - 16usize];
    ["Offset of field: _gr_ore_poly_ctx_struct::which_algebra"]
        [::std::mem::offset_of!(_gr_ore_poly_ctx_struct, which_algebra) - 24usize];
    ["Offset of field: _gr_ore_poly_ctx_struct::sigma_delta"]
        [::std::mem::offset_of!(_gr_ore_poly_ctx_struct, sigma_delta) - 32usize];
    ["Offset of field: _gr_ore_poly_ctx_struct::ore_data"]
        [::std::mem::offset_of!(_gr_ore_poly_ctx_struct, ore_data) - 40usize];
};
impl Default for _gr_ore_poly_ctx_struct {
    fn default() -> Self {
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
extern "C" {
    pub fn ore_algebra_randtest(state: *mut flint_rand_struct) -> ore_algebra_t;
    #[link_name = "gr_ore_poly_ctx_data_ptr__extern"]
    pub fn gr_ore_poly_ctx_data_ptr(ctx: *mut gr_ore_poly_ctx_struct) -> *mut libc::c_void;
    pub fn gr_ctx_init_gr_ore_poly(
        ctx: *mut gr_ctx_struct,
        base_ring: *mut gr_ctx_struct,
        base_var: slong,
        which_algebra: ore_algebra_t,
    );
    pub fn gr_ore_poly_ctx_init(
        ctx: *mut gr_ore_poly_ctx_struct,
        base_ring: *mut gr_ctx_struct,
        base_var: slong,
        which_algebra: ore_algebra_t,
    );
    pub fn gr_ore_poly_ctx_init_q_shift(
        ctx: *mut gr_ore_poly_ctx_struct,
        base_ring: *mut gr_ctx_struct,
        base_var: slong,
        q: gr_srcptr,
    ) -> libc::c_int;
    pub fn gr_ore_poly_ctx_init_mahler(
        ctx: *mut gr_ore_poly_ctx_struct,
        base_ring: *mut gr_ctx_struct,
        base_var: slong,
        mahler_base: slong,
    ) -> libc::c_int;
    pub fn gr_ore_poly_ctx_init_custom(
        ctx: *mut gr_ore_poly_ctx_struct,
        base_ring: *mut gr_ctx_struct,
        sigma_delta: gr_ore_poly_sigma_delta_t,
        ore_data: *mut libc::c_void,
    );
    pub fn gr_ore_poly_ctx_clear(ctx: *mut gr_ore_poly_ctx_struct);
    pub fn gr_ore_poly_ctx_init_randtest(
        ctx: *mut gr_ore_poly_ctx_struct,
        state: *mut flint_rand_struct,
        base_ring: *mut gr_ctx_struct,
    );
    pub fn gr_ore_poly_ctx_init_randtest2(
        base_ring: *mut gr_ctx_struct,
        ctx: *mut gr_ore_poly_ctx_struct,
        state: *mut flint_rand_struct,
    );
    pub fn _gr_ore_poly_ctx_set_gen_name(
        ctx: *mut gr_ctx_struct,
        s: *const libc::c_char,
    ) -> libc::c_int;
    pub fn _gr_ore_poly_ctx_set_gen_names(
        ctx: *mut gr_ctx_struct,
        s: *mut *const libc::c_char,
    ) -> libc::c_int;
    pub fn gr_ore_poly_gens_recursive(
        vec: *mut gr_vec_struct,
        ctx: *mut gr_ore_poly_ctx_struct,
    ) -> libc::c_int;
    pub fn gr_ore_poly_ctx_write(
        out: *mut gr_stream_struct,
        ctx: *mut gr_ore_poly_ctx_struct,
    ) -> libc::c_int;
    pub fn gr_ore_poly_ctx_is_ring(ctx: *mut gr_ore_poly_ctx_struct) -> truth_t;
    pub fn gr_ore_poly_ctx_is_zero_ring(ctx: *mut gr_ore_poly_ctx_struct) -> truth_t;
    pub fn gr_ore_poly_ctx_is_commutative_ring(ctx: *mut gr_ore_poly_ctx_struct) -> truth_t;
    pub fn gr_ore_poly_ctx_is_integral_domain(ctx: *mut gr_ore_poly_ctx_struct) -> truth_t;
    pub fn gr_ore_poly_ctx_is_threadsafe(ctx: *mut gr_ore_poly_ctx_struct) -> truth_t;
    pub fn gr_ore_poly_init(poly: *mut gr_ore_poly_struct, ctx: *mut gr_ore_poly_ctx_struct);
    pub fn gr_ore_poly_init2(
        poly: *mut gr_ore_poly_struct,
        len: slong,
        ctx: *mut gr_ore_poly_ctx_struct,
    );
    pub fn gr_ore_poly_clear(poly: *mut gr_ore_poly_struct, ctx: *mut gr_ore_poly_ctx_struct);
    #[link_name = "gr_ore_poly_coeff_ptr__extern"]
    pub fn gr_ore_poly_coeff_ptr(
        poly: *mut gr_ore_poly_struct,
        i: slong,
        ctx: *mut gr_ore_poly_ctx_struct,
    ) -> gr_ptr;
    #[link_name = "gr_ore_poly_coeff_srcptr__extern"]
    pub fn gr_ore_poly_coeff_srcptr(
        poly: *const gr_ore_poly_struct,
        i: slong,
        ctx: *mut gr_ore_poly_ctx_struct,
    ) -> gr_srcptr;
    #[link_name = "gr_ore_poly_length__extern"]
    pub fn gr_ore_poly_length(
        poly: *const gr_ore_poly_struct,
        UNUSED_ctx: *mut gr_ore_poly_ctx_struct,
    ) -> slong;
    #[link_name = "gr_ore_poly_swap__extern"]
    pub fn gr_ore_poly_swap(
        poly1: *mut gr_ore_poly_struct,
        poly2: *mut gr_ore_poly_struct,
        UNUSED_ctx: *mut gr_ore_poly_ctx_struct,
    );
    #[link_name = "gr_ore_poly_set_shallow__extern"]
    pub fn gr_ore_poly_set_shallow(
        res: *mut gr_ore_poly_struct,
        x: *const gr_ore_poly_struct,
        ctx: *const gr_ore_poly_ctx_struct,
    );
    pub fn gr_ore_poly_fit_length(
        poly: *mut gr_ore_poly_struct,
        len: slong,
        ctx: *mut gr_ore_poly_ctx_struct,
    );
    pub fn _gr_ore_poly_set_length(
        poly: *mut gr_ore_poly_struct,
        len: slong,
        ctx: *mut gr_ore_poly_ctx_struct,
    );
    pub fn _gr_ore_poly_normalise(poly: *mut gr_ore_poly_struct, ctx: *mut gr_ore_poly_ctx_struct);
    pub fn gr_ore_poly_set(
        res: *mut gr_ore_poly_struct,
        src: *const gr_ore_poly_struct,
        ctx: *mut gr_ore_poly_ctx_struct,
    ) -> libc::c_int;
    pub fn gr_ore_poly_truncate(
        poly: *mut gr_ore_poly_struct,
        src: *const gr_ore_poly_struct,
        newlen: slong,
        ctx: *mut gr_ore_poly_ctx_struct,
    ) -> libc::c_int;
    #[link_name = "gr_ore_poly_zero__extern"]
    pub fn gr_ore_poly_zero(
        poly: *mut gr_ore_poly_struct,
        ctx: *mut gr_ore_poly_ctx_struct,
    ) -> libc::c_int;
    pub fn gr_ore_poly_one(
        poly: *mut gr_ore_poly_struct,
        ctx: *mut gr_ore_poly_ctx_struct,
    ) -> libc::c_int;
    pub fn gr_ore_poly_neg_one(
        poly: *mut gr_ore_poly_struct,
        ctx: *mut gr_ore_poly_ctx_struct,
    ) -> libc::c_int;
    pub fn gr_ore_poly_gen(
        poly: *mut gr_ore_poly_struct,
        ctx: *mut gr_ore_poly_ctx_struct,
    ) -> libc::c_int;
    pub fn _gr_ore_poly_equal(
        poly1: gr_srcptr,
        len1: slong,
        poly2: gr_srcptr,
        len2: slong,
        ctx: *mut gr_ore_poly_ctx_struct,
    ) -> truth_t;
    pub fn gr_ore_poly_equal(
        poly1: *const gr_ore_poly_struct,
        poly2: *const gr_ore_poly_struct,
        ctx: *mut gr_ore_poly_ctx_struct,
    ) -> truth_t;
    pub fn gr_ore_poly_is_zero(
        poly: *const gr_ore_poly_struct,
        ctx: *mut gr_ore_poly_ctx_struct,
    ) -> truth_t;
    pub fn gr_ore_poly_is_one(
        poly: *const gr_ore_poly_struct,
        ctx: *mut gr_ore_poly_ctx_struct,
    ) -> truth_t;
    pub fn gr_ore_poly_is_gen(
        poly: *const gr_ore_poly_struct,
        ctx: *mut gr_ore_poly_ctx_struct,
    ) -> truth_t;
    pub fn _gr_ore_poly_write(
        out: *mut gr_stream_struct,
        poly: gr_srcptr,
        len: slong,
        ctx: *mut gr_ore_poly_ctx_struct,
    ) -> libc::c_int;
    pub fn gr_ore_poly_write(
        out: *mut gr_stream_struct,
        poly: *const gr_ore_poly_struct,
        ctx: *mut gr_ore_poly_ctx_struct,
    ) -> libc::c_int;
    pub fn _gr_ore_poly_get_str(
        res: *mut *mut libc::c_char,
        f: gr_srcptr,
        len: slong,
        ctx: *mut gr_ore_poly_ctx_struct,
    ) -> libc::c_int;
    pub fn gr_ore_poly_get_str(
        res: *mut *mut libc::c_char,
        poly: *const gr_ore_poly_struct,
        ctx: *mut gr_ore_poly_ctx_struct,
    ) -> libc::c_int;
    pub fn _gr_ore_poly_set_str(
        res: gr_ptr,
        s: *const libc::c_char,
        len: slong,
        ctx: *mut gr_ore_poly_ctx_struct,
    ) -> libc::c_int;
    pub fn gr_ore_poly_set_str(
        res: *mut gr_ore_poly_struct,
        s: *const libc::c_char,
        ctx: *mut gr_ore_poly_ctx_struct,
    ) -> libc::c_int;
    pub fn gr_ore_poly_print(
        poly: *const gr_ore_poly_struct,
        ctx: *mut gr_ore_poly_ctx_struct,
    ) -> libc::c_int;
    pub fn gr_ore_poly_randtest(
        poly: *mut gr_ore_poly_struct,
        state: *mut flint_rand_struct,
        len: slong,
        ctx: *mut gr_ore_poly_ctx_struct,
    ) -> libc::c_int;
    #[link_name = "_gr_ore_poly_randtest_default__extern"]
    pub fn _gr_ore_poly_randtest_default(
        res: *mut gr_ore_poly_struct,
        state: *mut flint_rand_struct,
        ctx: *mut gr_ore_poly_ctx_struct,
    ) -> libc::c_int;
    pub fn gr_ore_poly_set_si(
        poly: *mut gr_ore_poly_struct,
        x: slong,
        ctx: *mut gr_ore_poly_ctx_struct,
    ) -> libc::c_int;
    pub fn gr_ore_poly_set_ui(
        poly: *mut gr_ore_poly_struct,
        x: ulong,
        ctx: *mut gr_ore_poly_ctx_struct,
    ) -> libc::c_int;
    pub fn gr_ore_poly_set_fmpz(
        poly: *mut gr_ore_poly_struct,
        x: *const fmpz,
        ctx: *mut gr_ore_poly_ctx_struct,
    ) -> libc::c_int;
    pub fn gr_ore_poly_set_fmpq(
        poly: *mut gr_ore_poly_struct,
        x: *const fmpq,
        ctx: *mut gr_ore_poly_ctx_struct,
    ) -> libc::c_int;
    pub fn gr_ore_poly_set_other(
        poly: *mut gr_ore_poly_struct,
        x: gr_srcptr,
        x_ctx: *mut gr_ctx_struct,
        ctx: *mut gr_ore_poly_ctx_struct,
    ) -> libc::c_int;
    pub fn sigma_delta_unable(
        sigma: gr_ptr,
        delta: gr_ptr,
        a: gr_srcptr,
        ctx: *mut gr_ore_poly_ctx_struct,
    ) -> libc::c_int;
    pub fn sigma_delta_commutative(
        sigma: gr_ptr,
        delta: gr_ptr,
        a: gr_srcptr,
        ctx: *mut gr_ore_poly_ctx_struct,
    ) -> libc::c_int;
    pub fn sigma_delta_derivative(
        sigma: gr_ptr,
        delta: gr_ptr,
        a: gr_srcptr,
        ctx: *mut gr_ore_poly_ctx_struct,
    ) -> libc::c_int;
    pub fn sigma_delta_euler_derivative(
        sigma: gr_ptr,
        delta: gr_ptr,
        a: gr_srcptr,
        ctx: *mut gr_ore_poly_ctx_struct,
    ) -> libc::c_int;
    pub fn sigma_delta_forward_shift(
        sigma: gr_ptr,
        delta: gr_ptr,
        a: gr_srcptr,
        ctx: *mut gr_ore_poly_ctx_struct,
    ) -> libc::c_int;
    pub fn sigma_delta_backward_shift(
        sigma: gr_ptr,
        delta: gr_ptr,
        a: gr_srcptr,
        ctx: *mut gr_ore_poly_ctx_struct,
    ) -> libc::c_int;
    pub fn sigma_delta_forward_difference(
        sigma: gr_ptr,
        delta: gr_ptr,
        a: gr_srcptr,
        ctx: *mut gr_ore_poly_ctx_struct,
    ) -> libc::c_int;
    pub fn sigma_delta_backward_difference(
        sigma: gr_ptr,
        delta: gr_ptr,
        a: gr_srcptr,
        ctx: *mut gr_ore_poly_ctx_struct,
    ) -> libc::c_int;
    pub fn sigma_delta_compose(
        sigma: gr_ptr,
        delta: gr_ptr,
        a: gr_srcptr,
        ctx: *mut gr_ore_poly_ctx_struct,
    ) -> libc::c_int;
    pub fn sigma_delta_mahler(
        sigma: gr_ptr,
        delta: gr_ptr,
        a: gr_srcptr,
        ctx: *mut gr_ore_poly_ctx_struct,
    ) -> libc::c_int;
    pub fn sigma_delta_frobenius(
        sigma: gr_ptr,
        delta: gr_ptr,
        a: gr_srcptr,
        ctx: *mut gr_ore_poly_ctx_struct,
    ) -> libc::c_int;
    #[link_name = "gr_ore_poly_sigma_delta__extern"]
    pub fn gr_ore_poly_sigma_delta(
        sigma: gr_ptr,
        delta: gr_ptr,
        a: gr_srcptr,
        ctx: *mut gr_ore_poly_ctx_struct,
    ) -> libc::c_int;
    #[link_name = "gr_ore_poly_sigma__extern"]
    pub fn gr_ore_poly_sigma(
        res: gr_ptr,
        a: gr_srcptr,
        ctx: *mut gr_ore_poly_ctx_struct,
    ) -> libc::c_int;
    #[link_name = "gr_ore_poly_delta__extern"]
    pub fn gr_ore_poly_delta(
        res: gr_ptr,
        a: gr_srcptr,
        ctx: *mut gr_ore_poly_ctx_struct,
    ) -> libc::c_int;
    pub static _gr_ore_poly_default_sigma_delta: [gr_ore_poly_sigma_delta_t; 0usize];
    pub fn gr_ore_poly_neg(
        res: *mut gr_ore_poly_struct,
        src: *const gr_ore_poly_struct,
        ctx: *mut gr_ore_poly_ctx_struct,
    ) -> libc::c_int;
    pub fn _gr_ore_poly_add(
        res: gr_ptr,
        poly1: gr_srcptr,
        len1: slong,
        poly2: gr_srcptr,
        len2: slong,
        ctx: *mut gr_ore_poly_ctx_struct,
    ) -> libc::c_int;
    pub fn gr_ore_poly_add(
        res: *mut gr_ore_poly_struct,
        poly1: *const gr_ore_poly_struct,
        poly2: *const gr_ore_poly_struct,
        ctx: *mut gr_ore_poly_ctx_struct,
    ) -> libc::c_int;
    pub fn _gr_ore_poly_sub(
        res: gr_ptr,
        poly1: gr_srcptr,
        len1: slong,
        poly2: gr_srcptr,
        len2: slong,
        ctx: *mut gr_ore_poly_ctx_struct,
    ) -> libc::c_int;
    pub fn gr_ore_poly_sub(
        res: *mut gr_ore_poly_struct,
        poly1: *const gr_ore_poly_struct,
        poly2: *const gr_ore_poly_struct,
        ctx: *mut gr_ore_poly_ctx_struct,
    ) -> libc::c_int;
    pub fn gr_ore_poly_add_ui(
        res: *mut gr_ore_poly_struct,
        poly: *const gr_ore_poly_struct,
        c: ulong,
        ctx: *mut gr_ore_poly_ctx_struct,
    ) -> libc::c_int;
    pub fn gr_ore_poly_add_si(
        res: *mut gr_ore_poly_struct,
        poly: *const gr_ore_poly_struct,
        c: slong,
        ctx: *mut gr_ore_poly_ctx_struct,
    ) -> libc::c_int;
    pub fn gr_ore_poly_add_fmpz(
        res: *mut gr_ore_poly_struct,
        poly: *const gr_ore_poly_struct,
        c: *const fmpz,
        ctx: *mut gr_ore_poly_ctx_struct,
    ) -> libc::c_int;
    pub fn gr_ore_poly_add_fmpq(
        res: *mut gr_ore_poly_struct,
        poly: *const gr_ore_poly_struct,
        c: *const fmpq,
        ctx: *mut gr_ore_poly_ctx_struct,
    ) -> libc::c_int;
    pub fn gr_ore_poly_add_other(
        res: *mut gr_ore_poly_struct,
        poly: *const gr_ore_poly_struct,
        x: gr_srcptr,
        x_ctx: *mut gr_ctx_struct,
        ctx: *mut gr_ore_poly_ctx_struct,
    ) -> libc::c_int;
    pub fn gr_ore_poly_sub_ui(
        res: *mut gr_ore_poly_struct,
        poly: *const gr_ore_poly_struct,
        c: ulong,
        ctx: *mut gr_ore_poly_ctx_struct,
    ) -> libc::c_int;
    pub fn gr_ore_poly_sub_si(
        res: *mut gr_ore_poly_struct,
        poly: *const gr_ore_poly_struct,
        c: slong,
        ctx: *mut gr_ore_poly_ctx_struct,
    ) -> libc::c_int;
    pub fn gr_ore_poly_sub_fmpz(
        res: *mut gr_ore_poly_struct,
        poly: *const gr_ore_poly_struct,
        c: *const fmpz,
        ctx: *mut gr_ore_poly_ctx_struct,
    ) -> libc::c_int;
    pub fn gr_ore_poly_sub_fmpq(
        res: *mut gr_ore_poly_struct,
        poly: *const gr_ore_poly_struct,
        c: *const fmpq,
        ctx: *mut gr_ore_poly_ctx_struct,
    ) -> libc::c_int;
    pub fn gr_ore_poly_sub_other(
        res: *mut gr_ore_poly_struct,
        poly: *const gr_ore_poly_struct,
        x: gr_srcptr,
        x_ctx: *mut gr_ctx_struct,
        ctx: *mut gr_ore_poly_ctx_struct,
    ) -> libc::c_int;
    pub fn gr_ore_poly_mul_ui(
        res: *mut gr_ore_poly_struct,
        poly: *const gr_ore_poly_struct,
        c: ulong,
        ctx: *mut gr_ore_poly_ctx_struct,
    ) -> libc::c_int;
    pub fn gr_ore_poly_mul_si(
        res: *mut gr_ore_poly_struct,
        poly: *const gr_ore_poly_struct,
        c: slong,
        ctx: *mut gr_ore_poly_ctx_struct,
    ) -> libc::c_int;
    pub fn gr_ore_poly_mul_fmpz(
        res: *mut gr_ore_poly_struct,
        poly: *const gr_ore_poly_struct,
        c: *const fmpz,
        ctx: *mut gr_ore_poly_ctx_struct,
    ) -> libc::c_int;
    pub fn gr_ore_poly_mul_fmpq(
        res: *mut gr_ore_poly_struct,
        poly: *const gr_ore_poly_struct,
        c: *const fmpq,
        ctx: *mut gr_ore_poly_ctx_struct,
    ) -> libc::c_int;
    pub fn gr_ore_poly_other_mul(
        res: *mut gr_ore_poly_struct,
        x: gr_srcptr,
        x_ctx: *mut gr_ctx_struct,
        poly: *const gr_ore_poly_struct,
        ctx: *mut gr_ore_poly_ctx_struct,
    ) -> libc::c_int;
    pub fn _gr_ore_poly_lmul_gen(
        res: gr_ptr,
        poly: gr_srcptr,
        len: slong,
        ctx: *mut gr_ore_poly_ctx_struct,
    ) -> libc::c_int;
    pub fn gr_ore_poly_lmul_gen(
        res: *mut gr_ore_poly_struct,
        poly: *const gr_ore_poly_struct,
        ctx: *mut gr_ore_poly_ctx_struct,
    ) -> libc::c_int;
    pub fn _gr_ore_poly_mul(
        res: gr_ptr,
        poly1: gr_srcptr,
        len1: slong,
        poly2: gr_srcptr,
        len2: slong,
        ctx: *mut gr_ore_poly_ctx_struct,
    ) -> libc::c_int;
    pub fn gr_ore_poly_mul(
        res: *mut gr_ore_poly_struct,
        poly1: *const gr_ore_poly_struct,
        poly2: *const gr_ore_poly_struct,
        ctx: *mut gr_ore_poly_ctx_struct,
    ) -> libc::c_int;
}