sig
  module Make :
    functor (E : Index.EQUATION->
      sig
        type t
        module E :
          sig
            type t = E.t
            type rhs = E.rhs
            val compare : t -> t -> int
            val extract : t -> Index_intf.term * rhs * bool
            val priority : t -> int
          end
        type rhs = E.rhs
        val empty : unit -> t
        val is_empty : t -> bool
        val add : t -> E.t -> t
        val add_seq : t -> E.t Sequence.t -> t
        val add_list : t -> E.t list -> t
        val remove : t -> E.t -> t
        val remove_seq : t -> E.t Sequence.t -> t
        val size : t -> int
        val iter : t -> (Index_intf.term -> E.t -> unit) -> unit
        val retrieve :
          ?subst:Index_intf.subst ->
          sign:bool ->
          t Scoped.t ->
          Index_intf.term Scoped.t ->
          (Index_intf.term * rhs * E.t * Index_intf.subst) Sequence.t
        val to_dot : t CCFormat.printer
      end
  module MakeTerm :
    functor (X : Set.OrderedType->
      sig
        type t
        type elt = X.t
        module Leaf :
          sig
            type t
            type elt = elt
            val empty : t
            val add : t -> Index_intf.term -> elt -> t
            val remove : t -> Index_intf.term -> elt -> t
            val is_empty : t -> bool
            val iter : t -> (Index_intf.term -> elt -> unit) -> unit
            val fold : t -> '-> ('-> Index_intf.term -> elt -> 'a) -> 'a
            val size : t -> int
            val fold_unify :
              ?subst:Index_intf.subst ->
              t Scoped.t ->
              Index_intf.term Scoped.t ->
              (Index_intf.term * elt * Index_intf.subst) Sequence.t
            val fold_match :
              ?subst:Index_intf.subst ->
              t Scoped.t ->
              Index_intf.term Scoped.t ->
              (Index_intf.term * elt * Index_intf.subst) Sequence.t
            val fold_matched :
              ?subst:Index_intf.subst ->
              t Scoped.t ->
              Index_intf.term Scoped.t ->
              (Index_intf.term * elt * Index_intf.subst) Sequence.t
          end
        val name : string
        val empty : unit -> t
        val is_empty : t -> bool
        val size : t -> int
        val add : t -> Index_intf.term -> elt -> t
        val add_seq : t -> (Index_intf.term * elt) Sequence.t -> t
        val add_list : t -> (Index_intf.term * elt) list -> t
        val remove : t -> Index_intf.term -> elt -> t
        val iter : t -> (Index_intf.term -> elt -> unit) -> unit
        val fold : t -> ('-> Index_intf.term -> elt -> 'a) -> '-> 'a
        val retrieve_unifiables :
          ?subst:Index_intf.subst ->
          t Scoped.t ->
          Index_intf.term Scoped.t ->
          (Index_intf.term * elt * Index_intf.subst) Sequence.t
        val retrieve_generalizations :
          ?subst:Index_intf.subst ->
          t Scoped.t ->
          Index_intf.term Scoped.t ->
          (Index_intf.term * elt * Index_intf.subst) Sequence.t
        val retrieve_specializations :
          ?subst:Index_intf.subst ->
          t Scoped.t ->
          Index_intf.term Scoped.t ->
          (Index_intf.term * elt * Index_intf.subst) Sequence.t
        val to_dot : elt CCFormat.printer -> t CCFormat.printer
      end
end