let name_of = function
| External(n, _) -> n
| Rename(n, i, _) ->
let str = Format.sprintf "%s!%d" (Name.to_string n) i in
Name.of_string str
| Slack(i, alpha, _) ->
let str = Format.sprintf "%s!%d" (if alpha then "k" else "l") i in
Name.of_string str
| Fresh(n, i, _) ->
let str = Format.sprintf "%s!%d" (Name.to_string n) i in
Name.of_string str
| Bound(n) ->
let str = Format.sprintf "!%d" n in
Name.of_string str