sig
exception Not_a_num
exception Maybe_zero
module type S =
sig
type r
val compare : Polynome.S.r -> Polynome.S.r -> int
val term_embed : Term.t -> Polynome.S.r
val mult : Polynome.S.r -> Polynome.S.r -> Polynome.S.r
val print : Format.formatter -> Polynome.S.r -> unit
end
module type T =
sig
type r
type t
val compare : Polynome.T.t -> Polynome.T.t -> int
val hash : Polynome.T.t -> int
val create :
(Num.num * Polynome.T.r) list -> Num.num -> Ty.t -> Polynome.T.t
val add : Polynome.T.t -> Polynome.T.t -> Polynome.T.t
val sub : Polynome.T.t -> Polynome.T.t -> Polynome.T.t
val mult : Polynome.T.t -> Polynome.T.t -> Polynome.T.t
val mult_const : Num.num -> Polynome.T.t -> Polynome.T.t
val div : Polynome.T.t -> Polynome.T.t -> Polynome.T.t * bool
val modulo : Polynome.T.t -> Polynome.T.t -> Polynome.T.t
val is_empty : Polynome.T.t -> bool
val find : Polynome.T.r -> Polynome.T.t -> Num.num
val choose : Polynome.T.t -> Num.num * Polynome.T.r
val subst :
Polynome.T.r -> Polynome.T.t -> Polynome.T.t -> Polynome.T.t
val remove : Polynome.T.r -> Polynome.T.t -> Polynome.T.t
val to_list : Polynome.T.t -> (Num.num * Polynome.T.r) list * Num.num
val print : Format.formatter -> Polynome.T.t -> unit
val type_info : Polynome.T.t -> Ty.t
val is_monomial :
Polynome.T.t -> (Num.num * Polynome.T.r * Num.num) option
val ppmc_denominators : Polynome.T.t -> Num.num
val pgcd_numerators : Polynome.T.t -> Num.num
val normal_form : Polynome.T.t -> Polynome.T.t * Num.num * Num.num
val normal_form_pos : Polynome.T.t -> Polynome.T.t * Num.num * Num.num
end
module Make :
functor (X : S) ->
sig
type r = X.r
type t
val compare : t -> t -> int
val hash : t -> int
val create : (Num.num * r) list -> Num.num -> Ty.t -> t
val add : t -> t -> t
val sub : t -> t -> t
val mult : t -> t -> t
val mult_const : Num.num -> t -> t
val div : t -> t -> t * bool
val modulo : t -> t -> t
val is_empty : t -> bool
val find : r -> t -> Num.num
val choose : t -> Num.num * r
val subst : r -> t -> t -> t
val remove : r -> t -> t
val to_list : t -> (Num.num * r) list * Num.num
val print : Format.formatter -> t -> unit
val type_info : t -> Ty.t
val is_monomial : t -> (Num.num * r * Num.num) option
val ppmc_denominators : t -> Num.num
val pgcd_numerators : t -> Num.num
val normal_form : t -> t * Num.num * Num.num
val normal_form_pos : t -> t * Num.num * Num.num
end
end