Encoding Monomorphic and Polymorphic Types (Logical Methods in Computer Science, 2017)