Module OrderedPolySet

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 

Basic Set Operations


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

Printing


val str : PSet.t -> string
Print the given set as string.

Mapping with degree detection and basic maps


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.

Modified remainder of all pairs between two sets


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.

Closure under the 4 operations above


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: