Type checking inference rules