计算机科学 > 计算机科学中的逻辑
[提交于 2020年2月14日 (v1),最后修订于 2020年10月30日 (此版本, v3)]
标题:The Yoneda Reduction of Polymorphic Types (Extended Version)
查看原文 PDF 中文 PDF (下批处理) EasyResearch 阅读摘要:In this paper we explore a family of type isomorphisms in System F whose validity corresponds, semantically, to some form of the Yoneda isomorphism from category theory. These isomorphisms hold under theories of equivalence stronger than beta-eta-equivalence, like those induced by parametricity and dinaturality. We show that the Yoneda type isomorphisms yield a rewriting over types, that we call Yoneda reduction, which can be used to eliminate quantifiers from a polymorphic type, replacing them with a combination of monomorphic type constructors. We establish some sufficient conditions under which quantifiers can be fully eliminated from a polymorphic type, and we show some application of these conditions to count the inhabitants of a type and to compute program equivalence in some fragments of System F.