(* $Id: ringFieldSig.mli,v 1.13 2008/01/30 19:45:10 averell Exp $ *) (** Signatures for modules representing algebraic rings and fields. @author Florent Hivert *) module type RING = sig type t (** The type of the elements of the ring. *) val zero : t (** The zero of the ring. *) val one : t (** The one of the ring. *) val of_int : int -> t (** The multiple of the one of the ring. *) val is_zero : t -> bool (** Test fo zero element. *) val ( =/ ) : t -> t -> bool (** The equality of two elements of the ring. *) val ( +/ ) : t -> t -> t (** The sum of two elements of the ring. *) val ( -/ ) : t -> t -> t (** The difference of two elements of the ring. *) val negate : t -> t (** The negation of a element of the ring. *) val ( */ ) : t -> t -> t (** The product of two elements of the ring. *) val pow : t -> int -> t (** The power of an element of the ring by a [int]. *) val print : t -> unit (** Pretty print an element of the ring. *) end module type POLY = sig type coeffRing include RING (* convert from ring and from/to ring list *) val of_R : coeffRing -> t val of_Rlist : coeffRing list -> t val to_Rlist : t -> coeffRing list (* the X polynomial *) val x : t val multX : t -> t val multXn : t -> int -> t val monome : coeffRing -> int -> t val degree : t -> int val multCoeff : t -> coeffRing -> t val coeff : t -> int -> coeffRing val lcoeff : t -> coeffRing val eval : t -> coeffRing -> coeffRing end