type 'a substitution = (int * 'a foterm) list
-type comparison = Lt | Eq | Gt | Incomparable
+type comparison = Lt | Eq | Gt | Incomparable | Invertible
type rule = Superposition | Demodulation
type direction = Left2Right | Right2Left | Nodir
type 'a passive_clause = int * 'a unit_clause (* weight * equation *)
+let vars_of_term t =
+ let rec aux acc = function
+ | Leaf _ -> acc
+ | Var i -> if (List.mem i acc) then acc else i::acc
+ | Node l -> List.fold_left aux acc l
+ in aux [] t
+;;
+
module OT =
struct
type t = int