let rec remove_identif var_identif tas = function
| (n,Var(m) as b)::tail ->
(try
if rep var_identif n = rep var_identif m then
(* remove binding, because n and m are identified *)
remove_identif var_identif tas tail
else
remove_identif var_identif (b::tas) tail
with
Not_found -> remove_identif var_identif (b::tas) tail
)
| (n,_ as b)::tail ->
(try
if rep var_identif n = n then
remove_identif var_identif (b::tas) tail
else
(* remove binding, because n is not a represantative *)
remove_identif var_identif tas tail
with
Not_found -> remove_identif var_identif (b::tas) tail
)
| [] -> tas