计算机科学 > 程序设计语言
[提交于 2018年3月8日]
标题:Efficient Mendler-Style Lambda-Encodings in Cedille
查看原文 PDF 中文 PDF (下批处理) EasyResearch 阅读摘要:It is common to model inductive datatypes as least fixed points of functors. We show that within the Cedille type theory we can relax functoriality constraints and generically derive an induction principle for Mendler-style lambda-encoded inductive datatypes, which arise as least fixed points of covariant schemes where the morphism lifting is defined only on identities. Additionally, we implement a destructor for these lambda-encodings that runs in constant-time. As a result, we can define lambda-encoded natural numbers with an induction principle and a constant-time predecessor function so that the normal form of a numeral requires only linear space. The paper also includes several more advanced examples.
提交历史
来自:Denis Firsov[v1] 2018年3月8日 星期四 00:00:00 UTC