Module Polynomial.Poly

Representation of polonomial with rational coefficient. a1.m1 + ... + c where

type t

constant c

  • returns

    the constant polynomial c

val variable : var -> t

variable x

  • returns

    the polynomial 1.x^1

val addition : t -> t -> t

addition p1 p2

  • returns

    the polynomial p1+p2

val product : t -> t -> t

product p1 p2

  • returns

    the polynomial p1*p2

val uminus : t -> t

uminus p

  • returns

    the polynomial -p i.e product by -1

get mi p

  • returns

    the coefficient ai of the monomial mi.

val fold : (Monomial.t -> Micromega_core_plugin.NumCompat.Q.t -> 'a -> 'a) -> t -> 'a -> 'a

fold f p a folds f over the monomials of p with non-zero coefficient

add m n p

  • returns

    the polynomial n*m + p