UnionFind.Makeinclude Ppx_compare_lib.Comparable.S with type t := tval compare : t Base__Ppx_compare_lib.compareinclude Ppx_compare_lib.Equal.S with type t := tval equal : t Base__Ppx_compare_lib.equaltype repr = private X.tval empty : tval is_empty : t -> boolreturn the optional new equality added between the old representatives of the two items in the form of "old representative = new representative", None if they were already in the same congruence class
fold over the equivalence classes of the relation, singling out the representative for each class
the relation x -> x' derived from the equality relation that relates all x, x' such that ¬(should_keep x), should_keep x', and x=x', as well as y -> y' when no element in the equivalence class of y satisfies should_keep and y' is the representative of the class
apply_subst subst uf eliminate all variables in the domain of subst from uf, keeping the smallest representative not in the domain of subst for each class. Classes without any such elements are kept intact.