Correct a few mistakes

* In the function value_definition, the bound type variables
 must be local to the binding.
* In the definition of instances, forgot to insert the instance
 parameters in the local environment.
* In the elaboration of dictionaries, in the case an instance is used,
 the parameters in the class predicates must be replaced by the provided
 arguments.