module OrderedPolySet:`sig`

..`end`

Represent set of ordered polynomials and operate on it.

module PSet:`Set.S`

`with type elt = OrderedPoly.polynomial`

type`pset =`

`PSet.t`

`val empty : ``PSet.t`

`val add : ``OrderedPoly.polynomial -> PSet.t -> PSet.t`

`val union : ``PSet.t -> PSet.t -> PSet.t`

`val cardinal : ``PSet.t -> int`

`val iter : ``(OrderedPoly.polynomial -> unit) -> PSet.t -> unit`

`val elements : ``PSet.t -> OrderedPoly.polynomial list`

`val str : ``PSet.t -> string`

Print the given set as string.

`val map : ``(OrderedPoly.polynomial -> OrderedPoly.polynomial) ->`

PSet.t -> PSet.t * PSet.t

Maps a function to all polynomials in the set. Returns non-empty
resulting polynomials of degree 0 and greater separately.

`val leading_coeff : ``PSet.t -> PSet.t`

Extract leading coefficients from all polynomials in the set.

`val omit_leading : ``PSet.t -> PSet.t * PSet.t`

Omit leading coefficients from all polynomials in the given set.
Return resulting polynomials of degree 0 and greater separately.

`val differentiate : ``PSet.t -> PSet.t * PSet.t`

Differentiate all polynomials in the given set.
Return resulting polynomials of degree 0 and greater separately.

`val div : ``PSet.t -> PSet.t -> PSet.t`

Compute factors r such that for some p,q in

`ps,qs`

holds p = r*q.`val modified_remainder : ``PSet.t * PSet.t ->`

PSet.t * PSet.t

Compute the modified remainder for all pairs of polynomials p from
ps1 and q!=p from qs1 such that the degree of p >= degree of q.
Return resulting polynomials of degree 0 and greater separately.

`exception Closure_count_exceeded of ``int`

`val closure : ``?upto:int ->`

PSet.t -> PSet.t * PSet.t

Closure of a set of polynomials

`polys`

under the operations:- extracting the leading coefficient (if deg > 0)
- omitting the leading term (if deg > 0)
- taking the derivative (if deg > 0)
- taking the modified remainder MR(p, q) for deg p >= deg q. Return resulting polynomials of degree 0 and greater separately.