# distutils: libraries = flint
# distutils: depends = flint/padic_poly.h

################################################################################
# This file is auto-generated by the script
#   SAGE_ROOT/src/sage_setup/autogen/flint_autogen.py.
# From the commit 3e2c3a3e091106a25ca9c6fba28e02f2cbcd654a
# Do not modify by hand! Fix and rerun the script instead.
################################################################################

from libc.stdio cimport FILE
from sage.libs.gmp.types cimport *
from sage.libs.mpfr.types cimport *
from sage.libs.flint.types cimport *

cdef extern from "flint_wrap.h":
    void padic_poly_init(padic_poly_t poly) noexcept
    void padic_poly_init2(padic_poly_t poly, slong alloc, slong prec) noexcept
    void padic_poly_realloc(padic_poly_t poly, slong alloc, const fmpz_t p) noexcept
    void padic_poly_fit_length(padic_poly_t poly, slong len) noexcept
    void _padic_poly_set_length(padic_poly_t poly, slong len) noexcept
    void padic_poly_clear(padic_poly_t poly) noexcept
    void _padic_poly_normalise(padic_poly_t poly) noexcept
    void _padic_poly_canonicalise(fmpz * poly, slong * v, slong len, const fmpz_t p) noexcept
    void padic_poly_canonicalise(padic_poly_t poly, const fmpz_t p) noexcept
    void padic_poly_reduce(padic_poly_t poly, const padic_ctx_t ctx) noexcept
    void padic_poly_truncate(padic_poly_t poly, slong n, const fmpz_t p) noexcept
    slong padic_poly_degree(const padic_poly_t poly) noexcept
    slong padic_poly_length(const padic_poly_t poly) noexcept
    slong padic_poly_val(const padic_poly_t poly) noexcept
    slong padic_poly_prec(padic_poly_t poly) noexcept
    void padic_poly_randtest(padic_poly_t f, flint_rand_t state, slong len, const padic_ctx_t ctx) noexcept
    void padic_poly_randtest_not_zero(padic_poly_t f, flint_rand_t state, slong len, const padic_ctx_t ctx) noexcept
    void padic_poly_randtest_val(padic_poly_t f, flint_rand_t state, slong val, slong len, const padic_ctx_t ctx) noexcept
    void padic_poly_set_padic(padic_poly_t poly, const padic_t x, const padic_ctx_t ctx) noexcept
    void padic_poly_set(padic_poly_t poly1, const padic_poly_t poly2, const padic_ctx_t ctx) noexcept
    void padic_poly_set_si(padic_poly_t poly, slong x, const padic_ctx_t ctx) noexcept
    void padic_poly_set_ui(padic_poly_t poly, ulong x, const padic_ctx_t ctx) noexcept
    void padic_poly_set_fmpz(padic_poly_t poly, const fmpz_t x, const padic_ctx_t ctx) noexcept
    void padic_poly_set_fmpq(padic_poly_t poly, const fmpq_t x, const padic_ctx_t ctx) noexcept
    void padic_poly_set_fmpz_poly(padic_poly_t rop, const fmpz_poly_t op, const padic_ctx_t ctx) noexcept
    void padic_poly_set_fmpq_poly(padic_poly_t rop, const fmpq_poly_t op, const padic_ctx_t ctx) noexcept
    int padic_poly_get_fmpz_poly(fmpz_poly_t rop, const padic_poly_t op, const padic_ctx_t ctx) noexcept
    void padic_poly_get_fmpq_poly(fmpq_poly_t rop, const padic_poly_t op, const padic_ctx_t ctx) noexcept
    void padic_poly_zero(padic_poly_t poly) noexcept
    void padic_poly_one(padic_poly_t poly) noexcept
    void padic_poly_swap(padic_poly_t poly1, padic_poly_t poly2) noexcept
    void padic_poly_get_coeff_padic(padic_t c, const padic_poly_t poly, slong n, const padic_ctx_t ctx) noexcept
    void padic_poly_set_coeff_padic(padic_poly_t f, slong n, const padic_t c, const padic_ctx_t ctx) noexcept
    bint padic_poly_equal(const padic_poly_t poly1, const padic_poly_t poly2) noexcept
    bint padic_poly_is_zero(const padic_poly_t poly) noexcept
    bint padic_poly_is_one(const padic_poly_t poly) noexcept
    void _padic_poly_add(fmpz * rop, slong * rval, slong N, const fmpz * op1, slong val1, slong len1, slong N1, const fmpz * op2, slong val2, slong len2, slong N2, const padic_ctx_t ctx) noexcept
    void padic_poly_add(padic_poly_t f, const padic_poly_t g, const padic_poly_t h, const padic_ctx_t ctx) noexcept
    void _padic_poly_sub(fmpz * rop, slong * rval, slong N, const fmpz * op1, slong val1, slong len1, slong N1, const fmpz * op2, slong val2, slong len2, slong N2, const padic_ctx_t ctx) noexcept
    void padic_poly_sub(padic_poly_t f, const padic_poly_t g, const padic_poly_t h, const padic_ctx_t ctx) noexcept
    void padic_poly_neg(padic_poly_t f, const padic_poly_t g, const padic_ctx_t ctx) noexcept
    void _padic_poly_scalar_mul_padic(fmpz * rop, slong * rval, slong N, const fmpz * op, slong val, slong len, const padic_t c, const padic_ctx_t ctx) noexcept
    void padic_poly_scalar_mul_padic(padic_poly_t rop, const padic_poly_t op, const padic_t c, const padic_ctx_t ctx) noexcept
    void _padic_poly_mul(fmpz * rop, slong * rval, slong N, const fmpz * op1, slong val1, slong len1, const fmpz * op2, slong val2, slong len2, const padic_ctx_t ctx) noexcept
    void padic_poly_mul(padic_poly_t res, const padic_poly_t poly1, const padic_poly_t poly2, const padic_ctx_t ctx) noexcept
    void _padic_poly_pow(fmpz * rop, slong * rval, slong N, const fmpz * op, slong val, slong len, ulong e, const padic_ctx_t ctx) noexcept
    void padic_poly_pow(padic_poly_t rop, const padic_poly_t op, ulong e, const padic_ctx_t ctx) noexcept
    void padic_poly_inv_series(padic_poly_t g, const padic_poly_t f, slong n, const padic_ctx_t ctx) noexcept
    void _padic_poly_derivative(fmpz * rop, slong * rval, slong N, const fmpz * op, slong val, slong len, const padic_ctx_t ctx) noexcept
    void padic_poly_derivative(padic_poly_t rop, const padic_poly_t op, const padic_ctx_t ctx) noexcept
    void padic_poly_shift_left(padic_poly_t rop, const padic_poly_t op, slong n, const padic_ctx_t ctx) noexcept
    void padic_poly_shift_right(padic_poly_t rop, const padic_poly_t op, slong n, const padic_ctx_t ctx) noexcept
    void _padic_poly_evaluate_padic(fmpz_t u, slong * v, slong N, const fmpz * poly, slong val, slong len, const fmpz_t a, slong b, const padic_ctx_t ctx) noexcept
    void padic_poly_evaluate_padic(padic_t y, const padic_poly_t poly, const padic_t a, const padic_ctx_t ctx) noexcept
    void _padic_poly_compose(fmpz * rop, slong * rval, slong N, const fmpz * op1, slong val1, slong len1, const fmpz * op2, slong val2, slong len2, const padic_ctx_t ctx) noexcept
    void padic_poly_compose(padic_poly_t rop, const padic_poly_t op1, const padic_poly_t op2, const padic_ctx_t ctx) noexcept
    void _padic_poly_compose_pow(fmpz * rop, slong * rval, slong N, const fmpz * op, slong val, slong len, slong k, const padic_ctx_t ctx) noexcept
    void padic_poly_compose_pow(padic_poly_t rop, const padic_poly_t op, slong k, const padic_ctx_t ctx) noexcept
    int padic_poly_debug(const padic_poly_t poly) noexcept
    int _padic_poly_fprint(FILE * file, const fmpz * poly, slong val, slong len, const padic_ctx_t ctx) noexcept
    int padic_poly_fprint(FILE * file, const padic_poly_t poly, const padic_ctx_t ctx) noexcept
    int _padic_poly_print(const fmpz * poly, slong val, slong len, const padic_ctx_t ctx) noexcept
    int padic_poly_print(const padic_poly_t poly, const padic_ctx_t ctx) noexcept
    int _padic_poly_fprint_pretty(FILE * file, const fmpz * poly, slong val, slong len, const char * var, const padic_ctx_t ctx) noexcept
    int padic_poly_fprint_pretty(FILE * file, const padic_poly_t poly, const char * var, const padic_ctx_t ctx) noexcept
    int _padic_poly_print_pretty(const fmpz * poly, slong val, slong len, const char * var, const padic_ctx_t ctx) noexcept
    int padic_poly_print_pretty(const padic_poly_t poly, const char * var, const padic_ctx_t ctx) noexcept
    bint _padic_poly_is_canonical(const fmpz * op, slong val, slong len, const padic_ctx_t ctx) noexcept
    bint padic_poly_is_canonical(const padic_poly_t op, const padic_ctx_t ctx) noexcept
    bint _padic_poly_is_reduced(const fmpz * op, slong val, slong len, slong N, const padic_ctx_t ctx) noexcept
    bint padic_poly_is_reduced(const padic_poly_t op, const padic_ctx_t ctx) noexcept
