type substitution and occurs-check relation