type term = FOTerm.t
type subst = Substs.t
module type LEAF = sig
  type t
  type elt
  val empty : t
  val add : t -> term -> elt -> t
  val remove : t -> term -> elt -> t
  val is_empty : t -> bool
  val iter : t -> (term -> elt -> unit) -> unit
  val fold : t -> 'a -> ('a -> term -> elt -> 'a) -> 'a
  val size : t -> int
  val fold_unify :
    ?subst:subst -> t Scoped.t -> term Scoped.t ->
    (term * elt * subst) Sequence.t
  val fold_match :
    ?subst:subst ->
    t Scoped.t -> term Scoped.t ->
    (term * elt * subst) Sequence.t
  
  val fold_matched :
    ?subst:subst ->
    t Scoped.t -> term Scoped.t ->
    (term * elt * subst) Sequence.t
  
end
module type TERM_IDX = sig
  type t
  type elt
  module Leaf : LEAF with type elt = elt
  val name : string
  val empty : unit -> t
  val is_empty : t -> bool
  val size : t -> int
  val add : t -> term -> elt -> t
  val add_seq : t -> (term * elt) Sequence.t -> t
  val add_list : t -> (term * elt) list -> t
  val remove : t -> term -> elt -> t
  val iter : t -> (term -> elt -> unit) -> unit
  val fold : t -> ('a -> term -> elt -> 'a) -> 'a -> 'a
  val retrieve_unifiables : ?subst:subst ->
    t Scoped.t -> term Scoped.t ->
    (term * elt * subst) Sequence.t
  val retrieve_generalizations : ?subst:subst ->
    t Scoped.t -> term Scoped.t ->
    (term * elt * subst) Sequence.t
  val retrieve_specializations : ?subst:subst ->
    t Scoped.t -> term Scoped.t ->
    (term * elt * subst) Sequence.t
  val to_dot : elt CCFormat.printer -> t CCFormat.printer
  
end
type lits = term SLiteral.t Sequence.t
module type CLAUSE = sig
  type t
  val compare : t -> t -> int
  
  val to_lits : t -> lits
  
end
module type SUBSUMPTION_IDX = sig
  type t
  module C : CLAUSE
  val name : string
  val empty : unit -> t
  
  val add : t -> C.t -> t
  
  val add_seq : t -> C.t Sequence.t -> t
  val add_list : t -> C.t list -> t
  val remove : t -> C.t -> t
  
  val remove_seq : t -> C.t Sequence.t -> t
  val retrieve_subsuming : t -> lits -> C.t Sequence.t
  
  val retrieve_subsuming_c : t -> C.t -> C.t Sequence.t
  val retrieve_subsumed : t -> lits -> C.t Sequence.t
  
  val retrieve_subsumed_c : t -> C.t -> C.t Sequence.t
  val iter : t -> C.t Sequence.t
  val fold : ('a -> C.t -> 'a) -> 'a -> t -> 'a
end
module type EQUATION = sig
  type t
  type rhs
  
  val compare : t -> t -> int
  
  val extract : t -> (term * rhs * bool)
  
  val priority : t -> int
  
end
module type UNIT_IDX = sig
  type t
  module E : EQUATION
  
  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 -> (term -> E.t -> unit) -> unit
  
  val retrieve :
    ?subst:subst -> sign:bool ->
    t Scoped.t -> term Scoped.t ->
    (term * rhs * E.t * subst) Sequence.t
  
  val to_dot : t CCFormat.printer
  
end