Converts a term with named variables to a term with De Bruijn indices. We use unique negative indices to represent free variables.
the term with named variables
the term with De Bruijn indices