let str_subs_clot_dbg table (subs : t_subst list) (size : string) (u : term) (v : term) : string =
  let rec help cnt str = function
    | sub::subs ->
        let pu,sub2 = purify sub  u in
        let pv,sub2 = purify sub2 v in
        let u_clot = clot_light sub2 pu in
        let v_clot = clot_light sub2 pv in
         help (cnt+1)
        (str^"---- subst ("^(string_of_int cnt)^"/"^size^") ----\n"^
         (str_sub_clot_dbg table sub)^
         "\nu(sub) = "^(str_term_dbg table u_clot)^
         "\nv(sub) = "^(str_term_dbg table v_clot)^"\n"
         ) subs
    | []    -> str
  in
  if subs = [] then "empty subst list\n" else help 1 "" subs