Polymorphism and the free bicartesian closed category
We study two decidable fragments of System F, the polynomial and the Yoneda fragment, inducing two representations of the free bicartesian closed category. The first fragment is freely generated by the encoding of finite polynomial functors (generalizing the usual embedding of finite products and coproducts) and describes a class of well-behaved polymorphic terms: unlike those in full System F, the terms typable in this fragment can be interpreted as ordinary natural transformations and are equivalent, up to permutations, to terms typable using a strictly predicative type discipline. The second fragment is introduced to investigate the class of finite types, that is the types of System F which are isomorphic, modulo contextual equivalence, to a closed propositional type. The types of this fragment arise from a schema resembling the Yoneda isomorphism, and are shown to converge onto propositional types by a type rewriting approach.
READ FULL TEXT