Sketching the implementation of the typing rules for expressions