Monotone recursive types and recursive data representations in Cedille
Authors:
Preprint
Abstract
Guided by Tarksi's fixpoint theorem in order theory, we show how to derive monotone recursive types with constant-time roll and unroll operations within Cedille, an impredicative, constructive, and logically consistent pure typed lambda calculus. This derivation takes place within the preorder on Cedille types induced by type inclusions, a notion which is expressible within the theory itself. As applications, we use monotone recursive types to generically derive two recursive representations of data in lambda calculus, the Parigot and Scott encoding. For both encodings, we prove induction and examine the computational and extensional properties of their destructor, iterator, and primitive recursor in Cedille. For our Scott encoding in particular, we translate into Cedille a construction due to Lepigre and Raffalli that equips Scott naturals with primitive recursion, then extend this construction to derive a generic induction principle. This allows us to give efficient and provably unique (up to function extensionality) solutions for the iteration and primitive recursion schemes for Scott-encoded data.Keywords
All Related Versions
This publication has 16 references indexed in Scilit:
- From realizability to induction via dependent intersectionAnnals of Pure and Applied Logic, 2018
- The calculus of dependent lambda eliminationsJournal of Functional Programming, 2017
- Safe zero-cost coercions for HaskellJournal of Functional Programming, 2016
- Efficiency of lambda-encodings in total type theoryJournal of Functional Programming, 2016
- Innovations in computational type theory using NuprlJournal of Applied Logic, 2006
- Iteration and coiteration schemes for higher-order and nested datatypesTheoretical Computer Science, 2005
- Recursive programming with proofsTheoretical Computer Science, 1992
- Fixed point theorems and semantics: a folk taleInformation Processing Letters, 1982
- A discrimination algorithm inside λ-β-calculusTheoretical Computer Science, 1979
- A fixpoint theorem for complete categoriesMathematische Zeitschrift, 1968