Each variable in a term is instantiated to a term of the form
'$VAR'(N), where N is an integer, by the predicate numbervars/2.
The "write" predicates
(write/1, writeq/1, and write_term/2 with the numbervars
option set to true) transform these terms into upper case letters.