let pre_identification (vi_ctrs : t_vi_ctrs) (std_ls : t_equal)
  (var_identif : t_partition) : t_partition =

  (* a dummy substitution, to apply egal *)
  let sub = (std_ls,FreeVar 0,[])
  in
  
  (* ns are the elements that are equivalent to n, but not n,
   * i.e. the equivalence class of n is (n::ns) *)

  let rec help n ns tas = function
    | ms::tail ->
        (* m is the representativ of the class ms *)
        let m = List.hd ms in
        if egal sub (Var(n)) (Var(m)) then
          (* combine the classes of n and m, if n=m does not violates vi_ctr,
           * the class of m is ms and the class of n is n::ns *)

          if is_allowed var_identif n m vi_ctrs then
            help n (merge ns ms) tas tail
          else
            raise Invalid_Var_Identif
        else
           help n ns (ms::tas) tail
    | [] -> ((n::ns),tas)
  in

  let rec help2 tas = function
    | (n::ns)::tail ->
        let (new_nns,new_tail) = help n ns [] tail in
        help2 (new_nns::tas) new_tail
    | [] -> tas
    | _ -> failwith ("pre_identification: var_identif is not a valid partition"^
                     ", it contains an empty class")
  in

  let var_identif = help2 [] var_identif
  in
  (* test, if var_identif is a valid variable identification, according to
   * vi_ctrs. *)

  if is_allowed_vi var_identif vi_ctrs then
    var_identif
  else
    raise Invalid_Var_Identif