syntax update (part 2)

also:
 - bugfix in prover (guessable_vars violated precondition of Syntax.is_pure)
 - updated test generator
moved some code

it was convenient for debug to have
pretty-printing defined as early as possible