Module Polynomial.Make

Parameters

Indet : OrderedTypeCoeff : IntegerModule

Signature

type t
type coeff = Coeff.t
type indet = Indet.t
val const : coeff -> t
val indet : indet -> t
val add : t -> t -> t
val mult_const : int -> t -> t
val mult_indet : indet -> t -> t
val compare : t -> t -> int

Compares two polynomials by comparing the coefficients for each monomial: If all coefficients of p1 >= the corresponding coefficient in p2, and one is even >, then return 1. If all coefficients of p1 <= the corresponding coefficient in p2, and one is even <, then return -1. If the polynomials are equal, return 0. If some coefficients are < and some are >, return 0.

val pp : Format.formatter -> t -> unit