varlist
;;
+ let rec reloc_subst subst = function
+ | (Terms.Leaf _) as t -> t
+ | Terms.Var i ->
+ (try
+ List.assoc i subst
+ with
+ Not_found -> assert false)
+ | (Terms.Node l) ->
+ Terms.Node (List.map (fun t -> reloc_subst subst t) l)
+;;
+
let rec apply_subst subst = function
| (Terms.Leaf _) as t -> t
| Terms.Var i ->