class virtual ['a] group : object method virtual equal : 'a -> 'a -> bool method not_equal : 'a -> 'a -> bool method virtual zero : 'a method virtual plus : 'a -> 'a -> 'a method virtual opposite : 'a -> 'a method minus : 'a -> 'a -> 'a end class virtual ['a] ring : object inherit ['a] group method virtual one : 'a method virtual product : 'a -> 'a -> 'a end class virtual ['a] field : object inherit ['a] ring method virtual inverse : 'a -> 'a end module type Group = sig type t val meth : t group end module type Ring = sig include Group val meth : t ring end type int module Int : sig include Ring with type t = int val of_int64 : int64 -> t end module type Field = sig include Ring val meth : t field val characteristic : int end (*module type Polynomial = functor (_ : Ring) -> Ring*) module IntMod : functor (_ : sig val modulus : Int.t end) -> sig include Ring val inj : int -> t val proj : t -> int end module Fp : functor (_ : sig val modulus : Int.t end) -> sig include Field val of_int64 : int64 -> t end module EllipticCurve : functor (F : Field) (_ : sig val a1 : F.t val a2 : F.t val a3 : F.t val a4 : F.t val a6 : F.t val p : F.t end) -> sig include Group val meth : object inherit ['a] group method virtual random : 'a -> 'a end end